Merge pull request #999 from dcz-purism/virtual-keyboard

Support virtual keyboard protocol
This commit is contained in:
emersion 2018-05-29 18:22:44 +01:00 committed by GitHub
commit e1f56538a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 427 additions and 0 deletions

View file

@ -14,6 +14,7 @@
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_screenshooter.h>
#include <wlr/types/wlr_virtual_keyboard_v1.h>
#include <wlr/types/wlr_wl_shell.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
@ -51,6 +52,7 @@ struct roots_desktop {
struct wlr_input_inhibit_manager *input_inhibit;
struct wlr_linux_dmabuf *linux_dmabuf;
struct wlr_layer_shell *layer_shell;
struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard;
struct wl_listener new_output;
struct wl_listener layout_change;
@ -61,6 +63,7 @@ struct roots_desktop {
struct wl_listener decoration_new;
struct wl_listener input_inhibit_activate;
struct wl_listener input_inhibit_deactivate;
struct wl_listener virtual_keyboard_new;
#ifdef WLR_HAS_XWAYLAND
struct wlr_xwayland *xwayland;

View file

@ -0,0 +1,7 @@
#ifndef ROOTSTON_VIRTUAL_KEYBOARD_H
#define ROOTSTON_VIRTUAL_KEYBOARD_H
#include <wayland-server-core.h>
void handle_virtual_keyboard(struct wl_listener *listener, void *data);
#endif

View file

@ -0,0 +1,37 @@
#ifndef WLR_TYPES_WLR_VIRTUAL_KEYBOARD_V1_H
#define WLR_TYPES_WLR_VIRTUAL_KEYBOARD_V1_H
#include <wayland-server.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_keyboard.h>
struct wlr_virtual_keyboard_manager_v1 {
struct wl_global *global;
struct wl_list resources; // struct wl_resource*
struct wl_list virtual_keyboards; // struct wlr_virtual_keyboard_v1*
struct wl_listener display_destroy;
struct {
struct wl_signal new_virtual_keyboard; // struct wlr_virtual_keyboard_v1*
} events;
};
struct wlr_virtual_keyboard_v1 {
struct wl_resource *resource;
struct wlr_input_device input_device;
struct wlr_seat *seat;
struct wl_list link;
struct {
struct wl_signal destroy; // struct wlr_virtual_keyboard_v1*
} events;
};
struct wlr_virtual_keyboard_manager_v1* wlr_virtual_keyboard_manager_v1_create(
struct wl_display *display);
void wlr_virtual_keyboard_manager_v1_destroy(
struct wlr_virtual_keyboard_manager_v1 *manager);
#endif