mirror of
https://github.com/edubart/otclient.git
synced 2025-06-05 18:44:28 +02:00
Added some files to this commit
This commit is contained in:
parent
b3b314f01b
commit
7e34c452a1
91
src/framework/platform/sdlwindow.cpp
Normal file
91
src/framework/platform/sdlwindow.cpp
Normal file
@ -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";
|
||||
}
|
43
src/framework/platform/sdlwindow.h
Normal file
43
src/framework/platform/sdlwindow.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef SDL_PLATFORM_H
|
||||
#define SDL_PLATFORM_H
|
||||
|
||||
#include "platformwindow.h"
|
||||
|
||||
#ifdef OPENGL_ES
|
||||
#include <EGL/egl.h>
|
||||
#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
|
Loading…
x
Reference in New Issue
Block a user