| 1 | /* Copyright 2011 Bert Muennich |
| 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 OPTIONS_H |
| 20 | #define OPTIONS_H |
| 21 | |
| 22 | #include "types.h" |
| 23 | #include "image.h" |
| 24 | |
| 25 | typedef struct { |
| 26 | /* file list: */ |
| 27 | char **filenames; |
| 28 | bool from_stdin; |
| 29 | bool to_stdout; |
| 30 | bool recursive; |
| 31 | int filecnt; |
| 32 | int startnum; |
| 33 | |
| 34 | /* image: */ |
| 35 | scalemode_t scalemode; |
| 36 | float zoom; |
| 37 | bool animate; |
| 38 | int gamma; |
| 39 | float slideshow; |
| 40 | |
| 41 | /* window: */ |
| 42 | bool fullscreen; |
| 43 | bool hide_bar; |
| 44 | long embed; |
| 45 | char *geometry; |
| 46 | char *res_name; |
| 47 | |
| 48 | /* misc flags: */ |
| 49 | bool quiet; |
| 50 | bool thumb_mode; |
| 51 | bool clean_cache; |
| 52 | } options_t; |
| 53 | |
| 54 | extern const options_t *options; |
| 55 | |
| 56 | void print_usage(void); |
| 57 | void print_version(void); |
| 58 | |
| 59 | void parse_options(int, char**); |
| 60 | |
| 61 | #endif /* OPTIONS_H */ |