Browse Source

Merge pull request #7565 from AvaloniaUI/net6-ios

Use new .NET 6 SDK for iOS backend
pull/7754/head
Dan Walmsley 5 years ago
committed by GitHub
parent
commit
6209af4d46
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .gitignore
  2. 78
      Avalonia.sln
  3. 8
      azure-pipelines.yml
  4. 6
      build/HarfBuzzSharp.props
  5. 6
      build/SkiaSharp.props
  6. 9
      dirs.proj
  7. 3
      global.json
  8. 1
      samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
  9. 7
      samples/ControlCatalog.NetCore/Program.cs
  10. 15
      samples/ControlCatalog.iOS.Legacy/AppDelegate.cs
  11. 117
      samples/ControlCatalog.iOS.Legacy/Assets.xcassets/AppIcon.appiconset/Contents.json
  12. 99
      samples/ControlCatalog.iOS.Legacy/ControlCatalog.iOS.Legacy.csproj
  13. 6
      samples/ControlCatalog.iOS.Legacy/Entitlements.plist
  14. 47
      samples/ControlCatalog.iOS.Legacy/Info.plist
  15. 15
      samples/ControlCatalog.iOS.Legacy/Main.cs
  16. 43
      samples/ControlCatalog.iOS.Legacy/Resources/LaunchScreen.xib
  17. 190
      samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj
  18. 7
      samples/ControlCatalog.iOS/Info.plist
  19. 4
      samples/ControlCatalog.iOS/Main.cs
  20. 36
      samples/ControlCatalog.iOS/Properties/AssemblyInfo.cs
  21. 2
      samples/ControlCatalog.iOS/Resources/LaunchScreen.xib
  22. 5
      samples/ControlCatalog/App.xaml.cs
  23. 1
      samples/ControlCatalog/ControlCatalog.csproj
  24. 1
      samples/interop/WindowsInteropTest/WindowsInteropTest.csproj
  25. 3
      src/Android/Avalonia.Android/Avalonia.Android.csproj
  26. 46
      src/Avalonia.OpenGL/Egl/EglInterface.cs
  27. 5
      src/Avalonia.OpenGL/GlBasicInfoInterface.cs
  28. 112
      src/Avalonia.OpenGL/GlInterface.cs
  29. 5
      src/Skia/Avalonia.Skia/FontManagerImpl.cs
  30. 13
      src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs
  31. 27
      src/iOS/Avalonia.iOS/Avalonia.iOS.csproj
  32. 4
      src/iOS/Avalonia.iOS/AvaloniaAppDelegate.cs
  33. 14
      src/iOS/Avalonia.iOS/Boilerplate/AppBuilder.cs
  34. 19
      src/iOS/Avalonia.iOS/EaglDisplay.cs
  35. 5
      src/iOS/Avalonia.iOS/EaglLayerSurface.cs
  36. 4
      src/iOS/Avalonia.iOS/Extensions.cs
  37. 80
      src/iOS/Avalonia.iOS/LayerFbo.cs
  38. 15
      src/iOS/Avalonia.iOS/Platform.cs

1
.gitignore

@ -198,7 +198,6 @@ Index/
Logs/ Logs/
ModuleCache.noindex/ ModuleCache.noindex/
Build/Intermediates.noindex/ Build/Intermediates.noindex/
info.plist
build-intermediate build-intermediate
obj-Direct2D1/ obj-Direct2D1/
obj-Skia/ obj-Skia/

78
Avalonia.sln

@ -95,8 +95,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlCatalog", "samples\C
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlCatalog.Desktop", "samples\ControlCatalog.Desktop\ControlCatalog.Desktop.csproj", "{2B888490-D14A-4BCA-AB4B-48676FA93C9B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlCatalog.Desktop", "samples\ControlCatalog.Desktop\ControlCatalog.Desktop.csproj", "{2B888490-D14A-4BCA-AB4B-48676FA93C9B}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlCatalog.iOS", "samples\ControlCatalog.iOS\ControlCatalog.iOS.csproj", "{57E0455D-D565-44BB-B069-EE1AA20F8337}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.DesignerSupport.Tests", "tests\Avalonia.DesignerSupport.Tests\Avalonia.DesignerSupport.Tests.csproj", "{52F55355-D120-42AC-8116-8410A7D602FA}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.DesignerSupport.Tests", "tests\Avalonia.DesignerSupport.Tests\Avalonia.DesignerSupport.Tests.csproj", "{52F55355-D120-42AC-8116-8410A7D602FA}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.DesignerSupport.TestApp", "tests\Avalonia.DesignerSupport.TestApp\Avalonia.DesignerSupport.TestApp.csproj", "{F1381F98-4D24-409A-A6C5-1C5B1E08BB08}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.DesignerSupport.TestApp", "tests\Avalonia.DesignerSupport.TestApp\Avalonia.DesignerSupport.TestApp.csproj", "{F1381F98-4D24-409A-A6C5-1C5B1E08BB08}"
@ -121,7 +119,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Props", "Props", "{F3AC8BC1
build\CoreLibraries.props = build\CoreLibraries.props build\CoreLibraries.props = build\CoreLibraries.props
build\EmbedXaml.props = build\EmbedXaml.props build\EmbedXaml.props = build\EmbedXaml.props
build\HarfBuzzSharp.props = build\HarfBuzzSharp.props build\HarfBuzzSharp.props = build\HarfBuzzSharp.props
build\iOSWorkarounds.props = build\iOSWorkarounds.props
build\JetBrains.Annotations.props = build\JetBrains.Annotations.props build\JetBrains.Annotations.props = build\JetBrains.Annotations.props
build\JetBrains.dotMemoryUnit.props = build\JetBrains.dotMemoryUnit.props build\JetBrains.dotMemoryUnit.props = build\JetBrains.dotMemoryUnit.props
build\Magick.NET-Q16-AnyCPU.props = build\Magick.NET-Q16-AnyCPU.props build\Magick.NET-Q16-AnyCPU.props = build\Magick.NET-Q16-AnyCPU.props
@ -235,6 +232,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlSamples", "samples\S
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.PlatformSupport", "src\Avalonia.PlatformSupport\Avalonia.PlatformSupport.csproj", "{E8A597F0-2AB5-4BDA-A235-41162DAF53CF}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.PlatformSupport", "src\Avalonia.PlatformSupport\Avalonia.PlatformSupport.csproj", "{E8A597F0-2AB5-4BDA-A235-41162DAF53CF}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog.iOS", "samples\ControlCatalog.iOS\ControlCatalog.iOS.csproj", "{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog.iOS.Legacy", "samples\ControlCatalog.iOS.Legacy\ControlCatalog.iOS.Legacy.csproj", "{3AF75F00-B497-4517-9491-922173DE216E}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
@ -1097,26 +1098,6 @@ Global
{2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|iPhone.Build.0 = Release|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|iPhone.Build.0 = Release|Any CPU
{2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
{57E0455D-D565-44BB-B069-EE1AA20F8337}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.AppStore|iPhone.Build.0 = AppStore|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
{57E0455D-D565-44BB-B069-EE1AA20F8337}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|iPhone.ActiveCfg = Debug|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|iPhone.Build.0 = Debug|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|Any CPU.ActiveCfg = Release|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|iPhone.ActiveCfg = Release|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|iPhone.Build.0 = Release|iPhone
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{52F55355-D120-42AC-8116-8410A7D602FA}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{52F55355-D120-42AC-8116-8410A7D602FA}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{52F55355-D120-42AC-8116-8410A7D602FA}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
@ -2209,6 +2190,54 @@ Global
{E8A597F0-2AB5-4BDA-A235-41162DAF53CF}.Release|iPhone.Build.0 = Release|Any CPU {E8A597F0-2AB5-4BDA-A235-41162DAF53CF}.Release|iPhone.Build.0 = Release|Any CPU
{E8A597F0-2AB5-4BDA-A235-41162DAF53CF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {E8A597F0-2AB5-4BDA-A235-41162DAF53CF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{E8A597F0-2AB5-4BDA-A235-41162DAF53CF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {E8A597F0-2AB5-4BDA-A235-41162DAF53CF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.AppStore|iPhone.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Debug|iPhone.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Release|Any CPU.Build.0 = Release|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Release|iPhone.ActiveCfg = Release|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Release|iPhone.Build.0 = Release|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.AppStore|iPhone.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Debug|iPhone.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Release|Any CPU.Build.0 = Release|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Release|iPhone.ActiveCfg = Release|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Release|iPhone.Build.0 = Release|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{3AF75F00-B497-4517-9491-922173DE216E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -2238,7 +2267,6 @@ Global
{410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{D0A739B9-3C68-4BA6-A328-41606954B6BD} = {9B9E3891-2366-4253-A952-D08BCEB71098} {D0A739B9-3C68-4BA6-A328-41606954B6BD} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{2B888490-D14A-4BCA-AB4B-48676FA93C9B} = {9B9E3891-2366-4253-A952-D08BCEB71098} {2B888490-D14A-4BCA-AB4B-48676FA93C9B} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{57E0455D-D565-44BB-B069-EE1AA20F8337} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{52F55355-D120-42AC-8116-8410A7D602FA} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {52F55355-D120-42AC-8116-8410A7D602FA} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{F1381F98-4D24-409A-A6C5-1C5B1E08BB08} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} {F1381F98-4D24-409A-A6C5-1C5B1E08BB08} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{FBCAF3D0-2808-4934-8E96-3F607594517B} = {9B9E3891-2366-4253-A952-D08BCEB71098} {FBCAF3D0-2808-4934-8E96-3F607594517B} = {9B9E3891-2366-4253-A952-D08BCEB71098}
@ -2273,6 +2301,8 @@ Global
{C08E9894-AA92-426E-BF56-033E262CAD3E} = {9B9E3891-2366-4253-A952-D08BCEB71098} {C08E9894-AA92-426E-BF56-033E262CAD3E} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{26A98DA1-D89D-4A95-8152-349F404DA2E2} = {A0CC0258-D18C-4AB3-854F-7101680FC3F9} {26A98DA1-D89D-4A95-8152-349F404DA2E2} = {A0CC0258-D18C-4AB3-854F-7101680FC3F9}
{A0D0A6A4-5C72-4ADA-9B27-621C7D94F270} = {9B9E3891-2366-4253-A952-D08BCEB71098} {A0D0A6A4-5C72-4ADA-9B27-621C7D94F270} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{70B9F5CC-E2F9-4314-9514-EDE762ACCC4B} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{3AF75F00-B497-4517-9491-922173DE216E} = {9B9E3891-2366-4253-A952-D08BCEB71098}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {87366D66-1391-4D90-8999-95A620AD786A} SolutionGuid = {87366D66-1391-4D90-8999-95A620AD786A}

8
azure-pipelines.yml

@ -38,7 +38,7 @@ jobs:
- task: UseDotNet@2 - task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.100' displayName: 'Use .NET Core SDK 6.0.100'
inputs: inputs:
version: 6.0.100 version: 6.0.200
- task: CmdLine@2 - task: CmdLine@2
displayName: 'Run Build' displayName: 'Run Build'
@ -69,7 +69,7 @@ jobs:
- task: UseDotNet@2 - task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.100' displayName: 'Use .NET Core SDK 6.0.100'
inputs: inputs:
version: 6.0.100 version: 6.0.200
- task: CmdLine@2 - task: CmdLine@2
displayName: 'Install Mono 5.18' displayName: 'Install Mono 5.18'
@ -141,13 +141,13 @@ jobs:
- task: UseDotNet@2 - task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.100' displayName: 'Use .NET Core SDK 6.0.100'
inputs: inputs:
version: 6.0.100 version: 6.0.200
- task: CmdLine@2 - task: CmdLine@2
displayName: 'Install Workloads' displayName: 'Install Workloads'
inputs: inputs:
script: | script: |
dotnet workload install android dotnet workload install --no-cache --disable-parallel android ios --skip-manifest-update --source "https://api.nuget.org/v3/index.json"
- task: CmdLine@2 - task: CmdLine@2
displayName: 'Install Nuke' displayName: 'Install Nuke'

6
build/HarfBuzzSharp.props

@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<PackageReference Include="HarfBuzzSharp" Version="2.8.2-preview.178" /> <PackageReference Include="HarfBuzzSharp" Version="2.8.2-preview.209" />
<PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.178" /> <PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.209" />
<PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.WebAssembly" Version="2.8.2-preview.178"/> <PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="HarfBuzzSharp.NativeAssets.WebAssembly" Version="2.8.2-preview.209"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

6
build/SkiaSharp.props

@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.88.0-preview.178" /> <PackageReference Include="SkiaSharp" Version="2.88.0-preview.209" />
<PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.178" /> <PackageReference Condition="'$(IncludeLinuxSkia)' == 'true'" Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.209" />
<PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="SkiaSharp.NativeAssets.WebAssembly" Version="2.88.0-preview.178"/> <PackageReference Condition="'$(IncludeWasmSkia)' == 'true'" Include="SkiaSharp.NativeAssets.WebAssembly" Version="2.88.0-preview.209"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

9
dirs.proj

@ -10,21 +10,20 @@
<ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml/PortableXaml/**/*.*proj" /> <ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml/PortableXaml/**/*.*proj" />
<ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/**/*.*proj" /> <ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/**/*.*proj" />
<ProjectReference Remove="tests/Avalonia.ReactiveUI.Events.UnitTests/Avalonia.ReactiveUI.Events.UnitTests.csproj" /> <ProjectReference Remove="tests/Avalonia.ReactiveUI.Events.UnitTests/Avalonia.ReactiveUI.Events.UnitTests.csproj" />
<ProjectReference Remove="samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj" />
<ProjectReference Remove="samples/ControlCatalog.iOS.Legacy/ControlCatalog.iOS.Legacy.csproj" />
<ProjectReference Remove="samples/ControlCatalog.Android/ControlCatalog.Android.csproj" /> <ProjectReference Remove="samples/ControlCatalog.Android/ControlCatalog.Android.csproj" />
<ProjectReference Remove="src/Android/Avalonia.AndroidTestApplication/Avalonia.AndroidTestApplication.csproj" /> <ProjectReference Remove="src/Android/Avalonia.AndroidTestApplication/Avalonia.AndroidTestApplication.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="!Exists('$(MSBuildExtensionsPath)\Xamarin\iOS')">
<ProjectReference Remove="src/iOS/**/*.*proj" />
<ProjectReference Remove="samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj" />
</ItemGroup>
<ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows')) OR '$(MSBuildRuntimeType)' != 'Full'"> <ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows')) OR '$(MSBuildRuntimeType)' != 'Full'">
<ProjectReference Remove="src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj" /> <ProjectReference Remove="src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj" />
<ProjectReference Remove="samples/interop/**/*.*proj" /> <ProjectReference Remove="samples/interop/**/*.*proj" />
<ProjectReference Remove="samples/ControlCatalog.Desktop/*.*proj" /> <ProjectReference Remove="samples/ControlCatalog.Desktop/*.*proj" />
</ItemGroup> </ItemGroup>
<!-- Build android projects only on Windows, where we have installed android workload --> <!-- Build android and iOS projects only on Windows, where we have installed android workload -->
<ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows'))"> <ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows'))">
<ProjectReference Remove="src/Android/**/*.*proj" /> <ProjectReference Remove="src/Android/**/*.*proj" />
<ProjectReference Remove="src/iOS/**/*.*proj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

3
global.json

@ -1,6 +1,7 @@
{ {
"sdk": { "sdk": {
"version": "6.0.100" "version": "6.0.200",
"rollForward": "latestFeature"
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Microsoft.Build.Traversal": "1.0.43", "Microsoft.Build.Traversal": "1.0.43",

1
samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj

@ -13,6 +13,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Headless.Vnc\Avalonia.Headless.Vnc.csproj" /> <ProjectReference Include="..\..\src\Avalonia.Headless.Vnc\Avalonia.Headless.Vnc.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Dialogs\Avalonia.Dialogs.csproj" /> <ProjectReference Include="..\..\src\Avalonia.Dialogs\Avalonia.Dialogs.csproj" />
<ProjectReference Include="..\..\src\Linux\Avalonia.LinuxFramebuffer\Avalonia.LinuxFramebuffer.csproj" /> <ProjectReference Include="..\..\src\Linux\Avalonia.LinuxFramebuffer\Avalonia.LinuxFramebuffer.csproj" />

7
samples/ControlCatalog.NetCore/Program.cs

@ -118,6 +118,13 @@ namespace ControlCatalog.NetCore
}) })
.UseSkia() .UseSkia()
.UseManagedSystemDialogs() .UseManagedSystemDialogs()
.AfterSetup(builder =>
{
builder.Instance!.AttachDevTools(new Avalonia.Diagnostics.DevToolsOptions()
{
StartupScreenIndex = 1,
});
})
.LogToTrace(); .LogToTrace();
static void SilenceConsole() static void SilenceConsole()

15
samples/ControlCatalog.iOS.Legacy/AppDelegate.cs

@ -0,0 +1,15 @@
using Avalonia.iOS;
using Foundation;
using UIKit;
namespace ControlCatalog.iOS.Legacy
{
// 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 : AvaloniaAppDelegate<App>
{
}
}

117
samples/ControlCatalog.iOS.Legacy/Assets.xcassets/AppIcon.appiconset/Contents.json

@ -0,0 +1,117 @@
{
"images": [
{
"scale": "2x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon40.png"
},
{
"scale": "3x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon60.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon58.png"
},
{
"scale": "3x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon87.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon80.png"
},
{
"scale": "3x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "2x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "3x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon180.png"
},
{
"scale": "1x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon20.png"
},
{
"scale": "2x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "1x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon29.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon58.png"
},
{
"scale": "1x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon80.png"
},
{
"scale": "1x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon76.png"
},
{
"scale": "2x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon152.png"
},
{
"scale": "2x",
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon167.png"
},
{
"scale": "1x",
"size": "1024x1024",
"idiom": "ios-marketing",
"filename": "Icon1024.png"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

99
samples/ControlCatalog.iOS.Legacy/ControlCatalog.iOS.Legacy.csproj

@ -0,0 +1,99 @@
<Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup>
<TargetFramework>xamarin.ios10</TargetFramework>
<SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{3AF75F00-B497-4517-9491-922173DE216E}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>ControlCatalog.iOS.Legacy</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>ControlCatalog.iOS.Legacy</AssemblyName>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<ProvisioningType>manual</ProvisioningType>
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>x86_64</MtouchArch>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<None Include="Info.plist" />
<Content Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Avalonia.Controls\Avalonia.Controls.csproj">
<Project>{d2221c82-4a25-4583-9b43-d791e3f6820c}</Project>
<Name>Avalonia.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\iOS\Avalonia.iOS\Avalonia.iOS.csproj">
<Project>{4488ad85-1495-4809-9aa4-ddfe0a48527e}</Project>
<Name>Avalonia.iOS</Name>
</ProjectReference>
<ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj">
<Project>{d0a739b9-3c68-4ba6-a328-41606954b6bd}</Project>
<Name>ControlCatalog</Name>
</ProjectReference>
</ItemGroup>
<!-- <Import Project="..\..\build\LegacyProject.targets" />-->
<!-- <Import Project="..\..\build\SkiaSharp.props" />-->
<!-- <Import Project="..\..\build\HarfBuzzSharp.props" />-->
</Project>

6
samples/ControlCatalog.iOS.Legacy/Entitlements.plist

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

47
samples/ControlCatalog.iOS.Legacy/Info.plist

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>ControlCatalog</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.ControlCatalog.iOS</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>15.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer><integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

15
samples/ControlCatalog.iOS.Legacy/Main.cs

@ -0,0 +1,15 @@
using UIKit;
namespace ControlCatalog.iOS.Legacy
{
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");
}
}
}

43
samples/ControlCatalog.iOS.Legacy/Resources/LaunchScreen.xib

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207" />
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1" />
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" />
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder" />
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2022 " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ControlCatalog.iOS.Legacy" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43" />
<fontDescription key="fontDescription" type="boldSystem" pointSize="36" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC" />
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk" />
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l" />
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0" />
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9" />
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g" />
</constraints>
<nil key="simulatedStatusBarMetrics" />
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<point key="canvasLocation" x="548" y="455" />
</view>
</objects>
</document>

190
samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj

@ -1,186 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{57E0455D-D565-44BB-B069-EE1AA20F8337}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>ControlCatalog.iOS</RootNamespace> <ProvisioningType>manual</ProvisioningType>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> <TargetFramework>net6.0-ios</TargetFramework>
<AssemblyName>ControlCatalogiOS</AssemblyName> <SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc> <!-- temporal workaround for our GL interface backend -->
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <UseInterpreter>True</UseInterpreter>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle> <RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
<ProvisioningType>automatic</ProvisioningType> <!-- <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>-->
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>True</MtouchDebug>
<MtouchSdkVersion>9.1</MtouchSdkVersion>
<MtouchProfiling>False</MtouchProfiling>
<MtouchFastDev>False</MtouchFastDev>
<MtouchNoSymbolStrip>False</MtouchNoSymbolStrip>
<MtouchUseLlvm>False</MtouchUseLlvm>
<MtouchUseThumb>False</MtouchUseThumb>
<MtouchEnableBitcode>False</MtouchEnableBitcode>
<MtouchUseSGen>False</MtouchUseSGen>
<MtouchUseRefCounting>False</MtouchUseRefCounting>
<OptimizePNGs>True</OptimizePNGs>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
<MtouchFloat32>False</MtouchFloat32>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>x86_64</MtouchArch>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<BuildIpa>True</BuildIpa>
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\iPhone\AppStore</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignProvision>Automatic:AppStore</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
</PropertyGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
<InterfaceDefinition Include="Resources\LaunchScreen.xib" />
<Content Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\iOS\Avalonia.iOS\Avalonia.iOS.csproj"> <ProjectReference Include="..\..\src\iOS\Avalonia.iOS\Avalonia.iOS.csproj" />
<Project>{4488AD85-1495-4809-9AA4-DDFE0A48527E}</Project> <ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj" />
<Name>Avalonia.iOS</Name>
<IsAppExtension>false</IsAppExtension>
<IsWatchApp>false</IsWatchApp>
</ProjectReference>
<ProjectReference Include="..\..\src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj">
<Project>{3E53A01A-B331-47F3-B828-4A5717E77A24}</Project>
<Name>Avalonia.Markup.Xaml</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Markup\Avalonia.Markup\Avalonia.Markup.csproj">
<Project>{6417E941-21BC-467B-A771-0DE389353CE6}</Project>
<Name>Avalonia.Markup</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Animation\Avalonia.Animation.csproj">
<Project>{D211E587-D8BC-45B9-95A4-F297C8FA5200}</Project>
<Name>Avalonia.Animation</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Base\Avalonia.Base.csproj">
<Project>{B09B78D8-9B26-48B0-9149-D64A2F120F3F}</Project>
<Name>Avalonia.Base</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Controls\Avalonia.Controls.csproj">
<Project>{D2221C82-4A25-4583-9B43-D791E3F6820C}</Project>
<Name>Avalonia.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj">
<Project>{7062AE20-5DCC-4442-9645-8195BDECE63E}</Project>
<Name>Avalonia.Diagnostics</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Input\Avalonia.Input.csproj">
<Project>{62024B2D-53EB-4638-B26B-85EEAA54866E}</Project>
<Name>Avalonia.Input</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Interactivity\Avalonia.Interactivity.csproj">
<Project>{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}</Project>
<Name>Avalonia.Interactivity</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Layout\Avalonia.Layout.csproj">
<Project>{42472427-4774-4C81-8AFF-9F27B8E31721}</Project>
<Name>Avalonia.Layout</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Visuals\Avalonia.Visuals.csproj">
<Project>{EB582467-6ABB-43A1-B052-E981BA910E3A}</Project>
<Name>Avalonia.Visuals</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj">
<Project>{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}</Project>
<Name>Avalonia.Styling</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj">
<Project>{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}</Project>
<Name>Avalonia.Themes.Default</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Skia\Avalonia.Skia\Avalonia.Skia.csproj">
<Project>{7d2d3083-71dd-4cc9-8907-39a0d86fb322}</Project>
<Name>Avalonia.Skia</Name>
</ProjectReference>
<ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj">
<Project>{d0a739b9-3c68-4ba6-a328-41606954b6bd}</Project>
<Name>ControlCatalog</Name>
</ProjectReference>
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.80.2-preview.33" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\build\LegacyProject.targets" />
<Import Project="..\..\build\SkiaSharp.props" />
<Import Project="..\..\build\HarfBuzzSharp.props" />
</Project> </Project>

7
samples/ControlCatalog.iOS/Info.plist

@ -13,7 +13,7 @@
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>8.0</string> <string>10.0</string>
<key>UIDeviceFamily</key> <key>UIDeviceFamily</key>
<array> <array>
<integer>1</integer> <integer>1</integer>
@ -28,6 +28,7 @@
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
@ -38,5 +39,9 @@
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict> </dict>
</plist> </plist>

4
samples/ControlCatalog.iOS/Main.cs

@ -9,7 +9,7 @@ namespace ControlCatalog.iOS
{ {
// if you want to use a different Application Delegate class from "AppDelegate" // if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here. // you can specify it here.
UIApplication.Main(args, null, "AppDelegate"); UIApplication.Main(args, null, typeof(AppDelegate));
} }
} }
} }

36
samples/ControlCatalog.iOS/Properties/AssemblyInfo.cs

@ -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("ControlCatalog.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ControlCatalog.iOS")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[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("57e0455d-d565-44bb-b069-ee1aa20f8337")]
// 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")]

2
samples/ControlCatalog.iOS/Resources/LaunchScreen.xib

@ -11,7 +11,7 @@
<rect key="frame" x="0.0" y="0.0" width="480" height="480" /> <rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" /> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2016 " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2022 " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21" /> <rect key="frame" x="20" y="439" width="441" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" /> <fontDescription key="fontDescription" type="system" pointSize="17" />

5
samples/ControlCatalog/App.xaml.cs

@ -78,11 +78,6 @@ namespace ControlCatalog
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime) if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime)
{ {
desktopLifetime.MainWindow = new MainWindow(); desktopLifetime.MainWindow = new MainWindow();
this.AttachDevTools(new Avalonia.Diagnostics.DevToolsOptions()
{
StartupScreenIndex = 1,
});
} }
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewLifetime) else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewLifetime)
{ {

1
samples/ControlCatalog/ControlCatalog.csproj

@ -23,7 +23,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\packages\Avalonia\Avalonia.csproj" /> <ProjectReference Include="..\..\packages\Avalonia\Avalonia.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Controls.DataGrid\Avalonia.Controls.DataGrid.csproj" /> <ProjectReference Include="..\..\src\Avalonia.Controls.DataGrid\Avalonia.Controls.DataGrid.csproj" />
<ProjectReference Include="..\MiniMvvm\MiniMvvm.csproj" /> <ProjectReference Include="..\MiniMvvm\MiniMvvm.csproj" />
<ProjectReference Include="..\SampleControls\ControlSamples.csproj" /> <ProjectReference Include="..\SampleControls\ControlSamples.csproj" />

1
samples/interop/WindowsInteropTest/WindowsInteropTest.csproj

@ -8,6 +8,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
<ProjectReference Include="..\..\..\src\Windows\Avalonia.Win32.Interop\Avalonia.Win32.Interop.csproj" /> <ProjectReference Include="..\..\..\src\Windows\Avalonia.Win32.Interop\Avalonia.Win32.Interop.csproj" />
<ProjectReference Include="..\..\ControlCatalog\ControlCatalog.csproj"> <ProjectReference Include="..\..\ControlCatalog\ControlCatalog.csproj">
<Project>{d0a739b9-3c68-4ba6-a328-41606954b6bd}</Project> <Project>{d0a739b9-3c68-4ba6-a328-41606954b6bd}</Project>

3
src/Android/Avalonia.Android/Avalonia.Android.csproj

@ -1,6 +1,7 @@
<Project Sdk="Xamarin.Legacy.Sdk"> <Project Sdk="Xamarin.Legacy.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net6.0-android;monoandroid11.0</TargetFrameworks> <TargetFrameworks>net6.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(MSBuildRuntimeType)' != 'Core'">$(TargetFrameworks);monoandroid11.0</TargetFrameworks>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MSBuildEnableWorkloadResolver>true</MSBuildEnableWorkloadResolver> <MSBuildEnableWorkloadResolver>true</MSBuildEnableWorkloadResolver>

46
src/Avalonia.OpenGL/Egl/EglInterface.cs

@ -46,93 +46,114 @@ namespace Avalonia.OpenGL.Egl
} }
// ReSharper disable UnassignedGetOnlyAutoProperty // ReSharper disable UnassignedGetOnlyAutoProperty
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int EglGetError(); public delegate int EglGetError();
[GlEntryPoint("eglGetError")] [GlEntryPoint("eglGetError")]
public EglGetError GetError { get; } public EglGetError GetError { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglGetDisplay(IntPtr nativeDisplay); public delegate IntPtr EglGetDisplay(IntPtr nativeDisplay);
[GlEntryPoint("eglGetDisplay")] [GlEntryPoint("eglGetDisplay")]
public EglGetDisplay GetDisplay { get; } public EglGetDisplay GetDisplay { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglGetPlatformDisplayEXT(int platform, IntPtr nativeDisplay, int[] attrs); public delegate IntPtr EglGetPlatformDisplayEXT(int platform, IntPtr nativeDisplay, int[] attrs);
[GlEntryPoint("eglGetPlatformDisplayEXT")] [GlEntryPoint("eglGetPlatformDisplayEXT")]
[GlOptionalEntryPoint] [GlOptionalEntryPoint]
public EglGetPlatformDisplayEXT GetPlatformDisplayEXT { get; } public EglGetPlatformDisplayEXT GetPlatformDisplayEXT { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglInitialize(IntPtr display, out int major, out int minor); public delegate bool EglInitialize(IntPtr display, out int major, out int minor);
[GlEntryPoint("eglInitialize")] [GlEntryPoint("eglInitialize")]
public EglInitialize Initialize { get; } public EglInitialize Initialize { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglGetProcAddress(Utf8Buffer proc); public delegate IntPtr EglGetProcAddress(Utf8Buffer proc);
[GlEntryPoint("eglGetProcAddress")] [GlEntryPoint("eglGetProcAddress")]
public EglGetProcAddress GetProcAddress { get; } public EglGetProcAddress GetProcAddress { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglBindApi(int api); public delegate bool EglBindApi(int api);
[GlEntryPoint("eglBindAPI")] [GlEntryPoint("eglBindAPI")]
public EglBindApi BindApi { get; } public EglBindApi BindApi { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglChooseConfig(IntPtr display, int[] attribs, public delegate bool EglChooseConfig(IntPtr display, int[] attribs,
out IntPtr surfaceConfig, int numConfigs, out int choosenConfig); out IntPtr surfaceConfig, int numConfigs, out int choosenConfig);
[GlEntryPoint("eglChooseConfig")] [GlEntryPoint("eglChooseConfig")]
public EglChooseConfig ChooseConfig { get; } public EglChooseConfig ChooseConfig { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglCreateContext(IntPtr display, IntPtr config, public delegate IntPtr EglCreateContext(IntPtr display, IntPtr config,
IntPtr share, int[] attrs); IntPtr share, int[] attrs);
[GlEntryPoint("eglCreateContext")] [GlEntryPoint("eglCreateContext")]
public EglCreateContext CreateContext { get; } public EglCreateContext CreateContext { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglDestroyContext(IntPtr display, IntPtr context); public delegate bool EglDestroyContext(IntPtr display, IntPtr context);
[GlEntryPoint("eglDestroyContext")] [GlEntryPoint("eglDestroyContext")]
public EglDestroyContext DestroyContext { get; } public EglDestroyContext DestroyContext { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglCreatePBufferSurface(IntPtr display, IntPtr config, int[] attrs); public delegate IntPtr EglCreatePBufferSurface(IntPtr display, IntPtr config, int[] attrs);
[GlEntryPoint("eglCreatePbufferSurface")] [GlEntryPoint("eglCreatePbufferSurface")]
public EglCreatePBufferSurface CreatePBufferSurface { get; } public EglCreatePBufferSurface CreatePBufferSurface { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglMakeCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr context); public delegate bool EglMakeCurrent(IntPtr display, IntPtr draw, IntPtr read, IntPtr context);
[GlEntryPoint("eglMakeCurrent")] [GlEntryPoint("eglMakeCurrent")]
public EglMakeCurrent MakeCurrent { get; } public EglMakeCurrent MakeCurrent { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglGetCurrentContext(); public delegate IntPtr EglGetCurrentContext();
[GlEntryPoint("eglGetCurrentContext")] [GlEntryPoint("eglGetCurrentContext")]
public EglGetCurrentContext GetCurrentContext { get; } public EglGetCurrentContext GetCurrentContext { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglGetCurrentDisplay(); public delegate IntPtr EglGetCurrentDisplay();
[GlEntryPoint("eglGetCurrentDisplay")] [GlEntryPoint("eglGetCurrentDisplay")]
public EglGetCurrentContext GetCurrentDisplay { get; } public EglGetCurrentContext GetCurrentDisplay { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglGetCurrentSurface(int readDraw); public delegate IntPtr EglGetCurrentSurface(int readDraw);
[GlEntryPoint("eglGetCurrentSurface")] [GlEntryPoint("eglGetCurrentSurface")]
public EglGetCurrentSurface GetCurrentSurface { get; } public EglGetCurrentSurface GetCurrentSurface { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void EglDisplaySurfaceVoidDelegate(IntPtr display, IntPtr surface); public delegate void EglDisplaySurfaceVoidDelegate(IntPtr display, IntPtr surface);
[GlEntryPoint("eglDestroySurface")] [GlEntryPoint("eglDestroySurface")]
public EglDisplaySurfaceVoidDelegate DestroySurface { get; } public EglDisplaySurfaceVoidDelegate DestroySurface { get; }
[GlEntryPoint("eglSwapBuffers")] [GlEntryPoint("eglSwapBuffers")]
public EglDisplaySurfaceVoidDelegate SwapBuffers { get; } public EglDisplaySurfaceVoidDelegate SwapBuffers { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr public delegate IntPtr
EglCreateWindowSurface(IntPtr display, IntPtr config, IntPtr window, int[] attrs); EglCreateWindowSurface(IntPtr display, IntPtr config, IntPtr window, int[] attrs);
[GlEntryPoint("eglCreateWindowSurface")] [GlEntryPoint("eglCreateWindowSurface")]
public EglCreateWindowSurface CreateWindowSurface { get; } public EglCreateWindowSurface CreateWindowSurface { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglGetConfigAttrib(IntPtr display, IntPtr config, int attr, out int rv); public delegate bool EglGetConfigAttrib(IntPtr display, IntPtr config, int attr, out int rv);
[GlEntryPoint("eglGetConfigAttrib")] [GlEntryPoint("eglGetConfigAttrib")]
public EglGetConfigAttrib GetConfigAttrib { get; } public EglGetConfigAttrib GetConfigAttrib { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglWaitGL(); public delegate bool EglWaitGL();
[GlEntryPoint("eglWaitGL")] [GlEntryPoint("eglWaitGL")]
public EglWaitGL WaitGL { get; } public EglWaitGL WaitGL { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglWaitClient(); public delegate bool EglWaitClient();
[GlEntryPoint("eglWaitClient")] [GlEntryPoint("eglWaitClient")]
public EglWaitGL WaitClient { get; } public EglWaitGL WaitClient { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglWaitNative(int engine); public delegate bool EglWaitNative(int engine);
[GlEntryPoint("eglWaitNative")] [GlEntryPoint("eglWaitNative")]
public EglWaitNative WaitNative { get; } public EglWaitNative WaitNative { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglQueryString(IntPtr display, int i); public delegate IntPtr EglQueryString(IntPtr display, int i);
[GlEntryPoint("eglQueryString")] [GlEntryPoint("eglQueryString")]
@ -145,17 +166,20 @@ namespace Avalonia.OpenGL.Egl
return null; return null;
return Marshal.PtrToStringAnsi(rv); return Marshal.PtrToStringAnsi(rv);
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr EglCreatePbufferFromClientBuffer(IntPtr display, int buftype, IntPtr buffer, IntPtr config, int[] attrib_list); public delegate IntPtr EglCreatePbufferFromClientBuffer(IntPtr display, int buftype, IntPtr buffer, IntPtr config, int[] attrib_list);
[GlEntryPoint("eglCreatePbufferFromClientBuffer")] [GlEntryPoint("eglCreatePbufferFromClientBuffer")]
public EglCreatePbufferFromClientBuffer CreatePbufferFromClientBuffer { get; } public EglCreatePbufferFromClientBuffer CreatePbufferFromClientBuffer { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglQueryDisplayAttribEXT(IntPtr display, int attr, out IntPtr res); public delegate bool EglQueryDisplayAttribEXT(IntPtr display, int attr, out IntPtr res);
[GlEntryPoint("eglQueryDisplayAttribEXT"), GlOptionalEntryPoint] [GlEntryPoint("eglQueryDisplayAttribEXT"), GlOptionalEntryPoint]
public EglQueryDisplayAttribEXT QueryDisplayAttribExt { get; } public EglQueryDisplayAttribEXT QueryDisplayAttribExt { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate bool EglQueryDeviceAttribEXT(IntPtr display, int attr, out IntPtr res); public delegate bool EglQueryDeviceAttribEXT(IntPtr display, int attr, out IntPtr res);
[GlEntryPoint("eglQueryDeviceAttribEXT"), GlOptionalEntryPoint] [GlEntryPoint("eglQueryDeviceAttribEXT"), GlOptionalEntryPoint]

5
src/Avalonia.OpenGL/GlBasicInfoInterface.cs

@ -15,9 +15,12 @@ namespace Avalonia.OpenGL
public GlBasicInfoInterface(Func<Utf8Buffer, IntPtr> nativeGetProcAddress) : base(nativeGetProcAddress, null) public GlBasicInfoInterface(Func<Utf8Buffer, IntPtr> nativeGetProcAddress) : base(nativeGetProcAddress, null)
{ {
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGetIntegerv(int name, out int rv); public delegate void GlGetIntegerv(int name, out int rv);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr GlGetString(int v); public delegate IntPtr GlGetString(int v);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr GlGetStringi(int v, int v1); public delegate IntPtr GlGetStringi(int v, int v1);
} }

112
src/Avalonia.OpenGL/GlInterface.cs

@ -60,32 +60,41 @@ namespace Avalonia.OpenGL
public T GetProcAddress<T>(string proc) => Marshal.GetDelegateForFunctionPointer<T>(GetProcAddress(proc)); public T GetProcAddress<T>(string proc) => Marshal.GetDelegateForFunctionPointer<T>(GetProcAddress(proc));
// ReSharper disable UnassignedGetOnlyAutoProperty // ReSharper disable UnassignedGetOnlyAutoProperty
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int GlGetError(); public delegate int GlGetError();
[GlEntryPoint("glGetError")] [GlEntryPoint("glGetError")]
public GlGetError GetError { get; } public GlGetError GetError { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlClearStencil(int s); public delegate void GlClearStencil(int s);
[GlEntryPoint("glClearStencil")] [GlEntryPoint("glClearStencil")]
public GlClearStencil ClearStencil { get; } public GlClearStencil ClearStencil { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlClearColor(float r, float g, float b, float a); public delegate void GlClearColor(float r, float g, float b, float a);
[GlEntryPoint("glClearColor")] [GlEntryPoint("glClearColor")]
public GlClearColor ClearColor { get; } public GlClearColor ClearColor { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlClear(int bits); public delegate void GlClear(int bits);
[GlEntryPoint("glClear")] [GlEntryPoint("glClear")]
public GlClear Clear { get; } public GlClear Clear { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlViewport(int x, int y, int width, int height); public delegate void GlViewport(int x, int y, int width, int height);
[GlEntryPoint("glViewport")] [GlEntryPoint("glViewport")]
public GlViewport Viewport { get; } public GlViewport Viewport { get; }
[GlEntryPoint("glFlush")] [GlEntryPoint("glFlush")]
public Action Flush { get; } public UnmanagedAction Flush { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void UnmanagedAction();
[GlEntryPoint("glFinish")] [GlEntryPoint("glFinish")]
public Action Finish { get; } public UnmanagedAction Finish { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate IntPtr GlGetString(int v); public delegate IntPtr GlGetString(int v);
[GlEntryPoint("glGetString")] [GlEntryPoint("glGetString")]
public GlGetString GetStringNative { get; } public GlGetString GetStringNative { get; }
@ -98,26 +107,32 @@ namespace Avalonia.OpenGL
return null; return null;
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGetIntegerv(int name, out int rv); public delegate void GlGetIntegerv(int name, out int rv);
[GlEntryPoint("glGetIntegerv")] [GlEntryPoint("glGetIntegerv")]
public GlGetIntegerv GetIntegerv { get; } public GlGetIntegerv GetIntegerv { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGenFramebuffers(int count, int[] res); public delegate void GlGenFramebuffers(int count, int[] res);
[GlEntryPoint("glGenFramebuffers")] [GlEntryPoint("glGenFramebuffers")]
public GlGenFramebuffers GenFramebuffers { get; } public GlGenFramebuffers GenFramebuffers { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDeleteFramebuffers(int count, int[] framebuffers); public delegate void GlDeleteFramebuffers(int count, int[] framebuffers);
[GlEntryPoint("glDeleteFramebuffers")] [GlEntryPoint("glDeleteFramebuffers")]
public GlDeleteFramebuffers DeleteFramebuffers { get; } public GlDeleteFramebuffers DeleteFramebuffers { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlBindFramebuffer(int target, int fb); public delegate void GlBindFramebuffer(int target, int fb);
[GlEntryPoint("glBindFramebuffer")] [GlEntryPoint("glBindFramebuffer")]
public GlBindFramebuffer BindFramebuffer { get; } public GlBindFramebuffer BindFramebuffer { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int GlCheckFramebufferStatus(int target); public delegate int GlCheckFramebufferStatus(int target);
[GlEntryPoint("glCheckFramebufferStatus")] [GlEntryPoint("glCheckFramebufferStatus")]
public GlCheckFramebufferStatus CheckFramebufferStatus { get; } public GlCheckFramebufferStatus CheckFramebufferStatus { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlBlitFramebuffer(int srcX0, public delegate void GlBlitFramebuffer(int srcX0,
int srcY0, int srcY0,
int srcX1, int srcX1,
@ -130,69 +145,84 @@ namespace Avalonia.OpenGL
int filter); int filter);
[GlMinVersionEntryPoint("glBlitFramebuffer", 3, 0), GlOptionalEntryPoint] [GlMinVersionEntryPoint("glBlitFramebuffer", 3, 0), GlOptionalEntryPoint]
public GlBlitFramebuffer BlitFramebuffer { get; } public GlBlitFramebuffer BlitFramebuffer { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGenRenderbuffers(int count, int[] res); public delegate void GlGenRenderbuffers(int count, int[] res);
[GlEntryPoint("glGenRenderbuffers")] [GlEntryPoint("glGenRenderbuffers")]
public GlGenRenderbuffers GenRenderbuffers { get; } public GlGenRenderbuffers GenRenderbuffers { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDeleteRenderbuffers(int count, int[] renderbuffers); public delegate void GlDeleteRenderbuffers(int count, int[] renderbuffers);
[GlEntryPoint("glDeleteRenderbuffers")] [GlEntryPoint("glDeleteRenderbuffers")]
public GlDeleteTextures DeleteRenderbuffers { get; } public GlDeleteTextures DeleteRenderbuffers { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlBindRenderbuffer(int target, int fb); public delegate void GlBindRenderbuffer(int target, int fb);
[GlEntryPoint("glBindRenderbuffer")] [GlEntryPoint("glBindRenderbuffer")]
public GlBindRenderbuffer BindRenderbuffer { get; } public GlBindRenderbuffer BindRenderbuffer { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlRenderbufferStorage(int target, int internalFormat, int width, int height); public delegate void GlRenderbufferStorage(int target, int internalFormat, int width, int height);
[GlEntryPoint("glRenderbufferStorage")] [GlEntryPoint("glRenderbufferStorage")]
public GlRenderbufferStorage RenderbufferStorage { get; } public GlRenderbufferStorage RenderbufferStorage { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlFramebufferRenderbuffer(int target, int attachment, public delegate void GlFramebufferRenderbuffer(int target, int attachment,
int renderbufferTarget, int renderbuffer); int renderbufferTarget, int renderbuffer);
[GlEntryPoint("glFramebufferRenderbuffer")] [GlEntryPoint("glFramebufferRenderbuffer")]
public GlFramebufferRenderbuffer FramebufferRenderbuffer { get; } public GlFramebufferRenderbuffer FramebufferRenderbuffer { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGenTextures(int count, int[] res); public delegate void GlGenTextures(int count, int[] res);
[GlEntryPoint("glGenTextures")] [GlEntryPoint("glGenTextures")]
public GlGenTextures GenTextures { get; } public GlGenTextures GenTextures { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlBindTexture(int target, int fb); public delegate void GlBindTexture(int target, int fb);
[GlEntryPoint("glBindTexture")] [GlEntryPoint("glBindTexture")]
public GlBindTexture BindTexture { get; } public GlBindTexture BindTexture { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlActiveTexture(int texture); public delegate void GlActiveTexture(int texture);
[GlEntryPoint("glActiveTexture")] [GlEntryPoint("glActiveTexture")]
public GlActiveTexture ActiveTexture { get; } public GlActiveTexture ActiveTexture { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDeleteTextures(int count, int[] textures); public delegate void GlDeleteTextures(int count, int[] textures);
[GlEntryPoint("glDeleteTextures")] [GlEntryPoint("glDeleteTextures")]
public GlDeleteTextures DeleteTextures { get; } public GlDeleteTextures DeleteTextures { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlTexImage2D(int target, int level, int internalFormat, int width, int height, int border, public delegate void GlTexImage2D(int target, int level, int internalFormat, int width, int height, int border,
int format, int type, IntPtr data); int format, int type, IntPtr data);
[GlEntryPoint("glTexImage2D")] [GlEntryPoint("glTexImage2D")]
public GlTexImage2D TexImage2D { get; } public GlTexImage2D TexImage2D { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, public delegate void GlCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y,
int width, int height); int width, int height);
[GlEntryPoint("glCopyTexSubImage2D")] [GlEntryPoint("glCopyTexSubImage2D")]
public GlCopyTexSubImage2D CopyTexSubImage2D { get; } public GlCopyTexSubImage2D CopyTexSubImage2D { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlTexParameteri(int target, int name, int value); public delegate void GlTexParameteri(int target, int name, int value);
[GlEntryPoint("glTexParameteri")] [GlEntryPoint("glTexParameteri")]
public GlTexParameteri TexParameteri { get; } public GlTexParameteri TexParameteri { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlFramebufferTexture2D(int target, int attachment, public delegate void GlFramebufferTexture2D(int target, int attachment,
int texTarget, int texture, int level); int texTarget, int texture, int level);
[GlEntryPoint("glFramebufferTexture2D")] [GlEntryPoint("glFramebufferTexture2D")]
public GlFramebufferTexture2D FramebufferTexture2D { get; } public GlFramebufferTexture2D FramebufferTexture2D { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int GlCreateShader(int shaderType); public delegate int GlCreateShader(int shaderType);
[GlEntryPoint("glCreateShader")] [GlEntryPoint("glCreateShader")]
public GlCreateShader CreateShader { get; } public GlCreateShader CreateShader { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlShaderSource(int shader, int count, IntPtr strings, IntPtr lengths); public delegate void GlShaderSource(int shader, int count, IntPtr strings, IntPtr lengths);
[GlEntryPoint("glShaderSource")] [GlEntryPoint("glShaderSource")]
public GlShaderSource ShaderSource { get; } public GlShaderSource ShaderSource { get; }
@ -207,14 +237,17 @@ namespace Avalonia.OpenGL
} }
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlCompileShader(int shader); public delegate void GlCompileShader(int shader);
[GlEntryPoint("glCompileShader")] [GlEntryPoint("glCompileShader")]
public GlCompileShader CompileShader { get; } public GlCompileShader CompileShader { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGetShaderiv(int shader, int name, int* parameters); public delegate void GlGetShaderiv(int shader, int name, int* parameters);
[GlEntryPoint("glGetShaderiv")] [GlEntryPoint("glGetShaderiv")]
public GlGetShaderiv GetShaderiv { get; } public GlGetShaderiv GetShaderiv { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGetShaderInfoLog(int shader, int maxLength, out int length, void*infoLog); public delegate void GlGetShaderInfoLog(int shader, int maxLength, out int length, void*infoLog);
[GlEntryPoint("glGetShaderInfoLog")] [GlEntryPoint("glGetShaderInfoLog")]
public GlGetShaderInfoLog GetShaderInfoLog { get; } public GlGetShaderInfoLog GetShaderInfoLog { get; }
@ -237,23 +270,28 @@ namespace Avalonia.OpenGL
GetShaderInfoLog(shader, logLength, out len, ptr); GetShaderInfoLog(shader, logLength, out len, ptr);
return Encoding.UTF8.GetString(logData,0, len); return Encoding.UTF8.GetString(logData,0, len);
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int GlCreateProgram(); public delegate int GlCreateProgram();
[GlEntryPoint("glCreateProgram")] [GlEntryPoint("glCreateProgram")]
public GlCreateProgram CreateProgram { get; } public GlCreateProgram CreateProgram { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlAttachShader(int program, int shader); public delegate void GlAttachShader(int program, int shader);
[GlEntryPoint("glAttachShader")] [GlEntryPoint("glAttachShader")]
public GlAttachShader AttachShader { get; } public GlAttachShader AttachShader { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlLinkProgram(int program); public delegate void GlLinkProgram(int program);
[GlEntryPoint("glLinkProgram")] [GlEntryPoint("glLinkProgram")]
public GlLinkProgram LinkProgram { get; } public GlLinkProgram LinkProgram { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGetProgramiv(int program, int name, int* parameters); public delegate void GlGetProgramiv(int program, int name, int* parameters);
[GlEntryPoint("glGetProgramiv")] [GlEntryPoint("glGetProgramiv")]
public GlGetProgramiv GetProgramiv { get; } public GlGetProgramiv GetProgramiv { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGetProgramInfoLog(int program, int maxLength, out int len, void* infoLog); public delegate void GlGetProgramInfoLog(int program, int maxLength, out int len, void* infoLog);
[GlEntryPoint("glGetProgramInfoLog")] [GlEntryPoint("glGetProgramInfoLog")]
public GlGetProgramInfoLog GetProgramInfoLog { get; } public GlGetProgramInfoLog GetProgramInfoLog { get; }
@ -274,6 +312,7 @@ namespace Avalonia.OpenGL
return Encoding.UTF8.GetString(logData,0, len); return Encoding.UTF8.GetString(logData,0, len);
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlBindAttribLocation(int program, int index, IntPtr name); public delegate void GlBindAttribLocation(int program, int index, IntPtr name);
[GlEntryPoint("glBindAttribLocation")] [GlEntryPoint("glBindAttribLocation")]
public GlBindAttribLocation BindAttribLocation { get; } public GlBindAttribLocation BindAttribLocation { get; }
@ -283,7 +322,8 @@ namespace Avalonia.OpenGL
using (var b = new Utf8Buffer(name)) using (var b = new Utf8Buffer(name))
BindAttribLocation(program, index, b.DangerousGetHandle()); BindAttribLocation(program, index, b.DangerousGetHandle());
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlGenBuffers(int len, int[] rv); public delegate void GlGenBuffers(int len, int[] rv);
[GlEntryPoint("glGenBuffers")] [GlEntryPoint("glGenBuffers")]
public GlGenBuffers GenBuffers { get; } public GlGenBuffers GenBuffers { get; }
@ -294,15 +334,18 @@ namespace Avalonia.OpenGL
GenBuffers(1, rv); GenBuffers(1, rv);
return rv[0]; return rv[0];
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlBindBuffer(int target, int buffer); public delegate void GlBindBuffer(int target, int buffer);
[GlEntryPoint("glBindBuffer")] [GlEntryPoint("glBindBuffer")]
public GlBindBuffer BindBuffer { get; } public GlBindBuffer BindBuffer { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlBufferData(int target, IntPtr size, IntPtr data, int usage); public delegate void GlBufferData(int target, IntPtr size, IntPtr data, int usage);
[GlEntryPoint("glBufferData")] [GlEntryPoint("glBufferData")]
public GlBufferData BufferData { get; } public GlBufferData BufferData { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int GlGetAttribLocation(int program, IntPtr name); public delegate int GlGetAttribLocation(int program, IntPtr name);
[GlEntryPoint("glGetAttribLocation")] [GlEntryPoint("glGetAttribLocation")]
public GlGetAttribLocation GetAttribLocation { get; } public GlGetAttribLocation GetAttribLocation { get; }
@ -313,27 +356,33 @@ namespace Avalonia.OpenGL
return GetAttribLocation(program, b.DangerousGetHandle()); return GetAttribLocation(program, b.DangerousGetHandle());
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlVertexAttribPointer(int index, int size, int type, public delegate void GlVertexAttribPointer(int index, int size, int type,
int normalized, int stride, IntPtr pointer); int normalized, int stride, IntPtr pointer);
[GlEntryPoint("glVertexAttribPointer")] [GlEntryPoint("glVertexAttribPointer")]
public GlVertexAttribPointer VertexAttribPointer { get; } public GlVertexAttribPointer VertexAttribPointer { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlEnableVertexAttribArray(int index); public delegate void GlEnableVertexAttribArray(int index);
[GlEntryPoint("glEnableVertexAttribArray")] [GlEntryPoint("glEnableVertexAttribArray")]
public GlEnableVertexAttribArray EnableVertexAttribArray { get; } public GlEnableVertexAttribArray EnableVertexAttribArray { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlUseProgram(int program); public delegate void GlUseProgram(int program);
[GlEntryPoint("glUseProgram")] [GlEntryPoint("glUseProgram")]
public GlUseProgram UseProgram { get; } public GlUseProgram UseProgram { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDrawArrays(int mode, int first, IntPtr count); public delegate void GlDrawArrays(int mode, int first, IntPtr count);
[GlEntryPoint("glDrawArrays")] [GlEntryPoint("glDrawArrays")]
public GlDrawArrays DrawArrays { get; } public GlDrawArrays DrawArrays { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDrawElements(int mode, int count, int type, IntPtr indices); public delegate void GlDrawElements(int mode, int count, int type, IntPtr indices);
[GlEntryPoint("glDrawElements")] [GlEntryPoint("glDrawElements")]
public GlDrawElements DrawElements { get; } public GlDrawElements DrawElements { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int GlGetUniformLocation(int program, IntPtr name); public delegate int GlGetUniformLocation(int program, IntPtr name);
[GlEntryPoint("glGetUniformLocation")] [GlEntryPoint("glGetUniformLocation")]
public GlGetUniformLocation GetUniformLocation { get; } public GlGetUniformLocation GetUniformLocation { get; }
@ -343,31 +392,42 @@ namespace Avalonia.OpenGL
using (var b = new Utf8Buffer(name)) using (var b = new Utf8Buffer(name))
return GetUniformLocation(program, b.DangerousGetHandle()); return GetUniformLocation(program, b.DangerousGetHandle());
} }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlUniform1f(int location, float falue); public delegate void GlUniform1f(int location, float falue);
[GlEntryPoint("glUniform1f")] [GlEntryPoint("glUniform1f")]
public GlUniform1f Uniform1f { get; } public GlUniform1f Uniform1f { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlUniformMatrix4fv(int location, int count, bool transpose, void* value); public delegate void GlUniformMatrix4fv(int location, int count, bool transpose, void* value);
[GlEntryPoint("glUniformMatrix4fv")] [GlEntryPoint("glUniformMatrix4fv")]
public GlUniformMatrix4fv UniformMatrix4fv { get; } public GlUniformMatrix4fv UniformMatrix4fv { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlEnable(int what); public delegate void GlEnable(int what);
[GlEntryPoint("glEnable")] [GlEntryPoint("glEnable")]
public GlEnable Enable { get; } public GlEnable Enable { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDeleteBuffers(int count, int[] buffers); public delegate void GlDeleteBuffers(int count, int[] buffers);
[GlEntryPoint("glDeleteBuffers")] [GlEntryPoint("glDeleteBuffers")]
public GlDeleteBuffers DeleteBuffers { get; } public GlDeleteBuffers DeleteBuffers { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDeleteProgram(int program); public delegate void GlDeleteProgram(int program);
[GlEntryPoint("glDeleteProgram")] [GlEntryPoint("glDeleteProgram")]
public GlDeleteProgram DeleteProgram { get; } public GlDeleteProgram DeleteProgram { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GlDeleteShader(int shader); public delegate void GlDeleteShader(int shader);
[GlEntryPoint("glDeleteShader")] [GlEntryPoint("glDeleteShader")]
public GlDeleteShader DeleteShader { get; } public GlDeleteShader DeleteShader { get; }
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void GLGetRenderbufferParameteriv(int target, int name, int[] value);
[GlEntryPoint("glGetRenderbufferParameteriv")]
public GLGetRenderbufferParameteriv GetRenderbufferParameteriv { get; }
// ReSharper restore UnassignedGetOnlyAutoProperty // ReSharper restore UnassignedGetOnlyAutoProperty
} }
} }

5
src/Skia/Avalonia.Skia/FontManagerImpl.cs

@ -132,7 +132,10 @@ namespace Avalonia.Skia
break; break;
} }
skTypeface ??= _skFontManager.MatchTypeface(SKTypeface.Default, fontStyle); // MatchTypeface can return "null" if matched typeface wasn't found for the style
// Fallback to the default typeface and styles instead.
skTypeface ??= _skFontManager.MatchTypeface(SKTypeface.Default, fontStyle)
?? SKTypeface.Default;
} }
else else
{ {

13
src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs

@ -69,6 +69,7 @@ namespace Avalonia.Skia
gl.GetIntegerv(GL_FRAMEBUFFER_BINDING, out var fb); gl.GetIntegerv(GL_FRAMEBUFFER_BINDING, out var fb);
var size = glSession.Size; var size = glSession.Size;
var colorType = SKColorType.Rgba8888;
var scaling = glSession.Scaling; var scaling = glSession.Scaling;
if (size.Width <= 0 || size.Height <= 0 || scaling < 0) if (size.Width <= 0 || size.Height <= 0 || scaling < 0)
{ {
@ -81,12 +82,16 @@ namespace Avalonia.Skia
{ {
_grContext.ResetContext(); _grContext.ResetContext();
var renderTarget = var samples = disp.SampleCount;
new GRBackendRenderTarget(size.Width, size.Height, disp.SampleCount, disp.StencilSize, var maxSamples = _grContext.GetMaxSurfaceSampleCount(colorType);
new GRGlFramebufferInfo((uint)fb, SKColorType.Rgba8888.ToGlSizedFormat())); if (samples > maxSamples)
samples = maxSamples;
var glInfo = new GRGlFramebufferInfo((uint)fb, colorType.ToGlSizedFormat());
var renderTarget = new GRBackendRenderTarget(size.Width, size.Height, samples, disp.StencilSize, glInfo);
var surface = SKSurface.Create(_grContext, renderTarget, var surface = SKSurface.Create(_grContext, renderTarget,
glSession.IsYFlipped ? GRSurfaceOrigin.TopLeft : GRSurfaceOrigin.BottomLeft, glSession.IsYFlipped ? GRSurfaceOrigin.TopLeft : GRSurfaceOrigin.BottomLeft,
SKColorType.Rgba8888); colorType);
success = true; success = true;

27
src/iOS/Avalonia.iOS/Avalonia.iOS.csproj

@ -1,17 +1,22 @@
<Project Sdk="MSBuild.Sdk.Extras"> <Project>
<Import Project="Sdk.props" Sdk="Xamarin.Legacy.Sdk" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>xamarin.ios10</TargetFramework> <TargetFrameworks>net6.0-ios</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <TargetFrameworks Condition="'$(MSBuildRuntimeType)' != 'Core'">$(TargetFrameworks);xamarin.ios10</TargetFrameworks>
<LangVersion>latest</LangVersion> <SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<MSBuildEnableWorkloadResolver>true</MSBuildEnableWorkloadResolver>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="OpenTK-1.0" /> <ProjectReference Include="..\..\Avalonia.Base\Avalonia.Base.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\packages\Avalonia\Avalonia.csproj" />
<ProjectReference Include="..\..\Avalonia.PlatformSupport\Avalonia.PlatformSupport.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
</ProjectReference>
<ProjectReference Include="..\..\Skia\Avalonia.Skia\Avalonia.Skia.csproj" /> <ProjectReference Include="..\..\Skia\Avalonia.Skia\Avalonia.Skia.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="Sdk.targets" Sdk="Xamarin.Legacy.Sdk" />
<!-- Workaround for https://github.com/dotnet/msbuild/issues/4584 -->
<Target Name="_RemoveNativeReferencesManifest" AfterTargets="BuiltProjectOutputGroup">
<ItemGroup>
<_BuiltProjectOutputGroupOutputIntermediate Remove="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" />
<BuiltProjectOutputGroupOutput Remove="$(ProjectDir)$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" />
</ItemGroup>
</Target>
</Project> </Project>

4
src/iOS/Avalonia.iOS/AvaloniaAppDelegate.cs

@ -8,7 +8,7 @@ namespace Avalonia.iOS
public class AvaloniaAppDelegate<TApp> : UIResponder, IUIApplicationDelegate public class AvaloniaAppDelegate<TApp> : UIResponder, IUIApplicationDelegate
where TApp : Application, new() where TApp : Application, new()
{ {
protected virtual AppBuilder CustomizeAppBuilder(AppBuilder builder) => builder; protected virtual AppBuilder CustomizeAppBuilder(AppBuilder builder) => builder.UseiOS();
[Export("window")] [Export("window")]
public UIWindow Window { get; set; } public UIWindow Window { get; set; }
@ -46,4 +46,4 @@ namespace Avalonia.iOS
} }
} }
} }
} }

14
src/iOS/Avalonia.iOS/Boilerplate/AppBuilder.cs

@ -1,14 +0,0 @@
using Avalonia.Controls;
using Avalonia.PlatformSupport;
namespace Avalonia
{
public class AppBuilder : AppBuilderBase<AppBuilder>
{
public AppBuilder() : base(new StandardRuntimePlatform(),
b => StandardRuntimePlatformServices.Register(b.ApplicationType.Assembly))
{
this.UseSkia().UseWindowingSubsystem(iOS.Platform.Register);
}
}
}

19
src/iOS/Avalonia.iOS/EaglDisplay.cs

@ -2,7 +2,6 @@ using System;
using System.Reactive.Disposables; using System.Reactive.Disposables;
using Avalonia.OpenGL; using Avalonia.OpenGL;
using OpenGLES; using OpenGLES;
using OpenTK.Graphics.ES30;
namespace Avalonia.iOS namespace Avalonia.iOS
{ {
@ -75,7 +74,21 @@ namespace Avalonia.iOS
public GlVersion Version { get; } = new GlVersion(GlProfileType.OpenGLES, 3, 0); public GlVersion Version { get; } = new GlVersion(GlProfileType.OpenGLES, 3, 0);
public GlInterface GlInterface { get; } public GlInterface GlInterface { get; }
public int SampleCount { get; } = 0; public int SampleCount
public int StencilSize { get; } = 9; {
get
{
GlInterface.GetIntegerv(GlConsts.GL_SAMPLES, out var samples);
return samples;
}
}
public int StencilSize
{
get
{
GlInterface.GetIntegerv(GlConsts.GL_STENCIL_BITS, out var stencil);
return stencil;
}
}
} }
} }

5
src/iOS/Avalonia.iOS/EaglLayerSurface.cs

@ -4,7 +4,6 @@ using System.Threading;
using Avalonia.OpenGL; using Avalonia.OpenGL;
using Avalonia.OpenGL.Surfaces; using Avalonia.OpenGL.Surfaces;
using CoreAnimation; using CoreAnimation;
using OpenTK.Graphics.ES30;
namespace Avalonia.iOS namespace Avalonia.iOS
{ {
@ -35,7 +34,7 @@ namespace Avalonia.iOS
public void Dispose() public void Dispose()
{ {
GL.Finish(); _ctx.GlInterface.Finish();
_fbo.Present(); _fbo.Present();
_restoreContext.Dispose(); _restoreContext.Dispose();
} }
@ -85,7 +84,7 @@ namespace Avalonia.iOS
var ctx = Platform.GlFeature.Context; var ctx = Platform.GlFeature.Context;
using (ctx.MakeCurrent()) using (ctx.MakeCurrent())
{ {
var fbo = new SizeSynchronizedLayerFbo(ctx.Context, _layer); var fbo = new SizeSynchronizedLayerFbo(ctx.Context, ctx.GlInterface, _layer);
if (!fbo.Sync()) if (!fbo.Sync())
throw new InvalidOperationException("Unable to create render target"); throw new InvalidOperationException("Unable to create render target");
return new RenderTarget(ctx, fbo); return new RenderTarget(ctx, fbo);

4
src/iOS/Avalonia.iOS/Extensions.cs

@ -12,7 +12,7 @@ namespace Avalonia.iOS
public static Point ToAvalonia(this CGPoint point) => new Point(point.X, point.Y); public static Point ToAvalonia(this CGPoint point) => new Point(point.X, point.Y);
static nfloat ColorComponent(byte c) => ((float) c) / 255; static float ColorComponent(byte c) => (float) c / 255;
public static UIColor ToUiColor(this Color color) => new UIColor( public static UIColor ToUiColor(this Color color) => new UIColor(
ColorComponent(color.R), ColorComponent(color.R),
@ -20,4 +20,4 @@ namespace Avalonia.iOS
ColorComponent(color.B), ColorComponent(color.B),
ColorComponent(color.A)); ColorComponent(color.A));
} }
} }

80
src/iOS/Avalonia.iOS/LayerFbo.cs

@ -1,64 +1,71 @@
using System; using System;
using Avalonia.OpenGL;
using CoreAnimation; using CoreAnimation;
using OpenGLES; using OpenGLES;
using OpenTK.Graphics.ES20;
namespace Avalonia.iOS namespace Avalonia.iOS
{ {
public class LayerFbo public class LayerFbo
{ {
private readonly EAGLContext _context; private readonly EAGLContext _context;
private readonly GlInterface _gl;
private readonly CAEAGLLayer _layer; private readonly CAEAGLLayer _layer;
private int _framebuffer; private int[] _framebuffer;
private int _renderbuffer; private int[] _renderbuffer;
private int _depthBuffer; private int[] _depthBuffer;
private bool _disposed; private bool _disposed;
private LayerFbo(EAGLContext context, CAEAGLLayer layer, in int framebuffer, in int renderbuffer, in int depthBuffer) private LayerFbo(EAGLContext context, GlInterface gl, CAEAGLLayer layer, int[] framebuffer, int[] renderbuffer, int[] depthBuffer)
{ {
_context = context; _context = context;
_gl = gl;
_layer = layer; _layer = layer;
_framebuffer = framebuffer; _framebuffer = framebuffer;
_renderbuffer = renderbuffer; _renderbuffer = renderbuffer;
_depthBuffer = depthBuffer; _depthBuffer = depthBuffer;
} }
public static LayerFbo TryCreate(EAGLContext context, CAEAGLLayer layer) public static LayerFbo TryCreate(EAGLContext context, GlInterface gl, CAEAGLLayer layer)
{ {
if (context != EAGLContext.CurrentContext) if (context != EAGLContext.CurrentContext)
return null; return null;
GL.GenFramebuffers(1, out int fb);
GL.GenRenderbuffers(1, out int rb); var fb = new int[2];
GL.BindFramebuffer(FramebufferTarget.Framebuffer, fb); var rb = new int[2];
GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, rb); var db = new int[2];
context.RenderBufferStorage((uint) All.Renderbuffer, layer);
GL.FramebufferRenderbuffer(FramebufferTarget.Framebuffer, FramebufferSlot.ColorAttachment0, RenderbufferTarget.Renderbuffer, rb); gl.GenRenderbuffers(1, rb);
gl.BindRenderbuffer(GlConsts.GL_RENDERBUFFER, rb[0]);
context.RenderBufferStorage(GlConsts.GL_RENDERBUFFER, layer);
gl.GenFramebuffers(1, fb);
gl.BindFramebuffer(GlConsts.GL_FRAMEBUFFER, fb[0]);
gl.FramebufferRenderbuffer(GlConsts.GL_FRAMEBUFFER, GlConsts.GL_COLOR_ATTACHMENT0, GlConsts.GL_RENDERBUFFER, rb[0]);
int w; int[] w = new int[1];
int h; int[] h = new int[1];
GL.GetRenderbufferParameter(RenderbufferTarget.Renderbuffer, RenderbufferParameterName.RenderbufferWidth, out w); gl.GetRenderbufferParameteriv(GlConsts.GL_RENDERBUFFER, GlConsts.GL_RENDERBUFFER_WIDTH, w);
GL.GetRenderbufferParameter(RenderbufferTarget.Renderbuffer, RenderbufferParameterName.RenderbufferHeight, out h); gl.GetRenderbufferParameteriv(GlConsts.GL_RENDERBUFFER, GlConsts.GL_RENDERBUFFER_HEIGHT, h);
GL.GenRenderbuffers(1, out int depthBuffer); gl.GenRenderbuffers(1, db);
//GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, depthBuffer); //GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, depthBuffer);
//GL.RenderbufferStorage(RenderbufferTarget.Renderbuffer, RenderbufferInternalFormat.DepthComponent16, w, h); //GL.RenderbufferStorage(RenderbufferTarget.Renderbuffer, RenderbufferInternalFormat.DepthComponent16, w, h);
GL.FramebufferRenderbuffer(FramebufferTarget.Framebuffer, FramebufferSlot.DepthAttachment, RenderbufferTarget.Renderbuffer, depthBuffer); gl.FramebufferRenderbuffer(GlConsts.GL_FRAMEBUFFER, GlConsts.GL_DEPTH_ATTACHMENT, GlConsts.GL_RENDERBUFFER, db[0]);
var frameBufferError = GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer); var frameBufferError = gl.CheckFramebufferStatus(GlConsts.GL_FRAMEBUFFER);
if(frameBufferError != FramebufferErrorCode.FramebufferComplete) if(frameBufferError != GlConsts.GL_FRAMEBUFFER_COMPLETE)
{ {
GL.DeleteFramebuffers(1, ref fb); gl.DeleteFramebuffers(1, fb);
GL.DeleteRenderbuffers(1, ref depthBuffer); gl.DeleteRenderbuffers(1, db);
GL.DeleteRenderbuffers(1, ref rb); gl.DeleteRenderbuffers(1, rb);
return null; return null;
} }
return new LayerFbo(context, layer, fb, rb, depthBuffer) return new LayerFbo(context, gl, layer, fb, rb, db)
{ {
Width = w, Width = w[0],
Height = h Height = h[0]
}; };
} }
@ -67,13 +74,13 @@ namespace Avalonia.iOS
public void Bind() public void Bind()
{ {
GL.BindFramebuffer(FramebufferTarget.Framebuffer, _framebuffer); _gl.BindFramebuffer(GlConsts.GL_FRAMEBUFFER, _framebuffer[0]);
} }
public void Present() public void Present()
{ {
Bind(); Bind();
var success = _context.PresentRenderBuffer((uint) All.Renderbuffer); var success = _context.PresentRenderBuffer(GlConsts.GL_RENDERBUFFER);
} }
public void Dispose() public void Dispose()
@ -81,9 +88,9 @@ namespace Avalonia.iOS
if(_disposed) if(_disposed)
return; return;
_disposed = true; _disposed = true;
GL.DeleteFramebuffers(1, ref _framebuffer); _gl.DeleteFramebuffers(1, _framebuffer);
GL.DeleteRenderbuffers(1, ref _depthBuffer); _gl.DeleteRenderbuffers(1, _depthBuffer);
GL.DeleteRenderbuffers(1, ref _renderbuffer); _gl.DeleteRenderbuffers(1, _renderbuffer);
if (_context != EAGLContext.CurrentContext) if (_context != EAGLContext.CurrentContext)
throw new InvalidOperationException("Associated EAGLContext is not current"); throw new InvalidOperationException("Associated EAGLContext is not current");
} }
@ -92,15 +99,16 @@ namespace Avalonia.iOS
class SizeSynchronizedLayerFbo : IDisposable class SizeSynchronizedLayerFbo : IDisposable
{ {
private readonly EAGLContext _context; private readonly EAGLContext _context;
private readonly GlInterface _gl;
private readonly CAEAGLLayer _layer; private readonly CAEAGLLayer _layer;
private LayerFbo _fbo; private LayerFbo _fbo;
private nfloat _oldLayerWidth, _oldLayerHeight, _oldLayerScale; private double _oldLayerWidth, _oldLayerHeight, _oldLayerScale;
public SizeSynchronizedLayerFbo(EAGLContext context, CAEAGLLayer layer) public SizeSynchronizedLayerFbo(EAGLContext context, GlInterface gl, CAEAGLLayer layer)
{ {
_context = context; _context = context;
_gl = gl;
_layer = layer; _layer = layer;
} }
public bool Sync() public bool Sync()
@ -112,7 +120,7 @@ namespace Avalonia.iOS
return true; return true;
_fbo?.Dispose(); _fbo?.Dispose();
_fbo = null; _fbo = null;
_fbo = LayerFbo.TryCreate(_context, _layer); _fbo = LayerFbo.TryCreate(_context, _gl, _layer);
_oldLayerWidth = _layer.Bounds.Width; _oldLayerWidth = _layer.Bounds.Width;
_oldLayerHeight = _layer.Bounds.Height; _oldLayerHeight = _layer.Bounds.Height;
_oldLayerScale = _layer.ContentsScale; _oldLayerScale = _layer.ContentsScale;
@ -140,4 +148,4 @@ namespace Avalonia.iOS
public int Height => _fbo?.Height ?? 0; public int Height => _fbo?.Height ?? 0;
public double Scaling => _oldLayerScale; public double Scaling => _oldLayerScale;
} }
} }

15
src/iOS/Avalonia.iOS/Platform.cs

@ -1,10 +1,25 @@
using System; using System;
using Avalonia.Controls;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Input.Platform; using Avalonia.Input.Platform;
using Avalonia.OpenGL; using Avalonia.OpenGL;
using Avalonia.Platform; using Avalonia.Platform;
using Avalonia.Rendering; using Avalonia.Rendering;
namespace Avalonia
{
public static class IOSApplicationExtensions
{
public static T UseiOS<T>(this T builder) where T : AppBuilderBase<T>, new()
{
return builder
.UseWindowingSubsystem(iOS.Platform.Register, "iOS")
.UseSkia();
}
}
}
namespace Avalonia.iOS namespace Avalonia.iOS
{ {
static class Platform static class Platform

Loading…
Cancel
Save