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
ApplicationIconImage
Get or set icon of application.
public NSImage? ApplicationIconImage { get; set; }
Property Value
Current
Get existing NSApplication instance.
public static NSApplication? Current { get; }
Property Value
Delegate
Get or set object which conforms to NSApplicationDelegate protocol to receive call-back from application.
public NSObject? Delegate { get; set; }
Property Value
DockTile
Get Dock tile.
public NSDockTile DockTile { get; }
Property Value
EffectiveAppearance
Get the appearance that AppKit uses to draw the app’s interface.
public NSAppearance EffectiveAppearance { get; }
Property Value
IsActive
Check whether the main event loop is running or not.
public bool IsActive { get; }
Property Value
IsRunning
Check whether the main event loop is running or not.
public bool IsRunning { get; }
Property Value
KeyWindow
Get the window that currently receives keyboard events.
public NSWindow? KeyWindow { get; }
Property Value
MainWindow
Get main window of application.
public NSWindow? MainWindow { get; }
Property Value
Shared
Get the NSApplication instance or create one if it does not exist yet.
public static NSApplication Shared { get; }
Property Value
Windows
Get array of windows.
public NSArray<NSWindow> Windows { get; }
Property Value
Methods
Activate(bool)
Activate the application.
public void Activate(bool ignoreOtherApps)
Parameters
ignoreOtherAppsboolTrue 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
senderNSObjectThe 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
policyNSApplication.ActivationPolicyActivation policy.