marco pesenti gritti wrote:
 > On Sat, Jan 24, 2009 at 5:23 AM, John Watlington <w...@laptop.org> wrote:
 > >
 > > What can I call from an activity (in python) to indicate that the
 > > backlight
 > > should be turned off ?
 > >
 > > I'm playing with a photoframe app, and want to have the ability to
 > > deliberately
 > > control the backlight level from the UI.
 > 
 > See
 > 
 > http://git.sugarlabs.org/projects/sugar/repos/mainline/blobs/master/src/jarabe/m
 > odel/screen.py

i've eventually come around to the notion that brightness
requests all need to be brokered by ohmd (partly because the /sys
nodes in question need root access, and partly because ohmd needs
to track user requests so it can do intelligent dimming).

but if ohmd is going to be in the middle, then the published
api for requesting those changes should be more transparent than
requiring every application be in python and have knowledge of
dbus.  that code in screen.py should a) be reimplemented in C (or
shell?  via dbus-send?) to remove the python dependency -- it
should have no more system dependencies than ohm itself, and b)
be installed in /usr/bin as a standalone executable.  it should
probably be packaged with ohmd itself.  then the api for program's
like wad's would be a simple program invocation.  (i know running
a program sounds expensive, but i can't at the moment think of
another completely generic, language neutral mechanism -- dbus
would still be available for apps that wanted to use it, of
course.)

the same could be argued for any of the system tuning knobs that
ohmd provides -- imagine the problem faced by anyone trying to
implement a non-sugar distribution on the XO:  the mechanisms
for turning those knobs should be as lightweight and generic
as possible.

paul
=---------------------
 paul fox, p...@laptop.org
_______________________________________________
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel

Reply via email to