margin: Accept individual margins
[awesome.git] / globalconf.h
blobcd993f449bf4fcf1281bab8b99613184454f272c
1 /*
2 * globalconf.h - basic globalconf.header
4 * Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef AWESOME_GLOBALCONF_H
23 #define AWESOME_GLOBALCONF_H
25 #define SN_API_NOT_YET_FROZEN
26 #include <libsn/sn.h>
28 #include <ev.h>
30 #include <xcb/xcb_icccm.h>
31 #include <xcb/xcb_keysyms.h>
33 #include "objects/key.h"
34 #include "color.h"
35 #include "common/xembed.h"
37 typedef struct drawin_t drawin_t;
38 typedef struct a_screen screen_t;
39 typedef struct button_t button_t;
40 typedef struct widget_t widget_t;
41 typedef struct client_t client_t;
42 typedef struct tag tag_t;
44 ARRAY_TYPE(button_t *, button)
45 ARRAY_TYPE(tag_t *, tag)
46 ARRAY_TYPE(screen_t, screen)
47 ARRAY_TYPE(client_t *, client)
48 ARRAY_TYPE(drawin_t *, drawin)
50 /** Main configuration structure */
51 typedef struct
53 /** Connection ref */
54 xcb_connection_t *connection;
55 /** Default screen number */
56 int default_screen;
57 /** Keys symbol table */
58 xcb_key_symbols_t *keysyms;
59 /** Logical screens */
60 screen_array_t screens;
61 /** Root window key bindings */
62 key_array_t keys;
63 /** Root window mouse bindings */
64 button_array_t buttons;
65 /** Modifiers masks */
66 uint16_t numlockmask, shiftlockmask, capslockmask, modeswitchmask;
67 /** Check for XTest extension */
68 bool have_xtest;
69 /** Clients list */
70 client_array_t clients;
71 /** Embedded windows */
72 xembed_window_array_t embedded;
73 /** Stack client history */
74 client_array_t stack;
75 /** Lua VM state */
76 lua_State *L;
77 /** The event loop */
78 struct ev_loop *loop;
79 /** The key grabber function */
80 int keygrabber;
81 /** The mouse pointer grabber function */
82 int mousegrabber;
83 /** Previously focused client */
84 client_t *prev_client_focus;
85 /** Focused client */
86 client_t *client_focus;
87 /** Drawins */
88 drawin_array_t drawins;
89 /** The startup notification display struct */
90 SnDisplay *sndisplay;
91 /** Latest timestamp we got from the X server */
92 xcb_timestamp_t timestamp;
93 /** Window that contains the systray */
94 struct
96 xcb_window_t window;
97 /** Systray window parent */
98 drawin_t *parent;
99 } systray;
100 /** The monitor of startup notifications */
101 SnMonitorContext *snmonitor;
102 /** The default visual, used to draw */
103 xcb_visualtype_t *visual;
104 /** The screen's information */
105 xcb_screen_t *screen;
106 /** A graphic context. */
107 xcb_gcontext_t gc;
108 /** Our default depth */
109 uint8_t default_depth;
110 /** Our default color map */
111 xcb_colormap_t default_cmap;
112 } awesome_t;
114 extern awesome_t globalconf;
116 #endif
117 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80