aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh100
1 files changed, 53 insertions, 47 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index d5de5bc..3316fab 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -78,7 +78,8 @@ class Subject;
78class BScreen : public FbTk::Observer, private FbTk::NotCopyable { 78class BScreen : public FbTk::Observer, private FbTk::NotCopyable {
79public: 79public:
80 enum ResizeModel { BOTTOMRESIZE = 0, QUADRANTRESIZE, DEFAULTRESIZE = BOTTOMRESIZE }; 80 enum ResizeModel { BOTTOMRESIZE = 0, QUADRANTRESIZE, DEFAULTRESIZE = BOTTOMRESIZE };
81 enum FocusModel { SLOPPYFOCUS = 0, SEMISLOPPYFOCUS, CLICKTOFOCUS }; 81 enum FocusModel { MOUSEFOCUS = 0, CLICKFOCUS };
82 enum TabFocusModel { MOUSETABFOCUS = 0, CLICKTABFOCUS };
82 enum FollowModel { ///< a window becomes active / focussed on a different workspace 83 enum FollowModel { ///< a window becomes active / focussed on a different workspace
83 IGNORE_OTHER_WORKSPACES = 0, ///< who cares? 84 IGNORE_OTHER_WORKSPACES = 0, ///< who cares?
84 FOLLOW_ACTIVE_WINDOW, ///< go to that workspace 85 FOLLOW_ACTIVE_WINDOW, ///< go to that workspace
@@ -106,24 +107,24 @@ public:
106 107
107 void initWindows(); 108 void initWindows();
108 void initMenus(); 109 void initMenus();
109 inline bool isSloppyFocus() const { return (*resource.focus_model == SLOPPYFOCUS); } 110 bool isMouseFocus() const { return (*resource.focus_model == MOUSEFOCUS); }
110 inline bool isSemiSloppyFocus() const { return (*resource.focus_model == SEMISLOPPYFOCUS); } 111 bool isMouseTabFocus() const { return (*resource.tabfocus_model == MOUSETABFOCUS); }
111 inline bool isRootColormapInstalled() const { return root_colormap_installed; } 112 bool isRootColormapInstalled() const { return root_colormap_installed; }
112 inline bool isScreenManaged() const { return managed; } 113 bool isScreenManaged() const { return managed; }
113 inline bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; } 114 bool isSloppyWindowGrouping() const { return *resource.sloppy_window_grouping; }
114 inline bool isWorkspaceWarping() const { return *resource.workspace_warping; } 115 bool isWorkspaceWarping() const { return *resource.workspace_warping; }
115 inline bool isDesktopWheeling() const { return *resource.desktop_wheeling; } 116 bool isDesktopWheeling() const { return *resource.desktop_wheeling; }
116 inline bool doAutoRaise() const { return *resource.auto_raise; } 117 bool doAutoRaise() const { return *resource.auto_raise; }
117 inline bool clickRaises() const { return *resource.click_raises; } 118 bool clickRaises() const { return *resource.click_raises; }
118 inline bool doOpaqueMove() const { return *resource.opaque_move; } 119 bool doOpaqueMove() const { return *resource.opaque_move; }
119 inline bool doFullMax() const { return *resource.full_max; } 120 bool doFullMax() const { return *resource.full_max; }
120 inline bool doFocusNew() const { return *resource.focus_new; } 121 bool doFocusNew() const { return *resource.focus_new; }
121 inline bool doFocusLast() const { return *resource.focus_last; } 122 bool doFocusLast() const { return *resource.focus_last; }
122 inline bool doShowWindowPos() const { return *resource.show_window_pos; } 123 bool doShowWindowPos() const { return *resource.show_window_pos; }
123 inline bool antialias() const { return *resource.antialias; } 124 bool antialias() const { return *resource.antialias; }
124 inline bool decorateTransient() const { return *resource.decorate_transient; } 125 bool decorateTransient() const { return *resource.decorate_transient; }
125 inline const std::string &windowMenuFilename() const { return *resource.windowmenufile; } 126 const std::string &windowMenuFilename() const { return *resource.windowmenufile; }
126 inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); } 127 FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
127 // menus 128 // menus
128 const FbTk::Menu &rootMenu() const { return *m_rootmenu.get(); } 129 const FbTk::Menu &rootMenu() const { return *m_rootmenu.get(); }
129 FbTk::Menu &rootMenu() { return *m_rootmenu.get(); } 130 FbTk::Menu &rootMenu() { return *m_rootmenu.get(); }
@@ -134,8 +135,10 @@ public:
134 ExtraMenus &extraWindowMenus() { return m_extramenus; } 135 ExtraMenus &extraWindowMenus() { return m_extramenus; }
135 const ExtraMenus &extraWindowMenus() const { return m_extramenus; } 136 const ExtraMenus &extraWindowMenus() const { return m_extramenus; }
136 137
137 inline ResizeModel getResizeModel() const { return *resource.resize_model; } 138 ResizeModel getResizeModel() const { return *resource.resize_model; }
138 inline FocusModel getFocusModel() const { return *resource.focus_model; } 139 FocusModel getFocusModel() const { return *resource.focus_model; }
140 TabFocusModel getTabFocusModel() const { return *resource.tabfocus_model; }
141
139 inline FollowModel getFollowModel() const { return *resource.follow_model; } 142 inline FollowModel getFollowModel() const { return *resource.follow_model; }
140 143
141 inline Slit *slit() { return m_slit.get(); } 144 inline Slit *slit() { return m_slit.get(); }
@@ -217,38 +220,40 @@ public:
217 inline RowDirection getRowPlacementDirection() const { return *resource.row_direction; } 220 inline RowDirection getRowPlacementDirection() const { return *resource.row_direction; }
218 inline ColumnDirection getColPlacementDirection() const { return *resource.col_direction; } 221 inline ColumnDirection getColPlacementDirection() const { return *resource.col_direction; }
219 222
220 inline void setRootColormapInstalled(bool r) { root_colormap_installed = r; } 223 void setRootColormapInstalled(bool r) { root_colormap_installed = r; }
221 inline void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; } 224 void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; }
222 inline void saveFocusModel(FocusModel model) { resource.focus_model = model; } 225 void saveFocusModel(FocusModel model) { resource.focus_model = model; }
223 inline void saveWorkspaces(int w) { *resource.workspaces = w; } 226 void saveTabFocusModel(TabFocusModel model) { resource.tabfocus_model = model; }
227
228 void saveWorkspaces(int w) { *resource.workspaces = w; }
224 229
225 void saveMenu(FbTk::Menu &menu) { m_rootmenu_list.push_back(&menu); } 230 void saveMenu(FbTk::Menu &menu) { m_rootmenu_list.push_back(&menu); }
226 231
227 inline FbWinFrameTheme &winFrameTheme() { return *m_windowtheme.get(); } 232 FbWinFrameTheme &winFrameTheme() { return *m_windowtheme.get(); }
228 inline const FbWinFrameTheme &winFrameTheme() const { return *m_windowtheme.get(); } 233 const FbWinFrameTheme &winFrameTheme() const { return *m_windowtheme.get(); }
229 inline MenuTheme &menuTheme() { return *m_menutheme.get(); } 234 MenuTheme &menuTheme() { return *m_menutheme.get(); }
230 inline const MenuTheme &menuTheme() const { return *m_menutheme.get(); } 235 const MenuTheme &menuTheme() const { return *m_menutheme.get(); }
231 inline const RootTheme &rootTheme() const { return *m_root_theme.get(); } 236 const RootTheme &rootTheme() const { return *m_root_theme.get(); }
232 inline WinButtonTheme &winButtonTheme() { return *m_winbutton_theme.get(); } 237 WinButtonTheme &winButtonTheme() { return *m_winbutton_theme.get(); }
233 inline const WinButtonTheme &winButtonTheme() const { return *m_winbutton_theme.get(); } 238 const WinButtonTheme &winButtonTheme() const { return *m_winbutton_theme.get(); }
234 239
235 inline FbRootWindow &rootWindow() { return m_root_window; } 240 FbRootWindow &rootWindow() { return m_root_window; }
236 inline const FbRootWindow &rootWindow() const { return m_root_window; } 241 const FbRootWindow &rootWindow() const { return m_root_window; }
237 242
238 inline FbTk::MultLayers &layerManager() { return m_layermanager; } 243 FbTk::MultLayers &layerManager() { return m_layermanager; }
239 inline const FbTk::MultLayers &layerManager() const { return m_layermanager; } 244 const FbTk::MultLayers &layerManager() const { return m_layermanager; }
240 inline FbTk::ResourceManager &resourceManager() { return m_resource_manager; } 245 FbTk::ResourceManager &resourceManager() { return m_resource_manager; }
241 inline const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; } 246 const FbTk::ResourceManager &resourceManager() const { return m_resource_manager; }
242 inline const std::string &name() const { return m_name; } 247 const std::string &name() const { return m_name; }
243 inline const std::string &altName() const { return m_altname; } 248 const std::string &altName() const { return m_altname; }
244 inline bool isShuttingdown() const { return m_shutdown; } 249 bool isShuttingdown() const { return m_shutdown; }
245 250
246 251
247 int addWorkspace(); 252 int addWorkspace();
248 int removeLastWorkspace(); 253 int removeLastWorkspace();
249 // scroll workspaces 254 // scroll workspaces
250 inline void nextWorkspace() { nextWorkspace(1); } 255 void nextWorkspace() { nextWorkspace(1); }
251 inline void prevWorkspace() { prevWorkspace(1); } 256 void prevWorkspace() { prevWorkspace(1); }
252 void nextWorkspace(int delta); 257 void nextWorkspace(int delta);
253 void prevWorkspace(int delta); 258 void prevWorkspace(int delta);
254 void rightWorkspace(int delta); 259 void rightWorkspace(int delta);
@@ -272,8 +277,8 @@ public:
272 bool changeworkspace=true); 277 bool changeworkspace=true);
273 void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id, 278 void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id,
274 bool ignore_sticky); 279 bool ignore_sticky);
275 inline void prevFocus() { prevFocus(0); } 280 void prevFocus() { prevFocus(0); }
276 inline void nextFocus() { nextFocus(0); } 281 void nextFocus() { nextFocus(0); }
277 void prevFocus(int options); 282 void prevFocus(int options);
278 void nextFocus(int options); 283 void nextFocus(int options);
279 void raiseFocus(); 284 void raiseFocus();
@@ -303,8 +308,8 @@ public:
303 void updateSize(); 308 void updateSize();
304 309
305 // Xinerama-related functions 310 // Xinerama-related functions
306 inline bool hasXinerama() const { return m_xinerama_avail; } 311 bool hasXinerama() const { return m_xinerama_avail; }
307 inline int numHeads() const { return m_xinerama_num_heads; } 312 int numHeads() const { return m_xinerama_num_heads; }
308 313
309 void initXinerama(); 314 void initXinerama();
310 315
@@ -447,6 +452,7 @@ private:
447 FbTk::Resource<ResizeModel> resize_model; 452 FbTk::Resource<ResizeModel> resize_model;
448 FbTk::Resource<std::string> windowmenufile; 453 FbTk::Resource<std::string> windowmenufile;
449 FbTk::Resource<FocusModel> focus_model; 454 FbTk::Resource<FocusModel> focus_model;
455 FbTk::Resource<TabFocusModel> tabfocus_model;
450 FbTk::Resource<FollowModel> follow_model; 456 FbTk::Resource<FollowModel> follow_model;
451 bool ordered_dither; 457 bool ordered_dither;
452 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, 458 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha,