def kivy_event_thread_dispatch(proxy, target, name, f):
"""
a function factory that returns a function that will schedule
the given function for execution on the event thread.
"""
def schedule(self, *args, **kwargs):
def scheduled(dt):
f(*args, **kwargs)
Clock.schedule_once(scheduled)
return schedule
评论列表
文章目录