2 * structs.h - basic structs header
4 * Copyright © 2007-2008 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_STRUCTS_H
23 #define AWESOME_STRUCTS_H
25 #define SN_API_NOT_YET_FROZEN
28 #include <xcb/xcb_icccm.h>
29 #include <xcb/xcb_keysyms.h>
33 #include "common/xembed.h"
35 typedef struct wibox_t wibox_t
;
36 typedef struct a_screen screen_t
;
37 typedef struct button_t button_t
;
38 typedef struct widget_t widget_t
;
39 typedef struct widget_node_t widget_node_t
;
40 typedef struct client_t client_t
;
41 typedef struct client_node client_node_t
;
42 typedef struct tag tag_t
;
43 typedef struct tag_client_node_t tag_client_node_t
;
44 typedef struct awesome_t awesome_t
;
46 ARRAY_TYPE(widget_node_t
, widget_node
)
47 ARRAY_TYPE(button_t
*, button
)
48 ARRAY_TYPE(tag_t
*, tag
)
49 ARRAY_TYPE(screen_t
, screen
)
50 ARRAY_TYPE(client_t
*, client
)
51 ARRAY_TYPE(wibox_t
*, wibox
)
53 /** Main configuration structure */
57 xcb_connection_t
*connection
;
58 /** Event and error handlers */
59 xcb_event_handlers_t evenths
;
60 /** Property change handler */
61 xcb_property_handlers_t prophs
;
62 /** Default screen number */
64 /** Keys symbol table */
65 xcb_key_symbols_t
*keysyms
;
66 /** Logical screens */
67 screen_array_t screens
;
68 /** True if xinerama is active */
69 bool xinerama_is_active
;
70 /** Root window key bindings */
72 /** Root window mouse bindings */
73 button_array_t buttons
;
74 /** Modifiers masks */
75 uint16_t numlockmask
, shiftlockmask
, capslockmask
, modeswitchmask
;
76 /** Check for XTest extension */
79 client_array_t clients
;
80 /** Embedded windows */
81 xembed_window_array_t embedded
;
82 /** Path to config file */
84 /** Stack client history */
86 /** Command line passed to awesome */
99 /** Command to execute when spawning a new client */
101 /** Command to execute when unmanaging client */
103 /** Command to execute when giving focus to a client */
105 /** Command to execute when removing focus to a client */
107 /** Command to run when mouse enter a client */
109 /** Command to run when mouse leave a client */
111 /** Command to run when client list changes */
113 /** Command to run on numbers of tag changes */
115 /** Command to run when client gets (un)tagged */
117 /** Command to run on property change */
119 /** Command to run on time */
121 /** Command to run on awesome exit */
124 /** The event loop */
125 struct ev_loop
*loop
;
126 /** The timeout after which we need to stop select() */
127 struct ev_timer timer
;
128 /** The key grabber function */
130 /** The mouse pointer grabber function */
132 /** Focused screen */
133 screen_t
*screen_focus
;
134 /** Need to call client_stack_refresh() */
135 bool client_need_stack_refresh
;
137 wibox_array_t wiboxes
;
138 /** The startup notification display struct */
139 SnDisplay
*sndisplay
;
142 extern awesome_t globalconf
;
145 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80