Graphlcd-plugin/touchcol: Difference between revisions

From VDR Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 49: Line 49:
After finishing the installation, some files need to be copied.
After finishing the installation, some files need to be copied.


* copy the configuration file <tt>graphlcd.conf</tt> to some destination, usually /etc:
* copy the configuration file <tt>graphlcd.conf</tt> to some destination, on most installations this will be /etc.<br/>can be manually configured by setting parameter <tt>--skin</tt> (see below):
cp graphlcd.conf /etc/
cp graphlcd.conf /etc/
* copy the directory with logos, fonts, and skins to <tt>$VDRCONFIG/plugins</tt> (depending on your installation this will be <tt>/etc/vdr/plugins</tt>, or <tt>/video/plugins</tt>, or some other destination):
* copy the directory with logos, fonts, and skins to <tt>$VDRCONFIG/plugins</tt> (depending on your installation this will be <tt>/etc/vdr/plugins</tt>, or <tt>/video/plugins</tt>, or some other destination):
Line 60: Line 60:
!Parameter (long)
!Parameter (long)
!Description
!Description
!Default (if parameter not given)
|-
|-
| -c CFG || --config=CFG || use CFG as driver config file
| -c CFG || --config=CFG || use CFG as driver config file || <tt>/etc/graphlcd.conf</tt>
|-
|-
| -d DISP || --display=DISP || use display DISP for ouput
| -d DISP || --display=DISP || use display DISP for ouput || first display defined in config file
|-
|-
| -s SKIN || --skin=SKIN || use skin SKIN (default is "default")
| -s SKIN || --skin=SKIN || use skin SKIN || <tt>default</tt>
|-
|-
| -p SKINPATH || || path to skin files
| -p SKINPATH || || path to skin files || <tt>$VDRCONFIG/plugins/graphlcd/skins</tt>
|}
|}


Line 77: Line 78:
===Structure and elements of a skin===
===Structure and elements of a skin===


==== Example skeleton of a skin ====
'''Example skeleton of a skin'''


<?xml version="1.0"?>
<?xml version="1.0"?>
<skin version="1.0" name="SKINNAME">
<skin version="1.0" name="testskin">
<font id="FONTID" url="FONTURL" condition="CONDITION" />
<font id="FontInfo" url="ft2:somefont.ttf:8" condition="le({ScreenHeight},64)" />
<font id="FontInfo" url="ft2:somefont.ttf:14" />
<variable id="VARNAME" value="VARVALUE" condition="CONDITION" />
<variable id="LogoWdith" value="40" condition="le({ScreenHeight},64)" />
<variable id="LogoWdith" value="64" />
<display id="DISPLAYNAME">
<display id="normal">
<!-- attention: scope of variable stays skin-wide -->
<!-- attention: scope of variable stays skin-wide -->
<variable id="VARNAME" value="VARVALUE" condition="CONDITION" />
<variable id="TextX" value="4" />
<text ...>
<text x1="#TextX" ...>
DATA
{PresentTitle}
</text>
</text>
Line 98: Line 101:
<progress ... />
<progress ... />
<block condition="CONDITION">
<block condition="{Recordings}">
<image ... />
<text ...>
<text ...>
DATA
{Recordings}
</text>
</text>
<image ... />
</block>
</block>
<!-- basic menu structure -->
<!-- basic menu structure -->
<variable id="Arrow" value="'images/arrow.pbm'"/>
<text ... >{MenuTitle}</text>
<text ... >{MenuTitle}</text>
<list ...>
<list ...>
Line 111: Line 115:
<text ... >{MenuCurrent}</text>
<text ... >{MenuCurrent}</text>
<text ... >{Menuitem}</text>
<text ... >{Menuitem}</text>
<image ... path="MENUMARKER" condition="{IsMenuCurrent}" />
<image ... path="#Arrow" condition="{IsMenuCurrent}" />
</list>
</list>
Line 117: Line 121:
</skin>
</skin>



a skin definition contains different types and sections of information:


;font: defines an easy to remember font 'handle'. if a condition is given the font item is only defined if the condition is true.<br/>'''''Note:''''': fonts can only be defined in the context '<tt>skin</tt>'.
;variable: defines a variable which can be a constant or calculated using a complex evaluation.<br/>'''''Note:''''': variables can be defined everywhere, but the scope will ''always'' be ''skin-wide''!


'''''sections:'''''
; skin: root element.
; display: a layer containing drawing elements.
; block: groups elements together. may be displayed or hidden depending on a condition.
; list: a menu with a defined item height, selected text line, line marker, maybe some lines before, and after the .selected line.

'''''drawing elements:'''''
* '''image'''
* '''text'''
* '''pixel'''
* '''line'''
* '''rectangle'''
* '''elipse'''
* '''slope'''
* '''progress''' (progress bar)
* '''item''' (needed in lists)


'''''tokens:'''''

tokens contain informations (eg. runtime information from VDR like present title, current channel name, ...) and are either displayed or used for evaluations.




'''''functions, conditions, and evaluations:'''''





Revision as of 23:02, 7 June 2010

Description

Author: Community maintained.

This page is about a branch of the GraphLCD plugin with built-in support for skins. The GraphLCD plugin integrates a graphical display into VDR and makes it possible to control VDR even if the television is off.

The branch was started by Andreas 'powarman' Regel but was then abandoned and given to new maintainers by his request.

The functionality of this branch is rather impressive but unfortunately the code is hardly documented.

So this page will be used as a starting point for collecting and formatting its features. Thus this page will be started being a pigsty and improved 'along the way'.

Images

OLED, 256x64, customised skin
GLCD, 240x128, another customised skin
LCD panel, 640x200, connected to USB13700 module


Installation

Hardware requirements and installation of prerequisites

look at GraphLCD plugin.


  • First of all a current version (contains included skin support) of graphlcd-base (library with low level drivers and basic functionality) needs to be installed:
    • Get current version from the GIT repoository:
  git clone git://projects.vdr-developer.org/graphlcd-base.git
  • compile and install the library


  • Then the VDR plugin needs to be retrieved, installed, and compiled:
    • Note: $SOURCEDIR/VDR is the source directory of VDR and needs to be adapted accordingly.
    • Get current version of the branch from the GIT repository:
  cd $SOURCEDIR/VDR/PLUGINS/src/
  git clone git://projects.vdr-developer.org/vdr-plugin-graphlcd.git -b 0.2.0 vdr-plugin-graphlcd_0.2.0
  ln -s vdr-plugin-graphlcd_0.2.0 graphlcd
  • compile plugin, eg:
  cd $SOURCEDIR/VDR/
  make plugins

Everything else is the same as described in plugin installation.

Configuration

After finishing the installation, some files need to be copied.

  • copy the configuration file graphlcd.conf to some destination, on most installations this will be /etc.
    can be manually configured by setting parameter --skin (see below):
 cp graphlcd.conf /etc/
  • copy the directory with logos, fonts, and skins to $VDRCONFIG/plugins (depending on your installation this will be /etc/vdr/plugins, or /video/plugins, or some other destination):
 cp -r $SOURCEDIR/VDR/PLUGINS/src/graphlcd/graphlcd $VDRCONFIG/plugins/

Parameter

Parameter (short) Parameter (long) Description Default (if parameter not given)
-c CFG --config=CFG use CFG as driver config file /etc/graphlcd.conf
-d DISP --display=DISP use display DISP for ouput first display defined in config file
-s SKIN --skin=SKIN use skin SKIN default
-p SKINPATH path to skin files $VDRCONFIG/plugins/graphlcd/skins


Skins

A skin gives a high flexibility of how and which information is brought to a display. Its markup language is the well-known XML.

Structure and elements of a skin

Example skeleton of a skin

<?xml version="1.0"?>
<skin version="1.0" name="testskin">
 
 

 <variable id="LogoWdith" value="40" condition="le({ScreenHeight},64)" />
 <variable id="LogoWdith" value="64" />

 <display id="normal">

   <variable id="TextX" value="4" />

   <text x1="#TextX" ...>
     {PresentTitle}
   </text>

   <image ... />
   <rectangle ... />
   <progress ... />

   <block condition="{Recordings}">
     <image ... />
     <text ...>
       {Recordings}
     </text>
   </block>

   <variable id="Arrow" value="'images/arrow.pbm'"/>
   <text ... >{MenuTitle}</text>
   <list ...>
     <item height="ITEMHEIGHT" />
     <text ... >{MenuCurrent}</text>
     <text ... >{Menuitem}</text>
     <image ... path="#Arrow" condition="{IsMenuCurrent}" />
   </list>

 </display>
</skin>


a skin definition contains different types and sections of information:


font
defines an easy to remember font 'handle'. if a condition is given the font item is only defined if the condition is true.
Note:: fonts can only be defined in the context 'skin'.
variable
defines a variable which can be a constant or calculated using a complex evaluation.
Note:: variables can be defined everywhere, but the scope will always be skin-wide!


sections:

skin
root element.
display
a layer containing drawing elements.
block
groups elements together. may be displayed or hidden depending on a condition.
list
a menu with a defined item height, selected text line, line marker, maybe some lines before, and after the .selected line.

drawing elements:

  • image
  • text
  • pixel
  • line
  • rectangle
  • elipse
  • slope
  • progress (progress bar)
  • item (needed in lists)


tokens:

tokens contain informations (eg. runtime information from VDR like present title, current channel name, ...) and are either displayed or used for evaluations.


functions, conditions, and evaluations:


Problems

Links

[1] http://projects.vdr-developer.org/projects/show/graphlcd new plugin homepage
[2] http://projects.vdr-developer.org/wiki/graphlcd/GraphlcdSkin page for skin branch