Skip to main content

FerroNativePlatform

Struct FerroNativePlatform 

Source
pub struct FerroNativePlatform { /* private fields */ }
Expand description

The macOS windowing platform.

Implementations§

Source§

impl FerroNativePlatform

Source

pub fn keyboard_device() -> Rc<KeyboardDevice>

The keyboard device of the platform.

Source

pub fn compositor() -> Rc<Compositor>

The compositor of the platform.

§Panics

Panics when the platform is not initialized on this thread.

Source

pub fn initialize_with_factory( factory: ComPtr<IFerroNativeFactory>, options: FerroNativePlatformOptions, ) -> Rc<FerroNativePlatform>

Initializes the platform over an existing native factory.

Source

pub fn initialize( options: FerroNativePlatformOptions, ) -> Rc<FerroNativePlatform>

Initializes the platform: creates the native factory (from the library named by the options, or the one linked into the application) and registers the platform services in the service locator. Must be called on the main thread.

§Panics

Panics when the native library named by the options cannot be loaded or has no factory export, and when the factory cannot be created.

Source

pub fn setup_application_menu_exporter(&self)

Exports the application menu: the menu attached to the application or, without one, a default menu; the standard items (Services, Hide, Quit, …) are appended unless the options disable them.

Source

pub fn setup_application_dock_menu_exporter(&self)

Exports the dock menu attached to the application, now and whenever it changes.

Source

pub fn setup_application_name(&self)

Sets the application title shown by the system (menu bar, dock) to the name of the current application, unless it is empty or white space.

§Panics

Panics when there is no current application.

Source

pub fn setup_application_name_with(&self, name: Option<&str>)

setup_application_name for a host without an application object.

Source

pub fn dispose(&self)

Releases the native factory. A host calls this before the process exits; the native side calls it when the system terminates the application.

Trait Implementations§

Source§

impl IWindowingPlatform for FerroNativePlatform

Source§

fn create_window(&self) -> Rc<dyn IWindowImpl>

Creates a window.
Source§

fn create_embeddable_top_level(&self) -> Rc<dyn ITopLevelImpl>

Creates a top-level that can be embedded into a foreign window.
Source§

fn create_embeddable_window(&self) -> Rc<dyn IWindowImpl>

Creates a window that can be embedded into a foreign window.
Source§

fn create_tray_icon(&self) -> Option<Rc<dyn ITrayIconImpl>>

Creates a tray icon, if the platform supports them.
Source§

fn get_windows_z_order( &self, windows: &[Rc<dyn IWindowImpl>], z_order: &mut [i64], )

Fills z_order with the z-order of each of windows; a window with a higher value is above a window with a lower one. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> IUnknownImpl for T
where T: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.