aboutsummaryrefslogtreecommitdiff
path: root/extract.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-15 09:19:18 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-15 09:19:18 +0000
commitaafa120f92b2f41d1a753493676ee7ee0cb7a1ff (patch)
tree087cdd12fb40afe288b5941c20d297159c03337b /extract.h
parentconf: add definitions for pipe-{scrollback,view} bindings (diff)
selection: refactor: break out text extraction to a separate file
Diffstat (limited to 'extract.h')
-rw-r--r--extract.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/extract.h b/extract.h
new file mode 100644
index 00000000..2219780d
--- /dev/null
+++ b/extract.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <stddef.h>
+#include <stdbool.h>
+
+#include "terminal.h"
+
+struct extraction_context;
+
+struct extraction_context *extract_begin(enum selection_kind kind);
+
+bool extract_one(
+ struct terminal *term, struct row *row, struct cell *cell, int col,
+ void *context);
+
+bool extract_finish(
+ struct extraction_context *context, char **text, size_t *len);