]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * FILE : contrib/glcanvas/mac/glcanvas.cpp | |
3 | * | |
4 | * This file was automatically generated by : | |
5 | * Simplified Wrapper and Interface Generator (SWIG) | |
6 | * Version 1.1 (Build 883) | |
7 | * | |
8 | * Portions Copyright (c) 1995-1998 | |
9 | * The University of Utah and The Regents of the University of California. | |
10 | * Permission is granted to distribute this file in any manner provided | |
11 | * this notice remains intact. | |
12 | * | |
13 | * Do not make changes to this file--changes will be lost! | |
14 | * | |
15 | */ | |
16 | ||
17 | ||
18 | #define SWIGCODE | |
19 | /* Implementation : PYTHON */ | |
20 | ||
21 | #define SWIGPYTHON | |
22 | #include <string.h> | |
23 | #include <stdlib.h> | |
24 | /* Definitions for Windows/Unix exporting */ | |
25 | #if defined(__WIN32__) | |
26 | # if defined(_MSC_VER) | |
27 | # define SWIGEXPORT(a) __declspec(dllexport) a | |
28 | # else | |
29 | # if defined(__BORLANDC__) | |
30 | # define SWIGEXPORT(a) a _export | |
31 | # else | |
32 | # define SWIGEXPORT(a) a | |
33 | # endif | |
34 | # endif | |
35 | #else | |
36 | # define SWIGEXPORT(a) a | |
37 | #endif | |
38 | ||
39 | #include "Python.h" | |
40 | ||
41 | #ifdef __cplusplus | |
42 | extern "C" { | |
43 | #endif | |
44 | ||
45 | extern void SWIG_MakePtr(char *, void *, char *); | |
46 | extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); | |
47 | extern char *SWIG_GetPtr(char *, void **, char *); | |
48 | extern char *SWIG_GetPtrObj(PyObject *, void **, char *); | |
49 | extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); | |
50 | extern PyObject *SWIG_newvarlink(void); | |
51 | #ifdef __cplusplus | |
52 | } | |
53 | #endif | |
54 | #define SWIG_init initglcanvasc | |
55 | ||
56 | #define SWIG_name "glcanvasc" | |
57 | ||
58 | #include "export.h" | |
59 | #ifdef __WXMSW__ | |
60 | #include "myglcanvas.h" | |
61 | #else | |
62 | #include <wx/glcanvas.h> | |
63 | #endif | |
64 | ||
65 | ||
66 | ||
67 | static PyObject* t_output_helper(PyObject* target, PyObject* o) { | |
68 | PyObject* o2; | |
69 | PyObject* o3; | |
70 | ||
71 | if (!target) { | |
72 | target = o; | |
73 | } else if (target == Py_None) { | |
74 | Py_DECREF(Py_None); | |
75 | target = o; | |
76 | } else { | |
77 | if (!PyTuple_Check(target)) { | |
78 | o2 = target; | |
79 | target = PyTuple_New(1); | |
80 | PyTuple_SetItem(target, 0, o2); | |
81 | } | |
82 | o3 = PyTuple_New(1); | |
83 | PyTuple_SetItem(o3, 0, o); | |
84 | ||
85 | o2 = target; | |
86 | target = PySequence_Concat(o2, o3); | |
87 | Py_DECREF(o2); | |
88 | Py_DECREF(o3); | |
89 | } | |
90 | return target; | |
91 | } | |
92 | ||
93 | #if PYTHON_API_VERSION >= 1009 | |
94 | static char* wxStringErrorMsg = "String or Unicode type required"; | |
95 | #else | |
96 | static char* wxStringErrorMsg = "String type required"; | |
97 | #endif | |
98 | #ifdef __cplusplus | |
99 | extern "C" { | |
100 | #endif | |
101 | static void *SwigwxGLContextTowxObject(void *ptr) { | |
102 | wxGLContext *src; | |
103 | wxObject *dest; | |
104 | src = (wxGLContext *) ptr; | |
105 | dest = (wxObject *) src; | |
106 | return (void *) dest; | |
107 | } | |
108 | ||
109 | #define delete_wxGLContext(_swigobj) (delete _swigobj) | |
110 | static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) { | |
111 | PyObject * _resultobj; | |
112 | wxGLContext * _arg0; | |
113 | PyObject * _argo0 = 0; | |
114 | char *_kwnames[] = { "self", NULL }; | |
115 | ||
116 | self = self; | |
117 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0)) | |
118 | return NULL; | |
119 | if (_argo0) { | |
120 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
121 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
122 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p."); | |
123 | return NULL; | |
124 | } | |
125 | } | |
126 | { | |
127 | wxPy_BEGIN_ALLOW_THREADS; | |
128 | delete_wxGLContext(_arg0); | |
129 | ||
130 | wxPy_END_ALLOW_THREADS; | |
131 | } Py_INCREF(Py_None); | |
132 | _resultobj = Py_None; | |
133 | return _resultobj; | |
134 | } | |
135 | ||
136 | #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent()) | |
137 | static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) { | |
138 | PyObject * _resultobj; | |
139 | wxGLContext * _arg0; | |
140 | PyObject * _argo0 = 0; | |
141 | char *_kwnames[] = { "self", NULL }; | |
142 | ||
143 | self = self; | |
144 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0)) | |
145 | return NULL; | |
146 | if (_argo0) { | |
147 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
148 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
149 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p."); | |
150 | return NULL; | |
151 | } | |
152 | } | |
153 | { | |
154 | wxPy_BEGIN_ALLOW_THREADS; | |
155 | wxGLContext_SetCurrent(_arg0); | |
156 | ||
157 | wxPy_END_ALLOW_THREADS; | |
158 | } Py_INCREF(Py_None); | |
159 | _resultobj = Py_None; | |
160 | return _resultobj; | |
161 | } | |
162 | ||
163 | #define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) | |
164 | static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) { | |
165 | PyObject * _resultobj; | |
166 | wxGLContext * _arg0; | |
167 | char * _arg1; | |
168 | PyObject * _argo0 = 0; | |
169 | char *_kwnames[] = { "self","colour", NULL }; | |
170 | ||
171 | self = self; | |
172 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1)) | |
173 | return NULL; | |
174 | if (_argo0) { | |
175 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
176 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
177 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p."); | |
178 | return NULL; | |
179 | } | |
180 | } | |
181 | { | |
182 | wxPy_BEGIN_ALLOW_THREADS; | |
183 | wxGLContext_SetColour(_arg0,_arg1); | |
184 | ||
185 | wxPy_END_ALLOW_THREADS; | |
186 | } Py_INCREF(Py_None); | |
187 | _resultobj = Py_None; | |
188 | return _resultobj; | |
189 | } | |
190 | ||
191 | #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers()) | |
192 | static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) { | |
193 | PyObject * _resultobj; | |
194 | wxGLContext * _arg0; | |
195 | PyObject * _argo0 = 0; | |
196 | char *_kwnames[] = { "self", NULL }; | |
197 | ||
198 | self = self; | |
199 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0)) | |
200 | return NULL; | |
201 | if (_argo0) { | |
202 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
203 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
204 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p."); | |
205 | return NULL; | |
206 | } | |
207 | } | |
208 | { | |
209 | wxPy_BEGIN_ALLOW_THREADS; | |
210 | wxGLContext_SwapBuffers(_arg0); | |
211 | ||
212 | wxPy_END_ALLOW_THREADS; | |
213 | } Py_INCREF(Py_None); | |
214 | _resultobj = Py_None; | |
215 | return _resultobj; | |
216 | } | |
217 | ||
218 | #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow()) | |
219 | static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { | |
220 | PyObject * _resultobj; | |
221 | wxWindow * _result; | |
222 | wxGLContext * _arg0; | |
223 | PyObject * _argo0 = 0; | |
224 | char *_kwnames[] = { "self", NULL }; | |
225 | ||
226 | self = self; | |
227 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0)) | |
228 | return NULL; | |
229 | if (_argo0) { | |
230 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
231 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
232 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p."); | |
233 | return NULL; | |
234 | } | |
235 | } | |
236 | { | |
237 | wxPy_BEGIN_ALLOW_THREADS; | |
238 | _result = (wxWindow *)wxGLContext_GetWindow(_arg0); | |
239 | ||
240 | wxPy_END_ALLOW_THREADS; | |
241 | }{ _resultobj = wxPyMake_wxObject(_result); } | |
242 | return _resultobj; | |
243 | } | |
244 | ||
245 | static void *SwigwxGLCanvasTowxWindow(void *ptr) { | |
246 | wxGLCanvas *src; | |
247 | wxWindow *dest; | |
248 | src = (wxGLCanvas *) ptr; | |
249 | dest = (wxWindow *) src; | |
250 | return (void *) dest; | |
251 | } | |
252 | ||
253 | static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) { | |
254 | wxGLCanvas *src; | |
255 | wxEvtHandler *dest; | |
256 | src = (wxGLCanvas *) ptr; | |
257 | dest = (wxEvtHandler *) src; | |
258 | return (void *) dest; | |
259 | } | |
260 | ||
261 | static void *SwigwxGLCanvasTowxObject(void *ptr) { | |
262 | wxGLCanvas *src; | |
263 | wxObject *dest; | |
264 | src = (wxGLCanvas *) ptr; | |
265 | dest = (wxObject *) src; | |
266 | return (void *) dest; | |
267 | } | |
268 | ||
269 | #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) | |
270 | static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) { | |
271 | PyObject * _resultobj; | |
272 | wxGLCanvas * _result; | |
273 | wxWindow * _arg0; | |
274 | wxWindowID _arg1 = (wxWindowID ) -1; | |
275 | wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; | |
276 | wxSize * _arg3 = (wxSize *) &wxDefaultSize; | |
277 | long _arg4 = (long ) 0; | |
278 | char * _arg5 = (char *) "GLCanvas"; | |
279 | int * _arg6 = (int *) NULL; | |
280 | wxPalette * _arg7 = (wxPalette *) &wxNullPalette; | |
281 | PyObject * _argo0 = 0; | |
282 | wxPoint temp; | |
283 | PyObject * _obj2 = 0; | |
284 | wxSize temp0; | |
285 | PyObject * _obj3 = 0; | |
286 | int * temp1; | |
287 | PyObject * _obj6 = 0; | |
288 | PyObject * _argo7 = 0; | |
289 | char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL }; | |
290 | char _ptemp[128]; | |
291 | ||
292 | self = self; | |
293 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7)) | |
294 | return NULL; | |
295 | if (_argo0) { | |
296 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
297 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { | |
298 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p."); | |
299 | return NULL; | |
300 | } | |
301 | } | |
302 | if (_obj2) | |
303 | { | |
304 | _arg2 = &temp; | |
305 | if (! wxPoint_helper(_obj2, &_arg2)) | |
306 | return NULL; | |
307 | } | |
308 | if (_obj3) | |
309 | { | |
310 | _arg3 = &temp0; | |
311 | if (! wxSize_helper(_obj3, &_arg3)) | |
312 | return NULL; | |
313 | } | |
314 | if (_obj6) | |
315 | { | |
316 | int i; | |
317 | if (PySequence_Check(_obj6)) { | |
318 | int size = PyObject_Length(_obj6); | |
319 | temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); | |
320 | for (i = 0; i < size; i++) { | |
321 | temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i)); | |
322 | } | |
323 | temp1[size] = 0; | |
324 | _arg6 = temp1; | |
325 | } | |
326 | } | |
327 | if (_argo7) { | |
328 | if (_argo7 == Py_None) { _arg7 = NULL; } | |
329 | else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { | |
330 | PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p."); | |
331 | return NULL; | |
332 | } | |
333 | } | |
334 | { | |
335 | wxPy_BEGIN_ALLOW_THREADS; | |
336 | _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); | |
337 | ||
338 | wxPy_END_ALLOW_THREADS; | |
339 | } if (_result) { | |
340 | SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p"); | |
341 | _resultobj = Py_BuildValue("s",_ptemp); | |
342 | } else { | |
343 | Py_INCREF(Py_None); | |
344 | _resultobj = Py_None; | |
345 | } | |
346 | { | |
347 | delete [] _arg6; | |
348 | } | |
349 | return _resultobj; | |
350 | } | |
351 | ||
352 | #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) | |
353 | static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) { | |
354 | PyObject * _resultobj; | |
355 | wxGLCanvas * _result; | |
356 | wxWindow * _arg0; | |
357 | wxGLContext * _arg1 = (wxGLContext *) NULL; | |
358 | wxWindowID _arg2 = (wxWindowID ) -1; | |
359 | wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; | |
360 | wxSize * _arg4 = (wxSize *) &wxDefaultSize; | |
361 | long _arg5 = (long ) 0; | |
362 | char * _arg6 = (char *) "GLCanvas"; | |
363 | int * _arg7 = (int *) NULL; | |
364 | wxPalette * _arg8 = (wxPalette *) &wxNullPalette; | |
365 | PyObject * _argo0 = 0; | |
366 | PyObject * _argo1 = 0; | |
367 | wxPoint temp; | |
368 | PyObject * _obj3 = 0; | |
369 | wxSize temp0; | |
370 | PyObject * _obj4 = 0; | |
371 | int * temp1; | |
372 | PyObject * _obj7 = 0; | |
373 | PyObject * _argo8 = 0; | |
374 | char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL }; | |
375 | char _ptemp[128]; | |
376 | ||
377 | self = self; | |
378 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8)) | |
379 | return NULL; | |
380 | if (_argo0) { | |
381 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
382 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { | |
383 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p."); | |
384 | return NULL; | |
385 | } | |
386 | } | |
387 | if (_argo1) { | |
388 | if (_argo1 == Py_None) { _arg1 = NULL; } | |
389 | else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) { | |
390 | PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p."); | |
391 | return NULL; | |
392 | } | |
393 | } | |
394 | if (_obj3) | |
395 | { | |
396 | _arg3 = &temp; | |
397 | if (! wxPoint_helper(_obj3, &_arg3)) | |
398 | return NULL; | |
399 | } | |
400 | if (_obj4) | |
401 | { | |
402 | _arg4 = &temp0; | |
403 | if (! wxSize_helper(_obj4, &_arg4)) | |
404 | return NULL; | |
405 | } | |
406 | if (_obj7) | |
407 | { | |
408 | int i; | |
409 | if (PySequence_Check(_obj7)) { | |
410 | int size = PyObject_Length(_obj7); | |
411 | temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); | |
412 | for (i = 0; i < size; i++) { | |
413 | temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i)); | |
414 | } | |
415 | temp1[size] = 0; | |
416 | _arg7 = temp1; | |
417 | } | |
418 | } | |
419 | if (_argo8) { | |
420 | if (_argo8 == Py_None) { _arg8 = NULL; } | |
421 | else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) { | |
422 | PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p."); | |
423 | return NULL; | |
424 | } | |
425 | } | |
426 | { | |
427 | wxPy_BEGIN_ALLOW_THREADS; | |
428 | _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); | |
429 | ||
430 | wxPy_END_ALLOW_THREADS; | |
431 | } if (_result) { | |
432 | SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p"); | |
433 | _resultobj = Py_BuildValue("s",_ptemp); | |
434 | } else { | |
435 | Py_INCREF(Py_None); | |
436 | _resultobj = Py_None; | |
437 | } | |
438 | { | |
439 | delete [] _arg7; | |
440 | } | |
441 | return _resultobj; | |
442 | } | |
443 | ||
444 | #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent()) | |
445 | static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) { | |
446 | PyObject * _resultobj; | |
447 | wxGLCanvas * _arg0; | |
448 | PyObject * _argo0 = 0; | |
449 | char *_kwnames[] = { "self", NULL }; | |
450 | ||
451 | self = self; | |
452 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0)) | |
453 | return NULL; | |
454 | if (_argo0) { | |
455 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
456 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
457 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p."); | |
458 | return NULL; | |
459 | } | |
460 | } | |
461 | { | |
462 | wxPy_BEGIN_ALLOW_THREADS; | |
463 | wxGLCanvas_SetCurrent(_arg0); | |
464 | ||
465 | wxPy_END_ALLOW_THREADS; | |
466 | } Py_INCREF(Py_None); | |
467 | _resultobj = Py_None; | |
468 | return _resultobj; | |
469 | } | |
470 | ||
471 | #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) | |
472 | static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) { | |
473 | PyObject * _resultobj; | |
474 | wxGLCanvas * _arg0; | |
475 | char * _arg1; | |
476 | PyObject * _argo0 = 0; | |
477 | char *_kwnames[] = { "self","colour", NULL }; | |
478 | ||
479 | self = self; | |
480 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1)) | |
481 | return NULL; | |
482 | if (_argo0) { | |
483 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
484 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
485 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p."); | |
486 | return NULL; | |
487 | } | |
488 | } | |
489 | { | |
490 | wxPy_BEGIN_ALLOW_THREADS; | |
491 | wxGLCanvas_SetColour(_arg0,_arg1); | |
492 | ||
493 | wxPy_END_ALLOW_THREADS; | |
494 | } Py_INCREF(Py_None); | |
495 | _resultobj = Py_None; | |
496 | return _resultobj; | |
497 | } | |
498 | ||
499 | #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers()) | |
500 | static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) { | |
501 | PyObject * _resultobj; | |
502 | wxGLCanvas * _arg0; | |
503 | PyObject * _argo0 = 0; | |
504 | char *_kwnames[] = { "self", NULL }; | |
505 | ||
506 | self = self; | |
507 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0)) | |
508 | return NULL; | |
509 | if (_argo0) { | |
510 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
511 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
512 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p."); | |
513 | return NULL; | |
514 | } | |
515 | } | |
516 | { | |
517 | wxPy_BEGIN_ALLOW_THREADS; | |
518 | wxGLCanvas_SwapBuffers(_arg0); | |
519 | ||
520 | wxPy_END_ALLOW_THREADS; | |
521 | } Py_INCREF(Py_None); | |
522 | _resultobj = Py_None; | |
523 | return _resultobj; | |
524 | } | |
525 | ||
526 | #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext()) | |
527 | static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) { | |
528 | PyObject * _resultobj; | |
529 | wxGLContext * _result; | |
530 | wxGLCanvas * _arg0; | |
531 | PyObject * _argo0 = 0; | |
532 | char *_kwnames[] = { "self", NULL }; | |
533 | char _ptemp[128]; | |
534 | ||
535 | self = self; | |
536 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0)) | |
537 | return NULL; | |
538 | if (_argo0) { | |
539 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
540 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
541 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p."); | |
542 | return NULL; | |
543 | } | |
544 | } | |
545 | { | |
546 | wxPy_BEGIN_ALLOW_THREADS; | |
547 | _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); | |
548 | ||
549 | wxPy_END_ALLOW_THREADS; | |
550 | } if (_result) { | |
551 | SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p"); | |
552 | _resultobj = Py_BuildValue("s",_ptemp); | |
553 | } else { | |
554 | Py_INCREF(Py_None); | |
555 | _resultobj = Py_None; | |
556 | } | |
557 | return _resultobj; | |
558 | } | |
559 | ||
560 | static PyMethodDef glcanvascMethods[] = { | |
561 | { "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS }, | |
562 | { "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS }, | |
563 | { "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS }, | |
564 | { "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS }, | |
565 | { "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS }, | |
566 | { "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS }, | |
567 | { "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS }, | |
568 | { "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS }, | |
569 | { "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS }, | |
570 | { "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS }, | |
571 | { "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS }, | |
572 | { NULL, NULL } | |
573 | }; | |
574 | #ifdef __cplusplus | |
575 | } | |
576 | #endif | |
577 | /* | |
578 | * This table is used by the pointer type-checker | |
579 | */ | |
580 | static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { | |
581 | { "_signed_long","_long",0}, | |
582 | { "_wxPrintQuality","_wxCoord",0}, | |
583 | { "_wxPrintQuality","_int",0}, | |
584 | { "_wxPrintQuality","_signed_int",0}, | |
585 | { "_wxPrintQuality","_unsigned_int",0}, | |
586 | { "_wxPrintQuality","_wxWindowID",0}, | |
587 | { "_wxPrintQuality","_uint",0}, | |
588 | { "_wxPrintQuality","_EBool",0}, | |
589 | { "_wxPrintQuality","_size_t",0}, | |
590 | { "_wxPrintQuality","_time_t",0}, | |
591 | { "_byte","_unsigned_char",0}, | |
592 | { "_long","_unsigned_long",0}, | |
593 | { "_long","_signed_long",0}, | |
594 | { "_size_t","_wxCoord",0}, | |
595 | { "_size_t","_wxPrintQuality",0}, | |
596 | { "_size_t","_time_t",0}, | |
597 | { "_size_t","_unsigned_int",0}, | |
598 | { "_size_t","_int",0}, | |
599 | { "_size_t","_wxWindowID",0}, | |
600 | { "_size_t","_uint",0}, | |
601 | { "_uint","_wxCoord",0}, | |
602 | { "_uint","_wxPrintQuality",0}, | |
603 | { "_uint","_time_t",0}, | |
604 | { "_uint","_size_t",0}, | |
605 | { "_uint","_unsigned_int",0}, | |
606 | { "_uint","_int",0}, | |
607 | { "_uint","_wxWindowID",0}, | |
608 | { "_wxChar","_char",0}, | |
609 | { "_char","_wxChar",0}, | |
610 | { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0}, | |
611 | { "_EBool","_wxCoord",0}, | |
612 | { "_EBool","_wxPrintQuality",0}, | |
613 | { "_EBool","_signed_int",0}, | |
614 | { "_EBool","_int",0}, | |
615 | { "_EBool","_wxWindowID",0}, | |
616 | { "_unsigned_long","_long",0}, | |
617 | { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0}, | |
618 | { "_signed_int","_wxCoord",0}, | |
619 | { "_signed_int","_wxPrintQuality",0}, | |
620 | { "_signed_int","_EBool",0}, | |
621 | { "_signed_int","_wxWindowID",0}, | |
622 | { "_signed_int","_int",0}, | |
623 | { "_WXTYPE","_wxDateTime_t",0}, | |
624 | { "_WXTYPE","_short",0}, | |
625 | { "_WXTYPE","_signed_short",0}, | |
626 | { "_WXTYPE","_unsigned_short",0}, | |
627 | { "_unsigned_short","_wxDateTime_t",0}, | |
628 | { "_unsigned_short","_WXTYPE",0}, | |
629 | { "_unsigned_short","_short",0}, | |
630 | { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, | |
631 | { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, | |
632 | { "_signed_short","_WXTYPE",0}, | |
633 | { "_signed_short","_short",0}, | |
634 | { "_unsigned_char","_byte",0}, | |
635 | { "_unsigned_int","_wxCoord",0}, | |
636 | { "_unsigned_int","_wxPrintQuality",0}, | |
637 | { "_unsigned_int","_time_t",0}, | |
638 | { "_unsigned_int","_size_t",0}, | |
639 | { "_unsigned_int","_uint",0}, | |
640 | { "_unsigned_int","_wxWindowID",0}, | |
641 | { "_unsigned_int","_int",0}, | |
642 | { "_short","_wxDateTime_t",0}, | |
643 | { "_short","_WXTYPE",0}, | |
644 | { "_short","_unsigned_short",0}, | |
645 | { "_short","_signed_short",0}, | |
646 | { "_wxWindowID","_wxCoord",0}, | |
647 | { "_wxWindowID","_wxPrintQuality",0}, | |
648 | { "_wxWindowID","_time_t",0}, | |
649 | { "_wxWindowID","_size_t",0}, | |
650 | { "_wxWindowID","_EBool",0}, | |
651 | { "_wxWindowID","_uint",0}, | |
652 | { "_wxWindowID","_int",0}, | |
653 | { "_wxWindowID","_signed_int",0}, | |
654 | { "_wxWindowID","_unsigned_int",0}, | |
655 | { "_int","_wxCoord",0}, | |
656 | { "_int","_wxPrintQuality",0}, | |
657 | { "_int","_time_t",0}, | |
658 | { "_int","_size_t",0}, | |
659 | { "_int","_EBool",0}, | |
660 | { "_int","_uint",0}, | |
661 | { "_int","_wxWindowID",0}, | |
662 | { "_int","_unsigned_int",0}, | |
663 | { "_int","_signed_int",0}, | |
664 | { "_wxDateTime_t","_unsigned_short",0}, | |
665 | { "_wxDateTime_t","_short",0}, | |
666 | { "_wxDateTime_t","_WXTYPE",0}, | |
667 | { "_time_t","_wxCoord",0}, | |
668 | { "_time_t","_wxPrintQuality",0}, | |
669 | { "_time_t","_unsigned_int",0}, | |
670 | { "_time_t","_int",0}, | |
671 | { "_time_t","_wxWindowID",0}, | |
672 | { "_time_t","_uint",0}, | |
673 | { "_time_t","_size_t",0}, | |
674 | { "_wxCoord","_int",0}, | |
675 | { "_wxCoord","_signed_int",0}, | |
676 | { "_wxCoord","_unsigned_int",0}, | |
677 | { "_wxCoord","_wxWindowID",0}, | |
678 | { "_wxCoord","_uint",0}, | |
679 | { "_wxCoord","_EBool",0}, | |
680 | { "_wxCoord","_size_t",0}, | |
681 | { "_wxCoord","_time_t",0}, | |
682 | { "_wxCoord","_wxPrintQuality",0}, | |
683 | { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, | |
684 | { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, | |
685 | {0,0,0}}; | |
686 | ||
687 | static PyObject *SWIG_globals; | |
688 | #ifdef __cplusplus | |
689 | extern "C" | |
690 | #endif | |
691 | SWIGEXPORT(void) initglcanvasc() { | |
692 | PyObject *m, *d; | |
693 | SWIG_globals = SWIG_newvarlink(); | |
694 | m = Py_InitModule("glcanvasc", glcanvascMethods); | |
695 | d = PyModule_GetDict(m); | |
696 | PyDict_SetItemString(d,"WX_GL_RGBA", PyInt_FromLong((long) WX_GL_RGBA)); | |
697 | PyDict_SetItemString(d,"WX_GL_BUFFER_SIZE", PyInt_FromLong((long) WX_GL_BUFFER_SIZE)); | |
698 | PyDict_SetItemString(d,"WX_GL_LEVEL", PyInt_FromLong((long) WX_GL_LEVEL)); | |
699 | PyDict_SetItemString(d,"WX_GL_DOUBLEBUFFER", PyInt_FromLong((long) WX_GL_DOUBLEBUFFER)); | |
700 | PyDict_SetItemString(d,"WX_GL_STEREO", PyInt_FromLong((long) WX_GL_STEREO)); | |
701 | PyDict_SetItemString(d,"WX_GL_AUX_BUFFERS", PyInt_FromLong((long) WX_GL_AUX_BUFFERS)); | |
702 | PyDict_SetItemString(d,"WX_GL_MIN_RED", PyInt_FromLong((long) WX_GL_MIN_RED)); | |
703 | PyDict_SetItemString(d,"WX_GL_MIN_GREEN", PyInt_FromLong((long) WX_GL_MIN_GREEN)); | |
704 | PyDict_SetItemString(d,"WX_GL_MIN_BLUE", PyInt_FromLong((long) WX_GL_MIN_BLUE)); | |
705 | PyDict_SetItemString(d,"WX_GL_MIN_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ALPHA)); | |
706 | PyDict_SetItemString(d,"WX_GL_DEPTH_SIZE", PyInt_FromLong((long) WX_GL_DEPTH_SIZE)); | |
707 | PyDict_SetItemString(d,"WX_GL_STENCIL_SIZE", PyInt_FromLong((long) WX_GL_STENCIL_SIZE)); | |
708 | PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_RED", PyInt_FromLong((long) WX_GL_MIN_ACCUM_RED)); | |
709 | PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_GREEN", PyInt_FromLong((long) WX_GL_MIN_ACCUM_GREEN)); | |
710 | PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_BLUE", PyInt_FromLong((long) WX_GL_MIN_ACCUM_BLUE)); | |
711 | PyDict_SetItemString(d,"WX_GL_MIN_ACCUM_ALPHA", PyInt_FromLong((long) WX_GL_MIN_ACCUM_ALPHA)); | |
712 | ||
713 | ||
714 | wxClassInfo::CleanUpClasses(); | |
715 | wxClassInfo::InitializeClasses(); | |
716 | ||
717 | { | |
718 | int i; | |
719 | for (i = 0; _swig_mapping[i].n1; i++) | |
720 | SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); | |
721 | } | |
722 | } |