## ide-application

ide-application

## Functions

IdeApplicationMode | ide_application_get_mode ()
IdeApplication * | ide_application_new ()
GDateTime * | ide_application_get_started_at ()
IdeRecentProjects * | ide_application_get_recent_projects ()
void | ide_application_show_projects_window ()
const gchar * | ide_application_get_keybindings_mode ()
void | ide_application_get_worker_async ()
GDBusProxy * | ide_application_get_worker_finish ()
GMenu * | ide_application_get_menu_by_id ()

## Types and Values

#define | IDE_TYPE_APPLICATION
#define | IDE_APPLICATION_DEFAULT
enum | IdeApplicationMode
| IdeApplication

## Description

## Functions

### ide_application_get_mode ()

    IdeApplicationMode
    ide_application_get_mode (IdeApplication *self);

### ide_application_new ()

    IdeApplication *
    ide_application_new (void);

### ide_application_get_started_at ()

    GDateTime *
    ide_application_get_started_at (IdeApplication *self);

Gets the startup time of the application.

#### Parameters

self | A IdeApplication. |

#### Returns

A GDateTime.

[transfer none]

### ide_application_get_recent_projects ()

    IdeRecentProjects *
    ide_application_get_recent_projects (IdeApplication *self);

This method will retreive an IdeRecentProjects for the application that represents recent and discover projects on the system. The first time the IdeRecentProjects is loaded, discovery of projects will occur. There is no need to call `ide_recent_projects_discover_async()`.

If you would like to display a spinner while discovery is in process, simply connect to the “busy”: property notification.

#### Parameters

self | An IdeApplication. |

#### Returns

An IdeRecentProjects.

[transfer none]

### ide_application_show_projects_window ()

    void
    ide_application_show_projects_window (IdeApplication *self);

### ide_application_get_keybindings_mode ()

    const gchar *
    ide_application_get_keybindings_mode (IdeApplication *self);

### ide_application_get_worker_async ()

    void
    ide_application_get_worker_async (IdeApplication *self,
                                      const gchar *plugin_name,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously requests a GDBusProxy to a service provided in a worker process. The worker should be an IdeWorker implemented by the plugin named `plugin_name` . The IdeWorker is responsible for created both the service registered on the bus and the proxy to it.

The IdeApplication is responsible for spawning a subprocess for the worker.

`callback` should call `ide_application_get_worker_finish()` with the result provided to retrieve the result.

#### Parameters

self | A IdeApplication |
plugin_name | The name of the plugin. |
cancellable | A GCancellable or `NULL`. | [allow-none]
callback | A GAsyncReadyCallback or `NULL`. |
user_data | user data for `callback` . |

### ide_application_get_worker_finish ()

    GDBusProxy *
    ide_application_get_worker_finish (IdeApplication *self,
                                       GAsyncResult *result,
                                       GError **error);

Completes an asynchronous request to get a proxy to a worker process.

#### Parameters

self | A IdeApplication. |
result | A GAsyncResult |
error | a location for a GError, or `NULL`. |

#### Returns

A GDBusProxy or `NULL`.

[transfer full]

### ide_application_get_menu_by_id ()

    GMenu *
    ide_application_get_menu_by_id (IdeApplication *self,
                                    const gchar *id);

Similar to `gtk_application_get_menu_by_id()` but takes into account merging the menus provided by, and extended by, plugins.

#### Parameters

self | An IdeApplication. |
id | The id of the menu to lookup. |

#### Returns

A GMenu.

[transfer none]

## Types and Values

### IDE_TYPE_APPLICATION

    #define IDE_TYPE_APPLICATION    (ide_application_get_type())

### IDE_APPLICATION_DEFAULT

    #define IDE_APPLICATION_DEFAULT (IDE_APPLICATION (g_application_get_default()))

### enum IdeApplicationMode

#### Members

IDE_APPLICATION_MODE_PRIMARY |  |
IDE_APPLICATION_MODE_WORKER |  |
IDE_APPLICATION_MODE_TOOL |  |
IDE_APPLICATION_MODE_TESTS |  |

### IdeApplication

    typedef struct {
      GtkApplication       parent_instance;

      IdeApplicationMode   mode;

      PeasExtensionSet    *addins;
      gchar               *dbus_address;

      PeasPluginInfo      *tool;
      gchar              **tool_arguments;

      PeasPluginInfo      *worker;
      IdeWorkerManager    *worker_manager;

      IdeKeybindings      *keybindings;

      IdeRecentProjects   *recent_projects;

      GDateTime           *started_at;

      IdeThemeManager     *theme_manager;

      EggMenuManager      *menu_manager;
      GHashTable          *merge_ids;

      GHashTable          *plugin_css;

      GList               *test_funcs;

      GHashTable          *plugin_settings;

      guint                disable_theme_tracking : 1;
    } IdeApplication;