diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-02-25 20:48:42 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-02-28 08:05:02 +0100 |
commit | ebe3f0a0cc389b8c290015f68c9226ab0b9fbbde (patch) | |
tree | 532a7d0b184af7393b1fd5c99425219e4c376eee /ui/syntax/highlighter.h | |
parent | Makefile: initial series of horrendous makefile hacks (diff) | |
download | wireguard-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/highlighter.h')
-rw-r--r-- | ui/syntax/highlighter.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ui/syntax/highlighter.h b/ui/syntax/highlighter.h new file mode 100644 index 00000000..c004e127 --- /dev/null +++ b/ui/syntax/highlighter.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. + */ + +#include <sys/types.h> + +enum highlight_type { + HighlightSection, + HighlightField, + HighlightPrivateKey, + HighlightPublicKey, + HighlightPresharedKey, + HighlightIP, + HighlightCidr, + HighlightHost, + HighlightPort, + HighlightMTU, + HighlightKeepalive, + HighlightComment, + HighlightDelimiter, +#ifndef MOBILE_WGQUICK_SUBSET + HighlightTable, + HighlightFwMark, + HighlightSaveConfig, + HighlightCmd, +#endif + HighlightError, + HighlightEnd +}; + +struct highlight_span { + enum highlight_type type; + size_t start, len; +}; + +struct highlight_span *highlight_config(const char *config); |