aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-02-02 10:12:42 -0500
committerChris Michael <cp.michael@samsung.com>2017-02-07 09:37:47 -0500
commit2519786634b2cf26cd8f132d72712dc5f7164a8a (patch)
treedf2d6b8220380cccc2cd5bb657ff0b9fce200787
parentelput: Add API function to return device capabilities (diff)
downloadefl-2519786634b2cf26cd8f132d72712dc5f7164a8a.tar.gz
elput: Add API function to set an evas device
Small API function to allow us to set an Evas_Device on an Elput_Device. This is an internal API and should not need to be used by app developers. This is part of a patch set that will allow us to send devices during events like mouse_move, mouse_down, etc. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/elput/Elput.h15
-rw-r--r--src/lib/elput/elput_input.c15
-rw-r--r--src/lib/elput/elput_private.h1
3 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index f6d95f1ded..ba362e292b 100644
--- a/src/lib/elput/Elput.h
+++ b/src/lib/elput/Elput.h
@@ -448,6 +448,21 @@ EAPI Eina_Stringshare *elput_input_device_output_name_get(Elput_Device *device);
EAPI Elput_Device_Capability elput_input_device_capabilities_get(Elput_Device *device);
/**
+ * Set the Evas_Device to use for events on a given device
+ *
+ * @param device
+ * @param evas_device
+ *
+ * @note: Do not ever use this function in applications !!!
+ * This is a special-purpose API function and should not be used by
+ * application developers.
+ *
+ * @ingroup Elput_Input_Group
+ * @since 1.19
+ */
+EAPI void elput_input_device_evas_device_set(Elput_Device *device, Eo *evas_device);
+
+/**
* Set the pointer acceleration profile
*
* @param manager
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index 2028323c0e..bb6df31d41 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -699,3 +699,18 @@ elput_input_device_capabilities_get(Elput_Device *device)
return device->caps;
}
+
+EAPI void
+elput_input_device_evas_device_set(Elput_Device *device, Eo *evas_device)
+{
+ EINA_SAFETY_ON_NULL_RETURN(device);
+
+ if (evas_device)
+ {
+ DBG("Setting Evas Device %p on %s", evas_device,
+ libinput_device_get_name(device->device));
+ device->evas_device = evas_device;
+ }
+ else
+ device->evas_device = NULL;
+}
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index a33f31bf61..43ec79843f 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -209,6 +209,7 @@ struct _Elput_Device
const char *output_name;
struct libinput_device *device;
+ Eo *evas_device;
Elput_Device_Capability caps;
Eina_Hash *key_remap_hash;