aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-15 12:22:52 (GMT)
committerfluxgen <fluxgen>2003-04-15 12:22:52 (GMT)
commit89fddca1d7a2809278f9307367e7f6b600456dc1 (patch)
treeb7a6b6e2cf2265fb37aaac24827e03d6d4f51739 /src/fluxbox.hh
parent77beb5472b35477ba1235cc7258071e4d4094e54 (diff)
downloadfluxbox_pavel-89fddca1d7a2809278f9307367e7f6b600456dc1.zip
fluxbox_pavel-89fddca1d7a2809278f9307367e7f6b600456dc1.tar.bz2
cleaning
Diffstat (limited to 'src/fluxbox.hh')
-rw-r--r--src/fluxbox.hh47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index c5db866..f7d2191 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -22,16 +22,14 @@
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.48 2003/04/15 00:50:25 rathnor Exp $ 25// $Id: fluxbox.hh,v 1.49 2003/04/15 12:11:10 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
29 29
30#include "Resource.hh" 30#include "Resource.hh"
31#include "Keys.hh"
32#include "BaseDisplay.hh" 31#include "BaseDisplay.hh"
33#include "Timer.hh" 32#include "Timer.hh"
34#include "Toolbar.hh"
35#include "Observer.hh" 33#include "Observer.hh"
36 34
37#ifdef HAVE_CONFIG_H 35#ifdef HAVE_CONFIG_H
@@ -39,7 +37,6 @@
39#endif // HAVE_CONFIG_H 37#endif // HAVE_CONFIG_H
40 38
41#include "SignalHandler.hh" 39#include "SignalHandler.hh"
42#include "FbAtoms.hh"
43 40
44#include <X11/Xlib.h> 41#include <X11/Xlib.h>
45#include <X11/Xresource.h> 42#include <X11/Xresource.h>
@@ -65,6 +62,9 @@
65 62
66class AtomHandler; 63class AtomHandler;
67class FluxboxWindow; 64class FluxboxWindow;
65class Keys;
66class BScreen;
67class FbAtoms;
68 68
69/** 69/**
70 main class for the window manager. 70 main class for the window manager.
@@ -72,7 +72,6 @@ class FluxboxWindow;
72*/ 72*/
73class Fluxbox : public BaseDisplay, public FbTk::TimeoutHandler, 73class Fluxbox : public BaseDisplay, public FbTk::TimeoutHandler,
74 public FbTk::SignalEventHandler, 74 public FbTk::SignalEventHandler,
75 public FbAtoms,
76 public FbTk::Observer { 75 public FbTk::Observer {
77public: 76public:
78 Fluxbox(int argc, char **argv, const char * dpy_name= 0, const char *rc = 0); 77 Fluxbox(int argc, char **argv, const char * dpy_name= 0, const char *rc = 0);
@@ -80,11 +79,10 @@ public:
80 79
81 static Fluxbox *instance() { return singleton; } 80 static Fluxbox *instance() { return singleton; }
82 81
83 inline bool useIconBar() { return *m_rc_iconbar; } 82 inline bool useIconBar() const { return *m_rc_iconbar; }
84 inline void saveIconBar(bool value) { m_rc_iconbar = value; } 83 inline void saveIconBar(bool value) { m_rc_iconbar = value; }
85#ifdef HAVE_GETPID 84
86 inline Atom getFluxboxPidAtom() const { return fluxbox_pid; } 85 inline Atom getFluxboxPidAtom() const { return fluxbox_pid; }
87#endif // HAVE_GETPID
88 86
89 FluxboxWindow *searchGroup(Window, FluxboxWindow *); 87 FluxboxWindow *searchGroup(Window, FluxboxWindow *);
90 FluxboxWindow *searchWindow(Window); 88 FluxboxWindow *searchWindow(Window);
@@ -101,8 +99,8 @@ public:
101 99
102 enum FocusModel { SLOPPYFOCUS=0, SEMISLOPPYFOCUS, CLICKTOFOCUS }; 100 enum FocusModel { SLOPPYFOCUS=0, SEMISLOPPYFOCUS, CLICKTOFOCUS };
103 101
104 inline const std::vector<Fluxbox::Titlebar>& getTitlebarRight() { return *m_rc_titlebar_right; } 102 inline const std::vector<Fluxbox::Titlebar>& getTitlebarRight() const { return *m_rc_titlebar_right; }
105 inline const std::vector<Fluxbox::Titlebar>& getTitlebarLeft() { return *m_rc_titlebar_left; } 103 inline const std::vector<Fluxbox::Titlebar>& getTitlebarLeft() const { return *m_rc_titlebar_left; }
106 inline const std::string &getStyleFilename() const { return *m_rc_stylefile; } 104 inline const std::string &getStyleFilename() const { return *m_rc_stylefile; }
107 105
108 inline const char *getMenuFilename() const { return m_rc_menufile->c_str(); } 106 inline const char *getMenuFilename() const { return m_rc_menufile->c_str(); }
@@ -113,8 +111,8 @@ public:
113 // class to store layer numbers (special Resource type) 111 // class to store layer numbers (special Resource type)
114 class Layer { 112 class Layer {
115 public: 113 public:
116 Layer(int i) : m_num(i) {}; 114 explicit Layer(int i) : m_num(i) {};
117 const int getNum() const { return m_num; } 115 inline int getNum() const { return m_num; }
118 116
119 Layer &operator=(int num) { m_num = num; return *this; } 117 Layer &operator=(int num) { m_num = num; return *this; }
120 118
@@ -139,25 +137,25 @@ public:
139 137
140 inline void maskWindowEvents(Window w, FluxboxWindow *bw) 138 inline void maskWindowEvents(Window w, FluxboxWindow *bw)
141 { masked = w; masked_window = bw; } 139 { masked = w; masked_window = bw; }
142 inline void setNoFocus(Bool f) { no_focus = f; } 140 inline void setNoFocus(bool f) { no_focus = f; }
143 141
144 void watchKeyRelease(BScreen *screen, unsigned int mods); 142 void watchKeyRelease(BScreen *screen, unsigned int mods);
145 143
146 void setFocusedWindow(FluxboxWindow *w); 144 void setFocusedWindow(FluxboxWindow *w);
147 void shutdown(); 145 void shutdown();
148 void load_rc(BScreen *); 146 void load_rc(BScreen &scr);
149 void loadRootCommand(BScreen *); 147 void loadRootCommand(BScreen &scr);
150 void loadTitlebar(); 148 void loadTitlebar();
151 void saveStyleFilename(const char *val) { m_rc_stylefile = (val == 0 ? "" : val); } 149 void saveStyleFilename(const char *val) { m_rc_stylefile = (val == 0 ? "" : val); }
152 void saveMenuFilename(const char *); 150 void saveMenuFilename(const char *);
153 void saveTitlebarFilename(const char *); 151 void saveTitlebarFilename(const char *);
154 void saveSlitlistFilename(const char *val) { m_rc_slitlistfile = (val == 0 ? "" : val); } 152 void saveSlitlistFilename(const char *val) { m_rc_slitlistfile = (val == 0 ? "" : val); }
155 void saveWindowSearch(Window, FluxboxWindow *); 153 void saveWindowSearch(Window win, FluxboxWindow *fbwin);
156 void saveGroupSearch(Window, FluxboxWindow *); 154 void saveGroupSearch(Window win, FluxboxWindow *fbwin);
157 void save_rc(); 155 void save_rc();
158 void removeWindowSearch(Window); 156 void removeWindowSearch(Window win);
159 void removeGroupSearch(Window); 157 void removeGroupSearch(Window win);
160 void restart(const char * = 0); 158 void restart(const char *command = 0);
161 void reconfigure(); 159 void reconfigure();
162 void rereadMenu(); 160 void rereadMenu();
163 void checkMenu(); 161 void checkMenu();
@@ -211,8 +209,11 @@ private:
211 void handleUnmapNotify(XUnmapEvent &ue); 209 void handleUnmapNotify(XUnmapEvent &ue);
212 void handleClientMessage(XClientMessageEvent &ce); 210 void handleClientMessage(XClientMessageEvent &ce);
213 void handleKeyEvent(XKeyEvent &ke); 211 void handleKeyEvent(XKeyEvent &ke);
214 void doWindowAction(Keys::KeyAction action, const int param); 212 void doWindowAction(int action, const int param);
213 void setTitlebar(std::vector<Fluxbox::Titlebar>& dir, const char *arg);
215 214
215 std::auto_ptr<FbAtoms> m_fbatoms;
216
216 ResourceManager m_resourcemanager, m_screen_rm; 217 ResourceManager m_resourcemanager, m_screen_rm;
217 218
218 //--- Resources 219 //--- Resources
@@ -226,7 +227,6 @@ private:
226 Resource<TitlebarList> m_rc_titlebar_left, m_rc_titlebar_right; 227 Resource<TitlebarList> m_rc_titlebar_left, m_rc_titlebar_right;
227 Resource<unsigned int> m_rc_cache_life, m_rc_cache_max; 228 Resource<unsigned int> m_rc_cache_life, m_rc_cache_max;
228 229
229 void setTitlebar(std::vector<Fluxbox::Titlebar>& dir, const char *arg);
230 230
231 std::map<Window, FluxboxWindow *> windowSearch; 231 std::map<Window, FluxboxWindow *> windowSearch;
232 std::map<Window, FluxboxWindow *> groupSearch; 232 std::map<Window, FluxboxWindow *> groupSearch;
@@ -241,9 +241,7 @@ private:
241 BScreen *watching_screen; 241 BScreen *watching_screen;
242 unsigned int watch_keyrelease; 242 unsigned int watch_keyrelease;
243 243
244#ifdef HAVE_GETPID
245 Atom fluxbox_pid; 244 Atom fluxbox_pid;
246#endif // HAVE_GETPID
247 245
248 bool no_focus, reconfigure_wait, reread_menu_wait; 246 bool no_focus, reconfigure_wait, reread_menu_wait;
249 Time last_time; 247 Time last_time;
@@ -258,6 +256,7 @@ private:
258 256
259 static Fluxbox *singleton; 257 static Fluxbox *singleton;
260 std::vector<AtomHandler *> m_atomhandler; 258 std::vector<AtomHandler *> m_atomhandler;
259
261}; 260};
262 261
263 262