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