SWIGged updates for wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-06-15 07:03:05 +00:00
parent b89f0cb06a
commit 8f8b0a8dfe
11 changed files with 618 additions and 109 deletions

View File

@@ -1565,6 +1565,29 @@ def wxPyTypeCast(obj, typeStr):
#----------------------------------------------------------------------------
_wxCallAfterId = None
def wxCallAfter(callable, *args, **kw):
"""
Call the specified function after the current and pending event
handlers have been completed.
"""
app = wxGetApp()
assert app, 'No wxApp created yet'
global _wxCallAfterId
if _wxCallAfterId is None:
_wxCallAfterId = wxNewId()
app.Connect(-1, -1, _wxCallAfterId,
lambda event: apply(event.callable, event.args, event.kw) )
evt = wxPyEvent()
evt.SetEventType(_wxCallAfterId)
evt.callable = callable
evt.args = args
evt.kw = kw
wxPostEvent(app, evt)
#----------------------------------------------------------------------
class wxPyDeadObjectError(AttributeError):
pass