summaryrefslogtreecommitdiff
path: root/otk_c/display.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-20 22:01:40 +0000
committerDana Jansens <danakj@orodu.net>2002-12-20 22:01:40 +0000
commitedc47eb5580babdca6547989c1cb5cdf317f4835 (patch)
tree152457329e6c7e5f6c9f7ab99ebc76a3213ba994 /otk_c/display.h
parent68194ce957db36ead19a39fdc7636a220befafe9 (diff)
some experimentin with C and python api. part 1.
Diffstat (limited to 'otk_c/display.h')
-rw-r--r--otk_c/display.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/otk_c/display.h b/otk_c/display.h
new file mode 100644
index 00000000..fd9b706f
--- /dev/null
+++ b/otk_c/display.h
@@ -0,0 +1,61 @@
+// -*- mode: C; indent-tabs-mode: nil; -*-
+#ifndef __display_h
+#define __display_h
+
+#include <X11/Xlib.h>
+#include <Python.h>
+
+typedef OtkScreenInfo;
+typedef OtkGCCache;
+
+typedef struct {
+ PyObject_HEAD
+
+ //! The X display
+ Display *display;
+
+ //! Does the display have the Shape extention?
+ Bool shape;
+ //! Base for events for the Shape extention
+ int shape_event_basep;
+
+ //! Does the display have the Xinerama extention?
+ Bool xinerama;
+ //! Base for events for the Xinerama extention
+ int xinerama_event_basep;
+
+ //! A list of all possible combinations of keyboard lock masks
+ unsigned int mask_list[8];
+
+ //! The number of requested grabs on the display
+ int grab_count;
+
+ //! A list of information for all screens on the display
+ PyObject *screenInfoList; // PyListObject
+
+ //! A cache for re-using GCs, used by the drawing objects
+ /*!
+ @see BPen
+ @see BFont
+ @see BImage
+ @see BImageControl
+ @see BTexture
+ */
+ OtkGCCache *gccache;
+} OtkDisplay;
+
+//! Creates a struct, opens the X display
+/*!
+ @see OBDisplay::display
+ @param name The name of the X display to open. If it is null, the DISPLAY
+ environment variable is used instead.
+*/
+PyObject *OtkDisplay_New(char *name);
+
+//! Grabs the display
+void OtkDisplay_Grab(OtkDisplay *self);
+
+//! Ungrabs the display
+void OtkDisplay_Ungrab(OtkDisplay *self);
+
+#endif // __display_h