Documentation
¶
Index ¶
- Constants
- Variables
- func LuaGoH_FetchParams(L Lua_Handle, ignore_nonexistent_field bool, args ...interface{}) bool
- func LuaGoH_FetchValue(L Lua_Handle, value *reflect.Value, ignore_nonexistent_field bool) bool
- func LuaGoH_FetchVariable(L Lua_Handle, value interface{}, ignore_nonexistent_field bool) bool
- func LuaGoH_GetGlobal(l Lua_Handle, varname string) bool
- func LuaGoH_GetRef(l Lua_Handle, var_ref LuaGo_Ref) bool
- func LuaGoH_InvokeFunction(l Lua_Handle, nargs int, nresults int, err_code *int, err_msg *string) bool
- func LuaGoH_PushValue(L Lua_Handle, value *reflect.Value) bool
- func LuaGoH_PushVariable(L Lua_Handle, value interface{}) bool
- func LuaGoH_SetGlobal(l Lua_Handle, varname string) bool
- func LuaGo_stackDump(L Lua_Handle)
- func LuaL_addchar(B *LuaL_Buffer, c byte)
- func LuaL_addlstring(B *LuaL_Buffer, s string, l uint)
- func LuaL_addsize(B *LuaL_Buffer, s uint)
- func LuaL_addstring(B *LuaL_Buffer, s string)
- func LuaL_addvalue(B *LuaL_Buffer)
- func LuaL_argcheck(L Lua_Handle, cond bool, numarg int, extramsg string)
- func LuaL_argerror(L Lua_Handle, numarg int, extramsg string) int
- func LuaL_buffinit(L Lua_Handle, B *LuaL_Buffer)
- func LuaL_buffinitsize(L Lua_Handle, B *LuaL_Buffer, sz uint) unsafe.Pointer
- func LuaL_callmeta(L Lua_Handle, obj int, e string) int
- func LuaL_checkany(L Lua_Handle, narg int)
- func LuaL_checkint(L Lua_Handle, numArg int) int
- func LuaL_checklong(L Lua_Handle, numArg int) int32
- func LuaL_checklstring(L Lua_Handle, numArg int, l *uint) string
- func LuaL_checkoption(L Lua_Handle, narg int, def string, lst []string) int
- func LuaL_checkstack(L Lua_Handle, sz int, msg string)
- func LuaL_checkstring(L Lua_Handle, numArg int) string
- func LuaL_checktype(L Lua_Handle, narg int, t int)
- func LuaL_checkudata(L Lua_Handle, ud int, tname string) unsafe.Pointer
- func LuaL_checkversion(L Lua_Handle)
- func LuaL_checkversion_(L Lua_Handle, ver Lua_Number)
- func LuaL_dofile(L Lua_Handle, fn string) int
- func LuaL_dostring(L Lua_Handle, s string) int
- func LuaL_execresult(L Lua_Handle, stat int) int
- func LuaL_fileresult(L Lua_Handle, stat int, fname string) int
- func LuaL_getmetafield(L Lua_Handle, obj int, e string) int
- func LuaL_getmetatable(L Lua_Handle, name string)
- func LuaL_getsubtable(L Lua_Handle, idx int, fname string) int
- func LuaL_gsub(L Lua_Handle, s string, p string, r string) string
- func LuaL_len(L Lua_Handle, idx int) int
- func LuaL_loadbuffer(L Lua_Handle, buff unsafe.Pointer, sz uint, name string) int
- func LuaL_loadbufferx(L Lua_Handle, buff unsafe.Pointer, sz uint, name string, mode string) int
- func LuaL_loadfile(L Lua_Handle, filename string) int
- func LuaL_loadfilex(L Lua_Handle, filename string, mode string) int
- func LuaL_loadstring(L Lua_Handle, s string) int
- func LuaL_newlib(L Lua_Handle, lst *LuaL_Reg)
- func LuaL_newlibtable(L Lua_Handle, lst *LuaL_Reg)
- func LuaL_newmetatable(L Lua_Handle, tname string) int
- func LuaL_openlibs(L Lua_Handle)
- func LuaL_optint(L Lua_Handle, numArg int, def int) int
- func LuaL_optlong(L Lua_Handle, numArg int, def int32) int32
- func LuaL_optlstring(L Lua_Handle, numArg int, def string, l *uint) string
- func LuaL_optstring(L Lua_Handle, numArg int, def string) string
- func LuaL_prepbuffer(B *LuaL_Buffer)
- func LuaL_prepbuffsize(B *LuaL_Buffer, sz uint) unsafe.Pointer
- func LuaL_pushresult(B *LuaL_Buffer)
- func LuaL_pushresultsize(B *LuaL_Buffer, sz uint)
- func LuaL_ref(L Lua_Handle, t int) int
- func LuaL_requiref(L Lua_Handle, modname string, openf Lua_CFunction, glb int)
- func LuaL_setfuncs(L Lua_Handle, lst *LuaL_Reg, nup int)
- func LuaL_setmetatable(L Lua_Handle, tname string)
- func LuaL_testudata(L Lua_Handle, ud int, tname string) unsafe.Pointer
- func LuaL_tolstring(L Lua_Handle, idx int, len *uint) string
- func LuaL_traceback(L Lua_Handle, L1 Lua_Handle, msg string, level int)
- func LuaL_typename(L Lua_Handle, idx int) string
- func LuaL_unref(L Lua_Handle, t int, ref int)
- func LuaL_where(L Lua_Handle, lvl int)
- func Lua_absindex(L Lua_Handle, idx int) int
- func Lua_arith(L Lua_Handle, op int)
- func Lua_call(L Lua_Handle, nargs int, nresults int)
- func Lua_callk(L Lua_Handle, nargs int, nresults int, ctx int, k Lua_CFunction)
- func Lua_checkstack(L Lua_Handle, sz int) bool
- func Lua_close(L Lua_Handle)
- func Lua_compare(L Lua_Handle, idx1 int, idx2 int, op int) int
- func Lua_concat(L Lua_Handle, n int)
- func Lua_copy(L Lua_Handle, fromidx int, toidx int)
- func Lua_createtable(L Lua_Handle, narr int, nrec int)
- func Lua_dump(L Lua_Handle, writer Lua_Writer, data unsafe.Pointer) int
- func Lua_error(L Lua_Handle) int
- func Lua_gc(L Lua_Handle, what int, data int) int
- func Lua_getctx(L Lua_Handle, ctx *int) int
- func Lua_getfield(L Lua_Handle, idx int, k string)
- func Lua_getglobal(L Lua_Handle, varname string)
- func Lua_getmetatable(L Lua_Handle, objindex int) bool
- func Lua_gettable(L Lua_Handle, idx int)
- func Lua_gettop(L Lua_Handle) int
- func Lua_getuservalue(L Lua_Handle, idx int)
- func Lua_insert(L Lua_Handle, idx int)
- func Lua_isboolean(L Lua_Handle, n int) bool
- func Lua_iscfunction(L Lua_Handle, idx int) bool
- func Lua_isfunction(L Lua_Handle, n int) bool
- func Lua_islightuserdata(L Lua_Handle, n int) bool
- func Lua_isnil(L Lua_Handle, n int) bool
- func Lua_isnone(L Lua_Handle, n int) bool
- func Lua_isnoneornil(L Lua_Handle, n int) bool
- func Lua_isnumber(L Lua_Handle, idx int) bool
- func Lua_isstring(L Lua_Handle, idx int) bool
- func Lua_istable(L Lua_Handle, n int) bool
- func Lua_isthread(L Lua_Handle, n int) bool
- func Lua_isuserdata(L Lua_Handle, idx int) bool
- func Lua_len(L Lua_Handle, idx int)
- func Lua_load(L Lua_Handle, reader Lua_Reader, dt unsafe.Pointer, chunkname string, ...) int
- func Lua_newtable(L Lua_Handle)
- func Lua_newuserdata(L Lua_Handle, sz uint) unsafe.Pointer
- func Lua_next(L Lua_Handle, idx int) int
- func Lua_pcall(L Lua_Handle, nargs int, nresults int, errfunc int) int
- func Lua_pcallk(L Lua_Handle, nargs int, nresults int, errfunc int, ctx int, k Lua_CFunction) int
- func Lua_pop(L Lua_Handle, n int)
- func Lua_pushboolean(L Lua_Handle, b bool)
- func Lua_pushcclosure(L Lua_Handle, fn Lua_CFunction, n int)
- func Lua_pushcfunction(L Lua_Handle, fn Lua_CFunction)
- func Lua_pushglobaltable(L Lua_Handle)
- func Lua_pushinteger(L Lua_Handle, n Lua_Integer)
- func Lua_pushlightuserdata(L Lua_Handle, p unsafe.Pointer)
- func Lua_pushlstring(L Lua_Handle, s unsafe.Pointer, l uint)
- func Lua_pushnil(L Lua_Handle)
- func Lua_pushnumber(L Lua_Handle, n Lua_Number)
- func Lua_pushstring(L Lua_Handle, s string) string
- func Lua_pushthread(L Lua_Handle) bool
- func Lua_pushunsigned(L Lua_Handle, n Lua_Unsigned)
- func Lua_pushvalue(L Lua_Handle, idx int)
- func Lua_rawequal(L Lua_Handle, idx1 int, idx2 int) bool
- func Lua_rawget(L Lua_Handle, idx int)
- func Lua_rawgeti(L Lua_Handle, idx int, n int)
- func Lua_rawgetp(L Lua_Handle, idx int, p unsafe.Pointer)
- func Lua_rawlen(L Lua_Handle, idx int) uint
- func Lua_rawset(L Lua_Handle, idx int)
- func Lua_rawseti(L Lua_Handle, idx int, n int)
- func Lua_rawsetp(L Lua_Handle, idx int, p unsafe.Pointer)
- func Lua_register(L Lua_Handle, varname string, fn Lua_CFunction)
- func Lua_remove(L Lua_Handle, idx int)
- func Lua_replace(L Lua_Handle, idx int)
- func Lua_resume(L Lua_Handle, from Lua_Handle, narg int) int
- func Lua_setallocf(L Lua_Handle, f Lua_Alloc, ud unsafe.Pointer)
- func Lua_setfield(L Lua_Handle, idx int, k string)
- func Lua_setglobal(L Lua_Handle, varname string)
- func Lua_setmetatable(L Lua_Handle, objindex int) bool
- func Lua_settable(L Lua_Handle, idx int)
- func Lua_settop(L Lua_Handle, idx int)
- func Lua_setuservalue(L Lua_Handle, idx int)
- func Lua_status(L Lua_Handle) int
- func Lua_toboolean(L Lua_Handle, idx int) bool
- func Lua_tolstring(L Lua_Handle, idx int, len *uint) string
- func Lua_tolstringbytes(L Lua_Handle, idx int) []byte
- func Lua_topointer(L Lua_Handle, idx int) unsafe.Pointer
- func Lua_tostring(L Lua_Handle, i int) string
- func Lua_touserdata(L Lua_Handle, idx int) unsafe.Pointer
- func Lua_type(L Lua_Handle, idx int) int
- func Lua_typename(L Lua_Handle, tp int) string
- func Lua_upvalueindex(i int) int
- func Lua_xmove(from Lua_Handle, to Lua_Handle, n int)
- func Lua_yield(L Lua_Handle, nresults int) int
- func Lua_yieldk(L Lua_Handle, nresults int, ctx int, k Lua_CFunction) int
- func Luaopen_base(L Lua_Handle) int
- func Luaopen_bit32(L Lua_Handle) int
- func Luaopen_coroutine(L Lua_Handle) int
- func Luaopen_debug(L Lua_Handle) int
- func Luaopen_io(L Lua_Handle) int
- func Luaopen_math(L Lua_Handle) int
- func Luaopen_os(L Lua_Handle) int
- func Luaopen_package(L Lua_Handle) int
- func Luaopen_string(L Lua_Handle) int
- func Luaopen_table(L Lua_Handle) int
- type LUA_INT32
- type LUA_INTEGER
- type LUA_NUMBER
- type LUA_UNSIGNED
- type LuaGo_Function
- type LuaGo_Int
- type LuaGo_Ref
- type LuaGo_ResultSum
- type LuaGo_Script
- type LuaGo_ScriptBase
- func (s *LuaGo_ScriptBase) Call(func_name string, args ...interface{}) bool
- func (s *LuaGo_ScriptBase) GetErrorMessage() string
- func (s *LuaGo_ScriptBase) GetHandle() Lua_Handle
- func (s *LuaGo_ScriptBase) GetObject(var_name string, value interface{}, ignore_nonexistent_field bool) bool
- func (s *LuaGo_ScriptBase) GetRef(var_name string, pref *LuaGo_Ref) bool
- func (s *LuaGo_ScriptBase) GetVar(var_name string, value interface{}) bool
- func (s *LuaGo_ScriptBase) HasRef(ref LuaGo_Ref) bool
- func (s *LuaGo_ScriptBase) HasVar(var_name string) bool
- func (s *LuaGo_ScriptBase) Invoke(ret_value interface{}, func_name string, args ...interface{}) bool
- func (s *LuaGo_ScriptBase) LoadRef(ref LuaGo_Ref) bool
- func (s *LuaGo_ScriptBase) OpenStdLibs()
- func (s *LuaGo_ScriptBase) RemoveRef(ref LuaGo_Ref) bool
- func (s *LuaGo_ScriptBase) RemoveVar(var_name string)
- func (s *LuaGo_ScriptBase) RunBuffer(buffer unsafe.Pointer, size uint) bool
- func (s *LuaGo_ScriptBase) RunFile(file string) bool
- func (s *LuaGo_ScriptBase) RunString(code string) bool
- func (s *LuaGo_ScriptBase) SetHandle(l Lua_Handle)
- func (s *LuaGo_ScriptBase) SetObject(var_name string, value interface{}, keep_nonexistent_field bool) bool
- func (s *LuaGo_ScriptBase) SetVar(var_name string, value interface{}) bool
- type LuaGo_State
- func (this *LuaGo_State) LuaGo_AddSearchPath(_path string, _tip int)
- func (this *LuaGo_State) LuaGo_OpenInvokeCompenent()
- func (this *LuaGo_State) LuaGo_PopGoFunction(_name string)
- func (this *LuaGo_State) LuaGo_PushGoFunction(_name string, _func LuaGo_Function) int
- func (this *LuaGo_State) LuaGo_SafeCall(argnum int, removeret bool) (int, error)
- func (this *LuaGo_State) LuaGo_SafeDoFile(_name string) error
- type LuaGo_Thread
- func (t *LuaGo_Thread) AbortWait()
- func (t *LuaGo_Thread) GetAutoDelete() bool
- func (t *LuaGo_Thread) GetMgr() *LuaGo_ThreadMgr
- func (t *LuaGo_Thread) GetStatus() int
- func (t *LuaGo_Thread) RunBuffer(buffer unsafe.Pointer, size uint) bool
- func (t *LuaGo_Thread) RunFile(file string) bool
- func (t *LuaGo_Thread) RunString(code string) bool
- func (t *LuaGo_Thread) SetAutoDelete(bAutoDelete bool)
- type LuaGo_ThreadMgr
- func (m *LuaGo_ThreadMgr) Create()
- func (m *LuaGo_ThreadMgr) CreateThread(bAutoDelete bool) *LuaGo_Thread
- func (m *LuaGo_ThreadMgr) Destroy()
- func (m *LuaGo_ThreadMgr) DestroyThread(t *LuaGo_Thread)
- func (m *LuaGo_ThreadMgr) GetThreadSum() int
- func (m *LuaGo_ThreadMgr) IsValidThread(t *LuaGo_Thread) bool
- func (m *LuaGo_ThreadMgr) OpenScriptLib()
- func (m *LuaGo_ThreadMgr) Update(dt float32)
- type LuaL_Buffer
- type LuaL_Reg
- type LuaL_Stream
- type Lua_Alloc
- type Lua_CFunction
- type Lua_Debug
- type Lua_Handle
- type Lua_Hook
- type Lua_Integer
- type Lua_Number
- type Lua_Reader
- type Lua_Unsigned
- type Lua_Writer
Constants ¶
const ( THREAD_NOT_LOADED = iota // 脚本未载入 THREAD_LOADED // 脚本已载入 THREAD_RUNNING // 脚本运行中 THREAD_WAIT_SECONDS // 脚本等待多少秒 THREAD_WAIT_FRAMES // 脚本等待多少帧 THREAD_ERROR // 脚本出现错误 THREAD_DONE // 脚本执行完毕 )
LuaGo_Thread status
const LUA_AUTHORS = C.LUA_AUTHORS
const LUA_BITLIBNAME = C.LUA_BITLIBNAME
const LUA_COLIBNAME = C.LUA_COLIBNAME
const LUA_COPYRIGHT = LUA_RELEASE + " Copyright (C) 1994-2013 Lua.org, PUC-Rio"
const LUA_DBLIBNAME = C.LUA_DBLIBNAME
const LUA_DIRSEP = C.LUA_DIRSEP
const LUA_ENV = C.LUA_ENV
const LUA_ERRERR = C.LUA_ERRERR
const LUA_ERRFILE = C.LUA_ERRFILE
extra error code for `luaL_load'
const LUA_ERRGCMM = C.LUA_ERRGCMM
const LUA_ERRMEM = C.LUA_ERRMEM
const LUA_ERRRUN = C.LUA_ERRRUN
const LUA_ERRSYNTAX = C.LUA_ERRSYNTAX
const LUA_FILEHANDLE = C.LUA_FILEHANDLE
const LUA_GCCOLLECT = C.LUA_GCCOLLECT
const LUA_GCCOUNT = C.LUA_GCCOUNT
const LUA_GCCOUNTB = C.LUA_GCCOUNTB
const LUA_GCGEN = C.LUA_GCGEN
const LUA_GCINC = C.LUA_GCINC
const LUA_GCISRUNNING = C.LUA_GCISRUNNING
const LUA_GCRESTART = C.LUA_GCRESTART
const LUA_GCSETMAJORINC = C.LUA_GCSETMAJORINC
const LUA_GCSETPAUSE = C.LUA_GCSETPAUSE
const LUA_GCSETSTEPMUL = C.LUA_GCSETSTEPMUL
const LUA_GCSTEP = C.LUA_GCSTEP
const LUA_GCSTOP = C.LUA_GCSTOP
const LUA_HOOKCALL = C.LUA_HOOKCALL
** Event codes
const LUA_HOOKCOUNT = C.LUA_HOOKCOUNT
const LUA_HOOKLINE = C.LUA_HOOKLINE
const LUA_HOOKRET = C.LUA_HOOKRET
const LUA_HOOKTAILCALL = C.LUA_HOOKTAILCALL
const LUA_IDSIZE = C.LUA_IDSIZE
const LUA_IOLIBNAME = C.LUA_IOLIBNAME
const LUA_LOADLIBNAME = C.LUA_LOADLIBNAME
const LUA_MASKCALL = C.LUA_MASKCALL
** Event masks
const LUA_MASKCOUNT = C.LUA_MASKCOUNT
const LUA_MASKLINE = C.LUA_MASKLINE
const LUA_MASKRET = C.LUA_MASKRET
const LUA_MATHLIBNAME = C.LUA_MATHLIBNAME
const LUA_MINSTACK = C.LUA_MINSTACK
minimum Lua stack available to a C function
const LUA_MULTRET = C.LUA_MULTRET
option for multiple returns in 'lua_pcall' and 'lua_call'
const LUA_NOREF = C.LUA_NOREF
pre-defined references
const LUA_NUMBER_FMT = C.LUA_NUMBER_FMT
const LUA_NUMBER_SCAN = C.LUA_NUMBER_SCAN
const LUA_NUMTAGS = C.LUA_NUMTAGS
const LUA_OK = C.LUA_OK
thread status
const LUA_OPADD = C.LUA_OPADD
const LUA_OPDIV = C.LUA_OPDIV
const LUA_OPEQ = C.LUA_OPEQ
const LUA_OPLE = C.LUA_OPLE
const LUA_OPLT = C.LUA_OPLT
const LUA_OPMOD = C.LUA_OPMOD
const LUA_OPMUL = C.LUA_OPMUL
const LUA_OPPOW = C.LUA_OPPOW
const LUA_OPSUB = C.LUA_OPSUB
const LUA_OPUNM = C.LUA_OPUNM
const LUA_OSLIBNAME = C.LUA_OSLIBNAME
const LUA_REFNIL = C.LUA_REFNIL
const LUA_REGISTRYINDEX = C.LUA_REGISTRYINDEX
** pseudo-indices
const LUA_RELEASE = LUA_VERSION + "." + C.LUA_VERSION_RELEASE
const LUA_RIDX_GLOBALS = C.LUA_RIDX_GLOBALS
const LUA_RIDX_LAST = C.LUA_RIDX_LAST
const LUA_RIDX_MAINTHREAD = C.LUA_RIDX_MAINTHREAD
predefined values in the registry
const LUA_SIGNATURE = C.LUA_SIGNATURE
mark for precompiled code ('<esc>Lua')
const LUA_STRLIBNAME = C.LUA_STRLIBNAME
const LUA_TABLIBNAME = C.LUA_TABLIBNAME
const LUA_TBOOLEAN = C.LUA_TBOOLEAN
const LUA_TFUNCTION = C.LUA_TFUNCTION
const LUA_TLIGHTUSERDATA = C.LUA_TLIGHTUSERDATA
const LUA_TNIL = C.LUA_TNIL
const LUA_TNONE = C.LUA_TNONE
** basic types
const LUA_TNUMBER = C.LUA_TNUMBER
const LUA_TSTRING = C.LUA_TSTRING
const LUA_TTABLE = C.LUA_TTABLE
const LUA_TTHREAD = C.LUA_TTHREAD
const LUA_TUSERDATA = C.LUA_TUSERDATA
const LUA_VERSION = "Lua " + C.LUA_VERSION_MAJOR + "." + C.LUA_VERSION_MINOR
const LUA_VERSION_MAJOR = C.LUA_VERSION_MAJOR
const LUA_VERSION_MINOR = C.LUA_VERSION_MINOR
const LUA_VERSION_NUM = C.LUA_VERSION_NUM
const LUA_VERSION_RELEASE = C.LUA_VERSION_RELEASE
const LUA_YIELD = C.LUA_YIELD
Variables ¶
var Lua_ident = C.lua_ident
** RCS ident string
Functions ¶
func LuaGoH_FetchParams ¶
func LuaGoH_FetchParams(L Lua_Handle, ignore_nonexistent_field bool, args ...interface{}) bool
func LuaGoH_FetchValue ¶
func LuaGoH_FetchValue(L Lua_Handle, value *reflect.Value, ignore_nonexistent_field bool) bool
func LuaGoH_FetchVariable ¶
func LuaGoH_FetchVariable(L Lua_Handle, value interface{}, ignore_nonexistent_field bool) bool
func LuaGoH_GetRef ¶
func LuaGoH_GetRef(l Lua_Handle, var_ref LuaGo_Ref) bool
func LuaGoH_InvokeFunction ¶
func LuaGoH_PushValue ¶
func LuaGoH_PushValue(L Lua_Handle, value *reflect.Value) bool
func LuaGoH_PushVariable ¶
func LuaGoH_PushVariable(L Lua_Handle, value interface{}) bool
func LuaGoH_SetGlobal ¶
func LuaGoH_SetGlobal(l Lua_Handle, varname string) bool
func LuaGo_stackDump ¶
func LuaGo_stackDump(L Lua_Handle)
func LuaL_addchar ¶
func LuaL_addchar(B *LuaL_Buffer, c byte)
func LuaL_addlstring ¶
func LuaL_addlstring(B *LuaL_Buffer, s string, l uint)
func LuaL_addsize ¶
func LuaL_addsize(B *LuaL_Buffer, s uint)
func LuaL_addstring ¶
func LuaL_addstring(B *LuaL_Buffer, s string)
func LuaL_addvalue ¶
func LuaL_addvalue(B *LuaL_Buffer)
func LuaL_argcheck ¶
func LuaL_argcheck(L Lua_Handle, cond bool, numarg int, extramsg string)
func LuaL_argerror ¶
func LuaL_argerror(L Lua_Handle, numarg int, extramsg string) int
func LuaL_buffinit ¶
func LuaL_buffinit(L Lua_Handle, B *LuaL_Buffer)
func LuaL_buffinitsize ¶
func LuaL_buffinitsize(L Lua_Handle, B *LuaL_Buffer, sz uint) unsafe.Pointer
func LuaL_callmeta ¶
func LuaL_callmeta(L Lua_Handle, obj int, e string) int
func LuaL_checkany ¶
func LuaL_checkany(L Lua_Handle, narg int)
func LuaL_checkint ¶
func LuaL_checkint(L Lua_Handle, numArg int) int
func LuaL_checklong ¶
func LuaL_checklong(L Lua_Handle, numArg int) int32
func LuaL_checklstring ¶
func LuaL_checklstring(L Lua_Handle, numArg int, l *uint) string
func LuaL_checkoption ¶
func LuaL_checkoption(L Lua_Handle, narg int, def string, lst []string) int
func LuaL_checkstack ¶
func LuaL_checkstack(L Lua_Handle, sz int, msg string)
func LuaL_checkstring ¶
func LuaL_checkstring(L Lua_Handle, numArg int) string
func LuaL_checktype ¶
func LuaL_checktype(L Lua_Handle, narg int, t int)
func LuaL_checkudata ¶
func LuaL_checkudata(L Lua_Handle, ud int, tname string) unsafe.Pointer
func LuaL_checkversion ¶
func LuaL_checkversion(L Lua_Handle)
func LuaL_checkversion_ ¶
func LuaL_checkversion_(L Lua_Handle, ver Lua_Number)
func LuaL_dofile ¶
func LuaL_dofile(L Lua_Handle, fn string) int
func LuaL_dostring ¶
func LuaL_dostring(L Lua_Handle, s string) int
func LuaL_execresult ¶
func LuaL_execresult(L Lua_Handle, stat int) int
func LuaL_fileresult ¶
func LuaL_fileresult(L Lua_Handle, stat int, fname string) int
func LuaL_getmetafield ¶
func LuaL_getmetafield(L Lua_Handle, obj int, e string) int
func LuaL_getmetatable ¶
func LuaL_getmetatable(L Lua_Handle, name string)
func LuaL_getsubtable ¶
func LuaL_getsubtable(L Lua_Handle, idx int, fname string) int
func LuaL_len ¶
func LuaL_len(L Lua_Handle, idx int) int
func LuaL_loadbuffer ¶
func LuaL_loadbufferx ¶
func LuaL_loadfile ¶
func LuaL_loadfile(L Lua_Handle, filename string) int
func LuaL_loadfilex ¶
func LuaL_loadfilex(L Lua_Handle, filename string, mode string) int
func LuaL_loadstring ¶
func LuaL_loadstring(L Lua_Handle, s string) int
func LuaL_newlib ¶
func LuaL_newlib(L Lua_Handle, lst *LuaL_Reg)
func LuaL_newlibtable ¶
func LuaL_newlibtable(L Lua_Handle, lst *LuaL_Reg)
func LuaL_newmetatable ¶
func LuaL_newmetatable(L Lua_Handle, tname string) int
func LuaL_optint ¶
func LuaL_optint(L Lua_Handle, numArg int, def int) int
func LuaL_optlong ¶
func LuaL_optlong(L Lua_Handle, numArg int, def int32) int32
func LuaL_optlstring ¶
func LuaL_optlstring(L Lua_Handle, numArg int, def string, l *uint) string
func LuaL_optstring ¶
func LuaL_optstring(L Lua_Handle, numArg int, def string) string
func LuaL_prepbuffer ¶
func LuaL_prepbuffer(B *LuaL_Buffer)
func LuaL_prepbuffsize ¶
func LuaL_prepbuffsize(B *LuaL_Buffer, sz uint) unsafe.Pointer
func LuaL_pushresult ¶
func LuaL_pushresult(B *LuaL_Buffer)
func LuaL_pushresultsize ¶
func LuaL_pushresultsize(B *LuaL_Buffer, sz uint)
func LuaL_ref ¶
func LuaL_ref(L Lua_Handle, t int) int
func LuaL_requiref ¶
func LuaL_requiref(L Lua_Handle, modname string, openf Lua_CFunction, glb int)
func LuaL_setfuncs ¶
func LuaL_setfuncs(L Lua_Handle, lst *LuaL_Reg, nup int)
func LuaL_setmetatable ¶
func LuaL_setmetatable(L Lua_Handle, tname string)
func LuaL_testudata ¶
func LuaL_testudata(L Lua_Handle, ud int, tname string) unsafe.Pointer
func LuaL_tolstring ¶
func LuaL_tolstring(L Lua_Handle, idx int, len *uint) string
func LuaL_traceback ¶
func LuaL_traceback(L Lua_Handle, L1 Lua_Handle, msg string, level int)
func LuaL_typename ¶
func LuaL_typename(L Lua_Handle, idx int) string
func LuaL_unref ¶
func LuaL_unref(L Lua_Handle, t int, ref int)
func LuaL_where ¶
func LuaL_where(L Lua_Handle, lvl int)
func Lua_arith ¶
func Lua_arith(L Lua_Handle, op int)
func Lua_call ¶
func Lua_call(L Lua_Handle, nargs int, nresults int)
func Lua_callk ¶
func Lua_callk(L Lua_Handle, nargs int, nresults int, ctx int, k Lua_CFunction)
** 'load' and 'call' functions (load and run Lua code)
func Lua_checkstack ¶
func Lua_checkstack(L Lua_Handle, sz int) bool
func Lua_close ¶
func Lua_close(L Lua_Handle)
func Lua_compare ¶
func Lua_compare(L Lua_Handle, idx1 int, idx2 int, op int) int
func Lua_concat ¶
func Lua_concat(L Lua_Handle, n int)
func Lua_copy ¶
func Lua_copy(L Lua_Handle, fromidx int, toidx int)
func Lua_createtable ¶
func Lua_createtable(L Lua_Handle, narr int, nrec int)
func Lua_dump ¶
func Lua_dump(L Lua_Handle, writer Lua_Writer, data unsafe.Pointer) int
func Lua_error ¶
func Lua_error(L Lua_Handle) int
func Lua_getctx ¶
func Lua_getctx(L Lua_Handle, ctx *int) int
func Lua_getfield ¶
func Lua_getfield(L Lua_Handle, idx int, k string)
func Lua_getglobal ¶
func Lua_getglobal(L Lua_Handle, varname string)
** get functions (Lua -> stack)
func Lua_getmetatable ¶
func Lua_getmetatable(L Lua_Handle, objindex int) bool
func Lua_gettable ¶
func Lua_gettable(L Lua_Handle, idx int)
func Lua_gettop ¶
func Lua_gettop(L Lua_Handle) int
func Lua_getuservalue ¶
func Lua_getuservalue(L Lua_Handle, idx int)
func Lua_insert ¶
func Lua_insert(L Lua_Handle, idx int)
func Lua_isboolean ¶
func Lua_isboolean(L Lua_Handle, n int) bool
func Lua_iscfunction ¶
func Lua_iscfunction(L Lua_Handle, idx int) bool
func Lua_isfunction ¶
func Lua_isfunction(L Lua_Handle, n int) bool
func Lua_islightuserdata ¶
func Lua_islightuserdata(L Lua_Handle, n int) bool
func Lua_isnil ¶
func Lua_isnil(L Lua_Handle, n int) bool
func Lua_isnone ¶
func Lua_isnone(L Lua_Handle, n int) bool
func Lua_isnoneornil ¶
func Lua_isnoneornil(L Lua_Handle, n int) bool
func Lua_isnumber ¶
func Lua_isnumber(L Lua_Handle, idx int) bool
func Lua_isstring ¶
func Lua_isstring(L Lua_Handle, idx int) bool
func Lua_istable ¶
func Lua_istable(L Lua_Handle, n int) bool
func Lua_isthread ¶
func Lua_isthread(L Lua_Handle, n int) bool
func Lua_isuserdata ¶
func Lua_isuserdata(L Lua_Handle, idx int) bool
func Lua_len ¶
func Lua_len(L Lua_Handle, idx int)
func Lua_load ¶
func Lua_load(L Lua_Handle, reader Lua_Reader, dt unsafe.Pointer, chunkname string, mode string) int
func Lua_newtable ¶
func Lua_newtable(L Lua_Handle)
func Lua_newuserdata ¶
func Lua_newuserdata(L Lua_Handle, sz uint) unsafe.Pointer
func Lua_next ¶
func Lua_next(L Lua_Handle, idx int) int
func Lua_pcallk ¶
func Lua_pcallk(L Lua_Handle, nargs int, nresults int, errfunc int, ctx int, k Lua_CFunction) int
func Lua_pop ¶
func Lua_pop(L Lua_Handle, n int)
func Lua_pushboolean ¶
func Lua_pushboolean(L Lua_Handle, b bool)
func Lua_pushcclosure ¶
func Lua_pushcclosure(L Lua_Handle, fn Lua_CFunction, n int)
TODO: LUA_API const char *(lua_pushvfstring) (L Lua_Handle, const char *fmt, va_list argp); TODO: LUA_API const char *(lua_pushfstring) (L Lua_Handle, const char *fmt, ...);
func Lua_pushcfunction ¶
func Lua_pushcfunction(L Lua_Handle, fn Lua_CFunction)
func Lua_pushglobaltable ¶
func Lua_pushglobaltable(L Lua_Handle)
TODO: #define lua_pushliteral (L Lua_Handle, s string) lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1)
func Lua_pushinteger ¶
func Lua_pushinteger(L Lua_Handle, n Lua_Integer)
func Lua_pushlightuserdata ¶
func Lua_pushlightuserdata(L Lua_Handle, p unsafe.Pointer)
func Lua_pushlstring ¶
func Lua_pushlstring(L Lua_Handle, s unsafe.Pointer, l uint)
func Lua_pushnumber ¶
func Lua_pushnumber(L Lua_Handle, n Lua_Number)
func Lua_pushstring ¶
func Lua_pushstring(L Lua_Handle, s string) string
func Lua_pushthread ¶
func Lua_pushthread(L Lua_Handle) bool
func Lua_pushunsigned ¶
func Lua_pushunsigned(L Lua_Handle, n Lua_Unsigned)
func Lua_pushvalue ¶
func Lua_pushvalue(L Lua_Handle, idx int)
func Lua_rawequal ¶
func Lua_rawequal(L Lua_Handle, idx1 int, idx2 int) bool
func Lua_rawget ¶
func Lua_rawget(L Lua_Handle, idx int)
func Lua_rawgeti ¶
func Lua_rawgeti(L Lua_Handle, idx int, n int)
func Lua_rawgetp ¶
func Lua_rawgetp(L Lua_Handle, idx int, p unsafe.Pointer)
func Lua_rawlen ¶
func Lua_rawlen(L Lua_Handle, idx int) uint
func Lua_rawset ¶
func Lua_rawset(L Lua_Handle, idx int)
func Lua_rawseti ¶
func Lua_rawseti(L Lua_Handle, idx int, n int)
func Lua_rawsetp ¶
func Lua_rawsetp(L Lua_Handle, idx int, p unsafe.Pointer)
func Lua_register ¶
func Lua_register(L Lua_Handle, varname string, fn Lua_CFunction)
func Lua_remove ¶
func Lua_remove(L Lua_Handle, idx int)
func Lua_replace ¶
func Lua_replace(L Lua_Handle, idx int)
func Lua_resume ¶
func Lua_resume(L Lua_Handle, from Lua_Handle, narg int) int
func Lua_setallocf ¶
func Lua_setallocf(L Lua_Handle, f Lua_Alloc, ud unsafe.Pointer)
func Lua_setfield ¶
func Lua_setfield(L Lua_Handle, idx int, k string)
func Lua_setglobal ¶
func Lua_setglobal(L Lua_Handle, varname string)
** set functions (stack -> Lua)
func Lua_setmetatable ¶
func Lua_setmetatable(L Lua_Handle, objindex int) bool
func Lua_settable ¶
func Lua_settable(L Lua_Handle, idx int)
func Lua_settop ¶
func Lua_settop(L Lua_Handle, idx int)
func Lua_setuservalue ¶
func Lua_setuservalue(L Lua_Handle, idx int)
func Lua_status ¶
func Lua_status(L Lua_Handle) int
func Lua_toboolean ¶
func Lua_toboolean(L Lua_Handle, idx int) bool
func Lua_tolstring ¶
func Lua_tolstring(L Lua_Handle, idx int, len *uint) string
func Lua_tolstringbytes ¶
func Lua_tolstringbytes(L Lua_Handle, idx int) []byte
func Lua_topointer ¶
func Lua_topointer(L Lua_Handle, idx int) unsafe.Pointer
func Lua_tostring ¶
func Lua_tostring(L Lua_Handle, i int) string
func Lua_touserdata ¶
func Lua_touserdata(L Lua_Handle, idx int) unsafe.Pointer
func Lua_type ¶
func Lua_type(L Lua_Handle, idx int) int
func Lua_typename ¶
func Lua_typename(L Lua_Handle, tp int) string
func Lua_upvalueindex ¶
func Lua_xmove ¶
func Lua_xmove(from Lua_Handle, to Lua_Handle, n int)
func Lua_yield ¶
func Lua_yield(L Lua_Handle, nresults int) int
func Lua_yieldk ¶
func Lua_yieldk(L Lua_Handle, nresults int, ctx int, k Lua_CFunction) int
** coroutine functions
func Luaopen_base ¶
func Luaopen_base(L Lua_Handle) int
func Luaopen_bit32 ¶
func Luaopen_bit32(L Lua_Handle) int
func Luaopen_coroutine ¶
func Luaopen_coroutine(L Lua_Handle) int
func Luaopen_debug ¶
func Luaopen_debug(L Lua_Handle) int
func Luaopen_io ¶
func Luaopen_io(L Lua_Handle) int
func Luaopen_math ¶
func Luaopen_math(L Lua_Handle) int
func Luaopen_os ¶
func Luaopen_os(L Lua_Handle) int
func Luaopen_package ¶
func Luaopen_package(L Lua_Handle) int
func Luaopen_string ¶
func Luaopen_string(L Lua_Handle) int
func Luaopen_table ¶
func Luaopen_table(L Lua_Handle) int
Types ¶
type LUA_INTEGER ¶
type LUA_INTEGER C.LUA_INTEGER
type LUA_NUMBER ¶
type LUA_NUMBER C.LUA_NUMBER
type LUA_UNSIGNED ¶
type LUA_UNSIGNED C.LUA_UNSIGNED
type LuaGo_Function ¶
type LuaGo_Function func(L Lua_Handle) int
type LuaGo_ResultSum ¶
type LuaGo_Script ¶
type LuaGo_Script struct {
LuaGo_ScriptBase
}
simple impls.
func CreateLuaScript ¶
func CreateLuaScript() *LuaGo_Script
func (*LuaGo_Script) Create ¶
func (s *LuaGo_Script) Create()
func (*LuaGo_Script) Destroy ¶
func (s *LuaGo_Script) Destroy()
type LuaGo_ScriptBase ¶
type LuaGo_ScriptBase struct {
// contains filtered or unexported fields
}
LuaGo_ScriptBase
func (*LuaGo_ScriptBase) Call ¶
func (s *LuaGo_ScriptBase) Call(func_name string, args ...interface{}) bool
func (*LuaGo_ScriptBase) GetErrorMessage ¶
func (s *LuaGo_ScriptBase) GetErrorMessage() string
called must after dostring / dofile
func (*LuaGo_ScriptBase) GetHandle ¶
func (s *LuaGo_ScriptBase) GetHandle() Lua_Handle
func (*LuaGo_ScriptBase) GetObject ¶
func (s *LuaGo_ScriptBase) GetObject(var_name string, value interface{}, ignore_nonexistent_field bool) bool
func (*LuaGo_ScriptBase) GetRef ¶
func (s *LuaGo_ScriptBase) GetRef(var_name string, pref *LuaGo_Ref) bool
func (*LuaGo_ScriptBase) GetVar ¶
func (s *LuaGo_ScriptBase) GetVar(var_name string, value interface{}) bool
func (*LuaGo_ScriptBase) HasRef ¶
func (s *LuaGo_ScriptBase) HasRef(ref LuaGo_Ref) bool
func (*LuaGo_ScriptBase) HasVar ¶
func (s *LuaGo_ScriptBase) HasVar(var_name string) bool
func (*LuaGo_ScriptBase) Invoke ¶
func (s *LuaGo_ScriptBase) Invoke(ret_value interface{}, func_name string, args ...interface{}) bool
func (*LuaGo_ScriptBase) LoadRef ¶
func (s *LuaGo_ScriptBase) LoadRef(ref LuaGo_Ref) bool
func (*LuaGo_ScriptBase) OpenStdLibs ¶
func (s *LuaGo_ScriptBase) OpenStdLibs()
func (*LuaGo_ScriptBase) RemoveRef ¶
func (s *LuaGo_ScriptBase) RemoveRef(ref LuaGo_Ref) bool
func (*LuaGo_ScriptBase) RemoveVar ¶
func (s *LuaGo_ScriptBase) RemoveVar(var_name string)
func (*LuaGo_ScriptBase) RunBuffer ¶
func (s *LuaGo_ScriptBase) RunBuffer(buffer unsafe.Pointer, size uint) bool
func (*LuaGo_ScriptBase) RunFile ¶
func (s *LuaGo_ScriptBase) RunFile(file string) bool
func (*LuaGo_ScriptBase) RunString ¶
func (s *LuaGo_ScriptBase) RunString(code string) bool
func (*LuaGo_ScriptBase) SetHandle ¶
func (s *LuaGo_ScriptBase) SetHandle(l Lua_Handle)
func (*LuaGo_ScriptBase) SetObject ¶
func (s *LuaGo_ScriptBase) SetObject(var_name string, value interface{}, keep_nonexistent_field bool) bool
func (*LuaGo_ScriptBase) SetVar ¶
func (s *LuaGo_ScriptBase) SetVar(var_name string, value interface{}) bool
type LuaGo_State ¶
type LuaGo_State struct { // base struct LuaGo_Script // contains filtered or unexported fields }
func LuaGo_newState ¶
func LuaGo_newState() *LuaGo_State
func (*LuaGo_State) LuaGo_AddSearchPath ¶
func (this *LuaGo_State) LuaGo_AddSearchPath(_path string, _tip int)
增加lua搜索路径
func (*LuaGo_State) LuaGo_OpenInvokeCompenent ¶
func (this *LuaGo_State) LuaGo_OpenInvokeCompenent()
开启gofunction注册支持
func (*LuaGo_State) LuaGo_PopGoFunction ¶
func (this *LuaGo_State) LuaGo_PopGoFunction(_name string)
func (*LuaGo_State) LuaGo_PushGoFunction ¶
func (this *LuaGo_State) LuaGo_PushGoFunction(_name string, _func LuaGo_Function) int
压入gofunction
func (*LuaGo_State) LuaGo_SafeCall ¶
func (this *LuaGo_State) LuaGo_SafeCall(argnum int, removeret bool) (int, error)
只支持返回单返回值:number or boolean , 其余自己操作lua_state获取 removeret : 自动pop返回值,假设返回值个数为0,传入false
func (*LuaGo_State) LuaGo_SafeDoFile ¶
func (this *LuaGo_State) LuaGo_SafeDoFile(_name string) error
type LuaGo_Thread ¶
type LuaGo_Thread struct { LuaGo_ScriptBase // contains filtered or unexported fields }
LuaGo_Thread
func (*LuaGo_Thread) AbortWait ¶
func (t *LuaGo_Thread) AbortWait()
func (*LuaGo_Thread) GetAutoDelete ¶
func (t *LuaGo_Thread) GetAutoDelete() bool
func (*LuaGo_Thread) GetMgr ¶
func (t *LuaGo_Thread) GetMgr() *LuaGo_ThreadMgr
func (*LuaGo_Thread) GetStatus ¶
func (t *LuaGo_Thread) GetStatus() int
func (*LuaGo_Thread) RunBuffer ¶
func (t *LuaGo_Thread) RunBuffer(buffer unsafe.Pointer, size uint) bool
func (*LuaGo_Thread) RunFile ¶
func (t *LuaGo_Thread) RunFile(file string) bool
func (*LuaGo_Thread) RunString ¶
func (t *LuaGo_Thread) RunString(code string) bool
func (*LuaGo_Thread) SetAutoDelete ¶
func (t *LuaGo_Thread) SetAutoDelete(bAutoDelete bool)
type LuaGo_ThreadMgr ¶
type LuaGo_ThreadMgr struct { LuaGo_ScriptBase // contains filtered or unexported fields }
LuaGo_ThreadMgr
func CreateLuaThreadMgr ¶
func CreateLuaThreadMgr() *LuaGo_ThreadMgr
func (*LuaGo_ThreadMgr) Create ¶
func (m *LuaGo_ThreadMgr) Create()
func (*LuaGo_ThreadMgr) CreateThread ¶
func (m *LuaGo_ThreadMgr) CreateThread(bAutoDelete bool) *LuaGo_Thread
func (*LuaGo_ThreadMgr) Destroy ¶
func (m *LuaGo_ThreadMgr) Destroy()
func (*LuaGo_ThreadMgr) DestroyThread ¶
func (m *LuaGo_ThreadMgr) DestroyThread(t *LuaGo_Thread)
func (*LuaGo_ThreadMgr) GetThreadSum ¶
func (m *LuaGo_ThreadMgr) GetThreadSum() int
func (*LuaGo_ThreadMgr) IsValidThread ¶
func (m *LuaGo_ThreadMgr) IsValidThread(t *LuaGo_Thread) bool
func (*LuaGo_ThreadMgr) OpenScriptLib ¶
func (m *LuaGo_ThreadMgr) OpenScriptLib()
func (*LuaGo_ThreadMgr) Update ¶
func (m *LuaGo_ThreadMgr) Update(dt float32)
type LuaL_Buffer ¶
type LuaL_Buffer C.luaL_Buffer
type LuaL_Reg ¶
func LuaGo_RegPtr ¶
type LuaL_Stream ¶
type LuaL_Stream C.luaL_Stream
type Lua_Alloc ¶
** prototype for memory-allocation functions
func Lua_getallocf ¶
func Lua_getallocf(L Lua_Handle, ud *unsafe.Pointer) Lua_Alloc
type Lua_CFunction ¶
type Lua_CFunction C.lua_CFunction
func Lua_atpanic ¶
func Lua_atpanic(L Lua_Handle, panicf Lua_CFunction) Lua_CFunction
func Lua_tocfunction ¶
func Lua_tocfunction(L Lua_Handle, idx int) Lua_CFunction
type Lua_Handle ¶
func LuaGo_Handle ¶
func LuaGo_Handle(l unsafe.Pointer) Lua_Handle
func LuaL_newstate ¶
func LuaL_newstate() Lua_Handle
func Lua_newstate ¶
func Lua_newstate(f Lua_Alloc, ud unsafe.Pointer) Lua_Handle
** state manipulation
func Lua_newthread ¶
func Lua_newthread(L Lua_Handle) Lua_Handle
func Lua_tothread ¶
func Lua_tothread(L Lua_Handle, idx int) Lua_Handle
type Lua_Integer ¶
type Lua_Integer C.lua_Integer
type for integer functions
func LuaL_checkinteger ¶
func LuaL_checkinteger(L Lua_Handle, numArg int) Lua_Integer
func LuaL_optinteger ¶
func LuaL_optinteger(L Lua_Handle, nArg int, def Lua_Integer) Lua_Integer
func Lua_tointeger ¶
func Lua_tointeger(L Lua_Handle, idx int) Lua_Integer
func Lua_tointegerx ¶
func Lua_tointegerx(L Lua_Handle, idx int, isnum *bool) Lua_Integer
type Lua_Number ¶
type Lua_Number C.lua_Number
type of numbers in Lua
func LuaL_checknumber ¶
func LuaL_checknumber(L Lua_Handle, numArg int) Lua_Number
func LuaL_optnumber ¶
func LuaL_optnumber(L Lua_Handle, nArg int, def Lua_Number) Lua_Number
func Lua_tonumber ¶
func Lua_tonumber(L Lua_Handle, idx int) Lua_Number
func Lua_tonumberx ¶
func Lua_tonumberx(L Lua_Handle, idx int, isnum *bool) Lua_Number
func Lua_version ¶
func Lua_version(L Lua_Handle) Lua_Number
type Lua_Reader ¶
type Lua_Reader C.lua_Reader
** functions that read/write blocks when loading/dumping Lua chunks
type Lua_Unsigned ¶
type Lua_Unsigned C.lua_Unsigned
unsigned integer type
func LuaL_checkunsigned ¶
func LuaL_checkunsigned(L Lua_Handle, numArg int) Lua_Unsigned
func LuaL_optunsigned ¶
func LuaL_optunsigned(L Lua_Handle, numArg int, def Lua_Unsigned) Lua_Unsigned
func Lua_tounsigned ¶
func Lua_tounsigned(L Lua_Handle, idx int) Lua_Unsigned
func Lua_tounsignedx ¶
func Lua_tounsignedx(L Lua_Handle, idx int, isnum *bool) Lua_Unsigned
type Lua_Writer ¶
type Lua_Writer C.lua_Reader