diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-21 02:09:54 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-21 02:09:54 +0000 |
| commit | 59b65db2cac9f359dfcff3ab988e70eab053bdb4 (patch) | |
| tree | 2b83bef15dbc90495b2df1c90841ae3b8358c5d3 /otk_c/color.h | |
| parent | 607bf10d6df4a806cf571f9fc426eeafca21b6f9 (diff) | |
it compiles.. does it work?
Diffstat (limited to 'otk_c/color.h')
| -rw-r--r-- | otk_c/color.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/otk_c/color.h b/otk_c/color.h new file mode 100644 index 00000000..91b83e01 --- /dev/null +++ b/otk_c/color.h @@ -0,0 +1,33 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +#ifndef __color_h +#define __color_h + +#include <X11/Xlib.h> +#include <Python.h> + + +typedef struct OtkColor { + int red, green, blue; + int screen; + Bool allocated; + unsigned long pixel; + PyObject *colorname; // PyStringObject + Colormap colormap; +} OtkColor; + +OtkColor *OtkColor_New(int screen); +OtkColor *OtkColor_FromRGB(int r, int g, int b, int screen); +OtkColor *OtkColor_FromName(const char *name, int screen); + +void OtkColor_Destroy(OtkColor *self); + +void OtkColor_SetRGB(OtkColor *self, int r, int g, int b); +void OtkColor_SetScreen(OtkColor *self, int screen); +Bool OtkColor_IsValid(OtkColor *self); +unsigned long OtkColor_Pixel(OtkColor *self); + +void OtkColor_InitializeCache(); +void OtkColor_DestroyCache(); +void OtkColor_CleanupColorCache(); + +#endif // __color_h |
