| 1 | /* Copyright 2017 Max Voit |
| 2 | * |
| 3 | * This file is part of sxiv. |
| 4 | * |
| 5 | * sxiv is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published |
| 7 | * by the Free Software Foundation; either version 2 of the License, |
| 8 | * or (at your option) any later version. |
| 9 | * |
| 10 | * sxiv is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with sxiv. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef AUTORELOAD_H |
| 20 | #define AUTORELOAD_H |
| 21 | |
| 22 | #include "types.h" |
| 23 | |
| 24 | void arl_cleanup(void); |
| 25 | void arl_handle(void); |
| 26 | void arl_init(void); |
| 27 | void arl_setup(void); |
| 28 | void arl_setup_dir(void); |
| 29 | |
| 30 | typedef struct { |
| 31 | int fd; |
| 32 | int wd; |
| 33 | bool watching_dir; |
| 34 | } autoreload_t; |
| 35 | |
| 36 | extern autoreload_t autoreload; |
| 37 | extern int fileidx; |
| 38 | extern fileinfo_t *files; |
| 39 | |
| 40 | void load_image(int); |
| 41 | void redraw(void); |
| 42 | |
| 43 | #endif /* AUTORELOAD_H */ |