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§
- ClosingWindow 
- Marker component for a Windowthat has been requested to close and is in the process of closing (on the next frame).
- CursorEntered 
- An event that is sent whenever the user’s cursor enters a window.
- CursorLeft 
- An event that is sent whenever the user’s cursor leaves a window.
- CursorMoved 
- An event reporting that the mouse cursor has moved inside a window.
- CursorOptions 
- Cursor data for a Window.
- CustomCursor Image 
- A custom cursor created from an image.
- CustomCursor Url 
- A custom cursor created from a URL. Note that this currently only works on the web.
- EnabledButtons 
- Specifies which Windowcontrol buttons should be enabled.
- InternalWindow State 
- Stores internal Windowstate 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.
- NormalizedWindow Ref 
- A flattened representation of a window reference for equality/hashing purposes.
- PrimaryMonitor 
- A marker component for the primary monitor
- PrimaryWindow 
- Marker Componentfor the window considered the primary window.
- RawHandleWrapper 
- A wrapper over RawWindowHandleandRawDisplayHandlethat allows us to safely pass it across threads.
- RawHandleWrapper Holder 
- Holder of the RawHandleWrapperwith wrappers, to allow use in asynchronous context
- RequestRedraw 
- 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.
- ThreadLocked RawWindow Handle Wrapper 
- A RawHandleWrapperthat cannot be sent across threads.
- VideoMode 
- Represents a video mode that a monitor supports
- Window
- The defining Componentfor window entities, storing information about how it should appear and behave.
- WindowBackend Scale Factor Changed 
- An event that indicates a window’s OS-reported scale factor has changed.
- WindowClose 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.
- WindowClosed 
- An event that is sent whenever a window is closed. This will be sent when
the window entity loses its Windowcomponent or is despawned.
- WindowClosing 
- An event that is sent whenever a window is closing. This will be sent when
after a WindowCloseRequestedevent is received and the window is in the process of closing.
- WindowCreated 
- An event that is sent whenever a new window is created.
- WindowDestroyed 
- An event that is sent whenever a window is destroyed by the underlying window system.
- WindowFocused 
- An event that indicates a window has received or lost focus.
- WindowMoved 
- An event that is sent when a window is repositioned in physical pixels.
- WindowOccluded 
- The window has been occluded (completely hidden from view).
- WindowPlugin 
- A Pluginthat defines an interface for windowing support in Bevy.
- WindowResize Constraints 
- The size limits on a Window.
- WindowResized 
- A window event that is sent whenever a window’s logical size has changed.
- WindowResolution 
- Controls the size of a Window
- WindowScale Factor Changed 
- An event that indicates a window’s scale factor has changed.
- WindowTheme Changed 
- An event sent when the system theme changes for a window.
- WindowWrapper 
- A wrapper over a window.
Enums§
- AppLifecycle
- Application lifetime events
- CompositeAlpha Mode 
- Specifies how the alpha channel of the textures should be handled during compositing, for a Window.
- CursorGrab Mode 
- Defines if and how the cursor is grabbed by a Window.
- CursorIcon 
- Insert into a window entity to set the cursor for that window.
- CustomCursor 
- Custom cursor image data.
- ExitCondition 
- Defines the specific conditions the application should exit on
- FileDrag AndDrop 
- Events related to files being dragged and dropped on a window.
- Ime
- An Input Method Editor event.
- MonitorSelection 
- References a screen monitor.
- PresentMode 
- Presentation mode for a Window.
- ScreenEdge 
- The edges of a screen. Corresponds to winit::platform::ios::ScreenEdge.
- SystemCursor Icon 
- The icon to display for a window.
- VideoMode Selection 
- References an exclusive fullscreen video mode.
- WindowEvent 
- Wraps all bevy_windowandbevy_inputevents in a common enum.
- WindowLevel 
- Specifies where a Windowshould appear relative to other overlapping windows (on top or under) .
- WindowMode 
- Defines the way a Windowis displayed.
- WindowPosition 
- Defines where a Windowshould be placed on the screen.
- WindowRef 
- Reference to a Window, whether it be a direct link to a specific entity or a more vague defaulting choice.
- WindowTheme 
- The Windowtheme 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