haptic

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: MIT, Unlicense Imports: 1 Imported by: 0

README

haptic

Go Reference

Haptic feedback for Gio applications.

Status

Experimental. API is not stable, so use go modules to lock to a particular version.

This build provides a no-op implementation. The API is identical across platforms so it can be called safely from cross-platform code.

Documentation

Overview

Package haptic implements haptic feedback support for gio.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buzzer

type Buzzer struct {
}

Buzzer provides methods to trigger haptic feedback. All methods are no-ops on the platforms supported by this build.

func NewBuzzer

func NewBuzzer(_ *app.Window) *Buzzer

NewBuzzer constructs a buzzer.

func (*Buzzer) Buzz

func (b *Buzzer) Buzz() bool

Buzz attempts to trigger a haptic vibration without blocking. It returns whether or not it was successful. If it returns false, it is safe to retry. On unsupported platforms, it always returns true.

func (*Buzzer) Errors

func (b *Buzzer) Errors() <-chan error

Errors returns a channel of errors. Always nil on the platforms supported by this build.

func (*Buzzer) SetView

func (b *Buzzer) SetView(_ uintptr)

SetView is a no-op on the platforms supported by this build.

func (*Buzzer) Shutdown

func (b *Buzzer) Shutdown()

Shutdown is a no-op on the platforms supported by this build.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL