user-notification: add new function ‘user_notification_add()’

This commit is contained in:
Daniel Eklöf 2021-02-12 09:25:29 +01:00
parent df1ed1c8cf
commit 2a99c5a093
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 46 additions and 1 deletions

View file

@ -1,7 +1,10 @@
#pragma once
#include <stdbool.h>
#include <tllist.h>
#include "macros.h"
enum user_notification_kind {
USER_NOTIFICATION_DEPRECATED,
USER_NOTIFICATION_WARNING,
@ -22,3 +25,7 @@ user_notifications_free(user_notifications_t *notifications)
free(it->item.text);
tll_free(*notifications);
}
bool user_notification_add(user_notifications_t *notifications,
enum user_notification_kind kind,
const char *fmt, ...) PRINTF(3);