3e2b50ed3b
This library allows events to be subscribed / recieved within a lua script most events in rb are synchronous so flags are set and later checked by a secondary thread to make them (semi?) asynchronous. There are a few caveats to be aware of: FIRST, The main lua state is halted till the lua callback(s) are finished Yielding will not return control to your script from within a callback Also, subsequent callbacks may be delayed by the code in your lua callback SECOND, You must store the value returned from the event_register function you might get away with it for a bit but gc will destroy your callback eventually if you do not store the event THIRD, You only get one cb per event type ["action", "button", "custom", "playback", "timer"] (Re-registration of an event overwrites the previous one) Usage: possible events =["action", "button", "custom", "playback", "timer"] local evX = rockev.register("event", cb_function, [timeout / flags]) cb_function([id] [, data]) ... end rockev.suspend(["event"/nil][true/false]) passing nil affects all events stops event from executing, any but the last event before re-enabling will be lost, passing false, unregistering or re-registering an event will clear the suspend rockev.trigger("event", [true/false], [id]) sets an event to triggered, NOTE!, CUSTOM_EVENT must be unset manually id is only passed to callback by custom and playback events rockev.unregister(evX) Use unregister(evX) to remove an event Unregistering is not necessary before script end, it will be cleaned up on script exit Change-Id: Iea12a5cc0c0295b955dcc1cdf2eec835ca7e354d |
||
---|---|---|
.. | ||
bitmaps | ||
gui | ||
hosted/android | ||
iap | ||
keymaps | ||
lang | ||
menus | ||
player | ||
plugins | ||
radio | ||
recorder | ||
abrepeat.c | ||
abrepeat.h | ||
action.c | ||
action.h | ||
alarm_menu.c | ||
alarm_menu.h | ||
appevents.h | ||
applimits.h | ||
apps.make | ||
audio_path.c | ||
audio_thread.c | ||
audio_thread.h | ||
beep.c | ||
bookmark.c | ||
bookmark.h | ||
buffering.c | ||
buffering.h | ||
codec_thread.c | ||
codec_thread.h | ||
codecs.c | ||
core_asmdefs.c | ||
cuesheet.c | ||
cuesheet.h | ||
debug_menu.c | ||
debug_menu.h | ||
enc_config.c | ||
enc_config.h | ||
features.txt | ||
filetree.c | ||
filetree.h | ||
filetypes.c | ||
filetypes.h | ||
fracmul.h | ||
keyboard.h | ||
language.c | ||
language.h | ||
logfdisp.c | ||
logfdisp.h | ||
main.c | ||
menu.c | ||
menu.h | ||
misc.c | ||
misc.h | ||
mpeg.c | ||
mpeg.h | ||
onplay.c | ||
onplay.h | ||
pcmbuf.c | ||
pcmbuf.h | ||
playback.c | ||
playback.h | ||
playlist.c | ||
playlist.h | ||
playlist_catalog.c | ||
playlist_catalog.h | ||
playlist_menu.h | ||
playlist_viewer.c | ||
playlist_viewer.h | ||
plugin.c | ||
plugin.h | ||
rbcodec_helpers.c | ||
rbcodecconfig.h | ||
rbcodecplatform.h | ||
README | ||
root_menu.c | ||
root_menu.h | ||
screen_access.c | ||
screen_access.h | ||
screens.c | ||
screens.h | ||
scrobbler.c | ||
scrobbler.h | ||
settings.c | ||
settings.h | ||
settings_list.c | ||
settings_list.h | ||
shortcuts.c | ||
shortcuts.h | ||
sound_menu.h | ||
SOURCES | ||
status.c | ||
status.h | ||
tagcache.c | ||
tagcache.h | ||
tagnavi.config | ||
tagtree.c | ||
tagtree.h | ||
talk.c | ||
talk.h | ||
tree.c | ||
tree.h | ||
usb_keymaps.c | ||
usb_keymaps.h | ||
voice_thread.c | ||
voice_thread.h |
For general information see: docs/README For API information see: docs/API