From: John L. <jr...@us...> - 2009-10-05 02:51:41
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxlcallb.h wxlstate.h Log Message: Add a few more wxDateTime member functions. Speedup check for wxSpinEvent vs wxScrollEvent in wxLuaEventCallback::OnEvent() Reorder list of lightuserdata keys for LUA_REGISTRYINDEX in wxlstate.h Cleanup in wxLuaStackDialog, remove EnumerateGlobalData() and just treat is as a regular table. Fix ignoring events for controls in controls.wx.lua Index: wxlcallb.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlcallb.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wxlcallb.h 19 May 2009 03:20:53 -0000 1.30 --- wxlcallb.h 5 Oct 2009 02:51:29 -0000 1.31 *************** *** 66,70 **** // Get a human readable string about this callback. // "wxEVT_XXX(evt#) -> wxLuaEventCallback(&callback, ids %d %d)|wxEvtHandler(&evthandler) -> wxEvtHandlerClassName" ! wxString GetInfo() const; // Get a human readable string // Central event handler that calls OnEvent() for the actual --- 66,70 ---- // Get a human readable string about this callback. // "wxEVT_XXX(evt#) -> wxLuaEventCallback(&callback, ids %d %d)|wxEvtHandler(&evthandler) -> wxEvtHandlerClassName" ! wxString GetInfo() const; // Central event handler that calls OnEvent() for the actual Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** wxlbind.h 1 Oct 2009 04:21:01 -0000 1.90 --- wxlbind.h 5 Oct 2009 02:51:29 -0000 1.91 *************** *** 109,112 **** --- 109,114 ---- extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxEvent; // wxLua type for wxEvent extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxWindow; // wxLua type for wxWindow + extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxScrollEvent; // wxLua type for wxScrollEvent - see wxLuaEventCallback::OnEvent + extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxSpinEvent; // wxLua type for wxSpinEvent - see wxLuaEventCallback::OnEvent extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxString; // wxLua type for wxString extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxArrayString; // wxLua type for wxArrayString Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** wxlstate.h 1 Oct 2009 04:21:01 -0000 1.126 --- wxlstate.h 5 Oct 2009 02:51:29 -0000 1.127 *************** *** 97,100 **** --- 97,125 ---- // they're not used, just the memory address. + // The key in the LUA_REGISTRYINDEX table that is a weak keyed table of + // the tables wxLua pushed into the registry with their keys as values. + // This is used by the wxLuaDebugData to know if the table is one of the wxLua + // registry tables for better wxLuaStackDialog performance. + // LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] = + // lightuserdata(&wxlua_lreg_XXX_key) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key; + + // The key in the LUA_REGISTRYINDEX table whose value is a lightuserdata + // of a wxLuaState for this lua_State. + // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key; + // The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class + // lightuserdata value for the wxLuaState. + // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key; + + // The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata + // wxLuaBindings and the ref to the Lua table they were installed into. + // LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...} + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key; + // The key in the LUA_REGISTRYINDEX table that is a lookup table of string + // C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct. + // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key; // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table indexed // on the wxLua types where each item is a userdata metatable for a C++ class. *************** *** 105,135 **** // LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class } extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to Lua objects we want to keep a handle to. The object could be ! // anything, a table, function, number, string, userdata... ! // LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to objects the wxLuaDebugData wants to keep a handle to by ! // storing their value for lookup. It is used only for the wxLuaDebugData. ! // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key; ! // The key that in the LUA_REGISTRYINDEX table that is a lookup table of string ! // C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct. ! // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass) ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key; ! // The key in the LUA_REGISTRYINDEX table that is a table ! // of Lua objects/functions assigned to wxLua userdata programatically in Lua. ! // LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] = ! // {["derived func/value name"] = wxLuaObject(Lua function/value), ...} ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key; ! // The key in the LUA_REGISTRYINDEX table who's value is a lightuserdata ! // of the wxLuaState for this lua_State. ! // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState) ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key; ! // The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata ! // wxLuaBindings and the ref to the Lua table they were installed into. ! // LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...} ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key; // The key in the LUA_REGISTRYINDEX table that is a table of all // objects that we've pushed into Lua using wxluaT_pushuserdatatype(). --- 130,134 ---- // LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class } extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key; ! // The key in the LUA_REGISTRYINDEX table that is a table of all // objects that we've pushed into Lua using wxluaT_pushuserdatatype(). *************** *** 144,147 **** --- 143,152 ---- // integer wxLua type extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key; + + // The key in the LUA_REGISTRYINDEX table that is a table + // of Lua objects/functions assigned to wxLua userdata programatically in Lua. + // LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] = + // {["derived func/value name"] = wxLuaObject(Lua function/value), ...} + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key; // The key in the LUA_REGISTRYINDEX table that is a table of all // wxLuaEventCallbacks that we've created. *************** *** 167,185 **** // LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL) extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key; - // The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class - // lightuserdata value for the wxLuaState. - // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData) - extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key; - // The key in the LUA_REGISTRYINDEX table that is a weak keyed table of - // the tables wxLua pushed into the registry with their keys as values. - // This is used by the wxLuaDebugData to know if the table is one of the wxLua - // registry tables for better wxLuaStackDialog performance. - // LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] = - // lightuserdata(&wxlua_lreg_XXX_key) - extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key; ! // Light userdata used as keys in the metatables created for the class userdata objects. ! // Note that even though these keys have values, they're not used, just the memory address. // wxLua userdata metatable structure: // { --- 172,188 ---- // LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL) extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to Lua objects we want to keep a handle to. The object could be ! // anything, a table, function, number, string, userdata... ! // LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to objects the wxLuaDebugData wants to keep a handle to by ! // storing their value for lookup. It is used only for the wxLuaDebugData. ! // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key; + // ---------------------------------------------------------------------------- // wxLua userdata metatable structure: // { *************** *** 192,195 **** --- 195,201 ---- // } + // Light userdata used as keys in the metatables created for the class userdata objects. + // Note that even though these keys have values, they're not used, just the memory address. + // The key of a metatable used for wxLua userdata that is the wxLua type number in the // wxlua_lreg_types_key table this metatable is for. |