summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2011-11-11 07:24:00 +0000
committerVincent Torri <vincent.torri@gmail.com>2011-11-11 07:24:00 +0000
commitd8a69c1622d69dbb28196ecfc72956f915a5468d (patch)
tree769dda1bb4681b80043338c82352d1cea1fea7f0 /legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
parentedaeefa288e684acc98646fbc703b3a5fc75ebad (diff)
Ecore: add callbacks for window focus in/out event on Win32 and WinCE
Patch by Shinwoo Kim SVN revision: 65048
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c52
1 files changed, 46 insertions, 6 deletions
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
index 4011c8b236..e102cb737e 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
@@ -19,7 +19,7 @@
19 19
20#ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE 20#ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE
21 21
22#define ECORE_EVAS_EVENT_COUNT 7 22#define ECORE_EVAS_EVENT_COUNT 9
23 23
24static int _ecore_evas_init_count = 0; 24static int _ecore_evas_init_count = 0;
25 25
@@ -29,6 +29,10 @@ static Eina_Bool _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int typ
29 29
30static Eina_Bool _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); 30static Eina_Bool _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
31 31
32static Eina_Bool _ecore_evas_wince_event_window_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
33
34static Eina_Bool _ecore_evas_wince_event_window_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event);
35
32static Eina_Bool _ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__, void *event); 36static Eina_Bool _ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__, void *event);
33 37
34static Eina_Bool _ecore_evas_wince_event_window_destroy(void *data __UNUSED__, int type __UNUSED__, void *event); 38static Eina_Bool _ecore_evas_wince_event_window_destroy(void *data __UNUSED__, int type __UNUSED__, void *event);
@@ -94,11 +98,13 @@ _ecore_evas_wince_init(void)
94 98
95 ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_IN, _ecore_evas_wince_event_mouse_in, NULL); 99 ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_IN, _ecore_evas_wince_event_mouse_in, NULL);
96 ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL); 100 ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL);
97 ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL); 101 ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_FOCUS_IN, _ecore_evas_wince_event_window_focus_in, NULL);
98 ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL); 102 ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT, _ecore_evas_wince_event_window_focus_out, NULL);
99 ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL); 103 ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL);
100 ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL); 104 ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL);
101 ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL); 105 ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL);
106 ecore_evas_event_handlers[7] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL);
107 ecore_evas_event_handlers[8] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL);
102 108
103 ecore_event_evas_init(); 109 ecore_event_evas_init();
104 return _ecore_evas_init_count; 110 return _ecore_evas_init_count;
@@ -169,6 +175,40 @@ _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo
169} 175}
170 176
171static Eina_Bool 177static Eina_Bool
178_ecore_evas_wince_event_window_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event)
179{
180 Ecore_Evas *ee;
181 Ecore_WinCE_Event_Window_Focus_In *e;
182
183 e = event;
184 ee = ecore_event_window_match(e->window);
185 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
186 if (e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
187
188 ee->prop.focused = 1;
189 evas_focus_in(ee->evas);
190 if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
191 return ECORE_CALLBACK_PASS_ON;
192}
193
194static Eina_Bool
195_ecore_evas_wince_event_window_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event)
196{
197 Ecore_Evas *ee;
198 Ecore_WinCE_Event_Window_Focus_Out *e;
199
200 e = event;
201 ee = ecore_event_window_match(e->window);
202 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
203 if (e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
204
205 evas_focus_out(ee->evas);
206 ee->prop.focused = 0;
207 if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
208 return ECORE_CALLBACK_PASS_ON;
209}
210
211static Eina_Bool
172_ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__, void *event) 212_ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__, void *event)
173{ 213{
174 Ecore_Evas *ee; 214 Ecore_Evas *ee;