summaryrefslogtreecommitdiff
path: root/examples/dte/selection.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2023-11-09 23:19:53 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2023-11-09 23:19:53 +0100
commit1566b6faa8534118c3566188181367cd0868468f (patch)
tree1de8d4b369efb5e592685a31088f798a6b63ffa1 /examples/dte/selection.h
parent349991bf6efe473ab9a5cbdae0a8114d72b997e3 (diff)
downloadcrep-1566b6faa8534118c3566188181367cd0868468f.tar.gz
Added partial matching and introduced threads
Diffstat (limited to 'examples/dte/selection.h')
-rw-r--r--examples/dte/selection.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/dte/selection.h b/examples/dte/selection.h
new file mode 100644
index 0000000..ddd60c5
--- /dev/null
+++ b/examples/dte/selection.h
@@ -0,0 +1,22 @@
+#ifndef SELECTION_H
+#define SELECTION_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include "block-iter.h"
+#include "view.h"
+
+typedef struct {
+ BlockIter si;
+ size_t so;
+ size_t eo;
+ bool swapped;
+} SelectionInfo;
+
+void init_selection(const View *view, SelectionInfo *info);
+size_t prepare_selection(View *view);
+char *view_get_selection(View *view, size_t *size);
+size_t get_nr_selected_lines(const SelectionInfo *info);
+size_t get_nr_selected_chars(const SelectionInfo *info);
+
+#endif