返回 DeepSeek-Reasonix
system_quit_darwin.go
根目录 / desktop / system_quit_darwin.go
1 //go:build darwin
2
3 package main
4
5 /*
6 #cgo darwin LDFLAGS: -framework Cocoa
7 void installReasonixSystemQuitHook(void);
8 */
9 import "C"
10
11 import "sync"
12
13 var installSystemQuitHookOnce sync.Once
14
15 func installSystemQuitHook() {
16 installSystemQuitHookOnce.Do(func() {
17 C.installReasonixSystemQuitHook()
18 })
19 }
20
21 //export ReasonixMarkSystemQuit
22 func ReasonixMarkSystemQuit() {
23 markSystemQuitRequested()
24 }
25
25 lines GO