labwc/include/config/keybind.h

32 lines
744 B
C
Raw Normal View History

2021-11-13 21:56:53 +00:00
/* SPDX-License-Identifier: GPL-2.0-only */
2020-08-03 20:56:38 +01:00
#ifndef __LABWC_KEYBIND_H
#define __LABWC_KEYBIND_H
#include <wlr/types/wlr_keyboard.h>
#include <xkbcommon/xkbcommon.h>
#define MAX_KEYSYMS 32
2020-08-03 20:56:38 +01:00
struct keybind {
uint32_t modifiers;
xkb_keysym_t *keysyms;
size_t keysyms_len;
struct wl_list actions;
2020-08-03 20:56:38 +01:00
struct wl_list link;
};
2020-08-07 20:21:14 +01:00
/**
2020-09-02 21:05:28 +01:00
* keybind_create - parse keybind and add to linked list
2020-08-07 20:21:14 +01:00
* @keybind: key combination
*/
2020-09-02 21:05:28 +01:00
struct keybind *keybind_create(const char *keybind);
2020-08-03 20:56:38 +01:00
2021-12-01 02:28:41 +00:00
/**
* parse_modifier - parse a string containing a single modifier name (e.g. "S")
* into the represented modifier value. returns 0 for invalid modifier names.
* @symname: modifier name
*/
uint32_t parse_modifier(const char *symname);
2020-08-03 20:56:38 +01:00
#endif /* __LABWC_KEYBIND_H */