Contents of /trunk/src/misc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 156 - (hide annotations)
Wed Apr 1 12:47:35 2009 UTC (15 years, 1 month ago) by harbaum
File MIME type: text/plain
File size: 2014 byte(s)
Track handling redone
1 harbaum 1 /*
2     * Copyright (C) 2008 Till Harbaum <till@harbaum.org>.
3     *
4     * This file is part of OSM2Go.
5     *
6     * OSM2Go is free software: you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation, either version 3 of the License, or
9     * (at your option) any later version.
10     *
11     * OSM2Go is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with OSM2Go. If not, see <http://www.gnu.org/licenses/>.
18     */
19    
20     #ifndef MISC_H
21     #define MISC_H
22    
23 harbaum 156 #define MISC_AGAIN_ID_DELETE (1<<0)
24     #define MISC_AGAIN_ID_JOIN_NODES (1<<1)
25     #define MISC_AGAIN_ID_JOIN_WAYS (1<<2)
26     #define MISC_AGAIN_ID_OVERWRITE_TAGS (1<<3)
27     #define MISC_AGAIN_ID_EXTEND_WAY (1<<4)
28     #define MISC_AGAIN_ID_EXTEND_WAY_END (1<<5)
29     #define MISC_AGAIN_ID_EXPORT_OVERWRITE (1<<6)
30 harbaum 1
31     typedef struct file_chain_s {
32     char *name;
33     struct file_chain_s *next;
34     } file_chain_t;
35    
36     /* these flags prevent you from leaving the dialog with no (or yes) */
37     /* if the "dont show me this dialog again" checkbox is selected. This */
38     /* makes sure, that you can't permanently switch certain things in, but */
39     /* only on. e.g. it doesn't make sense to answer a "do you really want to */
40     /* delete this" dialog with "no and don't ask me again". You'd never be */
41     /* able to delete anything again */
42     #define MISC_AGAIN_FLAG_DONT_SAVE_NO (1<<0)
43     #define MISC_AGAIN_FLAG_DONT_SAVE_YES (1<<1)
44    
45     void errorf(GtkWidget *parent, const char *fmt, ...);
46     void messagef(GtkWidget *parent, char *title, const char *fmt, ...);
47     gboolean yes_no_f(GtkWidget *parent,
48     appdata_t *appdata, gulong again_bit, gint flags,
49     char *title, const char *fmt, ...);
50    
51     char *find_file(char *name);
52     file_chain_t *file_scan(char *pattern);
53    
54     #endif // MISC_H