]>
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
|
46 //! All managed clients on the screen
50 //! Was %Openbox able to manage the screen?
53 //! The number of the screen on the X server
56 //! Information about this screen
57 const otk::ScreenInfo
*_info
;
59 //! The Image Control used for rendering on the screen
60 otk::BImageControl
*_image_control
;
62 //! The style with which to render on the screen
65 //! The screen's root window
68 //! Is the root colormap currently installed?
69 bool _root_cmap_installed
;
71 //! Area usable for placement etc (total - struts)
74 //! Areas of the screen reserved by applications
77 //! An offscreen window which gets focus when nothing else has it
81 //! Calculate the OBScreen::_area member
83 //! Set the client list on the root window
85 Sets the _NET_CLIENT_LIST root window property.<br>
86 Also calls OBScreen::updateStackingList.
89 //! Set the client stacking list on the root window
91 Set the _NET_CLIENT_LIST_STACKING root window property.
93 void setStackingList();
94 //! Set the work area hint on the root window
96 Set the _NET_WORKAREA root window property.
102 //! Constructs a new OBScreen object
103 OBScreen(int screen
, const otk::Configuration
&config
);
104 //! Destroys the OBScreen object
108 //! Returns if the screen was successfully managed
110 If this is false, then the screen should be deleted and should NOT be
113 inline bool managed() const { return _managed
; }
114 //! Returns the Image Control used for rendering on the screen
115 inline otk::BImageControl
*imageControl() { return _image_control
; }
116 //! Returns the area of the screen not reserved by applications' Struts
117 inline const otk::Rect
&area() const { return _area
; }
118 //! Returns the style in use on the screen
119 inline const otk::Style
*style() const { return &_style
; }
120 //! An offscreen window which gets focus when nothing else has it
121 inline Window
focuswindow() const { return _focuswindow
; }
123 //! Adds a window's strut to the screen's list of reserved spaces
124 void addStrut(otk::Strut
*strut
);
125 //! Removes a window's strut from the screen's list of reserved spaces
126 void removeStrut(otk::Strut
*strut
);
128 //! Loads a new style on the screen
129 void loadStyle(const otk::Configuration
&config
);
131 //! Manage any pre-existing windows on the screen
132 void manageExisting();
133 //! Manage a client window
135 This gives the window a frame, reparents it, selects events on it, etc.
137 void manageWindow(Window window
);
138 //! Unmanage a client
140 This removes the window's frame, reparents it to root, unselects events on
143 void unmanageWindow(OBClient
*client
);
This page took 0.038299 seconds and 4 git commands to generate.