Module window

Source
Expand description

Build window-based GUI applications.

Re-exports§

pub use raw_window_handle;

Enums§

Action
An operation to be performed on some window.

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 the [Id] 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.