|
Dunst
Lightweight notification daemon
|
Queues for history, waiting and displayed notifications. More...
Include dependency graph for queues.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | queues_init (void) |
| Initialise necessary queues. | |
| GList * | queues_get_displayed (void) |
| Receive the current list of displayed notifications. | |
| GList * | queues_get_history (void) |
| Recieve the list of all notifications encountered. | |
| struct notification * | queues_get_head_waiting (void) |
| Get the highest notification in line. | |
| unsigned int | queues_length_waiting (void) |
| Returns the current amount of notifications, which are waiting to get displayed. | |
| unsigned int | queues_length_displayed (void) |
| Returns the current amount of notifications, which are shown in the UI. | |
| unsigned int | queues_length_history (void) |
| Returns the current amount of notifications, which are already in history. | |
| int | queues_notification_insert (struct notification *n) |
| Insert a fully initialized notification into queues. | |
| bool | queues_notification_replace_id (struct notification *new) |
| Replace the notification which matches the id field of the new notification. | |
| void | queues_notification_close_id (gint id, enum reason reason) |
| Close the notification that has n->id == id. | |
| void | queues_notification_close (struct notification *n, enum reason reason) |
| Close the given notification. | |
| void | queues_notification_remove (struct notification *n, enum reason reason) |
| Remove the given notification from all queues. | |
| void | queues_notification_remove_id (gint id, enum reason reason) |
| Remove the notification that has n->id == id. | |
| guint | queues_history_clear (void) |
| Removes all notifications from history Returns the number of removed notifications. | |
| void | queues_history_pop (void) |
| Pushes the latest notification of history to the displayed queue and removes it from history. | |
| void | queues_history_pop_by_id (gint id) |
| Pushes the latest notification found in the history buffer identified by it's assigned id. | |
| void | queues_history_push (struct notification *n) |
| Push a single notification to history The given notification has to be removed its queue. | |
| void | queues_history_push_all (void) |
| Push all waiting and displayed notifications to history. | |
| bool | queues_history_remove_by_id (gint id) |
| Removes an notification identified by the given id from the history. | |
| void | queues_update (struct dunst_status status, gint64 time) |
| Move inserted notifications from waiting queue to displayed queue and show them. | |
| gint64 | queues_get_next_datachange (gint64 time) |
| Calculate the distance to the next event, when an element in the queues changes. | |
| 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. | |
| void | queues_reapply_all_rules (void) |
| Reapply all rules to the queue (used when reloading configs) | |
| void | queues_teardown (void) |
| Remove all notifications from all list and free the notifications. | |
Queues for history, waiting and displayed notifications.
Every method requires to have executed queues_init() at the start.
A read only representation of the queue with the current notifications can get acquired by calling queues_get_displayed().
When ending the program or resetting the queues, tear down the stack with queues_teardown(). (And reinit with queues_init() if needed.)
Definition in file queues.h.
| struct notification * queues_get_by_id | ( | gint | id | ) |
| GList * queues_get_displayed | ( | void | ) |
| struct notification * queues_get_head_waiting | ( | void | ) |
| GList * queues_get_history | ( | void | ) |
| gint64 queues_get_next_datachange | ( | gint64 | time | ) |
Calculate the distance to the next event, when an element in the queues changes.
| time | the current time |
| guint queues_history_clear | ( | void | ) |
| void queues_history_pop | ( | void | ) |
| void queues_history_pop_by_id | ( | gint | id | ) |
| void queues_history_push | ( | struct notification * | n | ) |
| void queues_history_push_all | ( | void | ) |
| bool queues_history_remove_by_id | ( | gint | id | ) |
| void queues_init | ( | void | ) |
Initialise necessary queues.
| unsigned int queues_length_displayed | ( | void | ) |
| unsigned int queues_length_history | ( | void | ) |
| unsigned int queues_length_waiting | ( | void | ) |
| void queues_notification_close | ( | struct notification * | n, |
| enum reason | reason ) |
Close the given notification.
| n | (transfer full) The notification to close |
| reason | The reason to close |
| void queues_notification_close_id | ( | gint | id, |
| enum reason | reason ) |
Close the notification that has n->id == id.
Sends a signal and pushes the selected notification automatically to history.
| id | The id of the notification to close |
| reason | The reason to close |
| int queues_notification_insert | ( | struct notification * | n | ) |
Insert a fully initialized notification into queues.
Respects stack_duplicates, and notification replacement
| n | the notification to insert |
n->id | 0 | if the notification was dismissed and freed |
| void queues_notification_remove | ( | struct notification * | n, |
| enum reason | reason ) |
| void queues_notification_remove_id | ( | gint | id, |
| enum reason | reason ) |
Remove the notification that has n->id == id.
Sends a signal and removes the selected notification from all queues.
| id | The id of the notification to remove |
| reason | The reason to remove |
| bool queues_notification_replace_id | ( | struct notification * | new | ) |
Replace the notification which matches the id field of the new notification.
The given notification is inserted right in the same position as the old notification.
| new | replacement for the old notification |
| true | if a matching notification has been found and is replaced |
| false | otherwise |
| void queues_reapply_all_rules | ( | void | ) |
| void queues_teardown | ( | void | ) |
Remove all notifications from all list and free the notifications.
| void queues_update | ( | struct dunst_status | status, |
| gint64 | time ) |
Move inserted notifications from waiting queue to displayed queue and show them.
In displayed queue, the amount of elements is limited to the amount set via queues_displayed_limit()
| status | the current status of dunst |
| time | the current time |