summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2009-04-23 03:24:16 +0000
committerVincent Torri <vincent.torri@gmail.com>2009-04-23 03:24:16 +0000
commit38fe5f2884b6d0bf54f9f2207baf548c22b999ef (patch)
treed173ac4e179cf04661c2a8c2f0d6ce3e7f8f8973 /legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
parent7f98415206b33adbf0fba3c21e2df28e7f520559 (diff)
add GDI evas engine support
SVN revision: 40311
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c293
1 files changed, 62 insertions, 231 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 eb217c751d..32d1432401 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wince.c
@@ -23,7 +23,7 @@
23 23
24#ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE 24#ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE
25 25
26#define ECORE_EVAS_EVENT_COUNT 12 26#define ECORE_EVAS_EVENT_COUNT 7
27 27
28static int _ecore_evas_init_count = 0; 28static int _ecore_evas_init_count = 0;
29static int _ecore_evas_fps_debug = 0; 29static int _ecore_evas_fps_debug = 0;
@@ -33,16 +33,6 @@ static Ecore_Idle_Enterer *ecore_evas_idle_enterer = NULL;
33static Ecore_Evas *ecore_evases = NULL; 33static Ecore_Evas *ecore_evases = NULL;
34static Eina_Hash *ecore_evases_hash = NULL; 34static Eina_Hash *ecore_evases_hash = NULL;
35 35
36static int _ecore_evas_wince_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event);
37
38static int _ecore_evas_wince_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event);
39
40static int _ecore_evas_wince_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event);
41
42static int _ecore_evas_wince_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event);
43
44static int _ecore_evas_wince_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event);
45
46static int _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event); 36static int _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
47 37
48static int _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); 38static int _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
@@ -139,21 +129,16 @@ _ecore_evas_wince_init(void)
139 129
140 ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_wince_idle_enter, NULL); 130 ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_wince_idle_enter, NULL);
141 131
142 ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_KEY_DOWN, _ecore_evas_wince_event_key_down, NULL); 132 ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL);
143 ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_WINCE_EVENT_KEY_UP, _ecore_evas_wince_event_key_up, NULL); 133 ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL);
144 ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_wince_event_mouse_button_down, NULL); 134 ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL);
145 ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_wince_event_mouse_button_up, NULL); 135 ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL);
146 ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_MOVE, _ecore_evas_wince_event_mouse_move, NULL); 136 ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL);
147 ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_IN, _ecore_evas_wince_event_mouse_in, NULL); 137 ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL);
148 ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL);
149 ecore_evas_event_handlers[7] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL);
150 ecore_evas_event_handlers[8] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL);
151 ecore_evas_event_handlers[9] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL);
152 ecore_evas_event_handlers[10] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL);
153 ecore_evas_event_handlers[11] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL);
154 138
155 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init(); 139 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
156 140
141 ecore_event_evas_init();
157 return _ecore_evas_init_count; 142 return _ecore_evas_init_count;
158} 143}
159 144
@@ -171,6 +156,7 @@ _ecore_evas_wince_shutdown(void)
171 ecore_idle_enterer_del(ecore_evas_idle_enterer); 156 ecore_idle_enterer_del(ecore_evas_idle_enterer);
172 ecore_evas_idle_enterer = NULL; 157 ecore_evas_idle_enterer = NULL;
173 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown(); 158 if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
159 ecore_event_evas_shutdown();
174 } 160 }
175 161
176 if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0; 162 if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
@@ -178,140 +164,6 @@ _ecore_evas_wince_shutdown(void)
178 return _ecore_evas_init_count; 164 return _ecore_evas_init_count;
179} 165}
180 166
181static char *
182_ecore_evas_wince_winid_str_get(Ecore_WinCE_Window *window)
183{
184 static char id[9];
185 const char *vals = "qWeRtYuIoP5-$&<~";
186 unsigned int val;
187
188 val = (unsigned int)window;
189 id[0] = vals[(val >> 28) & 0xf];
190 id[1] = vals[(val >> 24) & 0xf];
191 id[2] = vals[(val >> 20) & 0xf];
192 id[3] = vals[(val >> 16) & 0xf];
193 id[4] = vals[(val >> 12) & 0xf];
194 id[5] = vals[(val >> 8) & 0xf];
195 id[6] = vals[(val >> 4) & 0xf];
196 id[7] = vals[(val ) & 0xf];
197 id[8] = 0;
198
199 return id;
200}
201
202static Ecore_Evas *
203_ecore_evas_wince_match(Ecore_WinCE_Window *window)
204{
205 Ecore_Evas *ee;
206
207 ee = eina_hash_find(ecore_evases_hash, _ecore_evas_wince_winid_str_get(window));
208
209 return ee;
210}
211
212static int
213_ecore_evas_wince_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
214{
215 Ecore_Evas *ee;
216 Ecore_WinCE_Event_Key_Down *e;
217
218 e = event;
219
220 EINA_ERROR_PINFO("key down (%f %s %s %s)\n", e->time, e->keyname, e->keysymbol, e->keycompose);
221
222 ee = _ecore_evas_wince_match(e->window);
223 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
224 /* FIXME to do */
225/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
226 evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->keycompose, NULL, e->time, NULL);
227
228 return 1;
229}
230
231static int
232_ecore_evas_wince_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
233{
234 Ecore_Evas *ee;
235 Ecore_WinCE_Event_Key_Up *e;
236
237 e = event;
238
239 EINA_ERROR_PINFO("key up (%f %s %s %s)\n", e->time, e->keyname, e->keysymbol, e->keycompose);
240
241 ee = _ecore_evas_wince_match(e->window);
242 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
243 /* FIXME to do */
244/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
245 evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->keycompose, NULL, e->time, NULL);
246
247 return 1;
248}
249
250static int
251_ecore_evas_wince_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
252{
253 Ecore_Evas *ee;
254 Ecore_WinCE_Event_Mouse_Button_Down *e;
255 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
256
257 e = event;
258
259 EINA_ERROR_PINFO("mouse button down (%f %dx%d)\n", e->time, e->x, e->y);
260
261 ee = _ecore_evas_wince_match(e->window);
262 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
263 if (e->window != ee->engine.wince.window) return 1;
264 /* FIXME to do */
265/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
266 if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
267 if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
268 evas_event_feed_mouse_down(ee->evas, e->button, flags, e->time, NULL);
269
270 return 1;
271}
272
273static int
274_ecore_evas_wince_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
275{
276 Ecore_Evas *ee;
277 Ecore_WinCE_Event_Mouse_Button_Up *e;
278 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
279
280 e = event;
281
282 EINA_ERROR_PINFO("mouse button up (%f %dx%d)\n", e->time, e->x, e->y);
283
284 ee = _ecore_evas_wince_match(e->window);
285 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
286 if (e->window != ee->engine.wince.window) return 1;
287 /* FIXME to do */
288/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
289 if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
290 if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
291 evas_event_feed_mouse_up(ee->evas, e->button, flags, e->time, NULL);
292
293 return 1;
294}
295
296static int
297_ecore_evas_wince_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
298{
299 Ecore_Evas *ee;
300 Ecore_WinCE_Event_Mouse_Move *e;
301
302 EINA_ERROR_PINFO("mouse move\n");
303
304 e = event;
305 ee = _ecore_evas_wince_match(e->window);
306 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
307 if (e->window != ee->engine.wince.window) return 1;
308 /* FIXME to do */
309/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
310 _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
311
312 return 1;
313}
314
315static int 167static int
316_ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) 168_ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event)
317{ 169{
@@ -321,9 +173,9 @@ _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, voi
321 EINA_ERROR_PINFO("mouse in\n"); 173 EINA_ERROR_PINFO("mouse in\n");
322 174
323 e = event; 175 e = event;
324 ee = _ecore_evas_wince_match(e->window); 176 ee = ecore_event_window_match(e->window);
325 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */ 177 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
326 if (e->window != ee->engine.wince.window) return 1; 178 if (e->window != ee->prop.window) return 1;
327 179
328 if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); 180 if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee);
329 /* FIXME to do */ 181 /* FIXME to do */
@@ -343,9 +195,9 @@ _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo
343 EINA_ERROR_PINFO("mouse out\n"); 195 EINA_ERROR_PINFO("mouse out\n");
344 196
345 e = event; 197 e = event;
346 ee = _ecore_evas_wince_match(e->window); 198 ee = ecore_event_window_match(e->window);
347 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */ 199 if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
348 if (e->window != ee->engine.wince.window) return 1; 200 if (e->window != ee->prop.window) return 1;
349 201
350 /* FIXME to do */ 202 /* FIXME to do */
351/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */ 203/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
@@ -367,9 +219,9 @@ _ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__
367 EINA_ERROR_PINFO("window damage\n"); 219 EINA_ERROR_PINFO("window damage\n");
368 220
369 e = event; 221 e = event;
370 ee = _ecore_evas_wince_match(e->window); 222 ee = ecore_event_window_match(e->window);
371 if (!ee) return 1; /* pass on event */ 223 if (!ee) return 1; /* pass on event */
372 if (e->window != ee->engine.wince.window) return 1; 224 if (e->window != ee->prop.window) return 1;
373 225
374 if (ee->prop.avoid_damage) 226 if (ee->prop.avoid_damage)
375 { 227 {
@@ -415,9 +267,9 @@ _ecore_evas_wince_event_window_destroy(void *data __UNUSED__, int type __UNUSED_
415 EINA_ERROR_PINFO("window destroy\n"); 267 EINA_ERROR_PINFO("window destroy\n");
416 268
417 e = event; 269 e = event;
418 ee = _ecore_evas_wince_match(e->window); 270 ee = ecore_event_window_match(e->window);
419 if (!ee) return 1; /* pass on event */ 271 if (!ee) return 1; /* pass on event */
420 if (e->window != ee->engine.wince.window) return 1; 272 if (e->window != ee->prop.window) return 1;
421 if (ee->func.fn_destroy) ee->func.fn_destroy(ee); 273 if (ee->func.fn_destroy) ee->func.fn_destroy(ee);
422 ecore_evas_free(ee); 274 ecore_evas_free(ee);
423 275
@@ -433,9 +285,9 @@ _ecore_evas_wince_event_window_show(void *data __UNUSED__, int type __UNUSED__,
433 EINA_ERROR_PINFO("window show\n"); 285 EINA_ERROR_PINFO("window show\n");
434 286
435 e = event; 287 e = event;
436 ee = _ecore_evas_wince_match(e->window); 288 ee = ecore_event_window_match(e->window);
437 if (!ee) return 1; /* pass on event */ 289 if (!ee) return 1; /* pass on event */
438 if (e->window != ee->engine.wince.window) return 1; 290 if (e->window != ee->prop.window) return 1;
439 if (ee->visible) return 0; /* dont pass it on */ 291 if (ee->visible) return 0; /* dont pass it on */
440 ee->visible = 1; 292 ee->visible = 1;
441 if (ee->func.fn_show) ee->func.fn_show(ee); 293 if (ee->func.fn_show) ee->func.fn_show(ee);
@@ -452,9 +304,9 @@ _ecore_evas_wince_event_window_hide(void *data __UNUSED__, int type __UNUSED__,
452 EINA_ERROR_PINFO("window hide\n"); 304 EINA_ERROR_PINFO("window hide\n");
453 305
454 e = event; 306 e = event;
455 ee = _ecore_evas_wince_match(e->window); 307 ee = ecore_event_window_match(e->window);
456 if (!ee) return 1; /* pass on event */ 308 if (!ee) return 1; /* pass on event */
457 if (e->window != ee->engine.wince.window) return 1; 309 if (e->window != ee->prop.window) return 1;
458 if (!ee->visible) return 0; /* dont pass it on */ 310 if (!ee->visible) return 0; /* dont pass it on */
459 ee->visible = 0; 311 ee->visible = 0;
460 if (ee->func.fn_hide) ee->func.fn_hide(ee); 312 if (ee->func.fn_hide) ee->func.fn_hide(ee);
@@ -471,9 +323,9 @@ _ecore_evas_wince_event_window_delete_request(void *data __UNUSED__, int type __
471 EINA_ERROR_PINFO("window delete request\n"); 323 EINA_ERROR_PINFO("window delete request\n");
472 324
473 e = event; 325 e = event;
474 ee = _ecore_evas_wince_match(e->window); 326 ee = ecore_event_window_match(e->window);
475 if (!ee) return 1; /* pass on event */ 327 if (!ee) return 1; /* pass on event */
476 if (e->window != ee->engine.wince.window) return 1; 328 if (e->window != ee->prop.window) return 1;
477 if (ee->func.fn_delete_request) ee->func.fn_delete_request(ee); 329 if (ee->func.fn_delete_request) ee->func.fn_delete_request(ee);
478 330
479 return 1; 331 return 1;
@@ -487,8 +339,8 @@ _ecore_evas_wince_free(Ecore_Evas *ee)
487{ 339{
488 EINA_ERROR_PINFO("ecore evas free\n"); 340 EINA_ERROR_PINFO("ecore evas free\n");
489 341
490 ecore_wince_window_free(ee->engine.wince.window); 342 ecore_wince_window_free(ee->prop.window);
491 eina_hash_del(ecore_evases_hash, _ecore_evas_wince_winid_str_get(ee->engine.wince.window), ee); 343 ecore_event_window_unregister(ee->prop.window);
492 ecore_evases = _ecore_list2_remove(ecore_evases, ee); 344 ecore_evases = _ecore_list2_remove(ecore_evases, ee);
493 _ecore_evas_wince_shutdown(); 345 _ecore_evas_wince_shutdown();
494 ecore_wince_shutdown(); 346 ecore_wince_shutdown();
@@ -510,7 +362,7 @@ _ecore_evas_wince_move(Ecore_Evas *ee, int x, int y)
510 { 362 {
511 ee->x = x; 363 ee->x = x;
512 ee->y = y; 364 ee->y = y;
513 ecore_wince_window_move(ee->engine.wince.window, x, y); 365 ecore_wince_window_move(ee->prop.window, x, y);
514 if (ee->func.fn_move) ee->func.fn_move(ee); 366 if (ee->func.fn_move) ee->func.fn_move(ee);
515 } 367 }
516} 368}
@@ -524,7 +376,7 @@ _ecore_evas_wince_resize(Ecore_Evas *ee, int width, int height)
524 { 376 {
525 ee->w = width; 377 ee->w = width;
526 ee->h = height; 378 ee->h = height;
527 ecore_wince_window_resize(ee->engine.wince.window, width, height); 379 ecore_wince_window_resize(ee->prop.window, width, height);
528 if ((ee->rotation == 90) || (ee->rotation == 270)) 380 if ((ee->rotation == 90) || (ee->rotation == 270))
529 { 381 {
530 evas_output_size_set(ee->evas, ee->h, ee->w); 382 evas_output_size_set(ee->evas, ee->h, ee->w);
@@ -558,7 +410,7 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
558 ee->y = y; 410 ee->y = y;
559 ee->w = width; 411 ee->w = width;
560 ee->h = height; 412 ee->h = height;
561 ecore_wince_window_move_resize(ee->engine.wince.window, x, y, width, height); 413 ecore_wince_window_move_resize(ee->prop.window, x, y, width, height);
562 if ((ee->rotation == 90) || (ee->rotation == 270)) 414 if ((ee->rotation == 90) || (ee->rotation == 270))
563 { 415 {
564 evas_output_size_set(ee->evas, ee->h, ee->w); 416 evas_output_size_set(ee->evas, ee->h, ee->w);
@@ -603,7 +455,7 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
603/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */ 455/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
604/* if (!ee->prop.fullscreen) */ 456/* if (!ee->prop.fullscreen) */
605/* { */ 457/* { */
606/* ecore_wince_window_resize(ee->engine.wince.window, ee->h, ee->w); */ 458/* ecore_wince_window_resize(ee->prop.window, ee->h, ee->w); */
607/* ee->expecting_resize.w = ee->h; */ 459/* ee->expecting_resize.w = ee->h; */
608/* ee->expecting_resize.h = ee->w; */ 460/* ee->expecting_resize.h = ee->w; */
609/* } */ 461/* } */
@@ -611,8 +463,8 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
611/* { */ 463/* { */
612/* int w, h; */ 464/* int w, h; */
613 465
614/* ecore_wince_window_size_get(ee->engine.wince.window, &w, &h); */ 466/* ecore_wince_window_size_get(ee->prop.window, &w, &h); */
615/* ecore_wince_window_resize(ee->engine.wince.window, h, w); */ 467/* ecore_wince_window_resize(ee->prop.window, h, w); */
616/* if ((rotation == 0) || (rotation == 180)) */ 468/* if ((rotation == 0) || (rotation == 180)) */
617/* { */ 469/* { */
618/* evas_output_size_set(ee->evas, ee->w, ee->h); */ 470/* evas_output_size_set(ee->evas, ee->w, ee->h); */
@@ -661,9 +513,9 @@ _ecore_evas_wince_show(Ecore_Evas *ee)
661 ee->should_be_visible = 1; 513 ee->should_be_visible = 1;
662 if (ee->prop.avoid_damage) 514 if (ee->prop.avoid_damage)
663 _ecore_evas_wince_render(ee); 515 _ecore_evas_wince_render(ee);
664 ecore_wince_window_show(ee->engine.wince.window); 516 ecore_wince_window_show(ee->prop.window);
665/* if (ee->prop.fullscreen) */ 517/* if (ee->prop.fullscreen) */
666/* ecore_wince_window_focus(ee->engine.wince.window); */ 518/* ecore_wince_window_focus(ee->prop.window); */
667} 519}
668 520
669static void 521static void
@@ -671,7 +523,7 @@ _ecore_evas_wince_hide(Ecore_Evas *ee)
671{ 523{
672 EINA_ERROR_PINFO("ecore evas hide\n"); 524 EINA_ERROR_PINFO("ecore evas hide\n");
673 525
674 ecore_wince_window_hide(ee->engine.wince.window); 526 ecore_wince_window_hide(ee->prop.window);
675 ee->should_be_visible = 0; 527 ee->should_be_visible = 0;
676} 528}
677 529
@@ -679,18 +531,18 @@ _ecore_evas_wince_hide(Ecore_Evas *ee)
679/* _ecore_evas_wince_raise(Ecore_Evas *ee) */ 531/* _ecore_evas_wince_raise(Ecore_Evas *ee) */
680/* { */ 532/* { */
681/* if (!ee->prop.fullscreen) */ 533/* if (!ee->prop.fullscreen) */
682/* ecore_wince_window_raise(ee->engine.wince.window); */ 534/* ecore_wince_window_raise(ee->prop.window); */
683/* else */ 535/* else */
684/* ecore_wince_window_raise(ee->engine.wince.window); */ 536/* ecore_wince_window_raise(ee->prop.window); */
685/* } */ 537/* } */
686 538
687/* static void */ 539/* static void */
688/* _ecore_evas_wince_lower(Ecore_Evas *ee) */ 540/* _ecore_evas_wince_lower(Ecore_Evas *ee) */
689/* { */ 541/* { */
690/* if (!ee->prop.fullscreen) */ 542/* if (!ee->prop.fullscreen) */
691/* ecore_wince_window_lower(ee->engine.wince.window); */ 543/* ecore_wince_window_lower(ee->prop.window); */
692/* else */ 544/* else */
693/* ecore_wince_window_lower(ee->engine.wince.window); */ 545/* ecore_wince_window_lower(ee->prop.window); */
694/* } */ 546/* } */
695 547
696static void 548static void
@@ -701,7 +553,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
701 if (ee->prop.title) free(ee->prop.title); 553 if (ee->prop.title) free(ee->prop.title);
702 ee->prop.title = NULL; 554 ee->prop.title = NULL;
703 if (title) ee->prop.title = strdup(title); 555 if (title) ee->prop.title = strdup(title);
704 ecore_wince_window_title_set(ee->engine.wince.window, ee->prop.title); 556 ecore_wince_window_title_set(ee->prop.window, ee->prop.title);
705} 557}
706 558
707/* static void */ 559/* static void */
@@ -712,7 +564,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
712/* if ((ee->prop.min.w == width) && (ee->prop.min.h == height)) return; */ 564/* if ((ee->prop.min.w == width) && (ee->prop.min.h == height)) return; */
713/* ee->prop.min.w = width; */ 565/* ee->prop.min.w = width; */
714/* ee->prop.min.h = height; */ 566/* ee->prop.min.h = height; */
715/* ecore_wince_window_size_min_set(ee->engine.wince.window, width, height); */ 567/* ecore_wince_window_size_min_set(ee->prop.window, width, height); */
716/* } */ 568/* } */
717 569
718/* static void */ 570/* static void */
@@ -723,7 +575,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
723/* if ((ee->prop.max.w == width) && (ee->prop.max.h == height)) return; */ 575/* if ((ee->prop.max.w == width) && (ee->prop.max.h == height)) return; */
724/* ee->prop.max.w = width; */ 576/* ee->prop.max.w = width; */
725/* ee->prop.max.h = height; */ 577/* ee->prop.max.h = height; */
726/* ecore_wince_window_size_max_set(ee->engine.wince.window, width, height); */ 578/* ecore_wince_window_size_max_set(ee->prop.window, width, height); */
727/* } */ 579/* } */
728 580
729/* static void */ 581/* static void */
@@ -734,7 +586,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
734/* if ((ee->prop.base.w == width) && (ee->prop.base.h == height)) return; */ 586/* if ((ee->prop.base.w == width) && (ee->prop.base.h == height)) return; */
735/* ee->prop.base.w = width; */ 587/* ee->prop.base.w = width; */
736/* ee->prop.base.h = height; */ 588/* ee->prop.base.h = height; */
737/* ecore_wince_window_size_base_set(ee->engine.wince.window, width, height); */ 589/* ecore_wince_window_size_base_set(ee->prop.window, width, height); */
738/* } */ 590/* } */
739 591
740/* static void */ 592/* static void */
@@ -745,7 +597,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
745/* if ((ee->prop.step.w == width) && (ee->prop.step.h == height)) return; */ 597/* if ((ee->prop.step.w == width) && (ee->prop.step.h == height)) return; */
746/* ee->prop.step.w = width; */ 598/* ee->prop.step.w = width; */
747/* ee->prop.step.h = height; */ 599/* ee->prop.step.h = height; */
748/* ecore_wince_window_size_step_set(ee->engine.wince.window, width, height); */ 600/* ecore_wince_window_size_step_set(ee->prop.window, width, height); */
749/* } */ 601/* } */
750 602
751static void 603static void
@@ -762,7 +614,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
762 ee->prop.cursor.layer = 0; 614 ee->prop.cursor.layer = 0;
763 ee->prop.cursor.hot.x = 0; 615 ee->prop.cursor.hot.x = 0;
764 ee->prop.cursor.hot.y = 0; 616 ee->prop.cursor.hot.y = 0;
765 ecore_wince_window_cursor_show(ee->engine.wince.window, 1); 617 ecore_wince_window_cursor_show(ee->prop.window, 1);
766 return; 618 return;
767 } 619 }
768 620
@@ -771,7 +623,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
771 ee->prop.cursor.hot.x = hot_x; 623 ee->prop.cursor.hot.x = hot_x;
772 ee->prop.cursor.hot.y = hot_y; 624 ee->prop.cursor.hot.y = hot_y;
773 625
774 ecore_wince_window_cursor_show(ee->engine.wince.window, 0); 626 ecore_wince_window_cursor_show(ee->prop.window, 0);
775 627
776 evas_pointer_output_xy_get(ee->evas, &x, &y); 628 evas_pointer_output_xy_get(ee->evas, &x, &y);
777 evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer); 629 evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
@@ -787,7 +639,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
787/* static void */ 639/* static void */
788/* _ecore_evas_wince_focus_set(Ecore_Evas *ee, int on __UNUSED__) */ 640/* _ecore_evas_wince_focus_set(Ecore_Evas *ee, int on __UNUSED__) */
789/* { */ 641/* { */
790/* ecore_wince_window_focus_set(ee->engine.wince.window); */ 642/* ecore_wince_window_focus_set(ee->prop.window); */
791/* } */ 643/* } */
792 644
793/* static void */ 645/* static void */
@@ -796,7 +648,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
796/* /\* if (((ee->prop.borderless) && (on)) || *\/ */ 648/* /\* if (((ee->prop.borderless) && (on)) || *\/ */
797/* /\* ((!ee->prop.borderless) && (!on))) return; *\/ */ 649/* /\* ((!ee->prop.borderless) && (!on))) return; *\/ */
798/* ee->prop.iconified = on; */ 650/* ee->prop.iconified = on; */
799/* ecore_wince_window_iconified_set(ee->engine.wince.window, ee->prop.iconified); */ 651/* ecore_wince_window_iconified_set(ee->prop.window, ee->prop.iconified); */
800/* } */ 652/* } */
801 653
802/* static void */ 654/* static void */
@@ -805,7 +657,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
805/* if (((ee->prop.borderless) && (on)) || */ 657/* if (((ee->prop.borderless) && (on)) || */
806/* ((!ee->prop.borderless) && (!on))) return; */ 658/* ((!ee->prop.borderless) && (!on))) return; */
807/* ee->prop.borderless = on; */ 659/* ee->prop.borderless = on; */
808/* ecore_wince_window_borderless_set(ee->engine.wince.window, ee->prop.borderless); */ 660/* ecore_wince_window_borderless_set(ee->prop.window, ee->prop.borderless); */
809/* } */ 661/* } */
810 662
811static void 663static void
@@ -823,12 +675,12 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
823 ee->engine.wince.state.fullscreen = on; 675 ee->engine.wince.state.fullscreen = on;
824 ee->prop.fullscreen = on; 676 ee->prop.fullscreen = on;
825 677
826 window = (struct _Ecore_WinCE_Window *)ee->engine.wince.window; 678 window = (struct _Ecore_WinCE_Window *)ee->prop.window;
827 679
828 if (on != 0) 680 if (on != 0)
829 { 681 {
830/* ecore_win32_window_shape_set(ee->engine.win32.window, 0, 0, NULL); */ 682/* ecore_win32_window_shape_set(ee->engine.win32.window, 0, 0, NULL); */
831 ecore_wince_window_fullscreen_set(ee->engine.wince.window, on); 683 ecore_wince_window_fullscreen_set(ee->prop.window, on);
832 ee->w = GetSystemMetrics(SM_CXSCREEN); 684 ee->w = GetSystemMetrics(SM_CXSCREEN);
833 ee->h = GetSystemMetrics(SM_CYSCREEN); 685 ee->h = GetSystemMetrics(SM_CYSCREEN);
834 evas_output_size_set(ee->evas, ee->w, ee->h); 686 evas_output_size_set(ee->evas, ee->w, ee->h);
@@ -839,8 +691,8 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
839 int w; 691 int w;
840 int h; 692 int h;
841 693
842 ecore_wince_window_fullscreen_set(ee->engine.wince.window, on); 694 ecore_wince_window_fullscreen_set(ee->prop.window, on);
843 ecore_wince_window_size_get(ee->engine.wince.window, &w, &h); 695 ecore_wince_window_size_get(ee->prop.window, &w, &h);
844 ee->w = w; 696 ee->w = w;
845 ee->h = h; 697 ee->h = h;
846 evas_output_size_set(ee->evas, ee->w, ee->h); 698 evas_output_size_set(ee->evas, ee->w, ee->h);
@@ -860,14 +712,6 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
860 } 712 }
861} 713}
862 714
863static void *
864_ecore_evas_wince_window_get(const Ecore_Evas *ee)
865{
866 EINA_ERROR_PINFO("ecore evas window get\n");
867
868 return ee->engine.wince.window;
869}
870
871static const Ecore_Evas_Engine_Func _ecore_wince_engine_func = 715static const Ecore_Evas_Engine_Func _ecore_wince_engine_func =
872{ 716{
873 _ecore_evas_wince_free, 717 _ecore_evas_wince_free,
@@ -914,8 +758,7 @@ static const Ecore_Evas_Engine_Func _ecore_wince_engine_func =
914 NULL, /* _ecore_evas_x_withdrawn_set */ 758 NULL, /* _ecore_evas_x_withdrawn_set */
915 NULL, /* _ecore_evas_x_sticky_set */ 759 NULL, /* _ecore_evas_x_sticky_set */
916 NULL, /* _ecore_evas_x_ignore_events_set */ 760 NULL, /* _ecore_evas_x_ignore_events_set */
917 NULL, /* _ecore_evas_x_alpha_set */ 761 NULL /* _ecore_evas_x_alpha_set */
918 _ecore_evas_wince_window_get
919}; 762};
920 763
921/* API */ 764/* API */
@@ -974,8 +817,8 @@ ecore_evas_software_wince_new_internal(int backend,
974 ee->prop.sticky = 0; 817 ee->prop.sticky = 0;
975 /* FIXME: sticky to add */ 818 /* FIXME: sticky to add */
976 819
977 ee->engine.wince.window = ecore_wince_window_new(parent, x, y, width, height); 820 ee->prop.window = ecore_wince_window_new(parent, x, y, width, height);
978 if (!ee->engine.wince.window) 821 if (!ee->prop.window)
979 { 822 {
980 _ecore_evas_wince_shutdown(); 823 _ecore_evas_wince_shutdown();
981 free(ee); 824 free(ee);
@@ -983,7 +826,7 @@ ecore_evas_software_wince_new_internal(int backend,
983 return NULL; 826 return NULL;
984 } 827 }
985 828
986 ecore_wince_window_fullscreen_set(ee->engine.wince.window, fullscreen); 829 ecore_wince_window_fullscreen_set(ee->prop.window, fullscreen);
987 830
988 /* init evas here */ 831 /* init evas here */
989 ee->evas = evas_new(); 832 ee->evas = evas_new();
@@ -996,7 +839,7 @@ ecore_evas_software_wince_new_internal(int backend,
996 if (einfo) 839 if (einfo)
997 { 840 {
998 /* FIXME: REDRAW_DEBUG missing for now */ 841 /* FIXME: REDRAW_DEBUG missing for now */
999 einfo->info.window = ((struct _Ecore_WinCE_Window *)ee->engine.wince.window)->window; 842 einfo->info.window = ((struct _Ecore_WinCE_Window *)ee->prop.window)->window;
1000 einfo->info.width = width; 843 einfo->info.width = width;
1001 einfo->info.height = height; 844 einfo->info.height = height;
1002 einfo->info.backend = backend; 845 einfo->info.backend = backend;
@@ -1004,25 +847,13 @@ ecore_evas_software_wince_new_internal(int backend,
1004 einfo->info.fullscreen = fullscreen; 847 einfo->info.fullscreen = fullscreen;
1005 evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); 848 evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
1006 849
1007 ecore_wince_window_backend_set(ee->engine.wince.window, backend); 850 ecore_wince_window_backend_set(ee->prop.window, backend);
1008 ecore_wince_window_suspend_set(ee->engine.wince.window, einfo->func.suspend); 851 ecore_wince_window_suspend_set(ee->prop.window, einfo->func.suspend);
1009 ecore_wince_window_resume_set(ee->engine.wince.window, einfo->func.resume); 852 ecore_wince_window_resume_set(ee->prop.window, einfo->func.resume);
1010 } 853 }
1011 854
1012 evas_key_modifier_add(ee->evas, "Shift");
1013 evas_key_modifier_add(ee->evas, "Control");
1014 evas_key_modifier_add(ee->evas, "Alt");
1015 evas_key_modifier_add(ee->evas, "Meta");
1016 evas_key_modifier_add(ee->evas, "Hyper");
1017 evas_key_modifier_add(ee->evas, "Super");
1018 evas_key_lock_add(ee->evas, "Caps_Lock");
1019 evas_key_lock_add(ee->evas, "Num_Lock");
1020 evas_key_lock_add(ee->evas, "Scroll_Lock");
1021
1022 ecore_evases = _ecore_list2_prepend(ecore_evases, ee); 855 ecore_evases = _ecore_list2_prepend(ecore_evases, ee);
1023 if (!ecore_evases_hash) 856 ecore_event_window_register(ee->prop.window, ee, ee->evas, _ecore_evas_mouse_move_process);
1024 ecore_evases_hash = eina_hash_string_superfast_new(NULL);
1025 eina_hash_add(ecore_evases_hash, _ecore_evas_wince_winid_str_get(ee->engine.wince.window), ee);
1026 857
1027 return ee; 858 return ee;
1028} 859}
@@ -1099,7 +930,7 @@ ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
1099EAPI Ecore_WinCE_Window * 930EAPI Ecore_WinCE_Window *
1100ecore_evas_software_wince_window_get(const Ecore_Evas *ee) 931ecore_evas_software_wince_window_get(const Ecore_Evas *ee)
1101{ 932{
1102 return (Ecore_WinCE_Window *) _ecore_evas_wince_window_get(ee); 933 return (Ecore_WinCE_Window *) ecore_evas_window_get(ee);
1103} 934}
1104 935
1105#else 936#else