aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-25 15:52:58 (GMT)
committerfluxgen <fluxgen>2003-04-25 15:52:58 (GMT)
commit7b433c31a5776caef1296f342e00a3150ee4f9de (patch)
tree444ee3e0e657969238d0834be9a84a45c376aab9
parentf801b384e5300aaa46ef2b3fb267243a3c4b78fc (diff)
downloadfluxbox-7b433c31a5776caef1296f342e00a3150ee4f9de.zip
fluxbox-7b433c31a5776caef1296f342e00a3150ee4f9de.tar.bz2
cleaning
-rw-r--r--src/fluxbox.hh71
1 files changed, 37 insertions, 34 deletions
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index f7d2191..6cd2ca3 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.49 2003/04/15 12:11:10 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.50 2003/04/25 15:52:58 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -31,11 +31,6 @@
31#include "BaseDisplay.hh" 31#include "BaseDisplay.hh"
32#include "Timer.hh" 32#include "Timer.hh"
33#include "Observer.hh" 33#include "Observer.hh"
34
35#ifdef HAVE_CONFIG_H
36#include "config.h"
37#endif // HAVE_CONFIG_H
38
39#include "SignalHandler.hh" 34#include "SignalHandler.hh"
40 35
41#include <X11/Xlib.h> 36#include <X11/Xlib.h>
@@ -43,6 +38,10 @@
43 38
44#include <cstdio> 39#include <cstdio>
45 40
41#ifdef HAVE_CONFIG_H
42#include "config.h"
43#endif // HAVE_CONFIG_H
44
46#ifdef TIME_WITH_SYS_TIME 45#ifdef TIME_WITH_SYS_TIME
47#include <sys/time.h> 46#include <sys/time.h>
48#include <time.h> 47#include <time.h>
@@ -74,25 +73,29 @@ class Fluxbox : public BaseDisplay, public FbTk::TimeoutHandler,
74 public FbTk::SignalEventHandler, 73 public FbTk::SignalEventHandler,
75 public FbTk::Observer { 74 public FbTk::Observer {
76public: 75public:
77 Fluxbox(int argc, char **argv, const char * dpy_name= 0, const char *rc = 0); 76 Fluxbox(int argc, char **argv, const char * dpy_name= 0,
77 const char *rcfilename = 0);
78 virtual ~Fluxbox(); 78 virtual ~Fluxbox();
79 79
80 static Fluxbox *instance() { return singleton; } 80 static Fluxbox *instance() { return s_singleton; }
81 81
82 inline bool useIconBar() const { return *m_rc_iconbar; } 82 inline bool useIconBar() const { return *m_rc_iconbar; }
83 inline void saveIconBar(bool value) { m_rc_iconbar = value; } 83 inline void saveIconBar(bool value) { m_rc_iconbar = value; }
84 84
85 inline Atom getFluxboxPidAtom() const { return fluxbox_pid; } 85 inline Atom getFluxboxPidAtom() const { return m_fluxbox_pid; }
86 86
87 FluxboxWindow *searchGroup(Window, FluxboxWindow *); 87 FluxboxWindow *searchGroup(Window, FluxboxWindow *);
88 FluxboxWindow *searchWindow(Window); 88 FluxboxWindow *searchWindow(Window);
89 inline FluxboxWindow *getFocusedWindow() { return focused_window; } 89 inline FluxboxWindow *getFocusedWindow() { return m_focused_window; }
90 90
91 91
92 BScreen *searchScreen(Window w); 92 BScreen *searchScreen(Window w);
93 93
94 inline const Time &getDoubleClickInterval() const { return resource.double_click_interval; } 94 inline const Time &getDoubleClickInterval() const { return resource.double_click_interval; }
95 inline const Time &getLastTime() const { return last_time; } 95 inline const Time &getLastTime() const { return m_last_time; }
96
97 void addAtomHandler(AtomHandler *atomh);
98 void removeAtomHandler(AtomHandler *atomh);
96 99
97 /// obsolete 100 /// obsolete
98 enum Titlebar{SHADE=0, MINIMIZE, MAXIMIZE, CLOSE, STICK, MENU, EMPTY}; 101 enum Titlebar{SHADE=0, MINIMIZE, MAXIMIZE, CLOSE, STICK, MENU, EMPTY};
@@ -136,8 +139,7 @@ public:
136 inline unsigned int getCacheMax() const { return *m_rc_cache_max; } 139 inline unsigned int getCacheMax() const { return *m_rc_cache_max; }
137 140
138 inline void maskWindowEvents(Window w, FluxboxWindow *bw) 141 inline void maskWindowEvents(Window w, FluxboxWindow *bw)
139 { masked = w; masked_window = bw; } 142 { m_masked = w; m_masked_window = bw; }
140 inline void setNoFocus(bool f) { no_focus = f; }
141 143
142 void watchKeyRelease(BScreen *screen, unsigned int mods); 144 void watchKeyRelease(BScreen *screen, unsigned int mods);
143 145
@@ -184,7 +186,7 @@ private:
184 } cursor; 186 } cursor;
185 187
186 typedef struct MenuTimestamp { 188 typedef struct MenuTimestamp {
187 char *filename; 189 std::string filename;
188 time_t timestamp; 190 time_t timestamp;
189 } MenuTimestamp; 191 } MenuTimestamp;
190 192
@@ -228,36 +230,37 @@ private:
228 Resource<unsigned int> m_rc_cache_life, m_rc_cache_max; 230 Resource<unsigned int> m_rc_cache_life, m_rc_cache_max;
229 231
230 232
231 std::map<Window, FluxboxWindow *> windowSearch; 233 std::map<Window, FluxboxWindow *> m_window_search;
232 std::map<Window, FluxboxWindow *> groupSearch; 234 std::map<Window, FluxboxWindow *> m_group_search;
233 235
234 std::list<MenuTimestamp *> menuTimestamps; 236 std::list<MenuTimestamp *> m_menu_timestamps;
235 typedef std::list<BScreen *> ScreenList; 237 typedef std::list<BScreen *> ScreenList;
236 ScreenList screenList; 238 ScreenList m_screen_list;
239
240 FluxboxWindow *m_focused_window, *m_masked_window;
241 FbTk::Timer m_timer;
242
243 BScreen *m_watching_screen;
244 unsigned int m_watch_keyrelease;
237 245
238 FluxboxWindow *focused_window, *masked_window; 246 Atom m_fluxbox_pid;
239 FbTk::Timer timer;
240 247
241 BScreen *watching_screen; 248 bool m_reconfigure_wait, m_reread_menu_wait;
242 unsigned int watch_keyrelease; 249 Time m_last_time;
250 Window m_masked;
251 std::string m_rc_file; ///< resource filename
252 char **m_argv;
253 int m_argc;
243 254
244 Atom fluxbox_pid; 255 std::auto_ptr<Keys> m_key;
245 256
246 bool no_focus, reconfigure_wait, reread_menu_wait;
247 Time last_time;
248 Window masked;
249 std::string rc_file; ///< resource filename
250 char **argv;
251 int argc;
252 std::auto_ptr<Keys> key;
253 std::string slitlist_path;
254 //default arguments for titlebar left and right 257 //default arguments for titlebar left and right
255 static Fluxbox::Titlebar m_titlebar_left[], m_titlebar_right[]; 258 static Fluxbox::Titlebar s_titlebar_left[], s_titlebar_right[];
256 259
257 static Fluxbox *singleton; 260 static Fluxbox *s_singleton;
258 std::vector<AtomHandler *> m_atomhandler; 261 std::vector<AtomHandler *> m_atomhandler;
259 262
260}; 263};
261 264
262 265
263#endif // _FLUXBOX_HH_ 266#endif // FLUXBOX_HH