2019-03-16 15:31:58 +00:00
|
|
|
/* Copyright (c), Charlotte Meyer <dev@buffet.sh>
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KIWMI_INPUT_KEYBOARD_H
|
|
|
|
#define KIWMI_INPUT_KEYBOARD_H
|
|
|
|
|
|
|
|
#include <wayland-server.h>
|
2020-01-04 23:22:45 +00:00
|
|
|
#include <xkbcommon/xkbcommon.h>
|
2019-03-16 15:31:58 +00:00
|
|
|
|
|
|
|
struct kiwmi_keyboard {
|
|
|
|
struct wl_list link;
|
|
|
|
struct kiwmi_server *server;
|
|
|
|
struct wlr_input_device *device;
|
|
|
|
struct wl_listener modifiers;
|
|
|
|
struct wl_listener key;
|
2020-01-04 23:22:45 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal key_down;
|
|
|
|
struct wl_signal key_up;
|
|
|
|
} events;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kiwmi_keyboard_key_event {
|
|
|
|
const xkb_keysym_t *syms;
|
|
|
|
int nsyms;
|
|
|
|
struct kiwmi_keyboard *keyboard;
|
|
|
|
bool handled;
|
2019-03-16 15:31:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct kiwmi_keyboard *
|
|
|
|
keyboard_create(struct kiwmi_server *server, struct wlr_input_device *device);
|
|
|
|
|
|
|
|
#endif /* KIWMI_INPUT_KEYBOARD_H */
|