X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32c988a34d4ce6b7ae079fe235853c495a38a3bc..f7db440e1f01702901bf9a54be26ec4dc6b69561:/wxPython/contrib/ogl/oglbasic.cpp diff --git a/wxPython/contrib/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp index c01217015d..24965a42ae 100644 --- a/wxPython/contrib/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -88,7 +88,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #if PYTHON_API_VERSION >= 1009 static char* wxStringErrorMsg = "String or Unicode type required"; #else - static char* wxStringErrorMsg = "string type is required for parameter"; + static char* wxStringErrorMsg = "String type required"; #endif WXSHAPE_IMP_CALLBACKS(wxPyShapeEvtHandler,wxShapeEvtHandler); @@ -1194,8 +1194,8 @@ static PyObject *_wrap_new_wxPyShapeEvtHandler(PyObject *self, PyObject *args, P return _resultobj; } -#define wxPyShapeEvtHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyShapeEvtHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyShapeEvtHandler__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyShapeEvtHandler__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyShapeEvtHandler * _arg0; PyObject * _arg1; @@ -1206,12 +1206,12 @@ static PyObject *_wrap_wxPyShapeEvtHandler__setSelf(PyObject *self, PyObject *ar char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShapeEvtHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShapeEvtHandler__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShapeEvtHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShapeEvtHandler__setSelf. Expected _wxPyShapeEvtHandler_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShapeEvtHandler__setCallbackInfo. Expected _wxPyShapeEvtHandler_p."); return NULL; } } @@ -1223,7 +1223,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler__setSelf(PyObject *self, PyObject *ar } { wxPy_BEGIN_ALLOW_THREADS; - wxPyShapeEvtHandler__setSelf(_arg0,_arg1,_arg2); + wxPyShapeEvtHandler__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1258,6 +1258,40 @@ static PyObject *_wrap_wxPyShapeEvtHandler_Destroy(PyObject *self, PyObject *arg return _resultobj; } +static void wxPyShapeEvtHandler__setOORInfo(wxPyShapeEvtHandler *self,PyObject * _self) { + self->SetClientObject(new wxPyClientData(_self)); + } +static PyObject *_wrap_wxPyShapeEvtHandler__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyShapeEvtHandler * _arg0; + PyObject * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","_self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShapeEvtHandler__setOORInfo",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShapeEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShapeEvtHandler__setOORInfo. Expected _wxPyShapeEvtHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyShapeEvtHandler__setOORInfo(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxPyShapeEvtHandler_SetShape(_swigobj,_swigarg0) (_swigobj->SetShape(_swigarg0)) static PyObject *_wrap_wxPyShapeEvtHandler_SetShape(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1317,7 +1351,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetShape(PyObject *self, PyObject *ar _result = (wxPyShape *)wxPyShapeEvtHandler_GetShape(_arg0); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } return _resultobj; } @@ -1380,7 +1414,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetPreviousHandler(PyObject *self, Py _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_GetPreviousHandler(_arg0); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } return _resultobj; } @@ -1407,7 +1441,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_CreateNewCopy(PyObject *self, PyObjec _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_CreateNewCopy(_arg0); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } return _resultobj; } @@ -2441,8 +2475,8 @@ static void *SwigwxPyShapeTowxObject(void *ptr) { return (void *) dest; } -#define wxPyShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxPyShape__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyShape__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyShape * _arg0; PyObject * _arg1; @@ -2453,12 +2487,12 @@ static PyObject *_wrap_wxPyShape__setSelf(PyObject *self, PyObject *args, PyObje char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShape__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape__setSelf. Expected _wxPyShape_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape__setCallbackInfo. Expected _wxPyShape_p."); return NULL; } } @@ -2470,34 +2504,7 @@ static PyObject *_wrap_wxPyShape__setSelf(PyObject *self, PyObject *args, PyObje } { wxPy_BEGIN_ALLOW_THREADS; - wxPyShape__setSelf(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxPyShape_Destroy(wxPyShape *self) { delete self; } -static PyObject *_wrap_wxPyShape_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyShape * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_Destroy",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_Destroy. Expected _wxPyShape_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPyShape_Destroy(_arg0); + wxPyShape__setCallbackInfo(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2963,7 +2970,7 @@ static PyObject *_wrap_wxPyShape_GetParent(PyObject *self, PyObject *args, PyObj _result = (wxPyShape *)wxPyShape_GetParent(_arg0); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } return _resultobj; } @@ -3026,7 +3033,7 @@ static PyObject *_wrap_wxPyShape_GetTopAncestor(PyObject *self, PyObject *args, _result = (wxPyShape *)wxPyShape_GetTopAncestor(_arg0); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } return _resultobj; } @@ -3259,7 +3266,7 @@ static PyObject *_wrap_wxPyShape_GetEventHandler(PyObject *self, PyObject *args, _result = (wxPyShapeEvtHandler *)wxPyShape_GetEventHandler(_arg0); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } return _resultobj; } @@ -5783,7 +5790,7 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb _result = (wxPyShape *)wxPyShape_FindRegion(_arg0,*_arg1,_arg2); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); @@ -6863,7 +6870,7 @@ static PyObject *_wrap_wxPyShape_CreateNewCopy(PyObject *self, PyObject *args, P _result = (wxPyShape *)wxPyShape_CreateNewCopy(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; -}{ _resultobj = wxPyMake_wxObject(_result); } +}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); } return _resultobj; } @@ -7095,6 +7102,64 @@ static PyObject *_wrap_wxPyShape_ClearPointList(PyObject *self, PyObject *args, return _resultobj; } +#define wxPyShape_GetBackgroundPen(_swigobj) (_swigobj->GetBackgroundPen()) +static PyObject *_wrap_wxPyShape_GetBackgroundPen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPen * _result; + wxPyShape * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetBackgroundPen",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_GetBackgroundPen. Expected _wxPyShape_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPen (wxPyShape_GetBackgroundPen(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxPyShape_GetBackgroundBrush(_swigobj) (_swigobj->GetBackgroundBrush()) +static PyObject *_wrap_wxPyShape_GetBackgroundBrush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBrush * _result; + wxPyShape * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetBackgroundBrush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_GetBackgroundBrush. Expected _wxPyShape_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxBrush (wxPyShape_GetBackgroundBrush(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxPyShape_base_OnDelete(_swigobj) (_swigobj->base_OnDelete()) static PyObject *_wrap_wxPyShape_base_OnDelete(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8139,6 +8204,8 @@ static PyMethodDef oglbasiccMethods[] = { { "wxPyShape_base_OnDrawContents", (PyCFunction) _wrap_wxPyShape_base_OnDrawContents, METH_VARARGS | METH_KEYWORDS }, { "wxPyShape_base_OnDraw", (PyCFunction) _wrap_wxPyShape_base_OnDraw, METH_VARARGS | METH_KEYWORDS }, { "wxPyShape_base_OnDelete", (PyCFunction) _wrap_wxPyShape_base_OnDelete, METH_VARARGS | METH_KEYWORDS }, + { "wxPyShape_GetBackgroundBrush", (PyCFunction) _wrap_wxPyShape_GetBackgroundBrush, METH_VARARGS | METH_KEYWORDS }, + { "wxPyShape_GetBackgroundPen", (PyCFunction) _wrap_wxPyShape_GetBackgroundPen, METH_VARARGS | METH_KEYWORDS }, { "wxPyShape_ClearPointList", (PyCFunction) _wrap_wxPyShape_ClearPointList, METH_VARARGS | METH_KEYWORDS }, { "wxPyShape_Recentre", (PyCFunction) _wrap_wxPyShape_Recentre, METH_VARARGS | METH_KEYWORDS }, { "wxPyShape_ClearAttachments", (PyCFunction) _wrap_wxPyShape_ClearAttachments, METH_VARARGS | METH_KEYWORDS }, @@ -8273,8 +8340,7 @@ static PyMethodDef oglbasiccMethods[] = { { "wxPyShape_GetPerimeterPoint", (PyCFunction) _wrap_wxPyShape_GetPerimeterPoint, METH_VARARGS | METH_KEYWORDS }, { "wxPyShape_GetBoundingBoxMin", (PyCFunction) _wrap_wxPyShape_GetBoundingBoxMin, METH_VARARGS | METH_KEYWORDS }, { "wxPyShape_GetBoundingBoxMax", (PyCFunction) _wrap_wxPyShape_GetBoundingBoxMax, METH_VARARGS | METH_KEYWORDS }, - { "wxPyShape_Destroy", (PyCFunction) _wrap_wxPyShape_Destroy, METH_VARARGS | METH_KEYWORDS }, - { "wxPyShape__setSelf", (PyCFunction) _wrap_wxPyShape__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyShape__setCallbackInfo", (PyCFunction) _wrap_wxPyShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "wxPyShapeEvtHandler_base_OnEndSize", (PyCFunction) _wrap_wxPyShapeEvtHandler_base_OnEndSize, METH_VARARGS | METH_KEYWORDS }, { "wxPyShapeEvtHandler_base_OnBeginSize", (PyCFunction) _wrap_wxPyShapeEvtHandler_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS }, { "wxPyShapeEvtHandler_base_OnSizingEndDragLeft", (PyCFunction) _wrap_wxPyShapeEvtHandler_base_OnSizingEndDragLeft, METH_VARARGS | METH_KEYWORDS }, @@ -8309,8 +8375,9 @@ static PyMethodDef oglbasiccMethods[] = { { "wxPyShapeEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxPyShapeEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS }, { "wxPyShapeEvtHandler_GetShape", (PyCFunction) _wrap_wxPyShapeEvtHandler_GetShape, METH_VARARGS | METH_KEYWORDS }, { "wxPyShapeEvtHandler_SetShape", (PyCFunction) _wrap_wxPyShapeEvtHandler_SetShape, METH_VARARGS | METH_KEYWORDS }, + { "wxPyShapeEvtHandler__setOORInfo", (PyCFunction) _wrap_wxPyShapeEvtHandler__setOORInfo, METH_VARARGS | METH_KEYWORDS }, { "wxPyShapeEvtHandler_Destroy", (PyCFunction) _wrap_wxPyShapeEvtHandler_Destroy, METH_VARARGS | METH_KEYWORDS }, - { "wxPyShapeEvtHandler__setSelf", (PyCFunction) _wrap_wxPyShapeEvtHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxPyShapeEvtHandler__setCallbackInfo", (PyCFunction) _wrap_wxPyShapeEvtHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyShapeEvtHandler", (PyCFunction) _wrap_new_wxPyShapeEvtHandler, METH_VARARGS | METH_KEYWORDS }, { "wxShapeRegion_ClearText", (PyCFunction) _wrap_wxShapeRegion_ClearText, METH_VARARGS | METH_KEYWORDS }, { "wxShapeRegion_GetHeight", (PyCFunction) _wrap_wxShapeRegion_GetHeight, METH_VARARGS | METH_KEYWORDS }, @@ -8363,12 +8430,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_class_wxObject","_class_wxPyShape",SwigwxPyShapeTowxObject}, - { "_class_wxObject","_wxPyShape",SwigwxPyShapeTowxObject}, - { "_class_wxObject","_class_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, - { "_class_wxObject","_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, - { "_class_wxObject","_class_wxShapeRegion",SwigwxShapeRegionTowxObject}, - { "_class_wxObject","_wxShapeRegion",SwigwxShapeRegionTowxObject}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -8376,8 +8437,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, - { "_class_wxPyShapeEvtHandler","_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, { "_uint","_time_t",0}, @@ -8407,11 +8466,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_wxObject","_class_wxPyShape",SwigwxPyShapeTowxObject}, { "_wxObject","_wxPyShape",SwigwxPyShapeTowxObject}, - { "_wxObject","_class_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, { "_wxObject","_wxPyShapeEvtHandler",SwigwxPyShapeEvtHandlerTowxObject}, - { "_wxObject","_class_wxShapeRegion",SwigwxShapeRegionTowxObject}, { "_wxObject","_wxShapeRegion",SwigwxShapeRegionTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, @@ -8464,7 +8520,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_size_t",0}, { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, {0,0,0}};