Initial commit

This commit is contained in:
Alex E. Tafoya
2026-09-17 15:15:45 -05:00
commit 87fe7927c4
36 changed files with 5113 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
// main.swift
// GreenshotMac
import AppKit
/// NSApplication.delegate is a weak reference, so the delegate is held here for the
/// lifetime of the process.
enum AppLauncher {
@MainActor private static var retainedDelegate: AppDelegate?
@MainActor
static func launch() {
let application = NSApplication.shared
let delegate = AppDelegate()
retainedDelegate = delegate
application.delegate = delegate
application.setActivationPolicy(.accessory)
application.run()
}
}
// Top-level code always runs on the main thread, so assuming main actor isolation is safe here.
MainActor.assumeIsolated {
AppLauncher.launch()
}