1 // -*- mode: C++; indent-tabs-mode: nil; -*-
19 static Display *display; // the X display
21 typedef std::vector<ScreenInfo> ScreenInfoList;
24 static bool _shape; // does the display have the shape extention?
25 static int _shape_event_basep; // base for shape events
27 static bool _xinerama; // does the display have the xinerama extention?
28 static int _xinerama_event_basep;// base for xinerama events
30 static unsigned int _mask_list[8];// a list of all combinations of lock masks
32 static ScreenInfoList _screenInfoList; // info for all screens on the display
34 static BGCCache *_gccache;
36 static int xerrorHandler(Display *d, XErrorEvent *e); // handles X errors duh
38 OBDisplay(); // this class cannot be instantiated
41 static void initialize(char *name);
42 static void destroy();
44 //! Returns the GC cache for the application
45 inline static BGCCache *gcCache() { return _gccache; }
48 Returns a ScreenInfo class, which gives information on a screen on the
50 \param snum The screen number of the screen to retrieve info on
51 \return Info on the requested screen, in a ScreenInfo class
53 static const ScreenInfo* screenInfo(int snum);
55 //! Returns if the display has the shape extention available
56 inline static bool shape() { return _shape; }
57 //! Returns the shape extension's event base
58 inline static int shapeEventBase() { return _shape_event_basep; }
59 //! Returns if the display has the xinerama extention available
60 inline static bool xinerama() { return _xinerama; }
67 static void grabButton(unsigned int button, unsigned int modifiers,
68 Window grab_window, bool owner_events,
69 unsigned int event_mask, int pointer_mode,
70 int keyboard_mode, Window confine_to, Cursor cursor,
71 bool allow_scroll_lock);
72 static void ungrabButton(unsigned int button, unsigned int modifiers,
78 #endif // __display_hh