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
29 /** Bar possible position */
39 /** Rules for floating rule */
49 { ColBorder
, ColFG
, ColBG
, ColLast
};
53 { CurNormal
, CurResize
, CurMove
, CurLast
};
56 typedef struct Rule Rule
;
71 typedef struct Key Key
;
81 /** Mouse buttons bindings */
82 typedef struct Button Button
;
93 typedef struct Widget Widget
;
94 typedef struct Statusbar Statusbar
;
100 int (*draw
)(Widget
*, DrawCtx
*, int, int);
101 /** Update function */
102 void (*tell
)(Widget
*, char *);
103 /** ButtonPressedEvent handler */
104 void (*button_press
)(Widget
*, XButtonPressedEvent
*);
106 Statusbar
*statusbar
;
109 /** Misc private data */
111 /** True if user supplied coords */
112 Bool user_supplied_x
;
113 Bool user_supplied_y
;
116 /** Buttons bindings */
133 /** Statusbar name */
139 /** Layout txt width */
141 /** Default position */
153 /** Next statusbar */
158 typedef struct Client Client
;
163 /** Window geometry */
165 /** Floating window geometry */
167 /** Max window geometry */
169 int basew
, baseh
, incw
, inch
, maxw
, maxh
, minw
, minh
;
170 int minax
, maxax
, minay
, maxay
;
171 int border
, oldborder
;
172 /** Has urgency hint */
174 /** Store previous floating state before maximizing */
176 /** True if the window is floating */
178 /** True if the window is fixed */
180 /** True if the window is maximized */
182 /** True if the client must be skipped from client list */
184 /** True if the client must be skipped from task bar client list */
188 /** Window of the client */
190 /** Client logical screen */
192 /** True if the client is a new one */
196 typedef struct client_node_t client_node_t
;
204 typedef struct Tag Tag
;
211 /** True if selected */
213 /** True if was selected before selecting others tags */
215 /** Current tag layout */
217 /** Master width factor */
219 /** Number of master windows */
221 /** Number of columns in tile layout */
227 /** tag_client_node type */
228 typedef struct tag_client_node_t tag_client_node_t
;
229 struct tag_client_node_t
233 tag_client_node_t
*next
;
239 /** Padding at top */
241 /** Padding at bottom */
243 /** Padding at left */
245 /** Padding at right */
251 /** Screen geometry */
253 /** Number of pixels to snap windows */
257 /** Transparency of unfocused clients */
258 int opacity_unfocused
;
259 /** Focus move pointer */
260 Bool focus_move_pointer
;
261 /** Allow floats to be lowered on focus change */
262 Bool allow_lower_floats
;
263 /** Respect resize hints */
265 /** Sloppy focus: focus follow mouse */
267 /** Focus new clients */
269 /** True if new clients should become master */
270 Bool new_become_master
;
271 /** True if we need to arrange() */
274 XColor colors_normal
[ColLast
];
275 /** Selected colors */
276 XColor colors_selected
[ColLast
];
277 /** Urgency colors */
278 XColor colors_urgent
[ColLast
];
284 Statusbar
*statusbar
;
291 /** Main configuration structure */
292 typedef struct AwesomeConf AwesomeConf
;
297 /** Logical screens */
299 /** Number of logical screens */
303 /** Keys bindings list */
305 /** Mouse bindings list */
312 unsigned int numlockmask
;
313 /** Check for XShape extension */
315 /** Check for XRandR extension */
318 Cursor cursor
[CurLast
];
321 /** Path to config file */
323 /** Selected clients history */
324 client_node_t
*focus
;
325 /** Link between tags and clients */
326 tag_client_node_t
*tclink
;
327 /** Command line passed to awesome */
329 /** EventMask to drop before each XEvent treatement */
334 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80