]> icculus.org git repositories - dana/openbox.git/blob - render/color.h
rename color_rgb to RrColor
[dana/openbox.git] / render / color.h
1 #ifndef __color_h
2 #define __color_h
3
4 #include "render.h"
5
6 #include <X11/Xlib.h>
7 #include <X11/Xutil.h>
8 #include <glib.h>
9
10 #if (G_BYTE_ORDER == G_BIG_ENDIAN)
11 #define default_red_offset 0
12 #define default_green_offset 8
13 #define default_blue_offset 16
14 #define default_alpha_offset 24
15 #define render_endian MSBFirst  
16 #else
17 #define default_alpha_offset 24
18 #define default_red_offset 16
19 #define default_green_offset 8
20 #define default_blue_offset 0
21 #define render_endian LSBFirst
22 #endif /* G_BYTE_ORDER == G_BIG_ENDIAN */
23
24 struct _RrColor {
25     const RrInstance *inst;
26
27     int r;
28     int g;
29     int b;
30     unsigned long pixel;
31     GC gc;
32 };
33
34 void color_allocate_gc(RrColor *in);
35 XColor *pickColor(const RrInstance *inst, gint r, gint g, gint b);
36 void reduce_depth(const RrInstance *inst, pixel32 *data, XImage *im);
37 void increase_depth(const RrInstance *inst, pixel32 *data, XImage *im);
38
39 #endif /* __color_h */