Adapt ESourceComboBox to the new ESource API.
[platform/upstream/evolution-data-server.git] / libedataserverui / e-source-combo-box.h
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
7  * modify it under the terms of version 2 of the GNU Lesser General Public
8  * License as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef E_SOURCE_COMBO_BOX_H
22 #define E_SOURCE_COMBO_BOX_H
23
24 #include <gtk/gtk.h>
25 #include <libedataserver/e-source-registry.h>
26
27 #define E_TYPE_SOURCE_COMBO_BOX \
28         (e_source_combo_box_get_type ())
29 #define E_SOURCE_COMBO_BOX(obj) \
30         (G_TYPE_CHECK_INSTANCE_CAST \
31         ((obj), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBox))
32 #define E_SOURCE_COMBO_BOX_CLASS(cls) \
33         (G_TYPE_CHECK_CLASS_CAST \
34         ((cls), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBoxClass))
35 #define E_IS_SOURCE_COMBO_BOX(obj) \
36         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SOURCE_COMBO_BOX))
37 #define E_IS_SOURCE_COMBO_BOX_CLASS(cls) \
38         (G_TYPE_CHECK_CLASS_TYPE ((cls), E_TYPE_SOURCE_COMBO_BOX))
39 #define E_SOURCE_COMBO_BOX_GET_CLASS(obj) \
40         (G_TYPE_INSTANCE_GET_CLASS \
41         ((obj), E_TYPE_SOURCE_COMBO_BOX, ESourceComboBox))
42
43 G_BEGIN_DECLS
44
45 typedef struct _ESourceComboBox ESourceComboBox;
46 typedef struct _ESourceComboBoxClass ESourceComboBoxClass;
47 typedef struct _ESourceComboBoxPrivate ESourceComboBoxPrivate;
48
49 /**
50  * ESourceComboBox:
51  *
52  * Since: 2.22
53  **/
54 struct _ESourceComboBox {
55         GtkComboBox parent;
56         ESourceComboBoxPrivate *priv;
57 };
58
59 struct _ESourceComboBoxClass {
60         GtkComboBoxClass parent_class;
61 };
62
63 GType           e_source_combo_box_get_type     (void);
64 GtkWidget *     e_source_combo_box_new          (ESourceRegistry *registry,
65                                                  const gchar *extension_name);
66 ESourceRegistry *
67                 e_source_combo_box_get_registry (ESourceComboBox *combo_box);
68 void            e_source_combo_box_set_registry (ESourceComboBox *combo_box,
69                                                  ESourceRegistry *registry);
70 const gchar *   e_source_combo_box_get_extension_name
71                                                 (ESourceComboBox *combo_box);
72 void            e_source_combo_box_set_extension_name
73                                                 (ESourceComboBox *combo_box,
74                                                  const gchar *extension_name);
75 gboolean        e_source_combo_box_get_show_colors
76                                                 (ESourceComboBox *combo_box);
77 void            e_source_combo_box_set_show_colors
78                                                 (ESourceComboBox *combo_box,
79                                                  gboolean show_colors);
80 ESource *       e_source_combo_box_ref_active   (ESourceComboBox *combo_box);
81 void            e_source_combo_box_set_active   (ESourceComboBox *combo_box,
82                                                  ESource *source);
83
84 G_END_DECLS
85
86 #endif /* E_SOURCE_COMBO_BOX_H */