From: John L. <jr...@us...> - 2005-11-29 05:45:18
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/modules/wxlua/include Modified Files: internal.h wxlbind.h wxlcallb.h wxlstate.h Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: wxlcallb.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlcallb.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlcallb.h 28 Nov 2005 01:28:54 -0000 1.3 --- wxlcallb.h 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 56,60 **** wxEventType m_eventType; private: ! DECLARE_CLASS(wxLuaCallback); }; --- 56,60 ---- wxEventType m_eventType; private: ! DECLARE_ABSTRACT_CLASS(wxLuaCallback); }; *************** *** 91,95 **** private: ! DECLARE_CLASS(wxLuaDestroyCallback) }; --- 91,95 ---- private: ! DECLARE_ABSTRACT_CLASS(wxLuaDestroyCallback) }; Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlbind.h 28 Nov 2005 06:05:08 -0000 1.3 --- wxlbind.h 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 22,25 **** --- 22,27 ---- } + class WXDLLIMPEXP_WXLUA wxLuaBinding; + // ---------------------------------------------------------------------------- // wxLua binding enums and structs *************** *** 87,96 **** }; ! typedef WXLUACLASS* (*GetClassListFunction)(size_t &); ! typedef WXLUADEFINE* (*GetDefineListFunction)(size_t &); ! //typedef WXLUASTRING* (*GetDefineListFunction)(size_t &); FIXME - use this ! typedef WXLUAEVENT* (*GetEventListFunction)(size_t &); ! typedef WXLUAOBJECT* (*GetObjectListFunction)(size_t &); ! typedef WXLUAMETHOD* (*GetBuiltinListFunction)(size_t &); // ---------------------------------------------------------------------------- --- 89,101 ---- }; ! typedef WXLUACLASS* (*wxLuaGetClassListFunction)(size_t &); ! typedef WXLUADEFINE* (*wxLuaGetDefineListFunction)(size_t &); ! //typedef WXLUASTRING* (*wxLuaGetDefineListFunction)(size_t &); FIXME - use this ! typedef WXLUAEVENT* (*wxLuaGetEventListFunction)(size_t &); ! typedef WXLUAOBJECT* (*wxLuaGetObjectListFunction)(size_t &); ! typedef WXLUAMETHOD* (*wxLuaGetBuiltinListFunction)(size_t &); ! ! // list of wxLua Bindings ! WX_DECLARE_USER_EXPORTED_LIST(wxLuaBinding, wxLuaBindingList, WXDLLIMPEXP_WXLUA); // ---------------------------------------------------------------------------- *************** *** 105,108 **** --- 110,114 ---- public: wxLuaBinding(); + virtual ~wxLuaBinding() {} // lua namespace e.g. "wx" *************** *** 110,123 **** // Pointers to external Binding Functions ! GetClassListFunction pfGetClassList; ! GetDefineListFunction pfGetDefineList; ! GetEventListFunction pfGetEventList; ! GetObjectListFunction pfGetObjectList; ! GetBuiltinListFunction pfGetBuiltinList; // Binds C Functions/Defines/Object/Events to Lua Table ! void RegisterBinding(lua_State *L, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing Lua Table ! void UnRegisterBinding(lua_State *L); // --- 116,129 ---- // Pointers to external Binding Functions ! wxLuaGetClassListFunction pfGetClassList; ! wxLuaGetDefineListFunction pfGetDefineList; ! wxLuaGetEventListFunction pfGetEventList; ! wxLuaGetObjectListFunction pfGetObjectList; ! wxLuaGetBuiltinListFunction pfGetBuiltinList; // Binds C Functions/Defines/Object/Events to Lua Table ! virtual void RegisterBinding(lua_State *L, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing Lua Table ! virtual void UnRegisterBinding(lua_State *L); // *************** *** 142,151 **** bool SetBaseClassTag(WXLUACLASS *pClass); protected: // Registers binding, returns lua table reference to binding ! int LUACALL RegisterFunctions(lua_State *L, bool registerTypes); // Register the classes, definitions, objects and pointers generated by the binding // Sort the event list into order for faster event handler processing. ! void LUACALL RegisterGeneratedClasses(lua_State *L, int tableOffset, bool registerTypes); virtual void OnRegister(lua_State * WXUNUSED(L), bool WXUNUSED(registerTypes), int WXUNUSED(luaTable)) {} --- 148,160 ---- bool SetBaseClassTag(WXLUACLASS *pClass); + // Get all the bindings that were created + static wxLuaBindingList* GetBindingsList() { return &sm_bindings; } + protected: // Registers binding, returns lua table reference to binding ! virtual int LUACALL RegisterFunctions(lua_State *L, bool registerTypes); // Register the classes, definitions, objects and pointers generated by the binding // Sort the event list into order for faster event handler processing. ! virtual void LUACALL RegisterGeneratedClasses(lua_State *L, int tableOffset, bool registerTypes); virtual void OnRegister(lua_State * WXUNUSED(L), bool WXUNUSED(registerTypes), int WXUNUSED(luaTable)) {} *************** *** 168,176 **** int m_wxLuaTable; // The lua tag for the wxLua private tables ! DECLARE_CLASS(wxLuaBinding) ! }; ! // list of wxLua Bindings ! WX_DECLARE_USER_EXPORTED_LIST(wxLuaBinding, wxLuaBindingList, WXDLLIMPEXP_WXLUA); #endif // _WXLBIND_H_ --- 177,184 ---- int m_wxLuaTable; // The lua tag for the wxLua private tables ! static wxLuaBindingList sm_bindings; ! DECLARE_DYNAMIC_CLASS(wxLuaBinding) ! }; #endif // _WXLBIND_H_ Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlstate.h 28 Nov 2005 06:05:08 -0000 1.5 --- wxlstate.h 29 Nov 2005 05:45:09 -0000 1.6 *************** *** 115,118 **** --- 115,121 ---- }; + // an invalid wxLuaState for comparison (like wxNullBitmap) + extern WXDLLIMPEXP_DATA_WXLUA(wxLuaState) wxNullLuaState; + class WXDLLIMPEXP_WXLUA wxLuaState : public wxObject { *************** *** 265,269 **** // get the derived method for the class cpIndex ! lua_State* getDerivedMethod(void *pObject, const char *method, lua_State *L = NULL); int LuaError(int status, int top); --- 268,272 ---- // get the derived method for the class cpIndex ! static wxLuaState getDerivedMethod(void *pObject, const char *method, lua_State *L = NULL); int LuaError(int status, int top); Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** internal.h 28 Nov 2005 06:05:08 -0000 1.10 --- internal.h 29 Nov 2005 05:45:09 -0000 1.11 *************** *** 29,33 **** // with standard lua functions. ! #define wxFileRead read #define wxFileWrite write #define wxFileReadWrite read_write --- 29,33 ---- // with standard lua functions. ! #define wxFileRead read // FIXME see file.i and wx_define.cpp need to remove these #define wxFileWrite write #define wxFileReadWrite read_write *************** *** 45,50 **** #endif - extern wxLuaInterpreter *wxFindLuaInterpreter(lua_State *L); - // ---------------------------------------------------------------------------- // wxLuaSmartStringArray - Wraps a "new" array of wxStrings with an automatic --- 45,48 ---- |