mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-30 10:40:09 +01:00
libeis: implement eis_device user_data getters/setters
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ac42578811
commit
4ae108fbff
3 changed files with 11 additions and 0 deletions
|
|
@ -44,6 +44,10 @@ OBJECT_IMPLEMENT_UNREF(eis_device);
|
|||
OBJECT_IMPLEMENT_CREATE(eis_device);
|
||||
static
|
||||
OBJECT_IMPLEMENT_PARENT(eis_device, eis_client);
|
||||
_public_
|
||||
OBJECT_IMPLEMENT_GETTER(eis_device, user_data, void *);
|
||||
_public_
|
||||
OBJECT_IMPLEMENT_SETTER(eis_device, user_data, void *);
|
||||
|
||||
_public_ struct eis_client *
|
||||
eis_device_get_client(struct eis_device *device)
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ struct eis_device {
|
|||
uint32_t id;
|
||||
enum eis_device_state state;
|
||||
uint32_t capabilities;
|
||||
void *user_data;
|
||||
|
||||
struct {
|
||||
struct dimensions dim;
|
||||
|
|
|
|||
|
|
@ -286,6 +286,12 @@ eis_device_ref(struct eis_device *device);
|
|||
struct eis_device *
|
||||
eis_device_unref(struct eis_device *device);
|
||||
|
||||
void *
|
||||
eis_device_get_user_data(struct eis_device *eis_device);
|
||||
|
||||
void
|
||||
eis_device_set_user_data(struct eis_device *eis_device, void *user_data);
|
||||
|
||||
/**
|
||||
* Return the name of the device. The return value of this function may change after
|
||||
* eis_device_set_name(), a caller should keep a copy of it where required rather than the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue