devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=404b3049f3339e4ea95c116312386b3d19d1c99c
commit 404b3049f3339e4ea95c116312386b3d19d1c99c Author: Chris Michael <cpmich...@osg.samsung.com> Date: Thu Apr 7 09:08:00 2016 -0400 elput: Add API function to set input window Signed-off-by: Chris Michael <cpmich...@osg.samsung.com> --- src/lib/elput/Elput.h | 24 ++++++++++++++++++++++++ src/lib/elput/elput_evdev.c | 8 ++++++++ 2 files changed, 32 insertions(+) diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h index 385ea4e..06a027d 100644 --- a/src/lib/elput/Elput.h +++ b/src/lib/elput/Elput.h @@ -105,6 +105,7 @@ EAPI extern int ELPUT_EVENT_DEVICE_CHANGE; * @li @ref Elput_Init_Group * @li @ref Elput_Manager_Group * @li @ref Elput_Input_Group + * @li @ref Elput_Device_Group * */ @@ -221,6 +222,29 @@ EAPI Eina_Bool elput_input_init(Elput_Manager *manager, const char *seat); */ EAPI void elput_input_shutdown(Elput_Manager *manager); +/** + * @defgroup Elput_Device_Group + * + * Functions that deal with input devices. + */ + +/** + * Set which window to use for this input device + * + * @brief This function should be used to specify which window to set on the + * input device. Setting a window on the input device is done so that + * when we raise events (mouse movement, keyboard key, etc) then + * this window is passed to the event structure as the window which + * the event occured on. + * + * @param device + * @param window + * + * @ingroup Elput_Device_Group + * @since 1.18 + */ +EAPI void elput_device_window_set(Elput_Device *device, unsigned int window); + # endif # undef EAPI diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 6dd4da4..4b6955d 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c @@ -1306,3 +1306,11 @@ _evdev_touch_get(Elput_Seat *seat) if (seat->count.touch) return seat->touch; return NULL; } + +EAPI void +elput_device_window_set(Elput_Device *device, unsigned int window) +{ + EINA_SAFETY_ON_NULL_RETURN(device); + + device->window = window; +} --