Help us shape the future of Go! Take the 2026 Go Developer Survey

objc

package
v3.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUUID

func GetUUID() *C.char

func Ptr

func Ptr(o NSObject) unsafe.Pointer

Ptr returns unsafe.Pointer of the NSObject

func Release

func Release(o NSObject)

Release releases allocated resources in objective-c world.

func ReleaseDispatch

func ReleaseDispatch(p unsafe.Pointer)

ReleaseDispatch releases allocated dispatch_queue_t

func Retain added in v3.0.4

func Retain(o NSObject)

Retain increments reference count in objective-c world.

func SetFinalizer

func SetFinalizer[T any](obj T, finalizer func(T))

Types

type NSArray

type NSArray struct {
	*Pointer
}

NSArray indicates NSArray

func NewNSArray

func NewNSArray(p unsafe.Pointer) *NSArray

NewNSArray creates a new NSArray from pointer.

func (*NSArray) ToPointerSlice

func (n *NSArray) ToPointerSlice() []unsafe.Pointer

ToPointerSlice method returns slice of the obj-c object as unsafe.Pointer.

type NSObject

type NSObject interface {
	// contains filtered or unexported methods
}

NSObject indicates NSObject

type Pointer

type Pointer struct {
	// contains filtered or unexported fields
}

Pointer indicates any pointers which are allocated in objective-c world.

func ConvertToNSMutableArray

func ConvertToNSMutableArray(s []NSObject) *Pointer

ConvertToNSMutableArray converts to NSMutableArray from NSObject slice in Go world.

func ConvertToNSMutableDictionary

func ConvertToNSMutableDictionary(d map[string]NSObject) *Pointer

ConvertToNSMutableDictionary converts to NSMutableDictionary from map[string]NSObject in Go world.

func NewPointer

func NewPointer(p unsafe.Pointer) *Pointer

NewPointer creates a new Pointer for objc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL