fix some deprecated atom constants
[awesome.git] / wibox.h
blob4a8058fe0e3c5357af1a8a7f4f8c263a5d35a820
1 /*
2 * wibox.h - wibox functions header
4 * Copyright © 2007-2009 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_WIBOX_H
23 #define AWESOME_WIBOX_H
25 #include "widget.h"
26 #include "strut.h"
27 #include "common/luaobject.h"
29 /** Wibox types */
30 typedef enum
32 WIBOX_TYPE_NORMAL = 0,
33 WIBOX_TYPE_TITLEBAR
34 } wibox_type_t;
36 /** Wibox type */
37 struct wibox_t
39 LUA_OBJECT_HEADER
40 /** Ontop */
41 bool ontop;
42 /** Visible */
43 bool visible;
44 /** Position */
45 position_t position;
46 /** Wibox type */
47 wibox_type_t type;
48 /** Alignment */
49 alignment_t align;
50 /** Screen */
51 screen_t *screen;
52 /** Widget list */
53 widget_node_array_t widgets;
54 void *widgets_table;
55 /** Widget the mouse is over */
56 widget_t *mouse_over;
57 /** Need update */
58 bool need_update;
59 /** Need shape update */
60 bool need_shape_update;
61 /** Cursor */
62 char *cursor;
63 /** Background image */
64 image_t *bg_image;
65 /* Banned? used for titlebars */
66 bool isbanned;
67 /** Button bindings */
68 button_array_t buttons;
69 /** The window object. */
70 xcb_window_t window;
71 /** The pixmap copied to the window object. */
72 xcb_pixmap_t pixmap;
73 /** The graphic context. */
74 xcb_gcontext_t gc;
75 /** The window geometry. */
76 area_t geometry;
77 /** The window border width */
78 uint16_t border_width;
79 /** The window border color */
80 xcolor_t border_color;
81 /** Draw context */
82 draw_context_t ctx;
83 /** Orientation */
84 orientation_t orientation;
85 /** Opacity */
86 double opacity;
87 /** Strut */
88 strut_t strut;
89 /** The window's shape */
90 struct
92 /** The window's content */
93 image_t *clip;
94 /** The window's content and border */
95 image_t *bounding;
96 } shape;
97 /** Has wibox an attached systray **/
98 bool has_systray;
101 void wibox_unref_simplified(wibox_t **);
103 ARRAY_FUNCS(wibox_t *, wibox, wibox_unref_simplified)
104 void wibox_widget_node_array_wipe(lua_State *, int);
106 void wibox_refresh(void);
108 void luaA_wibox_invalidate_byitem(lua_State *, const void *);
110 wibox_t * wibox_getbywin(xcb_window_t);
112 void wibox_moveresize(lua_State *, int, area_t);
113 void wibox_refresh_pixmap_partial(wibox_t *, int16_t, int16_t, uint16_t, uint16_t);
114 void wibox_init(wibox_t *, int);
115 void wibox_wipe(wibox_t *);
116 void wibox_set_opacity(lua_State *, int, double);
117 void wibox_set_orientation(lua_State *, int, orientation_t);
119 void wibox_class_setup(lua_State *);
121 lua_class_t wibox_class;
123 void wibox_clear_mouse_over(wibox_t *);
125 #endif
126 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80