Merging upstream version 0.7.0 (Closes: #493243, #510888, #567617, #699414, #709777...
[debian/lxpanel.git] / plugins / weather / weatherwidget.h
1 /**
2 * Copyright (c) 2012-2014 Piotr Sipika; see the AUTHORS file for more.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * See the COPYRIGHT file for more information.
19 */
20
21 /* Declarations for the custom weather widget */
22
23 #ifndef __WEATHERWIDGET_H__
24 #define __WEATHERWIDGET_H__
25
26 #include <gtk/gtk.h>
27 #include <glib.h>
28
29 G_BEGIN_DECLS
30
31 #define GTK_WEATHER_TYPE (gtk_weather_get_type())
32 #define GTK_WEATHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
33 GTK_WEATHER_TYPE, GtkWeather))
34 #define GTK_WEATHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
35 GTK_WEATHER_TYPE, GtkWeatherClass))
36 #define IS_GTK_WEATHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
37 GTK_WEATHER_TYPE))
38 #define IS_GTK_WEATHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
39 GTK_WEATHER_TYPE))
40
41 typedef struct _GtkWeather GtkWeather;
42 typedef struct _GtkWeatherClass GtkWeatherClass;
43
44 struct _GtkWeather
45 {
46 GtkEventBox widget;
47 };
48
49 struct _GtkWeatherClass
50 {
51 GtkEventBoxClass parent_class;
52
53 void (* location_changed) (GtkWeather * weather, const gpointer location);
54 void (* forecast_changed) (GtkWeather * weather, const gpointer lorecast);
55 };
56
57 GType gtk_weather_get_type(void) G_GNUC_CONST;
58 GtkWidget * gtk_weather_new(gboolean);
59 void gtk_weather_run_preferences_dialog(GtkWidget * widget);
60 void gtk_weather_run_popup_menu(GtkWidget * widget);
61 void gtk_weather_run_conditions_dialog(GtkWidget * widget);
62 gchar * gtk_weather_get_tooltip_text(GtkWidget * widget);
63 GtkWidget * gtk_weather_create_preferences_dialog(GtkWidget * widget);
64
65 void weather_save_configuration(GtkWidget * pWeather, LocationInfo * pLocation);
66
67 G_END_DECLS
68
69 #endif