Branch data Line data Source code
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 : : 30 : : #include <shumate/shumate-location.h> 31 : : #include <shumate/shumate-map-source.h> 32 : : 33 : : G_BEGIN_DECLS 34 : : 35 : : #define SHUMATE_TYPE_VIEWPORT shumate_viewport_get_type () 36 [ + - + - : 396 : G_DECLARE_FINAL_TYPE (ShumateViewport, shumate_viewport, SHUMATE, VIEWPORT, GObject) + + + - ] 37 : : 38 : : ShumateViewport *shumate_viewport_new (void); 39 : : 40 : : void shumate_viewport_set_zoom_level (ShumateViewport *self, 41 : : double zoom_level); 42 : : double shumate_viewport_get_zoom_level (ShumateViewport *self); 43 : : 44 : : void shumate_viewport_set_max_zoom_level (ShumateViewport *self, 45 : : guint max_zoom_level); 46 : : guint shumate_viewport_get_max_zoom_level (ShumateViewport *self); 47 : : 48 : : void shumate_viewport_set_min_zoom_level (ShumateViewport *self, 49 : : guint min_zoom_level); 50 : : guint shumate_viewport_get_min_zoom_level (ShumateViewport *self); 51 : : 52 : : void shumate_viewport_set_reference_map_source (ShumateViewport *self, 53 : : ShumateMapSource *map_source); 54 : : ShumateMapSource *shumate_viewport_get_reference_map_source (ShumateViewport *self); 55 : : 56 : : void shumate_viewport_set_rotation (ShumateViewport *self, 57 : : double rotation); 58 : : double shumate_viewport_get_rotation (ShumateViewport *self); 59 : : 60 : : void shumate_viewport_widget_coords_to_location (ShumateViewport *self, 61 : : GtkWidget *widget, 62 : : double x, 63 : : double y, 64 : : double *latitude, 65 : : double *longitude); 66 : : void shumate_viewport_location_to_widget_coords (ShumateViewport *self, 67 : : GtkWidget *widget, 68 : : double latitude, 69 : : double longitude, 70 : : double *x, 71 : : double *y); 72 : : 73 : : G_END_DECLS 74 : : 75 : : #endif /* __SHUMATE_VIEWPORT_H__ */