interp

package
v0.0.0-...-ce07a2f Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: LGPL-2.1 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCL_OK    = 0
	TCL_ERROR = 1
)
View Source
const (
	TCL_DONT_WAIT     = 1 << 1
	TCL_WINDOW_EVENTS = 1 << 2
	TCL_FILE_EVENTS   = 1 << 3
	TCL_TIMER_EVENTS  = 1 << 4
	TCL_IDLE_EVENTS   = 1 << 5
	TCL_ALL_EVENTS    = ^TCL_DONT_WAIT
)

Variables

This section is empty.

Functions

func Async

func Async(fn func())

func IsMainThread

func IsMainThread() bool

func MainLoop

func MainLoop(fn func())

Types

type ActionMap

type ActionMap struct {
	// contains filtered or unexported fields
}

func NewActionMap

func NewActionMap() *ActionMap

func (*ActionMap) Invoke

func (m *ActionMap) Invoke(id uintptr, args []string) error

func (*ActionMap) Register

func (m *ActionMap) Register(fn func([]string)) uintptr

func (*ActionMap) UnRegister

func (m *ActionMap) UnRegister(id uintptr)

type CommandMap

type CommandMap struct {
	// contains filtered or unexported fields
}

func NewCommandMap

func NewCommandMap() *CommandMap

func (*CommandMap) Find

func (m *CommandMap) Find(id uintptr) func([]string) (string, error)

func (*CommandMap) Invoke

func (m *CommandMap) Invoke(id uintptr, args []string) (string, error)

func (*CommandMap) Register

func (m *CommandMap) Register(fn func([]string) (string, error)) uintptr

func (*CommandMap) UnRegister

func (m *CommandMap) UnRegister(id uintptr)

type Interp

type Interp struct {
	// contains filtered or unexported fields
}

func NewInterp

func NewInterp() (*Interp, error)

func (*Interp) AppendStringList

func (p *Interp) AppendStringList(name string, value string, global bool) error

func (*Interp) AppendStringListList

func (p *Interp) AppendStringListList(name string, list []string, global bool) error

func (*Interp) AppendStringVar

func (p *Interp) AppendStringVar(name string, value string, global bool) error

func (*Interp) CreateAction

func (p *Interp) CreateAction(name string, fn func([]string)) (uintptr, error)

func (*Interp) CreateCommand

func (p *Interp) CreateCommand(name string, fn func([]string) (string, error)) (uintptr, error)

func (*Interp) Destroy

func (p *Interp) Destroy() error

func (*Interp) Eval

func (p *Interp) Eval(script string) error

func (*Interp) EvalAsBool

func (interp *Interp) EvalAsBool(script string) (bool, error)

func (*Interp) EvalAsFloat64

func (interp *Interp) EvalAsFloat64(script string) (float64, error)

func (*Interp) EvalAsInt

func (interp *Interp) EvalAsInt(script string) (int, error)

func (*Interp) EvalAsInt64

func (interp *Interp) EvalAsInt64(script string) (int64, error)

func (*Interp) EvalAsIntList

func (interp *Interp) EvalAsIntList(script string) ([]int, error)

func (*Interp) EvalAsListObj

func (interp *Interp) EvalAsListObj(script string) (*ListObj, error)

func (*Interp) EvalAsObj

func (interp *Interp) EvalAsObj(script string) (*Obj, error)

func (*Interp) EvalAsString

func (interp *Interp) EvalAsString(script string) (string, error)

func (*Interp) EvalAsStringList

func (interp *Interp) EvalAsStringList(script string) ([]string, error)

func (*Interp) EvalAsUint

func (interp *Interp) EvalAsUint(script string) (uint, error)

func (*Interp) GetBoolResult

func (p *Interp) GetBoolResult() bool

func (*Interp) GetBoolVar

func (p *Interp) GetBoolVar(name string, global bool) bool

func (*Interp) GetErrorResult

func (p *Interp) GetErrorResult() error

func (*Interp) GetFloadt64Var

func (p *Interp) GetFloadt64Var(name string, global bool) float64

func (*Interp) GetFloat64Result

func (p *Interp) GetFloat64Result() float64

func (*Interp) GetInt64Result

func (p *Interp) GetInt64Result() int64

func (*Interp) GetInt64Var

func (p *Interp) GetInt64Var(name string, global bool) int64

func (*Interp) GetIntResult

func (p *Interp) GetIntResult() int

func (*Interp) GetIntVar

func (p *Interp) GetIntVar(name string, global bool) int

func (*Interp) GetList

func (p *Interp) GetList(name string, global bool) *ListObj

func (*Interp) GetListObjResult

func (p *Interp) GetListObjResult() *ListObj

func (*Interp) GetObjResult

func (p *Interp) GetObjResult() *Obj

func (*Interp) GetStringResult

func (p *Interp) GetStringResult() string

func (*Interp) GetStringVar

func (p *Interp) GetStringVar(name string, global bool) string

func (*Interp) GetUintResult

func (p *Interp) GetUintResult() uint

func (*Interp) GetVar

func (p *Interp) GetVar(name string, global bool) *Obj

func (*Interp) InitTcl

func (p *Interp) InitTcl(tcl_library string) error

func (*Interp) InitTk

func (p *Interp) InitTk(tk_library string) error

func (*Interp) InvokeAction

func (p *Interp) InvokeAction(id uintptr, args []string) error

func (*Interp) InvokeCommand

func (p *Interp) InvokeCommand(id uintptr, args []string) (string, error)

func (*Interp) SetBoolVar

func (p *Interp) SetBoolVar(name string, b bool, global bool) error

func (*Interp) SetFloat64Var

func (p *Interp) SetFloat64Var(name string, value float64, global bool) error

func (*Interp) SetInt64Var

func (p *Interp) SetInt64Var(name string, value int64, global bool) error

func (*Interp) SetIntVar

func (p *Interp) SetIntVar(name string, value int, global bool) error

func (*Interp) SetStringList

func (p *Interp) SetStringList(name string, list []string, global bool) error

func (*Interp) SetStringVar

func (p *Interp) SetStringVar(name string, value string, global bool) error

func (*Interp) SetVarListObj

func (p *Interp) SetVarListObj(name string, obj *ListObj, global bool) error

func (*Interp) SetVarObj

func (p *Interp) SetVarObj(name string, obj *Obj, global bool) error

func (*Interp) SupportTk86

func (p *Interp) SupportTk86() bool

func (*Interp) TclPatchLevel

func (interp *Interp) TclPatchLevel() string

func (*Interp) TclVersion

func (interp *Interp) TclVersion() string

func (*Interp) TkPatchLevel

func (interp *Interp) TkPatchLevel() string

func (*Interp) TkVersion

func (interp *Interp) TkVersion() string

func (*Interp) UnsetVar

func (p *Interp) UnsetVar(name string, global bool) error

type ListObj

type ListObj Obj

func NewListObj

func NewListObj(p *Interp) *ListObj

func (*ListObj) AppendObj

func (o *ListObj) AppendObj(obj *Obj) bool

func (*ListObj) AppendString

func (o *ListObj) AppendString(s string)

func (*ListObj) AppendStringList

func (o *ListObj) AppendStringList(list []string)

func (*ListObj) IndexObj

func (o *ListObj) IndexObj(index int) *Obj

func (*ListObj) IndexString

func (o *ListObj) IndexString(index int) string

func (*ListObj) InsertObj

func (o *ListObj) InsertObj(index int, obj *Obj)

func (*ListObj) InsertString

func (o *ListObj) InsertString(index int, s string)

func (*ListObj) Length

func (o *ListObj) Length() int

func (*ListObj) Remove

func (o *ListObj) Remove(first int, count int)

func (*ListObj) SetIndexObj

func (o *ListObj) SetIndexObj(index int, obj *Obj) bool

func (*ListObj) SetIndexString

func (o *ListObj) SetIndexString(index int, s string)

func (*ListObj) SetStringList

func (o *ListObj) SetStringList(list []string)

func (*ListObj) ToIntList

func (o *ListObj) ToIntList() (list []int)

func (*ListObj) ToObjList

func (o *ListObj) ToObjList() (list []*Obj)

func (*ListObj) ToStringList

func (o *ListObj) ToStringList() (list []string)

type Obj

type Obj struct {
	// contains filtered or unexported fields
}

func NewBoolObj

func NewBoolObj(value bool, p *Interp) *Obj

func NewFloat64Obj

func NewFloat64Obj(value float64, p *Interp) *Obj

func NewInt64Obj

func NewInt64Obj(value int64, p *Interp) *Obj

func NewIntObj

func NewIntObj(value int, p *Interp) *Obj

func NewStringObj

func NewStringObj(value string, p *Interp) *Obj

func (*Obj) ToBool

func (o *Obj) ToBool() bool

func (*Obj) ToFloat64

func (o *Obj) ToFloat64() float64

func (*Obj) ToInt

func (o *Obj) ToInt() int

func (*Obj) ToInt64

func (o *Obj) ToInt64() int64

func (*Obj) ToString

func (o *Obj) ToString() string

func (*Obj) ToUint

func (o *Obj) ToUint() uint

type Photo

type Photo struct {
	// contains filtered or unexported fields
}

func FindPhoto

func FindPhoto(interp *Interp, imageName string) *Photo

func (*Photo) Blank

func (p *Photo) Blank()

func (*Photo) Expand

func (p *Photo) Expand(width int, height int) error

func (*Photo) PutImage

func (p *Photo) PutImage(img image.Image, tk85alphacolor color.Color) error

func (*Photo) PutZoomedImage

func (p *Photo) PutZoomedImage(img image.Image, zoomX, zoomY, subsampleX, subsampleY int, tk85alphacolor color.Color) error

func (*Photo) SetSize

func (p *Photo) SetSize(width int, height int) error

func (*Photo) Size

func (p *Photo) Size() (int, int)

func (*Photo) ToImage

func (p *Photo) ToImage() image.Image

type Tcl_QueuePosition

type Tcl_QueuePosition int
const (
	TCL_QUEUE_TAIL Tcl_QueuePosition = 0
	TCL_QUEUE_HEAD
	TCL_QUEUE_MARK
)

Jump to

Keyboard shortcuts

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