gen

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: GPL-3.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignatureUInt8   = "u1"
	SignatureUInt16  = "u2"
	SignatureUInt32  = "u4"
	SignatureUInt64  = "u8"
	SignatureInt8    = "i1"
	SignatureInt16   = "i2"
	SignatureInt32   = "i4"
	SignatureInt64   = "i8"
	SignatureFloat32 = "f4"
	SignatureFloat64 = "f8"
	SignatureBool    = "b1"
	SignatureChar    = "c2"
	SignatureString  = "string"
	SignatureGUID    = "g16"
)

Primitive type signatures used by WinRT type system.

Variables

This section is empty.

Functions

func Generate

func Generate(cfg *Config, log logger.Log) error

Generate generates Go bindings for the WinRT class described by cfg.

Types

type Config

type Config struct {
	Debug        bool
	Class        string
	ValidateOnly bool
	Inheritance  bool
	Filters      []string
}

Config holds the code generation settings.

func (*Config) MethodFilter

func (cfg *Config) MethodFilter() Filter

MethodFilter creates a Filter from the configured filter rules.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate returns an error if the config is invalid.

type Filter

type Filter struct {
	Methods []string
}

func NewFilter

func NewFilter(methods []string) Filter

func (*Filter) Matches

func (f *Filter) Matches(methodName string) bool

Jump to

Keyboard shortcuts

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