4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_SCREEN_H
10 #define ION_IONCORE_SCREEN_H
12 #include <libextl/extl.h>
13 #include <libmainloop/hooks.h>
16 #include "rectangle.h"
19 #define FOR_ALL_SCREENS(SCR) \
20 for((SCR)=ioncore_g.screens; \
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); \
27 (SCR)=(NXT), NXT=((SCR) ? (SCR)->next_scr : NULL))
41 /** Deprecated field, but kept to keep our ABI stable */
43 WRectangle managed_off
;
44 WScreen
*next_scr
, *prev_scr
;
45 Watch notifywin_watch
;
49 extern bool screen_init(WScreen
*scr
, WRootWin
*parent
, const WFitParams
*fp
,
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 */