From 7e34c452a1140e20ddb136ec91d37c0d5f07b052 Mon Sep 17 00:00:00 2001 From: Tulioh Date: Mon, 22 Dec 2014 00:37:07 -0200 Subject: [PATCH] Added some files to this commit --- src/framework/platform/sdlwindow.cpp | 91 ++++++++++++++++++++++++++++ src/framework/platform/sdlwindow.h | 43 +++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 src/framework/platform/sdlwindow.cpp create mode 100644 src/framework/platform/sdlwindow.h diff --git a/src/framework/platform/sdlwindow.cpp b/src/framework/platform/sdlwindow.cpp new file mode 100644 index 00000000..3559948a --- /dev/null +++ b/src/framework/platform/sdlwindow.cpp @@ -0,0 +1,91 @@ +#include "sdlwindow.h" + +void SDLWindow::init() { +} + +void SDLWindow::terminate() { +} + +void SDLWindow::move(const Point& pos) { + // android doesn't has window +} + +void SDLWindow::resize(const Size& size) { + // android doesn't resize window +} + +void SDLWindow::show() { + // android doesn't need to show activity, it's open automacally +} + +void SDLWindow::hide() { + +} + +void SDLWindow::maximize() { + // android doesn't has window +} + +void SDLWindow::poll() { + +} + +void SDLWindow::swapBuffers() { +} + +void SDLWindow::showMouse() { + // android doesn't has mouse +} + +void SDLWindow::hideMouse() { + // android doesn't has mouse +} + +int SDLWindow::internalLoadMouseCursor(const ImagePtr& image, const Point& hotSpot) { + // android doesn't has mouse + return 0; +} + +void SDLWindow::setMouseCursor(int cursorId) { + // android doesn't has mouse +} + +void SDLWindow::restoreMouseCursor() { + // android doesn't has mouse +} + +void SDLWindow::setTitle(const std::string& title) { + // android doesn't need to set title, the app make it +} + +void SDLWindow::setMinimumSize(const Size& minimumSize) { + // android doesn't has window +} + +void SDLWindow::setFullscreen(bool fullscreen) { + // android doesn't has window +} + +void SDLWindow::setVerticalSync(bool enable) { + // TODO +} + +void SDLWindow::setIcon(const std::string& iconFile) { + // android doesn't has window +} + +void SDLWindow::setClipboardText(const std::string& text) { +} + +Size SDLWindow::getDisplaySize() { + Size TODO; + return TODO; +} + +std::string SDLWindow::getClipboardText() { + return nullptr; +} + +std::string SDLWindow::getPlatformType() { + return "Android"; +} diff --git a/src/framework/platform/sdlwindow.h b/src/framework/platform/sdlwindow.h new file mode 100644 index 00000000..9757b67f --- /dev/null +++ b/src/framework/platform/sdlwindow.h @@ -0,0 +1,43 @@ +#ifndef SDL_PLATFORM_H +#define SDL_PLATFORM_H + +#include "platformwindow.h" + +#ifdef OPENGL_ES +#include +#endif + +class SDLWindow : public PlatformWindow +{ +public: + void init(); + void terminate(); + + void move(const Point& pos); + void resize(const Size& size); + void show(); + void hide(); + void maximize(); + void poll(); + void swapBuffers(); + void showMouse(); + void hideMouse(); + + void setMouseCursor(int cursorId); + void restoreMouseCursor(); + + void setTitle(const std::string& title); + void setMinimumSize(const Size& minimumSize); + void setFullscreen(bool fullscreen); + void setVerticalSync(bool enable); + void setIcon(const std::string& iconFile); + void setClipboardText(const std::string& text); + + Size getDisplaySize(); + std::string getClipboardText(); + std::string getPlatformType(); +protected: + int internalLoadMouseCursor(const ImagePtr& image, const Point& hotSpot); +}; + +#endif