Skip to content

Commit

Permalink
Merge branch 'master' into feature/design-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hawker authored Dec 10, 2020
2 parents ea949d6 + ec93987 commit 2e2c27b
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static unsafe int ConvertLength<TFrom, TTo>(int length)
}
else if (sizeof(TFrom) == 1)
{
return length / sizeof(TTo);
return (int)((uint)length / (uint)sizeof(TTo));
}
else
{
Expand Down
16 changes: 3 additions & 13 deletions Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazePointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Windows.Devices.Input.Preview;
using Windows.Foundation;
Expand Down Expand Up @@ -298,20 +299,9 @@ internal int CursorRadius
/// </summary>
public bool IsAlwaysActivated { get; set; }

private static GazePointer _instance = null;
private static ThreadLocal<GazePointer> _instance = new ThreadLocal<GazePointer>(() => new GazePointer());

internal static GazePointer Instance
{
get
{
if (_instance == null)
{
_instance = new GazePointer();
}

return _instance;
}
}
internal static GazePointer Instance => _instance.Value;

internal void AddRoot(int proxyId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
</Description>
<PackageTags>notifications win10 windows 10 tile tiles toast toasts badge xml uwp c# csharp c++</PackageTags>
<ExtrasImplicitPlatformPackageIsPrivate Condition=" '$(TargetFramework)' == 'native' ">true</ExtrasImplicitPlatformPackageIsPrivate>
<DefaultTargetPlatformMinVersion>10240</DefaultTargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
</PropertyGroup>

<Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,26 @@ public static void SetMotion(this InteractionTrackerInertiaMotion modifier, Expr
modifier.Motion = CreateExpressionAnimationFromNode(modifier.Compositor, expressionNode);
}

/// <summary>
/// Use the value of specified ExpressionNode to determine if this composition conditional value modifier should be chosen.
/// </summary>
/// <param name="modifier">The modifier.</param>
/// <param name="expressionNode">The root ExpressionNode that represents the ExpressionAnimation.</param>
public static void SetCondition(this CompositionConditionalValue modifier, ExpressionNode expressionNode)
{
modifier.Condition = CreateExpressionAnimationFromNode(modifier.Compositor, expressionNode);
}

/// <summary>
/// Use the value of specified ExpressionNode as the value for this composition conditional value
/// </summary>
/// <param name="modifier">The modifier.</param>
/// <param name="expressionNode">The root ExpressionNode that represents the ExpressionAnimation.</param>
public static void SetValue(this CompositionConditionalValue modifier, ExpressionNode expressionNode)
{
modifier.Value = CreateExpressionAnimationFromNode(modifier.Compositor, expressionNode);
}

/// <summary>
/// Creates the expression animation from node.
/// </summary>
Expand Down
90 changes: 45 additions & 45 deletions Windows Community Toolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -751,9 +751,9 @@ Global
{F5929F8E-7BC5-4A7B-A92A-AC751F7906E4}.Release|x64.Build.0 = Release|x64
{F5929F8E-7BC5-4A7B-A92A-AC751F7906E4}.Release|x86.ActiveCfg = Release|x86
{F5929F8E-7BC5-4A7B-A92A-AC751F7906E4}.Release|x86.Build.0 = Release|x86
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|Any CPU.ActiveCfg = Debug|x86
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|Any CPU.Build.0 = Debug|x86
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|Any CPU.Deploy.0 = Debug|x86
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|ARM.ActiveCfg = Debug|ARM
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|ARM.Build.0 = Debug|ARM
{DCFBF9F1-2BBE-498D-B6C9-8ADE50C06CDC}.Debug|ARM.Deploy.0 = Debug|ARM
Expand Down Expand Up @@ -797,6 +797,46 @@ Global
{804D0681-52F6-4E61-864A-699F0AB44B20}.Release|x86.ActiveCfg = Release|x86
{804D0681-52F6-4E61-864A-699F0AB44B20}.Release|x86.Build.0 = Release|x86
{804D0681-52F6-4E61-864A-699F0AB44B20}.Release|x86.Deploy.0 = Release|x86
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM64.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x64.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x64.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x86.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x86.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|Any CPU.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM64.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM64.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x64.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x64.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x86.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x86.Build.0 = Release|Any CPU
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|Any CPU.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|Any CPU.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM64.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM64.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x64.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x64.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x86.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x86.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|Any CPU.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|Any CPU.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM64.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM64.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x64.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x64.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x86.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x86.Build.0 = Release|x86
{0037E4C9-7AF3-4ADD-8156-5AEFA6C36405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0037E4C9-7AF3-4ADD-8156-5AEFA6C36405}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0037E4C9-7AF3-4ADD-8156-5AEFA6C36405}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -844,46 +884,6 @@ Global
{54349AB0-9E41-4AA6-849C-EC9CE80CDD2A}.Release|x86.ActiveCfg = Release|Any CPU
{54349AB0-9E41-4AA6-849C-EC9CE80CDD2A}.Release|x86.Build.0 = Release|Any CPU
{54349AB0-9E41-4AA6-849C-EC9CE80CDD2A}.Release|x86.Deploy.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|ARM64.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x64.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x64.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x86.ActiveCfg = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Debug|x86.Build.0 = Debug|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|Any CPU.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM64.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|ARM64.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x64.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x64.Build.0 = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x86.ActiveCfg = Release|Any CPU
{6FEDF199-B052-49DD-8F3E-2A9224998E0F}.Release|x86.Build.0 = Release|Any CPU
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|Any CPU.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|Any CPU.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM64.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|ARM64.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x64.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x64.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x86.ActiveCfg = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Debug|x86.Build.0 = Debug|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|Any CPU.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|Any CPU.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM64.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|ARM64.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x64.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x64.Build.0 = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x86.ActiveCfg = Release|x86
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}.Release|x86.Build.0 = Release|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Debug|Any CPU.ActiveCfg = Debug|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Debug|ARM.ActiveCfg = Debug|ARM
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Debug|ARM.Build.0 = Debug|ARM
Expand Down Expand Up @@ -983,10 +983,10 @@ Global
{C79029AF-2E9B-4466-BAC4-1A41B281EAE6} = {B30036C4-D514-4E5B-A323-587A061772CE}
{804D0681-52F6-4E61-864A-699F0AB44B20} = {C79029AF-2E9B-4466-BAC4-1A41B281EAE6}
{88C6FFBE-322D-4CEA-842B-B2CB281D357D} = {CFA75BE0-5A44-45DE-8114-426A605B062B}
{0037E4C9-7AF3-4ADD-8156-5AEFA6C36405} = {9AD30620-667D-433C-9961-8D885EE7B762}
{54349AB0-9E41-4AA6-849C-EC9CE80CDD2A} = {9AD30620-667D-433C-9961-8D885EE7B762}
{6FEDF199-B052-49DD-8F3E-2A9224998E0F} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
{67FE47A0-CA93-4680-B770-A0A48C1DBC40} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
{0037E4C9-7AF3-4ADD-8156-5AEFA6C36405} = {9AD30620-667D-433C-9961-8D885EE7B762}
{54349AB0-9E41-4AA6-849C-EC9CE80CDD2A} = {9AD30620-667D-433C-9961-8D885EE7B762}
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0} = {6FAA1CFE-3368-4FD2-9DBD-F4700F69174C}
{6FAA1CFE-3368-4FD2-9DBD-F4700F69174C} = {B30036C4-D514-4E5B-A323-587A061772CE}
{5F720475-E263-4A5A-8C88-2B805B45B5BC} = {6FAA1CFE-3368-4FD2-9DBD-F4700F69174C}
Expand Down

0 comments on commit 2e2c27b

Please sign in to comment.