From be9b998b2ee87c0238c2ed1b41c8c2bc723f4ce4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 28 Jul 2014 20:06:11 +0300 Subject: Fix formatting in gui files. --- src/gui/sdlinput.h | 116 ++++++++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 59 deletions(-) (limited to 'src/gui/sdlinput.h') diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index eddfe65a1..54965ab89 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -91,65 +91,63 @@ */ class SDLInput final { -public: - /** - * Constructor. - */ - SDLInput(); - - A_DELETE_COPY(SDLInput) - - /** - * Pushes an SDL event. It should be called at least once per frame to - * update input with user input. - * - * @param event an event from SDL. - */ - void pushInput(const SDL_Event &event); - - KeyInput dequeueKeyInput() A_WARN_UNUSED; - - // Inherited from SDLInput - - bool isKeyQueueEmpty() const A_WARN_UNUSED - { return mKeyInputQueue.empty(); } - - bool isMouseQueueEmpty() const A_WARN_UNUSED - { return mMouseInputQueue.empty(); } - - MouseInput dequeueMouseInput() A_WARN_UNUSED; - - void simulateMouseClick(const int x, const int y, - const MouseButton::Type button); - -protected: - /** - * Converts a mouse button from SDL to a Guichan mouse button - * representation. - * - * @param button an SDL mouse button. - * @return a Guichan mouse button. - */ - static MouseButton::Type convertMouseButton(const int button) - A_WARN_UNUSED; - - /** - * Converts an SDL event key to a key value. - * - * @param event an SDL event with a key to convert. - * @return a key value. - * @see Key - */ - static int convertKeyCharacter(const SDL_Event &event) A_WARN_UNUSED; - - static void convertKeyEventToKey(const SDL_Event &event, - KeyInput &keyInput); - - std::queue mKeyInputQueue; - std::queue mMouseInputQueue; - - bool mMouseDown; - bool mMouseInWindow; + public: + /** + * Constructor. + */ + SDLInput(); + + A_DELETE_COPY(SDLInput) + + /** + * Pushes an SDL event. It should be called at least once per frame to + * update input with user input. + * + * @param event an event from SDL. + */ + void pushInput(const SDL_Event &event); + + KeyInput dequeueKeyInput() A_WARN_UNUSED; + + bool isKeyQueueEmpty() const A_WARN_UNUSED + { return mKeyInputQueue.empty(); } + + bool isMouseQueueEmpty() const A_WARN_UNUSED + { return mMouseInputQueue.empty(); } + + MouseInput dequeueMouseInput() A_WARN_UNUSED; + + void simulateMouseClick(const int x, const int y, + const MouseButton::Type button); + + protected: + /** + * Converts a mouse button from SDL to a Guichan mouse button + * representation. + * + * @param button an SDL mouse button. + * @return a Guichan mouse button. + */ + static MouseButton::Type convertMouseButton(const int button) + A_WARN_UNUSED; + + /** + * Converts an SDL event key to a key value. + * + * @param event an SDL event with a key to convert. + * @return a key value. + * @see Key + */ + static int convertKeyCharacter(const SDL_Event &event) A_WARN_UNUSED; + + static void convertKeyEventToKey(const SDL_Event &event, + KeyInput &keyInput); + + std::queue mKeyInputQueue; + std::queue mMouseInputQueue; + + bool mMouseDown; + bool mMouseInWindow; }; #endif // GUI_SDLINPUT_H -- cgit v1.2.3-70-g09d2