Expand description
System for handling input related events.
§Weights
A weight can be assigned to each hook via the respective builder. Weight defines the order
in which hooks of the same class are called. A higher weight will be called first. Hooks
that have a weight specified can also block the execution of hooks in the same class by
a NoPass
varient of InputHookCtrl
.
§Press/Hold/Release Weight Class
These hook types all share the same weighing. An important note with this class is that
window hooks will get called before bin hooks. A press hook with a higher weight than
a release hook that returns a NoPass
varient of InputHookCtrl
will prevent the release
from being called if the either share a key. Likewise with a hold, a press of a higher
weight can prevent it getting it called, but unlike release it will not prevent it from
getting released.
§Enter/Leave
Window and Bins are seperate in the class of weights. Only hooks targeted for bins can
prevent hooks towards bins. Likewise with windows. A hook can effect multiple bins
depending of if require_on_top
has been set to false
. In this case hooks on different
bins can block the execution of one another.
§Character
Window and Bins are treated the same. They are called in order of their weight. Calling
a NoPass
varient of InputHookCtrl
prevents the execution of all lesser weighed hooks.
§Focus/FocusLost
Similar to Enter/Leave, but a hook can not effect multiple bins.
§Scroll
Similar to Enter/Leave, but windows and bins are in the same class of weights.
§Cursor
Same behavior as Scroll.
§Motion
Similar to Character, but there are no targets.
Structs§
- A wrapper around
char
that provides some convenience methods. - The main struct for the input system.
- Builder returned by
on_character
. - Builder returned by
on_cursor
. - Builder returned by
on_enter
oron_leave
. - Builder returned by
on_focus
oron_focus_lost
. - Builder returned by
on_hold
. - The main builder for
Input
. - An ID of a
Input
hook. - Builder returned by
on_motion
. - Builder returned by
on_press
oron_release
. - Builder returned by
on_scroll
. - State of cursor specific to the hook.
- State of
Key
’s specific to the hook. - State of a window.
Enums§
- An error that is returned by various
Input
related methods. - Controls what happens after the hook method is called.
- The target of a hook.
- A keyboard/mouse agnostic type.
- Enum of mouse buttons.
- For use when key location matters. May not always correlate to the actual key.
Traits§
- Trait used for various methods that can take multiple
Key
s.