shumate-viewport.h 3.25 KB
Newer Older
Marcus Lundblad's avatar
Marcus Lundblad committed
1
2
3
4
/* shumate-viewport.h: Viewport actor
 *
 * Copyright (C) 2008 OpenedHand
 * Copyright (C) 2011-2013 Jiri Techet <techet@gmail.com>
Marcus Lundblad's avatar
Marcus Lundblad committed
5
 * Copyright (C) 2019 Marcus Lundblad <ml@update.uu.se>
Marcus Lundblad's avatar
Marcus Lundblad committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Written by: Chris Lord <chris@openedhand.com>
 */

#ifndef __SHUMATE_VIEWPORT_H__
#define __SHUMATE_VIEWPORT_H__

#include <glib-object.h>
29
30
31

#include <shumate/shumate-location.h>
#include <shumate/shumate-map-source.h>
Marcus Lundblad's avatar
Marcus Lundblad committed
32
33
34
35

G_BEGIN_DECLS

#define SHUMATE_TYPE_VIEWPORT shumate_viewport_get_type ()
36
G_DECLARE_FINAL_TYPE (ShumateViewport, shumate_viewport, SHUMATE, VIEWPORT, GObject)
Marcus Lundblad's avatar
Marcus Lundblad committed
37

38
ShumateViewport *shumate_viewport_new (void);
Marcus Lundblad's avatar
Marcus Lundblad committed
39

40
void shumate_viewport_set_zoom_level (ShumateViewport *self,
James Westman's avatar
James Westman committed
41
42
                                      double           zoom_level);
double shumate_viewport_get_zoom_level (ShumateViewport *self);
43
44
45
46

void shumate_viewport_set_max_zoom_level (ShumateViewport *self,
                                          guint            max_zoom_level);
guint shumate_viewport_get_max_zoom_level (ShumateViewport *self);
Marcus Lundblad's avatar
Marcus Lundblad committed
47

48
49
50
void shumate_viewport_set_min_zoom_level (ShumateViewport *self,
                                          guint            min_zoom_level);
guint shumate_viewport_get_min_zoom_level (ShumateViewport *self);
Marcus Lundblad's avatar
Marcus Lundblad committed
51

52
53
54
void shumate_viewport_set_reference_map_source (ShumateViewport  *self,
                                                ShumateMapSource *map_source);
ShumateMapSource *shumate_viewport_get_reference_map_source (ShumateViewport  *self);
Marcus Lundblad's avatar
Marcus Lundblad committed
55

James Westman's avatar
James Westman committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
void shumate_viewport_set_rotation (ShumateViewport *self,
                                    double           rotation);
double shumate_viewport_get_rotation (ShumateViewport *self);

void shumate_viewport_widget_coords_to_location (ShumateViewport *self,
                                                 GtkWidget       *widget,
                                                 double           x,
                                                 double           y,
                                                 double          *latitude,
                                                 double          *longitude);
void shumate_viewport_location_to_widget_coords (ShumateViewport *self,
                                                 GtkWidget       *widget,
                                                 double           latitude,
                                                 double           longitude,
                                                 double          *x,
                                                 double          *y);
Marcus Lundblad's avatar
Marcus Lundblad committed
72
73
74
75

G_END_DECLS

#endif /* __SHUMATE_VIEWPORT_H__ */