gi-poppler-0.18.29: Poppler bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Poppler.Callbacks

Description

 
Synopsis

Signals

AttachmentSaveFunc

type AttachmentSaveFunc Source #

Arguments

 = ByteString

buf: buffer containing bytes to be written.

-> IO ()

Returns: True if successful, False (with error set) if failed. (Can throw GError)

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

buf: buffer containing bytes to be written.

-> Ptr ()

data: user data passed to attachmentSaveToCallback

-> IO ()

Returns: True if successful, False (with error set) if failed. (Can throw GError)

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 -> Word64 -> 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

buf: buffer containing bytes to be written.

-> Ptr ()

data: user data passed to attachmentSaveToCallback

-> m ()

(Can throw GError)

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.

MediaSaveFunc

type C_MediaSaveFunc = Ptr Word8 -> Word64 -> Ptr () -> Ptr (Ptr GError) -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type MediaSaveFunc Source #

Arguments

 = ByteString

buf: buffer containing bytes to be written.

-> IO ()

Returns: True if successful, False (with error set) if failed. (Can throw GError)

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

buf: buffer containing bytes to be written.

-> Ptr ()

data: user data passed to mediaSaveToCallback

-> IO ()

Returns: True if successful, False (with error set) if failed. (Can throw GError)

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

buf: buffer containing bytes to be written.

-> Ptr ()

data: user data passed to mediaSaveToCallback

-> m ()

(Can throw GError)

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.