move keyboard to seat

This commit is contained in:
Tony Crisci 2017-11-03 09:01:34 -04:00
parent 9bd0f47efd
commit 5354fe8729
13 changed files with 176 additions and 43 deletions

View file

@ -67,6 +67,7 @@ struct roots_input {
struct wl_list pointers;
struct wl_list touch;
struct wl_list tablet_tools;
struct wl_list seats;
struct wl_listener input_add;
struct wl_listener input_remove;

View file

@ -8,21 +8,28 @@
struct roots_keyboard {
struct roots_input *input;
struct roots_seat *seat;
struct wlr_input_device *device;
struct wl_listener key;
struct wl_listener modifiers;
struct wl_list seat_link;
// XXX temporary
struct wl_list link;
struct wl_listener keyboard_key;
struct wl_listener keyboard_modifiers;
xkb_keysym_t pressed_keysyms[ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP];
};
struct roots_keyboard *roots_keyboard_create(struct wlr_input_device *device,
struct roots_input *input);
void roots_keyboard_destroy(struct wlr_input_device *device, struct roots_input *input);
void roots_keyboard_destroy(struct wlr_input_device *device,
struct roots_input *input);
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);
void roots_keyboard_handle_modifiers(struct roots_keyboard *r_keyboard,
struct wlr_event_keyboard_modifiers *event);
#endif

26
include/rootston/seat.h Normal file
View file

@ -0,0 +1,26 @@
#ifndef _ROOTSTON_SEAT_H
#define _ROOTSTON_SEAT_H
#include <wayland-server.h>
#include "rootston/input.h"
#include "rootston/keyboard.h"
struct roots_seat {
struct roots_input *input;
struct wlr_seat *seat;
struct wl_list keyboards;
struct wl_list link;
};
struct roots_seat *roots_seat_create(struct roots_input *input, char *name);
void roots_seat_destroy(struct roots_seat *seat);
void roots_seat_add_keyboard(struct roots_seat *seat,
struct roots_keyboard *keyboard);
void roots_seat_remove_keyboard(struct roots_seat *seat,
struct roots_keyboard *keyboard);
#endif