Maybe the problem is that the compilers used on AIX weren't defining
[obnox/wireshark/wip.git] / progress_dlg.h
1 /* progress_dlg.h
2  * Definitions for progress dialog box routines
3  *
4  * $Id: progress_dlg.h,v 1.5 2002/08/28 22:28:42 guy 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 __PROGRESS_DLG_H__
26 #define __PROGRESS_DLG_H__
27
28 /*
29  * Progress (modal) dialog box routines.
30  */
31
32 struct progdlg;
33
34 typedef struct progdlg progdlg_t;
35
36 /*
37  * Create and pop up the progress dialog; allocate a "progdlg_t"
38  * and initialize it to contain all information the implementation
39  * needs in order to manipulate the dialog, and return a pointer to
40  * it.
41  *
42  * The first argument is the task to do, e.g. "Loading".
43  * The second argument is the item to do, e.g. "capture.cap".
44  * The third argument is the string to put in the "stop this operation" button.
45  * The fourth argument is a pointer to a Boolean variable that will be
46  *   set to TRUE if the user hits that button.
47  */
48 progdlg_t *create_progress_dlg(const gchar *task_title, const gchar *item_title,
49     const gchar *stop_title, gboolean *stop_flag);
50
51 /* Create a progress dialog, but only if it's not likely to disappear
52  * immediately, which can be disconcerting for the user.
53  *
54  * The first four arguments are as for create_progress_dlg().
55  * Following those is a pointer to a GTimeVal structure which holds
56  * the time at which the caller started to process the data, and the
57  * current progress (0..1).
58  */
59 progdlg_t *
60 delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
61     const gchar *stop_title, gboolean *stop_flag, const GTimeVal *start_time,
62     gfloat progress);
63
64 /*
65  * Update the progress information of the progress dialog box.
66  */
67 void update_progress_dlg(progdlg_t *dlg, gfloat percentage, gchar *status);
68
69 /*
70  * Destroy the progress bar.
71  */
72 void destroy_progress_dlg(progdlg_t *dlg);
73
74 #endif /* __PROGRESS_DLG_H__ */