From: John L. <jr...@us...> - 2006-08-28 05:26:25
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxlua/include Modified Files: internal.h wxlbind.h wxldefs.h wxlstate.h Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxldefs.h 8 Apr 2006 23:05:39 -0000 1.6 --- wxldefs.h 28 Aug 2006 05:26:20 -0000 1.7 *************** *** 21,24 **** --- 21,55 ---- } + //----------------------------------------------------------------------------- + // The version of wxLua - for convenience we use the current version of + // wxWidgets which wxLua is most compatible with. + //----------------------------------------------------------------------------- + + #define WXLUA_MAJOR_VERSION 2 + #define WXLUA_MINOR_VERSION 6 + #define WXLUA_RELEASE_VERSION 3 + #define WXLUA_SUBRELEASE_VERSION 0 + #define WXLUA_VERSION_STRING _T("wxLua 2.6.3") + + // For non-Unix systems (i.e. when building without a configure script), + // users of this component can use the following macro to check if the + // current version is at least major.minor.release + #define wxCHECK_WXLUA_VERSION(major,minor,release) \ + (WXLUA_MAJOR_VERSION > (major) || \ + (WXLUA_MAJOR_VERSION == (major) && WXLUA_MINOR_VERSION > (minor)) || \ + (WXLUA_MAJOR_VERSION == (major) && WXLUA_MINOR_VERSION == (minor) && WXLUA_RELEASE_VERSION >= (release))) + + // ---------------------------------------------------------------------------- + // Strings pushed into lua to determine the platform + // ---------------------------------------------------------------------------- + + #if defined(__WXGTK__) + #define wxPlatformGTK wxVERSION_NUMBER + #elif defined(__WXMSW__) + #define wxPlatformWindows wxVERSION_NUMBER + #elif defined(__WXMAC__) + #define wxPlatformMac wxVERSION_NUMBER + #endif + // ---------------------------------------------------------------------------- // If you're using stdcall in Lua, then override this with Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxlbind.h 9 Jun 2006 03:24:50 -0000 1.22 --- wxlbind.h 28 Aug 2006 05:26:20 -0000 1.23 *************** *** 23,26 **** --- 23,27 ---- class WXDLLIMPEXP_WXLUA wxLuaBinding; + class WXDLLIMPEXP_WXLUA wxLuaState; // ---------------------------------------------------------------------------- *************** *** 39,56 **** // ---------------------------------------------------------------------------- ! enum LuaType // The type of a Lua method { ! LuaDelete = 1, // gc routine ! LuaConstructor = 2, // constructor ! LuaDestructor = 4, // destructor (not used) ! LuaMethod = 8, // class method ! LuaGlobal = 16, // global method (not really related to the class) ! LuaGetProp = 32, ! LuaSetProp = 64 }; typedef int* wxLuaArgTag; // address of class tag ! struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property { LuaType type; // type (one of the above enumeration values) --- 40,57 ---- // ---------------------------------------------------------------------------- ! enum LuaType // The type of a Lua method { ! LuaDelete = 1, // gc routine ! LuaConstructor = 2, // constructor ! LuaDestructor = 4, // destructor (not used) ! LuaMethod = 8, // class method ! LuaGlobal = 16, // global method (not really related to the class) ! LuaGetProp = 32, ! LuaSetProp = 64 }; typedef int* wxLuaArgTag; // address of class tag ! struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property { LuaType type; // type (one of the above enumeration values) *************** *** 72,76 **** extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_LuaFunction; ! struct WXDLLIMPEXP_WXLUA WXLUACLASS // defines a LUA class interface { const char *name; // name of the class --- 73,77 ---- extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_LuaFunction; ! struct WXDLLIMPEXP_WXLUA WXLUACLASS // defines a LUA class interface { const char *name; // name of the class *************** *** 84,100 **** }; ! struct WXDLLIMPEXP_WXLUA WXLUADEFINE // defines a wxWidgets define for wxLua { ! const char *name; // name ! double value; // numeric value }; ! struct WXDLLIMPEXP_WXLUA WXLUASTRING // defines a wxWidgets string for wxLua { ! const char *name; // name ! const wxChar *value; // string value }; ! struct WXDLLIMPEXP_WXLUA WXLUAEVENT // defines a wxWidgets Event for wxLua { const int *eventType; // new wxWidgets event type --- 85,101 ---- }; ! struct WXDLLIMPEXP_WXLUA WXLUADEFINE // defines a wxWidgets define for wxLua { ! const char *name; // name ! double value; // numeric value }; ! struct WXDLLIMPEXP_WXLUA WXLUASTRING // defines a wxWidgets string for wxLua { ! const char *name; // name ! const wxChar *value; // string value }; ! struct WXDLLIMPEXP_WXLUA WXLUAEVENT // defines a wxWidgets Event for wxLua { const int *eventType; // new wxWidgets event type *************** *** 103,107 **** }; ! struct WXDLLIMPEXP_WXLUA WXLUAOBJECT // Defines a wxWidgets object or pointer for wxLua { const void *objPtr; // a pointer to the object or pointer --- 104,108 ---- }; ! struct WXDLLIMPEXP_WXLUA WXLUAOBJECT // Defines a wxWidgets object or pointer for wxLua { const void *objPtr; // a pointer to the object or pointer *************** *** 126,132 **** public: wxLuaFunction(WXLUAMETHOD *pMethod, WXLUACLASS *pClass, void *pObject) ! : m_pMethod(pMethod), m_pClass(pClass), m_pObject(pObject) ! { ! } ~wxLuaFunction() {} --- 127,131 ---- public: wxLuaFunction(WXLUAMETHOD *pMethod, WXLUACLASS *pClass, void *pObject) ! : m_pMethod(pMethod), m_pClass(pClass), m_pObject(pObject) {} ~wxLuaFunction() {} *************** *** 134,140 **** int CallMethod(lua_State *L) { ! lua_remove(L, 1); // remove this line to restore calling ! // methods using the dot notation ! // otherwise the colon notation *must* be used. return (*m_pMethod->func)(L); } --- 133,140 ---- int CallMethod(lua_State *L) { ! // remove this line to restore calling methods using the dot notation ! // otherwise the colon notation *must* be used. ! lua_remove(L, 1); ! return (*m_pMethod->func)(L); } *************** *** 149,152 **** --- 149,217 ---- // ---------------------------------------------------------------------------- + // wxLuaObject - wraps a reference to a Lua object reference inside a + // wxObject-derived class so that a Lua object can be used for + // user data, and also with a simple extension by the + // input/output mechanism of the wxValidator classes. + // ---------------------------------------------------------------------------- + + #ifdef GetObject + #undef GetObject + #endif + + enum wxLuaObject_Type + { + wxLUAOBJECT_NONE = 0, // nothing is allocated + wxLUAOBJECT_BOOL = 1, // bool allocated + wxLUAOBJECT_INT = 2, // int allocated + wxLUAOBJECT_STRING = 4, // wxString allocated + wxLUAOBJECT_ARRAYINT = 8 // wxArrayInt allocated + }; + + class WXDLLIMPEXP_WXLUA wxLuaObject : public wxObject + { + public: + wxLuaObject(); + // Constructor that is passed a lua state and a parameter index. + wxLuaObject(lua_State* L, int iParam, int iRef = 1); + // Constructor that is passed a lua state and a parameter index. + wxLuaObject(const wxLuaState& wxlState, int iParam, int iRef = 1); + ~wxLuaObject(); + + // Get the value of the reference object (or a proxy if the object has + // been aliased for a wxValidator class. + bool GetObject(); + // Remove any existing reference and allocate another + void SetObject(int iParam); + // Set the reference and lua state up from a supplied parameter. + void SetObject(lua_State *L, int iParam); + + // The following methods are used by the wxValidator interface + bool *GetBoolPtr(); + int *GetIntPtr(); + wxString *GetStringPtr(); + wxArrayInt *GetArrayPtr(); + + // Return a flag value that indicated whether the + // object is being used by a wxValidator class (else 0). + int GetAllocationFlags() const { return m_alloc_flags; } + bool HasAllocationFlag(wxLuaObject_Type flag) const { return (m_alloc_flags & flag) != 0; } + // Allow the flag value to be manipulated. + void ModifyAllocationFlags(int iValue); + + wxLuaState GetwxLuaState() const; + lua_State* GetLuaState() const; + + private: + wxLuaState* m_wxlState; + int m_iReference; + bool m_bool; + int m_int; + wxString m_string; + wxArrayInt m_arrayInt; + int m_alloc_flags; + DECLARE_DYNAMIC_CLASS(wxLuaObject) + }; + + // ---------------------------------------------------------------------------- // wxLUA_DECLARE_ENCAPSULATION and wxLUA_IMPLEMENT_ENCAPSULATION // Declare the macros used to define and implement classes that *************** *** 154,159 **** // // IMPEXPSYMBOL : similiar to WXDLLIMPEXP_WXBIND, you cannot leave this ! // parameter empty, but you can "#define DUMMYDLLIMPEMP" to nothing ! // if you don't want DLL export symbols. // className : name of the class to encapsulate (may be NameSpace::MyClass) // objName : name to use in naming the encapsulation class (NameSpace_MyClass) --- 219,224 ---- // // IMPEXPSYMBOL : similiar to WXDLLIMPEXP_WXBIND, you cannot leave this ! // parameter empty, but you may use WXLUA_NO_DLLIMPEXP and ! // WXLUA_NO_DLLIMPEXP_DATA(x) if you don't want DLL export symbols. // className : name of the class to encapsulate (may be NameSpace::MyClass) // objName : name to use in naming the encapsulation class (NameSpace_MyClass) *************** *** 173,186 **** private: \ className *m_p##objName; \ - /* Don't put a final semicolon on DECLARE_XXX stuff as borland doesn't like it */ \ DECLARE_ABSTRACT_CLASS(wxObject_##objName) \ }; #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ ! IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject); \ wxObject_##objName::wxObject_##objName(className *p##objName) \ ! :m_p##objName(p##objName) \ ! { \ ! } \ wxObject_##objName::~wxObject_##objName() \ { \ --- 238,249 ---- private: \ className *m_p##objName; \ DECLARE_ABSTRACT_CLASS(wxObject_##objName) \ }; #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ ! IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject) \ wxObject_##objName::wxObject_##objName(className *p##objName) \ ! :m_p##objName(p##objName) {} \ ! \ wxObject_##objName::~wxObject_##objName() \ { \ Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** wxlstate.h 20 Jul 2006 16:16:32 -0000 1.49 --- wxlstate.h 28 Aug 2006 05:26:20 -0000 1.50 *************** *** 69,73 **** return wxString(wxConvUTF8.cMB2WC(luastr), *wxConvCurrent); #endif // wxUSE_UNICODE ! //return wxConvertMB2WX(luastr); // old way that mostly works } --- 69,73 ---- return wxString(wxConvUTF8.cMB2WC(luastr), *wxConvCurrent); #endif // wxUSE_UNICODE ! //return wxConvertMB2WX(luastr); // old way that mostly works } *************** *** 107,110 **** --- 107,191 ---- int LUACALL wxLua_lua_callFunction(lua_State *L); + // ---------------------------------------------------------------------------- + // lua C helper functions - These functions are also part of the wxLuaState + // and you are recommended to use those if the wxLuaState is required. However + // in some cases it may not be necessary to create a wxLuaState and just + // calling these functions will suffice. Only the functions that do not + // require the internal data from the wxLuaState are separated here + // ---------------------------------------------------------------------------- + + // create a reference to the object at index iParam in the Lua index + //WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tinsert(lua_State* L, int iParam) ); + // push onto the top of the stack the object referenced by iReference + //WXDLLIMPEXP_WXLUA wxDEPRECATED( bool LUACALL wxLua_lua_tremove(lua_State* L, int iReference) ); + // Get the number of items in the reference table + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int iReference); + // remove a Lua reference + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tgetn(lua_State* L); + // Display an error message + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_terror(lua_State* L, const char* errorMsg); + // push onto the top of the stack an userdata object containing u using tag to set the metatable + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushusertag(lua_State* L, const void* u, int tag); + // get the tag of the object at index + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_ttag(lua_State* L, int index); + // return the user data in the userdata object at index, if reset is true clear the user data + WXDLLIMPEXP_WXLUA void* LUACALL wxLua_lua_ttouserdata(lua_State* L, int index, bool reset = false); + // allocate a new metatable return its reference + //WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tnewtag(lua_State* L) ); + //WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tnewweaktag(lua_State* L, bool fWeakKey, bool fWeakData) ); + // set the metatable of the object at top of stack from the reference tag + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tsettag(lua_State* L, int tag); + // set a metamethod for the metatable referenced by tag with the supplied name and function. + // if pClass is non-null set the upvalue of the function to the supplied class + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tsettagmethod(lua_State* L, int tag, const char* method, lua_CFunction func, void* pClass = NULL); + // push the wxLuaReferences string onto the stack + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaReferences(lua_State* L); + // push the wxLuaNull string onto the stack + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaNull(lua_State* L); + + // Helper functions to get numbers, booleans and strings safer + // Validate that the object at the stack index specified is a string, bool, + // enum, or double number object or that the object can be converted it. + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isstringtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isbooleantype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isenumerationtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isnumbertype(lua_State* L, int iParam); + // After verifying using wxLua_lua_isXXXtype return the value + WXDLLIMPEXP_WXLUA const char* LUACALL wxLua_lua_getstringtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_getbooleantype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA long LUACALL wxLua_lua_getenumerationtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA double LUACALL wxLua_lua_getnumbertype(lua_State* L, int iParam); + + // Helper functions to get/set tables of strings and ints + // Validate that the object at the stack index specified is a table object + // This assumes that each numeric entry in the table is a string or number + // object or can be converted to a string or number. + + // Convert the table at index iParam to a "new" array of wxStrings. + // Return a pointer to the array of wxStrings (you need to delete them) + // and returns the number of strings in the array in count. + WXDLLIMPEXP_WXLUA wxString* LUACALL wxLua_lua_getwxstringarray(lua_State* L, int iParam, int& count); + // Adds the table at index iParam to the wxArrayString + // Return the number of strings added to the array in count. + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxarraystring(lua_State* L, int iParam, wxArrayString& strArray); + // Convert the table at index iParam to a "new" array of const char* strings. + // Return a pointer to the array of strings (you need to delete them) + // returns the number of character strings in the array in count. + WXDLLIMPEXP_WXLUA const char** LUACALL wxLua_lua_getchararray(lua_State* L, int iParam, int& count); + // Convert the table at index iParam to a "new" array of int* numbers. + // Return a pointer to the array of ints (you need to delete them) + // returns the number of ints in the array in count. + WXDLLIMPEXP_WXLUA int* LUACALL wxLua_lua_getintarray(lua_State* L, int iParam, int& count); + // Adds the table at index iParam to the wxArrayInt + // Return the number of strings added to the array in count. + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxarrayint(lua_State* L, int iParam, wxArrayInt& intArray); + + // Creates a lua table and pushes the strings into it, returns the number of items added + // The table is left on the stack + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarraystringtable(lua_State* L, const wxArrayString& strArray); + // Creates a lua table and pushes the ints into it, returns the number of items added + // The table is left on the stack + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarrayinttable(lua_State* L, const wxArrayInt& intArray); + //---------------------------------------------------------------------------- // wxLuaStateData - the internal data for the wxLuaState. Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** internal.h 30 May 2006 22:56:28 -0000 1.31 --- internal.h 28 Aug 2006 05:26:20 -0000 1.32 *************** *** 14,178 **** #endif - #include "wx/treectrl.h" #include "wxlua/include/wxldefs.h" - #include "wxlua/include/wxlstate.h" - - extern "C" - { - #include "lua/include/lualib.h" - #include "lua/include/lauxlib.h" - } - - // change the name of some defines to avoid clashes - // with standard lua functions. - - //#define wxDataObjectGet wxDataObject::Get - //#define wxDataObjectSet wxDataObject::Set - - #if defined(__WXGTK__) - #define wxPlatformGTK wxVERSION_NUMBER - #elif defined(__WXMSW__) - #define wxPlatformWindows wxVERSION_NUMBER - #elif defined(__WXMAC__) - #define wxPlatformMac wxVERSION_NUMBER - #endif - - // ---------------------------------------------------------------------------- - // wxLuaObject - wraps a reference to a Lua object reference inside a - // wxObject-derived class so that a Lua object can be used for - // user data, and also with a simple extension by the - // input/output mechanism of the wxValidator classes. - // ---------------------------------------------------------------------------- - - #ifdef GetObject - #undef GetObject - #endif - - enum wxLuaObject_Type - { - wxLUAOBJECT_NONE = 0, // nothing is allocated - wxLUAOBJECT_BOOL = 1, // bool allocated - wxLUAOBJECT_INT = 2, // int allocated - wxLUAOBJECT_STRING = 4, // wxString allocated - wxLUAOBJECT_ARRAYINT = 8 // wxArrayInt allocated - }; - - class WXDLLIMPEXP_WXLUA wxLuaObject : public wxObject - { - public: - wxLuaObject(); - // Constructor that is passed a lua state and a parameter index. - wxLuaObject(lua_State* L, int iParam, int iRef = 1); - // Constructor that is passed a lua state and a parameter index. - wxLuaObject(const wxLuaState& wxlState, int iParam, int iRef = 1); - ~wxLuaObject(); - - // Get the value of the reference object (or a proxy if the object has - // been aliased for a wxValidator class. - bool GetObject(); - // Remove any existing reference and allocate another - void SetObject(int iParam); - // Set the reference and lua state up from a supplied parameter. - void SetObject(lua_State *L, int iParam); - - // The following methods are used by the wxValidator interface - bool *GetBoolPtr(); - int *GetIntPtr(); - wxString *GetStringPtr(); - wxArrayInt *GetArrayPtr(); - - // Return a flag value that indicated whether the - // object is being used by a wxValidator class (else 0). - int GetAllocationFlags() const { return m_alloc_flags; } - bool HasAllocationFlag(wxLuaObject_Type flag) const { return (m_alloc_flags & flag) != 0; } - // Allow the flag value to be manipulated. - void ModifyAllocationFlags(int iValue); - - wxLuaState GetwxLuaState() const { return m_wxlState; } - lua_State* GetLuaState() const { return m_wxlState.GetLuaState(); } - - private: - wxLuaState m_wxlState; - int m_iReference; - bool m_bool; - int m_int; - wxString m_string; - wxArrayInt m_arrayInt; - int m_alloc_flags; - DECLARE_DYNAMIC_CLASS(wxLuaObject) - }; - - // ---------------------------------------------------------------------------- - // wxLuaTreeItemData - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUA wxLuaTreeItemData : public wxTreeItemData - { - public: - wxLuaTreeItemData(double value = 0) : m_value(value) {} - double GetValue() const { return m_value; } - void SetValue(double value) { m_value = value; } - - private: - double m_value; - }; - - // ---------------------------------------------------------------------------- - // C lua helper functions - // ---------------------------------------------------------------------------- - - // helper functions to get numbers, booleans and strings safer - WXDLLIMPEXP_WXLUA const char* LUACALL wxLua_lua_getstringtype(lua_State* L, int iParam); - WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_getbooleantype(lua_State* L, int iParam); - WXDLLIMPEXP_WXLUA long LUACALL wxLua_lua_getenumerationtype(lua_State* L, int iParam); - WXDLLIMPEXP_WXLUA double LUACALL wxLua_lua_getnumbertype(lua_State* L, int iParam); - - // convert a parameter which is presumably a table into a string array. - // returns the number of strings in the array in count. - // the return value may need to be deleted. - WXDLLIMPEXP_WXLUA wxString* LUACALL wxLua_lua_getwxstringarray(lua_State* L, int iParam, int& count); - // convert a parameter which is presumably a table into a character pointer array. - // returns the number of character strings in the array in count. - // the return value may need to be deleted. - WXDLLIMPEXP_WXLUA const char** LUACALL wxLua_lua_getchararray(lua_State* L, int iParam, int& count); - // convert a parameter which is presumably a wxArrayString reference a string array. - // returns the table containing the strings on the Lua stack. - // returns the number of items in the table - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarraystringtable(lua_State* L, wxArrayString& files); - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarrayinttable(lua_State* L, const wxArrayInt& table); - // convert a parameter which is presumably a table into a integer array. - // returns the number of ints in the array in count. - // the return value may need to be deleted. - WXDLLIMPEXP_WXLUA int* LUACALL wxLua_lua_getintarray(lua_State* L, int iParam, int& count); - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxarrayint(lua_State* L, int iParam, wxArrayInt& intArray); - - // create a reference to the object at index iParam in the Lua index - WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tinsert(lua_State* L, int iParam) ); - // push onto the top of the stack the object referenced by iReference - WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int iReference); - // remove a Lua reference - WXDLLIMPEXP_WXLUA wxDEPRECATED( bool LUACALL wxLua_lua_tremove(lua_State* L, int iReference) ); - // Get the number of items in the reference table - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tgetn(lua_State* L); - // Display an error message - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_terror(lua_State* L, const char* errorMsg); - // push onto the top of the stack an userdata object containing u using tag to set the metatable - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushusertag(lua_State* L, const void* u, int tag); - // get the tag of the object at index - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_ttag(lua_State* L, int index); - // return the user data in the userdata object at index, if reset is true clear the user data - WXDLLIMPEXP_WXLUA void* LUACALL wxLua_lua_ttouserdata(lua_State* L, int index, bool reset = false); - // allocate a new metatable return its reference - WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tnewtag(lua_State* L) ); - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewweaktag(lua_State* L, bool fWeakKey, bool fWeakData); - // set the metatable of the object at top of stack from the reference tag - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tsettag(lua_State* L, int tag); - // set a metamethod for the metatable referenced by tag with the supplied name and function. - // if pClass is non-null set the upvalue of the function to the supplied class - WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tsettagmethod(lua_State* L, int tag, const char* method, lua_CFunction func, void* pClass = NULL); - // push the wxLuaReferences string onto the stack - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaReferences(lua_State* L); - // push the wxLuaNull string onto the stack - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaNull(lua_State* L); #endif // WX_LUA_INTERNALS_H --- 14,18 ---- |