From 5d5d57f3ec5641b9843ae6f2e02d3ad5093a49e6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 21 Aug 2002 20:15:42 +0000 Subject: [PATCH] SWIGged updates for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/msw/controls.cpp | 68 +++++++++++++++++++++++++++++++++++ wxPython/src/msw/controls.py | 6 ++++ wxPython/src/msw/grid.cpp | 2 +- wxPython/src/msw/printfw.cpp | 50 -------------------------- wxPython/src/msw/printfw.py | 5 --- wxPython/src/msw/utils.cpp | 1 + wxPython/src/msw/utils.py | 1 + 7 files changed, 77 insertions(+), 56 deletions(-) diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index e971bf3974..f74eec347d 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -5675,6 +5675,72 @@ static PyObject *_wrap_wxCheckListBox_GetItemHeight(PyObject *self, PyObject *ar return _resultobj; } +#define wxCheckListBox_HitTest(_swigobj,_swigarg0) (_swigobj->HitTest(_swigarg0)) +static PyObject *_wrap_wxCheckListBox_HitTest(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxCheckListBox * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCheckListBox_HitTest",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckListBox_HitTest. Expected _wxCheckListBox_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxCheckListBox_HitTest(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCheckListBox_HitTestXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCheckListBox_HitTestXY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxCheckListBox * _arg0; + wxCoord _arg1; + wxCoord _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCheckListBox_HitTestXY",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckListBox_HitTestXY. Expected _wxCheckListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxCheckListBox_HitTestXY(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxTextAttr(_swigarg0,_swigarg1,_swigarg2) (new wxTextAttr(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -11606,6 +11672,8 @@ static PyMethodDef controlscMethods[] = { { "wxTextAttr_SetTextColour", (PyCFunction) _wrap_wxTextAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTextAttr", (PyCFunction) _wrap_delete_wxTextAttr, METH_VARARGS | METH_KEYWORDS }, { "new_wxTextAttr", (PyCFunction) _wrap_new_wxTextAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckListBox_HitTestXY", (PyCFunction) _wrap_wxCheckListBox_HitTestXY, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckListBox_HitTest", (PyCFunction) _wrap_wxCheckListBox_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_GetItemHeight", (PyCFunction) _wrap_wxCheckListBox_GetItemHeight, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_InsertItems", (PyCFunction) _wrap_wxCheckListBox_InsertItems, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_Check", (PyCFunction) _wrap_wxCheckListBox_Check, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/controls.py b/wxPython/src/msw/controls.py index 18e436a7cf..4e06f17121 100644 --- a/wxPython/src/msw/controls.py +++ b/wxPython/src/msw/controls.py @@ -542,6 +542,12 @@ class wxCheckListBoxPtr(wxListBoxPtr): def GetItemHeight(self, *_args, **_kwargs): val = apply(controlsc.wxCheckListBox_GetItemHeight,(self,) + _args, _kwargs) return val + def HitTest(self, *_args, **_kwargs): + val = apply(controlsc.wxCheckListBox_HitTest,(self,) + _args, _kwargs) + return val + def HitTestXY(self, *_args, **_kwargs): + val = apply(controlsc.wxCheckListBox_HitTestXY,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxCheckListBox(wxCheckListBoxPtr): diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index de3859039a..9af5e6c4c4 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -268,7 +268,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) bool rval = 0; \ bool found; \ wxPyBeginBlockThreads(); \ - if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* s = wx2PyString(c); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,s));\ Py_DECREF(s); \ diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index ad59081b11..24711bbcfa 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -1684,55 +1684,6 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define new_wxPostScriptDC2(_swigarg0,_swigarg1,_swigarg2) (new wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPostScriptDC * _result; - wxString * _arg0; - bool _arg1 = (bool ) TRUE; - wxWindow * _arg2 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - int tempbool1 = (int) TRUE; - PyObject * _argo2 = 0; - char *_kwnames[] = { "output","interactive","parent", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC2",_kwnames,&_obj0,&tempbool1,&_argo2)) - return NULL; -{ - _arg0 = wxString_in_helper(_obj0); - if (_arg0 == NULL) - return NULL; -} - _arg1 = (bool ) tempbool1; - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPostScriptDC2. Expected _wxWindow_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - #define wxPostScriptDC_GetPrintData(_swigobj) (_swigobj->GetPrintData()) static PyObject *_wrap_wxPostScriptDC_GetPrintData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5625,7 +5576,6 @@ static PyMethodDef printfwcMethods[] = { { "wxPostScriptDC_SetResolution", (PyCFunction) _wrap_wxPostScriptDC_SetResolution, METH_VARARGS | METH_KEYWORDS }, { "wxPostScriptDC_SetPrintData", (PyCFunction) _wrap_wxPostScriptDC_SetPrintData, METH_VARARGS | METH_KEYWORDS }, { "wxPostScriptDC_GetPrintData", (PyCFunction) _wrap_wxPostScriptDC_GetPrintData, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPostScriptDC2", (PyCFunction) _wrap_new_wxPostScriptDC2, METH_VARARGS | METH_KEYWORDS }, { "new_wxPostScriptDC", (PyCFunction) _wrap_new_wxPostScriptDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxPrinterDC2", (PyCFunction) _wrap_new_wxPrinterDC2, METH_VARARGS | METH_KEYWORDS }, { "new_wxPrinterDC", (PyCFunction) _wrap_new_wxPrinterDC, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/printfw.py b/wxPython/src/msw/printfw.py index 299b250ab6..1800f47407 100644 --- a/wxPython/src/msw/printfw.py +++ b/wxPython/src/msw/printfw.py @@ -201,11 +201,6 @@ class wxPostScriptDC(wxPostScriptDCPtr): -def wxPostScriptDC2(*_args,**_kwargs): - val = wxPostScriptDCPtr(apply(printfwc.new_wxPostScriptDC2,_args,_kwargs)) - val.thisown = 1 - return val - class wxPageSetupDialogDataPtr(wxObjectPtr): def __init__(self,this): diff --git a/wxPython/src/msw/utils.cpp b/wxPython/src/msw/utils.cpp index 872cf09c30..a5b946a624 100644 --- a/wxPython/src/msw/utils.cpp +++ b/wxPython/src/msw/utils.cpp @@ -7867,6 +7867,7 @@ SWIGEXPORT(void) initutilsc() { PyDict_SetItemString(d,"wxCONFIG_USE_LOCAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_LOCAL_FILE)); PyDict_SetItemString(d,"wxCONFIG_USE_GLOBAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_GLOBAL_FILE)); PyDict_SetItemString(d,"wxCONFIG_USE_RELATIVE_PATH", PyInt_FromLong((long) wxCONFIG_USE_RELATIVE_PATH)); + PyDict_SetItemString(d,"wxCONFIG_USE_NO_ESCAPE_CHARACTERS", PyInt_FromLong((long) wxCONFIG_USE_NO_ESCAPE_CHARACTERS)); // These are no longer needed since utils is back in the core // wxClassInfo::CleanUpClasses(); diff --git a/wxPython/src/msw/utils.py b/wxPython/src/msw/utils.py index 8bf7b40f86..da54031f64 100644 --- a/wxPython/src/msw/utils.py +++ b/wxPython/src/msw/utils.py @@ -956,3 +956,4 @@ def wxDateSpan_Year(*_args, **_kwargs): wxCONFIG_USE_LOCAL_FILE = utilsc.wxCONFIG_USE_LOCAL_FILE wxCONFIG_USE_GLOBAL_FILE = utilsc.wxCONFIG_USE_GLOBAL_FILE wxCONFIG_USE_RELATIVE_PATH = utilsc.wxCONFIG_USE_RELATIVE_PATH +wxCONFIG_USE_NO_ESCAPE_CHARACTERS = utilsc.wxCONFIG_USE_NO_ESCAPE_CHARACTERS -- 2.45.2