Files
__mahjong/hello/hello-platform/ver-mac/src/HPAppDelegate.swift
T
kornerr 1aa218d0bb Create hello-platform for macOS (#10)
Co-authored-by: Михаил Капелько <kornerr@gmail.com>
2026-11-01 05:01:36 +01:00

23 lines
528 B
Swift

import AppKit
final class HPAppDelegate:
NSObject,
NSApplicationDelegate
{
let hp = HPComponent()
let hpVM = HPVM()
func applicationDidFinishLaunching(_ notification: Notification) {
// Bring the app to the foreground
NSApp.setActivationPolicy(.regular)
NSApp.activate(ignoringOtherApps: true)
otherSetupConsoleLogging(hp.ctrl, "HP")
hp.setup()
}
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
true
}
}