- inline void setRootColormapInstalled(bool r) { root_colormap_installed = r; }
- void saveSloppyFocus(bool s);
- void saveAutoRaise(bool a);
- void saveClickRaise(bool c);
- void saveWorkspaces(unsigned int w);
- void savePlacementPolicy(int p);
- void saveRowPlacementDirection(int d);
- void saveColPlacementDirection(int d);
- void saveSnapThreshold(int t);
- void saveSnapOffset(int o);
- void saveResistanceSize(int s);
- void saveImageDither(bool d);
- void saveShadowFonts(bool f);
- void saveAAFonts(bool f);
- void saveOpaqueMove(bool o);
- void saveFullMax(bool f);
- void saveFocusNew(bool f);
- void saveFocusLast(bool f);
- void saveHideToolbar(bool h);
- void saveWindowToEdgeSnap(int s);
- void saveWindowToWindowSnap(int s);
- void saveWindowCornerSnap(bool s);
- void saveResizeZones(unsigned int z);
- void savePlaceIgnoreShaded(bool i);
- void savePlaceIgnoreMaximized(bool i);
- void saveAllowScrollLock(bool a);
- void saveWorkspaceWarping(bool w);
- void saveRootScrollDirection(int d);
- void saveRootMenuButton(unsigned int b);
- void saveWorkspaceMenuButton(unsigned int b);
- inline void iconUpdate(void) { iconmenu->update(); }
-
-#ifdef HAVE_STRFTIME
- inline const char *getStrftimeFormat(void)
- { return resource.strftime_format.c_str(); }
- void saveStrftimeFormat(const std::string& format);
-#else // !HAVE_STRFTIME
- inline int getDateFormat(void) { return resource.date_format; }
- inline void saveDateFormat(int f);
- inline bool isClock24Hour(void) { return resource.clock24hour; }
- inline void saveClock24Hour(bool c);
-#endif // HAVE_STRFTIME
-
- inline WindowStyle *getWindowStyle(void) { return &resource.wstyle; }
- inline MenuStyle *getMenuStyle(void) { return &resource.mstyle; }
- inline ToolbarStyle *getToolbarStyle(void) { return &resource.tstyle; }
-
- BlackboxWindow *getIcon(unsigned int index);
-
- // allAvailableAreas should be used whenever possible instead of this function
- // as then Xinerama will work correctly.
- const Rect& availableArea(void) const;
-#ifdef XINERAMA
- const RectList& allAvailableAreas(void) const;
-#endif // XINERAMA
- void updateAvailableArea(void);
- void addStrut(Strut *strut);
- void removeStrut(Strut *strut);
-
- unsigned int addWorkspace(void);
- unsigned int removeLastWorkspace(void);
- void changeWorkspaceID(unsigned int id);
- void saveWorkspaceNames(void);
-
- void addNetizen(Netizen *n);
- void removeNetizen(Window w);
-
- void addSystrayWindow(Window window);
- void removeSystrayWindow(Window window);
-
- void addIcon(BlackboxWindow *w);
- void removeIcon(BlackboxWindow *w);
-
- void updateClientList(void);
- void updateStackingList(void);
- void manageWindow(Window w);
- void unmanageWindow(BlackboxWindow *w, bool remap);
- void raiseWindows(Window *workspace_stack, unsigned int num);
- void lowerWindows(Window *workspace_stack, unsigned int num);
- void reassociateWindow(BlackboxWindow *w, unsigned int wkspc_id,
- bool ignore_sticky);
- void propagateWindowName(const BlackboxWindow *bw);
- void prevFocus(void) const;
- void nextFocus(void) const;
- void raiseFocus(void) const;
- void load_rc(void);
- void save_rc(void);
- void reconfigure(void);
- void toggleFocusModel(FocusModel model);
- void rereadMenu(void);
- void shutdown(void);
- void showPosition(int x, int y);
- void showGeometry(unsigned int gx, unsigned int gy);
- void hideGeometry(void);
-
- void showWorkspaceMenu(int x, int y);
- void showRootMenu(int x, int y);
-
- void buttonPressEvent(const XButtonEvent *xbutton);
- void propertyNotifyEvent(const XPropertyEvent *pe);
-
- void updateNetizenCurrentWorkspace(void);
- void updateNetizenWorkspaceCount(void);
- void updateNetizenWindowFocus(void);
- void updateNetizenWindowAdd(Window w, unsigned long p);
- void updateNetizenWindowDel(Window w);
- void updateNetizenConfigNotify(XEvent *e);
- void updateNetizenWindowRaise(Window w);
- void updateNetizenWindowLower(Window w);
+ //! Is the root colormap currently installed?
+ bool _root_cmap_installed;
+
+ //! Area usable for placement etc (total - struts)
+ otk::Rect _area;
+
+ //! Areas of the screen reserved by applications
+ StrutList _struts;
+
+
+ //! Calculate the OBScreen::_area member
+ void calcArea();
+ //! Set the client list on the root window
+ /*!
+ Sets the _NET_CLIENT_LIST root window property.<br>
+ Also calls OBScreen::updateStackingList.
+ */
+ void setClientList();
+ //! Set the client stacking list on the root window
+ /*!
+ Set the _NET_CLIENT_LIST_STACKING root window property.
+ */
+ void setStackingList();
+ //! Set the work area hint on the root window
+ /*!
+ Set the _NET_WORKAREA root window property.
+ */
+ void setWorkArea();
+
+public:
+#ifndef SWIG
+ //! Constructs a new OBScreen object
+ OBScreen(int screen, const otk::Configuration &config);
+ //! Destroys the OBScreen object
+ virtual ~OBScreen();
+#endif
+
+ //! Returns if the screen was successfully managed
+ /*!
+ If this is false, then the screen should be deleted and should NOT be
+ used.
+ */
+ inline bool managed() const { return _managed; }
+ //! Returns the Image Control used for rendering on the screen
+ inline otk::BImageControl *imageControl() { return _image_control; }
+ //! Returns the area of the screen not reserved by applications' Struts
+ inline const otk::Rect &area() const { return _area; }
+ //! Returns the style in use on the screen
+ inline const otk::Style *style() const { return &_style; }
+
+ //! Adds a window's strut to the screen's list of reserved spaces
+ void addStrut(otk::Strut *strut);
+ //! Removes a window's strut from the screen's list of reserved spaces
+ void removeStrut(otk::Strut *strut);
+
+ //! Loads a new style on the screen
+ void loadStyle(const otk::Configuration &config);
+
+ //! Manage any pre-existing windows on the screen
+ void manageExisting();
+ //! Manage a client window
+ /*!
+ This gives the window a frame, reparents it, selects events on it, etc.
+ */
+ void manageWindow(Window window);
+ //! Unmanage a client
+ /*!
+ This removes the window's frame, reparents it to root, unselects events on
+ it, etc.
+ */
+ void unmanageWindow(OBClient *client);