X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94fd5e4dc14c5de8a0a787eda125987616ace638..38b2e0de1806b8c5e723cdd04d20ce2b911ed5c4:/wxPython/src/_timer.i diff --git a/wxPython/src/_timer.i b/wxPython/src/_timer.i index 910a3864ca..f86f692c76 100644 --- a/wxPython/src/_timer.i +++ b/wxPython/src/_timer.i @@ -32,7 +32,7 @@ enum { %{ -//IMP_PYCALLBACK__(wxPyTimer, wxTimer, Notify); +IMP_PYCALLBACK__(wxPyTimer, wxTimer, Notify); IMPLEMENT_ABSTRACT_CLASS(wxPyTimer, wxTimer); @@ -41,28 +41,14 @@ wxPyTimer::wxPyTimer(wxEvtHandler *owner, int id) { if (owner == NULL) SetOwner(this); } - - -void wxPyTimer::Notify() { - bool found; - bool blocked = wxPyBeginBlockThreads(); - if ((found = wxPyCBH_findCallback(m_myInst, "Notify"))) - wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); - wxPyEndBlockThreads(blocked); - if (! found) - wxTimer::Notify(); -} -void wxPyTimer::base_Notify() { - wxTimer::Notify(); -} - %} MustHaveApp(wxPyTimer); -%name(Timer) class wxPyTimer : public wxEvtHandler +%rename(Timer) wxPyTimer; +class wxPyTimer : public wxEvtHandler { public: // Don't let the OOR or callback info hold references to the object so @@ -100,7 +86,7 @@ public: // override this in your wxTimer-derived class if you want to process timer // messages in it, use non default ctor or SetOwner() otherwise - //virtual void Notify(); + virtual void Notify(); // return True if the timer is running virtual bool IsRunning() const; @@ -115,7 +101,7 @@ public: int GetId() const; %pythoncode { - def Destroy(): + def Destroy(self): """NO-OP: Timers must be destroyed by normal refrence counting""" pass }