handle button press/release
first version, to be finished
This commit is contained in:
@@ -13,6 +13,8 @@ static void default_allocate(
|
||||
static void default_add_child(
|
||||
gui *_gui, widget *_this, widget *child, int position);
|
||||
static void default_hints(gui *g, widget *this, int *width, int *height);
|
||||
static void default_button(gui *gui, widget *_this, int x, int y, int button,
|
||||
int up);
|
||||
|
||||
static void toplevel_list_append(struct gui *g, struct widget *e)
|
||||
{
|
||||
@@ -47,6 +49,7 @@ widget *new_widget(struct gui *g, enum widget_type type, int size)
|
||||
ret->add_child = default_add_child;
|
||||
ret->allocate = default_allocate;
|
||||
ret->hints = default_hints;
|
||||
ret->button = default_button;
|
||||
/* there is no default paint, on purpose */
|
||||
|
||||
ret->type = type;
|
||||
@@ -159,6 +162,12 @@ static void default_hints(gui *g, widget *this, int *width, int *height)
|
||||
*height = 1;
|
||||
}
|
||||
|
||||
static void default_button(gui *gui, widget *_this, int x, int y, int button,
|
||||
int up)
|
||||
{
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
/* utils functions */
|
||||
/*************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user