And finally (I hope) the last part from the patch
[obnox/wireshark/wip.git] / gtk / recent.h
1 /* recent.h
2  * Definitions for recent "preference" handling routines
3  * Copyright 2004, Ulf Lamping <ulf.lamping@web.de>
4  *
5  * $Id$
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@ethereal.com>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifndef __RECENT_H__
27 #define __RECENT_H__
28
29 #include <glib.h>
30
31 /** @file
32  *  Recent user interface settings.
33  *  @ingroup main_window_group
34  */
35
36 /** ???. */
37 #define RECENT_KEY_CAPTURE_FILE         "recent.capture_file"
38
39 /** ???. */
40 #define RECENT_KEY_DISPLAY_FILTER       "recent.display_filter"
41
42 /** Recent settings. */
43 typedef struct recent_settings_tag {
44     gboolean    main_toolbar_show;
45     gboolean    filter_toolbar_show;
46     gboolean    packet_list_show;
47     gboolean    tree_view_show;
48     gboolean    byte_view_show;
49     gboolean    statusbar_show;
50     gint        gui_time_format;
51     gint        gui_zoom_level;
52
53     gint        gui_geometry_main_x;
54     gint        gui_geometry_main_y;
55     gint        gui_geometry_main_width;
56     gint        gui_geometry_main_height;
57
58     gboolean    gui_geometry_main_maximized;    /* this is valid in GTK2 only */
59
60     gint        gui_geometry_main_upper_pane;   /* this is valid in GTK2 only */
61     gint        gui_geometry_main_lower_pane;   /* this is valid in GTK2 only */
62     gint        gui_geometry_status_pane;       /* this is valid in GTK2 only */
63 } recent_settings_t;
64
65 /** Global recent settings. */
66 extern recent_settings_t recent;
67
68 /** Write recent settings file.
69  *
70  * @param rf_path_return path to recent file if function failed
71  * @return 0 if succeeded, errno if failed
72  */
73 extern int write_recent(char **rf_path_return);
74
75 /** Read recent settings file.
76  *
77  * @param rf_path_return path to recent file if function failed
78  * @param rf_errno_return if failed
79  */
80 extern void read_recent(char **rf_path_return, int *rf_errno_return);
81
82 /** Write the geometry values of a single window to the recent file.
83  *
84  * @param key unused
85  * @param value the geometry values
86  * @param rf recent file handle (FILE)
87  */
88 extern void write_recent_geom(gpointer key, gpointer value, gpointer rf);
89
90 #endif /* recent.h */