tauri_runtime_wry

Trait WindowExtMacOS

Source
pub trait WindowExtMacOS {
Show 16 methods // Required methods fn ns_window(&self) -> *mut c_void; fn ns_view(&self) -> *mut c_void; fn simple_fullscreen(&self) -> bool; fn set_simple_fullscreen(&self, fullscreen: bool) -> bool; fn has_shadow(&self) -> bool; fn set_has_shadow(&self, has_shadow: bool); fn set_traffic_light_inset<P>(&self, position: P) where P: Into<Position>; fn set_is_document_edited(&self, edited: bool); fn is_document_edited(&self) -> bool; fn set_allows_automatic_window_tabbing(&self, enabled: bool); fn allows_automatic_window_tabbing(&self) -> bool; fn set_tabbing_identifier(&self, identifier: &str); fn tabbing_identifier(&self) -> String; fn set_fullsize_content_view(&self, fullsize: bool); fn set_titlebar_transparent(&self, transparent: bool); fn set_badge_label(&self, label: Option<String>);
}
Expand description

Additional methods on Window that are specific to MacOS.

Required Methods§

Source

fn ns_window(&self) -> *mut c_void

Returns a pointer to the cocoa NSWindow that is used by this window.

The pointer will become invalid when the Window is destroyed.

Source

fn ns_view(&self) -> *mut c_void

Returns a pointer to the cocoa NSView that is used by this window.

The pointer will become invalid when the Window is destroyed.

Source

fn simple_fullscreen(&self) -> bool

Returns whether or not the window is in simple fullscreen mode.

Source

fn set_simple_fullscreen(&self, fullscreen: bool) -> bool

Toggles a fullscreen mode that doesn’t require a new macOS space. Returns a boolean indicating whether the transition was successful (this won’t work if the window was already in the native fullscreen).

This is how fullscreen used to work on macOS in versions before Lion. And allows the user to have a fullscreen window without using another space or taking control over the entire monitor.

Source

fn has_shadow(&self) -> bool

Returns whether or not the window has shadow.

Source

fn set_has_shadow(&self, has_shadow: bool)

Sets whether or not the window has shadow.

Source

fn set_traffic_light_inset<P>(&self, position: P)
where P: Into<Position>,

Set the window traffic light position relative to the upper left corner

Source

fn set_is_document_edited(&self, edited: bool)

Put the window in a state which indicates a file save is required.

https://developer.apple.com/documentation/appkit/nswindow/1419311-isdocumentedited

Source

fn is_document_edited(&self) -> bool

Get the window’s edit state

Source

fn set_allows_automatic_window_tabbing(&self, enabled: bool)

Sets whether the system can automatically organize windows into tabs.

https://developer.apple.com/documentation/appkit/nswindow/1646657-allowsautomaticwindowtabbing

Source

fn allows_automatic_window_tabbing(&self) -> bool

Returns whether the system can automatically organize windows into tabs.

Source

fn set_tabbing_identifier(&self, identifier: &str)

Group windows together by using the same tabbing identifier.

https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier

Source

fn tabbing_identifier(&self) -> String

Returns the window’s tabbing identifier.

Source

fn set_fullsize_content_view(&self, fullsize: bool)

The content view consumes the full size of the window.

https://developer.apple.com/documentation/appkit/nsfullsizecontentviewwindowmask

Source

fn set_titlebar_transparent(&self, transparent: bool)

A Boolean value that indicates whether the title bar draws its background.

https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent

Source

fn set_badge_label(&self, label: Option<String>)

Sets the badge label on the taskbar

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§