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
;
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 /** Number of pixels to snap windows */
253 /** Transparency of unfocused clients */
254 int opacity_unfocused
;
255 /** Focus move pointer */
256 Bool focus_move_pointer
;
257 /** Allow floats to be lowered on focus change */
258 Bool allow_lower_floats
;
259 /** Respect resize hints */
261 /** Sloppy focus: focus follow mouse */
263 /** Focus new clients */
265 /** True if new clients should become master */
266 Bool new_become_master
;
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 */
326 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80