Documentation
¶
Overview ¶
Package render turns the raw purego emitter's resolved view (package view) into Go source through templates only. It makes no resolution decisions and imports no metadata or type-mapping packages — every value it needs is already present on the view. The output is pre-gofmt; the caller canonicalises it.
Index ¶
- func ClassMethod(method view.RawMethod) ([]byte, error)
- func ClassTypeDecl(decl view.ClassTypeDecl) ([]byte, error)
- func ClassVars(vars view.ClassVars) ([]byte, error)
- func Enums(enums []view.Enum) ([]byte, error)
- func Externs(externs []view.Extern) ([]byte, error)
- func FromIDConstructor(ctor view.FromIDConstructor) ([]byte, error)
- func Functions(functions view.FunctionFile) ([]byte, error)
- func Protocols(protocols []view.Protocol) ([]byte, error)
- func Structs(structs []view.Struct) ([]byte, error)
- func TypedefAliases(aliases []view.TypedefAlias) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassMethod ¶
ClassMethod renders one Go method (or class function) wrapping an ObjC method via objc.Send, as a Go source fragment.
func ClassTypeDecl ¶
func ClassTypeDecl(decl view.ClassTypeDecl) ([]byte, error)
ClassTypeDecl renders one ObjC class's Go struct declaration (and, for root classes, its promoted Ptr/InitPtr accessors) as a Go source fragment.
func ClassVars ¶
ClassVars renders a class's package-level class-reference and selector variable block as a Go source fragment.
func Externs ¶
Externs renders all extern-symbol accessor functions for a package as a Go source fragment.
func FromIDConstructor ¶
func FromIDConstructor(ctor view.FromIDConstructor) ([]byte, error)
FromIDConstructor renders a class's XFromID factory function as a Go source fragment.
func Functions ¶
func Functions(functions view.FunctionFile) ([]byte, error)
Functions renders the function-pointer var block and the exported wrapper functions for a package as a Go source fragment.
func Protocols ¶
Protocols renders all protocol interface declarations for a package as a Go source fragment.
func TypedefAliases ¶
func TypedefAliases(aliases []view.TypedefAlias) ([]byte, error)
TypedefAliases renders all C-typedef Go type aliases for a package as a Go source fragment.
Types ¶
This section is empty.