2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail Team
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.
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.
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/>.
21 #define PREFSWINDOW_H 1
26 typedef struct _PrefsPage PrefsPage
;
27 typedef struct _PrefsWindow PrefsWindow
;
29 typedef void (*PrefsCreateWidgetFunc
) (PrefsPage
*, GtkWindow
*window
, gpointer
);
30 typedef void (*PrefsDestroyWidgetFunc
) (PrefsPage
*);
31 typedef void (*PrefsSavePageFunc
) (PrefsPage
*);
32 typedef gboolean (*PrefsCanClosePageFunc
) (PrefsPage
*);
33 typedef void (*PrefsOpenCallbackFunc
) (PrefsWindow
*);
34 typedef void (*PrefsApplyCallbackFunc
) (PrefsWindow
*);
35 typedef void (*PrefsCloseCallbackFunc
) (PrefsWindow
*);
44 PrefsCreateWidgetFunc create_widget
;
45 PrefsDestroyWidgetFunc destroy_widget
;
46 PrefsSavePageFunc save_page
;
47 PrefsCanClosePageFunc can_close
;
51 PREFS_PAGE_TITLE
, /* page title */
52 PREFS_PAGE_DATA
, /* PrefsTreeNode data */
53 PREFS_PAGE_DATA_AUTO_FREE
, /* auto free for PREFS_PAGE_DATA */
54 PREFS_PAGE_WEIGHT
, /* weight */
55 PREFS_PAGE_INDEX
, /* index in original page list */
59 typedef struct _PrefsTreeNode PrefsTreeNode
;
66 GtkWidget
*scrolledwindow1
;
70 GtkWidget
*labelframe
;
73 GtkWidget
*confirm_area
;
75 GtkWidget
*cancel_btn
;
79 PrefsCloseCallbackFunc open_cb
;
80 PrefsApplyCallbackFunc apply_cb
;
81 PrefsCloseCallbackFunc close_cb
;
82 gint dialog_response
; /* Useful for close_cb callbacks */
84 GtkWidget
*empty_page
;
93 PREFSWINDOW_RESPONSE_CANCEL
,
94 PREFSWINDOW_RESPONSE_OK
,
95 PREFSWINDOW_RESPONSE_APPLY
101 gfloat treeweight
; /* GTK2: not used */
104 void prefswindow_open_full (const gchar
*title
,
108 gint
*save_width
, gint
*save_height
,
109 gboolean preload_pages
,
110 PrefsOpenCallbackFunc open_cb
,
111 PrefsApplyCallbackFunc apply_cb
,
112 PrefsCloseCallbackFunc close_cb
);
114 void prefswindow_open (const gchar
*title
,
117 gint
*save_width
, gint
*save_height
,
118 PrefsOpenCallbackFunc open_cb
,
119 PrefsApplyCallbackFunc apply_cb
,
120 PrefsCloseCallbackFunc close_cb
);