Documentation
¶
Index ¶
- func AssertFreed(t *testing.T, obj *TrackedObject, context string)
- func AssertRefCount(t *testing.T, obj *TrackedObject, expected uint, context string)
- func EmitClicked(ptr unsafe.Pointer)
- func ForceGC()
- func Hold(ptr unsafe.Pointer) unsafe.Pointer
- func NewGObject() unsafe.Pointer
- func NotifyName(ptr unsafe.Pointer)
- func Release(ptr unsafe.Pointer)
- type TrackedObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertFreed ¶
func AssertFreed(t *testing.T, obj *TrackedObject, context string)
func AssertRefCount ¶
func AssertRefCount(t *testing.T, obj *TrackedObject, expected uint, context string)
func EmitClicked ¶
func Hold ¶
Hold adds a C-side reference for testing cleanup while a signal target remains externally alive.
func NewGObject ¶
NewGObject creates a fresh GObject (the base GObject type) and returns its raw C pointer. Tests use it with glib.Take/glib.AssumeOwnership to build a *glib.Object. This lives in a cgo-enabled package so test files that are in packages already using cgo (where Go's test scaffolding rejects embedded cgo) can construct GObjects.
func NotifyName ¶
NotifyName emits GObject::notify::name without going through a Go wrapper.
Types ¶
type TrackedObject ¶
type TrackedObject struct {
// contains filtered or unexported fields
}
func Track ¶
func Track(ptr unsafe.Pointer) *TrackedObject
func (*TrackedObject) IsFinalized ¶
func (t *TrackedObject) IsFinalized() bool
func (*TrackedObject) RefCount ¶
func (t *TrackedObject) RefCount() uint
Click to show internal directories.
Click to hide internal directories.