[gnome-builder] doc: add docs for IdeApplicationAddin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] doc: add docs for IdeApplicationAddin
- Date: Sat, 4 Nov 2017 23:33:53 +0000 (UTC)
commit 5082566597125a8c2fd3eb1de701266a4a3a288f
Author: Christian Hergert <chergert redhat com>
Date: Sat Nov 4 16:32:09 2017 -0700
doc: add docs for IdeApplicationAddin
src/libide/application/ide-application-addin.c | 39 +++++++++++++++++++----
src/libide/application/ide-application-addin.h | 7 ++++
2 files changed, 39 insertions(+), 7 deletions(-)
---
diff --git a/src/libide/application/ide-application-addin.c b/src/libide/application/ide-application-addin.c
index 889eeb9..b1a3001 100644
--- a/src/libide/application/ide-application-addin.c
+++ b/src/libide/application/ide-application-addin.c
@@ -16,8 +16,28 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define G_LOG_DOMAIN "ide-application-addin"
+
#include "application/ide-application-addin.h"
+/**
+ * SECTION:ide-application-addin
+ * @title: IdeApplicationAddin
+ * @short_description: extend functionality of #IdeApplication
+ *
+ * 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.
+ *
+ * Since: 3.24
+ */
+
G_DEFINE_INTERFACE (IdeApplicationAddin, ide_application_addin, G_TYPE_OBJECT)
static void
@@ -44,11 +64,13 @@ ide_application_addin_default_init (IdeApplicationAddinInterface *iface)
* @self: An #IdeApplicationAddin.
* @application: An #IdeApplication.
*
- * This interface method is called when the application is started or
- * the plugin has just been activated.
+ * 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.
+ * Use this to setup code in your plugin that needs to be loaded once per
+ * application process.
+ *
+ * Since: 3.24
*/
void
ide_application_addin_load (IdeApplicationAddin *self,
@@ -65,10 +87,13 @@ ide_application_addin_load (IdeApplicationAddin *self,
* @self: An #IdeApplicationAddin.
* @application: An #IdeApplication.
*
- * This inteface method is called when the application is shutting down
- * or the plugin has been unloaded.
+ * 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().
*
- * Use this function to cleanup after anything setup in ide_application_addin_load().
+ * Since: 3.24
*/
void
ide_application_addin_unload (IdeApplicationAddin *self,
diff --git a/src/libide/application/ide-application-addin.h b/src/libide/application/ide-application-addin.h
index 5c3178e..063915b 100644
--- a/src/libide/application/ide-application-addin.h
+++ b/src/libide/application/ide-application-addin.h
@@ -26,6 +26,13 @@ G_BEGIN_DECLS
G_DECLARE_INTERFACE (IdeApplicationAddin, ide_application_addin, IDE, APPLICATION_ADDIN, GObject)
+/**
+ * IdeApplicationAddinInterface:
+ * @load: Set this field to implement the ide_application_addin_load()
+ * virtual method.
+ * @unload: Set this field to implement the ide_application_addin_unload()
+ * virtual method.
+ */
struct _IdeApplicationAddinInterface
{
GTypeInterface parent_interface;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]