4 * i3 - an improved dynamic tiling window manager
6 * © 2009-2010 Michael Stapelberg and contributors
8 * See file LICENSE for license information.
12 #include <xcb/randr.h>
17 TAILQ_HEAD(outputs_head, xoutput);
18 extern struct outputs_head outputs;
21 * We have just established a connection to the X server and need the initial
22 * XRandR information to setup workspaces for each screen.
25 void randr_init(int *event_base);
28 * Disables RandR support by creating exactly one output with the size of the
32 void disable_randr(xcb_connection_t *conn);
35 * Initializes a CT_OUTPUT Con (searches existing ones from inplace restart
36 * before) to use for the given Output.
38 * XXX: for assignments, we probably need to move workspace creation from here
39 * to after the loop in randr_query_outputs().
42 void output_init_con(Output *output);
45 * Initializes the specified output, assigning the specified workspace to it.
48 //void initialize_output(xcb_connection_t *conn, Output *output, Workspace *workspace);
51 * (Re-)queries the outputs via RandR and stores them in the list of outputs.
54 void randr_query_outputs();
57 * Returns the first output which is active.
60 Output *get_first_output();
63 * Returns the output with the given name if it is active (!) or NULL.
66 Output *get_output_by_name(const char *name);
69 * Returns the active (!) output which contains the coordinates x, y or NULL
70 * if there is no output which contains these coordinates.
73 Output *get_output_containing(int x, int y);
76 * Gets the output which is the last one in the given direction, for example
77 * the output on the most bottom when direction == D_DOWN, the output most
78 * right when direction == D_RIGHT and so on.
80 * This function always returns a output.
83 Output *get_output_most(direction_t direction, Output *current);