[Slim-Checkins] r9212 - /trunk/server/HTML/EN/html/docs/display.html

adrian at svn.slimdevices.com adrian at svn.slimdevices.com
Mon Aug 28 10:35:16 PDT 2006


Author: adrian
Date: Mon Aug 28 10:35:14 2006
New Revision: 9212

URL: http://svn.slimdevices.com?rev=9212&view=rev
Log:
Bug: N/A
Description: update display documentation for use of custom lines functions

Modified:
    trunk/server/HTML/EN/html/docs/display.html

Modified: trunk/server/HTML/EN/html/docs/display.html
URL: http://svn.slimdevices.com/trunk/server/HTML/EN/html/docs/display.html?rev=9212&r1=9211&r2=9212&view=diff
==============================================================================
--- trunk/server/HTML/EN/html/docs/display.html (original)
+++ trunk/server/HTML/EN/html/docs/display.html Mon Aug 28 10:35:14 2006
@@ -766,5 +766,45 @@
 show the correct menu items, but will not perform the normal scrolling
 between menu items.</p>
 
+<hr></hr>
+<h4>Custom Server Mode Displays</h4>
+
+<p>6.5 supports custom lines functions for the volume display and
+playlist mode.  This allows a plugin to alter the built in screen
+displays for changing volume and playlist/now playing displays.</p>
+
+<p>A plugin should register alternative lines function at client
+connect time with the client methods customVolumeLines and
+customPlaylistLines.  For example:</p>
+
+<pre>
+sub initPlugin {
+    Slim::Control::Request::subscribe( \&newClient, [['client']], [['new']] );
+}
+
+sub newClient {
+    my $client = shift->client || return;
+    $client->customVolumeLines( \&volumeLines );
+    $client->customPlaylistLines( \&playlistLines );
+}
+
+sub volumeLines {
+    my $client = shift;
+    my $vol = shift;
+
+    if (!defined $vol && $client->param('valueRef')) {
+        $vol = ${$client->param('valueRef')};
+    }
+
+    # $vol is a value 0..100
+}
+
+sub playlistLines {
+    my $client = shift;
+
+    # see Slim::Buttons::Playlist::lines for details
+}
+</pre>
+
 <p></p>
 [% PROCESS helpfooter.html %]



More information about the checkins mailing list