diff --git a/src/notification.c b/src/notification.c index 6418b09..d18f001 100644 --- a/src/notification.c +++ b/src/notification.c @@ -28,6 +28,18 @@ static void notification_extract_urls(notification *n); static void notification_format_message(notification *n); static void notification_dmenu_string(notification *n); +/* see notification.h */ +const char *enum_to_string_fullscreen(enum behavior_fullscreen in) +{ + switch (in) { + case FS_SHOW: return "show"; + case FS_DELAY: return "delay"; + case FS_NULL: return "(null)"; + default: + LOG_E("Enum behavior_fullscreen has wrong value."); + } +} + /* * print a human readable representation * of the given notification to stdout. @@ -49,6 +61,7 @@ void notification_print(notification *n) printf("\tfg: %s\n", n->colors[ColFG]); printf("\tbg: %s\n", n->colors[ColBG]); printf("\tframe: %s\n", n->colors[ColFrame]); + printf("\tfullscreen: %s\n", enum_to_string_fullscreen(n->fullscreen)); printf("\tid: %d\n", n->id); if (n->urls) { char *urls = string_replace_all("\n", "\t\t\n", g_strdup(n->urls)); diff --git a/src/notification.h b/src/notification.h index 0d619c1..09d2899 100644 --- a/src/notification.h +++ b/src/notification.h @@ -101,5 +101,14 @@ void notification_update_text_to_render(notification *n); void notification_do_action(notification *n); const char *notification_urgency_to_string(enum urgency urgency); + +/** + * Return the string representation for fullscreen behavior + * + * @param in the #behavior_fullscreen enum value to represent + * @return the string representation for `in` + */ +const char *enum_to_string_fullscreen(enum behavior_fullscreen in); + #endif /* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */