Contents of /trunk/src/misc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Wed Dec 10 00:00:05 2008 UTC (15 years, 5 months ago) by achadwick
File MIME type: text/plain
File size: 1962 byte(s)
Begin trunk. No code changes.
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 #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
30 typedef struct file_chain_s {
31 char *name;
32 struct file_chain_s *next;
33 } file_chain_t;
34
35 /* these flags prevent you from leaving the dialog with no (or yes) */
36 /* if the "dont show me this dialog again" checkbox is selected. This */
37 /* makes sure, that you can't permanently switch certain things in, but */
38 /* only on. e.g. it doesn't make sense to answer a "do you really want to */
39 /* delete this" dialog with "no and don't ask me again". You'd never be */
40 /* able to delete anything again */
41 #define MISC_AGAIN_FLAG_DONT_SAVE_NO (1<<0)
42 #define MISC_AGAIN_FLAG_DONT_SAVE_YES (1<<1)
43
44 void errorf(GtkWidget *parent, const char *fmt, ...);
45 void messagef(GtkWidget *parent, char *title, const char *fmt, ...);
46 gboolean yes_no_f(GtkWidget *parent,
47 appdata_t *appdata, gulong again_bit, gint flags,
48 char *title, const char *fmt, ...);
49
50 char *find_file(char *name);
51 file_chain_t *file_scan(char *pattern);
52
53 #endif // MISC_H