]>
Commit | Line | Data |
---|---|---|
e6056257 RD |
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 new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2)) | |
110 | static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) { | |
111 | PyObject * _resultobj; | |
112 | wxGLContext * _result; | |
113 | bool _arg0; | |
114 | wxGLCanvas * _arg1; | |
115 | wxPalette * _arg2 = (wxPalette *) &wxNullPalette; | |
116 | int tempbool0; | |
117 | PyObject * _argo1 = 0; | |
118 | PyObject * _argo2 = 0; | |
119 | char *_kwnames[] = { "isRGB","win","palette", NULL }; | |
120 | char _ptemp[128]; | |
121 | ||
122 | self = self; | |
123 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iO|O:new_wxGLContext",_kwnames,&tempbool0,&_argo1,&_argo2)) | |
124 | return NULL; | |
125 | _arg0 = (bool ) tempbool0; | |
126 | if (_argo1) { | |
127 | if (_argo1 == Py_None) { _arg1 = NULL; } | |
128 | else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLCanvas_p")) { | |
129 | PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p."); | |
130 | return NULL; | |
131 | } | |
132 | } | |
133 | if (_argo2) { | |
134 | if (_argo2 == Py_None) { _arg2 = NULL; } | |
135 | else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) { | |
136 | PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p."); | |
137 | return NULL; | |
138 | } | |
139 | } | |
140 | { | |
141 | wxPy_BEGIN_ALLOW_THREADS; | |
142 | _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2); | |
143 | ||
144 | wxPy_END_ALLOW_THREADS; | |
145 | } if (_result) { | |
146 | SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p"); | |
147 | _resultobj = Py_BuildValue("s",_ptemp); | |
148 | } else { | |
149 | Py_INCREF(Py_None); | |
150 | _resultobj = Py_None; | |
151 | } | |
152 | return _resultobj; | |
153 | } | |
154 | ||
155 | #define delete_wxGLContext(_swigobj) (delete _swigobj) | |
156 | static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) { | |
157 | PyObject * _resultobj; | |
158 | wxGLContext * _arg0; | |
159 | PyObject * _argo0 = 0; | |
160 | char *_kwnames[] = { "self", NULL }; | |
161 | ||
162 | self = self; | |
163 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0)) | |
164 | return NULL; | |
165 | if (_argo0) { | |
166 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
167 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
168 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p."); | |
169 | return NULL; | |
170 | } | |
171 | } | |
172 | { | |
173 | wxPy_BEGIN_ALLOW_THREADS; | |
174 | delete_wxGLContext(_arg0); | |
175 | ||
176 | wxPy_END_ALLOW_THREADS; | |
177 | } Py_INCREF(Py_None); | |
178 | _resultobj = Py_None; | |
179 | return _resultobj; | |
180 | } | |
181 | ||
182 | #define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent()) | |
183 | static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) { | |
184 | PyObject * _resultobj; | |
185 | wxGLContext * _arg0; | |
186 | PyObject * _argo0 = 0; | |
187 | char *_kwnames[] = { "self", NULL }; | |
188 | ||
189 | self = self; | |
190 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0)) | |
191 | return NULL; | |
192 | if (_argo0) { | |
193 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
194 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
195 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p."); | |
196 | return NULL; | |
197 | } | |
198 | } | |
199 | { | |
200 | wxPy_BEGIN_ALLOW_THREADS; | |
201 | wxGLContext_SetCurrent(_arg0); | |
202 | ||
203 | wxPy_END_ALLOW_THREADS; | |
204 | } Py_INCREF(Py_None); | |
205 | _resultobj = Py_None; | |
206 | return _resultobj; | |
207 | } | |
208 | ||
209 | #define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) | |
210 | static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) { | |
211 | PyObject * _resultobj; | |
212 | wxGLContext * _arg0; | |
213 | char * _arg1; | |
214 | PyObject * _argo0 = 0; | |
215 | char *_kwnames[] = { "self","colour", NULL }; | |
216 | ||
217 | self = self; | |
218 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1)) | |
219 | return NULL; | |
220 | if (_argo0) { | |
221 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
222 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
223 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p."); | |
224 | return NULL; | |
225 | } | |
226 | } | |
227 | { | |
228 | wxPy_BEGIN_ALLOW_THREADS; | |
229 | wxGLContext_SetColour(_arg0,_arg1); | |
230 | ||
231 | wxPy_END_ALLOW_THREADS; | |
232 | } Py_INCREF(Py_None); | |
233 | _resultobj = Py_None; | |
234 | return _resultobj; | |
235 | } | |
236 | ||
237 | #define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers()) | |
238 | static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) { | |
239 | PyObject * _resultobj; | |
240 | wxGLContext * _arg0; | |
241 | PyObject * _argo0 = 0; | |
242 | char *_kwnames[] = { "self", NULL }; | |
243 | ||
244 | self = self; | |
245 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0)) | |
246 | return NULL; | |
247 | if (_argo0) { | |
248 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
249 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
250 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p."); | |
251 | return NULL; | |
252 | } | |
253 | } | |
254 | { | |
255 | wxPy_BEGIN_ALLOW_THREADS; | |
256 | wxGLContext_SwapBuffers(_arg0); | |
257 | ||
258 | wxPy_END_ALLOW_THREADS; | |
259 | } Py_INCREF(Py_None); | |
260 | _resultobj = Py_None; | |
261 | return _resultobj; | |
262 | } | |
263 | ||
264 | #define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow()) | |
265 | static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { | |
266 | PyObject * _resultobj; | |
267 | wxWindow * _result; | |
268 | wxGLContext * _arg0; | |
269 | PyObject * _argo0 = 0; | |
270 | char *_kwnames[] = { "self", NULL }; | |
271 | ||
272 | self = self; | |
273 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0)) | |
274 | return NULL; | |
275 | if (_argo0) { | |
276 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
277 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) { | |
278 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p."); | |
279 | return NULL; | |
280 | } | |
281 | } | |
282 | { | |
283 | wxPy_BEGIN_ALLOW_THREADS; | |
284 | _result = (wxWindow *)wxGLContext_GetWindow(_arg0); | |
285 | ||
286 | wxPy_END_ALLOW_THREADS; | |
287 | }{ _resultobj = wxPyMake_wxObject(_result); } | |
288 | return _resultobj; | |
289 | } | |
290 | ||
291 | static void *SwigwxGLCanvasTowxScrolledWindow(void *ptr) { | |
292 | wxGLCanvas *src; | |
293 | wxScrolledWindow *dest; | |
294 | src = (wxGLCanvas *) ptr; | |
295 | dest = (wxScrolledWindow *) src; | |
296 | return (void *) dest; | |
297 | } | |
298 | ||
299 | static void *SwigwxGLCanvasTowxPanel(void *ptr) { | |
300 | wxGLCanvas *src; | |
301 | wxPanel *dest; | |
302 | src = (wxGLCanvas *) ptr; | |
303 | dest = (wxPanel *) src; | |
304 | return (void *) dest; | |
305 | } | |
306 | ||
307 | static void *SwigwxGLCanvasTowxWindow(void *ptr) { | |
308 | wxGLCanvas *src; | |
309 | wxWindow *dest; | |
310 | src = (wxGLCanvas *) ptr; | |
311 | dest = (wxWindow *) src; | |
312 | return (void *) dest; | |
313 | } | |
314 | ||
315 | static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) { | |
316 | wxGLCanvas *src; | |
317 | wxEvtHandler *dest; | |
318 | src = (wxGLCanvas *) ptr; | |
319 | dest = (wxEvtHandler *) src; | |
320 | return (void *) dest; | |
321 | } | |
322 | ||
323 | static void *SwigwxGLCanvasTowxObject(void *ptr) { | |
324 | wxGLCanvas *src; | |
325 | wxObject *dest; | |
326 | src = (wxGLCanvas *) ptr; | |
327 | dest = (wxObject *) src; | |
328 | return (void *) dest; | |
329 | } | |
330 | ||
331 | #define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) | |
332 | static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) { | |
333 | PyObject * _resultobj; | |
334 | wxGLCanvas * _result; | |
335 | wxWindow * _arg0; | |
336 | wxWindowID _arg1 = (wxWindowID ) -1; | |
337 | wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; | |
338 | wxSize * _arg3 = (wxSize *) &wxDefaultSize; | |
339 | long _arg4 = (long ) 0; | |
340 | char * _arg5 = (char *) "GLCanvas"; | |
341 | int * _arg6 = (int *) NULL; | |
342 | wxPalette * _arg7 = (wxPalette *) &wxNullPalette; | |
343 | PyObject * _argo0 = 0; | |
344 | wxPoint temp; | |
345 | PyObject * _obj2 = 0; | |
346 | wxSize temp0; | |
347 | PyObject * _obj3 = 0; | |
348 | int * temp1; | |
349 | PyObject * _obj6 = 0; | |
350 | PyObject * _argo7 = 0; | |
351 | char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL }; | |
352 | char _ptemp[128]; | |
353 | ||
354 | self = self; | |
355 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7)) | |
356 | return NULL; | |
357 | if (_argo0) { | |
358 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
359 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { | |
360 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p."); | |
361 | return NULL; | |
362 | } | |
363 | } | |
364 | if (_obj2) | |
365 | { | |
366 | _arg2 = &temp; | |
367 | if (! wxPoint_helper(_obj2, &_arg2)) | |
368 | return NULL; | |
369 | } | |
370 | if (_obj3) | |
371 | { | |
372 | _arg3 = &temp0; | |
373 | if (! wxSize_helper(_obj3, &_arg3)) | |
374 | return NULL; | |
375 | } | |
376 | if (_obj6) | |
377 | { | |
378 | int i; | |
379 | if (PySequence_Check(_obj6)) { | |
380 | int size = PyObject_Length(_obj6); | |
381 | temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); | |
382 | for (i = 0; i < size; i++) { | |
383 | temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i)); | |
384 | } | |
385 | temp1[size] = 0; | |
386 | _arg6 = temp1; | |
387 | } | |
388 | } | |
389 | if (_argo7) { | |
390 | if (_argo7 == Py_None) { _arg7 = NULL; } | |
391 | else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { | |
392 | PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p."); | |
393 | return NULL; | |
394 | } | |
395 | } | |
396 | { | |
397 | wxPy_BEGIN_ALLOW_THREADS; | |
398 | _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); | |
399 | ||
400 | wxPy_END_ALLOW_THREADS; | |
401 | } if (_result) { | |
402 | SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p"); | |
403 | _resultobj = Py_BuildValue("s",_ptemp); | |
404 | } else { | |
405 | Py_INCREF(Py_None); | |
406 | _resultobj = Py_None; | |
407 | } | |
408 | { | |
409 | delete [] _arg6; | |
410 | } | |
411 | return _resultobj; | |
412 | } | |
413 | ||
414 | #define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) | |
415 | static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) { | |
416 | PyObject * _resultobj; | |
417 | wxGLCanvas * _result; | |
418 | wxWindow * _arg0; | |
419 | wxGLContext * _arg1 = (wxGLContext *) NULL; | |
420 | wxWindowID _arg2 = (wxWindowID ) -1; | |
421 | wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; | |
422 | wxSize * _arg4 = (wxSize *) &wxDefaultSize; | |
423 | long _arg5 = (long ) 0; | |
424 | char * _arg6 = (char *) "GLCanvas"; | |
425 | int * _arg7 = (int *) NULL; | |
426 | wxPalette * _arg8 = (wxPalette *) &wxNullPalette; | |
427 | PyObject * _argo0 = 0; | |
428 | PyObject * _argo1 = 0; | |
429 | wxPoint temp; | |
430 | PyObject * _obj3 = 0; | |
431 | wxSize temp0; | |
432 | PyObject * _obj4 = 0; | |
433 | int * temp1; | |
434 | PyObject * _obj7 = 0; | |
435 | PyObject * _argo8 = 0; | |
436 | char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL }; | |
437 | char _ptemp[128]; | |
438 | ||
439 | self = self; | |
440 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8)) | |
441 | return NULL; | |
442 | if (_argo0) { | |
443 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
444 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { | |
445 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p."); | |
446 | return NULL; | |
447 | } | |
448 | } | |
449 | if (_argo1) { | |
450 | if (_argo1 == Py_None) { _arg1 = NULL; } | |
451 | else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) { | |
452 | PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p."); | |
453 | return NULL; | |
454 | } | |
455 | } | |
456 | if (_obj3) | |
457 | { | |
458 | _arg3 = &temp; | |
459 | if (! wxPoint_helper(_obj3, &_arg3)) | |
460 | return NULL; | |
461 | } | |
462 | if (_obj4) | |
463 | { | |
464 | _arg4 = &temp0; | |
465 | if (! wxSize_helper(_obj4, &_arg4)) | |
466 | return NULL; | |
467 | } | |
468 | if (_obj7) | |
469 | { | |
470 | int i; | |
471 | if (PySequence_Check(_obj7)) { | |
472 | int size = PyObject_Length(_obj7); | |
473 | temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); | |
474 | for (i = 0; i < size; i++) { | |
475 | temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i)); | |
476 | } | |
477 | temp1[size] = 0; | |
478 | _arg7 = temp1; | |
479 | } | |
480 | } | |
481 | if (_argo8) { | |
482 | if (_argo8 == Py_None) { _arg8 = NULL; } | |
483 | else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) { | |
484 | PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p."); | |
485 | return NULL; | |
486 | } | |
487 | } | |
488 | { | |
489 | wxPy_BEGIN_ALLOW_THREADS; | |
490 | _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); | |
491 | ||
492 | wxPy_END_ALLOW_THREADS; | |
493 | } if (_result) { | |
494 | SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p"); | |
495 | _resultobj = Py_BuildValue("s",_ptemp); | |
496 | } else { | |
497 | Py_INCREF(Py_None); | |
498 | _resultobj = Py_None; | |
499 | } | |
500 | { | |
501 | delete [] _arg7; | |
502 | } | |
503 | return _resultobj; | |
504 | } | |
505 | ||
506 | #define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent()) | |
507 | static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) { | |
508 | PyObject * _resultobj; | |
509 | wxGLCanvas * _arg0; | |
510 | PyObject * _argo0 = 0; | |
511 | char *_kwnames[] = { "self", NULL }; | |
512 | ||
513 | self = self; | |
514 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0)) | |
515 | return NULL; | |
516 | if (_argo0) { | |
517 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
518 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
519 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p."); | |
520 | return NULL; | |
521 | } | |
522 | } | |
523 | { | |
524 | wxPy_BEGIN_ALLOW_THREADS; | |
525 | wxGLCanvas_SetCurrent(_arg0); | |
526 | ||
527 | wxPy_END_ALLOW_THREADS; | |
528 | } Py_INCREF(Py_None); | |
529 | _resultobj = Py_None; | |
530 | return _resultobj; | |
531 | } | |
532 | ||
533 | #define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) | |
534 | static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) { | |
535 | PyObject * _resultobj; | |
536 | wxGLCanvas * _arg0; | |
537 | char * _arg1; | |
538 | PyObject * _argo0 = 0; | |
539 | char *_kwnames[] = { "self","colour", NULL }; | |
540 | ||
541 | self = self; | |
542 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1)) | |
543 | return NULL; | |
544 | if (_argo0) { | |
545 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
546 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
547 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p."); | |
548 | return NULL; | |
549 | } | |
550 | } | |
551 | { | |
552 | wxPy_BEGIN_ALLOW_THREADS; | |
553 | wxGLCanvas_SetColour(_arg0,_arg1); | |
554 | ||
555 | wxPy_END_ALLOW_THREADS; | |
556 | } Py_INCREF(Py_None); | |
557 | _resultobj = Py_None; | |
558 | return _resultobj; | |
559 | } | |
560 | ||
561 | #define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers()) | |
562 | static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) { | |
563 | PyObject * _resultobj; | |
564 | wxGLCanvas * _arg0; | |
565 | PyObject * _argo0 = 0; | |
566 | char *_kwnames[] = { "self", NULL }; | |
567 | ||
568 | self = self; | |
569 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0)) | |
570 | return NULL; | |
571 | if (_argo0) { | |
572 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
573 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
574 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p."); | |
575 | return NULL; | |
576 | } | |
577 | } | |
578 | { | |
579 | wxPy_BEGIN_ALLOW_THREADS; | |
580 | wxGLCanvas_SwapBuffers(_arg0); | |
581 | ||
582 | wxPy_END_ALLOW_THREADS; | |
583 | } Py_INCREF(Py_None); | |
584 | _resultobj = Py_None; | |
585 | return _resultobj; | |
586 | } | |
587 | ||
588 | #define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext()) | |
589 | static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) { | |
590 | PyObject * _resultobj; | |
591 | wxGLContext * _result; | |
592 | wxGLCanvas * _arg0; | |
593 | PyObject * _argo0 = 0; | |
594 | char *_kwnames[] = { "self", NULL }; | |
595 | char _ptemp[128]; | |
596 | ||
597 | self = self; | |
598 | if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0)) | |
599 | return NULL; | |
600 | if (_argo0) { | |
601 | if (_argo0 == Py_None) { _arg0 = NULL; } | |
602 | else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) { | |
603 | PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p."); | |
604 | return NULL; | |
605 | } | |
606 | } | |
607 | { | |
608 | wxPy_BEGIN_ALLOW_THREADS; | |
609 | _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); | |
610 | ||
611 | wxPy_END_ALLOW_THREADS; | |
612 | } if (_result) { | |
613 | SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p"); | |
614 | _resultobj = Py_BuildValue("s",_ptemp); | |
615 | } else { | |
616 | Py_INCREF(Py_None); | |
617 | _resultobj = Py_None; | |
618 | } | |
619 | return _resultobj; | |
620 | } | |
621 | ||
622 | static PyMethodDef glcanvascMethods[] = { | |
623 | { "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS }, | |
624 | { "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS }, | |
625 | { "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS }, | |
626 | { "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS }, | |
627 | { "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS }, | |
628 | { "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS }, | |
629 | { "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS }, | |
630 | { "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS }, | |
631 | { "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS }, | |
632 | { "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS }, | |
633 | { "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS }, | |
634 | { "new_wxGLContext", (PyCFunction) _wrap_new_wxGLContext, METH_VARARGS | METH_KEYWORDS }, | |
635 | { NULL, NULL } | |
636 | }; | |
637 | #ifdef __cplusplus | |
638 | } | |
639 | #endif | |
640 | /* | |
641 | * This table is used by the pointer type-checker | |
642 | */ | |
643 | static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { | |
644 | { "_signed_long","_long",0}, | |
645 | { "_wxPrintQuality","_wxCoord",0}, | |
646 | { "_wxPrintQuality","_int",0}, | |
647 | { "_wxPrintQuality","_signed_int",0}, | |
648 | { "_wxPrintQuality","_unsigned_int",0}, | |
649 | { "_wxPrintQuality","_wxWindowID",0}, | |
650 | { "_wxPrintQuality","_uint",0}, | |
651 | { "_wxPrintQuality","_EBool",0}, | |
652 | { "_wxPrintQuality","_size_t",0}, | |
653 | { "_wxPrintQuality","_time_t",0}, | |
654 | { "_byte","_unsigned_char",0}, | |
655 | { "_long","_unsigned_long",0}, | |
656 | { "_long","_signed_long",0}, | |
657 | { "_size_t","_wxCoord",0}, | |
658 | { "_size_t","_wxPrintQuality",0}, | |
659 | { "_size_t","_time_t",0}, | |
660 | { "_size_t","_unsigned_int",0}, | |
661 | { "_size_t","_int",0}, | |
662 | { "_size_t","_wxWindowID",0}, | |
663 | { "_size_t","_uint",0}, | |
664 | { "_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel}, | |
665 | { "_uint","_wxCoord",0}, | |
666 | { "_uint","_wxPrintQuality",0}, | |
667 | { "_uint","_time_t",0}, | |
668 | { "_uint","_size_t",0}, | |
669 | { "_uint","_unsigned_int",0}, | |
670 | { "_uint","_int",0}, | |
671 | { "_uint","_wxWindowID",0}, | |
672 | { "_wxChar","_char",0}, | |
673 | { "_char","_wxChar",0}, | |
674 | { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0}, | |
675 | { "_EBool","_wxCoord",0}, | |
676 | { "_EBool","_wxPrintQuality",0}, | |
677 | { "_EBool","_signed_int",0}, | |
678 | { "_EBool","_int",0}, | |
679 | { "_EBool","_wxWindowID",0}, | |
680 | { "_unsigned_long","_long",0}, | |
681 | { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0}, | |
682 | { "_signed_int","_wxCoord",0}, | |
683 | { "_signed_int","_wxPrintQuality",0}, | |
684 | { "_signed_int","_EBool",0}, | |
685 | { "_signed_int","_wxWindowID",0}, | |
686 | { "_signed_int","_int",0}, | |
687 | { "_WXTYPE","_wxDateTime_t",0}, | |
688 | { "_WXTYPE","_short",0}, | |
689 | { "_WXTYPE","_signed_short",0}, | |
690 | { "_WXTYPE","_unsigned_short",0}, | |
691 | { "_unsigned_short","_wxDateTime_t",0}, | |
692 | { "_unsigned_short","_WXTYPE",0}, | |
693 | { "_unsigned_short","_short",0}, | |
694 | { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject}, | |
695 | { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, | |
696 | { "_signed_short","_WXTYPE",0}, | |
697 | { "_signed_short","_short",0}, | |
698 | { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, | |
699 | { "_unsigned_char","_byte",0}, | |
700 | { "_unsigned_int","_wxCoord",0}, | |
701 | { "_unsigned_int","_wxPrintQuality",0}, | |
702 | { "_unsigned_int","_time_t",0}, | |
703 | { "_unsigned_int","_size_t",0}, | |
704 | { "_unsigned_int","_uint",0}, | |
705 | { "_unsigned_int","_wxWindowID",0}, | |
706 | { "_unsigned_int","_int",0}, | |
707 | { "_short","_wxDateTime_t",0}, | |
708 | { "_short","_WXTYPE",0}, | |
709 | { "_short","_unsigned_short",0}, | |
710 | { "_short","_signed_short",0}, | |
711 | { "_wxWindowID","_wxCoord",0}, | |
712 | { "_wxWindowID","_wxPrintQuality",0}, | |
713 | { "_wxWindowID","_time_t",0}, | |
714 | { "_wxWindowID","_size_t",0}, | |
715 | { "_wxWindowID","_EBool",0}, | |
716 | { "_wxWindowID","_uint",0}, | |
717 | { "_wxWindowID","_int",0}, | |
718 | { "_wxWindowID","_signed_int",0}, | |
719 | { "_wxWindowID","_unsigned_int",0}, | |
720 | { "_int","_wxCoord",0}, | |
721 | { "_int","_wxPrintQuality",0}, | |
722 | { "_int","_time_t",0}, | |
723 | { "_int","_size_t",0}, | |
724 | { "_int","_EBool",0}, | |
725 | { "_int","_uint",0}, | |
726 | { "_int","_wxWindowID",0}, | |
727 | { "_int","_unsigned_int",0}, | |
728 | { "_int","_signed_int",0}, | |
729 | { "_wxDateTime_t","_unsigned_short",0}, | |
730 | { "_wxDateTime_t","_short",0}, | |
731 | { "_wxDateTime_t","_WXTYPE",0}, | |
732 | { "_time_t","_wxCoord",0}, | |
733 | { "_time_t","_wxPrintQuality",0}, | |
734 | { "_time_t","_unsigned_int",0}, | |
735 | { "_time_t","_int",0}, | |
736 | { "_time_t","_wxWindowID",0}, | |
737 | { "_time_t","_uint",0}, | |
738 | { "_time_t","_size_t",0}, | |
739 | { "_wxCoord","_int",0}, | |
740 | { "_wxCoord","_signed_int",0}, | |
741 | { "_wxCoord","_unsigned_int",0}, | |
742 | { "_wxCoord","_wxWindowID",0}, | |
743 | { "_wxCoord","_uint",0}, | |
744 | { "_wxCoord","_EBool",0}, | |
745 | { "_wxCoord","_size_t",0}, | |
746 | { "_wxCoord","_time_t",0}, | |
747 | { "_wxCoord","_wxPrintQuality",0}, | |
748 | { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, | |
749 | { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, | |
750 | {0,0,0}}; | |
751 | ||
752 | static PyObject *SWIG_globals; | |
753 | #ifdef __cplusplus | |
754 | extern "C" | |
755 | #endif | |
756 | SWIGEXPORT(void) initglcanvasc() { | |
757 | PyObject *m, *d; | |
758 | SWIG_globals = SWIG_newvarlink(); | |
759 | m = Py_InitModule("glcanvasc", glcanvascMethods); | |
760 | d = PyModule_GetDict(m); | |
761 | ||
762 | ||
763 | wxClassInfo::CleanUpClasses(); | |
764 | wxClassInfo::InitializeClasses(); | |
765 | ||
766 | { | |
767 | int i; | |
768 | for (i = 0; _swig_mapping[i].n1; i++) | |
769 | SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); | |
770 | } | |
771 | } |