Application

## Application Application — the rhythmbox subclass of GtkApplication |

## Synopsis

    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);

## Object Hierarchy

      GObject
       +----GApplication
             +----GtkApplication
                   +----RBApplication

## Implemented Interfaces

RBApplication implements GActionGroup and GActionMap.

## Properties

      "shell"                    RBShell*              : Read

## Description

RBApplication contains some interactions with the desktop environment, such as the app menu and processing of files specified on the command line.

## Details

### struct RBApplication

    struct RBApplication;

### struct RBApplicationClass

    struct RBApplicationClass {
    	GtkApplicationClass parent_class;
    };

### rb_application_new ()

    GApplication *      rb_application_new                  (void);

Creates the application instance.

Returns : | application instance

### rb_application_run ()

    int                 rb_application_run                  (RBApplication *app,
                                                             int argc,
                                                             char **argv);

Runs the application

`app` : | the application instance
`argc` : | arg count
`argv` : | arg values
Returns : | exit code

### rb_application_link_shared_menus ()

    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".

`app` : | the RBApplication
`menu` : | a GMenu to process

### rb_application_add_shared_menu ()

    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.

`app` : | the application instance
`name` : | a name for the menu
`menu` : | GMenuModel instance

### rb_application_get_shared_menu ()

    GMenuModel *        rb_application_get_shared_menu      (RBApplication *app,
                                                             const char *name);

Returns a shared menu instance added with `rb_application_add_shared_menu`

`app` : | the application instance
`name` : | name of menu to return
Returns : | menu model instance, or NULL if not found. [transfer none]

### rb_application_get_plugin_menu ()

    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`.

`app` : | the application instance
`menu` : | name of plugin menu to return
Returns : | plugin menu instance. [transfer none]

### rb_application_add_plugin_menu_item ()

    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.

`app` : | the application instance
`menu` : | name of the menu to add to
`id` : | id of the item to add (used to remove it, must be unique within the menu)
`item` : | menu item to add

### rb_application_remove_plugin_menu_item ()

    void                rb_application_remove_plugin_menu_item
                                                            (RBApplication *app,
                                                             const char *menu,
                                                             const char *id);

## Property Details

### The `"shell"` property

      "shell"                    RBShell*              : Read

RBShell instance.