diff --git a/doc/libtinynotify-sections.txt b/doc/libtinynotify-sections.txt index 445a923..07df132 100644 --- a/doc/libtinynotify-sections.txt +++ b/doc/libtinynotify-sections.txt @@ -57,6 +57,7 @@ NOTIFICATION_CLOSED_BY_USER NotificationCloseCallback NOTIFICATION_FREE_ON_CLOSE NOTIFICATION_NOOP_ON_CLOSE +NOTIFICATION_NO_CLOSE_CALLBACK notification_bind_close_callback NotifyDispatchStatus NOTIFY_DISPATCH_DONE diff --git a/lib/tinynotify.h b/lib/tinynotify.h index 707fcee..a5d3e57 100644 --- a/lib/tinynotify.h +++ b/lib/tinynotify.h @@ -664,14 +664,27 @@ extern const NotificationCloseCallback NOTIFICATION_NOOP_ON_CLOSE; */ extern const NotificationCloseCallback NOTIFICATION_FREE_ON_CLOSE; +/** + * NOTIFICATION_NO_CLOSE_CALLBACK + * + * A constant used to disable close callback. + */ +extern const NotificationCloseCallback NOTIFICATION_NO_CLOSE_CALLBACK; + /** * notification_bind_close_callback * @notification: notification to operate on - * @callback: new callback function, or %NULL to disable + * @callback: new callback function, or %NOTIFICATION_NO_CLOSE_CALLBACK + * to disable * @user_data: additional user data to pass to the callback * * Bind a callback function which will be executed when notification is closed, - * or remove a current binding (when @callback is %NULL). + * or remove a current binding (when @callback is + * %NOTIFICATION_NO_CLOSE_CALLBACK). + * + * A few standard callbacks are provided as well: + * - %NOTIFICATION_NOOP_ON_CLOSE, + * - %NOTIFICATION_FREE_ON_CLOSE. */ void notification_bind_close_callback(Notification notification, NotificationCloseCallback callback, void* user_data);