2017-11-03 01:13:10 +01:00
|
|
|
#ifndef _ROOTSTON_KEYBOARD_H
|
|
|
|
#define _ROOTSTON_KEYBOARD_H
|
|
|
|
|
|
|
|
#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-07 21:56:11 +01:00
|
|
|
struct keyboard_config *config;
|
2017-11-03 14:01:34 +01:00
|
|
|
struct wl_list seat_link;
|
|
|
|
// XXX temporary
|
2017-11-03 01:13:10 +01:00
|
|
|
struct wl_list link;
|
|
|
|
|
2017-11-03 14:01:34 +01:00
|
|
|
struct wl_listener keyboard_key;
|
|
|
|
struct wl_listener keyboard_modifiers;
|
|
|
|
|
2017-11-03 01:13:10 +01:00
|
|
|
xkb_keysym_t pressed_keysyms[ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP];
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
|
|
|
void roots_keyboard_destroy(struct wlr_input_device *device,
|
|
|
|
struct roots_input *input);
|
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-03 14:01:34 +01:00
|
|
|
void roots_keyboard_handle_modifiers(struct roots_keyboard *r_keyboard,
|
|
|
|
struct wlr_event_keyboard_modifiers *event);
|
2017-11-03 01:13:10 +01:00
|
|
|
|
|
|
|
#endif
|