Merge pull request #17 from dotnet/gtk
Include Gtk canvas rendering and sample
This commit is contained in:
Коммит
1fd0a9f043
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.809.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls", "GraphicsControls\GraphicsControls.csproj", "{474A33AE-06A4-4219-9545-17751EBF3F84}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsControls", "GraphicsControls\GraphicsControls.csproj", "{474A33AE-06A4-4219-9545-17751EBF3F84}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{4F0017DB-8A18-4153-A129-782B29DECF51}"
|
||||
EndProject
|
||||
|
@ -11,7 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{465D03
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample.iOS", "GraphicsControls.Sample.iOS\GraphicsControls.Sample.iOS.csproj", "{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample", "GraphicsControls.Sample\GraphicsControls.Sample.csproj", "{41B421AF-5731-4B8F-BEDE-96155879D929}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsControls.Sample", "GraphicsControls.Sample\GraphicsControls.Sample.csproj", "{41B421AF-5731-4B8F-BEDE-96155879D929}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample.macOS", "GraphicsControls.Sample.macOS\GraphicsControls.Sample.macOS.csproj", "{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}"
|
||||
EndProject
|
||||
|
@ -19,97 +19,94 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample.And
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A6CE0398-E304-48E5-955B-DA2F77D6B940}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Tests", "GraphicsControls.Tests\GraphicsControls.Tests.csproj", "{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsControls.Tests", "GraphicsControls.Tests\GraphicsControls.Tests.csproj", "{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
Debug|iPhone = Debug|iPhone
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|iPhone = Release|iPhone
|
||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{41B421AF-5731-4B8F-BEDE-96155879D929}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C351DAA7-20C0-474D-B610-F00C8BE5B0F1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {475B4FFA-17B6-449C-9D09-DE4E2B0D2F4B}
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{474A33AE-06A4-4219-9545-17751EBF3F84} = {4F0017DB-8A18-4153-A129-782B29DECF51}
|
||||
{27FAE6FC-C7E2-4B63-B713-906A59A0C0DF} = {465D03D3-BA73-4E52-BBEA-02DC54647BC6}
|
||||
|
@ -118,4 +115,7 @@ Global
|
|||
{2EE53371-EFD9-4304-A231-93E6F75DBC81} = {465D03D3-BA73-4E52-BBEA-02DC54647BC6}
|
||||
{AAE3033F-3E70-4CAB-A66E-96EDBE4AAA33} = {A6CE0398-E304-48E5-955B-DA2F77D6B940}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {475B4FFA-17B6-449C-9D09-DE4E2B0D2F4B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{79952688-FF1B-4813-A7E7-97C15F73B534}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GraphicsControls.Sample.GTK</RootNamespace>
|
||||
<AssemblyName>GraphicsControls.Sample.GTK</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SkiaSharp, Version=2.80.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SkiaSharp.2.80.2\lib\net462\SkiaSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SkiaSharp.Views.Desktop.Common, Version=2.80.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SkiaSharp.Views.Desktop.Common.2.80.2\lib\net462\SkiaSharp.Views.Desktop.Common.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="SkiaSharp.Views.Gtk, Version=2.80.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SkiaSharp.Views.Gtk2.2.80.2\lib\net462\SkiaSharp.Views.Gtk.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="webkit-sharp, Version=1.1.15.0, Culture=neutral, PublicKeyToken=eaa1d335d2e19745, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.Forms.Platform.GTK.4.8.0.1687\lib\net45\webkit-sharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.Forms.4.8.0.1687\lib\netstandard2.0\Xamarin.Forms.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.Forms.4.8.0.1687\lib\netstandard2.0\Xamarin.Forms.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform.GTK, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.Forms.Platform.GTK.4.8.0.1687\lib\net45\Xamarin.Forms.Platform.GTK.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.Forms.4.8.0.1687\lib\netstandard2.0\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GraphicsControls.Sample\GraphicsControls.Sample.csproj">
|
||||
<Project>{41b421af-5731-4b8f-bede-96155879d929}</Project>
|
||||
<Name>GraphicsControls.Sample</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GraphicsControls\GraphicsControls.csproj">
|
||||
<Project>{474a33ae-06a4-4219-9545-17751ebf3f84}</Project>
|
||||
<Name>GraphicsControls</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="OpenTK.dll.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="webkit-sharp.dll.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\SkiaSharp.2.80.2\build\net462\SkiaSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.2.80.2\build\net462\SkiaSharp.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.4.8.0.1687\build\Xamarin.Forms.targets')" />
|
||||
<Import Project="..\packages\SkiaSharp.2.80.2\build\net462\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.2.80.2\build\net462\SkiaSharp.targets')" />
|
||||
</Project>
|
|
@ -0,0 +1,25 @@
|
|||
<configuration>
|
||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
|
||||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
|
||||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
|
||||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
|
||||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
|
||||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
|
||||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
|
||||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
|
||||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
|
||||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
|
||||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
|
||||
<!-- XQuartz compatibility (X11 on Mac) -->
|
||||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
|
||||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
|
||||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
|
||||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
|
||||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
|
||||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
|
||||
</configuration>
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.GTK;
|
||||
using Xamarin.Forms.Platform.GTK.Extensions;
|
||||
|
||||
namespace GraphicsControls.Sample.GTK
|
||||
{
|
||||
class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Gtk.Application.Init();
|
||||
Forms.Init();
|
||||
|
||||
var app = new App();
|
||||
var window = new FormsWindow();
|
||||
window.LoadApplication(app);
|
||||
window.SetApplicationTitle("GraphicsControls");
|
||||
//window.SetSize(800, 1000);
|
||||
window.Show();
|
||||
|
||||
Gtk.Application.Run();
|
||||
|
||||
GraphicsControls.GTK.GraphicsViewRenderer.Init();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("GraphicsControls.Sample.GTK")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GraphicsControls.Sample.GTK")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("79952688-ff1b-4813-a7e7-97c15f73b534")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="OpenTK" version="3.0.1" targetFramework="net471" />
|
||||
<package id="SkiaSharp" version="2.80.2" targetFramework="net471" />
|
||||
<package id="SkiaSharp.Views.Desktop.Common" version="2.80.2" targetFramework="net471" />
|
||||
<package id="SkiaSharp.Views.Gtk2" version="2.80.2" targetFramework="net471" />
|
||||
<package id="System.Buffers" version="4.4.0" targetFramework="net471" />
|
||||
<package id="System.Memory" version="4.5.3" targetFramework="net471" />
|
||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net471" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net471" />
|
||||
<package id="Xamarin.Forms" version="4.8.0.1687" targetFramework="net471" />
|
||||
<package id="Xamarin.Forms.Platform.GTK" version="4.8.0.1687" targetFramework="net471" />
|
||||
</packages>
|
|
@ -0,0 +1,5 @@
|
|||
<configuration>
|
||||
<dllmap dll="webkit-1.0" target="libwebkitgtk-1.0.0.dylib"/>
|
||||
<dllmap dll="webkit-1.0" os="linux" target="libwebkitgtk-1.0.so.0"/>
|
||||
<dllmap dll="webkit-1.0" os="windows" target="libwebkitgtk-1.0-0.dll"/>
|
||||
</configuration>
|
|
@ -8,7 +8,11 @@ namespace GraphicsControls.Sample
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainPage = new MainPage();
|
||||
if (Device.RuntimePlatform == Device.GTK)
|
||||
MainPage = new OnlyDrawnControlsPage();
|
||||
else
|
||||
MainPage = new MixedControlsPage();
|
||||
|
||||
//MainPage = new NavigationPage(new BenchmarkPage());
|
||||
}
|
||||
|
||||
|
|
|
@ -20,4 +20,14 @@
|
|||
<ItemGroup>
|
||||
<Folder Include="Benchmark\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="MixedControlsPage.xaml.cs">
|
||||
<DependentUpon>MixedControlsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="OnlyDrawnControlsPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:graphics="clr-namespace:GraphicsControls;assembly=GraphicsControls"
|
||||
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
|
||||
x:Class="GraphicsControls.Sample.MainPage"
|
||||
x:Class="GraphicsControls.Sample.MixedControlsPage"
|
||||
ios:Page.UseSafeArea="true"
|
||||
BackgroundColor="White"
|
||||
Title="GraphicsControls">
|
|
@ -3,9 +3,9 @@ using Xamarin.Forms;
|
|||
|
||||
namespace GraphicsControls.Sample
|
||||
{
|
||||
public partial class MainPage : ContentPage
|
||||
public partial class MixedControlsPage : ContentPage
|
||||
{
|
||||
public MainPage()
|
||||
public MixedControlsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:graphics="clr-namespace:GraphicsControls;assembly=GraphicsControls"
|
||||
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
|
||||
x:Class="GraphicsControls.Sample.OnlyDrawnControlsPage"
|
||||
ios:Page.UseSafeArea="true"
|
||||
Title="GraphicsControls">
|
||||
<ScrollView
|
||||
BackgroundColor="White">
|
||||
<StackLayout
|
||||
Padding="12">
|
||||
<graphics:BoxView
|
||||
HeightRequest="60"
|
||||
CornerRadius="12"
|
||||
Color="LightSkyBlue"/>
|
||||
<Label
|
||||
Text="Cupertino"
|
||||
FontSize="Large"
|
||||
Margin="0, 12, 0, 0"/>
|
||||
<graphics:ActivityIndicator
|
||||
VisualType="Cupertino"
|
||||
IsRunning="True"
|
||||
HorizontalOptions="Center"/>
|
||||
<graphics:Button
|
||||
VisualType="Cupertino"
|
||||
Text="Cupertino Button"
|
||||
Clicked="OnButtonClicked"/>
|
||||
<graphics:CheckBox
|
||||
VisualType="Cupertino"
|
||||
Text="CheckBox"/>
|
||||
<graphics:ProgressBar
|
||||
VisualType="Cupertino"
|
||||
Progress="0.25"/>
|
||||
<graphics:RadioButton
|
||||
VisualType="Cupertino"
|
||||
IsChecked="True"/>
|
||||
<graphics:Slider
|
||||
VisualType="Cupertino"
|
||||
Minimum="0"
|
||||
Maximum="10"
|
||||
Value="5"/>
|
||||
<graphics:Stepper
|
||||
VisualType="Cupertino"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="50"/>
|
||||
<graphics:Switch
|
||||
VisualType="Cupertino"/>
|
||||
<Label
|
||||
Text="Fluent"
|
||||
FontSize="Large"
|
||||
Margin="0, 12, 0, 0"/>
|
||||
<graphics:ActivityIndicator
|
||||
VisualType="Fluent"
|
||||
IsRunning="True"
|
||||
HorizontalOptions="Center"/>
|
||||
<graphics:Button
|
||||
VisualType="Fluent"
|
||||
Text="Fluent Button"
|
||||
Clicked="OnButtonClicked"/>
|
||||
<graphics:CheckBox
|
||||
VisualType="Fluent"
|
||||
IsChecked="True"
|
||||
Text="CheckBox"/>
|
||||
<graphics:ProgressBar
|
||||
VisualType="Fluent"
|
||||
Progress="0.25"/>
|
||||
<graphics:RadioButton
|
||||
VisualType="Fluent"
|
||||
IsChecked="True"/>
|
||||
<graphics:Slider
|
||||
VisualType="Fluent"
|
||||
Minimum="0"
|
||||
Maximum="10"
|
||||
Value="5"/>
|
||||
<graphics:Stepper
|
||||
VisualType="Fluent"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="50"/>
|
||||
<graphics:Switch
|
||||
VisualType="Fluent"/>
|
||||
<Label
|
||||
Text="Material"
|
||||
FontSize="Large"
|
||||
Margin="0, 12, 0, 0"/>
|
||||
<graphics:ActivityIndicator
|
||||
VisualType="Material"
|
||||
IsRunning="True"
|
||||
HorizontalOptions="Center"/>
|
||||
<graphics:Button
|
||||
VisualType="Material"
|
||||
Text="Material Button"
|
||||
Clicked="OnButtonClicked"/>
|
||||
<graphics:CheckBox
|
||||
VisualType="Material"/>
|
||||
<graphics:ProgressBar
|
||||
VisualType="Material"
|
||||
Progress="0.25"/>
|
||||
<graphics:RadioButton
|
||||
VisualType="Material"
|
||||
IsChecked="True"/>
|
||||
<graphics:Slider
|
||||
VisualType="Material"
|
||||
Minimum="0"
|
||||
Maximum="10"
|
||||
Value="5"/>
|
||||
<graphics:Stepper
|
||||
VisualType="Material"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="50"/>
|
||||
<graphics:Switch
|
||||
VisualType="Material"/>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace GraphicsControls.Sample
|
||||
{
|
||||
public partial class OnlyDrawnControlsPage : ContentPage
|
||||
{
|
||||
public OnlyDrawnControlsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void OnButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
DisplayAlert("GraphicsControls", "Button Clicked", "Ok");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,10 +13,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample.iOS
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsControls.Sample", "GraphicsControls.Sample\GraphicsControls.Sample.csproj", "{41B421AF-5731-4B8F-BEDE-96155879D929}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample.Tizen", "GraphicsControls.Sample.Tizen\GraphicsControls.Sample.Tizen.csproj", "{F89D5E3A-5531-412B-A8B2-D4E8A9F07B9E}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsControls.Sample.Tizen", "GraphicsControls.Sample.Tizen\GraphicsControls.Sample.Tizen.csproj", "{F89D5E3A-5531-412B-A8B2-D4E8A9F07B9E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample.Android", "GraphicsControls.Sample.Android\GraphicsControls.Sample.Android.csproj", "{2EE53371-EFD9-4304-A231-93E6F75DBC81}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicsControls.Sample.GTK", "GraphicsControls.Sample.GTK\GraphicsControls.Sample.GTK.csproj", "{79952688-FF1B-4813-A7E7-97C15F73B534}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -93,6 +95,18 @@ Global
|
|||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -103,6 +117,7 @@ Global
|
|||
{41B421AF-5731-4B8F-BEDE-96155879D929} = {465D03D3-BA73-4E52-BBEA-02DC54647BC6}
|
||||
{F89D5E3A-5531-412B-A8B2-D4E8A9F07B9E} = {465D03D3-BA73-4E52-BBEA-02DC54647BC6}
|
||||
{2EE53371-EFD9-4304-A231-93E6F75DBC81} = {465D03D3-BA73-4E52-BBEA-02DC54647BC6}
|
||||
{79952688-FF1B-4813-A7E7-97C15F73B534} = {465D03D3-BA73-4E52-BBEA-02DC54647BC6}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {475B4FFA-17B6-449C-9D09-DE4E2B0D2F4B}
|
||||
|
|
|
@ -0,0 +1,186 @@
|
|||
using System;
|
||||
using System.Graphics.Skia;
|
||||
using GraphicsControls;
|
||||
using GraphicsControls.GTK;
|
||||
using System.ComponentModel;
|
||||
using System.Graphics;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Internals;
|
||||
using Xamarin.Forms.Platform.GTK;
|
||||
using SkiaSharp.Views.Gtk;
|
||||
using SkiaSharp.Views.Desktop;
|
||||
using Gdk;
|
||||
using Gtk;
|
||||
using Xamarin.Forms.Platform.GTK.Extensions;
|
||||
using GPoint = System.Graphics.Point;
|
||||
using XColor = Xamarin.Forms.Color;
|
||||
|
||||
[assembly: ExportRenderer(typeof(GraphicsView), typeof(GraphicsViewRenderer))]
|
||||
namespace GraphicsControls.GTK
|
||||
{
|
||||
public class NativeGraphicsView : SKWidget
|
||||
{
|
||||
IDrawable _drawable;
|
||||
readonly SkiaCanvas _canvas;
|
||||
readonly ScalingCanvas _scalingCanvas;
|
||||
|
||||
public NativeGraphicsView(IDrawable drawable = null)
|
||||
{
|
||||
_canvas = new SkiaCanvas();
|
||||
_scalingCanvas = new ScalingCanvas(_canvas);
|
||||
Drawable = drawable;
|
||||
}
|
||||
|
||||
public IDrawable Drawable
|
||||
{
|
||||
get => _drawable;
|
||||
set
|
||||
{
|
||||
_drawable = value;
|
||||
QueueDraw();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaintSurface(SKPaintSurfaceEventArgs e)
|
||||
{
|
||||
if (_drawable == null) return;
|
||||
|
||||
var skiaCanvas = e.Surface.Canvas;
|
||||
skiaCanvas.Clear();
|
||||
|
||||
_canvas.Canvas = skiaCanvas;
|
||||
_drawable.Draw(_scalingCanvas, new RectangleF(0, 0, e.Info.Width, e.Info.Height));
|
||||
}
|
||||
}
|
||||
|
||||
[Preserve(AllMembers = true)]
|
||||
public class GraphicsViewRenderer : ViewRenderer<GraphicsView, NativeGraphicsView>
|
||||
{
|
||||
string _defaultAccessibilityLabel;
|
||||
string _defaultAccessibilityHint;
|
||||
|
||||
[Preserve(AllMembers = true)]
|
||||
public static void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<GraphicsView> e)
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
|
||||
|
||||
if (e.OldElement != null)
|
||||
{
|
||||
e.OldElement.Invalidated -= OnDrawInvalidated;
|
||||
}
|
||||
|
||||
if (e.NewElement != null)
|
||||
{
|
||||
e.NewElement.Invalidated += OnDrawInvalidated;
|
||||
|
||||
SetNativeControl(new NativeGraphicsView());
|
||||
|
||||
Control.Drawable = Element;
|
||||
|
||||
Control.AddEvents((int)EventMask.AllEventsMask);
|
||||
|
||||
UpdateBackground();
|
||||
UpdateAutomationHelpText();
|
||||
UpdateAutomationName();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
base.OnElementPropertyChanged(sender, e);
|
||||
|
||||
if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName)
|
||||
UpdateBackground();
|
||||
else if (e.PropertyName == AutomationProperties.HelpTextProperty.PropertyName)
|
||||
UpdateAutomationHelpText();
|
||||
else if (e.PropertyName == AutomationProperties.NameProperty.PropertyName)
|
||||
UpdateAutomationName();
|
||||
|
||||
Control?.QueueDraw();
|
||||
}
|
||||
|
||||
protected override void OnParentSet(Widget previous_parent)
|
||||
{
|
||||
base.OnParentSet(previous_parent);
|
||||
|
||||
Element?.Load();
|
||||
Element?.AttachComponents();
|
||||
}
|
||||
|
||||
public override void Destroy()
|
||||
{
|
||||
base.Destroy();
|
||||
|
||||
Element?.Unload();
|
||||
Element?.DetachComponents();
|
||||
}
|
||||
|
||||
protected override bool OnButtonPressEvent(EventButton evnt)
|
||||
{
|
||||
Element?.OnTouchDown(new GPoint(evnt.X, evnt.Y));
|
||||
|
||||
return base.OnButtonPressEvent(evnt);
|
||||
}
|
||||
|
||||
protected override bool OnButtonReleaseEvent(EventButton evnt)
|
||||
{
|
||||
Element?.OnTouchUp(new GPoint(evnt.X, evnt.Y));
|
||||
|
||||
return base.OnButtonReleaseEvent(evnt);
|
||||
}
|
||||
|
||||
void UpdateBackground()
|
||||
{
|
||||
if (Element.BackgroundColor == XColor.Default)
|
||||
{
|
||||
Control.ModifyBg(StateType.Normal, XColor.Transparent.ToGtkColor());
|
||||
return;
|
||||
}
|
||||
|
||||
Control.ModifyBg(StateType.Normal, Element.BackgroundColor.ToGtkColor());
|
||||
}
|
||||
|
||||
void UpdateAutomationHelpText()
|
||||
{
|
||||
if (Element == null)
|
||||
return;
|
||||
|
||||
if (_defaultAccessibilityHint == null)
|
||||
_defaultAccessibilityHint = Control.Accessible.Name;
|
||||
|
||||
var helpText = (string)Element.GetValue(AutomationProperties.HelpTextProperty) ?? _defaultAccessibilityHint;
|
||||
|
||||
if (!string.IsNullOrEmpty(helpText))
|
||||
{
|
||||
Control.Accessible.Name = helpText;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAutomationName()
|
||||
{
|
||||
if (Element == null)
|
||||
return;
|
||||
|
||||
if (_defaultAccessibilityLabel == null)
|
||||
_defaultAccessibilityLabel = Control.Accessible.Description;
|
||||
|
||||
var name = (string)Element.GetValue(AutomationProperties.NameProperty) ?? _defaultAccessibilityLabel;
|
||||
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
Control.Accessible.Description = name;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDrawInvalidated(object sender, EventArgs e)
|
||||
{
|
||||
Control?.QueueDraw();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -126,7 +126,10 @@
|
|||
<PackageReference Include="Xamarin.Forms.Platform.WPF" Version="4.8.0.1687" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net471')) ">
|
||||
<Compile Include="**\*.gtk.cs" />
|
||||
<Compile Include="**\*.gtk.*.cs" />
|
||||
<PackageReference Include="SkiaSharp.Views.Forms.GTK" Version="2.80.2" />
|
||||
<PackageReference Include="JonLipsky.System.Graphics.Skia" Version="0.1.36" />
|
||||
<PackageReference Include="Xamarin.Forms.Platform.GTK" Version="4.8.0.1687" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
||||
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f, processorArchitecture=MSIL">
|
||||
|
|
Загрузка…
Ссылка в новой задаче