aboutsummaryrefslogtreecommitdiff
path: root/src/Remember.hh
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
commit31b47e78147ca20803b123f392bfd2002b70e052 (patch)
treef7beb9baa9daf86d66358fd834cafae14de7c782 /src/Remember.hh
parente169d33552c8e7070aa6e13da0187f2013b4cfc3 (diff)
downloadfluxbox-31b47e78147ca20803b123f392bfd2002b70e052.zip
fluxbox-31b47e78147ca20803b123f392bfd2002b70e052.tar.bz2
cleanup of some files
Diffstat (limited to 'src/Remember.hh')
-rw-r--r--src/Remember.hh134
1 files changed, 6 insertions, 128 deletions
diff --git a/src/Remember.hh b/src/Remember.hh
index 1f3ed7f..a401abb 100644
--- a/src/Remember.hh
+++ b/src/Remember.hh
@@ -29,135 +29,18 @@
29#include "AtomHandler.hh" 29#include "AtomHandler.hh"
30#include "ClientPattern.hh" 30#include "ClientPattern.hh"
31 31
32#include "FbTk/AutoReloadHelper.hh"
33#include "FbTk/RefCount.hh"
34 32
35#include <fstream>
36#include <map> 33#include <map>
37#include <list> 34#include <list>
38#include <utility>
39#include <memory> 35#include <memory>
40 36
41class FluxboxWindow; 37class FluxboxWindow;
42class BScreen; 38class BScreen;
43class WinClient; 39class WinClient;
40class Application;
44 41
45class Application { 42namespace FbTk {
46public: 43class AutoReloadHelper;
47 Application(bool grouped, ClientPattern *pat = 0);
48 void reset();
49 void forgetWorkspace() { workspace_remember = false; }
50 void forgetHead() { head_remember = false; }
51 void forgetDimensions() { dimensions_remember = false; }
52 void forgetPosition() { position_remember = false; }
53 void forgetShadedstate() { shadedstate_remember = false; }
54 void forgetTabstate() { tabstate_remember = false; }
55 void forgetDecostate() { decostate_remember = false; }
56 void forgetFocusHiddenstate() { focushiddenstate_remember= false; }
57 void forgetIconHiddenstate() { iconhiddenstate_remember= false; }
58 void forgetStuckstate() { stuckstate_remember = false; }
59 void forgetJumpworkspace() { jumpworkspace_remember = false; }
60 void forgetLayer() { layer_remember = false; }
61 void forgetSaveOnClose() { save_on_close_remember = false; }
62 void forgetAlpha() { alpha_remember = false; }
63 void forgetMinimizedstate() { minimizedstate_remember = false; }
64 void forgetMaximizedstate() { maximizedstate_remember = false; }
65 void forgetFullscreenstate() { fullscreenstate_remember = false; }
66
67 void rememberWorkspace(int ws)
68 { workspace = ws; workspace_remember = true; }
69 void rememberHead(int h)
70 { head = h; head_remember = true; }
71 void rememberDimensions(int width, int height)
72 { w = width; h = height; dimensions_remember = true; }
73 void rememberFocusHiddenstate(bool state)
74 { focushiddenstate= state; focushiddenstate_remember= true; }
75 void rememberIconHiddenstate(bool state)
76 { iconhiddenstate= state; iconhiddenstate_remember= true; }
77 void rememberPosition(int posx, int posy, unsigned char rfc= 0 )
78 { x = posx; y = posy; refc = rfc; position_remember = true; }
79 void rememberShadedstate(bool state)
80 { shadedstate = state; shadedstate_remember = true; }
81 void rememberTabstate(bool state)
82 { tabstate = state; tabstate_remember = true; }
83 void rememberDecostate(unsigned int state)
84 { decostate = state; decostate_remember = true; }
85 void rememberStuckstate(bool state)
86 { stuckstate = state; stuckstate_remember = true; }
87 void rememberJumpworkspace(bool state)
88 { jumpworkspace = state; jumpworkspace_remember = true; }
89 void rememberLayer(int layernum)
90 { layer = layernum; layer_remember = true; }
91 void rememberSaveOnClose(bool state)
92 { save_on_close = state; save_on_close_remember = true; }
93 void rememberAlpha(int focused_a, int unfocused_a)
94 { focused_alpha = focused_a; unfocused_alpha = unfocused_a; alpha_remember = true; }
95 void rememberMinimizedstate(bool state)
96 { minimizedstate = state; minimizedstate_remember = true; }
97 void rememberMaximizedstate(int state)
98 { maximizedstate = state; maximizedstate_remember = true; }
99 void rememberFullscreenstate(bool state)
100 { fullscreenstate = state; fullscreenstate_remember = true; }
101
102 bool workspace_remember;
103 unsigned int workspace;
104
105 bool head_remember;
106 int head;
107
108 bool dimensions_remember;
109 int w,h; // width, height
110
111 bool position_remember;
112 int x,y;
113 unsigned char refc; // referenceCorner-> 0 - upperleft
114 // 1 - upperight
115 // 2 - lowerleft
116 // 3 - lowerright
117
118 bool alpha_remember;
119 int focused_alpha;
120 int unfocused_alpha;
121
122 bool shadedstate_remember;
123 bool shadedstate;
124
125 bool tabstate_remember;
126 bool tabstate;
127
128 bool decostate_remember;
129 unsigned int decostate;
130
131 bool stuckstate_remember;
132 bool stuckstate;
133
134 bool focushiddenstate_remember;
135 bool focushiddenstate;
136
137 bool iconhiddenstate_remember;
138 bool iconhiddenstate;
139
140 bool jumpworkspace_remember;
141 bool jumpworkspace;
142
143 bool layer_remember;
144 int layer;
145
146 bool save_on_close_remember;
147 bool save_on_close;
148
149 bool minimizedstate_remember;
150 bool minimizedstate;
151
152 bool maximizedstate_remember;
153 int maximizedstate;
154
155 bool fullscreenstate_remember;
156 bool fullscreenstate;
157
158 bool is_grouped;
159 FbTk::RefCount<ClientPattern> group_pattern;
160
161}; 44};
162 45
163/** 46/**
@@ -258,6 +141,8 @@ public:
258 void updateLayer(FluxboxWindow &win) {} 141 void updateLayer(FluxboxWindow &win) {}
259 void updateFrameClose(FluxboxWindow &win) {} 142 void updateFrameClose(FluxboxWindow &win) {}
260 143
144 void updateDecoStateFromClient(WinClient& client);
145
261 bool checkClientMessage(const XClientMessageEvent &ce, 146 bool checkClientMessage(const XClientMessageEvent &ce,
262 BScreen * screen, WinClient * const winclient) { return false; } 147 BScreen * screen, WinClient * const winclient) { return false; }
263 // ignore this 148 // ignore this
@@ -267,20 +152,13 @@ public:
267 152
268private: 153private:
269 154
270 // returns number of lines read
271 // optionally can give a line to read before the first (lookahead line)
272 int parseApp(std::ifstream &file, Application &app, std::string *first_line = 0);
273
274 Application *findMatchingPatterns(ClientPattern *pat, Patterns *patlist,
275 bool is_group, ClientPattern *match_pat = 0);
276
277 std::auto_ptr<Patterns> m_pats; 155 std::auto_ptr<Patterns> m_pats;
278 Clients m_clients; 156 Clients m_clients;
279 157
280 Startups m_startups; 158 Startups m_startups;
281 static Remember *s_instance; 159 static Remember *s_instance;
282 160
283 FbTk::AutoReloadHelper m_reloader; 161 FbTk::AutoReloadHelper* m_reloader;
284}; 162};
285 163
286#endif // REMEMBER_HH 164#endif // REMEMBER_HH