data: Add vibration API
The API is meant to trigger the given vibration pattern on the haptic device. The pattern is sequence of relative amplitude and duration pairs. A magnitude of 0.0 indicates a pause. Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
+4
-1
@@ -4,7 +4,10 @@ namespace = 'LfbGdbus'
|
|||||||
|
|
||||||
generated_dbus_sources = []
|
generated_dbus_sources = []
|
||||||
|
|
||||||
dbus_interfaces = [ 'org.sigxcpu.Feedback.xml' ]
|
dbus_interfaces = [
|
||||||
|
'org.sigxcpu.Feedback.xml',
|
||||||
|
'org.sigxcpu.Feedback.Haptic.xml',
|
||||||
|
]
|
||||||
|
|
||||||
generated_dbus_sources += gnome.gdbus_codegen('lfb-gdbus',
|
generated_dbus_sources += gnome.gdbus_codegen('lfb-gdbus',
|
||||||
sources : dbus_interfaces,
|
sources : dbus_interfaces,
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<node>
|
||||||
|
<!-- org.sigxcpu.Feedback.Haptic
|
||||||
|
@short_description: Interface to make a device vibrate
|
||||||
|
|
||||||
|
This D-Bus interface is used to make a device's haptic motor
|
||||||
|
vibrate. This is can be useful e.g. for games.
|
||||||
|
|
||||||
|
To provider user feedback the event based interface should be
|
||||||
|
preferred.
|
||||||
|
-->
|
||||||
|
<interface name="org.sigxcpu.Feedback.Haptic">
|
||||||
|
<!--
|
||||||
|
Vibrate:
|
||||||
|
@app_id: The application id usually in "reverse DNS" format
|
||||||
|
@pattern: The vibration pattern.
|
||||||
|
@success: Whether vibration was triggered
|
||||||
|
|
||||||
|
Triggers the given vibration pattern on the haptic device. The
|
||||||
|
pattern is a sequence of relative amplitude and duration pairs.
|
||||||
|
The amplitude must be between 0.0 and 1.0.
|
||||||
|
-->
|
||||||
|
<method name="Vibrate">
|
||||||
|
<arg direction="in" name="app_id" type="s"/>
|
||||||
|
<arg direction="in" name="pattern" type="a(du)"/>
|
||||||
|
<arg direction="out" name="success" type="b"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
|
||||||
|
</node>
|
||||||
Reference in New Issue
Block a user