lua头文件的pas翻译_lua.h

2008-04-09 04:21:57来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

{
** $Id: lua.h,v 1.175b 2003/03/18 12:31:39 roberto Exp $
** Lua - An Extensible Extension Language
** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
** http://www.lua.org mailto:info@lua.org
** See Copyright Notice at the end of this file
}
{
this .h header file is translated by melice
}

unit Lua;
interface

const
LuaDLL = ''''LuaLibDll.dll'''';

type
lua_state = pointer;
int = integer;
size_t = int;

va_list = int;

const

sLUA_VERSION = ''''Lua 5.0.2'''';
sLUA_COPYRIGHT = ''''Copyright (C) 1994-2004 Tecgraf, PUC-Rio'''';
sLUA_AUTHORS = ''''R. Ierusalimschy, L. H. de Figueiredo & W. Celes'''';

{ option for multiple returns in `lua_pcall'''' and `lua_call'''' }
LUA_MULTRET = -1;

{
** pseudo-indices
}
LUA_REGISTRYINDEX = -10000;
LUA_GLOBALSINDEX = -10001;

// #define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i))

{ error codes for `lua_load'''' and `lua_pcall'''' }
LUA_ERRRUN = 1;
LUA_ERRFILE = 2;
LUA_ERRSYNTAX = 3;
LUA_ERRMEM = 4;
LUA_ERRERR = 5;

// typedef struct lua_State lua_State;

type
lua_CFunction = function(L: lua_state): int;

{
** functions that read/write blocks when loading/dumping Lua chunks
}
lua_Chunkreader = function(L: lua_State; ud: pointer; sz: size_t): pchar;

lua_Chunkwriter = function(L: lua_State; p: pointer; sz: size_t; ud: pointer):
int;

{
** basic types
}
const

LUA_TNONE = -1;

LUA_TNIL = 0;
LUA_TBOOLEAN = 1;
LUA_TLIGHTUSERDATA = 2;
LUA_TNUMBER = 3;
LUA_TSTRING = 4;
LUA_TTABLE = 5;
LUA_TFUNCTION = 6;
LUA_TUSERDATA = 7;
LUA_TTHREAD = 8;

{ minimum Lua stack available to a C function }
LUA_MINSTACK = 20;

{
** generic extra include file
}

{ type of numbers in Lua }
type
lua_Number = double;

{
** state manipulation
}
function lua_open: lua_State; stdcall; external Luadll;
procedure lua_close(L: lua_State); stdcall; external Luadll;
function lua_newthread(L: lua_State): lua_State; stdcall; external Luadll;

function lua_atpanic(L: lua_State; panicf: lua_CFunction): lua_CFunction;
stdcall; external Luadll;

{
** basic stack manipulation
}
function lua_gettop(L: lua_State): int; stdcall; external Luadll;
procedure lua_settop(L: lua_State; idx: int); stdcall; external Luadll;
procedure lua_pushvalue(L: lua_State; idx: int); stdcall; external Luadll;
procedure lua_remove(L: lua_State; idx: int); stdcall; external Luadll;
procedure lua_insert(L: lua_State; idx: int); stdcall; external Luadll;
procedure lua_replace(L: lua_State; idx: int); stdcall; external Luadll;
function lua_checkstack(L: lua_State; sz: int): int; stdcall; external Luadll;

procedure lua_xmove(fromls: lua_State; tols: lua_State; n: int); stdcall;
external
Luadll;

{
** access functions (stack -> C)
}

function lua_isnumber(L: lua_State; idx: int): int; stdcall; external Luadll;
function lua_isstring(L: lua_State; idx: int): int; stdcall; external Luadll;
function lua_iscfunction(L: lua_State; idx: int): int; stdcall; external Luadll;
function lua_isuserdata(L: lua_State; idx: int): int; stdcall; external Luadll;
function lua_type(L: lua_State; idx: int): int; stdcall; external Luadll;
function lua_typename(L: lua_State; tp: int): pchar; stdcall; external Luadll;

function lua_equal(L: lua_State; idx1: int; idx2: int): int; stdcall; external
Luadll;
function lua_rawequal(L: lua_State; idx1: int; idx2: int): int; stdcall; external
Luadll;
function lua_lessthan(L: lua_State; idx1: int; idx2: int): int; stdcall; external
Luadll;

function lua_tonumber(L: lua_State; idx: int): lua_Number; stdcall; external
Luadll;
function lua_toboolean(L: lua_State; idx: int): int; stdcall; external Luadll;
function lua_tostring(L: lua_State; idx: int): pchar; stdcall; external Luadll;
function lua_strlen(L: lua_State; idx: int): size_t; stdcall; external Luadll;
function lua_tocfunction(L: lua_State; idx: int): lua_CFunction; stdcall;
external Luadll;
procedure lua_touserdata(L: lua_State; idx: int); stdcall; external Luadll;
function lua_tothread(L: lua_State; idx: int): lua_State; stdcall; external
Luadll;
procedure lua_topointer(L: lua_State; idx: int); stdcall; external Luadll;

{
** push functions (C -> stack)
}
procedure lua_pushnil(L: lua_State); stdcall; external Luadll;
procedure lua_pushnumber(L: lua_State; n: lua_Number); stdcall; external Luadll;
procedure lua_pushlstring(L: lua_State; s: pchar; st: size_t); stdcall; external
Luadll;
procedure lua_pushstring(L: lua_State; s: pchar); stdcall; external Luadll;
function lua_pushvfstring(L: lua_State; fmt: pchar; argp: va_list): pchar;

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Simulate the pressing of keyboard keys

下一篇:lua头文件翻译之lauxlib