]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_misc_wrap.cpp
Added some missing files
[wxWidgets.git] / wxPython / src / gtk / _misc_wrap.cpp
index d0cb482bff2775e27ec03ae15c5b71fac9e458bb..eb77e1e95c7a3ffac0d428d72499cb906c1be762 100644 (file)
@@ -2521,6 +2521,17 @@ static bool wxConfigBase_ReadBool(wxConfigBase *self,wxString const &key,bool de
 
 #define LOCAL_TZ wxDateTime::Local
 
+static PyObject *DateTime_GetAmPmStrings(){
+            wxString am;
+            wxString pm;
+            wxDateTime::GetAmPmStrings(&am, &pm);
+            bool blocked = wxPyBeginBlockThreads();
+            PyObject* tup = PyTuple_New(2);
+            PyTuple_SET_ITEM(tup, 0, wx2PyString(am));
+            PyTuple_SET_ITEM(tup, 1, wx2PyString(pm));
+            wxPyEndBlockThreads(blocked);
+            return tup;
+        }
 
 #if UINT_MAX < LONG_MAX
 /*@/opt/swig/share/swig/1.3.24/python/pymacros.swg,66,SWIG_define@*/
@@ -3046,21 +3057,27 @@ static PyObject *_wrap_SystemSettings_GetFont(PyObject *, PyObject *args, PyObje
 static PyObject *_wrap_SystemSettings_GetMetric(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxSystemMetric arg1 ;
+    wxWindow *arg2 = (wxWindow *) NULL ;
     int result;
     PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
     char *kwnames[] = {
-        (char *) "index", NULL 
+        (char *) "index",(char *) "win", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemSettings_GetMetric",kwnames,&obj0)) goto fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:SystemSettings_GetMetric",kwnames,&obj0,&obj1)) goto fail;
     {
         arg1 = (wxSystemMetric)(SWIG_As_int(obj0)); 
         if (SWIG_arg_fail(1)) SWIG_fail;
     }
+    if (obj1) {
+        SWIG_Python_ConvertPtr(obj1, (void **)&arg2, SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0);
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
     {
         if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (int)wxSystemSettings::GetMetric((wxSystemMetric )arg1);
+        result = (int)wxSystemSettings::GetMetric((wxSystemMetric )arg1,arg2);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
@@ -16735,6 +16752,56 @@ static PyObject *_wrap_ArtProvider_GetIcon(PyObject *, PyObject *args, PyObject
 }
 
 
+static PyObject *_wrap_ArtProvider_GetSize(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxString *arg1 = 0 ;
+    bool arg2 = (bool) false ;
+    wxSize result;
+    bool temp1 = false ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "client",(char *) "platform_dependent", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ArtProvider_GetSize",kwnames,&obj0,&obj1)) goto fail;
+    {
+        arg1 = wxString_in_helper(obj0);
+        if (arg1 == NULL) SWIG_fail;
+        temp1 = true;
+    }
+    if (obj1) {
+        {
+            arg2 = (bool)(SWIG_As_bool(obj1)); 
+            if (SWIG_arg_fail(2)) SWIG_fail;
+        }
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = wxPyArtProvider::GetSize((wxString const &)*arg1,arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        wxSize * resultptr;
+        resultptr = new wxSize((wxSize &)(result));
+        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1);
+    }
+    {
+        if (temp1)
+        delete arg1;
+    }
+    return resultobj;
+    fail:
+    {
+        if (temp1)
+        delete arg1;
+    }
+    return NULL;
+}
+
+
 static PyObject *_wrap_ArtProvider_Destroy(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxPyArtProvider *arg1 = (wxPyArtProvider *) 0 ;
@@ -19308,53 +19375,22 @@ static PyObject *_wrap_DateTime_GetWeekDayName(PyObject *, PyObject *args, PyObj
 
 static PyObject *_wrap_DateTime_GetAmPmStrings(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
-    wxString *arg1 = (wxString *) 0 ;
-    wxString *arg2 = (wxString *) 0 ;
-    bool temp1 = false ;
-    bool temp2 = false ;
-    PyObject * obj0 = 0 ;
-    PyObject * obj1 = 0 ;
+    PyObject *result;
     char *kwnames[] = {
-        (char *) "OUTPUT",(char *) "OUTPUT", NULL 
+        NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DateTime_GetAmPmStrings",kwnames,&obj0,&obj1)) goto fail;
-    {
-        arg1 = wxString_in_helper(obj0);
-        if (arg1 == NULL) SWIG_fail;
-        temp1 = true;
-    }
-    {
-        arg2 = wxString_in_helper(obj1);
-        if (arg2 == NULL) SWIG_fail;
-        temp2 = true;
-    }
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DateTime_GetAmPmStrings",kwnames)) goto fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        wxDateTime::GetAmPmStrings(arg1,arg2);
+        result = (PyObject *)DateTime_GetAmPmStrings();
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    Py_INCREF(Py_None); resultobj = Py_None;
-    {
-        if (temp1)
-        delete arg1;
-    }
-    {
-        if (temp2)
-        delete arg2;
-    }
+    resultobj = result;
     return resultobj;
     fail:
-    {
-        if (temp1)
-        delete arg1;
-    }
-    {
-        if (temp2)
-        delete arg2;
-    }
     return NULL;
 }
 
@@ -31681,6 +31717,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ArtProvider_RemoveProvider", (PyCFunction) _wrap_ArtProvider_RemoveProvider, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ArtProvider_GetBitmap", (PyCFunction) _wrap_ArtProvider_GetBitmap, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ArtProvider_GetIcon", (PyCFunction) _wrap_ArtProvider_GetIcon, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"ArtProvider_GetSize", (PyCFunction) _wrap_ArtProvider_GetSize, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ArtProvider_Destroy", (PyCFunction) _wrap_ArtProvider_Destroy, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ArtProvider_swigregister", ArtProvider_swigregister, METH_VARARGS, NULL},
         { (char *)"delete_ConfigBase", (PyCFunction) _wrap_delete_ConfigBase, METH_VARARGS | METH_KEYWORDS, NULL},