Patch to hal-spec : 3/6-button
Richard Hughes
ee21rh at surrey.ac.uk
Thu Jan 13 05:01:48 PST 2005
David Zeuthen <david <at> fubar.dk> writes:
>
> One important (compared to my nitpicks thing; as you can
> see here
>
> http://cvs.freedesktop.org/*checkout*/hal/hal/doc/spec/hal-
> spec.html#device-properties-volume
Okay, never noticed DeviceConditions before :-)
> we also have the concept called DeviceConditions which represent
> things that cannot be captured in properties. So, we should use
> that to convey that someone pressed the button; What about calling
> the conditions SystemButtonPressed and SystemButtonReleased?
The ACPI events don't do "released" I don't think. If just hold down my suspend
button I get multiple "pressed" events, but don't ever get a "released" event.
I appreciate this is a generic system.button specification, maybe we can just
reuse the property system.button.has_state identifying switches that maintain
thier own state, or do we need a property:
system.button.uses_release = Button can emit "SystemButtonReleased"
or does system.button.has_state already do what we require?
This will allow any program using system.button to know whether to:
1) expect just a SystemButtonPressed
2) expect a SystemButtonPressed/SystemButtonReleased pair.
This is what I've added so far:
<para>
Device objects with this capability may emit the following events.
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Condition Name</entry>
<entry>Parameters</entry>
<entry>Example</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>SystemButtonPressed</literal> (int)</entry>
<entry>system.button.type (string)</entry>
<entry>sleep</entry>
<entry>Emitted when a button is pressed</entry>
</row>
<row>
<entry><literal>SystemButtonReleased</literal> (int)</entry>
<entry>system.button.type (string)</entry>
<entry>suspend</entry>
<entry>Emitted when a button is released</entry>
</row>
</tbody>
</tgroup>
</informaltable>
Richard
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list