]>
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
14 #include "rootwindow.hh"
15 #include "otk/image.hh"
16 #include "otk/strut.hh"
17 #include "otk/rect.hh"
18 #include "otk/style.hh"
19 #include "otk/configuration.hh" // TEMPORARY
28 //! Manages a single screen
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
|
45 //! All managed clients on the screen (in order of being mapped)
46 OBClient::List clients
;
49 //! Was %Openbox able to manage the screen?
52 //! The number of the screen on the X server
55 //! Information about this screen
56 const otk::ScreenInfo
*_info
;
58 //! The Image Control used for rendering on the screen
59 otk::BImageControl
*_image_control
;
61 //! The style with which to render on the screen
64 //! The screen's root window
67 //! Is the root colormap currently installed?
68 bool _root_cmap_installed
;
70 //! Area usable for placement etc (total - struts)
73 //! Combined strut from all of the clients' struts
76 //! An offscreen window which gets focus when nothing else has it
79 //! An offscreen window which shows that a NETWM compliant window manager is
81 Window _supportwindow
;
83 //! A list of all managed clients on the screen, in their stacking order
84 OBClient::List _stacking
;
86 //! Calculate the OBScreen::_area member
88 //! Set the list of supported NETWM atoms on the root window
89 void setSupportedAtoms();
90 //! Set the client list on the root window
92 Sets the _NET_CLIENT_LIST root window property.<br>
93 Also calls OBScreen::updateStackingList.
96 //! Set the client stacking list on the root window
98 Set the _NET_CLIENT_LIST_STACKING root window property.
100 void setStackingList();
101 //! Set the work area hint on the root window
103 Set the _NET_WORKAREA root window property.
109 //! Constructs a new OBScreen object
110 OBScreen(int screen
);
111 //! Destroys the OBScreen object
115 inline int number() const { return _number
; }
117 //! Returns if the screen was successfully managed
119 If this is false, then the screen should be deleted and should NOT be
122 inline bool managed() const { return _managed
; }
123 //! Returns the Image Control used for rendering on the screen
124 inline otk::BImageControl
*imageControl() { return _image_control
; }
125 //! Returns the area of the screen not reserved by applications' Struts
126 inline const otk::Rect
&area() const { return _area
; }
127 //! Returns the style in use on the screen
128 inline const otk::Style
*style() const { return &_style
; }
129 //! An offscreen window which gets focus when nothing else has it
130 inline Window
focuswindow() const { return _focuswindow
; }
132 //! Update's the screen's combined strut of all the clients.
134 Clients should call this whenever they change their strut.
138 //! Manage any pre-existing windows on the screen
139 void manageExisting();
140 //! Manage a client window
142 This gives the window a frame, reparents it, selects events on it, etc.
144 void manageWindow(Window window
);
145 //! Unmanage a client
147 This removes the window's frame, reparents it to root, unselects events on
150 void unmanageWindow(OBClient
*client
);
152 //! Raises/Lowers a client window above/below all others in its stacking
154 void restack(bool raise
, OBClient
*client
);
This page took 0.041398 seconds and 4 git commands to generate.