Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Some helper functions for dealing with GClosure
s.
Synopsis
- newtype GClosure a = GClosure (ManagedPtr (GClosure a))
- newGClosure :: MonadIO m => FunPtr a -> m (GClosure a)
- wrapGClosurePtr :: Ptr (GClosure a) -> IO (GClosure a)
- newGClosureFromPtr :: Ptr (GClosure a) -> IO (GClosure a)
- noGClosure :: Maybe (GClosure a)
- unrefGClosure :: (HasCallStack, MonadIO m) => GClosure a -> m ()
- disownGClosure :: GClosure a -> IO (Ptr (GClosure a))
Documentation
The basic type. This corresponds to a wrapped GClosure
on the C
side, which is a boxed object.
GClosure (ManagedPtr (GClosure a)) |
Instances
GBoxed (GClosure a) Source # |
|
Defined in Data.GI.Base.GClosure | |
TypedObject (GClosure a) Source # | Find the associated |
HasParentTypes (GClosure a) Source # | |
Defined in Data.GI.Base.GClosure | |
type ParentTypes (GClosure a) Source # | There are no types in the bindings that a closure can be safely cast to. |
Defined in Data.GI.Base.GClosure |
newGClosureFromPtr :: Ptr (GClosure a) -> IO (GClosure a) Source #
Construct a Haskell wrapper for the GClosure
, without assuming
ownership.
noGClosure :: Maybe (GClosure a) Source #
A convenience alias for Nothing :: Maybe (GClosure a)
.
unrefGClosure :: (HasCallStack, MonadIO m) => GClosure a -> m () Source #
Decrease the reference count of the given GClosure
. If the
reference count reaches 0 the memory will be released.