libeis: implement eis_device user_data getters/setters

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-08-27 11:29:34 +10:00
parent ac42578811
commit 4ae108fbff
3 changed files with 11 additions and 0 deletions

View file

@ -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)

View file

@ -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;

View file

@ -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