GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 0 / 1
Functions: 100.0% 1 / 0 / 1
Branches: 50.0% 3 / 0 / 6

shumate/shumate-map.h
Line Branch Exec Source
1 /*
2 * Copyright (C) 2008 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
3 * Copyright (C) 2010-2013 Jiri Techet <techet@gmail.com>
4 * Copyright (C) 2019 Marcus Lundblad <ml@update.uu.se>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library 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 GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #if !defined (__SHUMATE_SHUMATE_H_INSIDE__) && !defined (SHUMATE_COMPILATION)
22 #error "Only <shumate/shumate.h> can be included directly."
23 #endif
24
25 #ifndef SHUMATE_MAP_H
26 #define SHUMATE_MAP_H
27
28 #include <shumate/shumate-layer.h>
29 #include <shumate/shumate-map-source.h>
30 #include <shumate/shumate-viewport.h>
31
32 #include <glib.h>
33 #include <glib-object.h>
34 #include <gtk/gtk.h>
35
36 G_BEGIN_DECLS
37
38 #define SHUMATE_TYPE_MAP shumate_map_get_type ()
39
3/6
✓ Branch 3 → 4 taken 14 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 14 times.
✗ Branch 4 → 6 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 14 times.
14 G_DECLARE_FINAL_TYPE (ShumateMap, shumate_map, SHUMATE, MAP, GtkWidget)
40
41 ShumateMap *shumate_map_new (void);
42 ShumateMap *shumate_map_new_simple (void);
43
44 ShumateViewport *shumate_map_get_viewport (ShumateMap *self);
45
46 void shumate_map_center_on (ShumateMap *self,
47 double latitude,
48 double longitude);
49
50 void shumate_map_go_to (ShumateMap *self,
51 double latitude,
52 double longitude);
53 void shumate_map_go_to_full (ShumateMap *self,
54 double latitude,
55 double longitude,
56 double zoom_level);
57 void shumate_map_go_to_full_with_duration (ShumateMap *self,
58 double latitude,
59 double longitude,
60 double zoom_level,
61 guint duration_ms);
62
63 void shumate_map_zoom_in (ShumateMap *self);
64 void shumate_map_zoom_out (ShumateMap *self);
65
66 void shumate_map_stop_go_to (ShumateMap *self);
67 guint shumate_map_get_go_to_duration (ShumateMap *self);
68 void shumate_map_set_go_to_duration (ShumateMap *self,
69 guint duration);
70 void shumate_map_set_map_source (ShumateMap *self,
71 ShumateMapSource *map_source);
72 void shumate_map_set_zoom_on_double_click (ShumateMap *self,
73 gboolean value);
74 void shumate_map_set_animate_zoom (ShumateMap *self,
75 gboolean value);
76 void shumate_map_add_layer (ShumateMap *self,
77 ShumateLayer *layer);
78 void shumate_map_remove_layer (ShumateMap *self,
79 ShumateLayer *layer);
80 void shumate_map_insert_layer_behind (ShumateMap *self,
81 ShumateLayer *layer,
82 ShumateLayer *next_sibling);
83 void shumate_map_insert_layer_above (ShumateMap *self,
84 ShumateLayer *layer,
85 ShumateLayer *next_sibling);
86 gboolean shumate_map_get_zoom_on_double_click (ShumateMap *self);
87 gboolean shumate_map_get_animate_zoom (ShumateMap *self);
88 ShumateState shumate_map_get_state (ShumateMap *self);
89
90 G_END_DECLS
91
92 #endif
93