]> git.sur5r.net Git - i3/i3/blob - include/i3.h
Merge pull request #1917 from Airblader/feature-1378
[i3/i3] / include / i3.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * i3.h: global variables that are used all over i3.
8  *
9  */
10 #pragma once
11
12 #include <sys/time.h>
13 #include <sys/resource.h>
14
15 #include <xcb/xcb_keysyms.h>
16 #include <xcb/xkb.h>
17
18 #include <X11/XKBlib.h>
19
20 #define SN_API_NOT_YET_FROZEN 1
21 #include <libsn/sn-launcher.h>
22
23 #include "queue.h"
24 #include "data.h"
25 #include "xcb.h"
26
27 /** Git commit identifier, from version.c */
28 extern const char *i3_version;
29
30 /** The original value of RLIMIT_CORE when i3 was started. We need to restore
31  * this before starting any other process, since we set RLIMIT_CORE to
32  * RLIM_INFINITY for i3 debugging versions. */
33 extern struct rlimit original_rlimit_core;
34 /** Whether this version of i3 is a debug build or a release build. */
35 extern bool debug_build;
36 /** The number of file descriptors passed via socket activation. */
37 extern int listen_fds;
38 extern xcb_connection_t *conn;
39 extern int conn_screen;
40 /**
41  * The EWMH support window that is used to indicate that an EWMH-compliant
42  * window manager is present. This window is created when i3 starts and
43  * kept alive until i3 exits.
44  * We also use this window as the focused window if no other window is
45  * available to be focused on the active workspace in order to prevent
46  * keyboard focus issues (see #1378).
47  */
48 extern xcb_window_t ewmh_window;
49 /** The last timestamp we got from X11 (timestamps are included in some events
50  * and are used for some things, like determining a unique ID in startup
51  * notification). */
52 extern xcb_timestamp_t last_timestamp;
53 extern SnDisplay *sndisplay;
54 extern xcb_key_symbols_t *keysyms;
55 extern char **start_argv;
56 extern Display *xlibdpy, *xkbdpy;
57 extern int xkb_current_group;
58 extern TAILQ_HEAD(bindings_head, Binding) * bindings;
59 extern TAILQ_HEAD(autostarts_head, Autostart) autostarts;
60 extern TAILQ_HEAD(autostarts_always_head, Autostart) autostarts_always;
61 extern TAILQ_HEAD(ws_assignments_head, Workspace_Assignment) ws_assignments;
62 extern TAILQ_HEAD(assignments_head, Assignment) assignments;
63 extern SLIST_HEAD(stack_wins_head, Stack_Window) stack_wins;
64 extern xcb_screen_t *root_screen;
65
66 /* Color depth, visual id and colormap to use when creating windows and
67  * pixmaps. Will use 32 bit depth and an appropriate visual, if available,
68  * otherwise the root window’s default (usually 24 bit TrueColor). */
69 extern uint8_t root_depth;
70 extern xcb_visualid_t visual_id;
71 extern xcb_colormap_t colormap;
72
73 extern bool xcursor_supported, xkb_supported;
74 extern xcb_window_t root;
75 extern struct ev_loop *main_loop;
76 extern bool only_check_config;