]> git.saurik.com Git - wxWidgets.git/commitdiff
reSWIGged
authorRobin Dunn <robin@alldunn.com>
Mon, 28 Feb 2005 19:47:34 +0000 (19:47 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 28 Feb 2005 19:47:34 +0000 (19:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

16 files changed:
wxPython/src/gtk/_controls.py
wxPython/src/gtk/_controls_wrap.cpp
wxPython/src/gtk/_core.py
wxPython/src/gtk/_core_wrap.cpp
wxPython/src/gtk/_gdi.py
wxPython/src/gtk/_gdi_wrap.cpp
wxPython/src/gtk/_misc_wrap.cpp
wxPython/src/gtk/_windows.py
wxPython/src/gtk/_windows_wrap.cpp
wxPython/src/msw/_core.py
wxPython/src/msw/_core_wrap.cpp
wxPython/src/msw/_gdi.py
wxPython/src/msw/_gdi_wrap.cpp
wxPython/src/msw/_misc_wrap.cpp
wxPython/src/msw/_windows.py
wxPython/src/msw/_windows_wrap.cpp

index 975e67ba2fcdece09fee1016c3e1b52bf317c757..8a966db2840b49a3987ed1dc44e6cbdb1db59045 100644 (file)
@@ -680,6 +680,15 @@ class ComboBox(_core.Control,_core.ItemContainer):
         """
         return _controls_.ComboBox_SetMark(*args, **kwargs)
 
+    def GetMark(*args, **kwargs):
+        """
+        GetMark(self) -> (from, to)
+
+        Gets the positions of the begining and ending of the selection mark in
+        the combobox text field.
+        """
+        return _controls_.ComboBox_GetMark(*args, **kwargs)
+
     def SetStringSelection(*args, **kwargs):
         """
         SetStringSelection(self, String string) -> bool
index cded15894910c72e092397b85a8a61aa4dede643..05177a8cce0f5e3d889a72193225304281a9c3bd 100644 (file)
@@ -1629,6 +1629,34 @@ SWIG_Check_bool(PyObject* obj)
 #define SWIG_From_long PyInt_FromLong
 /*@@*/
 
+
+  static PyObject* t_output_helper(PyObject* target, PyObject* o) {
+    PyObject*   o2;
+    PyObject*   o3;
+    
+    if (!target) {                   
+        target = o;
+    } else if (target == Py_None) {  
+        Py_DECREF(Py_None);
+        target = o;
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
+        o3 = PyTuple_New(1);            
+        PyTuple_SetItem(o3, 0, o);      
+
+        o2 = target;
+        target = PySequence_Concat(o2, o3); 
+        Py_DECREF(o2);                      
+        Py_DECREF(o3);
+    }
+    return target;
+  }
+
+
  static const wxString wxPyGaugeNameStr(wxGaugeNameStr); 
  static const wxString wxPyStaticBitmapNameStr(wxStaticBitmapNameStr); 
  static const wxString wxPyStaticBoxNameStr(wxStaticBoxNameStr); 
@@ -1674,34 +1702,6 @@ static void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
         }
  static const wxString wxPyTextCtrlNameStr(wxTextCtrlNameStr); 
 
-  static PyObject* t_output_helper(PyObject* target, PyObject* o) {
-    PyObject*   o2;
-    PyObject*   o3;
-    
-    if (!target) {                   
-        target = o;
-    } else if (target == Py_None) {  
-        Py_DECREF(Py_None);
-        target = o;
-    } else {
-        if (!PyTuple_Check(target)) {
-            o2 = target;
-            target = PyTuple_New(1);
-            PyTuple_SetItem(target, 0, o2);
-        }            
-        o3 = PyTuple_New(1);            
-        PyTuple_SetItem(o3, 0, o);      
-
-        o2 = target;
-        target = PySequence_Concat(o2, o3); 
-        Py_DECREF(o2);                      
-        Py_DECREF(o3);
-    }
-    return target;
-  }
-
-
-
 SWIGINTERN int 
 SWIG_AsVal_unsigned_SS_long(PyObject* obj, unsigned long* val)
 {
@@ -4787,6 +4787,43 @@ static PyObject *_wrap_ComboBox_SetMark(PyObject *, PyObject *args, PyObject *kw
 }
 
 
+static PyObject *_wrap_ComboBox_GetMark(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxComboBox *arg1 = (wxComboBox *) 0 ;
+    long *arg2 = (long *) 0 ;
+    long *arg3 = (long *) 0 ;
+    long temp2 ;
+    int res2 = 0 ;
+    long temp3 ;
+    int res3 = 0 ;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self", NULL 
+    };
+    
+    arg2 = &temp2; res2 = SWIG_NEWOBJ;
+    arg3 = &temp3; res3 = SWIG_NEWOBJ;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ComboBox_GetMark",kwnames,&obj0)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxComboBox, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        (arg1)->GetSelection(arg2,arg3);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    Py_INCREF(Py_None); resultobj = Py_None;
+    resultobj = t_output_helper(resultobj, ((res2 == SWIG_NEWOBJ) ?
+    SWIG_From_long((*arg2)) : SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, 0)));
+    resultobj = t_output_helper(resultobj, ((res3 == SWIG_NEWOBJ) ?
+    SWIG_From_long((*arg3)) : SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, 0)));
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_ComboBox_SetStringSelection(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -34876,6 +34913,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"ComboBox_GetMark", (PyCFunction) _wrap_ComboBox_GetMark, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS, NULL},
index 45d769786fece71c7a5d94ba0b768f89fc88db10..6ccb1d5b0eabcba7d3852b76d7be70d637241d70 100644 (file)
@@ -2523,6 +2523,9 @@ def InitAllImageHandlers():
 
 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
+PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
+PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
+PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
 BMP_24BPP = _core_.BMP_24BPP
 BMP_8BPP = _core_.BMP_8BPP
 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
@@ -2563,6 +2566,8 @@ IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
+IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
+IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
 
 class ICOHandler(BMPHandler):
     """Proxy of C++ ICOHandler class"""
@@ -9602,18 +9607,45 @@ class Sizer(Object):
             self.Add(*item)
 
     # for backwards compatibility only, please do not use in new code
-    AddWindow     = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
-    AddSizer      = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
-    AddSpacer     = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
-    PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
-    PrependSizer  = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
-    PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
-    InsertWindow  = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
-    InsertSizer   = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
-    InsertSpacer  = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
-    RemoveWindow  = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
-    RemoveSizer   = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
-    RemovePos     = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
+    def AddWindow(self, *args, **kw):
+        """Compatibility alias for `Add`."""
+        return self.Add(*args, **kw)
+    def AddSizer(self, *args, **kw):
+        """Compatibility alias for `Add`."""
+        return self.Add(*args, **kw)
+    def AddSpacer(self, *args, **kw):
+        """Compatibility alias for `Add`."""
+        return self.Add(*args, **kw)
+
+    def PrependWindow(self, *args, **kw):
+        """Compatibility alias for `Prepend`."""
+        return self.Prepend(*args, **kw)
+    def PrependSizer(self, *args, **kw):
+        """Compatibility alias for `Prepend`."""
+        return self.Prepend(*args, **kw)
+    def PrependSpacer(self, *args, **kw):
+        """Compatibility alias for `Prepend`."""
+        return self.Prepend(*args, **kw)
+
+    def InsertWindow(self, *args, **kw):
+        """Compatibility alias for `Insert`."""
+        return self.Insert(*args, **kw)
+    def InsertSizer(self, *args, **kw):
+        """Compatibility alias for `Insert`."""
+        return self.Insert(*args, **kw)
+    def InsertSpacer(self, *args, **kw):
+        """Compatibility alias for `Insert`."""
+        return self.Insert(*args, **kw)
+
+    def RemoveWindow(self, *args, **kw):
+        """Compatibility alias for `Remove`."""
+        return self.Remove(*args, **kw)
+    def RemoveSizer(self, *args, **kw):
+        """Compatibility alias for `Remove`."""
+        return self.Remove(*args, **kw)
+    def RemovePos(self, *args, **kw):
+        """Compatibility alias for `Remove`."""
+        return self.Remove(*args, **kw)
 
 
     def SetDimension(*args, **kwargs):
index ceb3d56e1420ed04ca6b2ec85ec02eba6d24622b..8580d65dea46b4c82f3949f1dcc9e7cb0a1d322a 100644 (file)
@@ -2476,6 +2476,8 @@ static wxBitmap wxImage_ConvertToMonoBitmap(wxImage *self,unsigned char red,unsi
  static const wxString wxPyIMAGE_OPTION_SAMPLESPERPIXEL(wxIMAGE_OPTION_SAMPLESPERPIXEL); 
  static const wxString wxPyIMAGE_OPTION_COMPRESSION(wxIMAGE_OPTION_COMPRESSION); 
  static const wxString wxPyIMAGE_OPTION_IMAGEDESCRIPTOR(wxIMAGE_OPTION_IMAGEDESCRIPTOR); 
+ static const wxString wxPyIMAGE_OPTION_PNG_FORMAT(wxIMAGE_OPTION_PNG_FORMAT); 
+ static const wxString wxPyIMAGE_OPTION_PNG_BITDEPTH(wxIMAGE_OPTION_PNG_BITDEPTH); 
 
 #include <wx/quantize.h>
 
@@ -2921,7 +2923,7 @@ struct wxPySizerItemInfo {
         : window(NULL), sizer(NULL), gotSize(false),
           size(wxDefaultSize), gotPos(false), pos(-1)
     {}
-    
+
     wxWindow* window;
     wxSizer*  sizer;
     bool      gotSize;
@@ -2929,7 +2931,7 @@ struct wxPySizerItemInfo {
     bool      gotPos;
     int       pos;
 };
+
 static wxPySizerItemInfo wxPySizerItemTypeHelper(PyObject* item, bool checkSize, bool checkIdx ) {
 
     wxPySizerItemInfo info;
@@ -2941,12 +2943,12 @@ static wxPySizerItemInfo wxPySizerItemTypeHelper(PyObject* item, bool checkSize,
     if ( ! wxPyConvertSwigPtr(item, (void**)&info.window, wxT("wxWindow")) ) {
         PyErr_Clear();
         info.window = NULL;
-                
+
         // try wxSizer
         if ( ! wxPyConvertSwigPtr(item, (void**)&info.sizer, wxT("wxSizer")) ) {
             PyErr_Clear();
             info.sizer = NULL;
-            
+
             // try wxSize or (w,h)
             if ( checkSize && wxSize_helper(item, &sizePtr)) {
                 info.size = *sizePtr;
@@ -2982,14 +2984,14 @@ static void wxSizer__setOORInfo(wxSizer *self,PyObject *_self){
                 self->SetClientObject(new wxPyOORClientData(_self));
         }
 static wxSizerItem *wxSizer_Add(wxSizer *self,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){
-            
+
             wxPyUserData* data = NULL;
             bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
             if ( userData && (info.window || info.sizer || info.gotSize) )
                 data = new wxPyUserData(userData);
             wxPyEndBlockThreads(blocked);
-            
+
             // Now call the real Add method if a valid item type was found
             if ( info.window )
                 return self->Add(info.window, proportion, flag, border, data);
@@ -3009,7 +3011,7 @@ static wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,int p
             if ( userData && (info.window || info.sizer || info.gotSize) )
                 data = new wxPyUserData(userData);
             wxPyEndBlockThreads(blocked);
-            
+
             // Now call the real Insert method if a valid item type was found
             if ( info.window )
                 return self->Insert(before, info.window, proportion, flag, border, data);
@@ -3029,7 +3031,7 @@ static wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion=
             if ( userData && (info.window || info.sizer || info.gotSize) )
                 data = new wxPyUserData(userData);
             wxPyEndBlockThreads(blocked);
-            
+
             // Now call the real Prepend method if a valid item type was found
             if ( info.window )
                 return self->Prepend(info.window, proportion, flag, border, data);
@@ -3051,7 +3053,7 @@ static bool wxSizer_Remove(wxSizer *self,PyObject *item){
                 return self->Remove(info.sizer);
             else if ( info.gotPos )
                 return self->Remove(info.pos);
-            else 
+            else
                 return false;
         }
 static bool wxSizer_Detach(wxSizer *self,PyObject *item){
@@ -3064,7 +3066,7 @@ static bool wxSizer_Detach(wxSizer *self,PyObject *item){
                 return self->Detach(info.sizer);
             else if ( info.gotPos )
                 return self->Detach(info.pos);
-            else 
+            else
                 return false;
         }
 static wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item){
@@ -3112,9 +3114,9 @@ static bool wxSizer_IsShown(wxSizer *self,PyObject *item){
             bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, false);
             wxPyEndBlockThreads(blocked);
-            if ( info.window ) 
+            if ( info.window )
                 return self->IsShown(info.window);
-            else if ( info.sizer ) 
+            else if ( info.sizer )
                 return self->IsShown(info.sizer);
             else if ( info.gotPos )
                 return self->IsShown(info.pos);
@@ -3122,7 +3124,7 @@ static bool wxSizer_IsShown(wxSizer *self,PyObject *item){
                 return false;
         }
 
-// See pyclasses.h    
+// See pyclasses.h
 IMP_PYCALLBACK___pure(wxPySizer, wxSizer, RecalcSizes);
 IMP_PYCALLBACK_wxSize__pure(wxPySizer, wxSizer, CalcMin);
 IMPLEMENT_DYNAMIC_CLASS(wxPySizer, wxSizer);
@@ -13659,6 +13661,46 @@ static PyObject *_wrap_IMAGE_OPTION_IMAGEDESCRIPTOR_get(void) {
 }
 
 
+static int _wrap_IMAGE_OPTION_PNG_FORMAT_set(PyObject *) {
+    PyErr_SetString(PyExc_TypeError,"Variable IMAGE_OPTION_PNG_FORMAT is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_IMAGE_OPTION_PNG_FORMAT_get(void) {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyIMAGE_OPTION_PNG_FORMAT)->c_str(), (&wxPyIMAGE_OPTION_PNG_FORMAT)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyIMAGE_OPTION_PNG_FORMAT)->c_str(), (&wxPyIMAGE_OPTION_PNG_FORMAT)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
+static int _wrap_IMAGE_OPTION_PNG_BITDEPTH_set(PyObject *) {
+    PyErr_SetString(PyExc_TypeError,"Variable IMAGE_OPTION_PNG_BITDEPTH is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_IMAGE_OPTION_PNG_BITDEPTH_get(void) {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyIMAGE_OPTION_PNG_BITDEPTH)->c_str(), (&wxPyIMAGE_OPTION_PNG_BITDEPTH)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyIMAGE_OPTION_PNG_BITDEPTH)->c_str(), (&wxPyIMAGE_OPTION_PNG_BITDEPTH)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
 static PyObject *_wrap_new_BMPHandler(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxBMPHandler *result;
@@ -48946,6 +48988,17 @@ SWIGEXPORT(void) SWIG_init(void) {
     SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_SAMPLESPERPIXEL",_wrap_IMAGE_OPTION_SAMPLESPERPIXEL_get, _wrap_IMAGE_OPTION_SAMPLESPERPIXEL_set);
     SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_COMPRESSION",_wrap_IMAGE_OPTION_COMPRESSION_get, _wrap_IMAGE_OPTION_COMPRESSION_set);
     SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_IMAGEDESCRIPTOR",_wrap_IMAGE_OPTION_IMAGEDESCRIPTOR_get, _wrap_IMAGE_OPTION_IMAGEDESCRIPTOR_set);
+    SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_PNG_FORMAT",_wrap_IMAGE_OPTION_PNG_FORMAT_get, _wrap_IMAGE_OPTION_PNG_FORMAT_set);
+    SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_PNG_BITDEPTH",_wrap_IMAGE_OPTION_PNG_BITDEPTH_get, _wrap_IMAGE_OPTION_PNG_BITDEPTH_set);
+    {
+        PyDict_SetItemString(d,"PNG_TYPE_COLOUR", SWIG_From_int((int)(wxPNG_TYPE_COLOUR))); 
+    }
+    {
+        PyDict_SetItemString(d,"PNG_TYPE_GREY", SWIG_From_int((int)(wxPNG_TYPE_GREY))); 
+    }
+    {
+        PyDict_SetItemString(d,"PNG_TYPE_GREY_RED", SWIG_From_int((int)(wxPNG_TYPE_GREY_RED))); 
+    }
     {
         PyDict_SetItemString(d,"BMP_24BPP", SWIG_From_int((int)(wxBMP_24BPP))); 
     }
index 3c8885502cbe75cfa3cbcf24ed197ca8a7830f43..89748cd19d316ef4a541d79161054f75edfa334d 100644 (file)
@@ -4427,6 +4427,14 @@ class ImageList(_core.Object):
         """AddIcon(self, Icon icon) -> int"""
         return _gdi_.ImageList_AddIcon(*args, **kwargs)
 
+    def GetBitmap(*args, **kwargs):
+        """GetBitmap(self, int index) -> Bitmap"""
+        return _gdi_.ImageList_GetBitmap(*args, **kwargs)
+
+    def GetIcon(*args, **kwargs):
+        """GetIcon(self, int index) -> Icon"""
+        return _gdi_.ImageList_GetIcon(*args, **kwargs)
+
     def Replace(*args, **kwargs):
         """Replace(self, int index, Bitmap bitmap) -> bool"""
         return _gdi_.ImageList_Replace(*args, **kwargs)
index 6f142e5360bf815853590a4a07a9082f75a41cd5..0726c79864c75009f55af8ae0b7985d96812b3bc 100644 (file)
@@ -18260,6 +18260,78 @@ static PyObject *_wrap_ImageList_AddIcon(PyObject *, PyObject *args, PyObject *k
 }
 
 
+static PyObject *_wrap_ImageList_GetBitmap(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxImageList *arg1 = (wxImageList *) 0 ;
+    int arg2 ;
+    SwigValueWrapper<wxBitmap > result;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "index", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ImageList_GetBitmap",kwnames,&obj0,&obj1)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxImageList, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = ((wxImageList const *)arg1)->GetBitmap(arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        wxBitmap * resultptr;
+        resultptr = new wxBitmap((wxBitmap &)(result));
+        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxBitmap, 1);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_ImageList_GetIcon(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxImageList *arg1 = (wxImageList *) 0 ;
+    int arg2 ;
+    wxIcon result;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "index", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ImageList_GetIcon",kwnames,&obj0,&obj1)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxImageList, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = ((wxImageList const *)arg1)->GetIcon(arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        wxIcon * resultptr;
+        resultptr = new wxIcon((wxIcon &)(result));
+        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxIcon, 1);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_ImageList_Replace(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxImageList *arg1 = (wxImageList *) 0 ;
@@ -20841,6 +20913,8 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ImageList_Add", (PyCFunction) _wrap_ImageList_Add, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_AddWithColourMask", (PyCFunction) _wrap_ImageList_AddWithColourMask, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_AddIcon", (PyCFunction) _wrap_ImageList_AddIcon, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"ImageList_GetBitmap", (PyCFunction) _wrap_ImageList_GetBitmap, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"ImageList_GetIcon", (PyCFunction) _wrap_ImageList_GetIcon, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_Replace", (PyCFunction) _wrap_ImageList_Replace, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_Draw", (PyCFunction) _wrap_ImageList_Draw, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_GetImageCount", (PyCFunction) _wrap_ImageList_GetImageCount, METH_VARARGS | METH_KEYWORDS, NULL},
index d0cb482bff2775e27ec03ae15c5b71fac9e458bb..a16136b839d427988c30da495d7223f23c1f69ce 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@*/
@@ -19308,53 +19319,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;
 }
 
index 1aa383161d125b584f4e4c9b8cd175936a8d7286..a28fb1ec524d6fc4486a3c9c68fcffd53e66e4b3 100644 (file)
@@ -3984,6 +3984,14 @@ class PrintData(_core.Object):
         return _windows_.PrintData_SetFilename(*args, **kwargs)
 
     def __nonzero__(self): return self.Ok() 
+    def GetPrivData(*args, **kwargs):
+        """GetPrivData(self) -> PyObject"""
+        return _windows_.PrintData_GetPrivData(*args, **kwargs)
+
+    def SetPrivData(*args, **kwargs):
+        """SetPrivData(self, PyObject data)"""
+        return _windows_.PrintData_SetPrivData(*args, **kwargs)
+
     def GetPrinterCommand(*args, **kwargs):
         """GetPrinterCommand(self) -> String"""
         return _windows_.PrintData_GetPrinterCommand(*args, **kwargs)
index 8cc77f5f19e4638edb28563cf14c5819d16af45b..61f361ffea8dcf0474c7a6f07d4acf0ddef345e4 100644 (file)
@@ -2345,6 +2345,25 @@ IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, HasTransparentBackgro
 
  static const wxString wxPyPrintoutTitleStr(wxT("Printout")); 
  static const wxString wxPyPreviewCanvasNameStr(wxT("previewcanvas")); 
+static PyObject *wxPrintData_GetPrivData(wxPrintData *self){
+            PyObject* data;
+            bool blocked = wxPyBeginBlockThreads();
+            data = PyString_FromStringAndSize(self->GetPrivData(),
+                                              self->GetPrivDataLen());
+            wxPyEndBlockThreads(blocked);
+            return data;
+        }
+static void wxPrintData_SetPrivData(wxPrintData *self,PyObject *data){
+            if (! PyString_Check(data)) {
+                wxPyBLOCK_THREADS(PyErr_SetString(PyExc_TypeError,
+                                                  "Expected string object"));
+                return /* NULL */ ;
+            }
+
+            bool blocked = wxPyBeginBlockThreads();
+            self->SetPrivData(PyString_AS_STRING(data), PyString_GET_SIZE(data));
+            wxPyEndBlockThreads(blocked);
+        }
 
 
 IMPLEMENT_ABSTRACT_CLASS(wxPyPrintout, wxPrintout);
@@ -21115,6 +21134,60 @@ static PyObject *_wrap_PrintData_SetFilename(PyObject *, PyObject *args, PyObjec
 }
 
 
+static PyObject *_wrap_PrintData_GetPrivData(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxPrintData *arg1 = (wxPrintData *) 0 ;
+    PyObject *result;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PrintData_GetPrivData",kwnames,&obj0)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxPrintData, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (PyObject *)wxPrintData_GetPrivData(arg1);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = result;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_PrintData_SetPrivData(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxPrintData *arg1 = (wxPrintData *) 0 ;
+    PyObject *arg2 = (PyObject *) 0 ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "data", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintData_SetPrivData",kwnames,&obj0,&obj1)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxPrintData, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    arg2 = obj1;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        wxPrintData_SetPrivData(arg1,arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_PrintData_GetPrinterCommand(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxPrintData *arg1 = (wxPrintData *) 0 ;
@@ -28108,6 +28181,8 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"PrintData_SetPrintMode", (PyCFunction) _wrap_PrintData_SetPrintMode, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetFilename", (PyCFunction) _wrap_PrintData_GetFilename, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_SetFilename", (PyCFunction) _wrap_PrintData_SetFilename, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"PrintData_GetPrivData", (PyCFunction) _wrap_PrintData_GetPrivData, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"PrintData_SetPrivData", (PyCFunction) _wrap_PrintData_SetPrivData, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetPrinterCommand", (PyCFunction) _wrap_PrintData_GetPrinterCommand, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetPrinterOptions", (PyCFunction) _wrap_PrintData_GetPrinterOptions, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetPreviewCommand", (PyCFunction) _wrap_PrintData_GetPreviewCommand, METH_VARARGS | METH_KEYWORDS, NULL},
index a5686a40a2a7b30d47f7cee5846169b80e5c15b2..ef0a2172adf2fa21f2fbd83724ef92399228d8c9 100644 (file)
@@ -2523,6 +2523,9 @@ def InitAllImageHandlers():
 
 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
+PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
+PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
+PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
 BMP_24BPP = _core_.BMP_24BPP
 BMP_8BPP = _core_.BMP_8BPP
 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
@@ -2563,6 +2566,8 @@ IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
+IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
+IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
 
 class ICOHandler(BMPHandler):
     """Proxy of C++ ICOHandler class"""
@@ -9615,18 +9620,45 @@ class Sizer(Object):
             self.Add(*item)
 
     # for backwards compatibility only, please do not use in new code
-    AddWindow     = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
-    AddSizer      = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
-    AddSpacer     = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
-    PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
-    PrependSizer  = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
-    PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
-    InsertWindow  = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
-    InsertSizer   = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
-    InsertSpacer  = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
-    RemoveWindow  = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
-    RemoveSizer   = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
-    RemovePos     = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
+    def AddWindow(self, *args, **kw):
+        """Compatibility alias for `Add`."""
+        return self.Add(*args, **kw)
+    def AddSizer(self, *args, **kw):
+        """Compatibility alias for `Add`."""
+        return self.Add(*args, **kw)
+    def AddSpacer(self, *args, **kw):
+        """Compatibility alias for `Add`."""
+        return self.Add(*args, **kw)
+
+    def PrependWindow(self, *args, **kw):
+        """Compatibility alias for `Prepend`."""
+        return self.Prepend(*args, **kw)
+    def PrependSizer(self, *args, **kw):
+        """Compatibility alias for `Prepend`."""
+        return self.Prepend(*args, **kw)
+    def PrependSpacer(self, *args, **kw):
+        """Compatibility alias for `Prepend`."""
+        return self.Prepend(*args, **kw)
+
+    def InsertWindow(self, *args, **kw):
+        """Compatibility alias for `Insert`."""
+        return self.Insert(*args, **kw)
+    def InsertSizer(self, *args, **kw):
+        """Compatibility alias for `Insert`."""
+        return self.Insert(*args, **kw)
+    def InsertSpacer(self, *args, **kw):
+        """Compatibility alias for `Insert`."""
+        return self.Insert(*args, **kw)
+
+    def RemoveWindow(self, *args, **kw):
+        """Compatibility alias for `Remove`."""
+        return self.Remove(*args, **kw)
+    def RemoveSizer(self, *args, **kw):
+        """Compatibility alias for `Remove`."""
+        return self.Remove(*args, **kw)
+    def RemovePos(self, *args, **kw):
+        """Compatibility alias for `Remove`."""
+        return self.Remove(*args, **kw)
 
 
     def SetDimension(*args, **kwargs):
index e5fba53a908646a0d0eda367eafaba2a27e65f66..4a335600ec8c55d3fc551f5397a7680ba6c317e6 100644 (file)
@@ -2476,6 +2476,8 @@ static wxBitmap wxImage_ConvertToMonoBitmap(wxImage *self,unsigned char red,unsi
  static const wxString wxPyIMAGE_OPTION_SAMPLESPERPIXEL(wxIMAGE_OPTION_SAMPLESPERPIXEL); 
  static const wxString wxPyIMAGE_OPTION_COMPRESSION(wxIMAGE_OPTION_COMPRESSION); 
  static const wxString wxPyIMAGE_OPTION_IMAGEDESCRIPTOR(wxIMAGE_OPTION_IMAGEDESCRIPTOR); 
+ static const wxString wxPyIMAGE_OPTION_PNG_FORMAT(wxIMAGE_OPTION_PNG_FORMAT); 
+ static const wxString wxPyIMAGE_OPTION_PNG_BITDEPTH(wxIMAGE_OPTION_PNG_BITDEPTH); 
 
 #include <wx/quantize.h>
 
@@ -2905,7 +2907,7 @@ struct wxPySizerItemInfo {
         : window(NULL), sizer(NULL), gotSize(false),
           size(wxDefaultSize), gotPos(false), pos(-1)
     {}
-    
+
     wxWindow* window;
     wxSizer*  sizer;
     bool      gotSize;
@@ -2913,7 +2915,7 @@ struct wxPySizerItemInfo {
     bool      gotPos;
     int       pos;
 };
+
 static wxPySizerItemInfo wxPySizerItemTypeHelper(PyObject* item, bool checkSize, bool checkIdx ) {
 
     wxPySizerItemInfo info;
@@ -2925,12 +2927,12 @@ static wxPySizerItemInfo wxPySizerItemTypeHelper(PyObject* item, bool checkSize,
     if ( ! wxPyConvertSwigPtr(item, (void**)&info.window, wxT("wxWindow")) ) {
         PyErr_Clear();
         info.window = NULL;
-                
+
         // try wxSizer
         if ( ! wxPyConvertSwigPtr(item, (void**)&info.sizer, wxT("wxSizer")) ) {
             PyErr_Clear();
             info.sizer = NULL;
-            
+
             // try wxSize or (w,h)
             if ( checkSize && wxSize_helper(item, &sizePtr)) {
                 info.size = *sizePtr;
@@ -2966,14 +2968,14 @@ static void wxSizer__setOORInfo(wxSizer *self,PyObject *_self){
                 self->SetClientObject(new wxPyOORClientData(_self));
         }
 static wxSizerItem *wxSizer_Add(wxSizer *self,PyObject *item,int proportion=0,int flag=0,int border=0,PyObject *userData=NULL){
-            
+
             wxPyUserData* data = NULL;
             bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
             if ( userData && (info.window || info.sizer || info.gotSize) )
                 data = new wxPyUserData(userData);
             wxPyEndBlockThreads(blocked);
-            
+
             // Now call the real Add method if a valid item type was found
             if ( info.window )
                 return self->Add(info.window, proportion, flag, border, data);
@@ -2993,7 +2995,7 @@ static wxSizerItem *wxSizer_Insert(wxSizer *self,int before,PyObject *item,int p
             if ( userData && (info.window || info.sizer || info.gotSize) )
                 data = new wxPyUserData(userData);
             wxPyEndBlockThreads(blocked);
-            
+
             // Now call the real Insert method if a valid item type was found
             if ( info.window )
                 return self->Insert(before, info.window, proportion, flag, border, data);
@@ -3013,7 +3015,7 @@ static wxSizerItem *wxSizer_Prepend(wxSizer *self,PyObject *item,int proportion=
             if ( userData && (info.window || info.sizer || info.gotSize) )
                 data = new wxPyUserData(userData);
             wxPyEndBlockThreads(blocked);
-            
+
             // Now call the real Prepend method if a valid item type was found
             if ( info.window )
                 return self->Prepend(info.window, proportion, flag, border, data);
@@ -3035,7 +3037,7 @@ static bool wxSizer_Remove(wxSizer *self,PyObject *item){
                 return self->Remove(info.sizer);
             else if ( info.gotPos )
                 return self->Remove(info.pos);
-            else 
+            else
                 return false;
         }
 static bool wxSizer_Detach(wxSizer *self,PyObject *item){
@@ -3048,7 +3050,7 @@ static bool wxSizer_Detach(wxSizer *self,PyObject *item){
                 return self->Detach(info.sizer);
             else if ( info.gotPos )
                 return self->Detach(info.pos);
-            else 
+            else
                 return false;
         }
 static wxSizerItem *wxSizer_GetItem(wxSizer *self,PyObject *item){
@@ -3096,9 +3098,9 @@ static bool wxSizer_IsShown(wxSizer *self,PyObject *item){
             bool blocked = wxPyBeginBlockThreads();
             wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, false);
             wxPyEndBlockThreads(blocked);
-            if ( info.window ) 
+            if ( info.window )
                 return self->IsShown(info.window);
-            else if ( info.sizer ) 
+            else if ( info.sizer )
                 return self->IsShown(info.sizer);
             else if ( info.gotPos )
                 return self->IsShown(info.pos);
@@ -3106,7 +3108,7 @@ static bool wxSizer_IsShown(wxSizer *self,PyObject *item){
                 return false;
         }
 
-// See pyclasses.h    
+// See pyclasses.h
 IMP_PYCALLBACK___pure(wxPySizer, wxSizer, RecalcSizes);
 IMP_PYCALLBACK_wxSize__pure(wxPySizer, wxSizer, CalcMin);
 IMPLEMENT_DYNAMIC_CLASS(wxPySizer, wxSizer);
@@ -13643,6 +13645,46 @@ static PyObject *_wrap_IMAGE_OPTION_IMAGEDESCRIPTOR_get(void) {
 }
 
 
+static int _wrap_IMAGE_OPTION_PNG_FORMAT_set(PyObject *) {
+    PyErr_SetString(PyExc_TypeError,"Variable IMAGE_OPTION_PNG_FORMAT is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_IMAGE_OPTION_PNG_FORMAT_get(void) {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyIMAGE_OPTION_PNG_FORMAT)->c_str(), (&wxPyIMAGE_OPTION_PNG_FORMAT)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyIMAGE_OPTION_PNG_FORMAT)->c_str(), (&wxPyIMAGE_OPTION_PNG_FORMAT)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
+static int _wrap_IMAGE_OPTION_PNG_BITDEPTH_set(PyObject *) {
+    PyErr_SetString(PyExc_TypeError,"Variable IMAGE_OPTION_PNG_BITDEPTH is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_IMAGE_OPTION_PNG_BITDEPTH_get(void) {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyIMAGE_OPTION_PNG_BITDEPTH)->c_str(), (&wxPyIMAGE_OPTION_PNG_BITDEPTH)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyIMAGE_OPTION_PNG_BITDEPTH)->c_str(), (&wxPyIMAGE_OPTION_PNG_BITDEPTH)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
 static PyObject *_wrap_new_BMPHandler(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxBMPHandler *result;
@@ -48998,6 +49040,17 @@ SWIGEXPORT(void) SWIG_init(void) {
     SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_SAMPLESPERPIXEL",_wrap_IMAGE_OPTION_SAMPLESPERPIXEL_get, _wrap_IMAGE_OPTION_SAMPLESPERPIXEL_set);
     SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_COMPRESSION",_wrap_IMAGE_OPTION_COMPRESSION_get, _wrap_IMAGE_OPTION_COMPRESSION_set);
     SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_IMAGEDESCRIPTOR",_wrap_IMAGE_OPTION_IMAGEDESCRIPTOR_get, _wrap_IMAGE_OPTION_IMAGEDESCRIPTOR_set);
+    SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_PNG_FORMAT",_wrap_IMAGE_OPTION_PNG_FORMAT_get, _wrap_IMAGE_OPTION_PNG_FORMAT_set);
+    SWIG_addvarlink(SWIG_globals,(char*)"IMAGE_OPTION_PNG_BITDEPTH",_wrap_IMAGE_OPTION_PNG_BITDEPTH_get, _wrap_IMAGE_OPTION_PNG_BITDEPTH_set);
+    {
+        PyDict_SetItemString(d,"PNG_TYPE_COLOUR", SWIG_From_int((int)(wxPNG_TYPE_COLOUR))); 
+    }
+    {
+        PyDict_SetItemString(d,"PNG_TYPE_GREY", SWIG_From_int((int)(wxPNG_TYPE_GREY))); 
+    }
+    {
+        PyDict_SetItemString(d,"PNG_TYPE_GREY_RED", SWIG_From_int((int)(wxPNG_TYPE_GREY_RED))); 
+    }
     {
         PyDict_SetItemString(d,"BMP_24BPP", SWIG_From_int((int)(wxBMP_24BPP))); 
     }
index e15edfdcce242bdd570370ca503dc80cabdea148..9d77970153c0d5ff6d20bb32058e4c74316c60de 100644 (file)
@@ -4562,6 +4562,14 @@ class ImageList(_core.Object):
         """AddIcon(self, Icon icon) -> int"""
         return _gdi_.ImageList_AddIcon(*args, **kwargs)
 
+    def GetBitmap(*args, **kwargs):
+        """GetBitmap(self, int index) -> Bitmap"""
+        return _gdi_.ImageList_GetBitmap(*args, **kwargs)
+
+    def GetIcon(*args, **kwargs):
+        """GetIcon(self, int index) -> Icon"""
+        return _gdi_.ImageList_GetIcon(*args, **kwargs)
+
     def Replace(*args, **kwargs):
         """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
         return _gdi_.ImageList_Replace(*args, **kwargs)
index c0a14f466ad199dd7de21fca295b8bcad5cfb886..8f4bcebc030bcaa253781b5633dd547103a28093 100644 (file)
@@ -19187,6 +19187,78 @@ static PyObject *_wrap_ImageList_AddIcon(PyObject *, PyObject *args, PyObject *k
 }
 
 
+static PyObject *_wrap_ImageList_GetBitmap(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxImageList *arg1 = (wxImageList *) 0 ;
+    int arg2 ;
+    SwigValueWrapper<wxBitmap > result;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "index", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ImageList_GetBitmap",kwnames,&obj0,&obj1)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxImageList, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = ((wxImageList const *)arg1)->GetBitmap(arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        wxBitmap * resultptr;
+        resultptr = new wxBitmap((wxBitmap &)(result));
+        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxBitmap, 1);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_ImageList_GetIcon(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxImageList *arg1 = (wxImageList *) 0 ;
+    int arg2 ;
+    wxIcon result;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "index", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ImageList_GetIcon",kwnames,&obj0,&obj1)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxImageList, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        arg2 = (int)(SWIG_As_int(obj1)); 
+        if (SWIG_arg_fail(2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = ((wxImageList const *)arg1)->GetIcon(arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        wxIcon * resultptr;
+        resultptr = new wxIcon((wxIcon &)(result));
+        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxIcon, 1);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_ImageList_Replace(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxImageList *arg1 = (wxImageList *) 0 ;
@@ -21812,6 +21884,8 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ImageList_Add", (PyCFunction) _wrap_ImageList_Add, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_AddWithColourMask", (PyCFunction) _wrap_ImageList_AddWithColourMask, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_AddIcon", (PyCFunction) _wrap_ImageList_AddIcon, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"ImageList_GetBitmap", (PyCFunction) _wrap_ImageList_GetBitmap, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"ImageList_GetIcon", (PyCFunction) _wrap_ImageList_GetIcon, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_Replace", (PyCFunction) _wrap_ImageList_Replace, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_Draw", (PyCFunction) _wrap_ImageList_Draw, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"ImageList_GetImageCount", (PyCFunction) _wrap_ImageList_GetImageCount, METH_VARARGS | METH_KEYWORDS, NULL},
index 07470dba1ba4f785dc3d82c8943f12bef818a244..4dfe42e4c359b077acdeef2a3b57207fa5288cbf 100644 (file)
@@ -2515,6 +2515,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
 /*@c:\\PROJECTS\\SWIG-cvs\\Lib\\python\\pymacros.swg,66,SWIG_define@*/
@@ -19299,53 +19310,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;
 }
 
index 26c1bfb6d5e8edd93a78f40997acf2a93fd2c27c..b8434284e35605a24e67601e4e545f97bc17f04a 100644 (file)
@@ -4001,6 +4001,14 @@ class PrintData(_core.Object):
         return _windows_.PrintData_SetFilename(*args, **kwargs)
 
     def __nonzero__(self): return self.Ok() 
+    def GetPrivData(*args, **kwargs):
+        """GetPrivData(self) -> PyObject"""
+        return _windows_.PrintData_GetPrivData(*args, **kwargs)
+
+    def SetPrivData(*args, **kwargs):
+        """SetPrivData(self, PyObject data)"""
+        return _windows_.PrintData_SetPrivData(*args, **kwargs)
+
     def GetPrinterCommand(*args, **kwargs):
         """GetPrinterCommand(self) -> String"""
         return _windows_.PrintData_GetPrinterCommand(*args, **kwargs)
index 1f348be05fe885b3f34579aaf0f2d960eb25ef27..34904540272ad35637d3abce18f95c7a668f6ceb 100644 (file)
@@ -2345,6 +2345,25 @@ IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, HasTransparentBackgro
 
  static const wxString wxPyPrintoutTitleStr(wxT("Printout")); 
  static const wxString wxPyPreviewCanvasNameStr(wxT("previewcanvas")); 
+static PyObject *wxPrintData_GetPrivData(wxPrintData *self){
+            PyObject* data;
+            bool blocked = wxPyBeginBlockThreads();
+            data = PyString_FromStringAndSize(self->GetPrivData(),
+                                              self->GetPrivDataLen());
+            wxPyEndBlockThreads(blocked);
+            return data;
+        }
+static void wxPrintData_SetPrivData(wxPrintData *self,PyObject *data){
+            if (! PyString_Check(data)) {
+                wxPyBLOCK_THREADS(PyErr_SetString(PyExc_TypeError,
+                                                  "Expected string object"));
+                return /* NULL */ ;
+            }
+
+            bool blocked = wxPyBeginBlockThreads();
+            self->SetPrivData(PyString_AS_STRING(data), PyString_GET_SIZE(data));
+            wxPyEndBlockThreads(blocked);
+        }
 
 
 IMPLEMENT_ABSTRACT_CLASS(wxPyPrintout, wxPrintout);
@@ -21263,6 +21282,60 @@ static PyObject *_wrap_PrintData_SetFilename(PyObject *, PyObject *args, PyObjec
 }
 
 
+static PyObject *_wrap_PrintData_GetPrivData(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxPrintData *arg1 = (wxPrintData *) 0 ;
+    PyObject *result;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PrintData_GetPrivData",kwnames,&obj0)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxPrintData, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (PyObject *)wxPrintData_GetPrivData(arg1);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = result;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
+static PyObject *_wrap_PrintData_SetPrivData(PyObject *, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxPrintData *arg1 = (wxPrintData *) 0 ;
+    PyObject *arg2 = (PyObject *) 0 ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "data", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintData_SetPrivData",kwnames,&obj0,&obj1)) goto fail;
+    SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxPrintData, SWIG_POINTER_EXCEPTION | 0);
+    if (SWIG_arg_fail(1)) SWIG_fail;
+    arg2 = obj1;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        wxPrintData_SetPrivData(arg1,arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_PrintData_GetPrinterCommand(PyObject *, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxPrintData *arg1 = (wxPrintData *) 0 ;
@@ -28261,6 +28334,8 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"PrintData_SetPrintMode", (PyCFunction) _wrap_PrintData_SetPrintMode, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetFilename", (PyCFunction) _wrap_PrintData_GetFilename, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_SetFilename", (PyCFunction) _wrap_PrintData_SetFilename, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"PrintData_GetPrivData", (PyCFunction) _wrap_PrintData_GetPrivData, METH_VARARGS | METH_KEYWORDS, NULL},
+        { (char *)"PrintData_SetPrivData", (PyCFunction) _wrap_PrintData_SetPrivData, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetPrinterCommand", (PyCFunction) _wrap_PrintData_GetPrinterCommand, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetPrinterOptions", (PyCFunction) _wrap_PrintData_GetPrinterOptions, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"PrintData_GetPreviewCommand", (PyCFunction) _wrap_PrintData_GetPreviewCommand, METH_VARARGS | METH_KEYWORDS, NULL},