diff options
author | Curtis McEnroe | 2018-08-17 14:00:08 -0400 |
---|---|---|
committer | Curtis McEnroe | 2018-08-17 14:00:08 -0400 |
commit | 38fc42f03d89693fc7e3951fd7257d394f417a6f (patch) | |
tree | de58f141248de2f1f25f1272f865495803490f16 /chat.h | |
parent | a38738c93885fc177a42b280a328471424fc030a (diff) |
Add UI "heat" for status/messages/pings
Bring back the beeps! Allow pings from notices. Also factor out dequoting of part/quit messages.
Diffstat (limited to 'chat.h')
-rw-r--r-- | chat.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/chat.h b/chat.h index d6dfdf7..c66683b 100644 --- a/chat.h +++ b/chat.h @@ -91,12 +91,19 @@ void uiHide(void); void uiExit(void); void uiDraw(void); void uiRead(void); + void uiViewTag(struct Tag tag); void uiViewNum(int num); void uiCloseTag(struct Tag tag); + +enum UIHeat { + UI_COLD, + UI_WARM, + UI_HOT, +}; void uiTopic(struct Tag tag, const char *topic); -void uiLog(struct Tag tag, const wchar_t *line); -void uiFmt(struct Tag tag, const wchar_t *format, ...); +void uiLog(struct Tag tag, enum UIHeat heat, const wchar_t *line); +void uiFmt(struct Tag tag, enum UIHeat heat, const wchar_t *format, ...); enum TermMode { TERM_FOCUS, @@ -155,10 +162,10 @@ int vaswprintf(wchar_t **ret, const wchar_t *format, va_list ap); // HACK: clang won't check wchar_t *format strings. #ifdef NDEBUG -#define uiFmt(tag, format, ...) uiFmt(tag, L##format, __VA_ARGS__) +#define uiFmt(tag, heat, format, ...) uiFmt(tag, heat, L##format, __VA_ARGS__) #else -#define uiFmt(tag, format, ...) do { \ +#define uiFmt(tag, heat, format, ...) do { \ snprintf(NULL, 0, format, __VA_ARGS__); \ - uiFmt(tag, L##format, __VA_ARGS__); \ + uiFmt(tag, heat, L##format, __VA_ARGS__); \ } while(0) #endif |