pub trait WindowExtMacOS {
Show 22 methods
// Required methods
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_tabbing_identifier(&self, identifier: &str);
fn tabbing_identifier(&self) -> String;
fn select_next_tab(&self);
fn select_previous_tab(&self);
fn select_tab_at_index(&self, index: usize);
fn num_tabs(&self) -> usize;
fn is_document_edited(&self) -> bool;
fn set_document_edited(&self, edited: bool);
fn set_option_as_alt(&self, option_as_alt: OptionAsAlt);
fn option_as_alt(&self) -> OptionAsAlt;
fn set_borderless_game(&self, borderless_game: bool);
fn is_borderless_game(&self) -> bool;
fn set_unified_titlebar(&self, unified_titlebar: bool);
fn unified_titlebar(&self) -> bool;
fn set_fullscreen_auxiliary(&self, fullscreen_auxiliary: bool);
fn fullscreen_auxiliary(&self) -> bool;
fn set_blur_material(&self, blur_material: BlurMaterial);
fn blur_material(&self) -> BlurMaterial;
}Expand description
Additional methods on Window that are specific to MacOS.
Required Methods§
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.
Make sure you only draw your important content inside the safe area so that it does not
overlap with the notch on newer devices, see Window::safe_area for details.
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_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 select_next_tab(&self)
fn select_next_tab(&self)
Select next tab.
Sourcefn select_previous_tab(&self)
fn select_previous_tab(&self)
Select previous tab.
Sourcefn select_tab_at_index(&self, index: usize)
fn select_tab_at_index(&self, index: usize)
Select the tab with the given index.
Will no-op when the index is out of bounds.
Sourcefn is_document_edited(&self) -> bool
fn is_document_edited(&self) -> bool
Sourcefn set_document_edited(&self, edited: bool)
fn set_document_edited(&self, edited: bool)
Put the window in a state which indicates a file save is required.
Sourcefn set_option_as_alt(&self, option_as_alt: OptionAsAlt)
fn set_option_as_alt(&self, option_as_alt: OptionAsAlt)
Set option as alt behavior as described in OptionAsAlt.
This will ignore diacritical marks and accent characters from being processed as received characters. Instead, the input device’s raw character will be placed in event queues with the Alt modifier set.
Sourcefn option_as_alt(&self) -> OptionAsAlt
fn option_as_alt(&self) -> OptionAsAlt
Getter for the WindowExtMacOS::set_option_as_alt.
Sourcefn set_borderless_game(&self, borderless_game: bool)
fn set_borderless_game(&self, borderless_game: bool)
Disable the Menu Bar and Dock in Simple or Borderless Fullscreen mode. Useful for games.
The effect is applied when WindowExtMacOS::set_simple_fullscreen or
Window::set_fullscreen is called.
Sourcefn is_borderless_game(&self) -> bool
fn is_borderless_game(&self) -> bool
Getter for the WindowExtMacOS::set_borderless_game.
Sourcefn set_unified_titlebar(&self, unified_titlebar: bool)
fn set_unified_titlebar(&self, unified_titlebar: bool)
Makes the titlebar bigger, effectively adding more space around the window controls if the titlebar is invisible.
Sourcefn unified_titlebar(&self) -> bool
fn unified_titlebar(&self) -> bool
Getter for the WindowExtMacOS::set_unified_titlebar.
Sourcefn set_fullscreen_auxiliary(&self, fullscreen_auxiliary: bool)
fn set_fullscreen_auxiliary(&self, fullscreen_auxiliary: bool)
Sets whether the window can be shown on the same Space as a fullscreen window.
This corresponds to NSWindowCollectionBehaviorFullScreenAuxiliary, and is useful
for floating palettes, inspectors and other secondary windows accompanying a fullscreen
window. Without it, ordering a new window on screen while another window of the
application is fullscreen on the active Space makes macOS switch Spaces or attempt
Split View tiling.
A window marked as fullscreen auxiliary cannot itself enter (native) fullscreen;
Window::set_fullscreen will warn and do nothing. Call
set_fullscreen_auxiliary(false) first if you want to make the window fullscreen.
Sourcefn fullscreen_auxiliary(&self) -> bool
fn fullscreen_auxiliary(&self) -> bool
Getter for the WindowExtMacOS::set_fullscreen_auxiliary.
Sourcefn set_blur_material(&self, blur_material: BlurMaterial)
fn set_blur_material(&self, blur_material: BlurMaterial)
Sets the material drawn behind the window when it is blurred.
Takes effect the next time the window is blurred, and immediately if it already is. See
Window::set_blur.
Sourcefn blur_material(&self) -> BlurMaterial
fn blur_material(&self) -> BlurMaterial
Getter for the WindowExtMacOS::set_blur_material.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".