2 * Copyright (C) 2006, 2007 John Costigan.
4 * POI and GPS-Info code originally written by Cezary Jackiewicz.
6 * Default map data provided by http://www.openstreetmap.org/
8 * This file is part of Maemo Mapper.
10 * Maemo Mapper is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
15 * Maemo Mapper is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Maemo Mapper. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef MAEMO_MAPPER_DBUS_H
25 #define MAEMO_MAPPER_DBUS_H
27 #define DBUS_API_SUBJECT_TO_CHANGE
29 #define MM_DBUS_SERVICE "com.gnuite.maemo_mapper"
30 #define MM_DBUS_PATH "/com/gnuite/maemo_mapper"
31 #define MM_DBUS_INTERFACE "com.gnuite.maemo_mapper"
34 * Sets the view center (including zoom and viewing angle). All of the
35 * fields are optional, although (due to the requirements of DBUS), if you
36 * specify one value, you must specify all the values preceding it. I.e. if
37 * you specify new_viewing_angle, you must specify all the fields.
39 * A screen refresh is performed regardless of whether or not any of the
40 * fields are specified or different from previous values. Thus, you can
41 * force a refresh of the screen simply by calling this method with no
44 * This method has no effect if the user is currently tap-and-holding or
45 * dragging on the screen.
47 * Note that, if this method causes the refresh of the screen, then
48 * Auto-Center will always become disabled.
50 #define MM_DBUS_METHOD_SET_VIEW_POSITION "set_view_center"
51 typedef struct _SetViewPositionArgs SetViewPositionArgs;
52 struct _SetViewPositionArgs
57 gdouble new_viewing_angle; /* i.e. rotation */
61 * Occurs whenever the view center (including zoom and viewing angle)
62 * changes. This signal is not necessarily fired when the screen size is
63 * changed. Not all of the given information may necessarily have changed,
64 * but at least one is guaranteed to have changed.
66 #define MM_DBUS_SIGNAL_VIEW_POSITION_CHANGED "view_position_changed"
67 typedef struct _ViewPositionChangedArgs ViewPositionChangedArgs;
68 struct _ViewPositionChangedArgs
73 gdouble new_viewing_angle; /* i.e. rotation */
75 void dbus_ifc_fire_view_position_changed(
76 Point new_center, gint new_zoom, gdouble new_viewing_angle);
79 * Occurs whenever the dimensions (width and height) of the map change. The
80 * dimensions do not include any sidebars (like the GPS info panel). If the
81 * GPS info panel is hidden or unhidden, this event will be fired.
83 #define MM_DBUS_SIGNAL_VIEW_DIMENSIONS_CHANGED "view_dimensions_changed"
84 typedef struct _ViewDimensionsChangedArgs ViewDimensionsChangedArgs;
85 struct _ViewDimensionsChangedArgs
87 gint new_view_width_pixels;
88 gint new_view_height_pixels;
90 void dbus_ifc_fire_view_dimensions_changed(
91 gint new_view_width_pixels, gint new_view_height_pixels);
94 void dbus_ifc_init(void);
96 #endif /* ifndef MAEMO_MAPPER_GPS_H */