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