1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions for the OpenGL wxWindows classes
7 // Created: 15-Mar-1999
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include "myglcanvas.h"
21 //---------------------------------------------------------------------------
24 %include my_typemaps.i
38 %pragma(python) code = "import wx"
40 //---------------------------------------------------------------------------
48 //---------------------------------------------------------------------------
52 wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette);
56 void SetColour(const char *colour);
60 void SetupPixelFormat();
61 void SetupPalette(const wxPalette& palette);
62 wxPalette CreateDefaultPalette();
63 wxPalette* GetPalette();
66 wxWindow* GetWindow();
69 //---------------------------------------------------------------------------
71 %typemap(python, in) int *attribList (int *temp) {
73 if (PySequence_Check($source)) {
74 int size = PyObject_Length($source);
75 temp = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
76 for (i = 0; i < size; i++) {
77 temp[i] = PyInt_AsLong(PySequence_GetItem($source, i));
84 %typemap(python, freearg) int *attribList
91 class wxGLCanvas : public wxScrolledWindow {
93 wxGLCanvas(wxWindow *parent, wxWindowID id = -1,
94 const wxPoint& pos = wxDefaultPosition,
95 const wxSize& size = wxDefaultSize, long style = 0,
96 const char* name = "GLCanvas",
97 int *attribList = NULL,
98 const wxPalette& palette = wxNullPalette);
100 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
103 void SetColour(const char *colour);
106 wxGLContext* GetContext();
110 //---------------------------------------------------------------------------
114 wxClassInfo::CleanUpClasses();
115 wxClassInfo::InitializeClasses();
119 //---------------------------------------------------------------------------
120 //---------------------------------------------------------------------------