Expand description
Configure the window of your application in native platforms.
Modules§
- icon
- Attach an icon to the window of your application.
- raw_
window_ handle - Interoperability library for Rust Windowing applications.
- screenshot
- Take screenshots of a window.
- settings
- Configure your windows.
Structs§
- Icon
- An window icon normally used for the titlebar or taskbar.
- Id
- The id of the window.
- Screenshot
- Data of a screenshot, captured with
window::screenshot()
. - Settings
- The window settings of an application.
Enums§
- Action
- An operation to be performed on some window.
- Direction
- The cardinal directions relative to the center of a window.
- Event
- A window-related event.
- Level
- A window level groups windows with respect to their z-position.
- Mode
- The mode of a window-based application.
- Position
- The position of a window in a given screen.
- Redraw
Request - A request to redraw a window.
- User
Attention - The type of user attention to request.
Functions§
- close
- Closes the window with
id
. - close_
events - Subscribes to all
Event::Closed
occurrences in the running application. - close_
requests - Subscribes to all
Event::CloseRequested
occurrences in the running application. - disable_
mouse_ passthrough - Disable mouse passthrough for the given window.
- drag
- Begins dragging the window while the left mouse button is held.
- drag_
resize - Begins resizing the window while the left mouse button is held.
- enable_
mouse_ passthrough - Enables mouse passthrough for the given window.
- events
- Subscribes to all window events of the running application.
- frames
- Subscribes to the frames of the window of the running application.
- gain_
focus - Brings the window to the front and sets input focus. Has no effect if the window is already in focus, minimized, or not visible.
- get_
latest - Gets the window
Id
of the latest window. - get_
maximized - Gets the maximized state of the window with the given
Id
. - get_
minimized - Gets the minimized state of the window with the given
Id
. - get_
mode - Gets the current
Mode
of the window. - get_
oldest - Gets the window
Id
of the oldest window. - get_
position - Gets the position in logical coordinates of the window with the given
Id
. - get_
raw_ id - Gets an identifier unique to the window, provided by the underlying windowing system. This is
not to be confused with
Id
. - get_
scale_ factor - Gets the scale factor of the window with the given
Id
. - get_
size - Get the window’s size in logical dimensions.
- maximize
- Maximizes the window.
- minimize
- Minimizes the window.
- move_to
- Moves the window to the given logical coordinates.
- open
- Opens a new window with the given
Settings
; producing theId
of the new window on completion. - open_
events - Subscribes to all
Event::Opened
occurrences in the running application. - request_
user_ attention - Request user attention to the window. This has no effect if the application
is already focused. How requesting for user attention manifests is platform dependent,
see
UserAttention
for details. - resize
- Resizes the window to the given logical dimensions.
- resize_
events - Subscribes to all
Event::Resized
occurrences in the running application. - run_
with_ handle - Runs the given callback with the native window handle for the window with the given id.
- screenshot
- Captures a
Screenshot
from the window. - set_
icon - Changes the
Icon
of the window. - set_
level - Changes the window
Level
. - set_
max_ size - Set the inner maximum size of the window.
- set_
min_ size - Set the inner minimum size of the window.
- set_
mode - Changes the
Mode
of the window. - set_
resizable - Set the window to be resizable or not.
- set_
resize_ increments - Set the window size increment.
- show_
system_ menu - Show the system menu at cursor position.
- toggle_
decorations - Toggles the window decorations.
- toggle_
maximize - Toggles the window to maximized or back.