Top | ![]() |
![]() |
![]() |
![]() |
gboolean | lfb_init () |
void | lfb_uninit () |
void | lfb_set_app_id () |
const char * | lfb_get_app_id () |
gboolean | lfb_is_initted () |
void | lfb_set_feedback_profile () |
const char * | lfb_get_feedback_profile () |
LfbGdbusFeedback * | lfb_get_proxy () |
To use the library call lfb_init()
with the id of your application
(usually the desktop file name without the .desktop extension).
After initializing the library you can trigger feedback using
LfbEvent objects. When your application finishes call
lfb_uninit()
to free any resources:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#define LIBFEEDBACK_USE_UNSTABLE_API #include <libfeedback.h> int main(void) { g_autoptr (GError) *err = NULL; if (lfb_init ("com.example.appid", &err)) { g_error ("%s", err->message); } ... lfb_uninit (); return 0; } |
gboolean lfb_init (const gchar *app_id
,GError **error
);
Initialize libfeedback. This must be called before any other functions.
void
lfb_uninit (void
);
Uninitialize the library when no longer used. Usually called on program shutdown.
void
lfb_set_feedback_profile (const char *profile
);
Sets the active feedback profile to profile. It is up to the feedback daemon to ignore this request. The new profile might not become active immediately. You can listen to changes LfbGdbusFeedback's ::profile property to get notified when it takes effect.
const char *
lfb_get_feedback_profile (void
);
Gets the currently set feedback profile.
LfbGdbusFeedback *
lfb_get_proxy (void
);
This can be used to access the lower level API e.g. to listen to property changes. The object is not owned by the caller. Don't unref it after use.