]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/misc2.cpp
added wxRendererNative to be used by the generic controls for rendering platfomr...
[wxWidgets.git] / wxPython / src / gtk / misc2.cpp
index 0bc97d4c48e5709a460951fadc46016a5c40fdde..c22bea9bfdd1b7e277c05fb57c81823bd65f7d57 100644 (file)
@@ -56,7 +56,6 @@ extern PyObject *SWIG_newvarlink(void);
 
 #include "helpers.h"
 #include "pyistream.h"
-#include <wx/resource.h>
 #include <wx/tooltip.h>
 #include <wx/caret.h>
 #include <wx/tipdlg.h>
@@ -73,7 +72,6 @@ extern PyObject *SWIG_newvarlink(void);
 #include <wx/mimetype.h>
 #include <wx/snglinst.h>
 #include <wx/effects.h>
-//#include <wx/spawnbrowser.h>
 
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
@@ -4275,6 +4273,7 @@ static PyObject *_wrap_wxPyTimer_SetOwner(PyObject *self, PyObject *args, PyObje
 #define wxPyTimer_Start(_swigobj,_swigarg0,_swigarg1)  (_swigobj->Start(_swigarg0,_swigarg1))
 static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
+    bool  _result;
     wxPyTimer * _arg0;
     int  _arg1 = (int ) -1;
     int  _arg2 = (int ) FALSE;
@@ -4293,12 +4292,11 @@ static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject
     }
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    wxPyTimer_Start(_arg0,_arg1,_arg2);
+    _result = (bool )wxPyTimer_Start(_arg0,_arg1,_arg2);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    Py_INCREF(Py_None);
-    _resultobj = Py_None;
+}    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 
@@ -4621,34 +4619,6 @@ static PyObject *_wrap_wxLog_Flush(PyObject *self, PyObject *args, PyObject *kwa
     return _resultobj;
 }
 
-#define wxLog_HasPendingMessages(_swigobj)  (_swigobj->HasPendingMessages())
-static PyObject *_wrap_wxLog_HasPendingMessages(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject * _resultobj;
-    bool  _result;
-    wxLog * _arg0;
-    PyObject * _argo0 = 0;
-    char *_kwnames[] = { "self", NULL };
-
-    self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_HasPendingMessages",_kwnames,&_argo0)) 
-        return NULL;
-    if (_argo0) {
-        if (_argo0 == Py_None) { _arg0 = NULL; }
-        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_HasPendingMessages. Expected _wxLog_p.");
-        return NULL;
-        }
-    }
-{
-    PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (bool )wxLog_HasPendingMessages(_arg0);
-
-    wxPyEndAllowThreads(__tstate);
-    if (PyErr_Occurred()) return NULL;
-}    _resultobj = Py_BuildValue("i",_result);
-    return _resultobj;
-}
-
 static PyObject *_wrap_wxLog_FlushActive(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     char *_kwnames[] = {  NULL };
@@ -8621,9 +8591,9 @@ static PyObject *_wrap_wxFileType_GetExtensions(PyObject *self, PyObject *args,
 }
 
 static wxIcon * wxFileType_GetIcon(wxFileType *self) {
-            wxIcon icon;
-            if (self->GetIcon(&icon))
-                return new wxIcon(icon);
+            wxIconLocation loc;
+            if (self->GetIcon(&loc))
+                return new wxIcon(loc);
             else
                 return NULL;
         }
@@ -8662,14 +8632,18 @@ static PyObject *_wrap_wxFileType_GetIcon(PyObject *self, PyObject *args, PyObje
 }
 
 static PyObject * wxFileType_GetIconInfo(wxFileType *self) {
-            wxIcon icon;
-            wxString iconFile;
-            int iconIndex;
-            if (self->GetIcon(&icon, &iconFile, &iconIndex)) {
+            wxIconLocation loc;
+            if (self->GetIcon(&loc)) {
+                wxString iconFile = loc.GetFileName();
+                int iconIndex     = -1;
+#ifdef __WXMSW__
+                iconIndex = loc.GetIndex();
+#endif
+                // Make a tuple and put the values in it
                 wxPyBeginBlockThreads();
                 PyObject* tuple = PyTuple_New(3);
-                PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon),
-                                                              wxT("wxIcon"), TRUE));
+                PyTuple_SetItem(tuple, 0,
+                                wxPyConstructObject(new wxIcon(loc), wxT("wxIcon"), TRUE));
 #if wxUSE_UNICODE
                 PyTuple_SetItem(tuple, 1, PyUnicode_FromWideChar(iconFile.c_str(), iconFile.Len()));
 #else
@@ -9210,7 +9184,7 @@ static PyObject *_wrap_new_wxMimeTypesManager(PyObject *self, PyObject *args, Py
 static PyObject *_wrap_wxMimeTypesManager_Initialize(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxMimeTypesManager * _arg0;
-    int  _arg1 = (int ) (wxMAILCAP_STANDARD);
+    int  _arg1 = (int ) (wxMAILCAP_ALL);
     wxString * _arg2 = (wxString *) &wxPyEmptyString;
     PyObject * _argo0 = 0;
     PyObject * _obj2 = 0;
@@ -10310,34 +10284,6 @@ static PyObject *_wrap_wxFileHistory_GetCount(PyObject *self, PyObject *args, Py
     return _resultobj;
 }
 
-#define wxFileHistory_GetNoHistoryFiles(_swigobj)  (_swigobj->GetNoHistoryFiles())
-static PyObject *_wrap_wxFileHistory_GetNoHistoryFiles(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject * _resultobj;
-    int  _result;
-    wxFileHistory * _arg0;
-    PyObject * _argo0 = 0;
-    char *_kwnames[] = { "self", NULL };
-
-    self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileHistory_GetNoHistoryFiles",_kwnames,&_argo0)) 
-        return NULL;
-    if (_argo0) {
-        if (_argo0 == Py_None) { _arg0 = NULL; }
-        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileHistory_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileHistory_GetNoHistoryFiles. Expected _wxFileHistory_p.");
-        return NULL;
-        }
-    }
-{
-    PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (int )wxFileHistory_GetNoHistoryFiles(_arg0);
-
-    wxPyEndAllowThreads(__tstate);
-    if (PyErr_Occurred()) return NULL;
-}    _resultobj = Py_BuildValue("i",_result);
-    return _resultobj;
-}
-
 static void *SwigwxEffectsTowxObject(void *ptr) {
     wxEffects *src;
     wxObject *dest;
@@ -11069,7 +11015,6 @@ static PyMethodDef misc2cMethods[] = {
         { "wxEffects_GetLightShadow", (PyCFunction) _wrap_wxEffects_GetLightShadow, METH_VARARGS | METH_KEYWORDS },
         { "wxEffects_GetHighlightColour", (PyCFunction) _wrap_wxEffects_GetHighlightColour, METH_VARARGS | METH_KEYWORDS },
         { "new_wxEffects", (PyCFunction) _wrap_new_wxEffects, METH_VARARGS | METH_KEYWORDS },
-        { "wxFileHistory_GetNoHistoryFiles", (PyCFunction) _wrap_wxFileHistory_GetNoHistoryFiles, METH_VARARGS | METH_KEYWORDS },
         { "wxFileHistory_GetCount", (PyCFunction) _wrap_wxFileHistory_GetCount, METH_VARARGS | METH_KEYWORDS },
         { "wxFileHistory_GetHistoryFile", (PyCFunction) _wrap_wxFileHistory_GetHistoryFile, METH_VARARGS | METH_KEYWORDS },
         { "wxFileHistory_AddFilesToThisMenu", (PyCFunction) _wrap_wxFileHistory_AddFilesToThisMenu, METH_VARARGS | METH_KEYWORDS },
@@ -11244,7 +11189,6 @@ static PyMethodDef misc2cMethods[] = {
         { "wxLog_SetActiveTarget", (PyCFunction) _wrap_wxLog_SetActiveTarget, METH_VARARGS | METH_KEYWORDS },
         { "wxLog_GetActiveTarget", (PyCFunction) _wrap_wxLog_GetActiveTarget, METH_VARARGS | METH_KEYWORDS },
         { "wxLog_FlushActive", (PyCFunction) _wrap_wxLog_FlushActive, METH_VARARGS | METH_KEYWORDS },
-        { "wxLog_HasPendingMessages", (PyCFunction) _wrap_wxLog_HasPendingMessages, METH_VARARGS | METH_KEYWORDS },
         { "wxLog_Flush", (PyCFunction) _wrap_wxLog_Flush, METH_VARARGS | METH_KEYWORDS },
         { "wxLog_OnLog", (PyCFunction) _wrap_wxLog_OnLog, METH_VARARGS | METH_KEYWORDS },
         { "wxLog_EnableLogging", (PyCFunction) _wrap_wxLog_EnableLogging, METH_VARARGS | METH_KEYWORDS },