]> Dogcows Code - chaz/openbox/blob - otk_c/color.h
91b83e01bda186f2998fdc07f168eef19a870f0d
[chaz/openbox] / 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
This page took 0.032628 seconds and 4 git commands to generate.