Esempio n. 1
0
File: gobj.go Progetto: hwch/go-gtk
func (this *Value) SetBoxedInterface(x interface{}) {
	Holder.Grab(x)
	newboxed := C.malloc(C.size_t(unsafe.Sizeof([2]unsafe.Pointer{})))
	C.memcpy(newboxed, unsafe.Pointer(&x), C.size_t(unsafe.Sizeof([2]unsafe.Pointer{})))
	C.g_value_take_boxed(this.asC(), C.gconstpointer(newboxed))
}
Esempio n. 2
0
File: gobj.go Progetto: hwch/go-gtk
// g_value_take_boxed
func (this *Value) SetBoxed(x unsafe.Pointer) {
	C.g_value_take_boxed(this.asC(), C.gconstpointer(x))
}