aboutsummaryrefslogtreecommitdiff
path: root/vis.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-02-17 21:34:00 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-02-18 16:50:40 +0100
commit498723377cbf5cdb36d8b64f41b219a515a84175 (patch)
treedbd82e2cc0fe74f7e63859735a4febd14e09cff2 /vis.h
parent55e285783ef99befcc01d7ed6f5594f87d6d8f6c (diff)
downloadvis-498723377cbf5cdb36d8b64f41b219a515a84175.tar.gz
vis-498723377cbf5cdb36d8b64f41b219a515a84175.tar.xz
Add infrastructure to register custom text object functions
Diffstat (limited to 'vis.h')
-rw-r--r--vis.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/vis.h b/vis.h
index 84779d6..614d34a 100644
--- a/vis.h
+++ b/vis.h
@@ -317,6 +317,11 @@ enum VisTextObject {
bool vis_textobject(Vis*, enum VisTextObject);
+/* register a new text object, if successful the returned id is positive
+ * and can be used as argument for the vis_textobject function. */
+int vis_textobject_register(Vis*, int type, void *data,
+ Filerange (*textobject)(Vis*, Win*, void*, size_t pos));
+
/* macro REPEAT and INVALID should be considered as implementation details (TODO: hide them?) */
enum VisMacro {
VIS_MACRO_a, VIS_MACRO_b, VIS_MACRO_c, VIS_MACRO_d, VIS_MACRO_e,