summaryrefslogtreecommitdiff
path: root/libpeas
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2023-03-17 16:07:11 -0700
committerChristian Hergert <chergert@redhat.com>2023-03-22 16:44:35 -0700
commit10fddbe177f06860ed8179b2ac330b6ec087ba2f (patch)
treee56bd656cdb5081eda23457e3ed49f7ba744d7fc /libpeas
parentbb25dcf433642552d1a90e9bbd2724ef1de8264b (diff)
downloadlibpeas-10fddbe177f06860ed8179b2ac330b6ec087ba2f.tar.gz
extension: use GObject instead of PeasExtension
Now that there is no longer wrapped objects and calling via GObject Introspection, we can remove the use of PeasExtension and simply use GObject (as it was internally already).
Diffstat (limited to 'libpeas')
-rw-r--r--libpeas/libpeas.h1
-rw-r--r--libpeas/meson.build2
-rw-r--r--libpeas/peas-engine-priv.h13
-rw-r--r--libpeas/peas-engine.c65
-rw-r--r--libpeas/peas-engine.h7
-rw-r--r--libpeas/peas-extension-set.c12
-rw-r--r--libpeas/peas-extension-set.h4
-rw-r--r--libpeas/peas-extension.c58
-rw-r--r--libpeas/peas-extension.h52
-rw-r--r--libpeas/peas-object-module.c22
-rw-r--r--libpeas/peas-plugin-loader-c.c2
-rw-r--r--libpeas/peas-plugin-loader.c2
-rw-r--r--libpeas/peas-plugin-loader.h68
13 files changed, 67 insertions, 241 deletions
diff --git a/libpeas/libpeas.h b/libpeas/libpeas.h
index 5508f89..49ee369 100644
--- a/libpeas/libpeas.h
+++ b/libpeas/libpeas.h
@@ -23,7 +23,6 @@
#define LIBPEAS_INSIDE
# include "peas-engine.h"
-# include "peas-extension.h"
# include "peas-extension-base.h"
# include "peas-extension-set.h"
# include "peas-object-module.h"
diff --git a/libpeas/meson.build b/libpeas/meson.build
index ec6be40..9707303 100644
--- a/libpeas/meson.build
+++ b/libpeas/meson.build
@@ -15,7 +15,6 @@ peas_version_h = configure_file(
libpeas_public_h = files(
'peas-engine.h',
- 'peas-extension.h',
'peas-extension-base.h',
'peas-extension-set.h',
'peas-object-module.h',
@@ -28,7 +27,6 @@ libpeas_sources = files(
'peas-debug.c',
'peas-dirs.c',
'peas-engine.c',
- 'peas-extension.c',
'peas-extension-base.c',
'peas-extension-set.c',
'peas-i18n.c',
diff --git a/libpeas/peas-engine-priv.h b/libpeas/peas-engine-priv.h
index a6741c7..313f97a 100644
--- a/libpeas/peas-engine-priv.h
+++ b/libpeas/peas-engine-priv.h
@@ -32,14 +32,13 @@
G_BEGIN_DECLS
PEAS_AVAILABLE_IN_ALL
-void _peas_engine_shutdown (void);
-
+void _peas_engine_shutdown (void);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-PeasExtension *_peas_engine_create_extensionv (PeasEngine *engine,
- PeasPluginInfo *info,
- GType extension_type,
- guint n_parameters,
- GParameter *parameters);
+GObject *_peas_engine_create_extensionv (PeasEngine *engine,
+ PeasPluginInfo *info,
+ GType extension_type,
+ guint n_parameters,
+ GParameter *parameters);
G_GNUC_END_IGNORE_DEPRECATIONS
G_END_DECLS
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index 0d2a7a3..08448c7 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -32,7 +32,6 @@
#include "peas-dirs.h"
#include "peas-engine-priv.h"
#include "peas-engine.h"
-#include "peas-extension.h"
#include "peas-i18n-priv.h"
#include "peas-marshal.h"
#include "peas-object-module.h"
@@ -52,9 +51,6 @@
* from all the registered plugin directories;
* - it will provide you an API to load, control and unload your
* plugins and their extensions from within your application.
- *
- * Since libpeas 1.22, @extension_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
**/
/* Signals */
@@ -532,8 +528,6 @@ peas_engine_add_search_path (PeasEngine *engine,
* Prepends a search path to the list of paths where to look for plugins.
*
* See Also: [method@Engine.add_search_path]
- *
- * Since: 1.6
*/
void
peas_engine_prepend_search_path (PeasEngine *engine,
@@ -758,8 +752,6 @@ peas_engine_class_init (PeasEngineClass *klass)
* If non-global plugin loaders should be used.
*
* See [ctor@Engine.new_with_nonglobal_loaders] for more information.
- *
- * Since: 1.14
*/
properties[PROP_NONGLOBAL_LOADERS] =
g_param_spec_boolean ("nonglobal-loaders",
@@ -1317,9 +1309,6 @@ peas_engine_unload_plugin (PeasEngine *engine,
*
* If the @info is not loaded than %FALSE will always be returned.
*
- * Since libpeas 1.22, @extension_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
- *
* Returns: if @info provides an extension for @extension_type.
*/
gboolean
@@ -1342,7 +1331,7 @@ peas_engine_provides_extension (PeasEngine *engine,
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-PeasExtension *
+GObject *
_peas_engine_create_extensionv (PeasEngine *engine,
PeasPluginInfo *info,
GType extension_type,
@@ -1350,7 +1339,7 @@ _peas_engine_create_extensionv (PeasEngine *engine,
GParameter *parameters)
{
PeasPluginLoader *loader;
- PeasExtension *extension;
+ GObject *extension;
g_return_val_if_fail (PEAS_IS_ENGINE (engine), NULL);
g_return_val_if_fail (info != NULL, NULL);
@@ -1383,20 +1372,14 @@ _peas_engine_create_extensionv (PeasEngine *engine,
* @prop_values: (array length=n_properties): an array of property values.
*
* If the plugin identified by @info implements the @extension_type,
- * then this function will return a new instance of this implementation,
- * wrapped in a new [alias@Extension] instance. Otherwise, it will return %NULL.
- *
- * Since libpeas 1.22, @extension_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
+ * then this function will return a new instance of this implementation.
*
* See [method@Engine.create_extension] for more information.
*
- * Returns: (transfer full): a new instance of #PeasExtension wrapping
- * the @extension_type instance, or %NULL.
- *
- * Since: 1.24
+ * Returns: (transfer full): a new instance of #GObject which meets the
+ * prerequisites of @extension_type, or %NULL.
*/
-PeasExtension *
+GObject *
peas_engine_create_extension_with_properties (PeasEngine *engine,
PeasPluginInfo *info,
GType extension_type,
@@ -1405,7 +1388,7 @@ peas_engine_create_extension_with_properties (PeasEngine *engine,
const GValue *prop_values)
{
PeasPluginLoader *loader;
- PeasExtension *extension;
+ GObject *extension;
GParameter *parameters = NULL;
g_return_val_if_fail (PEAS_IS_ENGINE (engine), NULL);
@@ -1460,18 +1443,14 @@ peas_engine_create_extension_with_properties (PeasEngine *engine,
* name/value pairs, followed by %NULL.
*
* If the plugin identified by @info implements the @extension_type,
- * then this function will return a new instance of this implementation,
- * wrapped in a new [alias@Extension] instance. Otherwise, it will return %NULL.
- *
- * Since libpeas 1.22, @extension_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
+ * then this function will return a new instance of this implementation.
*
* See [method@Engine.create_extension] for more information.
*
- * Returns: a new instance of #PeasExtension wrapping
- * the @extension_type instance, or %NULL.
+ * Returns: a new instance of #GObject that meets the prerequisites of
+ * @extension_type, or %NULL.
*/
-PeasExtension *
+GObject *
peas_engine_create_extension_valist (PeasEngine *engine,
PeasPluginInfo *info,
GType extension_type,
@@ -1479,7 +1458,7 @@ peas_engine_create_extension_valist (PeasEngine *engine,
va_list var_args)
{
GParameter *parameters;
- PeasExtension *exten;
+ GObject *exten;
guint n_parameters;
g_return_val_if_fail (PEAS_IS_ENGINE (engine), NULL);
@@ -1517,25 +1496,15 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* name/value pairs, followed by %NULL.
*
* If the plugin identified by @info implements the @extension_type,
- * then this function will return a new instance of this implementation,
- * wrapped in a new [alias@Extension] instance. Otherwise, it will return %NULL.
+ * then this function will return a new instance of this implementation.
*
* When creating the new instance of the @extension_type subtype, the
* provided construct properties will be passed to the extension construction
* handler (exactly like if you had called [ctor@GObject.Object.new] yourself).
*
- * The new extension instance produced by this function will always be
- * returned wrapped in a #PeasExtension proxy, following the current libpeas
- * principle of never giving you the actual object (also because it might as
- * well *not* be an actual object).
- *
- * Since libpeas 1.22, @extension_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
- *
- * Returns: a new instance of #PeasExtension wrapping
- * the @extension_type instance, or %NULL.
+ * Returns: a new #GObject that implements @extension_type; or %NULL.
*/
-PeasExtension *
+GObject *
peas_engine_create_extension (PeasEngine *engine,
PeasPluginInfo *info,
GType extension_type,
@@ -1543,7 +1512,7 @@ peas_engine_create_extension (PeasEngine *engine,
...)
{
va_list var_args;
- PeasExtension *exten;
+ GObject *exten;
g_return_val_if_fail (PEAS_IS_ENGINE (engine), NULL);
g_return_val_if_fail (info != NULL, NULL);
@@ -1687,8 +1656,6 @@ peas_engine_new (void)
* plugin loaders are always global.
*
* Returns: a new instance of #PeasEngine that uses non-global loaders.
- *
- * Since: 1.14
*/
PeasEngine *
peas_engine_new_with_nonglobal_loaders (void)
diff --git a/libpeas/peas-engine.h b/libpeas/peas-engine.h
index da4cf24..2f90a0b 100644
--- a/libpeas/peas-engine.h
+++ b/libpeas/peas-engine.h
@@ -30,7 +30,6 @@
#include <glib-object.h>
#include "peas-plugin-info.h"
-#include "peas-extension.h"
#include "peas-version-macros.h"
G_BEGIN_DECLS
@@ -80,20 +79,20 @@ gboolean peas_engine_provides_extension (PeasEngine *
PeasPluginInfo *info,
GType extension_type);
PEAS_AVAILABLE_IN_ALL
-PeasExtension *peas_engine_create_extension_with_properties (PeasEngine *engine,
+GObject *peas_engine_create_extension_with_properties (PeasEngine *engine,
PeasPluginInfo *info,
GType extension_type,
guint n_properties,
const char **prop_names,
const GValue *prop_values);
PEAS_AVAILABLE_IN_ALL
-PeasExtension *peas_engine_create_extension_valist (PeasEngine *engine,
+GObject *peas_engine_create_extension_valist (PeasEngine *engine,
PeasPluginInfo *info,
GType extension_type,
const char *first_property,
va_list var_args);
PEAS_AVAILABLE_IN_ALL
-PeasExtension *peas_engine_create_extension (PeasEngine *engine,
+GObject *peas_engine_create_extension (PeasEngine *engine,
PeasPluginInfo *info,
GType extension_type,
const char *first_property,
diff --git a/libpeas/peas-extension-set.c b/libpeas/peas-extension-set.c
index 2a8ebdc..dafb73d 100644
--- a/libpeas/peas-extension-set.c
+++ b/libpeas/peas-extension-set.c
@@ -106,7 +106,7 @@ struct _PeasExtensionSet
typedef struct {
PeasPluginInfo *info;
- PeasExtension *exten;
+ GObject *exten;
} ExtensionItem;
typedef struct {
@@ -208,7 +208,7 @@ static void
add_extension (PeasExtensionSet *set,
PeasPluginInfo *info)
{
- PeasExtension *exten;
+ GObject *exten;
ExtensionItem *item;
guint position;
@@ -368,7 +368,7 @@ peas_extension_set_class_init (PeasExtensionSetClass *klass)
G_TYPE_NONE,
2,
PEAS_TYPE_PLUGIN_INFO | G_SIGNAL_TYPE_STATIC_SCOPE,
- PEAS_TYPE_EXTENSION);
+ G_TYPE_OBJECT);
g_signal_set_va_marshaller (signals[EXTENSION_ADDED],
G_TYPE_FROM_CLASS (klass),
peas_cclosure_marshal_VOID__OBJECT_OBJECTv);
@@ -400,7 +400,7 @@ peas_extension_set_class_init (PeasExtensionSetClass *klass)
G_TYPE_NONE,
2,
PEAS_TYPE_PLUGIN_INFO | G_SIGNAL_TYPE_STATIC_SCOPE,
- PEAS_TYPE_EXTENSION);
+ G_TYPE_OBJECT);
g_signal_set_va_marshaller (signals[EXTENSION_REMOVED],
G_TYPE_FROM_CLASS (klass),
peas_cclosure_marshal_VOID__OBJECT_OBJECTv);
@@ -443,9 +443,9 @@ peas_extension_set_class_init (PeasExtensionSetClass *klass)
*
* If the plugin doesn't provide such an extension, it returns %NULL.
*
- * Returns: (transfer none) (nullable): a reference to a #PeasExtension
+ * Returns: (transfer none) (nullable): a reference to a #GObject
*/
-PeasExtension *
+GObject *
peas_extension_set_get_extension (PeasExtensionSet *set,
PeasPluginInfo *info)
{
diff --git a/libpeas/peas-extension-set.h b/libpeas/peas-extension-set.h
index 76538e8..359300b 100644
--- a/libpeas/peas-extension-set.h
+++ b/libpeas/peas-extension-set.h
@@ -53,7 +53,7 @@ G_DECLARE_FINAL_TYPE (PeasExtensionSet, peas_extension_set, PEAS, EXTENSION_SET,
*/
typedef void (*PeasExtensionSetForeachFunc) (PeasExtensionSet *set,
PeasPluginInfo *info,
- PeasExtension *exten,
+ GObject *extension,
gpointer data);
PEAS_AVAILABLE_IN_ALL
@@ -61,7 +61,7 @@ void peas_extension_set_foreach (PeasExtensionSet
PeasExtensionSetForeachFunc func,
gpointer data);
PEAS_AVAILABLE_IN_ALL
-PeasExtension *peas_extension_set_get_extension (PeasExtensionSet *set,
+GObject *peas_extension_set_get_extension (PeasExtensionSet *set,
PeasPluginInfo *info);
PEAS_AVAILABLE_IN_ALL
PeasExtensionSet *peas_extension_set_new_with_properties (PeasEngine *engine,
diff --git a/libpeas/peas-extension.c b/libpeas/peas-extension.c
deleted file mode 100644
index 095591b..0000000
--- a/libpeas/peas-extension.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * peas-extension.c
- * This file is part of libpeas
- *
- * Copyright (C) 2010 Steve Frécinaux
- *
- * libpeas is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * libpeas is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * SPDX-License-Identifier: LGPL-2.1-or-later
- */
-
-#include "config.h"
-
-#include "peas-extension.h"
-
-/**
- * PeasExtension:
- *
- * #PeasExtension is a proxy class used to access actual extensions implemented
- * using various languages.
- *
- * As such, the application writer will use #PeasExtension instances to call
- * methods on extension provided by loaded plugins.
- *
- * To properly use the proxy instances, you will need GObject-introspection
- * data for the [alias@GObject.Type] you want to use as an extension point.
- * For instance, if you wish to use [iface@Activatable], you will need to
- * put the following code excerpt in the engine initialization code, in order
- * to load the required "Peas" typelib:
- *
- * ```c
- * g_irepository_require (g_irepository_get_default (),
- * "Peas", "2", 0, NULL);
- * ```
- *
- * You should proceed the same way for any namespace which provides types
- * you want to use as extension points. GObject-introspection data is required
- * for all the supported languages, even for C.
- *
- * #PeasExtension does not provide any way to access the underlying object.
- * The main reason is that some loaders may not rely on proper GObject
- * inheritance for the definition of extensions, and hence it would not be
- * possible for libpeas to provide a functional GObject instance at all.
- * Another reason is that it makes reference counting issues easier to deal
- * with.
- */
diff --git a/libpeas/peas-extension.h b/libpeas/peas-extension.h
deleted file mode 100644
index 4573bc0..0000000
--- a/libpeas/peas-extension.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * peas-extension.h
- * This file is part of libpeas
- *
- * Copyright (C) 2010 - Steve Frécinaux
- *
- * libpeas is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * libpeas is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * SPDX-License-Identifier: LGPL-2.1-or-later
- */
-
-#pragma once
-
-#if !defined (LIBPEAS_INSIDE) && !defined (LIBPEAS_COMPILATION)
-# error "Only <libpeas.h> can be included directly."
-#endif
-
-#include <glib-object.h>
-
-#include "peas-version-macros.h"
-
-G_BEGIN_DECLS
-
-/*
- * Type checking and casting macros
- */
-#define PEAS_TYPE_EXTENSION (G_TYPE_OBJECT)
-#define PEAS_EXTENSION(obj) (G_OBJECT(obj))
-#define PEAS_IS_EXTENSION(obj) (G_IS_OBJECT(obj))
-
-/**
- * PeasExtension:
- *
- * A proxy class to access the actual plugin.
- */
-typedef GObject PeasExtension;
-
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (PeasExtension, g_object_unref)
-
-G_END_DECLS
diff --git a/libpeas/peas-object-module.c b/libpeas/peas-object-module.c
index c43215e..ae41033 100644
--- a/libpeas/peas-object-module.c
+++ b/libpeas/peas-object-module.c
@@ -41,9 +41,6 @@
* registration of extensions. It will be used by C extensions implementors to
* register extension implementations from within the peas_register_types module
* function.
- *
- * Since libpeas 1.22, @extension_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
**/
typedef void (*PeasObjectModuleRegisterFunc) (PeasObjectModule *module);
@@ -360,8 +357,6 @@ peas_object_module_class_init (PeasObjectModuleClass *klass)
* PeasObjectModule:local-linkage
*
* Whether the module is loaded with local linkage, i.e. #G_MODULE_BIND_LOCAL.
- *
- * Since 1.14
*/
properties[PROP_LOCAL_LINKAGE] =
g_param_spec_boolean ("local-linkage",
@@ -410,8 +405,6 @@ peas_object_module_new (const gchar *module_name,
* Creates a new #PeasObjectModule.
*
* Returns: a new #PeasObjectModule.
- *
- * Since 1.14
*/
PeasObjectModule *
peas_object_module_new_full (const gchar *module_name,
@@ -469,9 +462,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* If @module does not provide a #PeasFactoryFunc for @exten_type then %NULL is
* returned.
*
- * Since libpeas 1.22, @exten_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
- *
* Returns: (transfer full) (nullable): The created object
*/
GObject *
@@ -481,7 +471,6 @@ peas_object_module_create_object (PeasObjectModule *module,
GParameter *parameters)
{
PeasObjectModulePrivate *priv = peas_object_module_get_instance_private (module);
- guint i;
ExtensionImplementation *impls;
g_return_val_if_fail (PEAS_IS_OBJECT_MODULE (module), NULL);
@@ -489,7 +478,7 @@ peas_object_module_create_object (PeasObjectModule *module,
G_TYPE_IS_ABSTRACT (exten_type), NULL);
impls = (ExtensionImplementation *) priv->implementations->data;
- for (i = 0; i < priv->implementations->len; ++i)
+ for (guint i = 0; i < priv->implementations->len; i++)
{
if (impls[i].exten_type == exten_type)
return impls[i].func (n_parameters, parameters, impls[i].user_data);
@@ -506,9 +495,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
*
* Determines if the module provides an extension for @exten_type.
*
- * Since libpeas 1.22, @exten_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
- *
* Returns: if the module provides an extension for @exten_type.
*/
gboolean
@@ -624,9 +610,6 @@ peas_object_module_get_library (PeasObjectModule *module)
* creating native types which cannot be instantiated correctly using
* [ctor@GObject.Object.new]. For other uses, you will usually prefer relying on
* peas_object_module_register_extension_type().
- *
- * Since libpeas 1.22, @exten_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
*/
void
peas_object_module_register_extension_factory (PeasObjectModule *module,
@@ -688,9 +671,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* @impl_type: The #GType of your implementation of @exten_type.
*
* Register @impl_type as an extension which implements @extension_type.
- *
- * Since libpeas 1.22, @exten_type can be an Abstract [alias@GObject.Type]
- * and not just an Interface [alias@GObject.Type].
*/
void
peas_object_module_register_extension_type (PeasObjectModule *module,
diff --git a/libpeas/peas-plugin-loader-c.c b/libpeas/peas-plugin-loader-c.c
index c4964f6..8155245 100644
--- a/libpeas/peas-plugin-loader-c.c
+++ b/libpeas/peas-plugin-loader-c.c
@@ -111,7 +111,7 @@ peas_plugin_loader_c_provides_extension (PeasPluginLoader *loader,
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-static PeasExtension *
+static GObject *
peas_plugin_loader_c_create_extension (PeasPluginLoader *loader,
PeasPluginInfo *info,
GType exten_type,
diff --git a/libpeas/peas-plugin-loader.c b/libpeas/peas-plugin-loader.c
index 414fb72..880810b 100644
--- a/libpeas/peas-plugin-loader.c
+++ b/libpeas/peas-plugin-loader.c
@@ -117,7 +117,7 @@ peas_plugin_loader_provides_extension (PeasPluginLoader *loader,
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-PeasExtension *
+GObject *
peas_plugin_loader_create_extension (PeasPluginLoader *loader,
PeasPluginInfo *info,
GType ext_type,
diff --git a/libpeas/peas-plugin-loader.h b/libpeas/peas-plugin-loader.h
index bf7ee0c..a61842c 100644
--- a/libpeas/peas-plugin-loader.h
+++ b/libpeas/peas-plugin-loader.h
@@ -26,7 +26,6 @@
#include <glib-object.h>
#include <gmodule.h>
#include "peas-plugin-info.h"
-#include "peas-extension.h"
G_BEGIN_DECLS
@@ -48,54 +47,49 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
struct _PeasPluginLoaderClass {
GObjectClass parent;
- gboolean (*initialize) (PeasPluginLoader *loader);
- gboolean (*is_global) (PeasPluginLoader *loader);
-
- gboolean (*load) (PeasPluginLoader *loader,
- PeasPluginInfo *info);
- void (*unload) (PeasPluginLoader *loader,
- PeasPluginInfo *info);
- gboolean (*provides_extension) (PeasPluginLoader *loader,
- PeasPluginInfo *info,
- GType ext_type);
- PeasExtension *(*create_extension) (PeasPluginLoader *loader,
- PeasPluginInfo *info,
- GType ext_type,
- guint n_parameters,
- GParameter *parameters);
-
- void (*garbage_collect) (PeasPluginLoader *loader);
+ gboolean (*initialize) (PeasPluginLoader *loader);
+ gboolean (*is_global) (PeasPluginLoader *loader);
+ gboolean (*load) (PeasPluginLoader *loader,
+ PeasPluginInfo *info);
+ void (*unload) (PeasPluginLoader *loader,
+ PeasPluginInfo *info);
+ gboolean (*provides_extension) (PeasPluginLoader *loader,
+ PeasPluginInfo *info,
+ GType ext_type);
+ GObject *(*create_extension) (PeasPluginLoader *loader,
+ PeasPluginInfo *info,
+ GType ext_type,
+ guint n_parameters,
+ GParameter *parameters);
+ void (*garbage_collect) (PeasPluginLoader *loader);
};
G_GNUC_END_IGNORE_DEPRECATIONS
PEAS_AVAILABLE_IN_ALL
-GType peas_plugin_loader_get_type (void) G_GNUC_CONST;
-
+GType peas_plugin_loader_get_type (void) G_GNUC_CONST;
PEAS_AVAILABLE_IN_ALL
-gboolean peas_plugin_loader_initialize (PeasPluginLoader *loader);
+gboolean peas_plugin_loader_initialize (PeasPluginLoader *loader);
PEAS_AVAILABLE_IN_ALL
-gboolean peas_plugin_loader_is_global (PeasPluginLoader *loader);
-
+gboolean peas_plugin_loader_is_global (PeasPluginLoader *loader);
PEAS_AVAILABLE_IN_ALL
-gboolean peas_plugin_loader_load (PeasPluginLoader *loader,
- PeasPluginInfo *info);
+gboolean peas_plugin_loader_load (PeasPluginLoader *loader,
+ PeasPluginInfo *info);
PEAS_AVAILABLE_IN_ALL
-void peas_plugin_loader_unload (PeasPluginLoader *loader,
- PeasPluginInfo *info);
-
+void peas_plugin_loader_unload (PeasPluginLoader *loader,
+ PeasPluginInfo *info);
PEAS_AVAILABLE_IN_ALL
-gboolean peas_plugin_loader_provides_extension (PeasPluginLoader *loader,
- PeasPluginInfo *info,
- GType ext_type);
+gboolean peas_plugin_loader_provides_extension (PeasPluginLoader *loader,
+ PeasPluginInfo *info,
+ GType ext_type);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
PEAS_AVAILABLE_IN_ALL
-PeasExtension *peas_plugin_loader_create_extension (PeasPluginLoader *loader,
- PeasPluginInfo *info,
- GType ext_type,
- guint n_parameters,
- GParameter *parameters);
+GObject *peas_plugin_loader_create_extension (PeasPluginLoader *loader,
+ PeasPluginInfo *info,
+ GType ext_type,
+ guint n_parameters,
+ GParameter *parameters);
G_GNUC_END_IGNORE_DEPRECATIONS
PEAS_AVAILABLE_IN_ALL
-void peas_plugin_loader_garbage_collect (PeasPluginLoader *loader);
+void peas_plugin_loader_garbage_collect (PeasPluginLoader *loader);
G_END_DECLS