feat: support input method

The ime.c is basically derived from sway's text_input.c.
This commit is contained in:
chirsz-ever 2025-03-10 04:26:38 +08:00
parent 360e259ca5
commit d2316a3407
No known key found for this signature in database
GPG key ID: FF0569CF49B33CE3
9 changed files with 960 additions and 19 deletions

5
seat.h
View file

@ -8,6 +8,7 @@
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include "ime.h"
#include "server.h"
#include "view.h"
@ -48,11 +49,15 @@ struct cg_seat {
struct wl_listener request_set_cursor;
struct wl_listener request_set_selection;
struct wl_listener request_set_primary_selection;
struct cg_ime_relay ime_relay;
};
struct cg_keyboard_group {
struct wlr_keyboard_group *wlr_group;
struct cg_seat *seat;
// only useful for virtual keyboards
struct wlr_keyboard *original_keyboard;
struct wl_listener key;
struct wl_listener modifiers;
struct wl_list link; // cg_seat::keyboard_groups