Commit b4dcca5e authored by Keith Preston's avatar Keith Preston

:Changed directory structure

parent 7da669ad
SUBDIRS = geoclue example @YAHOOBACKEND@
SUBDIRS = geoclue example backend
EXTRA_DIST = geoclue.pc.in
DISTCLEANFILES = geoclue.pc
......
SUBDIRS = map_yahoo position_manual
AC_INIT(geoclue/geoclue.c)
AC_INIT(geoclue/position.c)
PACKAGE=geoclue
VERSION=0.1
VERSION=0.2
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
......@@ -17,23 +17,14 @@ AC_SUBST(DBUS_BINDING_TOOL)
AM_CONFIG_HEADER(config.h)
PKG_CHECK_MODULES(YAHOO, libsoup-2.2 libxml-2.0 dbus-glib-1 geomap gtk+-2.0)
AC_SUBST(YAHOO_CFLAGS)
AC_SUBST(YAHOO_LIBS)
AC_ARG_ENABLE(yahoo-backend, AS_HELP_STRING([--enable-yahoo-backend],[enable yahoo backend]), enable_yahoo_backend=yes, enable_yahoo_backend=no)
if test $enable_yahoo_backend = yes; then
AC_OUTPUT( yahoobackend/Makefile )
PKG_CHECK_MODULES(YAHOO, libsoup-2.2 libxml-2.0 dbus-glib-1 geomap gtk+-2.0)
AC_SUBST(YAHOO_CFLAGS)
AC_SUBST(YAHOO_LIBS)
YAHOOBACKEND=yahoobackend
fi
AC_SUBST(YAHOOBACKEND)
PKG_CHECK_MODULES(DEPS, dbus-glib-1)
PKG_CHECK_MODULES(DEPS, dbus-glib-1 gtk+-2.0)
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)
......@@ -42,5 +33,8 @@ AC_SUBST(DEPS_LIBS)
AC_OUTPUT(Makefile
geoclue/Makefile
example/Makefile
geoclue.pc
geoclue.pc
backend/Makefile
backend/map_yahoo/Makefile
backend/position_manual/Makefile
)
bin_PROGRAMS = example
example_SOURCES = example.c
bin_PROGRAMS = geoclue_position_example geoclue_map_example geoclue_map_layout_example
geoclue_map_example_SOURCES = geoclue_map_example.c
geoclue_map_layout_example_SOURCES = geoclue_map_layout_example.c
geoclue_position_example_SOURCES = geoclue_position_example.c
AM_CPPFLAGS = $(DEPS_CFLAGS) -I$(top_srcdir)
AM_LDFLAGS = $(DEPS_LIBS) $(top_builddir)/geoclue/libgeoclue.la
......
This diff is collapsed.
......@@ -18,17 +18,17 @@
*/
#include <stdio.h>
#include <geoclue/geoclue.h>
#include <geoclue/position.h>
#include <glib.h>
int main (int argc, char** argv)
{
g_type_init();
geoclue_init();
geoclue_position_init();
gdouble lat, lon;
geoclue_current_position(&lat, &lon);
geoclue_position_current_position(&lat, &lon);
printf("You are at %f %f\n", lat, lon);
return 0;
}
\ No newline at end of file
}
......@@ -12,5 +12,8 @@ Libs: -L${libdir} -lgeoclue
Cflags: -I${includedir}/geoclue -I${libdir}/geoclue/include
geocluexml=${datadir}/geoclue/dbus/geoclue_glue.xml
geocluemarshallist=${datadir}/geoclue/dbus/geoclue_signal_marshal.list
\ No newline at end of file
positionxml=${datadir}/geoclue/dbus/position_glue.xml
positionmarshallist=${datadir}/geoclue/dbus/position_signal_marshal.list
mapxml=${datadir}/geoclue/dbus/map_glue.xml
mapmarshallist=${datadir}/map/dbus/map_signal_marshal.list
lib_LTLIBRARIES = libgeoclue.la
EXTRA_DIST = \
geoclue_glue.xml \
geoclue_signal_marshal.list
libgeoclue_la_SOURCES = geoclue.c \
geoclue_signal_marshal.c
position_glue.xml \
position_signal_marshal.list \
map_glue.xml \
map_signal_marshal.list
libgeoclue_la_SOURCES = position.c \
position_signal_marshal.c \
map.c \
map_gtk.c \
map_gtk_layout.c \
map_signal_marshal.c
libgeoclue_la_CFLAGS = $(DEPS_CFLAGS) -I$(top_srcdir)
libgeoclue_la_LIBADD = $(DEPS_LIBS)
libgeoclue_ladir=$(includedir)/geoclue/geoclue
libgeoclue_la_HEADERS = geoclue.h
libgeoclue_la_HEADERS = position.h \
map.h \
map_gtk.h \
map_gtk_layout.h
BUILT_SOURCES = \
geoclue_client_glue.h \
geoclue_signal_marshal.h \
geoclue_signal_marshal.c
position_client_glue.h \
position_signal_marshal.h \
position_signal_marshal.c \
map_client_glue.h \
map_signal_marshal.h \
map_signal_marshal.c
CLEANFILES = \
geoclue_client_glue.h \
geoclue_signal_marshal.h \
geoclue_signal_marshal.c
CLEANFILES = \
position_client_glue.h \
position_signal_marshal.h \
position_signal_marshal.c \
map_client_glue.h \
map_signal_marshal.h \
map_signal_marshal.c
dbusspecdir = $(datadir)/geoclue/dbus
dbusspec_DATA = \
geoclue_glue.xml \
geoclue_signal_marshal.list
position_glue.xml \
position_signal_marshal.list \
map_glue.xml \
map_signal_marshal.list
position_client_glue.h:position_glue.xml
$(DBUS_BINDING_TOOL) --prefix=geoclue_position --mode=glib-client $< > $@
position_signal_marshal.h:position_signal_marshal.list
glib-genmarshal --prefix _geoclue_position --header $< > $@
position_signal_marshal.c:position_signal_marshal.list
glib-genmarshal --prefix _geoclue_position --body $< > $@
map_client_glue.h:map_glue.xml
$(DBUS_BINDING_TOOL) --prefix=geoclue_map --mode=glib-client $< > $@
map_signal_marshal.h:map_signal_marshal.list
glib-genmarshal --prefix _geoclue_map --header $< > $@
map_signal_marshal.c:map_signal_marshal.list
glib-genmarshal --prefix _geoclue_map --body $< > $@
geoclue_client_glue.h:geoclue_glue.xml
$(DBUS_BINDING_TOOL) --prefix=geoclue --mode=glib-client $< > $@
geoclue_signal_marshal.h:geoclue_signal_marshal.list
glib-genmarshal --prefix _geoclue --header $< > $@
geoclue_signal_marshal.c:geoclue_signal_marshal.list
glib-genmarshal --prefix _geoclue --body $< > $@
This diff is collapsed.
/* Geoclue - A DBus api and wrapper for geography information
* Copyright (C) 2006 Garmin
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* 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.
*/
#ifndef __ORG_FOINSE_PROJECT_GEOCLUE_GEOCLUE_H__
#define __ORG_FOINSE_PROJECT_GEOCLUE_GEOCLUE_H__
#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
typedef enum _geoclue_returncode
{
GEOCLUE_SUCCESS = 0,
GEOCLUE_NOT_INITIALIZED = -1,
GEOCLUE_DBUS_ERROR = -2,
GEOCLUE_SERVICE_NOT_AVAILABLE = -3,
} GEOCLUE_RETURNCODE;
typedef void (*GEOCLUE_CALLBACK)(gdouble lat, gdouble lon, void* userdata);
GEOCLUE_RETURNCODE geoclue_version(int* major, int* minor, int* micro);
GEOCLUE_RETURNCODE geoclue_init();
GEOCLUE_RETURNCODE geoclue_close();
GEOCLUE_RETURNCODE geoclue_service_provider(char** name);
GEOCLUE_RETURNCODE geoclue_current_position ( gdouble* OUT_latitude, gdouble* OUT_longitude );
GEOCLUE_RETURNCODE geoclue_current_position_error ( gdouble* OUT_latitude_error, gdouble* OUT_longitude_error );
GEOCLUE_RETURNCODE geoclue_current_altitude ( gdouble* OUT_altitude );
GEOCLUE_RETURNCODE geoclue_current_velocity ( gdouble* OUT_north_velocity, gdouble* OUT_east_velocity );
GEOCLUE_RETURNCODE geoclue_current_time ( gint* OUT_year, gint* OUT_month, gint* OUT_day, gint* OUT_hours, gint* OUT_minutes, gint* OUT_seconds );
GEOCLUE_RETURNCODE geoclue_satellites_in_view ( GArray** OUT_prn_numbers );
GEOCLUE_RETURNCODE geoclue_satellites_data ( const gint IN_prn_number, gdouble* OUT_elevation, gdouble* OUT_azimuth, gdouble* OUT_signal_noise_ratio );
GEOCLUE_RETURNCODE geoclue_sun_rise ( const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_year, const gint IN_month, const gint IN_day, gint* OUT_hours, gint* OUT_minutes, gint* OUT_seconds );
GEOCLUE_RETURNCODE geoclue_sun_set ( const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_year, const gint IN_month, const gint IN_day, gint* OUT_hours, gint* OUT_minutes, gint* OUT_seconds );
GEOCLUE_RETURNCODE geoclue_moon_rise ( const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_year, const gint IN_month, const gint IN_day, gint* OUT_hours, gint* OUT_minutes, gint* OUT_seconds );
GEOCLUE_RETURNCODE geoclue_moon_set ( const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_year, const gint IN_month, const gint IN_day, gint* OUT_hours, gint* OUT_minutes, gint* OUT_seconds );
GEOCLUE_RETURNCODE geoclue_geocode ( const char * IN_street, const char * IN_city, const char * IN_state, const char * IN_zip, gdouble* OUT_latitude, gdouble* OUT_longitude, gint* OUT_return_code );
GEOCLUE_RETURNCODE geoclue_geocode_free_text ( const char * IN_free_text, gdouble* OUT_latitude, gdouble* OUT_longitude, gint* OUT_return_code );
G_END_DECLS
#endif // __ORG_FOINSE_PROJECT_GEOCLUE_GEOCLUE_H__
This diff is collapsed.
/* geoclue_map - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006 Garmin
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* 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.
*/
#ifndef __ORG_FOINSE_PROJECT_GEOCLUE_GEOCLUE_MAP_H__
#define __ORG_FOINSE_PROJECT_GEOCLUE_GEOCLUE_MAP_H__
#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
typedef enum _geoclue_map_returncode
{
GEOCLUE_MAP_SUCCESS = 0,
GEOCLUE_MAP_NOT_INITIALIZED = -1,
GEOCLUE_MAP_DBUS_ERROR = -2,
GEOCLUE_MAP_SERVICE_NOT_AVAILABLE = -3,
GEOCLUE_MAP_HEIGHT_TOO_BIG = -4,
GEOCLUE_MAP_HEIGHT_TOO_SMALL = -5,
GEOCLUE_MAP_WIDTH_TOO_BIG = -6,
GEOCLUE_MAP_WIDTH_TOO_SMALL = -7,
GEOCLUE_MAP_ZOOM_TOO_BIG = -8,
GEOCLUE_MAP_ZOOM_TOO_SMALL = -9,
GEOCLUE_MAP_INVALID_LATITUDE = -10,
GEOCLUE_MAP_INVALID_LONGITUDE = -11
} GEOCLUE_MAP_RETURNCODE;
typedef void (*GEOCLUE_MAP_CALLBACK)(GEOCLUE_MAP_RETURNCODE returncode, GArray* geoclue_map_buffer, gchar* buffer_mime_type, void* userdata);
/*!
* \brief geoclue_map version
* \param major placeholder for version return
* \param minor
* \param micro
* \return GEOCLUE_MAP_NO_ERROR = 0,
* GEOCLUE_MAP_DBUS_ERROR = -1,
* GEOCLUE_MAP_SERVICE_NOT_AVAILABLE = -2
*/
GEOCLUE_MAP_RETURNCODE geoclue_map_version(int* major, int* minor, int* micro);
/*!
* \brief geoclue_map initialization
* \return GEOCLUE_MAP_NO_ERROR = 0,
* GEOCLUE_MAP_DBUS_ERROR = -1,
* GEOCLUE_MAP_SERVICE_NOT_AVAILABLE = -2
*/
GEOCLUE_MAP_RETURNCODE geoclue_map_init();
/*!
* \brief geoclue_map cleanup
* \return GEOCLUE_MAP_NO_ERROR = 0,
* GEOCLUE_MAP_DBUS_ERROR = -1,
* GEOCLUE_MAP_SERVICE_NOT_AVAILABLE = -2
*/
GEOCLUE_MAP_RETURNCODE geoclue_map_close();
GEOCLUE_MAP_RETURNCODE geoclue_map_service_provider(char** name);
GEOCLUE_MAP_RETURNCODE geoclue_map_max_zoom(int* max_zoom);
GEOCLUE_MAP_RETURNCODE geoclue_map_min_zoom(int* min_zoom);
GEOCLUE_MAP_RETURNCODE geoclue_map_max_height(int* max_height);
GEOCLUE_MAP_RETURNCODE geoclue_map_min_height(int* min_height);
GEOCLUE_MAP_RETURNCODE geoclue_map_max_width(int* max_width);
GEOCLUE_MAP_RETURNCODE geoclue_map_min_width(int* min_width);
GEOCLUE_MAP_RETURNCODE geoclue_map_get_map (const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_width, const gint IN_height, const gint IN_zoom, GEOCLUE_MAP_CALLBACK func, void* userdatain);
GEOCLUE_MAP_RETURNCODE geoclue_map_latlong_to_offset(const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_zoom, const gdouble IN_center_latitude, const gdouble IN_center_longitude, int* OUT_x_offset, int* OUT_y_offset);
GEOCLUE_MAP_RETURNCODE geoclue_map_offset_to_latlong(const int IN_x_offset,const int IN_y_offset, const gint IN_zoom, const gdouble IN_center_latitude, const gdouble IN_center_longitude, gdouble* OUT_latitude, gdouble* OUT_longitude );
GEOCLUE_MAP_RETURNCODE geoclue_map_find_zoom_level (const gdouble IN_latitude_top_left, const gdouble IN_longitude_top_left, const gdouble IN_latitude_bottom_right, const gdouble IN_longitude_bottom_right, const gint IN_width, const gint IN_height, gint* OUT_zoom);
G_END_DECLS
#endif // __ORG_FOINSE_PROJECT_GEOCLUE_MAP_GEOCLUE_MAP_H__
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Geomap - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006 Garmin
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* 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.
*-->
<node name="/org/foinse_project/geoclue/map">
<interface name="org.foinse_project.geoclue.map">
<method name="version">
<arg type="i" name="major" direction="out" />
<arg type="i" name="minor" direction="out" />
<arg type="i" name="micro" direction="out" />
</method>
<method name="service_provider">
<arg type="s" name="name" direction="out" />
</method>
<method name="get_map">
<arg type="d" name="latitude" direction="in" />
<arg type="d" name="longitude" direction="in" />
<arg type="i" name="width" direction="in" />
<arg type="i" name="height" direction="in" />
<arg type="i" name="zoom" direction="in" />
<arg type="i" name="return_code" direction="out" />
</method>
<signal name="get_map_finished">
<arg type="i" name="return_code" direction="out" />
<arg type="ay" name="map_buffer" direction="out" />
<arg type="s" name="buffer_mime_type" direction="out" />
</signal>
<method name="latlong_to_offset">
<arg type="d" name="latitude" direction="in" />
<arg type="d" name="longitude" direction="in" />
<arg type="i" name="zoom" direction="in" />
<arg type="d" name="center_latitude" direction="in" />
<arg type="d" name="center_longitude" direction="in" />
<arg type="i" name="x_offset" direction="out" />
<arg type="i" name="y_offset" direction="out" />
</method>
<method name="offset_to_latlong">
<arg type="i" name="x_offset" direction="in" />
<arg type="i" name="y_offset" direction="in" />
<arg type="i" name="zoom" direction="in" />
<arg type="d" name="center_latitude" direction="in" />
<arg type="d" name="center_longitude" direction="in" />
<arg type="d" name="latitude" direction="out" />
<arg type="d" name="longitude" direction="out" />
</method>
<method name="find_zoom_level">
<arg type="d" name="latitude_top_left" direction="in" />
<arg type="d" name="longitude_top_left" direction="in" />
<arg type="d" name="latitude_bottom_right" direction="in" />
<arg type="d" name="longitude_bottom_right" direction="in" />
<arg type="i" name="width" direction="in" />
<arg type="i" name="height" direction="in" />
<arg type="i" name="zoom" direction="out" />
</method>
<method name="max_zoom">
<arg type="i" name="max_zoom" direction="out" />
</method>
<method name="min_zoom">
<arg type="i" name="min_zoom" direction="out" />
</method>
<method name="max_height">
<arg type="i" name="max_height" direction="out" />
</method>
<method name="min_height">
<arg type="i" name="min_height" direction="out" />
</method>
<method name="max_width">
<arg type="i" name="max_width" direction="out" />
</method>
<method name="min_width">
<arg type="i" name="min_width" direction="out" />
</method>
</interface>
</node>
/* Geomap - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006 Garmin
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* 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.
*/
#include "map_gtk.h"
static GEOCLUE_MAP_GTK_CALLBACK callbackfunction = NULL;
void geoclue_map_gtk_callback(GEOCLUE_MAP_RETURNCODE returncode, GArray* map_buffer, gchar* buffer_mime_type, void* userdata)
{
GError* error = NULL;
GdkPixbuf* buf ;
GdkPixbufLoader* pixbufloader = gdk_pixbuf_loader_new_with_mime_type
(buffer_mime_type,
&error);
gdk_pixbuf_loader_write (pixbufloader,
map_buffer->data,
map_buffer->len,
&error);
buf = gdk_pixbuf_loader_get_pixbuf(pixbufloader);
if(callbackfunction != NULL)
callbackfunction(buf, userdata);
}
GEOCLUE_MAP_RETURNCODE geoclue_map_gtk_get_gdk_pixbuf (const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_width, const gint IN_height, const gint IN_zoom, GEOCLUE_MAP_GTK_CALLBACK func, void* userdatain )
{
callbackfunction = func;
return geoclue_map_get_map(IN_latitude,IN_longitude,IN_width,IN_height, IN_zoom, geoclue_map_gtk_callback, userdatain);
}
/* GEOCLUE_MAP - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006 Garmin
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* 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.*/
#ifndef __ORG_FOINSE_PROJECT_GEOCLUE_MAP_GTK_H__
#define __ORG_FOINSE_PROJECT_GEOCLUE_MAP_GTK_H__
#include <geoclue/map.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
G_BEGIN_DECLS
typedef void (*GEOCLUE_MAP_GTK_CALLBACK)(GdkPixbuf* map_buffer, void* userdata);
GEOCLUE_MAP_RETURNCODE geoclue_map_gtk_get_gdk_pixbuf (const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_width, const gint IN_height, const gint IN_zoom, GEOCLUE_MAP_GTK_CALLBACK func, void* userdatain );
G_END_DECLS
#endif // __ORG_FOINSE_PROJECT_GEOCLUE_MAP_GTK_H__
This diff is collapsed.
/* Geocluemap - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006 Garmin
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* 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.
*/
#ifndef __ORG_FOINSE_PROJECT_GEOCLUE_MAP_GTK_LAYOUT_H__
#define __ORG_FOINSE_PROJECT_GEOCLUE_MAP_GTK_LAYOUT_H__
#include <gtk/gtklayout.h>
#include <gtk/gtkeventbox.h>
G_BEGIN_DECLS
#define GEOCLUE_MAP_GTK_TYPE_LAYOUT (geoclue_map_gtk_layout_get_type ())
#define GEOCLUE_MAP_GTK_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEOCLUE_MAP_GTK_TYPE_LAYOUT, GeocluemapGtkLayout))
#define GEOCLUE_MAP_GTK_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEOCLUE_MAP_GTK_TYPE_LAYOUT, GeocluemapGtkLayoutClass))
#define GEOCLUE_MAP_GTK_IS_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEOCLUE_MAP_GTK_TYPE_LAYOUT))
#define GEOCLUE_MAP_GTK_IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEOCLUE_MAP_GTK_TYPE_LAYOUT))
#define GEOCLUE_MAP_GTK_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEOCLUE_MAP_GTK_TYPE_LAYOUT, GeocluemapGtkLayoutClass))
typedef struct _GeocluemapGtkLayout GeocluemapGtkLayout;
typedef struct _GeocluemapGtkLayoutClass GeocluemapGtkLayoutClass;
struct _GeocluemapGtkLayout
{
GtkLayout container;
GList *geoclue_map_image_children;
GList *widget_children;
GtkWidget* eventbox;
/* private */
gboolean pending;
gboolean idle_queued;
gdouble button_click_x;
gdouble button_click_y;
gint last_width;
gint last_height;
};
struct _GeocluemapGtkLayoutClass
{
GtkLayoutClass parent_class;
};
GType geoclue_map_gtk_layout_get_type (void) G_GNUC_CONST;
GtkWidget* geoclue_map_gtk_layout_new (GtkEventBox* eventbox, gdouble latitude, gdouble longitude, gint zoom);
GtkWidget* geoclue_map_gtk_layout_new_corners (GtkEventBox* eventbox, gdouble top_left_latitude, gdouble top_left_longitude, gdouble bottom_right_latitude, gdouble bottom_right_longitude);
gboolean geoclue_map_gtk_layout_zoom_in(GeocluemapGtkLayout* geoclue_maplayout );
gboolean geoclue_map_gtk_layout_zoom_out(GeocluemapGtkLayout* geoclue_maplayout);
gboolean geoclue_map_gtk_layout_zoom(GeocluemapGtkLayout* geoclue_maplayout, gint zoom);
gboolean geoclue_map_gtk_layout_lat_lon(GeocluemapGtkLayout* geoclue_maplayout, gdouble IN_latitude, gdouble IN_longitude);
gboolean geoclue_map_gtk_layout_add_widget(GeocluemapGtkLayout* geoclue_maplayout, GtkWidget* widget, gdouble IN_latitude, gdouble IN_longitude);
G_END_DECLS
#endif /* __ORG_FOINSE_PROJECT_GEOCLUE_MAP_GTK_LAYOUT_H__ */
This diff is collapsed.
/* Geoclue - A DBus api and wrapper for geography information
* Copyright (C) 2006 Garmin
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* 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.
*/
#ifndef __ORG_FOINSE_PROJECT_GEOCLUE_POSITION_GEOCLUE_POSITION_H__
#define __ORG_FOINSE_PROJECT_GEOCLUE_POSITION_GEOCLUE_POSITION_H__
#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
typedef enum _geoclue_position_returncode
{
GEOCLUE_POSITION_SUCCESS = 0,
GEOCLUE_POSITION_NOT_INITIALIZED = -1,
GEOCLUE_POSITION_DBUS_ERROR = -2,
GEOCLUE_POSITION_SERVICE_NOT_AVAILABLE = -3,
} GEOCLUE_POSITION_RETURNCODE;
typedef void (*GEOCLUE_POSITION_CALLBACK)(gdouble lat, gdouble lon, void* userdata);
GEOCLUE_POSITION_RETURNCODE geoclue_position_version(int* major, int* minor, int* micro);
GEOCLUE_POSITION_RETURNCODE geoclue_position_init();
GEOCLUE_POSITION_RETURNCODE geoclue_position_close();
GEOCLUE_POSITION_RETURNCODE geoclue_position_service_provider(char** name);
GEOCLUE_POSITION_RETURNCODE geoclue_position_current_position ( gdouble* OUT_latitude, gdouble* OUT_longitude );
GEOCLUE_POSITION_RETURNCODE geoclue_position_current_position_error ( gdouble* OUT_latitude_error, gdouble* OUT_longitude_error );
GEOCLUE_POSITION_RETURNCODE geoclue_position_current_altitude ( gdouble* OUT_altitude );
GEOCLUE_POSITION_RETURNCODE geoclue_position_current_velocity ( gdouble* OUT_north_velocity, gdouble* OUT_east_velocity );
GEOCLUE_POSITION_RETURNCODE geoclue_position_current_time ( gint* OUT_year, gint* OUT_month, gint* OUT_day, gint* OUT_hours, gint* OUT_minutes, gint* OUT_seconds );
GEOCLUE_POSITION_RETURNCODE geoclue_position_satellites_in_view ( GArray** OUT_prn_numbers );
GEOCLUE_POSITION_RETURNCODE geoclue_position_satellites_data ( const gint IN_prn_number, gdouble* OUT_elevation, gdouble* OUT_azimuth, gdouble* OUT_signal_noise_ratio );