]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/html.cpp
typo fixed
[wxWidgets.git] / wxPython / src / msw / html.cpp
index 60a70c5d8f73946550da07b5a03acdfef75ed765..b2d3b303f01e4d40da612f47f3d401128c5a2ae0 100644 (file)
@@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void);
 
 #define SWIG_name    "htmlc"
 
-#include "helpers.h"
+#include "export.h"
 #include <wx/html/htmlwin.h>
 #include <wx/html/htmprint.h>
 #include <wx/image.h>
@@ -113,12 +113,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
 
 static char* wxStringErrorMsg = "string type is required for parameter";
 
-//  #ifdef __WXMSW__
-//  wxString wxPyEmptyStr("");
-//  wxPoint wxPyDefaultPosition(wxDefaultPosition);
-//  wxSize wxPyDefaultSize(wxDefaultSize);
-//  #endif
-
 class wxPyHtmlTagHandler : public wxHtmlTagHandler {
 public:
     wxPyHtmlTagHandler() : wxHtmlTagHandler() {};
@@ -163,12 +157,14 @@ public:
     }
 
     void OnExit() {
+        bool doSave = wxPyRestoreThread();
         Py_DECREF(m_tagHandlerClass);
         m_tagHandlerClass = NULL;
         for (size_t x=0; x < m_objArray.GetCount(); x++) {
             PyObject* obj = (PyObject*)m_objArray.Item(x);
             Py_DECREF(obj);
         }
+        wxPySaveThread(doSave);
     };
 
     void FillHandlersTable(wxHtmlWinParser *parser) {
@@ -226,9 +222,10 @@ IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle);
 
  void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
     bool doSave = wxPyRestoreThread();
-    if (m_myInst.findCallback("OnLinkClicked")) {
-        PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo");
-        m_myInst.callCallback(Py_BuildValue("(O)", obj));
+    if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) {
+        PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0);
+        wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
+        Py_DECREF(obj);
     }
     else
         wxHtmlWindow::OnLinkClicked(link);
@@ -3951,8 +3948,8 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject
     wxPyHtmlWindow * _result;
     wxWindow * _arg0;
     int  _arg1 = (int ) -1;
-    wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition;
-    wxSize * _arg3 = (wxSize *) &wxPyDefaultSize;
+    wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
+    wxSize * _arg3 = (wxSize *) &wxDefaultSize;
     int  _arg4 = (int ) wxHW_SCROLLBAR_AUTO;
     char * _arg5 = (char *) "htmlWindow";
     PyObject * _argo0 = 0;
@@ -6054,9 +6051,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_class_wxRealPoint","_wxRealPoint",0},
     { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0},
     { "_wxPNMHandler","_class_wxPNMHandler",0},
-    { "_wxPrinterDC","_class_wxPrinterDC",0},
     { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0},
     { "_wxLogGui","_class_wxLogGui",0},
+    { "_wxPrinterDC","_class_wxPrinterDC",0},
     { "_class_wxMenuItem","_wxMenuItem",0},
     { "_class_wxPaintEvent","_wxPaintEvent",0},
     { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0},
@@ -6273,6 +6270,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxBusyInfo","_class_wxBusyInfo",0},
     { "_class_wxMenuEvent","_wxMenuEvent",0},
     { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
+    { "_wxJoystick","_class_wxJoystick",0},
     { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
     { "_wxClientDC","_class_wxClientDC",0},
     { "_wxMouseEvent","_class_wxMouseEvent",0},
@@ -6405,12 +6403,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_class_wxPyApp","_wxPyApp",0},
     { "_wxSize","_class_wxSize",0},
     { "_wxRegionIterator","_class_wxRegionIterator",0},
-    { "_class_wxPrinterDC","_wxPrinterDC",0},
     { "_class_wxPyTextDataObject","_wxPyTextDataObject",0},
     { "_class_wxLogTextCtrl","_wxLogTextCtrl",0},
     { "_class_wxLogGui","_wxLogGui",0},
     { "_class_wxMDIParentFrame","_wxMDIParentFrame",0},
     { "_wxPyTreeItemData","_class_wxPyTreeItemData",0},
+    { "_class_wxPrinterDC","_wxPrinterDC",0},
     { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0},
     { "_class_wxTimeSpan","_wxTimeSpan",0},
     { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0},
@@ -6469,6 +6467,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxHtmlParser","_wxHtmlWinParser",SwigwxHtmlWinParserTowxHtmlParser},
     { "_wxHtmlParser","_class_wxHtmlParser",0},
     { "_class_wxBusyInfo","_wxBusyInfo",0},
+    { "_class_wxJoystick","_wxJoystick",0},
     { "_class_wxCommandEvent","_wxCommandEvent",0},
     { "_class_wxClientDC","_wxClientDC",0},
     { "_class_wxSizeEvent","_wxSizeEvent",0},
@@ -6560,9 +6559,8 @@ SWIGEXPORT(void) inithtmlc() {
 
     inithtmlhelpc();
 
-    //wxClassInfo::CleanUpClasses();
-    //wxClassInfo::InitializeClasses();
-
+    wxClassInfo::CleanUpClasses();
+    wxClassInfo::InitializeClasses();
 {
    int i;
    for (i = 0; _swig_mapping[i].n1; i++)