mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-26 09:06:52 +02:00
docs: Move the GIOModule and GIOExtensionPoint SECTIONs
Move them to the struct docs. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3037
This commit is contained in:
parent
fe8785862a
commit
2abbaac589
@ -77,53 +77,47 @@
|
|||||||
#undef __GLIB_H_INSIDE__
|
#undef __GLIB_H_INSIDE__
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:giomodule
|
* GIOModule:
|
||||||
* @short_description: Loadable GIO Modules
|
|
||||||
* @include: gio/gio.h
|
|
||||||
*
|
*
|
||||||
* Provides an interface and default functions for loading and unloading
|
* Provides an interface and default functions for loading and unloading
|
||||||
* modules. This is used internally to make GIO extensible, but can also
|
* modules. This is used internally to make GIO extensible, but can also
|
||||||
* be used by others to implement module loading.
|
* be used by others to implement module loading.
|
||||||
*
|
*/
|
||||||
**/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:extensionpoints
|
* GIOExtensionPoint:
|
||||||
* @short_description: Extension Points
|
|
||||||
* @include: gio.h
|
|
||||||
* @see_also: [Extending GIO][extending-gio]
|
|
||||||
*
|
*
|
||||||
* #GIOExtensionPoint provides a mechanism for modules to extend the
|
* `GIOExtensionPoint` provides a mechanism for modules to extend the
|
||||||
* functionality of the library or application that loaded it in an
|
* functionality of the library or application that loaded it in an
|
||||||
* organized fashion.
|
* organized fashion.
|
||||||
*
|
*
|
||||||
* An extension point is identified by a name, and it may optionally
|
* An extension point is identified by a name, and it may optionally
|
||||||
* require that any implementation must be of a certain type (or derived
|
* require that any implementation must be of a certain type (or derived
|
||||||
* thereof). Use g_io_extension_point_register() to register an
|
* thereof). Use [func@Gio.IOExtensionPoint.register] to register an
|
||||||
* extension point, and g_io_extension_point_set_required_type() to
|
* extension point, and [method@Gio.IOExtensionPoint.set_required_type] to
|
||||||
* set a required type.
|
* set a required type.
|
||||||
*
|
*
|
||||||
* A module can implement an extension point by specifying the #GType
|
* A module can implement an extension point by specifying the
|
||||||
* that implements the functionality. Additionally, each implementation
|
* [type@GObject.Type] that implements the functionality. Additionally, each
|
||||||
* of an extension point has a name, and a priority. Use
|
* implementation of an extension point has a name, and a priority. Use
|
||||||
* g_io_extension_point_implement() to implement an extension point.
|
* [func@Gio.IOExtensionPoint.implement] to implement an extension point.
|
||||||
*
|
*
|
||||||
* |[<!-- language="C" -->
|
* ```c
|
||||||
* GIOExtensionPoint *ep;
|
* GIOExtensionPoint *ep;
|
||||||
*
|
*
|
||||||
* // Register an extension point
|
* // Register an extension point
|
||||||
* ep = g_io_extension_point_register ("my-extension-point");
|
* ep = g_io_extension_point_register ("my-extension-point");
|
||||||
* g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
|
* g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
|
||||||
* ]|
|
* ```
|
||||||
*
|
*
|
||||||
* |[<!-- language="C" -->
|
* ```c
|
||||||
* // Implement an extension point
|
* // Implement an extension point
|
||||||
* G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE)
|
* G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE)
|
||||||
* g_io_extension_point_implement ("my-extension-point",
|
* g_io_extension_point_implement ("my-extension-point",
|
||||||
* my_example_impl_get_type (),
|
* my_example_impl_get_type (),
|
||||||
* "my-example",
|
* "my-example",
|
||||||
* 10);
|
* 10);
|
||||||
* ]|
|
* ```
|
||||||
*
|
*
|
||||||
* It is up to the code that registered the extension point how
|
* It is up to the code that registered the extension point how
|
||||||
* it uses the implementations that have been associated with it.
|
* it uses the implementations that have been associated with it.
|
||||||
@ -133,7 +127,7 @@
|
|||||||
*
|
*
|
||||||
* To avoid opening all modules just to find out what extension
|
* To avoid opening all modules just to find out what extension
|
||||||
* points they implement, GIO makes use of a caching mechanism,
|
* points they implement, GIO makes use of a caching mechanism,
|
||||||
* see [gio-querymodules][gio-querymodules].
|
* see [gio-querymodules](gio-querymodules.html).
|
||||||
* You are expected to run this command after installing a
|
* You are expected to run this command after installing a
|
||||||
* GIO module.
|
* GIO module.
|
||||||
*
|
*
|
||||||
@ -267,12 +261,6 @@ struct _GIOExtension {
|
|||||||
gint priority;
|
gint priority;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* GIOExtensionPoint:
|
|
||||||
*
|
|
||||||
* #GIOExtensionPoint is an opaque data structure and can only be accessed
|
|
||||||
* using the following functions.
|
|
||||||
*/
|
|
||||||
struct _GIOExtensionPoint {
|
struct _GIOExtensionPoint {
|
||||||
GType required_type;
|
GType required_type;
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -49,11 +49,6 @@ void g_io_module_scope_block (GIOModuleScope *scope,
|
|||||||
#define G_IO_IS_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_IO_TYPE_MODULE))
|
#define G_IO_IS_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_IO_TYPE_MODULE))
|
||||||
#define G_IO_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_IO_TYPE_MODULE, GIOModuleClass))
|
#define G_IO_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_IO_TYPE_MODULE, GIOModuleClass))
|
||||||
|
|
||||||
/**
|
|
||||||
* GIOModule:
|
|
||||||
*
|
|
||||||
* Opaque module base class for extending GIO.
|
|
||||||
**/
|
|
||||||
typedef struct _GIOModuleClass GIOModuleClass;
|
typedef struct _GIOModuleClass GIOModuleClass;
|
||||||
|
|
||||||
GIO_AVAILABLE_IN_ALL
|
GIO_AVAILABLE_IN_ALL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user