]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/modules/glcanvas/glcanvas.i
Removed all non wx stuff from the glcanvas module since DA's PyOpenGL
[wxWidgets.git] / utils / wxPython / modules / glcanvas / glcanvas.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: glcanvas.i
3 // Purpose: SWIG definitions for the OpenGL wxWindows classes
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 15-Mar-1999
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13
14 %module glcanvas
15
16 %{
17 #include "helpers.h"
18 #include <glcanvas.h>
19 %}
20
21 //---------------------------------------------------------------------------
22
23 %include typemaps.i
24 %include my_typemaps.i
25
26 %extern wx.i
27 %extern windows.i
28 %extern windows2.i
29 %extern windows3.i
30 %extern frames.i
31 %extern _defs.i
32 %extern misc.i
33 %extern gdi.i
34 %extern controls.i
35 %extern events.i
36
37
38 %{
39 #if defined(__WXMSW__)
40 static wxString wxPyEmptyStr("");
41 static wxPoint wxPyDefaultPosition(-1, -1);
42 static wxSize wxPyDefaultSize(-1, -1);
43 #endif
44 %}
45
46 %pragma(python) code = "import wx"
47
48 //---------------------------------------------------------------------------
49
50 class wxPalette;
51 class wxWindow;
52 class wxSize;
53 class wxPoint;
54 class wxGLCanvas;
55
56 //---------------------------------------------------------------------------
57
58 class wxGLContext {
59 public:
60 wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette);
61 ~wxGLContext();
62
63 void SetCurrent();
64 void SetColour(const char *colour);
65 void SwapBuffers();
66
67 #ifdef __WXGTK__
68 void SetupPixelFormat();
69 void SetupPalette(const wxPalette& palette);
70 wxPalette CreateDefaultPalette();
71 wxPalette* GetPalette();
72 #endif
73
74 wxWindow* GetWindow();
75 };
76
77 //---------------------------------------------------------------------------
78
79 class wxGLCanvas : public wxScrolledWindow {
80 public:
81 wxGLCanvas(wxWindow *parent, wxWindowID id = -1,
82 const wxPoint& pos = wxPyDefaultPosition,
83 const wxSize& size = wxPyDefaultSize, long style = 0,
84 const char* name = "GLCanvas",
85 int *attribList = 0,
86 const wxPalette& palette = wxNullPalette);
87
88 %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
89
90 void SetCurrent();
91 void SetColour(const char *colour);
92 void SwapBuffers();
93
94 wxGLContext* GetContext();
95 };
96
97
98 //---------------------------------------------------------------------------
99
100 %init %{
101
102 wxClassInfo::CleanUpClasses();
103 wxClassInfo::InitializeClasses();
104
105 %}
106
107 //---------------------------------------------------------------------------
108 //---------------------------------------------------------------------------