trunk: changeset 1940
[notion/jeffpc.git] / ioncore / screen.h
blob36b5d697941701d4c52c789ac880bf1d56e72b51
1 /*
2 * ion/ioncore/screen.h
4 * Copyright (c) Tuomo Valkonen 1999-2005.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
12 #ifndef ION_IONCORE_SCREEN_H
13 #define ION_IONCORE_SCREEN_H
15 #include "common.h"
16 #include "mplex.h"
17 #include <libextl/extl.h>
18 #include "rectangle.h"
19 #include "rootwin.h"
20 #include "hooks.h"
22 #define FOR_ALL_SCREENS(SCR) \
23 for((SCR)=ioncore_g.screens; \
24 (SCR)!=NULL; \
25 (SCR)=(SCR)->next_scr)
28 DECLCLASS(WScreen){
29 WMPlex mplex;
30 int id;
31 Atom atom_workspace;
32 bool uses_root;
33 WRectangle managed_off;
34 WScreen *next_scr, *prev_scr;
35 Watch notifywin_watch;
38 extern WScreen *create_screen(WRootWin *rootwin, int id,
39 const WFitParams *fp,
40 bool useroot);
42 extern int screen_id(WScreen *scr);
44 extern void screen_set_managed_offset(WScreen *scr, const WRectangle *off);
46 extern bool screen_init_layout(WScreen *scr, ExtlTab tab);
48 extern void screen_notify(WScreen *scr, const char *notstr);
49 extern void screen_unnotify(WScreen *scr);
51 /* For viewports corresponding to Xinerama rootwins <id> is initially set
52 * to the Xinerama screen number. When Xinerama is not enabled, <id> is
53 * the X screen number (which is the same for all Xinerama rootwins).
54 * For all other viewports <id> is undefined.
56 extern WScreen *ioncore_find_screen_id(int id);
57 extern WScreen *ioncore_goto_screen_id(int id);
58 extern WScreen *ioncore_goto_next_screen();
59 extern WScreen *ioncore_goto_prev_screen();
61 /* Handlers of this hook receive a WScreen* as the sole parameter. */
62 extern WHook *screen_managed_changed_hook;
64 #endif /* ION_IONCORE_SCREEN_H */