X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8bc7bb84dcca816055d5876e4772551c48acda5..1a10a058d5d700b0d12b5a42f92a69633e182a0e:/wxPython/src/gtk/help.cpp diff --git a/wxPython/src/gtk/help.cpp b/wxPython/src/gtk/help.cpp index 0a34f441a7..1d71b4f305 100644 --- a/wxPython/src/gtk/help.cpp +++ b/wxPython/src/gtk/help.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -55,7 +54,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "helpc" -#include "export.h" +#include "wxPython.h" #include @@ -247,7 +246,7 @@ static PyObject *_wrap_wxHelpEvent_GetLink(PyObject *self, PyObject *args, PyObj if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -321,7 +320,7 @@ static PyObject *_wrap_wxHelpEvent_GetTarget(PyObject *self, PyObject *args, PyO if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -368,139 +367,6 @@ static PyObject *_wrap_wxHelpEvent_SetTarget(PyObject *self, PyObject *args, PyO return _resultobj; } -static void *SwigwxContextMenuEventTowxCommandEvent(void *ptr) { - wxContextMenuEvent *src; - wxCommandEvent *dest; - src = (wxContextMenuEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxContextMenuEventTowxEvent(void *ptr) { - wxContextMenuEvent *src; - wxEvent *dest; - src = (wxContextMenuEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -static void *SwigwxContextMenuEventTowxObject(void *ptr) { - wxContextMenuEvent *src; - wxObject *dest; - src = (wxContextMenuEvent *) ptr; - dest = (wxObject *) src; - return (void *) dest; -} - -#define new_wxContextMenuEvent(_swigarg0,_swigarg1,_swigarg2) (new wxContextMenuEvent(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxContextMenuEvent(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxContextMenuEvent * _result; - wxEventType _arg0 = (wxEventType ) wxEVT_NULL; - wxWindowID _arg1 = (wxWindowID ) 0; - wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; - wxPoint temp; - PyObject * _obj2 = 0; - char *_kwnames[] = { "type","id","pt", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiO:new_wxContextMenuEvent",_kwnames,&_arg0,&_arg1,&_obj2)) - return NULL; - if (_obj2) -{ - _arg2 = &temp; - if (! wxPoint_helper(_obj2, &_arg2)) - return NULL; -} -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxContextMenuEvent *)new_wxContextMenuEvent(_arg0,_arg1,*_arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxContextMenuEvent_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxContextMenuEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxContextMenuEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPoint * _result; - wxContextMenuEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxContextMenuEvent_GetPosition",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxContextMenuEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxContextMenuEvent_GetPosition. Expected _wxContextMenuEvent_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxPoint & _result_ref = wxContextMenuEvent_GetPosition(_arg0); - _result = (wxPoint *) &_result_ref; - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxContextMenuEvent_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) -static PyObject *_wrap_wxContextMenuEvent_SetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxContextMenuEvent * _arg0; - wxPoint * _arg1; - PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","pos", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxContextMenuEvent_SetPosition",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxContextMenuEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxContextMenuEvent_SetPosition. Expected _wxContextMenuEvent_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxPoint_helper(_obj1, &_arg1)) - return NULL; -} -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxContextMenuEvent_SetPosition(_arg0,*_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - static void *SwigwxContextHelpTowxObject(void *ptr) { wxContextHelp *src; wxObject *dest; @@ -837,7 +703,7 @@ static PyObject *_wrap_wxHelpProvider_GetHelp(PyObject *self, PyObject *args, Py if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -853,7 +719,7 @@ static PyObject *_wrap_wxHelpProvider_ShowHelp(PyObject *self, PyObject *args, P PyObject * _resultobj; bool _result; wxHelpProvider * _arg0; - wxWindowBase * _arg1; + wxWindow * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","window", NULL }; @@ -870,8 +736,8 @@ static PyObject *_wrap_wxHelpProvider_ShowHelp(PyObject *self, PyObject *args, P } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindowBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHelpProvider_ShowHelp. Expected _wxWindowBase_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHelpProvider_ShowHelp. Expected _wxWindow_p."); return NULL; } } @@ -889,7 +755,7 @@ static PyObject *_wrap_wxHelpProvider_ShowHelp(PyObject *self, PyObject *args, P static PyObject *_wrap_wxHelpProvider_AddHelp(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxHelpProvider * _arg0; - wxWindowBase * _arg1; + wxWindow * _arg1; wxString * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -908,8 +774,8 @@ static PyObject *_wrap_wxHelpProvider_AddHelp(PyObject *self, PyObject *args, Py } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindowBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHelpProvider_AddHelp. Expected _wxWindowBase_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHelpProvider_AddHelp. Expected _wxWindow_p."); return NULL; } } @@ -1049,9 +915,6 @@ static PyMethodDef helpcMethods[] = { { "wxContextHelp_BeginContextHelp", (PyCFunction) _wrap_wxContextHelp_BeginContextHelp, METH_VARARGS | METH_KEYWORDS }, { "delete_wxContextHelp", (PyCFunction) _wrap_delete_wxContextHelp, METH_VARARGS | METH_KEYWORDS }, { "new_wxContextHelp", (PyCFunction) _wrap_new_wxContextHelp, METH_VARARGS | METH_KEYWORDS }, - { "wxContextMenuEvent_SetPosition", (PyCFunction) _wrap_wxContextMenuEvent_SetPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxContextMenuEvent_GetPosition", (PyCFunction) _wrap_wxContextMenuEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, - { "new_wxContextMenuEvent", (PyCFunction) _wrap_new_wxContextMenuEvent, METH_VARARGS | METH_KEYWORDS }, { "wxHelpEvent_SetTarget", (PyCFunction) _wrap_wxHelpEvent_SetTarget, METH_VARARGS | METH_KEYWORDS }, { "wxHelpEvent_GetTarget", (PyCFunction) _wrap_wxHelpEvent_GetTarget, METH_VARARGS | METH_KEYWORDS }, { "wxHelpEvent_SetLink", (PyCFunction) _wrap_wxHelpEvent_SetLink, METH_VARARGS | METH_KEYWORDS }, @@ -1068,7 +931,6 @@ static PyMethodDef helpcMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxEvent}, { "_wxEvent","_wxHelpEvent",SwigwxHelpEventTowxEvent}, { "_signed_long","_long",0}, { "_wxPrintQuality","_wxCoord",0}, @@ -1099,7 +961,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_uint","_int",0}, { "_uint","_wxWindowID",0}, { "_wxChar","_char",0}, - { "_wxCommandEvent","_wxContextMenuEvent",SwigwxContextMenuEventTowxCommandEvent}, { "_wxCommandEvent","_wxHelpEvent",SwigwxHelpEventTowxCommandEvent}, { "_char","_wxChar",0}, { "_wxHelpProvider","_wxSimpleHelpProvider",SwigwxSimpleHelpProviderTowxHelpProvider}, @@ -1123,7 +984,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_short",0}, { "_wxObject","_wxContextHelpButton",SwigwxContextHelpButtonTowxObject}, { "_wxObject","_wxContextHelp",SwigwxContextHelpTowxObject}, - { "_wxObject","_wxContextMenuEvent",SwigwxContextMenuEventTowxObject}, { "_wxObject","_wxHelpEvent",SwigwxHelpEventTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0},