Fixed a bunch of leaking references in how the callbacks deal with

objects.  Should be MUCH better now.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-12-11 02:53:24 +00:00
parent cb29fb86c0
commit 2cd2fac87f
39 changed files with 4219 additions and 667 deletions

View File

@@ -448,6 +448,13 @@ wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL
wxLI_VERTICAL = wxc.wxLI_VERTICAL
wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER
wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO
wxJOYSTICK1 = wxc.wxJOYSTICK1
wxJOYSTICK2 = wxc.wxJOYSTICK2
wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1
wxJOY_BUTTON2 = wxc.wxJOY_BUTTON2
wxJOY_BUTTON3 = wxc.wxJOY_BUTTON3
wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4
wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY
wxDEFAULT = wxc.wxDEFAULT
wxDECORATIVE = wxc.wxDECORATIVE
wxROMAN = wxc.wxROMAN
@@ -1514,22 +1521,49 @@ def EVT_TIMER(win, id, func):
def EVT_END_PROCESS(eh, id, func):
eh.Connect(id, -1, wxEVT_END_PROCESS, func)
# wxJoyStick
def EVT_JOY_DOWN(win, func):
win.Connect(-1, -1, wxEVT_JOY_DOWN, func)
def EVT_JOY_UP(win, func):
win.Connect(-1, -1, wxEVT_JOY_UP, func)
def EVT_JOY_MOVE(win, func):
win.Connect(-1, -1, wxEVT_JOY_MOVE, func)
def EVT_JOY_ZMOVE(win, func):
win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func)
def EVT_JOYSTICK_EVENTS(win, func):
win.Connect(-1, -1, wxEVT_JOY_DOWN, func)
win.Connect(-1, -1, wxEVT_JOY_UP, func)
win.Connect(-1, -1, wxEVT_JOY_MOVE, func)
win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func)
#----------------------------------------------------------------------
class wxTimer(wxPyTimer):
def __init__(self):
wxPyTimer.__init__(self, self.Notify) # derived class must provide
# Notify(self) method.
def __init__(self, evtHandler = None, id = -1):
if evtHandler is None:
wxPyTimer.__init__(self, self.Notify) # derived class must provide
# Notify(self) method.
else:
wxPyTimer.__init__(self, None)
self.SetOwner(evtHandler, id)
#----------------------------------------------------------------------
# Some wxWin methods can take "NULL" as parameters, but the shadow classes
# expect an object with the SWIG pointer as a 'this' member. This class
# and instance fools the shadow into passing the NULL pointer.
class NullObj:
## NOTE: This is not needed anymore as None can be passed instead and
# will be interpreted as NULL.
class _NullObj:
this = 'NULL' # SWIG converts this to (void*)0
NULL = NullObj()
NULL = _NullObj()
#----------------------------------------------------------------------