Add imlibsetroot setter to awsetbg script.
[awesome.git] / globalconf.h
blob3d78cfb6bb0fc9d8e2b0653f462283dbbea0046c
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 /** Input focus information */
84 struct
86 /** Focused client */
87 client_t *client;
88 /** Is there a focus change pending? */
89 bool need_update;
90 } focus;
91 /** Drawins */
92 drawin_array_t drawins;
93 /** The startup notification display struct */
94 SnDisplay *sndisplay;
95 /** Latest timestamp we got from the X server */
96 xcb_timestamp_t timestamp;
97 /** Window that contains the systray */
98 struct
100 xcb_window_t window;
101 /** Systray window parent */
102 drawin_t *parent;
103 } systray;
104 /** The monitor of startup notifications */
105 SnMonitorContext *snmonitor;
106 /** The default visual, used to draw */
107 xcb_visualtype_t *visual;
108 /** The screen's information */
109 xcb_screen_t *screen;
110 /** A graphic context. */
111 xcb_gcontext_t gc;
112 /** Our default depth */
113 uint8_t default_depth;
114 /** Our default color map */
115 xcb_colormap_t default_cmap;
116 /** Do we have to reban clients? */
117 bool need_lazy_banning;
118 } awesome_t;
120 extern awesome_t globalconf;
122 #endif
123 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80