diff options
author | rathnor <rathnor> | 2002-12-01 13:42:15 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2002-12-01 13:42:15 (GMT) |
commit | 28b5c604490094e187494dcc566bd3d7a05a2c25 (patch) | |
tree | 8f78f5714a5cd055c10b067a2656fe7b2338e71a /src/BaseDisplay.hh | |
parent | b9134162f9633784d9097df18769a699a62650fe (diff) | |
download | fluxbox_pavel-28b5c604490094e187494dcc566bd3d7a05a2c25.zip fluxbox_pavel-28b5c604490094e187494dcc566bd3d7a05a2c25.tar.bz2 |
Indenting from tabs to emacs 4-space
Diffstat (limited to 'src/BaseDisplay.hh')
-rw-r--r-- | src/BaseDisplay.hh | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/src/BaseDisplay.hh b/src/BaseDisplay.hh index 3556bba..96e9144 100644 --- a/src/BaseDisplay.hh +++ b/src/BaseDisplay.hh | |||
@@ -22,7 +22,7 @@ | |||
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.33 2002/11/27 21:44:45 fluxgen Exp $ | 25 | // $Id: BaseDisplay.hh,v 1.34 2002/12/01 13:41:54 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef BASEDISPLAY_HH | 27 | #ifndef BASEDISPLAY_HH |
28 | #define BASEDISPLAY_HH | 28 | #define BASEDISPLAY_HH |
@@ -56,119 +56,119 @@ void bexec(const char *command, char *displaystring); | |||
56 | class BaseDisplay:public FbTk::App, private FbTk::NotCopyable | 56 | class BaseDisplay:public FbTk::App, private FbTk::NotCopyable |
57 | { | 57 | { |
58 | public: | 58 | public: |
59 | BaseDisplay(const char *app_name, const char *display_name = 0); | 59 | BaseDisplay(const char *app_name, const char *display_name = 0); |
60 | virtual ~BaseDisplay(); | 60 | virtual ~BaseDisplay(); |
61 | static BaseDisplay *instance(); | 61 | static BaseDisplay *instance(); |
62 | 62 | ||
63 | /** | 63 | /** |
64 | obsolete by FluxboxWindow | 64 | obsolete by FluxboxWindow |
65 | @see FluxboxWindow | 65 | @see FluxboxWindow |
66 | */ | 66 | */ |
67 | enum Attrib { | 67 | enum Attrib { |
68 | ATTRIB_SHADED = 0x01, | 68 | ATTRIB_SHADED = 0x01, |
69 | ATTRIB_MAXHORIZ = 0x02, | 69 | ATTRIB_MAXHORIZ = 0x02, |
70 | ATTRIB_MAXVERT = 0x04, | 70 | ATTRIB_MAXVERT = 0x04, |
71 | ATTRIB_OMNIPRESENT = 0x08, | 71 | ATTRIB_OMNIPRESENT = 0x08, |
72 | ATTRIB_WORKSPACE = 0x10, | 72 | ATTRIB_WORKSPACE = 0x10, |
73 | ATTRIB_STACK = 0x20, | 73 | ATTRIB_STACK = 0x20, |
74 | ATTRIB_DECORATION = 0x40 | 74 | ATTRIB_DECORATION = 0x40 |
75 | }; | 75 | }; |
76 | 76 | ||
77 | typedef struct _blackbox_hints { | 77 | typedef struct _blackbox_hints { |
78 | unsigned long flags, attrib, workspace, stack; | 78 | unsigned long flags, attrib, workspace, stack; |
79 | int decoration; | 79 | int decoration; |
80 | } BlackboxHints; | 80 | } BlackboxHints; |
81 | 81 | ||
82 | typedef struct _blackbox_attributes { | 82 | typedef struct _blackbox_attributes { |
83 | unsigned long flags, attrib, workspace, stack; | 83 | unsigned long flags, attrib, workspace, stack; |
84 | int premax_x, premax_y; | 84 | int premax_x, premax_y; |
85 | unsigned int premax_w, premax_h; | 85 | unsigned int premax_w, premax_h; |
86 | } BlackboxAttributes; | 86 | } BlackboxAttributes; |
87 | 87 | ||
88 | 88 | ||
89 | inline ScreenInfo *getScreenInfo(int s) { return screenInfoList[s]; } | 89 | inline ScreenInfo *getScreenInfo(int s) { return screenInfoList[s]; } |
90 | 90 | ||
91 | inline bool hasShapeExtensions() const { return shape.extensions; } | 91 | inline bool hasShapeExtensions() const { return shape.extensions; } |
92 | inline bool doShutdown() const { return m_shutdown; } | 92 | inline bool doShutdown() const { return m_shutdown; } |
93 | inline bool isStartup() const { return m_startup; } | 93 | inline bool isStartup() const { return m_startup; } |
94 | 94 | ||
95 | 95 | ||
96 | static Display *getXDisplay() { return App::instance()->display(); } | 96 | static Display *getXDisplay() { return App::instance()->display(); } |
97 | 97 | ||
98 | inline const char *getXDisplayName() const { return m_display_name; } | 98 | inline const char *getXDisplayName() const { return m_display_name; } |
99 | inline const char *getApplicationName() const { return m_app_name; } | 99 | inline const char *getApplicationName() const { return m_app_name; } |
100 | 100 | ||
101 | inline int getNumberOfScreens() const { return number_of_screens; } | 101 | inline int getNumberOfScreens() const { return number_of_screens; } |
102 | inline int getShapeEventBase() const { return shape.event_basep; } | 102 | inline int getShapeEventBase() const { return shape.event_basep; } |
103 | 103 | ||
104 | inline void shutdown() { m_shutdown = true; } | 104 | inline void shutdown() { m_shutdown = true; } |
105 | inline void run() { m_startup = m_shutdown = false; } | 105 | inline void run() { m_startup = m_shutdown = false; } |
106 | 106 | ||
107 | bool validateWindow(Window); | 107 | bool validateWindow(Window); |
108 | 108 | ||
109 | void grab(); | 109 | void grab(); |
110 | void ungrab(); | 110 | void ungrab(); |
111 | void eventLoop(); | 111 | void eventLoop(); |
112 | virtual void handleEvent(XEvent * const ev) { } | 112 | virtual void handleEvent(XEvent * const ev) { } |
113 | private: | 113 | private: |
114 | 114 | ||
115 | struct shape { | 115 | struct shape { |
116 | Bool extensions; | 116 | Bool extensions; |
117 | int event_basep, error_basep; | 117 | int event_basep, error_basep; |
118 | } shape; | 118 | } shape; |
119 | 119 | ||
120 | bool m_startup, m_shutdown; | 120 | bool m_startup, m_shutdown; |
121 | 121 | ||
122 | typedef std::vector<ScreenInfo *> ScreenInfoList; | 122 | typedef std::vector<ScreenInfo *> ScreenInfoList; |
123 | ScreenInfoList screenInfoList; | 123 | ScreenInfoList screenInfoList; |
124 | 124 | ||
125 | const char *m_display_name, *m_app_name; | 125 | const char *m_display_name, *m_app_name; |
126 | int number_of_screens, m_server_grabs; | 126 | int number_of_screens, m_server_grabs; |
127 | 127 | ||
128 | static BaseDisplay *s_singleton; | 128 | static BaseDisplay *s_singleton; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | 131 | ||
132 | class ScreenInfo { | 132 | class ScreenInfo { |
133 | public: | 133 | public: |
134 | explicit ScreenInfo(int screen_num); | 134 | explicit ScreenInfo(int screen_num); |
135 | ~ScreenInfo(); | 135 | ~ScreenInfo(); |
136 | 136 | ||
137 | inline BaseDisplay *getBaseDisplay() { return basedisplay; } | 137 | inline BaseDisplay *getBaseDisplay() { return basedisplay; } |
138 | 138 | ||
139 | inline Visual *getVisual() const { return visual; } | 139 | inline Visual *getVisual() const { return visual; } |
140 | inline Window getRootWindow() const { return root_window; } | 140 | inline Window getRootWindow() const { return root_window; } |
141 | inline Colormap colormap() const { return m_colormap; } | 141 | inline Colormap colormap() const { return m_colormap; } |
142 | 142 | ||
143 | inline int getDepth() const { return depth; } | 143 | inline int getDepth() const { return depth; } |
144 | inline int getScreenNumber() const { return screen_number; } | 144 | inline int getScreenNumber() const { return screen_number; } |
145 | 145 | ||
146 | inline unsigned int getWidth() const { return width; } | 146 | inline unsigned int getWidth() const { return width; } |
147 | inline unsigned int getHeight() const { return height; } | 147 | inline unsigned int getHeight() const { return height; } |
148 | 148 | ||
149 | #ifdef XINERAMA | 149 | #ifdef XINERAMA |
150 | inline bool hasXinerama() const { return m_hasXinerama; } | 150 | inline bool hasXinerama() const { return m_hasXinerama; } |
151 | inline int getNumHeads() const { return xineramaNumHeads; } | 151 | inline int getNumHeads() const { return xineramaNumHeads; } |
152 | unsigned int getHead(int x, int y) const; | 152 | unsigned int getHead(int x, int y) const; |
153 | unsigned int getCurrHead() const; | 153 | unsigned int getCurrHead() const; |
154 | unsigned int getHeadWidth(unsigned int head) const; | 154 | unsigned int getHeadWidth(unsigned int head) const; |
155 | unsigned int getHeadHeight(unsigned int head) const; | 155 | unsigned int getHeadHeight(unsigned int head) const; |
156 | int getHeadX(unsigned int head) const; | 156 | int getHeadX(unsigned int head) const; |
157 | int getHeadY(unsigned int head) const; | 157 | int getHeadY(unsigned int head) const; |
158 | #endif // XINERAMA | 158 | #endif // XINERAMA |
159 | 159 | ||
160 | private: | 160 | private: |
161 | BaseDisplay *basedisplay; | 161 | BaseDisplay *basedisplay; |
162 | Visual *visual; | 162 | Visual *visual; |
163 | Window root_window; | 163 | Window root_window; |
164 | Colormap m_colormap; | 164 | Colormap m_colormap; |
165 | 165 | ||
166 | int depth, screen_number; | 166 | int depth, screen_number; |
167 | unsigned int width, height; | 167 | unsigned int width, height; |
168 | #ifdef XINERAMA | 168 | #ifdef XINERAMA |
169 | bool m_hasXinerama; | 169 | bool m_hasXinerama; |
170 | int xineramaMajor, xineramaMinor, xineramaNumHeads, xineramaLastHead; | 170 | int xineramaMajor, xineramaMinor, xineramaNumHeads, xineramaLastHead; |
171 | XineramaScreenInfo *xineramaInfos; | 171 | XineramaScreenInfo *xineramaInfos; |
172 | #endif // XINERAMA | 172 | #endif // XINERAMA |
173 | 173 | ||
174 | }; | 174 | }; |