]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/iewin/iewin.cpp
Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth
[wxWidgets.git] / wxPython / contrib / iewin / iewin.cpp
index ea84cf4f8e166c6b68a6f9229bc52d1c4e06c1e6..11fb5ef617497d6ec3095ee33b922b7fbd6b3404 100644 (file)
@@ -57,6 +57,7 @@ extern PyObject *SWIG_newvarlink(void);
 
 #include "wxPython.h"
 #include "IEHtmlWin.h"
+#include "pyistream.h"
 
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
@@ -150,8 +151,8 @@ static PyObject *_wrap_new_wxMSHTMLEvent(PyObject *self, PyObject *args, PyObjec
     return _resultobj;
 }
 
-#define wxMSHTMLEvent_GetText(_swigobj)  (_swigobj->GetText())
-static PyObject *_wrap_wxMSHTMLEvent_GetText(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMSHTMLEvent_GetText1(_swigobj)  (_swigobj->GetText1())
+static PyObject *_wrap_wxMSHTMLEvent_GetText1(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxString * _result;
     wxMSHTMLEvent * _arg0;
@@ -159,18 +160,18 @@ static PyObject *_wrap_wxMSHTMLEvent_GetText(PyObject *self, PyObject *args, PyO
     char *_kwnames[] = { "self", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMSHTMLEvent_GetText",_kwnames,&_argo0)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMSHTMLEvent_GetText1",_kwnames,&_argo0)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMSHTMLEvent_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMSHTMLEvent_GetText. Expected _wxMSHTMLEvent_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMSHTMLEvent_GetText1. Expected _wxMSHTMLEvent_p.");
         return NULL;
         }
     }
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = new wxString (wxMSHTMLEvent_GetText(_arg0));
+    _result = new wxString (wxMSHTMLEvent_GetText1(_arg0));
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
@@ -412,6 +413,55 @@ static PyObject *_wrap_wxIEHtmlWin_LoadString(PyObject *self, PyObject *args, Py
     return _resultobj;
 }
 
+#define wxIEHtmlWin_LoadStream(_swigobj,_swigarg0)  (_swigobj->LoadStream(_swigarg0))
+static PyObject *_wrap_wxIEHtmlWin_LoadStream(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    bool  _result;
+    wxIEHtmlWin * _arg0;
+    wxInputStream * _arg1;
+    PyObject * _argo0 = 0;
+    wxPyInputStream * temp;
+    bool  created;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","is", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIEHtmlWin_LoadStream",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_LoadStream. Expected _wxIEHtmlWin_p.");
+        return NULL;
+        }
+    }
+{
+    if (SWIG_GetPtrObj(_obj1, (void **) &temp, "_wxPyInputStream_p") == 0) {
+        _arg1 = temp->m_wxis;
+        created = FALSE;
+    } else {
+        _arg1 = wxPyCBInputStream_create(_obj1, FALSE);
+        if (_arg1 == NULL) {
+            PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p or Python file-like object.");
+            return NULL;
+        }
+        created = TRUE;
+    }
+}
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxIEHtmlWin_LoadStream(_arg0,_arg1);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    _resultobj = Py_BuildValue("i",_result);
+{
+    if (created)
+        delete _arg1;
+}
+    return _resultobj;
+}
+
 #define wxIEHtmlWin_SetCharset(_swigobj,_swigarg0)  (_swigobj->SetCharset(_swigarg0))
 static PyObject *_wrap_wxIEHtmlWin_SetCharset(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -771,12 +821,13 @@ static PyMethodDef iewincMethods[] = {
         { "wxIEHtmlWin_GetEditMode", (PyCFunction) _wrap_wxIEHtmlWin_GetEditMode, METH_VARARGS | METH_KEYWORDS },
         { "wxIEHtmlWin_SetEditMode", (PyCFunction) _wrap_wxIEHtmlWin_SetEditMode, METH_VARARGS | METH_KEYWORDS },
         { "wxIEHtmlWin_SetCharset", (PyCFunction) _wrap_wxIEHtmlWin_SetCharset, METH_VARARGS | METH_KEYWORDS },
+        { "wxIEHtmlWin_LoadStream", (PyCFunction) _wrap_wxIEHtmlWin_LoadStream, METH_VARARGS | METH_KEYWORDS },
         { "wxIEHtmlWin_LoadString", (PyCFunction) _wrap_wxIEHtmlWin_LoadString, METH_VARARGS | METH_KEYWORDS },
         { "wxIEHtmlWin_LoadUrl", (PyCFunction) _wrap_wxIEHtmlWin_LoadUrl, METH_VARARGS | METH_KEYWORDS },
         { "new_wxIEHtmlWin", (PyCFunction) _wrap_new_wxIEHtmlWin, METH_VARARGS | METH_KEYWORDS },
         { "wxMSHTMLEvent_GetLong2", (PyCFunction) _wrap_wxMSHTMLEvent_GetLong2, METH_VARARGS | METH_KEYWORDS },
         { "wxMSHTMLEvent_GetLong1", (PyCFunction) _wrap_wxMSHTMLEvent_GetLong1, METH_VARARGS | METH_KEYWORDS },
-        { "wxMSHTMLEvent_GetText", (PyCFunction) _wrap_wxMSHTMLEvent_GetText, METH_VARARGS | METH_KEYWORDS },
+        { "wxMSHTMLEvent_GetText1", (PyCFunction) _wrap_wxMSHTMLEvent_GetText1, METH_VARARGS | METH_KEYWORDS },
         { "new_wxMSHTMLEvent", (PyCFunction) _wrap_new_wxMSHTMLEvent, METH_VARARGS | METH_KEYWORDS },
         { NULL, NULL }
 };