| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
iface_toolbar.h File Reference
`#include <stdbool.h>`
`#include <glib.h>`

Go to the source code of this file.

## Classes
struct | _iface_toolbar_value
| A single selectable value entry for a selector-type toolbar control. More...
struct | _iface_toolbar_control
| Describes a single control widget within an interface toolbar. More...
struct | _iface_toolbar
| Describes an interface toolbar and the set of controls it exposes. More...
struct | _iface_toolbar_message_t

## Typedefs
typedef struct _iface_toolbar_value | iface_toolbar_value
| A single selectable value entry for a selector-type toolbar control.
typedef struct _iface_toolbar_control | iface_toolbar_control
| Describes a single control widget within an interface toolbar.
typedef struct _iface_toolbar | iface_toolbar
| Describes an interface toolbar and the set of controls it exposes.
typedef struct _iface_toolbar_message_t | iface_toolbar_message_t
typedef void(* | iface_toolbar_add_cb_t) (const iface_toolbar *)
typedef void(* | iface_toolbar_remove_cb_t) (const char *)

## Enumerations
enum | iface_toolbar_ctrl_type { INTERFACE_TYPE_UNKNOWN , INTERFACE_TYPE_BOOLEAN , INTERFACE_TYPE_BUTTON , INTERFACE_TYPE_SELECTOR , INTERFACE_TYPE_STRING }
| Data type of a toolbar control widget exposed by an interface toolbar. More...
enum | iface_toolbar_ctrl_role { INTERFACE_ROLE_UNKNOWN , INTERFACE_ROLE_CONTROL , INTERFACE_ROLE_HELP , INTERFACE_ROLE_LOGGER , INTERFACE_ROLE_RESTORE }
| Functional role of a toolbar control within the interface toolbar. More...

## Functions
void | iface_toolbar_add (const iface_toolbar *toolbar)
| Adds an interface toolbar to the application.
void | iface_toolbar_remove (const char *menu_title)
| Removes an interface toolbar item from the menu.
bool | iface_toolbar_use (void)
| Checks if the interface toolbar is in use.
void | iface_toolbar_register_cb (iface_toolbar_add_cb_t add_cb, iface_toolbar_remove_cb_t remove_cb)
| Registers callback functions for interface toolbar operations.
void | iface_toolbar_message_free (iface_toolbar_message_t *message)

## Detailed Description

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

## Enumeration Type Documentation

## ◆ iface_toolbar_ctrl_role

enum iface_toolbar_ctrl_role

Functional role of a toolbar control within the interface toolbar.

Enumerator
INTERFACE_ROLE_UNKNOWN | Role has not been set or is unrecognised
INTERFACE_ROLE_CONTROL | Primary control that sends a value to the extcap interface
INTERFACE_ROLE_HELP | Opens a help resource for the toolbar
INTERFACE_ROLE_LOGGER | Displays log output from the extcap interface
INTERFACE_ROLE_RESTORE | Restores all controls to their default values

## ◆ iface_toolbar_ctrl_type

enum iface_toolbar_ctrl_type

Data type of a toolbar control widget exposed by an interface toolbar.

Enumerator
INTERFACE_TYPE_UNKNOWN | Type has not been set or is unrecognised
INTERFACE_TYPE_BOOLEAN | A toggle / checkbox control (true or false)
INTERFACE_TYPE_BUTTON | A momentary push-button control
INTERFACE_TYPE_SELECTOR | A drop-down selector control with a fixed list of values
INTERFACE_TYPE_STRING | A free-form text-entry control

## Function Documentation

## ◆ iface_toolbar_add()

void iface_toolbar_add | ( | const iface_toolbar * | toolbar | ) |

Adds an interface toolbar to the application.

Parameters

  toolbar | Pointer to the interface toolbar structure to be added.

## ◆ iface_toolbar_register_cb()

void iface_toolbar_register_cb | ( | iface_toolbar_add_cb_t | add_cb,
|  | iface_toolbar_remove_cb_t | remove_cb )

Registers callback functions for interface toolbar operations.

Parameters

  add_cb | Callback function to be called when an item is added to the toolbar.
  remove_cb | Callback function to be called when an item is removed from the toolbar.

## ◆ iface_toolbar_remove()

void iface_toolbar_remove | ( | const char * | menu_title | ) |

Removes an interface toolbar item from the menu.

Parameters

  menu_title | The title of the menu item to remove.

## ◆ iface_toolbar_use()

bool iface_toolbar_use | ( | void |  | ) |

Checks if the interface toolbar is in use.

Returns
  true if an add callback is registered, false otherwise.