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 modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * published by the Free Software Foundation; either the
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
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/>.
18 * Author: Ettore Perazzoli <ettore@ximian.com>
21 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
22 #error "Only <e-util/e-util.h> should be included directly."
25 #ifndef E_SOURCE_SELECTOR_H
26 #define E_SOURCE_SELECTOR_H
29 #include <libedataserver/libedataserver.h>
31 /* Standard GObject macros */
32 #define E_TYPE_SOURCE_SELECTOR \
33 (e_source_selector_get_type ())
34 #define E_SOURCE_SELECTOR(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST \
36 ((obj), E_TYPE_SOURCE_SELECTOR, ESourceSelector))
37 #define E_SOURCE_SELECTOR_CLASS(cls) \
38 (G_TYPE_CHECK_CLASS_CAST \
39 ((cls), E_TYPE_SOURCE_SELECTOR, ESourceSelectorClass))
40 #define E_IS_SOURCE_SELECTOR(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE \
42 ((obj), E_TYPE_SOURCE_SELECTOR))
43 #define E_IS_SOURCE_SELECTOR_CLASS(cls) \
44 (G_TYPE_CHECK_CLASS_TYPE \
45 ((cls), E_TYPE_SOURCE_SELECTOR))
46 #define E_SOURCE_SELECTOR_GET_CLASS(obj) \
47 (G_TYPE_INSTANCE_GET_CLASS \
48 ((obj), E_TYPE_SOURCE_SELECTOR, ESourceSelectorClass))
52 typedef struct _ESourceSelector ESourceSelector
;
53 typedef struct _ESourceSelectorClass ESourceSelectorClass
;
54 typedef struct _ESourceSelectorPrivate ESourceSelectorPrivate
;
56 struct _ESourceSelector
{
58 ESourceSelectorPrivate
*priv
;
61 struct _ESourceSelectorClass
{
62 GtkTreeViewClass parent_class
;
65 gboolean (*get_source_selected
) (ESourceSelector
*selector
,
67 gboolean (*set_source_selected
) (ESourceSelector
*selector
,
72 void (*selection_changed
) (ESourceSelector
*selector
);
73 void (*primary_selection_changed
)
74 (ESourceSelector
*selector
);
75 gboolean (*popup_event
) (ESourceSelector
*selector
,
77 GdkEventButton
*event
);
78 gboolean (*data_dropped
) (ESourceSelector
*selector
,
79 GtkSelectionData
*data
,
83 void (*source_selected
) (ESourceSelector
*selector
,
85 void (*source_unselected
) (ESourceSelector
*selector
,
93 GType
e_source_selector_get_type (void) G_GNUC_CONST
;
94 GtkWidget
* e_source_selector_new (ESourceRegistry
*registry
,
95 const gchar
*extension_name
);
97 e_source_selector_get_registry (ESourceSelector
*selector
);
98 const gchar
* e_source_selector_get_extension_name
99 (ESourceSelector
*selector
);
100 gboolean e_source_selector_get_show_colors
101 (ESourceSelector
*selector
);
102 void e_source_selector_set_show_colors
103 (ESourceSelector
*selector
,
104 gboolean show_colors
);
105 gboolean e_source_selector_get_show_icons
106 (ESourceSelector
*selector
);
107 void e_source_selector_set_show_icons
108 (ESourceSelector
*selector
,
109 gboolean show_icons
);
110 gboolean e_source_selector_get_show_toggles
111 (ESourceSelector
*selector
);
112 void e_source_selector_set_show_toggles
113 (ESourceSelector
*selector
,
114 gboolean show_toggles
);
115 void e_source_selector_select_source (ESourceSelector
*selector
,
117 void e_source_selector_unselect_source
118 (ESourceSelector
*selector
,
120 void e_source_selector_select_exclusive
121 (ESourceSelector
*selector
,
123 gboolean e_source_selector_source_is_selected
124 (ESourceSelector
*selector
,
126 GList
* e_source_selector_get_selection (ESourceSelector
*selector
);
127 void e_source_selector_edit_primary_selection
128 (ESourceSelector
*selector
);
129 ESource
* e_source_selector_ref_primary_selection
130 (ESourceSelector
*selector
);
131 void e_source_selector_set_primary_selection
132 (ESourceSelector
*selector
,
134 ESource
* e_source_selector_ref_source_by_iter
135 (ESourceSelector
*selector
,
137 ESource
* e_source_selector_ref_source_by_path
138 (ESourceSelector
*selector
,
140 void e_source_selector_queue_write (ESourceSelector
*selector
,
142 void e_source_selector_update_row (ESourceSelector
*selector
,
144 void e_source_selector_update_all_rows
145 (ESourceSelector
*selector
);
146 void e_source_selector_set_source_tooltip
147 (ESourceSelector
*selector
,
149 const gchar
*tooltip
);
150 gchar
* e_source_selector_dup_source_tooltip
151 (ESourceSelector
*selector
,
153 void e_source_selector_set_source_is_busy
154 (ESourceSelector
*selector
,
157 gboolean e_source_selector_get_source_is_busy
158 (ESourceSelector
*selector
,
163 #endif /* E_SOURCE_SELECTOR_H */