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