aboutsummaryrefslogtreecommitdiff
path: root/platform/uwp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/uwp')
-rw-r--r--platform/uwp/app.h70
-rw-r--r--platform/uwp/export/export.cpp21
-rw-r--r--platform/uwp/joypad_uwp.h4
-rw-r--r--platform/uwp/os_uwp.h3
4 files changed, 54 insertions, 44 deletions
diff --git a/platform/uwp/app.h b/platform/uwp/app.h
index 6df9c5699..fd6fc950a 100644
--- a/platform/uwp/app.h
+++ b/platform/uwp/app.h
@@ -32,38 +32,41 @@
#include <wrl.h>
-#include "os_uwp.h"
#include "GLES2/gl2.h"
+#include "os_uwp.h"
+
+/** 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();
+ 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();
+ // 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; }
- };
+ Windows::Foundation::EventRegistrationToken get() { return this->mouseMovedToken; }
+ void set(Windows::Foundation::EventRegistrationToken p_token) { this->mouseMovedToken = p_token; }
+ }
- private:
+ private:
void RecreateRenderer();
- // Application lifecycle event handlers.
- void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
+ // 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);
+ // 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);
@@ -81,20 +84,20 @@ namespace GodotUWP
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();
+ 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;
- bool mWindowVisible;
- GLsizei mWindowWidth;
- GLsizei mWindowHeight;
+ bool mWindowClosed;
+ bool mWindowVisible;
+ GLsizei mWindowWidth;
+ GLsizei mWindowHeight;
- EGLDisplay mEglDisplay;
- EGLContext mEglContext;
- EGLSurface mEglSurface;
+ EGLDisplay mEglDisplay;
+ EGLContext mEglContext;
+ EGLSurface mEglSurface;
CoreWindow^ window;
OSUWP* os;
@@ -103,6 +106,7 @@ namespace GodotUWP
int last_touch_y[32];
int number_of_contacts;
Windows::Foundation::Point last_mouse_pos;
- };
-
+ }
}
+
+/* clang-format on */
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 464838448..f31c91ef6 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -618,9 +618,7 @@ void AppxPackager::make_content_types() {
types[ext] = content_type(ext);
- tmp_file->store_string("<Default Extension=\"" + ext +
- "\" ContentType=\""
- + types[ext] + "\" />");
+ tmp_file->store_string("<Default Extension=\"" + ext + "\" ContentType=\"" + types[ext] + "\" />");
}
// Appx signature file
@@ -1174,9 +1172,9 @@ Error AppxPackager::MakeIndirectDataContent(asn1::SPCIndirectDataContent &idc) {
MakeSPCInfoValue(*infoValue);
ASN1_TYPE* value =
- EncodedASN1::FromItem<asn1::SPCInfoValue,
- asn1::i2d_SPCInfoValue>(infoValue)
- .ToSequenceType();
+ EncodedASN1::FromItem<asn1::SPCInfoValue,
+ asn1::i2d_SPCInfoValue>(infoValue)
+ .ToSequenceType();
{
Vector<uint8_t> digest;
@@ -1202,8 +1200,10 @@ Error AppxPackager::add_attributes(PKCS7_SIGNER_INFO * p_signer_info) {
asn1::SPCSpOpusInfo* opus = asn1::SPCSpOpusInfo_new();
if (!opus) return openssl_error(ERR_peek_last_error());
- ASN1_STRING* opus_value = EncodedASN1::FromItem<asn1::SPCSpOpusInfo, asn1::i2d_SPCSpOpusInfo>(opus)
- .ToSequenceString();
+ ASN1_STRING* opus_value =
+ EncodedASN1::FromItem<asn1::SPCSpOpusInfo,
+ asn1::i2d_SPCSpOpusInfo>(opus)
+ .ToSequenceString();
if (!PKCS7_add_signed_attribute(
p_signer_info,
@@ -1237,8 +1237,9 @@ Error AppxPackager::add_attributes(PKCS7_SIGNER_INFO * p_signer_info) {
statement_type->type = OBJ_nid2obj(NID_ms_code_ind);
ASN1_STRING* statement_type_value =
- EncodedASN1::FromItem<asn1::SPCStatementType, asn1::i2d_SPCStatementType>(statement_type)
- .ToSequenceString();
+ EncodedASN1::FromItem<asn1::SPCStatementType,
+ asn1::i2d_SPCStatementType>(statement_type)
+ .ToSequenceString();
if (!PKCS7_add_signed_attribute(
p_signer_info,
diff --git a/platform/uwp/joypad_uwp.h b/platform/uwp/joypad_uwp.h
index 90505b409..5d81ac44c 100644
--- a/platform/uwp/joypad_uwp.h
+++ b/platform/uwp/joypad_uwp.h
@@ -33,10 +33,12 @@
ref class JoypadUWP sealed {
+ /** clang-format breaks this, it does not understand this token. */
+ /* clang-format off */
internal:
-
void register_events();
uint32_t process_controllers(uint32_t p_last_id);
+ /* clang-format on */
JoypadUWP();
JoypadUWP(InputDefault* p_input);
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 82376dd2f..f9e050e7a 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -157,9 +157,12 @@ private:
void on_magnetometer_reading_changed(Windows::Devices::Sensors::Magnetometer^ sender, Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs^ args);
void on_gyroscope_reading_changed(Windows::Devices::Sensors::Gyrometer^ sender, Windows::Devices::Sensors::GyrometerReadingChangedEventArgs^ args);
+ /** clang-format breaks this, it does not understand this token. */
+ /* clang-format off */
internal:
ManagedType() { alert_close_handle = false; }
property OSUWP* os;
+ /* clang-format on */
};
ManagedType^ managed_object;
Windows::Devices::Sensors::Accelerometer^ accelerometer;