From: John L. <jr...@us...> - 2006-12-23 05:58:19
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16521/wxLua/modules/wxbind/src Modified Files: gdi.cpp Log Message: update wxGLXXX for 2.8 Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** gdi.cpp 19 Dec 2006 06:18:02 -0000 1.40 --- gdi.cpp 23 Dec 2006 05:58:15 -0000 1.41 *************** *** 10413,10419 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLCanvasFromCCanvas_constructor[] = { &s_wxluatag_wxWindow, &s_wxluatag_wxGLCanvas, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxPalette, 0 }; ! // %constructor wxGLCanvasFromCCanvas wxGLCanvas(wxWindow* parent, wxGLCanvas* sharedCanvas, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=0, const wxString& name="wxGLCanvas", int attribList[] = 0, const wxPalette& palette = wxNullPalette) ! static int LUACALL wxLua_wxGLCanvasFromCCanvas_constructor(lua_State *L) { wxLuaState wxlState(L); --- 10413,10419 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLCanvasFromCanvas_constructor[] = { &s_wxluatag_wxWindow, &s_wxluatag_wxGLCanvas, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxPalette, 0 }; ! // %constructor wxGLCanvasFromCanvas wxGLCanvas(wxWindow* parent, wxGLCanvas* sharedCanvas, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=0, const wxString& name="wxGLCanvas", int attribList[] = 0, const wxPalette& palette = wxNullPalette) ! static int LUACALL wxLua_wxGLCanvasFromCanvas_constructor(lua_State *L) { wxLuaState wxlState(L); *************** *** 10452,10457 **** #endif // ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette)) && (wxLUA_USE_wxPointSizeRect) static wxLuaArgTag s_wxluatagArray_wxLua_wxGLCanvas_GetContext[] = { 0 }; ! // wxGLContext* GetContext() static int LUACALL wxLua_wxGLCanvas_GetContext(lua_State *L) { --- 10452,10476 ---- #endif // ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette)) && (wxLUA_USE_wxPointSizeRect) + + #if (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) + static wxLuaArgTag s_wxluatagArray_wxLua_wxGLCanvas_SetCurrent[] = { &s_wxluatag_wxGLContext, 0 }; + // %wxchkver28 void SetCurrent(const wxGLContext& RC) const + static int LUACALL wxLua_wxGLCanvas_SetCurrent(lua_State *L) + { + wxLuaState wxlState(L); + // const wxGLContext RC + const wxGLContext * RC = (const wxGLContext *)wxlState.GetUserDataType(2, s_wxluatag_wxGLContext); + // get this + wxGLCanvas * self = (wxGLCanvas *)wxlState.GetUserDataType(1, s_wxluatag_wxGLCanvas); + // call SetCurrent + self->SetCurrent(*RC); + + return 0; + } + + #endif // (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) + static wxLuaArgTag s_wxluatagArray_wxLua_wxGLCanvas_GetContext[] = { 0 }; ! // wxGLContext* GetContext() const static int LUACALL wxLua_wxGLCanvas_GetContext(lua_State *L) { *************** *** 10524,10530 **** { LuaConstructor, "wxGLCanvas", wxLua_wxGLCanvas_constructor, 8, 1, s_wxluatagArray_wxLua_wxGLCanvas_constructor }, { LuaConstructor, "wxGLCanvasFromContext", wxLua_wxGLCanvasFromContext_constructor, 9, 2, s_wxluatagArray_wxLua_wxGLCanvasFromContext_constructor }, ! { LuaConstructor, "wxGLCanvasFromCCanvas", wxLua_wxGLCanvasFromCCanvas_constructor, 9, 2, s_wxluatagArray_wxLua_wxGLCanvasFromCCanvas_constructor }, #endif // ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette)) && (wxLUA_USE_wxPointSizeRect) { LuaMethod, "GetContext", wxLua_wxGLCanvas_GetContext, 0, 0, s_wxluatagArray_wxLua_wxGLCanvas_GetContext }, { LuaMethod, "SetCurrent", wxLua_wxGLCanvas_SetCurrent, 0, 0, s_wxluatagArray_wxLua_wxGLCanvas_SetCurrent }, --- 10543,10554 ---- { LuaConstructor, "wxGLCanvas", wxLua_wxGLCanvas_constructor, 8, 1, s_wxluatagArray_wxLua_wxGLCanvas_constructor }, { LuaConstructor, "wxGLCanvasFromContext", wxLua_wxGLCanvasFromContext_constructor, 9, 2, s_wxluatagArray_wxLua_wxGLCanvasFromContext_constructor }, ! { LuaConstructor, "wxGLCanvasFromCanvas", wxLua_wxGLCanvasFromCanvas_constructor, 9, 2, s_wxluatagArray_wxLua_wxGLCanvasFromCanvas_constructor }, #endif // ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette)) && (wxLUA_USE_wxPointSizeRect) + + #if (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) + { LuaMethod, "SetCurrent", wxLua_wxGLCanvas_SetCurrent, 1, 1, s_wxluatagArray_wxLua_wxGLCanvas_SetCurrent }, + #endif // (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) + { LuaMethod, "GetContext", wxLua_wxGLCanvas_GetContext, 0, 0, s_wxluatagArray_wxLua_wxGLCanvas_GetContext }, { LuaMethod, "SetCurrent", wxLua_wxGLCanvas_SetCurrent, 0, 0, s_wxluatagArray_wxLua_wxGLCanvas_SetCurrent }, *************** *** 10547,10553 **** ! #if (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette) static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_constructor[] = { &s_wxluaarg_Boolean, &s_wxluatag_wxGLCanvas, &s_wxluatag_wxPalette, 0 }; ! // wxGLContext(bool isRGB, wxGLCanvas* win, const wxPalette& palette = wxNullPalette) static int LUACALL wxLua_wxGLContext_constructor(lua_State *L) { --- 10571,10638 ---- ! #if (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_GetWindow[] = { 0 }; ! // !%wxchkver28 const wxWindow* GetWindow() ! static int LUACALL wxLua_wxGLContext_GetWindow(lua_State *L) ! { ! wxLuaState wxlState(L); ! const wxWindow *returns; ! // get this ! wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); ! // call GetWindow ! returns = self->GetWindow(); ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxWindow, returns); ! ! return 1; ! } ! ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_SetCurrent[] = { 0 }; ! // !%wxchkver28 void SetCurrent() ! static int LUACALL wxLua_wxGLContext_SetCurrent(lua_State *L) ! { ! wxLuaState wxlState(L); ! // get this ! wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); ! // call SetCurrent ! self->SetCurrent(); ! ! return 0; ! } ! ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_SetColour[] = { &s_wxluaarg_String, 0 }; ! // !%wxchkver28 void SetColour(const wxString& colour) ! static int LUACALL wxLua_wxGLContext_SetColour(lua_State *L) ! { ! wxLuaState wxlState(L); ! // const wxString colour ! const wxString colour = lua2wx(wxlState.GetStringType(2)); ! // get this ! wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); ! // call SetColour ! self->SetColour(colour); ! ! return 0; ! } ! ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_SwapBuffers[] = { 0 }; ! // !%wxchkver28 void SwapBuffers() ! static int LUACALL wxLua_wxGLContext_SwapBuffers(lua_State *L) ! { ! wxLuaState wxlState(L); ! // get this ! wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); ! // call SwapBuffers ! self->SwapBuffers(); ! ! return 0; ! } ! ! #endif // (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) ! ! ! #if ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS))) && (wxLUA_USE_wxPalette) static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_constructor[] = { &s_wxluaarg_Boolean, &s_wxluatag_wxGLCanvas, &s_wxluatag_wxPalette, 0 }; ! // !%wxchkver28 wxGLContext(bool isRGB, wxGLCanvas* win, const wxPalette& palette = wxNullPalette) static int LUACALL wxLua_wxGLContext_constructor(lua_State *L) { *************** *** 10574,10578 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContextOther_constructor[] = { &s_wxluaarg_Boolean, &s_wxluatag_wxGLCanvas, &s_wxluatag_wxPalette, &s_wxluatag_wxGLContext, 0 }; ! // %constructor wxGLContextOther wxGLContext(bool isRGB, wxGLCanvas* win, const wxPalette& palette = wxNullPalette, const wxGLContext* other) static int LUACALL wxLua_wxGLContextOther_constructor(lua_State *L) { --- 10659,10663 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContextOther_constructor[] = { &s_wxluaarg_Boolean, &s_wxluatag_wxGLCanvas, &s_wxluatag_wxPalette, &s_wxluatag_wxGLContext, 0 }; ! // !%wxchkver28 %constructor wxGLContextOther wxGLContext(bool isRGB, wxGLCanvas* win, const wxPalette& palette = wxNullPalette, const wxGLContext* other) static int LUACALL wxLua_wxGLContextOther_constructor(lua_State *L) { *************** *** 10600,10661 **** } ! #endif // (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_GetWindow[] = { 0 }; ! // const wxWindow* GetWindow() ! static int LUACALL wxLua_wxGLContext_GetWindow(lua_State *L) { wxLuaState wxlState(L); ! const wxWindow *returns; ! // get this ! wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); ! // call GetWindow ! returns = self->GetWindow(); ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxWindow, returns); return 1; } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_SetCurrent[] = { 0 }; ! // void SetCurrent() static int LUACALL wxLua_wxGLContext_SetCurrent(lua_State *L) { wxLuaState wxlState(L); // get this wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); // call SetCurrent ! self->SetCurrent(); ! ! return 0; ! } ! ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_SetColour[] = { &s_wxluaarg_String, 0 }; ! // void SetColour(const wxString& colour) ! static int LUACALL wxLua_wxGLContext_SetColour(lua_State *L) ! { ! wxLuaState wxlState(L); ! // const wxString colour ! const wxString colour = lua2wx(wxlState.GetStringType(2)); ! // get this ! wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); ! // call SetColour ! self->SetColour(colour); return 0; } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_SwapBuffers[] = { 0 }; ! // void SwapBuffers() ! static int LUACALL wxLua_wxGLContext_SwapBuffers(lua_State *L) ! { ! wxLuaState wxlState(L); ! // get this ! wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); ! // call SwapBuffers ! self->SwapBuffers(); ! ! return 0; ! } static int LUACALL wxLua_wxGLContext_destructor(lua_State *) --- 10685,10731 ---- } ! #endif // ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS))) && (wxLUA_USE_wxPalette) ! ! #if (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_constructor[] = { &s_wxluatag_wxGLCanvas, &s_wxluatag_wxGLContext, 0 }; ! // %wxchkver28 wxGLContext(wxGLCanvas *win, const wxGLContext* other = NULL ) ! static int LUACALL wxLua_wxGLContext_constructor(lua_State *L) { wxLuaState wxlState(L); ! wxGLContext *returns; ! // get number of arguments ! int argCount = lua_gettop(L); ! // const wxGLContext other = NULL ! const wxGLContext * other = (argCount >= 2 ? (const wxGLContext *)wxlState.GetUserDataType(2, s_wxluatag_wxGLContext) : NULL); ! // wxGLCanvas win ! wxGLCanvas * win = (wxGLCanvas *)wxlState.GetUserDataType(1, s_wxluatag_wxGLCanvas); ! // call constructor ! returns = new wxGLContext(win, other); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxGLContext, returns); return 1; } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLContext_SetCurrent[] = { &s_wxluatag_wxGLCanvas, 0 }; ! // %wxchkver28 void SetCurrent(const wxGLCanvas& win) const static int LUACALL wxLua_wxGLContext_SetCurrent(lua_State *L) { wxLuaState wxlState(L); + // const wxGLCanvas win + const wxGLCanvas * win = (const wxGLCanvas *)wxlState.GetUserDataType(2, s_wxluatag_wxGLCanvas); // get this wxGLContext * self = (wxGLContext *)wxlState.GetUserDataType(1, s_wxluatag_wxGLContext); // call SetCurrent ! self->SetCurrent(*win); return 0; } ! #endif // (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) static int LUACALL wxLua_wxGLContext_destructor(lua_State *) *************** *** 10671,10683 **** WXLUAMETHOD wxGLContext_methods[] = { ! #if (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette) ! { LuaConstructor, "wxGLContext", wxLua_wxGLContext_constructor, 3, 2, s_wxluatagArray_wxLua_wxGLContext_constructor }, ! { LuaConstructor, "wxGLContextOther", wxLua_wxGLContextOther_constructor, 4, 3, s_wxluatagArray_wxLua_wxGLContextOther_constructor }, ! #endif // (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && (wxLUA_USE_wxPalette) ! { LuaMethod, "GetWindow", wxLua_wxGLContext_GetWindow, 0, 0, s_wxluatagArray_wxLua_wxGLContext_GetWindow }, { LuaMethod, "SetCurrent", wxLua_wxGLContext_SetCurrent, 0, 0, s_wxluatagArray_wxLua_wxGLContext_SetCurrent }, { LuaMethod, "SetColour", wxLua_wxGLContext_SetColour, 1, 1, s_wxluatagArray_wxLua_wxGLContext_SetColour }, { LuaMethod, "SwapBuffers", wxLua_wxGLContext_SwapBuffers, 0, 0, s_wxluatagArray_wxLua_wxGLContext_SwapBuffers }, { LuaDelete, "wxGLContext", wxLua_wxGLContext_destructor, 0, 0, s_wxluaargArray_None }, }; --- 10741,10763 ---- WXLUAMETHOD wxGLContext_methods[] = { ! #if (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) { LuaMethod, "GetWindow", wxLua_wxGLContext_GetWindow, 0, 0, s_wxluatagArray_wxLua_wxGLContext_GetWindow }, { LuaMethod, "SetCurrent", wxLua_wxGLContext_SetCurrent, 0, 0, s_wxluatagArray_wxLua_wxGLContext_SetCurrent }, { LuaMethod, "SetColour", wxLua_wxGLContext_SetColour, 1, 1, s_wxluatagArray_wxLua_wxGLContext_SetColour }, { LuaMethod, "SwapBuffers", wxLua_wxGLContext_SwapBuffers, 0, 0, s_wxluatagArray_wxLua_wxGLContext_SwapBuffers }, + #endif // (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) + + + #if ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS))) && (wxLUA_USE_wxPalette) + { LuaConstructor, "wxGLContext", wxLua_wxGLContext_constructor, 3, 2, s_wxluatagArray_wxLua_wxGLContext_constructor }, + { LuaConstructor, "wxGLContextOther", wxLua_wxGLContextOther_constructor, 4, 3, s_wxluatagArray_wxLua_wxGLContextOther_constructor }, + #endif // ((wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS))) && (wxLUA_USE_wxPalette) + + + #if (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) + { LuaConstructor, "wxGLContext", wxLua_wxGLContext_constructor, 2, 1, s_wxluatagArray_wxLua_wxGLContext_constructor }, + { LuaMethod, "SetCurrent", wxLua_wxGLContext_SetCurrent, 1, 1, s_wxluatagArray_wxLua_wxGLContext_SetCurrent }, + #endif // (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxGLCanvas && wxUSE_GLCANVAS)) + { LuaDelete, "wxGLContext", wxLua_wxGLContext_destructor, 0, 0, s_wxluaargArray_None }, }; |