diff --git a/cxx/caca++.cpp b/cxx/caca++.cpp index bf3d168..d3b845b 100644 --- a/cxx/caca++.cpp +++ b/cxx/caca++.cpp @@ -92,6 +92,6 @@ unsigned int Caca::getMouseY() void Caca::setMouse(int v) { - caca_set_mouse(dp, v); + caca_set_mouse(dp, v); } diff --git a/cxx/caca++.h b/cxx/caca++.h index c089dbd..5133eef 100644 --- a/cxx/caca++.h +++ b/cxx/caca++.h @@ -30,28 +30,28 @@ class Event { friend class Caca; - public: + public: enum caca_event_type - { - CACA_EVENT_NONE = 0x0000, /**< No event. */ + { + CACA_EVENT_NONE = 0x0000, /**< No event. */ - CACA_EVENT_KEY_PRESS = 0x0001, /**< A key was pressed. */ - CACA_EVENT_KEY_RELEASE = 0x0002, /**< A key was released. */ - CACA_EVENT_MOUSE_PRESS = 0x0004, /**< A mouse button was pressed. */ - CACA_EVENT_MOUSE_RELEASE = 0x0008, /**< A mouse button was released. */ - CACA_EVENT_MOUSE_MOTION = 0x0010, /**< The mouse was moved. */ - CACA_EVENT_RESIZE = 0x0020, /**< The window was resized. */ + CACA_EVENT_KEY_PRESS = 0x0001, /**< A key was pressed. */ + CACA_EVENT_KEY_RELEASE = 0x0002, /**< A key was released. */ + CACA_EVENT_MOUSE_PRESS = 0x0004, /**< A mouse button was pressed. */ + CACA_EVENT_MOUSE_RELEASE = 0x0008, /**< A mouse button was released. */ + CACA_EVENT_MOUSE_MOTION = 0x0010, /**< The mouse was moved. */ + CACA_EVENT_RESIZE = 0x0020, /**< The window was resized. */ - CACA_EVENT_ANY = 0xffff /**< Bitmask for any event. */ - } type; + CACA_EVENT_ANY = 0xffff /**< Bitmask for any event. */ + } type; - protected: + protected: caca_event e; }; class Caca { - public: + public: Caca(); Caca(Cucul *cv); ~Caca(); @@ -69,7 +69,7 @@ class Caca unsigned int getMouseY(); void setMouse(int); - private: + private: caca_display_t *dp; }; diff --git a/cxx/cucul++.h b/cxx/cucul++.h index 9a95963..53b963e 100644 --- a/cxx/cucul++.h +++ b/cxx/cucul++.h @@ -38,10 +38,10 @@ class Font unsigned int getWidth(); unsigned int getHeight(); void renderCanvas(Cucul *, unsigned char *, unsigned int, unsigned int, unsigned int); - + private: cucul_font *font; - + }; class Dither @@ -92,7 +92,7 @@ class Cucul friend class Dither; friend class Font; friend class Buffer; - public: + public: Cucul(); Cucul(int width, int height); Cucul(Buffer *, char const *); @@ -128,10 +128,10 @@ class Cucul void fillTriangle(int, int, int, int, int, int, char const *); int Rand(int, int); - protected: + protected: cucul_canvas_t *get_cucul_canvas_t(); - private: + private: cucul_canvas_t *cv; }; diff --git a/src/cacadraw.c b/src/cacadraw.c index 18dd7a7..85bd74c 100644 --- a/src/cacadraw.c +++ b/src/cacadraw.c @@ -90,8 +90,8 @@ int main(int argc, char **argv) case CACA_KEY_RIGHT: x += 2; refresh = 1; goto stopevents; case CACA_KEY_UP: y--; refresh = 1; goto stopevents; case CACA_KEY_DOWN: y++; refresh = 1; goto stopevents; - case CACA_KEY_PAGEUP: y-=25; refresh = 1; goto stopevents; - case CACA_KEY_PAGEDOWN: y+=25; refresh = 1; goto stopevents; + case CACA_KEY_PAGEUP: y-=25; refresh = 1; goto stopevents; + case CACA_KEY_PAGEDOWN: y+=25; refresh = 1; goto stopevents; case CACA_KEY_ESCAPE: case 'q': goto quit;