2009-02-13 20:33:31 -05:00
|
|
|
|
/*
|
2011-03-13 19:44:16 -04:00
|
|
|
|
* vim:ts=4:sw=4:expandtab
|
2009-02-13 20:33:31 -05:00
|
|
|
|
*
|
|
|
|
|
* i3 - an improved dynamic tiling window manager
|
2015-04-03 20:17:56 -04:00
|
|
|
|
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
|
2009-02-13 20:33:31 -05:00
|
|
|
|
*
|
2011-10-25 16:19:38 -04:00
|
|
|
|
* i3.h: global variables that are used all over i3.
|
2009-02-13 20:33:31 -05:00
|
|
|
|
*
|
|
|
|
|
*/
|
2013-12-28 21:11:50 -05:00
|
|
|
|
#pragma once
|
2011-10-25 16:19:38 -04:00
|
|
|
|
|
2011-11-08 17:49:25 -05:00
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
#include <sys/resource.h>
|
|
|
|
|
|
2009-08-07 09:35:12 -04:00
|
|
|
|
#include <xcb/xcb_keysyms.h>
|
2014-01-02 02:40:03 -05:00
|
|
|
|
#include <xcb/xkb.h>
|
2009-02-13 13:04:45 -05:00
|
|
|
|
|
|
|
|
|
#include <X11/XKBlib.h>
|
|
|
|
|
|
2011-10-09 13:21:59 -04:00
|
|
|
|
#define SN_API_NOT_YET_FROZEN 1
|
|
|
|
|
#include <libsn/sn-launcher.h>
|
|
|
|
|
|
2009-02-13 13:04:45 -05:00
|
|
|
|
#include "queue.h"
|
2009-04-19 14:44:34 -04:00
|
|
|
|
#include "data.h"
|
2011-03-13 19:44:16 -04:00
|
|
|
|
#include "xcb.h"
|
2009-02-13 13:04:45 -05:00
|
|
|
|
|
2015-04-06 18:28:40 -04:00
|
|
|
|
/** Git commit identifier, from version.c */
|
|
|
|
|
extern const char *i3_version;
|
|
|
|
|
|
2011-11-08 17:49:25 -05:00
|
|
|
|
/** The original value of RLIMIT_CORE when i3 was started. We need to restore
|
|
|
|
|
* this before starting any other process, since we set RLIMIT_CORE to
|
|
|
|
|
* RLIM_INFINITY for i3 debugging versions. */
|
|
|
|
|
extern struct rlimit original_rlimit_core;
|
2011-12-10 05:51:55 -05:00
|
|
|
|
/** Whether this version of i3 is a debug build or a release build. */
|
|
|
|
|
extern bool debug_build;
|
2012-01-21 18:03:09 -05:00
|
|
|
|
/** The number of file descriptors passed via socket activation. */
|
|
|
|
|
extern int listen_fds;
|
2010-03-27 10:25:51 -04:00
|
|
|
|
extern xcb_connection_t *conn;
|
2011-10-09 13:19:31 -04:00
|
|
|
|
extern int conn_screen;
|
2011-10-09 13:21:59 -04:00
|
|
|
|
/** The last timestamp we got from X11 (timestamps are included in some events
|
|
|
|
|
* and are used for some things, like determining a unique ID in startup
|
|
|
|
|
* notification). */
|
|
|
|
|
extern xcb_timestamp_t last_timestamp;
|
|
|
|
|
extern SnDisplay *sndisplay;
|
2009-08-07 09:35:12 -04:00
|
|
|
|
extern xcb_key_symbols_t *keysyms;
|
2009-05-01 10:10:02 -04:00
|
|
|
|
extern char **start_argv;
|
2010-11-26 18:26:51 -05:00
|
|
|
|
extern Display *xlibdpy, *xkbdpy;
|
2010-03-14 17:35:51 -04:00
|
|
|
|
extern int xkb_current_group;
|
2014-06-19 05:20:32 -04:00
|
|
|
|
extern TAILQ_HEAD(bindings_head, Binding) * bindings;
|
2009-03-29 08:53:48 -04:00
|
|
|
|
extern TAILQ_HEAD(autostarts_head, Autostart) autostarts;
|
2011-07-12 06:24:01 -04:00
|
|
|
|
extern TAILQ_HEAD(autostarts_always_head, Autostart) autostarts_always;
|
2011-05-14 16:13:29 -04:00
|
|
|
|
extern TAILQ_HEAD(ws_assignments_head, Workspace_Assignment) ws_assignments;
|
2011-05-23 12:41:17 -04:00
|
|
|
|
extern TAILQ_HEAD(assignments_head, Assignment) assignments;
|
2009-02-23 18:30:04 -05:00
|
|
|
|
extern SLIST_HEAD(stack_wins_head, Stack_Window) stack_wins;
|
2011-07-23 16:29:01 -04:00
|
|
|
|
extern xcb_screen_t *root_screen;
|
2012-01-28 11:09:02 -05:00
|
|
|
|
|
|
|
|
|
/* Color depth, visual id and colormap to use when creating windows and
|
|
|
|
|
* pixmaps. Will use 32 bit depth and an appropriate visual, if available,
|
|
|
|
|
* otherwise the root window’s default (usually 24 bit TrueColor). */
|
2009-07-17 12:32:40 -04:00
|
|
|
|
extern uint8_t root_depth;
|
2012-01-28 11:09:02 -05:00
|
|
|
|
extern xcb_visualid_t visual_id;
|
|
|
|
|
extern xcb_colormap_t colormap;
|
|
|
|
|
|
2010-11-26 18:26:51 -05:00
|
|
|
|
extern bool xcursor_supported, xkb_supported;
|
2009-07-23 12:14:24 -04:00
|
|
|
|
extern xcb_window_t root;
|
2011-07-10 08:33:19 -04:00
|
|
|
|
extern struct ev_loop *main_loop;
|
2011-10-20 17:25:59 -04:00
|
|
|
|
extern bool only_check_config;
|