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§
Sourcefn ns_window(&self) -> *mut c_void
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.
Sourcefn ns_view(&self) -> *mut c_void
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.
Sourcefn simple_fullscreen(&self) -> bool
fn simple_fullscreen(&self) -> bool
Returns whether or not the window is in simple fullscreen mode.
Sourcefn set_simple_fullscreen(&self, fullscreen: bool) -> bool
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.
Sourcefn has_shadow(&self) -> bool
fn has_shadow(&self) -> bool
Returns whether or not the window has shadow.
Sourcefn set_has_shadow(&self, has_shadow: bool)
fn set_has_shadow(&self, has_shadow: bool)
Sets whether or not the window has shadow.
Sourcefn set_traffic_light_inset<P>(&self, position: P)
fn set_traffic_light_inset<P>(&self, position: P)
Set the window traffic light position relative to the upper left corner
Sourcefn set_is_document_edited(&self, edited: bool)
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
Sourcefn is_document_edited(&self) -> bool
fn is_document_edited(&self) -> bool
Get the window’s edit state
Sourcefn set_allows_automatic_window_tabbing(&self, enabled: bool)
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
Sourcefn allows_automatic_window_tabbing(&self) -> bool
fn allows_automatic_window_tabbing(&self) -> bool
Returns whether the system can automatically organize windows into tabs.
Sourcefn set_tabbing_identifier(&self, identifier: &str)
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
Sourcefn tabbing_identifier(&self) -> String
fn tabbing_identifier(&self) -> String
Returns the window’s tabbing identifier.
Sourcefn set_fullsize_content_view(&self, fullsize: bool)
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
Sourcefn set_titlebar_transparent(&self, transparent: bool)
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
Sourcefn set_badge_label(&self, label: Option<String>)
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.