]> icculus.org git repositories - dana/openbox.git/blob - openbox/screen.h
was not moving the window between desktop focus lists sometimes. bad news. now i...
[dana/openbox.git] / openbox / screen.h
1 #ifndef __screen_h
2 #define __screen_h
3
4 #include "geom.h"
5 #include "client.h"
6
7 struct Client;
8
9 #define DESKTOP_ALL (0xffffffff)
10
11 /*! The number of available desktops */
12 extern guint screen_num_desktops;
13 /*! The current desktop */
14 extern guint screen_desktop;
15 /*! The size of the screen */
16 extern Size  screen_physical_size;
17 /*! Are we in showing-desktop mode? */
18 extern gboolean screen_showing_desktop;
19
20 /*! Orientation of the desktops */
21 typedef enum {
22     Orientation_Horz = 0,
23     Orientation_Vert = 1
24 } Orientation;
25
26 typedef struct DesktopLayout {
27     Orientation orientation;
28     Corner start_corner;
29     guint rows;
30     guint columns;
31 } DesktopLayout;
32 extern DesktopLayout screen_desktop_layout;
33
34 /*! An array of gchar*'s which are desktop names in UTF-8 format */
35 extern GPtrArray *screen_desktop_names;
36
37 /*! Take over the screen, set the basic hints on it claming it as ours */
38 gboolean screen_annex();
39
40 /*! Once the screen is ours, set up its initial state */
41 void screen_startup();
42 /*! Free resources */
43 void screen_shutdown();
44
45 /*! Figure out the new size of the screen and adjust stuff for it */
46 void screen_resize();
47
48 /*! Change the number of available desktops */
49 void screen_set_num_desktops(guint num);
50 /*! Change the current desktop */
51 void screen_set_desktop(guint num);
52
53 /*! Shows and focuses the desktop and hides all the client windows, or
54   returns to the normal state, showing client windows. */
55 void screen_show_desktop(gboolean show);
56
57 /*! Updates the desktop layout from the root property if available */
58 void screen_update_layout();
59
60 /*! Get desktop names from the root window property */
61 void screen_update_desktop_names();
62
63 /*! Installs or uninstalls a colormap for a client. If client is NULL, then
64   it handles the root colormap. */
65 void screen_install_colormap(struct Client *client, gboolean install);
66
67 void screen_update_struts();
68
69 Rect *screen_area(guint desktop);
70
71 Strut *screen_strut(guint desktop);
72
73 #endif