]>
Commit | Line | Data |
---|---|---|
325274bb | 1 | # This file was created automatically by SWIG. |
d14a1e28 | 2 | # Don't modify this file, modify the SWIG interface instead. |
325274bb | 3 | |
caef1a4d RD |
4 | """ |
5 | `GLCanvas` provides an OpenGL Context on a `wx.Window`. | |
6 | """ | |
7 | ||
d14a1e28 | 8 | import _glcanvas |
325274bb | 9 | |
093d3ff1 RD |
10 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): |
11 | if (name == "this"): | |
12 | if isinstance(value, class_type): | |
13 | self.__dict__[name] = value.this | |
14 | if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown | |
15 | del value.thisown | |
16 | return | |
17 | method = class_type.__swig_setmethods__.get(name,None) | |
18 | if method: return method(self,value) | |
19 | if (not static) or hasattr(self,name) or (name == "thisown"): | |
20 | self.__dict__[name] = value | |
21 | else: | |
22 | raise AttributeError("You cannot add attributes to %s" % self) | |
23 | ||
24 | def _swig_setattr(self,class_type,name,value): | |
25 | return _swig_setattr_nondynamic(self,class_type,name,value,0) | |
26 | ||
27 | def _swig_getattr(self,class_type,name): | |
28 | method = class_type.__swig_getmethods__.get(name,None) | |
29 | if method: return method(self) | |
30 | raise AttributeError,name | |
31 | ||
32 | import types | |
33 | try: | |
34 | _object = types.ObjectType | |
35 | _newclass = 1 | |
36 | except AttributeError: | |
37 | class _object : pass | |
38 | _newclass = 0 | |
39 | del types | |
40 | ||
41 | ||
42 | def _swig_setattr_nondynamic_method(set): | |
43 | def set_attr(self,name,value): | |
44 | if hasattr(self,name) or (name in ("this", "thisown")): | |
45 | set(self,name,value) | |
46 | else: | |
47 | raise AttributeError("You cannot add attributes to %s" % self) | |
48 | return set_attr | |
49 | ||
50 | ||
d55e5bfc RD |
51 | import _core |
52 | wx = _core | |
c24da6d6 | 53 | __docfilter__ = wx.__DocFilter(globals()) |
d55e5bfc | 54 | class GLContext(_core.Object): |
093d3ff1 | 55 | """Proxy of C++ GLContext class""" |
423f194a RD |
56 | def __repr__(self): |
57 | return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 58 | def __init__(self, *args, **kwargs): |
41f1cec7 | 59 | """ |
a95a7133 | 60 | __init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette, |
41f1cec7 RD |
61 | GLContext other=None) -> GLContext |
62 | """ | |
d14a1e28 RD |
63 | newobj = _glcanvas.new_GLContext(*args, **kwargs) |
64 | self.this = newobj.this | |
325274bb | 65 | self.thisown = 1 |
d14a1e28 RD |
66 | del newobj.thisown |
67 | def __del__(self, destroy=_glcanvas.delete_GLContext): | |
a95a7133 | 68 | """__del__(self)""" |
d14a1e28 RD |
69 | try: |
70 | if self.thisown: destroy(self) | |
71 | except: pass | |
423f194a RD |
72 | |
73 | def SetCurrent(*args, **kwargs): | |
a95a7133 | 74 | """SetCurrent(self)""" |
423f194a RD |
75 | return _glcanvas.GLContext_SetCurrent(*args, **kwargs) |
76 | ||
77 | def SetColour(*args, **kwargs): | |
a95a7133 | 78 | """SetColour(self, String colour)""" |
423f194a RD |
79 | return _glcanvas.GLContext_SetColour(*args, **kwargs) |
80 | ||
81 | def SwapBuffers(*args, **kwargs): | |
a95a7133 | 82 | """SwapBuffers(self)""" |
423f194a RD |
83 | return _glcanvas.GLContext_SwapBuffers(*args, **kwargs) |
84 | ||
85 | def GetWindow(*args, **kwargs): | |
a95a7133 | 86 | """GetWindow(self) -> Window""" |
423f194a RD |
87 | return _glcanvas.GLContext_GetWindow(*args, **kwargs) |
88 | ||
325274bb | 89 | |
d14a1e28 RD |
90 | class GLContextPtr(GLContext): |
91 | def __init__(self, this): | |
325274bb | 92 | self.this = this |
d14a1e28 RD |
93 | if not hasattr(self,"thisown"): self.thisown = 0 |
94 | self.__class__ = GLContext | |
95 | _glcanvas.GLContext_swigregister(GLContextPtr) | |
d03fd34d RD |
96 | cvar = _glcanvas.cvar |
97 | GLCanvasNameStr = cvar.GLCanvasNameStr | |
d14a1e28 RD |
98 | |
99 | WX_GL_RGBA = _glcanvas.WX_GL_RGBA | |
100 | WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE | |
101 | WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL | |
102 | WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER | |
103 | WX_GL_STEREO = _glcanvas.WX_GL_STEREO | |
104 | WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS | |
105 | WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED | |
106 | WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN | |
107 | WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE | |
108 | WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA | |
109 | WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE | |
110 | WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE | |
111 | WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED | |
112 | WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN | |
113 | WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE | |
114 | WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA | |
d55e5bfc | 115 | class GLCanvas(_core.Window): |
093d3ff1 | 116 | """Proxy of C++ GLCanvas class""" |
423f194a RD |
117 | def __repr__(self): |
118 | return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 119 | def __init__(self, *args, **kwargs): |
41f1cec7 | 120 | """ |
a95a7133 | 121 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
d03fd34d RD |
122 | Size size=DefaultSize, long style=0, String name=GLCanvasNameStr, |
123 | int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas | |
41f1cec7 | 124 | """ |
d14a1e28 RD |
125 | newobj = _glcanvas.new_GLCanvas(*args, **kwargs) |
126 | self.this = newobj.this | |
325274bb | 127 | self.thisown = 1 |
d14a1e28 | 128 | del newobj.thisown |
0122b7e3 | 129 | self._setOORInfo(self) |
423f194a RD |
130 | |
131 | def SetCurrent(*args, **kwargs): | |
a95a7133 | 132 | """SetCurrent(self)""" |
423f194a RD |
133 | return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs) |
134 | ||
135 | def SetColour(*args, **kwargs): | |
a95a7133 | 136 | """SetColour(self, String colour)""" |
423f194a RD |
137 | return _glcanvas.GLCanvas_SetColour(*args, **kwargs) |
138 | ||
139 | def SwapBuffers(*args, **kwargs): | |
a95a7133 | 140 | """SwapBuffers(self)""" |
423f194a RD |
141 | return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs) |
142 | ||
143 | def GetContext(*args, **kwargs): | |
a95a7133 | 144 | """GetContext(self) -> GLContext""" |
423f194a RD |
145 | return _glcanvas.GLCanvas_GetContext(*args, **kwargs) |
146 | ||
147 | def SetupPixelFormat(*args, **kwargs): | |
a95a7133 | 148 | """SetupPixelFormat(self, int attribList=None)""" |
423f194a RD |
149 | return _glcanvas.GLCanvas_SetupPixelFormat(*args, **kwargs) |
150 | ||
151 | def SetupPalette(*args, **kwargs): | |
a95a7133 | 152 | """SetupPalette(self, wxPalette palette)""" |
423f194a RD |
153 | return _glcanvas.GLCanvas_SetupPalette(*args, **kwargs) |
154 | ||
155 | def CreateDefaultPalette(*args, **kwargs): | |
a95a7133 | 156 | """CreateDefaultPalette(self) -> wxPalette""" |
423f194a RD |
157 | return _glcanvas.GLCanvas_CreateDefaultPalette(*args, **kwargs) |
158 | ||
159 | def GetPalette(*args, **kwargs): | |
a95a7133 | 160 | """GetPalette(self) -> wxPalette""" |
423f194a RD |
161 | return _glcanvas.GLCanvas_GetPalette(*args, **kwargs) |
162 | ||
0122b7e3 | 163 | |
d14a1e28 RD |
164 | class GLCanvasPtr(GLCanvas): |
165 | def __init__(self, this): | |
166 | self.this = this | |
167 | if not hasattr(self,"thisown"): self.thisown = 0 | |
168 | self.__class__ = GLCanvas | |
169 | _glcanvas.GLCanvas_swigregister(GLCanvasPtr) | |
325274bb | 170 | |
83448d71 | 171 | def GLCanvasWithContext(*args, **kwargs): |
41f1cec7 | 172 | """ |
83448d71 | 173 | GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition, |
41f1cec7 | 174 | Size size=DefaultSize, |
d03fd34d | 175 | long style=0, String name=GLCanvasNameStr, |
41f1cec7 RD |
176 | int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas |
177 | """ | |
83448d71 | 178 | val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs) |
0122b7e3 | 179 | val.thisown = 1 |
d14a1e28 | 180 | val._setOORInfo(val) |
0122b7e3 | 181 | return val |
325274bb RD |
182 | |
183 |