OpenTTD Source 20260129-master-g2bb01bd0e4
OTTDMain Class Reference

The main class of the application, the application's delegate. More...

Inheritance diagram for OTTDMain:

Instance Methods

(void) - stopEngine [implementation]
 Stop the game engine.
 
(void) - launchGameEngine: [implementation]
 Start the game loop.
 
(void) - applicationDidFinishLaunching: [implementation]
 Called when the internal event loop has just started running.
 
(NSApplicationTerminateReply) - applicationShouldTerminate: [implementation]
 Display the in game quit confirmation dialog.
 
(void) - unregisterObserver [implementation]
 Remove ourself as a notification observer.
 
(BOOL) - applicationSupportsSecureRestorableState: [implementation]
 Indicates to AppKit that OpenTTD is compatible with secure state storage.
 

Detailed Description

The main class of the application, the application's delegate.

Definition at line 71 of file cocoa_wnd.mm.

Method Documentation

◆ applicationDidFinishLaunching:

- (void) applicationDidFinishLaunching: (NSNotification*)  note
implementation

Called when the internal event loop has just started running.

Definition at line 50 of file cocoa_wnd.mm.

◆ applicationShouldTerminate:

- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication*)  sender
implementation

Display the in game quit confirmation dialog.

Definition at line 50 of file cocoa_wnd.mm.

◆ applicationSupportsSecureRestorableState:

- (BOOL) applicationSupportsSecureRestorableState: (NSApplication*)  sender
implementation

Indicates to AppKit that OpenTTD is compatible with secure state storage.

Starting with macOS 12, macOS expects us to be better compatible with NSSecureCoding, as to prevent attacks through restorable storage. Starting with 14, macOS logs a warning if we don't implement this ourselves. Since OpenTTD does not (yet) make use of restorable state, we simply don't care what happens with it.

Explained here: https://developer.apple.com/documentation/foundation/nssecurecoding

Definition at line 50 of file cocoa_wnd.mm.

◆ launchGameEngine:

- (void) launchGameEngine: (NSNotification*)  note
implementation

Start the game loop.

Definition at line 50 of file cocoa_wnd.mm.

◆ stopEngine

- (void) stopEngine
implementation

Stop the game engine.

Must be called on main thread.

Definition at line 50 of file cocoa_wnd.mm.

◆ unregisterObserver

- (void) unregisterObserver
implementation

Remove ourself as a notification observer.

Definition at line 50 of file cocoa_wnd.mm.


The documentation for this class was generated from the following file: