Updated Hungarian translation
[evolution.git] / e-util / e-source-selector.h
blobe186601a4ffa21652239730abc49299ee4d4ad48
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* e-source-selector.h
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
13 * for more details.
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."
23 #endif
25 #ifndef E_SOURCE_SELECTOR_H
26 #define E_SOURCE_SELECTOR_H
28 #include <gtk/gtk.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))
50 G_BEGIN_DECLS
52 typedef struct _ESourceSelector ESourceSelector;
53 typedef struct _ESourceSelectorClass ESourceSelectorClass;
54 typedef struct _ESourceSelectorPrivate ESourceSelectorPrivate;
56 struct _ESourceSelector {
57 GtkTreeView parent;
58 ESourceSelectorPrivate *priv;
61 struct _ESourceSelectorClass {
62 GtkTreeViewClass parent_class;
64 /* Methods */
65 gboolean (*get_source_selected) (ESourceSelector *selector,
66 ESource *source);
67 gboolean (*set_source_selected) (ESourceSelector *selector,
68 ESource *source,
69 gboolean selected);
71 /* Signals */
72 void (*selection_changed) (ESourceSelector *selector);
73 void (*primary_selection_changed)
74 (ESourceSelector *selector);
75 gboolean (*popup_event) (ESourceSelector *selector,
76 ESource *primary,
77 GdkEventButton *event);
78 gboolean (*data_dropped) (ESourceSelector *selector,
79 GtkSelectionData *data,
80 ESource *destination,
81 GdkDragAction action,
82 guint target_info);
83 void (*source_selected) (ESourceSelector *selector,
84 ESource *source);
85 void (*source_unselected) (ESourceSelector *selector,
86 ESource *source);
88 gpointer padding1;
89 gpointer padding2;
90 gpointer padding3;
93 GType e_source_selector_get_type (void) G_GNUC_CONST;
94 GtkWidget * e_source_selector_new (ESourceRegistry *registry,
95 const gchar *extension_name);
96 ESourceRegistry *
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,
116 ESource *source);
117 void e_source_selector_unselect_source
118 (ESourceSelector *selector,
119 ESource *source);
120 void e_source_selector_select_exclusive
121 (ESourceSelector *selector,
122 ESource *source);
123 gboolean e_source_selector_source_is_selected
124 (ESourceSelector *selector,
125 ESource *source);
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,
133 ESource *source);
134 ESource * e_source_selector_ref_source_by_iter
135 (ESourceSelector *selector,
136 GtkTreeIter *iter);
137 ESource * e_source_selector_ref_source_by_path
138 (ESourceSelector *selector,
139 GtkTreePath *path);
140 void e_source_selector_queue_write (ESourceSelector *selector,
141 ESource *source);
142 void e_source_selector_update_row (ESourceSelector *selector,
143 ESource *source);
144 void e_source_selector_update_all_rows
145 (ESourceSelector *selector);
146 void e_source_selector_set_source_tooltip
147 (ESourceSelector *selector,
148 ESource *source,
149 const gchar *tooltip);
150 gchar * e_source_selector_dup_source_tooltip
151 (ESourceSelector *selector,
152 ESource *source);
153 void e_source_selector_set_source_is_busy
154 (ESourceSelector *selector,
155 ESource *source,
156 gboolean is_busy);
157 gboolean e_source_selector_get_source_is_busy
158 (ESourceSelector *selector,
159 ESource *source);
161 G_END_DECLS
163 #endif /* E_SOURCE_SELECTOR_H */