Dunst
Lightweight notification daemon
Loading...
Searching...
No Matches
queues.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause */
18
19#ifndef DUNST_QUEUE_H
20#define DUNST_QUEUE_H
21
22#include "dbus.h"
23#include "dunst.h"
24#include "notification.h"
25
32void queues_init(void);
33
39GList *queues_get_displayed(void);
40
46GList *queues_get_history(void);
47
55
60unsigned int queues_length_waiting(void);
61
66unsigned int queues_length_displayed(void);
67
72unsigned int queues_length_history(void);
73
88
100
112void queues_notification_close_id(gint id, enum reason reason);
113
122
132
145
150guint queues_history_clear(void);
151
156void queues_history_pop(void);
157
162void queues_history_pop_by_id(gint id);
163
170void queues_history_push(struct notification *n);
171
175void queues_history_push_all(void);
176
180bool queues_history_remove_by_id(gint id);
181
193void queues_update(struct dunst_status status, gint64 time);
194
207gint64 queues_get_next_datachange(gint64 time);
208
217struct notification* queues_get_by_id(gint id);
218
222void queues_reapply_all_rules(void);
223
229void queues_teardown(void);
230
231#endif
DBus support and implementation of the Desktop Notifications Specification.
reason
The reasons according to the notification spec.
Definition dbus.h:18
Main event loop logic.
Notification type definitions.
int queues_notification_insert(struct notification *n)
Insert a fully initialized notification into queues.
Definition queues.c:169
void queues_notification_remove_id(gint id, enum reason reason)
Remove the notification that has n->id == id.
unsigned int queues_length_waiting(void)
Returns the current amount of notifications, which are waiting to get displayed.
Definition queues.c:55
void queues_notification_remove(struct notification *n, enum reason reason)
Remove the given notification from all queues.
Definition queues.c:386
void queues_init(void)
Initialise necessary queues.
Definition queues.c:33
GList * queues_get_displayed(void)
Receive the current list of displayed notifications.
Definition queues.c:41
void queues_history_pop(void)
Pushes the latest notification of history to the displayed queue and removes it from history.
Definition queues.c:409
void queues_teardown(void)
Remove all notifications from all list and free the notifications.
Definition queues.c:706
void queues_notification_close(struct notification *n, enum reason reason)
Close the given notification.
Definition queues.c:380
gint64 queues_get_next_datachange(gint64 time)
Calculate the distance to the next event, when an element in the queues changes.
Definition queues.c:620
void queues_reapply_all_rules(void)
Reapply all rules to the queue (used when reloading configs)
Definition queues.c:679
guint queues_history_clear(void)
Removes all notifications from history Returns the number of removed notifications.
Definition queues.c:400
unsigned int queues_length_history(void)
Returns the current amount of notifications, which are already in history.
Definition queues.c:67
void queues_notification_close_id(gint id, enum reason reason)
Close the notification that has n->id == id.
Definition queues.c:354
unsigned int queues_length_displayed(void)
Returns the current amount of notifications, which are shown in the UI.
Definition queues.c:61
void queues_history_pop_by_id(gint id)
Pushes the latest notification found in the history buffer identified by it's assigned id.
Definition queues.c:421
void queues_history_push_all(void)
Push all waiting and displayed notifications to history.
Definition queues.c:465
bool queues_notification_replace_id(struct notification *new)
Replace the notification which matches the id field of the new notification.
Definition queues.c:328
struct notification * queues_get_head_waiting(void)
Get the highest notification in line.
Definition queues.c:47
void queues_history_push(struct notification *n)
Push a single notification to history The given notification has to be removed its queue.
Definition queues.c:449
void queues_update(struct dunst_status status, gint64 time)
Move inserted notifications from waiting queue to displayed queue and show them.
Definition queues.c:501
struct notification * queues_get_by_id(gint id)
Get the notification which has the given id in the displayed and waiting queue or NULL if not found.
Definition queues.c:662
GList * queues_get_history(void)
Recieve the list of all notifications encountered.
Definition queues.c:73
bool queues_history_remove_by_id(gint id)
Removes an notification identified by the given id from the history.
Definition queues.c:477