Ubuntu – Is libunity planning on including functions for Unity Lenses

11.04launcherlensesunity

I am unclear on this, because I have heard mention of a proposed API for Unity Lenses, and such an API would be extremely useful for projects involving home automation.

I am interested in developing in that direction, but I haven't been able to find the API for Unity Lenses. It would make the most sense of libunity was to include Unity Lenses because it would put all the functionality of the Unity launcher into one place. If libunity is not the API for Lenses, does such an API exist, and how would I find it?

Best Answer

Note: The user visible name is Lenses, however in the code and packages they're still referred to as Places. "Places" as a term will be fully retired in 11.10

Both default Lenses, unity-place-files and unity-place-applications, are in fact based on public API exposed via libunity.

Unfortunately there are no API docs available for libunity yet - but that will change in the weeks to come. Monitor planet.ubuntu.com or watch the Natty archives for a libunity-doc package. For now there is a simple example in lp:unity-place-sample, if you cross ref that with https://wiki.ubuntu.com/Unity/Lenses you may have a chance of getting something going.

Another important library when writing lenses for Unity is Dee. It's a data model library used to do ad-hoc sharing of data models between processes (in this case the place daemon and Unity). Dee is fully documented and you can find the docs in the libdee-doc package (or you can build it yourself from lp:dee).

To grab the code for either project you can do:

bzr branch lp:unity-place-sample
bzr branch lp:dee