Mercurial > molko
diff src/libmlk-ui/ui/button.h @ 409:6011ad866e99
ui: delete action functions
The handling of actions is done without taking care of the return value which
make it impossible to detect UI elements since it's a immediate mode like
implementation.
Users are encouraged to write code like instead:
```
if (button_handle(&b, &ev)) {
// Do something.
}
```
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 09 Sep 2022 09:27:17 +0200 |
parents | 460c78706989 |
children | 8f59201dc76b |
line wrap: on
line diff
--- a/src/libmlk-ui/ui/button.h Fri Apr 08 15:59:08 2022 +0200 +++ b/src/libmlk-ui/ui/button.h Fri Sep 09 09:27:17 2022 +0200 @@ -23,7 +23,6 @@ union event; -struct action; struct theme; enum button_state { @@ -44,7 +43,7 @@ CORE_BEGIN_DECLS -void +int button_handle(struct button *, const union event *); void @@ -56,9 +55,6 @@ void button_draw(const struct button *); -void -button_action(struct button *, struct action *); - CORE_END_DECLS #endif /* !MLK_UI_BUTTON_H */