You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 line
1.1 KiB

  1. #include "caca++.h"
  2. Caca::Caca(void)
  3. {
  4. }
  5. Caca::Caca(Cucul *qq)
  6. {
  7. kk = caca_attach(qq->get_cucul_t());
  8. if(!kk) throw -1;
  9. }
  10. Caca::~Caca()
  11. {
  12. caca_detach(kk);
  13. }
  14. void Caca::attach(Cucul *qq)
  15. {
  16. kk = caca_attach(qq->get_cucul_t());
  17. if(!kk) throw -1;
  18. }
  19. void Caca::detach ()
  20. {
  21. caca_detach(kk);
  22. }
  23. void Caca::set_delay (unsigned int d)
  24. {
  25. caca_set_delay(kk, d);
  26. }
  27. void Caca::display ()
  28. {
  29. caca_display(kk);
  30. }
  31. unsigned int Caca::get_rendertime ()
  32. {
  33. return caca_get_rendertime(kk);
  34. }
  35. unsigned int Caca::get_window_width ()
  36. {
  37. return caca_get_window_width(kk);
  38. }
  39. unsigned int Caca::get_window_height ()
  40. {
  41. return caca_get_window_height(kk);
  42. }
  43. int Caca::set_window_title (char const *s)
  44. {
  45. return caca_set_window_title(kk, s);
  46. }
  47. int Caca::get_event (unsigned int g, Caca::Event *n, int aa)
  48. {
  49. return caca_get_event(kk, g, n->e, aa);
  50. }
  51. unsigned int Caca::get_mouse_x ()
  52. {
  53. return caca_get_mouse_x(kk);
  54. }
  55. unsigned int Caca::get_mouse_y ()
  56. {
  57. return caca_get_mouse_x(kk);
  58. }
  59. void Caca::set_mouse (int v)
  60. {
  61. caca_set_mouse(kk, v);
  62. }