diff options
author | wm4 <wm4@nowhere> | 2014-04-01 00:36:04 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-01 00:37:50 +0200 |
commit | 3207366daab937bafe2029ee231257c51188d6b2 (patch) | |
tree | 1101ce82f8f69163ec7feecbfbd34dd10f06864c /DOCS/man | |
parent | 84ab8600314d44abcc03f3a101ee51b59e336495 (diff) | |
download | mpv-3207366daab937bafe2029ee231257c51188d6b2.tar.bz2 mpv-3207366daab937bafe2029ee231257c51188d6b2.tar.xz |
lua: add mp.unregister_event() function
Someone requested this... I think.
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/en/lua.rst | 5 |
1 files changed, 5 insertions, 0 deletions
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 |