forked from awesomeWM/awesome
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobalconf.h
More file actions
146 lines (136 loc) · 4.28 KB
/
Copy pathglobalconf.h
File metadata and controls
146 lines (136 loc) · 4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/*
* globalconf.h - basic globalconf.header
*
* Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef AWESOME_GLOBALCONF_H
#define AWESOME_GLOBALCONF_H
#define SN_API_NOT_YET_FROZEN
#include <libsn/sn.h>
#include <ev.h>
#include <xcb/xcb_icccm.h>
#include <xcb/xcb_keysyms.h>
#include "key.h"
#include "color.h"
#include "font.h"
#include "common/xembed.h"
#include "common/buffer.h"
typedef struct wibox_t wibox_t;
typedef struct a_screen screen_t;
typedef struct button_t button_t;
typedef struct widget_t widget_t;
typedef struct client_t client_t;
typedef struct tag tag_t;
ARRAY_TYPE(button_t *, button)
ARRAY_TYPE(tag_t *, tag)
ARRAY_TYPE(screen_t, screen)
ARRAY_TYPE(client_t *, client)
ARRAY_TYPE(wibox_t *, wibox)
/** Main configuration structure */
typedef struct
{
/** Xlib Display ref [for Xcursors] */
Display * display;
/** Connection ref */
xcb_connection_t *connection;
/** Default screen number */
int default_screen;
/** Keys symbol table */
xcb_key_symbols_t *keysyms;
/** Logical screens */
screen_array_t screens;
/** True if xinerama is active */
bool xinerama_is_active;
/** Root window key bindings */
key_array_t keys;
/** Root window mouse bindings */
button_array_t buttons;
/** Modifiers masks */
uint16_t numlockmask, shiftlockmask, capslockmask, modeswitchmask;
/** Check for XTest extension */
bool have_xtest;
/** Clients list */
client_array_t clients;
/** Embedded windows */
xembed_window_array_t embedded;
/** Path to config file */
char *conffile;
/** Stack client history */
client_array_t stack;
/** Command line passed to awesome */
char *argv;
/** Lua VM state */
lua_State *L;
/** All errors messages from loading config files */
buffer_t startup_errors;
/** Default colors */
struct
{
xcolor_t fg, bg;
} colors;
/** Default font */
font_t *font;
struct
{
/** Command to execute when spawning a new client */
int manage;
/** Command to execute when unmanaging client */
int unmanage;
/** Command to execute when giving focus to a client */
int focus;
/** Command to execute when removing focus to a client */
int unfocus;
/** Command to run when mouse enter a client */
int mouse_enter;
/** Command to run when mouse leave a client */
int mouse_leave;
/** Command to run when client list changes */
int clients;
/** Command to run on numbers of tag changes */
int tags;
/** Command to run when client gets (un)tagged */
int tagged;
/** Command to run on property change */
int property;
/** Command to run on time */
int timer;
/** Command to run on awesome exit */
int exit;
} hooks;
/** The event loop */
struct ev_loop *loop;
/** The timeout after which we need to stop select() */
struct ev_timer timer;
/** The key grabber function */
int keygrabber;
/** The mouse pointer grabber function */
int mousegrabber;
/** Focused screen */
screen_t *screen_focus;
/** Need to call client_stack_refresh() */
bool client_need_stack_refresh;
/** Wiboxes */
wibox_array_t wiboxes;
/** The startup notification display struct */
SnDisplay *sndisplay;
/** Latest timestamp we got from the X server */
xcb_timestamp_t timestamp;
} awesome_t;
extern awesome_t globalconf;
#endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80