Top | ![]() |
![]() |
![]() |
![]() |
IdeApplicationAddinIdeApplicationAddin — extend functionality of IdeApplication |
void | ide_application_addin_open () |
void | ide_application_addin_activate () |
void | ide_application_addin_load () |
void | ide_application_addin_unload () |
void | ide_application_addin_add_option_entries () |
void | ide_application_addin_handle_command_line () |
void | ide_application_addin_workbench_added () |
void | ide_application_addin_workbench_removed () |
The IdeApplicationAddin interface is used by plugins that want to extend the set of features provided by IdeApplication. This is useful if you need utility code that is bound to the lifetime of the IdeApplication.
The IdeApplicationAddin is created after the application has initialized and unloaded when Builder is shut down.
Use this interface when you can share code between multiple projects that are open at the same time.
void ide_application_addin_open (IdeApplicationAddin *self
,IdeApplication *application
,GFile **files
,gint n_files
,const gchar *hint
);
This function is activated when the “open” signal is emitted.
self |
||
application |
an ideApplication |
|
files |
an array of GFiles. |
[array length=n_files][element-type GFile] |
n_files |
the length of |
|
hint |
a hint provided by the calling instance |
Since: 3.32
void ide_application_addin_activate (IdeApplicationAddin *self
,IdeApplication *application
);
This function is activated when the GApplication::activate signal is emitted.
Since: 3.32
void ide_application_addin_load (IdeApplicationAddin *self
,IdeApplication *application
);
This interface method is called when the application is started or the plugin has just been activated.
Use this to setup code in your plugin that needs to be loaded once per application process.
Since: 3.32
void ide_application_addin_unload (IdeApplicationAddin *self
,IdeApplication *application
);
This inteface method is called when the application is shutting down or the plugin has been unloaded.
Use this function to cleanup after anything setup in
ide_application_addin_load()
.
Since: 3.32
void ide_application_addin_add_option_entries (IdeApplicationAddin *self
,IdeApplication *application
);
This function is called to allow the application a chance to add various
command-line options to the GOptionContext. See
g_application_add_main_option_entries()
for more information on how to
add arguments.
See ide_application_addin_handle_command_line()
for how to handle arguments
once command line argument processing begins.
Make sure you set X-At-Startup=true
in your .plugin
file so that the
plugin is loaded early during startup or this virtual function will not
be called.
Since: 3.32
void ide_application_addin_handle_command_line (IdeApplicationAddin *self
,IdeApplication *application
,GApplicationCommandLine *cmdline
);
This function is called to allow the addin to procses command line arguments
that were parsed based on options added in
ide_application_addin_add_option_entries()
.
See g_application_command_line_get_option_dict()
for more information.
Since: 3.32
void ide_application_addin_workbench_added (IdeApplicationAddin *self
,IdeWorkbench *workbench
);
void ide_application_addin_workbench_removed (IdeApplicationAddin *self
,IdeWorkbench *workbench
);
struct IdeApplicationAddinInterface { GTypeInterface parent_interface; void (*load) (IdeApplicationAddin *self, IdeApplication *application); void (*unload) (IdeApplicationAddin *self, IdeApplication *application); void (*activate) (IdeApplicationAddin *self, IdeApplication *application); void (*open) (IdeApplicationAddin *self, IdeApplication *application, GFile **files, gint n_files, const gchar *hint); void (*add_option_entries) (IdeApplicationAddin *self, IdeApplication *application); void (*handle_command_line) (IdeApplicationAddin *self, IdeApplication *application, GApplicationCommandLine *cmdline); void (*workbench_added) (IdeApplicationAddin *self, IdeWorkbench *workbench); void (*workbench_removed) (IdeApplicationAddin *self, IdeWorkbench *workbench); };
Set this virtual method to implement the |
||
Set this virtual method to implement the
|
||
Set this virtual method to add option entries to
the gnome-builder command-line argument parsing. See
|
||
Set this virtual method to handle parsing command line arguments. |
||
Since: 3.32