aboutsummaryrefslogtreecommitdiff
path: root/src/BaseDisplay.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-08-17 22:11:23 (GMT)
committerfluxgen <fluxgen>2002-08-17 22:11:23 (GMT)
commitf1dc9179f068dda1e9bc09b1408157967732847f (patch)
tree148cead2aeede9bc361e50a6158659d656241796 /src/BaseDisplay.hh
parent8e00a92e403451362ce8845148e5558706e5eedd (diff)
downloadfluxbox_pavel-f1dc9179f068dda1e9bc09b1408157967732847f.zip
fluxbox_pavel-f1dc9179f068dda1e9bc09b1408157967732847f.tar.bz2
removed cursor functions, changed to singleton and changed to FbTk EventHandler
Diffstat (limited to 'src/BaseDisplay.hh')
-rw-r--r--src/BaseDisplay.hh26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/BaseDisplay.hh b/src/BaseDisplay.hh
index 5b2ea2c..1624a05 100644
--- a/src/BaseDisplay.hh
+++ b/src/BaseDisplay.hh
@@ -22,12 +22,13 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: BaseDisplay.hh,v 1.25 2002/08/14 21:21:30 fluxgen Exp $ 25// $Id: BaseDisplay.hh,v 1.26 2002/08/17 22:10:03 fluxgen Exp $
26 26
27#ifndef BASEDISPLAY_HH 27#ifndef BASEDISPLAY_HH
28#define BASEDISPLAY_HH 28#define BASEDISPLAY_HH
29 29
30#include "NotCopyable.hh" 30#include "NotCopyable.hh"
31#include "EventHandler.hh"
31 32
32#include <X11/Xlib.h> 33#include <X11/Xlib.h>
33 34
@@ -48,12 +49,16 @@ class ScreenInfo;
48 49
49/// obsolete 50/// obsolete
50void bexec(const char *command, char *displaystring); 51void bexec(const char *command, char *displaystring);
51 52/**
52class BaseDisplay:private NotCopyable 53 Singleton class to manage display connection
54*/
55class BaseDisplay:private NotCopyable, FbTk::EventHandler<XEvent>
53{ 56{
54public: 57public:
55 BaseDisplay(const char *app_name, const char *display_name = 0); 58 BaseDisplay(const char *app_name, const char *display_name = 0);
56 virtual ~BaseDisplay(); 59 virtual ~BaseDisplay();
60 static BaseDisplay *instance();
61
57 /** 62 /**
58 obsolete 63 obsolete
59 @see FluxboxWindow 64 @see FluxboxWindow
@@ -86,11 +91,7 @@ public:
86 inline bool doShutdown() const { return m_shutdown; } 91 inline bool doShutdown() const { return m_shutdown; }
87 inline bool isStartup() const { return m_startup; } 92 inline bool isStartup() const { return m_startup; }
88 93
89 inline const Cursor &getSessionCursor() const { return cursor.session; } 94
90 inline const Cursor &getMoveCursor() const { return cursor.move; }
91 inline const Cursor &getLowerLeftAngleCursor() const { return cursor.ll_angle; }
92 inline const Cursor &getLowerRightAngleCursor() const { return cursor.lr_angle; }
93
94 inline Display *getXDisplay() { return m_display; } 95 inline Display *getXDisplay() { return m_display; }
95 96
96 inline const char *getXDisplayName() const { return m_display_name; } 97 inline const char *getXDisplayName() const { return m_display_name; }
@@ -119,13 +120,7 @@ public:
119 BaseDisplay &m_bd; 120 BaseDisplay &m_bd;
120 }; 121 };
121 122
122protected:
123 virtual void process_event(XEvent *) = 0;
124
125private: 123private:
126 struct cursor {
127 Cursor session, move, ll_angle, lr_angle;
128 } cursor;
129 124
130 struct shape { 125 struct shape {
131 Bool extensions; 126 Bool extensions;
@@ -139,8 +134,9 @@ private:
139 ScreenInfoList screenInfoList; 134 ScreenInfoList screenInfoList;
140 135
141 const char *m_display_name, *m_app_name; 136 const char *m_display_name, *m_app_name;
142 int number_of_screens, m_server_grabs, colors_per_channel; 137 int number_of_screens, m_server_grabs;
143 138
139 static BaseDisplay *s_singleton;
144}; 140};
145 141
146 142