]>
Dogcows Code - chaz/openbox/blob - screen.hh
5af79366acf764a3d60dc703bf60b1f43d97fcc5
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 //! Areas of the screen reserved by applications
89 //! An offscreen window which gets focus when nothing else has it
92 //! A list of all managed clients on the screen, in their stacking order
95 //! Calculate the OBScreen::_area member
97 //! Set the client list on the root window
99 Sets the _NET_CLIENT_LIST root window property.<br>
100 Also calls OBScreen::updateStackingList.
102 void setClientList();
103 //! Set the client stacking list on the root window
105 Set the _NET_CLIENT_LIST_STACKING root window property.
107 void setStackingList();
108 //! Set the work area hint on the root window
110 Set the _NET_WORKAREA root window property.
116 //! Constructs a new OBScreen object
117 OBScreen(int screen
);
118 //! Destroys the OBScreen object
122 //! Returns if the screen was successfully managed
124 If this is false, then the screen should be deleted and should NOT be
127 inline bool managed() const { return _managed
; }
128 //! Returns the Image Control used for rendering on the screen
129 inline otk::BImageControl
*imageControl() { return _image_control
; }
130 //! Returns the area of the screen not reserved by applications' Struts
131 inline const otk::Rect
&area() const { return _area
; }
132 //! Returns the style in use on the screen
133 inline const otk::Style
*style() const { return &_style
; }
134 //! An offscreen window which gets focus when nothing else has it
135 inline Window
focuswindow() const { return _focuswindow
; }
137 //! Adds a window's strut to the screen's list of reserved spaces
138 void addStrut(otk::Strut
*strut
);
139 //! Removes a window's strut from the screen's list of reserved spaces
140 void removeStrut(otk::Strut
*strut
);
142 //! Manage any pre-existing windows on the screen
143 void manageExisting();
144 //! Manage a client window
146 This gives the window a frame, reparents it, selects events on it, etc.
148 void manageWindow(Window window
);
149 //! Unmanage a client
151 This removes the window's frame, reparents it to root, unselects events on
154 void unmanageWindow(OBClient
*client
);
156 //! Raises/Lowers a client window above/below all others in its stacking
158 void restack(bool raise
, OBClient
*client
);
This page took 0.038505 seconds and 3 git commands to generate.