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

27 lines
684 B
Swift

import AppKit
final class AppDelegate:
NSObject,
NSApplicationDelegate
{
let render = RenderComponent()
let renderVM = RenderVM()
let root = RootComponent()
let rootVM = RootVM()
func applicationDidFinishLaunching(_ notification: Notification) {
// Bring the app to the foreground
NSApp.setActivationPolicy(.regular)
NSApp.activate(ignoringOtherApps: true)
otherSetupConsoleLogging(root.ctrl, "Root")
root.setup()
otherSetupConsoleLogging(render.ctrl, "Render")
render.setup()
}
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
true
}
}