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.
DisplayHandleWrapper
A wrapper around winit::event_loop::OwnedDisplayHandle
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.
RawWinitWindowEvent
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
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_selected_videomode
Returns some winit::monitor::VideoModeHandle given a MonitorHandle and a VideoModeSelection 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§

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