From 498723377cbf5cdb36d8b64f41b219a515a84175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 17 Feb 2016 21:34:00 +0100 Subject: Add infrastructure to register custom text object functions --- vis.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vis.h') 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, -- cgit v1.2.3