]> Dogcows Code - chaz/openbox/blob - otk_c/display.h
32e92c4a6aee6e1c9f6356a4ae50d55668f5ad60
[chaz/openbox] / otk_c / display.h
1 // -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __display_h
3 #define __display_h
4
5 #include <X11/Xlib.h>
6 #include <Python.h>
7
8 struct OtkScreenInfo;
9 struct OtkDisplay;
10
11 extern struct OtkDisplay *OBDisplay; // the global display XXX: move this to app.h and ob.h?
12
13 extern PyTypeObject OtkDisplay_Type;
14
15 typedef struct OtkDisplay {
16 PyObject_HEAD
17
18 //! The X display
19 Display *display;
20
21 //! Does the display have the Shape extention?
22 Bool shape;
23 //! Base for events for the Shape extention
24 int shape_event_basep;
25
26 //! Does the display have the Xinerama extention?
27 Bool xinerama;
28 //! Base for events for the Xinerama extention
29 int xinerama_event_basep;
30
31 //! A list of all possible combinations of keyboard lock masks
32 unsigned int mask_list[8];
33
34 //! The number of requested grabs on the display
35 int grab_count;
36
37 //! A list of information for all screens on the display
38 PyListObject *screenInfoList;
39 } OtkDisplay;
40
41 //! Opens the X display, and sets the global OBDisplay variable
42 /*!
43 @see OBDisplay::display
44 @param name The name of the X display to open. If it is null, the DISPLAY
45 environment variable is used instead.
46 */
47 void OtkDisplay_Initialize(char *name);
48
49 //! Grabs the display
50 void OtkDisplay_Grab(OtkDisplay *self);
51
52 //! Ungrabs the display
53 void OtkDisplay_Ungrab(OtkDisplay *self);
54
55 //! Get the screen info for a specific screen
56 struct OtkScreenInfo *OtkDisplay_ScreenInfo(OtkDisplay *self, int num);
57
58 #endif // __display_h
This page took 0.035212 seconds and 3 git commands to generate.