From: Robin Dunn Date: Fri, 9 Nov 2001 23:19:16 +0000 (+0000) Subject: Added build instructions for OS X. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b6e5c4450a911ae75c2955e2f2277cd24b95ddbb?hp=e44d6a1f908b57d0e84ee327c31ac240826a8778 Added build instructions for OS X. Added a very simple demo to help build functionality bit by bit. Regenerated the files that needed SWIGging. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/BUILD.osx.txt b/wxPython/BUILD.osx.txt new file mode 100644 index 0000000000..3e49d03217 --- /dev/null +++ b/wxPython/BUILD.osx.txt @@ -0,0 +1,69 @@ +Building wxPython on Mac OS X +----------------------------- + +NOTE: OS X support is HIGHLY EXPERIMENTAL at this time. Most things + don't work correctly (or at all) yet. + +These are the steps I have used for building wxPython on Mac OS X 10.1 +with the Apple Developer Tools, a.k.a the Darwin version. I assume +that you know your way around a command line and that you know how to +get things from various CVS repositories as needed. + + +1. As of this writing the CVS version of Python (2.2b1+) is required. + You can get it via anonymous CVS from the Python project at + Sourceforge. Build Python.app and install it as described in the + Mac/OSX/README file in the Python distribution. + +2. You may want to make a symlink or two in /usr/local/bin so that + this version of Python can be found from the command line. For + example: + + cd /usr/local/bin + sudo ln -s /Library/Frameworks/Python.framework/Versions/2.2/bin/python2.2.exe python2.2 + sudo ln -s python2.2 python + +3. In a wxWindows CVS tree make a build directory. + + cd ~/proj/wxWindows # or wherever you put it + mkdir build + +4. Run configure from that build directory. + + cd build + ../configure --with-mac --with-opengl --enable-debug + +5. Make and install wxMac. + + make + sudo make install + +6. Build wxPython for testing (without installing it.) + + cd ../wxPython + python setup.py IN_CVS_TREE=1 build_ext --inplace --debug + +7. Test. The easiest way to do this from the CVS tree (witout having + to reinstall after every build) is to make a symlink in the demo + directory to the wxPython package dir, and then run stuff directly + from the demo. + + cd demo + ln -s ../wxPython . + +8. Now just navigate in the Finder to the demo directory and double + click demo.py, or simple.py, or whatever you want to run. + (Unfortunately it can't be done from the commandline in a terminal + window. You can open the Console app to see any tracebacks or + other output.) + +9. Figure out what's wrong, figure out how to fix it, and then send + the patches to me. + +--Robin + + + + + + diff --git a/wxPython/b b/wxPython/b index edc7f64145..ecad311550 100755 --- a/wxPython/b +++ b/wxPython/b @@ -20,9 +20,9 @@ shift python$PYVER -c "import sys;print '\n', sys.version, '\n'" -##WXPYVER=`python$PYVER -c "import setup;print setup.VERSION"` + SETUP="python$PYVER -u setup.py" -FLAGS="USE_SWIG=1 IN_CVS_TREE=1" +FLAGS="USE_SWIG=1 IN_CVS_TREE=1" # BUILD_GLCANVAS=0" OTHERFLAGS="" @@ -56,7 +56,7 @@ elif [ "$1" = "s" ]; then # "r" --> rpm dist elif [ "$1" = "r" ]; then - + WXPYVER=`python$PYVER -c "import setup;print setup.VERSION"` for VER in 15 20 21; do getpyver $VER diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index ba77fa8ad2..d473e40801 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -54,8 +54,10 @@ class wxGLCanvas; class wxGLContext : public wxObject { public: +#ifndef __WXMAC__ // fix this? wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette); +#endif ~wxGLContext(); void SetCurrent(); diff --git a/wxPython/contrib/glcanvas/mac/glcanvas.cpp b/wxPython/contrib/glcanvas/mac/glcanvas.cpp index 4dd5f02bd1..9e0521aba4 100644 --- a/wxPython/contrib/glcanvas/mac/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/mac/glcanvas.cpp @@ -106,52 +106,6 @@ static void *SwigwxGLContextTowxObject(void *ptr) { return (void *) dest; } -#define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGLContext * _result; - bool _arg0; - wxGLCanvas * _arg1; - wxPalette * _arg2 = (wxPalette *) &wxNullPalette; - int tempbool0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "isRGB","win","palette", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iO|O:new_wxGLContext",_kwnames,&tempbool0,&_argo1,&_argo2)) - return NULL; - _arg0 = (bool ) tempbool0; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLCanvas_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - #define delete_wxGLContext(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -288,22 +242,6 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO return _resultobj; } -static void *SwigwxGLCanvasTowxScrolledWindow(void *ptr) { - wxGLCanvas *src; - wxScrolledWindow *dest; - src = (wxGLCanvas *) ptr; - dest = (wxScrolledWindow *) src; - return (void *) dest; -} - -static void *SwigwxGLCanvasTowxPanel(void *ptr) { - wxGLCanvas *src; - wxPanel *dest; - src = (wxGLCanvas *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - static void *SwigwxGLCanvasTowxWindow(void *ptr) { wxGLCanvas *src; wxWindow *dest; @@ -631,7 +569,6 @@ static PyMethodDef glcanvascMethods[] = { { "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS }, { "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS }, { "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS }, - { "new_wxGLContext", (PyCFunction) _wrap_new_wxGLContext, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus @@ -661,7 +598,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, { "_uint","_time_t",0}, @@ -695,7 +631,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxGLContext",SwigwxGLContextTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, diff --git a/wxPython/contrib/glcanvas/mac/glcanvas.py b/wxPython/contrib/glcanvas/mac/glcanvas.py index c65ad27252..f9962bb71b 100644 --- a/wxPython/contrib/glcanvas/mac/glcanvas.py +++ b/wxPython/contrib/glcanvas/mac/glcanvas.py @@ -63,14 +63,13 @@ class wxGLContextPtr(wxObjectPtr): def __repr__(self): return "" % (self.this,) class wxGLContext(wxGLContextPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(glcanvasc.new_wxGLContext,_args,_kwargs) - self.thisown = 1 + def __init__(self,this): + self.this = this -class wxGLCanvasPtr(wxScrolledWindowPtr): +class wxGLCanvasPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 diff --git a/wxPython/demo/simple.py b/wxPython/demo/simple.py new file mode 100644 index 0000000000..3e745d419e --- /dev/null +++ b/wxPython/demo/simple.py @@ -0,0 +1,45 @@ + +#---------------------------------------------------------------------- +# A very simple wxPython example. Just a wxFrame, wxPanel, +# wxStaticText, wxButton, and a wxBoxSizer, but it shows the basic +# structure of any wxPython application. +#---------------------------------------------------------------------- + +from wxPython.wx import * + +class MyFrame(wxFrame): + def __init__(self, parent, title): + wxFrame.__init__(self, parent, -1, title, size=(350, 200)) + + menuBar = wxMenuBar() + menu = wxMenu() + menu.Append(101, "E&xit\tAlt-X", "Exit demo") + EVT_MENU(self, 101, self.OnButton) + menuBar.Append(menu, "&File") + self.SetMenuBar(menuBar) + + panel = wxPanel(self, -1) + text = wxStaticText(panel, -1, "Hello World!\nWhere is my menu?") + text.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD)) + text.SetSize(text.GetBestSize()) + btn = wxButton(panel, -1, "Close") + btn.SetDefault() + + sizer = wxBoxSizer(wxVERTICAL) + sizer.Add(text, 0, wxALL, 10) + sizer.Add(btn, 0, wxALL, 10) + panel.SetSizer(sizer) + panel.SetAutoLayout(true) + panel.Layout() + + EVT_BUTTON(self, btn.GetId(), self.OnButton) + + + def OnButton(self, evt): + self.Close() + +app = wxPySimpleApp() +frame = MyFrame(None, "Simple wxPython App") +frame.Show(true) +app.MainLoop() + diff --git a/wxPython/src/mac/calendar.cpp b/wxPython/src/mac/calendar.cpp index 9452f8c2cd..6c0f8da5db 100644 --- a/wxPython/src/mac/calendar.cpp +++ b/wxPython/src/mac/calendar.cpp @@ -1123,6 +1123,198 @@ static PyObject *_wrap_wxCalendarCtrl_GetDate(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxCalendarCtrl_SetLowerDateLimit(_swigobj,_swigarg0) (_swigobj->SetLowerDateLimit(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetLowerDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxCalendarCtrl_SetLowerDateLimit",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetLowerDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetLowerDateLimit. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_SetLowerDateLimit(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarCtrl_GetLowerDateLimit(_swigobj) (_swigobj->GetLowerDateLimit()) +static PyObject *_wrap_wxCalendarCtrl_GetLowerDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetLowerDateLimit",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetLowerDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarCtrl_GetLowerDateLimit(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetUpperDateLimit(_swigobj,_swigarg0) (_swigobj->SetUpperDateLimit(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetUpperDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxCalendarCtrl_SetUpperDateLimit",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetUpperDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetUpperDateLimit. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_SetUpperDateLimit(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarCtrl_GetUpperDateLimit(_swigobj) (_swigobj->GetUpperDateLimit()) +static PyObject *_wrap_wxCalendarCtrl_GetUpperDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetUpperDateLimit",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetUpperDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarCtrl_GetUpperDateLimit(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetDateRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDateRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetDateRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1 = (wxDateTime *) &wxDefaultDateTime; + wxDateTime * _arg2 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","lowerdate","upperdate", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxCalendarCtrl_SetDateRange",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetDateRange. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_SetDateRange(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxCalendarCtrl_EnableYearChange(_swigobj,_swigarg0) (_swigobj->EnableYearChange(_swigarg0)) static PyObject *_wrap_wxCalendarCtrl_EnableYearChange(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1750,7 +1942,71 @@ static PyObject *_wrap_wxCalendarCtrl_HitTest(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxCalendarCtrl_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_Enable",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_Enable. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_Enable(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarCtrl_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_Show",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_Show. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_Show(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef calendarcMethods[] = { + { "wxCalendarCtrl_Show", (PyCFunction) _wrap_wxCalendarCtrl_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_Enable", (PyCFunction) _wrap_wxCalendarCtrl_Enable, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_HitTest", (PyCFunction) _wrap_wxCalendarCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_ResetAttr", (PyCFunction) _wrap_wxCalendarCtrl_ResetAttr, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_SetHoliday", (PyCFunction) _wrap_wxCalendarCtrl_SetHoliday, METH_VARARGS | METH_KEYWORDS }, @@ -1768,6 +2024,11 @@ static PyMethodDef calendarcMethods[] = { { "wxCalendarCtrl_EnableHolidayDisplay", (PyCFunction) _wrap_wxCalendarCtrl_EnableHolidayDisplay, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_EnableMonthChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableMonthChange, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_EnableYearChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableYearChange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetDateRange", (PyCFunction) _wrap_wxCalendarCtrl_SetDateRange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetUpperDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_GetUpperDateLimit, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetUpperDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_SetUpperDateLimit, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetLowerDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_GetLowerDateLimit, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetLowerDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_SetLowerDateLimit, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_GetDate", (PyCFunction) _wrap_wxCalendarCtrl_GetDate, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_SetDate", (PyCFunction) _wrap_wxCalendarCtrl_SetDate, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_Create", (PyCFunction) _wrap_wxCalendarCtrl_Create, METH_VARARGS | METH_KEYWORDS }, @@ -1927,9 +2188,14 @@ SWIGEXPORT(void) initcalendarc() { PyDict_SetItemString(d,"wxCAL_SHOW_HOLIDAYS", PyInt_FromLong((long) wxCAL_SHOW_HOLIDAYS)); PyDict_SetItemString(d,"wxCAL_NO_YEAR_CHANGE", PyInt_FromLong((long) wxCAL_NO_YEAR_CHANGE)); PyDict_SetItemString(d,"wxCAL_NO_MONTH_CHANGE", PyInt_FromLong((long) wxCAL_NO_MONTH_CHANGE)); + PyDict_SetItemString(d,"wxCAL_SEQUENTIAL_MONTH_SELECTION", PyInt_FromLong((long) wxCAL_SEQUENTIAL_MONTH_SELECTION)); + PyDict_SetItemString(d,"wxCAL_SHOW_SURROUNDING_WEEKS", PyInt_FromLong((long) wxCAL_SHOW_SURROUNDING_WEEKS)); PyDict_SetItemString(d,"wxCAL_HITTEST_NOWHERE", PyInt_FromLong((long) wxCAL_HITTEST_NOWHERE)); PyDict_SetItemString(d,"wxCAL_HITTEST_HEADER", PyInt_FromLong((long) wxCAL_HITTEST_HEADER)); PyDict_SetItemString(d,"wxCAL_HITTEST_DAY", PyInt_FromLong((long) wxCAL_HITTEST_DAY)); + PyDict_SetItemString(d,"wxCAL_HITTEST_INCMONTH", PyInt_FromLong((long) wxCAL_HITTEST_INCMONTH)); + PyDict_SetItemString(d,"wxCAL_HITTEST_DECMONTH", PyInt_FromLong((long) wxCAL_HITTEST_DECMONTH)); + PyDict_SetItemString(d,"wxCAL_HITTEST_SURROUNDING_WEEK", PyInt_FromLong((long) wxCAL_HITTEST_SURROUNDING_WEEK)); PyDict_SetItemString(d,"wxCAL_BORDER_NONE", PyInt_FromLong((long) wxCAL_BORDER_NONE)); PyDict_SetItemString(d,"wxCAL_BORDER_SQUARE", PyInt_FromLong((long) wxCAL_BORDER_SQUARE)); PyDict_SetItemString(d,"wxCAL_BORDER_ROUND", PyInt_FromLong((long) wxCAL_BORDER_ROUND)); diff --git a/wxPython/src/mac/calendar.py b/wxPython/src/mac/calendar.py index 411013dc6b..ab9fa83fb3 100644 --- a/wxPython/src/mac/calendar.py +++ b/wxPython/src/mac/calendar.py @@ -144,6 +144,23 @@ class wxCalendarCtrlPtr(wxControlPtr): val = apply(calendarc.wxCalendarCtrl_GetDate,(self,) + _args, _kwargs) if val: val = wxDateTimePtr(val) return val + def SetLowerDateLimit(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetLowerDateLimit,(self,) + _args, _kwargs) + return val + def GetLowerDateLimit(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetLowerDateLimit,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetUpperDateLimit(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetUpperDateLimit,(self,) + _args, _kwargs) + return val + def GetUpperDateLimit(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetUpperDateLimit,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetDateRange(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetDateRange,(self,) + _args, _kwargs) + return val def EnableYearChange(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_EnableYearChange,(self,) + _args, _kwargs) return val @@ -202,6 +219,12 @@ class wxCalendarCtrlPtr(wxControlPtr): def HitTest(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_HitTest,(self,) + _args, _kwargs) return val + def Enable(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_Enable,(self,) + _args, _kwargs) + return val + def Show(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_Show,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxCalendarCtrl(wxCalendarCtrlPtr): @@ -232,9 +255,14 @@ wxCAL_MONDAY_FIRST = calendarc.wxCAL_MONDAY_FIRST wxCAL_SHOW_HOLIDAYS = calendarc.wxCAL_SHOW_HOLIDAYS wxCAL_NO_YEAR_CHANGE = calendarc.wxCAL_NO_YEAR_CHANGE wxCAL_NO_MONTH_CHANGE = calendarc.wxCAL_NO_MONTH_CHANGE +wxCAL_SEQUENTIAL_MONTH_SELECTION = calendarc.wxCAL_SEQUENTIAL_MONTH_SELECTION +wxCAL_SHOW_SURROUNDING_WEEKS = calendarc.wxCAL_SHOW_SURROUNDING_WEEKS wxCAL_HITTEST_NOWHERE = calendarc.wxCAL_HITTEST_NOWHERE wxCAL_HITTEST_HEADER = calendarc.wxCAL_HITTEST_HEADER wxCAL_HITTEST_DAY = calendarc.wxCAL_HITTEST_DAY +wxCAL_HITTEST_INCMONTH = calendarc.wxCAL_HITTEST_INCMONTH +wxCAL_HITTEST_DECMONTH = calendarc.wxCAL_HITTEST_DECMONTH +wxCAL_HITTEST_SURROUNDING_WEEK = calendarc.wxCAL_HITTEST_SURROUNDING_WEEK wxCAL_BORDER_NONE = calendarc.wxCAL_BORDER_NONE wxCAL_BORDER_SQUARE = calendarc.wxCAL_BORDER_SQUARE wxCAL_BORDER_ROUND = calendarc.wxCAL_BORDER_ROUND diff --git a/wxPython/src/mac/cmndlgs.cpp b/wxPython/src/mac/cmndlgs.cpp index 9820ccbfe3..c46279f12d 100644 --- a/wxPython/src/mac/cmndlgs.cpp +++ b/wxPython/src/mac/cmndlgs.cpp @@ -1470,13 +1470,7 @@ static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, Py static PyObject * wxFileDialog_GetFilenames(wxFileDialog *self) { wxArrayString arr; self->GetFilenames(arr); - size_t count = arr.GetCount(); - PyObject* listObj = PyList_New(0); - for(size_t x=0; xGetPaths(arr); - size_t count = arr.GetCount(); - PyObject* listObj = PyList_New(0); - for(size_t x=0; xm_oldItemIndex = _swigval,_swigval) -static PyObject *_wrap_wxListEvent_m_oldItemIndex_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - long _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_oldItemIndex", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListEvent_m_oldItemIndex_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_oldItemIndex_set. Expected _wxListEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListEvent_m_oldItemIndex_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListEvent_m_oldItemIndex_get(_swigobj) ((long ) _swigobj->m_oldItemIndex) -static PyObject *_wrap_wxListEvent_m_oldItemIndex_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_m_oldItemIndex_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_m_oldItemIndex_get. Expected _wxListEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListEvent_m_oldItemIndex_get(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - #define wxListEvent_m_col_set(_swigobj,_swigval) (_swigobj->m_col = _swigval,_swigval) static PyObject *_wrap_wxListEvent_m_col_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2669,62 +2612,6 @@ static PyObject *_wrap_wxListEvent_GetIndex(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxListEvent_GetOldIndex(_swigobj) (_swigobj->GetOldIndex()) -static PyObject *_wrap_wxListEvent_GetOldIndex(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetOldIndex",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetOldIndex. Expected _wxListEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListEvent_GetOldIndex(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxListEvent_GetOldItem(_swigobj) (_swigobj->GetOldItem()) -static PyObject *_wrap_wxListEvent_GetOldItem(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxListEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetOldItem",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetOldItem. Expected _wxListEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListEvent_GetOldItem(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - #define wxListEvent_GetColumn(_swigobj) (_swigobj->GetColumn()) static PyObject *_wrap_wxListEvent_GetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9615,8 +9502,6 @@ static PyMethodDef controls2cMethods[] = { { "wxListEvent_GetPoint", (PyCFunction) _wrap_wxListEvent_GetPoint, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_Cancelled", (PyCFunction) _wrap_wxListEvent_Cancelled, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_GetColumn", (PyCFunction) _wrap_wxListEvent_GetColumn, METH_VARARGS | METH_KEYWORDS }, - { "wxListEvent_GetOldItem", (PyCFunction) _wrap_wxListEvent_GetOldItem, METH_VARARGS | METH_KEYWORDS }, - { "wxListEvent_GetOldIndex", (PyCFunction) _wrap_wxListEvent_GetOldIndex, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_GetIndex", (PyCFunction) _wrap_wxListEvent_GetIndex, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_GetCode", (PyCFunction) _wrap_wxListEvent_GetCode, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_item_get", (PyCFunction) _wrap_wxListEvent_m_item_get, METH_VARARGS | METH_KEYWORDS }, @@ -9627,8 +9512,6 @@ static PyMethodDef controls2cMethods[] = { { "wxListEvent_m_cancelled_set", (PyCFunction) _wrap_wxListEvent_m_cancelled_set, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_col_get", (PyCFunction) _wrap_wxListEvent_m_col_get, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_col_set", (PyCFunction) _wrap_wxListEvent_m_col_set, METH_VARARGS | METH_KEYWORDS }, - { "wxListEvent_m_oldItemIndex_get", (PyCFunction) _wrap_wxListEvent_m_oldItemIndex_get, METH_VARARGS | METH_KEYWORDS }, - { "wxListEvent_m_oldItemIndex_set", (PyCFunction) _wrap_wxListEvent_m_oldItemIndex_set, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_itemIndex_get", (PyCFunction) _wrap_wxListEvent_m_itemIndex_get, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_itemIndex_set", (PyCFunction) _wrap_wxListEvent_m_itemIndex_set, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_code_get", (PyCFunction) _wrap_wxListEvent_m_code_get, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/controls2.py b/wxPython/src/mac/controls2.py index 7b8c5eae19..bed6003602 100644 --- a/wxPython/src/mac/controls2.py +++ b/wxPython/src/mac/controls2.py @@ -349,12 +349,6 @@ class wxListEventPtr(wxNotifyEventPtr): def GetIndex(self, *_args, **_kwargs): val = apply(controls2c.wxListEvent_GetIndex,(self,) + _args, _kwargs) return val - def GetOldIndex(self, *_args, **_kwargs): - val = apply(controls2c.wxListEvent_GetOldIndex,(self,) + _args, _kwargs) - return val - def GetOldItem(self, *_args, **_kwargs): - val = apply(controls2c.wxListEvent_GetOldItem,(self,) + _args, _kwargs) - return val def GetColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListEvent_GetColumn,(self,) + _args, _kwargs) return val @@ -396,9 +390,6 @@ class wxListEventPtr(wxNotifyEventPtr): if name == "m_itemIndex" : controls2c.wxListEvent_m_itemIndex_set(self,value) return - if name == "m_oldItemIndex" : - controls2c.wxListEvent_m_oldItemIndex_set(self,value) - return if name == "m_col" : controls2c.wxListEvent_m_col_set(self,value) return @@ -417,8 +408,6 @@ class wxListEventPtr(wxNotifyEventPtr): return controls2c.wxListEvent_m_code_get(self) if name == "m_itemIndex" : return controls2c.wxListEvent_m_itemIndex_get(self) - if name == "m_oldItemIndex" : - return controls2c.wxListEvent_m_oldItemIndex_get(self) if name == "m_col" : return controls2c.wxListEvent_m_col_get(self) if name == "m_cancelled" : diff --git a/wxPython/src/mac/gdi.cpp b/wxPython/src/mac/gdi.cpp index ddcaa067e9..6ea94f4de9 100644 --- a/wxPython/src/mac/gdi.cpp +++ b/wxPython/src/mac/gdi.cpp @@ -57,9 +57,6 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include -#ifndef __WXMSW__ -#include -#endif #include #include #include @@ -9309,84 +9306,6 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * return _resultobj; } -static void *SwigwxPostScriptDCTowxDC(void *ptr) { - wxPostScriptDC *src; - wxDC *dest; - src = (wxPostScriptDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -static void *SwigwxPostScriptDCTowxObject(void *ptr) { - wxPostScriptDC *src; - wxObject *dest; - src = (wxPostScriptDC *) ptr; - dest = (wxObject *) src; - return (void *) dest; -} - -#define new_wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2) (new wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPostScriptDC * _result; - wxString * _arg0; - bool _arg1 = (bool ) TRUE; - wxWindow * _arg2 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - int tempbool1 = (int) TRUE; - PyObject * _argo2 = 0; - char *_kwnames[] = { "output","interactive","win", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC",_kwnames,&_obj0,&tempbool1,&_argo2)) - return NULL; -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif -} - _arg1 = (bool ) tempbool1; - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPostScriptDC. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - static void *SwigwxPaletteTowxGDIObject(void *ptr) { wxPalette *src; wxGDIObject *dest; @@ -11144,7 +11063,6 @@ static PyMethodDef gdicMethods[] = { { "wxPalette_GetPixel", (PyCFunction) _wrap_wxPalette_GetPixel, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPalette", (PyCFunction) _wrap_delete_wxPalette, METH_VARARGS | METH_KEYWORDS }, { "new_wxPalette", (PyCFunction) _wrap_new_wxPalette, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPostScriptDC", (PyCFunction) _wrap_new_wxPostScriptDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindowDC", (PyCFunction) _wrap_new_wxWindowDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxPaintDC", (PyCFunction) _wrap_new_wxPaintDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxClientDC", (PyCFunction) _wrap_new_wxClientDC, METH_VARARGS | METH_KEYWORDS }, @@ -11407,7 +11325,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGDIObject","_wxCursor",SwigwxCursorTowxGDIObject}, { "_wxGDIObject","_wxIcon",SwigwxIconTowxGDIObject}, { "_wxGDIObject","_wxBitmap",SwigwxBitmapTowxGDIObject}, - { "_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC}, { "_wxDC","_wxWindowDC",SwigwxWindowDCTowxDC}, { "_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC}, { "_wxDC","_wxClientDC",SwigwxClientDCTowxDC}, @@ -11451,7 +11368,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxRegion",SwigwxRegionTowxObject}, { "_wxObject","_wxImageList",SwigwxImageListTowxObject}, { "_wxObject","_wxPalette",SwigwxPaletteTowxObject}, - { "_wxObject","_wxPostScriptDC",SwigwxPostScriptDCTowxObject}, { "_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject}, { "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject}, { "_wxObject","_wxClientDC",SwigwxClientDCTowxObject}, diff --git a/wxPython/src/mac/gdi.py b/wxPython/src/mac/gdi.py index 13eb1f7ed8..c94ed3a603 100644 --- a/wxPython/src/mac/gdi.py +++ b/wxPython/src/mac/gdi.py @@ -964,20 +964,6 @@ class wxWindowDC(wxWindowDCPtr): -class wxPostScriptDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" % (self.this,) -class wxPostScriptDC(wxPostScriptDCPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(gdic.new_wxPostScriptDC,_args,_kwargs) - self.thisown = 1 - - - - class wxPalettePtr(wxGDIObjectPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/mac/grid.cpp b/wxPython/src/mac/grid.cpp index 17d45867bd..9369f2310a 100644 --- a/wxPython/src/mac/grid.cpp +++ b/wxPython/src/mac/grid.cpp @@ -7822,67 +7822,6 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, return _resultobj; } -#define wxGrid_StringToLines(_swigobj,_swigarg0,_swigarg1) (_swigobj->StringToLines(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_StringToLines(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxString * _arg1; - wxArrayString * _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","value","lines", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_StringToLines",_kwnames,&_argo0,&_obj1,&_argo2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_StringToLines. Expected _wxGrid_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArrayString_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_StringToLines. Expected _wxArrayString_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_StringToLines(_arg0,*_arg1,*_arg2); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - #define wxGrid_GetTextBoxSize(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetTextBoxSize(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7895,7 +7834,7 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO long temp0; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","dc","lines", NULL }; self = self; @@ -7905,7 +7844,7 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO { _arg4 = &temp0; } - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_GetTextBoxSize",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_GetTextBoxSize",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7921,13 +7860,21 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArrayString_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_GetTextBoxSize. Expected _wxArrayString_p."); +{ + if (! PySequence_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "Sequence of strings expected."); return NULL; - } } + _arg2 = new wxArrayString; + int i, len=PySequence_Length(_obj2); + for (i=0; iAdd(PyString_AsString(item)); + Py_DECREF(item); + Py_DECREF(str); + } +} { wxPy_BEGIN_ALLOW_THREADS; wxGrid_GetTextBoxSize(_arg0,*_arg1,*_arg2,_arg3,_arg4); @@ -7945,6 +7892,10 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO PyObject *o; o = PyInt_FromLong((long) (*_arg4)); _resultobj = t_output_helper(_resultobj, o); +} +{ + if (_obj2) + delete _arg2; } return _resultobj; } @@ -14175,7 +14126,6 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_EndBatch", (PyCFunction) _wrap_wxGrid_EndBatch, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_BeginBatch", (PyCFunction) _wrap_wxGrid_BeginBatch, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetTextBoxSize", (PyCFunction) _wrap_wxGrid_GetTextBoxSize, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_StringToLines", (PyCFunction) _wrap_wxGrid_StringToLines, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_DrawTextRectangle", (PyCFunction) _wrap_wxGrid_DrawTextRectangle, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_DrawCellHighlight", (PyCFunction) _wrap_wxGrid_DrawCellHighlight, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_DeleteCols", (PyCFunction) _wrap_wxGrid_DeleteCols, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/grid.py b/wxPython/src/mac/grid.py index 4cf0ef1691..d8bb23db26 100644 --- a/wxPython/src/mac/grid.py +++ b/wxPython/src/mac/grid.py @@ -958,9 +958,6 @@ class wxGridPtr(wxScrolledWindowPtr): def DrawTextRectangle(self, *_args, **_kwargs): val = apply(gridc.wxGrid_DrawTextRectangle,(self,) + _args, _kwargs) return val - def StringToLines(self, *_args, **_kwargs): - val = apply(gridc.wxGrid_StringToLines,(self,) + _args, _kwargs) - return val def GetTextBoxSize(self, *_args, **_kwargs): val = apply(gridc.wxGrid_GetTextBoxSize,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/mac/misc2.cpp b/wxPython/src/mac/misc2.cpp index 6fa729d31d..2941e406ad 100644 --- a/wxPython/src/mac/misc2.cpp +++ b/wxPython/src/mac/misc2.cpp @@ -71,6 +71,8 @@ extern PyObject *SWIG_newvarlink(void); #include #endif +#include + static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -288,6 +290,11 @@ public: wxWave* wxWaveData(const wxString& data) { return new wxWave(data.Len(), (wxByte*)data.c_str()); } + +#if 0 +extern wxMimeTypesManager * wxTheMimeTypesManager; + +#endif #ifdef __cplusplus extern "C" { #endif @@ -2207,6 +2214,21 @@ static PyObject *_wrap_wxWaveData(PyObject *self, PyObject *args, PyObject *kwar return _resultobj; } +static int _wrap_wxTheMimeTypesManager_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxTheMimeTypesManager is read-only."); + return 1; +} + +static PyObject *_wrap_wxTheMimeTypesManager_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxTheMimeTypesManager,"_wxMimeTypesManager_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + static void *SwigwxToolTipTowxObject(void *ptr) { wxToolTip *src; wxObject *dest; @@ -3047,10 +3069,7 @@ static PyObject *_wrap_wxFontEnumerator_EnumerateEncodings(PyObject *self, PyObj static PyObject * wxPyFontEnumerator_GetEncodings(wxPyFontEnumerator *self) { wxArrayString* arr = self->GetEncodings(); - PyObject* list = PyList_New(0); - for (size_t x=0; xGetCount(); x++) - PyList_Append(list, PyString_FromString((*arr)[x])); - return list; + return wxArrayString2PyList_helper(arr); } static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3082,10 +3101,7 @@ static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *a static PyObject * wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self) { wxArrayString* arr = self->GetFacenames(); - PyObject* list = PyList_New(0); - for (size_t x=0; xGetCount(); x++) - PyList_Append(list, PyString_FromString((*arr)[x])); - return list; + return wxArrayString2PyList_helper(arr); } static PyObject *_wrap_wxFontEnumerator_GetFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4252,6 +4268,140 @@ static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxStopWatch() (new wxStopWatch()) +static PyObject *_wrap_new_wxStopWatch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStopWatch * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxStopWatch",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStopWatch *)new_wxStopWatch(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStopWatch_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStopWatch_Start(_swigobj,_swigarg0) (_swigobj->Start(_swigarg0)) +static PyObject *_wrap_wxStopWatch_Start(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStopWatch * _arg0; + long _arg1 = (long ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","t", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxStopWatch_Start",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStopWatch_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStopWatch_Start. Expected _wxStopWatch_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStopWatch_Start(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStopWatch_Pause(_swigobj) (_swigobj->Pause()) +static PyObject *_wrap_wxStopWatch_Pause(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStopWatch * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStopWatch_Pause",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStopWatch_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStopWatch_Pause. Expected _wxStopWatch_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStopWatch_Pause(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStopWatch_Resume(_swigobj) (_swigobj->Resume()) +static PyObject *_wrap_wxStopWatch_Resume(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStopWatch * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStopWatch_Resume",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStopWatch_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStopWatch_Resume. Expected _wxStopWatch_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStopWatch_Resume(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStopWatch_Time(_swigobj) (_swigobj->Time()) +static PyObject *_wrap_wxStopWatch_Time(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxStopWatch * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStopWatch_Time",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStopWatch_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStopWatch_Time. Expected _wxStopWatch_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxStopWatch_Time(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + #define new_wxLog() (new wxLog()) static PyObject *_wrap_new_wxLog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7356,7 +7506,1871 @@ static PyObject *_wrap_wxWave_Play(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } +#define new_wxFileTypeInfo(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxFileTypeInfo(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxFileTypeInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileTypeInfo * _result; + char * _arg0; + char * _arg1; + char * _arg2; + char * _arg3; + char *_kwnames[] = { "mimeType","openCmd","printCmd","desc", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ssss:new_wxFileTypeInfo",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileTypeInfo *)new_wxFileTypeInfo(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileTypeInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxFileTypeInfoSequence(_swigarg0) (new wxFileTypeInfo(_swigarg0)) +static PyObject *_wrap_new_wxFileTypeInfoSequence(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileTypeInfo * _result; + wxArrayString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "sArray", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxFileTypeInfoSequence",_kwnames,&_obj0)) + return NULL; +{ + if (! PySequence_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "Sequence of strings expected."); + return NULL; + } + _arg0 = new wxArrayString; + int i, len=PySequence_Length(_obj0); + for (i=0; iAdd(PyString_AsString(item)); + Py_DECREF(item); + Py_DECREF(str); + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileTypeInfo *)new_wxFileTypeInfoSequence(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileTypeInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define new_wxNullFileTypeInfo() (new wxFileTypeInfo()) +static PyObject *_wrap_new_wxNullFileTypeInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileTypeInfo * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxNullFileTypeInfo",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileTypeInfo *)new_wxNullFileTypeInfo(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileTypeInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileTypeInfo_IsValid(_swigobj) (_swigobj->IsValid()) +static PyObject *_wrap_wxFileTypeInfo_IsValid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_IsValid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_IsValid. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileTypeInfo_IsValid(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFileTypeInfo_SetIcon(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetIcon(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileTypeInfo_SetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileTypeInfo * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","iconFile","iconIndex", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileTypeInfo_SetIcon",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_SetIcon. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileTypeInfo_SetIcon(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileTypeInfo_SetShortDesc(_swigobj,_swigarg0) (_swigobj->SetShortDesc(_swigarg0)) +static PyObject *_wrap_wxFileTypeInfo_SetShortDesc(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileTypeInfo * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","shortDesc", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileTypeInfo_SetShortDesc",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_SetShortDesc. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileTypeInfo_SetShortDesc(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileTypeInfo_GetMimeType(_swigobj) (_swigobj->GetMimeType()) +static PyObject *_wrap_wxFileTypeInfo_GetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetMimeType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetMimeType. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFileTypeInfo_GetMimeType(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFileTypeInfo_GetOpenCommand(_swigobj) (_swigobj->GetOpenCommand()) +static PyObject *_wrap_wxFileTypeInfo_GetOpenCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetOpenCommand",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetOpenCommand. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFileTypeInfo_GetOpenCommand(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFileTypeInfo_GetPrintCommand(_swigobj) (_swigobj->GetPrintCommand()) +static PyObject *_wrap_wxFileTypeInfo_GetPrintCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetPrintCommand",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetPrintCommand. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFileTypeInfo_GetPrintCommand(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFileTypeInfo_GetShortDesc(_swigobj) (_swigobj->GetShortDesc()) +static PyObject *_wrap_wxFileTypeInfo_GetShortDesc(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetShortDesc",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetShortDesc. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFileTypeInfo_GetShortDesc(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFileTypeInfo_GetDescription(_swigobj) (_swigobj->GetDescription()) +static PyObject *_wrap_wxFileTypeInfo_GetDescription(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetDescription",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetDescription. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFileTypeInfo_GetDescription(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +static PyObject * wxFileTypeInfo_GetExtensions(wxFileTypeInfo *self) { + wxArrayString& arr = (wxArrayString&)self->GetExtensions(); + return wxArrayString2PyList_helper(arr); + } +static PyObject *_wrap_wxFileTypeInfo_GetExtensions(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetExtensions",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetExtensions. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileTypeInfo_GetExtensions(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +#define wxFileTypeInfo_GetExtensionsCount(_swigobj) (_swigobj->GetExtensionsCount()) +static PyObject *_wrap_wxFileTypeInfo_GetExtensionsCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetExtensionsCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetExtensionsCount. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFileTypeInfo_GetExtensionsCount(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFileTypeInfo_GetIconFile(_swigobj) (_swigobj->GetIconFile()) +static PyObject *_wrap_wxFileTypeInfo_GetIconFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetIconFile",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetIconFile. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFileTypeInfo_GetIconFile(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFileTypeInfo_GetIconIndex(_swigobj) (_swigobj->GetIconIndex()) +static PyObject *_wrap_wxFileTypeInfo_GetIconIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileTypeInfo_GetIconIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileTypeInfo_GetIconIndex. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFileTypeInfo_GetIconIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define new_wxFileType(_swigarg0) (new wxFileType(_swigarg0)) +static PyObject *_wrap_new_wxFileType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileType * _result; + wxFileTypeInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "ftInfo", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxFileType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFileType. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileType *)new_wxFileType(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileType_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject * wxFileType_GetMimeType(wxFileType *self) { + wxString str; + if (self->GetMimeType(&str)) + return PyString_FromString(str.c_str()); + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileType_GetMimeType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetMimeType. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetMimeType(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxFileType_GetMimeTypes(wxFileType *self) { + wxArrayString arr; + if (self->GetMimeTypes(arr)) + return wxArrayString2PyList_helper(arr); + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetMimeTypes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileType_GetMimeTypes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetMimeTypes. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetMimeTypes(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxFileType_GetExtensions(wxFileType *self) { + wxArrayString arr; + if (self->GetExtensions(arr)) + return wxArrayString2PyList_helper(arr); + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetExtensions(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileType_GetExtensions",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetExtensions. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetExtensions(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static wxIcon * wxFileType_GetIcon(wxFileType *self) { + wxIcon icon; + if (self->GetIcon(&icon)) + return new wxIcon(icon); + else + return NULL; + } +static PyObject *_wrap_wxFileType_GetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIcon * _result; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileType_GetIcon",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetIcon. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxIcon *)wxFileType_GetIcon(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject * wxFileType_GetIconInfo(wxFileType *self) { + wxIcon icon; + wxString iconFile; + int iconIndex; + if (self->GetIcon(&icon, &iconFile, &iconIndex)) { + wxPyTState* state = wxPyBeginBlockThreads(); + PyObject* tuple = PyTuple_New(3); + PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon), + "wxIcon", TRUE)); + PyTuple_SetItem(tuple, 1, PyString_FromString(iconFile.c_str())); + PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex)); + wxPyEndBlockThreads(state); + return tuple; + } + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetIconInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileType_GetIconInfo",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetIconInfo. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetIconInfo(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxFileType_GetDescription(wxFileType *self) { + wxString str; + if (self->GetDescription(&str)) + return PyString_FromString(str.c_str()); + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetDescription(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileType_GetDescription",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetDescription. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetDescription(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxFileType_GetOpenCommand(wxFileType *self,const wxString & filename,const wxString & mimetype) { + wxString str; + if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) + return PyString_FromString(str.c_str()); + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetOpenCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","filename","mimetype", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxFileType_GetOpenCommand",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetOpenCommand. Expected _wxFileType_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetOpenCommand(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static PyObject * wxFileType_GetPrintCommand(wxFileType *self,const wxString & filename,const wxString & mimetype) { + wxString str; + if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) + return PyString_FromString(str.c_str()); + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetPrintCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","filename","mimetype", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxFileType_GetPrintCommand",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetPrintCommand. Expected _wxFileType_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetPrintCommand(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static PyObject * wxFileType_GetAllCommands(wxFileType *self,const wxString & filename,const wxString & mimetype) { + wxArrayString verbs; + wxArrayString commands; + if (self->GetAllCommands(&verbs, &commands, + wxFileType::MessageParameters(filename, mimetype))) { + wxPyTState* state = wxPyBeginBlockThreads(); + PyObject* tuple = PyTuple_New(2); + PyTuple_SetItem(tuple, 0, wxArrayString2PyList_helper(verbs)); + PyTuple_SetItem(tuple, 1, wxArrayString2PyList_helper(commands)); + wxPyEndBlockThreads(state); + return tuple; + } + else + RETURN_NONE(); + } +static PyObject *_wrap_wxFileType_GetAllCommands(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxFileType * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","filename","mimetype", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxFileType_GetAllCommands",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_GetAllCommands. Expected _wxFileType_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxFileType_GetAllCommands(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFileType_SetCommand(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCommand(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxFileType_SetCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFileType * _arg0; + wxString * _arg1; + wxString * _arg2; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","cmd","verb","overwriteprompt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxFileType_SetCommand",_kwnames,&_argo0,&_obj1,&_obj2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_SetCommand. Expected _wxFileType_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileType_SetCommand(_arg0,*_arg1,*_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFileType_SetDefaultIcon(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDefaultIcon(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileType_SetDefaultIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFileType * _arg0; + wxString * _arg1 = (wxString *) &wxEmptyString; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","cmd","index", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|Oi:wxFileType_SetDefaultIcon",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_SetDefaultIcon. Expected _wxFileType_p."); + return NULL; + } + } + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileType_SetDefaultIcon(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileType_Unassociate(_swigobj) (_swigobj->Unassociate()) +static PyObject *_wrap_wxFileType_Unassociate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileType_Unassociate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileType_Unassociate. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileType_Unassociate(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + wxFileType::MessageParameters * _arg1; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "command","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileType_ExpandCommand",_kwnames,&_obj0,&_argo1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileType::MessageParameters_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileType_ExpandCommand. Expected _wxFileType::MessageParameters_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileType::ExpandCommand(*_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj0) + delete _arg0; +} +{ + delete _result; +} + return _resultobj; +} + +#define delete_wxFileType(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFileType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileType * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFileType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFileType. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxFileType(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxMimeTypesManager_IsOfType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxString * _arg0; + wxString * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "mimeType","wildcard", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_IsOfType",_kwnames,&_obj0,&_obj1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMimeTypesManager::IsOfType(*_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define new_wxMimeTypesManager() (new wxMimeTypesManager()) +static PyObject *_wrap_new_wxMimeTypesManager(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMimeTypesManager * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMimeTypesManager",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMimeTypesManager *)new_wxMimeTypesManager(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMimeTypesManager_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMimeTypesManager_Initialize(_swigobj,_swigarg0,_swigarg1) (_swigobj->Initialize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMimeTypesManager_Initialize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMimeTypesManager * _arg0; + int _arg1 = (int ) (wxMAILCAP_STANDARD); + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","mailcapStyle","extraDir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxMimeTypesManager_Initialize",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_Initialize. Expected _wxMimeTypesManager_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMimeTypesManager_Initialize(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxMimeTypesManager_ClearData(_swigobj) (_swigobj->ClearData()) +static PyObject *_wrap_wxMimeTypesManager_ClearData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMimeTypesManager * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMimeTypesManager_ClearData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_ClearData. Expected _wxMimeTypesManager_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMimeTypesManager_ClearData(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxMimeTypesManager_GetFileTypeFromExtension(_swigobj,_swigarg0) (_swigobj->GetFileTypeFromExtension(_swigarg0)) +static PyObject *_wrap_wxMimeTypesManager_GetFileTypeFromExtension(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileType * _result; + wxMimeTypesManager * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","ext", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_GetFileTypeFromExtension",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_GetFileTypeFromExtension. Expected _wxMimeTypesManager_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromExtension(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileType_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxMimeTypesManager_GetFileTypeFromMimeType(_swigobj,_swigarg0) (_swigobj->GetFileTypeFromMimeType(_swigarg0)) +static PyObject *_wrap_wxMimeTypesManager_GetFileTypeFromMimeType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileType * _result; + wxMimeTypesManager * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","mimeType", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_GetFileTypeFromMimeType",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_GetFileTypeFromMimeType. Expected _wxMimeTypesManager_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileType *)wxMimeTypesManager_GetFileTypeFromMimeType(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileType_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxMimeTypesManager_ReadMailcap(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReadMailcap(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMimeTypesManager_ReadMailcap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMimeTypesManager * _arg0; + wxString * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","filename","fallback", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxMimeTypesManager_ReadMailcap",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_ReadMailcap. Expected _wxMimeTypesManager_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMimeTypesManager_ReadMailcap(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxMimeTypesManager_ReadMimeTypes(_swigobj,_swigarg0) (_swigobj->ReadMimeTypes(_swigarg0)) +static PyObject *_wrap_wxMimeTypesManager_ReadMimeTypes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMimeTypesManager * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_ReadMimeTypes",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_ReadMimeTypes. Expected _wxMimeTypesManager_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMimeTypesManager_ReadMimeTypes(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyObject * wxMimeTypesManager_EnumAllFileTypes(wxMimeTypesManager *self) { + wxArrayString arr; + self->EnumAllFileTypes(arr); + return wxArrayString2PyList_helper(arr); + } +static PyObject *_wrap_wxMimeTypesManager_EnumAllFileTypes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxMimeTypesManager * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMimeTypesManager_EnumAllFileTypes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_EnumAllFileTypes. Expected _wxMimeTypesManager_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxMimeTypesManager_EnumAllFileTypes(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +#define wxMimeTypesManager_AddFallback(_swigobj,_swigarg0) (_swigobj->AddFallback(_swigarg0)) +static PyObject *_wrap_wxMimeTypesManager_AddFallback(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMimeTypesManager * _arg0; + wxFileTypeInfo * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","ft", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_AddFallback",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_AddFallback. Expected _wxMimeTypesManager_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMimeTypesManager_AddFallback. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMimeTypesManager_AddFallback(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxMimeTypesManager_Associate(_swigobj,_swigarg0) (_swigobj->Associate(_swigarg0)) +static PyObject *_wrap_wxMimeTypesManager_Associate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileType * _result; + wxMimeTypesManager * _arg0; + wxFileTypeInfo * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","ftInfo", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_Associate",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_Associate. Expected _wxMimeTypesManager_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileTypeInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMimeTypesManager_Associate. Expected _wxFileTypeInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileType *)wxMimeTypesManager_Associate(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileType_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMimeTypesManager_Unassociate(_swigobj,_swigarg0) (_swigobj->Unassociate(_swigarg0)) +static PyObject *_wrap_wxMimeTypesManager_Unassociate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMimeTypesManager * _arg0; + wxFileType * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","ft", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMimeTypesManager_Unassociate",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMimeTypesManager_Unassociate. Expected _wxMimeTypesManager_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileType_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMimeTypesManager_Unassociate. Expected _wxFileType_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMimeTypesManager_Unassociate(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define delete_wxMimeTypesManager(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxMimeTypesManager(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMimeTypesManager * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxMimeTypesManager",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMimeTypesManager_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxMimeTypesManager. Expected _wxMimeTypesManager_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxMimeTypesManager(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef misc2cMethods[] = { + { "delete_wxMimeTypesManager", (PyCFunction) _wrap_delete_wxMimeTypesManager, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_Unassociate", (PyCFunction) _wrap_wxMimeTypesManager_Unassociate, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_Associate", (PyCFunction) _wrap_wxMimeTypesManager_Associate, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_AddFallback", (PyCFunction) _wrap_wxMimeTypesManager_AddFallback, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_EnumAllFileTypes", (PyCFunction) _wrap_wxMimeTypesManager_EnumAllFileTypes, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_ReadMimeTypes", (PyCFunction) _wrap_wxMimeTypesManager_ReadMimeTypes, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_ReadMailcap", (PyCFunction) _wrap_wxMimeTypesManager_ReadMailcap, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_GetFileTypeFromMimeType", (PyCFunction) _wrap_wxMimeTypesManager_GetFileTypeFromMimeType, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_GetFileTypeFromExtension", (PyCFunction) _wrap_wxMimeTypesManager_GetFileTypeFromExtension, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_ClearData", (PyCFunction) _wrap_wxMimeTypesManager_ClearData, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_Initialize", (PyCFunction) _wrap_wxMimeTypesManager_Initialize, METH_VARARGS | METH_KEYWORDS }, + { "new_wxMimeTypesManager", (PyCFunction) _wrap_new_wxMimeTypesManager, METH_VARARGS | METH_KEYWORDS }, + { "wxMimeTypesManager_IsOfType", (PyCFunction) _wrap_wxMimeTypesManager_IsOfType, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFileType", (PyCFunction) _wrap_delete_wxFileType, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_ExpandCommand", (PyCFunction) _wrap_wxFileType_ExpandCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_Unassociate", (PyCFunction) _wrap_wxFileType_Unassociate, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_SetDefaultIcon", (PyCFunction) _wrap_wxFileType_SetDefaultIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_SetCommand", (PyCFunction) _wrap_wxFileType_SetCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetAllCommands", (PyCFunction) _wrap_wxFileType_GetAllCommands, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetPrintCommand", (PyCFunction) _wrap_wxFileType_GetPrintCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetOpenCommand", (PyCFunction) _wrap_wxFileType_GetOpenCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetDescription", (PyCFunction) _wrap_wxFileType_GetDescription, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetIconInfo", (PyCFunction) _wrap_wxFileType_GetIconInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetIcon", (PyCFunction) _wrap_wxFileType_GetIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetExtensions", (PyCFunction) _wrap_wxFileType_GetExtensions, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetMimeTypes", (PyCFunction) _wrap_wxFileType_GetMimeTypes, METH_VARARGS | METH_KEYWORDS }, + { "wxFileType_GetMimeType", (PyCFunction) _wrap_wxFileType_GetMimeType, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileType", (PyCFunction) _wrap_new_wxFileType, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetIconIndex", (PyCFunction) _wrap_wxFileTypeInfo_GetIconIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetIconFile", (PyCFunction) _wrap_wxFileTypeInfo_GetIconFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetExtensionsCount", (PyCFunction) _wrap_wxFileTypeInfo_GetExtensionsCount, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetExtensions", (PyCFunction) _wrap_wxFileTypeInfo_GetExtensions, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetDescription", (PyCFunction) _wrap_wxFileTypeInfo_GetDescription, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetShortDesc", (PyCFunction) _wrap_wxFileTypeInfo_GetShortDesc, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetPrintCommand", (PyCFunction) _wrap_wxFileTypeInfo_GetPrintCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetOpenCommand", (PyCFunction) _wrap_wxFileTypeInfo_GetOpenCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_GetMimeType", (PyCFunction) _wrap_wxFileTypeInfo_GetMimeType, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_SetShortDesc", (PyCFunction) _wrap_wxFileTypeInfo_SetShortDesc, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_SetIcon", (PyCFunction) _wrap_wxFileTypeInfo_SetIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxFileTypeInfo_IsValid", (PyCFunction) _wrap_wxFileTypeInfo_IsValid, METH_VARARGS | METH_KEYWORDS }, + { "new_wxNullFileTypeInfo", (PyCFunction) _wrap_new_wxNullFileTypeInfo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileTypeInfoSequence", (PyCFunction) _wrap_new_wxFileTypeInfoSequence, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileTypeInfo", (PyCFunction) _wrap_new_wxFileTypeInfo, METH_VARARGS | METH_KEYWORDS }, { "wxWave_Play", (PyCFunction) _wrap_wxWave_Play, METH_VARARGS | METH_KEYWORDS }, { "wxWave_IsOk", (PyCFunction) _wrap_wxWave_IsOk, METH_VARARGS | METH_KEYWORDS }, { "delete_wxWave", (PyCFunction) _wrap_delete_wxWave, METH_VARARGS | METH_KEYWORDS }, @@ -7465,6 +9479,11 @@ static PyMethodDef misc2cMethods[] = { { "wxLog_EnableLogging", (PyCFunction) _wrap_wxLog_EnableLogging, METH_VARARGS | METH_KEYWORDS }, { "wxLog_IsEnabled", (PyCFunction) _wrap_wxLog_IsEnabled, METH_VARARGS | METH_KEYWORDS }, { "new_wxLog", (PyCFunction) _wrap_new_wxLog, METH_VARARGS | METH_KEYWORDS }, + { "wxStopWatch_Time", (PyCFunction) _wrap_wxStopWatch_Time, METH_VARARGS | METH_KEYWORDS }, + { "wxStopWatch_Resume", (PyCFunction) _wrap_wxStopWatch_Resume, METH_VARARGS | METH_KEYWORDS }, + { "wxStopWatch_Pause", (PyCFunction) _wrap_wxStopWatch_Pause, METH_VARARGS | METH_KEYWORDS }, + { "wxStopWatch_Start", (PyCFunction) _wrap_wxStopWatch_Start, METH_VARARGS | METH_KEYWORDS }, + { "new_wxStopWatch", (PyCFunction) _wrap_new_wxStopWatch, METH_VARARGS | METH_KEYWORDS }, { "wxPyTimer_Stop", (PyCFunction) _wrap_wxPyTimer_Stop, METH_VARARGS | METH_KEYWORDS }, { "wxPyTimer_Start", (PyCFunction) _wrap_wxPyTimer_Start, METH_VARARGS | METH_KEYWORDS }, { "wxPyTimer_SetOwner", (PyCFunction) _wrap_wxPyTimer_SetOwner, METH_VARARGS | METH_KEYWORDS }, @@ -7811,6 +9830,13 @@ SWIGEXPORT(void) initmisc2c() { PyDict_SetItemString(d,"wxLOG_Progress", PyInt_FromLong((long) wxLOG_Progress)); PyDict_SetItemString(d,"wxLOG_User", PyInt_FromLong((long) wxLOG_User)); PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS)); + PyDict_SetItemString(d,"wxMAILCAP_STANDARD", PyInt_FromLong((long) wxMAILCAP_STANDARD)); + PyDict_SetItemString(d,"wxMAILCAP_NETSCAPE", PyInt_FromLong((long) wxMAILCAP_NETSCAPE)); + PyDict_SetItemString(d,"wxMAILCAP_KDE", PyInt_FromLong((long) wxMAILCAP_KDE)); + PyDict_SetItemString(d,"wxMAILCAP_GNOME", PyInt_FromLong((long) wxMAILCAP_GNOME)); + PyDict_SetItemString(d,"wxMAILCAP_ALL", PyInt_FromLong((long) wxMAILCAP_ALL)); + PyDict_SetItemString(d,"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,"wxTheMimeTypesManager",_wrap_wxTheMimeTypesManager_get, _wrap_wxTheMimeTypesManager_set); wxPyPtrTypeMap_Add("wxFontEnumerator", "wxPyFontEnumerator"); wxPyPtrTypeMap_Add("wxDragImage", "wxGenericDragImage"); diff --git a/wxPython/src/mac/misc2.py b/wxPython/src/mac/misc2.py index 358a25ac3c..553d41770e 100644 --- a/wxPython/src/mac/misc2.py +++ b/wxPython/src/mac/misc2.py @@ -313,6 +313,32 @@ class wxPyTimer(wxPyTimerPtr): +class wxStopWatchPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Start(self, *_args, **_kwargs): + val = apply(misc2c.wxStopWatch_Start,(self,) + _args, _kwargs) + return val + def Pause(self, *_args, **_kwargs): + val = apply(misc2c.wxStopWatch_Pause,(self,) + _args, _kwargs) + return val + def Resume(self, *_args, **_kwargs): + val = apply(misc2c.wxStopWatch_Resume,(self,) + _args, _kwargs) + return val + def Time(self, *_args, **_kwargs): + val = apply(misc2c.wxStopWatch_Time,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxStopWatch(wxStopWatchPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxStopWatch,_args,_kwargs) + self.thisown = 1 + + + + class wxLogPtr : def __init__(self,this): self.this = this @@ -726,6 +752,170 @@ class wxWave(wxWavePtr): +class wxFileTypeInfoPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def IsValid(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_IsValid,(self,) + _args, _kwargs) + return val + def SetIcon(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_SetIcon,(self,) + _args, _kwargs) + return val + def SetShortDesc(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_SetShortDesc,(self,) + _args, _kwargs) + return val + def GetMimeType(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetMimeType,(self,) + _args, _kwargs) + return val + def GetOpenCommand(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetOpenCommand,(self,) + _args, _kwargs) + return val + def GetPrintCommand(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetPrintCommand,(self,) + _args, _kwargs) + return val + def GetShortDesc(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetShortDesc,(self,) + _args, _kwargs) + return val + def GetDescription(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetDescription,(self,) + _args, _kwargs) + return val + def GetExtensions(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetExtensions,(self,) + _args, _kwargs) + return val + def GetExtensionsCount(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetExtensionsCount,(self,) + _args, _kwargs) + return val + def GetIconFile(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetIconFile,(self,) + _args, _kwargs) + return val + def GetIconIndex(self, *_args, **_kwargs): + val = apply(misc2c.wxFileTypeInfo_GetIconIndex,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileTypeInfo(wxFileTypeInfoPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxFileTypeInfo,_args,_kwargs) + self.thisown = 1 + + + +def wxFileTypeInfoSequence(*_args,**_kwargs): + val = wxFileTypeInfoPtr(apply(misc2c.new_wxFileTypeInfoSequence,_args,_kwargs)) + val.thisown = 1 + return val + +def wxNullFileTypeInfo(*_args,**_kwargs): + val = wxFileTypeInfoPtr(apply(misc2c.new_wxNullFileTypeInfo,_args,_kwargs)) + val.thisown = 1 + return val + + +class wxFileTypePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetMimeType(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetMimeType,(self,) + _args, _kwargs) + return val + def GetMimeTypes(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetMimeTypes,(self,) + _args, _kwargs) + return val + def GetExtensions(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetExtensions,(self,) + _args, _kwargs) + return val + def GetIcon(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetIcon,(self,) + _args, _kwargs) + if val: val = wxIconPtr(val) ; val.thisown = 1 + return val + def GetIconInfo(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetIconInfo,(self,) + _args, _kwargs) + return val + def GetDescription(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetDescription,(self,) + _args, _kwargs) + return val + def GetOpenCommand(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetOpenCommand,(self,) + _args, _kwargs) + return val + def GetPrintCommand(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetPrintCommand,(self,) + _args, _kwargs) + return val + def GetAllCommands(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_GetAllCommands,(self,) + _args, _kwargs) + return val + def SetCommand(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_SetCommand,(self,) + _args, _kwargs) + return val + def SetDefaultIcon(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_SetDefaultIcon,(self,) + _args, _kwargs) + return val + def Unassociate(self, *_args, **_kwargs): + val = apply(misc2c.wxFileType_Unassociate,(self,) + _args, _kwargs) + return val + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxFileType(self) + def __repr__(self): + return "" % (self.this,) +class wxFileType(wxFileTypePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxFileType,_args,_kwargs) + self.thisown = 1 + + + + +class wxMimeTypesManagerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Initialize(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_Initialize,(self,) + _args, _kwargs) + return val + def ClearData(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_ClearData,(self,) + _args, _kwargs) + return val + def GetFileTypeFromExtension(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_GetFileTypeFromExtension,(self,) + _args, _kwargs) + if val: val = wxFileTypePtr(val) ; val.thisown = 1 + return val + def GetFileTypeFromMimeType(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_GetFileTypeFromMimeType,(self,) + _args, _kwargs) + if val: val = wxFileTypePtr(val) ; val.thisown = 1 + return val + def ReadMailcap(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_ReadMailcap,(self,) + _args, _kwargs) + return val + def ReadMimeTypes(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_ReadMimeTypes,(self,) + _args, _kwargs) + return val + def EnumAllFileTypes(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_EnumAllFileTypes,(self,) + _args, _kwargs) + return val + def AddFallback(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_AddFallback,(self,) + _args, _kwargs) + return val + def Associate(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_Associate,(self,) + _args, _kwargs) + if val: val = wxFileTypePtr(val) ; val.thisown = 1 + return val + def Unassociate(self, *_args, **_kwargs): + val = apply(misc2c.wxMimeTypesManager_Unassociate,(self,) + _args, _kwargs) + return val + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxMimeTypesManager(self) + def __repr__(self): + return "" % (self.this,) +class wxMimeTypesManager(wxMimeTypesManagerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxMimeTypesManager,_args,_kwargs) + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ @@ -929,6 +1119,10 @@ wxLog_GetTraceMask = misc2c.wxLog_GetTraceMask wxLog_IsAllowedTraceMask = misc2c.wxLog_IsAllowedTraceMask +wxFileType_ExpandCommand = misc2c.wxFileType_ExpandCommand + +wxMimeTypesManager_IsOfType = misc2c.wxMimeTypesManager_IsOfType + #-------------- VARIABLE WRAPPERS ------------------ @@ -1030,3 +1224,10 @@ wxLOG_Trace = misc2c.wxLOG_Trace wxLOG_Progress = misc2c.wxLOG_Progress wxLOG_User = misc2c.wxLOG_User wxEVT_END_PROCESS = misc2c.wxEVT_END_PROCESS +wxMAILCAP_STANDARD = misc2c.wxMAILCAP_STANDARD +wxMAILCAP_NETSCAPE = misc2c.wxMAILCAP_NETSCAPE +wxMAILCAP_KDE = misc2c.wxMAILCAP_KDE +wxMAILCAP_GNOME = misc2c.wxMAILCAP_GNOME +wxMAILCAP_ALL = misc2c.wxMAILCAP_ALL +cvar = misc2c.cvar +wxTheMimeTypesManager = wxMimeTypesManagerPtr(misc2c.cvar.wxTheMimeTypesManager) diff --git a/wxPython/src/mac/printfw.cpp b/wxPython/src/mac/printfw.cpp index 889d6e0b82..a958c741dc 100644 --- a/wxPython/src/mac/printfw.cpp +++ b/wxPython/src/mac/printfw.cpp @@ -58,6 +58,7 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include #include +#include #include "printfw.h" @@ -1544,6 +1545,229 @@ static PyObject *_wrap_wxPrintData_SetPrintMode(PyObject *self, PyObject *args, return _resultobj; } +static void *SwigwxPostScriptDCTowxDC(void *ptr) { + wxPostScriptDC *src; + wxDC *dest; + src = (wxPostScriptDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +static void *SwigwxPostScriptDCTowxObject(void *ptr) { + wxPostScriptDC *src; + wxObject *dest; + src = (wxPostScriptDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxPostScriptDC(_swigarg0) (new wxPostScriptDC(_swigarg0)) +static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPostScriptDC * _result; + wxPrintData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "printData", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPostScriptDC",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPostScriptDC. Expected _wxPrintData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPostScriptDC2(_swigarg0,_swigarg1,_swigarg2) (new wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPostScriptDC * _result; + wxString * _arg0; + bool _arg1 = (bool ) TRUE; + wxWindow * _arg2 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + int tempbool1 = (int) TRUE; + PyObject * _argo2 = 0; + char *_kwnames[] = { "output","interactive","parent", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC2",_kwnames,&_obj0,&tempbool1,&_argo2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + _arg1 = (bool ) tempbool1; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPostScriptDC2. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxPostScriptDC_GetPrintData(_swigobj) (_swigobj->GetPrintData()) +static PyObject *_wrap_wxPostScriptDC_GetPrintData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPrintData * _result; + wxPostScriptDC * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPostScriptDC_GetPrintData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPostScriptDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPostScriptDC_GetPrintData. Expected _wxPostScriptDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPrintData & _result_ref = wxPostScriptDC_GetPrintData(_arg0); + _result = (wxPrintData *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrintData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPostScriptDC_SetPrintData(_swigobj,_swigarg0) (_swigobj->SetPrintData(_swigarg0)) +static PyObject *_wrap_wxPostScriptDC_SetPrintData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPostScriptDC * _arg0; + wxPrintData * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPostScriptDC_SetPrintData",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPostScriptDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPostScriptDC_SetPrintData. Expected _wxPostScriptDC_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostScriptDC_SetPrintData. Expected _wxPrintData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPostScriptDC_SetPrintData(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPostScriptDC_SetResolution(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _arg0; + char *_kwnames[] = { "ppi", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxPostScriptDC_SetResolution",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPostScriptDC::SetResolution(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPostScriptDC_GetResolution(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPostScriptDC_GetResolution",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPostScriptDC::GetResolution(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxPageSetupDialogDataTowxObject(void *ptr) { wxPageSetupDialogData *src; wxObject *dest; @@ -5245,6 +5469,12 @@ static PyMethodDef printfwcMethods[] = { { "wxPageSetupDialogData_EnableHelp", (PyCFunction) _wrap_wxPageSetupDialogData_EnableHelp, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPageSetupDialogData", (PyCFunction) _wrap_delete_wxPageSetupDialogData, METH_VARARGS | METH_KEYWORDS }, { "new_wxPageSetupDialogData", (PyCFunction) _wrap_new_wxPageSetupDialogData, METH_VARARGS | METH_KEYWORDS }, + { "wxPostScriptDC_GetResolution", (PyCFunction) _wrap_wxPostScriptDC_GetResolution, METH_VARARGS | METH_KEYWORDS }, + { "wxPostScriptDC_SetResolution", (PyCFunction) _wrap_wxPostScriptDC_SetResolution, METH_VARARGS | METH_KEYWORDS }, + { "wxPostScriptDC_SetPrintData", (PyCFunction) _wrap_wxPostScriptDC_SetPrintData, METH_VARARGS | METH_KEYWORDS }, + { "wxPostScriptDC_GetPrintData", (PyCFunction) _wrap_wxPostScriptDC_GetPrintData, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPostScriptDC2", (PyCFunction) _wrap_new_wxPostScriptDC2, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPostScriptDC", (PyCFunction) _wrap_new_wxPostScriptDC, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetPrintMode", (PyCFunction) _wrap_wxPrintData_SetPrintMode, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetPrinterTranslation", (PyCFunction) _wrap_wxPrintData_SetPrinterTranslation, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetPrinterTranslateY", (PyCFunction) _wrap_wxPrintData_SetPrinterTranslateY, METH_VARARGS | METH_KEYWORDS }, @@ -5309,6 +5539,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, + { "_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -5354,6 +5585,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxPrintDialogData",SwigwxPrintDialogDataTowxObject}, { "_wxObject","_wxPageSetupDialog",SwigwxPageSetupDialogTowxObject}, { "_wxObject","_wxPageSetupDialogData",SwigwxPageSetupDialogDataTowxObject}, + { "_wxObject","_wxPostScriptDC",SwigwxPostScriptDCTowxObject}, { "_wxObject","_wxPrintData",SwigwxPrintDataTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, diff --git a/wxPython/src/mac/printfw.py b/wxPython/src/mac/printfw.py index f808d8ce14..dd291efec5 100644 --- a/wxPython/src/mac/printfw.py +++ b/wxPython/src/mac/printfw.py @@ -157,6 +157,32 @@ class wxPrintData(wxPrintDataPtr): +class wxPostScriptDCPtr(wxDCPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPrintData(self, *_args, **_kwargs): + val = apply(printfwc.wxPostScriptDC_GetPrintData,(self,) + _args, _kwargs) + if val: val = wxPrintDataPtr(val) + return val + def SetPrintData(self, *_args, **_kwargs): + val = apply(printfwc.wxPostScriptDC_SetPrintData,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPostScriptDC(wxPostScriptDCPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(printfwc.new_wxPostScriptDC,_args,_kwargs) + self.thisown = 1 + + + +def wxPostScriptDC2(*_args,**_kwargs): + val = wxPostScriptDCPtr(apply(printfwc.new_wxPostScriptDC2,_args,_kwargs)) + val.thisown = 1 + return val + + class wxPageSetupDialogDataPtr(wxObjectPtr): def __init__(self,this): self.this = this @@ -576,6 +602,10 @@ class wxPreviewFrame(wxPreviewFramePtr): #-------------- FUNCTION WRAPPERS ------------------ +wxPostScriptDC_SetResolution = printfwc.wxPostScriptDC_SetResolution + +wxPostScriptDC_GetResolution = printfwc.wxPostScriptDC_GetResolution + #-------------- VARIABLE WRAPPERS ------------------