1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this program; if not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION) 19 #error "Only <e-util/e-util.h> should be included directly." 20 #endif 21 22 #ifndef E_CATEGORIES_SELECTOR_H 23 #define E_CATEGORIES_SELECTOR_H 24 25 #include <gtk/gtk.h> 26 27 /* Standard GObject macros */ 28 #define E_TYPE_CATEGORIES_SELECTOR \ 29 (e_categories_selector_get_type ()) 30 #define E_CATEGORIES_SELECTOR(obj) \ 31 (G_TYPE_CHECK_INSTANCE_CAST \ 32 ((obj), E_TYPE_CATEGORIES_SELECTOR, ECategoriesSelector)) 33 #define E_CATEGORIES_SELECTOR_CLASS(cls) \ 34 (G_TYPE_CHECK_CLASS_CAST \ 35 ((cls), E_TYPE_CATEGORIES_SELECTOR, ECategoriesSelectorClass)) 36 #define E_IS_CATEGORIES_SELECTOR(obj) \ 37 (G_TYPE_CHECK_INSTANCE_TYPE \ 38 ((obj), E_TYPE_CATEGORIES_SELECTOR)) 39 #define E_IS_CATEGORIES_SELECTOR_CLASS(cls) \ 40 (G_TYPE_CHECK_CLASS_TYPE \ 41 ((cls), E_TYPE_CATEGORIES_SELECTOR)) 42 #define E_CATEGORIES_SELECTOR_GET_CLASS(obj) \ 43 (G_TYPE_INSTANCE_GET_CLASS \ 44 ((obj), E_TYPE_CATEGORIES_SELECTOR, ECategoriesSelectorClass)) 45 46 G_BEGIN_DECLS 47 48 typedef struct _ECategoriesSelector ECategoriesSelector; 49 typedef struct _ECategoriesSelectorClass ECategoriesSelectorClass; 50 typedef struct _ECategoriesSelectorPrivate ECategoriesSelectorPrivate; 51 52 /** 53 * ECategoriesSelector: 54 * 55 * Contains only private data that should be read and manipulated using the 56 * functions below. 57 * 58 * Since: 3.2 59 **/ 60 struct _ECategoriesSelector { 61 GtkTreeView parent; 62 ECategoriesSelectorPrivate *priv; 63 }; 64 65 struct _ECategoriesSelectorClass { 66 GtkTreeViewClass parent_class; 67 68 void (*category_checked) (ECategoriesSelector *selector, 69 const gchar *category, 70 gboolean checked); 71 72 void (*selection_changed) (ECategoriesSelector *selector, 73 GtkTreeSelection *selection); 74 }; 75 76 GType e_categories_selector_get_type (void) G_GNUC_CONST; 77 GtkWidget * e_categories_selector_new (void); 78 gchar * e_categories_selector_get_checked 79 (ECategoriesSelector *selector); 80 void e_categories_selector_set_checked 81 (ECategoriesSelector *selector, 82 const gchar *categories); 83 gboolean e_categories_selector_get_items_checkable 84 (ECategoriesSelector *selector); 85 void e_categories_selector_set_items_checkable 86 (ECategoriesSelector *selectr, 87 gboolean checkable); 88 void e_categories_selector_delete_selection 89 (ECategoriesSelector *selector); 90 gchar * e_categories_selector_get_selected 91 (ECategoriesSelector *selector); 92 93 G_END_DECLS 94 95 #endif /* E_CATEGORIES_SELECTOR_H */ 96