From 906f93a130d8d670c4b5213c2c2bf03c47c02337 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 21 Mar 2010 22:22:57 -0400 Subject: Demonstrate extending the EExtension API. Introduce e_extensible_list_extensions(), which provides extensible objects access to their own extensions, or a subset of them. Convert EShellBackend to an abstract EExtension subtype. EShell will load its extensions with e_extensible_load_extensions(), and then obtain a list of EShellBackend extensions as follows: shell_backends = e_extensible_list_extensions ( E_EXTENSIBLE (shell), E_TYPE_SHELL_BACKEND); Because EShellBackend is abstract, its GType is skipped while traversing the GType hierarchy to find EShell extensions. --- e-util/e-extensible.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'e-util/e-extensible.h') diff --git a/e-util/e-extensible.h b/e-util/e-extensible.h index a72ea71611..6dd6294212 100644 --- a/e-util/e-extensible.h +++ b/e-util/e-extensible.h @@ -51,6 +51,8 @@ struct _EExtensibleInterface { GType e_extensible_get_type (void); void e_extensible_load_extensions (EExtensible *extensible); +GList * e_extensible_list_extensions (EExtensible *extensible, + GType extension_type); G_END_DECLS -- cgit v1.2.3