[client/idd] input: report endpoint status

This commit is contained in:
Geoffrey McRae
2026-08-09 01:36:54 +10:00
parent 3e38c62050
commit 5b90384123
8 changed files with 607 additions and 55 deletions

View File

@@ -30,6 +30,16 @@ typedef enum LG_InputSupport
}
LG_InputSupport;
typedef struct LG_InputStatus
{
bool available;
uint32_t generation;
}
LG_InputStatus;
typedef void (*LG_InputStatusFn)(void * opaque,
const LG_InputStatus * status);
typedef struct LG_InputOps
{
const char * name;
@@ -37,6 +47,11 @@ typedef struct LG_InputOps
/* Operations must fail safely if a remote endpoint disappears. */
bool (*supports)(void * opaque, LG_InputSupport support);
/* Registration must synchronously report the current status after releasing
* any backend locks. Passing NULL unregisters the listener. */
void (*setStatusListener)(void * opaque, LG_InputStatusFn callback,
void * callbackOpaque);
/* Keyboard codes use the Linux input-event KEY_* values. */
bool (*keyDown)(void * opaque, int key);
bool (*keyUp)(void * opaque, int key);