X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..ce1ecc6d48415cf3b348e42b1e53ae2333d9098a:/wxPython/src/gtk/windows2.cpp diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 5e5135d448..6dca759e5e 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/windows2.cpp + * FILE : src/gtk/windows2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -65,7 +67,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -278,8 +279,8 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * wxNotebook * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "notebook"; PyObject * _argo0 = 0; @@ -461,11 +462,22 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + 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_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -667,6 +679,76 @@ static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxNotebook_SetPageSize(_swigobj,_swigarg0) (_swigobj->SetPageSize(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPageSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageSize. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPageSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_SetPadding(_swigobj,_swigarg0) (_swigobj->SetPadding(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","padding", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPadding",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPadding. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPadding(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -782,11 +864,22 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + 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_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -801,6 +894,71 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxNotebook_InsertPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->InsertPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + int _arg1; + wxWindow * _arg2; + wxString * _arg3; + bool _arg4 = (bool ) FALSE; + int _arg5 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + PyObject * _obj3 = 0; + int tempbool4 = (int) FALSE; + char *_kwnames[] = { "self","nPage","pPage","strText","bSelect","imageId", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO|ii:wxNotebook_InsertPage",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&tempbool4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_InsertPage. Expected _wxNotebook_p."); + return NULL; + } + } + 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 wxNotebook_InsertPage. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + _arg4 = (bool ) tempbool4; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1047,8 +1205,8 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb wxSplitterWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN; char * _arg5 = (char *) "splitterWindow"; PyObject * _argo0 = 0; @@ -1703,10 +1861,13 @@ static PyMethodDef windows2cMethods[] = { { "wxSplitterEvent_GetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_ResizeChildren", (PyCFunction) _wrap_wxNotebook_ResizeChildren, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPage", (PyCFunction) _wrap_wxNotebook_GetPage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_InsertPage", (PyCFunction) _wrap_wxNotebook_InsertPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_AddPage", (PyCFunction) _wrap_wxNotebook_AddPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeleteAllPages", (PyCFunction) _wrap_wxNotebook_DeleteAllPages, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_RemovePage", (PyCFunction) _wrap_wxNotebook_RemovePage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeletePage", (PyCFunction) _wrap_wxNotebook_DeletePage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPadding", (PyCFunction) _wrap_wxNotebook_SetPadding, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPageSize", (PyCFunction) _wrap_wxNotebook_SetPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetRowCount", (PyCFunction) _wrap_wxNotebook_GetRowCount, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetPageImage", (PyCFunction) _wrap_wxNotebook_SetPageImage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPageImage", (PyCFunction) _wrap_wxNotebook_GetPageImage, METH_VARARGS | METH_KEYWORDS }, @@ -1752,6 +1913,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -1793,6 +1955,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1826,6 +1989,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, @@ -1957,6 +2121,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1980,6 +2145,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1989,6 +2155,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1999,6 +2166,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -2029,6 +2203,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0},