]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/contrib/glcanvas/gtk/glcanvas.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
5 `GLCanvas` provides an OpenGL Context on a `wx.Window`.
10 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
12 if isinstance(value
, class_type
):
13 self
.__dict
__[name
] = value
.this
14 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
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
22 raise AttributeError("You cannot add attributes to %s" % self
)
24 def _swig_setattr(self
,class_type
,name
,value
):
25 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
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
34 _object
= types
.ObjectType
36 except AttributeError:
42 def _swig_setattr_nondynamic_method(set):
43 def set_attr(self
,name
,value
):
44 if hasattr(self
,name
) or (name
in ("this", "thisown")):
47 raise AttributeError("You cannot add attributes to %s" % self
)
53 __docfilter__
= wx
.__DocFilter
(globals())
54 class GLContext(_core
.Object
):
55 """Proxy of C++ GLContext class"""
57 return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
58 def __init__(self
, *args
, **kwargs
):
60 __init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette,
61 GLContext other=None) -> GLContext
63 newobj
= _glcanvas
.new_GLContext(*args
, **kwargs
)
64 self
.this
= newobj
.this
67 def __del__(self
, destroy
=_glcanvas
.delete_GLContext
):
70 if self
.thisown
: destroy(self
)
73 def SetCurrent(*args
, **kwargs
):
74 """SetCurrent(self)"""
75 return _glcanvas
.GLContext_SetCurrent(*args
, **kwargs
)
77 def SetColour(*args
, **kwargs
):
78 """SetColour(self, String colour)"""
79 return _glcanvas
.GLContext_SetColour(*args
, **kwargs
)
81 def SwapBuffers(*args
, **kwargs
):
82 """SwapBuffers(self)"""
83 return _glcanvas
.GLContext_SwapBuffers(*args
, **kwargs
)
85 def SetupPixelFormat(*args
, **kwargs
):
86 """SetupPixelFormat(self)"""
87 return _glcanvas
.GLContext_SetupPixelFormat(*args
, **kwargs
)
89 def SetupPalette(*args
, **kwargs
):
90 """SetupPalette(self, wxPalette palette)"""
91 return _glcanvas
.GLContext_SetupPalette(*args
, **kwargs
)
93 def CreateDefaultPalette(*args
, **kwargs
):
94 """CreateDefaultPalette(self) -> wxPalette"""
95 return _glcanvas
.GLContext_CreateDefaultPalette(*args
, **kwargs
)
97 def GetPalette(*args
, **kwargs
):
98 """GetPalette(self) -> wxPalette"""
99 return _glcanvas
.GLContext_GetPalette(*args
, **kwargs
)
101 def GetWindow(*args
, **kwargs
):
102 """GetWindow(self) -> Window"""
103 return _glcanvas
.GLContext_GetWindow(*args
, **kwargs
)
106 class GLContextPtr(GLContext
):
107 def __init__(self
, this
):
109 if not hasattr(self
,"thisown"): self
.thisown
= 0
110 self
.__class
__ = GLContext
111 _glcanvas
.GLContext_swigregister(GLContextPtr
)
112 cvar
= _glcanvas
.cvar
113 GLCanvasNameStr
= cvar
.GLCanvasNameStr
115 WX_GL_RGBA
= _glcanvas
.WX_GL_RGBA
116 WX_GL_BUFFER_SIZE
= _glcanvas
.WX_GL_BUFFER_SIZE
117 WX_GL_LEVEL
= _glcanvas
.WX_GL_LEVEL
118 WX_GL_DOUBLEBUFFER
= _glcanvas
.WX_GL_DOUBLEBUFFER
119 WX_GL_STEREO
= _glcanvas
.WX_GL_STEREO
120 WX_GL_AUX_BUFFERS
= _glcanvas
.WX_GL_AUX_BUFFERS
121 WX_GL_MIN_RED
= _glcanvas
.WX_GL_MIN_RED
122 WX_GL_MIN_GREEN
= _glcanvas
.WX_GL_MIN_GREEN
123 WX_GL_MIN_BLUE
= _glcanvas
.WX_GL_MIN_BLUE
124 WX_GL_MIN_ALPHA
= _glcanvas
.WX_GL_MIN_ALPHA
125 WX_GL_DEPTH_SIZE
= _glcanvas
.WX_GL_DEPTH_SIZE
126 WX_GL_STENCIL_SIZE
= _glcanvas
.WX_GL_STENCIL_SIZE
127 WX_GL_MIN_ACCUM_RED
= _glcanvas
.WX_GL_MIN_ACCUM_RED
128 WX_GL_MIN_ACCUM_GREEN
= _glcanvas
.WX_GL_MIN_ACCUM_GREEN
129 WX_GL_MIN_ACCUM_BLUE
= _glcanvas
.WX_GL_MIN_ACCUM_BLUE
130 WX_GL_MIN_ACCUM_ALPHA
= _glcanvas
.WX_GL_MIN_ACCUM_ALPHA
131 class GLCanvas(_core
.Window
):
132 """Proxy of C++ GLCanvas class"""
134 return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
135 def __init__(self
, *args
, **kwargs
):
137 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
138 Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
139 int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
141 newobj
= _glcanvas
.new_GLCanvas(*args
, **kwargs
)
142 self
.this
= newobj
.this
145 self
._setOORInfo
(self
)
147 def SetCurrent(*args
, **kwargs
):
148 """SetCurrent(self)"""
149 return _glcanvas
.GLCanvas_SetCurrent(*args
, **kwargs
)
151 def SetColour(*args
, **kwargs
):
152 """SetColour(self, String colour)"""
153 return _glcanvas
.GLCanvas_SetColour(*args
, **kwargs
)
155 def SwapBuffers(*args
, **kwargs
):
156 """SwapBuffers(self)"""
157 return _glcanvas
.GLCanvas_SwapBuffers(*args
, **kwargs
)
159 def GetContext(*args
, **kwargs
):
160 """GetContext(self) -> GLContext"""
161 return _glcanvas
.GLCanvas_GetContext(*args
, **kwargs
)
164 class GLCanvasPtr(GLCanvas
):
165 def __init__(self
, this
):
167 if not hasattr(self
,"thisown"): self
.thisown
= 0
168 self
.__class
__ = GLCanvas
169 _glcanvas
.GLCanvas_swigregister(GLCanvasPtr
)
171 def GLCanvasWithContext(*args
, **kwargs
):
173 GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
174 Size size=DefaultSize,
175 long style=0, String name=GLCanvasNameStr,
176 int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
178 val
= _glcanvas
.new_GLCanvasWithContext(*args
, **kwargs
)