From: John L. <jr...@us...> - 2007-08-07 20:23:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22233/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxlcallb.h wxldefs.h wxlstate.h Log Message: Add wxShutdown() Rename lua -> Lua Index: wxlcallb.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlcallb.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxlcallb.h 6 Aug 2007 22:00:33 -0000 1.20 --- wxlcallb.h 7 Aug 2007 20:23:25 -0000 1.21 *************** *** 58,67 **** void EventHandler(wxEvent& event); ! // Handle the event by calling the lua function to handle the event. ! // The lua function will receive a single parameter, the type of event. virtual void CallFunction(wxEvent *event); protected: ! int m_routine; // ref to the lua routine to call in the wxLuaReferences registry table wxLuaState m_wxlState; // store it since we're added to a list of it's callbacks. wxEvtHandler* m_evtHandler; --- 58,67 ---- void EventHandler(wxEvent& event); ! // Handle the event by calling the Lua function to handle the event. ! // The Lua function will receive a single parameter, the type of event. virtual void CallFunction(wxEvent *event); protected: ! int m_routine; // ref to the Lua routine to call in the wxLuaReferences registry table wxLuaState m_wxlState; // store it since we're added to a list of it's callbacks. wxEvtHandler* m_evtHandler; Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxldefs.h 1 Aug 2007 19:15:37 -0000 1.32 --- wxldefs.h 7 Aug 2007 20:23:25 -0000 1.33 *************** *** 14,18 **** //----------------------------------------------------------------------------- ! // Include the lua headers //----------------------------------------------------------------------------- --- 14,18 ---- //----------------------------------------------------------------------------- ! // Include the Lua headers //----------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** wxlbind.h 7 Aug 2007 03:06:12 -0000 1.59 --- wxlbind.h 7 Aug 2007 20:23:25 -0000 1.60 *************** *** 23,37 **** // ---------------------------------------------------------------------------- ! // memory deallocation function for created wxLuaBindClass defined objects, lua's __gc metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__gc_wxLuaBindClass(lua_State *L); ! // lua 'set table' function for created wxLuaBindClass defined objects, lua's __newindex metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__newindex_wxLuaBindClass(lua_State *L); ! // lua 'get table' function for created wxLuaBindClass defined objects, lua's __index metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__index_wxLuaBindClass(lua_State *L); ! // lua 'tostring' function for created wxLuaBindClass defined objects, lua's __tostring metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__tostring_wxLuaBindClass(lua_State *L); // If there is a special userdata upvalue, remove 1 value if !only_check ! // (hack to remove the table lua pushes onto the stack when calling the // __call metatable function for class constructors) WXDLLIMPEXP_WXLUA int wxluabind_removetableforcall(lua_State* L, bool only_check = false); --- 23,37 ---- // ---------------------------------------------------------------------------- ! // memory deallocation function for created wxLuaBindClass defined objects, Lua's __gc metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__gc_wxLuaBindClass(lua_State *L); ! // Lua 'set table' function for created wxLuaBindClass defined objects, Lua's __newindex metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__newindex_wxLuaBindClass(lua_State *L); ! // Lua 'get table' function for created wxLuaBindClass defined objects, Lua's __index metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__index_wxLuaBindClass(lua_State *L); ! // Lua 'tostring' function for created wxLuaBindClass defined objects, Lua's __tostring metatable index WXDLLIMPEXP_WXLUA int LUACALL wxluabind__tostring_wxLuaBindClass(lua_State *L); // If there is a special userdata upvalue, remove 1 value if !only_check ! // (hack to remove the table Lua pushes onto the stack when calling the // __call metatable function for class constructors) WXDLLIMPEXP_WXLUA int wxluabind_removetableforcall(lua_State* L, bool only_check = false); *************** *** 42,46 **** // Binding tags are generated as positive tag id automatically when bound ! // so we set the inbuilt lua arg tags to negative values // // note that -1 is use as initialiser for class tags --- 42,46 ---- // Binding tags are generated as positive tag id automatically when bound ! // so we set the inbuilt Lua arg tags to negative values // // note that -1 is use as initialiser for class tags *************** *** 48,52 **** // represents function prototype argument types. ! // wxlua arg tags for common lua types #define WXLUAARG_None 0 #define WXLUAARG_Nil -2 --- 48,52 ---- // represents function prototype argument types. ! // wxlua arg tags for common Lua types #define WXLUAARG_None 0 #define WXLUAARG_Nil -2 *************** *** 74,82 **** // copies of wxlua arg tags for binding types that are used very often ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxLuaFunction; // The lua tag for wxLuaFunctions. ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_NULL; // The lua tag for NULL pointer ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxEvent; // The lua tag for wxEvents ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxWindow; // The lua tag for wxWindows ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxString; // The lua tag for wxStrings --- 74,82 ---- // copies of wxlua arg tags for binding types that are used very often ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxLuaFunction; // The Lua tag for wxLuaFunctions. ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_NULL; // The Lua tag for NULL pointer ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxEvent; // The Lua tag for wxEvents ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxWindow; // The Lua tag for wxWindows ! extern WXDLLIMPEXP_DATA_WXLUA(int) g_wxluatag_wxString; // The Lua tag for wxStrings *************** *** 114,118 **** int minargs; // min number of required args int maxargs; // total number of args allowed ! wxLuaArgTag* argtags; // array of lua tags representing each argument, zero terminated // NOTE: there may be less argtags than minargs if this is an // overloaded function since the argtags == s_wxluaargArray_None --- 114,118 ---- int minargs; // min number of required args int maxargs; // total number of args allowed ! wxLuaArgTag* argtags; // array of Lua tags representing each argument, zero terminated // NOTE: there may be less argtags than minargs if this is an // overloaded function since the argtags == s_wxluaargArray_None *************** *** 149,153 **** const char *name; // name of the event, e.g. "wxEVT_COMMAND_MENU_SELECTED" const wxEventType *eventType; // wxWidgets event type, e.g. &wxEVT_COMMAND_MENU_SELECTED ! int *class_tag; // lua class tag, e.g. &s_wxluatag_wxCommandEvent }; --- 149,153 ---- const char *name; // name of the event, e.g. "wxEVT_COMMAND_MENU_SELECTED" const wxEventType *eventType; // wxWidgets event type, e.g. &wxEVT_COMMAND_MENU_SELECTED ! int *class_tag; // Lua class tag, e.g. &s_wxluatag_wxCommandEvent }; *************** *** 155,159 **** { const char *name; // the name of the object or pointer ! int *class_tag; // lua class tag of the object or pointer. const void *objPtr; // pointer to the object, e.g. &wxDefaultPosition const void **pObjPtr; // pointer to the object pointer, e.g. (const void **)&wxThePenList --- 155,159 ---- { const char *name; // the name of the object or pointer ! int *class_tag; // Lua class tag of the object or pointer. const void *objPtr; // pointer to the object, e.g. &wxDefaultPosition const void **pObjPtr; // pointer to the object pointer, e.g. (const void **)&wxThePenList *************** *** 166,170 **** int methods_n; // number of methods wxClassInfo *classInfo; // pointer to the wxClassInfo associated with this class ! int *class_tag; // lua tag for user data allocated by ourselves const char *baseclassName; // name of base class wxLuaBindClass *baseclass; // Pointer to the base class or NULL for none. --- 166,170 ---- int methods_n; // number of methods wxClassInfo *classInfo; // pointer to the wxClassInfo associated with this class ! int *class_tag; // Lua tag for user data allocated by ourselves const char *baseclassName; // name of base class wxLuaBindClass *baseclass; // Pointer to the base class or NULL for none. *************** *** 198,204 **** // Garbage collect and free memory associated with the wxLuaFunction class ! // lua's __gc metatable function. int LUACALL wxlua__gc_wxLuaFunction(lua_State *L); ! // call a wxLuaFunction, lua's __call metatable function. int LUACALL wxlua__call_wxLuaFunction(lua_State *L); --- 198,204 ---- // Garbage collect and free memory associated with the wxLuaFunction class ! // Lua's __gc metatable function. int LUACALL wxlua__gc_wxLuaFunction(lua_State *L); ! // call a wxLuaFunction, Lua's __call metatable function. int LUACALL wxlua__call_wxLuaFunction(lua_State *L); *************** *** 369,373 **** void SetBindingName(const wxString& name) { m_bindingName = name; } ! // Get/Set the namespace table in lua that this binding will be installed to wxString GetLuaNamespace() const { return m_nameSpace; } void SetLuaNamespace(const wxString& nameSpace) { m_nameSpace = nameSpace; } --- 369,373 ---- void SetBindingName(const wxString& name) { m_bindingName = name; } ! // Get/Set the namespace table in Lua that this binding will be installed to wxString GetLuaNamespace() const { return m_nameSpace; } void SetLuaNamespace(const wxString& nameSpace) { m_nameSpace = nameSpace; } *************** *** 417,429 **** // ----------------------------------------------------------------------- ! // Lookup a lua method or get property called methodName in the wxLuaBindClass array wxlClass. // Ensure that the lookup is of WXLUAMETHOD_METHOD|WXLUAMETHOD_GETPROP type. ! // If the lua method cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the method name, // else return NULL; static wxLuaBindMethod* GetClassMethod(const wxLuaBindClass *wxlClass, const char *methodName, bool search_baseclasses = true); ! // Lookup a lua property function named propName in the wxLuaBindClass wxlClass // Ensure that the lookup is of WXLUAMETHOD_GETPROP|WXLUAMETHOD_SETPROP type. ! // If the lua property cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the property name, // else return NULL; --- 417,429 ---- // ----------------------------------------------------------------------- ! // Lookup a Lua method or get property called methodName in the wxLuaBindClass array wxlClass. // Ensure that the lookup is of WXLUAMETHOD_METHOD|WXLUAMETHOD_GETPROP type. ! // If the Lua method cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the method name, // else return NULL; static wxLuaBindMethod* GetClassMethod(const wxLuaBindClass *wxlClass, const char *methodName, bool search_baseclasses = true); ! // Lookup a Lua property function named propName in the wxLuaBindClass wxlClass // Ensure that the lookup is of WXLUAMETHOD_GETPROP|WXLUAMETHOD_SETPROP type. ! // If the Lua property cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the property name, // else return NULL; *************** *** 441,445 **** // to sort the bindings appropriately ! // Registers binding, returns lua table reference to binding virtual int LUACALL RegisterFunctions(const wxLuaState& wxlState, bool registerTypes); // Register the classes, definitions, objects and pointers generated by the binding --- 441,445 ---- // to sort the bindings appropriately ! // Registers binding, returns Lua table reference to binding virtual int LUACALL RegisterFunctions(const wxLuaState& wxlState, bool registerTypes); // Register the classes, definitions, objects and pointers generated by the binding *************** *** 465,473 **** wxString m_bindingName; // A unique name of the binding ! wxString m_nameSpace; // lua table namespace e.g. "wx" bool m_bindings_registered; // Is the binding registered ! int m_start_tag; // The first wxLua allocated lua tag ! int m_last_tag; // The last wxLua lua tag of registered classes ! int m_luaTable_tag; // The lua tag for the wxLua private tables static wxLuaBindingList sm_bindingList; --- 465,473 ---- wxString m_bindingName; // A unique name of the binding ! wxString m_nameSpace; // Lua table namespace e.g. "wx" bool m_bindings_registered; // Is the binding registered ! int m_start_tag; // The first wxLua allocated Lua tag ! int m_last_tag; // The last wxLua Lua tag of registered classes ! int m_luaTable_tag; // The Lua tag for the wxLua private tables static wxLuaBindingList sm_bindingList; Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** wxlstate.h 3 Aug 2007 22:17:16 -0000 1.90 --- wxlstate.h 7 Aug 2007 20:23:25 -0000 1.91 *************** *** 1,4 **** ///////////////////////////////////////////////////////////////////////////// ! // Purpose: wxWidgets interface to lua // Author: Ray Gilbert, John Labenski, J Winwood // Created: 14/11/2001 --- 1,4 ---- ///////////////////////////////////////////////////////////////////////////// ! // Purpose: wxWidgets interface to Lua // Author: Ray Gilbert, John Labenski, J Winwood // Created: 14/11/2001 *************** *** 69,75 **** // ---------------------------------------------------------------------------- ! // Push a special key into lua, defines to make sure it's always done the same. // ! // Note we do not push a human readable string for these because lua always makes // a copy of the string and the copying takes a considerable amount of time // when benchmarked using valgrind. --- 69,75 ---- // ---------------------------------------------------------------------------- ! // Push a special key into Lua, defines to make sure it's always done the same. // ! // Note we do not push a human readable string for these because Lua always makes // a copy of the string and the copying takes a considerable amount of time // when benchmarked using valgrind. *************** *** 85,89 **** #define WXLUA_METATABLE_CLASS 9 ! // Light user data used as keys in the lua registry table for wxLua items. // Note that even though these have values, they're not used, just the memory address. extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_references_key; // WXLUA_LREG_REFERENCES --- 85,89 ---- #define WXLUA_METATABLE_CLASS 9 ! // Light user data used as keys in the Lua LUA_REGISTRYINDEX table for wxLua items. // Note that even though these have values, they're not used, just the memory address. extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_references_key; // WXLUA_LREG_REFERENCES *************** *** 107,135 **** #define wxlua_pushkey_wxLuaClasses(L) lua_pushlightuserdata(L, &wxlua_lreg_classes_key) // Push a key that is an index in the LUA_REGISTRYINDEX table that is a table ! // t[lightuserdata object] = {["derived func/value name"] = wxLuaObject(lua function/value), ...} #define wxlua_pushkey_wxLuaDerivedMethods(L) lua_pushlightuserdata(L, &wxlua_lreg_derivedmethods_key) ! // Push a key that is an index of the LUA_REGISTRYINDEX table that is a lightuserdata of the ! // wxLuaStateRefData for this lua_State. #define wxlua_pushkey_wxLuaStateRefData(L) lua_pushlightuserdata(L, &wxlua_lreg_wxluastaterefdata_key) // Push a key that is an index of the LUA_REGISTRYINDEX table that is table of all ! // objects that we've pushed into lua using [lightuserdata] = tag #define wxlua_pushkey_wxLuaObjects(L) lua_pushlightuserdata(L, &wxlua_lreg_objects_key) // Push a key that is an index of the LUA_REGISTRYINDEX table that is boolean value ! // of whether the lua code has prepended a '_' to indicate they want the base class function called. #define wxlua_pushkey_CallBaseClassFunc(L) lua_pushlightuserdata(L, &wxlua_lreg_callbaseclassfunc_key) ! // Push a key of an index into the metatable of a wxLua userdata for the "tag" ! // in the wxLuaReferences table. #define wxlua_pushkey_metatableTag(L) lua_pushlightuserdata(L, &wxlua_lreg_metatable_tag_key) ! // Push a key of an index into the metatable of a wxLua userdata for the wxLuaBindClass ! // in the wxLuaReferences table. #define wxlua_pushkey_metatableClass(L) lua_pushlightuserdata(L, &wxlua_lreg_metatable_class_key) //---------------------------------------------------------------------------- ! // C functions for lua used by the wxLuaState //---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- ! // 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 --- 107,136 ---- #define wxlua_pushkey_wxLuaClasses(L) lua_pushlightuserdata(L, &wxlua_lreg_classes_key) // Push a key that is an index in the LUA_REGISTRYINDEX table that is a table ! // of Lua functions assigned to wxLua userdata programatically in Lua. ! // t[lightuserdata object] = {["derived func/value name"] = wxLuaObject(Lua function/value), ...} #define wxlua_pushkey_wxLuaDerivedMethods(L) lua_pushlightuserdata(L, &wxlua_lreg_derivedmethods_key) ! // Push a key that is an index of the LUA_REGISTRYINDEX table who's value is a ! // lightuserdata of the wxLuaStateRefData for this lua_State. #define wxlua_pushkey_wxLuaStateRefData(L) lua_pushlightuserdata(L, &wxlua_lreg_wxluastaterefdata_key) // Push a key that is an index of the LUA_REGISTRYINDEX table that is table of all ! // objects that we've pushed into Lua using t[lightuserdata] = [weak valued full userdata] #define wxlua_pushkey_wxLuaObjects(L) lua_pushlightuserdata(L, &wxlua_lreg_objects_key) // Push a key that is an index of the LUA_REGISTRYINDEX table that is boolean value ! // of whether the Lua code has prepended a '_' to function name to indicate ! // that they want the base class function called. #define wxlua_pushkey_CallBaseClassFunc(L) lua_pushlightuserdata(L, &wxlua_lreg_callbaseclassfunc_key) ! // Push a key of an index into the metatable of a wxLua userdata for the "tag" number. #define wxlua_pushkey_metatableTag(L) lua_pushlightuserdata(L, &wxlua_lreg_metatable_tag_key) ! // Push a key of an index into the metatable of a wxLua userdata for the ! // lightuserdata of the wxLuaBindClass struct. #define wxlua_pushkey_metatableClass(L) lua_pushlightuserdata(L, &wxlua_lreg_metatable_class_key) //---------------------------------------------------------------------------- ! // C functions for Lua used by the wxLuaState //---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- ! // 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 *************** *** 171,176 **** // registry table and denotes what type of object this is. WXDLLIMPEXP_WXLUA int LUACALL wxlua_ttag(lua_State* L, int stack_idx); ! // Get the userdata at the stack index, if null_ptr then set the userdata pointer ! // in lua to NULL so that lua won't gc it. WXDLLIMPEXP_WXLUA void* LUACALL wxlua_ttouserdata(lua_State* L, int stack_idx, bool null_ptr = false); // Allocate a new table (metatable) with a "tag" key equal to the number from tinsert --- 172,177 ---- // registry table and denotes what type of object this is. WXDLLIMPEXP_WXLUA int LUACALL wxlua_ttag(lua_State* L, int stack_idx); ! // Get the userdata at the stack index, if null_ptr then set the pointer wrapped ! // by Lua's userdata to NULL to clear it. WXDLLIMPEXP_WXLUA void* LUACALL wxlua_ttouserdata(lua_State* L, int stack_idx, bool null_ptr = false); // Allocate a new table (metatable) with a "tag" key equal to the number from tinsert *************** *** 180,190 **** // Create a new table and its metatable with weak keys and/or values by setting the // metatable's __weak index to [k/v]. The table is tinsert into the wxLuaReferences ! // registry table and return its index into the ref table. WXDLLIMPEXP_WXLUA int LUACALL wxlua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values); // Set the metatable of the object at top of stack to the table stored in the ! // wxLuaReferences registry table using tget(tag). WXDLLIMPEXP_WXLUA bool LUACALL wxlua_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_tsettagmethod(lua_State* L, int tag, const char* method, lua_CFunction func, void* pClass = NULL); --- 181,191 ---- // Create a new table and its metatable with weak keys and/or values by setting the // metatable's __weak index to [k/v]. The table is tinsert into the wxLuaReferences ! // registry table. Returns the created index into the ref table. WXDLLIMPEXP_WXLUA int LUACALL wxlua_tnewweaktag(lua_State* L, bool weak_keys, bool weak_values); // Set the metatable of the object at top of stack to the table stored in the ! // wxLuaReferences registry table using tget(tag). WXDLLIMPEXP_WXLUA bool LUACALL wxlua_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 wxLuaBindClass. WXDLLIMPEXP_WXLUA bool LUACALL wxlua_tsettagmethod(lua_State* L, int tag, const char* method, lua_CFunction func, void* pClass = NULL); *************** *** 194,206 **** // ---------------------------------------------------------------------------- ! // Functions to get info about the tags wxlua uses to determine type // ---------------------------------------------------------------------------- // Get the wxLuaBindClass* for this class_tag or NULL if the tag is invalid. // Gets the wxLuaBindClass from the metatable stored in the wxLuaReferences registry table ! // for the classes that have been installed into lua. WXDLLIMPEXP_WXLUA const wxLuaBindClass* LUACALL wxlua_tgetclass(lua_State* L, int class_tag); // Get the wxLuaBindClass* for this class_name or NULL if the name is invalid. ! // Gets the wxLuaBindClass from the "wxLuaClasses" table in the lua registry. WXDLLIMPEXP_WXLUA const wxLuaBindClass* LUACALL wxlua_tgetclass(lua_State* L, const char* class_name); // Is a class with the class_tag equal to or derived from a class with the base_class_tag. --- 195,207 ---- // ---------------------------------------------------------------------------- ! // Functions to get info about the tags wxLua uses to determine type // ---------------------------------------------------------------------------- // Get the wxLuaBindClass* for this class_tag or NULL if the tag is invalid. // Gets the wxLuaBindClass from the metatable stored in the wxLuaReferences registry table ! // for the classes that have been installed into Lua. WXDLLIMPEXP_WXLUA const wxLuaBindClass* LUACALL wxlua_tgetclass(lua_State* L, int class_tag); // Get the wxLuaBindClass* for this class_name or NULL if the name is invalid. ! // Gets the wxLuaBindClass from the "wxLuaClasses" table in the Lua registry. WXDLLIMPEXP_WXLUA const wxLuaBindClass* LUACALL wxlua_tgetclass(lua_State* L, const char* class_name); // Is a class with the class_tag equal to or derived from a class with the base_class_tag. *************** *** 215,219 **** // Note that this function does not do a direct mapping between wxlua_getwxluatype() // and wxlua_getluatype() since it allows a small amount of coersion between types. ! // It also doesn't account for the automatic conversion of certain lua types // to wxluatypes, (wxString, wxArrayString, wxArrayInt) // see wxLuaState::IswxLuaType which is more complete. --- 216,220 ---- // Note that this function does not do a direct mapping between wxlua_getwxluatype() // and wxlua_getluatype() since it allows a small amount of coersion between types. ! // It also doesn't account for the automatic conversion of certain Lua types // to wxluatypes, (wxString, wxArrayString, wxArrayInt) // see wxLuaState::IswxLuaType which is more complete. *************** *** 229,233 **** WXDLLIMPEXP_WXLUA int wxlua_getluatype(int wxluatype); ! // Is this data a userdata object that wxLua has pushed into lua? // This should be the same as // (lua_isuserdata(L, stack_idx) && !lua_islightuserdata(L, stack_idx)) --- 230,234 ---- WXDLLIMPEXP_WXLUA int wxlua_getluatype(int wxluatype); ! // Is this data a userdata object that wxLua has pushed into Lua? // This should be the same as // (lua_isuserdata(L, stack_idx) && !lua_islightuserdata(L, stack_idx)) *************** *** 237,243 **** // These validate that the object at the stack index specified is a string, bool, // int, or double number object or that the object can be converted to it. ! // Note: wxLua has a stricter sense of type than lua and we don't want to // always allow coersion between types since oftentimes there's an error. ! // Note: The wxLuaState::IsStringType function takes both a lua string and a wxString // userdata as valid strings. #define wxlua_isstringtype(L, stack_idx) (wxlua_iswxluatype(lua_type(L, stack_idx), WXLUAARG_String) == 1) --- 238,244 ---- // These validate that the object at the stack index specified is a string, bool, // int, or double number object or that the object can be converted to it. ! // Note: wxLua has a stricter sense of type than Lua and we don't want to // always allow coersion between types since oftentimes there's an error. ! // Note: The wxLuaState::IsStringType function takes both a Lua string and a wxString // userdata as valid strings. #define wxlua_isstringtype(L, stack_idx) (wxlua_iswxluatype(lua_type(L, stack_idx), WXLUAARG_String) == 1) *************** *** 247,254 **** // After verifying using wxlua_isXXXtype return the value, else call ! // wxlua_terror with a message that's appropriate for stack_idx to be a // parameter to a function call. (These are used in the bindings) // Note: The function wxLuaState::GetwxStringType does automatic conversion ! // of both a lua string and a userdata wxString to a wxString. WXDLLIMPEXP_WXLUA const char* LUACALL wxlua_getstringtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxlua_getbooleantype(lua_State* L, int stack_idx); --- 248,255 ---- // After verifying using wxlua_isXXXtype return the value, else call ! // wxlua_terror with a message that is appropriate for stack_idx to be a // parameter to a function call. (These are used in the bindings) // Note: The function wxLuaState::GetwxStringType does automatic conversion ! // of both a Lua string and a userdata wxString to a wxString. WXDLLIMPEXP_WXLUA const char* LUACALL wxlua_getstringtype(lua_State* L, int stack_idx); WXDLLIMPEXP_WXLUA bool LUACALL wxlua_getbooleantype(lua_State* L, int stack_idx); *************** *** 264,268 **** // Convert the table at stack index to a "new" array of const char* strings. // Return a pointer to the array of strings. You need to delete the array, but not ! // the individual strings since lua should still have them during the life of the // returned array, if not you will need to copy them. // returns the number of character strings in the array in count. --- 265,269 ---- // Convert the table at stack index to a "new" array of const char* strings. // Return a pointer to the array of strings. You need to delete the array, but not ! // the individual strings since Lua should still have them during the life of the // returned array, if not you will need to copy them. // returns the number of character strings in the array in count. *************** *** 270,277 **** WXDLLIMPEXP_WXLUA const char** LUACALL wxlua_getchararray(lua_State* L, int stack_idx, int& count); ! // 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_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_pushwxArrayInttable(lua_State* L, const wxArrayInt& intArray); --- 271,278 ---- WXDLLIMPEXP_WXLUA const char** LUACALL wxlua_getchararray(lua_State* L, int stack_idx, int& count); ! // 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_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_pushwxArrayInttable(lua_State* L, const wxArrayInt& intArray); *************** *** 281,291 **** //---------------------------------------------------------------------------- ! // Add this derived method, a lua function or value the user has set to a // wxLua userdata object that we will push onto the stack when they access // the index of the object with the "method_name". The pObject is the ! // userdata and the new wxLuaObject wraps the lua function or value // which will be deleted by this. // The derived methods are stored in the "wxLuaDerivedMethods" table in the ! // lua registry table. WXDLLIMPEXP_WXLUA bool LUACALL wxlua_setderivedmethod(lua_State* L, void *pObject, const char *method_name, wxLuaObject* wxlObj); // Is there a derived method given an object and and a method name. --- 282,292 ---- //---------------------------------------------------------------------------- ! // Add this derived method, a Lua function or value the user has set to a // wxLua userdata object that we will push onto the stack when they access // the index of the object with the "method_name". The pObject is the ! // userdata and the new wxLuaObject wraps the Lua function or value // which will be deleted by this. // The derived methods are stored in the "wxLuaDerivedMethods" table in the ! // Lua registry table. WXDLLIMPEXP_WXLUA bool LUACALL wxlua_setderivedmethod(lua_State* L, void *pObject, const char *method_name, wxLuaObject* wxlObj); // Is there a derived method given an object and and a method name. *************** *** 307,310 **** --- 308,313 ---- // wxLuaStateData - the internal data for the wxLuaState. // All members of this class should be accessed through the wxLuaState. + // It is public only for people who need to get at the internals, there are + // absolutely no guarantees that things won't change. //---------------------------------------------------------------------------- *************** *** 315,320 **** ~wxLuaStateData(); ! wxLuaBindingList m_bindingList; // A wxList of generated lua bindings ! // that are loaded into lua on startup bool m_bindings_registered; // Are the bindings registered into the lua_State --- 318,323 ---- ~wxLuaStateData(); ! wxLuaBindingList m_bindingList; // A wxList of generated Lua bindings ! // that are loaded into Lua on startup bool m_bindings_registered; // Are the bindings registered into the lua_State *************** *** 322,332 **** wxLongToLongHashMap m_trackedObjects; // tracked wxObjects that we will delete when the ! // wxLuaState is closed or lua gc them. // key is (long)object* and value is the wxObject // Note that non wxObject classes use // wxLUA_DECLARE_ENCAPSULATION so the key is the object pointer // and the value is the wxObject encapsulation. ! wxList m_callbackList; // event objects for wxLuaCallback ! wxList m_winDestroyCallbackList; // wxLuaWinDestroyCallback installed wxWindowList m_windowList; // all wxWindow objects, wxWidgets will delete these // but for an embedded program they must be deleted before --- 325,335 ---- wxLongToLongHashMap m_trackedObjects; // tracked wxObjects that we will delete when the ! // wxLuaState is closed or Lua gc them. // key is (long)object* and value is the wxObject // Note that non wxObject classes use // wxLUA_DECLARE_ENCAPSULATION so the key is the object pointer // and the value is the wxObject encapsulation. ! wxList m_callbackList; // installed wxLuaCallbacks ! wxList m_winDestroyCallbackList; // installed wxLuaWinDestroyCallbacks wxWindowList m_windowList; // all wxWindow objects, wxWidgets will delete these // but for an embedded program they must be deleted before *************** *** 375,379 **** // ------------------------------------------------------------------------ ! lua_State* m_lua_State; // the lua_State that "is" lua bool m_lua_State_static; // lua_close() the lua_State if !static bool m_lua_State_coroutine; // this is a coroutine, don't close it --- 378,382 ---- // ------------------------------------------------------------------------ ! lua_State* m_lua_State; // the lua_State that "is" Lua bool m_lua_State_static; // lua_close() the lua_State if !static bool m_lua_State_coroutine; // this is a coroutine, don't close it *************** *** 392,396 **** //---------------------------------------------------------------------------- ! // wxLuaState - a ref counted class to interface between C++ and lua's C lua_State //---------------------------------------------------------------------------- --- 395,399 ---- //---------------------------------------------------------------------------- ! // wxLuaState - a ref counted class to interface between C++ and Lua's C lua_State //---------------------------------------------------------------------------- *************** *** 411,418 **** // Default constructor or if create=true then create a new lua_State // and add all the bindings in wxLuaBinding::GetBindingList() ! wxLuaState(bool create = false) : wxObject() { if (create) Create(); } // Create a new lua_State, add the bindings in wxLuaBinding::GetBindingList() // sets the wxEvtHandler and wxWindowID to send the wxLuaEvents to ! wxLuaState(wxEvtHandler *handler, wxWindowID id = wxID_ANY) : wxObject() { Create(handler, id); } // Create a wxLuaState from an existing lua_State wxLuaState(lua_State* L, wxLuaState_Type type = WXLUASTATE_ATTACH) { Create(L, type); } --- 414,421 ---- // Default constructor or if create=true then create a new lua_State // and add all the bindings in wxLuaBinding::GetBindingList() ! wxLuaState(bool create = false) { if (create) Create(); } // Create a new lua_State, add the bindings in wxLuaBinding::GetBindingList() // sets the wxEvtHandler and wxWindowID to send the wxLuaEvents to ! wxLuaState(wxEvtHandler *handler, wxWindowID id = wxID_ANY) { Create(handler, id); } // Create a wxLuaState from an existing lua_State wxLuaState(lua_State* L, wxLuaState_Type type = WXLUASTATE_ATTACH) { Create(L, type); } *************** *** 437,449 **** bool Create(wxLuaStateRefData* refData, lua_State* L); // Is this wxLuaState valid, has refed data and it's lua_State is created bool Ok() const; ! // Destroy the refed data (only closes lua if this is the last refed state) ! // Note: if you have a top level window (wxFrame) open in lua and exit the // C++ program your program will seem to "hang" because wxApp doesn't // exit with a top level window open. Call CloseLuaState(true) to ensure // all non parented (top level) windows are destroyed. ! // You must always call CloseLuaState() when you want to close lua instead // of hoping that when you call Destroy() you have the last refed instance. void Destroy(); --- 440,456 ---- bool Create(wxLuaStateRefData* refData, lua_State* L); + // ----------------------------------------------------------------------- + // Is this wxLuaState valid, has refed data and it's lua_State is created bool Ok() const; ! // ----------------------------------------------------------------------- ! ! // Destroy the refed data (only closes Lua if this is the last refed state) ! // Note: if you have a top level window (wxFrame) open in Lua and exit the // C++ program your program will seem to "hang" because wxApp doesn't // exit with a top level window open. Call CloseLuaState(true) to ensure // all non parented (top level) windows are destroyed. ! // You must always call CloseLuaState() when you want to close Lua instead // of hoping that when you call Destroy() you have the last refed instance. void Destroy(); *************** *** 452,459 **** bool CloseLuaState(bool force); // Are we currently being closed, the garbage collector is running, but ! // we don't care about cleaning up lua itself so just delete the data // (internal use) bool IsClosing() const; // Get the lua_State lua_State* GetLuaState() const; --- 459,468 ---- bool CloseLuaState(bool force); // Are we currently being closed, the garbage collector is running, but ! // we don't care about cleaning up Lua itself so just delete the data // (internal use) bool IsClosing() const; + // ----------------------------------------------------------------------- + // Get the lua_State lua_State* GetLuaState() const; *************** *** 463,470 **** wxLuaStateData* GetLuaStateData() const; ! // Get the wxEventType that lua may currently be in, wxEVT_NULL if not in an ! // event handler. Be careful about destroying lua when in an event handler. wxEventType GetInEventType() const; ! // Set the wxEventType that the lua code is currently running (internal use) void SetInEventType(wxEventType eventType); --- 472,481 ---- wxLuaStateData* GetLuaStateData() const; ! // ----------------------------------------------------------------------- ! ! // Get the wxEventType that Lua may currently be in, wxEVT_NULL if not in an ! // event handler. Be careful about destroying Lua when in an event handler. wxEventType GetInEventType() const; ! // Set the wxEventType that the Lua code is currently running (internal use) void SetInEventType(wxEventType eventType); *************** *** 475,479 **** void SetEventHandler(wxEvtHandler *evtHandler); wxEvtHandler *GetEventHandler() const; ! // Get/Set the wxWindowID that the wxLuaEvents will be sent with void SetId(wxWindowID id); wxWindowID GetId() const; --- 486,490 ---- void SetEventHandler(wxEvtHandler *evtHandler); wxEvtHandler *GetEventHandler() const; ! // Get/Set the wxWindowID that the wxLuaEvents will be sent with. void SetId(wxWindowID id); wxWindowID GetId() const; *************** *** 485,494 **** // ----------------------------------------------------------------------- ! // Run a lua file from disk using lua_loadfile, returns lua's error code int RunFile(const wxString &fileName); ! // Run a string that contains lua code using luaL_loadbuffer, returns lua's error code int RunString(const wxString &script, const wxString& name = wxEmptyString); // Run a char array #included from bin2c compilation or something else ! // using luaL_loadbuffer, returns lua's error code int RunBuffer(const unsigned char buf[], size_t size, const wxString &name = wxT("= lua")); --- 496,505 ---- // ----------------------------------------------------------------------- ! // Run a Lua file from disk using lua_loadfile, returns Lua's error code int RunFile(const wxString &fileName); ! // Run a string that contains Lua code using luaL_loadbuffer, returns Lua's error code int RunString(const wxString &script, const wxString& name = wxEmptyString); // Run a char array #included from bin2c compilation or something else ! // using luaL_loadbuffer, returns Lua's error code int RunBuffer(const unsigned char buf[], size_t size, const wxString &name = wxT("= lua")); *************** *** 498,502 **** // Replacement for lua_pcall that sends a wxEVT_LUA_ERROR on error // narg is the number of args to the function to call. ! // nresults is the number of values returned which lua will adjust to match // use LUA_MULTRET for nresults to leave all of them on the stack int LuaPCall(int narg, int nresults); --- 509,513 ---- // Replacement for lua_pcall that sends a wxEVT_LUA_ERROR on error // narg is the number of args to the function to call. ! // nresults is the number of values returned which Lua will adjust to match // use LUA_MULTRET for nresults to leave all of them on the stack int LuaPCall(int narg, int nresults); *************** *** 505,509 **** int LuaDoBuffer(const char *buffer, size_t len, const char *name) { return RunBuffer((const unsigned char*)buffer, len, lua2wx(name)); } ! // Try to compile the lua program. Creates new lua_State to test for syntax // errors and sends error events. See LuaError() for errMsg and line_num. int CompileString(const wxString &script, const wxString& name = wxEmptyString, --- 516,520 ---- int LuaDoBuffer(const char *buffer, size_t len, const char *name) { return RunBuffer((const unsigned char*)buffer, len, lua2wx(name)); } ! // Try to compile the Lua program. Creates new lua_State to test for syntax // errors and sends error events. See LuaError() for errMsg and line_num. int CompileString(const wxString &script, const wxString& name = wxEmptyString, *************** *** 512,516 **** wxString* errMsg_ = NULL, int* line_num = NULL); ! // checks the status with CheckRunError and tries to get lua's error string // from the top of the stack and sends a wxEVT_LUA_ERROR. // If the lua_State is NULL then use the internal one from this class. --- 523,527 ---- wxString* errMsg_ = NULL, int* line_num = NULL); ! // checks the status with CheckRunError and tries to get Lua's error string // from the top of the stack and sends a wxEVT_LUA_ERROR. // If the lua_State is NULL then use the internal one from this class. *************** *** 525,529 **** static bool CheckRunError(int status, wxString *msg); ! // Break a currently running lua program by setting the lua debug hook to // be called for anything and breaking as soon as possible by calling // terror() with the message --- 536,542 ---- static bool CheckRunError(int status, wxString *msg); ! // ----------------------------------------------------------------------- ! ! // Break a currently running Lua program by setting the Lua debug hook to // be called for anything and breaking as soon as possible by calling // terror() with the message *************** *** 537,543 **** wxString GetDebugHookBreakMessage() const; ! // ----------------------------------------------------------------------- ! ! // Have lua run an internal hook function with this mask // hook = LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT // Every count hook mask a wxEVT_LUA_DEBUG_HOOK event is sent if send_debug_evt --- 550,554 ---- wxString GetDebugHookBreakMessage() const; ! // Have Lua run an internal hook function with this mask // hook = LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT // Every count hook mask a wxEVT_LUA_DEBUG_HOOK event is sent if send_debug_evt *************** *** 554,558 **** // Internally updated time that the debug hook was last called when running ! // lua code and SetLuaDebugHook is turned on unsigned long GetLastLuaDebugHookTime() const; // Set to an arbitrary time to control debug timing --- 565,569 ---- // Internally updated time that the debug hook was last called when running ! // Lua code and SetLuaDebugHook is turned on unsigned long GetLastLuaDebugHookTime() const; // Set to an arbitrary time to control debug timing *************** *** 573,577 **** wxLuaBinding* GetLuaBinding(const wxString& bindingName) const; ! // Get wxLuaBindClass for given lua Tag using wxLuaBindClass::class_tag, // returns NULL on failure. const wxLuaBindClass* GetLuaClass(int iClassTag) const; --- 584,588 ---- wxLuaBinding* GetLuaBinding(const wxString& bindingName) const; ! // Get wxLuaBindClass for given Lua Tag using wxLuaBindClass::class_tag, // returns NULL on failure. const wxLuaBindClass* GetLuaClass(int iClassTag) const; *************** *** 593,597 **** // Get the binding list used to initialize this class ! // you may add or remove bindings before creation wxLuaBindingList* GetLuaBindingList() const; --- 604,609 ---- // Get the binding list used to initialize this class ! // you may add or remove bindings before creation, but not that ! // all wxLuaStates must have the same bindings in the same order! wxLuaBindingList* GetLuaBindingList() const; *************** *** 599,603 **** // When looking up a function to call, should the base class function ! // be called or the wxlua dervived method (internal use) void SetCallBaseClassFunction(bool call_base); bool GetCallBaseClassFunction(); --- 611,615 ---- // When looking up a function to call, should the base class function ! // be called or the wxLua dervived method (internal use) void SetCallBaseClassFunction(bool call_base); bool GetCallBaseClassFunction(); *************** *** 610,622 **** UNDELETE_OBJECT = 0, // stop tracking for deletion (someone else owns this) DELETE_OBJECT = 0x0001, // delete the object ! CLEAR_TRACKED_OBJECT = 0x0002, // clear tracking the object in lua reg table ! CLEAR_DERIVED_METHODS = 0x0004, // clear any derived methods in lua reg table DELETE_CLEAR_OBJECT = DELETE_OBJECT|CLEAR_TRACKED_OBJECT|CLEAR_DERIVED_METHODS }; ! // Track this object and delete it when lua calls the gc method for it void AddTrackedObject(wxObject *pObject); // Track this object, but hash it on the obj_ptr which may differ from the ! // pObject and delete it when lua calls the gc method for it. // This is used for encapsulated classes that are wrapped in a wxObject. void AddTrackedObject(long obj_ptr, wxObject *pObject); --- 622,634 ---- UNDELETE_OBJECT = 0, // stop tracking for deletion (someone else owns this) DELETE_OBJECT = 0x0001, // delete the object ! CLEAR_TRACKED_OBJECT = 0x0002, // clear tracking the object in Lua reg table ! CLEAR_DERIVED_METHODS = 0x0004, // clear any derived methods in Lua reg table DELETE_CLEAR_OBJECT = DELETE_OBJECT|CLEAR_TRACKED_OBJECT|CLEAR_DERIVED_METHODS }; ! // Track this object and delete it when Lua calls the gc method for it void AddTrackedObject(wxObject *pObject); // Track this object, but hash it on the obj_ptr which may differ from the ! // pObject and delete it when Lua calls the gc method for it. // This is used for encapsulated classes that are wrapped in a wxObject. void AddTrackedObject(long obj_ptr, wxObject *pObject); *************** *** 626,629 **** --- 638,643 ---- // Is this object currently tracked? bool IsTrackedObject(void *pObject) const; + // The the hashtable of [long object pointer] = [long wxObject (container) pointer] + // The key = value for wxObject derived classes, but are different for non wxObject classes. wxLongToLongHashMap* GetTrackedObjects(); // Get an array of strings "wxObject_classname count#" *************** *** 663,667 **** // ----------------------------------------------------------------------- ! // wxLua lua Registry Table Functions // Create a reference to the object at stack index in the --- 677,681 ---- // ----------------------------------------------------------------------- ! // wxLua Lua Registry Table Functions // Create a reference to the object at stack index in the *************** *** 688,692 **** int ttag(int stack_idx) const; // Get the userdata at the stack index, if null_ptr then set the userdata pointer ! // in lua to NULL so that lua won't gc it. void* ttouserdata(int stack_idx, bool null_ptr = false) const; // Create a new table (metatable) tinsert it into the wxLuaReferences registry table --- 702,706 ---- int ttag(int stack_idx) const; // Get the userdata at the stack index, if null_ptr then set the userdata pointer ! // in Lua to NULL so that Lua won't gc it. void* ttouserdata(int stack_idx, bool null_ptr = false) const; // Create a new table (metatable) tinsert it into the wxLuaReferences registry table *************** *** 712,716 **** // and wxlua_getluatype() since it allows a small amount of coersion between types. int IswxLuaType(int luatype, int wxluaarg_tag) const; ! // Check if the item at the lua stack index is user data type tag bool IsUserDataType(int stack_idx, int tag) const; // Return a pointer to the object that corresponds to the specified stack --- 726,730 ---- // and wxlua_getluatype() since it allows a small amount of coersion between types. int IswxLuaType(int luatype, int wxluaarg_tag) const; ! // Check if the item at the Lua stack index is user data type tag bool IsUserDataType(int stack_idx, int tag) const; // Return a pointer to the object that corresponds to the specified stack *************** *** 730,734 **** const char* GetStringType(int stack_idx); // Same as GetStringType(), but returns a wxString and the item at the stack_idx can be ! // either a lua string or a wxString userdata. wxString GetwxStringType(int stack_idx); // Validate that the object at the stack index specified is a boolean object --- 744,748 ---- const char* GetStringType(int stack_idx); // Same as GetStringType(), but returns a wxString and the item at the stack_idx can be ! // either a Lua string or a wxString userdata. wxString GetwxStringType(int stack_idx); // Validate that the object at the stack index specified is a boolean object *************** *** 745,750 **** double GetNumberType(int stack_idx); ! // Checks for if the item at the stack index is one of the types or can ! // be converted into the type by lua, returns false if not (no errors) bool IsStringType(int stack_idx) const; bool IsBooleanType(int stack_idx) const; --- 759,764 ---- double GetNumberType(int stack_idx); ! // Checks if the item at the stack index is one of the types or can ! // be converted into the type by Lua, returns false if not (no errors) bool IsStringType(int stack_idx) const; bool IsBooleanType(int stack_idx) const; *************** *** 785,789 **** // ----------------------------------------------------------------------- ! // Returns the 'name' of a lua userdata object from its tag. // Also handles predefined wxLua arg tags, see wxlua_getwxluatypename // returns wxEmptyString on failure. --- 799,803 ---- // ----------------------------------------------------------------------- ! // Returns the 'name' of a Lua userdata object from its tag. // Also handles predefined wxLua arg tags, see wxlua_getwxluatypename // returns wxEmptyString on failure. *************** *** 792,802 **** // ----------------------------------------------------------------------- ! // Add this derived method, a lua function or value the user has set to a // wxLua userdata object that we will push onto the stack when they access // the index of the object with the "method_name". The pObject is the ! // userdata and the new wxLuaObject wraps the lua function or value // which will be deleted by this. // The derived methods are stored in the "wxLuaDerivedMethods" table in the ! // lua registry table. bool SetDerivedMethod(void *pObject, const char *method_name, wxLuaObject* wxlObj); // Is there a derived method given an object and and a method name. --- 806,816 ---- // ----------------------------------------------------------------------- ! // Add this derived method, a Lua function or value the user has set to a // wxLua userdata object that we will push onto the stack when they access // the index of the object with the "method_name". The pObject is the ! // userdata and the new wxLuaObject wraps the Lua function or value // which will be deleted by this. // The derived methods are stored in the "wxLuaDerivedMethods" table in the ! // Lua registry table. bool SetDerivedMethod(void *pObject, const char *method_name, wxLuaObject* wxlObj); // Is there a derived method given an object and and a method name. *************** *** 820,824 **** // The function names have been capitalized to allow case sensitive searching // ----------------------------------------------------------------------- ! // Raw basic lua stack functions, lua.h int lua_GetTop() const; --- 834,838 ---- // The function names have been capitalized to allow case sensitive searching // ----------------------------------------------------------------------- ! // Raw basic Lua stack functions, lua.h int lua_GetTop() const; *************** *** 833,837 **** // ----------------------------------------------------------------------- ! // Raw lua accesses functions (stack -> C), lua.h bool lua_IsNumber(int index) const; --- 847,851 ---- // ----------------------------------------------------------------------- ! // Raw Lua accesses functions (stack -> C), lua.h bool lua_IsNumber(int index) const; *************** *** 859,863 **** // ----------------------------------------------------------------------- ! // Raw lua push functions (C -> stack), lua.h void lua_PushNil(); --- 873,877 ---- // ----------------------------------------------------------------------- ! // Raw Lua push functions (C -> stack), lua.h void lua_PushNil(); *************** *** 875,879 **** // ----------------------------------------------------------------------- ! // Raw lua get functions (Lua -> stack), lua.h void lua_GetTable(int idx); --- 889,893 ---- // ----------------------------------------------------------------------- ! // Raw Lua get functions (Lua -> stack), lua.h void lua_GetTable(int idx); *************** *** 889,893 **** // ----------------------------------------------------------------------- ! // Raw lua set functions (stack -> Lua), lua.h void lua_SetTable(int idx); --- 903,907 ---- // ----------------------------------------------------------------------- ! // Raw Lua set functions (stack -> Lua), lua.h void lua_SetTable(int idx); *************** *** 900,904 **** // ----------------------------------------------------------------------- ! // Raw lua `load' and `call' functions (load and run Lua code), lua.h void lua_Call(int nargs, int nresults); --- 914,918 ---- // ----------------------------------------------------------------------- ! // Raw Lua `load' and `call' functions (load and run Lua code), lua.h void lua_Call(int nargs, int nresults); *************** *** 911,915 **** // ----------------------------------------------------------------------- ! // Raw lua coroutine functions, lua.h int lua_Yield(int nresults); --- 925,929 ---- // ----------------------------------------------------------------------- ! // Raw Lua coroutine functions, lua.h int lua_Yield(int nresults); *************** *** 918,927 **** // ----------------------------------------------------------------------- ! // Raw lua garbage-collection functions, lua.h int lua_GetGCCount(); // ----------------------------------------------------------------------- ! // Raw lua miscellaneous functions, lua.h wxString lua_Version() const; --- 93... [truncated message content] |