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