87 lines
4.0 KiB
XML
87 lines
4.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<protocol name="touchpad_haptics_unstable_v1">
|
|
|
|
<copyright>
|
|
Copyright 2021 The Chromium Authors.
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
copy of this software and associated documentation files (the "Software"),
|
|
to deal in the Software without restriction, including without limitation
|
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
and/or sell copies of the Software, and to permit persons to whom the
|
|
Software is furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice (including the next
|
|
paragraph) shall be included in all copies or substantial portions of the
|
|
Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
DEALINGS IN THE SOFTWARE.
|
|
</copyright>
|
|
|
|
<interface name="zcr_touchpad_haptics_v1" version="1">
|
|
<description summary="Allows to play haptic feedback effects on touchpad">
|
|
Allows to play haptic feedback effects on touchpad.
|
|
|
|
Warning! The protocol described in this file is experimental and
|
|
backward incompatible changes may be made. Backward compatible changes
|
|
may be added together with the corresponding uinterface version bump.
|
|
Backward incompatible changes are done by bumping the version number in
|
|
the protocol and uinterface names and resetting the interface version.
|
|
Once the protocol is to be declared stable, the 'z' prefix and the
|
|
version number in the protocol and interface names are removed and the
|
|
interface version number is reset.
|
|
</description>
|
|
|
|
<request name="destroy" type="destructor">
|
|
<description summary="release the memory for the touchpad haptics object">
|
|
Destroy touchpad_haptics object.
|
|
</description>
|
|
</request>
|
|
|
|
<event name="activated" since="1">
|
|
<description summary="touchpad haptics activated">
|
|
Inform the client that a haptic touchpad is present and ready to perform
|
|
effects.
|
|
</description>
|
|
</event>
|
|
|
|
<event name="deactivated" since="1">
|
|
<description summary="touchpad haptics deactivated">
|
|
Inform the client that no haptic touchpad is available, likely because the
|
|
user disabled haptic effects.
|
|
</description>
|
|
</event>
|
|
|
|
<!-- This enum is from ui/events/devices/haptic_touchpad_effects.h -->
|
|
<enum name="effect">
|
|
<entry name="snap" value="0" summary="UI feedback for snapping into place" />
|
|
<entry name="snap_reverse" value="1" summary="UI feedback for snapping out of place" />
|
|
<entry name="knock" value="2" summary="UI feedback for reaching a limit or boundary" />
|
|
<entry name="tick" value="3" summary="UI feedback for discrete state changes" />
|
|
<entry name="toggle_on" value="4" summary="UI feedback for activating a feature" />
|
|
<entry name="toggle_off" value="5" summary="UI feedback for deactivating a feature" />
|
|
<entry name="press" value="6" summary="Standard touchpad button down effect" />
|
|
<entry name="release" value="7" summary="Standard touchpad button up effect" />
|
|
<entry name="deep_press" value="8" summary="Deeper (more force) touchpad button down effect" />
|
|
<entry name="deep_release" value="9" summary="Deeper (more force) touchpad button up effect" />
|
|
</enum>
|
|
|
|
<request name="play" since="1">
|
|
<description summary="Play haptic feedback">
|
|
Play the given haptic feedback with the given strength.
|
|
The strength should be in [1, 5].
|
|
</description>
|
|
<arg name="effect" type="uint" enum="effect"/>
|
|
<arg name="strength" type="int"/>
|
|
</request>
|
|
|
|
</interface>
|
|
|
|
</protocol>
|