aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:32 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:25 -0400
commit7c9e3d2dbd293837d84e15317c2c081f239b38a2 (patch)
tree45540b00b9ed83ba56494279c78c8b0ee862e2b5 /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: split data offers into selection and drag (diff)
downloadefl-7c9e3d2dbd293837d84e15317c2c081f239b38a2.tar.gz
ecore-wl2: add some accessors for useful Ecore_Wl2_Input struct members
@feature
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 56b2c9b2d2..77f5c3dbea 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1620,3 +1620,42 @@ ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input)
EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, 0);
return input->id;
}
+
+EAPI Ecore_Wl2_Display *
+ecore_wl2_input_display_get(const Ecore_Wl2_Input *input)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, NULL);
+ return input->display;
+}
+
+EAPI struct xkb_keymap *
+ecore_wl2_input_keymap_get(const Ecore_Wl2_Input *input)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(input->wl.keyboard, NULL);
+ return input->xkb.keymap;
+}
+
+EAPI Eina_Bool
+ecore_wl2_input_keyboard_repeat_get(const Ecore_Wl2_Input *input, double *rate, double *delay)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(input->wl.keyboard, EINA_FALSE);
+ if (rate) *rate = input->repeat.rate;
+ if (delay) *delay = input->repeat.delay;
+ return input->repeat.enabled;
+}
+
+EAPI Eo *
+ecore_wl2_input_seat_device_get(const Ecore_Wl2_Input *input, const Ecore_Wl2_Window *window)
+{
+ Ecore_Wl2_Input_Devices *devices;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
+
+ devices = _ecore_wl2_devices_get(input, window->id);
+ return devices ? devices->seat_dev : NULL;
+}