X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd9f7fea29e3f8bb61861f52984b7943512346ac..3798e298a412c4bc05b5aa83507b3c251dd36233:/wxPython/src/_timer.i?ds=sidebyside diff --git a/wxPython/src/_timer.i b/wxPython/src/_timer.i index baeb1f197a..b0d2dae880 100644 --- a/wxPython/src/_timer.i +++ b/wxPython/src/_timer.i @@ -40,6 +40,7 @@ IMP_PYCALLBACK__(wxPyTimer, wxTimer, Notify); %name(Timer) class wxPyTimer : public wxEvtHandler { public: + %addtofunc wxPyTimer "self._setCallbackInfo(self, Timer)" // if you don't call SetOwner() or provide an owner in the contstructor // then you must override Notify() inorder to receive the timer @@ -48,6 +49,8 @@ public: wxPyTimer(wxEvtHandler *owner=NULL, int id = -1); virtual ~wxPyTimer(); + void _setCallbackInfo(PyObject* self, PyObject* _class); + // Set the owner instance that will receive the EVT_TIMER events using the // given id. void SetOwner(wxEvtHandler *owner, int id = -1); @@ -65,7 +68,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; @@ -75,6 +78,10 @@ public: // return True if the timer is one shot bool IsOneShot() const; + + // return the timer ID + int GetId() const; + };