]> git.sur5r.net Git - i3/i3/blob - include/xinerama.h
Merge branch 'next' into testcases
[i3/i3] / include / xinerama.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * (c) 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #include "data.h"
12
13 #ifndef _XINERAMA_H
14 #define _XINERAMA_H
15
16 TAILQ_HEAD(screens_head, Screen);
17 extern struct screens_head *virtual_screens;
18
19 /**
20  * Returns true if both screen objects describe the same screen (checks their
21  * size and position).
22  *
23  */
24 bool screens_are_equal(i3Screen *screen1, i3Screen *screen2);
25
26 /**
27  * We have just established a connection to the X server and need the initial
28  * Xinerama information to setup workspaces for each screen.
29  *
30  */
31 void initialize_xinerama(xcb_connection_t *conn);
32
33 /**
34  * This is called when the rootwindow receives a configure_notify event and
35  * therefore the number/position of the Xinerama screens could have changed.
36  *
37  */
38 void xinerama_requery_screens(xcb_connection_t *conn);
39
40 /**
41  * Looks in virtual_screens for the i3Screen whose start coordinates are x, y
42  *
43  */
44 i3Screen *get_screen_at(int x, int y, struct screens_head *screenlist);
45
46 /**
47  * Looks in virtual_screens for the i3Screen which contains coordinates x, y
48  *
49  */
50 i3Screen *get_screen_containing(int x, int y);
51
52 /**
53  * Gets the screen which is the last one in the given direction, for example
54  * the screen on the most bottom when direction == D_DOWN, the screen most
55  * right when direction == D_RIGHT and so on.
56  *
57  * This function always returns a screen.
58  *
59  */
60 i3Screen *get_screen_most(direction_t direction, i3Screen *current);
61
62 #endif