aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.plugins
diff options
context:
space:
mode:
authorPaul Offord <paul.offord@advance7.com>2015-11-30 13:56:40 +0000
committerAnders Broman <a.broman58@gmail.com>2015-12-01 11:09:08 +0000
commit30c77364d405049be5e0365a192d37143ad7bae4 (patch)
treeaca49b5561ff8fbbcf0085e6bdefe07793b61d60 /doc/README.plugins
parent7332001c0a09d3d3f5ba0ac2a441c8f059b84036 (diff)
Incorrect information in README.plugins Section 6
The examples showing how to add menu entries are based on older versions of some of the related functions. This change corrects those examples. Bug: 11819 Change-Id: Iad9beb2e87d3d1efe5f9dfa93a0e7110b8d9f53a Reviewed-on: https://code.wireshark.org/review/12308 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'doc/README.plugins')
-rw-r--r--doc/README.plugins24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/README.plugins b/doc/README.plugins
index 0fbcd5da66..bd7e3d3b34 100644
--- a/doc/README.plugins
+++ b/doc/README.plugins
@@ -328,7 +328,7 @@ is encouraged to update their plugins as outlined below:
A plugin (as well as built-in dissectors) may implement a menu within
Wireshark to be used to trigger options, start tools, open Websites, ...
-This menu structure is built using the plugin_if.h interface and it's
+This menu structure is built using the plugin_if.h interface and its
corresponding functions.
The menu items all call a callback provided by the plugin, which takes
@@ -337,7 +337,8 @@ provide userdata to each entry. The pointer must utilize WS_DLL_PUBLIC_DEF
and has the following structure:
WS_DLL_PUBLIC_DEF void
- menu_cb(gpointer user_data)
+ menu_cb(ext_menubar_gui_type gui_type, gpointer gui_data,
+ gpointer user_data _U_)
{
... Do something ...
}
@@ -347,22 +348,18 @@ The menu entries themselves are generated with the following code structure:
ext_menu_t * ext_menu, *os_menu = NULL;
ext_menu = ext_menubar_register_menu (
- <your_proto_item>, "TestMenu", "Some Menu Entry", TRUE );
- ext_menubar_add_entry(ext_menu, "TestEntry1", "Test Entry 1",
+ <your_proto_item>, "Some Menu Entry", TRUE );
+ ext_menubar_add_entry(ext_menu, "Test Entry 1",
"This is a tooltip", menu_cb, <user_data>);
- ext_menubar_add_entry(ext_menu, "TestEntry2", "Test Entry 2",
+ ext_menubar_add_entry(ext_menu, "Test Entry 2",
NULL, menu_cb, <user_data>);
- os_menu = ext_menubar_add_submenu(ext_menu, "TestSubMenu", "Sub Menu" );
- ext_menubar_add_entry(os_menu, "SubEntry1", "Test Entry A",
+ os_menu = ext_menubar_add_submenu(ext_menu, "Sub Menu" );
+ ext_menubar_add_entry(os_menu, "Test Entry A",
NULL, menu_cb, <user_data>);
- ext_menubar_add_entry(os_menu, "SubEntry2", "Test Entry B",
+ ext_menubar_add_entry(os_menu, "Test Entry B",
NULL, menu_cb, <user_data>);
-The second parameter to ext_menubar_register_menu and ext_menubar_add_entry is
-an internal definition for the menu, utilized by the GTK interface. It must not
-contain any characters besides A-Z, a-z and 0-9.
-
This will not work with the GTK version on OS X; the GTK interface is
currently not supported on this plattform. The Qt interface on OS X
provides the menu.
@@ -385,6 +382,9 @@ The following methods exist so far:
WS_DLL_PUBLIC void plugin_if_save_preference
(const char * pref_module, const char * pref_key, const char * pref_value);
+ /* Jumps to the given frame number */
+ WS_DLL_PUBLIC void plugin_if_goto_frame(guint32 framenr);
+
----------------