1 /*
2  * Copyright (C) 2001 - 2002 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
3  * Copyright (C) 2001 - 2002 Rodrigo Moya <rodrigo@gnome-db.org>
4  * Copyright (C) 2003 Danilo Schoeneberg <dj@starfire-programming.net>
5  * Copyright (C) 2003 Laurent Sansonetti <lrz@gnome.org>
6  * Copyright (C) 2005 - 2011 Vivien Malerba <malerba@gnome-db.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA  02110-1301, USA.
22  */
23 
24 #ifndef __COMMON_BIN_H__
25 #define __COMMON_BIN_H__
26 
27 #include <gtk/gtk.h>
28 #include "../internal/popup-container.h"
29 
30 typedef void (*BinCallback) (gpointer, GValue *);
31 typedef struct {
32         GtkWidget    *popup; /* PopupContainer popup window */
33         GtkWidget    *load_button;
34         GtkWidget    *save_button;
35 	gchar        *current_folder;
36 	GtkWidget    *props_label;
37 
38 	GType         entry_type;
39 	GValue       *tmpvalue;
40 
41 	BinCallback   loaded_value_cb;
42 	gpointer      loaded_value_cb_data;
43 } BinMenu;
44 
45 
46 void         common_bin_create_menu (BinMenu *binmenu, PopupContainerPositionFunc pos_func, GType entry_type,
47 				     BinCallback loaded_value_cb, gpointer loaded_value_cb_data);
48 void         common_bin_adjust_menu (BinMenu *binmenu, gboolean editable, const GValue *value);
49 void         common_bin_reset (BinMenu *binmenu);
50 
51 #endif
52