aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/syntax/syntaxedit.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-25 20:48:42 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-28 08:05:02 +0100
commitebe3f0a0cc389b8c290015f68c9226ab0b9fbbde (patch)
tree532a7d0b184af7393b1fd5c99425219e4c376eee /ui/syntax/syntaxedit.h
parentMakefile: initial series of horrendous makefile hacks (diff)
downloadwireguard-windows-ebe3f0a0cc389b8c290015f68c9226ab0b9fbbde.tar.xz
wireguard-windows-ebe3f0a0cc389b8c290015f68c9226ab0b9fbbde.zip
ui: move syntaxedit to sub-package
This speeds up compilation time considerably by not needing to invoke cgo for changes in the main UI. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/syntax/syntaxedit.h')
-rw-r--r--ui/syntax/syntaxedit.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/syntax/syntaxedit.h b/ui/syntax/syntaxedit.h
new file mode 100644
index 00000000..12815278
--- /dev/null
+++ b/ui/syntax/syntaxedit.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
+ */
+
+#ifndef SYNTAXEDIT_H
+#define SYNTAXEDIT_H
+
+#include <stdbool.h>
+#include <windows.h>
+#include <richedit.h>
+
+#define SYNTAXEDIT_STYLE (WS_CHILD | WS_CLIPSIBLINGS | ES_MULTILINE | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_BORDER | WS_TABSTOP | ES_WANTRETURN | ES_NOOLEDRAGDROP)
+#define SYNTAXEDIT_EXTSTYLE (WS_EX_CLIENTEDGE)
+
+/* The old MFC reflection trick. */
+#define WM_REFLECT (WM_USER + 0x1C00)
+
+#define SE_PRIVATE_KEY (WM_USER + 0x3100)
+
+extern bool register_syntax_edit(void);
+
+#endif