| 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 |
GI.Notify.Callbacks
Contents
Description
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 Source #
Arguments
| = Notification |
|
| -> Text |
|
| -> IO () |
An action callback function.
type ActionCallback_WithClosures Source #
Arguments
| = Notification |
|
| -> Text |
|
| -> Ptr () |
|
| -> IO () |
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 Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNotification a) | |
| => FunPtr C_ActionCallback | |
| -> a |
|
| -> Text |
|
| -> Ptr () |
|
| -> m () |
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.