summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-17 14:00:08 -0400
committerJune McEnroe <june@causal.agency>2018-08-17 14:00:08 -0400
commit38fc42f03d89693fc7e3951fd7257d394f417a6f (patch)
treede58f141248de2f1f25f1272f865495803490f16 /chat.h
parentDon't treat input as command if word contains extra slash (diff)
downloadcatgirl-38fc42f03d89693fc7e3951fd7257d394f417a6f.tar.gz
catgirl-38fc42f03d89693fc7e3951fd7257d394f417a6f.zip
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 '')
-rw-r--r--chat.h17
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