fix: repair Wayland key lifecycle
This commit is contained in:
31
wayland_state.h
Normal file
31
wayland_state.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef WAYLAND_STATE_H
|
||||
#define WAYLAND_STATE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum {
|
||||
/* Wayland key codes are Linux input-event codes. */
|
||||
Wlkeymax = 0x300,
|
||||
};
|
||||
|
||||
typedef struct Wlstate Wlstate;
|
||||
struct Wlstate
|
||||
{
|
||||
unsigned char down[Wlkeymax];
|
||||
uint32_t repeatkey;
|
||||
uint64_t repeatat;
|
||||
int rate;
|
||||
int delay;
|
||||
int repeating;
|
||||
};
|
||||
|
||||
void wlstateinit(Wlstate*);
|
||||
int wlstatepress(Wlstate*, uint32_t, int, int, uint64_t);
|
||||
int wlstaterelease(Wlstate*, uint32_t);
|
||||
void wlstaterepeatinfo(Wlstate*, int, int);
|
||||
void wlstatecancelrepeat(Wlstate*);
|
||||
void wlstateclear(Wlstate*);
|
||||
int wlstatetimeout(Wlstate*, uint64_t);
|
||||
int wlstaterepeat(Wlstate*, uint64_t, uint32_t*);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user