diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-10-23 12:30:30 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-10-23 23:01:56 +0200 |
| commit | afb87c6d29275e18faec6a8b96e7d5ab57bcb0f9 (patch) | |
| tree | 1cd7e0ab6a3a10347547a232e187838a6ca5957f /vis.h | |
| parent | 5ae02ee68bd4df690d7ebcd6c8a0eb36fcf71835 (diff) | |
| download | vis-afb87c6d29275e18faec6a8b96e7d5ab57bcb0f9.tar.gz vis-afb87c6d29275e18faec6a8b96e7d5ab57bcb0f9.tar.xz | |
vis: begin librarization of core vis primitives
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -0,0 +1,48 @@ +#ifndef VIS_H +#define VIS_H + +#include "ui.h" +#include "editor.h" + +typedef Editor Vis; + +Vis *vis_new(Ui*); +#define vis_free editor_free + +void vis_run(Vis*, int argc, char *argv[]); +void vis_die(Vis*, const char *msg, ...); + +enum VisMode { + VIS_MODE_BASIC, + VIS_MODE_MOVE, + VIS_MODE_OPERATOR, + VIS_MODE_OPERATOR_OPTION, + VIS_MODE_NORMAL, + VIS_MODE_TEXTOBJ, + VIS_MODE_VISUAL, + VIS_MODE_VISUAL_LINE, + VIS_MODE_READLINE, + VIS_MODE_PROMPT, + VIS_MODE_INSERT, + VIS_MODE_REPLACE, + VIS_MODE_LAST, +}; + +enum VisOperator { + OP_DELETE, + OP_CHANGE, + OP_YANK, + OP_PUT, + OP_SHIFT_RIGHT, + OP_SHIFT_LEFT, + OP_CASE_CHANGE, + OP_JOIN, + OP_REPEAT_INSERT, + OP_REPEAT_REPLACE, + OP_CURSOR, +}; + +bool vis_signal_handler(Vis*, int signum, const siginfo_t *siginfo, + const void *context); + +#endif |
