]>
Commit | Line | Data |
---|---|---|
a29cd6c0 | 1 | # This file was created automatically by SWIG. |
d14a1e28 | 2 | # Don't modify this file, modify the SWIG interface instead. |
a29cd6c0 | 3 | |
db3e571a RD |
4 | """ |
5 | `GLCanvas` provides an OpenGL Context on a `wx.Window`. | |
6 | """ | |
7 | ||
d14a1e28 | 8 | import _glcanvas |
a29cd6c0 | 9 | |
54f9ee45 RD |
10 | import _core |
11 | wx = _core | |
66c033b4 | 12 | __docfilter__ = wx.__DocFilter(globals()) |
54f9ee45 | 13 | class GLContext(_core.Object): |
e811c8ce 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): |
0df68c9f | 17 | """ |
a95a7133 | 18 | __init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette, |
0df68c9f RD |
19 | GLContext other=None) -> GLContext |
20 | """ | |
d14a1e28 RD |
21 | newobj = _glcanvas.new_GLContext(*args, **kwargs) |
22 | self.this = newobj.this | |
a29cd6c0 | 23 | self.thisown = 1 |
d14a1e28 RD |
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 | |
e811c8ce RD |
30 | |
31 | def SetCurrent(*args, **kwargs): | |
a95a7133 | 32 | """SetCurrent(self)""" |
e811c8ce RD |
33 | return _glcanvas.GLContext_SetCurrent(*args, **kwargs) |
34 | ||
35 | def SetColour(*args, **kwargs): | |
a95a7133 | 36 | """SetColour(self, String colour)""" |
e811c8ce RD |
37 | return _glcanvas.GLContext_SetColour(*args, **kwargs) |
38 | ||
39 | def SwapBuffers(*args, **kwargs): | |
a95a7133 | 40 | """SwapBuffers(self)""" |
e811c8ce RD |
41 | return _glcanvas.GLContext_SwapBuffers(*args, **kwargs) |
42 | ||
43 | def SetupPixelFormat(*args, **kwargs): | |
a95a7133 | 44 | """SetupPixelFormat(self)""" |
e811c8ce RD |
45 | return _glcanvas.GLContext_SetupPixelFormat(*args, **kwargs) |
46 | ||
47 | def SetupPalette(*args, **kwargs): | |
a95a7133 | 48 | """SetupPalette(self, wxPalette palette)""" |
e811c8ce RD |
49 | return _glcanvas.GLContext_SetupPalette(*args, **kwargs) |
50 | ||
51 | def CreateDefaultPalette(*args, **kwargs): | |
a95a7133 | 52 | """CreateDefaultPalette(self) -> wxPalette""" |
e811c8ce RD |
53 | return _glcanvas.GLContext_CreateDefaultPalette(*args, **kwargs) |
54 | ||
55 | def GetPalette(*args, **kwargs): | |
a95a7133 | 56 | """GetPalette(self) -> wxPalette""" |
e811c8ce RD |
57 | return _glcanvas.GLContext_GetPalette(*args, **kwargs) |
58 | ||
59 | def GetWindow(*args, **kwargs): | |
a95a7133 | 60 | """GetWindow(self) -> Window""" |
e811c8ce RD |
61 | return _glcanvas.GLContext_GetWindow(*args, **kwargs) |
62 | ||
a29cd6c0 | 63 | |
d14a1e28 RD |
64 | class GLContextPtr(GLContext): |
65 | def __init__(self, this): | |
a29cd6c0 | 66 | self.this = this |
d14a1e28 RD |
67 | if not hasattr(self,"thisown"): self.thisown = 0 |
68 | self.__class__ = GLContext | |
69 | _glcanvas.GLContext_swigregister(GLContextPtr) | |
b2dc1044 RD |
70 | cvar = _glcanvas.cvar |
71 | GLCanvasNameStr = cvar.GLCanvasNameStr | |
d14a1e28 RD |
72 | |
73 | WX_GL_RGBA = _glcanvas.WX_GL_RGBA | |
74 | WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE | |
75 | WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL | |
76 | WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER | |
77 | WX_GL_STEREO = _glcanvas.WX_GL_STEREO | |
78 | WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS | |
79 | WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED | |
80 | WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN | |
81 | WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE | |
82 | WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA | |
83 | WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE | |
84 | WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE | |
85 | WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED | |
86 | WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN | |
87 | WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE | |
88 | WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA | |
54f9ee45 | 89 | class GLCanvas(_core.Window): |
e811c8ce RD |
90 | def __repr__(self): |
91 | return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 92 | def __init__(self, *args, **kwargs): |
0df68c9f | 93 | """ |
a95a7133 | 94 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
b2dc1044 RD |
95 | Size size=DefaultSize, long style=0, String name=GLCanvasNameStr, |
96 | int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas | |
0df68c9f | 97 | """ |
d14a1e28 RD |
98 | newobj = _glcanvas.new_GLCanvas(*args, **kwargs) |
99 | self.this = newobj.this | |
a29cd6c0 | 100 | self.thisown = 1 |
d14a1e28 | 101 | del newobj.thisown |
0220cbc1 | 102 | self._setOORInfo(self) |
e811c8ce RD |
103 | |
104 | def SetCurrent(*args, **kwargs): | |
a95a7133 | 105 | """SetCurrent(self)""" |
e811c8ce RD |
106 | return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs) |
107 | ||
108 | def SetColour(*args, **kwargs): | |
a95a7133 | 109 | """SetColour(self, String colour)""" |
e811c8ce RD |
110 | return _glcanvas.GLCanvas_SetColour(*args, **kwargs) |
111 | ||
112 | def SwapBuffers(*args, **kwargs): | |
a95a7133 | 113 | """SwapBuffers(self)""" |
e811c8ce RD |
114 | return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs) |
115 | ||
116 | def GetContext(*args, **kwargs): | |
a95a7133 | 117 | """GetContext(self) -> GLContext""" |
e811c8ce RD |
118 | return _glcanvas.GLCanvas_GetContext(*args, **kwargs) |
119 | ||
a29cd6c0 | 120 | |
d14a1e28 RD |
121 | class GLCanvasPtr(GLCanvas): |
122 | def __init__(self, this): | |
123 | self.this = this | |
124 | if not hasattr(self,"thisown"): self.thisown = 0 | |
125 | self.__class__ = GLCanvas | |
126 | _glcanvas.GLCanvas_swigregister(GLCanvasPtr) | |
a29cd6c0 | 127 | |
58203fa6 | 128 | def GLCanvasWithContext(*args, **kwargs): |
0df68c9f | 129 | """ |
58203fa6 | 130 | GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 131 | Size size=DefaultSize, |
b2dc1044 | 132 | long style=0, String name=GLCanvasNameStr, |
0df68c9f RD |
133 | int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas |
134 | """ | |
58203fa6 | 135 | val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs) |
0220cbc1 | 136 | val.thisown = 1 |
d14a1e28 | 137 | val._setOORInfo(val) |
0220cbc1 RD |
138 | return val |
139 | ||
a29cd6c0 | 140 |