diff options
Diffstat (limited to 'src/Screen.hh')
-rw-r--r-- | src/Screen.hh | 47 |
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 | ||
65 | class BScreen : public ScreenInfo { | 65 | class BScreen : public ScreenInfo { |
66 | public: | 66 | public: |
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 ¤tWorkspaceSig() { 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 | |||
258 | private: | 283 | private: |
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; |