summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-04-07 09:08:00 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-04-13 14:16:17 -0400
commit404b3049f3339e4ea95c116312386b3d19d1c99c (patch)
tree9425474f235c9110b16ee7c7b6833512b9c8e7a5
parent6c85fe751488c344f1c0cff8e9f3dd013bf5f66d (diff)
elput: Add API function to set input window
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/elput/Elput.h24
-rw-r--r--src/lib/elput/elput_evdev.c8
2 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index 385ea4eb24..06a027d68c 100644
--- a/src/lib/elput/Elput.h
+++ b/src/lib/elput/Elput.h
@@ -105,6 +105,7 @@ EAPI extern int ELPUT_EVENT_DEVICE_CHANGE;
105 * @li @ref Elput_Init_Group 105 * @li @ref Elput_Init_Group
106 * @li @ref Elput_Manager_Group 106 * @li @ref Elput_Manager_Group
107 * @li @ref Elput_Input_Group 107 * @li @ref Elput_Input_Group
108 * @li @ref Elput_Device_Group
108 * 109 *
109 */ 110 */
110 111
@@ -221,6 +222,29 @@ EAPI Eina_Bool elput_input_init(Elput_Manager *manager, const char *seat);
221 */ 222 */
222EAPI void elput_input_shutdown(Elput_Manager *manager); 223EAPI void elput_input_shutdown(Elput_Manager *manager);
223 224
225/**
226 * @defgroup Elput_Device_Group
227 *
228 * Functions that deal with input devices.
229 */
230
231/**
232 * Set which window to use for this input device
233 *
234 * @brief This function should be used to specify which window to set on the
235 * input device. Setting a window on the input device is done so that
236 * when we raise events (mouse movement, keyboard key, etc) then
237 * this window is passed to the event structure as the window which
238 * the event occured on.
239 *
240 * @param device
241 * @param window
242 *
243 * @ingroup Elput_Device_Group
244 * @since 1.18
245 */
246EAPI void elput_device_window_set(Elput_Device *device, unsigned int window);
247
224# endif 248# endif
225 249
226# undef EAPI 250# undef EAPI
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 6dd4da4103..4b6955d103 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)
1306 if (seat->count.touch) return seat->touch; 1306 if (seat->count.touch) return seat->touch;
1307 return NULL; 1307 return NULL;
1308} 1308}
1309
1310EAPI void
1311elput_device_window_set(Elput_Device *device, unsigned int window)
1312{
1313 EINA_SAFETY_ON_NULL_RETURN(device);
1314
1315 device->window = window;
1316}