diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-07 15:01:59 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-07 15:01:59 +0200 |
commit | 8de6405288a79c3109524a319bdd749ad1f902fe (patch) | |
tree | 72cbc4acedd4ed0403b7dbed6c8f4ec4b0a02498 /platform/uwp/app_uwp.h | |
parent | d6d8cb1a171b0aa74bc54e615e7c1e068af5a5d8 (diff) | |
download | redot-engine-8de6405288a79c3109524a319bdd749ad1f902fe.tar.gz |
UWP: Remove platform port, needs to be redone from scratch for 4.x
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.
So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
Diffstat (limited to 'platform/uwp/app_uwp.h')
-rw-r--r-- | platform/uwp/app_uwp.h | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/platform/uwp/app_uwp.h b/platform/uwp/app_uwp.h deleted file mode 100644 index 87c66bd679..0000000000 --- a/platform/uwp/app_uwp.h +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************/ -/* app_uwp.h */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -#ifndef APP_UWP_H -#define APP_UWP_H - -#include "os_uwp.h" - -#include <GLES2/gl2.h> -#include <wrl.h> -#include <string> - -/** clang-format does not play nice with this C++/CX hybrid, needs investigation. */ -/* clang-format off */ - -namespace GodotUWP -{ - ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView - { - public: - App() {} - - // IFrameworkView Methods. - virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView); - virtual void SetWindow(Windows::UI::Core::CoreWindow^ window); - virtual void Load(Platform::String^ entryPoint); - virtual void Run(); - virtual void Uninitialize(); - - property Windows::Foundation::EventRegistrationToken MouseMovedToken { - Windows::Foundation::EventRegistrationToken get() { return this->mouseMovedToken; } - void set(Windows::Foundation::EventRegistrationToken p_token) { this->mouseMovedToken = p_token; } - } - - private: - void RecreateRenderer(); - - // Application lifecycle event handlers. - void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args); - - // Window event handlers. - void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args); - void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); - void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args); - - void pointer_event(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args, bool p_pressed, bool p_is_wheel = false); - void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - void OnMouseMoved(Windows::Devices::Input::MouseDevice^ mouse_device, Windows::Devices::Input::MouseEventArgs^ args); - void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - - Windows::System::Threading::Core::SignalNotifier^ mouseChangedNotifier; - Windows::Foundation::EventRegistrationToken mouseMovedToken; - void OnMouseModeChanged(Windows::System::Threading::Core::SignalNotifier^ signalNotifier, bool timedOut); - - void key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args = nullptr, Windows::UI::Core::CharacterReceivedEventArgs^ char_args = nullptr); - void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); - void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); - void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args); - - void UpdateWindowSize(Windows::Foundation::Size size); - void InitializeEGL(Windows::UI::Core::CoreWindow^ window); - void CleanupEGL(); - - char** get_command_line(unsigned int* out_argc); - - bool mWindowClosed = false; - bool mWindowVisible = true; - GLsizei mWindowWidth = 0; - GLsizei mWindowHeight = 0; - - EGLDisplay mEglDisplay = EGL_NO_DISPLAY; - EGLContext mEglContext = EGL_NO_CONTEXT; - EGLSurface mEglSurface = EGL_NO_SURFACE; - - CoreWindow^ window; - OS_UWP* os; - - int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse - int last_touch_y[32]; - Windows::Foundation::Point last_mouse_pos; - }; -} - -/* clang-format on */ - -#endif // APP_UWP_H |