1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
6 @brief OBScreen manages a single screen
13 #include "otk/image.hh"
14 #include "otk/strut.hh"
15 #include "otk/rect.hh"
16 #include "otk/point.hh"
24 //! Manages a single screen
29 //! Holds a list of OBClient objects
30 typedef std::vector<OBClient*> ClientList;
31 //! Holds a list of otk::Strut objects
32 typedef std::list<otk::Strut*> StrutList;
34 static const unsigned long event_mask = ColormapChangeMask |
38 SubstructureNotifyMask |
39 SubstructureRedirectMask |
44 //! Was %Openbox able to manage the screen?
47 //! The number of the screen on the X server
50 //! Information about this screen
51 const otk::ScreenInfo *_info;
53 //! The Image Control used for rendering on the screen
54 otk::BImageControl *_image_control;
56 //! Is the root colormap currently installed?
57 bool _root_cmap_installed;
59 //! The dimentions of the screen
62 //! All managed clients on the screen
65 //! Area usable for placement etc (total - struts)
68 //! Areas of the screen reserved by applications
72 //! Manage any pre-existing windows on the screen
73 void manageExisting();
74 //! Calculate the OBScreen::_area member
76 //! Set the client list on the root window
78 Sets the _NET_CLIENT_LIST root window property.<br>
79 Also calls OBScreen::updateStackingList.
82 //! Set the client stacking list on the root window
84 Set the _NET_CLIENT_LIST_STACKING root window property.
86 void setStackingList();
87 //! Set the work area hint on the root window
89 Set the _NET_WORKAREA root window property.
94 //! Constructs a new OBScreen object
96 //! Destroys the OBScreen object
99 //! Returns the Image Control used for rendering on the screen
100 inline otk::BImageControl *imageControl() { return _image_control; }
101 //! Returns the dimentions of the screen
102 inline const otk::Point &size() const { return _size; }
103 //! Returns the area of the screen not reserved by applications' Struts
104 inline const otk::Rect &area() const { return _area; }
106 //! Adds a window's strut to the screen's list of reserved spaces
107 void addStrut(otk::Strut *strut);
108 //! Removes a window's strut from the screen's list of reserved spaces
109 void removeStrut(otk::Strut *strut);