Crate bevy_window
source ·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
Structs
- Cursor data for a
Window. - An event that is sent whenever the user’s cursor enters a window.
- An event that is sent whenever the user’s cursor leaves a window.
- An event reporting that the mouse cursor has moved inside a window.
- Specifies which
Windowcontrol buttons should be enabled. - Stores internal
Windowstate that isn’t directly accessible. - A flattened representation of a window reference for equality/hashing purposes.
- Marker
Componentfor the window considered the primary window. - A wrapper over
RawWindowHandleandRawDisplayHandlethat allows us to safely pass it across threads. - An event that is sent whenever a window receives a character from the OS or underlying system.
- An event that indicates all of the application’s windows should be redrawn, even if their control flow is set to
Waitand there have been no window events. - A
RawHandleWrapperthat cannot be sent across threads. - The defining
Componentfor window entities, storing information about how it should appear and behave. - An event that indicates a window’s OS-reported scale factor has changed.
- 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.
- An event that is sent whenever a window is closed. This will be sent when the window entity loses its
Windowcomponent or is despawned. - An event that is sent whenever a new window is created.
- An event that is sent whenever a window is destroyed by the underlying window system.
- An event that indicates a window has received or lost focus.
- An event that is sent when a window is repositioned in physical pixels.
- A
Pluginthat defines an interface for windowing support in Bevy. - The size limits on a
Window. - A window event that is sent whenever a window’s logical size has changed.
- Controls the size of a
Window - An event that indicates a window’s scale factor has changed.
- An event sent when the system theme changes for a window.
Enums
- Application lifetime events
- Specifies how the alpha channel of the textures should be handled during compositing, for a
Window. - Defines the specific conditions the application should exit on
- Events related to files being dragged and dropped on a window.
- A Input Method Editor event.
- References a screen monitor.
- Presentation mode for a
Window. - Specifies where a
Windowshould appear relative to other overlapping windows (on top or under) . - Defines the way a
Windowis displayed. - Defines where a
Windowshould be placed on the screen. - Reference to a
Window, whether it be a direct link to a specific entity or a more vague defaulting choice. - The
Windowtheme variant to use.
Functions
- Close the focused window whenever the escape key (Esc) is pressed
- Close windows in response to
WindowCloseRequested(e.g. when the close button is pressed). - Exit the application when there are no open windows.
- Exit the application when the primary window has been closed