* plugins/project-wizard/autogen.c:
[anjuta-git-plugin.git] / src / widget-registry.h
blob7b1967af45ed726373b9b5aaae55704bbc6e3d0a
1 /*
2 ** menu-registry.h: Helper functions for registering and getting submenus.
3 ** Author: Biswapesh Chattopadhyay
4 */
6 #ifndef _MENU_REGISTRY_H
7 #define _MENU_REGISTRY_H
9 #ifdef __cplusplus
10 extern "C"
12 #endif
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);
30 #ifdef __cplusplus
32 #endif
34 #endif /* _MENU_REGISTRY_H */