ScummVM API documentation
android-graphics.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef BACKENDS_GRAPHICS_ANDROID_ANDROID_GRAPHICS_H
23#define BACKENDS_GRAPHICS_ANDROID_ANDROID_GRAPHICS_H
24
25#include "common/scummsys.h"
26#include "backends/graphics/opengl/opengl-graphics.h"
27
28#include "backends/platform/android/touchcontrols.h"
29
32public:
35
36 void initSurface();
37 void deinitSurface();
38 void resizeSurface();
39
41
42 void updateScreen() override;
43
44 void displayMessageOnOSD(const Common::U32String &msg) override;
45
46 bool notifyMousePosition(Common::Point &mouse);
47 Common::Point getMousePosition() { return Common::Point(_cursorX, _cursorY); }
48
49 float getHiDPIScreenFactor() const override;
50
51 void touchControlInitSurface(const Graphics::ManagedSurface &surf) override;
52 void touchControlNotifyChanged() override;
53 void touchControlDraw(uint8 alpha, int16 x, int16 y, int16 w, int16 h, const Common::Rect &clip) override;
54
55 void syncVirtkeyboardState(bool virtkeybd_on);
56 void applyTouchSettings() const;
57
58protected:
59 void recalculateDisplayAreas() override;
60 void setSystemMousePosition(const int x, const int y) override {}
61
62 void showOverlay(bool inGUI) override;
63 void hideOverlay() override;
64
65
66 bool loadVideoMode(uint requestedWidth, uint requestedHeight, bool resizable, int antialiasing) override;
67
68 void refreshScreen() override;
69
70private:
71 OpenGL::Surface *_touchcontrols;
72 int _old_touch_mode;
73 bool _rendering3d;
74};
75
76#endif
Definition: android-graphics.h:31
void recalculateDisplayAreas() override
WindowedGraphicsManager::Insets getSafeAreaInsets() const override
bool loadVideoMode(uint requestedWidth, uint requestedHeight, bool resizable, int antialiasing) override
void refreshScreen() override
void setSystemMousePosition(const int x, const int y) override
Definition: android-graphics.h:60
Definition: ustr.h:57
Definition: managed_surface.h:51
Definition: opengl-graphics.h:60
Definition: texture.h:43
Definition: touchcontrols.h:31
int _cursorX
Definition: windowed.h:578
Definition: rect.h:144
Definition: rect.h:536
Definition: windowed.h:330