2
0

dtscreen.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: dtscreen.h /main/5 1996/05/13 16:54:19 rswiston $ */
  24. /*
  25. */
  26. /* *
  27. * (c) Copyright 1993, 1994 Hewlett-Packard Company *
  28. * (c) Copyright 1993, 1994 International Business Machines Corp. *
  29. * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
  30. * (c) Copyright 1993, 1994 Novell, Inc. *
  31. */
  32. /*-
  33. *
  34. * xlock.h - external interfaces for new modes and SYSV OS defines.
  35. *
  36. * Copyright (c) 1991 by Patrick J. Naughton.
  37. *
  38. */
  39. #include <X11/Xlib.h>
  40. #include <X11/Xutil.h>
  41. #include <X11/Xos.h>
  42. #include <Dt/Dt.h>
  43. #define MAXSCREENS 3
  44. #define NUMCOLORS 64
  45. typedef struct {
  46. Screen *screen;
  47. int npixels; /* number of valid entries in pixels */
  48. u_long pixels[NUMCOLORS]; /* pixel values in the colormap */
  49. } perscreen;
  50. typedef struct {
  51. Window w; /* window id */
  52. GC gc; /* graphics context for animation */
  53. perscreen *perscreen; /* screen info for this window */
  54. void *data; /* mode data */
  55. } perwindow;
  56. extern Display *dsp;
  57. extern char *ProgramName;
  58. extern char *display;
  59. extern char *mode;
  60. extern float saturation;
  61. extern int nicelevel;
  62. extern int delay;
  63. extern int batchcount;
  64. extern int reinittime;
  65. extern Bool usefirst;
  66. extern Bool mono;
  67. extern Bool create;
  68. extern void (*callback) ();
  69. extern void (*init) ();
  70. extern void GetResources();
  71. extern void CheckResources();
  72. extern void hsbramp();
  73. extern void error();
  74. extern long seconds();
  75. extern void usage();
  76. extern void hide_hft_ring();
  77. extern void unhide_hft_ring();
  78. /* System V Release 4 redefinitions of BSD functions and structures */
  79. #if defined (SYSV) || defined (SVR4)
  80. #include <sys/time.h>
  81. #define passwd spwd
  82. #define pw_passwd sp_pwdp
  83. #if defined(AIXV3) || defined(hpux)
  84. #undef NULL
  85. #define NULL 0
  86. #include <sys/poll.h>
  87. struct passwd {
  88. char *pw_name;
  89. char *pw_passwd;
  90. uid_t pw_uid;
  91. gid_t pw_gid;
  92. char *pw_gecos;
  93. char *pw_dir;
  94. char *pw_shell;
  95. };
  96. #else
  97. #include <poll.h>
  98. #include <shadow.h>
  99. #define getpwnam getspnam
  100. #endif
  101. #if !(defined(_AIX) || defined(hpux) || defined(sun))
  102. # define srandom srand
  103. # define random rand
  104. # define MAXRAND (32767.0)
  105. #else
  106. # define MAXRAND (2147483648.0)
  107. #endif
  108. #else
  109. #define MAXRAND (2147483648.0)
  110. #endif