Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Kimmo Hämäläinen
Hello!

The PR1.2 has a super-secret, unplanned feature that we smuggled in:
so-called live backgrounds support in hildon-desktop (= 1:2.2.133-1).
Live background is a window that is displayed below or front of the Home
applets, either in a specific desktop view (panning with the view) or as
common for all views (static).

Live background window is recognised when an integer-valued
_HILDON_LIVE_DESKTOP_BACKGROUND window property is found in the window:

0this client is not a live background
1-4  home view specific live background
101-104  home view specific live foreground (above applets)
-1   global live background used for all home views
-101 global live foreground used for all home views

Notice that you probably want to use a transparent window for live
foregrounds so that the applets and the background image are still
visible.  What you also want (I tell you) is to pause the animation of
the background when it's not visible.  I have ported xsnow for
demonstrating how to do the pausing and detect positions of the Home
applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also
trying to create a Garage project for it). The xsnow pausing is not
optimal (it periodically wakes up to check sysfs for the display
brightness), but it has not eaten all my battery even if I let it run
overnight.

Someone could write a Control Panel plugin for managing live backgrounds
(these window properties), since there is no tool as yet.

There is a basic code example / test program here:
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/tests/test-live-bg.c

-Kimmo



xsnow_1.42-8maemo1.diff.gz
Description: GNU Zip compressed data
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Sivan Greenberg
That is very cool Kimmo!

I have a life improving app use case for that, I'll be sure to check
you examples.

The manager has to be written in C/GTK or can be eased off in PyGtk ?

Sivan

2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
 Hello!

 The PR1.2 has a super-secret, unplanned feature that we smuggled in:
 so-called live backgrounds support in hildon-desktop (= 1:2.2.133-1).
 Live background is a window that is displayed below or front of the Home
 applets, either in a specific desktop view (panning with the view) or as
 common for all views (static).

 Live background window is recognised when an integer-valued
 _HILDON_LIVE_DESKTOP_BACKGROUND window property is found in the window:

 0        this client is not a live background
 1-4      home view specific live background
 101-104  home view specific live foreground (above applets)
 -1       global live background used for all home views
 -101     global live foreground used for all home views

 Notice that you probably want to use a transparent window for live
 foregrounds so that the applets and the background image are still
 visible.  What you also want (I tell you) is to pause the animation of
 the background when it's not visible.  I have ported xsnow for
 demonstrating how to do the pausing and detect positions of the Home
 applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also
 trying to create a Garage project for it). The xsnow pausing is not
 optimal (it periodically wakes up to check sysfs for the display
 brightness), but it has not eaten all my battery even if I let it run
 overnight.

 Someone could write a Control Panel plugin for managing live backgrounds
 (these window properties), since there is no tool as yet.

 There is a basic code example / test program here:
 http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/tests/test-live-bg.c

 -Kimmo


 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Sivan Greenberg
2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
 I think the Control Panel plugin API is C/GTK only since the plugin runs
 inside the Control Panel application.  You'd need to be somehow familiar
 with X11 programming, since it would involve finding out the current
 live backgrounds and offer UI for manipulating the window property on

So essentially find the XWindow ID and set transparency attribute on it?

Sivan
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Kimmo Hämäläinen
On Tue, 2010-06-01 at 10:41 +0200, ext Sivan Greenberg wrote:
 That is very cool Kimmo!
 
 I have a life improving app use case for that, I'll be sure to check
 you examples.
 
 The manager has to be written in C/GTK or can be eased off in PyGtk ?

I think the Control Panel plugin API is C/GTK only since the plugin runs
inside the Control Panel application.  You'd need to be somehow familiar
with X11 programming, since it would involve finding out the current
live backgrounds and offer UI for manipulating the window property on
them.  Actually it's possible to put any application as the live
background, and it could even work if the application only depends on
ButtonPress, ButtonRelease and Motion events (which are forwarded by
hildon-desktop to the live background window).

-Kimmo

 
 Sivan
 
 2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  Hello!
 
  The PR1.2 has a super-secret, unplanned feature that we smuggled in:
  so-called live backgrounds support in hildon-desktop (= 1:2.2.133-1).
  Live background is a window that is displayed below or front of the Home
  applets, either in a specific desktop view (panning with the view) or as
  common for all views (static).
 
  Live background window is recognised when an integer-valued
  _HILDON_LIVE_DESKTOP_BACKGROUND window property is found in the window:
 
  0this client is not a live background
  1-4  home view specific live background
  101-104  home view specific live foreground (above applets)
  -1   global live background used for all home views
  -101 global live foreground used for all home views
 
  Notice that you probably want to use a transparent window for live
  foregrounds so that the applets and the background image are still
  visible.  What you also want (I tell you) is to pause the animation of
  the background when it's not visible.  I have ported xsnow for
  demonstrating how to do the pausing and detect positions of the Home
  applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also
  trying to create a Garage project for it). The xsnow pausing is not
  optimal (it periodically wakes up to check sysfs for the display
  brightness), but it has not eaten all my battery even if I let it run
  overnight.
 
  Someone could write a Control Panel plugin for managing live backgrounds
  (these window properties), since there is no tool as yet.
 
  There is a basic code example / test program here:
  http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/tests/test-live-bg.c
 
  -Kimmo
 
 
  ___
  maemo-developers mailing list
  maemo-developers@maemo.org
  https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Kimmo Hämäläinen
On Tue, 2010-06-01 at 11:32 +0200, ext Sivan Greenberg wrote:
 2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
  I think the Control Panel plugin API is C/GTK only since the plugin runs
  inside the Control Panel application.  You'd need to be somehow familiar
  with X11 programming, since it would involve finding out the current
  live backgrounds and offer UI for manipulating the window property on
 
 So essentially find the XWindow ID and set transparency attribute on it?

No, transparency property is not used, the window itself needs to be
transparent (i.e. 32-bit window with alpha channel). You'd need to use
XQueryTree() (check e.g. the xsnow patch -- it finds the applet windows)
and find windows with _HILDON_LIVE_DESKTOP_BACKGROUND  0 window
property on them, and then provide UI for manipulating the property, and
perhaps even killing the processes (when _NET_WM_PID is provided by the
window). See test-live-bg.c for example code on how to set this
property.

-Kimmo

 
 Sivan

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Live Backgrounds in PR1.2 hildon-desktop

2010-06-01 Thread Kamen Bundev
One can probably use Vala if such VAPIs are available.

Bundyo

2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com

 On Tue, 2010-06-01 at 10:41 +0200, ext Sivan Greenberg wrote:
  That is very cool Kimmo!
 
  I have a life improving app use case for that, I'll be sure to check
  you examples.
 
  The manager has to be written in C/GTK or can be eased off in PyGtk ?

 I think the Control Panel plugin API is C/GTK only since the plugin runs
 inside the Control Panel application.  You'd need to be somehow familiar
 with X11 programming, since it would involve finding out the current
 live backgrounds and offer UI for manipulating the window property on
 them.  Actually it's possible to put any application as the live
 background, and it could even work if the application only depends on
 ButtonPress, ButtonRelease and Motion events (which are forwarded by
 hildon-desktop to the live background window).

 -Kimmo

 
  Sivan
 
  2010/6/1 Kimmo Hämäläinen kimmo.hamalai...@nokia.com:
   Hello!
  
   The PR1.2 has a super-secret, unplanned feature that we smuggled in:
   so-called live backgrounds support in hildon-desktop (=
 1:2.2.133-1).
   Live background is a window that is displayed below or front of the
 Home
   applets, either in a specific desktop view (panning with the view) or
 as
   common for all views (static).
  
   Live background window is recognised when an integer-valued
   _HILDON_LIVE_DESKTOP_BACKGROUND window property is found in the window:
  
   0this client is not a live background
   1-4  home view specific live background
   101-104  home view specific live foreground (above applets)
   -1   global live background used for all home views
   -101 global live foreground used for all home views
  
   Notice that you probably want to use a transparent window for live
   foregrounds so that the applets and the background image are still
   visible.  What you also want (I tell you) is to pause the animation
 of
   the background when it's not visible.  I have ported xsnow for
   demonstrating how to do the pausing and detect positions of the Home
   applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also
   trying to create a Garage project for it). The xsnow pausing is not
   optimal (it periodically wakes up to check sysfs for the display
   brightness), but it has not eaten all my battery even if I let it run
   overnight.
  
   Someone could write a Control Panel plugin for managing live
 backgrounds
   (these window properties), since there is no tool as yet.
  
   There is a basic code example / test program here:
  
 http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/tests/test-live-bg.c
  
   -Kimmo
  
  
   ___
   maemo-developers mailing list
   maemo-developers@maemo.org
   https://lists.maemo.org/mailman/listinfo/maemo-developers
  
  

 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


xsnow (Re: Live Backgrounds in PR1.2 hildon-desktop)

2010-06-01 Thread Kimmo Hämäläinen
On Tue, 2010-06-01 at 09:33 +0200, Hamalainen Kimmo (Nokia-D/Helsinki)
wrote:
...
 the background when it's not visible.  I have ported xsnow for
 demonstrating how to do the pausing and detect positions of the Home
 applets, the xsnow patch (against xsnow 1:1.42-8) is attached (I'm also

Maybe it's not Christmas season yet but xsnow is now available from
extras-devel. ;)

Notice that you need to kill it from the terminal, it does not have any
quit button on it, and that it goes on your current desktop (make sure
you have some applets on it).

The PR1.2 version of hildon-desktop still has some bugs related to the
live background feature. Those are fixed in the git master and should be
in the next SW update also. But it is usable, just may need some
workarounds.

-Kimmo


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers