aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-extension.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-22 02:33:38 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-07 19:13:25 +0800
commitc675132de1981a140cf3341b7b1c3cd08862b54b (patch)
tree93012f4996ebbaf5383b235d7942272f1fced5d2 /e-util/e-extension.c
parentb674497bccae2ec2ac914714d34961a9517a8aa7 (diff)
downloadgsoc2013-evolution-c675132de1981a140cf3341b7b1c3cd08862b54b.tar
gsoc2013-evolution-c675132de1981a140cf3341b7b1c3cd08862b54b.tar.gz
gsoc2013-evolution-c675132de1981a140cf3341b7b1c3cd08862b54b.tar.bz2
gsoc2013-evolution-c675132de1981a140cf3341b7b1c3cd08862b54b.tar.lz
gsoc2013-evolution-c675132de1981a140cf3341b7b1c3cd08862b54b.tar.xz
gsoc2013-evolution-c675132de1981a140cf3341b7b1c3cd08862b54b.tar.zst
gsoc2013-evolution-c675132de1981a140cf3341b7b1c3cd08862b54b.zip
Document EExtensible and EExtension.
The mechanism here is simple but hard to explain without leaning heavily on object-oriented jargon. Consider this a rough draft. Illustrations would certainly help clarify.
Diffstat (limited to 'e-util/e-extension.c')
-rw-r--r--e-util/e-extension.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/e-util/e-extension.c b/e-util/e-extension.c
index 05687b64ba..59eab840c9 100644
--- a/e-util/e-extension.c
+++ b/e-util/e-extension.c
@@ -16,6 +16,29 @@
*
*/
+/**
+ * SECTION: e-extension
+ * @short_description: abstract base class for extensions
+ * @include: e-util/e-extension.h
+ *
+ * #EExtension provides a way to extend the functionality of objects
+ * that implement the #EExtensible interface. #EExtension subclasses
+ * can target a particular extensible object type. New instances of
+ * an extensible object type get paired with a new instance of each
+ * #EExtension subclass that targets the extensible object type.
+ *
+ * The first steps of writing a new extension are as follows:
+ *
+ * 1. Subclass #EExtension.
+ *
+ * 2. In the class initialization function, specify the #GType being
+ * extended. The #GType must implement the #EExtensible interface.
+ *
+ * 3. Register the extension's own #GType. If the extension is to
+ * be loaded dynamically using #GTypeModule, the type should be
+ * registered in the library module's e_module_load() function.
+ **/
+
#include "e-extension.h"
#define E_EXTENSION_GET_PRIVATE(obj) \
@@ -151,6 +174,14 @@ e_extension_init (EExtension *extension)
extension->priv = E_EXTENSION_GET_PRIVATE (extension);
}
+/**
+ * e_extension_get_extensible:
+ * @extension: an #EExtension
+ *
+ * Returns the object that @extension extends.
+ *
+ * Returns: the object being extended
+ **/
EExtensible *
e_extension_get_extensible (EExtension *extension)
{