diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-28 20:06:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-28 20:06:11 +0300 |
commit | be9b998b2ee87c0238c2ed1b41c8c2bc723f4ce4 (patch) | |
tree | 30427f083bce1d1a67ab3ad17d33a87ee9b21565 /src/gui/sdlinput.h | |
parent | 861c503c608b41256bca47dedee15dc01e09527d (diff) | |
download | mv-be9b998b2ee87c0238c2ed1b41c8c2bc723f4ce4.tar.gz mv-be9b998b2ee87c0238c2ed1b41c8c2bc723f4ce4.tar.bz2 mv-be9b998b2ee87c0238c2ed1b41c8c2bc723f4ce4.tar.xz mv-be9b998b2ee87c0238c2ed1b41c8c2bc723f4ce4.zip |
Fix formatting in gui files.
Diffstat (limited to 'src/gui/sdlinput.h')
-rw-r--r-- | src/gui/sdlinput.h | 116 |
1 files changed, 57 insertions, 59 deletions
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<KeyInput> mKeyInputQueue; - std::queue<MouseInput> 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<KeyInput> mKeyInputQueue; + std::queue<MouseInput> mMouseInputQueue; + + bool mMouseDown; + bool mMouseInWindow; }; #endif // GUI_SDLINPUT_H |