]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/glcanvas/mac/glcanvas.py
reSWIGged
[wxWidgets.git] / wxPython / contrib / glcanvas / mac / glcanvas.py
CommitLineData
e6056257 1# This file was created automatically by SWIG.
d14a1e28 2# Don't modify this file, modify the SWIG interface instead.
e6056257 3
d14a1e28 4import _glcanvas
e6056257 5
d14a1e28
RD
6import core
7wx = core
8class GLContext(core.Object):
9 def __init__(self, *args, **kwargs):
10 newobj = _glcanvas.new_GLContext(*args, **kwargs)
11 self.this = newobj.this
12 self.thisown = 1
13 del newobj.thisown
14 def __del__(self, destroy=_glcanvas.delete_GLContext):
15 try:
16 if self.thisown: destroy(self)
17 except: pass
18 def SetCurrent(*args, **kwargs): return _glcanvas.GLContext_SetCurrent(*args, **kwargs)
19 def SetColour(*args, **kwargs): return _glcanvas.GLContext_SetColour(*args, **kwargs)
20 def SwapBuffers(*args, **kwargs): return _glcanvas.GLContext_SwapBuffers(*args, **kwargs)
21 def GetWindow(*args, **kwargs): return _glcanvas.GLContext_GetWindow(*args, **kwargs)
e6056257 22 def __repr__(self):
d14a1e28 23 return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e6056257 24
d14a1e28
RD
25class GLContextPtr(GLContext):
26 def __init__(self, this):
e6056257 27 self.this = this
d14a1e28
RD
28 if not hasattr(self,"thisown"): self.thisown = 0
29 self.__class__ = GLContext
30_glcanvas.GLContext_swigregister(GLContextPtr)
31
32WX_GL_RGBA = _glcanvas.WX_GL_RGBA
33WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
34WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL
35WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER
36WX_GL_STEREO = _glcanvas.WX_GL_STEREO
37WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS
38WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED
39WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN
40WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE
41WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA
42WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE
43WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE
44WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED
45WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN
46WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE
47WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA
48class GLCanvas(core.Window):
49 def __init__(self, *args, **kwargs):
50 newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
51 self.this = newobj.this
e6056257 52 self.thisown = 1
d14a1e28 53 del newobj.thisown
e6056257 54 self._setOORInfo(self)
d14a1e28
RD
55 def SetCurrent(*args, **kwargs): return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs)
56 def SetColour(*args, **kwargs): return _glcanvas.GLCanvas_SetColour(*args, **kwargs)
57 def SwapBuffers(*args, **kwargs): return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs)
58 def GetContext(*args, **kwargs): return _glcanvas.GLCanvas_GetContext(*args, **kwargs)
59 def __repr__(self):
60 return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e6056257 61
d14a1e28
RD
62class GLCanvasPtr(GLCanvas):
63 def __init__(self, this):
64 self.this = this
65 if not hasattr(self,"thisown"): self.thisown = 0
66 self.__class__ = GLCanvas
67_glcanvas.GLCanvas_swigregister(GLCanvasPtr)
e6056257 68
d14a1e28
RD
69def wxGLCanvasWithContext(*args, **kwargs):
70 val = _glcanvas.new_wxGLCanvasWithContext(*args, **kwargs)
e6056257 71 val.thisown = 1
d14a1e28 72 val._setOORInfo(val)
e6056257
RD
73 return val
74
75