summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
authorZakk Roberts <midk@rockbox.org>2006-05-01 05:45:18 +0000
committerZakk Roberts <midk@rockbox.org>2006-05-01 05:45:18 +0000
commit07fcf77cb0b734135fdc730a164f3333d6c703e5 (patch)
treeb30cffeb322adff6c09033c482ec3e0288167aef /apps/plugin.c
parent0d6b5557a113afab41c7ef239c9ce5ddabebea8b (diff)
downloadrockbox-07fcf77cb0b734135fdc730a164f3333d6c703e5.zip
rockbox-07fcf77cb0b734135fdc730a164f3333d6c703e5.tar.gz
rockbox-07fcf77cb0b734135fdc730a164f3333d6c703e5.tar.bz2
rockbox-07fcf77cb0b734135fdc730a164f3333d6c703e5.tar.xz
Patch #5056 by Jonathan Gordon, with rework and additions by me: Updated Viewer plugin. Replaces annoying mode-toggle key-combos with a settings menu, including a new 'Scroll by Line' option. I've also added a 'hands-free' auto-scroll feature and added lcd_setmargins to the plugin API, since we need it here.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9844 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index b023a65..0b09d07 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -182,7 +182,7 @@ static const struct plugin_api rockbox_api = {
button_get_w_tmo,
button_status,
button_clear_queue,
-#ifdef HAS_BUTTON_HOLD
+#ifdef HAS_BUTTON_HOLD
button_hold,
#endif
@@ -202,7 +202,7 @@ static const struct plugin_api rockbox_api = {
settings_parseline,
#ifndef SIMULATOR
ata_sleep,
- ata_disk_is_active,
+ ata_disk_is_active,
#endif
/* dir */
@@ -290,7 +290,7 @@ static const struct plugin_api rockbox_api = {
bitswap,
#endif
#if CONFIG_CODEC == SWCODEC
- pcm_play_data,
+ pcm_play_data,
pcm_play_stop,
pcm_set_frequency,
pcm_is_playing,
@@ -357,7 +357,7 @@ static const struct plugin_api rockbox_api = {
battery_level_safe,
battery_time,
#ifndef SIMULATOR
- battery_voltage,
+ battery_voltage,
#endif
#ifdef HAVE_CHARGING
charger_inserted,
@@ -434,6 +434,10 @@ static const struct plugin_api rockbox_api = {
gui_synclist_scroll_left,
#endif
gui_synclist_do_button,
+
+#ifdef HAVE_LCD_BITMAP
+ lcd_setmargins,
+#endif
};
int plugin_load(const char* plugin, void* parameter)
@@ -553,7 +557,7 @@ int plugin_load(const char* plugin, void* parameter)
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH > 1
#ifdef HAVE_LCD_COLOR
- lcd_set_drawinfo(DRMODE_SOLID, global_settings.fg_color,
+ lcd_set_drawinfo(DRMODE_SOLID, global_settings.fg_color,
global_settings.bg_color);
#else
lcd_set_drawinfo(DRMODE_SOLID, LCD_DEFAULT_FG, LCD_DEFAULT_BG);
@@ -607,7 +611,7 @@ void* plugin_get_buffer(int* buffer_size)
{
if (plugin_size >= PLUGIN_BUFFER_SIZE)
return NULL;
-
+
*buffer_size = PLUGIN_BUFFER_SIZE-plugin_size;
buffer_pos = plugin_size;
}
@@ -620,7 +624,7 @@ void* plugin_get_buffer(int* buffer_size)
return &pluginbuf[buffer_pos];
}
-/* Returns a pointer to the mp3 buffer.
+/* Returns a pointer to the mp3 buffer.
Playback gets stopped, to avoid conflicts. */
void* plugin_get_audio_buffer(int* buffer_size)
{
@@ -631,7 +635,7 @@ void* plugin_get_audio_buffer(int* buffer_size)
}
/* The plugin wants to stay resident after leaving its main function, e.g.
- runs from timer or own thread. The callback is registered to later
+ runs from timer or own thread. The callback is registered to later
instruct it to free its resources before a new plugin gets loaded. */
void plugin_tsr(void (*exit_callback)(void))
{