]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/src/gtk/streams.cpp
Changes needed to get upto date with the latest wx CVS
[wxWidgets.git] / wxPython / src / gtk / streams.cpp
... / ...
CommitLineData
1/*
2 * FILE : src/gtk/streams.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
42extern "C" {
43#endif
44extern void SWIG_MakePtr(char *, void *, char *);
45extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
46extern char *SWIG_GetPtr(char *, void **, char *);
47extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
48extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
49extern PyObject *SWIG_newvarlink(void);
50#ifdef __cplusplus
51}
52#endif
53#define SWIG_init initstreamsc
54
55#define SWIG_name "streamsc"
56
57#include "helpers.h"
58#include "pyistream.h"
59#include <wx/stream.h>
60#include <wx/list.h>
61
62
63static PyObject* t_output_helper(PyObject* target, PyObject* o) {
64 PyObject* o2;
65 PyObject* o3;
66
67 if (!target) {
68 target = o;
69 } else if (target == Py_None) {
70 Py_DECREF(Py_None);
71 target = o;
72 } else {
73 if (!PyTuple_Check(target)) {
74 o2 = target;
75 target = PyTuple_New(1);
76 PyTuple_SetItem(target, 0, o2);
77 }
78 o3 = PyTuple_New(1);
79 PyTuple_SetItem(o3, 0, o);
80
81 o2 = target;
82 target = PySequence_Concat(o2, o3);
83 Py_DECREF(o2);
84 Py_DECREF(o3);
85 }
86 return target;
87}
88#ifdef __cplusplus
89extern "C" {
90#endif
91static wxPyInputStream *new_wxPyInputStream(PyObject *p) {
92 wxInputStream* wxis = wxPyCBInputStream::create(p);
93 if (wxis)
94 return new wxPyInputStream(wxis);
95 else
96 return NULL;
97 }
98
99static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObject *kwargs) {
100 PyObject * _resultobj;
101 wxPyInputStream * _result;
102 PyObject * _arg0;
103 PyObject * _obj0 = 0;
104 char *_kwnames[] = { "p", NULL };
105 char _ptemp[128];
106
107 self = self;
108 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxInputStream",_kwnames,&_obj0))
109 return NULL;
110{
111 _arg0 = _obj0;
112}
113{
114 PyThreadState* __tstate = wxPyBeginAllowThreads();
115 _result = (wxPyInputStream *)new_wxPyInputStream(_arg0);
116
117 wxPyEndAllowThreads(__tstate);
118 if (PyErr_Occurred()) return NULL;
119} if (_result) {
120 SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyInputStream_p");
121 _resultobj = Py_BuildValue("s",_ptemp);
122 } else {
123 Py_INCREF(Py_None);
124 _resultobj = Py_None;
125 }
126 return _resultobj;
127}
128
129#define wxInputStream_close(_swigobj) (_swigobj->close())
130static PyObject *_wrap_wxInputStream_close(PyObject *self, PyObject *args, PyObject *kwargs) {
131 PyObject * _resultobj;
132 wxPyInputStream * _arg0;
133 PyObject * _argo0 = 0;
134 char *_kwnames[] = { "self", NULL };
135
136 self = self;
137 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_close",_kwnames,&_argo0))
138 return NULL;
139 if (_argo0) {
140 if (_argo0 == Py_None) { _arg0 = NULL; }
141 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
142 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_close. Expected _wxPyInputStream_p.");
143 return NULL;
144 }
145 }
146{
147 PyThreadState* __tstate = wxPyBeginAllowThreads();
148 wxInputStream_close(_arg0);
149
150 wxPyEndAllowThreads(__tstate);
151 if (PyErr_Occurred()) return NULL;
152} Py_INCREF(Py_None);
153 _resultobj = Py_None;
154 return _resultobj;
155}
156
157#define wxInputStream_flush(_swigobj) (_swigobj->flush())
158static PyObject *_wrap_wxInputStream_flush(PyObject *self, PyObject *args, PyObject *kwargs) {
159 PyObject * _resultobj;
160 wxPyInputStream * _arg0;
161 PyObject * _argo0 = 0;
162 char *_kwnames[] = { "self", NULL };
163
164 self = self;
165 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_flush",_kwnames,&_argo0))
166 return NULL;
167 if (_argo0) {
168 if (_argo0 == Py_None) { _arg0 = NULL; }
169 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
170 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_flush. Expected _wxPyInputStream_p.");
171 return NULL;
172 }
173 }
174{
175 PyThreadState* __tstate = wxPyBeginAllowThreads();
176 wxInputStream_flush(_arg0);
177
178 wxPyEndAllowThreads(__tstate);
179 if (PyErr_Occurred()) return NULL;
180} Py_INCREF(Py_None);
181 _resultobj = Py_None;
182 return _resultobj;
183}
184
185#define wxInputStream_eof(_swigobj) (_swigobj->eof())
186static PyObject *_wrap_wxInputStream_eof(PyObject *self, PyObject *args, PyObject *kwargs) {
187 PyObject * _resultobj;
188 bool _result;
189 wxPyInputStream * _arg0;
190 PyObject * _argo0 = 0;
191 char *_kwnames[] = { "self", NULL };
192
193 self = self;
194 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_eof",_kwnames,&_argo0))
195 return NULL;
196 if (_argo0) {
197 if (_argo0 == Py_None) { _arg0 = NULL; }
198 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
199 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_eof. Expected _wxPyInputStream_p.");
200 return NULL;
201 }
202 }
203{
204 PyThreadState* __tstate = wxPyBeginAllowThreads();
205 _result = (bool )wxInputStream_eof(_arg0);
206
207 wxPyEndAllowThreads(__tstate);
208 if (PyErr_Occurred()) return NULL;
209} _resultobj = Py_BuildValue("i",_result);
210 return _resultobj;
211}
212
213#define wxInputStream_read(_swigobj,_swigarg0) (_swigobj->read(_swigarg0))
214static PyObject *_wrap_wxInputStream_read(PyObject *self, PyObject *args, PyObject *kwargs) {
215 PyObject * _resultobj;
216 PyObject * _result;
217 wxPyInputStream * _arg0;
218 int _arg1 = (int ) -1;
219 PyObject * _argo0 = 0;
220 char *_kwnames[] = { "self","size", NULL };
221
222 self = self;
223 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_read",_kwnames,&_argo0,&_arg1))
224 return NULL;
225 if (_argo0) {
226 if (_argo0 == Py_None) { _arg0 = NULL; }
227 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
228 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_read. Expected _wxPyInputStream_p.");
229 return NULL;
230 }
231 }
232{
233 PyThreadState* __tstate = wxPyBeginAllowThreads();
234 _result = (PyObject *)wxInputStream_read(_arg0,_arg1);
235
236 wxPyEndAllowThreads(__tstate);
237 if (PyErr_Occurred()) return NULL;
238}{
239 _resultobj = _result;
240}
241 return _resultobj;
242}
243
244#define wxInputStream_readline(_swigobj,_swigarg0) (_swigobj->readline(_swigarg0))
245static PyObject *_wrap_wxInputStream_readline(PyObject *self, PyObject *args, PyObject *kwargs) {
246 PyObject * _resultobj;
247 PyObject * _result;
248 wxPyInputStream * _arg0;
249 int _arg1 = (int ) -1;
250 PyObject * _argo0 = 0;
251 char *_kwnames[] = { "self","size", NULL };
252
253 self = self;
254 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readline",_kwnames,&_argo0,&_arg1))
255 return NULL;
256 if (_argo0) {
257 if (_argo0 == Py_None) { _arg0 = NULL; }
258 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
259 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readline. Expected _wxPyInputStream_p.");
260 return NULL;
261 }
262 }
263{
264 PyThreadState* __tstate = wxPyBeginAllowThreads();
265 _result = (PyObject *)wxInputStream_readline(_arg0,_arg1);
266
267 wxPyEndAllowThreads(__tstate);
268 if (PyErr_Occurred()) return NULL;
269}{
270 _resultobj = _result;
271}
272 return _resultobj;
273}
274
275#define wxInputStream_readlines(_swigobj,_swigarg0) (_swigobj->readlines(_swigarg0))
276static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, PyObject *kwargs) {
277 PyObject * _resultobj;
278 PyObject * _result;
279 wxPyInputStream * _arg0;
280 int _arg1 = (int ) -1;
281 PyObject * _argo0 = 0;
282 char *_kwnames[] = { "self","sizehint", NULL };
283
284 self = self;
285 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readlines",_kwnames,&_argo0,&_arg1))
286 return NULL;
287 if (_argo0) {
288 if (_argo0 == Py_None) { _arg0 = NULL; }
289 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
290 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readlines. Expected _wxPyInputStream_p.");
291 return NULL;
292 }
293 }
294{
295 PyThreadState* __tstate = wxPyBeginAllowThreads();
296 _result = (PyObject *)wxInputStream_readlines(_arg0,_arg1);
297
298 wxPyEndAllowThreads(__tstate);
299 if (PyErr_Occurred()) return NULL;
300}{
301 _resultobj = _result;
302}
303 return _resultobj;
304}
305
306#define wxInputStream_seek(_swigobj,_swigarg0,_swigarg1) (_swigobj->seek(_swigarg0,_swigarg1))
307static PyObject *_wrap_wxInputStream_seek(PyObject *self, PyObject *args, PyObject *kwargs) {
308 PyObject * _resultobj;
309 wxPyInputStream * _arg0;
310 int _arg1;
311 int _arg2 = (int ) 0;
312 PyObject * _argo0 = 0;
313 char *_kwnames[] = { "self","offset","whence", NULL };
314
315 self = self;
316 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxInputStream_seek",_kwnames,&_argo0,&_arg1,&_arg2))
317 return NULL;
318 if (_argo0) {
319 if (_argo0 == Py_None) { _arg0 = NULL; }
320 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
321 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_seek. Expected _wxPyInputStream_p.");
322 return NULL;
323 }
324 }
325{
326 PyThreadState* __tstate = wxPyBeginAllowThreads();
327 wxInputStream_seek(_arg0,_arg1,_arg2);
328
329 wxPyEndAllowThreads(__tstate);
330 if (PyErr_Occurred()) return NULL;
331} Py_INCREF(Py_None);
332 _resultobj = Py_None;
333 return _resultobj;
334}
335
336#define wxInputStream_tell(_swigobj) (_swigobj->tell())
337static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObject *kwargs) {
338 PyObject * _resultobj;
339 int _result;
340 wxPyInputStream * _arg0;
341 PyObject * _argo0 = 0;
342 char *_kwnames[] = { "self", NULL };
343
344 self = self;
345 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_tell",_kwnames,&_argo0))
346 return NULL;
347 if (_argo0) {
348 if (_argo0 == Py_None) { _arg0 = NULL; }
349 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
350 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_tell. Expected _wxPyInputStream_p.");
351 return NULL;
352 }
353 }
354{
355 PyThreadState* __tstate = wxPyBeginAllowThreads();
356 _result = (int )wxInputStream_tell(_arg0);
357
358 wxPyEndAllowThreads(__tstate);
359 if (PyErr_Occurred()) return NULL;
360} _resultobj = Py_BuildValue("i",_result);
361 return _resultobj;
362}
363
364#define wxInputStream_Peek(_swigobj) (_swigobj->Peek())
365static PyObject *_wrap_wxInputStream_Peek(PyObject *self, PyObject *args, PyObject *kwargs) {
366 PyObject * _resultobj;
367 char _result;
368 wxPyInputStream * _arg0;
369 PyObject * _argo0 = 0;
370 char *_kwnames[] = { "self", NULL };
371
372 self = self;
373 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Peek",_kwnames,&_argo0))
374 return NULL;
375 if (_argo0) {
376 if (_argo0 == Py_None) { _arg0 = NULL; }
377 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
378 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Peek. Expected _wxPyInputStream_p.");
379 return NULL;
380 }
381 }
382{
383 PyThreadState* __tstate = wxPyBeginAllowThreads();
384 _result = (char )wxInputStream_Peek(_arg0);
385
386 wxPyEndAllowThreads(__tstate);
387 if (PyErr_Occurred()) return NULL;
388} _resultobj = Py_BuildValue("c",_result);
389 return _resultobj;
390}
391
392#define wxInputStream_GetC(_swigobj) (_swigobj->GetC())
393static PyObject *_wrap_wxInputStream_GetC(PyObject *self, PyObject *args, PyObject *kwargs) {
394 PyObject * _resultobj;
395 char _result;
396 wxPyInputStream * _arg0;
397 PyObject * _argo0 = 0;
398 char *_kwnames[] = { "self", NULL };
399
400 self = self;
401 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_GetC",_kwnames,&_argo0))
402 return NULL;
403 if (_argo0) {
404 if (_argo0 == Py_None) { _arg0 = NULL; }
405 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
406 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_GetC. Expected _wxPyInputStream_p.");
407 return NULL;
408 }
409 }
410{
411 PyThreadState* __tstate = wxPyBeginAllowThreads();
412 _result = (char )wxInputStream_GetC(_arg0);
413
414 wxPyEndAllowThreads(__tstate);
415 if (PyErr_Occurred()) return NULL;
416} _resultobj = Py_BuildValue("c",_result);
417 return _resultobj;
418}
419
420#define wxInputStream_LastRead(_swigobj) (_swigobj->LastRead())
421static PyObject *_wrap_wxInputStream_LastRead(PyObject *self, PyObject *args, PyObject *kwargs) {
422 PyObject * _resultobj;
423 size_t _result;
424 wxPyInputStream * _arg0;
425 PyObject * _argo0 = 0;
426 char *_kwnames[] = { "self", NULL };
427
428 self = self;
429 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_LastRead",_kwnames,&_argo0))
430 return NULL;
431 if (_argo0) {
432 if (_argo0 == Py_None) { _arg0 = NULL; }
433 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
434 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_LastRead. Expected _wxPyInputStream_p.");
435 return NULL;
436 }
437 }
438{
439 PyThreadState* __tstate = wxPyBeginAllowThreads();
440 _result = (size_t )wxInputStream_LastRead(_arg0);
441
442 wxPyEndAllowThreads(__tstate);
443 if (PyErr_Occurred()) return NULL;
444} _resultobj = Py_BuildValue("i",_result);
445 return _resultobj;
446}
447
448#define wxInputStream_CanRead(_swigobj) (_swigobj->CanRead())
449static PyObject *_wrap_wxInputStream_CanRead(PyObject *self, PyObject *args, PyObject *kwargs) {
450 PyObject * _resultobj;
451 bool _result;
452 wxPyInputStream * _arg0;
453 PyObject * _argo0 = 0;
454 char *_kwnames[] = { "self", NULL };
455
456 self = self;
457 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_CanRead",_kwnames,&_argo0))
458 return NULL;
459 if (_argo0) {
460 if (_argo0 == Py_None) { _arg0 = NULL; }
461 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
462 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_CanRead. Expected _wxPyInputStream_p.");
463 return NULL;
464 }
465 }
466{
467 PyThreadState* __tstate = wxPyBeginAllowThreads();
468 _result = (bool )wxInputStream_CanRead(_arg0);
469
470 wxPyEndAllowThreads(__tstate);
471 if (PyErr_Occurred()) return NULL;
472} _resultobj = Py_BuildValue("i",_result);
473 return _resultobj;
474}
475
476#define wxInputStream_Eof(_swigobj) (_swigobj->Eof())
477static PyObject *_wrap_wxInputStream_Eof(PyObject *self, PyObject *args, PyObject *kwargs) {
478 PyObject * _resultobj;
479 bool _result;
480 wxPyInputStream * _arg0;
481 PyObject * _argo0 = 0;
482 char *_kwnames[] = { "self", NULL };
483
484 self = self;
485 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Eof",_kwnames,&_argo0))
486 return NULL;
487 if (_argo0) {
488 if (_argo0 == Py_None) { _arg0 = NULL; }
489 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
490 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Eof. Expected _wxPyInputStream_p.");
491 return NULL;
492 }
493 }
494{
495 PyThreadState* __tstate = wxPyBeginAllowThreads();
496 _result = (bool )wxInputStream_Eof(_arg0);
497
498 wxPyEndAllowThreads(__tstate);
499 if (PyErr_Occurred()) return NULL;
500} _resultobj = Py_BuildValue("i",_result);
501 return _resultobj;
502}
503
504#define wxInputStream_Ungetch(_swigobj,_swigarg0) (_swigobj->Ungetch(_swigarg0))
505static PyObject *_wrap_wxInputStream_Ungetch(PyObject *self, PyObject *args, PyObject *kwargs) {
506 PyObject * _resultobj;
507 bool _result;
508 wxPyInputStream * _arg0;
509 char _arg1;
510 PyObject * _argo0 = 0;
511 char *_kwnames[] = { "self","c", NULL };
512
513 self = self;
514 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oc:wxInputStream_Ungetch",_kwnames,&_argo0,&_arg1))
515 return NULL;
516 if (_argo0) {
517 if (_argo0 == Py_None) { _arg0 = NULL; }
518 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
519 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Ungetch. Expected _wxPyInputStream_p.");
520 return NULL;
521 }
522 }
523{
524 PyThreadState* __tstate = wxPyBeginAllowThreads();
525 _result = (bool )wxInputStream_Ungetch(_arg0,_arg1);
526
527 wxPyEndAllowThreads(__tstate);
528 if (PyErr_Occurred()) return NULL;
529} _resultobj = Py_BuildValue("i",_result);
530 return _resultobj;
531}
532
533#define wxInputStream_SeekI(_swigobj,_swigarg0,_swigarg1) (_swigobj->SeekI(_swigarg0,_swigarg1))
534static PyObject *_wrap_wxInputStream_SeekI(PyObject *self, PyObject *args, PyObject *kwargs) {
535 PyObject * _resultobj;
536 long _result;
537 wxPyInputStream * _arg0;
538 long _arg1;
539 wxSeekMode _arg2 = (wxSeekMode ) (wxFromStart);
540 PyObject * _argo0 = 0;
541 char *_kwnames[] = { "self","pos","mode", NULL };
542
543 self = self;
544 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxInputStream_SeekI",_kwnames,&_argo0,&_arg1,&_arg2))
545 return NULL;
546 if (_argo0) {
547 if (_argo0 == Py_None) { _arg0 = NULL; }
548 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
549 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_SeekI. Expected _wxPyInputStream_p.");
550 return NULL;
551 }
552 }
553{
554 PyThreadState* __tstate = wxPyBeginAllowThreads();
555 _result = (long )wxInputStream_SeekI(_arg0,_arg1,_arg2);
556
557 wxPyEndAllowThreads(__tstate);
558 if (PyErr_Occurred()) return NULL;
559} _resultobj = Py_BuildValue("l",_result);
560 return _resultobj;
561}
562
563#define wxInputStream_TellI(_swigobj) (_swigobj->TellI())
564static PyObject *_wrap_wxInputStream_TellI(PyObject *self, PyObject *args, PyObject *kwargs) {
565 PyObject * _resultobj;
566 long _result;
567 wxPyInputStream * _arg0;
568 PyObject * _argo0 = 0;
569 char *_kwnames[] = { "self", NULL };
570
571 self = self;
572 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_TellI",_kwnames,&_argo0))
573 return NULL;
574 if (_argo0) {
575 if (_argo0 == Py_None) { _arg0 = NULL; }
576 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
577 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_TellI. Expected _wxPyInputStream_p.");
578 return NULL;
579 }
580 }
581{
582 PyThreadState* __tstate = wxPyBeginAllowThreads();
583 _result = (long )wxInputStream_TellI(_arg0);
584
585 wxPyEndAllowThreads(__tstate);
586 if (PyErr_Occurred()) return NULL;
587} _resultobj = Py_BuildValue("l",_result);
588 return _resultobj;
589}
590
591static void wxOutputStream_write(wxOutputStream *self,PyObject * obj) {
592 // We use only strings for the streams, not unicode
593 PyObject* str = PyObject_Str(obj);
594 if (! str) {
595 PyErr_SetString(PyExc_TypeError, "Unable to convert to string");
596 return;
597 }
598 self->Write(PyString_AS_STRING(str),
599 PyString_GET_SIZE(str));
600 Py_DECREF(str);
601 }
602static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyObject *kwargs) {
603 PyObject * _resultobj;
604 wxOutputStream * _arg0;
605 PyObject * _arg1;
606 PyObject * _argo0 = 0;
607 PyObject * _obj1 = 0;
608 char *_kwnames[] = { "self","obj", NULL };
609
610 self = self;
611 if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxOutputStream_write",_kwnames,&_argo0,&_obj1))
612 return NULL;
613 if (_argo0) {
614 if (_argo0 == Py_None) { _arg0 = NULL; }
615 else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxOutputStream_p")) {
616 PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxOutputStream_write. Expected _wxOutputStream_p.");
617 return NULL;
618 }
619 }
620{
621 _arg1 = _obj1;
622}
623{
624 PyThreadState* __tstate = wxPyBeginAllowThreads();
625 wxOutputStream_write(_arg0,_arg1);
626
627 wxPyEndAllowThreads(__tstate);
628 if (PyErr_Occurred()) return NULL;
629} Py_INCREF(Py_None);
630 _resultobj = Py_None;
631 return _resultobj;
632}
633
634static PyMethodDef streamscMethods[] = {
635 { "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS },
636 { "wxInputStream_TellI", (PyCFunction) _wrap_wxInputStream_TellI, METH_VARARGS | METH_KEYWORDS },
637 { "wxInputStream_SeekI", (PyCFunction) _wrap_wxInputStream_SeekI, METH_VARARGS | METH_KEYWORDS },
638 { "wxInputStream_Ungetch", (PyCFunction) _wrap_wxInputStream_Ungetch, METH_VARARGS | METH_KEYWORDS },
639 { "wxInputStream_Eof", (PyCFunction) _wrap_wxInputStream_Eof, METH_VARARGS | METH_KEYWORDS },
640 { "wxInputStream_CanRead", (PyCFunction) _wrap_wxInputStream_CanRead, METH_VARARGS | METH_KEYWORDS },
641 { "wxInputStream_LastRead", (PyCFunction) _wrap_wxInputStream_LastRead, METH_VARARGS | METH_KEYWORDS },
642 { "wxInputStream_GetC", (PyCFunction) _wrap_wxInputStream_GetC, METH_VARARGS | METH_KEYWORDS },
643 { "wxInputStream_Peek", (PyCFunction) _wrap_wxInputStream_Peek, METH_VARARGS | METH_KEYWORDS },
644 { "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS },
645 { "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS },
646 { "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS },
647 { "wxInputStream_readline", (PyCFunction) _wrap_wxInputStream_readline, METH_VARARGS | METH_KEYWORDS },
648 { "wxInputStream_read", (PyCFunction) _wrap_wxInputStream_read, METH_VARARGS | METH_KEYWORDS },
649 { "wxInputStream_eof", (PyCFunction) _wrap_wxInputStream_eof, METH_VARARGS | METH_KEYWORDS },
650 { "wxInputStream_flush", (PyCFunction) _wrap_wxInputStream_flush, METH_VARARGS | METH_KEYWORDS },
651 { "wxInputStream_close", (PyCFunction) _wrap_wxInputStream_close, METH_VARARGS | METH_KEYWORDS },
652 { "new_wxInputStream", (PyCFunction) _wrap_new_wxInputStream, METH_VARARGS | METH_KEYWORDS },
653 { NULL, NULL }
654};
655#ifdef __cplusplus
656}
657#endif
658/*
659 * This table is used by the pointer type-checker
660 */
661static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
662 { "_signed_long","_long",0},
663 { "_wxPrintQuality","_wxCoord",0},
664 { "_wxPrintQuality","_int",0},
665 { "_wxPrintQuality","_signed_int",0},
666 { "_wxPrintQuality","_unsigned_int",0},
667 { "_wxPrintQuality","_wxWindowID",0},
668 { "_wxPrintQuality","_uint",0},
669 { "_wxPrintQuality","_EBool",0},
670 { "_wxPrintQuality","_size_t",0},
671 { "_wxPrintQuality","_time_t",0},
672 { "_byte","_unsigned_char",0},
673 { "_long","_unsigned_long",0},
674 { "_long","_signed_long",0},
675 { "_size_t","_wxCoord",0},
676 { "_size_t","_wxPrintQuality",0},
677 { "_size_t","_time_t",0},
678 { "_size_t","_unsigned_int",0},
679 { "_size_t","_int",0},
680 { "_size_t","_wxWindowID",0},
681 { "_size_t","_uint",0},
682 { "_uint","_wxCoord",0},
683 { "_uint","_wxPrintQuality",0},
684 { "_uint","_time_t",0},
685 { "_uint","_size_t",0},
686 { "_uint","_unsigned_int",0},
687 { "_uint","_int",0},
688 { "_uint","_wxWindowID",0},
689 { "_wxChar","_char",0},
690 { "_char","_wxChar",0},
691 { "_EBool","_wxCoord",0},
692 { "_EBool","_wxPrintQuality",0},
693 { "_EBool","_signed_int",0},
694 { "_EBool","_int",0},
695 { "_EBool","_wxWindowID",0},
696 { "_unsigned_long","_long",0},
697 { "_signed_int","_wxCoord",0},
698 { "_signed_int","_wxPrintQuality",0},
699 { "_signed_int","_EBool",0},
700 { "_signed_int","_wxWindowID",0},
701 { "_signed_int","_int",0},
702 { "_WXTYPE","_short",0},
703 { "_WXTYPE","_signed_short",0},
704 { "_WXTYPE","_unsigned_short",0},
705 { "_unsigned_short","_WXTYPE",0},
706 { "_unsigned_short","_short",0},
707 { "_signed_short","_WXTYPE",0},
708 { "_signed_short","_short",0},
709 { "_unsigned_char","_byte",0},
710 { "_unsigned_int","_wxCoord",0},
711 { "_unsigned_int","_wxPrintQuality",0},
712 { "_unsigned_int","_time_t",0},
713 { "_unsigned_int","_size_t",0},
714 { "_unsigned_int","_uint",0},
715 { "_unsigned_int","_wxWindowID",0},
716 { "_unsigned_int","_int",0},
717 { "_short","_WXTYPE",0},
718 { "_short","_unsigned_short",0},
719 { "_short","_signed_short",0},
720 { "_wxWindowID","_wxCoord",0},
721 { "_wxWindowID","_wxPrintQuality",0},
722 { "_wxWindowID","_time_t",0},
723 { "_wxWindowID","_size_t",0},
724 { "_wxWindowID","_EBool",0},
725 { "_wxWindowID","_uint",0},
726 { "_wxWindowID","_int",0},
727 { "_wxWindowID","_signed_int",0},
728 { "_wxWindowID","_unsigned_int",0},
729 { "_int","_wxCoord",0},
730 { "_int","_wxPrintQuality",0},
731 { "_int","_time_t",0},
732 { "_int","_size_t",0},
733 { "_int","_EBool",0},
734 { "_int","_uint",0},
735 { "_int","_wxWindowID",0},
736 { "_int","_unsigned_int",0},
737 { "_int","_signed_int",0},
738 { "_time_t","_wxCoord",0},
739 { "_time_t","_wxPrintQuality",0},
740 { "_time_t","_unsigned_int",0},
741 { "_time_t","_int",0},
742 { "_time_t","_wxWindowID",0},
743 { "_time_t","_uint",0},
744 { "_time_t","_size_t",0},
745 { "_wxCoord","_int",0},
746 { "_wxCoord","_signed_int",0},
747 { "_wxCoord","_unsigned_int",0},
748 { "_wxCoord","_wxWindowID",0},
749 { "_wxCoord","_uint",0},
750 { "_wxCoord","_EBool",0},
751 { "_wxCoord","_size_t",0},
752 { "_wxCoord","_time_t",0},
753 { "_wxCoord","_wxPrintQuality",0},
754{0,0,0}};
755
756static PyObject *SWIG_globals;
757#ifdef __cplusplus
758extern "C"
759#endif
760SWIGEXPORT(void) initstreamsc() {
761 PyObject *m, *d;
762 SWIG_globals = SWIG_newvarlink();
763 m = Py_InitModule("streamsc", streamscMethods);
764 d = PyModule_GetDict(m);
765 PyDict_SetItemString(d,"wxFromStart", PyInt_FromLong((long) wxFromStart));
766 PyDict_SetItemString(d,"wxFromCurrent", PyInt_FromLong((long) wxFromCurrent));
767 PyDict_SetItemString(d,"wxFromEnd", PyInt_FromLong((long) wxFromEnd));
768
769 wxPyPtrTypeMap_Add("wxInputStream", "wxPyInputStream");
770{
771 int i;
772 for (i = 0; _swig_mapping[i].n1; i++)
773 SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
774}
775}