Livewallpaper: Difference between revisions

From Maemo Wiki
Jump to navigationJump to search
imported>tanya
No edit summary
imported>amigadave
wikify slightly
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
LiveWallpaper
API(Draft) for external theme :


<ol>
<li>
You need to create XML file with description your external theme. See example below:


API for external theme:
Example for external theme Abstractile:
 
<source lang="xml">
1. You need to create xml file with description your external theme.
<theme>
See example below:
 
Example for external theme Abstractile
 
<theme>
  <name>Abstractile</name>
  <name>Abstractile</name>
  <exec_path>/usr/lib/xscreensaver/abstractile</exec_path>
  <exec_path>/usr/lib/xscreensaver/abstractile</exec_path>
Line 15: Line 13:
  <view>-view</view>
  <view>-view</view>
  <category>xscreensaver</category>
  <category>xscreensaver</category>
</theme>
</theme>
                                                                                                                                                 
</source>
 
Where
* <code>name</code> - name of theme.
* <code>exec_path</code> - path to the executable binary file for this theme.
* <code>window_id</code> - option name for the X11 Window ID. Your application should take value from this option and to use this 'window' for drawing.
* <code>view</code> - option name for the view number on which your application will be started). Your application should take this option.
* <code>category</code> - category name for theme.
</li>
<li>
Your application must go to sleep on the D-Bus signal:
<pre>
interface='org.maemo.livewp', member='pause_livebg_on_view%i'
</pre>
and wake up on the D-Bus signal:
<pre>
interface='org.maemo.livewp', member='play_livebg_on_view%i'
</pre>
where %i - view number.
</li>
</ol>
          
          
[[Category:Software]]
[[Category:Software]]

Latest revision as of 11:10, 23 August 2010

API(Draft) for external theme :

  1. You need to create XML file with description your external theme. See example below: Example for external theme Abstractile: <source lang="xml"> <theme> <name>Abstractile</name> <exec_path>/usr/lib/xscreensaver/abstractile</exec_path> <window_id>-window-id</window_id> <view>-view</view> <category>xscreensaver</category> </theme> </source> Where
    • name - name of theme.
    • exec_path - path to the executable binary file for this theme.
    • window_id - option name for the X11 Window ID. Your application should take value from this option and to use this 'window' for drawing.
    • view - option name for the view number on which your application will be started). Your application should take this option.
    • category - category name for theme.
  2. Your application must go to sleep on the D-Bus signal:
    interface='org.maemo.livewp', member='pause_livebg_on_view%i'
    

    and wake up on the D-Bus signal:

    interface='org.maemo.livewp', member='play_livebg_on_view%i'
    

    where %i - view number.