summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2008-05-07 21:59:45 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2008-05-07 21:59:45 +0000
commitebdb89b519b8039b440a52b286f645266480e78a (patch)
tree3036931ad42d5db8afbb5d32653769b2dc6c2fb8
parentd38f49f87b0a3a0343d6184a4add4fc630c72de9 (diff)
Rename the flahslight plugin to lamp and add it to the manual
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17406 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/CATEGORIES2
-rw-r--r--apps/plugins/SOURCES2
-rw-r--r--apps/plugins/lamp.c (renamed from apps/plugins/flashlight.c)105
-rw-r--r--manual/plugins/lamp.tex15
-rw-r--r--manual/plugins/main.tex2
5 files changed, 72 insertions, 54 deletions
diff --git a/apps/plugins/CATEGORIES b/apps/plugins/CATEGORIES
index 65394a7ab9..6992ca3ca1 100644
--- a/apps/plugins/CATEGORIES
+++ b/apps/plugins/CATEGORIES
@@ -98,4 +98,4 @@ wavview,viewers
wormlet,games
xobox,games
zxbox,viewers
-flashlight,apps
+lamp,apps
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index b33b6305f3..92884a9bda 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -20,7 +20,7 @@ stopwatch.c
vbrfix.c
viewer.c
#ifdef HAVE_BACKLIGHT
-flashlight.c
+lamp.c
#endif /* HAVE_BACKLIGHT */
#ifdef OLYMPUS_MROBE_500
diff --git a/apps/plugins/flashlight.c b/apps/plugins/lamp.c
index b732545ea6..c755219378 100644
--- a/apps/plugins/flashlight.c
+++ b/apps/plugins/lamp.c
@@ -10,6 +10,7 @@
* Copyright (C) 2007 Vuong Minh Hiep (vmh)
* Copyright (C) 2008 Thomas Martitz (kugel.)
* Copyright (C) 2008 Alexander Papst
+ * Copyright (C) 2008 Peter D'Hoye
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
@@ -28,46 +29,46 @@ PLUGIN_HEADER
/* variable button definitions - only targets with a colour display */
#if defined(HAVE_LCD_COLOR)
#if (CONFIG_KEYPAD == IRIVER_H300_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
-# define FLASHLIGHT_NEXT BUTTON_SCROLL_FWD
-# define FLASHLIGHT_PREV BUTTON_SCROLL_BACK
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
+# define LAMP_NEXT BUTTON_SCROLL_FWD
+# define LAMP_PREV BUTTON_SCROLL_BACK
#elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
#elif (CONFIG_KEYPAD == GIGABEAT_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
#elif (CONFIG_KEYPAD == SANSA_E200_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
-# define FLASHLIGHT_NEXT BUTTON_SCROLL_FWD
-# define FLASHLIGHT_PREV BUTTON_SCROLL_BACK
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
+# define LAMP_NEXT BUTTON_SCROLL_FWD
+# define LAMP_PREV BUTTON_SCROLL_BACK
#elif (CONFIG_KEYPAD == SANSA_C200_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
-# define FLASHLIGHT_NEXT BUTTON_SCROLL_UP
-# define FLASHLIGHT_PREV BUTTON_SCROLL_DOWN
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
+# define LAMP_NEXT BUTTON_SCROLL_UP
+# define LAMP_PREV BUTTON_SCROLL_DOWN
#elif CONFIG_KEYPAD == MROBE500_PAD
-# define FLASHLIGHT_LEFT BUTTON_LEFT
-# define FLASHLIGHT_RIGHT BUTTON_RIGHT
+# define LAMP_LEFT BUTTON_LEFT
+# define LAMP_RIGHT BUTTON_RIGHT
#elif CONFIG_KEYPAD == COWOND2_PAD
@@ -77,17 +78,17 @@ PLUGIN_HEADER
#endif
#ifdef HAVE_TOUCHPAD
-# ifndef FLASHLIGHT_LEFT
-# define FLASHLIGHT_LEFT BUTTON_MIDLEFT
+# ifndef LAMP_LEFT
+# define LAMP_LEFT BUTTON_MIDLEFT
# endif
-# ifndef FLASHLIGHT_RIGHT
-# define FLASHLIGHT_RIGHT BUTTON_MIDRIGHT
+# ifndef LAMP_RIGHT
+# define LAMP_RIGHT BUTTON_MIDRIGHT
# endif
-# ifndef FLASHLIGHT_NEXT
-# define FLASHLIGHT_NEXT BUTTON_TOPMIDDLE
+# ifndef LAMP_NEXT
+# define LAMP_NEXT BUTTON_TOPMIDDLE
# endif
-# ifndef FLASHLIGHT_PREV
-# define FLASHLIGHT_PREV BUTTON_BOTTOMMIDDLE
+# ifndef LAMP_PREV
+# define LAMP_PREV BUTTON_BOTTOMMIDDLE
# endif
#endif
@@ -151,32 +152,32 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
switch(rb->button_get(true))
{
- case FLASHLIGHT_RIGHT:
-#ifdef FLASHLIGHT_NEXT
- case FLASHLIGHT_NEXT:
-#endif /* FLASHLIGHT_NEXT */
+ case LAMP_RIGHT:
+#ifdef LAMP_NEXT
+ case LAMP_NEXT:
+#endif /* LAMP_NEXT */
cs++;
break;
- case FLASHLIGHT_LEFT:
-#ifdef FLASHLIGHT_PREV
- case FLASHLIGHT_PREV:
-#endif /* FLASHLIGHT_PREV */
+ case LAMP_LEFT:
+#ifdef LAMP_PREV
+ case LAMP_PREV:
+#endif /* LAMP_PREV */
cs--;
break;
- case (FLASHLIGHT_RIGHT|BUTTON_REPEAT):
- case (FLASHLIGHT_RIGHT|BUTTON_REL):
- case (FLASHLIGHT_LEFT|BUTTON_REPEAT):
- case (FLASHLIGHT_LEFT|BUTTON_REL):
-#ifdef FLASHLIGHT_NEXT
- case (FLASHLIGHT_NEXT|BUTTON_REPEAT):
- case (FLASHLIGHT_NEXT|BUTTON_REL):
-#endif /* FLASHLIGHT_NEXT */
-#ifdef FLASHLIGHT_PREV
- case (FLASHLIGHT_PREV|BUTTON_REPEAT):
- case (FLASHLIGHT_PREV|BUTTON_REL):
-#endif /* FLASHLIGHT_PREV */
+ case (LAMP_RIGHT|BUTTON_REPEAT):
+ case (LAMP_RIGHT|BUTTON_REL):
+ case (LAMP_LEFT|BUTTON_REPEAT):
+ case (LAMP_LEFT|BUTTON_REL):
+#ifdef LAMP_NEXT
+ case (LAMP_NEXT|BUTTON_REPEAT):
+ case (LAMP_NEXT|BUTTON_REL):
+#endif /* LAMP_NEXT */
+#ifdef LAMP_PREV
+ case (LAMP_PREV|BUTTON_REPEAT):
+ case (LAMP_PREV|BUTTON_REL):
+#endif /* LAMP_PREV */
/* eat these... */
break;
default:
diff --git a/manual/plugins/lamp.tex b/manual/plugins/lamp.tex
new file mode 100644
index 0000000000..c0595872f9
--- /dev/null
+++ b/manual/plugins/lamp.tex
@@ -0,0 +1,15 @@
+% $Id$ %
+\subsection{Lamp}
+Lamp is a simple plugin to use your player as a lamp (flashlight, torch).
+You get an empty screen with maximum brightness.
+\begin{table}
+ \begin{btnmap}{}{}
+ \ButtonLeft/\ButtonRight
+ & Toggle between colors\\
+ \opt{PLAYER_PAD}{\ButtonMenu}
+ \opt{RECORDER_PAD,ONDIO_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonOff}
+ \opt{IPOD_4G_PAD,IPOD_3G_PAD}{Long press on \ButtonPlay}
+ \opt{IAUDIO_x5_PAD,SANSA_E200_PAD,GIGABEAT_PAD,MROBE100_PAD}{\ButtonPower}
+ & Quit\\
+ \end{btnmap}
+\end{table}
diff --git a/manual/plugins/main.tex b/manual/plugins/main.tex
index 1e049f8d4c..5ea564891c 100644
--- a/manual/plugins/main.tex
+++ b/manual/plugins/main.tex
@@ -151,6 +151,8 @@ the associated file. Viewers are stored in the
\opt{recorder,recorderv2fm,ondio}{\input{plugins/firmware_flash.tex}}
+\opt{HAVE_BACKLIGHT}{\input{plugins/lamp.tex}}
+
{\input{plugins/metronome.tex}}
\opt{recorder,recorderv2fm,ondio}{\input{plugins/split_editor.tex}}