Skip to main content

InputManager Class

NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Input

The InputManager class is responsible for coordinating all of the input system in TinyCore. The input manager exists per Dispatcher

public sealed class InputManager : DispatcherObject

Properties

CurrentInputManager

public static InputManager CurrentInputManager { get; }

Return the input manager associated with the current context.

ButtonDevice

public ButtonDevice ButtonDevice { get; }

The primary button device for this input manager.

TouchDevice

public TouchDevice TouchDevice { get; }

The primary touch device for this input manager.

GenericDevice

public GenericDevice GenericDevice { get; }

The primary generic input device for this input manager.

InputProviders

public ICollection InputProviders { get; }

Returns a collection of input providers registered with the input manager.

MostRecentInputDevice

public InputDevice MostRecentInputDevice { get; set; }

The MostRecentInputDevice represents the last input device to report an "interesting" user action. What exactly constitutes such an action is up to each device to implement.

Methods

RoutedEvent( , RoutingStrategy.Tunnel, typeof(InputReportEventHandler))

public static readonly RoutedEvent PreviewInputReportEvent = new RoutedEvent( , RoutingStrategy.Tunnel, typeof(InputReportEventHandler))

A routed event indicating that an input report arrived.

Returns RoutedEvent PreviewInputReportEvent = new

RoutedEvent( , RoutingStrategy.Bubble, typeof(InputReportEventHandler))

public static readonly RoutedEvent InputReportEvent = new RoutedEvent( , RoutingStrategy.Bubble, typeof(InputReportEventHandler))

A routed event indicating that an input report arrived.

Returns RoutedEvent InputReportEvent = new

RegisterInputProvider(object inputProvider)

public InputProviderSite RegisterInputProvider(object inputProvider)

Registers an input provider with the input manager.

ParameterTypeDescription
inputProviderobjectThe input provider to register.

Returns InputProviderSite

ProcessInput(InputEventArgs input)

public bool ProcessInput(InputEventArgs input)

Synchronously processes the specified input.

Returns bool — Whether or not any event generated as a consequence of this event was handled.

Fields

InputDeviceEvents

public DeviceEvents[] InputDeviceEvents

The per-device input processing events, indexed by input device type.