diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go index feaf8bb..ae6ccbe 100644 --- a/gtkcalls_unix.go +++ b/gtkcalls_unix.go @@ -26,10 +26,6 @@ func gtk_init() error { return nil } -func gtk_main() { - C.gtk_main() -} - func gtk_main_quit() { C.gtk_main_quit() } diff --git a/uitask_unix.go b/uitask_unix.go index ccad346..0ff07f4 100644 --- a/uitask_unix.go +++ b/uitask_unix.go @@ -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 }