]> icculus.org git repositories - mikachu/openbox.git/blob - openbox/screen.h
try some better default offsets for big endian machines.
[mikachu/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 number of virtual "xinerama" screens/heads */
14 extern guint screen_num_xin_areas;
15 /*! The current desktop */
16 extern guint screen_desktop;
17 /*! The size of the screen */
18 extern Size  screen_physical_size;
19 /*! Are we in showing-desktop mode? */
20 extern gboolean screen_showing_desktop;
21
22 /*! Orientation of the desktops */
23 typedef enum {
24     Orientation_Horz = 0,
25     Orientation_Vert = 1
26 } Orientation;
27
28 typedef struct DesktopLayout {
29     Orientation orientation;
30     Corner start_corner;
31     guint rows;
32     guint columns;
33 } DesktopLayout;
34 extern DesktopLayout screen_desktop_layout;
35
36 /*! An array of gchar*'s which are desktop names in UTF-8 format */
37 extern char **screen_desktop_names;
38
39 /*! Take over the screen, set the basic hints on it claming it as ours */
40 gboolean screen_annex();
41
42 /*! Once the screen is ours, set up its initial state */
43 void screen_startup();
44 /*! Free resources */
45 void screen_shutdown();
46
47 /*! Figure out the new size of the screen and adjust stuff for it */
48 void screen_resize(int w, int h);
49
50 /*! Change the number of available desktops */
51 void screen_set_num_desktops(guint num);
52 /*! Change the current desktop */
53 void screen_set_desktop(guint num);
54
55 /*! Shows and focuses the desktop and hides all the client windows, or
56   returns to the normal state, showing client windows. */
57 void screen_show_desktop(gboolean show);
58
59 /*! Updates the desktop layout from the root property if available */
60 void screen_update_layout();
61
62 /*! Get desktop names from the root window property */
63 void screen_update_desktop_names();
64
65 /*! Installs or uninstalls a colormap for a client. If client is NULL, then
66   it handles the root colormap. */
67 void screen_install_colormap(struct Client *client, gboolean install);
68
69 void screen_update_areas();
70
71 Rect *screen_physical_area();
72
73 Rect *screen_physical_area_xinerama(guint head);
74
75 Rect *screen_area(guint desktop);
76
77 Rect *screen_area_xinerama(guint desktop, guint head);
78
79 #endif