1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 2 /* timezone-menu.h - Timezone-selecting menu 3 * 4 * Copyright 2008, Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public License 8 * as published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, see 18 * <https://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef GWEATHER_TIMEZONE_MENU_H 22 #define GWEATHER_TIMEZONE_MENU_H 1 23 24 #if !(defined(IN_GWEATHER_H) || defined(GWEATHER_COMPILATION)) 25 #error "gweather-timezone-menu.h must not be included individually, include gweather.h instead" 26 #endif 27 28 #include <gtk/gtk.h> 29 #include <libgweather/gweather-location.h> 30 31 typedef struct _GWeatherTimezoneMenu GWeatherTimezoneMenu; 32 typedef struct _GWeatherTimezoneMenuClass GWeatherTimezoneMenuClass; 33 34 #define GWEATHER_TYPE_TIMEZONE_MENU (gweather_timezone_menu_get_type ()) 35 #define GWEATHER_TIMEZONE_MENU(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GWEATHER_TYPE_TIMEZONE_MENU, GWeatherTimezoneMenu)) 36 #define GWEATHER_TIMEZONE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GWEATHER_TYPE_TIMEZONE_MENU, GWeatherTimezoneMenuClass)) 37 #define GWEATHER_IS_TIMEZONE_MENU(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GWEATHER_TYPE_TIMEZONE_MENU)) 38 #define GWEATHER_IS_TIMEZONE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GWEATHER_TYPE_TIMEZONE_MENU)) 39 #define GWEATHER_TIMEZONE_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GWEATHER_TYPE_TIMEZONE_MENU, GWeatherTimezoneMenuClass)) 40 41 struct _GWeatherTimezoneMenu { 42 GtkComboBox parent; 43 44 /*< private >*/ 45 GWeatherTimezone *zone; 46 }; 47 48 struct _GWeatherTimezoneMenuClass { 49 GtkComboBoxClass parent_class; 50 51 }; 52 53 GType gweather_timezone_menu_get_type (void); 54 GtkWidget *gweather_timezone_menu_new (GWeatherLocation *top); 55 void gweather_timezone_menu_set_tzid (GWeatherTimezoneMenu *menu, 56 const char *tzid); 57 const char *gweather_timezone_menu_get_tzid (GWeatherTimezoneMenu *menu); 58 59 #endif 60