diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/ecore/src/lib/ecore_psl1ght | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_psl1ght')
-rw-r--r-- | libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h | 13 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_psl1ght/Makefile.in | 14 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c | 111 |
3 files changed, 100 insertions, 38 deletions
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h index 39331f7..c6300fd 100644 --- a/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h +++ b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h | |||
@@ -28,6 +28,7 @@ EAPI extern int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS; | |||
28 | EAPI extern int ECORE_PSL1GHT_EVENT_GOT_FOCUS; | 28 | EAPI extern int ECORE_PSL1GHT_EVENT_GOT_FOCUS; |
29 | EAPI extern int ECORE_PSL1GHT_EVENT_LOST_FOCUS; | 29 | EAPI extern int ECORE_PSL1GHT_EVENT_LOST_FOCUS; |
30 | EAPI extern int ECORE_PSL1GHT_EVENT_EXPOSE; | 30 | EAPI extern int ECORE_PSL1GHT_EVENT_EXPOSE; |
31 | EAPI extern int ECORE_PSL1GHT_EVENT_QUIT; | ||
31 | 32 | ||
32 | typedef struct _Ecore_Psl1ght_Event_Key_Modifiers Ecore_Psl1ght_Event_Key_Modifiers; | 33 | typedef struct _Ecore_Psl1ght_Event_Key_Modifiers Ecore_Psl1ght_Event_Key_Modifiers; |
33 | struct _Ecore_Psl1ght_Event_Key_Modifiers /** PSL1GHT Key Modifier event */ | 34 | struct _Ecore_Psl1ght_Event_Key_Modifiers /** PSL1GHT Key Modifier event */ |
@@ -105,14 +106,10 @@ struct _Ecore_Psl1ght_Event_Mouse_Wheel /** PSL1GHT Mouse Wheel event */ | |||
105 | unsigned int time; | 106 | unsigned int time; |
106 | }; | 107 | }; |
107 | 108 | ||
108 | EAPI int | 109 | EAPI int ecore_psl1ght_init(const char *name); |
109 | ecore_psl1ght_init(const char *name); | 110 | EAPI int ecore_psl1ght_shutdown(void); |
110 | EAPI int | 111 | EAPI void ecore_psl1ght_resolution_set(int width, int height); |
111 | ecore_psl1ght_shutdown(void); | 112 | EAPI void ecore_psl1ght_poll_events(void); |
112 | EAPI void | ||
113 | ecore_psl1ght_resolution_set(int width, int height); | ||
114 | EAPI void | ||
115 | ecore_psl1ght_poll_events(void); | ||
116 | 113 | ||
117 | EAPI void ecore_psl1ght_screen_resolution_get(int *w, int *h); | 114 | EAPI void ecore_psl1ght_screen_resolution_get(int *w, int *h); |
118 | EAPI void ecore_psl1ght_optimal_screen_resolution_get(int *w, int *h); | 115 | EAPI void ecore_psl1ght_optimal_screen_resolution_get(int *w, int *h); |
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in index 9b75b74..487231b 100644 --- a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in +++ b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in | |||
@@ -249,10 +249,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ | |||
249 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | 249 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ |
250 | PIXMAN_LIBS = @PIXMAN_LIBS@ | 250 | PIXMAN_LIBS = @PIXMAN_LIBS@ |
251 | PKG_CONFIG = @PKG_CONFIG@ | 251 | PKG_CONFIG = @PKG_CONFIG@ |
252 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
253 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
254 | POSUB = @POSUB@ | 252 | POSUB = @POSUB@ |
255 | RANLIB = @RANLIB@ | 253 | RANLIB = @RANLIB@ |
254 | SCIM_CFLAGS = @SCIM_CFLAGS@ | ||
255 | SCIM_LIBS = @SCIM_LIBS@ | ||
256 | SDL_CFLAGS = @SDL_CFLAGS@ | 256 | SDL_CFLAGS = @SDL_CFLAGS@ |
257 | SDL_CONFIG = @SDL_CONFIG@ | 257 | SDL_CONFIG = @SDL_CONFIG@ |
258 | SDL_LIBS = @SDL_LIBS@ | 258 | SDL_LIBS = @SDL_LIBS@ |
@@ -271,6 +271,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ | |||
271 | USE_NLS = @USE_NLS@ | 271 | USE_NLS = @USE_NLS@ |
272 | VERSION = @VERSION@ | 272 | VERSION = @VERSION@ |
273 | VMAJ = @VMAJ@ | 273 | VMAJ = @VMAJ@ |
274 | WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ | ||
275 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | ||
276 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | ||
277 | WAYLAND_LIBS = @WAYLAND_LIBS@ | ||
274 | WIN32_CFLAGS = @WIN32_CFLAGS@ | 278 | WIN32_CFLAGS = @WIN32_CFLAGS@ |
275 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | 279 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ |
276 | WIN32_LIBS = @WIN32_LIBS@ | 280 | WIN32_LIBS = @WIN32_LIBS@ |
@@ -384,6 +388,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ | |||
384 | ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ | 388 | ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ |
385 | ecore_imf_evas_libs = @ecore_imf_evas_libs@ | 389 | ecore_imf_evas_libs = @ecore_imf_evas_libs@ |
386 | ecore_imf_libs = @ecore_imf_libs@ | 390 | ecore_imf_libs = @ecore_imf_libs@ |
391 | ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ | ||
392 | ecore_imf_scim_libs = @ecore_imf_scim_libs@ | ||
387 | ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ | 393 | ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ |
388 | ecore_imf_xim_libs = @ecore_imf_xim_libs@ | 394 | ecore_imf_xim_libs = @ecore_imf_xim_libs@ |
389 | ecore_input_cflags = @ecore_input_cflags@ | 395 | ecore_input_cflags = @ecore_input_cflags@ |
@@ -396,6 +402,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ | |||
396 | ecore_psl1ght_libs = @ecore_psl1ght_libs@ | 402 | ecore_psl1ght_libs = @ecore_psl1ght_libs@ |
397 | ecore_sdl_cflags = @ecore_sdl_cflags@ | 403 | ecore_sdl_cflags = @ecore_sdl_cflags@ |
398 | ecore_sdl_libs = @ecore_sdl_libs@ | 404 | ecore_sdl_libs = @ecore_sdl_libs@ |
405 | ecore_wayland_cflags = @ecore_wayland_cflags@ | ||
406 | ecore_wayland_libs = @ecore_wayland_libs@ | ||
399 | ecore_win32_cflags = @ecore_win32_cflags@ | 407 | ecore_win32_cflags = @ecore_win32_cflags@ |
400 | ecore_win32_libs = @ecore_win32_libs@ | 408 | ecore_win32_libs = @ecore_win32_libs@ |
401 | ecore_wince_cflags = @ecore_wince_cflags@ | 409 | ecore_wince_cflags = @ecore_wince_cflags@ |
@@ -440,12 +448,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ | |||
440 | requirements_ecore_file = @requirements_ecore_file@ | 448 | requirements_ecore_file = @requirements_ecore_file@ |
441 | requirements_ecore_imf = @requirements_ecore_imf@ | 449 | requirements_ecore_imf = @requirements_ecore_imf@ |
442 | requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ | 450 | requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ |
451 | requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ | ||
443 | requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ | 452 | requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ |
444 | requirements_ecore_input = @requirements_ecore_input@ | 453 | requirements_ecore_input = @requirements_ecore_input@ |
445 | requirements_ecore_input_evas = @requirements_ecore_input_evas@ | 454 | requirements_ecore_input_evas = @requirements_ecore_input_evas@ |
446 | requirements_ecore_ipc = @requirements_ecore_ipc@ | 455 | requirements_ecore_ipc = @requirements_ecore_ipc@ |
447 | requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ | 456 | requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ |
448 | requirements_ecore_sdl = @requirements_ecore_sdl@ | 457 | requirements_ecore_sdl = @requirements_ecore_sdl@ |
458 | requirements_ecore_wayland = @requirements_ecore_wayland@ | ||
449 | requirements_ecore_win32 = @requirements_ecore_win32@ | 459 | requirements_ecore_win32 = @requirements_ecore_win32@ |
450 | requirements_ecore_wince = @requirements_ecore_wince@ | 460 | requirements_ecore_wince = @requirements_ecore_wince@ |
451 | requirements_ecore_x = @requirements_ecore_x@ | 461 | requirements_ecore_x = @requirements_ecore_x@ |
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c index 64cef9f..16487ad 100644 --- a/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c +++ b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c | |||
@@ -31,6 +31,7 @@ EAPI int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0; | |||
31 | EAPI int ECORE_PSL1GHT_EVENT_GOT_FOCUS = 0; | 31 | EAPI int ECORE_PSL1GHT_EVENT_GOT_FOCUS = 0; |
32 | EAPI int ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0; | 32 | EAPI int ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0; |
33 | EAPI int ECORE_PSL1GHT_EVENT_EXPOSE = 0; | 33 | EAPI int ECORE_PSL1GHT_EVENT_EXPOSE = 0; |
34 | EAPI int ECORE_PSL1GHT_EVENT_QUIT = 0; | ||
34 | 35 | ||
35 | static int _ecore_psl1ght_init_count = 0; | 36 | static int _ecore_psl1ght_init_count = 0; |
36 | static int window_width = 0; | 37 | static int window_width = 0; |
@@ -47,6 +48,7 @@ static KbMkey keyboard_mods = {{0}}; | |||
47 | static u16 keyboard_old_key = 0; | 48 | static u16 keyboard_old_key = 0; |
48 | /* Pad support */ | 49 | /* Pad support */ |
49 | static padData pad_data; | 50 | static padData pad_data; |
51 | static padData old_pad_data = {0}; | ||
50 | static int pad_old_x = 0; | 52 | static int pad_old_x = 0; |
51 | static int pad_old_o = 0; | 53 | static int pad_old_o = 0; |
52 | /* Move support */ | 54 | /* Move support */ |
@@ -148,6 +150,7 @@ ecore_psl1ght_init(const char *name __UNUSED__) | |||
148 | ECORE_PSL1GHT_EVENT_LOST_FOCUS = ecore_event_type_new(); | 150 | ECORE_PSL1GHT_EVENT_LOST_FOCUS = ecore_event_type_new(); |
149 | ECORE_PSL1GHT_EVENT_EXPOSE = ecore_event_type_new(); | 151 | ECORE_PSL1GHT_EVENT_EXPOSE = ecore_event_type_new(); |
150 | ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = ecore_event_type_new(); | 152 | ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = ecore_event_type_new(); |
153 | ECORE_PSL1GHT_EVENT_QUIT = ecore_event_type_new(); | ||
151 | 154 | ||
152 | mouse_x = 0; | 155 | mouse_x = 0; |
153 | mouse_y = 0; | 156 | mouse_y = 0; |
@@ -175,6 +178,7 @@ ecore_psl1ght_shutdown(void) | |||
175 | ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0; | 178 | ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0; |
176 | ECORE_PSL1GHT_EVENT_EXPOSE = 0; | 179 | ECORE_PSL1GHT_EVENT_EXPOSE = 0; |
177 | ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0; | 180 | ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0; |
181 | ECORE_PSL1GHT_EVENT_QUIT = 0; | ||
178 | 182 | ||
179 | ioPadEnd(); | 183 | ioPadEnd(); |
180 | ioMouseEnd(); | 184 | ioMouseEnd(); |
@@ -354,7 +358,6 @@ _ecore_psl1ght_event_key(u16 key) | |||
354 | ev->event_window = 0; | 358 | ev->event_window = 0; |
355 | ev->modifiers = _ecore_psl1ght_get_modifiers(); | 359 | ev->modifiers = _ecore_psl1ght_get_modifiers(); |
356 | 360 | ||
357 | printf ("Key is %X\n", key); | ||
358 | key &= ~KB_KEYPAD; | 361 | key &= ~KB_KEYPAD; |
359 | for (i = 0; i < sizeof(keystable) / sizeof(struct _ecore_psl1ght_keys_s); ++i) | 362 | for (i = 0; i < sizeof(keystable) / sizeof(struct _ecore_psl1ght_keys_s); ++i) |
360 | if (keystable[i].code == key) | 363 | if (keystable[i].code == key) |
@@ -364,13 +367,11 @@ _ecore_psl1ght_event_key(u16 key) | |||
364 | ev->string = keystable[i].compose; | 367 | ev->string = keystable[i].compose; |
365 | ev->compose = keystable[i].compose; | 368 | ev->compose = keystable[i].compose; |
366 | 369 | ||
367 | printf ("Found key '%s' in the table\n", ev->keyname); | ||
368 | return ev; | 370 | return ev; |
369 | } | 371 | } |
370 | 372 | ||
371 | utf16 = ioKbCnvRawCode (KB_MAPPING_101, keyboard_mods, keyboard_leds, key); | 373 | utf16 = ioKbCnvRawCode (KB_MAPPING_101, keyboard_mods, keyboard_leds, key); |
372 | unicodeToUtf8(utf16, utf8); | 374 | unicodeToUtf8(utf16, utf8); |
373 | printf ("Converting to utf16 : %X - utf8 : %s\n", utf16, utf8); | ||
374 | ev->keyname = ev->key = ev->string = ev->compose = strdup (utf8); | 375 | ev->keyname = ev->key = ev->string = ev->compose = strdup (utf8); |
375 | 376 | ||
376 | return ev; | 377 | return ev; |
@@ -460,6 +461,30 @@ _ecore_psl1ght_mouse_wheel(s8 wheel, s8 tilt) | |||
460 | ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); | 461 | ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); |
461 | } | 462 | } |
462 | 463 | ||
464 | static void | ||
465 | _ecore_psl1ght_pad_button (const char *name, int pressed) | ||
466 | { | ||
467 | Ecore_Event_Key *ev = NULL; | ||
468 | |||
469 | ev = malloc(sizeof(Ecore_Event_Key)); | ||
470 | if (!ev) return; | ||
471 | |||
472 | ev->timestamp = _ecore_psl1ght_get_time (); | ||
473 | ev->window = 0; | ||
474 | ev->event_window = 0; | ||
475 | ev->modifiers = 0; | ||
476 | |||
477 | ev->keyname = name; | ||
478 | ev->key = name; | ||
479 | ev->string = ""; | ||
480 | ev->compose = ""; | ||
481 | |||
482 | if (pressed) | ||
483 | ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, NULL, NULL); | ||
484 | else | ||
485 | ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL); | ||
486 | } | ||
487 | |||
463 | #define PAD_STICK_DEADZONE 0x20 | 488 | #define PAD_STICK_DEADZONE 0x20 |
464 | 489 | ||
465 | static void | 490 | static void |
@@ -502,15 +527,44 @@ _ecore_psl1ght_poll_joypad(void) | |||
502 | if (analog_h != 0 || analog_v != 0) | 527 | if (analog_h != 0 || analog_v != 0) |
503 | _ecore_psl1ght_mouse_move (analog_h, analog_v); | 528 | _ecore_psl1ght_mouse_move (analog_h, analog_v); |
504 | 529 | ||
505 | if (pad_old_x != pad_data.BTN_CROSS) | 530 | if (old_pad_data.BTN_CROSS ^ pad_data.BTN_CROSS) { |
531 | _ecore_psl1ght_pad_button ("Cross", pad_data.BTN_CROSS); | ||
506 | _ecore_psl1ght_mouse_button (1, pad_data.BTN_CROSS); | 532 | _ecore_psl1ght_mouse_button (1, pad_data.BTN_CROSS); |
507 | if (pad_old_o != pad_data.BTN_CIRCLE) | 533 | } |
534 | if (old_pad_data.BTN_CIRCLE ^ pad_data.BTN_CIRCLE) { | ||
535 | _ecore_psl1ght_pad_button ("Circle", pad_data.BTN_CIRCLE); | ||
508 | _ecore_psl1ght_mouse_button (3, pad_data.BTN_CIRCLE); | 536 | _ecore_psl1ght_mouse_button (3, pad_data.BTN_CIRCLE); |
509 | 537 | } | |
510 | pad_old_x = pad_data.BTN_CROSS; | 538 | if (old_pad_data.BTN_SQUARE ^ pad_data.BTN_SQUARE) |
511 | pad_old_o = pad_data.BTN_CIRCLE; | 539 | _ecore_psl1ght_pad_button ("Square", pad_data.BTN_SQUARE); |
512 | 540 | if (old_pad_data.BTN_TRIANGLE ^ pad_data.BTN_TRIANGLE) | |
513 | //pad_buttons = paddata.buttons; | 541 | _ecore_psl1ght_pad_button ("Triangle", pad_data.BTN_TRIANGLE); |
542 | if (old_pad_data.BTN_UP ^ pad_data.BTN_UP) | ||
543 | _ecore_psl1ght_pad_button ("Up", pad_data.BTN_UP); | ||
544 | if (old_pad_data.BTN_DOWN ^ pad_data.BTN_DOWN) | ||
545 | _ecore_psl1ght_pad_button ("Down", pad_data.BTN_DOWN); | ||
546 | if (old_pad_data.BTN_LEFT ^ pad_data.BTN_LEFT) | ||
547 | _ecore_psl1ght_pad_button ("Left", pad_data.BTN_LEFT); | ||
548 | if (old_pad_data.BTN_RIGHT ^ pad_data.BTN_RIGHT) | ||
549 | _ecore_psl1ght_pad_button ("Right", pad_data.BTN_RIGHT); | ||
550 | if (old_pad_data.BTN_L1 ^ pad_data.BTN_L1) | ||
551 | _ecore_psl1ght_pad_button ("L1", pad_data.BTN_L1); | ||
552 | if (old_pad_data.BTN_L2 ^ pad_data.BTN_L2) | ||
553 | _ecore_psl1ght_pad_button ("L2", pad_data.BTN_L2); | ||
554 | if (old_pad_data.BTN_L3 ^ pad_data.BTN_L3) | ||
555 | _ecore_psl1ght_pad_button ("L3", pad_data.BTN_L3); | ||
556 | if (old_pad_data.BTN_R1 ^ pad_data.BTN_R1) | ||
557 | _ecore_psl1ght_pad_button ("R1", pad_data.BTN_R1); | ||
558 | if (old_pad_data.BTN_R2 ^ pad_data.BTN_R2) | ||
559 | _ecore_psl1ght_pad_button ("R2", pad_data.BTN_R2); | ||
560 | if (old_pad_data.BTN_R3 ^ pad_data.BTN_R3) | ||
561 | _ecore_psl1ght_pad_button ("R3", pad_data.BTN_R3); | ||
562 | if (old_pad_data.BTN_START ^ pad_data.BTN_START) | ||
563 | _ecore_psl1ght_pad_button ("Start", pad_data.BTN_START); | ||
564 | if (old_pad_data.BTN_SELECT ^ pad_data.BTN_SELECT) | ||
565 | _ecore_psl1ght_pad_button ("Select", pad_data.BTN_SELECT); | ||
566 | |||
567 | old_pad_data = pad_data; | ||
514 | } | 568 | } |
515 | } | 569 | } |
516 | } | 570 | } |
@@ -602,7 +656,7 @@ _ecore_psl1ght_poll_move(void) | |||
602 | 656 | ||
603 | case 4: | 657 | case 4: |
604 | // Move button | 658 | // Move button |
605 | printf ("Calibrating\n"); | 659 | //printf ("Calibrating\n"); |
606 | gemCalibrate (0); | 660 | gemCalibrate (0); |
607 | calibrated = 1; | 661 | calibrated = 1; |
608 | break; | 662 | break; |
@@ -717,23 +771,24 @@ _ecore_psl1ght_poll_keyboard(void) | |||
717 | static void | 771 | static void |
718 | xmb_event_handler(u64 status, u64 param, void *user_data) | 772 | xmb_event_handler(u64 status, u64 param, void *user_data) |
719 | { | 773 | { |
720 | printf ("Received event %lX\n", status); | 774 | //printf ("Received event %lX\n", status); |
721 | if (status == SYSUTIL_EXIT_GAME) | 775 | switch (status) { |
722 | { | 776 | case SYSUTIL_EXIT_GAME: |
723 | ecore_main_loop_quit(); | 777 | ecore_event_add(ECORE_PSL1GHT_EVENT_QUIT, NULL, NULL, NULL); |
724 | } | 778 | break; |
725 | else if (status == SYSUTIL_MENU_OPEN) | 779 | case SYSUTIL_DRAW_BEGIN: |
726 | { | 780 | ecore_event_add(ECORE_PSL1GHT_EVENT_EXPOSE, NULL, NULL, NULL); |
727 | } | 781 | case SYSUTIL_MENU_OPEN: |
728 | else if (status == SYSUTIL_MENU_CLOSE) | 782 | ecore_event_add(ECORE_PSL1GHT_EVENT_LOST_FOCUS, NULL, NULL, NULL); |
729 | { | 783 | break; |
730 | } | 784 | case SYSUTIL_DRAW_END: |
731 | else if (status == SYSUTIL_DRAW_BEGIN) | 785 | ecore_event_add(ECORE_PSL1GHT_EVENT_EXPOSE, NULL, NULL, NULL); |
732 | { | 786 | case SYSUTIL_MENU_CLOSE: |
733 | } | 787 | ecore_event_add(ECORE_PSL1GHT_EVENT_GOT_FOCUS, NULL, NULL, NULL); |
734 | else if (status == SYSUTIL_DRAW_END) | 788 | break; |
735 | { | 789 | default: |
736 | } | 790 | break; |
791 | } | ||
737 | } | 792 | } |
738 | 793 | ||
739 | EAPI void | 794 | EAPI void |