summaryrefslogtreecommitdiff
path: root/src/lib/ecore_input_evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-05-11 13:01:54 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-05-31 19:03:04 +0900
commitbd70604ee83904fde17c6ac26cae67bc4e4bd6ac (patch)
tree3a9fd60b5e9650a6ba31c13bf2e7b641868bf0bd /src/lib/ecore_input_evas
parentea8c6e5632beb4c5cf1e445473ca85b0135a4aa9 (diff)
ecore_evas: Add private direct callback for ecore
All ecore_input_evas events should be passed through ecore_evas in order to avoid any information loss between ecore and evas. This is a private API.
Diffstat (limited to 'src/lib/ecore_input_evas')
-rw-r--r--src/lib/ecore_input_evas/Ecore_Input_Evas.h5
-rw-r--r--src/lib/ecore_input_evas/ecore_input_evas.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/ecore_input_evas/Ecore_Input_Evas.h b/src/lib/ecore_input_evas/Ecore_Input_Evas.h
index db4029f58c..c9b0c053fd 100644
--- a/src/lib/ecore_input_evas/Ecore_Input_Evas.h
+++ b/src/lib/ecore_input_evas/Ecore_Input_Evas.h
@@ -59,6 +59,11 @@ EAPI void ecore_event_window_ignore_events(Ecore_Window id, int ignore_even
59 59
60EAPI void ecore_event_evas_modifier_lock_update(Evas *e, unsigned int modifiers); 60EAPI void ecore_event_evas_modifier_lock_update(Evas *e, unsigned int modifiers);
61 61
62#ifdef ECORE_EVAS_INTERNAL
63typedef Eina_Bool (*Ecore_Event_Direct_Input_Cb)(void *window, int type, const void *info);
64EAPI void _ecore_event_window_direct_cb_set(Ecore_Window id, Ecore_Event_Direct_Input_Cb fptr);
65#endif
66
62#ifdef __cplusplus 67#ifdef __cplusplus
63} 68}
64#endif 69#endif
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index bea13cb2ea..daed66a0d7 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -2,6 +2,8 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#define ECORE_EVAS_INTERNAL
6
5#include <string.h> 7#include <string.h>
6#include <stdlib.h> 8#include <stdlib.h>
7 9
@@ -22,6 +24,7 @@ struct _Ecore_Input_Window
22 Ecore_Event_Multi_Move_Cb move_multi; 24 Ecore_Event_Multi_Move_Cb move_multi;
23 Ecore_Event_Multi_Down_Cb down_multi; 25 Ecore_Event_Multi_Down_Cb down_multi;
24 Ecore_Event_Multi_Up_Cb up_multi; 26 Ecore_Event_Multi_Up_Cb up_multi;
27 Ecore_Event_Direct_Input_Cb direct;
25 int ignore_event; 28 int ignore_event;
26}; 29};
27 30
@@ -359,6 +362,16 @@ ecore_event_window_unregister(Ecore_Window id)
359 eina_hash_del(_window_hash, &id, NULL); 362 eina_hash_del(_window_hash, &id, NULL);
360} 363}
361 364
365EAPI void
366_ecore_event_window_direct_cb_set(Ecore_Window id, Ecore_Event_Direct_Input_Cb fptr)
367{
368 Ecore_Input_Window *lookup;
369
370 lookup = eina_hash_find(_window_hash, &id);
371 if (!lookup) return;
372 lookup->direct = fptr;
373}
374
362EAPI void * 375EAPI void *
363ecore_event_window_match(Ecore_Window id) 376ecore_event_window_match(Ecore_Window id)
364{ 377{