X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1f7d2aa9cb1857cf87e105ebbd36a92676bbde..b483f5fed274a9152faab05b0ebb4e5f5158c506:/wxPython/contrib/glcanvas/glcanvas.i?ds=sidebyside diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index ab3dd14b29..77d209a58e 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -14,7 +14,8 @@ %define DOCSTRING "`GLCanvas` provides an OpenGL Context on a `wx.Window`." %enddef -%module(docstring=DOCSTRING) glcanvas + +%module(package="wx", docstring=DOCSTRING) glcanvas %{ #include "wx/wxPython/wxPython.h" @@ -34,9 +35,6 @@ MAKE_CONST_WXSTRING2(GLCanvasNameStr, wxT("GLCanvas")); MAKE_CONST_WXSTRING_NOSWIG(EmptyString); - -%include _glcanvas_rename.i - //--------------------------------------------------------------------------- class wxPalette; @@ -48,9 +46,7 @@ MustHaveApp(wxGLContext); class wxGLContext : public wxObject { public: #ifndef __WXMAC__ - wxGLContext(bool isRGB, wxGLCanvas *win, - const wxPalette& palette = wxNullPalette, - const wxGLContext* other = NULL); + wxGLContext(wxGLCanvas *win, const wxGLContext* other = NULL); #else %extend { wxGLContext(bool isRGB, wxGLCanvas *win, @@ -64,18 +60,9 @@ public: #endif ~wxGLContext(); - void SetCurrent(); - void SetColour(const wxString& colour); - void SwapBuffers(); - -#ifdef __WXGTK__ - void SetupPixelFormat(); - void SetupPalette(const wxPalette& palette); - wxPalette CreateDefaultPalette(); - wxPalette* GetPalette(); +#ifndef __WXMAC__ + void SetCurrent(const wxGLCanvas& win); #endif - - wxWindow* GetWindow(); }; //--------------------------------------------------------------------------- @@ -133,7 +120,7 @@ public: const wxPalette& palette = wxNullPalette); %pythonAppend wxGLCanvas "val._setOORInfo(val)" - %name(GLCanvasWithContext) + %RenameCtor(GLCanvasWithContext, wxGLCanvas( wxWindow *parent, const wxGLContext *shared = NULL, wxWindowID id = -1, @@ -142,10 +129,13 @@ public: long style = 0, const wxString& name = wxPyGLCanvasNameStr, int *attribList = NULL, - const wxPalette& palette = wxNullPalette ); - + const wxPalette& palette = wxNullPalette )); + %nokwargs SetCurrent; void SetCurrent(); +#ifndef __WXMAC__ + void SetCurrent(const wxGLContext& RC); +#endif void SetColour(const wxString& colour); void SwapBuffers(); @@ -157,6 +147,8 @@ public: wxPalette CreateDefaultPalette(); wxPalette* GetPalette(); #endif + + %property(Context, GetContext, doc="See `GetContext`"); };