SWIGged updates for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -61,6 +61,7 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
#include <wx/fontenc.h>
|
||||
#include <wx/fontmap.h>
|
||||
#include <wx/fontutil.h>
|
||||
#include <wx/dcbuffer.h>
|
||||
|
||||
|
||||
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
@@ -88,6 +89,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
// Put some wx default wxChar* values into wxStrings.
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
// Implementations of some alternate "constructors"
|
||||
|
||||
wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) {
|
||||
@@ -3203,7 +3207,7 @@ static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject *
|
||||
PyObject * _result;
|
||||
wxFontMapper * _arg0;
|
||||
wxFontEncoding _arg1;
|
||||
wxString * _arg2 = (wxString *) &wxEmptyString;
|
||||
wxString * _arg2 = (wxString *) &wxPyEmptyString;
|
||||
bool _arg3 = (bool ) TRUE;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
@@ -3249,7 +3253,7 @@ static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject
|
||||
bool _result;
|
||||
wxFontMapper * _arg0;
|
||||
wxFontEncoding _arg1;
|
||||
wxString * _arg2 = (wxString *) &wxEmptyString;
|
||||
wxString * _arg2 = (wxString *) &wxPyEmptyString;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","encoding","facename", NULL };
|
||||
@@ -3536,7 +3540,7 @@ static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args
|
||||
|
||||
static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxChar * _result;
|
||||
wxString * _result;
|
||||
char *_kwnames[] = { NULL };
|
||||
|
||||
self = self;
|
||||
@@ -3544,11 +3548,20 @@ static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObjec
|
||||
return NULL;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxChar *)wxFontMapper::GetDefaultConfigPath();
|
||||
_result = new wxString (wxFontMapper::GetDefaultConfigPath());
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("s", _result);
|
||||
}{
|
||||
#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;
|
||||
}
|
||||
|
||||
@@ -3577,17 +3590,24 @@ static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwar
|
||||
int _arg2;
|
||||
int _arg3;
|
||||
int _arg4 = (int ) FALSE;
|
||||
char * _arg5 = (char *) "";
|
||||
wxString * _arg5 = (wxString *) &wxPyEmptyString;
|
||||
wxFontEncoding _arg6 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT);
|
||||
PyObject * _obj5 = 0;
|
||||
char *_kwnames[] = { "pointSize","family","style","weight","underline","faceName","encoding", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiii|isi:new_wxFont",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiii|iOi:new_wxFont",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_obj5,&_arg6))
|
||||
return NULL;
|
||||
if (_obj5)
|
||||
{
|
||||
_arg5 = wxString_in_helper(_obj5);
|
||||
if (_arg5 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
|
||||
_result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,_arg6);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -3598,6 +3618,10 @@ static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwar
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
{
|
||||
if (_obj5)
|
||||
delete _arg5;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
@@ -4528,15 +4552,16 @@ static PyObject *_wrap_wxFontList_FindOrCreateFont(PyObject *self, PyObject *arg
|
||||
int _arg3;
|
||||
int _arg4;
|
||||
bool _arg5 = (bool ) FALSE;
|
||||
char * _arg6 = (char *) NULL;
|
||||
wxString * _arg6 = (wxString *) &wxPyEmptyString;
|
||||
wxFontEncoding _arg7 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT);
|
||||
PyObject * _argo0 = 0;
|
||||
int tempbool5 = (int) FALSE;
|
||||
PyObject * _obj6 = 0;
|
||||
char *_kwnames[] = { "self","point_size","family","style","weight","underline","facename","encoding", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|isi:wxFontList_FindOrCreateFont",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5,&_arg6,&_arg7))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|iOi:wxFontList_FindOrCreateFont",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5,&_obj6,&_arg7))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -4546,9 +4571,15 @@ static PyObject *_wrap_wxFontList_FindOrCreateFont(PyObject *self, PyObject *arg
|
||||
}
|
||||
}
|
||||
_arg5 = (bool ) tempbool5;
|
||||
if (_obj6)
|
||||
{
|
||||
_arg6 = wxString_in_helper(_obj6);
|
||||
if (_arg6 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7);
|
||||
_result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,_arg7);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -4559,6 +4590,10 @@ static PyObject *_wrap_wxFontList_FindOrCreateFont(PyObject *self, PyObject *arg
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
{
|
||||
if (_obj6)
|
||||
delete _arg6;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
@@ -4968,7 +5003,7 @@ static void wxColourDatabase_Append(wxColourDatabase *self,const wxString & nam
|
||||
wxString cName = name;
|
||||
cName.MakeUpper();
|
||||
wxString cName2 = cName;
|
||||
if ( !cName2.Replace("GRAY", "GREY") )
|
||||
if ( !cName2.Replace(wxT("GRAY"), wxT("GREY")) )
|
||||
cName2.clear();
|
||||
|
||||
wxNode *node = self->First();
|
||||
@@ -9663,6 +9698,193 @@ static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args, P
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxBufferedDCTowxMemoryDC(void *ptr) {
|
||||
wxBufferedDC *src;
|
||||
wxMemoryDC *dest;
|
||||
src = (wxBufferedDC *) ptr;
|
||||
dest = (wxMemoryDC *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxBufferedDCTowxDC(void *ptr) {
|
||||
wxBufferedDC *src;
|
||||
wxDC *dest;
|
||||
src = (wxBufferedDC *) ptr;
|
||||
dest = (wxDC *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxBufferedDCTowxObject(void *ptr) {
|
||||
wxBufferedDC *src;
|
||||
wxObject *dest;
|
||||
src = (wxBufferedDC *) ptr;
|
||||
dest = (wxObject *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxBufferedDC(_swigarg0,_swigarg1) (new wxBufferedDC(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_new_wxBufferedDC(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxBufferedDC * _result;
|
||||
wxDC * _arg0;
|
||||
wxBitmap * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "dc","buffer", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxBufferedDC",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBufferedDC. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxBufferedDC. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxBufferedDC *)new_wxBufferedDC(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxBufferedDC_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define new_wxBufferedDCInternalBuffer(_swigarg0,_swigarg1) (new wxBufferedDC(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_new_wxBufferedDCInternalBuffer(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxBufferedDC * _result;
|
||||
wxDC * _arg0;
|
||||
wxSize * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
wxSize temp;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "dc","area", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxBufferedDCInternalBuffer",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBufferedDCInternalBuffer. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = &temp;
|
||||
if (! wxSize_helper(_obj1, &_arg1))
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxBufferedDC *)new_wxBufferedDCInternalBuffer(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxBufferedDC_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxBufferedPaintDCTowxBufferedDC(void *ptr) {
|
||||
wxBufferedPaintDC *src;
|
||||
wxBufferedDC *dest;
|
||||
src = (wxBufferedPaintDC *) ptr;
|
||||
dest = (wxBufferedDC *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxBufferedPaintDCTowxMemoryDC(void *ptr) {
|
||||
wxBufferedPaintDC *src;
|
||||
wxMemoryDC *dest;
|
||||
src = (wxBufferedPaintDC *) ptr;
|
||||
dest = (wxMemoryDC *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxBufferedPaintDCTowxDC(void *ptr) {
|
||||
wxBufferedPaintDC *src;
|
||||
wxDC *dest;
|
||||
src = (wxBufferedPaintDC *) ptr;
|
||||
dest = (wxDC *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxBufferedPaintDCTowxObject(void *ptr) {
|
||||
wxBufferedPaintDC *src;
|
||||
wxObject *dest;
|
||||
src = (wxBufferedPaintDC *) ptr;
|
||||
dest = (wxObject *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxBufferedPaintDC(_swigarg0,_swigarg1) (new wxBufferedPaintDC(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_new_wxBufferedPaintDC(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxBufferedPaintDC * _result;
|
||||
wxWindow * _arg0;
|
||||
wxBitmap * _arg1 = (wxBitmap *) &wxNullBitmap;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "window","buffer", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxBufferedPaintDC",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBufferedPaintDC. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxBufferedPaintDC. Expected _wxBitmap_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxBufferedPaintDC *)new_wxBufferedPaintDC(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxBufferedPaintDC_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxScreenDCTowxDC(void *ptr) {
|
||||
wxScreenDC *src;
|
||||
wxDC *dest;
|
||||
@@ -11727,6 +11949,9 @@ static PyMethodDef gdicMethods[] = {
|
||||
{ "wxScreenDC_StartDrawingOnTop", (PyCFunction) _wrap_wxScreenDC_StartDrawingOnTop, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScreenDC_StartDrawingOnTopWin", (PyCFunction) _wrap_wxScreenDC_StartDrawingOnTopWin, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxScreenDC", (PyCFunction) _wrap_new_wxScreenDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxBufferedPaintDC", (PyCFunction) _wrap_new_wxBufferedPaintDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxBufferedDCInternalBuffer", (PyCFunction) _wrap_new_wxBufferedDCInternalBuffer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxBufferedDC", (PyCFunction) _wrap_new_wxBufferedDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMemoryDC_SelectObject", (PyCFunction) _wrap_wxMemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxMemoryDC", (PyCFunction) _wrap_new_wxMemoryDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDC__DrawLineList", (PyCFunction) _wrap_wxDC__DrawLineList, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -12013,6 +12238,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC},
|
||||
{ "_wxDC","_wxClientDC",SwigwxClientDCTowxDC},
|
||||
{ "_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC},
|
||||
{ "_wxDC","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxDC},
|
||||
{ "_wxDC","_wxBufferedDC",SwigwxBufferedDCTowxDC},
|
||||
{ "_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC},
|
||||
{ "_size_t","_wxCoord",0},
|
||||
{ "_size_t","_wxPrintQuality",0},
|
||||
@@ -12030,6 +12257,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_uint","_wxWindowID",0},
|
||||
{ "_wxChar","_char",0},
|
||||
{ "_char","_wxChar",0},
|
||||
{ "_wxBufferedDC","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxBufferedDC},
|
||||
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
|
||||
{ "_EBool","_wxCoord",0},
|
||||
{ "_EBool","_wxPrintQuality",0},
|
||||
@@ -12056,6 +12284,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject},
|
||||
{ "_wxObject","_wxClientDC",SwigwxClientDCTowxObject},
|
||||
{ "_wxObject","_wxScreenDC",SwigwxScreenDCTowxObject},
|
||||
{ "_wxObject","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxObject},
|
||||
{ "_wxObject","_wxBufferedDC",SwigwxBufferedDCTowxObject},
|
||||
{ "_wxObject","_wxMemoryDC",SwigwxMemoryDCTowxObject},
|
||||
{ "_wxObject","_wxDC",SwigwxDCTowxObject},
|
||||
{ "_wxObject","_wxBrushList",SwigwxBrushListTowxObject},
|
||||
@@ -12074,6 +12304,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxObject","_wxGDIObject",SwigwxGDIObjectTowxObject},
|
||||
{ "_signed_short","_WXTYPE",0},
|
||||
{ "_signed_short","_short",0},
|
||||
{ "_wxMemoryDC","_wxBufferedPaintDC",SwigwxBufferedPaintDCTowxMemoryDC},
|
||||
{ "_wxMemoryDC","_wxBufferedDC",SwigwxBufferedDCTowxMemoryDC},
|
||||
{ "_unsigned_char","_byte",0},
|
||||
{ "_unsigned_int","_wxCoord",0},
|
||||
{ "_unsigned_int","_wxPrintQuality",0},
|
||||
|
Reference in New Issue
Block a user