WindowExtWindows

Trait WindowExtWindows 

Source
pub trait WindowExtWindows: WindowPrivate {
    // Required methods
    fn hinstance(&self) -> HINSTANCE;
    fn hwnd(&self) -> HWND;
    fn set_enable(&self, enabled: bool);
    fn set_taskbar_icon(&self, taskbar_icon: Option<Icon>);
    fn set_skip_taskbar(&self, skip: bool);
    fn set_undecorated_shadow(&self, shadow: bool);
}
Expand description

Additional methods on Window that are specific to Windows.

Required Methods§

Source

fn hinstance(&self) -> HINSTANCE

Returns the HINSTANCE of the window

Source

fn hwnd(&self) -> HWND

Returns the native handle that is used by this window.

The pointer will become invalid when the native window was destroyed.

Source

fn set_enable(&self, enabled: bool)

Enables or disables mouse and keyboard input to the specified window.

A window must be enabled before it can be activated. If an application has create a modal dialog box by disabling its owner window (as described in WindowBuilderExtWindows::with_owner_window), the application must enable the owner window before destroying the dialog box. Otherwise, another window will receive the keyboard focus and be activated.

If a child window is disabled, it is ignored when the system tries to determine which window should receive mouse messages.

For more information, see https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enablewindow#remarks and https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#disabled-windows

Source

fn set_taskbar_icon(&self, taskbar_icon: Option<Icon>)

This sets ICON_BIG. A good ceiling here is 256x256.

Source

fn set_skip_taskbar(&self, skip: bool)

Whether to show or hide the window icon in the taskbar.

Source

fn set_undecorated_shadow(&self, shadow: bool)

Shows or hides the background drop shadow for undecorated windows.

Enabling the shadow causes a thin 1px line to appear on the top of the window.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§