fluid.io.action

This module contains interfaces for mapping input events to input actions.

Public Imports

fluid.input
public import fluid.input;
Undocumented in source.

Members

Enums

isRetrievableResource
eponymoustemplate isRetrievableResource(T)
Undocumented in source.

Functions

castIfAcceptsInput
inout(T) castIfAcceptsInput(Object node)

Cast the node to given type if it accepts input using the given method.

inputActionID
InputActionID inputActionID()

Get the ID of an input action.

runInputActionHandler
bool runInputActionHandler(T action, bool delegate(T action) @(safe) handler)
bool runInputActionHandler(T action, void delegate(T action) @(safe) handler)
bool runInputActionHandler(T , bool delegate() @(safe) handler)
bool runInputActionHandler(T , void delegate() @(safe) handler)

Helper function to run an input action handler through one of the possible overloads.

runInputActionHandler
bool runInputActionHandler(T action, IO io, int number, bool delegate(T action, R resource) @(safe) handler)
bool runInputActionHandler(T action, IO io, int number, void delegate(T action, R resource) @(safe) handler)
bool runInputActionHandler(T , IO io, int number, bool delegate(R resource) @(safe) handler)
bool runInputActionHandler(T , IO io, int number, void delegate(R resource) @(safe) handler)
bool runInputActionHandler(T action, IO , int , bool delegate(T action) @(safe) handler)
bool runInputActionHandler(T action, IO , int , void delegate(T action) @(safe) handler)
bool runInputActionHandler(T , IO , int , bool delegate() @(safe) handler)
bool runInputActionHandler(T , IO , int , void delegate() @(safe) handler)

Uniform wrapper over the varied set of input action handler variants.

runInputActionHandler
bool runInputActionHandler(T aggregate, InputActionID actionID, bool isActive)

Run a handler for an input action.

runInputActionHandler
bool runInputActionHandler(T aggregate, IO io, int number, InputActionID actionID, bool isActive)

Run a handler for an input action.

Interfaces

ActionIO
interface ActionIO

I/O interface for mapping input events to input actions.

Actionable
interface Actionable

This is a base interface for nodes that respond to input actions. While ActionIO shouldn't interact with nodes directly, input handling systems like FocusIO or HoverIO will expect nodes to implement this interface if they support input actions.

Structs

InputActionHandler
struct InputActionHandler(alias action, alias actionHandler)

Wraps an input action handler.

InputEvent
struct InputEvent

Represents an event coming from an input device, like a pressed key, button or a gesture.

InputEventCode
struct InputEventCode

Uniquely codes a pressed key, button or a gesture, by using an I/O ID and event code map. Each I/O interface can define its own keys and buttons it needs to map. The way it maps codes to buttons is left up to the interface to define, but it usually is with an enum.

Templates

InputActionHandlers
template InputActionHandlers(T)

Find every input action handler in the given type, and check which input actions it handles.

inputEvents
template inputEvents(LocalIO, Event)

Template with a set of functions for creating input event and input event codes from an enum. It can be used as a mixin in device nodes; see MouseIO and KeyboardIO for sample usage.

isInputAction
template isInputAction(alias action)

Check if the given symbol defines an input action.

Meta