Файл для обработки ввода
This commit is contained in:
10
wayland/include/input-handle.h
Normal file
10
wayland/include/input-handle.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef INPUT_HANDLE_H
|
||||
#define INPUT_HANDLE_H
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include "window.h"
|
||||
#include "input.h"
|
||||
|
||||
void keyboard_key_handle(xkb_keycode_t kc, xkb_keysym_t ks, enum keyboard_key_state state, struct wayland_window* window);
|
||||
|
||||
#endif
|
||||
@@ -8,7 +8,19 @@ void input_register_seat(struct wl_seat *seat);
|
||||
/* Очистка input (разрушить keyboard и xkb state) */
|
||||
void input_cleanup(void);
|
||||
|
||||
/* Возвращает wl_surface, имеющую фокус клавиатуры или NULL */
|
||||
struct wl_surface *input_get_keyboard_focus(void);
|
||||
enum keyboard_key_state {
|
||||
/**
|
||||
* key is not pressed
|
||||
*/
|
||||
KEYBOARD_KEY_STATE_RELEASED = 0,
|
||||
/**
|
||||
* key is pressed
|
||||
*/
|
||||
KEYBOARD_KEY_STATE_PRESSED = 1,
|
||||
/**
|
||||
* key was repeated
|
||||
*/
|
||||
KEYBOARD_KEY_STATE_REPEATED = 2,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,4 +15,7 @@ void wait_for_windows(void);
|
||||
/* Остановить оконные потоки, очистить input и закрыть соединение Wayland */
|
||||
void destroy_wayland(void);
|
||||
|
||||
/* Поиск окна по wl_surface */
|
||||
struct wayland_window* get_window_by_surface(struct wl_surface* surf);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user