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