Expand description
bevy_winit
provides utilities to handle window creation and the eventloop through winit
Most commonly, the WinitPlugin
is used as part of
DefaultPlugins
.
The app’s runner is set by WinitPlugin
and handles the winit
EventLoop
.
See winit_runner
for details.
Modules§
- accessibility
- Helpers for mapping window entities to accessibility types
- cursor
- Components to customize winit cursor
Structs§
- Custom
Cursor Source - Source for
CustomCursor
. - Display
Handle Wrapper - A wrapper around
winit::event_loop::OwnedDisplayHandle
- Event
Loop Proxy - Used to send custom events to
EventLoop
. - Event
Loop Proxy Wrapper - A wrapper type around
winit::event_loop::EventLoopProxy
with the specificwinit::event::Event::UserEvent
used in theWinitPlugin
. - RawWinit
Window Event - The original window event as produced by Winit. This is meant as an escape
hatch for power users that wish to add custom Winit integrations.
If you want to process events for your app or game, you should instead use
bevy::window::WindowEvent
, or one of its sub-events. - WakeUp
- The default event that can be used to wake the window loop Wakes up the loop if in wait state
- Winit
Custom Cursor - Use a custom image as a cursor (mouse pointer).
- Winit
Plugin - A
Plugin
that useswinit
to create and manage windows, and receive window and input events. - Winit
Settings - Settings for the
WinitPlugin
. - Winit
Windows - A resource mapping window entities to their
winit
-backendWindow
states.
Enums§
- Update
Mode - Determines how frequently an
App
should update.
Functions§
- create_
monitors - Synchronize available monitors as reported by
winit
withMonitor
entities in the world. - create_
windows - Creates new windows on the
winit
backend for each entity with a newly-addedWindow
component. - get_
selected_ videomode - Returns some
winit::monitor::VideoModeHandle
given aMonitorHandle
and aVideoModeSelection
or None if no valid matching video mode was found. - select_
monitor - Selects a monitor based on the given
MonitorSelection
. - winit_
window_ position - Compute the physical window position for a given
WindowPosition
.
Type Aliases§
- Create
Monitor Params - The parameters of the
create_monitors
system. - Create
Window Params - The parameters of the
create_windows
system.