Documentation
¶
Overview ¶
Package feedback implements Go bindings for libfeedback. Requires Cgo and feedbackd (libfeedback-dev) to be installed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeedbackEvent ¶
type FeedbackEvent struct {
// contains filtered or unexported fields
}
func (*FeedbackEvent) TriggerFeedback ¶
func (e *FeedbackEvent) TriggerFeedback() (bool, error)
TriggerFeedback triggers the feedback for the event. If the same event is triggered twice, an error is returned. If the program is terminated immediately after calling this function, the result might not be noticeable. That is because feedbackd terminates feedback from clients that disconnect from DBus, to avoid feedback not being stopped.
func (*FeedbackEvent) TriggerFeedbackAsync ¶
func (e *FeedbackEvent) TriggerFeedbackAsync() error
TriggerFeedbackAsync triggers feedback for the event asynchronously. See the sync version of this function for more details.
type Feedbacker ¶
type Feedbacker struct { }
Feedbacker is the main struct to interact with. It encapsulates a single feedback event.
func NewFeedbacker ¶
func NewFeedbacker(appID string) (*Feedbacker, error)
NewFeedbacker inits the underlying libfeedback.
func (*Feedbacker) NewEvent ¶
func (f *Feedbacker) NewEvent(name string) (*FeedbackEvent, error)
NewEvent creates a new feedback event. This needs to be called before calling TriggerFeedback.