|
|
@@ -20,81 +20,77 @@ |
|
|
|
|
|
|
|
#include "caca++.h" |
|
|
|
|
|
|
|
Caca::Caca(void) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Caca::Caca(Cucul *cv) |
|
|
|
Caca::Caca(Cucul *cv) |
|
|
|
{ |
|
|
|
dp = caca_create_display(cv->get_cucul_canvas_t()); |
|
|
|
if(!dp) |
|
|
|
throw -1; |
|
|
|
} |
|
|
|
|
|
|
|
Caca::~Caca() |
|
|
|
Caca::~Caca() |
|
|
|
{ |
|
|
|
caca_free_display(dp); |
|
|
|
} |
|
|
|
|
|
|
|
void Caca::attach(Cucul *cv) |
|
|
|
void Caca::Attach(Cucul *cv) |
|
|
|
{ |
|
|
|
dp = caca_create_display(cv->get_cucul_canvas_t()); |
|
|
|
if(!dp) |
|
|
|
throw -1; |
|
|
|
} |
|
|
|
|
|
|
|
void Caca::detach() |
|
|
|
void Caca::Detach() |
|
|
|
{ |
|
|
|
caca_free_display(dp); |
|
|
|
} |
|
|
|
|
|
|
|
void Caca::set_delay(unsigned int d) |
|
|
|
void Caca::setDelay(unsigned int d) |
|
|
|
{ |
|
|
|
caca_set_delay(dp, d); |
|
|
|
} |
|
|
|
|
|
|
|
void Caca::display() |
|
|
|
void Caca::Display() |
|
|
|
{ |
|
|
|
caca_refresh_display(dp); |
|
|
|
} |
|
|
|
|
|
|
|
unsigned int Caca::get_rendertime() |
|
|
|
unsigned int Caca::getRendertime() |
|
|
|
{ |
|
|
|
return caca_get_rendertime(dp); |
|
|
|
} |
|
|
|
|
|
|
|
unsigned int Caca::get_display_width() |
|
|
|
unsigned int Caca::getWidth() |
|
|
|
{ |
|
|
|
return caca_get_display_width(dp); |
|
|
|
} |
|
|
|
|
|
|
|
unsigned int Caca::get_display_height() |
|
|
|
unsigned int Caca::getHeight() |
|
|
|
{ |
|
|
|
return caca_get_display_height(dp); |
|
|
|
} |
|
|
|
|
|
|
|
int Caca::set_display_title(char const *s) |
|
|
|
int Caca::setTitle(char const *s) |
|
|
|
{ |
|
|
|
return caca_set_display_title(dp, s); |
|
|
|
} |
|
|
|
|
|
|
|
int Caca::get_event(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); |
|
|
|
} |
|
|
|
|
|
|
|
unsigned int Caca::get_mouse_x() |
|
|
|
unsigned int Caca::getMouseX() |
|
|
|
{ |
|
|
|
return caca_get_mouse_x(dp); |
|
|
|
} |
|
|
|
|
|
|
|
unsigned int Caca::get_mouse_y() |
|
|
|
unsigned int Caca::getMouseY() |
|
|
|
{ |
|
|
|
return caca_get_mouse_x(dp); |
|
|
|
} |
|
|
|
|
|
|
|
void Caca::set_mouse(int v) |
|
|
|
void Caca::setMouse(int v) |
|
|
|
{ |
|
|
|
caca_set_mouse(dp, v); |
|
|
|
} |
|
|
|