delegates

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package delegates provides a handle-based registry that maps uint64 tokens to Go delegate implementations. The ObjC shim classes store these handles as ivar uint64_t values; on each protocol method callback they pass the handle back through CGo so the generated export functions can look up the Go impl.

Lifetime: Register when the delegate is installed; the ObjC shim calls goDelegate_unregister from its -dealloc, which removes the entry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup

func Lookup(handle uint64) any

Lookup returns the implementation stored under handle, or nil.

func Register

func Register(impl any) uint64

Register stores impl in the registry and returns a unique handle.

func Unregister

func Unregister(handle uint64)

Unregister removes the entry for handle.

Types

This section is empty.

Jump to

Keyboard shortcuts

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