X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FXDisplay.h;h=3c4230bdc78f8b8075d094f4126ccab577ffc4ab;hb=e7c332a586280ac1ea9d0f993d637802d64c9f87;hp=b736fd423dd10dc95f88de702c165378979b1ad7;hpb=de712f85676ca0a386c956165bb6460d65206c46;p=chaz%2Fopenbox diff --git a/src/XDisplay.h b/src/XDisplay.h index b736fd42..3c4230bd 100644 --- a/src/XDisplay.h +++ b/src/XDisplay.h @@ -39,11 +39,17 @@ private: bool _hasshape; int _shape_event_base; - typedef std::vector XScreenList; - XScreenList _screens; +#ifndef NOCLOBBER + // the server's values for the lock key modifiers + void getLockModifiers(); + unsigned int MaskList[8]; + // the masks of the modifiers which are ignored in button events. + int NumLockMask, ScrollLockMask; +#endif // NOCLOBBER + // X error handling - static int XErrorHandler(Display *d, XErrorEvent *e); + static int errorHandler(Display *d, XErrorEvent *e); static std::string _app_name; static Window _last_bad_window; @@ -58,27 +64,34 @@ public: XDisplay(const std::string &application_name, const char *dpyname = 0); virtual ~XDisplay(); - XScreen *screen(unsigned int s) const; - inline unsigned int screenCount() const { return _screens.size(); } + inline virtual unsigned int screenCount() const + { return ScreenCount(_display); } inline bool hasShape() const { return _hasshape; } inline int shapeEventBase() const { return _shape_event_base; } //inline Display *display() const { return _display; } + inline std::string applicationName() const { return _app_name; } inline std::string name() const { return _name; } - - // these belong in Xwindow - //const bool validateWindow(Window); - //void grabButton(unsigned int, unsigned int, Window, Bool, unsigned int, int, - // int, Window, Cursor) const; - //void ungrabButton(unsigned int button, unsigned int modifiers, - // Window grab_window) const; void grab(); void ungrab(); bool nextEvent(XEvent &e); + + int connectionNumber() const; + + Cursor createCursor(unsigned int shape) const; + + unsigned int stripModifiers(const unsigned int state) const; + + // these belong in Xwindow + const bool validateWindow(Window); + void grabButton(unsigned int, unsigned int, Window, Bool, unsigned int, int, + int, Window, Cursor) const; + void ungrabButton(unsigned int button, unsigned int modifiers, + Window grab_window) const; }; #endif // _XDisplay_h