]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/dllwidget/dllwidget_.cpp
Fixed a typo in the sample code of wxDbTable::Insert
[wxWidgets.git] / wxPython / contrib / dllwidget / dllwidget_.cpp
CommitLineData
4a61305d
RD
1/*
2 * FILE : contrib/dllwidget/dllwidget_.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
42extern "C" {
43#endif
44
45extern void SWIG_MakePtr(char *, void *, char *);
46extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
47extern char *SWIG_GetPtr(char *, void **, char *);
48extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
49extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
50extern PyObject *SWIG_newvarlink(void);
51#ifdef __cplusplus
52}
53#endif
54#define SWIG_init initdllwidget_c
55
56#define SWIG_name "dllwidget_c"
57
58#include "export.h"
59#include "dllwidget.h"
60
61
62static PyObject* t_output_helper(PyObject* target, PyObject* o) {
63 PyObject* o2;
64 PyObject* o3;
65
66 if (!target) {
67 target = o;
68 } else if (target == Py_None) {
69 Py_DECREF(Py_None);
70 target = o;
71 } else {
72 if (!PyTuple_Check(target)) {
73 o2 = target;
74 target = PyTuple_New(1);
75 PyTuple_SetItem(target, 0, o2);
76 }
77 o3 = PyTuple_New(1);
78 PyTuple_SetItem(o3, 0, o);
79
80 o2 = target;
81 target = PySequence_Concat(o2, o3);
82 Py_DECREF(o2);
83 Py_DECREF(o3);
84 }
85 return target;
86}
87
88#if PYTHON_API_VERSION >= 1009
89 static char* wxStringErrorMsg = "String or Unicode type required";
90#else
91 static char* wxStringErrorMsg = "String type required";
92#endif
93#ifdef __cplusplus
94extern "C" {
95#endif
96static void *SwigwxDllWidgetTowxPanel(void *ptr) {
97 wxDllWidget *src;
98 wxPanel *dest;
99 src = (wxDllWidget *) ptr;
100 dest = (wxPanel *) src;
101 return (void *) dest;
102}
103
104static void *SwigwxDllWidgetTowxWindow(void *ptr) {
105 wxDllWidget *src;
106 wxWindow *dest;
107 src = (wxDllWidget *) ptr;
108 dest = (wxWindow *) src;
109 return (void *) dest;
110}
111
112static void *SwigwxDllWidgetTowxEvtHandler(void *ptr) {
113 wxDllWidget *src;
114 wxEvtHandler *dest;
115 src = (wxDllWidget *) ptr;
116 dest = (wxEvtHandler *) src;
117 return (void *) dest;
118}
119
120static void *SwigwxDllWidgetTowxObject(void *ptr) {
121 wxDllWidget *src;
122 wxObject *dest;
123 src = (wxDllWidget *) ptr;
124 dest = (wxObject *) src;
125 return (void *) dest;
126}
127
128#define new_wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
129static PyObject *_wrap_new_wxDllWidget(PyObject *self, PyObject *args, PyObject *kwargs) {
130 PyObject * _resultobj;
131 wxDllWidget * _result;
132 wxWindow * _arg0;
133 wxWindowID _arg1 = (wxWindowID ) -1;
134 wxString * _arg2 = (wxString *) &wxEmptyString;
135 wxString * _arg3 = (wxString *) &wxEmptyString;
136 wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
137 wxSize * _arg5 = (wxSize *) &wxDefaultSize;
138 long _arg6 = (long ) 0;
139 PyObject * _argo0 = 0;
140 PyObject * _obj2 = 0;
141 PyObject * _obj3 = 0;
142 wxPoint temp;
143 PyObject * _obj4 = 0;
144 wxSize temp0;
145 PyObject * _obj5 = 0;
146 char *_kwnames[] = { "parent","id","dllName","className","pos","size","style", NULL };
147 char _ptemp[128];
148
149 self = self;
150 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOOl:new_wxDllWidget",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_obj5,&_arg6))
151 return NULL;
152 if (_argo0) {
153 if (_argo0 == Py_None) { _arg0 = NULL; }
154 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
155 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDllWidget. Expected _wxWindow_p.");
156 return NULL;
157 }
158 }
159 if (_obj2)
160{
161#if PYTHON_API_VERSION >= 1009
162 char* tmpPtr; int tmpSize;
163 if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
164 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
165 return NULL;
166 }
167 if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
168 return NULL;
169 _arg2 = new wxString(tmpPtr, tmpSize);
170#else
171 if (!PyString_Check(_obj2)) {
172 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
173 return NULL;
174 }
175 _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
176#endif
177}
178 if (_obj3)
179{
180#if PYTHON_API_VERSION >= 1009
181 char* tmpPtr; int tmpSize;
182 if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
183 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
184 return NULL;
185 }
186 if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
187 return NULL;
188 _arg3 = new wxString(tmpPtr, tmpSize);
189#else
190 if (!PyString_Check(_obj3)) {
191 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
192 return NULL;
193 }
194 _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
195#endif
196}
197 if (_obj4)
198{
199 _arg4 = &temp;
200 if (! wxPoint_helper(_obj4, &_arg4))
201 return NULL;
202}
203 if (_obj5)
204{
205 _arg5 = &temp0;
206 if (! wxSize_helper(_obj5, &_arg5))
207 return NULL;
208}
209{
4268f798 210 PyThreadState* __tstate = wxPyBeginAllowThreads();
4a61305d
RD
211 _result = (wxDllWidget *)new_wxDllWidget(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5,_arg6);
212
4268f798
RD
213 wxPyEndAllowThreads(__tstate);
214 if (PyErr_Occurred()) return NULL;
4a61305d
RD
215} if (_result) {
216 SWIG_MakePtr(_ptemp, (char *) _result,"_wxDllWidget_p");
217 _resultobj = Py_BuildValue("s",_ptemp);
218 } else {
219 Py_INCREF(Py_None);
220 _resultobj = Py_None;
221 }
222{
223 if (_obj2)
224 delete _arg2;
225}
226{
227 if (_obj3)
228 delete _arg3;
229}
230 return _resultobj;
231}
232
233#define wxDllWidget_Ok(_swigobj) (_swigobj->Ok())
234static PyObject *_wrap_wxDllWidget_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
235 PyObject * _resultobj;
236 bool _result;
237 wxDllWidget * _arg0;
238 PyObject * _argo0 = 0;
239 char *_kwnames[] = { "self", NULL };
240
241 self = self;
242 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_Ok",_kwnames,&_argo0))
243 return NULL;
244 if (_argo0) {
245 if (_argo0 == Py_None) { _arg0 = NULL; }
246 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
247 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_Ok. Expected _wxDllWidget_p.");
248 return NULL;
249 }
250 }
251{
4268f798 252 PyThreadState* __tstate = wxPyBeginAllowThreads();
4a61305d
RD
253 _result = (bool )wxDllWidget_Ok(_arg0);
254
4268f798
RD
255 wxPyEndAllowThreads(__tstate);
256 if (PyErr_Occurred()) return NULL;
4a61305d
RD
257} _resultobj = Py_BuildValue("i",_result);
258 return _resultobj;
259}
260
261#define wxDllWidget_SendCommand(_swigobj,_swigarg0,_swigarg1) (_swigobj->SendCommand(_swigarg0,_swigarg1))
262static PyObject *_wrap_wxDllWidget_SendCommand(PyObject *self, PyObject *args, PyObject *kwargs) {
263 PyObject * _resultobj;
264 int _result;
265 wxDllWidget * _arg0;
266 int _arg1;
267 wxString * _arg2 = (wxString *) &wxEmptyString;
268 PyObject * _argo0 = 0;
269 PyObject * _obj2 = 0;
270 char *_kwnames[] = { "self","cmd","param", NULL };
271
272 self = self;
273 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxDllWidget_SendCommand",_kwnames,&_argo0,&_arg1,&_obj2))
274 return NULL;
275 if (_argo0) {
276 if (_argo0 == Py_None) { _arg0 = NULL; }
277 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
278 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_SendCommand. Expected _wxDllWidget_p.");
279 return NULL;
280 }
281 }
282 if (_obj2)
283{
284#if PYTHON_API_VERSION >= 1009
285 char* tmpPtr; int tmpSize;
286 if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
287 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
288 return NULL;
289 }
290 if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
291 return NULL;
292 _arg2 = new wxString(tmpPtr, tmpSize);
293#else
294 if (!PyString_Check(_obj2)) {
295 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
296 return NULL;
297 }
298 _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
299#endif
300}
301{
4268f798 302 PyThreadState* __tstate = wxPyBeginAllowThreads();
4a61305d
RD
303 _result = (int )wxDllWidget_SendCommand(_arg0,_arg1,*_arg2);
304
4268f798
RD
305 wxPyEndAllowThreads(__tstate);
306 if (PyErr_Occurred()) return NULL;
4a61305d
RD
307} _resultobj = Py_BuildValue("i",_result);
308{
309 if (_obj2)
310 delete _arg2;
311}
312 return _resultobj;
313}
314
ff65119e
RD
315#define wxDllWidget_GetWidgetWindow(_swigobj) (_swigobj->GetWidgetWindow())
316static PyObject *_wrap_wxDllWidget_GetWidgetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
4a61305d
RD
317 PyObject * _resultobj;
318 wxWindow * _result;
319 wxDllWidget * _arg0;
320 PyObject * _argo0 = 0;
321 char *_kwnames[] = { "self", NULL };
322
323 self = self;
ff65119e 324 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_GetWidgetWindow",_kwnames,&_argo0))
4a61305d
RD
325 return NULL;
326 if (_argo0) {
327 if (_argo0 == Py_None) { _arg0 = NULL; }
328 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
ff65119e 329 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_GetWidgetWindow. Expected _wxDllWidget_p.");
4a61305d
RD
330 return NULL;
331 }
332 }
333{
4268f798 334 PyThreadState* __tstate = wxPyBeginAllowThreads();
ff65119e 335 _result = (wxWindow *)wxDllWidget_GetWidgetWindow(_arg0);
4a61305d 336
4268f798
RD
337 wxPyEndAllowThreads(__tstate);
338 if (PyErr_Occurred()) return NULL;
4a61305d
RD
339}{ _resultobj = wxPyMake_wxObject(_result); }
340 return _resultobj;
341}
342
343static PyObject *_wrap_wxDllWidget_GetDllExt(PyObject *self, PyObject *args, PyObject *kwargs) {
344 PyObject * _resultobj;
345 wxString * _result;
346 char *_kwnames[] = { NULL };
347
348 self = self;
349 if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDllWidget_GetDllExt",_kwnames))
350 return NULL;
351{
4268f798 352 PyThreadState* __tstate = wxPyBeginAllowThreads();
4a61305d
RD
353 _result = new wxString (wxDllWidget::GetDllExt());
354
4268f798
RD
355 wxPyEndAllowThreads(__tstate);
356 if (PyErr_Occurred()) return NULL;
4a61305d
RD
357}{
358 _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
359}
360{
361 delete _result;
362}
363 return _resultobj;
364}
365
366static PyMethodDef dllwidget_cMethods[] = {
367 { "wxDllWidget_GetDllExt", (PyCFunction) _wrap_wxDllWidget_GetDllExt, METH_VARARGS | METH_KEYWORDS },
ff65119e 368 { "wxDllWidget_GetWidgetWindow", (PyCFunction) _wrap_wxDllWidget_GetWidgetWindow, METH_VARARGS | METH_KEYWORDS },
4a61305d
RD
369 { "wxDllWidget_SendCommand", (PyCFunction) _wrap_wxDllWidget_SendCommand, METH_VARARGS | METH_KEYWORDS },
370 { "wxDllWidget_Ok", (PyCFunction) _wrap_wxDllWidget_Ok, METH_VARARGS | METH_KEYWORDS },
371 { "new_wxDllWidget", (PyCFunction) _wrap_new_wxDllWidget, METH_VARARGS | METH_KEYWORDS },
372 { NULL, NULL }
373};
374#ifdef __cplusplus
375}
376#endif
377/*
378 * This table is used by the pointer type-checker
379 */
380static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
381 { "_signed_long","_long",0},
382 { "_wxPrintQuality","_wxCoord",0},
383 { "_wxPrintQuality","_int",0},
384 { "_wxPrintQuality","_signed_int",0},
385 { "_wxPrintQuality","_unsigned_int",0},
386 { "_wxPrintQuality","_wxWindowID",0},
387 { "_wxPrintQuality","_uint",0},
388 { "_wxPrintQuality","_EBool",0},
389 { "_wxPrintQuality","_size_t",0},
390 { "_wxPrintQuality","_time_t",0},
391 { "_byte","_unsigned_char",0},
392 { "_long","_unsigned_long",0},
393 { "_long","_signed_long",0},
394 { "_size_t","_wxCoord",0},
395 { "_size_t","_wxPrintQuality",0},
396 { "_size_t","_time_t",0},
397 { "_size_t","_unsigned_int",0},
398 { "_size_t","_int",0},
399 { "_size_t","_wxWindowID",0},
400 { "_size_t","_uint",0},
401 { "_wxPanel","_wxDllWidget",SwigwxDllWidgetTowxPanel},
402 { "_uint","_wxCoord",0},
403 { "_uint","_wxPrintQuality",0},
404 { "_uint","_time_t",0},
405 { "_uint","_size_t",0},
406 { "_uint","_unsigned_int",0},
407 { "_uint","_int",0},
408 { "_uint","_wxWindowID",0},
409 { "_wxChar","_char",0},
410 { "_char","_wxChar",0},
411 { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
412 { "_EBool","_wxCoord",0},
413 { "_EBool","_wxPrintQuality",0},
414 { "_EBool","_signed_int",0},
415 { "_EBool","_int",0},
416 { "_EBool","_wxWindowID",0},
417 { "_unsigned_long","_long",0},
418 { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
419 { "_signed_int","_wxCoord",0},
420 { "_signed_int","_wxPrintQuality",0},
421 { "_signed_int","_EBool",0},
422 { "_signed_int","_wxWindowID",0},
423 { "_signed_int","_int",0},
424 { "_WXTYPE","_wxDateTime_t",0},
425 { "_WXTYPE","_short",0},
426 { "_WXTYPE","_signed_short",0},
427 { "_WXTYPE","_unsigned_short",0},
428 { "_unsigned_short","_wxDateTime_t",0},
429 { "_unsigned_short","_WXTYPE",0},
430 { "_unsigned_short","_short",0},
431 { "_wxObject","_wxDllWidget",SwigwxDllWidgetTowxObject},
432 { "_signed_short","_WXTYPE",0},
433 { "_signed_short","_short",0},
434 { "_unsigned_char","_byte",0},
435 { "_unsigned_int","_wxCoord",0},
436 { "_unsigned_int","_wxPrintQuality",0},
437 { "_unsigned_int","_time_t",0},
438 { "_unsigned_int","_size_t",0},
439 { "_unsigned_int","_uint",0},
440 { "_unsigned_int","_wxWindowID",0},
441 { "_unsigned_int","_int",0},
442 { "_short","_wxDateTime_t",0},
443 { "_short","_WXTYPE",0},
444 { "_short","_unsigned_short",0},
445 { "_short","_signed_short",0},
446 { "_wxWindowID","_wxCoord",0},
447 { "_wxWindowID","_wxPrintQuality",0},
448 { "_wxWindowID","_time_t",0},
449 { "_wxWindowID","_size_t",0},
450 { "_wxWindowID","_EBool",0},
451 { "_wxWindowID","_uint",0},
452 { "_wxWindowID","_int",0},
453 { "_wxWindowID","_signed_int",0},
454 { "_wxWindowID","_unsigned_int",0},
455 { "_int","_wxCoord",0},
456 { "_int","_wxPrintQuality",0},
457 { "_int","_time_t",0},
458 { "_int","_size_t",0},
459 { "_int","_EBool",0},
460 { "_int","_uint",0},
461 { "_int","_wxWindowID",0},
462 { "_int","_unsigned_int",0},
463 { "_int","_signed_int",0},
464 { "_wxDateTime_t","_unsigned_short",0},
465 { "_wxDateTime_t","_short",0},
466 { "_wxDateTime_t","_WXTYPE",0},
467 { "_time_t","_wxCoord",0},
468 { "_time_t","_wxPrintQuality",0},
469 { "_time_t","_unsigned_int",0},
470 { "_time_t","_int",0},
471 { "_time_t","_wxWindowID",0},
472 { "_time_t","_uint",0},
473 { "_time_t","_size_t",0},
474 { "_wxCoord","_int",0},
475 { "_wxCoord","_signed_int",0},
476 { "_wxCoord","_unsigned_int",0},
477 { "_wxCoord","_wxWindowID",0},
478 { "_wxCoord","_uint",0},
479 { "_wxCoord","_EBool",0},
480 { "_wxCoord","_size_t",0},
481 { "_wxCoord","_time_t",0},
482 { "_wxCoord","_wxPrintQuality",0},
483 { "_wxEvtHandler","_wxDllWidget",SwigwxDllWidgetTowxEvtHandler},
484 { "_wxWindow","_wxDllWidget",SwigwxDllWidgetTowxWindow},
485{0,0,0}};
486
487static PyObject *SWIG_globals;
488#ifdef __cplusplus
489extern "C"
490#endif
491SWIGEXPORT(void) initdllwidget_c() {
492 PyObject *m, *d;
493 SWIG_globals = SWIG_newvarlink();
494 m = Py_InitModule("dllwidget_c", dllwidget_cMethods);
495 d = PyModule_GetDict(m);
496
497
498 wxClassInfo::CleanUpClasses();
499 wxClassInfo::InitializeClasses();
500
501{
502 int i;
503 for (i = 0; _swig_mapping[i].n1; i++)
504 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
505}
506}