Skip to content

Commit

Permalink
Merge branch 'master' into muxtestinfra
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuavio committed Oct 8, 2020
2 parents c9b98c2 + 830e9af commit 6fd5ee0
Show file tree
Hide file tree
Showing 88 changed files with 3,460 additions and 4,046 deletions.
4 changes: 2 additions & 2 deletions GazeInputTest/GazeInputTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.UWP.Input.GazeInteraction\Microsoft.Toolkit.Uwp.Input.GazeInteraction.vcxproj">
<Project>{a5e98964-45b1-442d-a07a-298a3221d81e}</Project>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Input.GazeInteraction\Microsoft.Toolkit.Uwp.Input.GazeInteraction.csproj">
<Project>{5bf75694-798a-43a0-8150-415de195359c}</Project>
<Name>Microsoft.Toolkit.Uwp.Input.GazeInteraction</Name>
</ProjectReference>
</ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions GazeInputTest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// 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("GazeInputTest")]
Expand All @@ -20,13 +20,13 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// 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")]
// [assembly: AssemblyVersion("1.0.0.0")]
// [assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;
using Windows.UI.Xaml.Controls;

namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
{
internal class ComboBoxItemGazeTargetItem : GazeTargetItem
{
internal ComboBoxItemGazeTargetItem(UIElement element)
: base(element)
{
}

internal override void Invoke()
{
var peer = FrameworkElementAutomationPeer.FromElement(TargetElement);
var comboBoxItemAutomationPeer = peer as ComboBoxItemAutomationPeer;
var comboBoxItem = (ComboBoxItem)comboBoxItemAutomationPeer.Owner;

AutomationPeer ancestor = comboBoxItemAutomationPeer;
var comboBoxAutomationPeer = ancestor as ComboBoxAutomationPeer;
while (comboBoxAutomationPeer == null)
{
ancestor = ancestor.Navigate(AutomationNavigationDirection.Parent) as AutomationPeer;
comboBoxAutomationPeer = ancestor as ComboBoxAutomationPeer;
}

comboBoxItem.IsSelected = true;
comboBoxAutomationPeer.Collapse();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.ComponentModel;

namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
{
/// <summary>
/// This parameter is passed to the GazeElement::Invoked event and allows
/// the application to prevent default invocation when the user dwells on a control
/// </summary>
public sealed class DwellInvokedRoutedEventArgs : HandledEventArgs
{
internal DwellInvokedRoutedEventArgs()
{
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.ComponentModel;

namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
{
/// <summary>
/// This parameter is passed to the GazeElement.DwellProgressFeedback event. The event is fired to inform the application of the user's progress towards completing dwelling on a control
/// </summary>
public sealed class DwellProgressEventArgs : HandledEventArgs
{
/// <summary>
/// Gets an enum that reflects the current state of dwell progress
/// </summary>
public DwellProgressState State { get; }

/// <summary>
/// Gets a value between 0 and 1 that reflects the fraction of progress towards completing dwell
/// </summary>
public double Progress { get; }

internal DwellProgressEventArgs(DwellProgressState state, TimeSpan elapsedDuration, TimeSpan triggerDuration)
{
State = state;
Progress = ((double)elapsedDuration.Ticks) / triggerDuration.Ticks;
}
}
}

This file was deleted.

32 changes: 32 additions & 0 deletions Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressState.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
{
/// <summary>
/// An enum that reflects the current state of progress towards dwell when a user is focused on a control
/// </summary>
public enum DwellProgressState
{
/// <summary>
/// User is not looking at the control
/// </summary>
Idle,

/// <summary>
/// Gaze has entered control but we're not yet showing progress.
/// </summary>
Fixating,

/// <summary>
/// User is continuing to focus on a control with an intent to dwell and invoke
/// </summary>
Progressing,

/// <summary>
/// User has completed dwelling on a control
/// </summary>
Complete
}
}
34 changes: 0 additions & 34 deletions Microsoft.Toolkit.Uwp.Input.GazeInteraction/DwellProgressState.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation;
using Windows.UI.Xaml.Automation.Peers;
using Windows.UI.Xaml.Automation.Provider;

namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
{
internal class ExpandCollapsePatternGazeTargetItem : GazeTargetItem
{
internal ExpandCollapsePatternGazeTargetItem(UIElement element)
: base(element)
{
}

internal override void Invoke()
{
var peer = FrameworkElementAutomationPeer.FromElement(TargetElement);
var provider = peer.GetPattern(PatternInterface.ExpandCollapse) as IExpandCollapseProvider;
switch (provider.ExpandCollapseState)
{
case ExpandCollapseState.Collapsed:
provider.Expand();
break;

case ExpandCollapseState.Expanded:
provider.Collapse();
break;
}
}
}
}
80 changes: 0 additions & 80 deletions Microsoft.Toolkit.Uwp.Input.GazeInteraction/GazeCursor.cpp

This file was deleted.

Loading

0 comments on commit 6fd5ee0

Please sign in to comment.