summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2011-11-24 21:08:22 +0000
committerRafael Antognolli <antognolli@gmail.com>2011-11-24 21:08:22 +0000
commite8060b3cd6815454daa74b43714f8bb237e8c985 (patch)
tree51bebcb3311ebe8e1e19bf60be41c14b6145e7d0 /legacy/ecore/src/lib/ecore_fb
parentf21568bcb5a4843d4fecec2737f5f3a44a32d892 (diff)
ecore/fb: Bring back the old signature of ecore_fb_input_device_open.
A previous patch had changed its signature, but since this is an EAPI, we can't break it. Now ecore_fb_input_device_window_set() was added to provide the same functionality. SVN revision: 65589
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h3
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c39
2 files changed, 39 insertions, 3 deletions
diff --git a/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h b/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
index 37b9e1e6cd..069cccdff9 100644
--- a/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
+++ b/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
@@ -70,7 +70,7 @@ EAPI void ecore_fb_callback_gain_set(void (*func) (void *da
70EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data); 70EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
71 71
72/* ecore_fb_li.c */ 72/* ecore_fb_li.c */
73EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(void *window, const char *dev); 73EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(const char *dev);
74EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev); 74EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
75EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen); 75EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen);
76EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev); 76EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
@@ -78,6 +78,7 @@ EAPI Ecore_Fb_Input_Device_Cap ecore_fb_input_device_cap_get(Ecore_Fb_Input_Devi
78EAPI void ecore_fb_input_device_axis_size_set(Ecore_Fb_Input_Device *dev, int w, int h); 78EAPI void ecore_fb_input_device_axis_size_set(Ecore_Fb_Input_Device *dev, int w, int h);
79EAPI void ecore_fb_input_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold); 79EAPI void ecore_fb_input_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold);
80EAPI double ecore_fb_input_threshold_click_get(Ecore_Fb_Input_Device *dev); 80EAPI double ecore_fb_input_threshold_click_get(Ecore_Fb_Input_Device *dev);
81EAPI void ecore_fb_input_device_window_set(Ecore_Fb_Input_Device *dev, void *window);
81 82
82/* ecore_fb.c */ 83/* ecore_fb.c */
83 84
diff --git a/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c b/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c
index 0b0900c61e..4a196dd394 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_li.c
@@ -452,6 +452,42 @@ ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen)
452#endif 452#endif
453 453
454/** 454/**
455 * @brief Associates an input device with the given @ref Ecore_Evas.
456 *
457 * @param dev The input being associated with an @ref Ecore_Evas (not @c NULL).
458 * @param window The window which this input is being associated to.
459 * @c NULL will remove any previous association.
460 *
461 * Events generated by this device will have a pointer to @p window. If this @p
462 * window is registered with ecore_event_window_register() or
463 * ecore_evas_input_event_register(), respective evas events will be delivered
464 * by the ecore_input_evas system. An example can be seen in the following code:
465 *
466 * @code
467 * Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
468 *
469 * ecore_evas_input_event_register(ee);
470 *
471 * device = ecore_fb_input_device_open(device_path);
472 * if (device)
473 * ecore_fb_input_device_window_set(device, ee);
474 *
475 * @endcode
476 *
477 * On the previous code, all input captured on the mentioned device will be
478 * delivered to the @Ecore_Evas @c ee.
479 *
480 * @since 1.1
481 */
482EAPI void
483ecore_fb_input_device_window_set(Ecore_Fb_Input_Device *dev, void *window)
484{
485 if (!dev) return;
486
487 dev->window = window;
488}
489
490/**
455 * @brief Open an input device. 491 * @brief Open an input device.
456 * 492 *
457 * @param dev The device to open. 493 * @param dev The device to open.
@@ -461,7 +497,7 @@ ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen)
461 * object for it, or returns @c NULL on failure. 497 * object for it, or returns @c NULL on failure.
462 */ 498 */
463EAPI Ecore_Fb_Input_Device * 499EAPI Ecore_Fb_Input_Device *
464ecore_fb_input_device_open(void *ee, const char *dev) 500ecore_fb_input_device_open(const char *dev)
465{ 501{
466 Ecore_Fb_Input_Device *device; 502 Ecore_Fb_Input_Device *device;
467 unsigned long event_type_bitmask[EV_CNT / 32 + 1]; 503 unsigned long event_type_bitmask[EV_CNT / 32 + 1];
@@ -525,7 +561,6 @@ ecore_fb_input_device_open(void *ee, const char *dev)
525 } 561 }
526 } 562 }
527 563
528 device->window = ee;
529 _ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device); 564 _ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device);
530 return device; 565 return device;
531 566