Contents of /trunk/src/track.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: 1493 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 TRACK_H
21 #define TRACK_H
22
23 typedef enum { TRACK_NONE = 0, TRACK_IMPORT, TRACK_GPS } track_mode_t;
24
25 typedef struct track_point_s {
26 lpos_t lpos; /* position in screen/map format */
27 struct track_point_s *next;
28 } track_point_t;
29
30 typedef struct track_seg_s {
31 track_point_t *track_point;
32 struct track_seg_s *next;
33 canvas_item_t *item;
34 } track_seg_t;
35
36 typedef struct track_s {
37 char *filename;
38 track_seg_t *track_seg;
39 track_mode_t mode;
40 gboolean saved;
41 track_seg_t *cur_seg;
42 } track_t;
43
44 void track_do(appdata_t *appdata, track_mode_t mode, char *name);
45
46 gint track_seg_points(track_seg_t *seg);
47
48 void track_save(project_t *project, track_t *track);
49 track_t *track_restore(appdata_t *appdata, project_t *project);
50
51 #endif // TRACK_H