pub struct Window { /* private fields */ }Expand description
The Win32 implementation of the main Window object.
Implementations§
Source§impl Window
impl Window
pub fn raw_window_handle_rwh_06(&self) -> Result<RawWindowHandle, HandleError>
pub fn raw_display_handle_rwh_06(&self) -> Result<RawDisplayHandle, HandleError>
pub fn set_enable(&self, enabled: bool)
pub fn set_skip_taskbar(&self, skip: bool)
pub fn set_undecorated_shadow(&self, shadow: bool)
pub fn set_system_backdrop(&self, backdrop_type: BackdropType)
pub fn set_taskbar_icon(&self, taskbar_icon: Option<Icon>)
pub fn set_border_color(&self, color: Color)
pub fn set_title_background_color(&self, color: Color)
pub fn set_title_text_color(&self, color: Color)
pub fn set_corner_preference(&self, preference: CornerPreference)
pub fn set_use_system_scroll_speed(&self, should_use: bool)
Trait Implementations§
Source§impl HasDisplayHandle for Window
impl HasDisplayHandle for Window
Source§fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
Get a handle to the display controller of the windowing system.
Source§impl HasWindowHandle for Window
impl HasWindowHandle for Window
Source§fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
Get a handle to the window.
Source§impl Window for Window
impl Window for Window
Source§fn set_transparent(&self, transparent: bool)
fn set_transparent(&self, transparent: bool)
Change the window transparency state. Read more
Source§fn set_visible(&self, visible: bool)
fn set_visible(&self, visible: bool)
Modifies the window’s visibility. Read more
Source§fn request_redraw(&self)
fn request_redraw(&self)
Queues a
WindowEvent::RedrawRequested event to be emitted that aligns with the windowing
system drawing loop. Read moreSource§fn pre_present_notify(&self)
fn pre_present_notify(&self)
Notify the windowing system before presenting to the window. Read more
Source§fn outer_position(&self) -> Result<PhysicalPosition<i32>, RequestError>
fn outer_position(&self) -> Result<PhysicalPosition<i32>, RequestError>
The position of the top-left hand corner of the window relative to the top-left hand corner
of the desktop. Read more
Source§fn surface_position(&self) -> PhysicalPosition<i32>
fn surface_position(&self) -> PhysicalPosition<i32>
The position of the top-left hand corner of the surface relative to the top-left hand corner
of the window. Read more
Source§fn set_outer_position(&self, position: Position)
fn set_outer_position(&self, position: Position)
Sets the position of the window on the desktop. Read more
Source§fn surface_size(&self) -> PhysicalSize<u32>
fn surface_size(&self) -> PhysicalSize<u32>
Returns the size of the window’s render-able surface. Read more
Source§fn outer_size(&self) -> PhysicalSize<u32>
fn outer_size(&self) -> PhysicalSize<u32>
Returns the size of the entire window. Read more
Source§fn request_surface_size(&self, size: Size) -> Option<PhysicalSize<u32>>
fn request_surface_size(&self, size: Size) -> Option<PhysicalSize<u32>>
Request the new size for the surface. Read more
Source§fn safe_area(&self) -> PhysicalInsets<u32>
fn safe_area(&self) -> PhysicalInsets<u32>
The inset area of the surface that is unobstructed. Read more
Source§fn set_min_surface_size(&self, size: Option<Size>)
fn set_min_surface_size(&self, size: Option<Size>)
Sets a minimum dimensions of the window’s surface. Read more
Source§fn set_max_surface_size(&self, size: Option<Size>)
fn set_max_surface_size(&self, size: Option<Size>)
Sets a maximum dimensions of the window’s surface. Read more
Source§fn surface_resize_increments(&self) -> Option<PhysicalSize<u32>>
fn surface_resize_increments(&self) -> Option<PhysicalSize<u32>>
Returns surface resize increments if any were set. Read more
Source§fn set_surface_resize_increments(&self, increments: Option<Size>)
fn set_surface_resize_increments(&self, increments: Option<Size>)
Sets resize increments of the surface. Read more
Source§fn set_resizable(&self, resizable: bool)
fn set_resizable(&self, resizable: bool)
Sets whether the window is resizable or not. Read more
Source§fn is_resizable(&self) -> bool
fn is_resizable(&self) -> bool
Gets the window’s current resizable state. Read more
Sets the enabled window buttons. Read more
Gets the enabled window buttons. Read more
Source§fn set_cursor(&self, cursor: Cursor)
fn set_cursor(&self, cursor: Cursor)
Modifies the cursor icon of the window. Read more
Source§fn set_cursor_grab(&self, mode: CursorGrabMode) -> Result<(), RequestError>
fn set_cursor_grab(&self, mode: CursorGrabMode) -> Result<(), RequestError>
Source§fn set_cursor_visible(&self, visible: bool)
fn set_cursor_visible(&self, visible: bool)
Modifies the cursor’s visibility. Read more
Source§fn scale_factor(&self) -> f64
fn scale_factor(&self) -> f64
Returns the scale factor that can be used to map logical pixels to physical pixels, and
vice versa. Read more
Source§fn set_cursor_position(&self, position: Position) -> Result<(), RequestError>
fn set_cursor_position(&self, position: Position) -> Result<(), RequestError>
Changes the position of the cursor in window coordinates. Read more
Source§fn drag_window(&self) -> Result<(), RequestError>
fn drag_window(&self) -> Result<(), RequestError>
Moves the window with the left mouse button until the button is released. Read more
Source§fn drag_resize_window(
&self,
direction: ResizeDirection,
) -> Result<(), RequestError>
fn drag_resize_window( &self, direction: ResizeDirection, ) -> Result<(), RequestError>
Resizes the window with the left mouse button until the button is released. Read more
Show window menu at a specified position in surface coordinates. Read more
Source§fn set_cursor_hittest(&self, hittest: bool) -> Result<(), RequestError>
fn set_cursor_hittest(&self, hittest: bool) -> Result<(), RequestError>
Modifies whether the window catches cursor events. Read more
Source§fn set_minimized(&self, minimized: bool)
fn set_minimized(&self, minimized: bool)
Minimize the window, or put it back from the minimized state. Read more
Source§fn set_maximized(&self, maximized: bool)
fn set_maximized(&self, maximized: bool)
Sets the window to maximized or back. Read more
Source§fn is_maximized(&self) -> bool
fn is_maximized(&self) -> bool
Gets the window’s current maximized state. Read more
Source§fn fullscreen(&self) -> Option<Fullscreen>
fn fullscreen(&self) -> Option<Fullscreen>
Gets the window’s current fullscreen state. Read more
Source§fn set_fullscreen(&self, fullscreen: Option<Fullscreen>)
fn set_fullscreen(&self, fullscreen: Option<Fullscreen>)
Set the window’s fullscreen state. Read more
Source§fn set_decorations(&self, decorations: bool)
fn set_decorations(&self, decorations: bool)
Turn window decorations on or off. Read more
Source§fn is_decorated(&self) -> bool
fn is_decorated(&self) -> bool
Gets the window’s current decorations state. Read more
Source§fn set_window_level(&self, level: WindowLevel)
fn set_window_level(&self, level: WindowLevel)
Change the window level. Read more
Source§fn current_monitor(&self) -> Option<CoreMonitorHandle>
fn current_monitor(&self) -> Option<CoreMonitorHandle>
Returns the monitor on which the window currently resides. Read more
Source§fn available_monitors(&self) -> Box<dyn Iterator<Item = CoreMonitorHandle>>
fn available_monitors(&self) -> Box<dyn Iterator<Item = CoreMonitorHandle>>
Returns the list of all the monitors available on the system. Read more
Source§fn primary_monitor(&self) -> Option<CoreMonitorHandle>
fn primary_monitor(&self) -> Option<CoreMonitorHandle>
Returns the primary monitor of the system. Read more
Source§fn ime_capabilities(&self) -> Option<ImeCapabilities>
fn ime_capabilities(&self) -> Option<ImeCapabilities>
Return enabled by the client
ImeCapabilities for this window. Read moreSource§fn request_ime_update(&self, request: ImeRequest) -> Result<(), ImeRequestError>
fn request_ime_update(&self, request: ImeRequest) -> Result<(), ImeRequestError>
Atomically apply request to IME. Read more
Source§fn request_user_attention(&self, request_type: Option<UserAttentionType>)
fn request_user_attention(&self, request_type: Option<UserAttentionType>)
Requests 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
UserAttentionType for details. Read moreSource§fn focus_window(&self)
fn focus_window(&self)
Brings the window to the front and sets input focus. Has no effect if the window is
already in focus, minimized, or not visible. Read more
Source§fn set_content_protected(&self, protected: bool)
fn set_content_protected(&self, protected: bool)
Prevents the window contents from being captured by other apps. Read more
Source§fn reset_dead_keys(&self)
fn reset_dead_keys(&self)
Reset the dead key state of the keyboard. Read more
Source§fn rwh_06_window_handle(&self) -> &dyn HasWindowHandle
fn rwh_06_window_handle(&self) -> &dyn HasWindowHandle
Get the raw-window-handle v0.6 window handle.
Source§fn rwh_06_display_handle(&self) -> &dyn HasDisplayHandle
fn rwh_06_display_handle(&self) -> &dyn HasDisplayHandle
Get the raw-window-handle v0.6 display handle.
Source§fn set_ime_cursor_area(&self, position: Position, size: Size)
fn set_ime_cursor_area(&self, position: Position, size: Size)
👎Deprecated: use Window::request_ime_update instead
Set the IME cursor editing area, where the
position is the top left corner of that area
in surface coordinates and size is the size of this area starting from the position. An
example of such area could be a input field in the UI or line in the editor. Read moreSource§fn set_ime_allowed(&self, allowed: bool)
fn set_ime_allowed(&self, allowed: bool)
👎Deprecated: use Window::request_ime_update instead
Sets whether the window should get IME events Read more
Source§fn set_ime_purpose(&self, purpose: ImePurpose)
fn set_ime_purpose(&self, purpose: ImePurpose)
👎Deprecated: use Window::request_ime_update instead
Sets the IME purpose for the window using
ImePurpose. Read moreAuto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnwindSafe for Window
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
Source§fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
👎Deprecated: Use
HasDisplayHandle insteadSource§impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
Source§fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
👎Deprecated: Use
HasWindowHandle instead