-/* xscreensaver, Copyright (c) 1992, 1997 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2013 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
/* Like XFreeColors, but works on `XColor *' instead of `unsigned long *'
*/
-extern void free_colors (Display *, Colormap, XColor *, int ncolors);
+extern void free_colors (Screen *, Colormap, XColor *, int ncolors);
/* Allocates writable, non-contiguous color cells. The number requested is
(Unlike XAllocColorCells(), this will allocate as many as it can, instead
of failing if they can't all be allocated.)
*/
-extern void allocate_writable_colors (Display *dpy, Colormap cmap,
+extern void allocate_writable_colors (Screen *, Colormap,
unsigned long *pixels, int *ncolorsP);
If writable_p is true, writable color cells will be allocated;
otherwise, read-only cells will be allocated.
+
+ If allocate_p is false, screen and cmap are unused (OpenGL usage).
*/
-extern void make_color_ramp (Display *dpy, Colormap cmap,
+extern void make_color_ramp (Screen *, Visual *, Colormap,
int h1, double s1, double v1,
int h2, double s2, double v2,
XColor *colors, int *ncolorsP,
Bool closed_p,
Bool allocate_p,
- Bool writable_p);
+ Bool *writable_pP);
/* Generates a sequence of colors evenly spaced around the triangle
indicated by the thee HSV coordinates.
If writable_p is true, writable color cells will be allocated;
otherwise, read-only cells will be allocated.
+
+ If allocate_p is false, screen, visual and cmap are unused (OpenGL usage).
*/
-extern void make_color_loop (Display *, Colormap,
+extern void make_color_loop (Screen *, Visual *, Colormap,
int h1, double s1, double v1,
int h2, double s2, double v2,
int h3, double s3, double v3,
XColor *colors, int *ncolorsP,
Bool allocate_p,
- Bool writable_p);
+ Bool *writable_pP);
/* Allocates a hopefully-interesting colormap, which will be a closed loop
otherwise, read-only cells will be allocated. If no writable cells
cannot be allocated, we will try to allocate unwritable cells
instead, and print a message on stderr to that effect (if verbose_p).
+
+ If allocate_p is false, screen, visual and cmap are unused (OpenGL usage).
*/
-extern void make_smooth_colormap (Display *dpy, Visual *visual,
- Colormap cmap,
+extern void make_smooth_colormap (Screen *, Visual *, Colormap,
XColor *colors, int *ncolorsP,
Bool allocate_p,
Bool *writable_pP,
otherwise, read-only cells will be allocated. If no writable cells
cannot be allocated, we will try to allocate unwritable cells
instead, and print a message on stderr to that effect (if verbose_p).
+
+ If allocate_p is false, screen, visual and cmap are unused (OpenGL usage).
*/
-extern void make_uniform_colormap (Display *dpy, Visual *visual,
- Colormap cmap,
+extern void make_uniform_colormap (Screen *, Visual *, Colormap,
XColor *colors, int *ncolorsP,
Bool allocate_p,
Bool *writable_pP,
otherwise, read-only cells will be allocated. If no writable cells
cannot be allocated, we will try to allocate unwritable cells
instead, and print a message on stderr to that effect (if verbose_p).
+
+ If allocate_p is false, screen, visual and cmap are unused (OpenGL usage).
*/
-extern void make_random_colormap (Display *dpy, Visual *visual,
- Colormap cmap,
+extern void make_random_colormap (Screen *, Visual *, Colormap,
XColor *colors, int *ncolorsP,
Bool bright_p,
Bool allocate_p,
of writable color cells, this rotates the contents of the array by
`distance' steps, moving the colors of cell N to cell (N - distance).
*/
-extern void rotate_colors (Display *, Colormap,
+extern void rotate_colors (Screen *, Colormap,
XColor *, int ncolors, int distance);
#endif /* __COLORS_H__ */