2018-02-12 21:29:23 +01:00
|
|
|
#ifndef ROOTSTON_KEYBOARD_H
|
|
|
|
#define ROOTSTON_KEYBOARD_H
|
2017-11-03 01:13:10 +01:00
|
|
|
|
|
|
|
#include <xkbcommon/xkbcommon.h>
|
|
|
|
#include "rootston/input.h"
|
|
|
|
|
|
|
|
#define ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP 32
|
|
|
|
|
|
|
|
struct roots_keyboard {
|
|
|
|
struct roots_input *input;
|
2017-11-03 14:01:34 +01:00
|
|
|
struct roots_seat *seat;
|
2017-11-03 01:13:10 +01:00
|
|
|
struct wlr_input_device *device;
|
2017-11-11 16:59:04 +01:00
|
|
|
struct roots_keyboard_config *config;
|
2017-11-03 01:13:10 +01:00
|
|
|
struct wl_list link;
|
|
|
|
|
2018-02-12 10:36:43 +01:00
|
|
|
struct wl_listener device_destroy;
|
2017-11-03 14:01:34 +01:00
|
|
|
struct wl_listener keyboard_key;
|
|
|
|
struct wl_listener keyboard_modifiers;
|
|
|
|
|
2017-11-16 16:13:23 +01:00
|
|
|
xkb_keysym_t pressed_keysyms_translated[ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP];
|
|
|
|
xkb_keysym_t pressed_keysyms_raw[ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP];
|
2017-11-03 01:13:10 +01:00
|
|
|
};
|
|
|
|
|
2017-11-03 11:18:20 +01:00
|
|
|
struct roots_keyboard *roots_keyboard_create(struct wlr_input_device *device,
|
|
|
|
struct roots_input *input);
|
2017-11-03 14:01:34 +01:00
|
|
|
|
2017-11-08 15:04:33 +01:00
|
|
|
void roots_keyboard_destroy(struct roots_keyboard *keyboard);
|
2017-11-03 11:18:20 +01:00
|
|
|
|
|
|
|
void roots_keyboard_handle_key(struct roots_keyboard *keyboard,
|
|
|
|
struct wlr_event_keyboard_key *event);
|
|
|
|
|
2017-11-09 23:29:28 +01:00
|
|
|
void roots_keyboard_handle_modifiers(struct roots_keyboard *r_keyboard);
|
2017-11-03 01:13:10 +01:00
|
|
|
|
|
|
|
#endif
|