]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/glcanvas/gtk/glcanvas.cpp
An incorrect patch to SWIG caused incorrect generated code. Fixed and regenerated.
[wxWidgets.git] / wxPython / contrib / glcanvas / gtk / glcanvas.cpp
CommitLineData
a29cd6c0 1/*
2cd2fac8 2 * FILE : contrib/glcanvas/gtk/glcanvas.cpp
a29cd6c0
HH
3 *
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
2cd2fac8 6 * Version 1.1 (Build 883)
a29cd6c0
HH
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)
f786a3b2 27# define SWIGEXPORT(a) __declspec(dllexport) a
a29cd6c0
HH
28# else
29# if defined(__BORLANDC__)
3bcd5e1c 30# define SWIGEXPORT(a) a _export
a29cd6c0 31# else
3bcd5e1c 32# define SWIGEXPORT(a) a
a29cd6c0
HH
33# endif
34# endif
35#else
3bcd5e1c 36# define SWIGEXPORT(a) a
a29cd6c0
HH
37#endif
38
3bcd5e1c
RD
39#include "Python.h"
40
a29cd6c0
HH
41#ifdef __cplusplus
42extern "C" {
43#endif
3bcd5e1c 44
a29cd6c0
HH
45extern void SWIG_MakePtr(char *, void *, char *);
46extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47extern char *SWIG_GetPtr(char *, void **, char *);
f786a3b2 48extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
a29cd6c0
HH
49extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
50extern PyObject *SWIG_newvarlink(void);
51#ifdef __cplusplus
52}
53#endif
a29cd6c0
HH
54#define SWIG_init initglcanvasc
55
56#define SWIG_name "glcanvasc"
57
b68dc582 58#include "export.h"
4662be59
RD
59#ifdef __WXMSW__
60#include "myglcanvas.h"
61#else
7ff49f0c 62#include <wx/glcanvas.h>
4662be59
RD
63#endif
64
a29cd6c0 65
a29cd6c0
HH
66
67static PyObject* t_output_helper(PyObject* target, PyObject* o) {
68 PyObject* o2;
69 PyObject* o3;
70
3bcd5e1c 71 if (!target) {
a29cd6c0 72 target = o;
3bcd5e1c 73 } else if (target == Py_None) {
a29cd6c0
HH
74 Py_DECREF(Py_None);
75 target = o;
3bcd5e1c 76 } else {
a29cd6c0
HH
77 if (!PyTuple_Check(target)) {
78 o2 = target;
79 target = PyTuple_New(1);
80 PyTuple_SetItem(target, 0, o2);
81 }
3bcd5e1c
RD
82 o3 = PyTuple_New(1);
83 PyTuple_SetItem(o3, 0, o);
a29cd6c0
HH
84
85 o2 = target;
3bcd5e1c
RD
86 target = PySequence_Concat(o2, o3);
87 Py_DECREF(o2);
a29cd6c0
HH
88 Py_DECREF(o3);
89 }
90 return target;
91}
92
7a446686
RD
93#if PYTHON_API_VERSION >= 1009
94 static char* wxStringErrorMsg = "String or Unicode type required";
95#else
0220cbc1 96 static char* wxStringErrorMsg = "String type required";
7a446686 97#endif
54b96882
RD
98#ifdef __cplusplus
99extern "C" {
100#endif
9df61a29
RD
101static void *SwigwxGLContextTowxObject(void *ptr) {
102 wxGLContext *src;
103 wxObject *dest;
104 src = (wxGLContext *) ptr;
105 dest = (wxObject *) src;
106 return (void *) dest;
107}
108
a29cd6c0 109#define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
107e4716 110static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
111 PyObject * _resultobj;
112 wxGLContext * _result;
113 bool _arg0;
114 wxGLCanvas * _arg1;
f786a3b2 115 wxPalette * _arg2 = (wxPalette *) &wxNullPalette;
a29cd6c0 116 int tempbool0;
f786a3b2
HH
117 PyObject * _argo1 = 0;
118 PyObject * _argo2 = 0;
107e4716 119 char *_kwnames[] = { "isRGB","win","palette", NULL };
a29cd6c0
HH
120 char _ptemp[128];
121
122 self = self;
107e4716 123 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iO|O:new_wxGLContext",_kwnames,&tempbool0,&_argo1,&_argo2))
a29cd6c0
HH
124 return NULL;
125 _arg0 = (bool ) tempbool0;
f786a3b2
HH
126 if (_argo1) {
127 if (_argo1 == Py_None) { _arg1 = NULL; }
128 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLCanvas_p")) {
a29cd6c0
HH
129 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
130 return NULL;
131 }
132 }
f786a3b2
HH
133 if (_argo2) {
134 if (_argo2 == Py_None) { _arg2 = NULL; }
135 else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) {
a29cd6c0
HH
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;
f786a3b2
HH
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 }
a29cd6c0
HH
152 return _resultobj;
153}
154
155#define delete_wxGLContext(_swigobj) (delete _swigobj)
107e4716 156static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
157 PyObject * _resultobj;
158 wxGLContext * _arg0;
f786a3b2 159 PyObject * _argo0 = 0;
107e4716 160 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
161
162 self = self;
107e4716 163 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0))
a29cd6c0 164 return NULL;
f786a3b2
HH
165 if (_argo0) {
166 if (_argo0 == Py_None) { _arg0 = NULL; }
167 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
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())
107e4716 183static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
184 PyObject * _resultobj;
185 wxGLContext * _arg0;
f786a3b2 186 PyObject * _argo0 = 0;
107e4716 187 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
188
189 self = self;
107e4716 190 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0))
a29cd6c0 191 return NULL;
f786a3b2
HH
192 if (_argo0) {
193 if (_argo0 == Py_None) { _arg0 = NULL; }
194 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
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))
107e4716 210static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
211 PyObject * _resultobj;
212 wxGLContext * _arg0;
213 char * _arg1;
f786a3b2 214 PyObject * _argo0 = 0;
107e4716 215 char *_kwnames[] = { "self","colour", NULL };
a29cd6c0
HH
216
217 self = self;
107e4716 218 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1))
a29cd6c0 219 return NULL;
f786a3b2
HH
220 if (_argo0) {
221 if (_argo0 == Py_None) { _arg0 = NULL; }
222 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
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())
107e4716 238static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
239 PyObject * _resultobj;
240 wxGLContext * _arg0;
f786a3b2 241 PyObject * _argo0 = 0;
107e4716 242 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
243
244 self = self;
107e4716 245 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0))
a29cd6c0 246 return NULL;
f786a3b2
HH
247 if (_argo0) {
248 if (_argo0 == Py_None) { _arg0 = NULL; }
249 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
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_SetupPixelFormat(_swigobj) (_swigobj->SetupPixelFormat())
107e4716 265static PyObject *_wrap_wxGLContext_SetupPixelFormat(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
266 PyObject * _resultobj;
267 wxGLContext * _arg0;
f786a3b2 268 PyObject * _argo0 = 0;
107e4716 269 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
270
271 self = self;
107e4716 272 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetupPixelFormat",_kwnames,&_argo0))
a29cd6c0 273 return NULL;
f786a3b2
HH
274 if (_argo0) {
275 if (_argo0 == Py_None) { _arg0 = NULL; }
276 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
277 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPixelFormat. Expected _wxGLContext_p.");
278 return NULL;
279 }
280 }
281{
282 wxPy_BEGIN_ALLOW_THREADS;
283 wxGLContext_SetupPixelFormat(_arg0);
284
285 wxPy_END_ALLOW_THREADS;
286} Py_INCREF(Py_None);
287 _resultobj = Py_None;
288 return _resultobj;
289}
290
291#define wxGLContext_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
107e4716 292static PyObject *_wrap_wxGLContext_SetupPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
293 PyObject * _resultobj;
294 wxGLContext * _arg0;
295 wxPalette * _arg1;
f786a3b2
HH
296 PyObject * _argo0 = 0;
297 PyObject * _argo1 = 0;
107e4716 298 char *_kwnames[] = { "self","palette", NULL };
a29cd6c0
HH
299
300 self = self;
107e4716 301 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetupPalette",_kwnames,&_argo0,&_argo1))
a29cd6c0 302 return NULL;
f786a3b2
HH
303 if (_argo0) {
304 if (_argo0 == Py_None) { _arg0 = NULL; }
305 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
306 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPalette. Expected _wxGLContext_p.");
307 return NULL;
308 }
309 }
f786a3b2
HH
310 if (_argo1) {
311 if (_argo1 == Py_None) { _arg1 = NULL; }
312 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) {
a29cd6c0
HH
313 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLContext_SetupPalette. Expected _wxPalette_p.");
314 return NULL;
315 }
316 }
317{
318 wxPy_BEGIN_ALLOW_THREADS;
319 wxGLContext_SetupPalette(_arg0,*_arg1);
320
321 wxPy_END_ALLOW_THREADS;
322} Py_INCREF(Py_None);
323 _resultobj = Py_None;
324 return _resultobj;
325}
326
327#define wxGLContext_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
107e4716 328static PyObject *_wrap_wxGLContext_CreateDefaultPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
329 PyObject * _resultobj;
330 wxPalette * _result;
331 wxGLContext * _arg0;
f786a3b2 332 PyObject * _argo0 = 0;
107e4716 333 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
334 char _ptemp[128];
335
336 self = self;
107e4716 337 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_CreateDefaultPalette",_kwnames,&_argo0))
a29cd6c0 338 return NULL;
f786a3b2
HH
339 if (_argo0) {
340 if (_argo0 == Py_None) { _arg0 = NULL; }
341 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
342 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_CreateDefaultPalette. Expected _wxGLContext_p.");
343 return NULL;
344 }
345 }
346{
347 wxPy_BEGIN_ALLOW_THREADS;
348 _result = new wxPalette (wxGLContext_CreateDefaultPalette(_arg0));
349
350 wxPy_END_ALLOW_THREADS;
351} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPalette_p");
352 _resultobj = Py_BuildValue("s",_ptemp);
353 return _resultobj;
354}
355
356#define wxGLContext_GetPalette(_swigobj) (_swigobj->GetPalette())
107e4716 357static PyObject *_wrap_wxGLContext_GetPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
358 PyObject * _resultobj;
359 wxPalette * _result;
360 wxGLContext * _arg0;
f786a3b2 361 PyObject * _argo0 = 0;
107e4716 362 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
363 char _ptemp[128];
364
365 self = self;
107e4716 366 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetPalette",_kwnames,&_argo0))
a29cd6c0 367 return NULL;
f786a3b2
HH
368 if (_argo0) {
369 if (_argo0 == Py_None) { _arg0 = NULL; }
370 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
371 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetPalette. Expected _wxGLContext_p.");
372 return NULL;
373 }
374 }
375{
376 wxPy_BEGIN_ALLOW_THREADS;
377 _result = (wxPalette *)wxGLContext_GetPalette(_arg0);
378
379 wxPy_END_ALLOW_THREADS;
f786a3b2
HH
380} if (_result) {
381 SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p");
382 _resultobj = Py_BuildValue("s",_ptemp);
383 } else {
384 Py_INCREF(Py_None);
385 _resultobj = Py_None;
386 }
a29cd6c0
HH
387 return _resultobj;
388}
389
390#define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
107e4716 391static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
392 PyObject * _resultobj;
393 wxWindow * _result;
394 wxGLContext * _arg0;
f786a3b2 395 PyObject * _argo0 = 0;
107e4716 396 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
397
398 self = self;
107e4716 399 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0))
a29cd6c0 400 return NULL;
f786a3b2
HH
401 if (_argo0) {
402 if (_argo0 == Py_None) { _arg0 = NULL; }
403 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
a29cd6c0
HH
404 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
405 return NULL;
406 }
407 }
408{
409 wxPy_BEGIN_ALLOW_THREADS;
410 _result = (wxWindow *)wxGLContext_GetWindow(_arg0);
411
412 wxPy_END_ALLOW_THREADS;
9df61a29 413}{ _resultobj = wxPyMake_wxObject(_result); }
a29cd6c0
HH
414 return _resultobj;
415}
416
417static void *SwigwxGLCanvasTowxScrolledWindow(void *ptr) {
418 wxGLCanvas *src;
419 wxScrolledWindow *dest;
420 src = (wxGLCanvas *) ptr;
421 dest = (wxScrolledWindow *) src;
422 return (void *) dest;
423}
424
425static void *SwigwxGLCanvasTowxPanel(void *ptr) {
426 wxGLCanvas *src;
427 wxPanel *dest;
428 src = (wxGLCanvas *) ptr;
429 dest = (wxPanel *) src;
430 return (void *) dest;
431}
432
433static void *SwigwxGLCanvasTowxWindow(void *ptr) {
434 wxGLCanvas *src;
435 wxWindow *dest;
436 src = (wxGLCanvas *) ptr;
437 dest = (wxWindow *) src;
438 return (void *) dest;
439}
440
441static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) {
442 wxGLCanvas *src;
443 wxEvtHandler *dest;
444 src = (wxGLCanvas *) ptr;
445 dest = (wxEvtHandler *) src;
446 return (void *) dest;
447}
448
9df61a29
RD
449static void *SwigwxGLCanvasTowxObject(void *ptr) {
450 wxGLCanvas *src;
451 wxObject *dest;
452 src = (wxGLCanvas *) ptr;
453 dest = (wxObject *) src;
454 return (void *) dest;
455}
456
a29cd6c0 457#define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
107e4716 458static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
459 PyObject * _resultobj;
460 wxGLCanvas * _result;
461 wxWindow * _arg0;
f786a3b2 462 wxWindowID _arg1 = (wxWindowID ) -1;
b68dc582
RD
463 wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
464 wxSize * _arg3 = (wxSize *) &wxDefaultSize;
f786a3b2
HH
465 long _arg4 = (long ) 0;
466 char * _arg5 = (char *) "GLCanvas";
c368d904 467 int * _arg6 = (int *) NULL;
f786a3b2
HH
468 wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
469 PyObject * _argo0 = 0;
54b96882
RD
470 wxPoint temp;
471 PyObject * _obj2 = 0;
472 wxSize temp0;
473 PyObject * _obj3 = 0;
c368d904
RD
474 int * temp1;
475 PyObject * _obj6 = 0;
f786a3b2 476 PyObject * _argo7 = 0;
107e4716 477 char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL };
a29cd6c0
HH
478 char _ptemp[128];
479
480 self = self;
c368d904 481 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7))
a29cd6c0 482 return NULL;
f786a3b2
HH
483 if (_argo0) {
484 if (_argo0 == Py_None) { _arg0 = NULL; }
485 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
a29cd6c0
HH
486 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvas. Expected _wxWindow_p.");
487 return NULL;
488 }
489 }
54b96882
RD
490 if (_obj2)
491{
492 _arg2 = &temp;
493 if (! wxPoint_helper(_obj2, &_arg2))
a29cd6c0 494 return NULL;
54b96882
RD
495}
496 if (_obj3)
497{
498 _arg3 = &temp0;
499 if (! wxSize_helper(_obj3, &_arg3))
a29cd6c0 500 return NULL;
54b96882 501}
c368d904
RD
502 if (_obj6)
503{
504 int i;
505 if (PySequence_Check(_obj6)) {
506 int size = PyObject_Length(_obj6);
507 temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
508 for (i = 0; i < size; i++) {
509 temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i));
a29cd6c0 510 }
c368d904
RD
511 temp1[size] = 0;
512 _arg6 = temp1;
a29cd6c0 513 }
c368d904 514}
f786a3b2
HH
515 if (_argo7) {
516 if (_argo7 == Py_None) { _arg7 = NULL; }
517 else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
a29cd6c0
HH
518 PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
519 return NULL;
520 }
521 }
522{
523 wxPy_BEGIN_ALLOW_THREADS;
524 _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7);
525
526 wxPy_END_ALLOW_THREADS;
f786a3b2
HH
527} if (_result) {
528 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
529 _resultobj = Py_BuildValue("s",_ptemp);
530 } else {
531 Py_INCREF(Py_None);
532 _resultobj = Py_None;
533 }
c368d904
RD
534{
535 delete [] _arg6;
536}
a29cd6c0
HH
537 return _resultobj;
538}
539
0220cbc1
RD
540#define new_wxGLCanvasWithContext(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8))
541static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) {
542 PyObject * _resultobj;
543 wxGLCanvas * _result;
544 wxWindow * _arg0;
545 wxGLContext * _arg1 = (wxGLContext *) NULL;
546 wxWindowID _arg2 = (wxWindowID ) -1;
547 wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
548 wxSize * _arg4 = (wxSize *) &wxDefaultSize;
549 long _arg5 = (long ) 0;
550 char * _arg6 = (char *) "GLCanvas";
551 int * _arg7 = (int *) NULL;
552 wxPalette * _arg8 = (wxPalette *) &wxNullPalette;
553 PyObject * _argo0 = 0;
554 PyObject * _argo1 = 0;
555 wxPoint temp;
556 PyObject * _obj3 = 0;
557 wxSize temp0;
558 PyObject * _obj4 = 0;
559 int * temp1;
560 PyObject * _obj7 = 0;
561 PyObject * _argo8 = 0;
562 char *_kwnames[] = { "parent","shared","id","pos","size","style","name","attribList","palette", NULL };
563 char _ptemp[128];
564
565 self = self;
566 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOOlsOO:new_wxGLCanvasWithContext",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_obj7,&_argo8))
567 return NULL;
568 if (_argo0) {
569 if (_argo0 == Py_None) { _arg0 = NULL; }
570 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
571 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGLCanvasWithContext. Expected _wxWindow_p.");
572 return NULL;
573 }
574 }
575 if (_argo1) {
576 if (_argo1 == Py_None) { _arg1 = NULL; }
577 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLContext_p")) {
578 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLCanvasWithContext. Expected _wxGLContext_p.");
579 return NULL;
580 }
581 }
582 if (_obj3)
583{
584 _arg3 = &temp;
585 if (! wxPoint_helper(_obj3, &_arg3))
586 return NULL;
587}
588 if (_obj4)
589{
590 _arg4 = &temp0;
591 if (! wxSize_helper(_obj4, &_arg4))
592 return NULL;
593}
594 if (_obj7)
595{
596 int i;
597 if (PySequence_Check(_obj7)) {
598 int size = PyObject_Length(_obj7);
599 temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
600 for (i = 0; i < size; i++) {
601 temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj7, i));
602 }
603 temp1[size] = 0;
604 _arg7 = temp1;
605 }
606}
607 if (_argo8) {
608 if (_argo8 == Py_None) { _arg8 = NULL; }
609 else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) {
610 PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p.");
611 return NULL;
612 }
613 }
614{
615 wxPy_BEGIN_ALLOW_THREADS;
616 _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8);
617
618 wxPy_END_ALLOW_THREADS;
619} if (_result) {
620 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
621 _resultobj = Py_BuildValue("s",_ptemp);
622 } else {
623 Py_INCREF(Py_None);
624 _resultobj = Py_None;
625 }
626{
627 delete [] _arg7;
628}
629 return _resultobj;
630}
631
a29cd6c0 632#define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
107e4716 633static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
634 PyObject * _resultobj;
635 wxGLCanvas * _arg0;
f786a3b2 636 PyObject * _argo0 = 0;
107e4716 637 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
638
639 self = self;
107e4716 640 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0))
a29cd6c0 641 return NULL;
f786a3b2
HH
642 if (_argo0) {
643 if (_argo0 == Py_None) { _arg0 = NULL; }
644 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
a29cd6c0
HH
645 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
646 return NULL;
647 }
648 }
649{
650 wxPy_BEGIN_ALLOW_THREADS;
651 wxGLCanvas_SetCurrent(_arg0);
652
653 wxPy_END_ALLOW_THREADS;
654} Py_INCREF(Py_None);
655 _resultobj = Py_None;
656 return _resultobj;
657}
658
659#define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
107e4716 660static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
661 PyObject * _resultobj;
662 wxGLCanvas * _arg0;
663 char * _arg1;
f786a3b2 664 PyObject * _argo0 = 0;
107e4716 665 char *_kwnames[] = { "self","colour", NULL };
a29cd6c0
HH
666
667 self = self;
107e4716 668 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1))
a29cd6c0 669 return NULL;
f786a3b2
HH
670 if (_argo0) {
671 if (_argo0 == Py_None) { _arg0 = NULL; }
672 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
a29cd6c0
HH
673 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
674 return NULL;
675 }
676 }
677{
678 wxPy_BEGIN_ALLOW_THREADS;
679 wxGLCanvas_SetColour(_arg0,_arg1);
680
681 wxPy_END_ALLOW_THREADS;
682} Py_INCREF(Py_None);
683 _resultobj = Py_None;
684 return _resultobj;
685}
686
687#define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
107e4716 688static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
689 PyObject * _resultobj;
690 wxGLCanvas * _arg0;
f786a3b2 691 PyObject * _argo0 = 0;
107e4716 692 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
693
694 self = self;
107e4716 695 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0))
a29cd6c0 696 return NULL;
f786a3b2
HH
697 if (_argo0) {
698 if (_argo0 == Py_None) { _arg0 = NULL; }
699 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
a29cd6c0
HH
700 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
701 return NULL;
702 }
703 }
704{
705 wxPy_BEGIN_ALLOW_THREADS;
706 wxGLCanvas_SwapBuffers(_arg0);
707
708 wxPy_END_ALLOW_THREADS;
709} Py_INCREF(Py_None);
710 _resultobj = Py_None;
711 return _resultobj;
712}
713
714#define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
107e4716 715static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) {
a29cd6c0
HH
716 PyObject * _resultobj;
717 wxGLContext * _result;
718 wxGLCanvas * _arg0;
f786a3b2 719 PyObject * _argo0 = 0;
107e4716 720 char *_kwnames[] = { "self", NULL };
a29cd6c0
HH
721 char _ptemp[128];
722
723 self = self;
107e4716 724 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0))
a29cd6c0 725 return NULL;
f786a3b2
HH
726 if (_argo0) {
727 if (_argo0 == Py_None) { _arg0 = NULL; }
728 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
a29cd6c0
HH
729 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
730 return NULL;
731 }
732 }
733{
734 wxPy_BEGIN_ALLOW_THREADS;
735 _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
736
737 wxPy_END_ALLOW_THREADS;
f786a3b2
HH
738} if (_result) {
739 SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
740 _resultobj = Py_BuildValue("s",_ptemp);
741 } else {
742 Py_INCREF(Py_None);
743 _resultobj = Py_None;
744 }
a29cd6c0
HH
745 return _resultobj;
746}
747
748static PyMethodDef glcanvascMethods[] = {
107e4716
RD
749 { "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS },
750 { "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
751 { "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS },
752 { "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS },
0220cbc1 753 { "new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS },
107e4716
RD
754 { "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS },
755 { "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS },
756 { "wxGLContext_GetPalette", (PyCFunction) _wrap_wxGLContext_GetPalette, METH_VARARGS | METH_KEYWORDS },
757 { "wxGLContext_CreateDefaultPalette", (PyCFunction) _wrap_wxGLContext_CreateDefaultPalette, METH_VARARGS | METH_KEYWORDS },
758 { "wxGLContext_SetupPalette", (PyCFunction) _wrap_wxGLContext_SetupPalette, METH_VARARGS | METH_KEYWORDS },
759 { "wxGLContext_SetupPixelFormat", (PyCFunction) _wrap_wxGLContext_SetupPixelFormat, METH_VARARGS | METH_KEYWORDS },
760 { "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
761 { "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS },
762 { "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS },
763 { "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS },
764 { "new_wxGLContext", (PyCFunction) _wrap_new_wxGLContext, METH_VARARGS | METH_KEYWORDS },
a29cd6c0
HH
765 { NULL, NULL }
766};
f786a3b2
HH
767#ifdef __cplusplus
768}
769#endif
770/*
771 * This table is used by the pointer type-checker
772 */
773static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
f786a3b2 774 { "_signed_long","_long",0},
54b96882 775 { "_wxPrintQuality","_wxCoord",0},
f786a3b2
HH
776 { "_wxPrintQuality","_int",0},
777 { "_wxPrintQuality","_signed_int",0},
778 { "_wxPrintQuality","_unsigned_int",0},
779 { "_wxPrintQuality","_wxWindowID",0},
780 { "_wxPrintQuality","_uint",0},
781 { "_wxPrintQuality","_EBool",0},
782 { "_wxPrintQuality","_size_t",0},
c368d904 783 { "_wxPrintQuality","_time_t",0},
f786a3b2 784 { "_byte","_unsigned_char",0},
f786a3b2
HH
785 { "_long","_unsigned_long",0},
786 { "_long","_signed_long",0},
54b96882 787 { "_size_t","_wxCoord",0},
f786a3b2 788 { "_size_t","_wxPrintQuality",0},
c368d904 789 { "_size_t","_time_t",0},
f786a3b2
HH
790 { "_size_t","_unsigned_int",0},
791 { "_size_t","_int",0},
792 { "_size_t","_wxWindowID",0},
793 { "_size_t","_uint",0},
f786a3b2 794 { "_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel},
54b96882 795 { "_uint","_wxCoord",0},
f786a3b2 796 { "_uint","_wxPrintQuality",0},
c368d904 797 { "_uint","_time_t",0},
f786a3b2
HH
798 { "_uint","_size_t",0},
799 { "_uint","_unsigned_int",0},
800 { "_uint","_int",0},
801 { "_uint","_wxWindowID",0},
f6bcfd97 802 { "_wxChar","_char",0},
f6bcfd97 803 { "_char","_wxChar",0},
32c988a3 804 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
54b96882 805 { "_EBool","_wxCoord",0},
f786a3b2
HH
806 { "_EBool","_wxPrintQuality",0},
807 { "_EBool","_signed_int",0},
808 { "_EBool","_int",0},
809 { "_EBool","_wxWindowID",0},
f786a3b2 810 { "_unsigned_long","_long",0},
32c988a3 811 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
54b96882 812 { "_signed_int","_wxCoord",0},
f786a3b2
HH
813 { "_signed_int","_wxPrintQuality",0},
814 { "_signed_int","_EBool",0},
815 { "_signed_int","_wxWindowID",0},
816 { "_signed_int","_int",0},
2cd2fac8 817 { "_WXTYPE","_wxDateTime_t",0},
f786a3b2
HH
818 { "_WXTYPE","_short",0},
819 { "_WXTYPE","_signed_short",0},
820 { "_WXTYPE","_unsigned_short",0},
2cd2fac8 821 { "_unsigned_short","_wxDateTime_t",0},
f786a3b2
HH
822 { "_unsigned_short","_WXTYPE",0},
823 { "_unsigned_short","_short",0},
9df61a29 824 { "_wxObject","_wxGLCanvas",SwigwxGLCanvasTowxObject},
9df61a29 825 { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject},
f786a3b2
HH
826 { "_signed_short","_WXTYPE",0},
827 { "_signed_short","_short",0},
f786a3b2 828 { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow},
f786a3b2 829 { "_unsigned_char","_byte",0},
54b96882 830 { "_unsigned_int","_wxCoord",0},
f786a3b2 831 { "_unsigned_int","_wxPrintQuality",0},
c368d904 832 { "_unsigned_int","_time_t",0},
f786a3b2
HH
833 { "_unsigned_int","_size_t",0},
834 { "_unsigned_int","_uint",0},
835 { "_unsigned_int","_wxWindowID",0},
836 { "_unsigned_int","_int",0},
2cd2fac8 837 { "_short","_wxDateTime_t",0},
f786a3b2
HH
838 { "_short","_WXTYPE",0},
839 { "_short","_unsigned_short",0},
840 { "_short","_signed_short",0},
54b96882 841 { "_wxWindowID","_wxCoord",0},
f786a3b2 842 { "_wxWindowID","_wxPrintQuality",0},
c368d904 843 { "_wxWindowID","_time_t",0},
f786a3b2
HH
844 { "_wxWindowID","_size_t",0},
845 { "_wxWindowID","_EBool",0},
846 { "_wxWindowID","_uint",0},
847 { "_wxWindowID","_int",0},
848 { "_wxWindowID","_signed_int",0},
849 { "_wxWindowID","_unsigned_int",0},
54b96882 850 { "_int","_wxCoord",0},
f786a3b2 851 { "_int","_wxPrintQuality",0},
c368d904 852 { "_int","_time_t",0},
f786a3b2
HH
853 { "_int","_size_t",0},
854 { "_int","_EBool",0},
855 { "_int","_uint",0},
856 { "_int","_wxWindowID",0},
857 { "_int","_unsigned_int",0},
858 { "_int","_signed_int",0},
2cd2fac8
RD
859 { "_wxDateTime_t","_unsigned_short",0},
860 { "_wxDateTime_t","_short",0},
861 { "_wxDateTime_t","_WXTYPE",0},
c368d904
RD
862 { "_time_t","_wxCoord",0},
863 { "_time_t","_wxPrintQuality",0},
864 { "_time_t","_unsigned_int",0},
865 { "_time_t","_int",0},
866 { "_time_t","_wxWindowID",0},
867 { "_time_t","_uint",0},
868 { "_time_t","_size_t",0},
54b96882
RD
869 { "_wxCoord","_int",0},
870 { "_wxCoord","_signed_int",0},
871 { "_wxCoord","_unsigned_int",0},
872 { "_wxCoord","_wxWindowID",0},
873 { "_wxCoord","_uint",0},
874 { "_wxCoord","_EBool",0},
875 { "_wxCoord","_size_t",0},
c368d904 876 { "_wxCoord","_time_t",0},
54b96882 877 { "_wxCoord","_wxPrintQuality",0},
f786a3b2 878 { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
f786a3b2 879 { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
f786a3b2
HH
880{0,0,0}};
881
a29cd6c0
HH
882static PyObject *SWIG_globals;
883#ifdef __cplusplus
884extern "C"
885#endif
f786a3b2 886SWIGEXPORT(void) initglcanvasc() {
a29cd6c0
HH
887 PyObject *m, *d;
888 SWIG_globals = SWIG_newvarlink();
889 m = Py_InitModule("glcanvasc", glcanvascMethods);
890 d = PyModule_GetDict(m);
a29cd6c0
HH
891
892
3a70a282
RD
893 wxClassInfo::CleanUpClasses();
894 wxClassInfo::InitializeClasses();
a29cd6c0 895
f786a3b2
HH
896{
897 int i;
898 for (i = 0; _swig_mapping[i].n1; i++)
899 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
900}
a29cd6c0 901}