From: John L. <jr...@us...> - 2006-05-16 22:47:14
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2550/wxLua/modules/wxbind/src Modified Files: defsutil.cpp grid.cpp socket.cpp wave.cpp wx_bind.cpp Log Message: add more classes for 2.6.3, wxMediaCtrl, wxURL, wxURI, update grid.i Index: grid.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/grid.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** grid.cpp 6 May 2006 19:54:31 -0000 1.13 --- grid.cpp 16 May 2006 22:47:09 -0000 1.14 *************** *** 1177,1224 **** ! #if ((wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxGrid)) && (wxLUA_USE_wxGrid) ! // %wxchkver23 void SetKind(wxGridCellAttr::wxAttrKind kind) ! static int LUACALL wxLua_wxGridCellAttr_SetKind(lua_State *L) ! { ! wxLuaState wxlState(L); ! // wxGridCellAttr::wxAttrKind kind ! wxGridCellAttr::wxAttrKind kind = (wxGridCellAttr::wxAttrKind)wxlState.GetEnumerationType(2); ! // get this [...3873 lines suppressed...] { LuaGetProp, "Col", wxLua_wxGridEditorCreatedEvent_GetCol, 0, 0, {0} }, { LuaSetProp, "Col", wxLua_wxGridEditorCreatedEvent_SetCol, 1, 1, {0} }, - { LuaMethod, "SetControl", wxLua_wxGridEditorCreatedEvent_SetControl, 1, 1, { &s_wxluatag_wxControl, 0 } }, { LuaGetProp, "Control", wxLua_wxGridEditorCreatedEvent_GetControl, 0, 0, {0} }, { LuaSetProp, "Control", wxLua_wxGridEditorCreatedEvent_SetControl, 1, 1, {0} }, { LuaDelete, "wxGridEditorCreatedEvent", wxLua_wxGridEditorCreatedEvent_destructor, 0, 0, {0} }, { LuaMethod, "Delete", wxLua_wxGridEditorCreatedEvent_Delete, 0, 0, {0} }, --- 7281,7292 ---- { LuaMethod, "GetControl", wxLua_wxGridEditorCreatedEvent_GetControl, 0, 0, { 0 } }, { LuaMethod, "SetRow", wxLua_wxGridEditorCreatedEvent_SetRow, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetCol", wxLua_wxGridEditorCreatedEvent_SetCol, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetControl", wxLua_wxGridEditorCreatedEvent_SetControl, 1, 1, { &s_wxluatag_wxControl, 0 } }, { LuaGetProp, "Col", wxLua_wxGridEditorCreatedEvent_GetCol, 0, 0, {0} }, { LuaSetProp, "Col", wxLua_wxGridEditorCreatedEvent_SetCol, 1, 1, {0} }, { LuaGetProp, "Control", wxLua_wxGridEditorCreatedEvent_GetControl, 0, 0, {0} }, { LuaSetProp, "Control", wxLua_wxGridEditorCreatedEvent_SetControl, 1, 1, {0} }, + { LuaGetProp, "Row", wxLua_wxGridEditorCreatedEvent_GetRow, 0, 0, {0} }, + { LuaSetProp, "Row", wxLua_wxGridEditorCreatedEvent_SetRow, 1, 1, {0} }, { LuaDelete, "wxGridEditorCreatedEvent", wxLua_wxGridEditorCreatedEvent_destructor, 0, 0, {0} }, { LuaMethod, "Delete", wxLua_wxGridEditorCreatedEvent_Delete, 0, 0, {0} }, Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wx_bind.cpp 16 May 2006 04:55:33 -0000 1.38 --- wx_bind.cpp 16 May 2006 22:47:09 -0000 1.39 *************** *** 92,97 **** #if (wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxGrid) { &wxEVT_GRID_EDITOR_CREATED, "wxEVT_GRID_EDITOR_CREATED", &s_wxluatag_wxGridEditorCreatedEvent }, - { &wxEVT_GRID_EDITOR_HIDDEN, "wxEVT_GRID_EDITOR_HIDDEN", &s_wxluatag_wxGridEditorCreatedEvent }, - { &wxEVT_GRID_EDITOR_SHOWN, "wxEVT_GRID_EDITOR_SHOWN", &s_wxluatag_wxGridEditorCreatedEvent }, #endif --- 92,95 ---- *************** *** 112,115 **** --- 110,120 ---- #endif + + #if (wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave) + { &wxEVT_MEDIA_FINISHED, "wxEVT_MEDIA_FINISHED", &s_wxluatag_wxMediaEvent }, + { &wxEVT_MEDIA_LOADED, "wxEVT_MEDIA_LOADED", &s_wxluatag_wxMediaEvent }, + { &wxEVT_MEDIA_STOP, "wxEVT_MEDIA_STOP", &s_wxluatag_wxMediaEvent }, + #endif + { &wxEVT_ACTIVATE, "wxEVT_ACTIVATE", &s_wxluatag_wxActivateEvent }, { &wxEVT_ACTIVATE_APP, "wxEVT_ACTIVATE_APP", &s_wxluatag_wxActivateEvent }, *************** *** 255,259 **** #if wxLUA_USE_wxGrid ! { &wxEVT_GRID_CELL_CHANGE, "wxEVT_GRID_CELL_CHANGE", &s_wxluatag_wxGridRangeSelectEvent }, { &wxEVT_GRID_CELL_LEFT_CLICK, "wxEVT_GRID_CELL_LEFT_CLICK", &s_wxluatag_wxGridEvent }, { &wxEVT_GRID_CELL_LEFT_DCLICK, "wxEVT_GRID_CELL_LEFT_DCLICK", &s_wxluatag_wxGridEvent }, --- 260,265 ---- #if wxLUA_USE_wxGrid ! { &wxEVT_GRID_CELL_BEGIN_DRAG, "wxEVT_GRID_CELL_BEGIN_DRAG", &s_wxluatag_wxGridEvent }, ! { &wxEVT_GRID_CELL_CHANGE, "wxEVT_GRID_CELL_CHANGE", &s_wxluatag_wxGridEvent }, { &wxEVT_GRID_CELL_LEFT_CLICK, "wxEVT_GRID_CELL_LEFT_CLICK", &s_wxluatag_wxGridEvent }, { &wxEVT_GRID_CELL_LEFT_DCLICK, "wxEVT_GRID_CELL_LEFT_DCLICK", &s_wxluatag_wxGridEvent }, *************** *** 261,264 **** --- 267,272 ---- { &wxEVT_GRID_CELL_RIGHT_DCLICK, "wxEVT_GRID_CELL_RIGHT_DCLICK", &s_wxluatag_wxGridEvent }, { &wxEVT_GRID_COL_SIZE, "wxEVT_GRID_COL_SIZE", &s_wxluatag_wxGridSizeEvent }, + { &wxEVT_GRID_EDITOR_HIDDEN, "wxEVT_GRID_EDITOR_HIDDEN", &s_wxluatag_wxGridEvent }, + { &wxEVT_GRID_EDITOR_SHOWN, "wxEVT_GRID_EDITOR_SHOWN", &s_wxluatag_wxGridEvent }, { &wxEVT_GRID_LABEL_LEFT_CLICK, "wxEVT_GRID_LABEL_LEFT_CLICK", &s_wxluatag_wxGridEvent }, { &wxEVT_GRID_LABEL_LEFT_DCLICK, "wxEVT_GRID_LABEL_LEFT_DCLICK", &s_wxluatag_wxGridEvent }, *************** *** 267,271 **** { &wxEVT_GRID_RANGE_SELECT, "wxEVT_GRID_RANGE_SELECT", &s_wxluatag_wxGridRangeSelectEvent }, { &wxEVT_GRID_ROW_SIZE, "wxEVT_GRID_ROW_SIZE", &s_wxluatag_wxGridSizeEvent }, ! { &wxEVT_GRID_SELECT_CELL, "wxEVT_GRID_SELECT_CELL", &s_wxluatag_wxGridRangeSelectEvent }, #endif --- 275,279 ---- { &wxEVT_GRID_RANGE_SELECT, "wxEVT_GRID_RANGE_SELECT", &s_wxluatag_wxGridRangeSelectEvent }, { &wxEVT_GRID_ROW_SIZE, "wxEVT_GRID_ROW_SIZE", &s_wxluatag_wxGridSizeEvent }, ! { &wxEVT_GRID_SELECT_CELL, "wxEVT_GRID_SELECT_CELL", &s_wxluatag_wxGridEvent }, #endif *************** *** 566,569 **** --- 574,584 ---- + #if (wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave) + { "wxMEDIA_FINISHED_ID", wxMEDIA_FINISHED_ID }, + { "wxMEDIA_LOADED_ID", wxMEDIA_LOADED_ID }, + { "wxMEDIA_STOP_ID", wxMEDIA_STOP_ID }, + #endif + + #if (wxLUA_USE_wxMiniFrame) && (wxLUA_USE_wxFrame) { "wxTINY_CAPTION_HORIZ", wxTINY_CAPTION_HORIZ }, *************** *** 1001,1012 **** { "WXGRID_MIN_COL_WIDTH", WXGRID_MIN_COL_WIDTH }, { "WXGRID_MIN_ROW_HEIGHT", WXGRID_MIN_ROW_HEIGHT }, - { "wxGRIDTABLE_NOTIFY_COLS_APPENDED", wxGRIDTABLE_NOTIFY_COLS_APPENDED }, - { "wxGRIDTABLE_NOTIFY_COLS_DELETED", wxGRIDTABLE_NOTIFY_COLS_DELETED }, - { "wxGRIDTABLE_NOTIFY_COLS_INSERTED", wxGRIDTABLE_NOTIFY_COLS_INSERTED }, - { "wxGRIDTABLE_NOTIFY_ROWS_APPENDED", wxGRIDTABLE_NOTIFY_ROWS_APPENDED }, - { "wxGRIDTABLE_NOTIFY_ROWS_DELETED", wxGRIDTABLE_NOTIFY_ROWS_DELETED }, - { "wxGRIDTABLE_NOTIFY_ROWS_INSERTED", wxGRIDTABLE_NOTIFY_ROWS_INSERTED }, - { "wxGRIDTABLE_REQUEST_VIEW_GET_VALUES", wxGRIDTABLE_REQUEST_VIEW_GET_VALUES }, - { "wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES", wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES }, #endif --- 1016,1019 ---- *************** *** 1539,1542 **** --- 1546,1560 ---- + #if (wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave) + { "wxMEDIACTRLPLAYERCONTROLS_DEFAULT", wxMEDIACTRLPLAYERCONTROLS_DEFAULT }, + { "wxMEDIACTRLPLAYERCONTROLS_NONE", wxMEDIACTRLPLAYERCONTROLS_NONE }, + { "wxMEDIACTRLPLAYERCONTROLS_STEP", wxMEDIACTRLPLAYERCONTROLS_STEP }, + { "wxMEDIACTRLPLAYERCONTROLS_VOLUME", wxMEDIACTRLPLAYERCONTROLS_VOLUME }, + { "wxMEDIASTATE_PAUSED", wxMEDIASTATE_PAUSED }, + { "wxMEDIASTATE_PLAYING", wxMEDIASTATE_PLAYING }, + { "wxMEDIASTATE_STOPPED", wxMEDIASTATE_STOPPED }, + #endif + + #if (wxUSE_LIBPNG) && (wxLUA_USE_wxImage) { "wxPNG_TYPE_COLOUR", wxPNG_TYPE_COLOUR }, *************** *** 2218,2221 **** --- 2236,2247 ---- { "Merged", wxGridCellAttr::Merged }, { "Row", wxGridCellAttr::Row }, + { "wxGRIDTABLE_NOTIFY_COLS_APPENDED", wxGRIDTABLE_NOTIFY_COLS_APPENDED }, + { "wxGRIDTABLE_NOTIFY_COLS_DELETED", wxGRIDTABLE_NOTIFY_COLS_DELETED }, + { "wxGRIDTABLE_NOTIFY_COLS_INSERTED", wxGRIDTABLE_NOTIFY_COLS_INSERTED }, + { "wxGRIDTABLE_NOTIFY_ROWS_APPENDED", wxGRIDTABLE_NOTIFY_ROWS_APPENDED }, + { "wxGRIDTABLE_NOTIFY_ROWS_DELETED", wxGRIDTABLE_NOTIFY_ROWS_DELETED }, + { "wxGRIDTABLE_NOTIFY_ROWS_INSERTED", wxGRIDTABLE_NOTIFY_ROWS_INSERTED }, + { "wxGRIDTABLE_REQUEST_VIEW_GET_VALUES", wxGRIDTABLE_REQUEST_VIEW_GET_VALUES }, + { "wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES", wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES }, { "wxGridSelectCells", wxGrid::wxGridSelectCells }, { "wxGridSelectColumns", wxGrid::wxGridSelectColumns }, *************** *** 2460,2463 **** --- 2486,2508 ---- { "wxSOCKET_WAITALL", wxSOCKET_WAITALL }, { "wxSOCKET_WOULDBLOCK", wxSOCKET_WOULDBLOCK }, + { "wxURI_FRAGMENT", wxURI_FRAGMENT }, + { "wxURI_IPV4ADDRESS", wxURI_IPV4ADDRESS }, + { "wxURI_IPV6ADDRESS", wxURI_IPV6ADDRESS }, + { "wxURI_IPVFUTURE", wxURI_IPVFUTURE }, + { "wxURI_PATH", wxURI_PATH }, + { "wxURI_PORT", wxURI_PORT }, + { "wxURI_QUERY", wxURI_QUERY }, + { "wxURI_REGNAME", wxURI_REGNAME }, + { "wxURI_SCHEME", wxURI_SCHEME }, + { "wxURI_SERVER", wxURI_SERVER }, + { "wxURI_STRICT", wxURI_STRICT }, + { "wxURI_USERINFO", wxURI_USERINFO }, + { "wxURL_CONNERR", wxURL_CONNERR }, + { "wxURL_NOERR", wxURL_NOERR }, + { "wxURL_NOHOST", wxURL_NOHOST }, + { "wxURL_NOPATH", wxURL_NOPATH }, + { "wxURL_NOPROTO", wxURL_NOPROTO }, + { "wxURL_PROTOERR", wxURL_PROTOERR }, + { "wxURL_SNTXERR", wxURL_SNTXERR }, #endif *************** *** 2624,2627 **** --- 2669,2680 ---- // -------------------------------------------------------------------- + #if (wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave) + { "wxMEDIABACKEND_DIRECTSHOW", wxMEDIABACKEND_DIRECTSHOW }, + { "wxMEDIABACKEND_GSTREAMER", wxMEDIABACKEND_GSTREAMER }, + { "wxMEDIABACKEND_MCI", wxMEDIABACKEND_MCI }, + { "wxMEDIABACKEND_QUICKTIME", wxMEDIABACKEND_QUICKTIME }, + #endif + + #if (wxUSE_LIBTIFF) && (wxLUA_USE_wxImage) { "wxIMAGE_OPTION_BITSPERSAMPLE", _T("BitsPerSample") }, *************** *** 5224,5227 **** --- 5277,5285 ---- + #if wxLUA_USE_wxGrid + wxLUA_IMPLEMENT_ENCAPSULATION(wxGridCellCoords) + #endif + + #if wxLUA_USE_wxListCtrl wxLUA_IMPLEMENT_ENCAPSULATION(wxListItemAttr) *************** *** 5371,5374 **** --- 5429,5438 ---- + #if (wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave) + { "wxMediaCtrl", wxMediaCtrl_methods, wxMediaCtrl_methodCount, -1, CLASSINFO(wxMediaCtrl), &s_wxluatag_wxMediaCtrl, "wxControl" }, + { "wxMediaEvent", wxMediaEvent_methods, wxMediaEvent_methodCount, -1, CLASSINFO(wxMediaEvent), &s_wxluatag_wxMediaEvent, "wxNotifyEvent" }, + #endif + + #if (wxLUA_USE_wxMiniFrame) && (wxLUA_USE_wxFrame) { "wxMiniFrame", wxMiniFrame_methods, wxMiniFrame_methodCount, -1, CLASSINFO(wxMiniFrame), &s_wxluatag_wxMiniFrame, "wxFrame" }, *************** *** 5767,5772 **** #if wxLUA_USE_wxGrid { "wxGrid", wxGrid_methods, wxGrid_methodCount, -1, CLASSINFO(wxGrid), &s_wxluatag_wxGrid, "wxScrolledWindow" }, ! { "wxGridCellAttr", wxGridCellAttr_methods, wxGridCellAttr_methodCount, -1, NULL, &s_wxluatag_wxGridCellAttr, NULL }, ! { "wxGridCellAttrProvider", wxGridCellAttrProvider_methods, wxGridCellAttrProvider_methodCount, -1, NULL, &s_wxluatag_wxGridCellAttrProvider, NULL }, { "wxGridCellAutoWrapStringEditor", wxGridCellAutoWrapStringEditor_methods, wxGridCellAutoWrapStringEditor_methodCount, -1, NULL, &s_wxluatag_wxGridCellAutoWrapStringEditor, "wxGridCellTextEditor" }, { "wxGridCellAutoWrapStringRenderer", wxGridCellAutoWrapStringRenderer_methods, wxGridCellAutoWrapStringRenderer_methodCount, -1, NULL, &s_wxluatag_wxGridCellAutoWrapStringRenderer, "wxGridCellStringRenderer" }, --- 5831,5836 ---- #if wxLUA_USE_wxGrid { "wxGrid", wxGrid_methods, wxGrid_methodCount, -1, CLASSINFO(wxGrid), &s_wxluatag_wxGrid, "wxScrolledWindow" }, ! { "wxGridCellAttr", wxGridCellAttr_methods, wxGridCellAttr_methodCount, -1, NULL, &s_wxluatag_wxGridCellAttr, "wxClientDataContainer" }, ! { "wxGridCellAttrProvider", wxGridCellAttrProvider_methods, wxGridCellAttrProvider_methodCount, -1, NULL, &s_wxluatag_wxGridCellAttrProvider, "wxClientDataContainer" }, { "wxGridCellAutoWrapStringEditor", wxGridCellAutoWrapStringEditor_methods, wxGridCellAutoWrapStringEditor_methodCount, -1, NULL, &s_wxluatag_wxGridCellAutoWrapStringEditor, "wxGridCellTextEditor" }, { "wxGridCellAutoWrapStringRenderer", wxGridCellAutoWrapStringRenderer_methods, wxGridCellAutoWrapStringRenderer_methodCount, -1, NULL, &s_wxluatag_wxGridCellAutoWrapStringRenderer, "wxGridCellStringRenderer" }, *************** *** 6022,6025 **** --- 6086,6091 ---- { "wxSocketEvent", wxSocketEvent_methods, wxSocketEvent_methodCount, -1, CLASSINFO(wxSocketEvent), &s_wxluatag_wxSocketEvent, "wxEvent" }, { "wxSocketServer", wxSocketServer_methods, wxSocketServer_methodCount, -1, CLASSINFO(wxSocketServer), &s_wxluatag_wxSocketServer, "wxSocketBase" }, + { "wxURI", wxURI_methods, wxURI_methodCount, -1, CLASSINFO(wxURI), &s_wxluatag_wxURI, "wxObject" }, + { "wxURL", wxURL_methods, wxURL_methodCount, -1, CLASSINFO(wxURL), &s_wxluatag_wxURL, "wxURI" }, #endif Index: socket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/socket.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** socket.cpp 13 May 2006 17:20:52 -0000 1.14 --- socket.cpp 16 May 2006 22:47:09 -0000 1.15 *************** *** 2018,2019 **** --- 2018,2669 ---- #endif + + #if wxLUA_USE_wxSocket + // ------------------------------------------------------------------------------------------------- + // Bind class wxURI + // ------------------------------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class + int s_wxluatag_wxURI = -1; + + // wxURI(const wxString& uri) + static int LUACALL wxLua_wxURI_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxURI *returns; + // const wxString uri + const wxString uri = lua2wx(wxlState.GetStringType(1)); + // call constructor + returns = new wxURI(uri); + // add to tracked window list + if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) + wxlState.AddToTrackedWindowList((wxWindow*)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxURI, returns); + + return 1; + } + + // %constructor wxURICopy(const wxURI& uri) + static int LUACALL wxLua_wxURICopy_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxURI *returns; + // const wxURI uri + const wxURI * uri = (const wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call constructor + returns = new wxURI(*uri); + // add to tracked window list + if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) + wxlState.AddToTrackedWindowList((wxWindow*)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxURI, returns); + + return 1; + } + + // wxString Create(const wxString& uri) + static int LUACALL wxLua_wxURI_Create(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // const wxString uri + const wxString uri = lua2wx(wxlState.GetStringType(2)); + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call Create + returns = self->Create(uri); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // bool HasScheme() const + static int LUACALL wxLua_wxURI_HasScheme(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call HasScheme + returns = self->HasScheme(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool HasUserInfo() const + static int LUACALL wxLua_wxURI_HasUserInfo(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call HasUserInfo + returns = self->HasUserInfo(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool HasServer() const + static int LUACALL wxLua_wxURI_HasServer(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call HasServer + returns = self->HasServer(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool HasPort() const + static int LUACALL wxLua_wxURI_HasPort(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call HasPort + returns = self->HasPort(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool HasPath() const + static int LUACALL wxLua_wxURI_HasPath(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call HasPath + returns = self->HasPath(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool HasQuery() const + static int LUACALL wxLua_wxURI_HasQuery(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call HasQuery + returns = self->HasQuery(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool HasFragment() const + static int LUACALL wxLua_wxURI_HasFragment(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call HasFragment + returns = self->HasFragment(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // wxString GetScheme() const + static int LUACALL wxLua_wxURI_GetScheme(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetScheme + returns = self->GetScheme(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString GetPath() const + static int LUACALL wxLua_wxURI_GetPath(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetPath + returns = self->GetPath(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString GetQuery() const + static int LUACALL wxLua_wxURI_GetQuery(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetQuery + returns = self->GetQuery(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString GetFragment() const + static int LUACALL wxLua_wxURI_GetFragment(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetFragment + returns = self->GetFragment(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString GetPort() const + static int LUACALL wxLua_wxURI_GetPort(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetPort + returns = self->GetPort(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString GetUserInfo() const + static int LUACALL wxLua_wxURI_GetUserInfo(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetUserInfo + returns = self->GetUserInfo(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString GetServer() const + static int LUACALL wxLua_wxURI_GetServer(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetServer + returns = self->GetServer(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxURIHostType GetHostType() const + static int LUACALL wxLua_wxURI_GetHostType(lua_State *L) + { + wxLuaState wxlState(L); + wxURIHostType returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetHostType + returns = self->GetHostType(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxString GetUser() const + static int LUACALL wxLua_wxURI_GetUser(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetUser + returns = self->GetUser(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString GetPassword() const + static int LUACALL wxLua_wxURI_GetPassword(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call GetPassword + returns = self->GetPassword(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString BuildURI() const + static int LUACALL wxLua_wxURI_BuildURI(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call BuildURI + returns = self->BuildURI(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // wxString BuildUnescapedURI() const + static int LUACALL wxLua_wxURI_BuildUnescapedURI(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call BuildUnescapedURI + returns = self->BuildUnescapedURI(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // void Resolve(const wxURI& base, int flags = wxURI_STRICT) + static int LUACALL wxLua_wxURI_Resolve(lua_State *L) + { + wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // int flags = wxURI_STRICT + int flags = (argCount >= 3 ? (int)wxlState.GetNumberType(3) : wxURI_STRICT); + // const wxURI base + const wxURI * base = (const wxURI *)wxlState.GetUserDataType(2, s_wxluatag_wxURI); + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call Resolve + self->Resolve(*base, flags); + + return 0; + } + + // bool IsReference() const + static int LUACALL wxLua_wxURI_IsReference(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call IsReference + returns = self->IsReference(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // static wxString Unescape (const wxString& szEscapedURI) + static int LUACALL wxLua_wxURI_Unescape(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // const wxString szEscapedURI + const wxString szEscapedURI = lua2wx(wxlState.GetStringType(2)); + // call Unescape + returns = wxURI::Unescape(szEscapedURI); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + // %operator wxURI& operator = (const wxURI& uri); + static int LUACALL wxLua_wxURI_op_assign(lua_State *L) + { + wxLuaState wxlState(L); + wxURI *returns; + // const wxURI uri + const wxURI * uri = (const wxURI *)wxlState.GetUserDataType(2, s_wxluatag_wxURI); + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call op_assign + returns = self; + *returns = ((*self)=(*uri)); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxURI, returns); + + return 1; + } + + // %operator bool operator == (const wxURI& uri) const + static int LUACALL wxLua_wxURI_op_eq(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxURI uri + const wxURI * uri = (const wxURI *)wxlState.GetUserDataType(2, s_wxluatag_wxURI); + // get this + wxURI * self = (wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call op_eq + returns = (*self)==(*uri); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static int LUACALL wxLua_wxURI_destructor(lua_State *) + { + return 0; + } + + + + + + // Map Lua Class Methods to C Binding Functions + static WXLUAMETHOD s_wxURI_methods[] = { + { LuaConstructor, "wxURI", wxLua_wxURI_constructor, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaConstructor, "wxURICopy", wxLua_wxURICopy_constructor, 1, 1, { &s_wxluatag_wxURI, 0 } }, + { LuaMethod, "Create", wxLua_wxURI_Create, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "HasScheme", wxLua_wxURI_HasScheme, 0, 0, { 0 } }, + { LuaMethod, "HasUserInfo", wxLua_wxURI_HasUserInfo, 0, 0, { 0 } }, + { LuaMethod, "HasServer", wxLua_wxURI_HasServer, 0, 0, { 0 } }, + { LuaMethod, "HasPort", wxLua_wxURI_HasPort, 0, 0, { 0 } }, + { LuaMethod, "HasPath", wxLua_wxURI_HasPath, 0, 0, { 0 } }, + { LuaMethod, "HasQuery", wxLua_wxURI_HasQuery, 0, 0, { 0 } }, + { LuaMethod, "HasFragment", wxLua_wxURI_HasFragment, 0, 0, { 0 } }, + { LuaMethod, "GetScheme", wxLua_wxURI_GetScheme, 0, 0, { 0 } }, + { LuaMethod, "GetPath", wxLua_wxURI_GetPath, 0, 0, { 0 } }, + { LuaMethod, "GetQuery", wxLua_wxURI_GetQuery, 0, 0, { 0 } }, + { LuaMethod, "GetFragment", wxLua_wxURI_GetFragment, 0, 0, { 0 } }, + { LuaMethod, "GetPort", wxLua_wxURI_GetPort, 0, 0, { 0 } }, + { LuaMethod, "GetUserInfo", wxLua_wxURI_GetUserInfo, 0, 0, { 0 } }, + { LuaMethod, "GetServer", wxLua_wxURI_GetServer, 0, 0, { 0 } }, + { LuaMethod, "GetHostType", wxLua_wxURI_GetHostType, 0, 0, { 0 } }, + { LuaMethod, "GetUser", wxLua_wxURI_GetUser, 0, 0, { 0 } }, + { LuaMethod, "GetPassword", wxLua_wxURI_GetPassword, 0, 0, { 0 } }, + { LuaMethod, "BuildURI", wxLua_wxURI_BuildURI, 0, 0, { 0 } }, + { LuaMethod, "BuildUnescapedURI", wxLua_wxURI_BuildUnescapedURI, 0, 0, { 0 } }, + { LuaMethod, "Resolve", wxLua_wxURI_Resolve, 2, 1, { &s_wxluatag_wxURI, &s_wxluaarg_Number, 0 } }, + { LuaMethod, "IsReference", wxLua_wxURI_IsReference, 0, 0, { 0 } }, + { LuaMethod, "Unescape", wxLua_wxURI_Unescape, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "op_assign", wxLua_wxURI_op_assign, 1, 1, { &s_wxluatag_wxURI, 0 } }, + { LuaMethod, "op_eq", wxLua_wxURI_op_eq, 1, 1, { &s_wxluatag_wxURI, 0 } }, + { LuaDelete, "wxURI", wxLua_wxURI_destructor, 0, 0, {0} }, + }; + + // Extern accessor to class method map + WXLUAMETHOD* wxURI_methods = s_wxURI_methods; + int wxURI_methodCount = sizeof(s_wxURI_methods)/sizeof(s_wxURI_methods[0]); + #endif + + + #if wxLUA_USE_wxSocket + // ------------------------------------------------------------------------------------------------- + // Bind class wxURL + // ------------------------------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class + int s_wxluatag_wxURL = -1; + + + #if (wxLUA_USE_wxSocket) && (wxUSE_STREAMS) + // wxInputStream *GetInputStream() + static int LUACALL wxLua_wxURL_GetInputStream(lua_State *L) + { + wxLuaState wxlState(L); + wxInputStream *returns; + // get this + wxURL * self = (wxURL *)wxlState.GetUserDataType(1, s_wxluatag_wxURL); + // call GetInputStream + returns = self->GetInputStream(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxInputStream, returns); + + return 1; + } + + #endif + + + #if (wxUSE_PROTOCOL_HTTP) && (wxLUA_USE_wxSocket) + // static void SetDefaultProxy(const wxString& url_proxy) + static int LUACALL wxLua_wxURL_SetDefaultProxy(lua_State *L) + { + wxLuaState wxlState(L); + // const wxString url_proxy + const wxString url_proxy = lua2wx(wxlState.GetStringType(2)); + // call SetDefaultProxy + wxURL::SetDefaultProxy(url_proxy); + + return 0; + } + + // void SetProxy(const wxString& url_proxy) + static int LUACALL wxLua_wxURL_SetProxy(lua_State *L) + { + wxLuaState wxlState(L); + // const wxString url_proxy + const wxString url_proxy = lua2wx(wxlState.GetStringType(2)); + // get this + wxURL * self = (wxURL *)wxlState.GetUserDataType(1, s_wxluatag_wxURL); + // call SetProxy + self->SetProxy(url_proxy); + + return 0; + } + + #endif + + // wxURL(const wxString& sUrl) + static int LUACALL wxLua_wxURL_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxURL *returns; + // const wxString sUrl + const wxString sUrl = lua2wx(wxlState.GetStringType(1)); + // call constructor + returns = new wxURL(sUrl); + // add to tracked window list + if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) + wxlState.AddToTrackedWindowList((wxWindow*)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxURL, returns); + + return 1; + } + + // %constructor wxURLFromURI(const wxURI& url) + static int LUACALL wxLua_wxURLFromURI_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxURL *returns; + // const wxURI url + const wxURI * url = (const wxURI *)wxlState.GetUserDataType(1, s_wxluatag_wxURI); + // call constructor + returns = new wxURL(*url); + // add to tracked window list + if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) + wxlState.AddToTrackedWindowList((wxWindow*)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxURL, returns); + + return 1; + } + + // wxProtocol& GetProtocol() + static int LUACALL wxLua_wxURL_GetProtocol(lua_State *L) + { + wxLuaState wxlState(L); + wxProtocol *returns; + // get this + wxURL * self = (wxURL *)wxlState.GetUserDataType(1, s_wxluatag_wxURL); + // call GetProtocol + returns = &self->GetProtocol(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxProtocol, returns); + + return 1; + } + + // wxURLError GetError() const + static int LUACALL wxLua_wxURL_GetError(lua_State *L) + { + wxLuaState wxlState(L); + wxURLError returns; + // get this + wxURL * self = (wxURL *)wxlState.GetUserDataType(1, s_wxluatag_wxURL); + // call GetError + returns = self->GetError(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxString GetURL() const + static int LUACALL wxLua_wxURL_GetURL(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxURL * self = (wxURL *)wxlState.GetUserDataType(1, s_wxluatag_wxURL); + // call GetURL + returns = self->GetURL(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + + static int LUACALL wxLua_wxURL_destructor(lua_State *) + { + return 0; + } + + + + + + // Map Lua Class Methods to C Binding Functions + static WXLUAMETHOD s_wxURL_methods[] = { + + #if (wxLUA_USE_wxSocket) && (wxUSE_STREAMS) + { LuaMethod, "GetInputStream", wxLua_wxURL_GetInputStream, 0, 0, { 0 } }, + #endif + + + #if (wxUSE_PROTOCOL_HTTP) && (wxLUA_USE_wxSocket) + { LuaMethod, "SetDefaultProxy", wxLua_wxURL_SetDefaultProxy, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetProxy", wxLua_wxURL_SetProxy, 1, 1, { &s_wxluaarg_String, 0 } }, + #endif + + { LuaConstructor, "wxURL", wxLua_wxURL_constructor, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaConstructor, "wxURLFromURI", wxLua_wxURLFromURI_constructor, 1, 1, { &s_wxluatag_wxURI, 0 } }, + { LuaMethod, "GetProtocol", wxLua_wxURL_GetProtocol, 0, 0, { 0 } }, + { LuaMethod, "GetError", wxLua_wxURL_GetError, 0, 0, { 0 } }, + { LuaMethod, "GetURL", wxLua_wxURL_GetURL, 0, 0, { 0 } }, + { LuaDelete, "wxURL", wxLua_wxURL_destructor, 0, 0, {0} }, + }; + + // Extern accessor to class method map + WXLUAMETHOD* wxURL_methods = s_wxURL_methods; + int wxURL_methodCount = sizeof(s_wxURL_methods)/sizeof(s_wxURL_methods[0]); + #endif + Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** defsutil.cpp 16 May 2006 04:55:33 -0000 1.14 --- defsutil.cpp 16 May 2006 22:47:09 -0000 1.15 *************** *** 727,731 **** #if wxLUA_USE_wxCursor ! // wxBusyCursor(const wxCursor* cursor = wxHOURGLASS_CURSOR) static int LUACALL wxLua_wxBusyCursor_constructor(lua_State *L) { --- 727,732 ---- #if wxLUA_USE_wxCursor ! // %override wxLua_wxBusyCursor_constructor ! // wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) static int LUACALL wxLua_wxBusyCursor_constructor(lua_State *L) { *************** *** 735,739 **** int argCount = lua_gettop(L); // const wxCursor cursor = wxHOURGLASS_CURSOR ! const wxCursor * cursor = (argCount >= 1 ? (const wxCursor *)wxlState.GetUserDataType(1, s_wxluatag_wxCursor) : wxHOURGLASS_CURSOR); // call constructor returns = new wxBusyCursor(cursor); --- 736,742 ---- int argCount = lua_gettop(L); // const wxCursor cursor = wxHOURGLASS_CURSOR ! ! // NOTE: gcc complains that wxHOURGLASS_CURSOR is const, if changed to const MSVC complains wxBusyCursor takes non const ! wxCursor * cursor = (argCount >= 1 ? (wxCursor *)wxlState.GetUserDataType(1, s_wxluatag_wxCursor) : (wxCursor*)wxHOURGLASS_CURSOR); // call constructor returns = new wxBusyCursor(cursor); Index: wave.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wave.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wave.cpp 13 May 2006 17:20:52 -0000 1.12 --- wave.cpp 16 May 2006 22:47:09 -0000 1.13 *************** *** 406,407 **** --- 406,824 ---- #endif + + #if (wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave) + // ------------------------------------------------------------------------------------------------- + // Bind class wxMediaCtrl + // ------------------------------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class + int s_wxluatag_wxMediaCtrl = -1; + + + #if (((wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave)) && (wxLUA_USE_wxValidator)) && (wxLUA_USE_wxPointSizeRect) + // wxMediaCtrl( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) + static int LUACALL wxLua_wxMediaCtrl_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxMediaCtrl *returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString name = "wxMediaCtrl" + const wxString name = (argCount >= 9 ? lua2wx(wxlState.GetStringType(9)) : wxString(wxT("wxMediaCtrl"))); + // const wxValidator val = wxDefaultValidator + const wxValidator * val = (argCount >= 8 ? (const wxValidator *)wxlState.GetUserDataType(8, s_wxluatag_wxValidator) : &wxDefaultValidator); + // const wxString szBackend = "" + const wxString szBackend = (argCount >= 7 ? lua2wx(wxlState.GetStringType(7)) : wxString(wxEmptyString)); + // long style = 0 + long style = (argCount >= 6 ? (long)wxlState.GetNumberType(6) : 0); + // const wxSize size = wxDefaultSize + const wxSize * size = (argCount >= 5 ? (const wxSize *)wxlState.GetUserDataType(5, s_wxluatag_wxSize) : &wxDefaultSize); + // const wxPoint pos = wxDefaultPosition + const wxPoint * pos = (argCount >= 4 ? (const wxPoint *)wxlState.GetUserDataType(4, s_wxluatag_wxPoint) : &wxDefaultPosition); + // const wxString fileName = "" + const wxString fileName = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); + // wxWindowID winid + wxWindowID winid = (wxWindowID)wxlState.GetNumberType(2); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxWindow); + // call constructor + returns = new wxMediaCtrl(parent, winid, fileName, *pos, *size, style, szBackend, *val, name); + // add to tracked window list + if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) + wxlState.AddToTrackedWindowList((wxWindow*)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxMediaCtrl, returns); + + return 1; + } + + // bool Create( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) + static int LUACALL wxLua_wxMediaCtrl_Create(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString name = "wxMediaCtrl" + const wxString name = (argCount >= 10 ? lua2wx(wxlState.GetStringType(10)) : wxString(wxT("wxMediaCtrl"))); + // const wxValidator val = wxDefaultValidator + const wxValidator * val = (argCount >= 9 ? (const wxValidator *)wxlState.GetUserDataType(9, s_wxluatag_wxValidator) : &wxDefaultValidator); + // const wxString szBackend = "" + const wxString szBackend = (argCount >= 8 ? lua2wx(wxlState.GetStringType(8)) : wxString(wxEmptyString)); + // long style = 0 + long style = (argCount >= 7 ? (long)wxlState.GetNumberType(7) : 0); + // const wxSize size = wxDefaultSize + const wxSize * size = (argCount >= 6 ? (const wxSize *)wxlState.GetUserDataType(6, s_wxluatag_wxSize) : &wxDefaultSize); + // const wxPoint pos = wxDefaultPosition + const wxPoint * pos = (argCount >= 5 ? (const wxPoint *)wxlState.GetUserDataType(5, s_wxluatag_wxPoint) : &wxDefaultPosition); + // const wxString fileName = "" + const wxString fileName = (argCount >= 4 ? lua2wx(wxlState.GetStringType(4)) : wxString(wxEmptyString)); + // wxWindowID winid + wxWindowID winid = (wxWindowID)wxlState.GetNumberType(3); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call Create + returns = self->Create(parent, winid, fileName, *pos, *size, style, szBackend, *val, name); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif + + + #if (wxLUA_USE_wxFile) && ((wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave)) + // wxFileOffset Seek(wxFileOffset where, wxSeekMode mode) + static int LUACALL wxLua_wxMediaCtrl_Seek(lua_State *L) + { + wxLuaState wxlState(L); + wxFileOffset returns; + // wxSeekMode mode + wxSeekMode mode = (wxSeekMode)wxlState.GetEnumerationType(3); + // wxFileOffset where + wxFileOffset where = (wxFileOffset)wxlState.GetNumberType(2); + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call Seek + returns = self->Seek(where, mode); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif + + // %constructor wxMediaCtrlDefault() + static int LUACALL wxLua_wxMediaCtrlDefault_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxMediaCtrl *returns; + // call constructor + returns = new wxMediaCtrl(); + // add to tracked window list + if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) + wxlState.AddToTrackedWindowList((wxWindow*)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxMediaCtrl, returns); + + return 1; + } + + // wxFileOffset GetDownloadProgress() + static int LUACALL wxLua_wxMediaCtrl_GetDownloadProgress(lua_State *L) + { + wxLuaState wxlState(L); + wxFileOffset returns; + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call GetDownloadProgress + returns = self->GetDownloadProgress(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxFileOffset GetDownloadTotal() + static int LUACALL wxLua_wxMediaCtrl_GetDownloadTotal(lua_State *L) + { + wxLuaState wxlState(L); + wxFileOffset returns; + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call GetDownloadTotal + returns = self->GetDownloadTotal(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxMediaState GetState() + static int LUACALL wxLua_wxMediaCtrl_GetState(lua_State *L) + { + wxLuaState wxlState(L); + wxMediaState returns; + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call GetState + returns = self->GetState(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // bool Load(const wxString& fileName) + static int LUACALL wxLua_wxMediaCtrl_Load(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxString fileName + const wxString fileName = lua2wx(wxlState.GetStringType(2)); + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call Load + returns = self->Load(fileName); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool Pause() + static int LUACALL wxLua_wxMediaCtrl_Pause(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call Pause + returns = self->Pause(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool Play() + static int LUACALL wxLua_wxMediaCtrl_Play(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call Play + returns = self->Play(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool Stop() + static int LUACALL wxLua_wxMediaCtrl_Stop(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call Stop + returns = self->Stop(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // bool SetVolume(double dVolume) + static int LUACALL wxLua_wxMediaCtrl_SetVolume(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // double dVolume + double dVolume = (double)wxlState.GetNumberType(2); + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call SetVolume + returns = self->SetVolume(dVolume); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // double GetVolume() + static int LUACALL wxLua_wxMediaCtrl_GetVolume(lua_State *L) + { + wxLuaState wxlState(L); + double returns; + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call GetVolume + returns = self->GetVolume(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // bool ShowPlayerControls(wxMediaCtrlPlayerControls flags) + static int LUACALL wxLua_wxMediaCtrl_ShowPlayerControls(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // wxMediaCtrlPlayerControls flags + wxMediaCtrlPlayerControls flags = (wxMediaCtrlPlayerControls)wxlState.GetEnumerationType(2); + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call ShowPlayerControls + returns = self->ShowPlayerControls(flags); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static int LUACALL wxLua_wxMediaCtrl_destructor(lua_State *) + { + return 0; + } + + + #if (wxLUA_USE_wxSocket) && ((wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave)) + // %rename LoadFromURI bool Load(const wxURI& location) + static int LUACALL wxLua_wxMediaCtrl_LoadFromURI(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxURI location + const wxURI * location = (const wxURI *)wxlState.GetUserDataType(2, s_wxluatag_wxURI); + // get this + wxMediaCtrl * self = (wxMediaCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaCtrl); + // call Load + returns = self->Load(*location); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif + + + + + + // Map Lua Class Methods to C Binding Functions + static WXLUAMETHOD s_wxMediaCtrl_methods[] = { + + #if (((wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave)) && (wxLUA_USE_wxValidator)) && (wxLUA_USE_wxPointSizeRect) + { LuaConstructor, "wxMediaCtrl", wxLua_wxMediaCtrl_constructor, 9, 2, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxValidator, &s_wxluaarg_String, 0 } }, + { LuaMethod, "Create", wxLua_wxMediaCtrl_Create, 9, 2, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxValidator, &s_wxluaarg_String, 0 } }, + #endif + + + #if (wxLUA_USE_wxFile) && ((wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave)) + { LuaMethod, "Seek", wxLua_wxMediaCtrl_Seek, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Enumeration, 0 } }, + #endif + + { LuaConstructor, "wxMediaCtrlDefault", wxLua_wxMediaCtrlDefault_constructor, 0, 0, { 0 } }, + { LuaMethod, "GetDownloadProgress", wxLua_wxMediaCtrl_GetDownloadProgress, 0, 0, { 0 } }, + { LuaMethod, "GetDownloadTotal", wxLua_wxMediaCtrl_GetDownloadTotal, 0, 0, { 0 } }, + { LuaMethod, "GetState", wxLua_wxMediaCtrl_GetState, 0, 0, { 0 } }, + { LuaMethod, "Load", wxLua_wxMediaCtrl_Load, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "Pause", wxLua_wxMediaCtrl_Pause, 0, 0, { 0 } }, + { LuaMethod, "Play", wxLua_wxMediaCtrl_Play, 0, 0, { 0 } }, + { LuaMethod, "Stop", wxLua_wxMediaCtrl_Stop, 0, 0, { 0 } }, + { LuaMethod, "SetVolume", wxLua_wxMediaCtrl_SetVolume, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "GetVolume", wxLua_wxMediaCtrl_GetVolume, 0, 0, { 0 } }, + { LuaMethod, "ShowPlayerControls", wxLua_wxMediaCtrl_ShowPlayerControls, 1, 1, { &s_wxluaarg_Enumeration, 0 } }, + { LuaDelete, "wxMediaCtrl", wxLua_wxMediaCtrl_destructor, 0, 0, {0} }, + + #if (wxLUA_USE_wxSocket) && ((wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave)) + { LuaMethod, "LoadFromURI", wxLua_wxMediaCtrl_LoadFromURI, 1, 1, { &s_wxluatag_wxURI, 0 } }, + #endif + + }; + + // Extern accessor to class method map + WXLUAMETHOD* wxMediaCtrl_methods = s_wxMediaCtrl_methods; + int wxMediaCtrl_methodCount = sizeof(s_wxMediaCtrl_methods)/sizeof(s_wxMediaCtrl_methods[0]); + #endif + + + #if (wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL) && (wxLUA_USE_wxWave) + // ------------------------------------------------------------------------------------------------- + // Bind class wxMediaEvent + // ------------------------------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class + int s_wxluatag_wxMediaEvent = -1; + + // wxMediaEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + static int LUACALL wxLua_wxMediaEvent_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxMediaEvent *returns; + // get number of arguments + int argCount = lua_gettop(L); + // int winid = 0 + int winid = (argCount >= 2 ? (int)wxlState.GetNumberType(2) : 0); + // wxEventType commandType = wxEVT_NULL + wxEventType commandType = (argCount >= 1 ? (wxEventType)wxlState.GetNumberType(1) : wxEVT_NULL); + // call constructor + returns = new wxMediaEvent(commandType, winid); + // add to tracked memory list + wxLua_AddToTrackedMemoryList(wxlState, (wxMediaEvent *)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxMediaEvent, returns); + + return 1; + } + + static int LUACALL wxLua_wxMediaEvent_destructor(lua_State *L) + { + wxLuaState wxlState(L); + wxMediaEvent * self = (wxMediaEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaEvent); + + // remove from tracked memory list + if (self != 0) + wxlState.RemoveTrackedMemory(self); + return 0; + } + + static int LUACALL wxLua_wxMediaEvent_Delete(lua_State *L) + { + wxLuaState wxlState(L); + wxMediaEvent * self = (wxMediaEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxMediaEvent); + // remove from tracked memory list + if (self != 0) + if (wxlState.RemoveTrackedMemory(self)) + { // if removed, reset the tag so that gc() is not called on this object. + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + + + + + + // Map Lua Class Methods to C Binding Functions + static WXLUAMETHOD s_wxMediaEvent_methods[] = { + { LuaConstructor, "wxMediaEvent", wxLua_wxMediaEvent_constructor, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, + { LuaDelete, "wxMediaEvent", wxLua_wxMediaEvent_destructor, 0, 0, {0} }, + { LuaMethod, "Delete", wxLua_wxMediaEvent_Delete, 0, 0, {0} }, + }; + + // Extern accessor to class method map + WXLUAMETHOD* wxMediaEvent_methods = s_wxMediaEvent_methods; + int wxMediaEvent_methodCount = sizeof(s_wxMediaEvent_methods)/sizeof(s_wxMediaEvent_methods[0]); + #endif + |