Documentation ¶
Overview ¶
Package iface provides an interface generator.
Index ¶
- func CanGenerate(gen types.FileGenerator, v interface{}) bool
- type Generator
- func (g *Generator) Abstract() bool
- func (g *Generator) Header() *file.Header
- func (g *Generator) ImplInterfaces() []string
- func (g *Generator) IsClass() bool
- func (g *Generator) IsInSameFile(v interface{}) bool
- func (g *Generator) IsInterface() bool
- func (g *Generator) Logln(lvl logger.Level, v ...interface{})
- func (g *Generator) OverriderName() string
- func (g *Generator) Reset()
- func (g *Generator) Use(typ interface{}) bool
- func (g *Generator) Wrap(obj string) string
- type Method
- type Methods
- type ParamDoc
- type Signal
- type TypeStruct
- type VirtualMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanGenerate ¶
func CanGenerate(gen types.FileGenerator, v interface{}) bool
CanGenerate checks if the given class or interface can be generated.
Types ¶
type Generator ¶
type Generator struct { Root gir.TypeFindResult Name string CType string GLibGetType string GLibTypeStruct *TypeStruct InfoAttrs *gir.InfoAttrs InfoElements *gir.InfoElements InterfaceName string StructName string VirtualMethods Methods Methods Methods // for big interface Constructors Methods Signals []Signal Tree types.Tree // contains filtered or unexported fields }
func NewGenerator ¶
func NewGenerator(gen types.FileGenerator) Generator
NewGenerator creates a new interface generator instance.
func (*Generator) Abstract ¶
Abstract returns true if the generator is generating an interface or abstract class.
func (*Generator) ImplInterfaces ¶ added in v0.0.3
func (*Generator) IsClass ¶ added in v0.0.3
IsClass returns true if the generator is generating a class.
func (*Generator) IsInSameFile ¶ added in v0.0.3
IsInSameFile returns true if the given GIR item is in the same file. It's guessed using the InfoElements field in the given value.
func (*Generator) IsInterface ¶ added in v0.0.3
IsInterface returns true if the generator is generating an interface.
func (*Generator) OverriderName ¶ added in v0.0.3
OverriderName returns the name of the overrider interface.
type ParamDoc ¶ added in v0.0.2
type ParamDoc struct { Name string InfoElements gir.InfoElements }
type Signal ¶ added in v0.0.2
type Signal struct { *gir.Signal GoName string GoTail string // _gotk4_gtk4_widget_connect_activate CGoName string CGoTail string Block string // type conversion trampoline Header *file.Header Results []typeconv.ValueConverted InfoElements gir.InfoElements }
Signal describes a GLib signal in minimal function form.
type TypeStruct ¶ added in v0.0.3
type TypeStruct struct { *gir.Record Name string // TODO VirtualMethods []VirtualMethod // TODO: move this out // contains filtered or unexported fields }
func (*TypeStruct) Init ¶ added in v0.0.5
func (ts *TypeStruct) Init() bool
func (*TypeStruct) Logln ¶ added in v0.0.3
func (ts *TypeStruct) Logln(lvl logger.Level, v ...interface{})
func (*TypeStruct) WrapperFuncName ¶ added in v0.0.3
func (ts *TypeStruct) WrapperFuncName(field string) string
Click to show internal directories.
Click to hide internal directories.