Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Attributes | List of all members
_funnel_ops_t Struct Reference

Vtable of GUI operations provided to the Lua funnel API, abstracting all UI interactions behind function pointers. More...

#include <funnel.h>

Public Attributes

funnel_ops_id_tops_id
 
funnel_text_window_t *(* new_text_window )(funnel_ops_id_t *ops_id, const char *label)
 Creates and displays a new text window with the given label.
 
void(* set_text )(funnel_text_window_t *win, const char *text)
 Replaces the entire contents of a text window with the given text.
 
void(* append_text )(funnel_text_window_t *win, const char *text)
 Appends text to the end of a text window's contents.
 
void(* prepend_text )(funnel_text_window_t *win, const char *text)
 Prepends text to the beginning of a text window's contents.
 
void(* clear_text )(funnel_text_window_t *win)
 Clears all text content from a text window.
 
const char *(* get_text )(funnel_text_window_t *win)
 Retrieves the current text content of a text window.
 
void(* set_close_cb )(funnel_text_window_t *win, text_win_close_cb_t cb, void *data)
 Registers a callback to be invoked when a text window is closed.
 
void(* set_editable )(funnel_text_window_t *win, bool editable)
 Sets whether a text window's content is user-editable.
 
void(* destroy_text_window )(funnel_text_window_t *win)
 Destroys a text window and releases its associated resources.
 
void(* add_button )(funnel_text_window_t *win, funnel_bt_t *cb, const char *label)
 Adds a button to a text window.
 
void(* new_dialog )(funnel_ops_id_t *ops_id, const char *title, const char **field_names, const char **field_values, funnel_dlg_cb_t dlg_cb, void *data, funnel_dlg_cb_data_free_t dlg_cb_data_free)
 Opens a modal input dialog with a set of labeled fields.
 
void(* close_dialogs )(void)
 Closes all open funnel dialogs.
 
void(* retap_packets )(funnel_ops_id_t *ops_id)
 Triggers a retap of all packets, re-running tap listeners without full redissection.
 
void(* copy_to_clipboard )(GString *str)
 Copies the contents of a GString to the system clipboard.
 
const char *(* get_filter )(funnel_ops_id_t *ops_id)
 Retrieves the currently applied display filter string.
 
void(* set_filter )(funnel_ops_id_t *ops_id, const char *filter)
 Applies a new display filter string to the packet list.
 
char *(* get_color_filter_slot )(uint8_t filt_nr)
 Retrieves the display filter assigned to a color filter slot.
 
void(* set_color_filter_slot )(uint8_t filt_nr, const char *filter)
 Assigns a display filter string to a color filter slot.
 
bool(* open_file )(funnel_ops_id_t *ops_id, const char *fname, const char *filter, char **error)
 Opens a capture file, optionally applying a display filter.
 
void(* reload_packets )(funnel_ops_id_t *ops_id)
 Reloads the current capture file from disk.
 
void(* redissect_packets )(funnel_ops_id_t *ops_id)
 Forces a full redissection of all packets in the current capture.
 
void(* reload_lua_plugins )(funnel_ops_id_t *ops_id)
 Reloads all Lua plugins and redissects packets.
 
void(* apply_filter )(funnel_ops_id_t *ops_id)
 Applies the currently set display filter to the packet list.
 
bool(* browser_open_url )(const char *url)
 Opens a URL in the system's default web browser.
 
void(* browser_open_data_file )(const char *filename)
 Opens a local data file in the system's default application.
 
struct progdlg *(* new_progress_window )(funnel_ops_id_t *ops_id, const char *label, const char *task, bool terminate_is_stop, bool *stop_flag)
 Creates and displays a progress dialog.
 
void(* update_progress )(struct progdlg *dlg, float pr, const char *task)
 Updates the progress bar and task description of a progress dialog.
 
void(* destroy_progress_window )(struct progdlg *dlg)
 Destroys a progress dialog and releases its resources.
 

Detailed Description

Vtable of GUI operations provided to the Lua funnel API, abstracting all UI interactions behind function pointers.

Member Data Documentation

◆ add_button

void(* _funnel_ops_t::add_button) (funnel_text_window_t *win, funnel_bt_t *cb, const char *label)

Adds a button to a text window.

Parameters
winThe target text window.
cbThe button descriptor containing callback and data.
labelThe label displayed on the button.

◆ append_text

void(* _funnel_ops_t::append_text) (funnel_text_window_t *win, const char *text)

Appends text to the end of a text window's contents.

Parameters
winThe target text window.
textThe text to append.

◆ apply_filter

void(* _funnel_ops_t::apply_filter) (funnel_ops_id_t *ops_id)

Applies the currently set display filter to the packet list.

Parameters
ops_idThe GUI instance identifier.

◆ browser_open_data_file

void(* _funnel_ops_t::browser_open_data_file) (const char *filename)

Opens a local data file in the system's default application.

Parameters
filenamePath to the file to open.

◆ browser_open_url

bool(* _funnel_ops_t::browser_open_url) (const char *url)

Opens a URL in the system's default web browser.

Parameters
urlThe URL string to open.
Returns
True if the browser was successfully launched, false otherwise.

◆ clear_text

void(* _funnel_ops_t::clear_text) (funnel_text_window_t *win)

Clears all text content from a text window.

Parameters
winThe target text window.

◆ copy_to_clipboard

void(* _funnel_ops_t::copy_to_clipboard) (GString *str)

Copies the contents of a GString to the system clipboard.

Parameters
strThe string to copy to the clipboard.

◆ destroy_progress_window

void(* _funnel_ops_t::destroy_progress_window) (struct progdlg *dlg)

Destroys a progress dialog and releases its resources.

Parameters
dlgThe progress dialog to destroy.

◆ destroy_text_window

void(* _funnel_ops_t::destroy_text_window) (funnel_text_window_t *win)

Destroys a text window and releases its associated resources.

Parameters
winThe text window to destroy.

◆ get_color_filter_slot

char *(* _funnel_ops_t::get_color_filter_slot) (uint8_t filt_nr)

Retrieves the display filter assigned to a color filter slot.

Parameters
filt_nrZero-based index of the color filter slot.
Returns
The filter string for the given slot; caller must free it.

◆ get_filter

const char *(* _funnel_ops_t::get_filter) (funnel_ops_id_t *ops_id)

Retrieves the currently applied display filter string.

Parameters
ops_idThe GUI instance identifier.
Returns
The current display filter string; caller must not free it.

◆ get_text

const char *(* _funnel_ops_t::get_text) (funnel_text_window_t *win)

Retrieves the current text content of a text window.

Parameters
winThe target text window.
Returns
Pointer to the current text content string; caller must not free it.

◆ new_dialog

void(* _funnel_ops_t::new_dialog) (funnel_ops_id_t *ops_id, const char *title, const char **field_names, const char **field_values, funnel_dlg_cb_t dlg_cb, void *data, funnel_dlg_cb_data_free_t dlg_cb_data_free)

Opens a modal input dialog with a set of labeled fields.

Parameters
ops_idThe GUI instance identifier.
titleTitle of the dialog window.
field_namesNULL-terminated array of field label strings.
field_valuesNULL-terminated array of default values for each field.
dlg_cbCallback invoked when the user confirms the dialog.
dataUser-supplied data passed to the dialog callback.
dlg_cb_data_freeFunction used to free the user-supplied data when the dialog is dismissed.

◆ new_progress_window

struct progdlg *(* _funnel_ops_t::new_progress_window) (funnel_ops_id_t *ops_id, const char *label, const char *task, bool terminate_is_stop, bool *stop_flag)

Creates and displays a progress dialog.

Parameters
ops_idThe GUI instance identifier.
labelTitle label for the progress dialog.
taskDescription of the current task shown in the dialog.
terminate_is_stopTrue if termination should be labeled "Stop" rather than "Cancel".
stop_flagPointer to a flag set to true when the user requests cancellation.
Returns
Pointer to the newly created progress dialog handle.

◆ new_text_window

funnel_text_window_t *(* _funnel_ops_t::new_text_window) (funnel_ops_id_t *ops_id, const char *label)

Creates and displays a new text window with the given label.

Parameters
ops_idThe GUI instance identifier.
labelTitle label for the new text window.
Returns
Pointer to the newly created funnel_text_window_t.

◆ open_file

bool(* _funnel_ops_t::open_file) (funnel_ops_id_t *ops_id, const char *fname, const char *filter, char **error)

Opens a capture file, optionally applying a display filter.

Parameters
ops_idThe GUI instance identifier.
fnamePath to the capture file to open.
filterOptional display filter to apply after opening, or NULL.
errorOn failure, set to a newly allocated error message string; caller must free it.
Returns
True on success, false on failure.

◆ ops_id

funnel_ops_id_t* _funnel_ops_t::ops_id

Opaque identifier for the GUI instance that owns these operations.

◆ prepend_text

void(* _funnel_ops_t::prepend_text) (funnel_text_window_t *win, const char *text)

Prepends text to the beginning of a text window's contents.

Parameters
winThe target text window.
textThe text to prepend.

◆ redissect_packets

void(* _funnel_ops_t::redissect_packets) (funnel_ops_id_t *ops_id)

Forces a full redissection of all packets in the current capture.

Parameters
ops_idThe GUI instance identifier.

◆ reload_lua_plugins

void(* _funnel_ops_t::reload_lua_plugins) (funnel_ops_id_t *ops_id)

Reloads all Lua plugins and redissects packets.

Parameters
ops_idThe GUI instance identifier.

◆ reload_packets

void(* _funnel_ops_t::reload_packets) (funnel_ops_id_t *ops_id)

Reloads the current capture file from disk.

Parameters
ops_idThe GUI instance identifier.

◆ retap_packets

void(* _funnel_ops_t::retap_packets) (funnel_ops_id_t *ops_id)

Triggers a retap of all packets, re-running tap listeners without full redissection.

Parameters
ops_idThe GUI instance identifier.

◆ set_close_cb

void(* _funnel_ops_t::set_close_cb) (funnel_text_window_t *win, text_win_close_cb_t cb, void *data)

Registers a callback to be invoked when a text window is closed.

Parameters
winThe target text window.
cbThe close callback function.
dataUser-supplied data passed to the callback.

◆ set_color_filter_slot

void(* _funnel_ops_t::set_color_filter_slot) (uint8_t filt_nr, const char *filter)

Assigns a display filter string to a color filter slot.

Parameters
filt_nrZero-based index of the color filter slot.
filterThe display filter string to assign.

◆ set_editable

void(* _funnel_ops_t::set_editable) (funnel_text_window_t *win, bool editable)

Sets whether a text window's content is user-editable.

Parameters
winThe target text window.
editableTrue to allow editing, false to make the window read-only.

◆ set_filter

void(* _funnel_ops_t::set_filter) (funnel_ops_id_t *ops_id, const char *filter)

Applies a new display filter string to the packet list.

Parameters
ops_idThe GUI instance identifier.
filterThe display filter string to apply.

◆ set_text

void(* _funnel_ops_t::set_text) (funnel_text_window_t *win, const char *text)

Replaces the entire contents of a text window with the given text.

Parameters
winThe target text window.
textThe replacement text.

◆ update_progress

void(* _funnel_ops_t::update_progress) (struct progdlg *dlg, float pr, const char *task)

Updates the progress bar and task description of a progress dialog.

Parameters
dlgThe progress dialog to update.
prProgress value in the range [0.0, 1.0].
taskUpdated description of the current task.

The documentation for this struct was generated from the following file: