Create out own __TIZEN__ define

- things appear to have changed from TIZEN4_0 to TIZEN40
 - we don't want the version in the define
This commit is contained in:
Matthew Leibowitz 2018-07-18 02:53:15 +02:00
Родитель b7efe03d58
Коммит cc40c294ef
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 00A672181E6BF432
17 изменённых файлов: 27 добавлений и 22 удалений

Просмотреть файл

@ -53,7 +53,7 @@ namespace SkiaSharp
public static GRGlInterface CreateNativeEvasInterface (IntPtr evas)
{
#if TIZEN4_0
#if __TIZEN__
var evasLoader = new EvasGlLoader (evas);
return AssembleGlesInterface ((ctx, name) => evasLoader.GetFunctionPointer (name));
#else
@ -208,7 +208,7 @@ namespace SkiaSharp
}
}
#if TIZEN4_0
#if __TIZEN__
private class EvasGlLoader
{
private IntPtr glEvas;

Просмотреть файл

@ -9,7 +9,7 @@
<TizenCreateTpkOnBuild>false</TizenCreateTpkOnBuild>
<PackagingGroup>HarfBuzzSharp</PackagingGroup>
<PackagingPlatform>tizen40</PackagingPlatform>
<DefineConstants>$(DefineConstants);HARFBUZZ</DefineConstants>
<DefineConstants>$(DefineConstants);HARFBUZZ;__TIZEN__;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>full</DebugType>

Просмотреть файл

@ -9,7 +9,7 @@
<TizenCreateTpkOnBuild>false</TizenCreateTpkOnBuild>
<PackagingGroup>SkiaSharp</PackagingGroup>
<PackagingPlatform>tizen40</PackagingPlatform>
<DefineConstants>$(DefineConstants);</DefineConstants>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

Просмотреть файл

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>tizen40</TargetFramework>
<OutputType>Exe</OutputType>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

Просмотреть файл

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>tizen40</TargetFramework>
<OutputType>Exe</OutputType>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

Просмотреть файл

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>tizen40</TargetFramework>
<OutputType>Exe</OutputType>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

Просмотреть файл

@ -18,7 +18,7 @@ using Android.Content;
using System.Diagnostics;
using System.Reflection;
using System.Windows;
#elif TIZEN4_0
#elif __TIZEN__
using Tizen.Applications;
using Xamarin.Forms.Platform.Tizen;
#endif
@ -46,7 +46,7 @@ namespace SkiaSharpSample
#elif __DESKTOP__
var root = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var path = Path.Combine(root, "Media", fontName);
#elif TIZEN4_0
#elif __TIZEN__
var path = ResourcePath.GetPath(fontName);
#endif
@ -59,7 +59,7 @@ namespace SkiaSharpSample
var localStorage = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
#elif __DESKTOP__
var localStorage = System.Windows.Forms.Application.LocalUserAppDataPath;
#elif TIZEN4_0
#elif __TIZEN__
var localStorage = Application.Current.DirectoryInfo.Data;
#endif
@ -122,7 +122,7 @@ namespace SkiaSharpSample
Application.Context.StartActivity(intent);
#elif __DESKTOP__
Process.Start(path);
#elif TIZEN4_0
#elif __TIZEN__
var appControl = new AppControl
{
Operation = AppControlOperations.View,

Просмотреть файл

@ -5,6 +5,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>SkiaSharpSample.Platform</RootNamespace>
<AssemblyName>TizenOS</AssemblyName>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

Просмотреть файл

@ -21,7 +21,7 @@ using SKNativePaintSurfaceEventArgs = SkiaSharp.Views.UWP.SKPaintSurfaceEventArg
using Xamarin.Forms.Platform.MacOS;
using SKNativeView = SkiaSharp.Views.Mac.SKCanvasView;
using SKNativePaintSurfaceEventArgs = SkiaSharp.Views.Mac.SKPaintSurfaceEventArgs;
#elif TIZEN4_0
#elif __TIZEN__
using Xamarin.Forms.Platform.Tizen;
using SKNativeView = SkiaSharp.Views.Tizen.SKCanvasView;
using SKNativePaintSurfaceEventArgs = SkiaSharp.Views.Tizen.SKPaintSurfaceEventArgs;
@ -109,7 +109,7 @@ namespace SkiaSharp.Views.Forms
{
return (TNativeView)Activator.CreateInstance(typeof(TNativeView), new[] { Context });
}
#elif TIZEN4_0
#elif __TIZEN__
protected virtual TNativeView CreateNativeControl()
{
TNativeView ret = (TNativeView)Activator.CreateInstance(typeof(TNativeView), new[] { TForms.NativeParent });
@ -165,7 +165,7 @@ namespace SkiaSharp.Views.Forms
#if __ANDROID__
x = Context.FromPixels(x);
x = Context.FromPixels(y);
#elif TIZEN4_0
#elif __TIZEN__
x = Tizen.ScalingInfo.FromPixel(x);
x = Tizen.ScalingInfo.FromPixel(y);
#elif __IOS__ || __MACOS__ || WINDOWS_UWP
@ -176,7 +176,7 @@ namespace SkiaSharp.Views.Forms
}
else
{
#if __ANDROID__ || TIZEN4_0
#if __ANDROID__ || __TIZEN__
// Tizen and Android are the reverse of the other platforms
#elif __IOS__
x = x * Control.ContentScaleFactor;

Просмотреть файл

@ -21,7 +21,7 @@ using SKNativePaintGLSurfaceEventArgs = SkiaSharp.Views.UWP.SKPaintGLSurfaceEven
using Xamarin.Forms.Platform.MacOS;
using SKNativeView = SkiaSharp.Views.Mac.SKGLView;
using SKNativePaintGLSurfaceEventArgs = SkiaSharp.Views.Mac.SKPaintGLSurfaceEventArgs;
#elif TIZEN4_0
#elif __TIZEN__
using Xamarin.Forms.Platform.Tizen;
using SKNativeView = SkiaSharp.Views.Tizen.SKGLSurfaceView;
using SKNativePaintGLSurfaceEventArgs = SkiaSharp.Views.Tizen.SKPaintGLSurfaceEventArgs;
@ -115,7 +115,7 @@ namespace SkiaSharp.Views.Forms
{
return (TNativeView)Activator.CreateInstance(typeof(TNativeView), new[] { Context });
}
#elif TIZEN4_0
#elif __TIZEN__
protected virtual TNativeView CreateNativeControl()
{
TNativeView ret = (TNativeView)Activator.CreateInstance(typeof(TNativeView), new[] { TForms.NativeParent });
@ -172,7 +172,7 @@ namespace SkiaSharp.Views.Forms
private SKPoint GetScaledCoord(double x, double y)
{
#if __ANDROID__ || TIZEN4_0
#if __ANDROID__ || __TIZEN__
// Android and Tizen are the reverse of the other platforms
#elif __IOS__
x = x * Control.ContentScaleFactor;

Просмотреть файл

@ -10,6 +10,7 @@
<SignAssembly>false</SignAssembly>
<PackagingGroup>SkiaSharp.Views.Forms</PackagingGroup>
<PackagingPlatform>tizen40</PackagingPlatform>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms.Platform.Tizen" Version="2.5.0.280555" />

Просмотреть файл

@ -13,7 +13,7 @@ namespace SkiaSharp.Views.Desktop
namespace SkiaSharp.Views.UWP
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#elif TIZEN4_0
#elif __TIZEN__
namespace SkiaSharp.Views.Tizen
#endif
{
@ -39,7 +39,7 @@ namespace SkiaSharp.Views.Tizen
internal static bool IsValidEnvironment => isValidEnvironment.Value;
#if !WINDOWS_UWP && !TIZEN4_0
#if !WINDOWS_UWP && !__TIZEN__
// System.Drawing.Point*
public static SKPoint ToSKPoint(this System.Drawing.PointF point)

Просмотреть файл

@ -15,7 +15,7 @@ namespace SkiaSharp.Views.GlesInterop
private const string libGLESv2 = "libGLESv2.so";
#elif WINDOWS_UWP
private const string libGLESv2 = "libGLESv2.dll";
#elif TIZEN4_0
#elif __TIZEN__
private const string libGLESv2 = "libGLESv2.so";
#endif

Просмотреть файл

@ -14,7 +14,7 @@ namespace SkiaSharp.Views.Desktop
namespace SkiaSharp.Views.Mac
#elif WINDOWS_UWP
namespace SkiaSharp.Views.UWP
#elif TIZEN4_0
#elif __TIZEN__
namespace SkiaSharp.Views.Tizen
#endif
{

Просмотреть файл

@ -13,7 +13,7 @@ namespace SkiaSharp.Views.Desktop
namespace SkiaSharp.Views.UWP
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#elif TIZEN4_0
#elif __TIZEN__
namespace SkiaSharp.Views.Tizen
#endif
{

Просмотреть файл

@ -14,7 +14,7 @@ namespace SkiaSharp.Views.Desktop
namespace SkiaSharp.Views.UWP
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#elif TIZEN4_0
#elif __TIZEN__
namespace SkiaSharp.Views.Tizen
#endif
{

Просмотреть файл

@ -9,7 +9,7 @@
<TizenCreateTpkOnBuild>false</TizenCreateTpkOnBuild>
<PackagingGroup>SkiaSharp.Views</PackagingGroup>
<PackagingPlatform>tizen40</PackagingPlatform>
<DefineConstants>$(DefineConstants);</DefineConstants>
<DefineConstants>$(DefineConstants);__TIZEN__;</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.6.41" PrivateAssets="All" />