Refactor: remove some now-dead code
[notion/jeffpc.git] / ioncore / screen.h
blob9f0eb05cf6a7668ff31b147f3e163d31cddfa110
1 /*
2 * ion/ioncore/screen.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_IONCORE_SCREEN_H
10 #define ION_IONCORE_SCREEN_H
12 #include <libextl/extl.h>
13 #include <libmainloop/hooks.h>
14 #include "common.h"
15 #include "mplex.h"
16 #include "rectangle.h"
17 #include "pholder.h"
19 #define FOR_ALL_SCREENS(SCR) \
20 for((SCR)=ioncore_g.screens; \
21 (SCR)!=NULL; \
22 (SCR)=(SCR)->next_scr)
24 #define FOR_ALL_SCREENS_W_NEXT(SCR, NXT) \
25 for((SCR)=ioncore_g.screens, NXT=((SCR) ? (SCR)->next_scr : NULL); \
26 (SCR)!=NULL; \
27 (SCR)=(NXT), NXT=((SCR) ? (SCR)->next_scr : NULL))
29 enum{
30 SCREEN_ROTATION_0,
31 SCREEN_ROTATION_90,
32 SCREEN_ROTATION_180,
33 SCREEN_ROTATION_270
37 DECLCLASS(WScreen){
38 WMPlex mplex;
39 int id;
40 Atom atom_workspace;
41 /** Deprecated field, but kept to keep our ABI stable */
42 bool dep;
43 WRectangle managed_off;
44 WScreen *next_scr, *prev_scr;
45 Watch notifywin_watch;
46 Watch infowin_watch;
49 extern bool screen_init(WScreen *scr, WRootWin *parent, const WFitParams *fp,
50 int id);
52 extern WScreen *create_screen(WRootWin *parent, const WFitParams *fp, int id);
54 extern void screen_deinit(WScreen *scr);
56 extern int screen_id(WScreen *scr);
58 extern void screen_set_managed_offset(WScreen *scr, const WRectangle *off);
60 extern bool screen_init_layout(WScreen *scr, ExtlTab tab);
62 extern WScreen *ioncore_find_screen_id(int id);
63 extern WScreen *ioncore_goto_screen_id(int id);
64 extern WScreen *ioncore_goto_next_screen();
65 extern WScreen *ioncore_goto_prev_screen();
67 /* Handlers of this hook receive a WScreen* as the sole parameter. */
68 extern WHook *screen_managed_changed_hook;
70 #endif /* ION_IONCORE_SCREEN_H */