32 lines
651 B
C
32 lines
651 B
C
#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
|