| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
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 (void *top_level_window, const char *task_title, const char *item_title, bool terminate_is_stop, bool *stop_flag)
progdlg_t * | delayed_create_progress_dlg (void *top_level_window, const char *task_title, const char *item_title, bool terminate_is_stop, bool *stop_flag, float progress)
void | update_progress_dlg (progdlg_t *dlg, float percentage, const char *status)
void | destroy_progress_dlg (progdlg_t *dlg)

## Detailed Description

Definitions for progress dialog box routines

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Progress (modal) dialog box routines.

## Typedef Documentation

## ◆ progdlg_t

typedef struct progdlg progdlg_t

Progress dialog data.

## Function Documentation

## ◆ create_progress_dlg()

progdlg_t * create_progress_dlg | ( | void * | top_level_window,
|  | const char * | task_title,
|  | const char * | item_title,
|  | bool | terminate_is_stop,
|  | bool * | 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

## ◆ delayed_create_progress_dlg()

progdlg_t * delayed_create_progress_dlg | ( | void * | top_level_window,
|  | const char * | task_title,
|  | const char * | item_title,
|  | bool | terminate_is_stop,
|  | bool * | stop_flag,
|  | float | 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
  progress | The current progress (0..1)

Returns
  The newly created progress dialog

## ◆ destroy_progress_dlg()

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

Destroy or hide the progress bar.

Parameters

  dlg | The progress dialog from create_progress_dlg()

## ◆ update_progress_dlg()

void update_progress_dlg | ( | progdlg_t * | dlg,
|  | float | percentage,
|  | const char * | 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"