2 * widget.h - widget managing header
4 * Copyright (C) 2010 Mason Larobina <mason.larobina@gmail.com>
5 * Copyright (C) 2007-2009 Julien Danjou <julien@danjou.info>
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef LUAKIT_WIDGET_H
23 #define LUAKIT_WIDGET_H
25 typedef struct widget_t widget_t
;
29 #include "common/util.h"
30 #include "common/luaclass.h"
31 #include "common/luaobject.h"
34 typedef widget_t
*(widget_constructor_t
)(widget_t
*);
35 typedef void (widget_destructor_t
)(widget_t
*);
37 widget_constructor_t widget_entry
;
38 widget_constructor_t widget_eventbox
;
39 widget_constructor_t widget_hbox
;
40 widget_constructor_t widget_label
;
41 widget_constructor_t widget_notebook
;
42 widget_constructor_t widget_textbutton
;
43 widget_constructor_t widget_vbox
;
44 widget_constructor_t widget_webview
;
45 widget_constructor_t widget_window
;
47 typedef const struct {
50 widget_constructor_t
*wc
;
57 /* Widget type information */
59 /* Widget destructor */
60 widget_destructor_t
*destructor
;
62 gint (*index
)(lua_State
*, luakit_token_t
);
63 /* Newindex function */
64 gint (*newindex
)(lua_State
*, luakit_token_t
);
69 /* Misc private data */
73 lua_class_t widget_class
;
74 void widget_class_setup(lua_State
*);
78 // vim: ft=c:et:sw=4:ts=8:sts=4:tw=80