%module html
%{
-#include "helpers.h"
+#include "export.h"
#include <wx/html/htmlwin.h>
#include <wx/html/htmprint.h>
#include <wx/image.h>
%extern utils.i
-//---------------------------------------------------------------------------
-
-%{
-// #ifdef __WXMSW__
-// wxString wxPyEmptyStr("");
-// wxPoint wxPyDefaultPosition(wxDefaultPosition);
-// wxSize wxPyDefaultSize(wxDefaultSize);
-// #endif
-%}
-
%pragma(python) code = "import wx"
}
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) {
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);
%name(wxHtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow {
public:
wxPyHtmlWindow(wxWindow *parent, int id = -1,
- wxPoint& pos = wxPyDefaultPosition,
- wxSize& size = wxPyDefaultSize,
+ wxPoint& pos = wxDefaultPosition,
+ wxSize& size = wxDefaultSize,
int flags=wxHW_SCROLLBAR_AUTO,
char* name = "htmlWindow");
class wxHtmlPrintout : public wxPyPrintout {
public:
wxHtmlPrintout(const char* title = "Printout");
- ~wxHtmlPrintout();
+ //~wxHtmlPrintout();
void SetHtmlText(const wxString& html,
const wxString &basepath = wxEmptyString,
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
-
- // Until wxFileSystem is wrapped...
- #if wxUSE_FS_ZIP
- wxFileSystem::AddHandler(new wxZipFSHandler);
- #endif
- #if wxUSE_FS_INET
-// wxFileSystem::AddHandler(new wxInternetFSHandler);
- #endif
%}
//----------------------------------------------------------------------