aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/fluxbox.hh')
-rw-r--r--src/fluxbox.hh59
1 files changed, 35 insertions, 24 deletions
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index e877805..9d68be3 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.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: fluxbox.hh,v 1.27 2002/08/17 22:13:00 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.28 2002/09/07 20:24:06 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -35,6 +35,7 @@
35#include "Window.hh" 35#include "Window.hh"
36#include "Tab.hh" 36#include "Tab.hh"
37#include "Toolbar.hh" 37#include "Toolbar.hh"
38#include "Observer.hh"
38 39
39#ifdef SLIT 40#ifdef SLIT
40#include "Slit.hh" 41#include "Slit.hh"
@@ -64,13 +65,17 @@
64#include <map> 65#include <map>
65#include <list> 66#include <list>
66 67
68class AtomHandler;
69
70
67/** 71/**
68 main class for the window manager. 72 main class for the window manager.
69 singleton type 73 singleton type
70*/ 74*/
71class Fluxbox : public BaseDisplay, public TimeoutHandler, 75class Fluxbox : public BaseDisplay, public TimeoutHandler,
72 public FbTk::EventHandler<FbTk::SignalEvent>, 76 public FbTk::EventHandler<FbTk::SignalEvent>,
73 public FbAtoms { 77 public FbAtoms,
78 public FbTk::Observer {
74public: 79public:
75 Fluxbox(int argc, char **argv, const char * dpy_name= 0, const char *rc = 0); 80 Fluxbox(int argc, char **argv, const char * dpy_name= 0, const char *rc = 0);
76 virtual ~Fluxbox(); 81 virtual ~Fluxbox();
@@ -153,6 +158,9 @@ public:
153 158
154 /// handle any system signal sent to the application 159 /// handle any system signal sent to the application
155 void handleEvent(FbTk::SignalEvent * const signum); 160 void handleEvent(FbTk::SignalEvent * const signum);
161 void update(FbTk::Subject *changed);
162
163 void attachSignals(FluxboxWindow &win);
156 164
157 virtual void timeout(); 165 virtual void timeout();
158 166
@@ -161,6 +169,7 @@ public:
161 inline const Cursor &getLowerLeftAngleCursor() const { return cursor.ll_angle; } 169 inline const Cursor &getLowerLeftAngleCursor() const { return cursor.ll_angle; }
162 inline const Cursor &getLowerRightAngleCursor() const { return cursor.lr_angle; } 170 inline const Cursor &getLowerRightAngleCursor() const { return cursor.lr_angle; }
163 171
172
164 173
165#ifdef SLIT 174#ifdef SLIT
166 Slit *searchSlit(Window); 175 Slit *searchSlit(Window);
@@ -181,18 +190,6 @@ private:
181 Cursor session, move, ll_angle, lr_angle; 190 Cursor session, move, ll_angle, lr_angle;
182 } cursor; 191 } cursor;
183 192
184 void setupConfigFiles();
185 void handleButtonEvent(XButtonEvent &be);
186 void handleUnmapNotify(XUnmapEvent &ue);
187 void handleClientMessage(XClientMessageEvent &ce);
188 void handleKeyEvent(XKeyEvent &ke);
189 void doWindowAction(Keys::KeyAction action, const int param);
190 #ifdef GNOME
191 bool checkGnomeAtoms(XClientMessageEvent &ce);
192 #endif
193 #ifdef NEWWMSPEC
194 bool checkNETWMAtoms(XClientMessageEvent &ce);
195 #endif
196 typedef struct MenuTimestamp { 193 typedef struct MenuTimestamp {
197 char *filename; 194 char *filename;
198 time_t timestamp; 195 time_t timestamp;
@@ -203,6 +200,29 @@ private:
203 timeval auto_raise_delay; 200 timeval auto_raise_delay;
204 } resource; 201 } resource;
205 202
203
204 std::string getRcFilename();
205 void getDefaultDataFilename(char *, std::string &);
206 void load_rc();
207
208 void reload_rc();
209 void real_rereadMenu();
210 void real_reconfigure();
211
212 void handleEvent(XEvent *xe);
213
214 void setupConfigFiles();
215 void handleButtonEvent(XButtonEvent &be);
216 void handleUnmapNotify(XUnmapEvent &ue);
217 void handleClientMessage(XClientMessageEvent &ce);
218 void handleKeyEvent(XKeyEvent &ke);
219 void doWindowAction(Keys::KeyAction action, const int param);
220
221 #ifdef NEWWMSPEC
222 bool checkNETWMAtoms(XClientMessageEvent &ce);
223 #endif
224
225
206 ResourceManager m_resourcemanager, m_screen_rm; 226 ResourceManager m_resourcemanager, m_screen_rm;
207 227
208 //--- Resources 228 //--- Resources
@@ -254,18 +274,9 @@ private:
254 std::string slitlist_path; 274 std::string slitlist_path;
255 //default arguments for titlebar left and right 275 //default arguments for titlebar left and right
256 static Fluxbox::Titlebar m_titlebar_left[], m_titlebar_right[]; 276 static Fluxbox::Titlebar m_titlebar_left[], m_titlebar_right[];
257
258 std::string getRcFilename();
259 void getDefaultDataFilename(char *, std::string &);
260 void load_rc();
261 277
262 void reload_rc();
263 void real_rereadMenu();
264 void real_reconfigure();
265
266 void handleEvent(XEvent *xe);
267 static Fluxbox *singleton; 278 static Fluxbox *singleton;
268 279 std::vector<AtomHandler *> m_atomhandler;
269}; 280};
270 281
271 282