mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 08:41:31 +00:00
[client/idd] input: report endpoint status
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user