gi-gio-2.0.19: Gio bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.Gio.Structs.IOExtensionPoint

Contents

- Exported types
- Methods
  - getExtensionByName
  - getExtensions
  - getRequiredType
  - implement
  - lookup
  - register
  - setRequiredType

Description

`IOExtensionPoint` is an opaque data structure and can only be accessed using the following functions.

Synopsis

- newtype IOExtensionPoint = IOExtensionPoint (ManagedPtr IOExtensionPoint)
- noIOExtensionPoint :: Maybe IOExtensionPoint
- iOExtensionPointGetExtensionByName :: (HasCallStack, MonadIO m) => IOExtensionPoint -> Text -> m IOExtension
- iOExtensionPointGetExtensions :: (HasCallStack, MonadIO m) => IOExtensionPoint -> m [IOExtension]
- iOExtensionPointGetRequiredType :: (HasCallStack, MonadIO m) => IOExtensionPoint -> m GType
- iOExtensionPointImplement :: (HasCallStack, MonadIO m) => Text -> GType -> Text -> Int32 -> m IOExtension
- iOExtensionPointLookup :: (HasCallStack, MonadIO m) => Text -> m IOExtensionPoint
- iOExtensionPointRegister :: (HasCallStack, MonadIO m) => Text -> m IOExtensionPoint
- iOExtensionPointSetRequiredType :: (HasCallStack, MonadIO m) => IOExtensionPoint -> GType -> m ()

# Exported types

newtype IOExtensionPoint Source #

Memory-managed wrapper type.

Constructors

IOExtensionPoint (ManagedPtr IOExtensionPoint) |

Instances

WrappedPtr IOExtensionPoint Source # |
Instance details Defined in GI.Gio.Structs.IOExtensionPoint Methods wrappedPtrCalloc :: IO (Ptr IOExtensionPoint) Source # wrappedPtrCopy :: IOExtensionPoint -> IO IOExtensionPoint Source # wrappedPtrFree :: Maybe (FunPtr (Ptr IOExtensionPoint -> IO ())) Source #

noIOExtensionPoint :: Maybe IOExtensionPoint Source #

A convenience alias for `Nothing` :: `Maybe` `IOExtensionPoint`.

# Methods

## getExtensionByName

iOExtensionPointGetExtensionByName Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> IOExtensionPoint | `extensionPoint`: a `IOExtensionPoint`
-> Text | `name`: the name of the extension to get
-> m IOExtension | Returns: the `IOExtension` for `extensionPoint` that has the given name, or `Nothing` if there is no extension with that name

Finds a `IOExtension` for an extension point by name.

## getExtensions

iOExtensionPointGetExtensions Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> IOExtensionPoint | `extensionPoint`: a `IOExtensionPoint`
-> m [IOExtension] | Returns: a `List` of `GIOExtensions`. The list is owned by GIO and should not be modified.

Gets a list of all extensions that implement this extension point. The list is sorted by priority, beginning with the highest priority.

## getRequiredType

iOExtensionPointGetRequiredType Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> IOExtensionPoint | `extensionPoint`: a `IOExtensionPoint`
-> m GType | Returns: the `GType` that all implementations must have, or `G_TYPE_INVALID` if the extension point has no required type

Gets the required type for `extensionPoint`.

## implement

iOExtensionPointImplement Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `extensionPointName`: the name of the extension point
-> GType | `type`: the `GType` to register as extension
-> Text | `extensionName`: the name for the extension
-> Int32 | `priority`: the priority for the extension
-> m IOExtension | Returns: a `IOExtension` object for `GType`

Registers `type` as extension for the extension point with name `extensionPointName`.

If `type` has already been registered as an extension for this extension point, the existing `IOExtension` object is returned.

## lookup

iOExtensionPointLookup Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `name`: the name of the extension point
-> m IOExtensionPoint | Returns: the `IOExtensionPoint`, or `Nothing` if there is no registered extension point with the given name.

Looks up an existing extension point.

## register

iOExtensionPointRegister Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `name`: The name of the extension point
-> m IOExtensionPoint | Returns: the new `IOExtensionPoint`. This object is owned by GIO and should not be freed.

Registers an extension point.

## setRequiredType

iOExtensionPointSetRequiredType Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> IOExtensionPoint | `extensionPoint`: a `IOExtensionPoint`
-> GType | `type`: the `GType` to require
-> m () |

Sets the required type for `extensionPoint` to `type`. All implementations must henceforth have this type.