diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-04 02:57:47 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-04 02:57:47 +0000 |
| commit | ed250c3b740fdf90aaf09cac9e873bd66bcc6a81 (patch) | |
| tree | 01f7ebc01584f937670e2d38a07f1fbf9a292cf3 /src/basedisplay.hh | |
| parent | f1f4cf57af9c855ff08029be12d189cc862b2c70 (diff) | |
basedisplay!! GAH NO FUCK OFF!@!(
Diffstat (limited to 'src/basedisplay.hh')
| -rw-r--r-- | src/basedisplay.hh | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/src/basedisplay.hh b/src/basedisplay.hh deleted file mode 100644 index aa1481ca..00000000 --- a/src/basedisplay.hh +++ /dev/null @@ -1,120 +0,0 @@ -// -*- mode: C++; indent-tabs-mode: nil; -*- -#ifndef __BaseDisplay_hh -#define __BaseDisplay_hh - -#include "screeninfo.hh" -#include "timer.hh" - -extern "C" { -#include <X11/Xlib.h> -#include <X11/Xatom.h> -} - -#include <vector> - -// forward declaration -class BGCCache; - -class BaseDisplay: public TimerQueueManager { -private: - struct BShape { - bool extensions; - int event_basep, error_basep; - }; - BShape shape; - -#ifdef XINERAMA - struct BXinerama { - bool extensions; - int event_basep, error_basep; - int major, minor; // version - }; - BXinerama xinerama; -#endif // XINERAMA - - unsigned int MaskList[8]; - size_t MaskListLength; - - enum RunState { STARTUP, RUNNING, SHUTDOWN }; - RunState run_state; - - Display *display; - mutable BGCCache *gccache; - - typedef std::vector<ScreenInfo> ScreenInfoList; - ScreenInfoList screenInfoList; - TimerQueue timerList; - - const char *display_name, *application_name; - - // no copying! - BaseDisplay(const BaseDisplay &); - BaseDisplay& operator=(const BaseDisplay&); - -protected: - // pure virtual function... you must override this - virtual void process_event(XEvent *e) = 0; - - // the masks of the modifiers which are ignored in button events. - int NumLockMask, ScrollLockMask; - - -public: - BaseDisplay(const char *app_name, const char *dpy_name = 0); - virtual ~BaseDisplay(void); - - const ScreenInfo* getScreenInfo(const unsigned int s) const; - - BGCCache *gcCache(void) const; - - inline bool hasShapeExtensions(void) const - { return shape.extensions; } -#ifdef XINERAMA - inline bool hasXineramaExtensions(void) const - { return xinerama.extensions; } -#endif // XINERAMA - inline bool doShutdown(void) const - { return run_state == SHUTDOWN; } - inline bool isStartup(void) const - { return run_state == STARTUP; } - - inline Display *getXDisplay(void) const { return display; } - - inline const char *getXDisplayName(void) const - { return display_name; } - inline const char *getApplicationName(void) const - { return application_name; } - - inline unsigned int getNumberOfScreens(void) const - { return screenInfoList.size(); } - inline int getShapeEventBase(void) const - { return shape.event_basep; } -#ifdef XINERAMA - inline int getXineramaMajorVersion(void) const - { return xinerama.major; } -#endif // XINERAMA - - inline void shutdown(void) { run_state = SHUTDOWN; } - inline void run(void) { run_state = RUNNING; } - - void grabButton(unsigned int button, unsigned int modifiers, - Window grab_window, bool owner_events, - unsigned int event_mask, int pointer_mode, - int keyboard_mode, Window confine_to, Cursor cursor, - bool allow_scroll_lock) const; - void ungrabButton(unsigned int button, unsigned int modifiers, - Window grab_window) const; - - void eventLoop(void); - - // from TimerQueueManager interface - virtual void addTimer(BTimer *timer); - virtual void removeTimer(BTimer *timer); - - // another pure virtual... this is used to handle signals that BaseDisplay - // doesn't understand itself - virtual bool handleSignal(int sig) = 0; -}; - - -#endif // __BaseDisplay_hh |
