Fix 1800 points bug and finally get beautiful support working
[awesome.git] / wibox.h
blobd736c7e9b8e5ce145c043ce1ca8d01cd05497aee
1 /*
2 * wibox.h - wibox functions 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_STATUSBAR_H
23 #define AWESOME_STATUSBAR_H
25 #include "widget.h"
26 #include "swindow.h"
27 #include "common/util.h"
28 #include "common/refcount.h"
29 #include "common/array.h"
31 void wibox_refresh(void);
33 int luaA_wibox_new(lua_State *);
34 int luaA_wibox_userdata_new(lua_State *, wibox_t *);
35 void wibox_position_update(wibox_t *);
36 wibox_t * wibox_getbywin(xcb_window_t);
37 void wibox_detach(wibox_t *);
38 void wibox_attach(wibox_t *, screen_t *);
40 static inline void
41 wibox_delete(wibox_t **wibox)
43 simplewindow_wipe(&(*wibox)->sw);
44 widget_node_list_wipe(&(*wibox)->widgets);
45 p_delete(wibox);
48 static inline void
49 wibox_moveresize(wibox_t *wibox, area_t geometry)
51 if(wibox->sw.window)
52 simplewindow_moveresize(&wibox->sw, geometry);
53 else
54 wibox->sw.geometry = geometry;
55 wibox->need_update = true;
58 DO_RCNT(wibox_t, wibox, wibox_delete)
59 ARRAY_FUNCS(wibox_t *, wibox, wibox_unref)
61 #endif
62 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80