diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5d4e7c83e7..742f4e3323 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,14 +9,14 @@ on:
types: [ published ]
env:
- DotNetVersion: "6.0.100"
+ DotNetVersion: "6.0.202"
BuildConfiguration: "Release"
BuildParameters: "build/Build.proj /v:Minimal /consoleLoggerParameters:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}"
jobs:
build-windows:
- runs-on: windows-2019
+ runs-on: windows-2022
steps:
- uses: actions/checkout@v2
@@ -45,14 +45,14 @@ jobs:
with:
name: test
path: |
- artifacts/test/${{ env.BuildConfiguration }}/**/*
- !artifacts/test/${{ env.BuildConfiguration }}/**/*Mac64.*
+ artifacts/test/*/${{ env.BuildConfiguration }}/**/*
+ !artifacts/test/Eto.Test.Mac64/**/*
- name: Upload sample artifacts
uses: actions/upload-artifact@v2
with:
name: samples
- path: artifacts/samples/${{ env.BuildConfiguration }}/**/*
+ path: artifacts/samples/*/${{ env.BuildConfiguration }}/**/*
- name: Upload log files
if: ${{ failure() }}
@@ -111,6 +111,7 @@ jobs:
name: nuget
path: |
artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.XamMac2*.nupkg
+ artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.macOS*.nupkg
artifacts/nuget/${{ env.BuildConfiguration }}/Eto.Platform.Gtk2*.nupkg
- name: Upload test artifacts
@@ -118,9 +119,9 @@ jobs:
with:
name: test
path: |
- artifacts/test/${{ env.BuildConfiguration }}/**/*XamMac2.*
- artifacts/test/${{ env.BuildConfiguration }}/**/*Mac64.*
- artifacts/test/${{ env.BuildConfiguration }}/**/*Gtk2.*
+ artifacts/test/Eto.Test.Mac64/${{ env.BuildConfiguration }}/**/Eto.Test.Mac64.dmg
+ artifacts/test/Eto.Test.XamMac2/${{ env.BuildConfiguration }}/**/Eto.Test.XamMac2.app
+ artifacts/test/Eto.Test.macOS/${{ env.BuildConfiguration }}/*/Eto.Test.macOS.app
- name: Upload log files
if: ${{ failure() }}
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 7f5e7b004c..67f59d709a 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-mac64",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net6.0/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.Mac64/${config:var.configuration}/net6.0/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
// "targetArchitecture": "x86_64", // uncomment to test intel on M1
"args": [],
"console": "internalConsole",
@@ -19,7 +19,7 @@
"request": "launch",
"preLaunchTask": "build-mac64",
"program": ".",
- "runtimeExecutable": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net48/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
+ "runtimeExecutable": "${workspaceFolder}/artifacts/test/Eto.Test.Mac64/${config:var.configuration}/net48/Eto.Test.Mac64.app/Contents/MacOS/Eto.Test.Mac64",
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"console": "internalConsole",
@@ -27,11 +27,11 @@
"justMyCode": false
},
{
- "name": "Eto.Test.XamMac2",
+ "name": "Eto.Test.macOS",
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "build-xammac2",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net6.0-macos/Eto.Test.XamMac2.app/Contents/MacOS/Eto.Test.XamMac2",
+ "preLaunchTask": "build-macos",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.macOS/${config:var.configuration}/net6.0-macos/Eto.Test.macOS.app/Contents/MacOS/Eto.Test.macOS",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
@@ -43,7 +43,7 @@
"request": "launch",
"preLaunchTask": "build-xammac2",
"program": ".",
- "runtimeExecutable": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net48/Eto.Test.XamMac2.app/Contents/MacOS/Eto.Test.XamMac2",
+ "runtimeExecutable": "${workspaceFolder}/artifacts/test/Eto.Test.XamMac2/${config:var.configuration}/net48/Eto.Test.XamMac2.app/Contents/MacOS/Eto.Test.XamMac2",
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"console": "internalConsole",
@@ -55,7 +55,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-gtk",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net6.0/Eto.Test.Gtk.dll",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.Gtk/${config:var.configuration}/net6.0/Eto.Test.Gtk.dll",
"args": [],
"osx": {
"env": {
@@ -72,7 +72,7 @@
"type": "mono",
"request": "launch",
"preLaunchTask": "build-gtk",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net48/Eto.Test.Gtk.exe",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.Gtk/${config:var.configuration}/net48/Eto.Test.Gtk.exe",
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"osx": {
@@ -89,7 +89,7 @@
"type": "mono",
"request": "launch",
"preLaunchTask": "build-gtk2",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net48/Eto.Test.Gtk2.exe",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.Gtk2/${config:var.configuration}/net48/Eto.Test.Gtk2.exe",
"passDebugOptionsViaEnvironmentVariable": true,
"args": [],
"console": "internalConsole",
@@ -101,7 +101,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-wpf",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net6.0-windows/Eto.Test.Wpf.exe",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.Wpf/${config:var.configuration}/net6.0-windows/Eto.Test.Wpf.exe",
"targetArchitecture": "x86_64",
"args": [],
"console": "internalConsole",
@@ -113,7 +113,7 @@
"type": "clr",
"request": "launch",
"preLaunchTask": "build-wpf",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net48/Eto.Test.Wpf.exe",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.Wpf/${config:var.configuration}/net48/Eto.Test.Wpf.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
@@ -124,7 +124,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-winforms",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net6.0-windows/Eto.Test.WinForms.exe",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.WinForms/${config:var.configuration}/net6.0-windows/Eto.Test.WinForms.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
@@ -135,7 +135,7 @@
"type": "clr",
"request": "launch",
"preLaunchTask": "build-winforms",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net48/Eto.Test.WinForms.exe",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.WinForms/${config:var.configuration}/net48/Eto.Test.WinForms.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
@@ -146,7 +146,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-direct2d",
- "program": "${workspaceFolder}/artifacts/test/${config:var.configuration}/net6.0-windows/Eto.Test.Direct2D.exe",
+ "program": "${workspaceFolder}/artifacts/test/Eto.Test.Direct2D/${config:var.configuration}/net6.0-windows/Eto.Test.Direct2D.exe",
"args": [],
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index af35f34ad2..83a5701650 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -3,7 +3,7 @@
"tasks": [
{
"label": "build",
- "command": "dotnet build ${config:var.buildProperties} /p:Configuration=${config:var.configuration} ${workspaceFolder}/build/Build.proj",
+ "command": "dotnet build ${config:var.buildProperties} /p:Configuration=${input:configuration} ${workspaceFolder}/build/Build.proj",
"type": "shell",
"problemMatcher": "$msCompile",
"group": {
@@ -88,6 +88,16 @@
"clear": true
}
},
+ {
+ "label": "build-macos",
+ "command": "dotnet build ${config:var.buildProperties} /p:Configuration=${config:var.configuration} ${workspaceFolder}/test/Eto.Test.Mac/Eto.Test.macOS.csproj",
+ "type": "shell",
+ "group": "build",
+ "problemMatcher": "$msCompile",
+ "presentation": {
+ "clear": true
+ }
+ },
{
"label": "build-xammac2",
"command": "dotnet build ${config:var.buildProperties} /p:Configuration=${config:var.configuration} ${workspaceFolder}/test/Eto.Test.Mac/Eto.Test.XamMac2.csproj",
@@ -177,6 +187,15 @@
"Yes"
]
},
+ {
+ "type": "pickString",
+ "id": "configuration",
+ "description": "Build Configuration",
+ "options": [
+ "Debug",
+ "Release"
+ ]
+ },
{
"type": "promptString",
"id": "version",
diff --git a/build/Build.proj b/build/Build.proj
index 1d85d16ff5..71f8d9b8c3 100644
--- a/build/Build.proj
+++ b/build/Build.proj
@@ -268,10 +268,10 @@
-
-
-
-
+
+
+
+
diff --git a/lib/monomac b/lib/monomac
index bf33732843..e574f586dc 160000
--- a/lib/monomac
+++ b/lib/monomac
@@ -1 +1 @@
-Subproject commit bf337328430b062ed0adc2010540fe3b72e2803f
+Subproject commit e574f586dcce19cab2fb34e34d61c29bc42c5bdb
diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props
index 923fe25e88..3887e5d85e 100644
--- a/samples/Directory.Build.props
+++ b/samples/Directory.Build.props
@@ -3,6 +3,6 @@
false
- $(BasePath)artifacts\samples\
+ $(BasePath)artifacts\samples\$(MSBuildProjectName)\
\ No newline at end of file
diff --git a/samples/XamarinMac/EmbedEtoInXamarinMac/EmbedEtoInXamarinMac.csproj b/samples/XamarinMac/EmbedEtoInXamarinMac/EmbedEtoInXamarinMac.csproj
index 0730dd4bf4..a00b99e943 100644
--- a/samples/XamarinMac/EmbedEtoInXamarinMac/EmbedEtoInXamarinMac.csproj
+++ b/samples/XamarinMac/EmbedEtoInXamarinMac/EmbedEtoInXamarinMac.csproj
@@ -3,7 +3,7 @@
True
Exe
- net48
+ xamarinmac20
False
False
Mac Developer
@@ -11,6 +11,7 @@
--nowarn:2006 --nowarn:5220
10.14
False
+ SdkOnly
diff --git a/samples/XamarinMac/EmbedXamarinMacInEto/EmbedXamarinMacInEto.csproj b/samples/XamarinMac/EmbedXamarinMacInEto/EmbedXamarinMacInEto.csproj
index cdd02c65d8..8469fab1fa 100644
--- a/samples/XamarinMac/EmbedXamarinMacInEto/EmbedXamarinMacInEto.csproj
+++ b/samples/XamarinMac/EmbedXamarinMacInEto/EmbedXamarinMacInEto.csproj
@@ -3,7 +3,7 @@
True
Exe
- net48
+ xamarinmac20
False
False
Mac Developer
@@ -11,6 +11,7 @@
--nowarn:2006 --nowarn:5220
10.14
False
+ SdkOnly
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 40c281af25..4a3bb4f4ed 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -2,6 +2,6 @@
- $(BasePath)artifacts\core\
+ $(BasePath)artifacts\core\$(MSBuildProjectName)\
\ No newline at end of file
diff --git a/src/Eto.Core.sln b/src/Eto.Core.sln
index 8cf1d79fd5..70ff74d7f4 100644
--- a/src/Eto.Core.sln
+++ b/src/Eto.Core.sln
@@ -35,14 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "monomac", "monomac", "{E77D
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "generator", "..\lib\monomac\src\generator.csproj", "{EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eto.macOS", "Eto.Mac\Eto.macOS.csproj", "{B3AB773A-BCF6-4679-AC13-E2879F61DF33}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eto.Test.macOS", "..\test\Eto.Test.Mac\Eto.Test.macOS.csproj", "{8A002565-996A-45F9-8D74-89E8D272717F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -50,184 +50,72 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Debug|x64.ActiveCfg = Debug|x64
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Debug|x64.Build.0 = Debug|x64
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Debug|x86.ActiveCfg = Debug|x86
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Debug|x86.Build.0 = Debug|x86
{FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Release|Any CPU.Build.0 = Release|Any CPU
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Release|x64.ActiveCfg = Release|x64
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Release|x64.Build.0 = Release|x64
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Release|x86.ActiveCfg = Release|x86
- {FE25EE53-3993-4463-AB8E-CCDCE5E3BDC2}.Release|x86.Build.0 = Release|x86
{503A9238-E2D0-4849-8B62-4CEFB799A252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{503A9238-E2D0-4849-8B62-4CEFB799A252}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Debug|x64.ActiveCfg = Debug|x64
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Debug|x64.Build.0 = Debug|x64
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Debug|x86.ActiveCfg = Debug|x86
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Debug|x86.Build.0 = Debug|x86
{503A9238-E2D0-4849-8B62-4CEFB799A252}.Release|Any CPU.ActiveCfg = Release|Any CPU
{503A9238-E2D0-4849-8B62-4CEFB799A252}.Release|Any CPU.Build.0 = Release|Any CPU
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Release|x64.ActiveCfg = Release|x64
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Release|x64.Build.0 = Release|x64
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Release|x86.ActiveCfg = Release|x86
- {503A9238-E2D0-4849-8B62-4CEFB799A252}.Release|x86.Build.0 = Release|x86
{5830F6AC-68BE-4444-9160-0739F36BD761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5830F6AC-68BE-4444-9160-0739F36BD761}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Debug|x64.ActiveCfg = Debug|x64
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Debug|x64.Build.0 = Debug|x64
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Debug|x86.ActiveCfg = Debug|x86
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Debug|x86.Build.0 = Debug|x86
{5830F6AC-68BE-4444-9160-0739F36BD761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5830F6AC-68BE-4444-9160-0739F36BD761}.Release|Any CPU.Build.0 = Release|Any CPU
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Release|x64.ActiveCfg = Release|x64
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Release|x64.Build.0 = Release|x64
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Release|x86.ActiveCfg = Release|x86
- {5830F6AC-68BE-4444-9160-0739F36BD761}.Release|x86.Build.0 = Release|x86
{509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Debug|x64.ActiveCfg = Debug|x64
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Debug|x64.Build.0 = Debug|x64
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Debug|x86.ActiveCfg = Debug|x86
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Debug|x86.Build.0 = Debug|x86
{509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Release|Any CPU.Build.0 = Release|Any CPU
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Release|x64.ActiveCfg = Release|x64
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Release|x64.Build.0 = Release|x64
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Release|x86.ActiveCfg = Release|x86
- {509D49DE-8BDD-43D2-B5D9-EDD390FDA8F3}.Release|x86.Build.0 = Release|x86
{0C792DAE-8855-44CF-87F9-CE7385E3F141}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C792DAE-8855-44CF-87F9-CE7385E3F141}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Debug|x64.ActiveCfg = Debug|x64
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Debug|x64.Build.0 = Debug|x64
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Debug|x86.ActiveCfg = Debug|x86
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Debug|x86.Build.0 = Debug|x86
{0C792DAE-8855-44CF-87F9-CE7385E3F141}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C792DAE-8855-44CF-87F9-CE7385E3F141}.Release|Any CPU.Build.0 = Release|Any CPU
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Release|x64.ActiveCfg = Release|x64
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Release|x64.Build.0 = Release|x64
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Release|x86.ActiveCfg = Release|x86
- {0C792DAE-8855-44CF-87F9-CE7385E3F141}.Release|x86.Build.0 = Release|x86
{9122333E-56EF-4A18-BBC4-0100589EA49C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9122333E-56EF-4A18-BBC4-0100589EA49C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Debug|x64.ActiveCfg = Debug|x64
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Debug|x64.Build.0 = Debug|x64
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Debug|x86.ActiveCfg = Debug|x86
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Debug|x86.Build.0 = Debug|x86
{9122333E-56EF-4A18-BBC4-0100589EA49C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9122333E-56EF-4A18-BBC4-0100589EA49C}.Release|Any CPU.Build.0 = Release|Any CPU
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Release|x64.ActiveCfg = Release|x64
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Release|x64.Build.0 = Release|x64
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Release|x86.ActiveCfg = Release|x86
- {9122333E-56EF-4A18-BBC4-0100589EA49C}.Release|x86.Build.0 = Release|x86
{675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Debug|x64.ActiveCfg = Debug|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Debug|x64.Build.0 = Debug|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Debug|x86.ActiveCfg = Debug|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Debug|x86.Build.0 = Debug|Any CPU
{675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Release|Any CPU.Build.0 = Release|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Release|x64.ActiveCfg = Release|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Release|x64.Build.0 = Release|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Release|x86.ActiveCfg = Release|Any CPU
- {675E4CC9-41B2-45A6-925D-4E21DD23FAFB}.Release|x86.Build.0 = Release|Any CPU
{BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Debug|x64.ActiveCfg = Debug|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Debug|x64.Build.0 = Debug|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Debug|x86.Build.0 = Debug|Any CPU
{BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Release|Any CPU.Build.0 = Release|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Release|x64.ActiveCfg = Release|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Release|x64.Build.0 = Release|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Release|x86.ActiveCfg = Release|Any CPU
- {BC4CAE43-F35A-47FD-9284-1D76502A4F2B}.Release|x86.Build.0 = Release|Any CPU
{4BF1720D-10C5-468E-A419-95EE76BF3C98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BF1720D-10C5-468E-A419-95EE76BF3C98}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Debug|x64.ActiveCfg = Debug|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Debug|x64.Build.0 = Debug|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Debug|x86.ActiveCfg = Debug|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Debug|x86.Build.0 = Debug|Any CPU
{4BF1720D-10C5-468E-A419-95EE76BF3C98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BF1720D-10C5-468E-A419-95EE76BF3C98}.Release|Any CPU.Build.0 = Release|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Release|x64.ActiveCfg = Release|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Release|x64.Build.0 = Release|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Release|x86.ActiveCfg = Release|Any CPU
- {4BF1720D-10C5-468E-A419-95EE76BF3C98}.Release|x86.Build.0 = Release|Any CPU
{AE451719-9FDC-4C53-A34A-2788D564A1E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE451719-9FDC-4C53-A34A-2788D564A1E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Debug|x64.ActiveCfg = Debug|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Debug|x64.Build.0 = Debug|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Debug|x86.Build.0 = Debug|Any CPU
{AE451719-9FDC-4C53-A34A-2788D564A1E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE451719-9FDC-4C53-A34A-2788D564A1E3}.Release|Any CPU.Build.0 = Release|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Release|x64.ActiveCfg = Release|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Release|x64.Build.0 = Release|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Release|x86.ActiveCfg = Release|Any CPU
- {AE451719-9FDC-4C53-A34A-2788D564A1E3}.Release|x86.Build.0 = Release|Any CPU
{0B436044-9251-4922-BC41-51365EBBD771}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B436044-9251-4922-BC41-51365EBBD771}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Debug|x64.ActiveCfg = Debug|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Debug|x64.Build.0 = Debug|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Debug|x86.ActiveCfg = Debug|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Debug|x86.Build.0 = Debug|Any CPU
{0B436044-9251-4922-BC41-51365EBBD771}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B436044-9251-4922-BC41-51365EBBD771}.Release|Any CPU.Build.0 = Release|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Release|x64.ActiveCfg = Release|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Release|x64.Build.0 = Release|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Release|x86.ActiveCfg = Release|Any CPU
- {0B436044-9251-4922-BC41-51365EBBD771}.Release|x86.Build.0 = Release|Any CPU
{FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Debug|x64.ActiveCfg = Debug|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Debug|x64.Build.0 = Debug|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Debug|x86.ActiveCfg = Debug|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Debug|x86.Build.0 = Debug|Any CPU
{FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Release|Any CPU.Build.0 = Release|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Release|x64.ActiveCfg = Release|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Release|x64.Build.0 = Release|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Release|x86.ActiveCfg = Release|Any CPU
- {FD8900C4-1EB6-4D8A-A91C-32047D27A430}.Release|x86.Build.0 = Release|Any CPU
{9114D372-999B-4894-9460-8A0FF02131E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9114D372-999B-4894-9460-8A0FF02131E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Debug|x64.ActiveCfg = Debug|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Debug|x64.Build.0 = Debug|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Debug|x86.ActiveCfg = Debug|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Debug|x86.Build.0 = Debug|Any CPU
{9114D372-999B-4894-9460-8A0FF02131E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9114D372-999B-4894-9460-8A0FF02131E1}.Release|Any CPU.Build.0 = Release|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Release|x64.ActiveCfg = Release|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Release|x64.Build.0 = Release|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Release|x86.ActiveCfg = Release|Any CPU
- {9114D372-999B-4894-9460-8A0FF02131E1}.Release|x86.Build.0 = Release|Any CPU
{549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Debug|x64.ActiveCfg = Debug|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Debug|x64.Build.0 = Debug|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Debug|x86.ActiveCfg = Debug|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Debug|x86.Build.0 = Debug|Any CPU
{549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Release|Any CPU.Build.0 = Release|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Release|x64.ActiveCfg = Release|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Release|x64.Build.0 = Release|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Release|x86.ActiveCfg = Release|Any CPU
- {549BAAA1-9355-41D7-9755-BF30CB92E4FA}.Release|x86.Build.0 = Release|Any CPU
{EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Debug|x64.ActiveCfg = Debug|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Debug|x64.Build.0 = Debug|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Debug|x86.Build.0 = Debug|Any CPU
{EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Release|Any CPU.Build.0 = Release|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Release|x64.ActiveCfg = Release|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Release|x64.Build.0 = Release|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Release|x86.ActiveCfg = Release|Any CPU
- {EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F}.Release|x86.Build.0 = Release|Any CPU
+ {B3AB773A-BCF6-4679-AC13-E2879F61DF33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B3AB773A-BCF6-4679-AC13-E2879F61DF33}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B3AB773A-BCF6-4679-AC13-E2879F61DF33}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B3AB773A-BCF6-4679-AC13-E2879F61DF33}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8A002565-996A-45F9-8D74-89E8D272717F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8A002565-996A-45F9-8D74-89E8D272717F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8A002565-996A-45F9-8D74-89E8D272717F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8A002565-996A-45F9-8D74-89E8D272717F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EE5D4296-DFD7-4D1B-B9F9-C43AD9ED4F6F} = {E77D6350-0CCF-11EB-A5F5-69BE9D4F31C9}
diff --git a/src/Eto.Forms.Templates/content/App-CSharp/.template.config/template.json b/src/Eto.Forms.Templates/content/App-CSharp/.template.config/template.json
index f4114c5793..51684cb5fb 100755
--- a/src/Eto.Forms.Templates/content/App-CSharp/.template.config/template.json
+++ b/src/Eto.Forms.Templates/content/App-CSharp/.template.config/template.json
@@ -72,8 +72,8 @@
"type": "parameter",
"description": "Specify the framework(s) to support",
"dataType": "choice",
- "defaultValue": "net5.0",
- "replaces": "net5.0",
+ "defaultValue": "net6.0",
+ "replaces": "net6.0",
"choices": [
{
"choice": "net6.0",
diff --git a/src/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/EtoApp.1.csproj b/src/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/EtoApp.1.csproj
index e099d73833..c85529d1ae 100755
--- a/src/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/EtoApp.1.csproj
+++ b/src/Eto.Forms.Templates/content/App-CSharp/EtoApp.1/EtoApp.1.csproj
@@ -8,7 +8,7 @@
-->
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1
diff --git a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.csproj b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.csproj
index 7a935b314f..0685f0a313 100755
--- a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.csproj
+++ b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.csproj
@@ -2,7 +2,7 @@
WinExe
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1.Gtk
diff --git a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.csproj b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.csproj
index b1ce9b6da1..9ec19a21d6 100755
--- a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.csproj
+++ b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.csproj
@@ -2,11 +2,11 @@
Exe
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1.Mac
- osx-x64
+ osx-x64;osx-arm64
diff --git a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.csproj b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.csproj
index 8019b36fc9..dd781a37b2 100755
--- a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.csproj
+++ b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.csproj
@@ -2,8 +2,8 @@
WinExe
- net5.0-windows
- net5.0
+ net6.0-windows
+ net6.0
TargetFrameworkOverride-windows
TargetFrameworkOverride
EtoApp._1.WinForms
diff --git a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.csproj b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.csproj
index 8bbca56e09..d6a3d7467d 100755
--- a/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.csproj
+++ b/src/Eto.Forms.Templates/content/App-CSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.csproj
@@ -2,8 +2,8 @@
WinExe
- net5.0-windows
- net5.0
+ net6.0-windows
+ net6.0
TargetFrameworkOverride-windows
TargetFrameworkOverride
EtoApp._1.Wpf
diff --git a/src/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json b/src/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json
index b30e4c481e..6b0450e207 100755
--- a/src/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json
+++ b/src/Eto.Forms.Templates/content/App-FSharp/.template.config/template.json
@@ -72,8 +72,8 @@
"type": "parameter",
"description": "Specify the framework(s) to support",
"dataType": "choice",
- "defaultValue": "net5.0",
- "replaces": "net5.0",
+ "defaultValue": "net6.0",
+ "replaces": "net6.0",
"choices": [
{
"choice": "net6.0",
diff --git a/src/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/EtoApp.1.fsproj b/src/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/EtoApp.1.fsproj
index 52fe1cdd9d..f37f14dfa4 100644
--- a/src/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/EtoApp.1.fsproj
+++ b/src/Eto.Forms.Templates/content/App-FSharp/EtoApp.1/EtoApp.1.fsproj
@@ -8,7 +8,7 @@
-->
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1
diff --git a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj
index 3ebc633f87..71c3c80257 100755
--- a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj
+++ b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.fsproj
@@ -2,7 +2,7 @@
WinExe
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1.Gtk
diff --git a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.fsproj b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.fsproj
index 05fc4e04cd..41af683a6c 100755
--- a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.fsproj
+++ b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Mac/EtoApp.1.Mac.fsproj
@@ -2,11 +2,11 @@
Exe
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1.Mac
- osx-x64
+ osx-x64;osx-arm64
diff --git a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj
index f88dd75037..ba89bc69f6 100755
--- a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj
+++ b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.fsproj
@@ -2,8 +2,8 @@
WinExe
- net5.0-windows
- net5.0
+ net6.0-windows
+ net6.0
TargetFrameworkOverride-windows
TargetFrameworkOverride
EtoApp._1.WinForms
diff --git a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj
index 48a21fc48b..d90de0e87e 100755
--- a/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj
+++ b/src/Eto.Forms.Templates/content/App-FSharp/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.fsproj
@@ -2,8 +2,8 @@
WinExe
- net5.0-windows
- net5.0
+ net6.0-windows
+ net6.0
TargetFrameworkOverride-windows
TargetFrameworkOverride
EtoApp._1.Wpf
diff --git a/src/Eto.Forms.Templates/content/App-VisualBasic/.template.config/template.json b/src/Eto.Forms.Templates/content/App-VisualBasic/.template.config/template.json
index 5ab15ac0a8..bdabaae422 100755
--- a/src/Eto.Forms.Templates/content/App-VisualBasic/.template.config/template.json
+++ b/src/Eto.Forms.Templates/content/App-VisualBasic/.template.config/template.json
@@ -72,8 +72,8 @@
"type": "parameter",
"description": "Specify the framework(s) to support",
"dataType": "choice",
- "defaultValue": "net5.0",
- "replaces": "net5.0",
+ "defaultValue": "net6.0",
+ "replaces": "net6.0",
"choices": [
{
"choice": "net6.0",
diff --git a/src/Eto.Forms.Templates/content/App-VisualBasic/EtoApp.1/EtoApp.1.vbproj b/src/Eto.Forms.Templates/content/App-VisualBasic/EtoApp.1/EtoApp.1.vbproj
index e099d73833..c85529d1ae 100755
--- a/src/Eto.Forms.Templates/content/App-VisualBasic/EtoApp.1/EtoApp.1.vbproj
+++ b/src/Eto.Forms.Templates/content/App-VisualBasic/EtoApp.1/EtoApp.1.vbproj
@@ -8,7 +8,7 @@
-->
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1
diff --git a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.vbproj b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.vbproj
index ae95f72301..5dd39124ae 100755
--- a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.vbproj
+++ b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Gtk/EtoApp.1.Gtk.vbproj
@@ -2,7 +2,7 @@
WinExe
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1
diff --git a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Mac/EtoApp.1.Mac.vbproj b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Mac/EtoApp.1.Mac.vbproj
index 7a42b579e2..7641e652ac 100755
--- a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Mac/EtoApp.1.Mac.vbproj
+++ b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Mac/EtoApp.1.Mac.vbproj
@@ -2,11 +2,11 @@
Exe
- net5.0
+ net6.0
TargetFrameworkOverride
EtoApp._1
- osx-x64
+ osx-x64;osx-arm64
diff --git a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.vbproj b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.vbproj
index a4fde130e5..6c228c7db0 100755
--- a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.vbproj
+++ b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.WinForms/EtoApp.1.WinForms.vbproj
@@ -2,8 +2,8 @@
WinExe
- net5.0-windows
- net5.0
+ net6.0-windows
+ net6.0
TargetFrameworkOverride-windows
TargetFrameworkOverride
EtoApp._1
diff --git a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.vbproj b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.vbproj
index d6d5f45baa..fb77367d3f 100755
--- a/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.vbproj
+++ b/src/Eto.Forms.Templates/content/App-VisualBasic/Separate/EtoApp.1.Wpf/EtoApp.1.Wpf.vbproj
@@ -2,8 +2,8 @@
WinExe
- net5.0-windows
- net5.0
+ net6.0-windows
+ net6.0
TargetFrameworkOverride-windows
TargetFrameworkOverride
EtoApp._1
diff --git a/src/Eto.Mac/AppDelegate.cs b/src/Eto.Mac/AppDelegate.cs
index f9eaca5d85..bc595f5b37 100644
--- a/src/Eto.Mac/AppDelegate.cs
+++ b/src/Eto.Mac/AppDelegate.cs
@@ -2,35 +2,7 @@
using System.ComponentModel;
using Eto.Mac.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac
{
diff --git a/src/Eto.Mac/AsyncQueue.cs b/src/Eto.Mac/AsyncQueue.cs
index 30336a47a5..73b13e5b90 100644
--- a/src/Eto.Mac/AsyncQueue.cs
+++ b/src/Eto.Mac/AsyncQueue.cs
@@ -2,12 +2,6 @@
using System.Collections.Generic;
using Eto.Forms;
using Eto.Mac.Forms;
-#if XAMMAC2
-using AppKit;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-#endif
namespace Eto.Mac
{
@@ -64,11 +58,7 @@ public static void Add(IQueueAction action)
if (_actionQueue.Count == 1)
{
// first one added, schedule a layout!
-#if XAMMAC1
- NSApplication.SharedApplication.BeginInvokeOnMainThread(new NSAction(FlushQueue));
-#else
NSApplication.SharedApplication.BeginInvokeOnMainThread(FlushQueue);
-#endif
}
}
diff --git a/src/Eto.Mac/CGConversions.cs b/src/Eto.Mac/CGConversions.cs
index 5993a0014f..851cd34063 100644
--- a/src/Eto.Mac/CGConversions.cs
+++ b/src/Eto.Mac/CGConversions.cs
@@ -1,34 +1,6 @@
using System;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
#if OSX
using Eto.Mac.Drawing;
diff --git a/src/Eto.Mac/ColorizeView.cs b/src/Eto.Mac/ColorizeView.cs
index 5e953874be..c8a179c88e 100644
--- a/src/Eto.Mac/ColorizeView.cs
+++ b/src/Eto.Mac/ColorizeView.cs
@@ -1,33 +1,5 @@
using System;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac
{
@@ -84,17 +56,15 @@ public void End()
var cgImage = _image.CGImage;
var ciImage = CIImage.FromCGImage(cgImage);
-#pragma warning disable CS0618 // Image => InputImage in Xamarin.Mac 6.6
var filter2 = new CIColorControls();
filter2.SetDefaults();
- filter2.Image = ciImage;
+ filter2.InputImage = ciImage;
filter2.Saturation = 0.0f;
ciImage = (CIImage)filter2.ValueForKey(CIOutputImage);
var filter3 = new CIColorMatrix();
filter3.SetDefaults();
- filter3.Image = ciImage;
-#pragma warning restore CS0618
+ filter3.InputImage = ciImage;
var cgColor = Color.ToCG();
var components = cgColor.Components;
diff --git a/src/Eto.Mac/Drawing/BitmapHandler.cs b/src/Eto.Mac/Drawing/BitmapHandler.cs
index 5cdd0502d6..d507589e46 100644
--- a/src/Eto.Mac/Drawing/BitmapHandler.cs
+++ b/src/Eto.Mac/Drawing/BitmapHandler.cs
@@ -8,35 +8,7 @@
using System.Collections.Generic;
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Drawing
{
diff --git a/src/Eto.Mac/Drawing/EtoFontManager.cs b/src/Eto.Mac/Drawing/EtoFontManager.cs
index cead1c27fe..bb18fac32d 100644
--- a/src/Eto.Mac/Drawing/EtoFontManager.cs
+++ b/src/Eto.Mac/Drawing/EtoFontManager.cs
@@ -1,32 +1,4 @@
using System;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Drawing
{
diff --git a/src/Eto.Mac/Drawing/FontExtensions.cs b/src/Eto.Mac/Drawing/FontExtensions.cs
index c45ced3f83..0ba586bcb7 100644
--- a/src/Eto.Mac/Drawing/FontExtensions.cs
+++ b/src/Eto.Mac/Drawing/FontExtensions.cs
@@ -1,33 +1,4 @@
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
#if OSX
namespace Eto.Mac.Drawing
@@ -72,7 +43,11 @@ public SizeF MeasureString(NSAttributedString str, SizeF? availableSize = null)
{
SetContainerSize(availableSize);
storage.SetString(str);
+#if MACOS_NET
+ return layout.GetBoundingRect(new NSRange(0, (int)str.Length), container).Size.ToEto();
+#else
return layout.BoundingRectForGlyphRange(new NSRange(0, (int)str.Length), container).Size.ToEto();
+#endif
}
void SetContainerSize(SizeF? availableSize)
diff --git a/src/Eto.Mac/Drawing/FontFamilyHandler.cs b/src/Eto.Mac/Drawing/FontFamilyHandler.cs
index 8ae8ae80fc..60879caddc 100644
--- a/src/Eto.Mac/Drawing/FontFamilyHandler.cs
+++ b/src/Eto.Mac/Drawing/FontFamilyHandler.cs
@@ -3,22 +3,6 @@
using System.Collections.Generic;
using System.Linq;
using System.IO;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreFoundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreText;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreText;
-#endif
namespace Eto.Mac.Drawing
{
@@ -40,7 +24,7 @@ public string LocalizedName
return Name;
var facePtr = IntPtr.Zero;
-#if XAMMAC && NET6_0_OR_GREATER
+#if USE_CFSTRING
var familyPtr = CFString.CreateNative(MacName);
var result = CFString.FromHandle(Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(NSFontManager.SharedFontManager.Handle, sel_LocalizedNameForFamilyFace, familyPtr, facePtr));
CFString.ReleaseNative(familyPtr);
diff --git a/src/Eto.Mac/Drawing/FontHandler.cs b/src/Eto.Mac/Drawing/FontHandler.cs
index 2ffeb9078a..60f879cb32 100644
--- a/src/Eto.Mac/Drawing/FontHandler.cs
+++ b/src/Eto.Mac/Drawing/FontHandler.cs
@@ -2,37 +2,6 @@
using System.Globalization;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-using MonoMac.CoreText;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
#if IOS
using UIKit;
@@ -271,7 +240,11 @@ public float XHeight
public float Baseline => LineHeight - Leading - Descent;
+#if MACOS_NET
+ public float LineHeight => (float)SharedLayoutManager.GetDefaultLineHeight(Control);
+#else
public float LineHeight => (float)SharedLayoutManager.DefaultLineHeightForFont(Control);
+#endif
public NSDictionary Attributes
{
diff --git a/src/Eto.Mac/Drawing/FontTypefaceHandler.cs b/src/Eto.Mac/Drawing/FontTypefaceHandler.cs
index b89407706b..d72e1a04f6 100644
--- a/src/Eto.Mac/Drawing/FontTypefaceHandler.cs
+++ b/src/Eto.Mac/Drawing/FontTypefaceHandler.cs
@@ -6,22 +6,6 @@
using Eto.Forms;
using System.IO;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreText;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreText;
-#endif
-
namespace Eto.Mac.Drawing
{
public class FontTypefaceHandler : WidgetHandler, FontTypeface.IHandler
diff --git a/src/Eto.Mac/Drawing/FontsHandler.cs b/src/Eto.Mac/Drawing/FontsHandler.cs
index 9bcd79ed2e..bd0e98b736 100644
--- a/src/Eto.Mac/Drawing/FontsHandler.cs
+++ b/src/Eto.Mac/Drawing/FontsHandler.cs
@@ -3,19 +3,6 @@
using System.Collections.Generic;
using System.Linq;
#if OSX
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Drawing
#elif IOS
diff --git a/src/Eto.Mac/Drawing/FormattedTextHandler.cs b/src/Eto.Mac/Drawing/FormattedTextHandler.cs
index c27d1f51fd..a85ae693f1 100644
--- a/src/Eto.Mac/Drawing/FormattedTextHandler.cs
+++ b/src/Eto.Mac/Drawing/FormattedTextHandler.cs
@@ -1,37 +1,6 @@
using Eto.Drawing;
using System;
using System.Runtime.InteropServices;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-using CoreText;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-using MonoMac.CoreText;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
#if OSX
namespace Eto.Mac.Drawing
@@ -184,7 +153,11 @@ private float GetMaxTextWidth()
while (newlineIndex >= 0)
{
var glyphRange = new NSRange(startIndex, newlineIndex - startIndex);
+#if MACOS_NET
+ var rect = Control.GetBoundingRect(glyphRange, container).Size.ToEto();
+#else
var rect = Control.BoundingRectForGlyphRange(glyphRange, container).Size.ToEto();
+#endif
maxWidth = Math.Max(maxWidth, rect.Width);
startIndex = newlineIndex + 1;
newlineIndex = _text.IndexOf(newline, startIndex);
diff --git a/src/Eto.Mac/Drawing/GraphicsHandler.cs b/src/Eto.Mac/Drawing/GraphicsHandler.cs
index 148ef19cfd..31b776aa54 100644
--- a/src/Eto.Mac/Drawing/GraphicsHandler.cs
+++ b/src/Eto.Mac/Drawing/GraphicsHandler.cs
@@ -5,44 +5,14 @@
using System.Collections.Generic;
using System.Runtime.InteropServices;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-using MonoMac;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
#if OSX
using Eto.Mac.Forms;
-#if XAMMAC2
-using GraphicsBase = Eto.Mac.Forms.MacBase;
-#else
+#if MONOMAC
using GraphicsBase = Eto.Mac.Forms.MacBase;
+#else
+using GraphicsBase = Eto.Mac.Forms.MacBase;
#endif
namespace Eto.Mac.Drawing
diff --git a/src/Eto.Mac/Drawing/GraphicsPathHandler.cs b/src/Eto.Mac/Drawing/GraphicsPathHandler.cs
index 3a162b9162..ee10b52b0a 100644
--- a/src/Eto.Mac/Drawing/GraphicsPathHandler.cs
+++ b/src/Eto.Mac/Drawing/GraphicsPathHandler.cs
@@ -4,33 +4,6 @@
using Eto.Drawing;
#if OSX
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Drawing
#elif IOS
diff --git a/src/Eto.Mac/Drawing/IconFrameHandler.cs b/src/Eto.Mac/Drawing/IconFrameHandler.cs
index 53a3eb146b..4736ad97c0 100644
--- a/src/Eto.Mac/Drawing/IconFrameHandler.cs
+++ b/src/Eto.Mac/Drawing/IconFrameHandler.cs
@@ -7,35 +7,7 @@
using Eto.Forms;
using System.Runtime.InteropServices;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Drawing
{
@@ -80,7 +52,7 @@ public NSBitmapImageRep Rep
}
}
-#if XAMMAC && NET6_0_OR_GREATER
+#if MACOS_NET
// .NET 6 on ARM64 crashes when using the override in macos workload preview 11, remove this when fixed.
[Export("CGImageForProposedRect:context:hints:")]
public CGImage AsCGImage(IntPtr proposedDestRectPtr, NSGraphicsContext context, NSDictionary hints)
diff --git a/src/Eto.Mac/Drawing/IconHandler.cs b/src/Eto.Mac/Drawing/IconHandler.cs
index c9e6d527fe..552e804bf0 100644
--- a/src/Eto.Mac/Drawing/IconHandler.cs
+++ b/src/Eto.Mac/Drawing/IconHandler.cs
@@ -6,35 +6,7 @@
using System.Linq;
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Drawing
{
diff --git a/src/Eto.Mac/Drawing/ImageHandler.cs b/src/Eto.Mac/Drawing/ImageHandler.cs
index 765c51060e..84d7d4c97e 100644
--- a/src/Eto.Mac/Drawing/ImageHandler.cs
+++ b/src/Eto.Mac/Drawing/ImageHandler.cs
@@ -1,35 +1,7 @@
using Eto.Drawing;
using Eto.Mac.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Drawing
{
diff --git a/src/Eto.Mac/Drawing/IndexedBitmapHandler.cs b/src/Eto.Mac/Drawing/IndexedBitmapHandler.cs
index 6e547bea0f..f29532987b 100644
--- a/src/Eto.Mac/Drawing/IndexedBitmapHandler.cs
+++ b/src/Eto.Mac/Drawing/IndexedBitmapHandler.cs
@@ -5,35 +5,7 @@
using Eto.Drawing;
using Eto.Shared.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Drawing
{
diff --git a/src/Eto.Mac/Drawing/LinearGradientBrushHandler.cs b/src/Eto.Mac/Drawing/LinearGradientBrushHandler.cs
index 0d1303fc0d..1191f0e9d1 100644
--- a/src/Eto.Mac/Drawing/LinearGradientBrushHandler.cs
+++ b/src/Eto.Mac/Drawing/LinearGradientBrushHandler.cs
@@ -3,35 +3,6 @@
using System.Collections.Generic;
using System.Linq;
-#if XAMMAC2
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
#if OSX
namespace Eto.Mac.Drawing
diff --git a/src/Eto.Mac/Drawing/MatrixHandler.cs b/src/Eto.Mac/Drawing/MatrixHandler.cs
index e9d17fce3a..473b4b5117 100644
--- a/src/Eto.Mac/Drawing/MatrixHandler.cs
+++ b/src/Eto.Mac/Drawing/MatrixHandler.cs
@@ -1,35 +1,6 @@
using System;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
#if OSX
diff --git a/src/Eto.Mac/Drawing/PenHandler.cs b/src/Eto.Mac/Drawing/PenHandler.cs
index bd4213294b..e07cbfd41e 100644
--- a/src/Eto.Mac/Drawing/PenHandler.cs
+++ b/src/Eto.Mac/Drawing/PenHandler.cs
@@ -1,35 +1,6 @@
using System;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
#if OSX
diff --git a/src/Eto.Mac/Drawing/RadialGradientBrushHandler.cs b/src/Eto.Mac/Drawing/RadialGradientBrushHandler.cs
index cba58e8d34..733cb9abbe 100644
--- a/src/Eto.Mac/Drawing/RadialGradientBrushHandler.cs
+++ b/src/Eto.Mac/Drawing/RadialGradientBrushHandler.cs
@@ -3,34 +3,6 @@
using System.Collections.Generic;
using System.Linq;
-#if XAMMAC2
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
#if OSX
diff --git a/src/Eto.Mac/Drawing/SolidBrushHandler.cs b/src/Eto.Mac/Drawing/SolidBrushHandler.cs
index a402b56af3..3ffca76251 100644
--- a/src/Eto.Mac/Drawing/SolidBrushHandler.cs
+++ b/src/Eto.Mac/Drawing/SolidBrushHandler.cs
@@ -1,19 +1,6 @@
using Eto.Drawing;
#if OSX
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Drawing
#elif IOS
diff --git a/src/Eto.Mac/Drawing/SystemColorsHandler.cs b/src/Eto.Mac/Drawing/SystemColorsHandler.cs
index 83e88c6725..2353b3f627 100644
--- a/src/Eto.Mac/Drawing/SystemColorsHandler.cs
+++ b/src/Eto.Mac/Drawing/SystemColorsHandler.cs
@@ -2,19 +2,6 @@
using Eto.Drawing;
using System.Threading;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Drawing
{
diff --git a/src/Eto.Mac/Drawing/TextureBrushHandler.cs b/src/Eto.Mac/Drawing/TextureBrushHandler.cs
index 5f5bbe93d6..57589fd142 100644
--- a/src/Eto.Mac/Drawing/TextureBrushHandler.cs
+++ b/src/Eto.Mac/Drawing/TextureBrushHandler.cs
@@ -1,34 +1,6 @@
using System;
using Eto.Drawing;
-#if XAMMAC2
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#elif OSX
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
#if OSX
diff --git a/src/Eto.Mac/Eto.Mac64.csproj b/src/Eto.Mac/Eto.Mac64.csproj
index e2724cdf3f..b75f350696 100644
--- a/src/Eto.Mac/Eto.Mac64.csproj
+++ b/src/Eto.Mac/Eto.Mac64.csproj
@@ -6,6 +6,7 @@
$(DefineConstants);OSX;DESKTOP;MONOMAC;Mac64
true
build\*
+ 10.0
$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage
@@ -28,6 +29,24 @@ Use Eto.Platform.XamMac2 if you want to distribute your app to the Mac App Store
You do not need to use any of the classes of this assembly (unless customizing the MonoMac functionality of the platform), and should just use the UI controls from the Eto assembly.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
PlatformDetect.cs
diff --git a/src/Eto.Mac/Eto.XamMac2.csproj b/src/Eto.Mac/Eto.XamMac2.csproj
index 1e66fe6997..807322b5f0 100644
--- a/src/Eto.Mac/Eto.XamMac2.csproj
+++ b/src/Eto.Mac/Eto.XamMac2.csproj
@@ -3,13 +3,26 @@
True
net462;xamarinmac20
- net6.0-macos10.15;$(TargetFrameworks)
+ net6.0-macos10.15;$(TargetFrameworks)
Eto.Mac
- $(DefineConstants);OSX;DESKTOP;XAMMAC;XAMMAC2;UNIFIED
+ $(DefineConstants);OSX;DESKTOP;XAMMAC;XAMMAC2;UNIFIED;USE_CFSTRING
true
build\*
CA1416
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
Eto.Platform.XamMac2
@@ -59,5 +72,9 @@ You do not need to use any of the classes of this assembly (unless customizing t
+
+
+
+
\ No newline at end of file
diff --git a/src/Eto.Mac/Eto.macOS.csproj b/src/Eto.Mac/Eto.macOS.csproj
new file mode 100644
index 0000000000..461eaff738
--- /dev/null
+++ b/src/Eto.Mac/Eto.macOS.csproj
@@ -0,0 +1,76 @@
+
+
+
+ net6.0-macos10.15
+ Eto.Mac
+ $(DefineConstants);OSX;DESKTOP;UNIFIED;MACOS_NET;USE_CFSTRING
+ true
+ build\*
+ CA1416
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Eto.Platform.macOS
+ Eto.Forms - Microsoft MacOS Platform
+ OS X Platform for the Eto.Forms UI Framework using the macos workload
+ cross platform gui ui framework desktop osx macos mac eto.forms
+
+This is the Microsoft MacOS platform for Eto.Forms UI Framework.
+
+Include this along with your Eto.Forms application to provide an macOS interface for Mac users.
+
+When used in a desktop project, this package will automatically create a macOS application bundle to run on a Mac.
+
+You must build MacOS projects on a Mac using dotnet command line or Visual Studio for Mac.
+
+You do not need to use any of the classes of this assembly (unless customizing the macOS functionality of the platform), and should just use the UI controls from the Eto assembly.
+
+
+
+
+
+ PlatformDetect.cs
+
+
+ Forms\FixedMaskedTextProviderHandler.cs
+
+
+ Drawing\GradientHelper.cs
+
+
+ Forms\Cells\MutableCellEventArgs.cs
+
+
+ Drawing\BaseBitmapData.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Eto.Mac/EtoBundle.cs b/src/Eto.Mac/EtoBundle.cs
index 55b481ffe2..9f781d2e78 100644
--- a/src/Eto.Mac/EtoBundle.cs
+++ b/src/Eto.Mac/EtoBundle.cs
@@ -1,21 +1,5 @@
using System;
using System.Runtime.InteropServices;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#endif
namespace Eto.Mac
{
diff --git a/src/Eto.Mac/EtoEnvironmentHandler.cs b/src/Eto.Mac/EtoEnvironmentHandler.cs
index 690e1fd51b..4e07811f64 100644
--- a/src/Eto.Mac/EtoEnvironmentHandler.cs
+++ b/src/Eto.Mac/EtoEnvironmentHandler.cs
@@ -3,19 +3,6 @@
using System.IO;
using System.Diagnostics;
using System.Reflection;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac
{
diff --git a/src/Eto.Mac/Forms/Actions/MacCommand.cs b/src/Eto.Mac/Forms/Actions/MacCommand.cs
index 3e27e22b46..e29bd4c113 100644
--- a/src/Eto.Mac/Forms/Actions/MacCommand.cs
+++ b/src/Eto.Mac/Forms/Actions/MacCommand.cs
@@ -1,17 +1,4 @@
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Actions
{
diff --git a/src/Eto.Mac/Forms/ApplicationHandler.cs b/src/Eto.Mac/Forms/ApplicationHandler.cs
index d45a2b0aac..cdc343ecd5 100644
--- a/src/Eto.Mac/Forms/ApplicationHandler.cs
+++ b/src/Eto.Mac/Forms/ApplicationHandler.cs
@@ -8,39 +8,6 @@
using System.Runtime.CompilerServices;
using System.Threading;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-using CoreFoundation;
-#else
-using MonoMac;
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-using MonoMac.CoreFoundation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
namespace Eto.Mac.Forms
{
public class ApplicationHandler : WidgetHandler, Application.IHandler
diff --git a/src/Eto.Mac/Forms/Cells/CellHandler.cs b/src/Eto.Mac/Forms/Cells/CellHandler.cs
index c379cb0382..913a7e25c7 100644
--- a/src/Eto.Mac/Forms/Cells/CellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/CellHandler.cs
@@ -3,39 +3,6 @@
using System;
using Eto.Mac.Forms.Controls;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
-#if XAMMAC2
-using nnuint = System.nint;
-#else
-using nnuint = System.Int32;
-#endif
namespace Eto.Mac.Forms.Cells
{
@@ -176,7 +143,7 @@ protected virtual void ReloadColumnData()
if (handler?.Loaded == true)
{
var column = handler.Widget.Columns.IndexOf(ColumnHandler.Widget);
- var rows = NSIndexSet.FromNSRange(new NSRange(0, (nnuint)handler.Table.RowCount));
+ var rows = NSIndexSet.FromNSRange(new NSRange(0, handler.Table.RowCount));
handler.Table.ReloadData(rows, new NSIndexSet(column));
}
}
diff --git a/src/Eto.Mac/Forms/Cells/CheckBoxCellHandler.cs b/src/Eto.Mac/Forms/Cells/CheckBoxCellHandler.cs
index 5fba6cb5ee..b8b0642fa8 100644
--- a/src/Eto.Mac/Forms/Cells/CheckBoxCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/CheckBoxCellHandler.cs
@@ -3,33 +3,6 @@
using Eto.Drawing;
using Eto.Mac.Forms.Controls;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Cells
{
diff --git a/src/Eto.Mac/Forms/Cells/ComboBoxCellHandler.cs b/src/Eto.Mac/Forms/Cells/ComboBoxCellHandler.cs
index f376703fdb..11e63048ed 100644
--- a/src/Eto.Mac/Forms/Cells/ComboBoxCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/ComboBoxCellHandler.cs
@@ -6,33 +6,6 @@
using Eto.Mac.Forms.Controls;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Cells
{
diff --git a/src/Eto.Mac/Forms/Cells/CustomCellHandler.cs b/src/Eto.Mac/Forms/Cells/CustomCellHandler.cs
index f4f20e9f0f..0a2760984a 100644
--- a/src/Eto.Mac/Forms/Cells/CustomCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/CustomCellHandler.cs
@@ -5,35 +5,7 @@
using Eto.Mac.Forms.Controls;
using Eto.Shared;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Cells
{
diff --git a/src/Eto.Mac/Forms/Cells/DrawableCellHandler.cs b/src/Eto.Mac/Forms/Cells/DrawableCellHandler.cs
index 5013c1101d..618f7df457 100644
--- a/src/Eto.Mac/Forms/Cells/DrawableCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/DrawableCellHandler.cs
@@ -5,35 +5,7 @@
using System.Runtime.InteropServices;
using Eto.Mac.Forms.Controls;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Cells
diff --git a/src/Eto.Mac/Forms/Cells/ImageTextCellHandler.cs b/src/Eto.Mac/Forms/Cells/ImageTextCellHandler.cs
index 6d73784dac..31bad0f77e 100644
--- a/src/Eto.Mac/Forms/Cells/ImageTextCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/ImageTextCellHandler.cs
@@ -4,33 +4,6 @@
using Eto.Mac.Drawing;
using Eto.Mac.Forms.Controls;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Cells
{
diff --git a/src/Eto.Mac/Forms/Cells/ImageViewCellHandler.cs b/src/Eto.Mac/Forms/Cells/ImageViewCellHandler.cs
index 35766dc6a5..e6b1daaf17 100644
--- a/src/Eto.Mac/Forms/Cells/ImageViewCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/ImageViewCellHandler.cs
@@ -4,33 +4,6 @@
using Eto.Mac.Drawing;
using Eto.Mac.Forms.Controls;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Cells
{
diff --git a/src/Eto.Mac/Forms/Cells/ProgressCellHandler.cs b/src/Eto.Mac/Forms/Cells/ProgressCellHandler.cs
index ac2805ac99..02224ada32 100644
--- a/src/Eto.Mac/Forms/Cells/ProgressCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/ProgressCellHandler.cs
@@ -5,33 +5,6 @@
using Eto.Mac.Forms.Controls;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Cells
{
diff --git a/src/Eto.Mac/Forms/Cells/TextBoxCellHandler.cs b/src/Eto.Mac/Forms/Cells/TextBoxCellHandler.cs
index 72b5972e1f..c9d4a2478e 100644
--- a/src/Eto.Mac/Forms/Cells/TextBoxCellHandler.cs
+++ b/src/Eto.Mac/Forms/Cells/TextBoxCellHandler.cs
@@ -4,33 +4,6 @@
using Eto.Mac.Forms.Controls;
using Eto.Mac.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Cells
{
diff --git a/src/Eto.Mac/Forms/ClipboardHandler.cs b/src/Eto.Mac/Forms/ClipboardHandler.cs
index 8c8544b793..8970b3ddff 100644
--- a/src/Eto.Mac/Forms/ClipboardHandler.cs
+++ b/src/Eto.Mac/Forms/ClipboardHandler.cs
@@ -4,33 +4,6 @@
using Eto.Mac.Drawing;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms
{
diff --git a/src/Eto.Mac/Forms/ColorDialogHandler.cs b/src/Eto.Mac/Forms/ColorDialogHandler.cs
index d122cfee09..a564d2add1 100644
--- a/src/Eto.Mac/Forms/ColorDialogHandler.cs
+++ b/src/Eto.Mac/Forms/ColorDialogHandler.cs
@@ -1,19 +1,6 @@
using System;
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms
{
diff --git a/src/Eto.Mac/Forms/Controls/ButtonHandler.cs b/src/Eto.Mac/Forms/Controls/ButtonHandler.cs
index 5905746da0..2668c0e88f 100644
--- a/src/Eto.Mac/Forms/Controls/ButtonHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ButtonHandler.cs
@@ -4,35 +4,7 @@
using Eto.Drawing;
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/CalendarHandler.cs b/src/Eto.Mac/Forms/Controls/CalendarHandler.cs
index 43c789e0c2..c8de920151 100644
--- a/src/Eto.Mac/Forms/Controls/CalendarHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/CalendarHandler.cs
@@ -1,18 +1,5 @@
using System;
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/CheckBoxHandler.cs b/src/Eto.Mac/Forms/Controls/CheckBoxHandler.cs
index 3f760c0dc1..cda2d1550c 100644
--- a/src/Eto.Mac/Forms/Controls/CheckBoxHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/CheckBoxHandler.cs
@@ -2,35 +2,7 @@
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/ColorPickerHandler.cs b/src/Eto.Mac/Forms/Controls/ColorPickerHandler.cs
index 36b15cbd02..957ded8b3c 100644
--- a/src/Eto.Mac/Forms/Controls/ColorPickerHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ColorPickerHandler.cs
@@ -4,19 +4,6 @@
using Eto.Mac.Drawing;
using System.Text.RegularExpressions;
using System.Linq;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/ComboBoxHandler.cs b/src/Eto.Mac/Forms/Controls/ComboBoxHandler.cs
index 056e888af4..4adc0330c3 100644
--- a/src/Eto.Mac/Forms/Controls/ComboBoxHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ComboBoxHandler.cs
@@ -5,35 +5,7 @@
using System.Collections;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/DateTimePickerHandler.cs b/src/Eto.Mac/Forms/Controls/DateTimePickerHandler.cs
index 98d5a4bd5b..598ada8ebb 100644
--- a/src/Eto.Mac/Forms/Controls/DateTimePickerHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/DateTimePickerHandler.cs
@@ -1,33 +1,6 @@
using System;
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/DrawableHandler.cs b/src/Eto.Mac/Forms/Controls/DrawableHandler.cs
index 8993fb469d..f231d4b451 100644
--- a/src/Eto.Mac/Forms/Controls/DrawableHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/DrawableHandler.cs
@@ -1,33 +1,6 @@
using Eto.Drawing;
using Eto.Forms;
using Eto.Mac.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/DropDownHandler.cs b/src/Eto.Mac/Forms/Controls/DropDownHandler.cs
index 714380c88e..8834e8cd0f 100644
--- a/src/Eto.Mac/Forms/Controls/DropDownHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/DropDownHandler.cs
@@ -5,35 +5,7 @@
using System.Collections;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/ExpanderHandler.cs b/src/Eto.Mac/Forms/Controls/ExpanderHandler.cs
index 074c8a03dd..69e0a29652 100644
--- a/src/Eto.Mac/Forms/Controls/ExpanderHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ExpanderHandler.cs
@@ -3,35 +3,7 @@
using Eto.Forms;
using System.Linq;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/GridColumnHandler.cs b/src/Eto.Mac/Forms/Controls/GridColumnHandler.cs
index 539395c499..f98c76f1d4 100644
--- a/src/Eto.Mac/Forms/Controls/GridColumnHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/GridColumnHandler.cs
@@ -5,33 +5,6 @@
using Eto.Mac.Forms.Cells;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/GridHandler.cs b/src/Eto.Mac/Forms/Controls/GridHandler.cs
index be3d270a6f..59678972e4 100644
--- a/src/Eto.Mac/Forms/Controls/GridHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/GridHandler.cs
@@ -7,42 +7,6 @@
using Eto.Mac.Drawing;
using Eto.Mac.Forms.Cells;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
-#if XAMMAC
-using nnint = System.Int32;
-#elif Mac64
-using nnint = System.UInt64;
-#else
-using nnint = System.UInt32;
-#endif
-
namespace Eto.Mac.Forms.Controls
{
public interface IGridHandler : IMacViewHandler
@@ -506,7 +470,7 @@ public void SelectAll()
public void SelectRow(int row)
{
- Control.SelectRow((nnint)row, AllowMultipleSelection);
+ Control.SelectRow(row, AllowMultipleSelection);
}
public void UnselectRow(int row)
@@ -523,7 +487,7 @@ public void BeginEdit(int row, int column)
{
if (!Control.IsRowSelected(row))
{
- Control.SelectRow((nnint)row, false);
+ Control.SelectRow((nint)row, false);
}
Control.EditColumn((nint)column, (nint)row, new NSEvent(), true);
}
@@ -671,7 +635,7 @@ void IDataViewHandler.OnCellEdited(GridViewCellEventArgs e)
// reload this entire row
if (e.Row >= 0)
{
- Control.ReloadData(NSIndexSet.FromIndex((nnint)e.Row), NSIndexSet.FromNSRange(new NSRange(0, Control.ColumnCount)));
+ Control.ReloadData(NSIndexSet.FromIndex((nint)e.Row), NSIndexSet.FromNSRange(new NSRange(0, Control.ColumnCount)));
}
if (e.GridColumn.AutoSize)
diff --git a/src/Eto.Mac/Forms/Controls/GridViewHandler.cs b/src/Eto.Mac/Forms/Controls/GridViewHandler.cs
index c78d638ab5..68df78bd0e 100644
--- a/src/Eto.Mac/Forms/Controls/GridViewHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/GridViewHandler.cs
@@ -6,34 +6,11 @@
using System.Linq;
using Eto.Mac.Forms.Cells;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
+#if MACOS_NET
+using NSDraggingInfo = AppKit.INSDraggingInfo;
#endif
+
namespace Eto.Mac.Forms.Controls
{
public class GridViewHandler : GridHandler, GridView.IHandler
@@ -145,6 +122,18 @@ public override NSImage DragImageForRowsWithIndexestableColumnseventoffset(NSInd
}
return base.DragImageForRowsWithIndexestableColumnseventoffset(dragRows, tableColumns, dragEvent, ref dragImageOffset);
}
+#elif MACOS_NET
+ public override NSImage DragImageForRows(NSIndexSet dragRows, NSTableColumn[] tableColumns, NSEvent dragEvent, ref CGPoint dragImageOffset)
+ {
+ var dragInfo = Handler?.DragInfo;
+ var img = dragInfo?.DragImage;
+ if (img != null)
+ {
+ dragImageOffset = dragInfo.GetDragImageOffset();
+ return img;
+ }
+ return base.DragImageForRows(dragRows, tableColumns, dragEvent, ref dragImageOffset);
+ }
#else
static readonly IntPtr selDragImageForRowsWithIndexes_TableColumns_Event_Offset_Handle = Selector.GetHandle("dragImageForRowsWithIndexes:tableColumns:event:offset:");
diff --git a/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs b/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs
index 08d8dac16d..de9a5c646a 100644
--- a/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs
@@ -3,35 +3,7 @@
using Eto.Drawing;
using Eto.Mac.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/ImageViewHandler.cs b/src/Eto.Mac/Forms/Controls/ImageViewHandler.cs
index ac0976f9b0..3ddd51fae2 100644
--- a/src/Eto.Mac/Forms/Controls/ImageViewHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ImageViewHandler.cs
@@ -3,35 +3,7 @@
using Eto.Drawing;
using Eto.Mac.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/LabelHandler.cs b/src/Eto.Mac/Forms/Controls/LabelHandler.cs
index 4fe22709a3..d0a1c61110 100644
--- a/src/Eto.Mac/Forms/Controls/LabelHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/LabelHandler.cs
@@ -5,43 +5,7 @@
using System.Text.RegularExpressions;
using System.Linq;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-#if XAMMAC2
-using nnint = System.nint;
-#elif Mac64
-using nnint = System.UInt64;
-#else
-using nnint = System.Int32;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/LinkButtonHandler.cs b/src/Eto.Mac/Forms/Controls/LinkButtonHandler.cs
index db00a28723..bdbecfbfd9 100644
--- a/src/Eto.Mac/Forms/Controls/LinkButtonHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/LinkButtonHandler.cs
@@ -4,33 +4,6 @@
using Eto.Mac.Drawing;
using System.Runtime.InteropServices;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/ListBoxHandler.cs b/src/Eto.Mac/Forms/Controls/ListBoxHandler.cs
index aa033092d4..0477f12c7e 100644
--- a/src/Eto.Mac/Forms/Controls/ListBoxHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ListBoxHandler.cs
@@ -7,43 +7,6 @@
using System.Collections;
using System.Linq;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
-#if XAMMAC
-using nnint = System.Int32;
-#elif Mac64
-using nnint = System.UInt64;
-#else
-using nnint = System.UInt32;
-#endif
-
-
namespace Eto.Mac.Forms.Controls
{
public class EtoScrollView : NSScrollView, IMacControl
@@ -302,7 +265,7 @@ public int SelectedIndex
Control.DeselectAll(Control);
else
{
- Control.SelectRow((nnint)value, false);
+ Control.SelectRow((nint)value, false);
Control.ScrollRowToVisible(value);
}
}
diff --git a/src/Eto.Mac/Forms/Controls/MacButton.cs b/src/Eto.Mac/Forms/Controls/MacButton.cs
index 9b995ade64..4fa765cb85 100644
--- a/src/Eto.Mac/Forms/Controls/MacButton.cs
+++ b/src/Eto.Mac/Forms/Controls/MacButton.cs
@@ -2,22 +2,6 @@
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreText;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreText;
-#endif
-
namespace Eto.Mac.Forms.Controls
{
public abstract class MacButton : MacControl, TextControl.IHandler
diff --git a/src/Eto.Mac/Forms/Controls/MacControl.cs b/src/Eto.Mac/Forms/Controls/MacControl.cs
index 9cc46ac83c..7054cb26d6 100644
--- a/src/Eto.Mac/Forms/Controls/MacControl.cs
+++ b/src/Eto.Mac/Forms/Controls/MacControl.cs
@@ -1,19 +1,6 @@
using Eto.Forms;
using Eto.Drawing;
using Eto.Mac.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/MacEventView.cs b/src/Eto.Mac/Forms/Controls/MacEventView.cs
index 535353bafa..99d0440832 100644
--- a/src/Eto.Mac/Forms/Controls/MacEventView.cs
+++ b/src/Eto.Mac/Forms/Controls/MacEventView.cs
@@ -2,35 +2,7 @@
using Eto.Forms;
using Eto.Drawing;
using System.Diagnostics;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/MacImageAndTextCell.cs b/src/Eto.Mac/Forms/Controls/MacImageAndTextCell.cs
index 1cc85b0608..18d58aa90d 100644
--- a/src/Eto.Mac/Forms/Controls/MacImageAndTextCell.cs
+++ b/src/Eto.Mac/Forms/Controls/MacImageAndTextCell.cs
@@ -2,33 +2,6 @@
using Eto.Forms;
using Eto.Mac.Drawing;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/MacImageTextView.cs b/src/Eto.Mac/Forms/Controls/MacImageTextView.cs
index e6a5152046..b0474056cb 100644
--- a/src/Eto.Mac/Forms/Controls/MacImageTextView.cs
+++ b/src/Eto.Mac/Forms/Controls/MacImageTextView.cs
@@ -1,30 +1,4 @@
using System;
-#if XAMMAC2
-using AppKit;
-using CoreGraphics;
-using Foundation;
-using ObjCRuntime;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/MacLabel.cs b/src/Eto.Mac/Forms/Controls/MacLabel.cs
index 99600d66ab..cb33840385 100644
--- a/src/Eto.Mac/Forms/Controls/MacLabel.cs
+++ b/src/Eto.Mac/Forms/Controls/MacLabel.cs
@@ -5,44 +5,6 @@
using System.Text.RegularExpressions;
using System.Linq;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
-#if XAMMAC
-using nnint = System.Int32;
-#elif Mac64
-using nnint = System.UInt64;
-#else
-using nnint = System.UInt32;
-#endif
-
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/MacText.cs b/src/Eto.Mac/Forms/Controls/MacText.cs
index 604703b79f..dd3e027f79 100644
--- a/src/Eto.Mac/Forms/Controls/MacText.cs
+++ b/src/Eto.Mac/Forms/Controls/MacText.cs
@@ -4,19 +4,6 @@
using System;
using System.Diagnostics;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/NativeControlHandler.cs b/src/Eto.Mac/Forms/Controls/NativeControlHandler.cs
index 4c8d066991..d17b1c7ebe 100644
--- a/src/Eto.Mac/Forms/Controls/NativeControlHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/NativeControlHandler.cs
@@ -3,34 +3,6 @@
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using nnint = System.nint;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/NumericStepperHandler.cs b/src/Eto.Mac/Forms/Controls/NumericStepperHandler.cs
index 4832718556..5245ba8046 100644
--- a/src/Eto.Mac/Forms/Controls/NumericStepperHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/NumericStepperHandler.cs
@@ -8,43 +8,6 @@
using System.Runtime.InteropServices;
using System.Reflection;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreFoundation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
-#if XAMMAC
-using nnint = System.Int32;
-#elif Mac64
-using nnint = System.UInt64;
-#else
-using nnint = System.UInt32;
-#endif
-
namespace Eto.Mac.Forms.Controls
{
public class NumericStepperHandler : MacView, NumericStepper.IHandler
@@ -457,7 +420,7 @@ public bool GetObjectValue(IntPtr obj, IntPtr strPtr, IntPtr errorDescription)
if (h != null && h.NeedsFormat)
{
double result;
-#if XAMMAC && NET6_0_OR_GREATER
+#if USE_CFSTRING
var str = CFString.FromHandle(strPtr);
#else
var str = NSString.FromHandle(strPtr);
@@ -507,8 +470,8 @@ void SetFormatter()
NumberStyle = NSNumberFormatterStyle.Decimal,
Lenient = true,
UsesGroupingSeparator = false,
- MinimumFractionDigits = (nnint)DecimalPlaces,
- MaximumFractionDigits = (nnint)MaximumDecimalPlaces
+ MinimumFractionDigits = DecimalPlaces,
+ MaximumFractionDigits = MaximumDecimalPlaces
};
Stepper.Formatter = formatter;
diff --git a/src/Eto.Mac/Forms/Controls/PanelHandler.cs b/src/Eto.Mac/Forms/Controls/PanelHandler.cs
index 0a8cb194b0..5601655675 100644
--- a/src/Eto.Mac/Forms/Controls/PanelHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/PanelHandler.cs
@@ -1,19 +1,6 @@
using System;
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/PasswordBoxHandler.cs b/src/Eto.Mac/Forms/Controls/PasswordBoxHandler.cs
index a0a5fe03a9..13a1617d99 100644
--- a/src/Eto.Mac/Forms/Controls/PasswordBoxHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/PasswordBoxHandler.cs
@@ -3,35 +3,7 @@
using Eto.Mac.Forms.Controls;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/ProgressBarHandler.cs b/src/Eto.Mac/Forms/Controls/ProgressBarHandler.cs
index e0dbe4ee57..d27e93470f 100644
--- a/src/Eto.Mac/Forms/Controls/ProgressBarHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ProgressBarHandler.cs
@@ -2,35 +2,7 @@
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/RadioButtonHandler.cs b/src/Eto.Mac/Forms/Controls/RadioButtonHandler.cs
index ed344ddf6a..f374ef889b 100644
--- a/src/Eto.Mac/Forms/Controls/RadioButtonHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/RadioButtonHandler.cs
@@ -4,35 +4,7 @@
using System.Linq;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/RichTextAreaHandler.cs b/src/Eto.Mac/Forms/Controls/RichTextAreaHandler.cs
index 3428d12a05..64a6f5da51 100644
--- a/src/Eto.Mac/Forms/Controls/RichTextAreaHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/RichTextAreaHandler.cs
@@ -6,44 +6,6 @@
using System.Collections.Generic;
using System.Text;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
-#if XAMMAC
-using nnint = System.Int32;
-#elif Mac64
-using nnint = System.UInt64;
-#else
-using nnint = System.UInt32;
-#endif
-
namespace Eto.Mac.Forms.Controls
{
public class RichTextAreaHandler : TextAreaHandler, RichTextArea.IHandler, ITextBuffer
@@ -298,7 +260,7 @@ public void Delete(Range range)
public void Insert(int position, string text)
{
- Control.TextStorage.Insert(new NSAttributedString(text), (nnint)position);
+ Control.TextStorage.Insert(new NSAttributedString(text), (nint)position);
}
public IEnumerable SupportedFormats
diff --git a/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs b/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs
index 74ce27db53..8038d9017c 100644
--- a/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs
@@ -5,33 +5,6 @@
using System;
using Eto.Drawing;
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/SearchBoxHandler.cs b/src/Eto.Mac/Forms/Controls/SearchBoxHandler.cs
index b704470bb1..7a5fdfb5b4 100644
--- a/src/Eto.Mac/Forms/Controls/SearchBoxHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/SearchBoxHandler.cs
@@ -2,35 +2,7 @@
using Eto.Drawing;
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/SegmentedButtonHandler.cs b/src/Eto.Mac/Forms/Controls/SegmentedButtonHandler.cs
index 692fa9c865..08d0be01c8 100644
--- a/src/Eto.Mac/Forms/Controls/SegmentedButtonHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/SegmentedButtonHandler.cs
@@ -4,35 +4,7 @@
using Eto.Drawing;
using System.Linq;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/SliderHandler.cs b/src/Eto.Mac/Forms/Controls/SliderHandler.cs
index 37083739c5..6a21e19a9d 100644
--- a/src/Eto.Mac/Forms/Controls/SliderHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/SliderHandler.cs
@@ -2,35 +2,7 @@
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-using CoreImage;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-using MonoMac.CoreImage;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
+
namespace Eto.Mac.Forms.Controls
{
@@ -54,7 +26,11 @@ public SliderHandler Handler
set { WeakHandler = new WeakReference(value); }
}
+#if MACOS_NET
+ public override bool IsVertical => Handler?.Orientation == Orientation.Vertical;
+#else
public override nint IsVertical => Handler?.Orientation == Orientation.Vertical ? 1 : 0;
+#endif
}
protected override bool DefaultUseAlignmentFrame => true;
diff --git a/src/Eto.Mac/Forms/Controls/SpinnerHandler.cs b/src/Eto.Mac/Forms/Controls/SpinnerHandler.cs
index d741696f37..ac30c65bac 100644
--- a/src/Eto.Mac/Forms/Controls/SpinnerHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/SpinnerHandler.cs
@@ -1,19 +1,6 @@
using System;
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/SplitterHandler.cs b/src/Eto.Mac/Forms/Controls/SplitterHandler.cs
index 5627e8c8aa..ffc8ff3c83 100644
--- a/src/Eto.Mac/Forms/Controls/SplitterHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/SplitterHandler.cs
@@ -2,33 +2,6 @@
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/StepperHandler.cs b/src/Eto.Mac/Forms/Controls/StepperHandler.cs
index d34217e9e7..efa6965852 100644
--- a/src/Eto.Mac/Forms/Controls/StepperHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/StepperHandler.cs
@@ -2,33 +2,6 @@
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/TabControlHandler.cs b/src/Eto.Mac/Forms/Controls/TabControlHandler.cs
index 05bceac4fd..04b56dc84b 100644
--- a/src/Eto.Mac/Forms/Controls/TabControlHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/TabControlHandler.cs
@@ -3,19 +3,6 @@
using Eto.Forms;
using Eto.Drawing;
using System.Collections.Generic;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/TabPageHandler.cs b/src/Eto.Mac/Forms/Controls/TabPageHandler.cs
index 5eba4ac52a..37779d772b 100644
--- a/src/Eto.Mac/Forms/Controls/TabPageHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/TabPageHandler.cs
@@ -2,33 +2,6 @@
using Eto.Forms;
using Eto.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
namespace Eto.Mac.Forms.Controls
{
diff --git a/src/Eto.Mac/Forms/Controls/TextAreaHandler.cs b/src/Eto.Mac/Forms/Controls/TextAreaHandler.cs
index 292ccfbbae..59a1788d20 100644
--- a/src/Eto.Mac/Forms/Controls/TextAreaHandler.cs
+++ b/src/Eto.Mac/Forms/Controls/TextAreaHandler.cs
@@ -3,42 +3,6 @@
using Eto.Drawing;
using Eto.Mac.Drawing;
-#if XAMMAC2
-using AppKit;
-using Foundation;
-using CoreGraphics;
-using ObjCRuntime;
-using CoreAnimation;
-#else
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-using MonoMac.CoreGraphics;
-using MonoMac.ObjCRuntime;
-using MonoMac.CoreAnimation;
-#if Mac64
-using nfloat = System.Double;
-using nint = System.Int64;
-using nuint = System.UInt64;
-#else
-using nfloat = System.Single;
-using nint = System.Int32;
-using nuint = System.UInt32;
-#endif
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
-#endif
-
-#if XAMMAC
-using nnint = System.Int32;
-#elif Mac64
-using nnint = System.UInt64;
-#else
-using nnint = System.UInt32;
-#endif
-
namespace Eto.Mac.Forms.Controls
{
public class TextAreaHandler : TextAreaHandler
@@ -27,9 +28,6 @@
-
-
-
diff --git a/test/Eto.Test.Mac/Eto.Test.XamMac2.csproj b/test/Eto.Test.Mac/Eto.Test.XamMac2.csproj
index 546fd575b7..680bff1fa1 100644
--- a/test/Eto.Test.Mac/Eto.Test.XamMac2.csproj
+++ b/test/Eto.Test.Mac/Eto.Test.XamMac2.csproj
@@ -3,20 +3,20 @@
True
Exe
- net6.0-macos;net48;xamarinmac20
- osx-x64;osx-arm64
+ net48;xamarinmac20
Eto.Test.Mac
False
False
Mac Developer
3rd Party Mac Developer Installer
--nowarn:2006 --nowarn:0176
+ $(MonoBundlingExtraArgs) --registrar:dynamic
XAMMAC;XAMMAC2
10.15
CA1416
-
+
SdkOnly
@@ -46,10 +46,6 @@
-
-
-
-
-
+
\ No newline at end of file
diff --git a/test/Eto.Test.Mac/Eto.Test.macOS.csproj b/test/Eto.Test.Mac/Eto.Test.macOS.csproj
new file mode 100644
index 0000000000..9a6d044fb8
--- /dev/null
+++ b/test/Eto.Test.Mac/Eto.Test.macOS.csproj
@@ -0,0 +1,46 @@
+
+
+
+ Exe
+ net6.0-macos
+ osx-x64;osx-arm64
+ Eto.Test.Mac
+ False
+ False
+ Mac Developer
+ 3rd Party Mac Developer Installer
+ --nowarn:2006 --nowarn:0176
+ MACOS_NET
+ 10.15
+ CA1416
+
+ SdkOnly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/Eto.Test.Mac/Startup.cs b/test/Eto.Test.Mac/Startup.cs
index 95920c20f1..c4948bd3ca 100644
--- a/test/Eto.Test.Mac/Startup.cs
+++ b/test/Eto.Test.Mac/Startup.cs
@@ -6,10 +6,10 @@
using Eto.Mac.Forms.ToolBar;
using Eto.Forms;
-#if XAMMAC2
-using AppKit;
-#else
+#if MONOMAC
using MonoMac.AppKit;
+#else
+using AppKit;
#endif
namespace Eto.Test.Mac
diff --git a/test/Eto.Test.Mac/UnitTests/BitmapTests.cs b/test/Eto.Test.Mac/UnitTests/BitmapTests.cs
index 7e26bce43e..5c7ea3ad26 100644
--- a/test/Eto.Test.Mac/UnitTests/BitmapTests.cs
+++ b/test/Eto.Test.Mac/UnitTests/BitmapTests.cs
@@ -3,12 +3,12 @@
using Eto.Test.UnitTests;
using NUnit.Framework;
-#if XAMMAC2
-using AppKit;
-using CoreGraphics;
-#else
+#if MONOMAC
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
+#else
+using AppKit;
+using CoreGraphics;
#endif
namespace Eto.Test.Mac.UnitTests
diff --git a/test/Eto.Test.Mac/UnitTests/ButtonTests.cs b/test/Eto.Test.Mac/UnitTests/ButtonTests.cs
index cfb080755d..f9599b65c5 100644
--- a/test/Eto.Test.Mac/UnitTests/ButtonTests.cs
+++ b/test/Eto.Test.Mac/UnitTests/ButtonTests.cs
@@ -7,19 +7,14 @@
using System.Runtime.ExceptionServices;
using System.Threading.Tasks;
using Eto.Mac;
-#if XAMMAC2
-using AppKit;
-using CoreGraphics;
-#else
+
+#if MONOMAC
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
+#else
+using AppKit;
+using CoreGraphics;
#endif
-
namespace Eto.Test.Mac.UnitTests
{
[TestFixture]
diff --git a/test/Eto.Test.Mac/UnitTests/CheckBoxTests.cs b/test/Eto.Test.Mac/UnitTests/CheckBoxTests.cs
index 60012ceb47..44731c1e98 100644
--- a/test/Eto.Test.Mac/UnitTests/CheckBoxTests.cs
+++ b/test/Eto.Test.Mac/UnitTests/CheckBoxTests.cs
@@ -4,17 +4,13 @@
using Eto.Mac.Forms.Controls;
using Eto.Test.UnitTests;
using NUnit.Framework;
-#if XAMMAC2
-using AppKit;
-using CoreGraphics;
-#else
+
+#if MONOMAC
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
+#else
+using AppKit;
+using CoreGraphics;
#endif
namespace Eto.Test.Mac.UnitTests
diff --git a/test/Eto.Test.Mac/UnitTests/IconTests.cs b/test/Eto.Test.Mac/UnitTests/IconTests.cs
index 33f8c5f178..f638ef0961 100644
--- a/test/Eto.Test.Mac/UnitTests/IconTests.cs
+++ b/test/Eto.Test.Mac/UnitTests/IconTests.cs
@@ -4,12 +4,13 @@
using Eto.Test.UnitTests;
using NUnit.Framework;
using Eto.Mac;
-#if XAMMAC2
-using AppKit;
-using CoreGraphics;
-#else
+
+#if MONOMAC
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
+#else
+using AppKit;
+using CoreGraphics;
#endif
namespace Eto.Test.Mac64.UnitTests
diff --git a/test/Eto.Test.Mac/UnitTests/NativeParentWindowTests.cs b/test/Eto.Test.Mac/UnitTests/NativeParentWindowTests.cs
index d1ee9cc8c0..d903428dd7 100644
--- a/test/Eto.Test.Mac/UnitTests/NativeParentWindowTests.cs
+++ b/test/Eto.Test.Mac/UnitTests/NativeParentWindowTests.cs
@@ -4,17 +4,12 @@
using Eto.Forms;
using System.Threading;
-#if XAMMAC2
-using AppKit;
-using CoreGraphics;
-#else
+#if MONOMAC
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
+#else
+using AppKit;
+using CoreGraphics;
#endif
namespace Eto.Test.Mac.UnitTests
diff --git a/test/Eto.Test.Mac/UnitTests/RadioButtonTests.cs b/test/Eto.Test.Mac/UnitTests/RadioButtonTests.cs
index 0856eddb7c..9d38407222 100644
--- a/test/Eto.Test.Mac/UnitTests/RadioButtonTests.cs
+++ b/test/Eto.Test.Mac/UnitTests/RadioButtonTests.cs
@@ -4,17 +4,13 @@
using Eto.Mac.Forms.Controls;
using Eto.Test.UnitTests;
using NUnit.Framework;
-#if XAMMAC2
-using AppKit;
-using CoreGraphics;
-#else
+
+#if MONOMAC
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
-#if SDCOMPAT
-using CGSize = System.Drawing.SizeF;
-using CGRect = System.Drawing.RectangleF;
-using CGPoint = System.Drawing.PointF;
-#endif
+#else
+using AppKit;
+using CoreGraphics;
#endif
namespace Eto.Test.Mac.UnitTests