change codename
[awesome.git] / globalconf.h
blobf68098b6923c164fb1e817c5189b10b1f04a101e
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 "key.h"
34 #include "color.h"
35 #include "font.h"
36 #include "common/xembed.h"
37 #include "common/buffer.h"
39 typedef struct wibox_t wibox_t;
40 typedef struct a_screen screen_t;
41 typedef struct button_t button_t;
42 typedef struct widget_t widget_t;
43 typedef struct client_t client_t;
44 typedef struct tag tag_t;
46 ARRAY_TYPE(button_t *, button)
47 ARRAY_TYPE(tag_t *, tag)
48 ARRAY_TYPE(screen_t, screen)
49 ARRAY_TYPE(client_t *, client)
50 ARRAY_TYPE(wibox_t *, wibox)
52 /** Main configuration structure */
53 typedef struct
55 /** Connection ref */
56 xcb_connection_t *connection;
57 /** Default screen number */
58 int default_screen;
59 /** Keys symbol table */
60 xcb_key_symbols_t *keysyms;
61 /** Logical screens */
62 screen_array_t screens;
63 /** True if xinerama is active */
64 bool xinerama_is_active;
65 /** Root window key bindings */
66 key_array_t keys;
67 /** Root window mouse bindings */
68 button_array_t buttons;
69 /** Modifiers masks */
70 uint16_t numlockmask, shiftlockmask, capslockmask, modeswitchmask;
71 /** Check for XTest extension */
72 bool have_xtest;
73 /** Clients list */
74 client_array_t clients;
75 /** Embedded windows */
76 xembed_window_array_t embedded;
77 /** Path to config file */
78 char *conffile;
79 /** Stack client history */
80 client_array_t stack;
81 /** Command line passed to awesome */
82 char *argv;
83 /** Lua VM state */
84 lua_State *L;
85 /** All errors messages from loading config files */
86 buffer_t startup_errors;
87 /** Default colors */
88 struct
90 xcolor_t fg, bg;
91 } colors;
92 /** Default font */
93 font_t *font;
94 struct
96 /** Command to execute when spawning a new client */
97 int manage;
98 /** Command to execute when unmanaging client */
99 int unmanage;
100 /** Command to execute when giving focus to a client */
101 int focus;
102 /** Command to execute when removing focus to a client */
103 int unfocus;
104 /** Command to run when mouse enter a client */
105 int mouse_enter;
106 /** Command to run when mouse leave a client */
107 int mouse_leave;
108 /** Command to run when client list changes */
109 int clients;
110 /** Command to run on numbers of tag changes */
111 int tags;
112 /** Command to run when client gets (un)tagged */
113 int tagged;
114 /** Command to run on property change */
115 int property;
116 /** Command to run on time */
117 int timer;
118 /** Command to run on awesome exit */
119 int exit;
120 } hooks;
121 /** The event loop */
122 struct ev_loop *loop;
123 /** The timeout after which we need to stop select() */
124 struct ev_timer timer;
125 /** The key grabber function */
126 int keygrabber;
127 /** The mouse pointer grabber function */
128 int mousegrabber;
129 /** Focused screen */
130 screen_t *screen_focus;
131 /** Need to call client_stack_refresh() */
132 bool client_need_stack_refresh;
133 /** Wiboxes */
134 wibox_array_t wiboxes;
135 /** The startup notification display struct */
136 SnDisplay *sndisplay;
137 /** Latest timestamp we got from the X server */
138 xcb_timestamp_t timestamp;
139 } awesome_t;
141 extern awesome_t globalconf;
143 #endif
144 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80