Documentation ¶
Index ¶
- Variables
- func Disambiguate(mc *MethodCollection)
- func IsRetained(name string) bool
- type Avail
- type AvailAttr
- type ByParams
- type Enum
- type EnumConstant
- type Interface
- type Method
- type MethodCollection
- type Parameter
- type Property
- type Protocol
- type Subclass
- type Wrapper
- func (w *Wrapper) AddCategory(n *ast.ObjCCategoryDecl)
- func (w *Wrapper) AddEnum(n *ast.EnumDecl, rs []string)
- func (w *Wrapper) AddFunction(n *ast.FunctionDecl)
- func (w *Wrapper) AddInterface(n *ast.ObjCInterfaceDecl)
- func (w *Wrapper) AddMethod(p *MethodCollection, x *ast.ObjCMethodDecl)
- func (w *Wrapper) AddProtocol(n *ast.ObjCProtocolDecl)
- func (w *Wrapper) AddProtocolMethods(i *Interface, p *Protocol)
- func (w *Wrapper) AddSupermethods(i *Interface)
- func (w *Wrapper) AddTypedef(n, t string)
- func (w *Wrapper) AutoreleaseHelpers()
- func (w *Wrapper) CharHelpers()
- func (w *Wrapper) Delegate(ds map[string]map[string][]string)
- func (w *Wrapper) EnumeratorHelpers()
- func (w *Wrapper) GetParms(n ast.Node, class string, prt bool) ([]*Parameter, bool, bool)
- func (w *Wrapper) Import(ss []string)
- func (w *Wrapper) MethodFromSig(sig, class string) *Method
- func (w *Wrapper) ProcessDelegate(dname string, ps map[string][]string)
- func (w *Wrapper) ProcessEnum(e *Enum)
- func (w *Wrapper) ProcessFunction(m *Method)
- func (w *Wrapper) ProcessMethod(m *Method)
- func (w *Wrapper) ProcessMethodForClass(m *Method, class string)
- func (w *Wrapper) ProcessSubclass(sname string, sc *Subclass)
- func (w *Wrapper) SelectorHelpers()
- func (w *Wrapper) StringHelpers()
- func (w *Wrapper) Subclass(ds map[string]map[string][]string)
- func (w *Wrapper) SysImport(ss []string)
- func (w *Wrapper) Wrap(toproc []string)
Constants ¶
This section is empty.
Variables ¶
var ( Debug = false // Arc flag is for debugging only, your builds will break if you turn it on Arc = false Autorelease = false Gogc = false )
Functions ¶
func IsRetained ¶
IsRetained returns true if a given instance method returns a retained object. NSWrap will not send a 'retain' message to these objects before returning them to Go.
Types ¶
type EnumConstant ¶
type EnumConstant struct {
// contains filtered or unexported fields
}
type Interface ¶
type Interface struct {
Name, GoName string
InstanceMethods, ClassMethods *MethodCollection
Properties map[string]*Property
Protocols []string // Protocols impelemented by this Interface
ProcessedInstanceMethods map[string]bool
}
func (*Interface) IsRetainedProperty ¶
IsRetainedProperty returns true if the name matches a retained property for the given interface.
type Method ¶
type Method struct {
Name, GoName, Class, GoClass string
Type *types.Type
ClassMethod bool
Parameters []*Parameter
}
func (*Method) HasUnsupportedType ¶
func (*Method) ShouldFinalize ¶
ShouldFinalize returns true on a method that returns an object that should have a GC finalizer.
type MethodCollection ¶
func NewMethodCollection ¶
func NewMethodCollection(class string) *MethodCollection
func (*MethodCollection) AddMethod ¶
func (mc *MethodCollection) AddMethod(m *Method)
func (*MethodCollection) AddMethods ¶
func (mc *MethodCollection) AddMethods(smc *MethodCollection)
type Protocol ¶
type Protocol struct {
InstanceMethods, ClassMethods *MethodCollection
}
type Wrapper ¶
type Wrapper struct { Package string Interfaces map[string]*Interface Functions map[string]*Method NamedEnums map[string]*Enum AnonEnums []*Enum Delegates map[string]map[string][]string Subclasses map[string]*Subclass Protocols map[string]*Protocol Frameworks []string Libraries []string Frameworkdirs []string Pragmas []string ProcessedTypes map[string]bool ProcessedClassMethods map[string]bool Vaargs int // contains filtered or unexported fields }
func NewWrapper ¶
func (*Wrapper) AddCategory ¶
func (w *Wrapper) AddCategory(n *ast.ObjCCategoryDecl)
AddCategory adds an Objective-C category to a Wrapper. the first child node of an ObjCCategoryDecl is always an ObjCInterface indicating which interface is being extended by this category.
func (*Wrapper) AddFunction ¶
func (w *Wrapper) AddFunction(n *ast.FunctionDecl)
func (*Wrapper) AddInterface ¶
func (w *Wrapper) AddInterface(n *ast.ObjCInterfaceDecl)
AddInterface adds an Objective-C interface to a Wrapper.
func (*Wrapper) AddMethod ¶
func (w *Wrapper) AddMethod(p *MethodCollection, x *ast.ObjCMethodDecl)
func (*Wrapper) AddProtocol ¶
func (w *Wrapper) AddProtocol(n *ast.ObjCProtocolDecl)
func (*Wrapper) AddProtocolMethods ¶
Add methods from a Protocol
func (*Wrapper) AddSupermethods ¶
Add class and instance methods from super class
func (*Wrapper) AddTypedef ¶
func (*Wrapper) AutoreleaseHelpers ¶
func (w *Wrapper) AutoreleaseHelpers()
func (*Wrapper) CharHelpers ¶
func (w *Wrapper) CharHelpers()
func (*Wrapper) EnumeratorHelpers ¶
func (w *Wrapper) EnumeratorHelpers()
func (*Wrapper) GetParms ¶
GetParms returns the parameters of a method declaration and a bool indicating whether the given method is available on MacOS and not deprecated.
func (*Wrapper) MethodFromSig ¶
func (*Wrapper) ProcessDelegate ¶
func (*Wrapper) ProcessEnum ¶
func (*Wrapper) ProcessFunction ¶
func (*Wrapper) ProcessMethod ¶
func (*Wrapper) ProcessMethodForClass ¶
func (*Wrapper) ProcessSubclass ¶
func (*Wrapper) SelectorHelpers ¶
func (w *Wrapper) SelectorHelpers()
func (*Wrapper) StringHelpers ¶
func (w *Wrapper) StringHelpers()