]> git.sur5r.net Git - i3/i3/blob - include/randr.h
huge change: implement RandR instead of Xinerama
[i3/i3] / include / randr.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * © 2009-2010 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #include "data.h"
12 #include <xcb/randr.h>
13
14 #ifndef _RANDR_H
15 #define _RANDR_H
16
17 TAILQ_HEAD(outputs_head, xoutput);
18 extern struct outputs_head outputs;
19
20 /**
21  * Returns true if both screen objects describe the same screen (checks their
22  * size and position).
23  *
24  */
25 bool screens_are_equal(Output *screen1, Output *screen2);
26
27 /**
28  * We have just established a connection to the X server and need the initial
29  * XRandR information to setup workspaces for each screen.
30  *
31  */
32 void initialize_randr(xcb_connection_t *conn, int *event_base);
33
34 /**
35  * (Re-)queries the outputs via RandR and stores them in the list of outputs.
36  *
37  */
38 void randr_query_screens(xcb_connection_t *conn);
39
40 /**
41  * Returns the first output which is active.
42  *
43  */
44 Output *get_first_output();
45
46 /**
47  * Looks in virtual_screens for the i3Screen which contains coordinates x, y
48  *
49  */
50 Output *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 Output *get_screen_most(direction_t direction, Output *current);
61
62 #endif