From 3207366daab937bafe2029ee231257c51188d6b2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 1 Apr 2014 00:36:04 +0200 Subject: lua: add mp.unregister_event() function Someone requested this... I think. --- DOCS/man/en/lua.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'DOCS/man') diff --git a/DOCS/man/en/lua.rst b/DOCS/man/en/lua.rst index 2cf485ba35..34d1d0e8c3 100644 --- a/DOCS/man/en/lua.rst +++ b/DOCS/man/en/lua.rst @@ -235,6 +235,11 @@ The ``mp`` module is preloaded, although it can be loaded manually with See `Events`_ and `List of events`_ for details. +``mp.unregister_event(fn)`` + Undo ``mp.register_event(..., fn)``. This removes all event handlers that + are equal to the ``fn`` parameter. This uses normal Lua ``==`` comparison, + so be careful when dealing with closures. + ``mp.add_timeout(seconds, fn)`` Call the given function fn when the given number of seconds has elapsed. Note that the number of seconds can be fractional. As of now, the timer -- cgit v1.2.3