shumate/shumate-map-source.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Copyright (C) 2010-2013 Jiri Techet <techet@gmail.com> | ||
| 3 | * Copyright (C) 2019 Marcus Lundblad <ml@update.uu.se> | ||
| 4 | * | ||
| 5 | * This library is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of the GNU Lesser General Public | ||
| 7 | * License as published by the Free Software Foundation; either | ||
| 8 | * version 2.1 of the License, or (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This library is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * Lesser General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU Lesser General Public | ||
| 16 | * License along with this library; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #if !defined (__SHUMATE_SHUMATE_H_INSIDE__) && !defined (SHUMATE_COMPILATION) | ||
| 21 | #error "Only <shumate/shumate.h> can be included directly." | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifndef _SHUMATE_MAP_SOURCE_H_ | ||
| 25 | #define _SHUMATE_MAP_SOURCE_H_ | ||
| 26 | |||
| 27 | #include <shumate/shumate-tile.h> | ||
| 28 | |||
| 29 | G_BEGIN_DECLS | ||
| 30 | |||
| 31 | #define SHUMATE_TYPE_MAP_SOURCE shumate_map_source_get_type () | ||
| 32 |
6/12None:
✓ Branch 11 → 12 taken 2 times.
✗ Branch 11 → 13 not taken.
✓ Branch 29 → 30 taken 2 times.
✗ Branch 29 → 31 not taken.
✓ Branch 37 → 38 taken 2 times.
✗ Branch 37 → 39 not taken.
SHUMATE_IS_MAP_SOURCE:
✓ Branch 3 → 4 taken 1250 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 1250 times.
✗ Branch 4 → 6 not taken.
✓ Branch 5 → 6 taken 1250 times.
✗ Branch 5 → 7 not taken.
|
1256 | G_DECLARE_DERIVABLE_TYPE (ShumateMapSource, shumate_map_source, SHUMATE, MAP_SOURCE, GObject) |
| 33 | |||
| 34 | /** | ||
| 35 | * ShumateMapProjection: | ||
| 36 | * @SHUMATE_MAP_PROJECTION_MERCATOR: Currently the only supported projection | ||
| 37 | * | ||
| 38 | * Projections supported by the library. | ||
| 39 | */ | ||
| 40 | typedef enum | ||
| 41 | { | ||
| 42 | SHUMATE_MAP_PROJECTION_MERCATOR | ||
| 43 | } ShumateMapProjection; | ||
| 44 | |||
| 45 | struct _ShumateMapSourceClass | ||
| 46 | { | ||
| 47 | GObjectClass parent_class; | ||
| 48 | |||
| 49 | void (*fill_tile_async) (ShumateMapSource *self, | ||
| 50 | ShumateTile *tile, | ||
| 51 | GCancellable *cancellable, | ||
| 52 | GAsyncReadyCallback callback, | ||
| 53 | gpointer user_data); | ||
| 54 | gboolean (*fill_tile_finish) (ShumateMapSource *self, | ||
| 55 | GAsyncResult *result, | ||
| 56 | GError **error); | ||
| 57 | |||
| 58 | /*< private >*/ | ||
| 59 | gpointer padding[16]; | ||
| 60 | }; | ||
| 61 | |||
| 62 | const char *shumate_map_source_get_id (ShumateMapSource *map_source); | ||
| 63 | void shumate_map_source_set_id (ShumateMapSource *map_source, | ||
| 64 | const char *id); | ||
| 65 | const char *shumate_map_source_get_name (ShumateMapSource *map_source); | ||
| 66 | void shumate_map_source_set_name (ShumateMapSource *map_source, | ||
| 67 | const char *name); | ||
| 68 | const char *shumate_map_source_get_license (ShumateMapSource *map_source); | ||
| 69 | void shumate_map_source_set_license (ShumateMapSource *map_source, | ||
| 70 | const char *license); | ||
| 71 | const char *shumate_map_source_get_license_uri (ShumateMapSource *map_source); | ||
| 72 | void shumate_map_source_set_license_uri (ShumateMapSource *map_source, | ||
| 73 | const char *license_uri); | ||
| 74 | guint shumate_map_source_get_min_zoom_level (ShumateMapSource *map_source); | ||
| 75 | void shumate_map_source_set_min_zoom_level (ShumateMapSource *map_source, | ||
| 76 | guint zoom_level); | ||
| 77 | guint shumate_map_source_get_max_zoom_level (ShumateMapSource *map_source); | ||
| 78 | void shumate_map_source_set_max_zoom_level (ShumateMapSource *map_source, | ||
| 79 | guint zoom_level); | ||
| 80 | guint shumate_map_source_get_tile_size (ShumateMapSource *map_source); | ||
| 81 | double shumate_map_source_get_tile_size_at_zoom (ShumateMapSource *map_source, | ||
| 82 | double zoom_level); | ||
| 83 | void shumate_map_source_set_tile_size (ShumateMapSource *map_source, | ||
| 84 | guint tile_size); | ||
| 85 | ShumateMapProjection shumate_map_source_get_projection (ShumateMapSource *map_source); | ||
| 86 | void shumate_map_source_set_projection (ShumateMapSource *map_source, | ||
| 87 | ShumateMapProjection projection); | ||
| 88 | |||
| 89 | double shumate_map_source_get_x (ShumateMapSource *map_source, | ||
| 90 | double zoom_level, | ||
| 91 | double longitude); | ||
| 92 | double shumate_map_source_get_y (ShumateMapSource *map_source, | ||
| 93 | double zoom_level, | ||
| 94 | double latitude); | ||
| 95 | double shumate_map_source_get_longitude (ShumateMapSource *map_source, | ||
| 96 | double zoom_level, | ||
| 97 | double x); | ||
| 98 | double shumate_map_source_get_latitude (ShumateMapSource *map_source, | ||
| 99 | double zoom_level, | ||
| 100 | double y); | ||
| 101 | guint shumate_map_source_get_row_count (ShumateMapSource *map_source, | ||
| 102 | guint zoom_level); | ||
| 103 | guint shumate_map_source_get_column_count (ShumateMapSource *map_source, | ||
| 104 | guint zoom_level); | ||
| 105 | double shumate_map_source_get_meters_per_pixel (ShumateMapSource *map_source, | ||
| 106 | double zoom_level, | ||
| 107 | double latitude, | ||
| 108 | double longitude); | ||
| 109 | |||
| 110 | void shumate_map_source_fill_tile_async (ShumateMapSource *self, | ||
| 111 | ShumateTile *tile, | ||
| 112 | GCancellable *cancellable, | ||
| 113 | GAsyncReadyCallback callback, | ||
| 114 | gpointer user_data); | ||
| 115 | gboolean shumate_map_source_fill_tile_finish (ShumateMapSource *self, | ||
| 116 | GAsyncResult *result, | ||
| 117 | GError **error); | ||
| 118 | |||
| 119 | G_END_DECLS | ||
| 120 | |||
| 121 | #endif /* _SHUMATE_MAP_SOURCE_H_ */ | ||
| 122 |