]> icculus.org git repositories - dana/openbox.git/blob - otk_c/color.h
it compiles.. does it work?
[dana/openbox.git] / otk_c / color.h
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __color_h
3 #define __color_h
4
5 #include <X11/Xlib.h>
6 #include <Python.h>
7
8
9 typedef struct OtkColor {
10   int red, green, blue;
11   int screen;
12   Bool allocated;
13   unsigned long pixel;
14   PyObject *colorname; // PyStringObject
15   Colormap colormap;
16 } OtkColor;
17
18 OtkColor *OtkColor_New(int screen);
19 OtkColor *OtkColor_FromRGB(int r, int g, int b, int screen);
20 OtkColor *OtkColor_FromName(const char *name, int screen);
21
22 void OtkColor_Destroy(OtkColor *self);
23
24 void OtkColor_SetRGB(OtkColor *self, int r, int g, int b);
25 void OtkColor_SetScreen(OtkColor *self, int screen);
26 Bool OtkColor_IsValid(OtkColor *self);
27 unsigned long OtkColor_Pixel(OtkColor *self);
28
29 void OtkColor_InitializeCache();
30 void OtkColor_DestroyCache();
31 void OtkColor_CleanupColorCache();
32
33 #endif // __color_h