Livewallpaper

(wikify slightly)
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
LiveWallpaper
+
API(Draft) for external theme :
-
 
+
<ol>
-
API for external theme:
+
<li>
-
 
+
You need to create XML file with description your external theme. See example below:
-
1. You need to create xml file with description your external theme.
+
-
See example below:
+
Example for external theme Abstractile:
Example for external theme Abstractile:
-
<theme>
+
<source lang="xml">
-
  <name>Abstractile</name>
+
<theme>
-
  <exec_path>/usr/lib/xscreensaver/abstractile</exec_path>
+
<name>Abstractile</name>
-
  <window_id>-window-id</window_id>
+
<exec_path>/usr/lib/xscreensaver/abstractile</exec_path>
-
  <view>-view</view>
+
<window_id>-window-id</window_id>
-
  <category>xscreensaver</category>
+
<view>-view</view>
-
</theme>
+
<category>xscreensaver</category>
 +
</theme>
 +
</source>
Where
Where
-
* name - name of theme.
+
* <code>name</code> - name of theme.
-
* exec_path - path to the executable binary file for this theme.
+
* <code>exec_path</code> - path to the executable binary file for this theme.
-
* window_id - option name for the X11 Window ID. Your application should take this option.  
+
* <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.  
-
* view - option name for the view number on which your application will be started). Your application should take this option.
+
* <code>view</code> - option name for the view number on which your application will be started). Your application should take this option.
-
*category - category name for theme.
+
* <code>category</code> - category name for theme.
-
 
+
</li>
-
2. Your application must go to sleep on the dbus signal: interface='org.maemo.livewp', member='pause_livebg_on_view%i'
+
<li>
-
and wake up on the dbus signal: interface='org.maemo.livewp', member='play_livebg_on_view%i', where %i - view number.
+
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:
    <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>

    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.