labwc/include/action.h
Consolatis c33a404dc1 Add ToggleKeybinds action
This can be used to better control Virtual Machines, VNC clients, nested
compositors or similar. All keybinds other than ToggleKeybinds itself are
disabled when first called, a 2nd call will restore handling of all keybinds.

Fixes #738
Fixes #810
2023-03-04 13:24:59 +00:00

31 lines
902 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __LABWC_ACTION_H
#define __LABWC_ACTION_H
#include <wayland-util.h>
struct view;
struct server;
struct action {
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_arg_add_str(struct action *action, char *key, const char *value);
void action_arg_from_xml_node(struct action *action, char *nodename, char *content);
bool actions_contain_toggle_keybinds(struct wl_list *action_list);
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 /* __LABWC_ACTION_H */