aboutsummaryrefslogtreecommitdiffstats
path: root/epan/plugin_if.h
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2015-08-09 14:36:53 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-09-08 11:03:35 +0000
commit6f1c9fd4320804958a8731afc45a1cc6f9ee3b16 (patch)
tree88733bb1ae91072d9c6dac9404074e5afa59cd55 /epan/plugin_if.h
parent28128ca41c299ea859fd59583a12cd767b1af33f (diff)
PluginIF: Parent menu and goto frame
The developer may provide a given menu as parent menu for the sub menu. If the menu does not exist, the main menu will be used. Has been implemented for Qt as well as GTK. Change-Id: I3f26684862fd0b08f59eeb4d6f4a24ce7dc3d428 Reviewed-on: https://code.wireshark.org/review/9939 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Diffstat (limited to 'epan/plugin_if.h')
-rw-r--r--epan/plugin_if.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/epan/plugin_if.h b/epan/plugin_if.h
index df9ea6e846..3d14a268f9 100644
--- a/epan/plugin_if.h
+++ b/epan/plugin_if.h
@@ -81,7 +81,7 @@ struct _ext_menubar_t
ext_menubar_action_cb callback;
-
+ gchar * parent_menu;
};
/* Registers a new main menu.
@@ -97,6 +97,18 @@ struct _ext_menubar_t
WS_DLL_PUBLIC ext_menu_t * ext_menubar_register_menu(
int proto_id, const gchar * menulabel, gboolean is_plugin);
+/* Sets a parent menu for the user menu.
+ *
+ * This will set a parent menu, which allows this menu to be filtered underneath
+ * the given menu as a submenu. If the parent menu does not exist, the main menu
+ * will be used
+ *
+ * @param menu the menu for which to add the entry
+ * @param parentmenu a valid menu name for the parent menu
+ */
+WS_DLL_PUBLIC ext_menu_t * ext_menubar_set_parentmenu(
+ ext_menu_t * menu, const gchar * parentmenu);
+
/* Registers a new main menu.
*
* This will register a new sub menu entry, underneath the parent menu
@@ -162,7 +174,10 @@ typedef enum
PLUGIN_IF_FILTER_ACTION_PREPARE,
/* Saves a preference entry */
- PLUGIN_IF_PREFERENCE_SAVE
+ PLUGIN_IF_PREFERENCE_SAVE,
+
+ /* Jumps to the provided frame number */
+ PLUGIN_IF_GOTO_FRAME
} plugin_if_callback_t;
@@ -176,6 +191,10 @@ WS_DLL_PUBLIC void plugin_if_apply_filter(const char * filter_string, gboolean f
/* Saves the given preference to the main preference storage */
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);
+
+
/* Private Method for retrieving the menubar entries
*
* Is only to be used by the UI interfaces to retrieve the menu entries