diff options
author | 2023-12-14 02:06:19 +1100 | |
---|---|---|
committer | 2023-12-14 02:06:19 +1100 | |
commit | b80770847031dafd90d7cc9a6d32d7e2ee8107a8 (patch) | |
tree | 7da8995ec4352fea999590a063ea6634f84d1ca4 /docs/source/luascript | |
parent | ef6710953f9027d5a11e7ec6c69aa9966e223707 (diff) |
emu/diimage.cpp: Added media change notifier and exposed to Lua.
This allows interested parties to receive notifications on media
changes. This is demonstrated by the file manager and media image
information menus now updating immediately if the system ejects a
mounted image, or a mounted image is changed by a script or something.
ui/filemngr.cpp, ui/info.cpp: Update file manager and media image
information menus immediately on media image changes.
ui/menu.cpp: Return index of added item from item_append.
bus/generic/slot.cpp: Use out-of-line virtual destructors to avoid
vtable link errors in certain single-driver builds.
bus/nubus: Tidy up some #include statements.
Diffstat (limited to 'docs/source/luascript')
-rw-r--r-- | docs/source/luascript/ref-devices.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/source/luascript/ref-devices.rst b/docs/source/luascript/ref-devices.rst index 17b34ef1914..1c3eabdbd2d 100644 --- a/docs/source/luascript/ref-devices.rst +++ b/docs/source/luascript/ref-devices.rst @@ -553,6 +553,12 @@ image:display() Returns a “front panel display” string for the device, if supported. This can be used to show status information, like the current head position or motor state. +image:add_media_change_notifier(callback) + Add a callback to receive notifications when a media image is loaded or + unloaded for the device. The callback is passed a single string argument + which will be ``"loaded"`` if a media image has been loaded or + ``"unloaded"`` if the previously loaded media image has been unloaded. + Returns a :ref:`notifier subscription <luascript-ref-notifiersub>`. Properties ~~~~~~~~~~ |