From dc2e7a2ffab9fce17a7581b7bac1429845ac246f Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 17 Jul 2020 16:39:01 +0200 Subject: [PATCH 001/154] iOS build? --- Avalonia.sln | 125 +++++------- dirs.proj | 2 +- src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 1 - src/iOS/Avalonia.iOS/Clipboard.cs | 2 + src/iOS/Avalonia.iOS/EmbeddableImpl.cs | 4 - .../Specific/KeyboardEventsHelper.cs | 11 +- src/iOS/Avalonia.iOS/TopLevelImpl.cs | 17 +- src/iOS/Avalonia.iOS/WindowingPlatformImpl.cs | 2 +- .../AppDelegate.cs | 39 ---- .../Avalonia.iOSTestApplication.csproj | 191 ------------------ .../Entitlements.plist | 5 - .../GettingStarted.Xamarin | 4 - .../Avalonia.iOSTestApplication/Info.plist | 38 ---- src/iOS/Avalonia.iOSTestApplication/Main.cs | 20 -- .../Properties/AssemblyInfo.cs | 36 ---- .../Resources/Default-568h@2x.png | Bin 2215 -> 0 bytes .../SimpleApp.xaml | 6 - .../SimpleApp.xaml.cs | 20 -- .../SimpleControl.cs | 20 -- 19 files changed, 78 insertions(+), 465 deletions(-) delete mode 100644 src/iOS/Avalonia.iOSTestApplication/AppDelegate.cs delete mode 100644 src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj delete mode 100644 src/iOS/Avalonia.iOSTestApplication/Entitlements.plist delete mode 100644 src/iOS/Avalonia.iOSTestApplication/GettingStarted.Xamarin delete mode 100644 src/iOS/Avalonia.iOSTestApplication/Info.plist delete mode 100644 src/iOS/Avalonia.iOSTestApplication/Main.cs delete mode 100644 src/iOS/Avalonia.iOSTestApplication/Properties/AssemblyInfo.cs delete mode 100644 src/iOS/Avalonia.iOSTestApplication/Resources/Default-568h@2x.png delete mode 100644 src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml delete mode 100644 src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml.cs delete mode 100644 src/iOS/Avalonia.iOSTestApplication/SimpleControl.cs diff --git a/Avalonia.sln b/Avalonia.sln index 4954260e12..3ee107707f 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -87,8 +87,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "iOS", "iOS", "{0CB0B92E-6CF EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.iOS", "src\iOS\Avalonia.iOS\Avalonia.iOS.csproj", "{4488AD85-1495-4809-9AA4-DDFE0A48527E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.iOSTestApplication", "src\iOS\Avalonia.iOSTestApplication\Avalonia.iOSTestApplication.csproj", "{8C923867-8A8F-4F6B-8B80-47D9E8436166}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.LeakTests", "tests\Avalonia.LeakTests\Avalonia.LeakTests.csproj", "{E1AA3DBF-9056-4530-9376-18119A7A3FFE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.UnitTests", "tests\Avalonia.UnitTests\Avalonia.UnitTests.csproj", "{88060192-33D5-4932-B0F9-8BD2763E857D}" @@ -207,11 +205,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NativeEmbedSample", "sample EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Themes.Fluent", "src\Avalonia.Themes.Fluent\Avalonia.Themes.Fluent.csproj", "{C42D2FC1-A531-4ED4-84B9-89AEC7C962FC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Headless", "src\Avalonia.Headless\Avalonia.Headless.csproj", "{8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Headless", "src\Avalonia.Headless\Avalonia.Headless.csproj", "{8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Headless.Vnc", "src\Avalonia.Headless.Vnc\Avalonia.Headless.Vnc.csproj", "{B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Headless.Vnc", "src\Avalonia.Headless.Vnc\Avalonia.Headless.Vnc.csproj", "{B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Markup.Xaml.Loader", "src\Markup\Avalonia.Markup.Xaml.Loader\Avalonia.Markup.Xaml.Loader.csproj", "{909A8CBD-7D0E-42FD-B841-022AD8925820}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Markup.Xaml.Loader", "src\Markup\Avalonia.Markup.Xaml.Loader\Avalonia.Markup.Xaml.Loader.csproj", "{909A8CBD-7D0E-42FD-B841-022AD8925820}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution @@ -940,26 +938,6 @@ Global {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Release|iPhone.Build.0 = Release|Any CPU {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.AppStore|iPhone.ActiveCfg = AppStore|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.AppStore|iPhone.Build.0 = AppStore|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|Any CPU.ActiveCfg = Debug|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|iPhone.ActiveCfg = Debug|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|iPhone.Build.0 = Debug|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|Any CPU.ActiveCfg = Release|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|iPhone.ActiveCfg = Release|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|iPhone.Build.0 = Release|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU @@ -1832,54 +1810,6 @@ Global {3278F3A9-9509-4A3F-A15B-BDC8B5BFF632}.Release|iPhone.Build.0 = Release|Any CPU {3278F3A9-9509-4A3F-A15B-BDC8B5BFF632}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {3278F3A9-9509-4A3F-A15B-BDC8B5BFF632}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhone.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhone.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|Any CPU.Build.0 = Release|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhone.ActiveCfg = Release|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhone.Build.0 = Release|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhone.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhone.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|Any CPU.Build.0 = Release|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhone.ActiveCfg = Release|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhone.Build.0 = Release|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {4D55985A-1EE2-4F25-AD39-6EA8BC04F8FB}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {4D55985A-1EE2-4F25-AD39-6EA8BC04F8FB}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {4D55985A-1EE2-4F25-AD39-6EA8BC04F8FB}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU @@ -2000,6 +1930,54 @@ Global {C42D2FC1-A531-4ED4-84B9-89AEC7C962FC}.Release|iPhone.Build.0 = Release|Any CPU {C42D2FC1-A531-4ED4-84B9-89AEC7C962FC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {C42D2FC1-A531-4ED4-84B9-89AEC7C962FC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhone.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhone.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|Any CPU.Build.0 = Release|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhone.ActiveCfg = Release|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhone.Build.0 = Release|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {8C89950F-F5D9-47FC-8066-CBC1EC3DF8FC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhone.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhone.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|Any CPU.Build.0 = Release|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhone.ActiveCfg = Release|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhone.Build.0 = Release|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {B859AE7C-F34F-4A9E-88AE-E0E7229FDE1E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {909A8CBD-7D0E-42FD-B841-022AD8925820}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {909A8CBD-7D0E-42FD-B841-022AD8925820}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {909A8CBD-7D0E-42FD-B841-022AD8925820}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU @@ -2050,7 +2028,6 @@ Global {7B92AF71-6287-4693-9DCB-BD5B6E927E23} = {7CF9789C-F1D3-4D0E-90E5-F1DF67A2753F} {FF69B927-C545-49AE-8E16-3D14D621AA12} = {7CF9789C-F1D3-4D0E-90E5-F1DF67A2753F} {4488AD85-1495-4809-9AA4-DDFE0A48527E} = {0CB0B92E-6CFF-4240-80A5-CCAFE75D91E1} - {8C923867-8A8F-4F6B-8B80-47D9E8436166} = {0CB0B92E-6CFF-4240-80A5-CCAFE75D91E1} {E1AA3DBF-9056-4530-9376-18119A7A3FFE} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {88060192-33D5-4932-B0F9-8BD2763E857D} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} diff --git a/dirs.proj b/dirs.proj index 26c8f54b23..a48ad6e03d 100644 --- a/dirs.proj +++ b/dirs.proj @@ -13,7 +13,7 @@ - + diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index e57fcc643f..683c256b7b 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -6,7 +6,6 @@ - diff --git a/src/iOS/Avalonia.iOS/Clipboard.cs b/src/iOS/Avalonia.iOS/Clipboard.cs index 2deb49473f..8103d6ddf4 100644 --- a/src/iOS/Avalonia.iOS/Clipboard.cs +++ b/src/iOS/Avalonia.iOS/Clipboard.cs @@ -1,4 +1,6 @@ +using System; using System.Threading.Tasks; +using Avalonia.Input; using Avalonia.Input.Platform; using UIKit; diff --git a/src/iOS/Avalonia.iOS/EmbeddableImpl.cs b/src/iOS/Avalonia.iOS/EmbeddableImpl.cs index d299ff99c1..ce3c45d79b 100644 --- a/src/iOS/Avalonia.iOS/EmbeddableImpl.cs +++ b/src/iOS/Avalonia.iOS/EmbeddableImpl.cs @@ -19,9 +19,5 @@ namespace Avalonia.iOS { return Disposable.Empty; } - - public void SetSystemDecorations(SystemDecorations enabled) - { - } } } diff --git a/src/iOS/Avalonia.iOS/Specific/KeyboardEventsHelper.cs b/src/iOS/Avalonia.iOS/Specific/KeyboardEventsHelper.cs index cdf244d330..4d76539560 100644 --- a/src/iOS/Avalonia.iOS/Specific/KeyboardEventsHelper.cs +++ b/src/iOS/Avalonia.iOS/Specific/KeyboardEventsHelper.cs @@ -37,7 +37,7 @@ namespace Avalonia.iOS.Specific /// view.ResignFirstResponder(); /// /// View that needs keyboard events and show/hide keyboard - internal class KeyboardEventsHelper where TView : UIView, ITopLevelImpl + internal class KeyboardEventsHelper where TView : UIView, ITopLevelImpl, IGetInputRoot { private TView _view; private IInputElement _lastFocusedElement; @@ -70,13 +70,13 @@ namespace Avalonia.iOS.Specific public void InsertText(string text) { - var rawTextEvent = new RawTextInputEventArgs(KeyboardDevice.Instance, (uint)DateTime.Now.Ticks, text); + var rawTextEvent = new RawTextInputEventArgs(KeyboardDevice.Instance, (uint)DateTime.Now.Ticks, _view.GetInputRoot(), text); _view.Input(rawTextEvent); } private void HandleKey(Key key, RawKeyEventType type) { - var rawKeyEvent = new RawKeyEventArgs(KeyboardDevice.Instance, (uint)DateTime.Now.Ticks, type, key, RawInputModifiers.None); + var rawKeyEvent = new RawKeyEventArgs(KeyboardDevice.Instance, (uint)DateTime.Now.Ticks, _view.GetInputRoot(), type, key, RawInputModifiers.None); _view.Input(rawKeyEvent); } @@ -144,4 +144,9 @@ namespace Avalonia.iOS.Specific HandleEvents = false; } } + + internal interface IGetInputRoot + { + IInputRoot GetInputRoot(); + } } diff --git a/src/iOS/Avalonia.iOS/TopLevelImpl.cs b/src/iOS/Avalonia.iOS/TopLevelImpl.cs index 83a68990d7..ea6f560e9c 100644 --- a/src/iOS/Avalonia.iOS/TopLevelImpl.cs +++ b/src/iOS/Avalonia.iOS/TopLevelImpl.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Avalonia.Controls; using Avalonia.Controls.Platform.Surfaces; using Avalonia.Input; using Avalonia.Input.Raw; @@ -14,7 +15,7 @@ using UIKit; namespace Avalonia.iOS { [Adopts("UIKeyInput")] - class TopLevelImpl : UIView, ITopLevelImpl, IFramebufferPlatformSurface + class TopLevelImpl : UIView, ITopLevelImpl, IFramebufferPlatformSurface, IGetInputRoot { private readonly KeyboardEventsHelper _keyboardHelper; @@ -139,7 +140,19 @@ namespace Avalonia.iOS public ILockedFramebuffer Lock() => new EmulatedFramebuffer(this); public IPopupImpl CreatePopup() => null; - + + public void SetTransparencyLevelHint(WindowTransparencyLevel transparencyLevel) + { + //No-op + } + + public IInputRoot GetInputRoot() => _inputRoot; + public Action LostFocus { get; set; } + public Action TransparencyLevelChanged { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public WindowTransparencyLevel TransparencyLevel => WindowTransparencyLevel.None; + + public AcrylicPlatformCompensationLevels AcrylicCompensationLevels => new AcrylicPlatformCompensationLevels(0, 0, 0); } } diff --git a/src/iOS/Avalonia.iOS/WindowingPlatformImpl.cs b/src/iOS/Avalonia.iOS/WindowingPlatformImpl.cs index aaca5f53d6..8e7578e49e 100644 --- a/src/iOS/Avalonia.iOS/WindowingPlatformImpl.cs +++ b/src/iOS/Avalonia.iOS/WindowingPlatformImpl.cs @@ -10,7 +10,7 @@ namespace Avalonia.iOS throw new NotSupportedException(); } - public WindowImpl CreateEmbeddableWindow() + public IWindowImpl CreateEmbeddableWindow() { throw new NotSupportedException(); } diff --git a/src/iOS/Avalonia.iOSTestApplication/AppDelegate.cs b/src/iOS/Avalonia.iOSTestApplication/AppDelegate.cs deleted file mode 100644 index 4591fb2ae8..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/AppDelegate.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using Foundation; -using Avalonia.Controls; -using Avalonia.iOS; -using Avalonia.Media; -using Avalonia.Threading; -using UIKit; - -namespace Avalonia.iOSTestApplication -{ - // The UIApplicationDelegate for the application. This class is responsible for launching the - // User Interface of the application, as well as listening (and optionally responding) to - // application events from iOS. - [Register("AppDelegate")] - public partial class AppDelegate : UIApplicationDelegate - { - public override UIWindow Window { get; set; } - - // - // This method is invoked when the application has loaded and is ready to run. In this - // method you should instantiate the window, load the UI into it and then make the window - // visible. - // - // You have 17 seconds to return from this method, or iOS will terminate your application. - // - public override bool FinishedLaunching(UIApplication uiapp, NSDictionary options) - { - AppBuilder.Configure().UseSkia().UseiOS().SetupWithoutStarting(); - Window = new AvaloniaWindow { Content = new SimpleControl()}; - Window.MakeKeyAndVisible(); - return true; - } - } - - -} \ No newline at end of file diff --git a/src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj b/src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj deleted file mode 100644 index 34c8ae7605..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - Debug - iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166} - {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Exe - Avalonia.iOSTestApplication - Resources - AvaloniaiOSTestApplication - - - true - full - false - bin\iPhoneSimulator\Debug - DEBUG - prompt - 4 - false - i386 - SdkOnly - true - - - none - true - bin\iPhoneSimulator\Release - prompt - 4 - None - i386 - false - - - true - full - false - bin\iPhone\Debug - DEBUG - prompt - 4 - false - ARMv7, ARM64 - Entitlements.plist - iPhone Developer - True - 9.1 - None - False - False - False - False - True - True - True - False - - - - none - true - bin\iPhone\Release - prompt - 4 - Entitlements.plist - ARMv7, ARM64 - false - iPhone Developer - - - none - True - bin\iPhone\Ad-Hoc - prompt - 4 - False - ARMv7, ARM64 - Entitlements.plist - True - Automatic:AdHoc - iPhone Distribution - - - none - True - bin\iPhone\AppStore - prompt - 4 - False - ARMv7, ARM64 - Entitlements.plist - Automatic:AppStore - iPhone Distribution - - - true - - - - - - - - - - - - - - - - - - - - - - - - - {3e53a01a-b331-47f3-b828-4a5717e77a24} - Avalonia.Markup.Xaml - - - {6417e941-21bc-467b-a771-0de389353ce6} - Avalonia.Markup - - - {d211e587-d8bc-45b9-95a4-f297c8fa5200} - Avalonia.Animation - - - {b09b78d8-9b26-48b0-9149-d64a2f120f3f} - Avalonia.Base - - - {d2221c82-4a25-4583-9b43-d791e3f6820c} - Avalonia.Controls - - - {7062ae20-5dcc-4442-9645-8195bdece63e} - Avalonia.Diagnostics - - - {62024b2d-53eb-4638-b26b-85eeaa54866e} - Avalonia.Input - - - {6b0ed19d-a08b-461c-a9d9-a9ee40b0c06b} - Avalonia.Interactivity - - - {42472427-4774-4c81-8aff-9f27b8e31721} - Avalonia.Layout - - - {eb582467-6abb-43a1-b052-e981ba910e3a} - Avalonia.Visuals - - - {f1baa01a-f176-4c6a-b39d-5b40bb1b148f} - Avalonia.Styling - - - {3e10a5fa-e8da-48b1-ad44-6a5b6cb7750f} - Avalonia.Themes.Default - - - {7d2d3083-71dd-4cc9-8907-39a0d86fb322} - Avalonia.Skia - false - false - - - {4488ad85-1495-4809-9aa4-ddfe0a48527e} - Avalonia.iOS - false - false - - - - - - - - - - - diff --git a/src/iOS/Avalonia.iOSTestApplication/Entitlements.plist b/src/iOS/Avalonia.iOSTestApplication/Entitlements.plist deleted file mode 100644 index 0c67376eba..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/Entitlements.plist +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/iOS/Avalonia.iOSTestApplication/GettingStarted.Xamarin b/src/iOS/Avalonia.iOSTestApplication/GettingStarted.Xamarin deleted file mode 100644 index 810f716685..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/GettingStarted.Xamarin +++ /dev/null @@ -1,4 +0,0 @@ - - GS\iOS\CS\iOSApp\GettingStarted.html - false - \ No newline at end of file diff --git a/src/iOS/Avalonia.iOSTestApplication/Info.plist b/src/iOS/Avalonia.iOSTestApplication/Info.plist deleted file mode 100644 index 44e29bed12..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDisplayName - Avalonia.iOSTestApplication - CFBundleIdentifier - com.your-company.Avalonia.iOSTestApplication - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1.0 - UIDeviceFamily - - 1 - 2 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - MinimumOSVersion - 8.0 - CFBundleIconFiles - - Default-568h@2x.png - - - diff --git a/src/iOS/Avalonia.iOSTestApplication/Main.cs b/src/iOS/Avalonia.iOSTestApplication/Main.cs deleted file mode 100644 index a2e0d635cc..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/Main.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Foundation; -using UIKit; - -namespace Avalonia.iOSTestApplication -{ - public class Application - { - // This is the main entry point of the application. - static void Main(string[] args) - { - // if you want to use a different Application Delegate class from "AppDelegate" - // you can specify it here. - UIApplication.Main(args, null, "AppDelegate"); - } - } -} \ No newline at end of file diff --git a/src/iOS/Avalonia.iOSTestApplication/Properties/AssemblyInfo.cs b/src/iOS/Avalonia.iOSTestApplication/Properties/AssemblyInfo.cs deleted file mode 100644 index 9154e2a135..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Avalonia.iOSTestApplication")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Avalonia.iOSTestApplication")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8c923867-8a8f-4f6b-8b80-47d9e8436166")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/iOS/Avalonia.iOSTestApplication/Resources/Default-568h@2x.png b/src/iOS/Avalonia.iOSTestApplication/Resources/Default-568h@2x.png deleted file mode 100644 index 29973dcbed50cb67f5f522d4fd9cb5caddda6cc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2215 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU@72W0*ZWnTNDnYI14-?iy0WWg+Z8+Vb&Z8 z1_q8uPZ!6Kid%0F8ZrWv99r$Ma}qo=E%%Q~loCIFNg8Dsze diff --git a/src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml b/src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml deleted file mode 100644 index 214bcd8797..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml.cs b/src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml.cs deleted file mode 100644 index b287755ef6..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/SimpleApp.xaml.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Avalonia.Markup.Xaml; -using Foundation; -using UIKit; - -namespace Avalonia.iOSTestApplication -{ - public class SimpleApp : Avalonia.Application - { - public override void Initialize() - { - //Enforce load - new Avalonia.Themes.Default.DefaultTheme(); - AvaloniaXamlLoader.Load(this); - } - } -} \ No newline at end of file diff --git a/src/iOS/Avalonia.iOSTestApplication/SimpleControl.cs b/src/iOS/Avalonia.iOSTestApplication/SimpleControl.cs deleted file mode 100644 index 7e888f65bc..0000000000 --- a/src/iOS/Avalonia.iOSTestApplication/SimpleControl.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Avalonia.Controls; -using Avalonia.Media; - -namespace Avalonia.iOSTestApplication -{ - class SimpleControl : ContentControl - { - public SimpleControl() - { - Content = new Button() {Content = "WAT"}; - MinWidth = 100; - MinHeight = 200; - Background = Brushes.CadetBlue; - } - } -} \ No newline at end of file From 7c3cf89e3ae0c909ca1f1ae93423feb6583bc5fe Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 17 Jul 2020 16:51:08 +0200 Subject: [PATCH 002/154] build? --- build/iOSWorkarounds.props | 5 ----- global.json | 2 +- samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 build/iOSWorkarounds.props diff --git a/build/iOSWorkarounds.props b/build/iOSWorkarounds.props deleted file mode 100644 index fe46295770..0000000000 --- a/build/iOSWorkarounds.props +++ /dev/null @@ -1,5 +0,0 @@ - - - $(MSBuildToolsPath)\..\Roslyn - - diff --git a/global.json b/global.json index a3fdca9bed..128511eb48 100644 --- a/global.json +++ b/global.json @@ -4,7 +4,7 @@ }, "msbuild-sdks": { "Microsoft.Build.Traversal": "1.0.43", - "MSBuild.Sdk.Extras": "2.0.46", + "MSBuild.Sdk.Extras": "2.0.54", "AggregatePackage.NuGet.Sdk" : "0.1.12" } } diff --git a/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj b/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj index 7596e4cfe2..3354df5597 100644 --- a/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj +++ b/samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj @@ -175,6 +175,5 @@ - From d59a74dc7f434143a2e5b0fddbd7504c85b7a231 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 17 Jul 2020 17:00:07 +0200 Subject: [PATCH 003/154] build? --- src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index 683c256b7b..ef0d8068a2 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -10,5 +10,4 @@ - From 0daf5f771e91f14df210b32be140b362cbfc6001 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Sun, 16 Aug 2020 21:00:55 +0100 Subject: [PATCH 004/154] dont generate sharpgen sources. --- src/Avalonia.Native/Avalonia.Native.csproj | 2 +- src/Avalonia.Native/Generated/Enumerations.cs | 628 ++++ src/Avalonia.Native/Generated/Functions.cs | 5 + src/Avalonia.Native/Generated/Interfaces.cs | 3092 +++++++++++++++++ src/Avalonia.Native/Generated/LocalInterop.cs | 202 ++ src/Avalonia.Native/Generated/Structures.cs | 246 ++ 6 files changed, 4174 insertions(+), 1 deletion(-) create mode 100644 src/Avalonia.Native/Generated/Enumerations.cs create mode 100644 src/Avalonia.Native/Generated/Functions.cs create mode 100644 src/Avalonia.Native/Generated/Interfaces.cs create mode 100644 src/Avalonia.Native/Generated/LocalInterop.cs create mode 100644 src/Avalonia.Native/Generated/Structures.cs diff --git a/src/Avalonia.Native/Avalonia.Native.csproj b/src/Avalonia.Native/Avalonia.Native.csproj index 1a2bdeef1e..9c3eaed2d8 100644 --- a/src/Avalonia.Native/Avalonia.Native.csproj +++ b/src/Avalonia.Native/Avalonia.Native.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Avalonia.Native/Generated/Enumerations.cs b/src/Avalonia.Native/Generated/Enumerations.cs new file mode 100644 index 0000000000..0b30ce50c0 --- /dev/null +++ b/src/Avalonia.Native/Generated/Enumerations.cs @@ -0,0 +1,628 @@ +// + +namespace Avalonia.Native.Interop +{ + /// + /// No documentation. + /// + /// AvnDragDropEffects + /// AvnDragDropEffects + public enum AvnDragDropEffects : System.Int32 + { + /// + /// No documentation. + /// + /// None + /// None + None = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// Copy + /// Copy + Copy = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// Move + /// Move + Move = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// Link + /// Link + Link = unchecked ((System.Int32)(4))} + + /// + /// No documentation. + /// + /// AvnDragEventType + /// AvnDragEventType + public enum AvnDragEventType : System.Int32 + { + /// + /// No documentation. + /// + /// Enter + /// Enter + Enter = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// Over + /// Over + Over = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// Leave + /// Leave + Leave = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// Drop + /// Drop + Drop = unchecked ((System.Int32)(3))} + + /// + /// No documentation. + /// + /// AvnExtendClientAreaChromeHints + /// AvnExtendClientAreaChromeHints + public enum AvnExtendClientAreaChromeHints : System.Int32 + { + /// + /// No documentation. + /// + /// AvnNoChrome + /// AvnNoChrome + AvnNoChrome = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// AvnSystemChrome + /// AvnSystemChrome + AvnSystemChrome = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// AvnPreferSystemChrome + /// AvnPreferSystemChrome + AvnPreferSystemChrome = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// AvnOSXThickTitleBar + /// AvnOSXThickTitleBar + AvnOSXThickTitleBar = unchecked ((System.Int32)(8)), + /// + /// No documentation. + /// + /// AvnDefaultChrome + /// AvnDefaultChrome + AvnDefaultChrome = unchecked ((System.Int32)(1))} + + /// + /// No documentation. + /// + /// AvnInputModifiers + /// AvnInputModifiers + public enum AvnInputModifiers : System.Int32 + { + /// + /// No documentation. + /// + /// AvnInputModifiersNone + /// AvnInputModifiersNone + AvnInputModifiersNone = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// Alt + /// Alt + Alt = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// Control + /// Control + Control = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// Shift + /// Shift + Shift = unchecked ((System.Int32)(4)), + /// + /// No documentation. + /// + /// Windows + /// Windows + Windows = unchecked ((System.Int32)(8)), + /// + /// No documentation. + /// + /// LeftMouseButton + /// LeftMouseButton + LeftMouseButton = unchecked ((System.Int32)(16)), + /// + /// No documentation. + /// + /// RightMouseButton + /// RightMouseButton + RightMouseButton = unchecked ((System.Int32)(32)), + /// + /// No documentation. + /// + /// MiddleMouseButton + /// MiddleMouseButton + MiddleMouseButton = unchecked ((System.Int32)(64)), + /// + /// No documentation. + /// + /// XButton1MouseButton + /// XButton1MouseButton + XButton1MouseButton = unchecked ((System.Int32)(128)), + /// + /// No documentation. + /// + /// XButton2MouseButton + /// XButton2MouseButton + XButton2MouseButton = unchecked ((System.Int32)(256))} + + /// + /// No documentation. + /// + /// AvnMenuItemToggleType + /// AvnMenuItemToggleType + public enum AvnMenuItemToggleType : System.Int32 + { + /// + /// No documentation. + /// + /// None + /// None + None = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// CheckMark + /// CheckMark + CheckMark = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// Radio + /// Radio + Radio = unchecked ((System.Int32)(2))} + + /// + /// No documentation. + /// + /// AvnPixelFormat + /// AvnPixelFormat + public enum AvnPixelFormat : System.Int32 + { + /// + /// No documentation. + /// + /// kAvnRgb565 + /// kAvnRgb565 + KAvnRgb565 = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// kAvnRgba8888 + /// kAvnRgba8888 + KAvnRgba8888 = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// kAvnBgra8888 + /// kAvnBgra8888 + KAvnBgra8888 = unchecked ((System.Int32)(2))} + + /// + /// No documentation. + /// + /// AvnRawKeyEventType + /// AvnRawKeyEventType + public enum AvnRawKeyEventType : System.Int32 + { + /// + /// No documentation. + /// + /// KeyDown + /// KeyDown + KeyDown = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// KeyUp + /// KeyUp + KeyUp = unchecked ((System.Int32)(1))} + + /// + /// No documentation. + /// + /// AvnRawMouseEventType + /// AvnRawMouseEventType + public enum AvnRawMouseEventType : System.Int32 + { + /// + /// No documentation. + /// + /// LeaveWindow + /// LeaveWindow + LeaveWindow = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// LeftButtonDown + /// LeftButtonDown + LeftButtonDown = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// LeftButtonUp + /// LeftButtonUp + LeftButtonUp = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// RightButtonDown + /// RightButtonDown + RightButtonDown = unchecked ((System.Int32)(3)), + /// + /// No documentation. + /// + /// RightButtonUp + /// RightButtonUp + RightButtonUp = unchecked ((System.Int32)(4)), + /// + /// No documentation. + /// + /// MiddleButtonDown + /// MiddleButtonDown + MiddleButtonDown = unchecked ((System.Int32)(5)), + /// + /// No documentation. + /// + /// MiddleButtonUp + /// MiddleButtonUp + MiddleButtonUp = unchecked ((System.Int32)(6)), + /// + /// No documentation. + /// + /// XButton1Down + /// XButton1Down + XButton1Down = unchecked ((System.Int32)(7)), + /// + /// No documentation. + /// + /// XButton1Up + /// XButton1Up + XButton1Up = unchecked ((System.Int32)(8)), + /// + /// No documentation. + /// + /// XButton2Down + /// XButton2Down + XButton2Down = unchecked ((System.Int32)(9)), + /// + /// No documentation. + /// + /// XButton2Up + /// XButton2Up + XButton2Up = unchecked ((System.Int32)(10)), + /// + /// No documentation. + /// + /// Move + /// Move + Move = unchecked ((System.Int32)(11)), + /// + /// No documentation. + /// + /// Wheel + /// Wheel + Wheel = unchecked ((System.Int32)(12)), + /// + /// No documentation. + /// + /// NonClientLeftButtonDown + /// NonClientLeftButtonDown + NonClientLeftButtonDown = unchecked ((System.Int32)(13)), + /// + /// No documentation. + /// + /// TouchBegin + /// TouchBegin + TouchBegin = unchecked ((System.Int32)(14)), + /// + /// No documentation. + /// + /// TouchUpdate + /// TouchUpdate + TouchUpdate = unchecked ((System.Int32)(15)), + /// + /// No documentation. + /// + /// TouchEnd + /// TouchEnd + TouchEnd = unchecked ((System.Int32)(16)), + /// + /// No documentation. + /// + /// TouchCancel + /// TouchCancel + TouchCancel = unchecked ((System.Int32)(17))} + + /// + /// No documentation. + /// + /// AvnStandardCursorType + /// AvnStandardCursorType + public enum AvnStandardCursorType : System.Int32 + { + /// + /// No documentation. + /// + /// CursorArrow + /// CursorArrow + CursorArrow = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// CursorIbeam + /// CursorIbeam + CursorIbeam = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// CursorWait + /// CursorWait + CursorWait = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// CursorCross + /// CursorCross + CursorCross = unchecked ((System.Int32)(3)), + /// + /// No documentation. + /// + /// CursorUpArrow + /// CursorUpArrow + CursorUpArrow = unchecked ((System.Int32)(4)), + /// + /// No documentation. + /// + /// CursorSizeWestEast + /// CursorSizeWestEast + CursorSizeWestEast = unchecked ((System.Int32)(5)), + /// + /// No documentation. + /// + /// CursorSizeNorthSouth + /// CursorSizeNorthSouth + CursorSizeNorthSouth = unchecked ((System.Int32)(6)), + /// + /// No documentation. + /// + /// CursorSizeAll + /// CursorSizeAll + CursorSizeAll = unchecked ((System.Int32)(7)), + /// + /// No documentation. + /// + /// CursorNo + /// CursorNo + CursorNo = unchecked ((System.Int32)(8)), + /// + /// No documentation. + /// + /// CursorHand + /// CursorHand + CursorHand = unchecked ((System.Int32)(9)), + /// + /// No documentation. + /// + /// CursorAppStarting + /// CursorAppStarting + CursorAppStarting = unchecked ((System.Int32)(10)), + /// + /// No documentation. + /// + /// CursorHelp + /// CursorHelp + CursorHelp = unchecked ((System.Int32)(11)), + /// + /// No documentation. + /// + /// CursorTopSide + /// CursorTopSide + CursorTopSide = unchecked ((System.Int32)(12)), + /// + /// No documentation. + /// + /// CursorBottomSize + /// CursorBottomSize + CursorBottomSize = unchecked ((System.Int32)(13)), + /// + /// No documentation. + /// + /// CursorLeftSide + /// CursorLeftSide + CursorLeftSide = unchecked ((System.Int32)(14)), + /// + /// No documentation. + /// + /// CursorRightSide + /// CursorRightSide + CursorRightSide = unchecked ((System.Int32)(15)), + /// + /// No documentation. + /// + /// CursorTopLeftCorner + /// CursorTopLeftCorner + CursorTopLeftCorner = unchecked ((System.Int32)(16)), + /// + /// No documentation. + /// + /// CursorTopRightCorner + /// CursorTopRightCorner + CursorTopRightCorner = unchecked ((System.Int32)(17)), + /// + /// No documentation. + /// + /// CursorBottomLeftCorner + /// CursorBottomLeftCorner + CursorBottomLeftCorner = unchecked ((System.Int32)(18)), + /// + /// No documentation. + /// + /// CursorBottomRightCorner + /// CursorBottomRightCorner + CursorBottomRightCorner = unchecked ((System.Int32)(19)), + /// + /// No documentation. + /// + /// CursorDragMove + /// CursorDragMove + CursorDragMove = unchecked ((System.Int32)(20)), + /// + /// No documentation. + /// + /// CursorDragCopy + /// CursorDragCopy + CursorDragCopy = unchecked ((System.Int32)(21)), + /// + /// No documentation. + /// + /// CursorDragLink + /// CursorDragLink + CursorDragLink = unchecked ((System.Int32)(22)), + /// + /// No documentation. + /// + /// CursorNone + /// CursorNone + CursorNone = unchecked ((System.Int32)(23))} + + /// + /// No documentation. + /// + /// AvnWindowEdge + /// AvnWindowEdge + public enum AvnWindowEdge : System.Int32 + { + /// + /// No documentation. + /// + /// WindowEdgeNorthWest + /// WindowEdgeNorthWest + WindowEdgeNorthWest = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// WindowEdgeNorth + /// WindowEdgeNorth + WindowEdgeNorth = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// WindowEdgeNorthEast + /// WindowEdgeNorthEast + WindowEdgeNorthEast = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// WindowEdgeWest + /// WindowEdgeWest + WindowEdgeWest = unchecked ((System.Int32)(3)), + /// + /// No documentation. + /// + /// WindowEdgeEast + /// WindowEdgeEast + WindowEdgeEast = unchecked ((System.Int32)(4)), + /// + /// No documentation. + /// + /// WindowEdgeSouthWest + /// WindowEdgeSouthWest + WindowEdgeSouthWest = unchecked ((System.Int32)(5)), + /// + /// No documentation. + /// + /// WindowEdgeSouth + /// WindowEdgeSouth + WindowEdgeSouth = unchecked ((System.Int32)(6)), + /// + /// No documentation. + /// + /// WindowEdgeSouthEast + /// WindowEdgeSouthEast + WindowEdgeSouthEast = unchecked ((System.Int32)(7))} + + /// + /// No documentation. + /// + /// AvnWindowState + /// AvnWindowState + public enum AvnWindowState : System.Int32 + { + /// + /// No documentation. + /// + /// Normal + /// Normal + Normal = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// Minimized + /// Minimized + Minimized = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// Maximized + /// Maximized + Maximized = unchecked ((System.Int32)(2)), + /// + /// No documentation. + /// + /// FullScreen + /// FullScreen + FullScreen = unchecked ((System.Int32)(3))} + + /// + /// No documentation. + /// + /// SystemDecorations + /// SystemDecorations + public enum SystemDecorations : System.Int32 + { + /// + /// No documentation. + /// + /// SystemDecorationsNone + /// SystemDecorationsNone + SystemDecorationsNone = unchecked ((System.Int32)(0)), + /// + /// No documentation. + /// + /// SystemDecorationsBorderOnly + /// SystemDecorationsBorderOnly + SystemDecorationsBorderOnly = unchecked ((System.Int32)(1)), + /// + /// No documentation. + /// + /// SystemDecorationsFull + /// SystemDecorationsFull + SystemDecorationsFull = unchecked ((System.Int32)(2))} +} \ No newline at end of file diff --git a/src/Avalonia.Native/Generated/Functions.cs b/src/Avalonia.Native/Generated/Functions.cs new file mode 100644 index 0000000000..6ab648dc50 --- /dev/null +++ b/src/Avalonia.Native/Generated/Functions.cs @@ -0,0 +1,5 @@ +// + +namespace Avalonia.Native.Interop +{ +} \ No newline at end of file diff --git a/src/Avalonia.Native/Generated/Interfaces.cs b/src/Avalonia.Native/Generated/Interfaces.cs new file mode 100644 index 0000000000..161ada1e50 --- /dev/null +++ b/src/Avalonia.Native/Generated/Interfaces.cs @@ -0,0 +1,3092 @@ +// + +namespace Avalonia.Native.Interop +{ + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f01")] + public partial class IAvaloniaNativeFactory : SharpGen.Runtime.ComObject + { + public IAvaloniaNativeFactory(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvaloniaNativeFactory(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvaloniaNativeFactory(nativePtr); + /// + /// No documentation. + /// + /// GetMacOptions + /// GetMacOptions + public Avalonia.Native.Interop.IAvnMacOptions MacOptions + { + get => GetMacOptions(); + } + + /// + /// No documentation. + /// + /// SetAppMenu + /// SetAppMenu + public Avalonia.Native.Interop.IAvnMenu AppMenu + { + set => SetAppMenu(value); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::Initialize([In] IAvnGCHandleDeallocatorCallback* deallocator) + /// IAvaloniaNativeFactory::Initialize + public unsafe void Initialize(Avalonia.Native.Interop.IAvnGCHandleDeallocatorCallback deallocator) + { + System.IntPtr deallocator_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + deallocator_ = SharpGen.Runtime.CppObject.ToCallbackPtr(deallocator); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)deallocator_, (*(void ***)this._nativePointer)[3]); + System.GC.KeepAlive(deallocator); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// IAvnMacOptions* IAvaloniaNativeFactory::GetMacOptions() + /// IAvaloniaNativeFactory::GetMacOptions + internal unsafe Avalonia.Native.Interop.IAvnMacOptions GetMacOptions() + { + Avalonia.Native.Interop.IAvnMacOptions __result__; + System.IntPtr __result__native = System.IntPtr.Zero; + __result__native = Avalonia.Native.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, (*(void ***)this._nativePointer)[4]); + if (__result__native != System.IntPtr.Zero) + __result__ = new Avalonia.Native.Interop.IAvnMacOptions(__result__native); + else + __result__ = null; + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateWindow([In] IAvnWindowEvents* cb,[In] IAvnGlContext* gl,[In] IAvnWindow** ppv) + /// IAvaloniaNativeFactory::CreateWindow + public unsafe Avalonia.Native.Interop.IAvnWindow CreateWindow(Avalonia.Native.Interop.IAvnWindowEvents cb, Avalonia.Native.Interop.IAvnGlContext gl) + { + System.IntPtr cb_ = System.IntPtr.Zero; + System.IntPtr gl_ = System.IntPtr.Zero; + Avalonia.Native.Interop.IAvnWindow vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + cb_ = SharpGen.Runtime.CppObject.ToCallbackPtr(cb); + gl_ = SharpGen.Runtime.CppObject.ToCallbackPtr(gl); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)cb_, (void *)gl_, &vOut_, (*(void ***)this._nativePointer)[5]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnWindow(vOut_); + else + vOut = null; + System.GC.KeepAlive(cb); + System.GC.KeepAlive(gl); + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreatePopup([In] IAvnWindowEvents* cb,[In] IAvnGlContext* gl,[In] IAvnPopup** ppv) + /// IAvaloniaNativeFactory::CreatePopup + public unsafe Avalonia.Native.Interop.IAvnPopup CreatePopup(Avalonia.Native.Interop.IAvnWindowEvents cb, Avalonia.Native.Interop.IAvnGlContext gl) + { + System.IntPtr cb_ = System.IntPtr.Zero; + System.IntPtr gl_ = System.IntPtr.Zero; + Avalonia.Native.Interop.IAvnPopup vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + cb_ = SharpGen.Runtime.CppObject.ToCallbackPtr(cb); + gl_ = SharpGen.Runtime.CppObject.ToCallbackPtr(gl); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)cb_, (void *)gl_, &vOut_, (*(void ***)this._nativePointer)[6]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnPopup(vOut_); + else + vOut = null; + System.GC.KeepAlive(cb); + System.GC.KeepAlive(gl); + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreatePlatformThreadingInterface([In] IAvnPlatformThreadingInterface** ppv) + /// IAvaloniaNativeFactory::CreatePlatformThreadingInterface + public unsafe Avalonia.Native.Interop.IAvnPlatformThreadingInterface CreatePlatformThreadingInterface() + { + Avalonia.Native.Interop.IAvnPlatformThreadingInterface vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[7]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnPlatformThreadingInterface(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateSystemDialogs([In] IAvnSystemDialogs** ppv) + /// IAvaloniaNativeFactory::CreateSystemDialogs + public unsafe Avalonia.Native.Interop.IAvnSystemDialogs CreateSystemDialogs() + { + Avalonia.Native.Interop.IAvnSystemDialogs vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[8]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnSystemDialogs(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateScreens([In] IAvnScreens** ppv) + /// IAvaloniaNativeFactory::CreateScreens + public unsafe Avalonia.Native.Interop.IAvnScreens CreateScreens() + { + Avalonia.Native.Interop.IAvnScreens vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[9]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnScreens(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateClipboard([In] IAvnClipboard** ppv) + /// IAvaloniaNativeFactory::CreateClipboard + public unsafe Avalonia.Native.Interop.IAvnClipboard CreateClipboard() + { + Avalonia.Native.Interop.IAvnClipboard vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[10]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnClipboard(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateDndClipboard([In] IAvnClipboard** ppv) + /// IAvaloniaNativeFactory::CreateDndClipboard + public unsafe Avalonia.Native.Interop.IAvnClipboard CreateDndClipboard() + { + Avalonia.Native.Interop.IAvnClipboard vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[11]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnClipboard(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateCursorFactory([In] IAvnCursorFactory** ppv) + /// IAvaloniaNativeFactory::CreateCursorFactory + public unsafe Avalonia.Native.Interop.IAvnCursorFactory CreateCursorFactory() + { + Avalonia.Native.Interop.IAvnCursorFactory vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[12]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnCursorFactory(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::ObtainGlDisplay([In] IAvnGlDisplay** ppv) + /// IAvaloniaNativeFactory::ObtainGlDisplay + public unsafe Avalonia.Native.Interop.IAvnGlDisplay ObtainGlDisplay() + { + Avalonia.Native.Interop.IAvnGlDisplay vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[13]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnGlDisplay(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::SetAppMenu([In] IAvnMenu* menu) + /// IAvaloniaNativeFactory::SetAppMenu + internal unsafe void SetAppMenu(Avalonia.Native.Interop.IAvnMenu menu) + { + System.IntPtr menu_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + menu_ = SharpGen.Runtime.CppObject.ToCallbackPtr(menu); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)menu_, (*(void ***)this._nativePointer)[14]); + System.GC.KeepAlive(menu); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateMenu([In] IAvnMenuEvents* cb,[In] IAvnMenu** ppv) + /// IAvaloniaNativeFactory::CreateMenu + public unsafe Avalonia.Native.Interop.IAvnMenu CreateMenu(Avalonia.Native.Interop.IAvnMenuEvents cb) + { + System.IntPtr cb_ = System.IntPtr.Zero; + Avalonia.Native.Interop.IAvnMenu vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + cb_ = SharpGen.Runtime.CppObject.ToCallbackPtr(cb); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)cb_, &vOut_, (*(void ***)this._nativePointer)[15]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnMenu(vOut_); + else + vOut = null; + System.GC.KeepAlive(cb); + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateMenuItem([In] IAvnMenuItem** ppv) + /// IAvaloniaNativeFactory::CreateMenuItem + public unsafe Avalonia.Native.Interop.IAvnMenuItem CreateMenuItem() + { + Avalonia.Native.Interop.IAvnMenuItem vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[16]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnMenuItem(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvaloniaNativeFactory::CreateMenuItemSeperator([In] IAvnMenuItem** ppv) + /// IAvaloniaNativeFactory::CreateMenuItemSeperator + public unsafe Avalonia.Native.Interop.IAvnMenuItem CreateMenuItemSeperator() + { + Avalonia.Native.Interop.IAvnMenuItem vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[17]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnMenuItem(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + } + + class IAvnActionCallbackShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnActionCallbackVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnActionCallbackVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 1) + { + AddMethod(new RunDelegate(Run)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void RunDelegate(System.IntPtr thisObject); + private static unsafe void Run(System.IntPtr thisObject) + { + try + { + IAvnActionCallback @this = (IAvnActionCallback)ToShadow(thisObject).Callback; + @this.Run(); + } + catch (System.Exception __exception__) + { + IAvnActionCallback @this = (IAvnActionCallback)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnActionCallbackShadow.IAvnActionCallbackVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f08"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnActionCallbackShadow))] + public partial interface IAvnActionCallback : SharpGen.Runtime.IUnknown + { + void Run(); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f0f")] + public partial class IAvnClipboard : SharpGen.Runtime.ComObject + { + public IAvnClipboard(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnClipboard(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnClipboard(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnClipboard::GetText([In] char* type,[In] IAvnString** ppv) + /// IAvnClipboard::GetText + public unsafe Avalonia.Native.Interop.IAvnString GetText(System.String type) + { + System.IntPtr type_; + Avalonia.Native.Interop.IAvnString vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + type_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(type); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)type_, &vOut_, (*(void ***)this._nativePointer)[3]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnString(vOut_); + else + vOut = null; + System.Runtime.InteropServices.Marshal.FreeHGlobal(type_); + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnClipboard::SetText([In] char* type,[In] void* utf8Text) + /// IAvnClipboard::SetText + public unsafe void SetText(System.String type, System.IntPtr utf8Text) + { + System.IntPtr type_; + SharpGen.Runtime.Result __result__; + type_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(type); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)type_, (void *)utf8Text, (*(void ***)this._nativePointer)[4]); + System.Runtime.InteropServices.Marshal.FreeHGlobal(type_); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnClipboard::ObtainFormats([In] IAvnStringArray** ppv) + /// IAvnClipboard::ObtainFormats + public unsafe Avalonia.Native.Interop.IAvnStringArray ObtainFormats() + { + Avalonia.Native.Interop.IAvnStringArray vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[5]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnStringArray(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnClipboard::GetStrings([In] char* type,[In] IAvnStringArray** ppv) + /// IAvnClipboard::GetStrings + public unsafe Avalonia.Native.Interop.IAvnStringArray GetStrings(System.String type) + { + System.IntPtr type_; + Avalonia.Native.Interop.IAvnStringArray vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + type_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(type); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)type_, &vOut_, (*(void ***)this._nativePointer)[6]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnStringArray(vOut_); + else + vOut = null; + System.Runtime.InteropServices.Marshal.FreeHGlobal(type_); + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnClipboard::SetBytes([In] char* type,[In] void* utf8Text,[In] int len) + /// IAvnClipboard::SetBytes + public unsafe void SetBytes(System.String type, System.IntPtr utf8Text, System.Int32 len) + { + System.IntPtr type_; + SharpGen.Runtime.Result __result__; + type_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(type); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)type_, (void *)utf8Text, len, (*(void ***)this._nativePointer)[7]); + System.Runtime.InteropServices.Marshal.FreeHGlobal(type_); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnClipboard::GetBytes([In] char* type,[In] IAvnString** ppv) + /// IAvnClipboard::GetBytes + public unsafe Avalonia.Native.Interop.IAvnString GetBytes(System.String type) + { + System.IntPtr type_; + Avalonia.Native.Interop.IAvnString vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + type_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(type); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)type_, &vOut_, (*(void ***)this._nativePointer)[8]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnString(vOut_); + else + vOut = null; + System.Runtime.InteropServices.Marshal.FreeHGlobal(type_); + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnClipboard::Clear() + /// IAvnClipboard::Clear + public unsafe void Clear() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[9]); + __result__.CheckError(); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f10")] + public partial class IAvnCursor : SharpGen.Runtime.ComObject + { + public IAvnCursor(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnCursor(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnCursor(nativePtr); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f11")] + public partial class IAvnCursorFactory : SharpGen.Runtime.ComObject + { + public IAvnCursorFactory(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnCursorFactory(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnCursorFactory(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnCursorFactory::GetCursor([In] AvnStandardCursorType cursorType,[Out] IAvnCursor** retOut) + /// IAvnCursorFactory::GetCursor + public unsafe Avalonia.Native.Interop.IAvnCursor GetCursor(Avalonia.Native.Interop.AvnStandardCursorType cursorType) + { + Avalonia.Native.Interop.IAvnCursor retOut; + System.IntPtr retOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, unchecked ((System.Int32)cursorType), &retOut_, (*(void ***)this._nativePointer)[3]); + if (retOut_ != System.IntPtr.Zero) + retOut = new Avalonia.Native.Interop.IAvnCursor(retOut_); + else + retOut = null; + __result__.CheckError(); + return retOut; + } + } + + class IAvnDndResultCallbackShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnDndResultCallbackVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnDndResultCallbackVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 1) + { + AddMethod(new OnDragAndDropCompleteDelegate(OnDragAndDropComplete)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void OnDragAndDropCompleteDelegate(System.IntPtr thisObject, int arg0); + private static unsafe void OnDragAndDropComplete(System.IntPtr thisObject, int param0) + { + try + { + Avalonia.Native.Interop.AvnDragDropEffects effecct = default (Avalonia.Native.Interop.AvnDragDropEffects); + effecct = (Avalonia.Native.Interop.AvnDragDropEffects)param0; + IAvnDndResultCallback @this = (IAvnDndResultCallback)ToShadow(thisObject).Callback; + @this.OnDragAndDropComplete(effecct); + } + catch (System.Exception __exception__) + { + IAvnDndResultCallback @this = (IAvnDndResultCallback)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnDndResultCallbackShadow.IAvnDndResultCallbackVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f21"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnDndResultCallbackShadow))] + public partial interface IAvnDndResultCallback : SharpGen.Runtime.IUnknown + { + void OnDragAndDropComplete(Avalonia.Native.Interop.AvnDragDropEffects effecct); + } + + class IAvnGCHandleDeallocatorCallbackShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnGCHandleDeallocatorCallbackVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnGCHandleDeallocatorCallbackVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 1) + { + AddMethod(new FreeGCHandleDelegate(FreeGCHandle)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void FreeGCHandleDelegate(System.IntPtr thisObject, void *arg0); + private static unsafe void FreeGCHandle(System.IntPtr thisObject, void *param0) + { + try + { + System.IntPtr handle = default (System.IntPtr); + handle = (System.IntPtr)param0; + IAvnGCHandleDeallocatorCallback @this = (IAvnGCHandleDeallocatorCallback)ToShadow(thisObject).Callback; + @this.FreeGCHandle(handle); + } + catch (System.Exception __exception__) + { + IAvnGCHandleDeallocatorCallback @this = (IAvnGCHandleDeallocatorCallback)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnGCHandleDeallocatorCallbackShadow.IAvnGCHandleDeallocatorCallbackVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f22"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnGCHandleDeallocatorCallbackShadow))] + public partial interface IAvnGCHandleDeallocatorCallback : SharpGen.Runtime.IUnknown + { + void FreeGCHandle(System.IntPtr handle); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f14")] + public partial class IAvnGlContext : SharpGen.Runtime.ComObject + { + public IAvnGlContext(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnGlContext(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnGlContext(nativePtr); + /// + /// No documentation. + /// + /// GetSampleCount + /// GetSampleCount + public System.Int32 SampleCount + { + get => GetSampleCount(); + } + + /// + /// No documentation. + /// + /// GetStencilSize + /// GetStencilSize + public System.Int32 StencilSize + { + get => GetStencilSize(); + } + + /// + /// No documentation. + /// + /// GetNativeHandle + /// GetNativeHandle + public System.IntPtr NativeHandle + { + get => GetNativeHandle(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnGlContext::MakeCurrent([In] IUnknown** ppv) + /// IAvnGlContext::MakeCurrent + public unsafe SharpGen.Runtime.IUnknown MakeCurrent() + { + SharpGen.Runtime.IUnknown vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &vOut_, (*(void ***)this._nativePointer)[3]); + if (vOut_ != System.IntPtr.Zero) + vOut = new SharpGen.Runtime.ComObject(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnGlContext::LegacyMakeCurrent() + /// IAvnGlContext::LegacyMakeCurrent + public unsafe void LegacyMakeCurrent() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// int IAvnGlContext::GetSampleCount() + /// IAvnGlContext::GetSampleCount + internal unsafe System.Int32 GetSampleCount() + { + System.Int32 __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[5]); + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// int IAvnGlContext::GetStencilSize() + /// IAvnGlContext::GetStencilSize + internal unsafe System.Int32 GetStencilSize() + { + System.Int32 __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[6]); + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// void* IAvnGlContext::GetNativeHandle() + /// IAvnGlContext::GetNativeHandle + internal unsafe System.IntPtr GetNativeHandle() + { + System.IntPtr __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, (*(void ***)this._nativePointer)[7]); + return __result__; + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f13")] + public partial class IAvnGlDisplay : SharpGen.Runtime.ComObject + { + public IAvnGlDisplay(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnGlDisplay(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnGlDisplay(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnGlDisplay::CreateContext([In] IAvnGlContext* share,[In] IAvnGlContext** ppv) + /// IAvnGlDisplay::CreateContext + public unsafe Avalonia.Native.Interop.IAvnGlContext CreateContext(Avalonia.Native.Interop.IAvnGlContext share) + { + System.IntPtr share_ = System.IntPtr.Zero; + Avalonia.Native.Interop.IAvnGlContext vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + share_ = SharpGen.Runtime.CppObject.ToCallbackPtr(share); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)share_, &vOut_, (*(void ***)this._nativePointer)[3]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnGlContext(vOut_); + else + vOut = null; + System.GC.KeepAlive(share); + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// void IAvnGlDisplay::LegacyClearCurrentContext() + /// IAvnGlDisplay::LegacyClearCurrentContext + public unsafe void LegacyClearCurrentContext() + { + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (*(void ***)this._nativePointer)[4]); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnGlDisplay::WrapContext([In] void* native,[In] IAvnGlContext** ppv) + /// IAvnGlDisplay::WrapContext + public unsafe Avalonia.Native.Interop.IAvnGlContext WrapContext(System.IntPtr native) + { + Avalonia.Native.Interop.IAvnGlContext vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)native, &vOut_, (*(void ***)this._nativePointer)[5]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnGlContext(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// void* IAvnGlDisplay::GetProcAddress([In] char* proc) + /// IAvnGlDisplay::GetProcAddress + public unsafe System.IntPtr GetProcAddress(System.String rocRef) + { + System.IntPtr rocRef_; + System.IntPtr __result__; + rocRef_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(rocRef); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, (void *)rocRef_, (*(void ***)this._nativePointer)[6]); + System.Runtime.InteropServices.Marshal.FreeHGlobal(rocRef_); + return __result__; + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f16")] + public partial class IAvnGlSurfaceRenderingSession : SharpGen.Runtime.ComObject + { + public IAvnGlSurfaceRenderingSession(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnGlSurfaceRenderingSession(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnGlSurfaceRenderingSession(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnGlSurfaceRenderingSession::GetPixelSize([In] AvnPixelSize* ret) + /// IAvnGlSurfaceRenderingSession::GetPixelSize + public unsafe Avalonia.Native.Interop.AvnPixelSize GetPixelSize() + { + Avalonia.Native.Interop.AvnPixelSize ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[3]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnGlSurfaceRenderingSession::GetScaling([In] double* ret) + /// IAvnGlSurfaceRenderingSession::GetScaling + public unsafe System.Double GetScaling() + { + System.Double ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + return ret; + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f15")] + public partial class IAvnGlSurfaceRenderTarget : SharpGen.Runtime.ComObject + { + public IAvnGlSurfaceRenderTarget(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnGlSurfaceRenderTarget(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnGlSurfaceRenderTarget(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnGlSurfaceRenderTarget::BeginDrawing([In] IAvnGlSurfaceRenderingSession** ret) + /// IAvnGlSurfaceRenderTarget::BeginDrawing + public unsafe Avalonia.Native.Interop.IAvnGlSurfaceRenderingSession BeginDrawing() + { + Avalonia.Native.Interop.IAvnGlSurfaceRenderingSession ret; + System.IntPtr ret_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret_, (*(void ***)this._nativePointer)[3]); + if (ret_ != System.IntPtr.Zero) + ret = new Avalonia.Native.Interop.IAvnGlSurfaceRenderingSession(ret_); + else + ret = null; + __result__.CheckError(); + return ret; + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f0a")] + public partial class IAvnLoopCancellation : SharpGen.Runtime.ComObject + { + public IAvnLoopCancellation(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnLoopCancellation(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnLoopCancellation(nativePtr); + /// + /// No documentation. + /// + /// void IAvnLoopCancellation::Cancel() + /// IAvnLoopCancellation::Cancel + public unsafe void Cancel() + { + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (*(void ***)this._nativePointer)[3]); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f07")] + public partial class IAvnMacOptions : SharpGen.Runtime.ComObject + { + public IAvnMacOptions(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnMacOptions(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnMacOptions(nativePtr); + /// + /// No documentation. + /// + /// SetShowInDock + /// SetShowInDock + public System.Int32 ShowInDock + { + set => SetShowInDock(value); + } + + /// + /// No documentation. + /// + /// SetApplicationTitle + /// SetApplicationTitle + public System.IntPtr ApplicationTitle + { + set => SetApplicationTitle(value); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMacOptions::SetShowInDock([In] int show) + /// IAvnMacOptions::SetShowInDock + internal unsafe void SetShowInDock(System.Int32 show) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, show, (*(void ***)this._nativePointer)[3]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMacOptions::SetApplicationTitle([In] void* utf8string) + /// IAvnMacOptions::SetApplicationTitle + internal unsafe void SetApplicationTitle(System.IntPtr utf8string) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)utf8string, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f17")] + public partial class IAvnMenu : SharpGen.Runtime.ComObject + { + public IAvnMenu(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnMenu(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnMenu(nativePtr); + /// + /// No documentation. + /// + /// SetTitle + /// SetTitle + public System.IntPtr Title + { + set => SetTitle(value); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenu::InsertItem([In] int index,[In] IAvnMenuItem* item) + /// IAvnMenu::InsertItem + public unsafe void InsertItem(System.Int32 index, Avalonia.Native.Interop.IAvnMenuItem item) + { + System.IntPtr item_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + item_ = SharpGen.Runtime.CppObject.ToCallbackPtr(item); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, index, (void *)item_, (*(void ***)this._nativePointer)[3]); + System.GC.KeepAlive(item); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenu::RemoveItem([In] IAvnMenuItem* item) + /// IAvnMenu::RemoveItem + public unsafe void RemoveItem(Avalonia.Native.Interop.IAvnMenuItem item) + { + System.IntPtr item_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + item_ = SharpGen.Runtime.CppObject.ToCallbackPtr(item); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)item_, (*(void ***)this._nativePointer)[4]); + System.GC.KeepAlive(item); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenu::SetTitle([In] void* utf8String) + /// IAvnMenu::SetTitle + internal unsafe void SetTitle(System.IntPtr utf8String) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)utf8String, (*(void ***)this._nativePointer)[5]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnMenu::Clear() + /// IAvnMenu::Clear + public unsafe void Clear() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[6]); + __result__.CheckError(); + } + } + + class IAvnMenuEventsShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnMenuEventsVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnMenuEventsVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 1) + { + AddMethod(new NeedsUpdateDelegate(NeedsUpdate)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void NeedsUpdateDelegate(System.IntPtr thisObject); + private static unsafe void NeedsUpdate(System.IntPtr thisObject) + { + try + { + IAvnMenuEvents @this = (IAvnMenuEvents)ToShadow(thisObject).Callback; + @this.NeedsUpdate(); + } + catch (System.Exception __exception__) + { + IAvnMenuEvents @this = (IAvnMenuEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnMenuEventsShadow.IAvnMenuEventsVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f1A"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnMenuEventsShadow))] + public partial interface IAvnMenuEvents : SharpGen.Runtime.IUnknown + { + void NeedsUpdate(); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f19")] + public partial class IAvnMenuItem : SharpGen.Runtime.ComObject + { + public IAvnMenuItem(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnMenuItem(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnMenuItem(nativePtr); + /// + /// No documentation. + /// + /// SetSubMenu + /// SetSubMenu + public Avalonia.Native.Interop.IAvnMenu SubMenu + { + set => SetSubMenu(value); + } + + /// + /// No documentation. + /// + /// SetTitle + /// SetTitle + public System.IntPtr Title + { + set => SetTitle(value); + } + + /// + /// No documentation. + /// + /// SetIsChecked + /// SetIsChecked + public System.Boolean IsChecked + { + set => SetIsChecked(value); + } + + /// + /// No documentation. + /// + /// SetToggleType + /// SetToggleType + public Avalonia.Native.Interop.AvnMenuItemToggleType ToggleType + { + set => SetToggleType(value); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenuItem::SetSubMenu([In] IAvnMenu* menu) + /// IAvnMenuItem::SetSubMenu + internal unsafe void SetSubMenu(Avalonia.Native.Interop.IAvnMenu menu) + { + System.IntPtr menu_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + menu_ = SharpGen.Runtime.CppObject.ToCallbackPtr(menu); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)menu_, (*(void ***)this._nativePointer)[3]); + System.GC.KeepAlive(menu); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenuItem::SetTitle([In] void* utf8String) + /// IAvnMenuItem::SetTitle + internal unsafe void SetTitle(System.IntPtr utf8String) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)utf8String, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenuItem::SetGesture([In] void* utf8String,[In] AvnInputModifiers modifiers) + /// IAvnMenuItem::SetGesture + public unsafe void SetGesture(System.IntPtr utf8String, Avalonia.Native.Interop.AvnInputModifiers modifiers) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)utf8String, unchecked ((System.Int32)modifiers), (*(void ***)this._nativePointer)[5]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenuItem::SetAction([In] IAvnPredicateCallback* predicate,[In] IAvnActionCallback* callback) + /// IAvnMenuItem::SetAction + public unsafe void SetAction(Avalonia.Native.Interop.IAvnPredicateCallback redicateRef, Avalonia.Native.Interop.IAvnActionCallback callback) + { + System.IntPtr redicateRef_ = System.IntPtr.Zero; + System.IntPtr callback_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + redicateRef_ = SharpGen.Runtime.CppObject.ToCallbackPtr(redicateRef); + callback_ = SharpGen.Runtime.CppObject.ToCallbackPtr(callback); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)redicateRef_, (void *)callback_, (*(void ***)this._nativePointer)[6]); + System.GC.KeepAlive(redicateRef); + System.GC.KeepAlive(callback); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenuItem::SetIsChecked([In] bool isChecked) + /// IAvnMenuItem::SetIsChecked + internal unsafe void SetIsChecked(System.Boolean isChecked) + { + System.Byte isChecked_; + SharpGen.Runtime.Result __result__; + isChecked_ = (System.Byte)(isChecked ? 1 : 0); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, isChecked_, (*(void ***)this._nativePointer)[7]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenuItem::SetToggleType([In] AvnMenuItemToggleType toggleType) + /// IAvnMenuItem::SetToggleType + internal unsafe void SetToggleType(Avalonia.Native.Interop.AvnMenuItemToggleType toggleType) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, unchecked ((System.Int32)toggleType), (*(void ***)this._nativePointer)[8]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnMenuItem::SetIcon([In] void* data,[In] size_t length) + /// IAvnMenuItem::SetIcon + public unsafe void SetIcon(System.IntPtr data, SharpGen.Runtime.PointerSize length) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)data, (void *)length, (*(void ***)this._nativePointer)[9]); + __result__.CheckError(); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f20")] + public partial class IAvnNativeControlHost : SharpGen.Runtime.ComObject + { + public IAvnNativeControlHost(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnNativeControlHost(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnNativeControlHost(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnNativeControlHost::CreateDefaultChild([In] void* parent,[Out] void** retOut) + /// IAvnNativeControlHost::CreateDefaultChild + public unsafe System.IntPtr CreateDefaultChild(System.IntPtr arentRef) + { + System.IntPtr retOut; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)arentRef, &retOut, (*(void ***)this._nativePointer)[3]); + __result__.CheckError(); + return retOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// IAvnNativeControlHostTopLevelAttachment* IAvnNativeControlHost::CreateAttachment() + /// IAvnNativeControlHost::CreateAttachment + public unsafe Avalonia.Native.Interop.IAvnNativeControlHostTopLevelAttachment CreateAttachment() + { + Avalonia.Native.Interop.IAvnNativeControlHostTopLevelAttachment __result__; + System.IntPtr __result__native = System.IntPtr.Zero; + __result__native = Avalonia.Native.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, (*(void ***)this._nativePointer)[4]); + if (__result__native != System.IntPtr.Zero) + __result__ = new Avalonia.Native.Interop.IAvnNativeControlHostTopLevelAttachment(__result__native); + else + __result__ = null; + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// void IAvnNativeControlHost::DestroyDefaultChild([In] void* child) + /// IAvnNativeControlHost::DestroyDefaultChild + public unsafe void DestroyDefaultChild(System.IntPtr child) + { + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (void *)child, (*(void ***)this._nativePointer)[5]); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f21")] + public partial class IAvnNativeControlHostTopLevelAttachment : SharpGen.Runtime.ComObject + { + public IAvnNativeControlHostTopLevelAttachment(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnNativeControlHostTopLevelAttachment(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnNativeControlHostTopLevelAttachment(nativePtr); + /// + /// No documentation. + /// + /// GetParentHandle + /// GetParentHandle + public System.IntPtr ParentHandle + { + get => GetParentHandle(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// void* IAvnNativeControlHostTopLevelAttachment::GetParentHandle() + /// IAvnNativeControlHostTopLevelAttachment::GetParentHandle + internal unsafe System.IntPtr GetParentHandle() + { + System.IntPtr __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, (*(void ***)this._nativePointer)[3]); + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnNativeControlHostTopLevelAttachment::InitializeWithChildHandle([In] void* child) + /// IAvnNativeControlHostTopLevelAttachment::InitializeWithChildHandle + public unsafe void InitializeWithChildHandle(System.IntPtr child) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)child, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnNativeControlHostTopLevelAttachment::AttachTo([In] IAvnNativeControlHost* host) + /// IAvnNativeControlHostTopLevelAttachment::AttachTo + public unsafe void AttachTo(Avalonia.Native.Interop.IAvnNativeControlHost host) + { + System.IntPtr host_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + host_ = SharpGen.Runtime.CppObject.ToCallbackPtr(host); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)host_, (*(void ***)this._nativePointer)[5]); + System.GC.KeepAlive(host); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// void IAvnNativeControlHostTopLevelAttachment::ShowInBounds([In] float x,[In] float y,[In] float width,[In] float height) + /// IAvnNativeControlHostTopLevelAttachment::ShowInBounds + public unsafe void ShowInBounds(System.Single x, System.Single y, System.Single width, System.Single height) + { + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, x, y, width, height, (*(void ***)this._nativePointer)[6]); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// void IAvnNativeControlHostTopLevelAttachment::HideWithSize([In] float width,[In] float height) + /// IAvnNativeControlHostTopLevelAttachment::HideWithSize + public unsafe void HideWithSize(System.Single width, System.Single height) + { + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, width, height, (*(void ***)this._nativePointer)[7]); + } + + /// + /// No documentation. + /// + /// void IAvnNativeControlHostTopLevelAttachment::ReleaseChild() + /// IAvnNativeControlHostTopLevelAttachment::ReleaseChild + public unsafe void ReleaseChild() + { + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (*(void ***)this._nativePointer)[8]); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f0b")] + public partial class IAvnPlatformThreadingInterface : SharpGen.Runtime.ComObject + { + public IAvnPlatformThreadingInterface(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnPlatformThreadingInterface(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnPlatformThreadingInterface(nativePtr); + /// + /// No documentation. + /// + /// GetCurrentThreadIsLoopThread + /// GetCurrentThreadIsLoopThread + public System.Boolean CurrentThreadIsLoopThread + { + get => GetCurrentThreadIsLoopThread(); + } + + /// + /// No documentation. + /// + /// SetSignaledCallback + /// SetSignaledCallback + public Avalonia.Native.Interop.IAvnSignaledCallback SignaledCallback + { + set => SetSignaledCallback(value); + } + + /// + /// No documentation. + /// + /// No documentation. + /// bool IAvnPlatformThreadingInterface::GetCurrentThreadIsLoopThread() + /// IAvnPlatformThreadingInterface::GetCurrentThreadIsLoopThread + internal unsafe System.Boolean GetCurrentThreadIsLoopThread() + { + System.Boolean __result__; + System.Byte __result__native; + __result__native = Avalonia.Native.LocalInterop.CalliThisCallSystemByte(this._nativePointer, (*(void ***)this._nativePointer)[3]); + __result__ = __result__native != 0; + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// void IAvnPlatformThreadingInterface::SetSignaledCallback([In] IAvnSignaledCallback* cb) + /// IAvnPlatformThreadingInterface::SetSignaledCallback + internal unsafe void SetSignaledCallback(Avalonia.Native.Interop.IAvnSignaledCallback cb) + { + System.IntPtr cb_ = System.IntPtr.Zero; + cb_ = SharpGen.Runtime.CppObject.ToCallbackPtr(cb); + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (void *)cb_, (*(void ***)this._nativePointer)[4]); + System.GC.KeepAlive(cb); + } + + /// + /// No documentation. + /// + /// No documentation. + /// IAvnLoopCancellation* IAvnPlatformThreadingInterface::CreateLoopCancellation() + /// IAvnPlatformThreadingInterface::CreateLoopCancellation + public unsafe Avalonia.Native.Interop.IAvnLoopCancellation CreateLoopCancellation() + { + Avalonia.Native.Interop.IAvnLoopCancellation __result__; + System.IntPtr __result__native = System.IntPtr.Zero; + __result__native = Avalonia.Native.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, (*(void ***)this._nativePointer)[5]); + if (__result__native != System.IntPtr.Zero) + __result__ = new Avalonia.Native.Interop.IAvnLoopCancellation(__result__native); + else + __result__ = null; + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnPlatformThreadingInterface::RunLoop([In] IAvnLoopCancellation* cancel) + /// IAvnPlatformThreadingInterface::RunLoop + public unsafe void RunLoop(Avalonia.Native.Interop.IAvnLoopCancellation cancel) + { + System.IntPtr cancel_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + cancel_ = SharpGen.Runtime.CppObject.ToCallbackPtr(cancel); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)cancel_, (*(void ***)this._nativePointer)[6]); + System.GC.KeepAlive(cancel); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// void IAvnPlatformThreadingInterface::Signal([In] int priority) + /// IAvnPlatformThreadingInterface::Signal + public unsafe void Signal(System.Int32 priority) + { + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, priority, (*(void ***)this._nativePointer)[7]); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// IUnknown* IAvnPlatformThreadingInterface::StartTimer([In] int priority,[In] int ms,[In] IAvnActionCallback* callback) + /// IAvnPlatformThreadingInterface::StartTimer + public unsafe SharpGen.Runtime.ComObject StartTimer(System.Int32 priority, System.Int32 ms, Avalonia.Native.Interop.IAvnActionCallback callback) + { + System.IntPtr callback_ = System.IntPtr.Zero; + SharpGen.Runtime.ComObject __result__; + System.IntPtr __result__native = System.IntPtr.Zero; + callback_ = SharpGen.Runtime.CppObject.ToCallbackPtr(callback); + __result__native = Avalonia.Native.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, priority, ms, (void *)callback_, (*(void ***)this._nativePointer)[8]); + if (__result__native != System.IntPtr.Zero) + __result__ = new SharpGen.Runtime.ComObject(__result__native); + else + __result__ = null; + System.GC.KeepAlive(callback); + return __result__; + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f03")] + public partial class IAvnPopup : Avalonia.Native.Interop.IAvnWindowBase + { + public IAvnPopup(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnPopup(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnPopup(nativePtr); + } + + class IAvnPredicateCallbackShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnPredicateCallbackVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnPredicateCallbackVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 1) + { + AddMethod(new EvaluateDelegate(Evaluate)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate System.Byte EvaluateDelegate(System.IntPtr thisObject); + private static unsafe System.Byte Evaluate(System.IntPtr thisObject) + { + try + { + System.Boolean __result__ = default (System.Boolean); + System.Byte __result__native; + IAvnPredicateCallback @this = (IAvnPredicateCallback)ToShadow(thisObject).Callback; + __result__ = @this.Evaluate(); + __result__native = (System.Byte)(__result__ ? 1 : 0); + return __result__native; + } + catch (System.Exception __exception__) + { + IAvnPredicateCallback @this = (IAvnPredicateCallback)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + return default (System.Byte); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnPredicateCallbackShadow.IAvnPredicateCallbackVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f18"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnPredicateCallbackShadow))] + public partial interface IAvnPredicateCallback : SharpGen.Runtime.IUnknown + { + System.Boolean Evaluate(); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f0e")] + public partial class IAvnScreens : SharpGen.Runtime.ComObject + { + public IAvnScreens(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnScreens(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnScreens(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnScreens::GetScreenCount([In] int* ret) + /// IAvnScreens::GetScreenCount + public unsafe System.Int32 GetScreenCount() + { + System.Int32 ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[3]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnScreens::GetScreen([In] int index,[In] AvnScreen* ret) + /// IAvnScreens::GetScreen + public unsafe Avalonia.Native.Interop.AvnScreen GetScreen(System.Int32 index) + { + Avalonia.Native.Interop.AvnScreen ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, index, &ret, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + return ret; + } + } + + class IAvnSignaledCallbackShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnSignaledCallbackVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnSignaledCallbackVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 1) + { + AddMethod(new SignaledDelegate(Signaled)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void SignaledDelegate(System.IntPtr thisObject, int arg0, System.Byte arg1); + private static unsafe void Signaled(System.IntPtr thisObject, int param0, System.Byte param1) + { + try + { + System.Int32 priority = default (System.Int32); + priority = (System.Int32)param0; + System.Boolean priorityContainsMeaningfulValue = default (System.Boolean); + System.Byte priorityContainsMeaningfulValue_ = (System.Byte)param1; + IAvnSignaledCallback @this = (IAvnSignaledCallback)ToShadow(thisObject).Callback; + priorityContainsMeaningfulValue = priorityContainsMeaningfulValue_ != 0; + @this.Signaled(priority, priorityContainsMeaningfulValue); + } + catch (System.Exception __exception__) + { + IAvnSignaledCallback @this = (IAvnSignaledCallback)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnSignaledCallbackShadow.IAvnSignaledCallbackVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f09"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnSignaledCallbackShadow))] + public partial interface IAvnSignaledCallback : SharpGen.Runtime.IUnknown + { + void Signaled(System.Int32 priority, System.Boolean priorityContainsMeaningfulValue); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f17")] + public partial class IAvnString : SharpGen.Runtime.ComObject + { + public IAvnString(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnString(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnString(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnString::Pointer([Out] void** retOut) + /// IAvnString::Pointer + public unsafe System.IntPtr Pointer() + { + System.IntPtr retOut; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &retOut, (*(void ***)this._nativePointer)[3]); + __result__.CheckError(); + return retOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnString::Length([In] int* ret) + /// IAvnString::Length + public unsafe System.Int32 Length() + { + System.Int32 ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + return ret; + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f20")] + public partial class IAvnStringArray : SharpGen.Runtime.ComObject + { + public IAvnStringArray(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnStringArray(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnStringArray(nativePtr); + /// + /// No documentation. + /// + /// GetCount + /// GetCount + public System.UInt32 Count + { + get => GetCount(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// unsigned int IAvnStringArray::GetCount() + /// IAvnStringArray::GetCount + internal unsafe System.UInt32 GetCount() + { + System.UInt32 __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallSystemUInt32(this._nativePointer, (*(void ***)this._nativePointer)[3]); + return __result__; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnStringArray::Get([In] unsigned int index,[In] IAvnString** ppv) + /// IAvnStringArray::Get + public unsafe Avalonia.Native.Interop.IAvnString Get(System.UInt32 index) + { + Avalonia.Native.Interop.IAvnString vOut; + System.IntPtr vOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, index, &vOut_, (*(void ***)this._nativePointer)[4]); + if (vOut_ != System.IntPtr.Zero) + vOut = new Avalonia.Native.Interop.IAvnString(vOut_); + else + vOut = null; + __result__.CheckError(); + return vOut; + } + } + + class IAvnSystemDialogEventsShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnSystemDialogEventsVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnSystemDialogEventsVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 1) + { + AddMethod(new OnCompletedDelegate(OnCompleted)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void OnCompletedDelegate(System.IntPtr thisObject, int arg0, void *arg1); + private static unsafe void OnCompleted(System.IntPtr thisObject, int param0, void *param1) + { + try + { + System.Int32 numResults = default (System.Int32); + numResults = (System.Int32)param0; + System.IntPtr trFirstResultRef = default (System.IntPtr); + trFirstResultRef = (System.IntPtr)param1; + IAvnSystemDialogEvents @this = (IAvnSystemDialogEvents)ToShadow(thisObject).Callback; + @this.OnCompleted(numResults, trFirstResultRef); + } + catch (System.Exception __exception__) + { + IAvnSystemDialogEvents @this = (IAvnSystemDialogEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnSystemDialogEventsShadow.IAvnSystemDialogEventsVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f0c"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnSystemDialogEventsShadow))] + public partial interface IAvnSystemDialogEvents : SharpGen.Runtime.IUnknown + { + void OnCompleted(System.Int32 numResults, System.IntPtr trFirstResultRef); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f0d")] + public partial class IAvnSystemDialogs : SharpGen.Runtime.ComObject + { + public IAvnSystemDialogs(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnSystemDialogs(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnSystemDialogs(nativePtr); + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// void IAvnSystemDialogs::SelectFolderDialog([In] IAvnWindow* parentWindowHandle,[In] IAvnSystemDialogEvents* events,[In] const char* title,[In] const char* initialPath) + /// IAvnSystemDialogs::SelectFolderDialog + public unsafe void SelectFolderDialog(Avalonia.Native.Interop.IAvnWindow arentWindowHandleRef, Avalonia.Native.Interop.IAvnSystemDialogEvents events, System.String title, System.String initialPath) + { + System.IntPtr arentWindowHandleRef_ = System.IntPtr.Zero; + System.IntPtr events_ = System.IntPtr.Zero; + System.IntPtr title_; + System.IntPtr initialPath_; + arentWindowHandleRef_ = SharpGen.Runtime.CppObject.ToCallbackPtr(arentWindowHandleRef); + events_ = SharpGen.Runtime.CppObject.ToCallbackPtr(events); + title_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(title); + initialPath_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(initialPath); + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (void *)arentWindowHandleRef_, (void *)events_, (void *)title_, (void *)initialPath_, (*(void ***)this._nativePointer)[3]); + System.GC.KeepAlive(arentWindowHandleRef); + System.GC.KeepAlive(events); + System.Runtime.InteropServices.Marshal.FreeHGlobal(title_); + System.Runtime.InteropServices.Marshal.FreeHGlobal(initialPath_); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// void IAvnSystemDialogs::OpenFileDialog([In] IAvnWindow* parentWindowHandle,[In] IAvnSystemDialogEvents* events,[In] bool allowMultiple,[In] const char* title,[In] const char* initialDirectory,[In] const char* initialFile,[In] const char* filters) + /// IAvnSystemDialogs::OpenFileDialog + public unsafe void OpenFileDialog(Avalonia.Native.Interop.IAvnWindow arentWindowHandleRef, Avalonia.Native.Interop.IAvnSystemDialogEvents events, System.Boolean allowMultiple, System.String title, System.String initialDirectory, System.String initialFile, System.String filters) + { + System.IntPtr arentWindowHandleRef_ = System.IntPtr.Zero; + System.IntPtr events_ = System.IntPtr.Zero; + System.Byte allowMultiple_; + System.IntPtr title_; + System.IntPtr initialDirectory_; + System.IntPtr initialFile_; + System.IntPtr filters_; + arentWindowHandleRef_ = SharpGen.Runtime.CppObject.ToCallbackPtr(arentWindowHandleRef); + events_ = SharpGen.Runtime.CppObject.ToCallbackPtr(events); + allowMultiple_ = (System.Byte)(allowMultiple ? 1 : 0); + title_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(title); + initialDirectory_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(initialDirectory); + initialFile_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(initialFile); + filters_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(filters); + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (void *)arentWindowHandleRef_, (void *)events_, allowMultiple_, (void *)title_, (void *)initialDirectory_, (void *)initialFile_, (void *)filters_, (*(void ***)this._nativePointer)[4]); + System.GC.KeepAlive(arentWindowHandleRef); + System.GC.KeepAlive(events); + System.Runtime.InteropServices.Marshal.FreeHGlobal(title_); + System.Runtime.InteropServices.Marshal.FreeHGlobal(initialDirectory_); + System.Runtime.InteropServices.Marshal.FreeHGlobal(initialFile_); + System.Runtime.InteropServices.Marshal.FreeHGlobal(filters_); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// void IAvnSystemDialogs::SaveFileDialog([In] IAvnWindow* parentWindowHandle,[In] IAvnSystemDialogEvents* events,[In] const char* title,[In] const char* initialDirectory,[In] const char* initialFile,[In] const char* filters) + /// IAvnSystemDialogs::SaveFileDialog + public unsafe void SaveFileDialog(Avalonia.Native.Interop.IAvnWindow arentWindowHandleRef, Avalonia.Native.Interop.IAvnSystemDialogEvents events, System.String title, System.String initialDirectory, System.String initialFile, System.String filters) + { + System.IntPtr arentWindowHandleRef_ = System.IntPtr.Zero; + System.IntPtr events_ = System.IntPtr.Zero; + System.IntPtr title_; + System.IntPtr initialDirectory_; + System.IntPtr initialFile_; + System.IntPtr filters_; + arentWindowHandleRef_ = SharpGen.Runtime.CppObject.ToCallbackPtr(arentWindowHandleRef); + events_ = SharpGen.Runtime.CppObject.ToCallbackPtr(events); + title_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(title); + initialDirectory_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(initialDirectory); + initialFile_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(initialFile); + filters_ = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(filters); + Avalonia.Native.LocalInterop.CalliThisCallvoid(this._nativePointer, (void *)arentWindowHandleRef_, (void *)events_, (void *)title_, (void *)initialDirectory_, (void *)initialFile_, (void *)filters_, (*(void ***)this._nativePointer)[5]); + System.GC.KeepAlive(arentWindowHandleRef); + System.GC.KeepAlive(events); + System.Runtime.InteropServices.Marshal.FreeHGlobal(title_); + System.Runtime.InteropServices.Marshal.FreeHGlobal(initialDirectory_); + System.Runtime.InteropServices.Marshal.FreeHGlobal(initialFile_); + System.Runtime.InteropServices.Marshal.FreeHGlobal(filters_); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f04")] + public partial class IAvnWindow : Avalonia.Native.Interop.IAvnWindowBase + { + public IAvnWindow(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnWindow(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnWindow(nativePtr); + /// + /// No documentation. + /// + /// SetEnabled + /// SetEnabled + public System.Boolean Enabled + { + set => SetEnabled(value); + } + + /// + /// No documentation. + /// + /// SetParent + /// SetParent + public Avalonia.Native.Interop.IAvnWindow Parent + { + set => SetParent(value); + } + + /// + /// No documentation. + /// + /// SetCanResize + /// SetCanResize + public System.Boolean CanResize + { + set => SetCanResize(value); + } + + /// + /// No documentation. + /// + /// SetDecorations + /// SetDecorations + public Avalonia.Native.Interop.SystemDecorations Decorations + { + set => SetDecorations(value); + } + + /// + /// No documentation. + /// + /// SetTitle + /// SetTitle + public System.IntPtr Title + { + set => SetTitle(value); + } + + /// + /// No documentation. + /// + /// SetTitleBarColor + /// SetTitleBarColor + public Avalonia.Native.Interop.AvnColor TitleBarColor + { + set => SetTitleBarColor(value); + } + + /// + /// No documentation. + /// + /// SetExtendClientArea + /// SetExtendClientArea + public System.Boolean ExtendClientArea + { + set => SetExtendClientArea(value); + } + + /// + /// No documentation. + /// + /// SetExtendClientAreaHints + /// SetExtendClientAreaHints + public Avalonia.Native.Interop.AvnExtendClientAreaChromeHints ExtendClientAreaHints + { + set => SetExtendClientAreaHints(value); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetEnabled([In] bool enable) + /// IAvnWindow::SetEnabled + internal unsafe void SetEnabled(System.Boolean enable) + { + System.Byte enable_; + SharpGen.Runtime.Result __result__; + enable_ = (System.Byte)(enable ? 1 : 0); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, enable_, (*(void ***)this._nativePointer)[30]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetParent([In] IAvnWindow* parent) + /// IAvnWindow::SetParent + internal unsafe void SetParent(Avalonia.Native.Interop.IAvnWindow arentRef) + { + System.IntPtr arentRef_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + arentRef_ = SharpGen.Runtime.CppObject.ToCallbackPtr(arentRef); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)arentRef_, (*(void ***)this._nativePointer)[31]); + System.GC.KeepAlive(arentRef); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetCanResize([In] bool value) + /// IAvnWindow::SetCanResize + internal unsafe void SetCanResize(System.Boolean value) + { + System.Byte value_; + SharpGen.Runtime.Result __result__; + value_ = (System.Byte)(value ? 1 : 0); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, value_, (*(void ***)this._nativePointer)[32]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetDecorations([In] SystemDecorations value) + /// IAvnWindow::SetDecorations + internal unsafe void SetDecorations(Avalonia.Native.Interop.SystemDecorations value) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, unchecked ((System.Int32)value), (*(void ***)this._nativePointer)[33]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetTitle([In] void* utf8Title) + /// IAvnWindow::SetTitle + internal unsafe void SetTitle(System.IntPtr utf8Title) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)utf8Title, (*(void ***)this._nativePointer)[34]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetTitleBarColor([In] AvnColor color) + /// IAvnWindow::SetTitleBarColor + internal unsafe void SetTitleBarColor(Avalonia.Native.Interop.AvnColor color) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint0(this._nativePointer, color, (*(void ***)this._nativePointer)[35]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetWindowState([In] AvnWindowState state) + /// IAvnWindow::SetWindowState + public unsafe void SetWindowState(Avalonia.Native.Interop.AvnWindowState state) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, unchecked ((System.Int32)state), (*(void ***)this._nativePointer)[36]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindow::GetWindowState([In] AvnWindowState* ret) + /// IAvnWindow::GetWindowState + public unsafe Avalonia.Native.Interop.AvnWindowState GetWindowState() + { + Avalonia.Native.Interop.AvnWindowState ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[37]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindow::TakeFocusFromChildren() + /// IAvnWindow::TakeFocusFromChildren + public unsafe void TakeFocusFromChildren() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[38]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetExtendClientArea([In] bool enable) + /// IAvnWindow::SetExtendClientArea + internal unsafe void SetExtendClientArea(System.Boolean enable) + { + System.Byte enable_; + SharpGen.Runtime.Result __result__; + enable_ = (System.Byte)(enable ? 1 : 0); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, enable_, (*(void ***)this._nativePointer)[39]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetExtendClientAreaHints([In] AvnExtendClientAreaChromeHints hints) + /// IAvnWindow::SetExtendClientAreaHints + internal unsafe void SetExtendClientAreaHints(Avalonia.Native.Interop.AvnExtendClientAreaChromeHints hints) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, unchecked ((System.Int32)hints), (*(void ***)this._nativePointer)[40]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindow::GetExtendTitleBarHeight([In] double* ret) + /// IAvnWindow::GetExtendTitleBarHeight + public unsafe System.Double GetExtendTitleBarHeight() + { + System.Double ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[41]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindow::SetExtendTitleBarHeight([In] double value) + /// IAvnWindow::SetExtendTitleBarHeight + public unsafe void SetExtendTitleBarHeight(System.Double value) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, value, (*(void ***)this._nativePointer)[42]); + __result__.CheckError(); + } + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f02")] + public partial class IAvnWindowBase : SharpGen.Runtime.ComObject + { + public IAvnWindowBase(System.IntPtr nativePtr): base (nativePtr) + { + } + + public static explicit operator IAvnWindowBase(System.IntPtr nativePtr) => nativePtr == System.IntPtr.Zero ? null : new IAvnWindowBase(nativePtr); + /// + /// No documentation. + /// + /// SetTopMost + /// SetTopMost + public System.Boolean TopMost + { + set => SetTopMost(value); + } + + /// + /// No documentation. + /// + /// SetCursor + /// SetCursor + public Avalonia.Native.Interop.IAvnCursor Cursor + { + set => SetCursor(value); + } + + /// + /// No documentation. + /// + /// SetMainMenu + /// SetMainMenu + public Avalonia.Native.Interop.IAvnMenu MainMenu + { + set => SetMainMenu(value); + } + + /// + /// No documentation. + /// + /// SetBlurEnabled + /// SetBlurEnabled + public System.Boolean BlurEnabled + { + set => SetBlurEnabled(value); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::Show() + /// IAvnWindowBase::Show + public unsafe void Show() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[3]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::Hide() + /// IAvnWindowBase::Hide + public unsafe void Hide() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[4]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::Close() + /// IAvnWindowBase::Close + public unsafe void Close() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[5]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::Activate() + /// IAvnWindowBase::Activate + public unsafe void Activate() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[6]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::GetClientSize([In] AvnSize* ret) + /// IAvnWindowBase::GetClientSize + public unsafe Avalonia.Native.Interop.AvnSize GetClientSize() + { + Avalonia.Native.Interop.AvnSize ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[7]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::GetScaling([In] double* ret) + /// IAvnWindowBase::GetScaling + public unsafe System.Double GetScaling() + { + System.Double ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[8]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::SetMinMaxSize([In] AvnSize minSize,[In] AvnSize maxSize) + /// IAvnWindowBase::SetMinMaxSize + public unsafe void SetMinMaxSize(Avalonia.Native.Interop.AvnSize minSize, Avalonia.Native.Interop.AvnSize maxSize) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint0(this._nativePointer, minSize, maxSize, (*(void ***)this._nativePointer)[9]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::Resize([In] double width,[In] double height) + /// IAvnWindowBase::Resize + public unsafe void Resize(System.Double width, System.Double height) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, width, height, (*(void ***)this._nativePointer)[10]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::Invalidate([In] AvnRect rect) + /// IAvnWindowBase::Invalidate + public unsafe void Invalidate(Avalonia.Native.Interop.AvnRect rect) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint0(this._nativePointer, rect, (*(void ***)this._nativePointer)[11]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::BeginMoveDrag() + /// IAvnWindowBase::BeginMoveDrag + public unsafe void BeginMoveDrag() + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (*(void ***)this._nativePointer)[12]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::BeginResizeDrag([In] AvnWindowEdge edge) + /// IAvnWindowBase::BeginResizeDrag + public unsafe void BeginResizeDrag(Avalonia.Native.Interop.AvnWindowEdge edge) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, unchecked ((System.Int32)edge), (*(void ***)this._nativePointer)[13]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::GetPosition([In] AvnPoint* ret) + /// IAvnWindowBase::GetPosition + public unsafe Avalonia.Native.Interop.AvnPoint GetPosition() + { + Avalonia.Native.Interop.AvnPoint ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret, (*(void ***)this._nativePointer)[14]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::SetPosition([In] AvnPoint point) + /// IAvnWindowBase::SetPosition + public unsafe void SetPosition(Avalonia.Native.Interop.AvnPoint point) + { + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint0(this._nativePointer, point, (*(void ***)this._nativePointer)[15]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::PointToClient([In] AvnPoint point,[In] AvnPoint* ret) + /// IAvnWindowBase::PointToClient + public unsafe Avalonia.Native.Interop.AvnPoint PointToClient(Avalonia.Native.Interop.AvnPoint point) + { + Avalonia.Native.Interop.AvnPoint ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint0(this._nativePointer, point, &ret, (*(void ***)this._nativePointer)[16]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::PointToScreen([In] AvnPoint point,[In] AvnPoint* ret) + /// IAvnWindowBase::PointToScreen + public unsafe Avalonia.Native.Interop.AvnPoint PointToScreen(Avalonia.Native.Interop.AvnPoint point) + { + Avalonia.Native.Interop.AvnPoint ret; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint0(this._nativePointer, point, &ret, (*(void ***)this._nativePointer)[17]); + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::ThreadSafeSetSwRenderedFrame([In] AvnFramebuffer* fb,[In] IUnknown* dispose) + /// IAvnWindowBase::ThreadSafeSetSwRenderedFrame + public unsafe void ThreadSafeSetSwRenderedFrame(ref Avalonia.Native.Interop.AvnFramebuffer fb, SharpGen.Runtime.IUnknown dispose) + { + System.IntPtr dispose_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + dispose_ = SharpGen.Runtime.CppObject.ToCallbackPtr(dispose); + fixed (void *fb_ = &fb) + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, fb_, (void *)dispose_, (*(void ***)this._nativePointer)[18]); + System.GC.KeepAlive(dispose); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::SetTopMost([In] bool value) + /// IAvnWindowBase::SetTopMost + internal unsafe void SetTopMost(System.Boolean value) + { + System.Byte value_; + SharpGen.Runtime.Result __result__; + value_ = (System.Byte)(value ? 1 : 0); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, value_, (*(void ***)this._nativePointer)[19]); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::SetCursor([In] IAvnCursor* cursor) + /// IAvnWindowBase::SetCursor + internal unsafe void SetCursor(Avalonia.Native.Interop.IAvnCursor cursor) + { + System.IntPtr cursor_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + cursor_ = SharpGen.Runtime.CppObject.ToCallbackPtr(cursor); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)cursor_, (*(void ***)this._nativePointer)[20]); + System.GC.KeepAlive(cursor); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::CreateGlRenderTarget([In] IAvnGlSurfaceRenderTarget** ret) + /// IAvnWindowBase::CreateGlRenderTarget + public unsafe Avalonia.Native.Interop.IAvnGlSurfaceRenderTarget CreateGlRenderTarget() + { + Avalonia.Native.Interop.IAvnGlSurfaceRenderTarget ret; + System.IntPtr ret_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &ret_, (*(void ***)this._nativePointer)[21]); + if (ret_ != System.IntPtr.Zero) + ret = new Avalonia.Native.Interop.IAvnGlSurfaceRenderTarget(ret_); + else + ret = null; + __result__.CheckError(); + return ret; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::SetMainMenu([In] IAvnMenu* menu) + /// IAvnWindowBase::SetMainMenu + internal unsafe void SetMainMenu(Avalonia.Native.Interop.IAvnMenu menu) + { + System.IntPtr menu_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + menu_ = SharpGen.Runtime.CppObject.ToCallbackPtr(menu); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, (void *)menu_, (*(void ***)this._nativePointer)[22]); + System.GC.KeepAlive(menu); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::ObtainNSWindowHandle([Out] void** retOut) + /// IAvnWindowBase::ObtainNSWindowHandle + public unsafe System.IntPtr ObtainNSWindowHandle() + { + System.IntPtr retOut; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &retOut, (*(void ***)this._nativePointer)[23]); + __result__.CheckError(); + return retOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::ObtainNSWindowHandleRetained([Out] void** retOut) + /// IAvnWindowBase::ObtainNSWindowHandleRetained + public unsafe System.IntPtr ObtainNSWindowHandleRetained() + { + System.IntPtr retOut; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &retOut, (*(void ***)this._nativePointer)[24]); + __result__.CheckError(); + return retOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::ObtainNSViewHandle([Out] void** retOut) + /// IAvnWindowBase::ObtainNSViewHandle + public unsafe System.IntPtr ObtainNSViewHandle() + { + System.IntPtr retOut; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &retOut, (*(void ***)this._nativePointer)[25]); + __result__.CheckError(); + return retOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::ObtainNSViewHandleRetained([Out] void** retOut) + /// IAvnWindowBase::ObtainNSViewHandleRetained + public unsafe System.IntPtr ObtainNSViewHandleRetained() + { + System.IntPtr retOut; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &retOut, (*(void ***)this._nativePointer)[26]); + __result__.CheckError(); + return retOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// HRESULT IAvnWindowBase::CreateNativeControlHost([Out] IAvnNativeControlHost** retOut) + /// IAvnWindowBase::CreateNativeControlHost + public unsafe Avalonia.Native.Interop.IAvnNativeControlHost CreateNativeControlHost() + { + Avalonia.Native.Interop.IAvnNativeControlHost retOut; + System.IntPtr retOut_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, &retOut_, (*(void ***)this._nativePointer)[27]); + if (retOut_ != System.IntPtr.Zero) + retOut = new Avalonia.Native.Interop.IAvnNativeControlHost(retOut_); + else + retOut = null; + __result__.CheckError(); + return retOut; + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::BeginDragAndDropOperation([In] AvnDragDropEffects effects,[In] AvnPoint point,[In] IAvnClipboard* clipboard,[In] IAvnDndResultCallback* cb,[In] void* sourceHandle) + /// IAvnWindowBase::BeginDragAndDropOperation + public unsafe void BeginDragAndDropOperation(Avalonia.Native.Interop.AvnDragDropEffects effects, Avalonia.Native.Interop.AvnPoint point, Avalonia.Native.Interop.IAvnClipboard clipboard, Avalonia.Native.Interop.IAvnDndResultCallback cb, System.IntPtr sourceHandle) + { + System.IntPtr clipboard_ = System.IntPtr.Zero; + System.IntPtr cb_ = System.IntPtr.Zero; + SharpGen.Runtime.Result __result__; + clipboard_ = SharpGen.Runtime.CppObject.ToCallbackPtr(clipboard); + cb_ = SharpGen.Runtime.CppObject.ToCallbackPtr(cb); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint0(this._nativePointer, unchecked ((System.Int32)effects), point, (void *)clipboard_, (void *)cb_, (void *)sourceHandle, (*(void ***)this._nativePointer)[28]); + System.GC.KeepAlive(clipboard); + System.GC.KeepAlive(cb); + __result__.CheckError(); + } + + /// + /// No documentation. + /// + /// No documentation. + /// No documentation. + /// HRESULT IAvnWindowBase::SetBlurEnabled([In] bool enable) + /// IAvnWindowBase::SetBlurEnabled + internal unsafe void SetBlurEnabled(System.Boolean enable) + { + System.Byte enable_; + SharpGen.Runtime.Result __result__; + enable_ = (System.Byte)(enable ? 1 : 0); + __result__ = Avalonia.Native.LocalInterop.CalliThisCallint(this._nativePointer, enable_, (*(void ***)this._nativePointer)[29]); + __result__.CheckError(); + } + } + + class IAvnWindowBaseEventsShadow : SharpGen.Runtime.ComObjectShadow + { + protected unsafe class IAvnWindowBaseEventsVtbl : SharpGen.Runtime.ComObjectShadow.ComObjectVtbl + { + public IAvnWindowBaseEventsVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 13) + { + AddMethod(new PaintDelegate(Paint)); + AddMethod(new ClosedDelegate(Closed)); + AddMethod(new ActivatedDelegate(Activated)); + AddMethod(new DeactivatedDelegate(Deactivated)); + AddMethod(new ResizedDelegate(Resized)); + AddMethod(new PositionChangedDelegate(PositionChanged)); + AddMethod(new RawMouseEventDelegate(RawMouseEvent)); + AddMethod(new RawKeyEventDelegate(RawKeyEvent)); + AddMethod(new RawTextInputEventDelegate(RawTextInputEvent)); + AddMethod(new ScalingChangedDelegate(ScalingChanged)); + AddMethod(new RunRenderPriorityJobsDelegate(RunRenderPriorityJobs)); + AddMethod(new LostFocusDelegate(LostFocus)); + AddMethod(new DragEventDelegate(DragEvent)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate int PaintDelegate(System.IntPtr thisObject); + private static unsafe int Paint(System.IntPtr thisObject) + { + try + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.Paint(); + return SharpGen.Runtime.Result.Ok.Code; + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + return SharpGen.Runtime.Result.GetResultFromException(__exception__).Code; + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void ClosedDelegate(System.IntPtr thisObject); + private static unsafe void Closed(System.IntPtr thisObject) + { + try + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.Closed(); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void ActivatedDelegate(System.IntPtr thisObject); + private static unsafe void Activated(System.IntPtr thisObject) + { + try + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.Activated(); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void DeactivatedDelegate(System.IntPtr thisObject); + private static unsafe void Deactivated(System.IntPtr thisObject) + { + try + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.Deactivated(); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void ResizedDelegate(System.IntPtr thisObject, void *arg0); + private static unsafe void Resized(System.IntPtr thisObject, void *param0) + { + try + { + Avalonia.Native.Interop.AvnSize size = System.Runtime.CompilerServices.Unsafe.AsRef(param0); + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.Resized(size); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void PositionChangedDelegate(System.IntPtr thisObject, Avalonia.Native.Interop.AvnPoint arg0); + private static unsafe void PositionChanged(System.IntPtr thisObject, Avalonia.Native.Interop.AvnPoint param0) + { + try + { + Avalonia.Native.Interop.AvnPoint position = default (Avalonia.Native.Interop.AvnPoint); + position = (Avalonia.Native.Interop.AvnPoint)param0; + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.PositionChanged(position); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void RawMouseEventDelegate(System.IntPtr thisObject, int arg0, System.UInt32 arg1, int arg2, Avalonia.Native.Interop.AvnPoint arg3, Avalonia.Native.Interop.AvnVector arg4); + private static unsafe void RawMouseEvent(System.IntPtr thisObject, int param0, System.UInt32 param1, int param2, Avalonia.Native.Interop.AvnPoint param3, Avalonia.Native.Interop.AvnVector param4) + { + try + { + Avalonia.Native.Interop.AvnRawMouseEventType type = default (Avalonia.Native.Interop.AvnRawMouseEventType); + type = (Avalonia.Native.Interop.AvnRawMouseEventType)param0; + System.UInt32 timeStamp = default (System.UInt32); + timeStamp = (System.UInt32)param1; + Avalonia.Native.Interop.AvnInputModifiers modifiers = default (Avalonia.Native.Interop.AvnInputModifiers); + modifiers = (Avalonia.Native.Interop.AvnInputModifiers)param2; + Avalonia.Native.Interop.AvnPoint point = default (Avalonia.Native.Interop.AvnPoint); + point = (Avalonia.Native.Interop.AvnPoint)param3; + Avalonia.Native.Interop.AvnVector delta = default (Avalonia.Native.Interop.AvnVector); + delta = (Avalonia.Native.Interop.AvnVector)param4; + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.RawMouseEvent(type, timeStamp, modifiers, point, delta); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate System.Byte RawKeyEventDelegate(System.IntPtr thisObject, int arg0, System.UInt32 arg1, int arg2, System.UInt32 arg3); + private static unsafe System.Byte RawKeyEvent(System.IntPtr thisObject, int param0, System.UInt32 param1, int param2, System.UInt32 param3) + { + try + { + System.Boolean __result__ = default (System.Boolean); + System.Byte __result__native; + Avalonia.Native.Interop.AvnRawKeyEventType type = default (Avalonia.Native.Interop.AvnRawKeyEventType); + type = (Avalonia.Native.Interop.AvnRawKeyEventType)param0; + System.UInt32 timeStamp = default (System.UInt32); + timeStamp = (System.UInt32)param1; + Avalonia.Native.Interop.AvnInputModifiers modifiers = default (Avalonia.Native.Interop.AvnInputModifiers); + modifiers = (Avalonia.Native.Interop.AvnInputModifiers)param2; + System.UInt32 key = default (System.UInt32); + key = (System.UInt32)param3; + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + __result__ = @this.RawKeyEvent(type, timeStamp, modifiers, key); + __result__native = (System.Byte)(__result__ ? 1 : 0); + return __result__native; + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + return default (System.Byte); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate System.Byte RawTextInputEventDelegate(System.IntPtr thisObject, System.UInt32 arg0, void *arg1); + private static unsafe System.Byte RawTextInputEvent(System.IntPtr thisObject, System.UInt32 param0, void *param1) + { + try + { + System.Boolean __result__ = default (System.Boolean); + System.Byte __result__native; + System.UInt32 timeStamp = default (System.UInt32); + timeStamp = (System.UInt32)param0; + System.String text = default (System.String); + System.IntPtr text_ = (System.IntPtr)param1; + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + text = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(text_); + __result__ = @this.RawTextInputEvent(timeStamp, text); + __result__native = (System.Byte)(__result__ ? 1 : 0); + return __result__native; + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + return default (System.Byte); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void ScalingChangedDelegate(System.IntPtr thisObject, double arg0); + private static unsafe void ScalingChanged(System.IntPtr thisObject, double param0) + { + try + { + System.Double scaling = default (System.Double); + scaling = (System.Double)param0; + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.ScalingChanged(scaling); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void RunRenderPriorityJobsDelegate(System.IntPtr thisObject); + private static unsafe void RunRenderPriorityJobs(System.IntPtr thisObject) + { + try + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.RunRenderPriorityJobs(); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void LostFocusDelegate(System.IntPtr thisObject); + private static unsafe void LostFocus(System.IntPtr thisObject) + { + try + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + @this.LostFocus(); + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate Avalonia.Native.Interop.AvnDragDropEffects DragEventDelegate(System.IntPtr thisObject, int arg0, Avalonia.Native.Interop.AvnPoint arg1, int arg2, int arg3, void *arg4, void *arg5); + private static unsafe Avalonia.Native.Interop.AvnDragDropEffects DragEvent(System.IntPtr thisObject, int param0, Avalonia.Native.Interop.AvnPoint param1, int param2, int param3, void *param4, void *param5) + { + try + { + Avalonia.Native.Interop.AvnDragDropEffects __result__ = default (Avalonia.Native.Interop.AvnDragDropEffects); + Avalonia.Native.Interop.AvnDragEventType type = default (Avalonia.Native.Interop.AvnDragEventType); + type = (Avalonia.Native.Interop.AvnDragEventType)param0; + Avalonia.Native.Interop.AvnPoint position = default (Avalonia.Native.Interop.AvnPoint); + position = (Avalonia.Native.Interop.AvnPoint)param1; + Avalonia.Native.Interop.AvnInputModifiers modifiers = default (Avalonia.Native.Interop.AvnInputModifiers); + modifiers = (Avalonia.Native.Interop.AvnInputModifiers)param2; + Avalonia.Native.Interop.AvnDragDropEffects effects = default (Avalonia.Native.Interop.AvnDragDropEffects); + effects = (Avalonia.Native.Interop.AvnDragDropEffects)param3; + Avalonia.Native.Interop.IAvnClipboard clipboard = default (Avalonia.Native.Interop.IAvnClipboard); + System.IntPtr clipboard_ = (System.IntPtr)param4; + System.IntPtr dataObjectHandle = default (System.IntPtr); + dataObjectHandle = (System.IntPtr)param5; + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + if (clipboard_ != System.IntPtr.Zero) + clipboard = new Avalonia.Native.Interop.IAvnClipboard(clipboard_); + else + clipboard = null; + __result__ = @this.DragEvent(type, position, modifiers, effects, clipboard, dataObjectHandle); + return __result__; + } + catch (System.Exception __exception__) + { + IAvnWindowBaseEvents @this = (IAvnWindowBaseEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + return default (Avalonia.Native.Interop.AvnDragDropEffects); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnWindowBaseEventsShadow.IAvnWindowBaseEventsVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f05"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnWindowBaseEventsShadow))] + public partial interface IAvnWindowBaseEvents : SharpGen.Runtime.IUnknown + { + void Paint(); + void Closed(); + void Activated(); + void Deactivated(); + void Resized(Avalonia.Native.Interop.AvnSize size); + void PositionChanged(Avalonia.Native.Interop.AvnPoint position); + void RawMouseEvent(Avalonia.Native.Interop.AvnRawMouseEventType type, System.UInt32 timeStamp, Avalonia.Native.Interop.AvnInputModifiers modifiers, Avalonia.Native.Interop.AvnPoint point, Avalonia.Native.Interop.AvnVector delta); + System.Boolean RawKeyEvent(Avalonia.Native.Interop.AvnRawKeyEventType type, System.UInt32 timeStamp, Avalonia.Native.Interop.AvnInputModifiers modifiers, System.UInt32 key); + System.Boolean RawTextInputEvent(System.UInt32 timeStamp, System.String text); + void ScalingChanged(System.Double scaling); + void RunRenderPriorityJobs(); + void LostFocus(); + Avalonia.Native.Interop.AvnDragDropEffects DragEvent(Avalonia.Native.Interop.AvnDragEventType type, Avalonia.Native.Interop.AvnPoint position, Avalonia.Native.Interop.AvnInputModifiers modifiers, Avalonia.Native.Interop.AvnDragDropEffects effects, Avalonia.Native.Interop.IAvnClipboard clipboard, System.IntPtr dataObjectHandle); + } + + class IAvnWindowEventsShadow : Avalonia.Native.Interop.IAvnWindowBaseEventsShadow + { + protected unsafe class IAvnWindowEventsVtbl : Avalonia.Native.Interop.IAvnWindowBaseEventsShadow.IAvnWindowBaseEventsVtbl + { + public IAvnWindowEventsVtbl(int numberOfCallbackMethods): base (numberOfCallbackMethods + 3) + { + AddMethod(new ClosingDelegate(Closing)); + AddMethod(new WindowStateChangedDelegate(WindowStateChanged)); + AddMethod(new GotInputWhenDisabledDelegate(GotInputWhenDisabled)); + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate System.Byte ClosingDelegate(System.IntPtr thisObject); + private static unsafe System.Byte Closing(System.IntPtr thisObject) + { + try + { + System.Boolean __result__ = default (System.Boolean); + System.Byte __result__native; + IAvnWindowEvents @this = (IAvnWindowEvents)ToShadow(thisObject).Callback; + __result__ = @this.Closing(); + __result__native = (System.Byte)(__result__ ? 1 : 0); + return __result__native; + } + catch (System.Exception __exception__) + { + IAvnWindowEvents @this = (IAvnWindowEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + return default (System.Byte); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void WindowStateChangedDelegate(System.IntPtr thisObject, int arg0); + private static unsafe void WindowStateChanged(System.IntPtr thisObject, int param0) + { + try + { + Avalonia.Native.Interop.AvnWindowState state = default (Avalonia.Native.Interop.AvnWindowState); + state = (Avalonia.Native.Interop.AvnWindowState)param0; + IAvnWindowEvents @this = (IAvnWindowEvents)ToShadow(thisObject).Callback; + @this.WindowStateChanged(state); + } + catch (System.Exception __exception__) + { + IAvnWindowEvents @this = (IAvnWindowEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + + [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.ThisCall)] + private delegate void GotInputWhenDisabledDelegate(System.IntPtr thisObject); + private static unsafe void GotInputWhenDisabled(System.IntPtr thisObject) + { + try + { + IAvnWindowEvents @this = (IAvnWindowEvents)ToShadow(thisObject).Callback; + @this.GotInputWhenDisabled(); + } + catch (System.Exception __exception__) + { + IAvnWindowEvents @this = (IAvnWindowEvents)ToShadow(thisObject).Callback; + (@this as SharpGen.Runtime.IExceptionCallback)?.RaiseException(__exception__); + } + } + } + + protected override SharpGen.Runtime.CppObjectVtbl Vtbl + { + get; + } + + = new Avalonia.Native.Interop.IAvnWindowEventsShadow.IAvnWindowEventsVtbl(0); + } + + [System.Runtime.InteropServices.GuidAttribute("2e2cda0a-9ae5-4f1b-8e20-081a04279f06"), SharpGen.Runtime.ShadowAttribute(typeof (Avalonia.Native.Interop.IAvnWindowEventsShadow))] + public partial interface IAvnWindowEvents : Avalonia.Native.Interop.IAvnWindowBaseEvents + { + System.Boolean Closing(); + void WindowStateChanged(Avalonia.Native.Interop.AvnWindowState state); + void GotInputWhenDisabled(); + } +} \ No newline at end of file diff --git a/src/Avalonia.Native/Generated/LocalInterop.cs b/src/Avalonia.Native/Generated/LocalInterop.cs new file mode 100644 index 0000000000..41e69a6bdc --- /dev/null +++ b/src/Avalonia.Native/Generated/LocalInterop.cs @@ -0,0 +1,202 @@ +// + +namespace Avalonia.Native +{ + internal static partial class LocalInterop + { + public static unsafe int CalliThisCallint(void *thisObject, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, void *param0, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid0(void *thisObject, Avalonia.Native.Interop.AvnPoint param0, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid0(void *thisObject, int param0, System.UInt32 param1, int param2, Avalonia.Native.Interop.AvnPoint param3, Avalonia.Native.Interop.AvnVector param4, void *methodPtr) + { + throw null; + } + + public static unsafe System.Byte CalliThisCallSystemByte(void *thisObject, int param0, System.UInt32 param1, int param2, System.UInt32 param3, void *methodPtr) + { + throw null; + } + + public static unsafe System.Byte CalliThisCallSystemByte(void *thisObject, System.UInt32 param0, void *param1, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, double param0, void *methodPtr) + { + throw null; + } + + public static unsafe Avalonia.Native.Interop.AvnDragDropEffects CalliThisCallAvaloniaNativeInteropAvnDragDropEffects0(void *thisObject, int param0, Avalonia.Native.Interop.AvnPoint param1, int param2, int param3, void *param4, void *param5, void *methodPtr) + { + throw null; + } + + public static unsafe System.Byte CalliThisCallSystemByte(void *thisObject, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, int param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, void *param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint0(void *thisObject, Avalonia.Native.Interop.AvnSize param0, Avalonia.Native.Interop.AvnSize param1, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, double param0, double param1, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint0(void *thisObject, Avalonia.Native.Interop.AvnRect param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, int param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint0(void *thisObject, Avalonia.Native.Interop.AvnPoint param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint0(void *thisObject, Avalonia.Native.Interop.AvnPoint param0, void *param1, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, void *param0, void *param1, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, System.Byte param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint0(void *thisObject, int param0, Avalonia.Native.Interop.AvnPoint param1, void *param2, void *param3, void *param4, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint0(void *thisObject, Avalonia.Native.Interop.AvnColor param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, double param0, void *methodPtr) + { + throw null; + } + + public static unsafe System.IntPtr CalliThisCallSystemIntPtr(void *thisObject, void *methodPtr) + { + throw null; + } + + public static unsafe System.IntPtr CalliThisCallSystemIntPtr(void *thisObject, int param0, int param1, void *param2, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, int param0, void *param1, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, void *param0, void *param1, void *param2, void *param3, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, void *param0, void *param1, System.Byte param2, void *param3, void *param4, void *param5, void *param6, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, void *param0, void *param1, void *param2, void *param3, void *param4, void *param5, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, int param0, void *param1, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, void *param0, void *param1, int param2, void *methodPtr) + { + throw null; + } + + public static unsafe System.IntPtr CalliThisCallSystemIntPtr(void *thisObject, void *param0, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, void *param0, int param1, void *methodPtr) + { + throw null; + } + + public static unsafe System.UInt32 CalliThisCallSystemUInt32(void *thisObject, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, System.UInt32 param0, void *param1, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, float param0, float param1, float param2, float param3, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, float param0, float param1, void *methodPtr) + { + throw null; + } + + public static unsafe int CalliThisCallint(void *thisObject, void *param0, void *param1, void *param2, void *methodPtr) + { + throw null; + } + + public static unsafe void CalliThisCallvoid(void *thisObject, int param0, System.Byte param1, void *methodPtr) + { + throw null; + } + } +} \ No newline at end of file diff --git a/src/Avalonia.Native/Generated/Structures.cs b/src/Avalonia.Native/Generated/Structures.cs new file mode 100644 index 0000000000..fc871a2516 --- /dev/null +++ b/src/Avalonia.Native/Generated/Structures.cs @@ -0,0 +1,246 @@ +// + +namespace Avalonia.Native.Interop +{ + /// + /// No documentation. + /// + /// AvnColor + /// AvnColor + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnColor + { + /// + /// No documentation. + /// + /// Alpha + /// Alpha + public System.Byte Alpha; + /// + /// No documentation. + /// + /// Red + /// Red + public System.Byte Red; + /// + /// No documentation. + /// + /// Green + /// Green + public System.Byte Green; + /// + /// No documentation. + /// + /// Blue + /// Blue + public System.Byte Blue; + } + + /// + /// No documentation. + /// + /// AvnFramebuffer + /// AvnFramebuffer + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnFramebuffer + { + /// + /// No documentation. + /// + /// Data + /// Data + public System.IntPtr Data; + /// + /// No documentation. + /// + /// Width + /// Width + public System.Int32 Width; + /// + /// No documentation. + /// + /// Height + /// Height + public System.Int32 Height; + /// + /// No documentation. + /// + /// Stride + /// Stride + public System.Int32 Stride; + /// + /// No documentation. + /// + /// Dpi + /// Dpi + public Avalonia.Native.Interop.AvnVector Dpi; + /// + /// No documentation. + /// + /// PixelFormat + /// PixelFormat + public Avalonia.Native.Interop.AvnPixelFormat PixelFormat; + } + + /// + /// No documentation. + /// + /// AvnPixelSize + /// AvnPixelSize + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnPixelSize + { + /// + /// No documentation. + /// + /// Width + /// Width + public System.Int32 Width; + /// + /// No documentation. + /// + /// Height + /// Height + public System.Int32 Height; + } + + /// + /// No documentation. + /// + /// AvnPoint + /// AvnPoint + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnPoint + { + /// + /// No documentation. + /// + /// X + /// X + public System.Double X; + /// + /// No documentation. + /// + /// Y + /// Y + public System.Double Y; + } + + /// + /// No documentation. + /// + /// AvnRect + /// AvnRect + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnRect + { + /// + /// No documentation. + /// + /// X + /// X + public System.Double X; + /// + /// No documentation. + /// + /// Y + /// Y + public System.Double Y; + /// + /// No documentation. + /// + /// Width + /// Width + public System.Double Width; + /// + /// No documentation. + /// + /// Height + /// Height + public System.Double Height; + } + + /// + /// No documentation. + /// + /// AvnScreen + /// AvnScreen + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnScreen + { + /// + /// No documentation. + /// + /// Bounds + /// Bounds + public Avalonia.Native.Interop.AvnRect Bounds; + /// + /// No documentation. + /// + /// WorkingArea + /// WorkingArea + public Avalonia.Native.Interop.AvnRect WorkingArea; + /// + /// No documentation. + /// + /// PixelDensity + /// PixelDensity + public System.Single PixelDensity; + /// + /// No documentation. + /// + /// Primary + /// Primary + public bool Primary + { + get => 0 != _Primary; + set => _Primary = (System.Byte)(value ? 1 : 0); + } + + internal System.Byte _Primary; + } + + /// + /// No documentation. + /// + /// AvnSize + /// AvnSize + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnSize + { + /// + /// No documentation. + /// + /// Width + /// Width + public System.Double Width; + /// + /// No documentation. + /// + /// Height + /// Height + public System.Double Height; + } + + /// + /// No documentation. + /// + /// AvnVector + /// AvnVector + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 0, CharSet = System.Runtime.InteropServices.CharSet.Unicode)] + public partial struct AvnVector + { + /// + /// No documentation. + /// + /// X + /// X + public System.Double X; + /// + /// No documentation. + /// + /// Y + /// Y + public System.Double Y; + } +} \ No newline at end of file From df19b1c1274a3c7cf3160a29e55cdaba5fde5a65 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Sun, 16 Aug 2020 22:07:50 +0100 Subject: [PATCH 005/154] change api stability to preview3. --- build/ApiDiff.props | 2 +- src/Avalonia.Base/ApiCompatBaseline.txt | 6 ------ src/Avalonia.Controls/ApiCompatBaseline.txt | 7 ------- src/Avalonia.Visuals/ApiCompatBaseline.txt | 14 -------------- 4 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 src/Avalonia.Base/ApiCompatBaseline.txt delete mode 100644 src/Avalonia.Controls/ApiCompatBaseline.txt delete mode 100644 src/Avalonia.Visuals/ApiCompatBaseline.txt diff --git a/build/ApiDiff.props b/build/ApiDiff.props index 1573dc2dd6..da82fbcc51 100644 --- a/build/ApiDiff.props +++ b/build/ApiDiff.props @@ -1,6 +1,6 @@  - 0.10.0-preview2 + 0.10.0-preview3 $(PackageId) Avalonia diff --git a/src/Avalonia.Base/ApiCompatBaseline.txt b/src/Avalonia.Base/ApiCompatBaseline.txt deleted file mode 100644 index b0b7371cd7..0000000000 --- a/src/Avalonia.Base/ApiCompatBaseline.txt +++ /dev/null @@ -1,6 +0,0 @@ -Compat issues with assembly Avalonia.Base: -MembersMustExist : Member 'public void Avalonia.DirectProperty..ctor(System.String, System.Func, System.Action, Avalonia.DirectPropertyMetadata, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'protected void Avalonia.DirectPropertyBase..ctor(Avalonia.AvaloniaProperty, System.Type, Avalonia.PropertyMetadata, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'protected void Avalonia.DirectPropertyBase..ctor(System.String, System.Type, Avalonia.PropertyMetadata, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public System.Boolean Avalonia.DirectPropertyBase.IsDataValidationEnabled.get()' does not exist in the implementation but it does exist in the contract. -Total Issues: 4 diff --git a/src/Avalonia.Controls/ApiCompatBaseline.txt b/src/Avalonia.Controls/ApiCompatBaseline.txt deleted file mode 100644 index 0a2415a263..0000000000 --- a/src/Avalonia.Controls/ApiCompatBaseline.txt +++ /dev/null @@ -1,7 +0,0 @@ -Compat issues with assembly Avalonia.Controls: -MembersMustExist : Member 'protected void Avalonia.Controls.ComboBox.PopupClosedOverride(Avalonia.Controls.Primitives.PopupClosedEventArgs)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Avalonia.StyledProperty Avalonia.StyledProperty Avalonia.Controls.Primitives.Popup.StaysOpenProperty' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public void Avalonia.Controls.Primitives.Popup.add_Closed(System.EventHandler)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public void Avalonia.Controls.Primitives.Popup.remove_Closed(System.EventHandler)' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'Avalonia.Controls.Primitives.PopupClosedEventArgs' does not exist in the implementation but it does exist in the contract. -Total Issues: 5 diff --git a/src/Avalonia.Visuals/ApiCompatBaseline.txt b/src/Avalonia.Visuals/ApiCompatBaseline.txt deleted file mode 100644 index 849e957a72..0000000000 --- a/src/Avalonia.Visuals/ApiCompatBaseline.txt +++ /dev/null @@ -1,14 +0,0 @@ -Compat issues with assembly Avalonia.Visuals: -EnumValuesMustMatch : Enum value 'Avalonia.Media.FontStyle Avalonia.Media.FontStyle.Italic' is (System.Int32)1 in the implementation but (System.Int32)2 in the contract. -EnumValuesMustMatch : Enum value 'Avalonia.Media.FontStyle Avalonia.Media.FontStyle.Oblique' is (System.Int32)2 in the implementation but (System.Int32)1 in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.AlphaFormat Avalonia.Platform.IPlatformRenderInterface.DefaultAlphaFormat' is present in the implementation but not in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.PixelFormat Avalonia.Platform.IPlatformRenderInterface.DefaultPixelFormat' is present in the implementation but not in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IWriteableBitmapImpl Avalonia.Platform.IPlatformRenderInterface.CreateWriteableBitmap(Avalonia.PixelSize, Avalonia.Vector, Avalonia.Platform.PixelFormat, Avalonia.Platform.AlphaFormat)' is present in the implementation but not in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IWriteableBitmapImpl Avalonia.Platform.IPlatformRenderInterface.CreateWriteableBitmap(Avalonia.PixelSize, Avalonia.Vector, System.Nullable)' is present in the contract but not in the implementation. -MembersMustExist : Member 'public Avalonia.Platform.IWriteableBitmapImpl Avalonia.Platform.IPlatformRenderInterface.CreateWriteableBitmap(Avalonia.PixelSize, Avalonia.Vector, System.Nullable)' does not exist in the implementation but it does exist in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.AlphaFormat Avalonia.Platform.IPlatformRenderInterface.DefaultAlphaFormat.get()' is present in the implementation but not in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.PixelFormat Avalonia.Platform.IPlatformRenderInterface.DefaultPixelFormat.get()' is present in the implementation but not in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IBitmapImpl Avalonia.Platform.IPlatformRenderInterface.LoadBitmap(Avalonia.Platform.PixelFormat, Avalonia.Platform.AlphaFormat, System.IntPtr, Avalonia.PixelSize, Avalonia.Vector, System.Int32)' is present in the implementation but not in the contract. -InterfacesShouldHaveSameMembers : Interface member 'public Avalonia.Platform.IBitmapImpl Avalonia.Platform.IPlatformRenderInterface.LoadBitmap(Avalonia.Platform.PixelFormat, System.IntPtr, Avalonia.PixelSize, Avalonia.Vector, System.Int32)' is present in the contract but not in the implementation. -MembersMustExist : Member 'public Avalonia.Platform.IBitmapImpl Avalonia.Platform.IPlatformRenderInterface.LoadBitmap(Avalonia.Platform.PixelFormat, System.IntPtr, Avalonia.PixelSize, Avalonia.Vector, System.Int32)' does not exist in the implementation but it does exist in the contract. -Total Issues: 12 From 1828acc05c139fc6e5a097a8f245eb85501fcbdc Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 17 Aug 2020 01:33:59 +0300 Subject: [PATCH 006/154] Changing http links to https --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index c1bf5bbfde..ccdbbfb967 100644 --- a/readme.md +++ b/readme.md @@ -16,7 +16,7 @@ To see the status of some of our features, please see our [Roadmap](https://gith ## 🚀 Getting Started -The Avalonia [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio) contains project and control templates that will help you get started, or you can use the .NET Core CLI. For a starter guide see our [documentation](http://avaloniaui.net/docs/quickstart/create-new-project). +The Avalonia [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio) contains project and control templates that will help you get started, or you can use the .NET Core CLI. For a starter guide see our [documentation](https://avaloniaui.net/docs/quickstart/create-new-project). Avalonia is delivered via NuGet package manager. You can find the packages here: https://www.nuget.org/packages/Avalonia/ @@ -47,7 +47,7 @@ We also have a [nightly build](https://github.com/AvaloniaUI/Avalonia/wiki/Using ## Documentation -Documentation can be found on our website at http://avaloniaui.net/docs/. We also have a [tutorial](http://avaloniaui.net/docs/tutorial/) over there for newcomers. +Documentation can be found on our website at https://avaloniaui.net/docs/. We also have a [tutorial](https://avaloniaui.net/docs/tutorial/) over there for newcomers. ## Building and Using @@ -68,7 +68,7 @@ Avalonia is licenced under the [MIT licence](licence.md). ## Contributors -This project exists thanks to all the people who contribute. [[Contribute](http://avaloniaui.net/contributing)]. +This project exists thanks to all the people who contribute. [[Contribute](https://avaloniaui.net/contributing)]. ### Backers From c8d26de9489387f82ce66313db3651a093762c85 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 17 Aug 2020 16:05:20 +0100 Subject: [PATCH 007/154] Add failing unit test. --- .../TextBoxTests.cs | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs b/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs index af3b68f4a0..7a409d494c 100644 --- a/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs +++ b/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs @@ -17,6 +17,46 @@ namespace Avalonia.Controls.UnitTests { public class TextBoxTests { + [Fact] + public void Opening_Context_Menu_Does_not_Loose_Selection() + { + using (UnitTestApplication.Start(FocusServices)) + { + var target1 = new TextBox + { + Template = CreateTemplate(), + Text = "1234", + ContextMenu = new TestContextMenu() + }; + + var target2 = new TextBox + { + Template = CreateTemplate(), + Text = "5678" + }; + + var sp = new StackPanel(); + sp.Children.Add(target1); + sp.Children.Add(target2); + + target1.ApplyTemplate(); + target2.ApplyTemplate(); + + var root = new TestRoot() { Child = sp }; + + target1.SelectionStart = 0; + target1.SelectionEnd = 3; + + target1.Focus(); + Assert.False(target2.IsFocused); + Assert.True(target1.IsFocused); + + target2.Focus(); + + Assert.Equal("123", target1.SelectedText); + } + } + [Fact] public void DefaultBindingMode_Should_Be_TwoWay() { @@ -694,5 +734,13 @@ namespace Avalonia.Controls.UnitTests public Task GetDataAsync(string format) => Task.FromResult((object)null); } + + private class TestContextMenu : ContextMenu + { + public TestContextMenu() + { + IsOpen = true; + } + } } } From 54cedcea877ea7f8026df77cc09070e11ba1734c Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Mon, 17 Aug 2020 16:06:07 +0100 Subject: [PATCH 008/154] dont allow text selection to be lost when context menu is opened... i.e. for copy and paste to work. --- src/Avalonia.Controls/ContextMenu.cs | 3 +-- src/Avalonia.Controls/TextBox.cs | 11 ++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Avalonia.Controls/ContextMenu.cs b/src/Avalonia.Controls/ContextMenu.cs index b4e4dd5071..9bb4cc4816 100644 --- a/src/Avalonia.Controls/ContextMenu.cs +++ b/src/Avalonia.Controls/ContextMenu.cs @@ -280,9 +280,8 @@ namespace Avalonia.Controls } _popup.Child = this; - _popup.IsOpen = true; - IsOpen = true; + _popup.IsOpen = true; RaiseEvent(new RoutedEventArgs { diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 7e28d88581..4e742b3b7b 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -410,10 +410,15 @@ namespace Avalonia.Controls protected override void OnLostFocus(RoutedEventArgs e) { base.OnLostFocus(e); - SelectionStart = 0; - SelectionEnd = 0; + + if (ContextMenu == null || !ContextMenu.IsOpen) + { + SelectionStart = 0; + SelectionEnd = 0; + RevealPassword = false; + } + _presenter?.HideCaret(); - RevealPassword = false; } protected override void OnTextInput(TextInputEventArgs e) From 89bf711602f59b871dceafcce51bdff837f7fa37 Mon Sep 17 00:00:00 2001 From: danwalmsley Date: Mon, 17 Aug 2020 16:59:33 +0100 Subject: [PATCH 009/154] Lose not Loose! Co-authored-by: Steven Kirk --- tests/Avalonia.Controls.UnitTests/TextBoxTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs b/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs index 7a409d494c..f41938a9bb 100644 --- a/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs +++ b/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs @@ -18,7 +18,7 @@ namespace Avalonia.Controls.UnitTests public class TextBoxTests { [Fact] - public void Opening_Context_Menu_Does_not_Loose_Selection() + public void Opening_Context_Menu_Does_not_Lose_Selection() { using (UnitTestApplication.Start(FocusServices)) { From 9ff731ab701cc61d5e750ac2ed922b9c70c7ff8c Mon Sep 17 00:00:00 2001 From: Maksym Katsydan Date: Mon, 17 Aug 2020 19:39:55 -0400 Subject: [PATCH 010/154] Fix another missing resources on default theme (including #4376) --- src/Avalonia.Controls.DataGrid/Themes/Default.xaml | 10 +++++----- src/Avalonia.Themes.Default/SplitView.xaml | 2 +- src/Avalonia.Themes.Default/TimePicker.xaml | 2 +- src/Avalonia.Themes.Default/ToggleSwitch.xaml | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Avalonia.Controls.DataGrid/Themes/Default.xaml b/src/Avalonia.Controls.DataGrid/Themes/Default.xaml index 738732f671..1d4d88825f 100644 --- a/src/Avalonia.Controls.DataGrid/Themes/Default.xaml +++ b/src/Avalonia.Controls.DataGrid/Themes/Default.xaml @@ -28,7 +28,7 @@ - + @@ -188,7 +188,7 @@ + TextBox A control into which the user can input text - + - + - + - + - - - + + + - - resm fonts - - - - - - - - res fonts - - - - - + + resm fonts + + + + + + + + res fonts + + + + + diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 86f66fa90d..7798c71377 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -1,3 +1,4 @@ +using System.Windows.Input; using Avalonia.Input.Platform; using System; using System.Collections.Generic; @@ -103,6 +104,21 @@ namespace Avalonia.Controls public static readonly StyledProperty RevealPasswordProperty = AvaloniaProperty.Register(nameof(RevealPassword)); + + public static readonly DirectProperty CanCutProperty = + AvaloniaProperty.RegisterDirect( + nameof(CanCut), + o => o.CanCut); + + public static readonly DirectProperty CanCopyProperty = + AvaloniaProperty.RegisterDirect( + nameof(CanCopy), + o => o.CanCopy); + + public static readonly DirectProperty CanPasteProperty = + AvaloniaProperty.RegisterDirect( + nameof(CanPaste), + o => o.CanPaste); struct UndoRedoState : IEquatable { @@ -126,6 +142,9 @@ namespace Avalonia.Controls private UndoRedoHelper _undoRedoHelper; private bool _isUndoingRedoing; private bool _ignoreTextChanges; + private bool _canCut; + private bool _canCopy; + private bool _canPaste; private string _newLine = Environment.NewLine; private static readonly string[] invalidCharacters = new String[1] { "\u007f" }; @@ -370,6 +389,33 @@ namespace Avalonia.Controls set { SetAndRaise(NewLineProperty, ref _newLine, value); } } + /// + /// Property for determining if the Cut command can be executed. + /// + public bool CanCut + { + get { return _canCut; } + private set { SetAndRaise(CanCutProperty, ref _canCut, value); } + } + + /// + /// Property for determining if the Copy command can be executed. + /// + public bool CanCopy + { + get { return _canCopy; } + private set { SetAndRaise(CanCopyProperty, ref _canCopy, value); } + } + + /// + /// Property for determining if the Paste command can be executed. + /// + public bool CanPaste + { + get { return _canPaste; } + private set { SetAndRaise(CanPasteProperty, ref _canPaste, value); } + } + protected override void OnApplyTemplate(TemplateAppliedEventArgs e) { _presenter = e.NameScope.Get("PART_TextPresenter"); @@ -387,9 +433,19 @@ namespace Avalonia.Controls if (change.Property == TextProperty) { UpdatePseudoclasses(); + UpdateCommandStates(); } } + private void UpdateCommandStates() + { + var text = GetSelection(); + var b1 = string.IsNullOrEmpty(text); + CanCopy = !b1; + CanCut = !b1; + CanPaste = !IsReadOnly; + } + protected override void OnGotFocus(GotFocusEventArgs e) { base.OnGotFocus(e); @@ -404,6 +460,8 @@ namespace Avalonia.Controls SelectAll(); } + UpdateCommandStates(); + _presenter?.ShowCaret(); } @@ -418,6 +476,8 @@ namespace Avalonia.Controls RevealPassword = false; } + UpdateCommandStates(); + _presenter?.HideCaret(); } @@ -462,6 +522,9 @@ namespace Avalonia.Controls public async void Cut() { + var text = GetSelection(); + if (text is null) return; + _undoRedoHelper.Snapshot(); Copy(); DeleteSelection(); @@ -470,17 +533,18 @@ namespace Avalonia.Controls public async void Copy() { + var text = GetSelection(); + if (text is null) return; + await ((IClipboard)AvaloniaLocator.Current.GetService(typeof(IClipboard))) - .SetTextAsync(GetSelection()); + .SetTextAsync(text); } public async void Paste() { var text = await ((IClipboard)AvaloniaLocator.Current.GetService(typeof(IClipboard))).GetTextAsync(); - if (text == null) - { - return; - } + + if (text is null) return; _undoRedoHelper.Snapshot(); HandleTextInput(text); From e93ac83ae43b9a2b88311cc11c8e2aa793b3eab5 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 18 Aug 2020 15:14:56 +0100 Subject: [PATCH 015/154] add gesture text. --- samples/ControlCatalog/Pages/TextBoxPage.xaml | 6 +++--- src/Avalonia.Controls/TextBox.cs | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/samples/ControlCatalog/Pages/TextBoxPage.xaml b/samples/ControlCatalog/Pages/TextBoxPage.xaml index 88094c70f3..5317e46e81 100644 --- a/samples/ControlCatalog/Pages/TextBoxPage.xaml +++ b/samples/ControlCatalog/Pages/TextBoxPage.xaml @@ -3,9 +3,9 @@ - - - + + + diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 7798c71377..3b81b5b020 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -19,6 +19,15 @@ namespace Avalonia.Controls { public class TextBox : TemplatedControl, UndoRedoHelper.IUndoRedoHost { + public static KeyGesture CutGesture { get; } = + AvaloniaLocator.Current.GetService()?.Cut.FirstOrDefault(); + + public static KeyGesture CopyGesture { get; } = AvaloniaLocator.Current + .GetService()?.Copy.FirstOrDefault(); + + public static KeyGesture PasteGesture { get; } = AvaloniaLocator.Current + .GetService()?.Paste.FirstOrDefault(); + public static readonly StyledProperty AcceptsReturnProperty = AvaloniaProperty.Register(nameof(AcceptsReturn)); From 5ea8c57f760e755edd03d12f06c13bfda5f2f1f1 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 18 Aug 2020 15:15:22 +0100 Subject: [PATCH 016/154] move standard textbox context menu to the templates. --- samples/ControlCatalog/Pages/TextBoxPage.xaml | 12 ------------ src/Avalonia.Themes.Default/TextBox.xaml | 8 ++++++++ src/Avalonia.Themes.Fluent/TextBox.xaml | 7 +++++++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/samples/ControlCatalog/Pages/TextBoxPage.xaml b/samples/ControlCatalog/Pages/TextBoxPage.xaml index 5317e46e81..df410c2116 100644 --- a/samples/ControlCatalog/Pages/TextBoxPage.xaml +++ b/samples/ControlCatalog/Pages/TextBoxPage.xaml @@ -1,18 +1,6 @@ - - - - - - - - - - TextBox A control into which the user can input text diff --git a/src/Avalonia.Themes.Default/TextBox.xaml b/src/Avalonia.Themes.Default/TextBox.xaml index 8384cccada..e9d5857d67 100644 --- a/src/Avalonia.Themes.Default/TextBox.xaml +++ b/src/Avalonia.Themes.Default/TextBox.xaml @@ -1,4 +1,11 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From aa5bc078a7782908560865c3682cbd387acd7708 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 18 Aug 2020 14:59:22 -0700 Subject: [PATCH 021/154] Re-enable SharpGenTools.Sdk to patch calli but disable codegen (#4512) --- src/Avalonia.Native/Avalonia.Native.csproj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Native/Avalonia.Native.csproj b/src/Avalonia.Native/Avalonia.Native.csproj index 9c3eaed2d8..f084411c2f 100644 --- a/src/Avalonia.Native/Avalonia.Native.csproj +++ b/src/Avalonia.Native/Avalonia.Native.csproj @@ -7,6 +7,7 @@ /usr/bin/castxml /usr/local/bin/castxml true + false @@ -18,8 +19,8 @@ - - + + From cd180770fbd46ff4f33721ed5ca81f477c72c0db Mon Sep 17 00:00:00 2001 From: Kiminuo Date: Wed, 19 Aug 2020 12:33:14 +0200 Subject: [PATCH 022/154] AppBuilderBase: Allow to specify app factory. --- src/Avalonia.Controls/AppBuilderBase.cs | 17 +++++++ .../AppBuilderTests.cs | 44 ++++++++++++++++++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/AppBuilderBase.cs b/src/Avalonia.Controls/AppBuilderBase.cs index d69052ad3d..f616a42cac 100644 --- a/src/Avalonia.Controls/AppBuilderBase.cs +++ b/src/Avalonia.Controls/AppBuilderBase.cs @@ -88,6 +88,23 @@ namespace Avalonia.Controls }; } + /// + /// Begin configuring an . + /// + /// Factory function for . + /// The subclass of to configure. + /// is useful for passing of dependencies to . + /// An instance. + public static TAppBuilder Configure(Func appFactory) + where TApp : Application + { + return new TAppBuilder() + { + ApplicationType = typeof(TApp), + _appFactory = appFactory + }; + } + protected TAppBuilder Self => (TAppBuilder)this; public TAppBuilder AfterSetup(Action callback) diff --git a/tests/Avalonia.Controls.UnitTests/AppBuilderTests.cs b/tests/Avalonia.Controls.UnitTests/AppBuilderTests.cs index b5004bc6a5..06ec9158fe 100644 --- a/tests/Avalonia.Controls.UnitTests/AppBuilderTests.cs +++ b/tests/Avalonia.Controls.UnitTests/AppBuilderTests.cs @@ -1,4 +1,5 @@ -using Avalonia.Controls.UnitTests; +using System; +using Avalonia.Controls.UnitTests; using Avalonia.Platform; using Xunit; @@ -18,6 +19,22 @@ namespace Avalonia.Controls.UnitTests { } + public class AppWithDependencies : Application + { + public AppWithDependencies() + { + throw new NotSupportedException(); + } + + public AppWithDependencies(object dependencyA, object dependencyB) + { + DependencyA = dependencyA; + DependencyB = dependencyB; + } + public object DependencyA { get; } + public object DependencyB { get; } + } + public class DefaultModule { public static bool IsLoaded = false; @@ -53,7 +70,30 @@ namespace Avalonia.Controls.UnitTests IsLoaded = true; } } - + + [Fact] + public void UseAppFactory() + { + using (AvaloniaLocator.EnterScope()) + { + ResetModuleLoadStates(); + + Func appFactory = () => new AppWithDependencies(dependencyA: new object(), dependencyB: new object()); + + var builder = AppBuilder.Configure(appFactory) + .UseWindowingSubsystem(() => { }) + .UseRenderingSubsystem(() => { }) + .UseAvaloniaModules() + .SetupWithoutStarting(); + + AppWithDependencies app = (AppWithDependencies)builder.Instance; + Assert.NotNull(app.DependencyA); + Assert.NotNull(app.DependencyB); + + Assert.True(DefaultModule.IsLoaded); + } + } + [Fact] public void LoadsDefaultModule() { From 793f1b7453993255f544a9ae561187896ccc24ac Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Tue, 9 Jun 2020 17:44:05 +0200 Subject: [PATCH 023/154] Allow support at CanExecute when binding a method --- .../AlwaysEnabledDelegateCommand.cs | 41 ---- .../Data/Converters/DefaultValueConverter.cs | 2 +- .../Converters/MethodToCommandConverter.cs | 182 ++++++++++++++++++ .../Metadata/DependsOnAttribute.cs | 2 +- 4 files changed, 184 insertions(+), 43 deletions(-) delete mode 100644 src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs create mode 100644 src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs diff --git a/src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs b/src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs deleted file mode 100644 index 7f4c83772d..0000000000 --- a/src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Globalization; -using System.Reflection; -using System.Windows.Input; -using Avalonia.Utilities; - -namespace Avalonia.Data.Converters -{ - class AlwaysEnabledDelegateCommand : ICommand - { - private readonly Delegate action; - - private ParameterInfo parameterInfo; - - public AlwaysEnabledDelegateCommand(Delegate action) - { - this.action = action; - var parameters = action.Method.GetParameters(); - parameterInfo = parameters.Length == 0 ? null : parameters[0]; - } - -#pragma warning disable 0067 - public event EventHandler CanExecuteChanged; -#pragma warning restore 0067 - - public bool CanExecute(object parameter) => true; - - public void Execute(object parameter) - { - if (parameterInfo == null) - { - action.DynamicInvoke(); - } - else - { - TypeUtilities.TryConvert(parameterInfo.ParameterType, parameter, CultureInfo.CurrentCulture, out object convertedParameter); - action.DynamicInvoke(convertedParameter); - } - } - } -} diff --git a/src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs b/src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs index 5e80a15059..83f7e02c16 100644 --- a/src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs +++ b/src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs @@ -33,7 +33,7 @@ namespace Avalonia.Data.Converters if (typeof(ICommand).IsAssignableFrom(targetType) && value is Delegate d && d.Method.GetParameters().Length <= 1) { - return new AlwaysEnabledDelegateCommand(d); + return new MethodToCommandConverter(d); } if (TypeUtilities.TryConvert(targetType, value, culture, out object result)) diff --git a/src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs b/src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs new file mode 100644 index 0000000000..c638fe56e6 --- /dev/null +++ b/src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs @@ -0,0 +1,182 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Windows.Input; +using Avalonia.Utilities; + +namespace Avalonia.Data.Converters +{ + class MethodToCommandConverter : ICommand + { + readonly static Func AlwaysEnabled = (_) => true; + readonly static MethodInfo tryConvert = typeof(TypeUtilities) + .GetMethod(nameof(TypeUtilities.TryConvert), BindingFlags.Public | BindingFlags.Static); + readonly static PropertyInfo currentCulture = typeof(CultureInfo) + .GetProperty(nameof(CultureInfo.CurrentCulture), BindingFlags.Public | BindingFlags.Static); + readonly Func canExecute; + readonly Action execute; + + public MethodToCommandConverter(Delegate action) + { + var target = action.Target; + var canExecuteMethodName = "Can" + action.Method.Name; + var parameters = action.Method.GetParameters(); + var parameterInfo = parameters.Length == 0 ? null : parameters[0].ParameterType; + + if (parameterInfo == null) + { + execute = CreateExecute(target, action.Method); + } + else + { + execute = CreateExecute(target, action.Method, parameterInfo); + } + + var canExecuteMethod = action.Method.DeclaringType.GetRuntimeMethods() + .FirstOrDefault(m => m.Name == canExecuteMethodName + && m.GetParameters().Length == 1 + && m.GetParameters()[0].ParameterType == typeof(object)); + if (canExecuteMethod == null) + { + canExecute = AlwaysEnabled; + } + else + { + canExecute = CreateCanExecute(target, canExecuteMethod); + var dependencyProperties = canExecuteMethod + .GetCustomAttributes(typeof(Metadata.DependsOnAttribute), true) + .OfType() + .Select(x => x.Name) + .ToArray(); + if (dependencyProperties.Any() + && target is System.ComponentModel.INotifyPropertyChanged inpc) + { + System.ComponentModel.PropertyChangedEventHandler invalidateCanExecuteHandler = (s, e) => + { + if (string.IsNullOrWhiteSpace(e.PropertyName) + || dependencyProperties.Contains(e.PropertyName)) + { + Threading.Dispatcher.UIThread.Post(() => CanExecuteChanged?.Invoke(this, EventArgs.Empty) + , Threading.DispatcherPriority.Input); + } + }; + inpc.PropertyChanged += invalidateCanExecuteHandler; + } + } + + + } + +#pragma warning disable 0067 + public event EventHandler CanExecuteChanged; +#pragma warning restore 0067 + + public bool CanExecute(object parameter) => canExecute(parameter); + + public void Execute(object parameter) => execute(parameter); + + + static Action CreateExecute(object target + , System.Reflection.MethodInfo method) + { + + var parameter = Expression.Parameter(typeof(object), "parameter"); + + var instance = Expression.Convert + ( + Expression.Constant(target), + method.DeclaringType + ); + + + var call = Expression.Call + ( + instance, + method + ); + + + return Expression + .Lambda>(call, parameter) + .Compile(); + } + + static Action CreateExecute(object target + , System.Reflection.MethodInfo method + , Type parameterType) + { + + var parameter = Expression.Parameter(typeof(object), "parameter"); + + var instance = Expression.Convert + ( + Expression.Constant(target), + method.DeclaringType + ); + + Expression body; + + if (parameterType == typeof(object)) + { + body = Expression.Call(instance, + method, + parameter + ); + } + else + { + var arg0 = Expression.Variable(typeof(object), "argX"); + var convertCall = Expression.Call(tryConvert, + Expression.Constant(parameterType), + parameter, + Expression.Property(null, currentCulture), + arg0 + ); + + var call = Expression.Call(instance, + method, + Expression.Convert(arg0, parameterType) + ); + body = Expression.Block(new[] { arg0 }, + convertCall, + call + ); + + } + Action action = null; + try + { + action = Expression + .Lambda>(body, parameter) + .Compile(); + } + catch (Exception ex) + { + throw ex; + } + return action; + } + + static Func CreateCanExecute(object target + , System.Reflection.MethodInfo method) + { + var parameter = Expression.Parameter(typeof(object), "parameter"); + var instance = Expression.Convert + ( + Expression.Constant(target), + method.DeclaringType + ); + var call = Expression.Call + ( + instance, + method, + parameter + ); + return Expression + .Lambda>(call, parameter) + .Compile(); + } + } +} diff --git a/src/Avalonia.Base/Metadata/DependsOnAttribute.cs b/src/Avalonia.Base/Metadata/DependsOnAttribute.cs index 92c6a58170..caee71ebfd 100644 --- a/src/Avalonia.Base/Metadata/DependsOnAttribute.cs +++ b/src/Avalonia.Base/Metadata/DependsOnAttribute.cs @@ -5,7 +5,7 @@ namespace Avalonia.Metadata /// /// Indicates that the property depends on the value of another property in markup. /// - [AttributeUsage(AttributeTargets.Property)] + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, Inherited = true, AllowMultiple = true)] public class DependsOnAttribute : Attribute { /// From 9f3ed1c8fe1de02fd8e98cb43ed5eb5c2575676a Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Tue, 9 Jun 2020 17:44:45 +0200 Subject: [PATCH 024/154] Add testing --- .../Data/BindingTests_Method.cs | 100 +++++++++++++++++- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Method.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Method.cs index a7a004bd49..e1a7803821 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Method.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Method.cs @@ -1,5 +1,4 @@ -using System.Reactive.Subjects; -using System.Windows.Input; +using System.ComponentModel; using Avalonia.Controls; using Avalonia.Input; using Avalonia.UnitTests; @@ -56,7 +55,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Data Assert.Equal("Called 5", vm.Value); } } - + [Fact] public void Binding_Method_To_TextBlock_Text_Works() { @@ -79,6 +78,68 @@ namespace Avalonia.Markup.Xaml.UnitTests.Data } } + + [Theory] + [InlineData(null, "Not called")] + [InlineData("A", "Do A")] + public void Binding_Method_With_Parameter_To_Command_CanExecute(object commandParameter, string result) + { + using (UnitTestApplication.Start(TestServices.StyledWindow)) + { + var xaml = @" + +