src/action.c: Convert action->arg to a list of action_arg

In preperation for Actions that require multiple arguments
This commit is contained in:
Consolatis 2022-06-10 19:42:34 +02:00 committed by Johan Malm
parent baaee26937
commit 9b49f19a73
8 changed files with 142 additions and 61 deletions

View file

@ -2,19 +2,23 @@
#ifndef __LABWC_ACTION_H
#define __LABWC_ACTION_H
struct server;
struct view;
struct server;
struct wl_list;
struct action {
uint32_t type;
char *arg;
struct wl_list link;
struct wl_list link; /* struct keybinding.actions,
* struct mousebinding.actions,
* struct menuitem.actions */
uint32_t type; /* enum action_type */
struct wl_list args; /* struct action_arg.link */
};
struct action *action_create(const char *action_name);
void action_list_free(struct wl_list *action_list);
void action_arg_add_str(struct action *action, char *key, const char *value);
void actions_run(struct view *activator, struct server *server,
struct wl_list *actions, uint32_t resize_edges);
void action_list_free(struct wl_list *action_list);
#endif
#endif /* __LABWC_ACTION_H */