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
Structs§
- CustomCursor Source 
- Source for CustomCursor.
- DisplayHandle Wrapper 
- A wrapper around winit::event_loop::OwnedDisplayHandle
- EventLoop Proxy 
- Used to send custom events to EventLoop.
- EventLoop Proxy Wrapper 
- A wrapper type around winit::event_loop::EventLoopProxywith the specificwinit::event::Event::UserEventused in theWinitPlugin.
- RawWinitWindow 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
- WinitCustom Cursor 
- Use a custom image as a cursor (mouse pointer).
- WinitPlugin 
- A Pluginthat useswinitto create and manage windows, and receive window and input events.
- WinitSettings 
- Settings for the WinitPlugin.
- WinitWindows 
- A resource mapping window entities to their winit-backendWindowstates.
Enums§
- UpdateMode 
- Determines how frequently an Appshould update.
Constants§
- WINIT_WINDOWS 
- Temporary storage of WinitWindows data to replace usage of !Sendresources. This will be replaced with proper storage of!Senddata after issue #17667 is complete.
Functions§
- create_monitors 
- Synchronize available monitors as reported by winitwithMonitorentities in the world.
- create_windows 
- Creates new windows on the winitbackend for each entity with a newly-addedWindowcomponent.
- get_selected_ videomode 
- Returns some winit::monitor::VideoModeHandlegiven aMonitorHandleand aVideoModeSelectionor 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§
- CreateMonitor Params 
- The parameters of the create_monitorssystem.
- CreateWindow Params 
- The parameters of the create_windowssystem.