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
30 #include <xcb/xcb_icccm.h>
31 #include <xcb/xcb_keysyms.h>
33 #include "objects/key.h"
35 #include "common/xembed.h"
36 #include "common/buffer.h"
38 #define ROOT_WINDOW_EVENT_MASK \
39 (const uint32_t []) { \
40 XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY \
41 | XCB_EVENT_MASK_ENTER_WINDOW \
42 | XCB_EVENT_MASK_LEAVE_WINDOW \
43 | XCB_EVENT_MASK_STRUCTURE_NOTIFY \
44 | XCB_EVENT_MASK_BUTTON_PRESS \
45 | XCB_EVENT_MASK_BUTTON_RELEASE \
46 | XCB_EVENT_MASK_FOCUS_CHANGE \
49 typedef struct drawin_t drawin_t
;
50 typedef struct a_screen screen_t
;
51 typedef struct button_t button_t
;
52 typedef struct widget_t widget_t
;
53 typedef struct client_t client_t
;
54 typedef struct tag tag_t
;
56 ARRAY_TYPE(button_t
*, button
)
57 ARRAY_TYPE(tag_t
*, tag
)
58 ARRAY_TYPE(screen_t
, screen
)
59 ARRAY_TYPE(client_t
*, client
)
60 ARRAY_TYPE(drawin_t
*, drawin
)
62 /** Main configuration structure */
66 xcb_connection_t
*connection
;
67 /** Default screen number */
69 /** Keys symbol table */
70 xcb_key_symbols_t
*keysyms
;
71 /** Logical screens */
72 screen_array_t screens
;
73 /** Root window key bindings */
75 /** Root window mouse bindings */
76 button_array_t buttons
;
77 /** Modifiers masks */
78 uint16_t numlockmask
, shiftlockmask
, capslockmask
, modeswitchmask
;
79 /** Bitmask for currently pressed buttons */
80 uint32_t buttons_pressed
;
81 /** Check for XTest extension */
84 client_array_t clients
;
85 /** Embedded windows */
86 xembed_window_array_t embedded
;
87 /** Stack client history */
91 /** All errors messages from loading config files */
92 buffer_t startup_errors
;
95 /** The key grabber function */
97 /** The mouse pointer grabber function */
99 /** Input focus information */
102 /** Focused client */
104 /** Is there a focus change pending? */
108 drawin_array_t drawins
;
109 /** The startup notification display struct */
110 SnDisplay
*sndisplay
;
111 /** Latest timestamp we got from the X server */
112 xcb_timestamp_t timestamp
;
113 /** Window that contains the systray */
117 /** Systray window parent */
120 /** The monitor of startup notifications */
121 SnMonitorContext
*snmonitor
;
122 /** The visual, used to draw */
123 xcb_visualtype_t
*visual
;
124 /** The screen's default visual */
125 xcb_visualtype_t
*default_visual
;
126 /** The screen's information */
127 xcb_screen_t
*screen
;
128 /** A graphic context. */
130 /** Our default depth */
131 uint8_t default_depth
;
132 /** Our default color map */
133 xcb_colormap_t default_cmap
;
134 /** Do we have to reban clients? */
135 bool need_lazy_banning
;
138 extern awesome_t globalconf
;
141 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80