Commit graph

36 commits

Author SHA1 Message Date
Thomas Martitz
af4f2157b8 Fix lua unused-variable warning by introducing UNUSED_ATTR.
Change-Id: If19393db123e89e58545c9e0736e6fa32fccb810
2012-02-17 12:08:27 +01:00
Albert Bloomfield
885ecf8327 Add playlist wrappers for lua
adds wrappers for the functions playlist_sync, playlist_remove_all_tracks, and playlist_insert_track, playlist_insert_directory
playlist_{sync,remove_all_tracks} take no arguments
playlist_insert_{track,directory} only have one required argument (either the filename or directory name)
They take as optional arguments position, queue, and either sync or recurse

They all just pass NULL to work with the current playlist

also adds constants for:
PLAYLIST_PREPEND,
PLAYLIST_INSERT,
PLAYLIST_INSERT_LAST,
PLAYLIST_INSERT_FIRST,
PLAYLIST_INSERT_SHUFFLED,
PLAYLIST_REPLACE, and
PLAYLIST_INSERT_LAST_SHUFFLED

Change-Id: Ib7464cba50e7a250edf092e50668f11010f2b737
Reviewed-on: http://gerrit.rockbox.org/109
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2012-02-17 12:02:22 +01:00
Thomas Martitz
7728ff5912 Export runtime detected paths to lua scripts. Adapt stopwatch to not use
hardcoded path.

Change-Id: I5b843002d63a332b3fad02973d00b9863d283062
2012-01-29 22:35:49 +01:00
Thomas Martitz
c406f94592 Lua: Add pluginlib_actions wrapper for lua scripts.
Scripts can now make use of PLA_* actions to be more target independant.

Change-Id: I1b9f69e07f41b2187ecc1bad25a2c20eaaef92b4
2012-01-27 09:15:05 +01:00
Thomas Martitz
b8439f2aea Add touchscreen_get_mode() to plugin and lua.
Change-Id: I44b8693c689da00f57c14622f4ba3dc554dbbfc9
2012-01-27 09:15:05 +01:00
Jonathan Gordon
aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +00:00
Maurus Cuelenaere
d8cef9c078 Lua: document rocklib_aux.pl a bit, so it's easier to find out about it when stumbling over a CC error in rocklib_aux.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26912 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 12:28:34 +00:00
Maurus Cuelenaere
5ca112b21e Lua: return nil when function failed instead of returning nothing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23405 a1c6a512-1295-4272-9138-f99709370657
2009-10-29 17:13:36 +00:00
Kevin Ferrare
19c3e77fa0 Boomshine plugin : port to Greyscale and B/W targets, and targets without touchscreen (currently using the virtual keyboard keymap)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23397 a1c6a512-1295-4272-9138-f99709370657
2009-10-29 07:48:26 +00:00
Maurus Cuelenaere
8dbef6d8d0 Lua: add lib/helper.c wrappers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23360 a1c6a512-1295-4272-9138-f99709370657
2009-10-26 17:07:56 +00:00
Maurus Cuelenaere
9dd25adae4 Lua: add do_menu() wrapper. Also fix potential NULL pointer dereference
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23320 a1c6a512-1295-4272-9138-f99709370657
2009-10-23 10:38:20 +00:00
Maurus Cuelenaere
1fde0dd8e4 Lua: return nil when kbd_input() gets aborted and make it possible to preset the input string (based on FS#10455 by Christophe Gragnic)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22008 a1c6a512-1295-4272-9138-f99709370657
2009-07-23 00:54:35 +00:00
Maurus Cuelenaere
59c4b6816b Lua: expose SCREEN_MAIN & SCREEN_REMOTE (for rb.lcd_*() functions)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21712 a1c6a512-1295-4272-9138-f99709370657
2009-07-08 11:59:05 +00:00
Maurus Cuelenaere
3653aea4f8 Lua: use rb->screens[] to do painting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21676 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 19:34:57 +00:00
Maurus Cuelenaere
beb9066d9f Lua: implement gui_syncyesno_run
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21662 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 16:41:16 +00:00
Maurus Cuelenaere
d755a5ac58 Lua: add script which wraps not-yet ported C functions to Lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21657 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 15:33:08 +00:00
Maurus Cuelenaere
69c73e8bd6 Lua: always expose BUTTON_TOUCHSCREEN and remove BUTTON_ constants from rocklib.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21630 a1c6a512-1295-4272-9138-f99709370657
2009-07-03 23:03:07 +00:00
Maurus Cuelenaere
9bff845b49 Lua: because Rockbox doesn't support any current working directory functionality, 'hack' loadlib so it replace '$' in LUA_PATH_DEFAULT with the directory wherein the current script is.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21595 a1c6a512-1295-4272-9138-f99709370657
2009-07-01 17:01:22 +00:00
Maurus Cuelenaere
2b92fe2332 Lua: remove BUTTON_TOUCHSCREEN as this constant is available in buttons.lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21544 a1c6a512-1295-4272-9138-f99709370657
2009-06-28 15:51:32 +00:00
Maurus Cuelenaere
681ca21a1e Lua:
* add IO lib (adapted to Rockbox)
 * remove old IO wrappers
 * rework helloworld.lua to work with the IO lib
 * do some stuff in helloworld.lua better (part of FS#10379, by James Callahan)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21541 a1c6a512-1295-4272-9138-f99709370657
2009-06-28 14:55:16 +00:00
Maurus Cuelenaere
3ff84e5e4f Lua: add the package library
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21506 a1c6a512-1295-4272-9138-f99709370657
2009-06-25 13:26:05 +00:00
Maurus Cuelenaere
3391bf3543 Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21292 a1c6a512-1295-4272-9138-f99709370657
2009-06-15 13:58:19 +00:00
Maurus Cuelenaere
153ac73c04 Fix helloworld.lua for mono targets (+ add lcd_mono_bitmap() & lcd_mono_bitmap_part() to Lua API)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21291 a1c6a512-1295-4272-9138-f99709370657
2009-06-15 13:46:10 +00:00
Maurus Cuelenaere
9c3e679d18 Lua: add touchscreen_set_mode & current_path (+ some constants)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21165 a1c6a512-1295-4272-9138-f99709370657
2009-06-01 22:31:32 +00:00
Maurus Cuelenaere
cd5e98db08 Lua: re-use the viewport pointer; also use the shorter lua_getfield() & lua_setfield() notations (thanks Antoine Cellerier)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21080 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 19:05:53 +00:00
Maurus Cuelenaere
7b16010838 Fix some typos
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21077 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 14:56:59 +00:00
Maurus Cuelenaere
06ba3cceec Lua: port viewports + add test_viewports.lua
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21076 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 14:21:17 +00:00
Maurus Cuelenaere
aec37aa5fe * read_bmp_*(): add FORMAT_RETURN_SIZE
* Lua: add luaL_checkboolean() & luaL_optboolean()
* Lua: add read_bmp_file


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21074 a1c6a512-1295-4272-9138-f99709370657
2009-05-25 11:12:27 +00:00
Maurus Cuelenaere
6af0cfdac0 Lua: /me should learn about C arrays.. :/
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21065 a1c6a512-1295-4272-9138-f99709370657
2009-05-24 02:28:03 +00:00
Maurus Cuelenaere
6f6cfed6ce Lua: fix rocklua_image issue + add LCD_RGBPACK & LCD_RGBUNPACK wrappers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21064 a1c6a512-1295-4272-9138-f99709370657
2009-05-24 02:18:03 +00:00
Maurus Cuelenaere
86fe1e8b5c Lua: add image handling + some other wrappers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21063 a1c6a512-1295-4272-9138-f99709370657
2009-05-24 01:54:15 +00:00
Maurus Cuelenaere
0f7e4e36ae Lua:
* add action_get_touchscreen_press wrapper
 * fix kbd_input wrapper
 * rework luaL_loadfile
 * add rb.contexts


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21046 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 22:44:34 +00:00
Maurus Cuelenaere
fb6b15980a Lua:
* remove debug statement from llex.c
 * add DEBUGF to rocklua.c on parse error
 * add file_exists wrapper


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21025 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 01:03:22 +00:00
Maurus Cuelenaere
2cd4a94bdc Lua: add file handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21024 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 00:06:45 +00:00
Maurus Cuelenaere
a9b2d1b5fa Lua: fix some issues with rocklib
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21022 a1c6a512-1295-4272-9138-f99709370657
2009-05-21 19:42:14 +00:00
Maurus Cuelenaere
cf87597226 Commit FS#9174: Lua scripting language by Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21020 a1c6a512-1295-4272-9138-f99709370657
2009-05-21 19:01:41 +00:00