i3
i3.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 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 <config.h>
13 
14 #include <sys/time.h>
15 #include <sys/resource.h>
16 
17 #include <xcb/xcb_keysyms.h>
18 #include <xcb/xkb.h>
19 
20 #include <X11/XKBlib.h>
21 
22 #define SN_API_NOT_YET_FROZEN 1
23 #include <libsn/sn-launcher.h>
24 
25 #include "queue.h"
26 #include "data.h"
27 #include "xcb.h"
28 
30 extern const char *i3_version;
31 
35 extern struct rlimit original_rlimit_core;
37 extern bool debug_build;
39 extern int listen_fds;
40 extern int conn_screen;
49 extern xcb_window_t ewmh_window;
53 extern xcb_timestamp_t last_timestamp;
54 extern SnDisplay *sndisplay;
55 extern xcb_key_symbols_t *keysyms;
56 extern char **start_argv;
57 extern Display *xlibdpy, *xkbdpy;
58 extern int xkb_current_group;
59 extern TAILQ_HEAD(bindings_head, Binding) * bindings;
60 extern TAILQ_HEAD(autostarts_head, Autostart) autostarts;
61 extern TAILQ_HEAD(autostarts_always_head, Autostart) autostarts_always;
62 extern TAILQ_HEAD(ws_assignments_head, Workspace_Assignment) ws_assignments;
63 extern TAILQ_HEAD(assignments_head, Assignment) assignments;
64 extern SLIST_HEAD(stack_wins_head, Stack_Window) stack_wins;
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;
int conn_screen
Definition: main.c:48
Holds a command specified by either an:
Definition: data.h:338
bool only_check_config
An Assignment makes specific windows go to a specific workspace/output or run a command for that wind...
Definition: data.h:543
xcb_timestamp_t last_timestamp
The last timestamp we got from X11 (timestamps are included in some events and are used for some thin...
Definition: main.c:56
bool xkb_supported
Definition: main.c:93
xcb_window_t root
Definition: main.c:59
xcb_visualid_t visual_id
const char * i3_version
Git commit identifier, from version.c.
Definition: version.c:13
struct bindings_head * bindings
Definition: main.c:76
struct autostarts_always_head autostarts_always
Definition: main.c:82
struct assignments_head assignments
Definition: main.c:85
uint8_t root_depth
Definition: main.c:64
SLIST_HEAD(stack_wins_head, Stack_Window) stack_wins
bool debug_build
Whether this version of i3 is a debug build or a release build.
bool xcursor_supported
Definition: main.c:92
xcb_window_t ewmh_window
The EWMH support window that is used to indicate that an EWMH-compliant window manager is present...
Definition: ewmh.c:12
char ** start_argv
Definition: main.c:44
int xkb_current_group
Definition: handlers.c:22
Display * xkbdpy
Stores which workspace (by name or number) goes to which output.
Definition: data.h:198
struct ev_loop * main_loop
Definition: main.c:68
struct autostarts_head autostarts
Definition: main.c:79
Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed...
Definition: data.h:273
TAILQ_HEAD(bindings_head, Binding) *bindings
struct rlimit original_rlimit_core
The original value of RLIMIT_CORE when i3 was started.
Definition: main.c:33
xcb_key_symbols_t * keysyms
Definition: main.c:70
Display * xlibdpy
struct ws_assignments_head ws_assignments
Definition: main.c:89
int listen_fds
The number of file descriptors passed via socket activation.
Definition: main.c:36
SnDisplay * sndisplay
Definition: main.c:51
xcb_colormap_t colormap
Definition: main.c:66