diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-19 14:05:32 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-19 14:58:07 +0100 |
| commit | 5166e81e794c0faa80742ad6806745b13b967a51 (patch) | |
| tree | d2f4cd3ece83311bbea9ea172ea12d8337225fa2 /vis.h | |
| parent | 5fb583f035bb8e699e8980e63050ef1f41f94dd9 (diff) | |
| download | vis-5166e81e794c0faa80742ad6806745b13b967a51.tar.gz vis-5166e81e794c0faa80742ad6806745b13b967a51.tar.xz | |
vis: add infrastructure for user specified operators
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -224,6 +224,7 @@ enum VisOperator { VIS_OP_PUT_AFTER_END, VIS_OP_PUT_BEFORE, VIS_OP_PUT_BEFORE_END, + VIS_OP_LAST, /* has to be last enum member */ }; /* set operator to execute, has immediate effect if @@ -242,6 +243,10 @@ enum VisOperator { */ bool vis_operator(Vis*, enum VisOperator, ...); +typedef struct OperatorContext OperatorContext; +typedef size_t (VisOperatorFunction)(Vis*, Text*, OperatorContext*); +int vis_operator_register(Vis*, VisOperatorFunction*, void *context); + enum VisMotion { VIS_MOVE_LINE_DOWN, VIS_MOVE_LINE_UP, |
