wlroots/include/rootston/keyboard.h

35 lines
963 B
C
Raw Normal View History

2018-02-12 20:29:23 +00:00
#ifndef ROOTSTON_KEYBOARD_H
#define ROOTSTON_KEYBOARD_H
2017-11-03 00:13:10 +00: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 13:01:34 +00:00
struct roots_seat *seat;
2017-11-03 00:13:10 +00:00
struct wlr_input_device *device;
struct roots_keyboard_config *config;
2017-11-03 00:13:10 +00:00
struct wl_list link;
struct wl_listener device_destroy;
2017-11-03 13:01:34 +00:00
struct wl_listener keyboard_key;
struct wl_listener keyboard_modifiers;
2017-11-16 15:13:23 +00: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 00:13:10 +00:00
};
2017-11-03 10:18:20 +00:00
struct roots_keyboard *roots_keyboard_create(struct wlr_input_device *device,
struct roots_input *input);
2017-11-03 13:01:34 +00:00
2017-11-08 14:04:33 +00:00
void roots_keyboard_destroy(struct roots_keyboard *keyboard);
2017-11-03 10:18:20 +00:00
void roots_keyboard_handle_key(struct roots_keyboard *keyboard,
struct wlr_event_keyboard_key *event);
void roots_keyboard_handle_modifiers(struct roots_keyboard *r_keyboard);
2017-11-03 00:13:10 +00:00
#endif