Table of Contents

Class NSApplication

Namespace
CarinaStudio.MacOS.AppKit
Assembly
CarinaStudio.AppBase.MacOS.dll

NSApplication.

public class NSApplication : NSResponder, IDisposable, IEquatable<NSObject>
Inheritance
NSApplication
Implements
Inherited Members
Extension Methods

Properties

Appearance

Get or set appearance of application.

public NSAppearance? Appearance { get; set; }

Property Value

NSAppearance

ApplicationIconImage

Get or set icon of application.

public NSImage? ApplicationIconImage { get; set; }

Property Value

NSImage

Current

Get existing NSApplication instance.

public static NSApplication? Current { get; }

Property Value

NSApplication

Delegate

Get or set object which conforms to NSApplicationDelegate protocol to receive call-back from application.

public NSObject? Delegate { get; set; }

Property Value

NSObject

DockTile

Get Dock tile.

public NSDockTile DockTile { get; }

Property Value

NSDockTile

EffectiveAppearance

Get the appearance that AppKit uses to draw the app’s interface.

public NSAppearance EffectiveAppearance { get; }

Property Value

NSAppearance

IsActive

Check whether the main event loop is running or not.

public bool IsActive { get; }

Property Value

bool

IsRunning

Check whether the main event loop is running or not.

public bool IsRunning { get; }

Property Value

bool

KeyWindow

Get the window that currently receives keyboard events.

public NSWindow? KeyWindow { get; }

Property Value

NSWindow

MainWindow

Get main window of application.

public NSWindow? MainWindow { get; }

Property Value

NSWindow

Shared

Get the NSApplication instance or create one if it does not exist yet.

public static NSApplication Shared { get; }

Property Value

NSApplication

Windows

Get array of windows.

public NSArray<NSWindow> Windows { get; }

Property Value

NSArray<NSWindow>

Methods

Activate(bool)

Activate the application.

public void Activate(bool ignoreOtherApps)

Parameters

ignoreOtherApps bool

True to active application regardless.

Deactivate()

Deactivate the application.

public void Deactivate()

GetActivationPolicy()

Get activation policy of application.

public NSApplication.ActivationPolicy GetActivationPolicy()

Returns

NSApplication.ActivationPolicy

Activation policy.

HideOtherApplications(NSObject?)

Hides all apps except the current application.

public void HideOtherApplications(NSObject? sender)

Parameters

sender NSObject

The object that sent this message.

Run()

Start the main event loop.

public void Run()

SetActivationPolicy(ActivationPolicy)

Set activation policy of application.

public void SetActivationPolicy(NSApplication.ActivationPolicy policy)

Parameters

policy NSApplication.ActivationPolicy

Activation policy.