Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type ActionCallback = Notification -> Text -> IO ()
- type ActionCallback_WithClosures = Notification -> Text -> Ptr () -> IO ()
- type C_ActionCallback = Ptr Notification -> CString -> Ptr () -> IO ()
- drop_closures_ActionCallback :: ActionCallback -> ActionCallback_WithClosures
- dynamic_ActionCallback :: (HasCallStack, MonadIO m, IsNotification a) => FunPtr C_ActionCallback -> a -> Text -> Ptr () -> m ()
- genClosure_ActionCallback :: MonadIO m => ActionCallback -> m (GClosure C_ActionCallback)
- mk_ActionCallback :: C_ActionCallback -> IO (FunPtr C_ActionCallback)
- noActionCallback :: Maybe ActionCallback
- noActionCallback_WithClosures :: Maybe ActionCallback_WithClosures
- wrap_ActionCallback :: Maybe (Ptr (FunPtr C_ActionCallback)) -> ActionCallback_WithClosures -> C_ActionCallback
Signals
ActionCallback
type ActionCallback = Notification -> Text -> IO () Source #
An action callback function.
type ActionCallback_WithClosures = Notification -> Text -> Ptr () -> IO () Source #
An action callback function.
type C_ActionCallback = Ptr Notification -> CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
drop_closures_ActionCallback :: ActionCallback -> ActionCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_ActionCallback :: (HasCallStack, MonadIO m, IsNotification a) => FunPtr C_ActionCallback -> a -> Text -> Ptr () -> m () Source #
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_ActionCallback :: MonadIO m => ActionCallback -> m (GClosure C_ActionCallback) Source #
Wrap the callback into a GClosure
.
mk_ActionCallback :: C_ActionCallback -> IO (FunPtr C_ActionCallback) Source #
Generate a function pointer callable from C code, from a C_ActionCallback
.
noActionCallback :: Maybe ActionCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ActionCallback
noActionCallback_WithClosures :: Maybe ActionCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
ActionCallback_WithClosures
wrap_ActionCallback :: Maybe (Ptr (FunPtr C_ActionCallback)) -> ActionCallback_WithClosures -> C_ActionCallback Source #
Wrap a ActionCallback
into a C_ActionCallback
.