2 * GtkCompass: Display a compass with heading and target
3 * Copyright (C) 2007 Kaj-Michael Lang
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __GTK_COMPASS_H__
20 #define __GTK_COMPASS_H__
28 #define GTK_COMPASS_TYPE (gtk_compass_get_type ())
29 #define GTK_COMPASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_COMPASS_TYPE, GtkCompass))
30 #define GTK_COMPASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_COMPASS_TYPE, GtkCompassClass))
31 #define GTK_IS_COMPASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_COMPASS_TYPE))
33 typedef struct _GtkCompass GtkCompass;
34 typedef struct _GtkCompassClass GtkCompassClass;
37 GtkDrawingArea widget;
43 guint xoffset, yoffset;
45 PangoContext *context;
47 PangoFontDescription *fontdesc;
58 struct _GtkCompassClass {
59 GtkWidgetClass parent_class;
62 GType gtk_compass_get_type(void);
63 GtkWidget* gtk_compass_new(GpsData *data);
64 void gtk_compass_refresh(GtkWidget *widget);
65 void gtk_compass_set_way_heading(GtkWidget *widget, gboolean valid, gfloat heading);
66 void gtk_compass_set_dest_heading(GtkWidget *widget, gboolean valid, gfloat heading);
70 #endif /* __GTK_COMPASS_H__ */