]>
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 "rootwindow.hh"
14 #include "otk/image.hh"
15 #include "otk/strut.hh"
16 #include "otk/rect.hh"
17 #include "otk/style.hh"
18 #include "otk/configuration.hh" // TEMPORARY
27 //! Manages a single screen
32 //! Holds a list of OBClient objects
33 typedef std::list
<OBClient
*> ClientList
;
34 //! Holds a list of otk::Strut objects
35 typedef std::list
<otk::Strut
*> StrutList
;
37 static const unsigned long event_mask
= ColormapChangeMask
|
41 SubstructureNotifyMask
|
42 SubstructureRedirectMask
|
47 Layer_Icon
, // 0 - iconified windows, in any order at all
48 Layer_Desktop
, // 1 - desktop windows
49 Layer_Below
, // 2 - normal windows w/ below
50 Layer_Normal
, // 3 - normal windows
51 Layer_Above
, // 4 - normal windows w/ above
52 Layer_Top
, // 5 - always-on-top-windows (docks?)
53 Layer_Fullscreen
, // 6 - fullscreeen windows
54 Layer_Internal
, // 7 - openbox windows/menus
58 //! All managed clients on the screen (in order of being mapped)
62 //! Was %Openbox able to manage the screen?
65 //! The number of the screen on the X server
68 //! Information about this screen
69 const otk::ScreenInfo
*_info
;
71 //! The Image Control used for rendering on the screen
72 otk::BImageControl
*_image_control
;
74 //! The style with which to render on the screen
77 //! The screen's root window
80 //! Is the root colormap currently installed?
81 bool _root_cmap_installed
;
83 //! Area usable for placement etc (total - struts)
86 //! Combined strut from all of the clients' struts
89 //! An offscreen window which gets focus when nothing else has it
92 //! An offscreen window which shows that a NETWM compliant window manager is
94 Window _supportwindow
;
96 //! A list of all managed clients on the screen, in their stacking order
99 //! Calculate the OBScreen::_area member
101 //! Set the list of supported NETWM atoms on the root window
102 void setSupportedAtoms();
103 //! Set the client list on the root window
105 Sets the _NET_CLIENT_LIST root window property.<br>
106 Also calls OBScreen::updateStackingList.
108 void setClientList();
109 //! Set the client stacking list on the root window
111 Set the _NET_CLIENT_LIST_STACKING root window property.
113 void setStackingList();
114 //! Set the work area hint on the root window
116 Set the _NET_WORKAREA root window property.
122 //! Constructs a new OBScreen object
123 OBScreen(int screen
);
124 //! Destroys the OBScreen object
128 inline int number() const { return _number
; }
130 //! Returns if the screen was successfully managed
132 If this is false, then the screen should be deleted and should NOT be
135 inline bool managed() const { return _managed
; }
136 //! Returns the Image Control used for rendering on the screen
137 inline otk::BImageControl
*imageControl() { return _image_control
; }
138 //! Returns the area of the screen not reserved by applications' Struts
139 inline const otk::Rect
&area() const { return _area
; }
140 //! Returns the style in use on the screen
141 inline const otk::Style
*style() const { return &_style
; }
142 //! An offscreen window which gets focus when nothing else has it
143 inline Window
focuswindow() const { return _focuswindow
; }
145 //! Update's the screen's combined strut of all the clients.
147 Clients should call this whenever they change their strut.
151 //! Manage any pre-existing windows on the screen
152 void manageExisting();
153 //! Manage a client window
155 This gives the window a frame, reparents it, selects events on it, etc.
157 void manageWindow(Window window
);
158 //! Unmanage a client
160 This removes the window's frame, reparents it to root, unselects events on
163 void unmanageWindow(OBClient
*client
);
165 //! Raises/Lowers a client window above/below all others in its stacking
167 void restack(bool raise
, OBClient
*client
);
This page took 0.041293 seconds and 4 git commands to generate.