Moved gtk_main() such that uitask_unix.go calls it directly via cgo. This is in preparation for the next two commits, which will remove the #cgo directives from all files except the uitask_*.go files, since they're being concatenated across files.
This commit is contained in:
parent
7b7005ec19
commit
4e820e86fc
|
@ -26,10 +26,6 @@ func gtk_init() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func gtk_main() {
|
||||
C.gtk_main()
|
||||
}
|
||||
|
||||
func gtk_main_quit() {
|
||||
C.gtk_main_quit()
|
||||
}
|
||||
|
|
|
@ -9,6 +9,10 @@ import (
|
|||
"runtime"
|
||||
)
|
||||
|
||||
// #cgo pkg-config: gtk+-3.0
|
||||
// #include "gtk_unix.h"
|
||||
import "C"
|
||||
|
||||
var uitask chan func()
|
||||
|
||||
func ui(main func()) error {
|
||||
|
@ -39,6 +43,6 @@ func ui(main func()) error {
|
|||
uitask <- gtk_main_quit
|
||||
}()
|
||||
|
||||
gtk_main()
|
||||
C.gtk_main()
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue