mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-05 07:56:51 +08:00
major rework of reference handling
This commit is contained in:
@@ -13,9 +13,13 @@ import (
|
||||
// Object is a go representation of a GstObject.
|
||||
type Object struct{ *glib.InitiallyUnowned }
|
||||
|
||||
// FromGstObjectUnsafe returns an Object wrapping the given pointer. It meant for internal
|
||||
// FromGstObjectUnsafeNone returns an Object wrapping the given pointer. It meant for internal
|
||||
// usage and exported for visibility to other packages.
|
||||
func FromGstObjectUnsafe(ptr unsafe.Pointer) *Object { return wrapObject(toGObject(ptr)) }
|
||||
func FromGstObjectUnsafeNone(ptr unsafe.Pointer) *Object { return wrapObject(glib.TransferNone(ptr)) }
|
||||
|
||||
// FromGstObjectUnsafeFull returns an Object wrapping the given pointer. It meant for internal
|
||||
// usage and exported for visibility to other packages.
|
||||
func FromGstObjectUnsafeFull(ptr unsafe.Pointer) *Object { return wrapObject(glib.TransferFull(ptr)) }
|
||||
|
||||
// Instance returns the native C GstObject.
|
||||
func (o *Object) Instance() *C.GstObject { return C.toGstObject(o.Unsafe()) }
|
||||
|
Reference in New Issue
Block a user