}
void OnExit() {
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
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);
+ wxPyEndBlockThreads(state);
};
void FillHandlersTable(wxHtmlWinParser *parser) {
// Wave our magic wand... (if it works it's a miracle! ;-)
// First, make a new instance of the tag handler
- bool doSave = wxPyRestoreThread();
+ wxPyTState* state = wxPyBeginBlockThreads();
PyObject* arg = Py_BuildValue("()");
PyObject* obj = PyInstance_New(m_tagHandlerClass, arg, NULL);
Py_DECREF(arg);
- wxPySaveThread(doSave);
+ wxPyEndBlockThreads(state);
// now figure out where it's C++ object is...
wxPyHtmlWinTagHandler* thPtr;
}
class wxPyHtmlWindow : public wxHtmlWindow {
+ DECLARE_ABSTRACT_CLASS(wxPyHtmlWindow);
public:
wxPyHtmlWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
PYPRIVATE;
};
-
+IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow );
IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle);
void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
- bool doSave = wxPyRestoreThread();
- if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) {
+ bool found;
+ wxPyTState* state = wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked)"))) {
PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
Py_DECREF(obj);
}
- else
+ wxPyEndBlockThreads(state);
+ if (! found)
wxHtmlWindow::OnLinkClicked(link);
- wxPySaveThread(doSave);
}
void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) {
wxHtmlWindow::OnLinkClicked(link);
return _resultobj;
}
-#define wxHtmlTag_IsEnding(_swigobj) (_swigobj->IsEnding())
-static PyObject *_wrap_wxHtmlTag_IsEnding(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- bool _result;
- wxHtmlTag * _arg0;
- PyObject * _argo0 = 0;
- char *_kwnames[] = { "self", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_IsEnding",_kwnames,&_argo0))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_IsEnding. Expected _wxHtmlTag_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- _result = (bool )wxHtmlTag_IsEnding(_arg0);
-
- wxPy_END_ALLOW_THREADS;
-} _resultobj = Py_BuildValue("i",_result);
- return _resultobj;
-}
-
#define wxHtmlTag_HasEnding(_swigobj) (_swigobj->HasEnding())
static PyObject *_wrap_wxHtmlTag_HasEnding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxHtmlTag_GetEndPos1", (PyCFunction) _wrap_wxHtmlTag_GetEndPos1, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_GetBeginPos", (PyCFunction) _wrap_wxHtmlTag_GetBeginPos, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_HasEnding", (PyCFunction) _wrap_wxHtmlTag_HasEnding, METH_VARARGS | METH_KEYWORDS },
- { "wxHtmlTag_IsEnding", (PyCFunction) _wrap_wxHtmlTag_IsEnding, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_GetAllParams", (PyCFunction) _wrap_wxHtmlTag_GetAllParams, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_GetParam", (PyCFunction) _wrap_wxHtmlTag_GetParam, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlTag_HasParam", (PyCFunction) _wrap_wxHtmlTag_HasParam, METH_VARARGS | METH_KEYWORDS },
{ "_wxHtmlCell","_class_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell},
{ "_wxHtmlCell","_wxHtmlWordCell",SwigwxHtmlWordCellTowxHtmlCell},
{ "_char","_wxChar",0},
+ { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler},
{ "_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler},
{ "_EBool","_wxCoord",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
+ { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_class_wxPanel","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel},
{ "_class_wxPanel","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel},
{ "_signed_int","_wxCoord",0},