-
Notifications
You must be signed in to change notification settings - Fork 81
go version of: gtk_builder_connect_signals( builder, NULL ); #50
Comments
Admittedly I don't use the Builder, but according to the gtk documentation, this connects the signals that have been already added to the builder with previous calls to gtk_builder_add_callback_symbol. I'm not sure how others use the Builder, but I think implementing gtk_builder_add_callback_symbol would have to be a first step. The tricky part there is that gtk_builder_add_callback_symbol takes a C function pointer. I'll have to see if any of the glib closure code can be reused for this, so we would be able to call Go closures when a signal is emitted, just like when using Connect. |
👍 this is very important |
Just found out that go-gtk package has this implemented https://github.com/mattn/go-gtk/blob/c61f51135f7d96ba6fdccdd88fdc5eb042ec967f/gtk/gtk.go#L9938-L9940 This example might help: https://github.com/mattn/go-gtk/tree/c61f51135f7d96ba6fdccdd88fdc5eb042ec967f/example/builder I tried to implement the same methods on gotk3 but I'm stuck with error:
Anyway, hope it helps. |
reference conformal/gotk3#50
I was following tutorial for glade and in reading this line in c++, I could not find the equivalent for go. Demo is running well otherwise. Very nice package!
/* Connect signals */
gtk_builder_connect_signals( builder, NULL );
The text was updated successfully, but these errors were encountered: