1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
4 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
21 * Author: Ettore Perazzoli <ettore@ximian.com>
24 #if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
25 #error "Only <libedataserverui/libedataserverui.h> should be included directly."
28 #ifndef E_SOURCE_SELECTOR_H
29 #define E_SOURCE_SELECTOR_H
32 #include <libedataserver/libedataserver.h>
34 /* Standard GObject macros */
35 #define E_TYPE_SOURCE_SELECTOR \
36 (e_source_selector_get_type ())
37 #define E_SOURCE_SELECTOR(obj) \
38 (G_TYPE_CHECK_INSTANCE_CAST \
39 ((obj), E_TYPE_SOURCE_SELECTOR, ESourceSelector))
40 #define E_SOURCE_SELECTOR_CLASS(cls) \
41 (G_TYPE_CHECK_CLASS_CAST \
42 ((cls), E_TYPE_SOURCE_SELECTOR, ESourceSelectorClass))
43 #define E_IS_SOURCE_SELECTOR(obj) \
44 (G_TYPE_CHECK_INSTANCE_TYPE \
45 ((obj), E_TYPE_SOURCE_SELECTOR))
46 #define E_IS_SOURCE_SELECTOR_CLASS(cls) \
47 (G_TYPE_CHECK_CLASS_TYPE \
48 ((cls), E_TYPE_SOURCE_SELECTOR))
49 #define E_SOURCE_SELECTOR_GET_CLASS(obj) \
50 (G_TYPE_INSTANCE_GET_CLASS \
51 ((obj), E_TYPE_SOURCE_SELECTOR, ESourceSelectorClass))
55 typedef struct _ESourceSelector ESourceSelector;
56 typedef struct _ESourceSelectorClass ESourceSelectorClass;
57 typedef struct _ESourceSelectorPrivate ESourceSelectorPrivate;
59 struct _ESourceSelector {
61 ESourceSelectorPrivate *priv;
64 struct _ESourceSelectorClass {
65 GtkTreeViewClass parent_class;
68 gboolean (*get_source_selected) (ESourceSelector *selector,
70 void (*set_source_selected) (ESourceSelector *selector,
75 void (*selection_changed) (ESourceSelector *selector);
76 void (*primary_selection_changed)
77 (ESourceSelector *selector);
78 gboolean (*popup_event) (ESourceSelector *selector,
80 GdkEventButton *event);
81 gboolean (*data_dropped) (ESourceSelector *selector,
82 GtkSelectionData *data,
92 GType e_source_selector_get_type (void);
93 GtkWidget * e_source_selector_new (ESourceRegistry *registry,
94 const gchar *extension_name);
96 e_source_selector_get_registry (ESourceSelector *selector);
97 const gchar * e_source_selector_get_extension_name
98 (ESourceSelector *selector);
99 gboolean e_source_selector_get_show_colors
100 (ESourceSelector *selector);
101 void e_source_selector_set_show_colors
102 (ESourceSelector *selector,
103 gboolean show_colors);
104 gboolean e_source_selector_get_show_toggles
105 (ESourceSelector *selector);
106 void e_source_selector_set_show_toggles
107 (ESourceSelector *selector,
108 gboolean show_toggles);
109 void e_source_selector_select_source (ESourceSelector *selector,
111 void e_source_selector_unselect_source
112 (ESourceSelector *selector,
114 void e_source_selector_select_exclusive
115 (ESourceSelector *selector,
117 gboolean e_source_selector_source_is_selected
118 (ESourceSelector *selector,
120 GSList * e_source_selector_get_selection (ESourceSelector *selector);
121 void e_source_selector_free_selection
123 void e_source_selector_set_select_new
124 (ESourceSelector *selector,
126 void e_source_selector_edit_primary_selection
127 (ESourceSelector *selector);
128 ESource * e_source_selector_ref_primary_selection
129 (ESourceSelector *selector);
130 void e_source_selector_set_primary_selection
131 (ESourceSelector *selector,
133 ESource * e_source_selector_ref_source_by_path
134 (ESourceSelector *selector,
136 void e_source_selector_queue_write (ESourceSelector *selector,
141 #endif /* E_SOURCE_SELECTOR_H */