From 0791cac97ee689195e593cfca89c0b63fb721479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 22 Nov 2016 00:15:32 +0100 Subject: vis-lua: introduce pre-save hook The first argument is the file object while the second argument denotes the full path to which it will be written. Path might be `nil` if the file is going to be written to stdout. The Lua function is expected to return a boolean value indicating whether the write operation should proceed or be aborted. --- vis.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vis.h') diff --git a/vis.h b/vis.h index f3366c7..9d6ba4d 100644 --- a/vis.h +++ b/vis.h @@ -32,6 +32,7 @@ typedef struct { void (*vis_start)(Vis*); void (*vis_quit)(Vis*); void (*file_open)(Vis*, File*); + bool (*file_save_pre)(Vis*, File*, const char *path); void (*file_save_post)(Vis*, File*, const char *path); void (*file_close)(Vis*, File*); void (*win_open)(Vis*, Win*); -- cgit v1.2.3