2022-01-05 09:11:24 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2023-05-13 16:10:33 +03:00
|
|
|
#ifndef LABWC_ACTION_H
|
|
|
|
|
#define LABWC_ACTION_H
|
2022-01-05 09:11:24 +01:00
|
|
|
|
2022-11-22 11:59:54 -05:00
|
|
|
#include <wayland-util.h>
|
|
|
|
|
|
2022-01-05 21:27:47 +00:00
|
|
|
struct view;
|
2022-06-10 19:42:34 +02:00
|
|
|
struct server;
|
2022-01-05 21:27:47 +00:00
|
|
|
|
2022-01-05 09:11:24 +01:00
|
|
|
struct action {
|
2022-11-03 19:58:21 +00:00
|
|
|
struct wl_list link; /*
|
|
|
|
|
* struct keybinding.actions
|
|
|
|
|
* struct mousebinding.actions
|
|
|
|
|
* struct menuitem.actions
|
|
|
|
|
*/
|
2022-06-10 19:42:34 +02:00
|
|
|
|
|
|
|
|
uint32_t type; /* enum action_type */
|
|
|
|
|
struct wl_list args; /* struct action_arg.link */
|
2022-01-05 09:11:24 +01:00
|
|
|
};
|
|
|
|
|
|
2022-01-05 21:23:01 +00:00
|
|
|
struct action *action_create(const char *action_name);
|
2023-03-26 10:57:53 +01:00
|
|
|
|
2023-05-13 15:57:37 +02:00
|
|
|
bool action_is_valid(struct action *action);
|
|
|
|
|
|
2023-05-12 14:33:12 +02:00
|
|
|
void action_arg_add_str(struct action *action, const char *key, const char *value);
|
2023-03-26 10:57:53 +01:00
|
|
|
|
2022-12-10 15:28:25 +01:00
|
|
|
void action_arg_from_xml_node(struct action *action, char *nodename, char *content);
|
|
|
|
|
|
2023-03-03 18:16:46 +01:00
|
|
|
bool actions_contain_toggle_keybinds(struct wl_list *action_list);
|
|
|
|
|
|
2022-02-24 02:16:19 +01:00
|
|
|
void actions_run(struct view *activator, struct server *server,
|
2022-01-05 21:27:47 +00:00
|
|
|
struct wl_list *actions, uint32_t resize_edges);
|
2023-05-13 16:27:46 +02:00
|
|
|
|
|
|
|
|
void action_free(struct action *action);
|
2022-06-10 19:42:34 +02:00
|
|
|
void action_list_free(struct wl_list *action_list);
|
2022-01-05 21:27:47 +00:00
|
|
|
|
2023-05-13 16:10:33 +03:00
|
|
|
#endif /* LABWC_ACTION_H */
|