summaryrefslogtreecommitdiff
path: root/src/lib/ecore_input
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2015-06-16 15:33:43 +0900
committerJi-Youn Park <jy0703.park@samsung.com>2015-06-16 15:33:43 +0900
commit5cb6cdbc5e1a13ea0262e155983b494e6519abde (patch)
tree24a45ebca94d401e89cefa767ee81faf6564dada /src/lib/ecore_input
parent0ee9a4ac63a116a5534d73f4df1f6b4507b23349 (diff)
Ecore_input: Add "ECORE_EVENT_MOUSE_BUTTON_CANCEL" event
If ecore get the mouse cancel event(ex: display off, or window stack change) from below, we need to deal with. Currently, evas also generates up event using evas_event_feed_mouse_cancel function when window hide is called. if cancel event occurs, ecore also call evas_event_mouse_feed_cancel like window hide situation. cancel event means all button or touch event should be canceled, but in the future, if we need to deal each cancel event according to touch point, we need to add api like evas_event_feed_multi_cancel @feature
Diffstat (limited to 'src/lib/ecore_input')
-rw-r--r--src/lib/ecore_input/Ecore_Input.h4
-rw-r--r--src/lib/ecore_input/ecore_input.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/ecore_input/Ecore_Input.h b/src/lib/ecore_input/Ecore_Input.h
index f944006353..1a72e98343 100644
--- a/src/lib/ecore_input/Ecore_Input.h
+++ b/src/lib/ecore_input/Ecore_Input.h
@@ -54,6 +54,7 @@ extern "C" {
54 EAPI extern int ECORE_EVENT_MOUSE_IN; 54 EAPI extern int ECORE_EVENT_MOUSE_IN;
55 EAPI extern int ECORE_EVENT_MOUSE_OUT; 55 EAPI extern int ECORE_EVENT_MOUSE_OUT;
56 EAPI extern int ECORE_EVENT_AXIS_UPDATE; /**< @since 1.13 */ 56 EAPI extern int ECORE_EVENT_AXIS_UPDATE; /**< @since 1.13 */
57 EAPI extern int ECORE_EVENT_MOUSE_BUTTON_CANCEL; /**< @since 1.19 */
57 58
58#define ECORE_EVENT_MODIFIER_SHIFT 0x0001 59#define ECORE_EVENT_MODIFIER_SHIFT 0x0001
59#define ECORE_EVENT_MODIFIER_CTRL 0x0002 60#define ECORE_EVENT_MODIFIER_CTRL 0x0002
@@ -106,7 +107,8 @@ extern "C" {
106 typedef enum _Ecore_Event_Press 107 typedef enum _Ecore_Event_Press
107 { 108 {
108 ECORE_DOWN, 109 ECORE_DOWN,
109 ECORE_UP 110 ECORE_UP,
111 ECORE_CANCEL
110 } Ecore_Event_Press; 112 } Ecore_Event_Press;
111 113
112 /** 114 /**
diff --git a/src/lib/ecore_input/ecore_input.c b/src/lib/ecore_input/ecore_input.c
index ac8b60db17..6b52eff631 100644
--- a/src/lib/ecore_input/ecore_input.c
+++ b/src/lib/ecore_input/ecore_input.c
@@ -23,6 +23,7 @@ EAPI int ECORE_EVENT_MOUSE_WHEEL = 0;
23EAPI int ECORE_EVENT_MOUSE_IN = 0; 23EAPI int ECORE_EVENT_MOUSE_IN = 0;
24EAPI int ECORE_EVENT_MOUSE_OUT = 0; 24EAPI int ECORE_EVENT_MOUSE_OUT = 0;
25EAPI int ECORE_EVENT_AXIS_UPDATE = 0; 25EAPI int ECORE_EVENT_AXIS_UPDATE = 0;
26EAPI int ECORE_EVENT_MOUSE_BUTTON_CANCEL = 0;
26 27
27static int _ecore_event_init_count = 0; 28static int _ecore_event_init_count = 0;
28 29
@@ -54,6 +55,7 @@ ecore_event_init(void)
54 ECORE_EVENT_MOUSE_IN = ecore_event_type_new(); 55 ECORE_EVENT_MOUSE_IN = ecore_event_type_new();
55 ECORE_EVENT_MOUSE_OUT = ecore_event_type_new(); 56 ECORE_EVENT_MOUSE_OUT = ecore_event_type_new();
56 ECORE_EVENT_AXIS_UPDATE = ecore_event_type_new(); 57 ECORE_EVENT_AXIS_UPDATE = ecore_event_type_new();
58 ECORE_EVENT_MOUSE_BUTTON_CANCEL = ecore_event_type_new();
57 59
58 return _ecore_event_init_count; 60 return _ecore_event_init_count;
59} 61}
@@ -73,6 +75,7 @@ ecore_event_shutdown(void)
73 ECORE_EVENT_MOUSE_IN = 0; 75 ECORE_EVENT_MOUSE_IN = 0;
74 ECORE_EVENT_MOUSE_OUT = 0; 76 ECORE_EVENT_MOUSE_OUT = 0;
75 ECORE_EVENT_AXIS_UPDATE = 0; 77 ECORE_EVENT_AXIS_UPDATE = 0;
78 ECORE_EVENT_MOUSE_BUTTON_CANCEL = 0;
76 eina_log_domain_unregister(_ecore_input_log_dom); 79 eina_log_domain_unregister(_ecore_input_log_dom);
77 _ecore_input_log_dom = -1; 80 _ecore_input_log_dom = -1;
78 ecore_shutdown(); 81 ecore_shutdown();