Expand description
bevy_window
provides a platform-agnostic interface for windowing in Bevy.
This crate contains types for window management and events,
used by windowing implementors such as bevy_winit
.
The WindowPlugin
sets up some global window-related parameters and
is part of the DefaultPlugins
.
Modules§
- prelude
- The windowing prelude.
Structs§
- Closing
Window - Marker component for a
Window
that has been requested to close and is in the process of closing (on the next frame). - Cursor
Entered - An event that is sent whenever the user’s cursor enters a window.
- Cursor
Left - An event that is sent whenever the user’s cursor leaves a window.
- Cursor
Moved - An event reporting that the mouse cursor has moved inside a window.
- Cursor
Options - Cursor data for a
Window
. - Enabled
Buttons - Specifies which
Window
control buttons should be enabled. - Internal
Window State - Stores internal
Window
state that isn’t directly accessible. - Monitor
- Represents an available monitor as reported by the user’s operating system, which can be used to query information about the display, such as its size, position, and video modes.
- Normalized
Window Ref - A flattened representation of a window reference for equality/hashing purposes.
- Primary
Monitor - A marker component for the primary monitor
- Primary
Window - Marker
Component
for the window considered the primary window. - RawHandle
Wrapper - A wrapper over
RawWindowHandle
andRawDisplayHandle
that allows us to safely pass it across threads. - RawHandle
Wrapper Holder - Holder of the
RawHandleWrapper
with wrappers, to allow use in asynchronous context - Request
Redraw - An event that indicates all of the application’s windows should be redrawn,
even if their control flow is set to
Wait
and there have been no window events. - Thread
Locked RawWindow Handle Wrapper - A
RawHandleWrapper
that cannot be sent across threads. - Video
Mode - Represents a video mode that a monitor supports
- Window
- The defining
Component
for window entities, storing information about how it should appear and behave. - Window
Backend Scale Factor Changed - An event that indicates a window’s OS-reported scale factor has changed.
- Window
Close Requested - An event that is sent whenever the operating systems requests that a window be closed. This will be sent when the close button of the window is pressed.
- Window
Closed - An event that is sent whenever a window is closed. This will be sent when
the window entity loses its
Window
component or is despawned. - Window
Closing - An event that is sent whenever a window is closing. This will be sent when
after a
WindowCloseRequested
event is received and the window is in the process of closing. - Window
Created - An event that is sent whenever a new window is created.
- Window
Destroyed - An event that is sent whenever a window is destroyed by the underlying window system.
- Window
Focused - An event that indicates a window has received or lost focus.
- Window
Moved - An event that is sent when a window is repositioned in physical pixels.
- Window
Occluded - The window has been occluded (completely hidden from view).
- Window
Plugin - A
Plugin
that defines an interface for windowing support in Bevy. - Window
Resize Constraints - The size limits on a
Window
. - Window
Resized - A window event that is sent whenever a window’s logical size has changed.
- Window
Resolution - Controls the size of a
Window
- Window
Scale Factor Changed - An event that indicates a window’s scale factor has changed.
- Window
Theme Changed - An event sent when the system theme changes for a window.
- Window
Wrapper - A wrapper over a window.
Enums§
- AppLifecycle
- Application lifetime events
- Composite
Alpha Mode - Specifies how the alpha channel of the textures should be handled during compositing, for a
Window
. - Cursor
Grab Mode - Defines if and how the cursor is grabbed by a
Window
. - Exit
Condition - Defines the specific conditions the application should exit on
- File
Drag AndDrop - Events related to files being dragged and dropped on a window.
- Ime
- A Input Method Editor event.
- Monitor
Selection - References a screen monitor.
- Present
Mode - Presentation mode for a
Window
. - System
Cursor Icon - The icon to display for a window.
- Window
Event - Wraps all
bevy_window
andbevy_input
events in a common enum. - Window
Level - Specifies where a
Window
should appear relative to other overlapping windows (on top or under) . - Window
Mode - Defines the way a
Window
is displayed. - Window
Position - Defines where a
Window
should be placed on the screen. - Window
Ref - Reference to a
Window
, whether it be a direct link to a specific entity or a more vague defaulting choice. - Window
Theme - The
Window
theme variant to use.
Functions§
- close_
when_ requested - Close windows in response to
WindowCloseRequested
(e.g. when the close button is pressed). - exit_
on_ all_ closed - Exit the application when there are no open windows.
- exit_
on_ primary_ closed - Exit the application when the primary window has been closed