]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/msw/misc2.cpp
glcanvas and utils have mode to the modules directory
[wxWidgets.git] / utils / wxPython / src / msw / misc2.cpp
1 /*
2 * FILE : msw/misc2.cpp
3 *
4 * This file was automatically generated by :
5 * Simplified Wrapper and Interface Generator (SWIG)
6 * Version 1.1 (Patch 6)
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 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 #include "Python.h"
43 extern void SWIG_MakePtr(char *, void *, char *);
44 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
45 extern char *SWIG_GetPtr(char *, void **, char *);
46 extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
47 extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
48 extern PyObject *SWIG_newvarlink(void);
49 #ifdef __cplusplus
50 }
51 #endif
52 #define SWIG_init initmisc2c
53
54 #define SWIG_name "misc2c"
55
56 #include "helpers.h"
57 #include <wx/resource.h>
58 #include <wx/tooltip.h>
59
60 static PyObject* l_output_helper(PyObject* target, PyObject* o) {
61 PyObject* o2;
62 PyObject* o3;
63 if (!target) {
64 target = o;
65 } else if (target == Py_None) {
66 Py_DECREF(Py_None);
67 target = o;
68 } else {
69 if (!PyList_Check(target)) {
70 o2 = target;
71 target = PyList_New(0);
72 PyList_Append(target, o2);
73 Py_XDECREF(o2);
74 }
75 PyList_Append(target,o);
76 Py_XDECREF(o);
77 }
78 return target;
79 }
80
81 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
82 PyObject* o2;
83 PyObject* o3;
84
85 if (!target) {
86 target = o;
87 } else if (target == Py_None) {
88 Py_DECREF(Py_None);
89 target = o;
90 } else {
91 if (!PyTuple_Check(target)) {
92 o2 = target;
93 target = PyTuple_New(1);
94 PyTuple_SetItem(target, 0, o2);
95 }
96 o3 = PyTuple_New(1);
97 PyTuple_SetItem(o3, 0, o);
98
99 o2 = target;
100 target = PySequence_Concat(o2, o3);
101 Py_DECREF(o2);
102 Py_DECREF(o3);
103 }
104 return target;
105 }
106
107
108 extern byte* byte_LIST_helper(PyObject* source);
109 extern int* int_LIST_helper(PyObject* source);
110 extern long* long_LIST_helper(PyObject* source);
111 extern char** string_LIST_helper(PyObject* source);
112 extern wxPoint* wxPoint_LIST_helper(PyObject* source);
113 extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
114 extern wxString* wxString_LIST_helper(PyObject* source);
115 extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
116
117
118 static char* wxStringErrorMsg = "string type is required for parameter";
119
120 void wxToolTip_Enable(bool flag) {
121 wxToolTip::Enable(flag);
122 }
123
124 void wxToolTip_SetDelay(long milliseconds) {
125 wxToolTip::SetDelay(milliseconds);
126 }
127 #ifdef __cplusplus
128 extern "C" {
129 #endif
130 static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args) {
131 PyObject * _resultobj;
132 wxWindow * _result;
133 wxString * _arg0;
134 wxWindow * _arg1 = (wxWindow *) NULL;
135 PyObject * _obj0 = 0;
136 PyObject * _argo1 = 0;
137 char _ptemp[128];
138
139 self = self;
140 if(!PyArg_ParseTuple(args,"O|O:wxFindWindowByLabel",&_obj0,&_argo1))
141 return NULL;
142 {
143 if (!PyString_Check(_obj0)) {
144 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
145 return NULL;
146 }
147 _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
148 }
149 if (_argo1) {
150 if (_argo1 == Py_None) { _arg1 = NULL; }
151 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
152 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByLabel. Expected _wxWindow_p.");
153 return NULL;
154 }
155 }
156 {
157 wxPy_BEGIN_ALLOW_THREADS;
158 _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1);
159
160 wxPy_END_ALLOW_THREADS;
161 } if (_result) {
162 SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p");
163 _resultobj = Py_BuildValue("s",_ptemp);
164 } else {
165 Py_INCREF(Py_None);
166 _resultobj = Py_None;
167 }
168 {
169 if (_obj0)
170 delete _arg0;
171 }
172 return _resultobj;
173 }
174
175 static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args) {
176 PyObject * _resultobj;
177 wxWindow * _result;
178 wxString * _arg0;
179 wxWindow * _arg1 = (wxWindow *) NULL;
180 PyObject * _obj0 = 0;
181 PyObject * _argo1 = 0;
182 char _ptemp[128];
183
184 self = self;
185 if(!PyArg_ParseTuple(args,"O|O:wxFindWindowByName",&_obj0,&_argo1))
186 return NULL;
187 {
188 if (!PyString_Check(_obj0)) {
189 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
190 return NULL;
191 }
192 _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
193 }
194 if (_argo1) {
195 if (_argo1 == Py_None) { _arg1 = NULL; }
196 else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
197 PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByName. Expected _wxWindow_p.");
198 return NULL;
199 }
200 }
201 {
202 wxPy_BEGIN_ALLOW_THREADS;
203 _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1);
204
205 wxPy_END_ALLOW_THREADS;
206 } if (_result) {
207 SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p");
208 _resultobj = Py_BuildValue("s",_ptemp);
209 } else {
210 Py_INCREF(Py_None);
211 _resultobj = Py_None;
212 }
213 {
214 if (_obj0)
215 delete _arg0;
216 }
217 return _resultobj;
218 }
219
220 static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args) {
221 PyObject * _resultobj;
222 bool _arg0;
223 int tempbool0;
224
225 self = self;
226 if(!PyArg_ParseTuple(args,"i:wxToolTip_Enable",&tempbool0))
227 return NULL;
228 _arg0 = (bool ) tempbool0;
229 {
230 wxPy_BEGIN_ALLOW_THREADS;
231 wxToolTip_Enable(_arg0);
232
233 wxPy_END_ALLOW_THREADS;
234 } Py_INCREF(Py_None);
235 _resultobj = Py_None;
236 return _resultobj;
237 }
238
239 static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args) {
240 PyObject * _resultobj;
241 long _arg0;
242
243 self = self;
244 if(!PyArg_ParseTuple(args,"l:wxToolTip_SetDelay",&_arg0))
245 return NULL;
246 {
247 wxPy_BEGIN_ALLOW_THREADS;
248 wxToolTip_SetDelay(_arg0);
249
250 wxPy_END_ALLOW_THREADS;
251 } Py_INCREF(Py_None);
252 _resultobj = Py_None;
253 return _resultobj;
254 }
255
256 #define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0))
257 static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args) {
258 PyObject * _resultobj;
259 wxToolTip * _result;
260 wxString * _arg0;
261 PyObject * _obj0 = 0;
262 char _ptemp[128];
263
264 self = self;
265 if(!PyArg_ParseTuple(args,"O:new_wxToolTip",&_obj0))
266 return NULL;
267 {
268 if (!PyString_Check(_obj0)) {
269 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
270 return NULL;
271 }
272 _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
273 }
274 {
275 wxPy_BEGIN_ALLOW_THREADS;
276 _result = (wxToolTip *)new_wxToolTip(*_arg0);
277
278 wxPy_END_ALLOW_THREADS;
279 } if (_result) {
280 SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolTip_p");
281 _resultobj = Py_BuildValue("s",_ptemp);
282 } else {
283 Py_INCREF(Py_None);
284 _resultobj = Py_None;
285 }
286 {
287 if (_obj0)
288 delete _arg0;
289 }
290 return _resultobj;
291 }
292
293 #define wxToolTip_SetTip(_swigobj,_swigarg0) (_swigobj->SetTip(_swigarg0))
294 static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args) {
295 PyObject * _resultobj;
296 wxToolTip * _arg0;
297 wxString * _arg1;
298 PyObject * _argo0 = 0;
299 PyObject * _obj1 = 0;
300
301 self = self;
302 if(!PyArg_ParseTuple(args,"OO:wxToolTip_SetTip",&_argo0,&_obj1))
303 return NULL;
304 if (_argo0) {
305 if (_argo0 == Py_None) { _arg0 = NULL; }
306 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) {
307 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_SetTip. Expected _wxToolTip_p.");
308 return NULL;
309 }
310 }
311 {
312 if (!PyString_Check(_obj1)) {
313 PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
314 return NULL;
315 }
316 _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
317 }
318 {
319 wxPy_BEGIN_ALLOW_THREADS;
320 wxToolTip_SetTip(_arg0,*_arg1);
321
322 wxPy_END_ALLOW_THREADS;
323 } Py_INCREF(Py_None);
324 _resultobj = Py_None;
325 {
326 if (_obj1)
327 delete _arg1;
328 }
329 return _resultobj;
330 }
331
332 #define wxToolTip_GetTip(_swigobj) (_swigobj->GetTip())
333 static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args) {
334 PyObject * _resultobj;
335 wxString * _result;
336 wxToolTip * _arg0;
337 PyObject * _argo0 = 0;
338
339 self = self;
340 if(!PyArg_ParseTuple(args,"O:wxToolTip_GetTip",&_argo0))
341 return NULL;
342 if (_argo0) {
343 if (_argo0 == Py_None) { _arg0 = NULL; }
344 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) {
345 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetTip. Expected _wxToolTip_p.");
346 return NULL;
347 }
348 }
349 {
350 wxPy_BEGIN_ALLOW_THREADS;
351 _result = new wxString (wxToolTip_GetTip(_arg0));
352
353 wxPy_END_ALLOW_THREADS;
354 }{
355 _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
356 }
357 {
358 delete _result;
359 }
360 return _resultobj;
361 }
362
363 #define wxToolTip_GetWindow(_swigobj) (_swigobj->GetWindow())
364 static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args) {
365 PyObject * _resultobj;
366 wxWindow * _result;
367 wxToolTip * _arg0;
368 PyObject * _argo0 = 0;
369 char _ptemp[128];
370
371 self = self;
372 if(!PyArg_ParseTuple(args,"O:wxToolTip_GetWindow",&_argo0))
373 return NULL;
374 if (_argo0) {
375 if (_argo0 == Py_None) { _arg0 = NULL; }
376 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) {
377 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetWindow. Expected _wxToolTip_p.");
378 return NULL;
379 }
380 }
381 {
382 wxPy_BEGIN_ALLOW_THREADS;
383 _result = (wxWindow *)wxToolTip_GetWindow(_arg0);
384
385 wxPy_END_ALLOW_THREADS;
386 } if (_result) {
387 SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p");
388 _resultobj = Py_BuildValue("s",_ptemp);
389 } else {
390 Py_INCREF(Py_None);
391 _resultobj = Py_None;
392 }
393 return _resultobj;
394 }
395
396 static PyMethodDef misc2cMethods[] = {
397 { "wxToolTip_GetWindow", _wrap_wxToolTip_GetWindow, METH_VARARGS },
398 { "wxToolTip_GetTip", _wrap_wxToolTip_GetTip, METH_VARARGS },
399 { "wxToolTip_SetTip", _wrap_wxToolTip_SetTip, METH_VARARGS },
400 { "new_wxToolTip", _wrap_new_wxToolTip, METH_VARARGS },
401 { "wxToolTip_SetDelay", _wrap_wxToolTip_SetDelay, METH_VARARGS },
402 { "wxToolTip_Enable", _wrap_wxToolTip_Enable, METH_VARARGS },
403 { "wxFindWindowByName", _wrap_wxFindWindowByName, METH_VARARGS },
404 { "wxFindWindowByLabel", _wrap_wxFindWindowByLabel, METH_VARARGS },
405 { NULL, NULL }
406 };
407 #ifdef __cplusplus
408 }
409 #endif
410 /*
411 * This table is used by the pointer type-checker
412 */
413 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
414 { "_wxAcceleratorTable","_class_wxAcceleratorTable",0},
415 { "_signed_long","_long",0},
416 { "_wxPrintQuality","_int",0},
417 { "_wxPrintQuality","_signed_int",0},
418 { "_wxPrintQuality","_unsigned_int",0},
419 { "_wxPrintQuality","_wxWindowID",0},
420 { "_wxPrintQuality","_uint",0},
421 { "_wxPrintQuality","_EBool",0},
422 { "_wxPrintQuality","_size_t",0},
423 { "_class_wxRegionIterator","_wxRegionIterator",0},
424 { "_class_wxMenuBar","_wxMenuBar",0},
425 { "_class_wxEvtHandler","_wxEvtHandler",0},
426 { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0},
427 { "_wxCursor","_class_wxCursor",0},
428 { "_wxMask","_class_wxMask",0},
429 { "_wxToolTip","_class_wxToolTip",0},
430 { "_wxPen","_class_wxPen",0},
431 { "_byte","_unsigned_char",0},
432 { "_long","_wxDash",0},
433 { "_long","_unsigned_long",0},
434 { "_long","_signed_long",0},
435 { "_wxImageList","_class_wxImageList",0},
436 { "_class_wxAcceleratorTable","_wxAcceleratorTable",0},
437 { "_wxDC","_class_wxDC",0},
438 { "_size_t","_wxPrintQuality",0},
439 { "_size_t","_unsigned_int",0},
440 { "_size_t","_int",0},
441 { "_size_t","_wxWindowID",0},
442 { "_size_t","_uint",0},
443 { "_class_wxRealPoint","_wxRealPoint",0},
444 { "_wxPrinterDC","_class_wxPrinterDC",0},
445 { "_class_wxMenuItem","_wxMenuItem",0},
446 { "_wxPanel","_class_wxPanel",0},
447 { "_class_wxMask","_wxMask",0},
448 { "_class_wxToolTip","_wxToolTip",0},
449 { "_wxColour","_class_wxColour",0},
450 { "_class_wxDialog","_wxDialog",0},
451 { "_wxBrush","_class_wxBrush",0},
452 { "_uint","_wxPrintQuality",0},
453 { "_uint","_size_t",0},
454 { "_uint","_unsigned_int",0},
455 { "_uint","_int",0},
456 { "_uint","_wxWindowID",0},
457 { "_wxRect","_class_wxRect",0},
458 { "_wxPoint","_class_wxPoint",0},
459 { "_wxBitmap","_class_wxBitmap",0},
460 { "_wxPyTimer","_class_wxPyTimer",0},
461 { "_wxWindowDC","_class_wxWindowDC",0},
462 { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
463 { "_EBool","_wxPrintQuality",0},
464 { "_EBool","_signed_int",0},
465 { "_EBool","_int",0},
466 { "_EBool","_wxWindowID",0},
467 { "_class_wxRegion","_wxRegion",0},
468 { "_wxFont","_class_wxFont",0},
469 { "_unsigned_long","_wxDash",0},
470 { "_unsigned_long","_long",0},
471 { "_class_wxRect","_wxRect",0},
472 { "_class_wxDC","_wxDC",0},
473 { "_class_wxPyTimer","_wxPyTimer",0},
474 { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0},
475 { "_class_wxPanel","_wxPanel",0},
476 { "_signed_int","_wxPrintQuality",0},
477 { "_signed_int","_EBool",0},
478 { "_signed_int","_wxWindowID",0},
479 { "_signed_int","_int",0},
480 { "_wxLayoutConstraints","_class_wxLayoutConstraints",0},
481 { "_wxMetaFileDC","_class_wxMetaFileDC",0},
482 { "_wxMenu","_class_wxMenu",0},
483 { "_wxScreenDC","_class_wxScreenDC",0},
484 { "_WXTYPE","_short",0},
485 { "_WXTYPE","_signed_short",0},
486 { "_WXTYPE","_unsigned_short",0},
487 { "_class_wxBrush","_wxBrush",0},
488 { "_unsigned_short","_WXTYPE",0},
489 { "_unsigned_short","_short",0},
490 { "_class_wxWindow","_wxWindow",0},
491 { "_class_wxFont","_wxFont",0},
492 { "_wxClientDC","_class_wxClientDC",0},
493 { "_class_wxPoint","_wxPoint",0},
494 { "_wxRealPoint","_class_wxRealPoint",0},
495 { "_signed_short","_WXTYPE",0},
496 { "_signed_short","_short",0},
497 { "_wxMemoryDC","_class_wxMemoryDC",0},
498 { "_wxPaintDC","_class_wxPaintDC",0},
499 { "_class_wxWindowDC","_wxWindowDC",0},
500 { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0},
501 { "_class_wxCursor","_wxCursor",0},
502 { "_wxScrolledWindow","_class_wxScrolledWindow",0},
503 { "_unsigned_char","_byte",0},
504 { "_class_wxMetaFileDC","_wxMetaFileDC",0},
505 { "_class_wxMenu","_wxMenu",0},
506 { "_unsigned_int","_wxPrintQuality",0},
507 { "_unsigned_int","_size_t",0},
508 { "_unsigned_int","_uint",0},
509 { "_unsigned_int","_wxWindowID",0},
510 { "_unsigned_int","_int",0},
511 { "_wxIcon","_class_wxIcon",0},
512 { "_wxDialog","_class_wxDialog",0},
513 { "_class_wxPen","_wxPen",0},
514 { "_short","_WXTYPE",0},
515 { "_short","_unsigned_short",0},
516 { "_short","_signed_short",0},
517 { "_class_wxImageList","_wxImageList",0},
518 { "_wxWindowID","_wxPrintQuality",0},
519 { "_wxWindowID","_size_t",0},
520 { "_wxWindowID","_EBool",0},
521 { "_wxWindowID","_uint",0},
522 { "_wxWindowID","_int",0},
523 { "_wxWindowID","_signed_int",0},
524 { "_wxWindowID","_unsigned_int",0},
525 { "_int","_wxPrintQuality",0},
526 { "_int","_size_t",0},
527 { "_int","_EBool",0},
528 { "_int","_uint",0},
529 { "_int","_wxWindowID",0},
530 { "_int","_unsigned_int",0},
531 { "_int","_signed_int",0},
532 { "_wxSize","_class_wxSize",0},
533 { "_wxRegionIterator","_class_wxRegionIterator",0},
534 { "_class_wxPrinterDC","_wxPrinterDC",0},
535 { "_class_wxPaintDC","_wxPaintDC",0},
536 { "_class_wxLayoutConstraints","_wxLayoutConstraints",0},
537 { "_class_wxIcon","_wxIcon",0},
538 { "_class_wxColour","_wxColour",0},
539 { "_class_wxScreenDC","_wxScreenDC",0},
540 { "_wxPalette","_class_wxPalette",0},
541 { "_wxRegion","_class_wxRegion",0},
542 { "_class_wxClientDC","_wxClientDC",0},
543 { "_class_wxSize","_wxSize",0},
544 { "_class_wxBitmap","_wxBitmap",0},
545 { "_class_wxMemoryDC","_wxMemoryDC",0},
546 { "_wxMenuBar","_class_wxMenuBar",0},
547 { "_wxEvtHandler","_class_wxEvtHandler",0},
548 { "_wxMenuItem","_class_wxMenuItem",0},
549 { "_wxDash","_unsigned_long",0},
550 { "_wxDash","_long",0},
551 { "_class_wxScrolledWindow","_wxScrolledWindow",0},
552 { "_class_wxPalette","_wxPalette",0},
553 { "_wxWindow","_class_wxWindow",0},
554 {0,0,0}};
555
556 static PyObject *SWIG_globals;
557 #ifdef __cplusplus
558 extern "C"
559 #endif
560 SWIGEXPORT(void) initmisc2c() {
561 PyObject *m, *d;
562 SWIG_globals = SWIG_newvarlink();
563 m = Py_InitModule("misc2c", misc2cMethods);
564 d = PyModule_GetDict(m);
565 {
566 int i;
567 for (i = 0; _swig_mapping[i].n1; i++)
568 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
569 }
570 }