Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / libedataserverui / e-source-option-menu.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* e-source-option-menu.h
3  *
4  * Copyright (C) 2003  Novell, Inc.
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., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  * Author: Ettore Perazzoli <ettore@ximian.com>
21  */
22
23 #ifndef _E_SOURCE_OPTION_MENU_H_
24 #define _E_SOURCE_OPTION_MENU_H_
25
26 #include "libedataserver/e-source-list.h"
27
28 #include <gtk/gtkoptionmenu.h>
29
30 #define E_TYPE_SOURCE_OPTION_MENU                       (e_source_option_menu_get_type ())
31 #define E_SOURCE_OPTION_MENU(obj)                       (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SOURCE_OPTION_MENU, ESourceOptionMenu))
32 #define E_SOURCE_OPTION_MENU_CLASS(klass)               (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SOURCE_OPTION_MENU, ESourceOptionMenuClass))
33 #define E_IS_SOURCE_OPTION_MENU(obj)                    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SOURCE_OPTION_MENU))
34 #define E_IS_SOURCE_OPTION_MENU_CLASS(klass)            (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_SOURCE_OPTION_MENU))
35
36
37 typedef struct _ESourceOptionMenu        ESourceOptionMenu;
38 typedef struct _ESourceOptionMenuPrivate ESourceOptionMenuPrivate;
39 typedef struct _ESourceOptionMenuClass   ESourceOptionMenuClass;
40
41 struct _ESourceOptionMenu {
42         GtkOptionMenu parent;
43
44         ESourceOptionMenuPrivate *priv;
45 };
46
47 struct _ESourceOptionMenuClass {
48         GtkOptionMenuClass parent_class;
49
50         void (* source_selected) (ESourceOptionMenu *menu,
51                                   ESource *selected_source);
52 };
53
54
55 GType  e_source_option_menu_get_type  (void);
56
57 GtkWidget *e_source_option_menu_new  (ESourceList *list);
58
59 ESource *e_source_option_menu_peek_selected  (ESourceOptionMenu *menu);
60 void     e_source_option_menu_select         (ESourceOptionMenu *menu,
61                                               ESource           *source);
62
63
64 #endif /* _E_SOURCE_OPTION_MENU_H_ */