2 ** menu-registry.h: Helper functions for registering and getting submenus.
3 ** Author: Biswapesh Chattopadhyay
6 #ifndef _MENU_REGISTRY_H
7 #define _MENU_REGISTRY_H
15 ** Associate a submenu with a name. Tools can query qith a name to get
16 ** the corresponding submenu. Once a submenu widget is obtained, tools
17 ** can add their own menu items to the submenu. Ideally, we should generalize
18 ** this so that all widgets are registered, but this will do for now.
20 void an_register_submenu(const gchar
*name
, GtkWidget
*submenu
);
22 /* Given a name, returns the corresponding submenu. If a submenu corresponding
23 ** to the given name does not exist, then a search is make for the default
24 ** submenu (registered with an_register_submenu() with name=NULL). If
25 ** this is unsuccessful as well, NULL is returned. If NULL is passed as
26 ** parameter, the default submenu (if any) is returned.
28 GtkWidget
*an_get_submenu(const gchar
*name
);
34 #endif /* _MENU_REGISTRY_H */