2008-03-06 [wwp] 3.3.1cvs14
[claws.git] / src / gtk / prefswindow.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
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
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  * 
18  */
19
20 #ifndef PREFSWINDOW_H
21 #define PREFSWINDOW_H 1
22
23 #include <glib.h>
24 #include <gtk/gtk.h>
25
26 typedef struct _PrefsPage PrefsPage;
27
28 typedef void (*PrefsCreateWidgetFunc) (PrefsPage *, GtkWindow *window, gpointer);
29 typedef void (*PrefsDestroyWidgetFunc) (PrefsPage *);
30 typedef void (*PrefsSavePageFunc) (PrefsPage *);
31 typedef gboolean (*PrefsCanClosePageFunc) (PrefsPage *);
32 typedef void (*PrefsOpenCallbackFunc) (GtkWindow *);
33 typedef void (*PrefsCloseCallbackFunc) (GtkWindow *);
34
35 struct _PrefsPage
36 {
37         gchar                   **path;
38         gboolean                  page_open;
39         GtkWidget                *widget;
40         gfloat                    weight;
41
42         PrefsCreateWidgetFunc     create_widget;
43         PrefsDestroyWidgetFunc    destroy_widget;
44         PrefsSavePageFunc         save_page;
45         PrefsCanClosePageFunc     can_close;
46 };
47
48 void prefswindow_open_full              (const gchar *title, 
49                                          GSList *prefs_pages,
50                                          gpointer data,
51                                          GtkDestroyNotify func,
52                                          gint *save_width, gint *save_height,
53                                          gboolean preload_pages, gboolean activate_child,
54                                          PrefsOpenCallbackFunc open_cb,
55                                          PrefsCloseCallbackFunc close_cb);
56
57 void prefswindow_open                   (const gchar *title, 
58                                          GSList *prefs_pages,
59                                          gpointer data,
60                                          gint *save_width, gint *save_height,
61                                          PrefsOpenCallbackFunc open_cb,
62                                          PrefsCloseCallbackFunc close_cb);
63
64 #endif