i3
randr.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * For more information on RandR, please see the X.org RandR specification at
8  * http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt
9  * (take your time to read it completely, it answers all questions).
10  *
11  */
12 #ifndef I3_RANDR_H
13 #define I3_RANDR_H
14 
15 #include "data.h"
16 #include <xcb/randr.h>
17 
18 TAILQ_HEAD(outputs_head, xoutput);
19 extern struct outputs_head outputs;
20 
21 typedef enum {
25 
31 void randr_init(int *event_base);
32 
38 void disable_randr(xcb_connection_t *conn);
39 
45 void output_init_con(Output *output);
46 
57 void init_ws_for_output(Output *output, Con *content);
58 
63 //void initialize_output(xcb_connection_t *conn, Output *output, Workspace *workspace);
64 
69 void randr_query_outputs(void);
70 
76 
81 Output *get_output_by_name(const char *name);
82 
88 Output *get_output_containing(int x, int y);
89 
90 /*
91  * In contained_by_output, we check if any active output contains part of the container.
92  * We do this by checking if the output rect is intersected by the Rect.
93  * This is the 2-dimensional counterpart of get_output_containing.
94  * Since we don't actually need the outputs intersected by the given Rect (There could
95  * be many), we just return true or false for convenience.
96  *
97  */
98 bool contained_by_output(Rect rect);
99 
111 Output *get_output_next(direction_t direction, Output *current, output_close_far_t close_far);
112 
123 Output *get_output_next_wrap(direction_t direction, Output *current);
124 
125 #endif