]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/glcanvas/mac/glcanvas.py
Tweaks to work around wxMac bugs
[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
d55e5bfc
RD
6import _core
7wx = _core
d6c14a4c 8__docfilter__ = wx.__DocFilter(globals())
d55e5bfc 9class GLContext(_core.Object):
423f194a
RD
10 def __repr__(self):
11 return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 12 def __init__(self, *args, **kwargs):
41f1cec7 13 """
a95a7133 14 __init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette,
41f1cec7
RD
15 GLContext other=None) -> GLContext
16 """
d14a1e28
RD
17 newobj = _glcanvas.new_GLContext(*args, **kwargs)
18 self.this = newobj.this
19 self.thisown = 1
20 del newobj.thisown
21 def __del__(self, destroy=_glcanvas.delete_GLContext):
a95a7133 22 """__del__(self)"""
d14a1e28
RD
23 try:
24 if self.thisown: destroy(self)
25 except: pass
423f194a
RD
26
27 def SetCurrent(*args, **kwargs):
a95a7133 28 """SetCurrent(self)"""
423f194a
RD
29 return _glcanvas.GLContext_SetCurrent(*args, **kwargs)
30
31 def SetColour(*args, **kwargs):
a95a7133 32 """SetColour(self, String colour)"""
423f194a
RD
33 return _glcanvas.GLContext_SetColour(*args, **kwargs)
34
35 def SwapBuffers(*args, **kwargs):
a95a7133 36 """SwapBuffers(self)"""
423f194a
RD
37 return _glcanvas.GLContext_SwapBuffers(*args, **kwargs)
38
39 def GetWindow(*args, **kwargs):
a95a7133 40 """GetWindow(self) -> Window"""
423f194a
RD
41 return _glcanvas.GLContext_GetWindow(*args, **kwargs)
42
e6056257 43
d14a1e28
RD
44class GLContextPtr(GLContext):
45 def __init__(self, this):
e6056257 46 self.this = this
d14a1e28
RD
47 if not hasattr(self,"thisown"): self.thisown = 0
48 self.__class__ = GLContext
49_glcanvas.GLContext_swigregister(GLContextPtr)
cbd72d4f
RD
50cvar = _glcanvas.cvar
51GLCanvasNameStr = cvar.GLCanvasNameStr
d14a1e28
RD
52
53WX_GL_RGBA = _glcanvas.WX_GL_RGBA
54WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
55WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL
56WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER
57WX_GL_STEREO = _glcanvas.WX_GL_STEREO
58WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS
59WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED
60WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN
61WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE
62WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA
63WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE
64WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE
65WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED
66WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN
67WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE
68WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA
d55e5bfc 69class GLCanvas(_core.Window):
423f194a
RD
70 def __repr__(self):
71 return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 72 def __init__(self, *args, **kwargs):
41f1cec7 73 """
a95a7133 74 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
cbd72d4f
RD
75 Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
76 int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
41f1cec7 77 """
d14a1e28
RD
78 newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
79 self.this = newobj.this
e6056257 80 self.thisown = 1
d14a1e28 81 del newobj.thisown
e6056257 82 self._setOORInfo(self)
423f194a
RD
83
84 def SetCurrent(*args, **kwargs):
a95a7133 85 """SetCurrent(self)"""
423f194a
RD
86 return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs)
87
88 def SetColour(*args, **kwargs):
a95a7133 89 """SetColour(self, String colour)"""
423f194a
RD
90 return _glcanvas.GLCanvas_SetColour(*args, **kwargs)
91
92 def SwapBuffers(*args, **kwargs):
a95a7133 93 """SwapBuffers(self)"""
423f194a
RD
94 return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs)
95
96 def GetContext(*args, **kwargs):
a95a7133 97 """GetContext(self) -> GLContext"""
423f194a
RD
98 return _glcanvas.GLCanvas_GetContext(*args, **kwargs)
99
e6056257 100
d14a1e28
RD
101class GLCanvasPtr(GLCanvas):
102 def __init__(self, this):
103 self.this = this
104 if not hasattr(self,"thisown"): self.thisown = 0
105 self.__class__ = GLCanvas
106_glcanvas.GLCanvas_swigregister(GLCanvasPtr)
e6056257 107
58203fa6 108def GLCanvasWithContext(*args, **kwargs):
41f1cec7 109 """
58203fa6 110 GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
41f1cec7 111 Size size=DefaultSize,
cbd72d4f 112 long style=0, String name=GLCanvasNameStr,
41f1cec7
RD
113 int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
114 """
58203fa6 115 val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs)
e6056257 116 val.thisown = 1
d14a1e28 117 val._setOORInfo(val)
e6056257
RD
118 return val
119
120