func marshalCertificateInfo(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) info := (*C.WebKitCertificateInfo)(unsafe.Pointer(c)) wrapped := wrapCertificateInfo(info) runtime.SetFinalizer(wrapped, (*CertificateInfo).free) return wrapped, nil }
func fromGValue(v *C.GValue) (ret interface{}) { valueType := C.gvalue_get_type(v) fundamentalType := C.gtype_get_fundamental(valueType) switch fundamentalType { case C.G_TYPE_OBJECT: ret = unsafe.Pointer(C.g_value_get_object(v)) case C.G_TYPE_STRING: ret = fromGStr(C.g_value_get_string(v)) case C.G_TYPE_UINT: ret = int(C.g_value_get_uint(v)) case C.G_TYPE_BOXED: ret = unsafe.Pointer(C.g_value_get_boxed(v)) case C.G_TYPE_BOOLEAN: ret = C.g_value_get_boolean(v) == C.gboolean(1) default: fmt.Printf("from type %s %T\n", fromGStr(C.g_type_name(fundamentalType)), v) panic("FIXME") //TODO } return }
func marshalMessage(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) return &Message{(*C.GstMessage)(unsafe.Pointer(c))}, nil }
func marshalGValueArray(p uintptr) (interface{}, error) { c := (*C.GValueArray)(unsafe.Pointer(C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))))) return sliceFromGValueArray(c), nil }
func marshalBoxed(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) return uintptr(unsafe.Pointer(c)), nil }
func marshalSurface(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) surface := (*C.cairo_surface_t)(unsafe.Pointer(c)) return wrapSurface(surface), nil }
func marshalContext(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) context := (*C.cairo_t)(unsafe.Pointer(c)) return wrapContext(context), nil }
func marshalFontDescription(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) c2 := (*C.PangoFontDescription)(unsafe.Pointer(c)) return wrapFontDescription(c2), nil }
func marshalEvent(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) return &Event{(*C.GdkEvent)(unsafe.Pointer(c))}, nil }
func marshalRGBA(p uintptr) (interface{}, error) { c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p))) c2 := (*C.GdkRGBA)(unsafe.Pointer(c)) return wrapRGBA(c2), nil }
func (this *Value) GetBoxedInterface() interface{} { return *(*interface{})(C.g_value_get_boxed(this.asC())) }
// g_value_get_boxed func (this *Value) GetBoxed() unsafe.Pointer { return unsafe.Pointer(C.g_value_get_boxed(this.asC())) }