47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
#include <stdio.h>
|
|
|
|
#include <tkeyboard.h>
|
|
|
|
static void keyboard_keymap(void *data, struct wl_keyboard *keyboard, uint32_t format, int32_t fd, uint32_t size)
|
|
{
|
|
// not implemented
|
|
}
|
|
|
|
static void keyboard_enter(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys)
|
|
{
|
|
printf("keyboard_enter\n");
|
|
// not implemented
|
|
}
|
|
|
|
static void keyboard_leave(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface)
|
|
{
|
|
printf("keyboard_leave\n");
|
|
// not implemented
|
|
}
|
|
|
|
static void keyboard_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t time, uint32_t key, uint32_t state)
|
|
{
|
|
printf("keyboard_key: %d %d\n", key, state);
|
|
// not implemented
|
|
}
|
|
|
|
static void keyboard_modifiers(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group)
|
|
{
|
|
// not implemented
|
|
}
|
|
|
|
static void keyboard_repeat_info(void *data, struct wl_keyboard *keyboard, int32_t rate, int32_t delay)
|
|
{
|
|
// not implemented
|
|
}
|
|
|
|
const struct wl_keyboard_listener keyboard_listener = {
|
|
.keymap = keyboard_keymap,
|
|
.enter = keyboard_enter,
|
|
.leave = keyboard_leave,
|
|
.key = keyboard_key,
|
|
.modifiers = keyboard_modifiers,
|
|
.repeat_info = keyboard_repeat_info
|
|
};
|
|
|