| Rhythmbox Development Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
struct RBApplication; struct RBApplicationClass; GApplication * rb_application_new (void); int rb_application_run (RBApplication *app,int argc,char **argv); void rb_application_link_shared_menus (RBApplication *app,GMenu *menu); void rb_application_add_shared_menu (RBApplication *app,const char *name,GMenuModel *menu); GMenuModel * rb_application_get_shared_menu (RBApplication *app,const char *name); GMenuModel * rb_application_get_plugin_menu (RBApplication *app,const char *menu); void rb_application_add_plugin_menu_item (RBApplication *app,const char *menu,const char *id,GMenuItem *item); void rb_application_remove_plugin_menu_item (RBApplication *app,const char *menu,const char *id);
RBApplication contains some interactions with the desktop environment, such as the app menu and processing of files specified on the command line.
GApplication * rb_application_new (void);
Creates the application instance.
Returns : |
application instance |
int rb_application_run (RBApplication *app,int argc,char **argv);
Runs the application
|
the application instance |
|
arg count |
|
arg values |
Returns : |
exit code |
void rb_application_link_shared_menus (RBApplication *app,GMenu *menu);
Processes shared menu links in the given menu. Menu links take the form of items with "rb-menu-link" or "rb-plugin-menu-link" and "rb-menu-link-type" attributes. "rb-menu-link" specifies the name of a shared menu to link in, "rb-plugin-menu-link" specifies the name of a plugin menu to link in, "rb-menu-link-type" specifies the link type, either "section" or "submenu". A link item must have "rb-menu-link-type" and one of "rb-menu-link" or "rb-plugin-menu-link".
|
the RBApplication |
|
a GMenu to process |
void rb_application_add_shared_menu (RBApplication *app,const char *name,GMenuModel *menu);
Adds a menu model to the set of shared menus available for linking into other menus.
|
the application instance |
|
a name for the menu |
|
GMenuModel instance |
GMenuModel * rb_application_get_shared_menu (RBApplication *app,const char *name);
Returns a shared menu instance added with rb_application_add_shared_menu
|
the application instance |
|
name of menu to return |
Returns : |
menu model instance, or NULL if not found. [transfer none] |
GMenuModel * rb_application_get_plugin_menu (RBApplication *app,const char *menu);
Returns a plugin menu instance. Plugin menus are like shared menus except
they are created empty on first access, and they consist solely of entries
added through rb_application_add_plugin_item.
|
the application instance |
|
name of plugin menu to return |
Returns : |
plugin menu instance. [transfer none] |
void rb_application_add_plugin_menu_item (RBApplication *app,const char *menu,const char *id,GMenuItem *item);
Adds an item to a plugin menu. The id can be used to remove the item.
|
the application instance |
|
name of the menu to add to |
|
id of the item to add (used to remove it, must be unique within the menu) |
|
menu item to add |
void rb_application_remove_plugin_menu_item (RBApplication *app,const char *menu,const char *id);