summaryrefslogtreecommitdiff
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
parent44f22a250e34a9d82758beeb642070cf089c09dd (diff)
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)
1620 EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, 0); 1620 EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, 0);
1621 return input->id; 1621 return input->id;
1622} 1622}
1623
1624EAPI Ecore_Wl2_Display *
1625ecore_wl2_input_display_get(const Ecore_Wl2_Input *input)
1626{
1627 EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
1628 EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, NULL);
1629 return input->display;
1630}
1631
1632EAPI struct xkb_keymap *
1633ecore_wl2_input_keymap_get(const Ecore_Wl2_Input *input)
1634{
1635 EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
1636 EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, NULL);
1637 EINA_SAFETY_ON_FALSE_RETURN_VAL(input->wl.keyboard, NULL);
1638 return input->xkb.keymap;
1639}
1640
1641EAPI Eina_Bool
1642ecore_wl2_input_keyboard_repeat_get(const Ecore_Wl2_Input *input, double *rate, double *delay)
1643{
1644 EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE);
1645 EINA_SAFETY_ON_NULL_RETURN_VAL(input->display, EINA_FALSE);
1646 EINA_SAFETY_ON_FALSE_RETURN_VAL(input->wl.keyboard, EINA_FALSE);
1647 if (rate) *rate = input->repeat.rate;
1648 if (delay) *delay = input->repeat.delay;
1649 return input->repeat.enabled;
1650}
1651
1652EAPI Eo *
1653ecore_wl2_input_seat_device_get(const Ecore_Wl2_Input *input, const Ecore_Wl2_Window *window)
1654{
1655 Ecore_Wl2_Input_Devices *devices;
1656 EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
1657 EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
1658
1659 devices = _ecore_wl2_devices_get(input, window->id);
1660 return devices ? devices->seat_dev : NULL;
1661}