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