haptic-manager: New object to handle the Haptic DBus interface

To trigger a 200ms rumble at 100%, a 50ms pause and a 300ms rumble at 50%:

   busctl call --user org.sigxcpu.Feedback /org/sigxcpu/Feedback org.sigxcpu.Feedback.Haptic Vibrate 'sa(du)' org.foo.app 3 1.0 200  0.0 50  0.5 300

To cancel an ongoing pattern:

   busctl call --user org.sigxcpu.Feedback /org/sigxcpu/Feedback org.sigxcpu.Feedback.Haptic Vibrate 'sa(du)' org.foo.app 0

The API has lower priority than the event based API to e.g.  not miss
incoming phone calls or cell broadast messages.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
Guido Günther
2024-12-15 18:54:40 +01:00
parent 93dc859f7d
commit 31c7bf7d6b
3 changed files with 224 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ sources = [
'fbd-feedback-vibra-pattern.c',
'fbd-feedback-vibra-periodic.c',
'fbd-feedback-vibra-rumble.c',
'fbd-haptic-manager.c',
'fbd-theme-expander.c',
'fbd-udev.c',
]