Restructure notification struct and add comments

This commit is contained in:
Benedikt Heine 2017-10-29 16:25:04 +01:00
parent 714731e8fc
commit d190af6db1

View File

@ -35,34 +35,44 @@ typedef struct _actions {
} Actions; } Actions;
typedef struct _notification { typedef struct _notification {
int id;
char *dbus_client;
char *appname; char *appname;
char *summary; char *summary;
char *body; char *body;
char *icon;
RawImage *raw_icon;
char *msg; /* formatted message */
char *category; char *category;
char *text_to_render;
const char *format;
char *dbus_client;
gint64 start;
gint64 timestamp;
gint64 timeout;
enum urgency urgency; enum urgency urgency;
enum markup_mode markup;
bool redisplayed; /* has been displayed before? */
int id;
int dup_count;
int displayed_height;
const char *color_strings[3];
bool first_render;
bool transient;
int progress; /* percentage (-1: undefined) */ char *icon; /* plain icon information (may be a path or just a name) */
int history_ignore; RawImage *raw_icon; /* passed icon data of notification, takes precedence over icon */
const char *script;
char *urls; gint64 start; /* begin of current display */
gint64 timestamp; /* arrival time */
gint64 timeout; /* time to display */
Actions *actions; Actions *actions;
enum markup_mode markup;
const char *format;
const char *color_strings[3];
const char *script;
/* Hints */
bool transient; /* timeout albeit user is idle */
int progress; /* percentage (-1: undefined) */
int history_ignore; /* push to history or free directly */
/* internal */
bool redisplayed; /* has been displayed before? */
bool first_render; /* markup has been rendered before? */
int dup_count; /* amount of duplicate notifications stacked onto this */
int displayed_height;
/* derived fields */
char *msg; /* formatted message */
char *text_to_render; /* formatted message (with age and action indicators) */
char *urls; /* urllist */
} notification; } notification;
notification *notification_create(void); notification *notification_create(void);