2 * window.h - window object header
4 * Copyright © 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_OBJECTS_WINDOW_H
23 #define AWESOME_OBJECTS_WINDOW_H
26 #include "common/luaclass.h"
27 #include "objects/button.h"
33 WINDOW_TYPE_NORMAL
= 0,
38 /* The ones below may have TRANSIENT_FOR, but are not plain dialogs.
39 * They were purposefully placed below DIALOG.
44 /* This ones are usually set on override-redirect windows. */
45 WINDOW_TYPE_DROPDOWN_MENU
,
46 WINDOW_TYPE_POPUP_MENU
,
48 WINDOW_TYPE_NOTIFICATION
,
53 #define WINDOW_OBJECT_HEADER \
55 /** The X window number */ \
56 xcb_window_t window; \
57 /** The frame window, might be XCB_NONE */ \
58 xcb_window_t frame_window; \
63 /** Button bindings */ \
64 button_array_t buttons; \
66 color_t border_color; \
68 uint16_t border_width; \
69 /** The window type */ \
72 /** Window structure */
78 lua_class_t window_class
;
80 void window_class_setup(lua_State
*);
82 void window_set_opacity(lua_State
*, int, double);
83 void window_set_border_width(lua_State
*, int, int);
84 int luaA_window_get_type(lua_State
*, window_t
*);
85 int luaA_window_set_type(lua_State
*, window_t
*);
86 uint32_t window_translate_type(window_type_t
);
87 int window_set_xproperty(lua_State
*, xcb_window_t
, int, int);
88 int window_get_xproperty(lua_State
*, xcb_window_t
, int);
91 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80