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
27 #include "common/draw.h"
28 #include "common/swindow.h"
30 /** Bar possible position */
40 /** Rules for floating rule */
50 { ColBorder
, ColFG
, ColBG
, ColLast
};
54 { CurNormal
, CurResize
, CurMove
, CurLast
};
57 typedef struct Rule Rule
;
73 typedef struct Key Key
;
83 /** Mouse buttons bindings */
84 typedef struct Button Button
;
95 typedef struct Widget Widget
;
96 typedef struct Statusbar Statusbar
;
102 int (*draw
)(Widget
*, DrawCtx
*, int, int);
103 /** Update function */
104 void (*tell
)(Widget
*, char *);
105 /** ButtonPressedEvent handler */
106 void (*button_press
)(Widget
*, XButtonPressedEvent
*);
108 Statusbar
*statusbar
;
111 /** Misc private data */
113 /** True if user supplied coords */
114 Bool user_supplied_x
;
115 Bool user_supplied_y
;
118 /** Buttons bindings */
137 /** Statusbar name */
143 /** Default position */
151 /** Next statusbar */
156 typedef struct Client Client
;
161 /** Window geometry */
163 /** Floating window geometry */
165 /** Max window geometry */
167 int basew
, baseh
, incw
, inch
, maxw
, maxh
, minw
, minh
;
168 int minax
, maxax
, minay
, maxay
;
169 int border
, oldborder
;
170 /** Has urgency hint */
172 /** Store previous floating state before maximizing */
174 /** True if the window is floating */
176 /** True if the window is fixed */
178 /** True if the window is maximized */
180 /** True if the client must be skipped from client list */
182 /** True if the client must be skipped from task bar client list */
186 /** Window of the client */
188 /** Client logical screen */
190 /** True if the client is a new one */
194 typedef struct client_node_t client_node_t
;
202 typedef struct Tag Tag
;
209 /** True if selected */
211 /** True if was selected before selecting others tags */
213 /** Current tag layout */
215 /** Master width factor */
217 /** Number of master windows */
219 /** Number of columns in tile layout */
225 /** tag_client_node type */
226 typedef struct tag_client_node_t tag_client_node_t
;
227 struct tag_client_node_t
231 tag_client_node_t
*next
;
237 /** Padding at top */
239 /** Padding at bottom */
241 /** Padding at left */
243 /** Padding at right */
249 /** Screen geometry */
251 /** Number of pixels to snap windows */
255 /** Respect resize hints */
257 /** Sloppy focus: focus follow mouse */
259 /** True if we should raise windows on focus */
260 Bool sloppy_focus_raise
;
261 /** Focus new clients */
263 /** True if new clients should become master */
264 Bool new_become_master
;
265 /** True if we need to arrange() */
268 XColor colors_normal
[ColLast
];
269 /** Selected colors */
270 XColor colors_selected
[ColLast
];
271 /** Urgency colors */
272 XColor colors_urgent
[ColLast
];
278 Statusbar
*statusbar
;
285 /** Main configuration structure */
286 typedef struct AwesomeConf AwesomeConf
;
291 /** Logical screens */
293 /** Number of logical screens */
297 /** Keys bindings list */
299 /** Mouse bindings list */
306 unsigned int numlockmask
;
307 /** Check for XShape extension */
309 /** Check for XRandR extension */
312 Cursor cursor
[CurLast
];
315 /** Path to config file */
317 /** Selected clients history */
318 client_node_t
*focus
;
319 /** Link between tags and clients */
320 tag_client_node_t
*tclink
;
321 /** Command line passed to awesome */
323 /** EventMask to drop before each XEvent treatement */
328 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80