Table of Contents

Class InputContextManager

Namespace
Gloam.Core.Input
Assembly
Gloam.Core.dll

Default implementation of input context manager

public class InputContextManager : IInputContextManager
Inheritance
InputContextManager
Implements
Inherited Members

Methods

ActivateContext(string)

Activates an input context

public void ActivateContext(string name)

Parameters

name string

AddContext(IInputContext)

Adds an input context to the manager

public void AddContext(IInputContext context)

Parameters

context IInputContext

DeactivateContext(string)

Deactivates an input context

public void DeactivateContext(string name)

Parameters

name string

GetAllContexts()

Gets all registered contexts

public IReadOnlyList<IInputContext> GetAllContexts()

Returns

IReadOnlyList<IInputContext>

GetContext(string)

Gets an input context by name

public IInputContext? GetContext(string name)

Parameters

name string

Returns

IInputContext

ProcessInputAsync(IInputDevice, CancellationToken)

Processes input through all active contexts in priority order

public Task ProcessInputAsync(IInputDevice inputDevice, CancellationToken ct = default)

Parameters

inputDevice IInputDevice
ct CancellationToken

Returns

Task

RemoveContext(string)

Removes an input context from the manager

public bool RemoveContext(string name)

Parameters

name string

Returns

bool