Crate winit

Source
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§

CustomCursorSource
Source for CustomCursor.
EventLoopProxy
Used to send custom events to EventLoop.
EventLoopProxyWrapper
A wrapper type around winit::event_loop::EventLoopProxy with the specific winit::event::Event::UserEvent used in the WinitPlugin.
WakeUp
The default event that can be used to wake the window loop Wakes up the loop if in wait state
WinitCustomCursor
Use a custom image as a cursor (mouse pointer).
WinitPlugin
A Plugin that uses winit to create and manage windows, and receive window and input events.
WinitSettings
Settings for the WinitPlugin.
WinitWindows
A resource mapping window entities to their winit-backend Window states.

Enums§

UpdateMode
Determines how frequently an App should update.

Functions§

create_monitors
Synchronize available monitors as reported by winit with Monitor entities in the world.
create_windows
Creates new windows on the winit backend for each entity with a newly-added Window component.
get_best_videomode
Gets the “best” video-mode handle from a monitor.
get_fitting_videomode
Gets the “best” video mode which fits the given dimensions.
select_monitor
Selects a monitor based on the given MonitorSelection.
winit_window_position
Compute the physical window position for a given WindowPosition.

Type Aliases§

CreateMonitorParams
The parameters of the create_monitors system.
CreateWindowParams
The parameters of the create_windows system.