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.Poppler.Callbacks
Description
Synopsis
- type AttachmentSaveFunc = ByteString -> IO ()
- type AttachmentSaveFunc_WithClosures = ByteString -> Ptr () -> IO ()
- type C_AttachmentSaveFunc = Ptr Word8 -> CSize -> Ptr () -> Ptr (Ptr GError) -> IO CInt
- drop_closures_AttachmentSaveFunc :: AttachmentSaveFunc -> AttachmentSaveFunc_WithClosures
- dynamic_AttachmentSaveFunc :: (HasCallStack, MonadIO m) => FunPtr C_AttachmentSaveFunc -> ByteString -> Ptr () -> m ()
- mk_AttachmentSaveFunc :: C_AttachmentSaveFunc -> IO (FunPtr C_AttachmentSaveFunc)
- noAttachmentSaveFunc :: Maybe AttachmentSaveFunc
- noAttachmentSaveFunc_WithClosures :: Maybe AttachmentSaveFunc_WithClosures
- type C_MediaSaveFunc = Ptr Word8 -> CSize -> Ptr () -> Ptr (Ptr GError) -> IO CInt
- type MediaSaveFunc = ByteString -> IO ()
- type MediaSaveFunc_WithClosures = ByteString -> Ptr () -> IO ()
- drop_closures_MediaSaveFunc :: MediaSaveFunc -> MediaSaveFunc_WithClosures
- dynamic_MediaSaveFunc :: (HasCallStack, MonadIO m) => FunPtr C_MediaSaveFunc -> ByteString -> Ptr () -> m ()
- mk_MediaSaveFunc :: C_MediaSaveFunc -> IO (FunPtr C_MediaSaveFunc)
- noMediaSaveFunc :: Maybe MediaSaveFunc
- noMediaSaveFunc_WithClosures :: Maybe MediaSaveFunc_WithClosures
- type C_NssPasswordFunc = CString -> IO CString
- type NssPasswordFunc = Text -> IO Text
- dynamic_NssPasswordFunc :: (HasCallStack, MonadIO m) => FunPtr C_NssPasswordFunc -> Text -> m Text
- genClosure_NssPasswordFunc :: MonadIO m => NssPasswordFunc -> m (GClosure C_NssPasswordFunc)
- mk_NssPasswordFunc :: C_NssPasswordFunc -> IO (FunPtr C_NssPasswordFunc)
- noNssPasswordFunc :: Maybe NssPasswordFunc
- wrap_NssPasswordFunc :: Maybe (Ptr (FunPtr C_NssPasswordFunc)) -> NssPasswordFunc -> C_NssPasswordFunc
Signals
AttachmentSaveFunc
type AttachmentSaveFunc Source #
Arguments
= ByteString |
|
-> IO () | Returns: |
Specifies the type of the function passed to
attachmentSaveToCallback
. It is called once for each block of
bytes that is "written" by attachmentSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case attachmentSaveToCallback
will fail with the same error.
type AttachmentSaveFunc_WithClosures Source #
Arguments
= ByteString |
|
-> Ptr () |
|
-> IO () | Returns: |
Specifies the type of the function passed to
attachmentSaveToCallback
. It is called once for each block of
bytes that is "written" by attachmentSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case attachmentSaveToCallback
will fail with the same error.
type C_AttachmentSaveFunc = Ptr Word8 -> CSize -> Ptr () -> Ptr (Ptr GError) -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
drop_closures_AttachmentSaveFunc :: AttachmentSaveFunc -> AttachmentSaveFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_AttachmentSaveFunc Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> FunPtr C_AttachmentSaveFunc | |
-> ByteString |
|
-> Ptr () |
|
-> m () | (Can throw |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
mk_AttachmentSaveFunc :: C_AttachmentSaveFunc -> IO (FunPtr C_AttachmentSaveFunc) Source #
Generate a function pointer callable from C code, from a C_AttachmentSaveFunc
.
noAttachmentSaveFunc :: Maybe AttachmentSaveFunc Source #
A convenience synonym for
.Nothing
:: Maybe
AttachmentSaveFunc
noAttachmentSaveFunc_WithClosures :: Maybe AttachmentSaveFunc_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
AttachmentSaveFunc_WithClosures
MediaSaveFunc
type C_MediaSaveFunc = Ptr Word8 -> CSize -> Ptr () -> Ptr (Ptr GError) -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type MediaSaveFunc Source #
Arguments
= ByteString |
|
-> IO () | Returns: |
Specifies the type of the function passed to
mediaSaveToCallback
. It is called once for each block of
bytes that is "written" by mediaSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case mediaSaveToCallback
will fail with the same error.
Since: 0.14
type MediaSaveFunc_WithClosures Source #
Arguments
= ByteString |
|
-> Ptr () |
|
-> IO () | Returns: |
Specifies the type of the function passed to
mediaSaveToCallback
. It is called once for each block of
bytes that is "written" by mediaSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case mediaSaveToCallback
will fail with the same error.
Since: 0.14
drop_closures_MediaSaveFunc :: MediaSaveFunc -> MediaSaveFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_MediaSaveFunc Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> FunPtr C_MediaSaveFunc | |
-> ByteString |
|
-> Ptr () |
|
-> m () | (Can throw |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
mk_MediaSaveFunc :: C_MediaSaveFunc -> IO (FunPtr C_MediaSaveFunc) Source #
Generate a function pointer callable from C code, from a C_MediaSaveFunc
.
noMediaSaveFunc :: Maybe MediaSaveFunc Source #
A convenience synonym for
.Nothing
:: Maybe
MediaSaveFunc
noMediaSaveFunc_WithClosures :: Maybe MediaSaveFunc_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
MediaSaveFunc_WithClosures
NssPasswordFunc
type C_NssPasswordFunc = CString -> IO CString Source #
Type for the callback on the (unwrapped) C side.
dynamic_NssPasswordFunc :: (HasCallStack, MonadIO m) => FunPtr C_NssPasswordFunc -> Text -> m Text Source #
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_NssPasswordFunc :: MonadIO m => NssPasswordFunc -> m (GClosure C_NssPasswordFunc) Source #
Wrap the callback into a GClosure
.
mk_NssPasswordFunc :: C_NssPasswordFunc -> IO (FunPtr C_NssPasswordFunc) Source #
Generate a function pointer callable from C code, from a C_NssPasswordFunc
.
noNssPasswordFunc :: Maybe NssPasswordFunc Source #
A convenience synonym for
.Nothing
:: Maybe
NssPasswordFunc
wrap_NssPasswordFunc :: Maybe (Ptr (FunPtr C_NssPasswordFunc)) -> NssPasswordFunc -> C_NssPasswordFunc Source #
Wrap a NssPasswordFunc
into a C_NssPasswordFunc
.