summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-08 16:59:26 -0400
committerJune McEnroe <june@causal.agency>2018-08-08 16:59:26 -0400
commiteac0f83efa3d6b1db2715c21d60b170a546ebc0a (patch)
treec8db1326e24716e29d3c9b06e42527178d030fa1 /chat.h
parentSet log marker on FocusOut event (diff)
downloadcatgirl-eac0f83efa3d6b1db2715c21d60b170a546ebc0a.tar.gz
catgirl-eac0f83efa3d6b1db2715c21d60b170a546ebc0a.zip
Factor out line editing to edit.c
Diffstat (limited to '')
-rw-r--r--chat.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chat.h b/chat.h
index 09f0d2c..9507f12 100644
--- a/chat.h
+++ b/chat.h
@@ -18,6 +18,7 @@
 
 #include <stdarg.h>
 #include <stdbool.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <wchar.h>
 
@@ -31,6 +32,15 @@ struct {
 	char *chan;
 } chat;
 
+enum {
+	IRC_BOLD      = 002,
+	IRC_COLOR     = 003,
+	IRC_REVERSE   = 026,
+	IRC_RESET     = 017,
+	IRC_ITALIC    = 035,
+	IRC_UNDERLINE = 037,
+};
+
 int ircConnect(const char *host, const char *port, const char *webPass);
 void ircRead(void);
 void ircWrite(const char *ptr, size_t len);
@@ -58,6 +68,10 @@ void uiFmt(const wchar_t *format, ...);
 } while(0)
 #endif
 
+const wchar_t *editHead(void);
+const wchar_t *editTail(void);
+bool edit(bool meta, bool ctrl, wchar_t ch);
+
 void handle(char *line);
 void input(char *line);