X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7e7242718abab356a303606612be6e34234ea59..8775b357008a14fd2acdd2e2c70600f1c6346504:/utils/wxPython/src/msw/windows.cpp?ds=sidebyside diff --git a/utils/wxPython/src/msw/windows.cpp b/utils/wxPython/src/msw/windows.cpp index dd11b7dfca..1b3c40d06c 100644 --- a/utils/wxPython/src/msw/windows.cpp +++ b/utils/wxPython/src/msw/windows.cpp @@ -168,6 +168,16 @@ wxWindow* wxWindow_FromHWND(unsigned long hWnd) { win->SubclassWin(hWnd); return win; } + + int wxWindow_NewControlId() { + return wxWindow::NewControlId(); + } + int wxWindow_NextControlId(int id) { + return wxWindow::NextControlId(id); + } + int wxWindow_PrevControlId(int id) { + return wxWindow::PrevControlId(id); + } #ifdef __cplusplus extern "C" { #endif @@ -255,6 +265,59 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_NewControlId",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxWindow_NewControlId(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_NextControlId",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxWindow_NextControlId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_PrevControlId",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxWindow_PrevControlId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxEvtHandler_ProcessEvent(_swigobj,_swigarg0) (_swigobj->ProcessEvent(_swigarg0)) static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1779,7 +1842,7 @@ static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args, PyObjec wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -1851,7 +1914,7 @@ static PyObject *_wrap_wxWindow_GetName(PyObject *self, PyObject *args, PyObject wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -2331,7 +2394,7 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args, PyObjec wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -3802,7 +3865,7 @@ static PyObject *_wrap_wxWindow_SetDimensions(PyObject *self, PyObject *args, Py } static void wxWindow_SetSize(wxWindow *self,const wxSize & size) { - self->SetSize(size.x, size.y); + self->SetSize(size); } static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4687,6 +4750,76 @@ static PyObject *_wrap_wxWindow_GetBestSize(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxWindow_SetCaret(_swigobj,_swigarg0) (_swigobj->SetCaret(_swigarg0)) +static PyObject *_wrap_wxWindow_SetCaret(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + wxCaret * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","caret", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetCaret",_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 wxWindow_SetCaret. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetCaret. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_SetCaret(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_GetCaret(_swigobj) (_swigobj->GetCaret()) +static PyObject *_wrap_wxWindow_GetCaret(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetCaret",_kwnames,&_argo0)) + 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 wxWindow_GetCaret. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCaret *)wxWindow_GetCaret(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCaret_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxPanelTowxWindow(void *ptr) { wxPanel *src; wxWindow *dest; @@ -5027,7 +5160,7 @@ static PyObject *_wrap_wxDialog_GetTitle(PyObject *self, PyObject *args, PyObjec wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -6379,7 +6512,7 @@ static PyObject *_wrap_wxMenu_GetTitle(PyObject *self, PyObject *args, PyObject wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -6452,7 +6585,7 @@ static PyObject *_wrap_wxMenu_GetLabel(PyObject *self, PyObject *args, PyObject wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -6526,7 +6659,7 @@ static PyObject *_wrap_wxMenu_GetHelpString(PyObject *self, PyObject *args, PyOb wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -7595,7 +7728,7 @@ static PyObject *_wrap_wxMenuBar_GetLabelTop(PyObject *self, PyObject *args, PyO wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -7875,7 +8008,7 @@ static PyObject *_wrap_wxMenuBar_GetLabel(PyObject *self, PyObject *args, PyObje wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -7949,7 +8082,7 @@ static PyObject *_wrap_wxMenuBar_GetHelpString(PyObject *self, PyObject *args, P wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -8212,7 +8345,7 @@ static PyObject *_wrap_wxMenuItem_GetLabel(PyObject *self, PyObject *args, PyObj wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } { delete _result; @@ -8245,7 +8378,7 @@ static PyObject *_wrap_wxMenuItem_GetText(PyObject *self, PyObject *args, PyObje wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } return _resultobj; } @@ -8610,7 +8743,7 @@ static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args, PyObje wxPy_END_ALLOW_THREADS; }{ - _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } return _resultobj; } @@ -8797,6 +8930,8 @@ static PyMethodDef windowscMethods[] = { { "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS }, { "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS }, { "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetCaret", (PyCFunction) _wrap_wxWindow_SetCaret, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetBestSize", (PyCFunction) _wrap_wxWindow_GetBestSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetDropTarget", (PyCFunction) _wrap_wxWindow_GetDropTarget, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetDropTarget", (PyCFunction) _wrap_wxWindow_SetDropTarget, METH_VARARGS | METH_KEYWORDS }, @@ -8929,6 +9064,9 @@ static PyMethodDef windowscMethods[] = { { "wxEvtHandler_SetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_SetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_GetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_GetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS },