library

package
v0.2.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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitAsync

func EmitAsync(w io.Writer, pkgName, rawImportPath string, framework *macosplatformmetadata.FrameworkMeta, m *typemap.Mapper, knownClasses map[string]bool) error

Async writes blocking wrappers for completion-handler methods.

For every instance method whose last block argument matches the pattern "void (^...)(NSError *)", a package-level function is emitted that blocks via a buffered channel until the handler fires or ctx is cancelled.

pkgName is the Go package name (e.g. "virtualization"); rawImportPath is the full import path of the raw framework package.

func EmitSlices

func EmitSlices(w io.Writer, pkgName, rawImportPath string, framework *macosplatformmetadata.FrameworkMeta, m *typemap.Mapper, knownClasses map[string]bool) error

Slices writes typed slice accessors for NSArray-typed properties.

For every property whose ObjC type is NSArray<ClassName *> where ClassName belongs to the same framework, two functions are emitted:

  • FooList(ctx, recv) []*raw.Foo — typed getter
  • SetFooList(ctx, recv, items) — typed setter (non-readonly properties only)

func EmitSpecs

func EmitSpecs(w io.Writer, pkgName, rawImportPath string, framework *macosplatformmetadata.FrameworkMeta, m *typemap.Mapper, knownClasses map[string]bool) error

Specs writes Spec structs and Apply functions for *Configuration classes.

For every class whose name ends in "Configuration" with ≥ 3 non-readonly properties, a plain Go struct (FooConfigurationSpec) and an Apply function are emitted. The Apply function sets non-zero fields and calls ValidateWithError when the class supports it.

The caller is responsible for creating the configuration instance (e.g. via a factory function in this package) before calling Apply.

Types

This section is empty.

Jump to

Keyboard shortcuts

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