| @@ -18,10 +18,10 @@ | |||||
| * so on. | * so on. | ||||
| */ | */ | ||||
| #include <iostream> | |||||
| #include "caca++.h" | #include "caca++.h" | ||||
| Caca::Caca(Cucul *cv) | Caca::Caca(Cucul *cv) | ||||
| { | { | ||||
| dp = caca_create_display(cv->get_cucul_canvas_t()); | dp = caca_create_display(cv->get_cucul_canvas_t()); | ||||
| @@ -78,7 +78,7 @@ int Caca::setTitle(char const *s) | |||||
| int Caca::getEvent(unsigned int g, Event *n, int aa) | int Caca::getEvent(unsigned int g, Event *n, int aa) | ||||
| { | { | ||||
| return caca_get_event(dp, g, &n->e, aa); | |||||
| return caca_get_event(dp, g, n ? &n->e : NULL, aa); | |||||
| } | } | ||||
| unsigned int Caca::getMouseX() | unsigned int Caca::getMouseX() | ||||
| @@ -47,7 +47,7 @@ class Event | |||||
| } type; | } type; | ||||
| protected: | protected: | ||||
| caca_event e; | |||||
| caca_event_t e; | |||||
| }; | }; | ||||
| class Caca | class Caca | ||||
| @@ -43,7 +43,6 @@ int main(int argc, char *argv[]) | |||||
| { | { | ||||
| Cucul *qq, *pig; | Cucul *qq, *pig; | ||||
| Caca *kk; | Caca *kk; | ||||
| Event ev; | |||||
| int x = 0, y = 0, ix = 1, iy = 1; | int x = 0, y = 0, ix = 1, iy = 1; | ||||
| @@ -76,7 +75,7 @@ int main(int argc, char *argv[]) | |||||
| kk->setDisplayTime(20000); | kk->setDisplayTime(20000); | ||||
| while(!kk->getEvent(ev.CACA_EVENT_KEY_PRESS, &ev, 0)) { | |||||
| while(!kk->getEvent(Event::CACA_EVENT_KEY_PRESS, NULL, 0)) { | |||||
| /* In case of resize ...*/ | /* In case of resize ...*/ | ||||