Exemplo n.º 1
0
Arquivo: box.go Projeto: napsy/go-gtk3
func NewBox(orientation GtkOrientation, spacing int) *Box {
	box := &Box{}

	o := C.gtk_box_new(C.GtkOrientation(orientation), C.gint(spacing))

	box.Container = NewContainer(unsafe.Pointer(o))
	box.object = C.to_GtkBox(unsafe.Pointer(o))

	return box
}
Exemplo n.º 2
0
Arquivo: box.go Projeto: napsy/go-gtk3
// Conversion function for gobject registration map
func newBoxFromNative(obj unsafe.Pointer) interface{} {
	var box Box
	box.object = C.to_GtkBox(obj)
	box.Container = NewContainer(unsafe.Pointer(box.object))
	return &box
}