aboutsummaryrefslogtreecommitdiff
path: root/vis.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-14 22:54:06 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-06-15 15:51:43 +0200
commitf000d2f9c924bb964203d7dba27b3290045c6853 (patch)
tree38dfb204c458979ff298cc466ec6c64f69173798 /vis.h
parent4b2513c5e1587319ec14ec511a01cfbad331ac79 (diff)
downloadvis-f000d2f9c924bb964203d7dba27b3290045c6853.tar.gz
vis-f000d2f9c924bb964203d7dba27b3290045c6853.tar.xz
vis: add basic infrastructure to store selections in registers
Diffstat (limited to 'vis.h')
-rw-r--r--vis.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/vis.h b/vis.h
index a4f1d46..2afa00f 100644
--- a/vis.h
+++ b/vis.h
@@ -13,6 +13,7 @@ typedef struct Win Win;
#include "view.h"
#include "text-regex.h"
#include "libutf.h"
+#include "array.h"
#ifndef CONFIG_HELP
#define CONFIG_HELP 1
@@ -755,6 +756,23 @@ const char *vis_register_slot_get(Vis*, enum VisRegister, size_t slot, size_t *l
bool vis_register_put(Vis*, enum VisRegister, const char *data, size_t len);
bool vis_register_slot_put(Vis*, enum VisRegister, size_t slot, const char *data, size_t len);
/**
+ * Store a set of ``Filerange``s in a register.
+ *
+ * @param id The register to use.
+ * @param sel The array containing the file ranges.
+ */
+void vis_register_selections_set(Vis*, enum VisRegister id, Array *sel);
+/**
+ * Get an array of file ranges stored in the register.
+ *
+ * @rst
+ * .. warning:: The caller must eventually free the Array by calling
+ * ``array_release``.
+ * @endrst
+ */
+Array vis_register_selections_get(Vis*, enum VisRegister id);
+
+/**
* @}
* @defgroup vis_macros
* @{