11#ifndef DUNST_NOTIFICATION_H
12#define DUNST_NOTIFICATION_H
16#include <pango/pango-layout.h>
22#define DUNST_NOTIF_MAX_CHARS 50000
58 NotificationPrivate *priv;
64 struct rule *original;
72 int override_pause_level;
97 enum markup_mode markup;
115 int displayed_height;
118 guint8 marked_for_closure;
121 PangoEllipsizeMode ellipsize;
122 PangoAlignment alignment;
216void notification_replace_format(
struct notification *n,
const char *format);
241 const char *replacement,
242 enum markup_mode markup_mode);
244void notification_update_text_to_render(
struct notification *n);
275const char *notification_urgency_to_string(
const enum urgency urgency);
Layout and render notifications.
Markup handling for notifications body.
void notification_do_action(struct notification *n)
If the notification has an action named n->default_action_name or there is only one action and n->def...
void notification_ref(struct notification *n)
Increase the reference counter of the notification.
int notification_cmp_data(const void *va, const void *vb, void *data)
Wrapper for notification_cmp to match glib's compare functions signature.
int notification_cmp(const struct notification *a, const struct notification *b)
Helper function to compare two given notifications.
void notification_invalidate_actions(struct notification *n)
Remove all client action data from the notification.
void notification_open_url(struct notification *n)
If the notification has exactly one url, invoke it.
urgency
Representing the urgencies according to the notification spec.
@ URG_NONE
Urgency not set (invalid)
@ URG_NORM
Normal urgency.
@ URG_MIN
Minimum value, useful for boundary checking.
@ URG_CRIT
Critical urgency.
@ URG_MAX
Maximum value, useful for boundary checking.
void notification_run_script(struct notification *n)
Run the script associated with the given notification.
gint notification_refcount_get(struct notification *n)
Retrieve the current reference count of the notification.
void notification_icon_replace_path(struct notification *n, const char *new_icon)
Replace the current notification's icon with the icon specified by path.
void notification_init(struct notification *n)
Sanitize values of notification, apply all matching rules and generate derived fields.
void notification_transfer_icon(struct notification *from, struct notification *to)
Transfer the image surface of from to to.
void notification_open_context_menu(struct notification *n)
Open the context menu for the notification.
void notification_replace_single_field(char **haystack, char **needle, const char *replacement, enum markup_mode markup_mode)
Replace the two chars where **needle points with a quoted "replacement", according to the markup sett...
void notification_print(const struct notification *n)
print a human readable representation of the given notification to stdout.
void notification_unref(struct notification *n)
Decrease the reference counter of the notification.
const char * enum_to_string_fullscreen(enum behavior_fullscreen in)
Return the string representation for fullscreen behavior.
struct notification * notification_create(void)
Create notification struct and initialise all fields with either.
@ FS_SHOW
Show the message when in fullscreen mode.
@ FS_PUSHBACK
When entering fullscreen mode, push the notification back to waiting.
@ FS_DELAY
Delay the notification until leaving fullscreen mode.
void notification_icon_replace_data(struct notification *n, GVariant *new_icon)
Replace the current notification's icon with the raw icon given in the GVariant.
char * stack_tag
stack notifications by tag
char * icon_path
Full path to the notification's icon.
bool receiving_raw_icon
Still waiting for raw icon to be received.
PangoAlignment progress_bar_alignment
Horizontal alignment of the progress bar.
int min_icon_size
Minimum icon size.
bool script_run
Has the script been executed already?
char * desktop_entry
The desktop entry hint sent via every GApplication.
enum icon_position icon_position
Icon position (enum left,right,top,off).
char * msg
formatted message
int locked
If non-zero the notification is locked.
char * iconname
plain icon information (may be a path or just a name) as recieved from dbus.
int skip_display
insert notification into history, skipping initial waiting and display
int progress
percentage (-1: undefined)
gint64 icon_time
Time of reception of the icon (or opening of the file in case of a path)
int max_icon_size
Maximum icon size.
int history_ignore
push to history or free directly
cairo_surface_t * icon
The raw cached icon data used to draw.
guint8 marked_for_removal
If set, the notification is marked for removal in history.
gint64 timestamp
arrival time (in milliseconds)
char * text_to_render
formatted message (with age and action indicators)
char * urls
urllist delimited by '\n'
bool first_render
markup has been rendered before?
char * icon_id
Plain icon information, which acts as the icon's id.
enum behavior_fullscreen fullscreen
The instruction what to do with it, when desktop enters fullscreen.
bool redisplayed
has been displayed before?
gint64 start
begin of current display (in milliseconds)
bool transient
timeout albeit user is idle
char * default_icon_name
The icon that is used when no other icon is available.
char * default_action_name
The name of the action to be invoked on do_action.
gint64 timeout
time to display (in milliseconds)
gint64 dbus_timeout
time to display (in milliseconds) (set by dbus)
int dup_count
amount of duplicate notifications stacked onto this