aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-09-07 20:22:08 (GMT)
committerfluxgen <fluxgen>2002-09-07 20:22:08 (GMT)
commit314c3116f0778f8a91c4aa605f7d3ffe57246e80 (patch)
tree44c5696ce4304c73ef7b978dca49489a0673610a /src/Screen.hh
parent54d855ee5947d6575d04d2a26cf5132df1f003ec (diff)
downloadfluxbox-314c3116f0778f8a91c4aa605f7d3ffe57246e80.zip
fluxbox-314c3116f0778f8a91c4aa605f7d3ffe57246e80.tar.bz2
added subjects and removed gnome stuff
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh47
1 files changed, 38 insertions, 9 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index 967804e..78d518f 100644
--- a/src/Screen.hh
+++ b/src/Screen.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: Screen.hh,v 1.43 2002/08/30 14:03:31 fluxgen Exp $ 25// $Id: Screen.hh,v 1.44 2002/09/07 20:19:13 fluxgen Exp $
26 26
27#ifndef SCREEN_HH 27#ifndef SCREEN_HH
28#define SCREEN_HH 28#define SCREEN_HH
@@ -64,6 +64,9 @@
64 64
65class BScreen : public ScreenInfo { 65class BScreen : public ScreenInfo {
66public: 66public:
67 typedef std::vector<Workspace *> Workspaces;
68 typedef std::vector<std::string> WorkspaceNames;
69
67 BScreen(ResourceManager &rm, Fluxbox *b, 70 BScreen(ResourceManager &rm, Fluxbox *b,
68 const std::string &screenname, const std::string &altscreenname, 71 const std::string &screenname, const std::string &altscreenname,
69 int scrn); 72 int scrn);
@@ -133,8 +136,20 @@ public:
133 inline unsigned int getIconCount() const { return iconList.size(); } 136 inline unsigned int getIconCount() const { return iconList.size(); }
134 inline const Icons &getIconList() const { return iconList; } 137 inline const Icons &getIconList() const { return iconList; }
135 inline Icons &getIconList() { return iconList; } 138 inline Icons &getIconList() { return iconList; }
139 const Workspaces &getWorkspacesList() const { return workspacesList; }
140 const WorkspaceNames &getWorkspaceNames() const { return workspaceNames; }
141
142 /// client list signal
143 FbTk::Subject &clientListSig() { return m_clientlist_sig; }
144 /// workspace count signal
145 FbTk::Subject &workspaceCountSig() { return m_workspacecount_sig; }
146 /// workspace names signal
147 FbTk::Subject &workspaceNamesSig() { return m_workspacenames_sig; }
148 /// current workspace signal
149 FbTk::Subject &currentWorkspaceSig() { return m_currentworkspace_sig; }
150
136 /// @return the resource value of number of workspace 151 /// @return the resource value of number of workspace
137 inline int getNumberOfWorkspaces() const { return *resource.workspaces; } 152 inline int getNumberOfWorkspaces() const { return *resource.workspaces; }
138 inline Toolbar::Placement getToolbarPlacement() const { return *resource.toolbar_placement; } 153 inline Toolbar::Placement getToolbarPlacement() const { return *resource.toolbar_placement; }
139#ifdef XINERAMA 154#ifdef XINERAMA
140 inline int getToolbarOnHead() { return *resource.toolbar_on_head; } 155 inline int getToolbarOnHead() { return *resource.toolbar_on_head; }
@@ -255,13 +270,27 @@ public:
255 // prevFocus/nextFocus option bits 270 // prevFocus/nextFocus option bits
256 enum { CYCLESKIPLOWERTABS = 0x01, CYCLESKIPSTUCK = 0x02, CYCLESKIPSHADED = 0x04, 271 enum { CYCLESKIPLOWERTABS = 0x01, CYCLESKIPSTUCK = 0x02, CYCLESKIPSHADED = 0x04,
257 CYCLEDEFAULT = 0x00 }; 272 CYCLEDEFAULT = 0x00 };
273
274 class ScreenSubject:public FbTk::Subject {
275 public:
276 ScreenSubject(BScreen &scr):m_scr(scr) { }
277 const BScreen &screen() const { return m_scr; }
278 BScreen &screen() { return m_scr; }
279 private:
280 BScreen &m_scr;
281 };
282
258private: 283private:
259 bool doSkipWindow(const FluxboxWindow *w, int options); 284 bool doSkipWindow(const FluxboxWindow *w, int options);
260 #ifdef GNOME 285
261 void initGnomeAtoms(); 286 ScreenSubject
262 void updateGnomeClientList(); 287 m_clientlist_sig, ///< client signal
263 Window gnome_win; 288 m_workspacecount_sig, ///< workspace count signal
264 #endif 289 m_workspacenames_sig, ///< workspace names signal
290 m_currentworkspace_sig; ///< current workspace signal
291
292
293
265 Theme *theme; 294 Theme *theme;
266 295
267 Bool root_colormap_installed, managed, geom_visible; 296 Bool root_colormap_installed, managed, geom_visible;
@@ -294,8 +323,8 @@ private:
294 unsigned int geom_w, geom_h; 323 unsigned int geom_w, geom_h;
295 unsigned long event_mask; 324 unsigned long event_mask;
296 325
297 typedef std::vector<std::string> WorkspaceNames; 326
298 typedef std::vector<Workspace *> Workspaces; 327
299 328
300 WorkspaceNames workspaceNames; 329 WorkspaceNames workspaceNames;
301 Workspaces workspacesList; 330 Workspaces workspacesList;