Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@netvl /ui.go

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
package ui
import (
// This is how GtkWidget and GtkEntry are defined in gtk.go source file in the library:
// type GtkWidget struct {
// Widget *C.GtkWidget
// }
// type GtkEntry struct {
// GtkWidget
// GtkEditable
// }
// GtkEditable implicit field is unimportant for now.
var (
messageNameEntry *gtk.GtkEntry
func Init(builder *gtk.GtkBuilder) {
// GtkEntry requires GtkWidget, so I need to create GtkWidget instance first
messageNameEntryWidget := gtk.GtkWidget{}
// Code below does not work, as well as many other different attempts
*(unsafe.Pointer(&messageNameEntryWidget.Widget)) = builder.GetObject("messageNameEntry").Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.