1 /* -*- Mode: C; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3 -*- */
2 
3 /*
4  * GImageView
5  * Copyright (C) 2001 Takuro Ashie
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  *
21  * $Id: argparse.h,v 1.6 2002/10/02 19:05:00 makeinu Exp $
22  */
23 
24 #ifndef __ARGPARSE_H__
25 #define __ARGPARSE_H__
26 
27 #include <stdio.h>
28 #include <gtk/gtk.h>
29 
30 typedef enum
31 {
32    ARG_NOERR,
33    ARG_WITH_VAL,
34    ARG_NO_VAL,
35    ARG_ERR_PARSE,
36    ARG_ERR_UNKNOWN,
37    ARG_HELP
38 } arg_error_t;
39 
40 struct arg_opt
41 {
42    const char *name;
43    const int   key;
44    const char *arg;
45    const char *doc;
46 };
47 
48 typedef struct ArgsVal_Tag
49 {
50    gboolean read_dir;
51    gboolean read_dir_recursive;
52    gboolean read_dot;
53    gboolean ignore_ext;
54    gboolean open_imagewin;
55    gboolean open_thumbwin;
56    gboolean exec_slideshow;
57    gfloat   slideshow_interval;     /* [sec] */
58 } ArgsVal;
59 
60 void arg_version   (void);
61 void arg_help      (char *argv[], FILE *stream);
62 void arg_parse     (int argc, char *argv[], int *remaining);
63 void args_val_init (void);
64 
65 #endif /* __ARGPARSE_H__ */
66