all repos — openbox @ 16e1192e4d18cd0d32b1ab8bf38ac8d69347229d

openbox fork - make it a bit more like ryudo

otk_c/color.h (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef __color_h
#define __color_h

#include <X11/Xlib.h>
#include <Python.h>

extern PyTypeObject OtkColor_Type;

//!  OtkColor objects are immutable. DONT CHANGE THEM.
typedef struct OtkColor {
  PyObject_HEAD
  int red, green, blue;
  int screen;
  Bool allocated;
  unsigned long pixel;
} OtkColor;

PyObject *OtkColor_FromRGB(int r, int g, int b, int screen);
PyObject *OtkColor_FromName(const char *name, int screen);

unsigned long OtkColor_Pixel(OtkColor *self);

void OtkColor_CleanupColorCache();

#endif // __color_h