shumate/shumate-viewport.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* shumate-viewport.h: Viewport actor | ||
| 2 | * | ||
| 3 | * Copyright (C) 2008 OpenedHand | ||
| 4 | * Copyright (C) 2011-2013 Jiri Techet <techet@gmail.com> | ||
| 5 | * Copyright (C) 2019 Marcus Lundblad <ml@update.uu.se> | ||
| 6 | * | ||
| 7 | * This library is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU Lesser General Public | ||
| 9 | * License as published by the Free Software Foundation; either | ||
| 10 | * version 2 of the License, or (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This library is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * Lesser General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU Lesser General Public | ||
| 18 | * License along with this library; if not, write to the | ||
| 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 20 | * Boston, MA 02111-1307, USA. | ||
| 21 | * | ||
| 22 | * Written by: Chris Lord <chris@openedhand.com> | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef __SHUMATE_VIEWPORT_H__ | ||
| 26 | #define __SHUMATE_VIEWPORT_H__ | ||
| 27 | |||
| 28 | #include <glib-object.h> | ||
| 29 | #include <gtk/gtk.h> | ||
| 30 | |||
| 31 | #include <shumate/shumate-location.h> | ||
| 32 | #include <shumate/shumate-map-source.h> | ||
| 33 | |||
| 34 | G_BEGIN_DECLS | ||
| 35 | |||
| 36 | #define SHUMATE_TYPE_VIEWPORT shumate_viewport_get_type () | ||
| 37 |
8/17None:
✓ Branch 15 → 16 taken 2 times.
✗ Branch 15 → 17 not taken.
✗ Branch 15 → 18 not taken.
✓ Branch 20 → 21 taken 2 times.
✗ Branch 20 → 22 not taken.
✓ Branch 38 → 39 taken 2 times.
✗ Branch 38 → 40 not taken.
✓ Branch 40 → 41 taken 2 times.
✗ Branch 40 → 42 not taken.
✓ Branch 83 → 84 taken 1 time.
✗ Branch 83 → 85 not taken.
SHUMATE_IS_VIEWPORT:
✓ Branch 3 → 4 taken 227 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 227 times.
✗ Branch 4 → 6 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 227 times.
|
237 | G_DECLARE_FINAL_TYPE (ShumateViewport, shumate_viewport, SHUMATE, VIEWPORT, GObject) |
| 38 | |||
| 39 | ShumateViewport *shumate_viewport_new (void); | ||
| 40 | |||
| 41 | void shumate_viewport_set_zoom_level (ShumateViewport *self, | ||
| 42 | double zoom_level); | ||
| 43 | double shumate_viewport_get_zoom_level (ShumateViewport *self); | ||
| 44 | |||
| 45 | void shumate_viewport_set_max_zoom_level (ShumateViewport *self, | ||
| 46 | guint max_zoom_level); | ||
| 47 | guint shumate_viewport_get_max_zoom_level (ShumateViewport *self); | ||
| 48 | |||
| 49 | void shumate_viewport_set_min_zoom_level (ShumateViewport *self, | ||
| 50 | guint min_zoom_level); | ||
| 51 | guint shumate_viewport_get_min_zoom_level (ShumateViewport *self); | ||
| 52 | |||
| 53 | void shumate_viewport_set_reference_map_source (ShumateViewport *self, | ||
| 54 | ShumateMapSource *map_source); | ||
| 55 | ShumateMapSource *shumate_viewport_get_reference_map_source (ShumateViewport *self); | ||
| 56 | |||
| 57 | void shumate_viewport_set_rotation (ShumateViewport *self, | ||
| 58 | double rotation); | ||
| 59 | double shumate_viewport_get_rotation (ShumateViewport *self); | ||
| 60 | |||
| 61 | void shumate_viewport_widget_coords_to_location (ShumateViewport *self, | ||
| 62 | GtkWidget *widget, | ||
| 63 | double x, | ||
| 64 | double y, | ||
| 65 | double *latitude, | ||
| 66 | double *longitude); | ||
| 67 | void shumate_viewport_location_to_widget_coords (ShumateViewport *self, | ||
| 68 | GtkWidget *widget, | ||
| 69 | double latitude, | ||
| 70 | double longitude, | ||
| 71 | double *x, | ||
| 72 | double *y); | ||
| 73 | |||
| 74 | G_END_DECLS | ||
| 75 | |||
| 76 | #endif /* __SHUMATE_VIEWPORT_H__ */ | ||
| 77 |