mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 00:31:31 +00:00
[client] input: abstract guest input backends
Introduce LG_InputOps and route keyboard and mouse input through the active video transport when it provides an input backend. Keep SPICE as the fallback and force it while the SPICE display is active. Add atomic shared/exclusive locking for safe backend changes.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "common/framebuffer.h"
|
||||
#include "common/types.h"
|
||||
#include "interface/input.h"
|
||||
|
||||
#define LG_TRANSPORT_MAX_DAMAGE_RECTS LG_MAX_FRAME_DAMAGE_RECTS
|
||||
|
||||
@@ -244,6 +245,10 @@ typedef struct LG_TransportOps
|
||||
void (*disconnect)(LG_Transport * transport);
|
||||
bool (*sessionValid)(LG_Transport * transport);
|
||||
bool (*supportsDMA)(LG_Transport * transport);
|
||||
/* Queried after connect. The returned operations and opaque value remain
|
||||
* valid until disconnect; NULL indicates that this session has no input. */
|
||||
const LG_InputOps *(*getInputOps)(LG_Transport * transport,
|
||||
void ** opaque);
|
||||
bool (*attachRenderer)(LG_Transport * transport,
|
||||
const LG_RendererInterop * interop);
|
||||
void (*detachRenderer)(LG_Transport * transport);
|
||||
|
||||
Reference in New Issue
Block a user