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.Keybinder.Callbacks
Description
Synopsis
- type C_Handler = CString -> Ptr () -> IO ()
- type Handler = Text -> IO ()
- type Handler_WithClosures = Text -> Ptr () -> IO ()
- drop_closures_Handler :: Handler -> Handler_WithClosures
- dynamic_Handler :: (HasCallStack, MonadIO m) => FunPtr C_Handler -> Text -> Ptr () -> m ()
- genClosure_Handler :: MonadIO m => Handler -> m (GClosure C_Handler)
- mk_Handler :: C_Handler -> IO (FunPtr C_Handler)
- noHandler :: Maybe Handler
- noHandler_WithClosures :: Maybe Handler_WithClosures
- wrap_Handler :: Maybe (Ptr (FunPtr C_Handler)) -> Handler_WithClosures -> C_Handler
Signals
Handler
type C_Handler = CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type Handler_WithClosures = Text -> Ptr () -> IO () Source #
No description available in the introspection data.
drop_closures_Handler :: Handler -> Handler_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_Handler :: (HasCallStack, MonadIO m) => FunPtr C_Handler -> Text -> Ptr () -> m () Source #
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_Handler :: MonadIO m => Handler -> m (GClosure C_Handler) Source #
Wrap the callback into a GClosure
.
mk_Handler :: C_Handler -> IO (FunPtr C_Handler) Source #
Generate a function pointer callable from C code, from a C_Handler
.
noHandler_WithClosures :: Maybe Handler_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
Handler_WithClosures