Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
An opaque structure used as the base of all interface types.
Synopsis
- newtype TypeInterface = TypeInterface (ManagedPtr TypeInterface)
- newZeroTypeInterface :: MonadIO m => m TypeInterface
- typeInterfaceAddPrerequisite :: (HasCallStack, MonadIO m) => GType -> GType -> m ()
- typeInterfaceGetPlugin :: (HasCallStack, MonadIO m) => GType -> GType -> m TypePlugin
- typeInterfaceInstantiatablePrerequisite :: (HasCallStack, MonadIO m) => GType -> m GType
- typeInterfacePeek :: (HasCallStack, MonadIO m) => TypeClass -> GType -> m TypeInterface
- typeInterfacePeekParent :: (HasCallStack, MonadIO m) => TypeInterface -> m TypeInterface
- typeInterfacePrerequisites :: (HasCallStack, MonadIO m) => GType -> m [GType]
Exported types
newtype TypeInterface Source #
Memory-managed wrapper type.
Instances
Eq TypeInterface Source # | |
Defined in GI.GObject.Structs.TypeInterface (==) :: TypeInterface -> TypeInterface -> Bool # (/=) :: TypeInterface -> TypeInterface -> Bool # | |
BoxedPtr TypeInterface Source # | |
Defined in GI.GObject.Structs.TypeInterface boxedPtrCopy :: TypeInterface -> IO TypeInterface # boxedPtrFree :: TypeInterface -> IO () # | |
CallocPtr TypeInterface Source # | |
Defined in GI.GObject.Structs.TypeInterface boxedPtrCalloc :: IO (Ptr TypeInterface) # | |
ManagedPtrNewtype TypeInterface Source # | |
Defined in GI.GObject.Structs.TypeInterface | |
tag ~ 'AttrSet => Constructible TypeInterface tag Source # | |
Defined in GI.GObject.Structs.TypeInterface new :: MonadIO m => (ManagedPtr TypeInterface -> TypeInterface) -> [AttrOp TypeInterface tag] -> m TypeInterface # |
newZeroTypeInterface :: MonadIO m => m TypeInterface Source #
Construct a TypeInterface
struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
addPrerequisite
typeInterfaceAddPrerequisite Source #
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> GType |
|
-> m () |
Adds prerequisiteType
to the list of prerequisites of interfaceType
.
This means that any type implementing interfaceType
must also implement
prerequisiteType
. Prerequisites can be thought of as an alternative to
interface derivation (which GType doesn't support). An interface can have
at most one instantiatable prerequisite type.
getPlugin
typeInterfaceGetPlugin Source #
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> GType |
|
-> m TypePlugin | Returns: the |
Returns the TypePlugin
structure for the dynamic interface
interfaceType
which has been added to instanceType
, or Nothing
if interfaceType
has not been added to instanceType
or does
not have a TypePlugin
structure. See typeAddInterfaceDynamic
.
instantiatablePrerequisite
typeInterfaceInstantiatablePrerequisite Source #
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> m GType | Returns: the instantiatable prerequisite type or |
Returns the most specific instantiatable prerequisite of an
interface type. If the interface type has no instantiatable
prerequisite, G_TYPE_INVALID
is returned.
See typeInterfaceAddPrerequisite
for more information
about prerequisites.
Since: 2.68
peek
:: (HasCallStack, MonadIO m) | |
=> TypeClass |
|
-> GType |
|
-> m TypeInterface | Returns: the |
Returns the TypeInterface
structure of an interface to which the
passed in class conforms.
peekParent
typeInterfacePeekParent Source #
:: (HasCallStack, MonadIO m) | |
=> TypeInterface |
|
-> m TypeInterface | Returns: the
corresponding |
Returns the corresponding TypeInterface
structure of the parent type
of the instance type to which gIface
belongs. This is useful when
deriving the implementation of an interface from the parent type and
then possibly overriding some methods.
prerequisites
typeInterfacePrerequisites Source #
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> m [GType] | Returns: a
newly-allocated zero-terminated array of |
Returns the prerequisites of an interfaces type.
Since: 2.2