2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
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).
16 #include <xcb/randr.h>
18 TAILQ_HEAD(outputs_head, xoutput);
19 extern struct outputs_head outputs;
27 * We have just established a connection to the X server and need the initial
28 * XRandR information to setup workspaces for each screen.
31 void randr_init(int *event_base);
34 * Disables RandR support by creating exactly one output with the size of the
38 void disable_randr(xcb_connection_t *conn);
41 * Initializes a CT_OUTPUT Con (searches existing ones from inplace restart
42 * before) to use for the given Output.
45 void output_init_con(Output *output);
48 * Initializes at least one workspace for this output, trying the following
49 * steps until there is at least one workspace:
51 * • Move existing workspaces, which are assigned to be on the given output, to
53 * • Create the first assigned workspace for this output.
54 * • Create the first unused workspace.
57 void init_ws_for_output(Output *output, Con *content);
60 * Initializes the specified output, assigning the specified workspace to it.
63 //void initialize_output(xcb_connection_t *conn, Output *output, Workspace *workspace);
66 * (Re-)queries the outputs via RandR and stores them in the list of outputs.
69 void randr_query_outputs(void);
72 * Returns the first output which is active.
75 Output *get_first_output(void);
78 * Returns the output with the given name if it is active (!) or NULL.
81 Output *get_output_by_name(const char *name);
84 * Returns the active (!) output which contains the coordinates x, y or NULL
85 * if there is no output which contains these coordinates.
88 Output *get_output_containing(int x, int y);
91 * Gets the output which is the last one in the given direction, for example
92 * the output on the most bottom when direction == D_DOWN, the output most
93 * right when direction == D_RIGHT and so on.
95 * This function always returns a output.
98 Output *get_output_most(direction_t direction, Output *current);
101 * Gets the output which is the next one in the given direction.
104 Output *get_output_next(direction_t direction, Output *current, output_close_far_t close_far);