summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/file_access_jandroid.cpp1
-rw-r--r--platform/iphone/icloud.mm2
-rw-r--r--platform/iphone/in_app_store.mm1
-rw-r--r--platform/javascript/display_server_javascript.cpp2
-rw-r--r--platform/linuxbsd/context_gl_x11.cpp1
-rw-r--r--platform/linuxbsd/display_server_x11.cpp19
-rw-r--r--platform/osx/display_server_osx.mm2
-rw-r--r--platform/osx/joypad_osx.cpp1
-rw-r--r--platform/server/os_server.cpp1
-rw-r--r--platform/uwp/app.cpp1
-rw-r--r--platform/uwp/os_uwp.cpp4
-rw-r--r--platform/windows/display_server_windows.cpp28
-rw-r--r--platform/windows/joypad_windows.cpp1
-rw-r--r--platform/windows/os_windows.cpp2
14 files changed, 66 insertions, 0 deletions
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp
index 4095be00ab..df8b57fd3a 100644
--- a/platform/android/file_access_jandroid.cpp
+++ b/platform/android/file_access_jandroid.cpp
@@ -123,6 +123,7 @@ uint8_t FileAccessJAndroid::get_8() const {
get_buffer(&byte, 1);
return byte;
}
+
int FileAccessJAndroid::get_buffer(uint8_t *p_dst, int p_length) const {
ERR_FAIL_COND_V_MSG(!is_open(), 0, "File must be opened before use.");
if (p_length == 0)
diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm
index 343af744d5..c768274b1f 100644
--- a/platform/iphone/icloud.mm
+++ b/platform/iphone/icloud.mm
@@ -282,6 +282,7 @@ Error ICloud::synchronize_key_values() {
return FAILED;
}
}
+
/*
Error ICloud::initial_sync() {
//you sometimes have to write something to the store to get it to download new data. go apple!
@@ -296,6 +297,7 @@ Error ICloud::initial_sync() {
}
return synchronize();
}
+
*/
ICloud::ICloud() {
ERR_FAIL_COND(instance != NULL);
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm
index f3e8ff141b..a2efd6691b 100644
--- a/platform/iphone/in_app_store.mm
+++ b/platform/iphone/in_app_store.mm
@@ -57,6 +57,7 @@ NSMutableDictionary *pending_transactions = [NSMutableDictionary dictionary];
[numberFormatter release];
return formattedString;
}
+
@end
InAppStore *InAppStore::instance = NULL;
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index 758e48ce81..b95674efc3 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -673,6 +673,7 @@ bool DisplayServerJavaScript::is_joy_known(int p_device) {
return Input::get_singleton()->is_joy_mapped(p_device);
}
+
String DisplayServerJavaScript::get_joy_guid(int p_device) const {
return Input::get_singleton()->get_joy_guid_remapped(p_device);
@@ -1076,6 +1077,7 @@ void DisplayServerJavaScript::window_set_current_screen(int p_screen, WindowID p
Point2i DisplayServerJavaScript::window_get_position(WindowID p_window) const {
return Point2i(); // TODO Does this need implementation?
}
+
void DisplayServerJavaScript::window_set_position(const Point2i &p_position, WindowID p_window) {
// Not supported.
}
diff --git a/platform/linuxbsd/context_gl_x11.cpp b/platform/linuxbsd/context_gl_x11.cpp
index c9b95b41a3..71dc9602b3 100644
--- a/platform/linuxbsd/context_gl_x11.cpp
+++ b/platform/linuxbsd/context_gl_x11.cpp
@@ -227,6 +227,7 @@ void ContextGL_X11::set_use_vsync(bool p_use) {
return;
use_vsync = p_use;
}
+
bool ContextGL_X11::is_using_vsync() const {
return use_vsync;
}
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index e2f0a53f0f..813acc5b0e 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -127,6 +127,7 @@ bool DisplayServerX11::has_feature(Feature p_feature) const {
return false;
}
+
String DisplayServerX11::get_name() const {
return "X11";
}
@@ -400,6 +401,7 @@ void DisplayServerX11::mouse_set_mode(MouseMode p_mode) {
XFlush(x11_display);
}
+
DisplayServerX11::MouseMode DisplayServerX11::mouse_get_mode() const {
return mouse_mode;
}
@@ -547,6 +549,7 @@ int DisplayServerX11::get_screen_count() const {
XFree(xsi);
return count;
}
+
Point2i DisplayServerX11::screen_get_position(int p_screen) const {
_THREAD_SAFE_METHOD_
@@ -644,6 +647,7 @@ int DisplayServerX11::screen_get_dpi(int p_screen) const {
//could not get dpi
return 96;
}
+
bool DisplayServerX11::screen_is_touchscreen(int p_screen) const {
_THREAD_SAFE_METHOD_
@@ -760,6 +764,7 @@ void DisplayServerX11::window_set_input_event_callback(const Callable &p_callabl
WindowData &wd = windows[p_window];
wd.input_event_callback = p_callable;
}
+
void DisplayServerX11::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -795,6 +800,7 @@ int DisplayServerX11::window_get_current_screen(WindowID p_window) const {
}
return 0;
}
+
void DisplayServerX11::window_set_current_screen(int p_screen, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -926,6 +932,7 @@ void DisplayServerX11::window_set_max_size(const Size2i p_size, WindowID p_windo
XFlush(x11_display);
}
}
+
Size2i DisplayServerX11::window_get_max_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -967,6 +974,7 @@ void DisplayServerX11::window_set_min_size(const Size2i p_size, WindowID p_windo
XFlush(x11_display);
}
}
+
Size2i DisplayServerX11::window_get_min_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1037,6 +1045,7 @@ void DisplayServerX11::window_set_size(const Size2i p_size, WindowID p_window) {
usleep(10000);
}
}
+
Size2i DisplayServerX11::window_get_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1044,6 +1053,7 @@ Size2i DisplayServerX11::window_get_size(WindowID p_window) const {
const WindowData &wd = windows[p_window];
return wd.size;
}
+
Size2i DisplayServerX11::window_get_real_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1533,6 +1543,7 @@ void DisplayServerX11::window_set_flag(WindowFlags p_flag, bool p_enabled, Windo
}
}
}
+
bool DisplayServerX11::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1627,6 +1638,7 @@ bool DisplayServerX11::window_can_draw(WindowID p_window) const {
//this seems to be all that is provided by X11
return window_get_mode(p_window) != WINDOW_MODE_MINIMIZED;
}
+
bool DisplayServerX11::can_any_window_draw() const {
_THREAD_SAFE_METHOD_
@@ -1657,6 +1669,7 @@ void DisplayServerX11::window_set_ime_active(const bool p_active, WindowID p_win
XUnsetICFocus(wd.xic);
}
}
+
void DisplayServerX11::window_set_ime_position(const Point2i &p_pos, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -1699,9 +1712,11 @@ void DisplayServerX11::cursor_set_shape(CursorShape p_shape) {
current_cursor = p_shape;
}
+
DisplayServerX11::CursorShape DisplayServerX11::cursor_get_shape() const {
return current_cursor;
}
+
void DisplayServerX11::cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
_THREAD_SAFE_METHOD_
@@ -2277,6 +2292,7 @@ void DisplayServerX11::_send_window_event(const WindowData &wd, WindowEvent p_ev
wd.event_callback.call((const Variant **)&eventp, 1, ret, ce);
}
}
+
void DisplayServerX11::process_events() {
_THREAD_SAFE_METHOD_
@@ -2958,6 +2974,7 @@ void DisplayServerX11::_update_context(WindowData &wd) {
XFree(classHint);
}
}
+
void DisplayServerX11::set_context(Context p_context) {
_THREAD_SAFE_METHOD_
@@ -2967,6 +2984,7 @@ void DisplayServerX11::set_context(Context p_context) {
_update_context(E->get());
}
}
+
void DisplayServerX11::set_native_icon(const String &p_filename) {
WARN_PRINT("Native icon not supported by this display server.");
}
@@ -3712,6 +3730,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
r_error = OK;
}
+
DisplayServerX11::~DisplayServerX11() {
//destroy all windows
for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) {
diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm
index 46ddc23d8a..1cdcdbcaf5 100644
--- a/platform/osx/display_server_osx.mm
+++ b/platform/osx/display_server_osx.mm
@@ -149,6 +149,7 @@ static NSCursor *_cursorFromSelector(SEL selector, SEL fallback = nil) {
Variant meta;
bool checkable;
}
+
@end
@implementation GlobalMenuItem
@@ -1422,6 +1423,7 @@ inline void sendPanEvent(DisplayServer::WindowID window_id, double dx, double dy
@interface GodotWindow : NSWindow {
}
+
@end
@implementation GodotWindow
diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp
index 52cceae3fd..d342d30097 100644
--- a/platform/osx/joypad_osx.cpp
+++ b/platform/osx/joypad_osx.cpp
@@ -98,6 +98,7 @@ int joypad::get_hid_element_state(rec_element *p_element) const {
}
return value;
}
+
void joypad::add_hid_element(IOHIDElementRef p_element) {
const CFTypeID elementTypeID = p_element ? CFGetTypeID(p_element) : 0;
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index bcf0deeba9..fbe526ef6d 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -44,6 +44,7 @@
int OS_Server::get_video_driver_count() const {
return 1;
}
+
const char *OS_Server::get_video_driver_name(int p_driver) const {
return "Dummy";
}
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index c99ce5ee16..6090d13854 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -396,6 +396,7 @@ void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Wind
os->queue_key_event(ke);
}
+
void App::OnKeyDown(CoreWindow ^ sender, KeyEventArgs ^ args) {
key_event(sender, true, args);
}
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 2104cacb6e..7e4d17f5e7 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -444,9 +444,11 @@ void OS_UWP::set_window_title(const String &p_title) {
void OS_UWP::set_video_mode(const VideoMode &p_video_mode, int p_screen) {
video_mode = p_video_mode;
}
+
OS::VideoMode OS_UWP::get_video_mode(int p_screen) const {
return video_mode;
}
+
void OS_UWP::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const {
}
@@ -469,6 +471,7 @@ OS::Date OS_UWP::get_date(bool utc) const {
date.dst = false;
return date;
}
+
OS::Time OS_UWP::get_time(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -529,6 +532,7 @@ void OS_UWP::delay_usec(uint32_t p_usec) const {
// no Sleep()
WaitForSingleObjectEx(GetCurrentThread(), msec, false);
}
+
uint64_t OS_UWP::get_ticks_usec() const {
uint64_t ticks;
uint64_t time;
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 2637702fab..114b64855e 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -110,6 +110,7 @@ void DisplayServerWindows::_set_mouse_mode_impl(MouseMode p_mode) {
cursor_set_shape(c);
}
}
+
void DisplayServerWindows::mouse_set_mode(MouseMode p_mode) {
_THREAD_SAFE_METHOD_
@@ -120,6 +121,7 @@ void DisplayServerWindows::mouse_set_mode(MouseMode p_mode) {
mouse_mode = p_mode;
}
+
DisplayServer::MouseMode DisplayServerWindows::mouse_get_mode() const {
return mouse_mode;
}
@@ -143,12 +145,14 @@ void DisplayServerWindows::mouse_warp_to_position(const Point2i &p_to) {
SetCursorPos(p.x, p.y);
}
}
+
Point2i DisplayServerWindows::mouse_get_position() const {
POINT p;
GetCursorPos(&p);
return Point2i(p.x, p.y);
//return Point2(old_x, old_y);
}
+
int DisplayServerWindows::mouse_get_button_state() const {
return last_button_state;
}
@@ -192,6 +196,7 @@ void DisplayServerWindows::clipboard_set(const String &p_text) {
CloseClipboard();
}
+
String DisplayServerWindows::clipboard_get() const {
_THREAD_SAFE_METHOD_
@@ -276,6 +281,7 @@ static BOOL CALLBACK _MonitorEnumProcPos(HMONITOR hMonitor, HDC hdcMonitor, LPRE
data->count++;
return TRUE;
}
+
Point2i DisplayServerWindows::screen_get_position(int p_screen) const {
_THREAD_SAFE_METHOD_
@@ -416,6 +422,7 @@ int DisplayServerWindows::screen_get_dpi(int p_screen) const {
EnumDisplayMonitors(nullptr, nullptr, _MonitorEnumProcDpi, (LPARAM)&data);
return data.dpi;
}
+
bool DisplayServerWindows::screen_is_touchscreen(int p_screen) const {
#ifndef _MSC_VER
#warning touchscreen not working
@@ -425,12 +432,14 @@ bool DisplayServerWindows::screen_is_touchscreen(int p_screen) const {
void DisplayServerWindows::screen_set_orientation(ScreenOrientation p_orientation, int p_screen) {
}
+
DisplayServer::ScreenOrientation DisplayServerWindows::screen_get_orientation(int p_screen) const {
return SCREEN_LANDSCAPE;
}
void DisplayServerWindows::screen_set_keep_on(bool p_enable) {
}
+
bool DisplayServerWindows::screen_is_kept_on() const {
return false;
}
@@ -489,6 +498,7 @@ DisplayServer::WindowID DisplayServerWindows::create_sub_window(WindowMode p_mod
return window_id;
}
+
void DisplayServerWindows::delete_sub_window(WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -546,12 +556,14 @@ void DisplayServerWindows::window_set_window_event_callback(const Callable &p_ca
ERR_FAIL_COND(!windows.has(p_window));
windows[p_window].event_callback = p_callable;
}
+
void DisplayServerWindows::window_set_input_event_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
windows[p_window].input_event_callback = p_callable;
}
+
void DisplayServerWindows::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -582,6 +594,7 @@ int DisplayServerWindows::window_get_current_screen(WindowID p_window) const {
EnumDisplayMonitors(nullptr, nullptr, _MonitorEnumProcScreen, (LPARAM)&data);
return data.screen;
}
+
void DisplayServerWindows::window_set_current_screen(int p_screen, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -617,6 +630,7 @@ Point2i DisplayServerWindows::window_get_position(WindowID p_window) const {
return Point2(r.left, r.top);
#endif
}
+
void DisplayServerWindows::_update_real_mouse_position(WindowID p_window) {
POINT mouse_pos;
if (GetCursorPos(&mouse_pos) && ScreenToClient(windows[p_window].hWnd, &mouse_pos)) {
@@ -628,6 +642,7 @@ void DisplayServerWindows::_update_real_mouse_position(WindowID p_window) {
}
}
}
+
void DisplayServerWindows::window_set_position(const Point2i &p_position, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -716,6 +731,7 @@ void DisplayServerWindows::window_set_max_size(const Size2i p_size, WindowID p_w
}
wd.max_size = p_size;
}
+
Size2i DisplayServerWindows::window_get_max_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -736,6 +752,7 @@ void DisplayServerWindows::window_set_min_size(const Size2i p_size, WindowID p_w
}
wd.min_size = p_size;
}
+
Size2i DisplayServerWindows::window_get_min_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -788,6 +805,7 @@ void DisplayServerWindows::window_set_size(const Size2i p_size, WindowID p_windo
ClipCursor(&crect);
}
}
+
Size2i DisplayServerWindows::window_get_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -804,6 +822,7 @@ Size2i DisplayServerWindows::window_get_size(WindowID p_window) const {
}
return Size2();
}
+
Size2i DisplayServerWindows::window_get_real_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -938,6 +957,7 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
MoveWindow(wd.hWnd, pos.x, pos.y, size.width, size.height, TRUE);
}
}
+
DisplayServer::WindowMode DisplayServerWindows::window_get_mode(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -1038,6 +1058,7 @@ void DisplayServerWindows::window_request_attention(WindowID p_window) {
info.uCount = 2;
FlashWindowEx(&info);
}
+
void DisplayServerWindows::window_move_to_foreground(WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -1081,6 +1102,7 @@ void DisplayServerWindows::window_set_ime_active(const bool p_active, WindowID p
ImmAssociateContext(wd.hWnd, (HIMC)0);
}
}
+
void DisplayServerWindows::window_set_ime_position(const Point2i &p_pos, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -1109,6 +1131,7 @@ void DisplayServerWindows::console_set_visible(bool p_enabled) {
ShowWindow(GetConsoleWindow(), p_enabled ? SW_SHOW : SW_HIDE);
console_visible = p_enabled;
}
+
bool DisplayServerWindows::is_console_visible() const {
return console_visible;
}
@@ -1154,6 +1177,7 @@ void DisplayServerWindows::cursor_set_shape(CursorShape p_shape) {
cursor_shape = p_shape;
}
+
DisplayServer::CursorShape DisplayServerWindows::cursor_get_shape() const {
return cursor_shape;
}
@@ -1444,8 +1468,10 @@ void DisplayServerWindows::force_process_and_drop_events() {
void DisplayServerWindows::release_rendering_thread() {
}
+
void DisplayServerWindows::make_rendering_thread() {
}
+
void DisplayServerWindows::swap_buffers() {
}
@@ -1542,6 +1568,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
memdelete(f);
memdelete(icon_dir);
}
+
void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) {
_THREAD_SAFE_METHOD_
@@ -1595,6 +1622,7 @@ void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) {
void DisplayServerWindows::vsync_set_use_via_compositor(bool p_enable) {
}
+
bool DisplayServerWindows::vsync_is_using_via_compositor() const {
return false;
}
diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp
index 38a4065ef9..0cff12ca8c 100644
--- a/platform/windows/joypad_windows.cpp
+++ b/platform/windows/joypad_windows.cpp
@@ -45,6 +45,7 @@
DWORD WINAPI _xinput_get_state(DWORD dwUserIndex, XINPUT_STATE *pState) {
return ERROR_DEVICE_NOT_CONNECTED;
}
+
DWORD WINAPI _xinput_set_state(DWORD dwUserIndex, XINPUT_VIBRATION *pVibration) {
return ERROR_DEVICE_NOT_CONNECTED;
}
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 76e23820aa..7c06e93a8a 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -309,6 +309,7 @@ OS::Date OS_Windows::get_date(bool utc) const {
date.dst = false;
return date;
}
+
OS::Time OS_Windows::get_time(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -399,6 +400,7 @@ void OS_Windows::delay_usec(uint32_t p_usec) const {
else
Sleep(p_usec / 1000);
}
+
uint64_t OS_Windows::get_ticks_usec() const {
uint64_t ticks;
uint64_t time;