- Timestamp:
- Apr 26, 2006, 1:57:30 PM (15 years ago)
- Location:
- libcaca/trunk/cpp
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cpp/caca++.cpp
r831 r897 21 21 #include "caca++.h" 22 22 23 Caca::Caca(void)24 {25 23 26 } 27 28 Caca::Caca(Cucul *cv) 24 Caca::Caca(Cucul *cv) 29 25 { 30 26 dp = caca_create_display(cv->get_cucul_canvas_t()); … … 33 29 } 34 30 35 Caca::~Caca() 31 Caca::~Caca() 36 32 { 37 33 caca_free_display(dp); 38 34 } 39 35 40 void Caca:: attach(Cucul *cv)36 void Caca::Attach(Cucul *cv) 41 37 { 42 38 dp = caca_create_display(cv->get_cucul_canvas_t()); … … 45 41 } 46 42 47 void Caca:: detach()43 void Caca::Detach() 48 44 { 49 45 caca_free_display(dp); 50 46 } 51 47 52 void Caca::set _delay(unsigned int d)48 void Caca::setDelay(unsigned int d) 53 49 { 54 50 caca_set_delay(dp, d); 55 51 } 56 52 57 void Caca:: display()53 void Caca::Display() 58 54 { 59 55 caca_refresh_display(dp); 60 56 } 61 57 62 unsigned int Caca::get _rendertime()58 unsigned int Caca::getRendertime() 63 59 { 64 60 return caca_get_rendertime(dp); 65 61 } 66 62 67 unsigned int Caca::get _display_width()63 unsigned int Caca::getWidth() 68 64 { 69 65 return caca_get_display_width(dp); 70 66 } 71 67 72 unsigned int Caca::get _display_height()68 unsigned int Caca::getHeight() 73 69 { 74 70 return caca_get_display_height(dp); 75 71 } 76 72 77 int Caca::set _display_title(char const *s)73 int Caca::setTitle(char const *s) 78 74 { 79 75 return caca_set_display_title(dp, s); 80 76 } 81 77 82 int Caca::get _event(unsigned int g, Event *n, int aa)78 int Caca::getEvent(unsigned int g, Event *n, int aa) 83 79 { 84 80 return caca_get_event(dp, g, &n->e, aa); 85 81 } 86 82 87 unsigned int Caca::get _mouse_x()83 unsigned int Caca::getMouseX() 88 84 { 89 85 return caca_get_mouse_x(dp); 90 86 } 91 87 92 unsigned int Caca::get _mouse_y()88 unsigned int Caca::getMouseY() 93 89 { 94 90 return caca_get_mouse_x(dp); 95 91 } 96 92 97 void Caca::set _mouse(int v)93 void Caca::setMouse(int v) 98 94 { 99 95 caca_set_mouse(dp, v); -
libcaca/trunk/cpp/caca++.h
r838 r897 57 57 ~Caca(); 58 58 59 void attach(Cucul *cv);60 void detach();61 void set _delay(unsigned int);62 void display();63 unsigned int get _rendertime();64 unsigned int get _display_width();65 unsigned int get _display_height();66 int set _display_title(char const *);67 int get _event(unsigned int, Event*, int);68 unsigned int get _mouse_x();69 unsigned int get _mouse_y();70 void set _mouse(int);59 void Attach(Cucul *cv); 60 void Detach(); 61 void setDelay(unsigned int); 62 void Display(); 63 unsigned int getRendertime(); 64 unsigned int getWidth(); 65 unsigned int getHeight(); 66 int setTitle(char const *); 67 int getEvent(unsigned int, Event*, int); 68 unsigned int getMouseX(); 69 unsigned int getMouseY(); 70 void setMouse(int); 71 71 72 72 private: -
libcaca/trunk/cpp/cpptest.cpp
r892 r897 68 68 } 69 69 70 kk->set _delay(20000);70 kk->setDelay(20000); 71 71 72 while(!kk->get _event(ev.CACA_EVENT_KEY_PRESS, &ev, 0)) {72 while(!kk->getEvent(ev.CACA_EVENT_KEY_PRESS, &ev, 0)) { 73 73 74 74 /* Draw pig */ … … 83 83 84 84 /* Blit */ 85 kk-> display();85 kk->Display(); 86 86 87 87 x+=ix; -
libcaca/trunk/cpp/cucul++.cpp
r892 r897 37 37 } 38 38 39 Cucul::Cucul(void const *data, unsigned int size, char const *format) 40 { 41 cv = cucul_import_canvas(data, size, format); 42 if(!cv) throw -1; 43 } 44 39 45 Cucul::~Cucul() 40 46 { … … 288 294 { 289 295 font = cucul_load_font(s, v); 296 if(!font) throw -1; 290 297 } 291 298 … … 318 325 { 319 326 buffer = cucul_export_canvas(cv->get_cucul_canvas_t(), buf); 327 if(!buffer) throw -1; 320 328 } 321 329 -
libcaca/trunk/cpp/cucul++.h
r892 r897 92 92 Cucul(); 93 93 Cucul(int width, int height); 94 Cucul(void const *, unsigned int, char const *); 94 95 ~Cucul(); 95 96
Note: See TracChangeset
for help on using the changeset viewer.