X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87439dd8ae94e420f2a9ca5c650b350f990688c7..1a10a058d5d700b0d12b5a42f92a69633e182a0e:/wxPython/src/gtk/fonts.cpp?ds=sidebyside diff --git a/wxPython/src/gtk/fonts.cpp b/wxPython/src/gtk/fonts.cpp index f3670151a6..e3e657910c 100644 --- a/wxPython/src/gtk/fonts.cpp +++ b/wxPython/src/gtk/fonts.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -93,6 +92,32 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { // Put some wx default wxChar* values into wxStrings. static const wxString wxPyEmptyString(wxT("")); +// Fix some link errors... Remove this when these methods get real implementations... +#if defined(__WXGTK__) || defined(__WXX11__) +#if wxUSE_PANGO +void wxNativeFontInfo::SetPointSize(int pointsize) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetStyle(wxFontStyle style) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetWeight(wxFontWeight weight) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetFaceName(wxString facename) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetFamily(wxFontFamily family) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding) + { wxFAIL_MSG( _T("not implemented") ); } +#endif +#endif + class wxPyFontEnumerator : public wxFontEnumerator { public: wxPyFontEnumerator() {} @@ -158,7 +183,7 @@ static PyObject *_wrap_wxGetTranslation(PyObject *self, PyObject *args, PyObject if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -173,47 +198,146 @@ static PyObject *_wrap_wxGetTranslation(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxNativeFontInfo_FromXFontName(_swigobj,_swigarg0) (_swigobj->FromXFontName(_swigarg0)) -static PyObject *_wrap_wxNativeFontInfo_FromXFontName(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxNativeFontInfo() (new wxNativeFontInfo()) +static PyObject *_wrap_new_wxNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxNativeFontInfo",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNativeFontInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxNativeFontInfo_Init(_swigobj) (_swigobj->Init()) +static PyObject *_wrap_wxNativeFontInfo_Init(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxNativeFontInfo * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","xFontName", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_FromXFontName",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_Init",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_FromXFontName. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_Init. Expected _wxNativeFontInfo_p."); return NULL; } } { - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_Init(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; } + +#define wxNativeFontInfo_GetPointSize(_swigobj) (_swigobj->GetPointSize()) +static PyObject *_wrap_wxNativeFontInfo_GetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetPointSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetPointSize. Expected _wxNativeFontInfo_p."); + return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_FromXFontName(_arg0,*_arg1); + _result = (int )wxNativeFontInfo_GetPointSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNativeFontInfo_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxNativeFontInfo_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontStyle _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetStyle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetStyle. Expected _wxNativeFontInfo_p."); + return NULL; + } + } { - if (_obj1) - delete _arg1; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontStyle )wxNativeFontInfo_GetStyle(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; } + +#define wxNativeFontInfo_GetWeight(_swigobj) (_swigobj->GetWeight()) +static PyObject *_wrap_wxNativeFontInfo_GetWeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontWeight _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetWeight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetWeight. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontWeight )wxNativeFontInfo_GetWeight(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxNativeFontInfo_IsDefault(_swigobj) (_swigobj->IsDefault()) -static PyObject *_wrap_wxNativeFontInfo_IsDefault(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_GetUnderlined(_swigobj) (_swigobj->GetUnderlined()) +static PyObject *_wrap_wxNativeFontInfo_GetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxNativeFontInfo * _arg0; @@ -221,18 +345,18 @@ static PyObject *_wrap_wxNativeFontInfo_IsDefault(PyObject *self, PyObject *args char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_IsDefault",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetUnderlined",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_IsDefault. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetUnderlined. Expected _wxNativeFontInfo_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_IsDefault(_arg0); + _result = (bool )wxNativeFontInfo_GetUnderlined(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -240,8 +364,8 @@ static PyObject *_wrap_wxNativeFontInfo_IsDefault(PyObject *self, PyObject *args return _resultobj; } -#define wxNativeFontInfo_GetXFontName(_swigobj) (_swigobj->GetXFontName()) -static PyObject *_wrap_wxNativeFontInfo_GetXFontName(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_GetFaceName(_swigobj) (_swigobj->GetFaceName()) +static PyObject *_wrap_wxNativeFontInfo_GetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; wxNativeFontInfo * _arg0; @@ -249,24 +373,24 @@ static PyObject *_wrap_wxNativeFontInfo_GetXFontName(PyObject *self, PyObject *a char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetXFontName",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetFaceName",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetXFontName. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetFaceName. Expected _wxNativeFontInfo_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_GetXFontName(_arg0)); + _result = new wxString (wxNativeFontInfo_GetFaceName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -277,22 +401,196 @@ static PyObject *_wrap_wxNativeFontInfo_GetXFontName(PyObject *self, PyObject *a return _resultobj; } -#define wxNativeFontInfo_SetXFontName(_swigobj,_swigarg0) (_swigobj->SetXFontName(_swigarg0)) -static PyObject *_wrap_wxNativeFontInfo_SetXFontName(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_GetFamily(_swigobj) (_swigobj->GetFamily()) +static PyObject *_wrap_wxNativeFontInfo_GetFamily(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontFamily _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetFamily",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetFamily. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontFamily )wxNativeFontInfo_GetFamily(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNativeFontInfo_GetEncoding(_swigobj) (_swigobj->GetEncoding()) +static PyObject *_wrap_wxNativeFontInfo_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontEncoding _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetEncoding",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetEncoding. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontEncoding )wxNativeFontInfo_GetEncoding(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNativeFontInfo_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pointsize", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetPointSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetPointSize. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetPointSize(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + wxFontStyle _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetStyle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetStyle. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetStyle(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetWeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + wxFontWeight _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weight", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetWeight",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetWeight. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetWeight(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetUnderlined(_swigobj,_swigarg0) (_swigobj->SetUnderlined(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","underlined", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetUnderlined",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetUnderlined. Expected _wxNativeFontInfo_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetUnderlined(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxNativeFontInfo * _arg0; wxString * _arg1; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","xFontName", NULL }; + char *_kwnames[] = { "self","facename", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_SetXFontName",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_SetFaceName",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetXFontName. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetFaceName. Expected _wxNativeFontInfo_p."); return NULL; } } @@ -303,7 +601,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetXFontName(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetXFontName(_arg0,*_arg1); + wxNativeFontInfo_SetFaceName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -316,52 +614,56 @@ static PyObject *_wrap_wxNativeFontInfo_SetXFontName(PyObject *self, PyObject *a return _resultobj; } -#define new_wxNativeFontInfo() (new wxNativeFontInfo()) -static PyObject *_wrap_new_wxNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetFamily(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxNativeFontInfo * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; + wxNativeFontInfo * _arg0; + wxFontFamily _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","family", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxNativeFontInfo",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetFamily",_kwnames,&_argo0,&_arg1)) return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetFamily. Expected _wxNativeFontInfo_p."); + return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); + wxNativeFontInfo_SetFamily(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNativeFontInfo_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxNativeFontInfo_Init(_swigobj) (_swigobj->Init()) -static PyObject *_wrap_wxNativeFontInfo_Init(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_SetEncoding(_swigobj,_swigarg0) (_swigobj->SetEncoding(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxNativeFontInfo * _arg0; + wxFontEncoding _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","encoding", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_Init",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetEncoding",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_Init. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetEncoding. Expected _wxNativeFontInfo_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_Init(_arg0); + wxNativeFontInfo_SetEncoding(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -435,7 +737,7 @@ static PyObject *_wrap_wxNativeFontInfo_ToString(PyObject *self, PyObject *args, if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -474,7 +776,7 @@ static PyObject *_wrap_wxNativeFontInfo___str__(PyObject *self, PyObject *args, if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -550,7 +852,7 @@ static PyObject *_wrap_wxNativeFontInfo_ToUserString(PyObject *self, PyObject *a if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -674,140 +976,82 @@ static PyObject *_wrap_wxFontMapper_Set(PyObject *self, PyObject *args, PyObject return _resultobj; } -static PyObject * wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncoding encoding,const wxString & facename,bool interactive) { - wxFontEncoding alt_enc; - if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive)) - return PyInt_FromLong(alt_enc); - else { - Py_INCREF(Py_None); - return Py_None; - } - } -static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_CharsetToEncoding(_swigobj,_swigarg0,_swigarg1) (_swigobj->CharsetToEncoding(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - PyObject * _result; + wxFontEncoding _result; wxFontMapper * _arg0; - wxFontEncoding _arg1; - wxString * _arg2 = (wxString *) &wxPyEmptyString; - bool _arg3 = (bool ) TRUE; + wxString * _arg1; + bool _arg2 = (bool ) true; PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "self","encoding","facename","interactive", NULL }; + PyObject * _obj1 = 0; + int tempbool2 = (int) true; + char *_kwnames[] = { "self","charset","interactive", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|Oi:wxFontMapper_GetAltForEncoding",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFontMapper_CharsetToEncoding",_kwnames,&_argo0,&_obj1,&tempbool2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_GetAltForEncoding. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_CharsetToEncoding. Expected _wxFontMapper_p."); return NULL; } } - if (_obj2) { - _arg2 = wxString_in_helper(_obj2); - if (_arg2 == NULL) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; } - _arg3 = (bool ) tempbool3; + _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); + _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ - _resultobj = _result; -} +} _resultobj = Py_BuildValue("i",_result); { - if (_obj2) - delete _arg2; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFontMapper_IsEncodingAvailable(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEncodingAvailable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxFontMapper_GetSupportedEncodingsCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxFontMapper * _arg0; - wxFontEncoding _arg1; - wxString * _arg2 = (wxString *) &wxPyEmptyString; - PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","encoding","facename", NULL }; + size_t _result; + char *_kwnames[] = { NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxFontMapper_IsEncodingAvailable",_kwnames,&_argo0,&_arg1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_IsEncodingAvailable. Expected _wxFontMapper_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = wxString_in_helper(_obj2); - if (_arg2 == NULL) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetSupportedEncodingsCount",_kwnames)) return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); + _result = (size_t )wxFontMapper::GetSupportedEncodingsCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} return _resultobj; } -#define wxFontMapper_CharsetToEncoding(_swigobj,_swigarg0,_swigarg1) (_swigobj->CharsetToEncoding(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxFontMapper_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontEncoding _result; - wxFontMapper * _arg0; - wxString * _arg1; - bool _arg2 = (bool ) TRUE; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - int tempbool2 = (int) TRUE; - char *_kwnames[] = { "self","charset","interactive", NULL }; + size_t _arg0; + char *_kwnames[] = { "n", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFontMapper_CharsetToEncoding",_kwnames,&_argo0,&_obj1,&tempbool2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_CharsetToEncoding. Expected _wxFontMapper_p."); - return NULL; - } - } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFontMapper_GetEncoding",_kwnames,&_arg0)) return NULL; -} - _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); + _result = (wxFontEncoding )wxFontMapper::GetEncoding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} return _resultobj; } @@ -828,7 +1072,7 @@ static PyObject *_wrap_wxFontMapper_GetEncodingName(PyObject *self, PyObject *ar if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -856,7 +1100,7 @@ static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObj if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -867,35 +1111,35 @@ static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObj return _resultobj; } -#define wxFontMapper_SetDialogParent(_swigobj,_swigarg0) (_swigobj->SetDialogParent(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_SetConfig(_swigobj,_swigarg0) (_swigobj->SetConfig(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontMapper * _arg0; - wxWindow * _arg1; + wxConfigBase * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","parent", NULL }; + char *_kwnames[] = { "self","config", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogParent",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfig",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogParent. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfig. Expected _wxFontMapper_p."); return NULL; } } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetDialogParent. Expected _wxWindow_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetConfig. Expected _wxConfigBase_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogParent(_arg0,_arg1); + wxFontMapper_SetConfig(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -904,22 +1148,22 @@ static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *ar return _resultobj; } -#define wxFontMapper_SetDialogTitle(_swigobj,_swigarg0) (_swigobj->SetDialogTitle(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_SetConfigPath(_swigobj,_swigarg0) (_swigobj->SetConfigPath(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontMapper * _arg0; wxString * _arg1; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","title", NULL }; + char *_kwnames[] = { "self","prefix", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogTitle",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfigPath",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogTitle. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfigPath. Expected _wxFontMapper_p."); return NULL; } } @@ -930,7 +1174,7 @@ static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogTitle(_arg0,*_arg1); + wxFontMapper_SetConfigPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -943,35 +1187,148 @@ static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *arg return _resultobj; } -#define wxFontMapper_SetConfig(_swigobj,_swigarg0) (_swigobj->SetConfig(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxChar * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetDefaultConfigPath",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxChar *)wxFontMapper::GetDefaultConfigPath(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +static PyObject * wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncoding encoding,const wxString & facename,bool interactive) { + wxFontEncoding alt_enc; + if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive)) + return PyInt_FromLong(alt_enc); + else { + Py_INCREF(Py_None); + return Py_None; + } + } +static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + PyObject * _result; wxFontMapper * _arg0; - wxConfigBase * _arg1; + wxFontEncoding _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyString; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","encoding","facename","interactive", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|Oi:wxFontMapper_GetAltForEncoding",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_GetAltForEncoding. Expected _wxFontMapper_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} + _arg3 = (bool ) tempbool3; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFontMapper_IsEncodingAvailable(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEncodingAvailable(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFontMapper * _arg0; + wxFontEncoding _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyString; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","encoding","facename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxFontMapper_IsEncodingAvailable",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_IsEncodingAvailable. Expected _wxFontMapper_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFontMapper_SetDialogParent(_swigobj,_swigarg0) (_swigobj->SetDialogParent(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontMapper * _arg0; + wxWindow * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","config", NULL }; + char *_kwnames[] = { "self","parent", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfig",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogParent",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfig. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogParent. Expected _wxFontMapper_p."); return NULL; } } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetConfig. Expected _wxConfigBase_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetDialogParent. Expected _wxWindow_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfig(_arg0,_arg1); + wxFontMapper_SetDialogParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -980,22 +1337,22 @@ static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxFontMapper_SetConfigPath(_swigobj,_swigarg0) (_swigobj->SetConfigPath(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_SetDialogTitle(_swigobj,_swigarg0) (_swigobj->SetDialogTitle(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontMapper * _arg0; wxString * _arg1; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","prefix", NULL }; + char *_kwnames[] = { "self","title", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfigPath",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogTitle",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfigPath. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogTitle. Expected _wxFontMapper_p."); return NULL; } } @@ -1006,7 +1363,7 @@ static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfigPath(_arg0,*_arg1); + wxFontMapper_SetDialogTitle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1019,33 +1376,6 @@ static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args return _resultobj; } -static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetDefaultConfigPath",_kwnames)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFontMapper::GetDefaultConfigPath()); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} -{ - delete _result; -} - return _resultobj; -} - static void *SwigwxFontTowxObject(void *ptr) { wxFont *src; wxObject *dest; @@ -1111,8 +1441,7 @@ static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxFontFromNativeInfo",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFontFromNativeInfo. Expected _wxNativeFontInfo_p."); return NULL; } @@ -1133,6 +1462,56 @@ static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, return _resultobj; } +static wxFont * wxFont_wxFontFromNativeInfoString(wxFont *self,const wxString & info) { + wxNativeFontInfo nfi; + nfi.FromString(info); + return new wxFont(nfi); + } +static PyObject *_wrap_wxFont_wxFontFromNativeInfoString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxFont * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","info", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFont_wxFontFromNativeInfoString",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_wxFontFromNativeInfoString. Expected _wxFont_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFont *)wxFont_wxFontFromNativeInfoString(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + #define delete_wxFont(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1355,7 +1734,7 @@ static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args, PyObje if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1483,7 +1862,7 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoDesc(PyObject *self, PyObject *ar if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1520,7 +1899,7 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoUserDesc(PyObject *self, PyObject if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1766,8 +2145,7 @@ static PyObject *_wrap_wxFont_SetNativeFontInfo(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxNativeFontInfo_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxNativeFontInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFont_SetNativeFontInfo. Expected _wxNativeFontInfo_p."); return NULL; } @@ -1848,7 +2226,7 @@ static PyObject *_wrap_wxFont_GetFamilyString(PyObject *self, PyObject *args, Py if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1885,7 +2263,7 @@ static PyObject *_wrap_wxFont_GetStyleString(PyObject *self, PyObject *args, PyO if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1922,7 +2300,7 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1933,6 +2311,65 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxFont_SetNoAntiAliasing(_swigobj,_swigarg0) (_swigobj->SetNoAntiAliasing(_swigarg0)) +static PyObject *_wrap_wxFont_SetNoAntiAliasing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","no", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFont_SetNoAntiAliasing",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetNoAntiAliasing. Expected _wxFont_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFont_SetNoAntiAliasing(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFont_GetNoAntiAliasing(_swigobj) (_swigobj->GetNoAntiAliasing()) +static PyObject *_wrap_wxFont_GetNoAntiAliasing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFont * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetNoAntiAliasing",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetNoAntiAliasing. Expected _wxFont_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxFont_GetNoAntiAliasing(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontEncoding _result; @@ -2458,7 +2895,7 @@ static PyObject *_wrap_wxLanguageInfo_CanonicalName_set(PyObject *self, PyObject if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2496,7 +2933,7 @@ static PyObject *_wrap_wxLanguageInfo_CanonicalName_get(PyObject *self, PyObject if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2537,7 +2974,7 @@ static PyObject *_wrap_wxLanguageInfo_Description_set(PyObject *self, PyObject * if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2575,7 +3012,7 @@ static PyObject *_wrap_wxLanguageInfo_Description_get(PyObject *self, PyObject * if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2611,8 +3048,36 @@ static PyObject *_wrap_new_wxLocale(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define wxLocale_Init(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Init(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *kwargs) { +#define delete_wxLocale(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxLocale(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLocale * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLocale",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLocale_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLocale. Expected _wxLocale_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxLocale(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLocale_Init1(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Init(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxLocale_Init1(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxLocale * _arg0; @@ -2630,12 +3095,12 @@ static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *k char *_kwnames[] = { "self","szName","szShort","szLocale","bLoadDefault","bConvertEncoding", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OOii:wxLocale_Init",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&tempbool4,&tempbool5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OOii:wxLocale_Init1",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&tempbool4,&tempbool5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLocale_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_Init. Expected _wxLocale_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_Init1. Expected _wxLocale_p."); return NULL; } } @@ -2660,7 +3125,7 @@ static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *k _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLocale_Init(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (bool )wxLocale_Init1(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2680,31 +3145,33 @@ static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *k return _resultobj; } -#define delete_wxLocale(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxLocale(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxLocale_Init2(_swigobj,_swigarg0,_swigarg1) (_swigobj->Init(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxLocale_Init2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxLocale * _arg0; + int _arg1 = (int ) (wxLANGUAGE_DEFAULT); + int _arg2 = (int ) (wxLOCALE_LOAD_DEFAULT)|(wxLOCALE_CONV_ENCODING); PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","language","flags", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLocale",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxLocale_Init2",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLocale_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLocale. Expected _wxLocale_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_Init2. Expected _wxLocale_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxLocale(_arg0); + _result = (bool )wxLocale_Init2(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2760,7 +3227,7 @@ static PyObject *_wrap_wxLocale_GetSystemEncodingName(PyObject *self, PyObject * if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2825,7 +3292,7 @@ static PyObject *_wrap_wxLocale_GetLocale(PyObject *self, PyObject *args, PyObje if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2890,7 +3357,7 @@ static PyObject *_wrap_wxLocale_GetSysName(PyObject *self, PyObject *args, PyObj if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2927,7 +3394,7 @@ static PyObject *_wrap_wxLocale_GetCanonicalName(PyObject *self, PyObject *args, if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3045,6 +3512,96 @@ static PyObject *_wrap_wxLocale_IsLoaded(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static PyObject *_wrap_wxLocale_GetLanguageInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLanguageInfo * _result; + int _arg0; + char *_kwnames[] = { "lang", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxLocale_GetLanguageInfo",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLanguageInfo *)wxLocale::GetLanguageInfo(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLanguageInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxLocale_GetLanguageName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + int _arg0; + char *_kwnames[] = { "lang", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxLocale_GetLanguageName",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxLocale::GetLanguageName(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxLocale_FindLanguageInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLanguageInfo * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "locale", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLocale_FindLanguageInfo",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLanguageInfo *)wxLocale::FindLanguageInfo(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLanguageInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static PyObject *_wrap_wxLocale_AddLanguage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxLanguageInfo * _arg0; @@ -3055,8 +3612,7 @@ static PyObject *_wrap_wxLocale_AddLanguage(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLocale_AddLanguage",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLanguageInfo_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLanguageInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_AddLanguage. Expected _wxLanguageInfo_p."); return NULL; } @@ -3113,7 +3669,7 @@ static PyObject *_wrap_wxLocale_GetString(PyObject *self, PyObject *args, PyObje if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3159,7 +3715,7 @@ static PyObject *_wrap_wxLocale_GetName(PyObject *self, PyObject *args, PyObject if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3293,7 +3849,7 @@ static PyObject *_wrap_wxEncodingConverter_Convert(PyObject *self, PyObject *arg if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3371,6 +3927,9 @@ static PyMethodDef fontscMethods[] = { { "wxLocale_GetName", (PyCFunction) _wrap_wxLocale_GetName, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_GetString", (PyCFunction) _wrap_wxLocale_GetString, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_AddLanguage", (PyCFunction) _wrap_wxLocale_AddLanguage, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_FindLanguageInfo", (PyCFunction) _wrap_wxLocale_FindLanguageInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_GetLanguageName", (PyCFunction) _wrap_wxLocale_GetLanguageName, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_GetLanguageInfo", (PyCFunction) _wrap_wxLocale_GetLanguageInfo, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_IsLoaded", (PyCFunction) _wrap_wxLocale_IsLoaded, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_AddCatalog", (PyCFunction) _wrap_wxLocale_AddCatalog, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_AddCatalogLookupPathPrefix", (PyCFunction) _wrap_wxLocale_AddCatalogLookupPathPrefix, METH_VARARGS | METH_KEYWORDS }, @@ -3382,8 +3941,9 @@ static PyMethodDef fontscMethods[] = { { "wxLocale_GetSystemEncodingName", (PyCFunction) _wrap_wxLocale_GetSystemEncodingName, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_GetSystemEncoding", (PyCFunction) _wrap_wxLocale_GetSystemEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_GetSystemLanguage", (PyCFunction) _wrap_wxLocale_GetSystemLanguage, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_Init2", (PyCFunction) _wrap_wxLocale_Init2, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_Init1", (PyCFunction) _wrap_wxLocale_Init1, METH_VARARGS | METH_KEYWORDS }, { "delete_wxLocale", (PyCFunction) _wrap_delete_wxLocale, METH_VARARGS | METH_KEYWORDS }, - { "wxLocale_Init", (PyCFunction) _wrap_wxLocale_Init, METH_VARARGS | METH_KEYWORDS }, { "new_wxLocale", (PyCFunction) _wrap_new_wxLocale, METH_VARARGS | METH_KEYWORDS }, { "wxLanguageInfo_Description_get", (PyCFunction) _wrap_wxLanguageInfo_Description_get, METH_VARARGS | METH_KEYWORDS }, { "wxLanguageInfo_Description_set", (PyCFunction) _wrap_wxLanguageInfo_Description_set, METH_VARARGS | METH_KEYWORDS }, @@ -3404,6 +3964,8 @@ static PyMethodDef fontscMethods[] = { { "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS }, { "wxFont_SetDefaultEncoding", (PyCFunction) _wrap_wxFont_SetDefaultEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetDefaultEncoding", (PyCFunction) _wrap_wxFont_GetDefaultEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxFont_GetNoAntiAliasing", (PyCFunction) _wrap_wxFont_GetNoAntiAliasing, METH_VARARGS | METH_KEYWORDS }, + { "wxFont_SetNoAntiAliasing", (PyCFunction) _wrap_wxFont_SetNoAntiAliasing, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetWeightString", (PyCFunction) _wrap_wxFont_GetWeightString, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetStyleString", (PyCFunction) _wrap_wxFont_GetStyleString, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetFamilyString", (PyCFunction) _wrap_wxFont_GetFamilyString, METH_VARARGS | METH_KEYWORDS }, @@ -3429,18 +3991,21 @@ static PyMethodDef fontscMethods[] = { { "wxFont_GetPointSize", (PyCFunction) _wrap_wxFont_GetPointSize, METH_VARARGS | METH_KEYWORDS }, { "wxFont_Ok", (PyCFunction) _wrap_wxFont_Ok, METH_VARARGS | METH_KEYWORDS }, { "delete_wxFont", (PyCFunction) _wrap_delete_wxFont, METH_VARARGS | METH_KEYWORDS }, + { "wxFont_wxFontFromNativeInfoString", (PyCFunction) _wrap_wxFont_wxFontFromNativeInfoString, METH_VARARGS | METH_KEYWORDS }, { "new_wxFontFromNativeInfo", (PyCFunction) _wrap_new_wxFontFromNativeInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxFont", (PyCFunction) _wrap_new_wxFont, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_SetDialogTitle", (PyCFunction) _wrap_wxFontMapper_SetDialogTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_SetDialogParent", (PyCFunction) _wrap_wxFontMapper_SetDialogParent, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_IsEncodingAvailable", (PyCFunction) _wrap_wxFontMapper_IsEncodingAvailable, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_GetAltForEncoding", (PyCFunction) _wrap_wxFontMapper_GetAltForEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_GetDefaultConfigPath", (PyCFunction) _wrap_wxFontMapper_GetDefaultConfigPath, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_SetConfigPath", (PyCFunction) _wrap_wxFontMapper_SetConfigPath, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_SetConfig", (PyCFunction) _wrap_wxFontMapper_SetConfig, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetDialogTitle", (PyCFunction) _wrap_wxFontMapper_SetDialogTitle, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetDialogParent", (PyCFunction) _wrap_wxFontMapper_SetDialogParent, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_GetEncodingDescription", (PyCFunction) _wrap_wxFontMapper_GetEncodingDescription, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_GetEncodingName", (PyCFunction) _wrap_wxFontMapper_GetEncodingName, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_GetEncoding", (PyCFunction) _wrap_wxFontMapper_GetEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_GetSupportedEncodingsCount", (PyCFunction) _wrap_wxFontMapper_GetSupportedEncodingsCount, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_CharsetToEncoding", (PyCFunction) _wrap_wxFontMapper_CharsetToEncoding, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_IsEncodingAvailable", (PyCFunction) _wrap_wxFontMapper_IsEncodingAvailable, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_GetAltForEncoding", (PyCFunction) _wrap_wxFontMapper_GetAltForEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_Set", (PyCFunction) _wrap_wxFontMapper_Set, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_Get", (PyCFunction) _wrap_wxFontMapper_Get, METH_VARARGS | METH_KEYWORDS }, { "delete_wxFontMapper", (PyCFunction) _wrap_delete_wxFontMapper, METH_VARARGS | METH_KEYWORDS }, @@ -3450,12 +4015,22 @@ static PyMethodDef fontscMethods[] = { { "wxNativeFontInfo___str__", (PyCFunction) _wrap_wxNativeFontInfo___str__, METH_VARARGS | METH_KEYWORDS }, { "wxNativeFontInfo_ToString", (PyCFunction) _wrap_wxNativeFontInfo_ToString, METH_VARARGS | METH_KEYWORDS }, { "wxNativeFontInfo_FromString", (PyCFunction) _wrap_wxNativeFontInfo_FromString, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetEncoding", (PyCFunction) _wrap_wxNativeFontInfo_SetEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetFamily", (PyCFunction) _wrap_wxNativeFontInfo_SetFamily, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetFaceName", (PyCFunction) _wrap_wxNativeFontInfo_SetFaceName, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetUnderlined", (PyCFunction) _wrap_wxNativeFontInfo_SetUnderlined, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetWeight", (PyCFunction) _wrap_wxNativeFontInfo_SetWeight, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetStyle", (PyCFunction) _wrap_wxNativeFontInfo_SetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetPointSize", (PyCFunction) _wrap_wxNativeFontInfo_SetPointSize, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetEncoding", (PyCFunction) _wrap_wxNativeFontInfo_GetEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetFamily", (PyCFunction) _wrap_wxNativeFontInfo_GetFamily, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetFaceName", (PyCFunction) _wrap_wxNativeFontInfo_GetFaceName, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetUnderlined", (PyCFunction) _wrap_wxNativeFontInfo_GetUnderlined, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetWeight", (PyCFunction) _wrap_wxNativeFontInfo_GetWeight, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetStyle", (PyCFunction) _wrap_wxNativeFontInfo_GetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetPointSize", (PyCFunction) _wrap_wxNativeFontInfo_GetPointSize, METH_VARARGS | METH_KEYWORDS }, { "wxNativeFontInfo_Init", (PyCFunction) _wrap_wxNativeFontInfo_Init, METH_VARARGS | METH_KEYWORDS }, { "new_wxNativeFontInfo", (PyCFunction) _wrap_new_wxNativeFontInfo, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_SetXFontName", (PyCFunction) _wrap_wxNativeFontInfo_SetXFontName, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_GetXFontName", (PyCFunction) _wrap_wxNativeFontInfo_GetXFontName, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_IsDefault", (PyCFunction) _wrap_wxNativeFontInfo_IsDefault, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_FromXFontName", (PyCFunction) _wrap_wxNativeFontInfo_FromXFontName, METH_VARARGS | METH_KEYWORDS }, { "wxGetTranslation", (PyCFunction) _wrap_wxGetTranslation, METH_VARARGS | METH_KEYWORDS }, { "wxGetLocale", (PyCFunction) _wrap_wxGetLocale, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } @@ -3634,6 +4209,10 @@ SWIGEXPORT(void) initfontsc() { PyDict_SetItemString(d,"wxFONTENCODING_CP12_MAX", PyInt_FromLong((long) wxFONTENCODING_CP12_MAX)); PyDict_SetItemString(d,"wxFONTENCODING_UTF7", PyInt_FromLong((long) wxFONTENCODING_UTF7)); PyDict_SetItemString(d,"wxFONTENCODING_UTF8", PyInt_FromLong((long) wxFONTENCODING_UTF8)); + PyDict_SetItemString(d,"wxFONTENCODING_GB2312", PyInt_FromLong((long) wxFONTENCODING_GB2312)); + PyDict_SetItemString(d,"wxFONTENCODING_BIG5", PyInt_FromLong((long) wxFONTENCODING_BIG5)); + PyDict_SetItemString(d,"wxFONTENCODING_SHIFT_JIS", PyInt_FromLong((long) wxFONTENCODING_SHIFT_JIS)); + PyDict_SetItemString(d,"wxFONTENCODING_EUC_JP", PyInt_FromLong((long) wxFONTENCODING_EUC_JP)); PyDict_SetItemString(d,"wxFONTENCODING_UNICODE", PyInt_FromLong((long) wxFONTENCODING_UNICODE)); PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX)); PyDict_SetItemString(d,"wxLANGUAGE_DEFAULT", PyInt_FromLong((long) wxLANGUAGE_DEFAULT));