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
17 #include <libextl/extl.h>
18 #include "rectangle.h"
22 #define FOR_ALL_SCREENS(SCR) \
23 for((SCR)=ioncore_g.screens; \
25 (SCR)=(SCR)->next_scr)
33 WRectangle managed_off
;
34 WScreen
*next_scr
, *prev_scr
;
35 Watch notifywin_watch
;
38 extern WScreen
*create_screen(WRootWin
*rootwin
, int id
,
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 */