1 /* xlockmore.h --- xscreensaver compatibility layer for xlockmore modules.
2 * xscreensaver, Copyright (c) 1997 Jamie Zawinski <jwz@netscape.com>
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation. No representations are made about the suitability of this
9 * software for any purpose. It is provided "as is" without express or
12 * See xlockmore.h and xlockmore.c.
15 #ifndef __XLOCKMORE_INTERNAL_H__
16 #define __XLOCKMORE_INTERNAL_H__
18 #include "screenhack.h"
20 /* Compatibility with the xlockmore RNG API
21 (note that the xlockmore hacks never expect negative numbers.)
23 #define LRAND() ((long) (random() & 0x7fffffff))
24 #define NRAND(n) ((int) (LRAND() % (n)))
25 #define MAXRAND (2147483648.0) /* unsigned 1<<31 as a float */
26 #define SRAND(n) /* already seeded by screenhack.c */
29 typedef struct ModeInfo {
34 unsigned long *pixels;
39 XWindowAttributes xgwa;
47 long threed_left_color;
48 long threed_right_color;
49 long threed_both_color;
50 long threed_none_color;
55 typedef enum { t_String, t_Float, t_Int, t_Bool } xlockmore_type;
72 XrmOptionDescRec *opts;
78 extern void xlockmore_screenhack (Display *dpy, Window window,
79 Bool want_writable_colors,
80 Bool want_uniform_colors,
81 Bool want_smooth_colors,
82 Bool want_bright_colors,
83 void (*hack_init) (ModeInfo *),
84 void (*hack_draw) (ModeInfo *),
85 void (*hack_free) (ModeInfo *));
88 extern Visual *get_gl_visual (Screen *screen, char *name, char *class);
91 #endif /* __XLOCKMORE_INTERNAL_H__ */