aboutsummaryrefslogtreecommitdiff
path: root/src/navigator.h
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2015-12-28 11:33:16 +0100
committerDmitrij D. Czarkoff <czarkoff@gmail.com>2015-12-28 11:49:52 +0100
commitc6096967e3d8d98f24210d4c66e4d22509bdce5c (patch)
tree6d447519cb6f20a8cf56023ef0ef2d9a17598338 /src/navigator.h
parentd0b041f17c34fc36fc8121cfe23e2da2b79cf4fa (diff)
downloadimv-c6096967e3d8d98f24210d4c66e4d22509bdce5c.tar.gz
Use stat(2) to monitor file changes
Makes file monitoring in imv completely POSIX.
Diffstat (limited to 'src/navigator.h')
-rw-r--r--src/navigator.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/navigator.h b/src/navigator.h
index 5b1d4a1..b23e41a 100644
--- a/src/navigator.h
+++ b/src/navigator.h
@@ -1,6 +1,8 @@
#ifndef IMV_NAVIGATOR_H
#define IMV_NAVIGATOR_H
+#include <time.h>
+
/* Copyright (c) 2015 Harry Jeffery
This program is free software; you can redistribute it and/or
@@ -23,6 +25,7 @@ struct imv_navigator {
int buf_size;
int cur_path;
char **paths;
+ time_t *mtimes;
int last_move_direction;
int changed;
};
@@ -57,7 +60,8 @@ void imv_navigator_select_str(struct imv_navigator *nav, const int path);
/* Return the index of the path given. Returns -1 if not found. */
int imv_navigator_find_path(struct imv_navigator *nav, const char *path);
-/* Returns 1 if the currently selected path has changed since last called */
+/* Returns 1 if either the currently selected path or underlying file has
+ * changed since last called */
int imv_navigator_poll_changed(struct imv_navigator *nav);
#endif