Top | ![]() |
![]() |
![]() |
![]() |
GThread * | ide_application_get_main_thread () |
IdeApplicationMode | ide_application_get_mode () |
IdeApplication * | ide_application_new () |
GDateTime * | ide_application_get_started_at () |
IdeTransferManager * | ide_application_get_transfer_manager () |
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 () |
gboolean | ide_application_open_project () |
void | ide_application_add_reaper () |
GFile * | ide_application_get_projects_directory () |
gboolean | ide_application_has_network () |
#define | IDE_TYPE_APPLICATION |
#define | IDE_APPLICATION_DEFAULT |
enum | IdeApplicationMode |
IdeApplication |
The IdeApplication class is a singleton whose lifetime is synchronized to the lifetime of the process. This manages necessary tweaks required by the application (such as menus, theming, and keybindings) as well as application plugins.
If you need to extend Builder in a way that requires services that are tied to the lifetime of the process (rather than the lifetime of the project), then IdeApplicationAddin provides the extension point you need.
GThread *
ide_application_get_main_thread (void
);
This function returns the thread-id of the main thread for the application. This is only really useful to determine if you are in the main UI thread. This is used by IDE_IS_MAIN_THREAD for assertion checks.
IdeApplicationMode
ide_application_get_mode (IdeApplication *self
);
Gets the mode of the application which describes if we are the UI process, worker process, or internal test runner.
Since: 3.20
IdeApplication *
ide_application_new (IdeApplicationMode mode
);
Creates a new IdeApplication. This should only be used by the application entry point.
Since: 3.22
GDateTime *
ide_application_get_started_at (IdeApplication *self
);
Gets the startup time of the application.
IdeTransferManager *
ide_application_get_transfer_manager (IdeApplication *self
);
Gets the transfer manager for the application.
Since: 3.28
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.
void
ide_application_show_projects_window (IdeApplication *self
);
const gchar *
ide_application_get_keybindings_mode (IdeApplication *self
);
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.
GDBusProxy * ide_application_get_worker_finish (IdeApplication *self
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to get a proxy to a worker process.
gboolean ide_application_open_project (IdeApplication *self
,GFile *file
);
Attempts to load the project found at file
.
Since: 3.22
void ide_application_add_reaper (IdeApplication *self
,DzlDirectoryReaper *reaper
);
Adds a directory reaper which will be executed as part of the cleanup process when exiting Builder.
Since: 3.24
GFile *
ide_application_get_projects_directory
(IdeApplication *self
);
Gets the directory to store projects within.
First, this checks GSettings for a directory. If that directory exists, it is returned.
If not, it then checks for the non-translated name "Projects" in the users home directory. If it exists, that is returned.
If that does not exist, and a GSetting path existed, but was non-existant that is returned.
If the GSetting was empty, the translated name "Projects" is returned.
Since: 3.28
gboolean
ide_application_has_network (IdeApplication *self
);
This is a helper that uses an internal GNetworkMonitor to track if we have access to the network. It works around some issues we've seen in the wild that make determining if we have network access difficult.
Since: 3.30