summaryrefslogtreecommitdiff
path: root/gtkcalls_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'gtkcalls_unix.go')
-rw-r--r--gtkcalls_unix.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go
index 5d3702d..f2bce9e 100644
--- a/gtkcalls_unix.go
+++ b/gtkcalls_unix.go
@@ -12,8 +12,6 @@ import (
// #cgo pkg-config: gtk+-3.0
// #include <stdlib.h>
// #include <gtk/gtk.h>
-// /* because cgo is flaky with macros */
-// void gSignalConnect(GtkWidget *widget, char *signal, GCallback callback, void *data) { g_signal_connect(widget, signal, callback, data); }
import "C"
type (
@@ -25,16 +23,6 @@ func gtk_init() bool {
return fromgbool(C.gtk_init_check((*C.int)(nil), (***C.char)(nil)))
}
-// see our_idle_callback in callbacks_unix.go for details
-type gtkIdleOp struct {
- what func()
- done chan struct{}
-}
-
-func gdk_threads_add_idle(idleop *gtkIdleOp) {
- C.gdk_threads_add_idle(callbacks["idle"], C.gpointer(unsafe.Pointer(idleop)))
-}
-
func gtk_main() {
C.gtk_main()
}
@@ -48,17 +36,6 @@ func gtk_window_new() *gtkWidget {
return fromgtkwidget(C.gtk_window_new(0))
}
-// the garbage collector has been found to eat my callback functions; this will stop it
-var callbackstore = make([]*func() bool, 0, 50)
-
-func g_signal_connect(obj *gtkWidget, sig string, callback func() bool) {
- callbackstore = append(callbackstore, &callback)
- ccallback := callbacks[sig]
- csig := C.CString(sig)
- defer C.free(unsafe.Pointer(csig))
- C.gSignalConnect(togtkwidget(obj), csig, ccallback, unsafe.Pointer(&callback))
-}
-
// TODO ensure this works if called on an individual control
func gtk_widget_show(widget *gtkWidget) {
C.gtk_widget_show_all(togtkwidget(widget))