From 8b5274224a783e34bffd39a0e994092e7102abd9 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Mon, 18 Mar 2024 12:15:01 +0100 Subject: [PATCH] feat: Add missing Windows.Graphics structs --- .../Windows.Graphics/DisplayAdapterId.cs | 6 ++--- .../3.0.0.0/Windows.Graphics/DisplayId.cs | 4 +-- .../3.0.0.0/Windows.Graphics/PointInt32.cs | 6 ++--- .../3.0.0.0/Windows.Graphics/RectInt32.cs | 10 +++---- .../3.0.0.0/Windows.Graphics/SizeInt32.cs | 6 ++--- src/Uno.UWP/Graphics/DisplayAdapterId.cs | 17 ++++++++++++ src/Uno.UWP/Graphics/DisplayId.cs | 12 +++++++++ src/Uno.UWP/Graphics/PointInt32.cs | 17 ++++++++++++ src/Uno.UWP/Graphics/RectInt32.cs | 27 +++++++++++++++++++ src/Uno.UWP/Graphics/SizeInt32.cs | 17 ++++++++++++ 10 files changed, 106 insertions(+), 16 deletions(-) create mode 100644 src/Uno.UWP/Graphics/DisplayAdapterId.cs create mode 100644 src/Uno.UWP/Graphics/DisplayId.cs create mode 100644 src/Uno.UWP/Graphics/PointInt32.cs create mode 100644 src/Uno.UWP/Graphics/RectInt32.cs create mode 100644 src/Uno.UWP/Graphics/SizeInt32.cs diff --git a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayAdapterId.cs b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayAdapterId.cs index 51d83107e8c0..1cf9fd4fc102 100644 --- a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayAdapterId.cs +++ b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayAdapterId.cs @@ -3,16 +3,16 @@ #pragma warning disable 114 // new keyword hiding namespace Windows.Graphics { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented] #endif public partial struct DisplayAdapterId { // Forced skipping of method Windows.Graphics.DisplayAdapterId.DisplayAdapterId() -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public uint LowPart; #endif -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int HighPart; #endif } diff --git a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayId.cs b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayId.cs index ee4cda281e4b..3c277cb84e68 100644 --- a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayId.cs +++ b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/DisplayId.cs @@ -3,13 +3,13 @@ #pragma warning disable 114 // new keyword hiding namespace Windows.Graphics { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented] #endif public partial struct DisplayId { // Forced skipping of method Windows.Graphics.DisplayId.DisplayId() -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public ulong Value; #endif } diff --git a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/PointInt32.cs b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/PointInt32.cs index 68234d997834..9071afa4b9d1 100644 --- a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/PointInt32.cs +++ b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/PointInt32.cs @@ -3,16 +3,16 @@ #pragma warning disable 114 // new keyword hiding namespace Windows.Graphics { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented] #endif public partial struct PointInt32 { // Forced skipping of method Windows.Graphics.PointInt32.PointInt32() -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int X; #endif -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int Y; #endif } diff --git a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/RectInt32.cs b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/RectInt32.cs index 0b4f57de5990..0c017043ce8c 100644 --- a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/RectInt32.cs +++ b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/RectInt32.cs @@ -3,22 +3,22 @@ #pragma warning disable 114 // new keyword hiding namespace Windows.Graphics { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented] #endif public partial struct RectInt32 { // Forced skipping of method Windows.Graphics.RectInt32.RectInt32() -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int X; #endif -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int Y; #endif -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int Width; #endif -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int Height; #endif } diff --git a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/SizeInt32.cs b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/SizeInt32.cs index 09f4d25d5ad5..ea511b722170 100644 --- a/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/SizeInt32.cs +++ b/src/Uno.UWP/Generated/3.0.0.0/Windows.Graphics/SizeInt32.cs @@ -3,16 +3,16 @@ #pragma warning disable 114 // new keyword hiding namespace Windows.Graphics { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented] #endif public partial struct SizeInt32 { // Forced skipping of method Windows.Graphics.SizeInt32.SizeInt32() -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int Width; #endif -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public int Height; #endif } diff --git a/src/Uno.UWP/Graphics/DisplayAdapterId.cs b/src/Uno.UWP/Graphics/DisplayAdapterId.cs new file mode 100644 index 000000000000..986bc7138f2d --- /dev/null +++ b/src/Uno.UWP/Graphics/DisplayAdapterId.cs @@ -0,0 +1,17 @@ +namespace Windows.Graphics; + +/// +/// Corresponds to the LUID (Locally Unique Identifier) associated with a graphics adapter. +/// +public partial struct DisplayAdapterId +{ + /// + /// The low part of the LUID. + /// + public uint LowPart; + + /// + /// The high part of the LUID. + /// + public int HighPart; +} diff --git a/src/Uno.UWP/Graphics/DisplayId.cs b/src/Uno.UWP/Graphics/DisplayId.cs new file mode 100644 index 000000000000..b671d7795a7e --- /dev/null +++ b/src/Uno.UWP/Graphics/DisplayId.cs @@ -0,0 +1,12 @@ +namespace Windows.Graphics; + +/// +/// Represents the identifier of a logical display. +/// +public partial struct DisplayId +{ + /// + /// The identifier of a logical display. + /// + public ulong Value; +} diff --git a/src/Uno.UWP/Graphics/PointInt32.cs b/src/Uno.UWP/Graphics/PointInt32.cs new file mode 100644 index 000000000000..882bdfefdd33 --- /dev/null +++ b/src/Uno.UWP/Graphics/PointInt32.cs @@ -0,0 +1,17 @@ +namespace Windows.Graphics; + +/// +/// Defines a point in a two-dimensional plane. +/// +public partial struct PointInt32 +{ + /// + /// The X coordinate value of a point. + /// + public int X; + + /// + /// The Y coordinate value of a point. + /// + public int Y; +} diff --git a/src/Uno.UWP/Graphics/RectInt32.cs b/src/Uno.UWP/Graphics/RectInt32.cs new file mode 100644 index 000000000000..b66e0055cd0f --- /dev/null +++ b/src/Uno.UWP/Graphics/RectInt32.cs @@ -0,0 +1,27 @@ +namespace Windows.Graphics; + +/// +/// Defines the size and location of a rectangular surface. +/// +public partial struct RectInt32 +{ + /// + /// The X coordinate of the top-left corner of the rectangle. + /// + public int X; + + /// + /// The Y coordinate of the top-left corner of the rectangle. + /// + public int Y; + + /// + /// The width of a rectangle. + /// + public int Width; + + /// + /// The height of a rectangle. + /// + public int Height; +} diff --git a/src/Uno.UWP/Graphics/SizeInt32.cs b/src/Uno.UWP/Graphics/SizeInt32.cs new file mode 100644 index 000000000000..c60d77030882 --- /dev/null +++ b/src/Uno.UWP/Graphics/SizeInt32.cs @@ -0,0 +1,17 @@ +namespace Windows.Graphics; + +/// +/// Defines the height and wide of a surface in a two-dimensional plane. +/// +public partial struct SizeInt32 +{ + /// + /// The width of a surface. + /// + public int Width; + + /// + /// The height of a surface. + /// + public int Height; +}