]>
Dogcows Code - chaz/openbox/blob - src/screen.hh
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"
17 #include "otk/style.hh"
18 #include "otk/configuration.hh" // TEMPORARY
26 //! Manages a single screen
31 //! Holds a list of OBClient objects
32 typedef std::list
<OBClient
*> ClientList
;
33 //! Holds a list of otk::Strut objects
34 typedef std::list
<otk::Strut
*> StrutList
;
36 static const unsigned long event_mask
= ColormapChangeMask
|
40 SubstructureNotifyMask
|
41 SubstructureRedirectMask
|
46 //! Was %Openbox able to manage the screen?
49 //! The number of the screen on the X server
52 //! Information about this screen
53 const otk::ScreenInfo
*_info
;
55 //! The Image Control used for rendering on the screen
56 otk::BImageControl
*_image_control
;
58 //! The style with which to render on the screen
61 //! Is the root colormap currently installed?
62 bool _root_cmap_installed
;
64 //! The dimentions of the screen
67 //! All managed clients on the screen
70 //! Area usable for placement etc (total - struts)
73 //! Areas of the screen reserved by applications
77 //! Calculate the OBScreen::_area member
79 //! Set the client list on the root window
81 Sets the _NET_CLIENT_LIST root window property.<br>
82 Also calls OBScreen::updateStackingList.
85 //! Set the client stacking list on the root window
87 Set the _NET_CLIENT_LIST_STACKING root window property.
89 void setStackingList();
90 //! Set the work area hint on the root window
92 Set the _NET_WORKAREA root window property.
97 //! Constructs a new OBScreen object
98 OBScreen(int screen
, const otk::Configuration
&config
);
99 //! Destroys the OBScreen object
102 //! Returns if the screen was successfully managed
104 If this is false, then the screen should be deleted and should NOT be
107 inline bool managed() const { return _managed
; }
108 //! Returns the Image Control used for rendering on the screen
109 inline otk::BImageControl
*imageControl() { return _image_control
; }
110 //! Returns the dimentions of the screen
111 inline const otk::Point
&size() const { return _size
; }
112 //! Returns the area of the screen not reserved by applications' Struts
113 inline const otk::Rect
&area() const { return _area
; }
114 //! Returns the style in use on the screen
115 inline const otk::Style
*style() const { return &_style
; }
118 //! Adds a window's strut to the screen's list of reserved spaces
119 void addStrut(otk::Strut
*strut
);
120 //! Removes a window's strut from the screen's list of reserved spaces
121 void removeStrut(otk::Strut
*strut
);
123 //! Loads a new style on the screen
124 void loadStyle(const otk::Configuration
&config
);
126 //! Manage any pre-existing windows on the screen
127 void manageExisting();
128 //! Manage a client window
130 This gives the window a frame, reparents it, selects events on it, etc.
132 void manageWindow(Window window
);
133 //! Unmanage a client
135 This removes the window's frame, reparents it to root, unselects events on
138 void unmanageWindow(OBClient
*client
);
This page took 0.041887 seconds and 4 git commands to generate.