1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* e-source-option-menu.h
4 * Copyright (C) 2003 Novell, Inc.
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.
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.
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.
20 * Author: Ettore Perazzoli <ettore@ximian.com>
23 #ifndef _E_SOURCE_OPTION_MENU_H_
24 #define _E_SOURCE_OPTION_MENU_H_
26 #include "libedataserver/e-source-list.h"
28 #include <gtk/gtkoptionmenu.h>
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))
37 typedef struct _ESourceOptionMenu ESourceOptionMenu;
38 typedef struct _ESourceOptionMenuPrivate ESourceOptionMenuPrivate;
39 typedef struct _ESourceOptionMenuClass ESourceOptionMenuClass;
41 struct _ESourceOptionMenu {
44 ESourceOptionMenuPrivate *priv;
47 struct _ESourceOptionMenuClass {
48 GtkOptionMenuClass parent_class;
50 void (* source_selected) (ESourceOptionMenu *menu,
51 ESource *selected_source);
55 GType e_source_option_menu_get_type (void);
57 GtkWidget *e_source_option_menu_new (ESourceList *list);
59 ESource *e_source_option_menu_peek_selected (ESourceOptionMenu *menu);
60 void e_source_option_menu_select (ESourceOptionMenu *menu,
64 #endif /* _E_SOURCE_OPTION_MENU_H_ */