gio-Extension-Points {RGtk2} | R Documentation

## Extension Points

### Description

Extension Points

### Methods and Functions

`gIoExtensionGetName(object)`
`gIoExtensionGetPriority(object)`
`gIoExtensionGetType(object)`
`gIoExtensionPointGetExtensionByName(object, name)`
`gIoExtensionPointGetExtensions(object)`
`gIoExtensionPointGetRequiredType(object)`
`gIoExtensionPointImplement(extension.point.name, type, extension.name, priority)`
`gIoExtensionPointLookup(name)`
`gIoExtensionPointRegister(name)`
`gIoExtensionPointSetRequiredType(object, type)`
`gIoExtensionRefClass(object)`

### Detailed Description

`GIOExtensionPoint` provides a mechanism for modules to extend the functionality of the library or application that loaded it in an organized fashion.

An extension point is identified by a name, and it may optionally require that any implementation must by of a certain type (or derived thereof). Use `gIoExtensionPointRegister` to register an extension point, and `gIoExtensionPointSetRequiredType` to set a required type.

A module can implement an extension point by specifying the `GType` that implements the functionality. Additionally, each implementation of an extension point has a name, and a priority. Use `gIoExtensionPointImplement` to implement an extension point.

    ## Register an extension point
    ep <- gIoExtensionPointRegister("my-extension-point")
    ep$setRequiredType(MY_TYPE_EXAMPLE)

    ## Implement an extension point
    myExampleImplType <- gClass("MyExampleImpl", MY_TYPE_EXAMPLE)
    gIoExtensionPointImplement ("my-extension-point",
                                myExampleImplType,
                                "my-example",
                                10);

It is up to the code that registered the extension point how it uses the implementations that have been associated with it. Depending on the use case, it may use all implementations, or only the one with the highest priority, or pick a specific one by name.

### Structures

`GIOExtension`

  undocumented

`GIOExtensionPoint`

  undocumented

### Author(s)

Derived by RGtkGen from GTK+ documentation

### References

https://developer.gnome.org/gio/stable/gio-Extension-Points.html

[Package RGtk2 version 2.20.36.3 Index]