Expand description
Control callback and Id traits.
An implementation of Control is defined for each type of Input. These are
implemented as newtype structs with inner primitive ReprType
payload.
An implementation of Id is a serializable enum, parameterized by the Control
type, and convertable to control Fun
callbacks and to corresponding
Control ReprTypes.
To each implementation of Control is an associated Builtin Id type. Each
Control type can be extended by the Application by defining a new Id type
using the extend_control!
macro. This macro will ensure that the resulting
implementation does not overlap with the Builtin type in its conversion to a
Control ReprType.
Re-exports§
pub use self::axis::Axis;
pub use self::button::Button;
pub use self::motion::Motion;
pub use self::pointer::Pointer;
pub use self::system::System;
pub use self::text::Text;
pub use self::wheel::Wheel;
pub use ControlsBuilder as Builder;
Modules§
Structs§
- Controls
- A set of controls for looking up bindings
- Controls
Builder - Builder for
Controls
. - Fun
- A newtype wrapper for the parameterized control callback function type with payload type P.
Enums§
- Controls
Builder Error - Error type for ControlsBuilder
- Nil
- A nil type indicating no extra controls
Traits§
- Control
- A primitive control callback index with associated payload and built-in control callback IDs
- Id
- A type of serializable names that map to control callbacks.
Type Aliases§
- Repr
Type - Primitive control index type alias