]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/windows2.cpp
wxExecute takes a char**, not a wxChar**
[wxWidgets.git] / wxPython / src / msw / windows2.cpp
index 4af1f81d089923c1a3da018522f404c23c218dd8..bd34654764f007354a3c21f4be1dfaae373426fb 100644 (file)
@@ -66,6 +66,13 @@ extern PyObject *SWIG_newvarlink(void);
 #include <wx/msw/taskbar.h>
 #endif
 
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(NOTEBOOK_NAME);
+
+    static const wxChar* wxSplitterNameStr = wxT("splitter");
+    DECLARE_DEF_STRING(SplitterNameStr);
+    static const wxString wxPyEmptyString(wxT(""));
+
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     PyObject*   o2;
@@ -312,17 +319,18 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject *
     wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
     wxSize * _arg3 = (wxSize *) &wxDefaultSize;
     long  _arg4 = (long ) 0;
-    char * _arg5 = (char *) "notebook";
+    wxString * _arg5 = (wxString *) &wxPyNOTEBOOK_NAME;
     PyObject * _argo0 = 0;
     wxPoint  temp;
     PyObject * _obj2 = 0;
     wxSize  temp0;
     PyObject * _obj3 = 0;
+    PyObject * _obj5 = 0;
     char *_kwnames[] = { "parent","id","pos","size","style","name", NULL };
     char _ptemp[128];
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxNotebook",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxNotebook",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -342,10 +350,16 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject *
     _arg3 = &temp0;
     if (! wxSize_helper(_obj3, &_arg3))
         return NULL;
+}
+    if (_obj5)
+{
+    _arg5 = wxString_in_helper(_obj5);
+    if (_arg5 == NULL)
+        return NULL;
 }
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5);
+    _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
@@ -356,6 +370,10 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject *
         Py_INCREF(Py_None);
         _resultobj = Py_None;
     }
+{
+    if (_obj5)
+        delete _arg5;
+}
     return _resultobj;
 }
 
@@ -395,17 +413,18 @@ static PyObject *_wrap_wxNotebook_Create(PyObject *self, PyObject *args, PyObjec
     wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
     wxSize * _arg4 = (wxSize *) &wxDefaultSize;
     long  _arg5 = (long ) 0;
-    char * _arg6 = (char *) "notebook";
+    wxString * _arg6 = (wxString *) &wxPyNOTEBOOK_NAME;
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     wxPoint  temp;
     PyObject * _obj3 = 0;
     wxSize  temp0;
     PyObject * _obj4 = 0;
+    PyObject * _obj6 = 0;
     char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxNotebook_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxNotebook_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -432,14 +451,24 @@ static PyObject *_wrap_wxNotebook_Create(PyObject *self, PyObject *args, PyObjec
     _arg4 = &temp0;
     if (! wxSize_helper(_obj4, &_arg4))
         return NULL;
+}
+    if (_obj6)
+{
+    _arg6 = wxString_in_helper(_obj6);
+    if (_arg6 == NULL)
+        return NULL;
 }
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (bool )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
+    _result = (bool )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
+{
+    if (_obj6)
+        delete _arg6;
+}
     return _resultobj;
 }
 
@@ -1381,17 +1410,18 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb
     wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
     wxSize * _arg3 = (wxSize *) &wxDefaultSize;
     long  _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN;
-    char * _arg5 = (char *) "splitterWindow";
+    wxString * _arg5 = (wxString *) &wxPySplitterNameStr;
     PyObject * _argo0 = 0;
     wxPoint  temp;
     PyObject * _obj2 = 0;
     wxSize  temp0;
     PyObject * _obj3 = 0;
+    PyObject * _obj5 = 0;
     char *_kwnames[] = { "parent","id","point","size","style","name", NULL };
     char _ptemp[128];
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSplitterWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxSplitterWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1411,10 +1441,16 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb
     _arg3 = &temp0;
     if (! wxSize_helper(_obj3, &_arg3))
         return NULL;
+}
+    if (_obj5)
+{
+    _arg5 = wxString_in_helper(_obj5);
+    if (_arg5 == NULL)
+        return NULL;
 }
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5);
+    _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
@@ -1425,6 +1461,10 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb
         Py_INCREF(Py_None);
         _resultobj = Py_None;
     }
+{
+    if (_obj5)
+        delete _arg5;
+}
     return _resultobj;
 }
 
@@ -1464,17 +1504,18 @@ static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, P
     wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
     wxSize * _arg4 = (wxSize *) &wxDefaultSize;
     long  _arg5 = (long ) wxSP_3D|wxCLIP_CHILDREN;
-    char * _arg6 = (char *) "splitterWindow";
+    wxString * _arg6 = (wxString *) &wxPySplitterNameStr;
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     wxPoint  temp;
     PyObject * _obj3 = 0;
     wxSize  temp0;
     PyObject * _obj4 = 0;
+    PyObject * _obj6 = 0;
     char *_kwnames[] = { "self","parent","id","point","size","style","name", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSplitterWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxSplitterWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1501,14 +1542,24 @@ static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, P
     _arg4 = &temp0;
     if (! wxSize_helper(_obj4, &_arg4))
         return NULL;
+}
+    if (_obj6)
+{
+    _arg6 = wxString_in_helper(_obj6);
+    if (_arg6 == NULL)
+        return NULL;
 }
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (bool )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6);
+    _result = (bool )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
+{
+    if (_obj6)
+        delete _arg6;
+}
     return _resultobj;
 }
 
@@ -2098,6 +2149,93 @@ static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObj
     return _resultobj;
 }
 
+#define wxSplitterWindow_SizeWindows(_swigobj)  (_swigobj->SizeWindows())
+static PyObject *_wrap_wxSplitterWindow_SizeWindows(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxSplitterWindow * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_SizeWindows",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SizeWindows. Expected _wxSplitterWindow_p.");
+        return NULL;
+        }
+    }
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxSplitterWindow_SizeWindows(_arg0);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
+#define wxSplitterWindow_SetNeedUpdating(_swigobj,_swigarg0)  (_swigobj->SetNeedUpdating(_swigarg0))
+static PyObject *_wrap_wxSplitterWindow_SetNeedUpdating(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxSplitterWindow * _arg0;
+    bool  _arg1;
+    PyObject * _argo0 = 0;
+    int tempbool1;
+    char *_kwnames[] = { "self","needUpdating", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetNeedUpdating",_kwnames,&_argo0,&tempbool1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetNeedUpdating. Expected _wxSplitterWindow_p.");
+        return NULL;
+        }
+    }
+    _arg1 = (bool ) tempbool1;
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxSplitterWindow_SetNeedUpdating(_arg0,_arg1);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
+#define wxSplitterWindow_GetNeedUpdating(_swigobj)  (_swigobj->GetNeedUpdating())
+static PyObject *_wrap_wxSplitterWindow_GetNeedUpdating(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    bool  _result;
+    wxSplitterWindow * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetNeedUpdating",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetNeedUpdating. Expected _wxSplitterWindow_p.");
+        return NULL;
+        }
+    }
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxSplitterWindow_GetNeedUpdating(_arg0);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    _resultobj = Py_BuildValue("i",_result);
+    return _resultobj;
+}
+
 static void *SwigwxTaskBarIconTowxEvtHandler(void *ptr) {
     wxTaskBarIcon *src;
     wxEvtHandler *dest;
@@ -2174,13 +2312,14 @@ static PyObject *_wrap_wxTaskBarIcon_SetIcon(PyObject *self, PyObject *args, PyO
     bool  _result;
     wxTaskBarIcon * _arg0;
     wxIcon * _arg1;
-    char * _arg2 = (char *) "";
+    wxString * _arg2 = (wxString *) &wxPyEmptyString;
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
+    PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","icon","tooltip", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|s:wxTaskBarIcon_SetIcon",_kwnames,&_argo0,&_argo1,&_arg2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxTaskBarIcon_SetIcon",_kwnames,&_argo0,&_argo1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -2196,13 +2335,23 @@ static PyObject *_wrap_wxTaskBarIcon_SetIcon(PyObject *self, PyObject *args, PyO
         return NULL;
         }
     }
+    if (_obj2)
+{
+    _arg2 = wxString_in_helper(_obj2);
+    if (_arg2 == NULL)
+        return NULL;
+}
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (bool )wxTaskBarIcon_SetIcon(_arg0,*_arg1,_arg2);
+    _result = (bool )wxTaskBarIcon_SetIcon(_arg0,*_arg1,*_arg2);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
+{
+    if (_obj2)
+        delete _arg2;
+}
     return _resultobj;
 }
 
@@ -2335,6 +2484,9 @@ static PyMethodDef windows2cMethods[] = {
         { "wxTaskBarIcon_SetIcon", (PyCFunction) _wrap_wxTaskBarIcon_SetIcon, METH_VARARGS | METH_KEYWORDS },
         { "delete_wxTaskBarIcon", (PyCFunction) _wrap_delete_wxTaskBarIcon, METH_VARARGS | METH_KEYWORDS },
         { "new_wxTaskBarIcon", (PyCFunction) _wrap_new_wxTaskBarIcon, METH_VARARGS | METH_KEYWORDS },
+        { "wxSplitterWindow_GetNeedUpdating", (PyCFunction) _wrap_wxSplitterWindow_GetNeedUpdating, METH_VARARGS | METH_KEYWORDS },
+        { "wxSplitterWindow_SetNeedUpdating", (PyCFunction) _wrap_wxSplitterWindow_SetNeedUpdating, METH_VARARGS | METH_KEYWORDS },
+        { "wxSplitterWindow_SizeWindows", (PyCFunction) _wrap_wxSplitterWindow_SizeWindows, METH_VARARGS | METH_KEYWORDS },
         { "wxSplitterWindow_GetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_GetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS },
         { "wxSplitterWindow_SetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_SetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS },
         { "wxSplitterWindow_GetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_GetSashPosition, METH_VARARGS | METH_KEYWORDS },