diff options
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/info.h | 16 | 
1 files changed, 12 insertions, 4 deletions
| diff --git a/includes/info.h b/includes/info.h index 164d1a16..20efdcb8 100644 --- a/includes/info.h +++ b/includes/info.h @@ -81,10 +81,18 @@ void info_group_add_fieldsv(struct InfoGroup *group, va_list ap);  struct InfoField info_field_printf(const gchar *name, const gchar *format, ...)      __attribute__((format(printf, 2, 3))); -#define info_field_full(...) (struct InfoField) { __VA_ARGS__ } -#define info_field(n, v) info_field_full(.name = (n), .value = (v)) -#define info_field_update(n, ui) info_field_full(.name = (n), .value = "...", .update_interval = (ui)) -#define info_field_last() (struct InfoField) {} +#define info_field_full(...)                                                   \ +    (struct InfoField) { __VA_ARGS__ } + +#define info_field(n, v, ...)                                                  \ +    info_field_full(.name = (n), .value = (v), __VA_ARGS__) + +#define info_field_update(n, ui, ...)                                          \ +    info_field_full(.name = (n), .value = "...", .update_interval = (ui),      \ +                    __VA_ARGS__) + +#define info_field_last()                                                      \ +    (struct InfoField) {}  static inline struct InfoField info_field_with_icon(struct InfoField field, const gchar *icon)  { | 
