rockbox/apps/plugins
William Wilgus 3e2b50ed3b lua events from rockbox
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
2019-07-19 20:48:34 -05:00
..
beatbox Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
bitmaps puzzles: add missing file 2017-11-21 19:54:14 -05:00
chessbox Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
clock Make fixepoint.c as a shared library (libfixedpoint.a). 2013-04-26 00:11:04 +02:00
doom Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
fft Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
fractals Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
frotz Plugin Frotz: Match keymap and manual 2016-01-09 19:46:21 +01:00
goban Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
imageviewer Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
lib Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
lua lua events from rockbox 2019-07-19 20:48:34 -05:00
midi Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
mikmod Fix dangerous casts 2017-02-04 17:24:47 +01:00
mpegplayer Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
pacbox Fix compile wanings in pacbox and invadrox introduced in d4942cc 2019-01-02 10:06:11 -05:00
pdbox Pdbox hide cast-function-type fix overlapping memcpy 2018-12-08 06:23:19 -06:00
pictureflow Add cleaned-up xDuoo X3 support 2018-07-28 10:56:31 -04:00
puzzles Work around DX90 compile error 2019-05-15 20:39:23 -04:00
reversi Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
rockboy Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
sdl wolf3d: allow entering in-game jukebox by holding fire button 2019-07-12 16:21:11 -04:00
searchengine
shortcuts
sudoku Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
text_viewer Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
xworld Agptek Rocker: Build plugins 2018-06-12 10:31:15 +02:00
zxbox Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
2048.c 2048: Cleanup 2015-04-19 17:48:12 +02:00
alarmclock.c Implement time-based resume and playback start. 2014-03-10 04:12:30 +01:00
alpine_cdc.c Implement time-based resume and playback start. 2014-03-10 04:12:30 +01:00
battery_bench.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
bench_mem_jpeg.c
bench_scaler.c
blackjack.c blackjack: various fixes 2019-02-01 19:58:46 +01:00
boomshine.lua Boomshine Fix rb.touchscreen_set_mode() 2019-06-17 16:03:57 -05:00
bounce.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
brickmania.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
bubbles.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
BUILD_OVERLAY
calculator.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
calendar.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
CATEGORIES Wolfenstein 3-D! 2019-07-09 11:20:55 -04:00
chessbox.c
chessclock.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
chip8.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
chopper.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
clix.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
codebuster.c
credits.c
credits.pl
crypt_firmware.c
cube.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
demystify.c
dice.c
dict.c
disktidy.c Fixed disktidy bug and added a couple of new features to disktidy. 2014-10-09 09:43:40 +02:00
disktidy.config
duke3d.c Port of Duke Nukem 3D 2017-12-23 21:01:26 -05:00
elfdep.pl
euroconverter.c
fire.c lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
fireworks.c
firmware_flash.c
flipit.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
goban.c
greyscale.c Add cleaned-up xDuoo X3 support 2018-07-28 10:56:31 -04:00
helloworld.c
helloworld.lua
invadrox.c Fix compile wanings in pacbox and invadrox introduced in d4942cc 2019-01-02 10:06:11 -05:00
iriver_flash.c
iriverify.c
jackpot.c
jewels.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
keybox.c Keybox: display the entry name along with the password 2017-08-27 15:43:11 -04:00
lamp.c Lamp plugin: Allow toggling the button light using "select". 2015-02-22 12:22:40 +01:00
logo.c Fix some build errors and warnings. 2014-06-21 00:49:05 +02:00
lrcplayer.c Fix dangerous casts 2017-02-04 17:24:47 +01:00
main_menu_config.c Fix misleading indentation as pointed out by the new gcc warning 2016-08-12 15:33:28 +02:00
matrix.c matrix plugin: Fix out-of-bounds array access. Unify for-loop style. 2012-06-03 23:37:33 +02:00
maze.c
mazezam.c
md5sum.c
metronome.c YH8xx,YH9xx: Keymap improvement 2015-11-15 23:46:39 +01:00
minesweeper.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
mosaique.c
mp3_encoder.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
nim.c
oscilloscope.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
otp.c Undo hacks to meant to get around string formatting limitations 2017-11-21 05:01:14 -05:00
pegbox.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
periodic_table.c Add tentative new element names, IUPAC approval expected around November 2016-12-04 18:05:51 +01:00
pictureflow.c
pitch_detector.c
pixel-painter.lua Lua fix pixel-painter score save 2018-11-05 07:18:08 +01:00
plasma.c lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
plugin.lds iPod Classic: disable IRAM1 2018-07-30 18:50:27 -04:00
plugin_crt0.c
plugins.make iBasso DX50/DX90: Major code cleanup and reorganization. 2015-02-02 21:57:55 +01:00
pong.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
properties.c Rewrite filesystem code (WIP) 2014-08-30 03:48:23 +02:00
random_folder_advance_config.c plugins: Add plugin_release_audio_buffer(). 2014-04-09 09:04:10 +02:00
remote_control.c
resistor.c scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api. 2013-12-14 23:11:30 +01:00
robotfindskitten.c
rockblox.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
rockblox1d.c
rockbox-fonts.config
rockbox_flash.c
rockboy.c
rocklife.c
rockpaint.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
search.c
settings_dumper.c EQ settings: Rework the settings to clean up the config file. 2013-02-09 13:05:32 +01:00
shopper.c Shopper: slightly improve plugin and manual 2015-09-24 23:15:24 +02:00
sliding_puzzle.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
snake.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
snake2.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
snake2.levels
snow.c
sokoban.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
sokoban.levels
solitaire.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
sort.c
SOURCES Wolfenstein 3-D! 2019-07-09 11:20:55 -04:00
SOURCES.app_build iBasso DX50/DX90: Major code cleanup and reorganization. 2015-02-02 21:57:55 +01:00
spacerocks.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
speedread.c Remove redundant code 2017-03-15 18:14:13 -04:00
splitedit.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
star.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
starfield.c Clean up peak calculating code. 2012-05-02 20:53:07 -04:00
stats.c
stopwatch.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
stopwatch.lua
SUBDIRS Wolfenstein 3-D! 2019-07-09 11:20:55 -04:00
SUBDIRS.app_build iBasso DX50/DX90: Major code cleanup and reorganization. 2015-02-02 21:57:55 +01:00
superdom.c Superdom: Silence warning. 2014-09-14 05:16:10 +02:00
test_boost.c
test_codec.c Get test_codec synced with changes in 6c868dd 2017-12-08 21:32:54 -05:00
test_core_jpeg.c
test_disk.c Align test_disk buffer for DMA. 2016-04-01 19:57:44 +02:00
test_fps.c
test_gfx.c test_gfx: Add benchmark for put_line(). 2014-01-07 14:13:41 +01:00
test_grey.c
test_greylib_bitmap_scale.c
test_mem.c Fix IRAM overflow introduced in 7a8c9daf7e 2019-05-31 10:42:40 +02:00
test_mem_jpeg.c
test_resize.c
test_sampr.c
test_scanrate.c
test_touchscreen.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
test_viewports.c lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport. 2014-01-07 14:13:48 +01:00
test_viewports.lua
text_editor.c Fix Samsung YH92X/YH820 keypad conditional in text_editor 2017-05-06 21:34:21 -04:00
theme_remove.c
vbrfix.c
video.c
viewers.config Speed-reading plugin 2017-03-15 15:02:53 -04:00
vu_meter.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
wav2wv.c
wavplay.c
wavrecord.c wavrecord plugin: Add harmless sanity check 2014-12-21 17:22:09 +01:00
wavview.c
wolf3d.c Wolfenstein 3-D! 2019-07-09 11:20:55 -04:00
wormlet.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
xobox.c Add Xuelin iHIFI 770/770C/800 support 2019-01-02 08:10:01 -05:00
zxbox.c