backend: Add input capture getter

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2628>
This commit is contained in:
Jonas Ådahl 2022-04-13 11:39:56 +02:00 committed by Carlos Garnacho
parent f9b18d90c6
commit 3bd401f33a
3 changed files with 13 additions and 0 deletions

View File

@ -149,6 +149,8 @@ MetaRemoteDesktop * meta_backend_get_remote_desktop (MetaBackend *backend);
MetaScreenCast * meta_backend_get_screen_cast (MetaBackend *backend);
#endif
MetaInputCapture * meta_backend_get_input_capture (MetaBackend *backend);
gboolean meta_backend_grab_device (MetaBackend *backend,
int device_id,
uint32_t timestamp);

View File

@ -92,4 +92,7 @@ typedef struct _MetaGammaLut
size_t size;
} MetaGammaLut;
typedef struct _MetaInputCapture MetaInputCapture;
typedef struct _MetaInputCaptureSession MetaInputCaptureSession;
#endif /* META_BACKEND_TYPE_H */

View File

@ -1442,6 +1442,14 @@ meta_backend_get_screen_cast (MetaBackend *backend)
}
#endif /* HAVE_REMOTE_DESKTOP */
MetaInputCapture *
meta_backend_get_input_capture (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->input_capture;
}
/**
* meta_backend_get_remote_access_controller:
* @backend: A #MetaBackend