1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* e-source-combo-box.h 3 * 4 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published by 8 * the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this program; if not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION) 20 #error "Only <e-util/e-util.h> should be included directly." 21 #endif 22 23 #ifndef E_SOURCE_COMBO_BOX_H 24 #define E_SOURCE_COMBO_BOX_H 25 26 #include <gtk/gtk.h> 27 #include <libedataserver/libedataserver.h> 28 29 #define E_TYPE_SOURCE_COMBO_BOX \ 30 (e_source_combo_box_get_type ()) 31 #define E_SOURCE_COMBO_BOX(obj) \ 32 (G_TYPE_CHECK_INSTANCE_CAST \ 33 ((obj), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBox)) 34 #define E_SOURCE_COMBO_BOX_CLASS(cls) \ 35 (G_TYPE_CHECK_CLASS_CAST \ 36 ((cls), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBoxClass)) 37 #define E_IS_SOURCE_COMBO_BOX(obj) \ 38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SOURCE_COMBO_BOX)) 39 #define E_IS_SOURCE_COMBO_BOX_CLASS(cls) \ 40 (G_TYPE_CHECK_CLASS_TYPE ((cls), E_TYPE_SOURCE_COMBO_BOX)) 41 #define E_SOURCE_COMBO_BOX_GET_CLASS(obj) \ 42 (G_TYPE_INSTANCE_GET_CLASS \ 43 ((obj), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBox)) 44 45 G_BEGIN_DECLS 46 47 typedef struct _ESourceComboBox ESourceComboBox; 48 typedef struct _ESourceComboBoxClass ESourceComboBoxClass; 49 typedef struct _ESourceComboBoxPrivate ESourceComboBoxPrivate; 50 51 /** 52 * ESourceComboBox: 53 * 54 * Since: 2.22 55 **/ 56 struct _ESourceComboBox { 57 GtkComboBox parent; 58 ESourceComboBoxPrivate *priv; 59 }; 60 61 struct _ESourceComboBoxClass { 62 GtkComboBoxClass parent_class; 63 }; 64 65 GType e_source_combo_box_get_type (void) G_GNUC_CONST; 66 GtkWidget * e_source_combo_box_new (ESourceRegistry *registry, 67 const gchar *extension_name); 68 ESourceRegistry * 69 e_source_combo_box_get_registry (ESourceComboBox *combo_box); 70 void e_source_combo_box_set_registry (ESourceComboBox *combo_box, 71 ESourceRegistry *registry); 72 const gchar * e_source_combo_box_get_extension_name 73 (ESourceComboBox *combo_box); 74 void e_source_combo_box_set_extension_name 75 (ESourceComboBox *combo_box, 76 const gchar *extension_name); 77 gboolean e_source_combo_box_get_show_colors 78 (ESourceComboBox *combo_box); 79 void e_source_combo_box_set_show_colors 80 (ESourceComboBox *combo_box, 81 gboolean show_colors); 82 ESource * e_source_combo_box_ref_active (ESourceComboBox *combo_box); 83 void e_source_combo_box_set_active (ESourceComboBox *combo_box, 84 ESource *source); 85 void e_source_combo_box_hide_sources (ESourceComboBox *combo_box, 86 ...) G_GNUC_NULL_TERMINATED; 87 88 G_END_DECLS 89 90 #endif /* E_SOURCE_COMBO_BOX_H */ 91