Expand description
This module contains traits and structs that provide interactivity of a Galileo map.
User interaction handling is done in several steps:
- OS event is converted to a common
RawUserEvent
enum. For example, apps that usewinit
can useWinitInputHandler
to convert winit::event::WindowEvent intoRawUserEvent
. RawUserEvent
is given to theEventProcessor
, that converts it into aUserEvent
.EventProcessor
keeps track of input state (which keys, modifiers and mouse buttons) are pressed, and provides a more convenient way to handle user interactions for the application.EventProcessor
has a list ofUserEventHandler
s, which change the state of application based on the events.
To write a user interaction logic, the app must provide an implementation of UserEventHandler
trait and add it
to the EventProcessor
handler list.
Structs§
- Stores input state, converts
RawUserEvent
intoUserEvent
and manages a list of event handlers. - Event handler of a map, providing panning, zooming and tilting capabilities.
- State of all mouse buttons.
- State of the mouse at the moment of the event.
- Details of a touch event.
Enums§
- Value returned by an
UserEventHandler
to indicate the status of the event. - Mouse button enum.
- State of a mouse button.
- Raw user interaction event. This type is an intermediate step between OS event and an event that will be processed by the application. It does not provide any state information, as not all supported platforms give this information together with the event. Instead, the input state information is stored in the
EventProcessor
struct, which can combineRawUserEvent
with the state to produceUserEvent
which is then given to the application. - User interaction event. This is the main type that the application would use through
UserEventHandler
s.
Traits§
- User input handler.
Type Aliases§
- Id of the current touch.