Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Typedefs | Functions
progress_dlg.h File Reference

Go to the source code of this file.

## Typedefs
typedef struct progdlg | progdlg_t

## Functions
progdlg_t * | create_progress_dlg (gpointer top_level_window, const gchar *task_title, const gchar *item_title, gboolean terminate_is_stop, gboolean *stop_flag)
progdlg_t * | delayed_create_progress_dlg (gpointer top_level_window, const gchar *task_title, const gchar *item_title, gboolean terminate_is_stop, gboolean *stop_flag, const GTimeVal *start_time, gfloat progress)
void | update_progress_dlg (progdlg_t *dlg, gfloat percentage, const gchar *status)
void | destroy_progress_dlg (progdlg_t *dlg)

## Detailed Description

Progress (modal) dialog box routines.

## Typedef Documentation

typedef struct progdlg progdlg_t

Progress dialog data.

## Function Documentation

progdlg_t* create_progress_dlg | ( | gpointer | top_level_window,
|  | const gchar * | task_title,
|  | const gchar * | item_title,
|  | gboolean | terminate_is_stop,
|  | gboolean * | stop_flag
| ) |  |

Create and pop up the progress dialog. Allocates a "progdlg_t" and initialize it to contain all information the implementation needs in order to manipulate the dialog, and return a pointer to it.

Parameters

  top_level_window | UI widget to associate with the progress dialog, e.g. the main window.
  task_title | The task to do, e.g. "Loading"
  item_title | The item to do, e.g. "capture.cap"
  terminate_is_stop | TRUE if the operation can't be cancelled, just stopped (i.e., it has a "Stop" button and clicking it doesn't undo anything already done), FALSE if it can
  stop_flag | A pointer to a Boolean variable that will be set to TRUE if the user hits that button

Returns
  The newly created progress dialog

progdlg_t* delayed_create_progress_dlg | ( | gpointer | top_level_window,
|  | const gchar * | task_title,
|  | const gchar * | item_title,
|  | gboolean | terminate_is_stop,
|  | gboolean * | stop_flag,
|  | const GTimeVal * | start_time,
|  | gfloat | progress
| ) |  |

Create a progress dialog, but only if it's not likely to disappear immediately. This can be disconcerting for the user.

Parameters

  top_level_window | The top-level window associated with the progress update. May be NULL.
  task_title | The task to do, e.g. "Loading"
  item_title | The item to do, e.g. "capture.cap"
  terminate_is_stop | TRUE if the operation can't be cancelled, just stopped (i.e., it has a "Stop" button and clicking it doesn't undo anything already done), FALSE if it can
  stop_flag | A pointer to a Boolean variable that will be set to TRUE if the user hits that button
  start_time | A pointer to a GTimeVal structure which holds the time at which the caller started to process the data
  progress | The current progress (0..1)

Returns
  The newly created progress dialog

void destroy_progress_dlg | ( | progdlg_t * | dlg | ) |

Destroy or hide the progress bar.

Parameters

  dlg | The progress dialog from create_progress_dlg()

void update_progress_dlg | ( | progdlg_t * | dlg,
|  | gfloat | percentage,
|  | const gchar * | status
| ) |  |

Update the progress information of the progress dialog box.

Parameters

  dlg | The progress dialog from create_progress_dlg()
  percentage | The current percentage value (0..1)
  status | the New status string to show, e.g. "3000KB of 6000KB"