Home | History | Annotate | Download | only in gio

Lines Matching refs:extension

51  * @short_description: Extension Points
59 * An extension point is identified by a name, and it may optionally
62 * extension point, and g_io_extension_point_set_required_type() to
65 * A module can implement an extension point by specifying the #GType
67 * of an extension point has a name, and a priority. Use
68 * g_io_extension_point_implement() to implement an extension point.
73 * /* Register an extension point */
74 * ep = g_io_extension_point_register ("my-extension-point");
79 * /* Implement an extension point */
81 * g_io_extension_point_implement ("my-extension-point",
87 * It is up to the code that registered the extension point how
425 * @name: The name of the extension point
427 * Registers an extension point.
446 g_warning ("Extension point %s registered multiple times", name);
463 * @name: the name of the extension point
465 * Looks up an existing extension point.
468 * registered extension point with the given name
508 * or #G_TYPE_INVALID if the extension point has no required type
520 * Gets a list of all extensions that implement this extension point.
535 * @name: the name of the extension to get
537 * Finds a #GIOExtension for an extension point by name.
540 * given name, or %NULL if there is no extension with that name
571 * @extension_point_name: the name of the extension point
572 * @type: the #GType to register as extension
573 * @extension_name: the name for the extension
574 * @priority: the priority for the extension
576 * Registers @type as extension for the extension point with name
579 * If @type has already been registered as an extension for this
580 * extension point, the existing #GIOExtension object is returned.
591 GIOExtension *extension;
599 g_warning ("Tried to implement non-registered extension point %s", extension_point_name);
606 g_warning ("Tried to register an extension of the type %s to extension point %s. "
617 extension = l->data;
618 if (extension->type == type)
619 return extension;
622 extension = g_slice_new0 (GIOExtension);
623 extension->type = type;
624 extension->name = g_strdup (extension_name);
625 extension->priority = priority;
628 extension, extension_prio_compare);
630 return extension;
635 * @extension: a #GIOExtension
638 * associated with @extension.
640 * Returns: the #GTypeClass for the type of @extension
643 g_io_extension_ref_class (GIOExtension *extension)
645 return g_type_class_ref (extension->type);
650 * @extension: a #GIOExtension
652 * Gets the type associated with @extension.
654 * Returns: the type of @extension
657 g_io_extension_get_type (GIOExtension *extension)
659 return extension->type;
664 * @extension: a #GIOExtension
666 * Gets the name under which @extension was registered.
668 * Note that the same type may be registered as extension
669 * for multiple extension points, under different names.
671 * Returns: the name of @extension.
674 g_io_extension_get_name (GIOExtension *extension)
676 return extension->name;
681 * @extension: a #GIOExtension
683 * Gets the priority with which @extension was registered.
685 * Returns: the priority of @extension
688 g_io_extension_get_priority (GIOExtension *extension)
690 return extension->priority;