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