From: John L. <jr...@us...> - 2007-06-08 01:36:49
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15480/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h Log Message: Add a simple method to get the binding info, seems small and works well Addd sample lua program bindings.wx.lua to show them in a listctrl Fix incircles to work with new bindings Put the "name" of the struct binding items first always Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxldefs.h 6 Jun 2007 23:43:16 -0000 1.19 --- wxldefs.h 8 Jun 2007 01:36:31 -0000 1.20 *************** *** 57,61 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 9 // ---------------------------------------------------------------------------- --- 57,61 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 10 // ---------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** wxlbind.h 6 Jun 2007 23:43:16 -0000 1.43 --- wxlbind.h 8 Jun 2007 01:36:31 -0000 1.44 *************** *** 73,83 **** int maxargs; // total number of args allowed wxLuaArgTag* argtags; // array of lua tags representing each argument, zero terminated }; struct WXDLLIMPEXP_WXLUA wxLuaBindMethod // defines a LUA method or property { - int type; // wxLuaMethod_Type flags for this method - // note each func has own type, this is ored values of them const char *name; // name of the method or property wxLuaBindCFunc *funcs; // array of functions for this method int funcs_n; // number of functions (overloaded > 1) for this method --- 73,86 ---- int maxargs; // total number of args allowed wxLuaArgTag* argtags; // array of lua tags representing each argument, zero terminated + // NOTE: there may less argtags than maxargs if this is an + // overloaded function since the argtags == s_wxluaargArray_None + // but the maxargs is the maxargs of all the overloaded functions }; struct WXDLLIMPEXP_WXLUA wxLuaBindMethod // defines a LUA method or property { const char *name; // name of the method or property + int type; // wxLuaMethod_Type flags for this method + // note each func has own type, this is ored values of them wxLuaBindCFunc *funcs; // array of functions for this method int funcs_n; // number of functions (overloaded > 1) for this method *************** *** 127,132 **** struct WXDLLIMPEXP_WXLUA wxLuaBindEvent // defines a wxWidgets Event for wxLua { - const int *eventType; // wxWidgets event type, e.g. &wxEVT_COMMAND_MENU_SELECTED const char *name; // name of the event, e.g. "wxEVT_COMMAND_MENU_SELECTED" int *class_tag; // lua class tag, e.g. &s_wxluatag_wxCommandEvent }; --- 130,135 ---- struct WXDLLIMPEXP_WXLUA wxLuaBindEvent // defines a wxWidgets Event for wxLua { const char *name; // name of the event, e.g. "wxEVT_COMMAND_MENU_SELECTED" + const int *eventType; // wxWidgets event type, e.g. &wxEVT_COMMAND_MENU_SELECTED int *class_tag; // lua class tag, e.g. &s_wxluatag_wxCommandEvent }; *************** *** 145,149 **** wxLuaBindMethod *methods; // pointer to methods for this class int methods_n; // number of methods ! wxClassInfo *pClassInfo; // 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 --- 148,152 ---- wxLuaBindMethod *methods; // pointer to methods for this class 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 |