X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..e328812d748d2db49440a5fcf3ef9d3a49edbd56:/wxPython/contrib/glcanvas/glcanvas.i?ds=sidebyside diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index 826f0c071f..a8f7da4d85 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -11,7 +11,11 @@ ///////////////////////////////////////////////////////////////////////////// -%module glcanvas +%define DOCSTRING +"`GLCanvas` provides an OpenGL Context on a `wx.Window`." +%enddef + +%module(package="wx", docstring=DOCSTRING) glcanvas %{ #include "wx/wxPython/wxPython.h" @@ -19,14 +23,18 @@ #include - static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas")); - static const wxString wxPyEmptyString(wxT("")); %} //--------------------------------------------------------------------------- %import core.i -%pythoncode { wx = core } +%pythoncode { wx = _core } +%pythoncode { __docfilter__ = wx.__DocFilter(globals()) } + + +MAKE_CONST_WXSTRING2(GLCanvasNameStr, wxT("GLCanvas")); +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); + %include _glcanvas_rename.i @@ -36,6 +44,8 @@ class wxPalette; //--------------------------------------------------------------------------- +MustHaveApp(wxGLContext); + class wxGLContext : public wxObject { public: #ifndef __WXMAC__ @@ -111,9 +121,11 @@ enum { +MustHaveApp(wxGLCanvas); + class wxGLCanvas : public wxWindow { public: - %addtofunc wxGLCanvas "self._setOORInfo(self)" + %pythonAppend wxGLCanvas "self._setOORInfo(self)" wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -121,8 +133,8 @@ public: int *attribList = NULL, const wxPalette& palette = wxNullPalette); - %addtofunc wxGLCanvas "val._setOORInfo(val)" - %name(wxGLCanvasWithContext) + %pythonAppend wxGLCanvas "val._setOORInfo(val)" + %RenameCtor(GLCanvasWithContext, wxGLCanvas( wxWindow *parent, const wxGLContext *shared = NULL, wxWindowID id = -1, @@ -131,7 +143,7 @@ public: long style = 0, const wxString& name = wxPyGLCanvasNameStr, int *attribList = NULL, - const wxPalette& palette = wxNullPalette ); + const wxPalette& palette = wxNullPalette )); void SetCurrent();