Ver código fonte

* Handle CACA_EVENT_QUIT in the event test program.

tags/v0.99.beta14
Sam Hocevar sam 18 anos atrás
pai
commit
2df91e7617
1 arquivos alterados com 5 adições e 2 exclusões
  1. +5
    -2
      test/event.c

+ 5
- 2
test/event.c Ver arquivo

@@ -118,12 +118,12 @@ static void print_event(int x, int y, caca_event_t *ev)
case CACA_EVENT_KEY_PRESS:
character = ev->data.key.c;
cucul_printf(qq, x, y, "CACA_EVENT_KEY_PRESS 0x%02x (%c)", character,
(character > 0x20 && character < 0x80) ? character : '?');
(character > 0x1f && character < 0x80) ? character : '?');
break;
case CACA_EVENT_KEY_RELEASE:
character = ev->data.key.c;
cucul_printf(qq, x, y, "CACA_EVENT_KEY_RELEASE 0x%02x (%c)", character,
(character > 0x20 && character < 0x80) ? character : '?');
(character > 0x1f && character < 0x80) ? character : '?');
break;
case CACA_EVENT_MOUSE_MOTION:
cucul_printf(qq, x, y, "CACA_EVENT_MOUSE_MOTION %u %u",
@@ -141,6 +141,9 @@ static void print_event(int x, int y, caca_event_t *ev)
cucul_printf(qq, x, y, "CACA_EVENT_RESIZE %u %u",
ev->data.resize.w, ev->data.resize.h);
break;
case CACA_EVENT_QUIT:
cucul_printf(qq, x, y, "CACA_EVENT_QUIT");
break;
default:
cucul_printf(qq, x, y, "CACA_EVENT_UNKNOWN");
}


Carregando…
Cancelar
Salvar