add details for doxygen, various code cleanups as a result of this
[obnox/wireshark/wip.git] / gtk / file_dlg.h
1 /* file_dlg.h
2  * Definitions for dialog boxes for handling files
3  *
4  * $Id: file_dlg.h,v 1.11 2004/06/01 17:33:36 ulfl Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __FILE_DLG_H__
26 #define __FILE_DLG_H__
27
28 /** @file
29  *  "Open" / "Close" / "Save" / "Save As" / etc dialog boxes.
30  */
31
32 /** the action to take, after save has been done */
33 typedef enum {
34     after_save_no_action,           /**< no action to take */
35     after_save_close_file,          /**< close the file */
36     after_save_open_dialog,         /**< open the file open dialog */
37     after_save_open_recent_file,    /**< open the specified recent file */
38     after_save_open_dnd_file,       /**< open the specified file from drag and drop */
39     after_save_capture_dialog,      /**< open the capture dialog */
40     after_save_exit                 /**< exit program */
41 } action_after_save_e;
42
43 /** Open the "Save As" dialog box.
44  *
45  * @param action_after_save the action to take, when save completed
46  * @param action_after_save_data data for action_after_save
47  */
48 void file_save_as_cmd(action_after_save_e action_after_save, gpointer action_after_save_data);
49
50 /** User requested the "Open" dialog box.
51  *
52  * @param widget parent widget
53  * @param data unused
54  */
55 void file_open_cmd_cb(GtkWidget *widget, gpointer data);
56
57 /** User requested the "Save" dialog box.
58  *
59  * @param widget parent widget
60  * @param data unused
61  */
62 void file_save_cmd_cb(GtkWidget *widget, gpointer data);
63
64 /** User requested the "Save As" dialog box.
65  *
66  * @param widget parent widget
67  * @param data unused
68  */
69 void file_save_as_cmd_cb(GtkWidget *widget, gpointer data);
70
71 /** User requested "Close".
72  *
73  * @param widget parent widget
74  * @param data unused
75  */
76 void file_close_cmd_cb(GtkWidget *widget, gpointer data);
77
78 /** User requested "Reload".
79  *
80  * @param widget parent widget
81  * @param data unused
82  */
83 void file_reload_cmd_cb(GtkWidget *widget, gpointer data);
84
85 /** User requested "Import". Currently only called from the color dialog.
86  *
87  * @param widget parent widget
88  * @param data unused
89  */
90 void file_color_import_cmd_cb(GtkWidget *widget, gpointer data);
91
92 /** User requested "Export". Currently only called from the color dialog.
93  *
94  * @param widget parent widget
95  * @param data unused
96  */
97 void file_color_export_cmd_cb(GtkWidget *widget, gpointer data);
98
99 /*
100  * Set the "Save only marked packets" toggle button as appropriate for
101  * the current output file type and count of marked packets.
102  * Called when the "Save As..." dialog box is created and when either
103  * the file type or the marked count changes.
104  */
105 void file_set_save_marked_sensitive(void);
106
107 #endif /* file_dlg.h */