File: dllwidget_.cpp

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 482,632 kB
  • sloc: cpp: 2,127,216; python: 294,089; makefile: 51,946; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (467 lines) | stat: -rw-r--r-- 14,234 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
/*
 * FILE : contrib/dllwidget/dllwidget_.cpp
 * 
 * This file was automatically generated by :
 * Simplified Wrapper and Interface Generator (SWIG)
 * Version 1.1 (Build 883)
 * 
 * Portions Copyright (c) 1995-1998
 * The University of Utah and The Regents of the University of California.
 * Permission is granted to distribute this file in any manner provided
 * this notice remains intact.
 * 
 * Do not make changes to this file--changes will be lost!
 *
 */


#define SWIGCODE
/* Implementation : PYTHON */

#define SWIGPYTHON
#include "Python.h"

#include <string.h>
#include <stdlib.h>
/* Definitions for Windows/Unix exporting */
#if defined(__WIN32__)
#   if defined(_MSC_VER)
#	define SWIGEXPORT(a) __declspec(dllexport) a
#   else
#	if defined(__BORLANDC__)
#	    define SWIGEXPORT(a) a _export
#	else
#	    define SWIGEXPORT(a) a
#	endif
#   endif
#else
#   define SWIGEXPORT(a) a
#endif

#ifdef __cplusplus
extern "C" {
#endif
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init    initdllwidget_c

#define SWIG_name    "dllwidget_c"

#include "wxPython.h"
#include "dllwidget.h"


static PyObject* t_output_helper(PyObject* target, PyObject* o) {
    PyObject*   o2;
    PyObject*   o3;

    if (!target) {
        target = o;
    } else if (target == Py_None) {
        Py_DECREF(Py_None);
        target = o;
    } else {
        if (!PyTuple_Check(target)) {
            o2 = target;
            target = PyTuple_New(1);
            PyTuple_SetItem(target, 0, o2);
        }
        o3 = PyTuple_New(1);
        PyTuple_SetItem(o3, 0, o);

        o2 = target;
        target = PySequence_Concat(o2, o3);
        Py_DECREF(o2);
        Py_DECREF(o3);
    }
    return target;
}

    // Put some wx default wxChar* values into wxStrings.
    static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxDllWidgetTowxPanel(void *ptr) {
    wxDllWidget *src;
    wxPanel *dest;
    src = (wxDllWidget *) ptr;
    dest = (wxPanel *) src;
    return (void *) dest;
}

static void *SwigwxDllWidgetTowxWindow(void *ptr) {
    wxDllWidget *src;
    wxWindow *dest;
    src = (wxDllWidget *) ptr;
    dest = (wxWindow *) src;
    return (void *) dest;
}

static void *SwigwxDllWidgetTowxEvtHandler(void *ptr) {
    wxDllWidget *src;
    wxEvtHandler *dest;
    src = (wxDllWidget *) ptr;
    dest = (wxEvtHandler *) src;
    return (void *) dest;
}

static void *SwigwxDllWidgetTowxObject(void *ptr) {
    wxDllWidget *src;
    wxObject *dest;
    src = (wxDllWidget *) ptr;
    dest = (wxObject *) src;
    return (void *) dest;
}

#define new_wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_new_wxDllWidget(PyObject *self, PyObject *args, PyObject *kwargs) {
    PyObject * _resultobj;
    wxDllWidget * _result;
    wxWindow * _arg0;
    wxWindowID  _arg1 = (wxWindowID ) -1;
    wxString * _arg2 = (wxString *) &wxPyEmptyString;
    wxString * _arg3 = (wxString *) &wxPyEmptyString;
    wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
    wxSize * _arg5 = (wxSize *) &wxDefaultSize;
    long  _arg6 = (long ) 0;
    PyObject * _argo0 = 0;
    PyObject * _obj2 = 0;
    PyObject * _obj3 = 0;
    wxPoint  temp;
    PyObject * _obj4 = 0;
    wxSize  temp0;
    PyObject * _obj5 = 0;
    char *_kwnames[] = { "parent","id","dllName","className","pos","size","style", NULL };
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOOl:new_wxDllWidget",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_obj5,&_arg6)) 
        return NULL;
    if (_argo0) {
        if (_argo0 == Py_None) { _arg0 = NULL; }
        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDllWidget. Expected _wxWindow_p.");
        return NULL;
        }
    }
    if (_obj2)
{
    _arg2 = wxString_in_helper(_obj2);
    if (_arg2 == NULL)
        return NULL;
}
    if (_obj3)
{
    _arg3 = wxString_in_helper(_obj3);
    if (_arg3 == NULL)
        return NULL;
}
    if (_obj4)
{
    _arg4 = &temp;
    if (! wxPoint_helper(_obj4, &_arg4))
        return NULL;
}
    if (_obj5)
{
    _arg5 = &temp0;
    if (! wxSize_helper(_obj5, &_arg5))
        return NULL;
}
{
    PyThreadState* __tstate = wxPyBeginAllowThreads();
    _result = (wxDllWidget *)new_wxDllWidget(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5,_arg6);

    wxPyEndAllowThreads(__tstate);
    if (PyErr_Occurred()) return NULL;
}    if (_result) {
        SWIG_MakePtr(_ptemp, (char *) _result,"_wxDllWidget_p");
        _resultobj = Py_BuildValue("s",_ptemp);
    } else {
        Py_INCREF(Py_None);
        _resultobj = Py_None;
    }
{
    if (_obj2)
        delete _arg2;
}
{
    if (_obj3)
        delete _arg3;
}
    return _resultobj;
}

#define wxDllWidget_Ok(_swigobj)  (_swigobj->Ok())
static PyObject *_wrap_wxDllWidget_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
    PyObject * _resultobj;
    bool  _result;
    wxDllWidget * _arg0;
    PyObject * _argo0 = 0;
    char *_kwnames[] = { "self", NULL };

    self = self;
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_Ok",_kwnames,&_argo0)) 
        return NULL;
    if (_argo0) {
        if (_argo0 == Py_None) { _arg0 = NULL; }
        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_Ok. Expected _wxDllWidget_p.");
        return NULL;
        }
    }
{
    PyThreadState* __tstate = wxPyBeginAllowThreads();
    _result = (bool )wxDllWidget_Ok(_arg0);

    wxPyEndAllowThreads(__tstate);
    if (PyErr_Occurred()) return NULL;
}    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

#define wxDllWidget_SendCommand(_swigobj,_swigarg0,_swigarg1)  (_swigobj->SendCommand(_swigarg0,_swigarg1))
static PyObject *_wrap_wxDllWidget_SendCommand(PyObject *self, PyObject *args, PyObject *kwargs) {
    PyObject * _resultobj;
    int  _result;
    wxDllWidget * _arg0;
    int  _arg1;
    wxString * _arg2 = (wxString *) &wxPyEmptyString;
    PyObject * _argo0 = 0;
    PyObject * _obj2 = 0;
    char *_kwnames[] = { "self","cmd","param", NULL };

    self = self;
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxDllWidget_SendCommand",_kwnames,&_argo0,&_arg1,&_obj2)) 
        return NULL;
    if (_argo0) {
        if (_argo0 == Py_None) { _arg0 = NULL; }
        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_SendCommand. Expected _wxDllWidget_p.");
        return NULL;
        }
    }
    if (_obj2)
{
    _arg2 = wxString_in_helper(_obj2);
    if (_arg2 == NULL)
        return NULL;
}
{
    PyThreadState* __tstate = wxPyBeginAllowThreads();
    _result = (int )wxDllWidget_SendCommand(_arg0,_arg1,*_arg2);

    wxPyEndAllowThreads(__tstate);
    if (PyErr_Occurred()) return NULL;
}    _resultobj = Py_BuildValue("i",_result);
{
    if (_obj2)
        delete _arg2;
}
    return _resultobj;
}

#define wxDllWidget_GetWidgetWindow(_swigobj)  (_swigobj->GetWidgetWindow())
static PyObject *_wrap_wxDllWidget_GetWidgetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
    PyObject * _resultobj;
    wxWindow * _result;
    wxDllWidget * _arg0;
    PyObject * _argo0 = 0;
    char *_kwnames[] = { "self", NULL };

    self = self;
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_GetWidgetWindow",_kwnames,&_argo0)) 
        return NULL;
    if (_argo0) {
        if (_argo0 == Py_None) { _arg0 = NULL; }
        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_GetWidgetWindow. Expected _wxDllWidget_p.");
        return NULL;
        }
    }
{
    PyThreadState* __tstate = wxPyBeginAllowThreads();
    _result = (wxWindow *)wxDllWidget_GetWidgetWindow(_arg0);

    wxPyEndAllowThreads(__tstate);
    if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
    return _resultobj;
}

static PyObject *_wrap_wxDllWidget_GetDllExt(PyObject *self, PyObject *args, PyObject *kwargs) {
    PyObject * _resultobj;
    wxString * _result;
    char *_kwnames[] = {  NULL };

    self = self;
    if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDllWidget_GetDllExt",_kwnames)) 
        return NULL;
{
    PyThreadState* __tstate = wxPyBeginAllowThreads();
    _result = new wxString (wxDllWidget::GetDllExt());

    wxPyEndAllowThreads(__tstate);
    if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
    _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
    _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
{
    delete _result;
}
    return _resultobj;
}

static PyMethodDef dllwidget_cMethods[] = {
	 { "wxDllWidget_GetDllExt", (PyCFunction) _wrap_wxDllWidget_GetDllExt, METH_VARARGS | METH_KEYWORDS },
	 { "wxDllWidget_GetWidgetWindow", (PyCFunction) _wrap_wxDllWidget_GetWidgetWindow, METH_VARARGS | METH_KEYWORDS },
	 { "wxDllWidget_SendCommand", (PyCFunction) _wrap_wxDllWidget_SendCommand, METH_VARARGS | METH_KEYWORDS },
	 { "wxDllWidget_Ok", (PyCFunction) _wrap_wxDllWidget_Ok, METH_VARARGS | METH_KEYWORDS },
	 { "new_wxDllWidget", (PyCFunction) _wrap_new_wxDllWidget, METH_VARARGS | METH_KEYWORDS },
	 { NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
 * This table is used by the pointer type-checker
 */
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
    { "_signed_long","_long",0},
    { "_wxPrintQuality","_wxCoord",0},
    { "_wxPrintQuality","_int",0},
    { "_wxPrintQuality","_signed_int",0},
    { "_wxPrintQuality","_unsigned_int",0},
    { "_wxPrintQuality","_wxWindowID",0},
    { "_wxPrintQuality","_uint",0},
    { "_wxPrintQuality","_EBool",0},
    { "_wxPrintQuality","_size_t",0},
    { "_wxPrintQuality","_time_t",0},
    { "_byte","_unsigned_char",0},
    { "_long","_unsigned_long",0},
    { "_long","_signed_long",0},
    { "_size_t","_wxCoord",0},
    { "_size_t","_wxPrintQuality",0},
    { "_size_t","_time_t",0},
    { "_size_t","_unsigned_int",0},
    { "_size_t","_int",0},
    { "_size_t","_wxWindowID",0},
    { "_size_t","_uint",0},
    { "_wxPanel","_wxDllWidget",SwigwxDllWidgetTowxPanel},
    { "_uint","_wxCoord",0},
    { "_uint","_wxPrintQuality",0},
    { "_uint","_time_t",0},
    { "_uint","_size_t",0},
    { "_uint","_unsigned_int",0},
    { "_uint","_int",0},
    { "_uint","_wxWindowID",0},
    { "_wxChar","_char",0},
    { "_char","_wxChar",0},
    { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
    { "_EBool","_wxCoord",0},
    { "_EBool","_wxPrintQuality",0},
    { "_EBool","_signed_int",0},
    { "_EBool","_int",0},
    { "_EBool","_wxWindowID",0},
    { "_unsigned_long","_long",0},
    { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
    { "_signed_int","_wxCoord",0},
    { "_signed_int","_wxPrintQuality",0},
    { "_signed_int","_EBool",0},
    { "_signed_int","_wxWindowID",0},
    { "_signed_int","_int",0},
    { "_WXTYPE","_wxDateTime_t",0},
    { "_WXTYPE","_short",0},
    { "_WXTYPE","_signed_short",0},
    { "_WXTYPE","_unsigned_short",0},
    { "_unsigned_short","_wxDateTime_t",0},
    { "_unsigned_short","_WXTYPE",0},
    { "_unsigned_short","_short",0},
    { "_wxObject","_wxDllWidget",SwigwxDllWidgetTowxObject},
    { "_signed_short","_WXTYPE",0},
    { "_signed_short","_short",0},
    { "_unsigned_char","_byte",0},
    { "_unsigned_int","_wxCoord",0},
    { "_unsigned_int","_wxPrintQuality",0},
    { "_unsigned_int","_time_t",0},
    { "_unsigned_int","_size_t",0},
    { "_unsigned_int","_uint",0},
    { "_unsigned_int","_wxWindowID",0},
    { "_unsigned_int","_int",0},
    { "_short","_wxDateTime_t",0},
    { "_short","_WXTYPE",0},
    { "_short","_unsigned_short",0},
    { "_short","_signed_short",0},
    { "_wxWindowID","_wxCoord",0},
    { "_wxWindowID","_wxPrintQuality",0},
    { "_wxWindowID","_time_t",0},
    { "_wxWindowID","_size_t",0},
    { "_wxWindowID","_EBool",0},
    { "_wxWindowID","_uint",0},
    { "_wxWindowID","_int",0},
    { "_wxWindowID","_signed_int",0},
    { "_wxWindowID","_unsigned_int",0},
    { "_int","_wxCoord",0},
    { "_int","_wxPrintQuality",0},
    { "_int","_time_t",0},
    { "_int","_size_t",0},
    { "_int","_EBool",0},
    { "_int","_uint",0},
    { "_int","_wxWindowID",0},
    { "_int","_unsigned_int",0},
    { "_int","_signed_int",0},
    { "_wxDateTime_t","_unsigned_short",0},
    { "_wxDateTime_t","_short",0},
    { "_wxDateTime_t","_WXTYPE",0},
    { "_time_t","_wxCoord",0},
    { "_time_t","_wxPrintQuality",0},
    { "_time_t","_unsigned_int",0},
    { "_time_t","_int",0},
    { "_time_t","_wxWindowID",0},
    { "_time_t","_uint",0},
    { "_time_t","_size_t",0},
    { "_wxCoord","_int",0},
    { "_wxCoord","_signed_int",0},
    { "_wxCoord","_unsigned_int",0},
    { "_wxCoord","_wxWindowID",0},
    { "_wxCoord","_uint",0},
    { "_wxCoord","_EBool",0},
    { "_wxCoord","_size_t",0},
    { "_wxCoord","_time_t",0},
    { "_wxCoord","_wxPrintQuality",0},
    { "_wxEvtHandler","_wxDllWidget",SwigwxDllWidgetTowxEvtHandler},
    { "_wxWindow","_wxDllWidget",SwigwxDllWidgetTowxWindow},
{0,0,0}};

static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT(void) initdllwidget_c() {
	 PyObject *m, *d;
	 SWIG_globals = SWIG_newvarlink();
	 m = Py_InitModule("dllwidget_c", dllwidget_cMethods);
	 d = PyModule_GetDict(m);


    wxClassInfo::CleanUpClasses();
    wxClassInfo::InitializeClasses();

{
   int i;
   for (i = 0; _swig_mapping[i].n1; i++)
        SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}