On Mon, 2010-10-11 at 14:46 +0200, ext Kristóf Timur wrote:
> Hi guys,
> 
> I have an interestion question. Been trying to figure it out for quite some
> time now, with limited success so far.
> I would like to have a way of creating homescreen widgets from inside a
> separate (non hildon-home) process. (For example, by clicking on a button
> from inside an application, or something like this.)
> I was able to put together a solution which is able to do this, but as it
> turns out, it ultimately fails on some important things. It is able to
> restore the previous position of the homescreen widgets after a restart, but
> it is ultimately flawed as it's unable to also restore the z-order of the
> widgets (the order in which the desktop widgets are stacked on top of each
> other).
> 
> As I see it, the osso-abook-home-applet is able to do just what I want. It
> manages the contact widgets in its own process and is also able to remember
> the exact homescreen position and z-order of these widgets correctly.
> So, I'm curious about how the osso-abook-home-applet is able to do this. It
> is closed source so I can't look at its source code. I also think that
> libhildondesktop may hold the answers that I need, but unfortunately it is
> largely undocumented, so I can't really figure this one out on my own.

The Z ordering happens in hildon-desktop, see
hd_home_view_restack_applets() in
http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop/blobs/master/src/home/hd-home-view.c

It uses "modified time" to stack the most recent uppermost. That is
reset when ever tapping on an applet (see hd_home_view_applet_press()).

Perhaps if you look at the code, you can find a way to stack it up (e.g.
storing the modified time to GConf with your applet ID, or sending a
fake ButtonPress event).

-Kimmo

> 
> If anyone has a clue about how to do this, I'd be more than happy if you
> guys could help me with this.
> 
> Thanks,
> Timur Kristóf
> (Venemo) 
> 
> _______________________________________________
> 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

Reply via email to