gi-gdkpixbuf-2.0.32: GdkPixbuf bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.GdkPixbuf.Callbacks

Contents

- Signals
  - PixbufDestroyNotify
  - PixbufModuleFillInfoFunc
  - PixbufModuleFillVtableFunc
  - PixbufModuleIncrementLoadFunc
  - PixbufModuleLoadAnimationFunc
  - PixbufModuleLoadFunc
  - PixbufModuleLoadXpmDataFunc
  - PixbufModulePreparedFunc
  - PixbufModuleSaveFunc
  - PixbufModuleSaveOptionSupportedFunc
  - PixbufModuleSizeFunc
  - PixbufModuleStopLoadFunc
  - PixbufModuleUpdatedFunc
  - PixbufSaveFunc

Description

Synopsis

- type C_PixbufDestroyNotify = Ptr Word8 -> Ptr () -> IO ()
- type PixbufDestroyNotify = Ptr Word8 -> IO ()
- type PixbufDestroyNotify_WithClosures = Ptr Word8 -> Ptr () -> IO ()
- drop_closures_PixbufDestroyNotify :: PixbufDestroyNotify -> PixbufDestroyNotify_WithClosures
- dynamic_PixbufDestroyNotify :: (HasCallStack, MonadIO m) => FunPtr C_PixbufDestroyNotify -> Ptr Word8 -> Ptr () -> m ()
- genClosure_PixbufDestroyNotify :: MonadIO m => PixbufDestroyNotify -> m (GClosure C_PixbufDestroyNotify)
- mk_PixbufDestroyNotify :: C_PixbufDestroyNotify -> IO (FunPtr C_PixbufDestroyNotify)
- noPixbufDestroyNotify :: Maybe PixbufDestroyNotify
- noPixbufDestroyNotify_WithClosures :: Maybe PixbufDestroyNotify_WithClosures
- wrap_PixbufDestroyNotify :: Maybe (Ptr (FunPtr C_PixbufDestroyNotify)) -> PixbufDestroyNotify_WithClosures -> C_PixbufDestroyNotify
- type C_PixbufModuleFillInfoFunc = Ptr PixbufFormat -> IO ()
- type PixbufModuleFillInfoFunc = PixbufFormat -> IO ()
- dynamic_PixbufModuleFillInfoFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleFillInfoFunc -> PixbufFormat -> m ()
- genClosure_PixbufModuleFillInfoFunc :: MonadIO m => PixbufModuleFillInfoFunc -> m (GClosure C_PixbufModuleFillInfoFunc)
- mk_PixbufModuleFillInfoFunc :: C_PixbufModuleFillInfoFunc -> IO (FunPtr C_PixbufModuleFillInfoFunc)
- noPixbufModuleFillInfoFunc :: Maybe PixbufModuleFillInfoFunc
- wrap_PixbufModuleFillInfoFunc :: Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc)) -> PixbufModuleFillInfoFunc -> C_PixbufModuleFillInfoFunc
- type C_PixbufModuleFillVtableFunc = Ptr PixbufModule -> IO ()
- type PixbufModuleFillVtableFunc = PixbufModule -> IO ()
- dynamic_PixbufModuleFillVtableFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleFillVtableFunc -> PixbufModule -> m ()
- genClosure_PixbufModuleFillVtableFunc :: MonadIO m => PixbufModuleFillVtableFunc -> m (GClosure C_PixbufModuleFillVtableFunc)
- mk_PixbufModuleFillVtableFunc :: C_PixbufModuleFillVtableFunc -> IO (FunPtr C_PixbufModuleFillVtableFunc)
- noPixbufModuleFillVtableFunc :: Maybe PixbufModuleFillVtableFunc
- wrap_PixbufModuleFillVtableFunc :: Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc)) -> PixbufModuleFillVtableFunc -> C_PixbufModuleFillVtableFunc
- type C_PixbufModuleIncrementLoadFunc = Ptr () -> Ptr Word8 -> Word32 -> Ptr (Ptr GError) -> IO CInt
- type PixbufModuleIncrementLoadFunc = Ptr () -> ByteString -> IO ()
- dynamic_PixbufModuleIncrementLoadFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleIncrementLoadFunc -> Ptr () -> ByteString -> m ()
- mk_PixbufModuleIncrementLoadFunc :: C_PixbufModuleIncrementLoadFunc -> IO (FunPtr C_PixbufModuleIncrementLoadFunc)
- noPixbufModuleIncrementLoadFunc :: Maybe PixbufModuleIncrementLoadFunc
- type C_PixbufModuleLoadAnimationFunc = Ptr () -> Ptr (Ptr GError) -> IO (Ptr PixbufAnimation)
- type PixbufModuleLoadAnimationFunc = Ptr () -> IO PixbufAnimation
- dynamic_PixbufModuleLoadAnimationFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleLoadAnimationFunc -> Ptr () -> m PixbufAnimation
- mk_PixbufModuleLoadAnimationFunc :: C_PixbufModuleLoadAnimationFunc -> IO (FunPtr C_PixbufModuleLoadAnimationFunc)
- noPixbufModuleLoadAnimationFunc :: Maybe PixbufModuleLoadAnimationFunc
- type C_PixbufModuleLoadFunc = Ptr () -> Ptr (Ptr GError) -> IO (Ptr Pixbuf)
- type PixbufModuleLoadFunc = Ptr () -> IO Pixbuf
- dynamic_PixbufModuleLoadFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleLoadFunc -> Ptr () -> m Pixbuf
- mk_PixbufModuleLoadFunc :: C_PixbufModuleLoadFunc -> IO (FunPtr C_PixbufModuleLoadFunc)
- noPixbufModuleLoadFunc :: Maybe PixbufModuleLoadFunc
- type C_PixbufModuleLoadXpmDataFunc = Ptr CString -> IO (Ptr Pixbuf)
- type PixbufModuleLoadXpmDataFunc = [Text] -> IO Pixbuf
- dynamic_PixbufModuleLoadXpmDataFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleLoadXpmDataFunc -> [Text] -> m Pixbuf
- genClosure_PixbufModuleLoadXpmDataFunc :: MonadIO m => PixbufModuleLoadXpmDataFunc -> m (GClosure C_PixbufModuleLoadXpmDataFunc)
- mk_PixbufModuleLoadXpmDataFunc :: C_PixbufModuleLoadXpmDataFunc -> IO (FunPtr C_PixbufModuleLoadXpmDataFunc)
- noPixbufModuleLoadXpmDataFunc :: Maybe PixbufModuleLoadXpmDataFunc
- wrap_PixbufModuleLoadXpmDataFunc :: Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc)) -> PixbufModuleLoadXpmDataFunc -> C_PixbufModuleLoadXpmDataFunc
- type C_PixbufModulePreparedFunc = Ptr Pixbuf -> Ptr PixbufAnimation -> Ptr () -> IO ()
- type PixbufModulePreparedFunc = Pixbuf -> PixbufAnimation -> IO ()
- type PixbufModulePreparedFunc_WithClosures = Pixbuf -> PixbufAnimation -> Ptr () -> IO ()
- drop_closures_PixbufModulePreparedFunc :: PixbufModulePreparedFunc -> PixbufModulePreparedFunc_WithClosures
- dynamic_PixbufModulePreparedFunc :: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbufAnimation b) => FunPtr C_PixbufModulePreparedFunc -> a -> b -> Ptr () -> m ()
- genClosure_PixbufModulePreparedFunc :: MonadIO m => PixbufModulePreparedFunc -> m (GClosure C_PixbufModulePreparedFunc)
- mk_PixbufModulePreparedFunc :: C_PixbufModulePreparedFunc -> IO (FunPtr C_PixbufModulePreparedFunc)
- noPixbufModulePreparedFunc :: Maybe PixbufModulePreparedFunc
- noPixbufModulePreparedFunc_WithClosures :: Maybe PixbufModulePreparedFunc_WithClosures
- wrap_PixbufModulePreparedFunc :: Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc)) -> PixbufModulePreparedFunc_WithClosures -> C_PixbufModulePreparedFunc
- type C_PixbufModuleSaveFunc = Ptr () -> Ptr Pixbuf -> Ptr CString -> Ptr CString -> Ptr (Ptr GError) -> IO CInt
- type PixbufModuleSaveFunc = Ptr () -> Pixbuf -> Maybe [Text] -> Maybe [Text] -> IO ()
- dynamic_PixbufModuleSaveFunc :: (HasCallStack, MonadIO m, IsPixbuf a) => FunPtr C_PixbufModuleSaveFunc -> Ptr () -> a -> Maybe [Text] -> Maybe [Text] -> m ()
- mk_PixbufModuleSaveFunc :: C_PixbufModuleSaveFunc -> IO (FunPtr C_PixbufModuleSaveFunc)
- noPixbufModuleSaveFunc :: Maybe PixbufModuleSaveFunc
- type C_PixbufModuleSaveOptionSupportedFunc = CString -> IO CInt
- type PixbufModuleSaveOptionSupportedFunc = Text -> IO Bool
- dynamic_PixbufModuleSaveOptionSupportedFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleSaveOptionSupportedFunc -> Text -> m Bool
- genClosure_PixbufModuleSaveOptionSupportedFunc :: MonadIO m => PixbufModuleSaveOptionSupportedFunc -> m (GClosure C_PixbufModuleSaveOptionSupportedFunc)
- mk_PixbufModuleSaveOptionSupportedFunc :: C_PixbufModuleSaveOptionSupportedFunc -> IO (FunPtr C_PixbufModuleSaveOptionSupportedFunc)
- noPixbufModuleSaveOptionSupportedFunc :: Maybe PixbufModuleSaveOptionSupportedFunc
- wrap_PixbufModuleSaveOptionSupportedFunc :: Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc)) -> PixbufModuleSaveOptionSupportedFunc -> C_PixbufModuleSaveOptionSupportedFunc
- type C_PixbufModuleSizeFunc = Int32 -> Int32 -> Ptr () -> IO ()
- type PixbufModuleSizeFunc = Int32 -> Int32 -> IO ()
- type PixbufModuleSizeFunc_WithClosures = Int32 -> Int32 -> Ptr () -> IO ()
- drop_closures_PixbufModuleSizeFunc :: PixbufModuleSizeFunc -> PixbufModuleSizeFunc_WithClosures
- dynamic_PixbufModuleSizeFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleSizeFunc -> Int32 -> Int32 -> Ptr () -> m ()
- genClosure_PixbufModuleSizeFunc :: MonadIO m => PixbufModuleSizeFunc -> m (GClosure C_PixbufModuleSizeFunc)
- mk_PixbufModuleSizeFunc :: C_PixbufModuleSizeFunc -> IO (FunPtr C_PixbufModuleSizeFunc)
- noPixbufModuleSizeFunc :: Maybe PixbufModuleSizeFunc
- noPixbufModuleSizeFunc_WithClosures :: Maybe PixbufModuleSizeFunc_WithClosures
- wrap_PixbufModuleSizeFunc :: Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc)) -> PixbufModuleSizeFunc_WithClosures -> C_PixbufModuleSizeFunc
- type C_PixbufModuleStopLoadFunc = Ptr () -> Ptr (Ptr GError) -> IO CInt
- type PixbufModuleStopLoadFunc = Ptr () -> IO ()
- dynamic_PixbufModuleStopLoadFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleStopLoadFunc -> Ptr () -> m ()
- mk_PixbufModuleStopLoadFunc :: C_PixbufModuleStopLoadFunc -> IO (FunPtr C_PixbufModuleStopLoadFunc)
- noPixbufModuleStopLoadFunc :: Maybe PixbufModuleStopLoadFunc
- type C_PixbufModuleUpdatedFunc = Ptr Pixbuf -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr () -> IO ()
- type PixbufModuleUpdatedFunc = Pixbuf -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
- type PixbufModuleUpdatedFunc_WithClosures = Pixbuf -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr () -> IO ()
- drop_closures_PixbufModuleUpdatedFunc :: PixbufModuleUpdatedFunc -> PixbufModuleUpdatedFunc_WithClosures
- dynamic_PixbufModuleUpdatedFunc :: (HasCallStack, MonadIO m, IsPixbuf a) => FunPtr C_PixbufModuleUpdatedFunc -> a -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr () -> m ()
- genClosure_PixbufModuleUpdatedFunc :: MonadIO m => PixbufModuleUpdatedFunc -> m (GClosure C_PixbufModuleUpdatedFunc)
- mk_PixbufModuleUpdatedFunc :: C_PixbufModuleUpdatedFunc -> IO (FunPtr C_PixbufModuleUpdatedFunc)
- noPixbufModuleUpdatedFunc :: Maybe PixbufModuleUpdatedFunc
- noPixbufModuleUpdatedFunc_WithClosures :: Maybe PixbufModuleUpdatedFunc_WithClosures
- wrap_PixbufModuleUpdatedFunc :: Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc)) -> PixbufModuleUpdatedFunc_WithClosures -> C_PixbufModuleUpdatedFunc
- type C_PixbufSaveFunc = Ptr Word8 -> CSize -> Ptr (Ptr GError) -> Ptr () -> IO CInt
- type PixbufSaveFunc = ByteString -> IO (Bool, GError)
- type PixbufSaveFunc_WithClosures = ByteString -> Ptr () -> IO (Bool, GError)
- drop_closures_PixbufSaveFunc :: PixbufSaveFunc -> PixbufSaveFunc_WithClosures
- dynamic_PixbufSaveFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufSaveFunc -> ByteString -> Ptr () -> m (Bool, GError)
- genClosure_PixbufSaveFunc :: MonadIO m => PixbufSaveFunc -> m (GClosure C_PixbufSaveFunc)
- mk_PixbufSaveFunc :: C_PixbufSaveFunc -> IO (FunPtr C_PixbufSaveFunc)
- noPixbufSaveFunc :: Maybe PixbufSaveFunc
- noPixbufSaveFunc_WithClosures :: Maybe PixbufSaveFunc_WithClosures
- wrap_PixbufSaveFunc :: Maybe (Ptr (FunPtr C_PixbufSaveFunc)) -> PixbufSaveFunc_WithClosures -> C_PixbufSaveFunc

# Signals

## PixbufDestroyNotify

type C_PixbufDestroyNotify = Ptr Word8 -> Ptr () -> IO () Source #

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

type PixbufDestroyNotify Source #

Arguments

= Ptr Word8 | `pixels`: The pixel array of the pixbuf that is being finalized.
-> IO () |

A function of this type is responsible for freeing the pixel array of a pixbuf.

The `pixbufNewFromData` function lets you pass in a pre-allocated pixel array so that a pixbuf can be created from it; in this case you will need to pass in a function of type `GdkPixbufDestroyNotify` so that the pixel data can be freed when the pixbuf is finalized.

type PixbufDestroyNotify_WithClosures Source #

Arguments

= Ptr Word8 | `pixels`: The pixel array of the pixbuf that is being finalized.
-> Ptr () | `data`: User closure data.
-> IO () |

A function of this type is responsible for freeing the pixel array of a pixbuf.

The `pixbufNewFromData` function lets you pass in a pre-allocated pixel array so that a pixbuf can be created from it; in this case you will need to pass in a function of type `GdkPixbufDestroyNotify` so that the pixel data can be freed when the pixbuf is finalized.

drop_closures_PixbufDestroyNotify :: PixbufDestroyNotify -> PixbufDestroyNotify_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PixbufDestroyNotify Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufDestroyNotify |
-> Ptr Word8 | `pixels`: The pixel array of the pixbuf that is being finalized.
-> Ptr () | `data`: User closure data.
-> m () |

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufDestroyNotify :: MonadIO m => PixbufDestroyNotify -> m (GClosure C_PixbufDestroyNotify) Source #

Wrap the callback into a `GClosure`.

mk_PixbufDestroyNotify :: C_PixbufDestroyNotify -> IO (FunPtr C_PixbufDestroyNotify) Source #

Generate a function pointer callable from C code, from a `C_PixbufDestroyNotify`.

noPixbufDestroyNotify :: Maybe PixbufDestroyNotify Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufDestroyNotify``.

noPixbufDestroyNotify_WithClosures :: Maybe PixbufDestroyNotify_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufDestroyNotify_WithClosures``.

wrap_PixbufDestroyNotify :: Maybe (Ptr (FunPtr C_PixbufDestroyNotify)) -> PixbufDestroyNotify_WithClosures -> C_PixbufDestroyNotify Source #

Wrap a `PixbufDestroyNotify` into a `C_PixbufDestroyNotify`.

## PixbufModuleFillInfoFunc

type C_PixbufModuleFillInfoFunc = Ptr PixbufFormat -> IO () Source #

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

type PixbufModuleFillInfoFunc Source #

Arguments

= PixbufFormat | `info`: a `PixbufFormat`.
-> IO () |

Defines the type of the function used to fill a `PixbufFormat` structure with information about a module.

Since: 2.2

dynamic_PixbufModuleFillInfoFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleFillInfoFunc |
-> PixbufFormat | `info`: a `PixbufFormat`.
-> m () |

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufModuleFillInfoFunc :: MonadIO m => PixbufModuleFillInfoFunc -> m (GClosure C_PixbufModuleFillInfoFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufModuleFillInfoFunc :: C_PixbufModuleFillInfoFunc -> IO (FunPtr C_PixbufModuleFillInfoFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleFillInfoFunc`.

noPixbufModuleFillInfoFunc :: Maybe PixbufModuleFillInfoFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleFillInfoFunc``.

wrap_PixbufModuleFillInfoFunc :: Maybe (Ptr (FunPtr C_PixbufModuleFillInfoFunc)) -> PixbufModuleFillInfoFunc -> C_PixbufModuleFillInfoFunc Source #

Wrap a `PixbufModuleFillInfoFunc` into a `C_PixbufModuleFillInfoFunc`.

## PixbufModuleFillVtableFunc

type C_PixbufModuleFillVtableFunc = Ptr PixbufModule -> IO () Source #

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

type PixbufModuleFillVtableFunc Source #

Arguments

= PixbufModule | `module`: a `PixbufModule`.
-> IO () |

Defines the type of the function used to set the vtable of a `PixbufModule` when it is loaded.

Since: 2.2

dynamic_PixbufModuleFillVtableFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleFillVtableFunc |
-> PixbufModule | `module`: a `PixbufModule`.
-> m () |

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufModuleFillVtableFunc :: MonadIO m => PixbufModuleFillVtableFunc -> m (GClosure C_PixbufModuleFillVtableFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufModuleFillVtableFunc :: C_PixbufModuleFillVtableFunc -> IO (FunPtr C_PixbufModuleFillVtableFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleFillVtableFunc`.

noPixbufModuleFillVtableFunc :: Maybe PixbufModuleFillVtableFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleFillVtableFunc``.

wrap_PixbufModuleFillVtableFunc :: Maybe (Ptr (FunPtr C_PixbufModuleFillVtableFunc)) -> PixbufModuleFillVtableFunc -> C_PixbufModuleFillVtableFunc Source #

Wrap a `PixbufModuleFillVtableFunc` into a `C_PixbufModuleFillVtableFunc`.

## PixbufModuleIncrementLoadFunc

type C_PixbufModuleIncrementLoadFunc = Ptr () -> Ptr Word8 -> Word32 -> Ptr (Ptr GError) -> IO CInt Source #

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

type PixbufModuleIncrementLoadFunc Source #

Arguments

= Ptr () | `context`: the state object created by [callback`gdkPixbuf`.PixbufModuleBeginLoadFunc]
-> ByteString | `buf`: the data to load
-> IO () | Returns: `TRUE` if the incremental load was successful (Can throw `GError`)

Incrementally loads a buffer into the image data.

dynamic_PixbufModuleIncrementLoadFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleIncrementLoadFunc |
-> Ptr () | `context`: the state object created by [callback`gdkPixbuf`.PixbufModuleBeginLoadFunc]
-> ByteString | `buf`: the data to load
-> m () | (Can throw `GError`)

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_PixbufModuleIncrementLoadFunc :: C_PixbufModuleIncrementLoadFunc -> IO (FunPtr C_PixbufModuleIncrementLoadFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleIncrementLoadFunc`.

noPixbufModuleIncrementLoadFunc :: Maybe PixbufModuleIncrementLoadFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleIncrementLoadFunc``.

## PixbufModuleLoadAnimationFunc

type C_PixbufModuleLoadAnimationFunc = Ptr () -> Ptr (Ptr GError) -> IO (Ptr PixbufAnimation) Source #

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

type PixbufModuleLoadAnimationFunc Source #

Arguments

= Ptr () | `f`: the file stream from which the image should be loaded
-> IO PixbufAnimation | Returns: a newly created `GdkPixbufAnimation` for the contents of the file (Can throw `GError`)

Loads a file from a standard C file stream into a new `GdkPixbufAnimation`.

In case of error, this function should return `NULL` and set the `error` argument.

dynamic_PixbufModuleLoadAnimationFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleLoadAnimationFunc |
-> Ptr () | `f`: the file stream from which the image should be loaded
-> m PixbufAnimation | Returns: a newly created `GdkPixbufAnimation` for the contents of the file (Can throw `GError`)

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_PixbufModuleLoadAnimationFunc :: C_PixbufModuleLoadAnimationFunc -> IO (FunPtr C_PixbufModuleLoadAnimationFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleLoadAnimationFunc`.

noPixbufModuleLoadAnimationFunc :: Maybe PixbufModuleLoadAnimationFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleLoadAnimationFunc``.

## PixbufModuleLoadFunc

type C_PixbufModuleLoadFunc = Ptr () -> Ptr (Ptr GError) -> IO (Ptr Pixbuf) Source #

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

type PixbufModuleLoadFunc Source #

Arguments

= Ptr () | `f`: the file stream from which the image should be loaded
-> IO Pixbuf | Returns: a newly created `GdkPixbuf` for the contents of the file (Can throw `GError`)

Loads a file from a standard C file stream into a new `GdkPixbuf`.

In case of error, this function should return `NULL` and set the `error` argument.

dynamic_PixbufModuleLoadFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleLoadFunc |
-> Ptr () | `f`: the file stream from which the image should be loaded
-> m Pixbuf | Returns: a newly created `GdkPixbuf` for the contents of the file (Can throw `GError`)

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_PixbufModuleLoadFunc :: C_PixbufModuleLoadFunc -> IO (FunPtr C_PixbufModuleLoadFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleLoadFunc`.

noPixbufModuleLoadFunc :: Maybe PixbufModuleLoadFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleLoadFunc``.

## PixbufModuleLoadXpmDataFunc

type C_PixbufModuleLoadXpmDataFunc = Ptr CString -> IO (Ptr Pixbuf) Source #

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

type PixbufModuleLoadXpmDataFunc Source #

Arguments

= [Text] | `data`: the XPM data
-> IO Pixbuf | Returns: a newly created `GdkPixbuf` for the XPM data

Loads XPM data into a new `GdkPixbuf`.

dynamic_PixbufModuleLoadXpmDataFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleLoadXpmDataFunc |
-> [Text] | `data`: the XPM data
-> m Pixbuf | Returns: a newly created `GdkPixbuf` for the XPM data

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufModuleLoadXpmDataFunc :: MonadIO m => PixbufModuleLoadXpmDataFunc -> m (GClosure C_PixbufModuleLoadXpmDataFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufModuleLoadXpmDataFunc :: C_PixbufModuleLoadXpmDataFunc -> IO (FunPtr C_PixbufModuleLoadXpmDataFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleLoadXpmDataFunc`.

noPixbufModuleLoadXpmDataFunc :: Maybe PixbufModuleLoadXpmDataFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleLoadXpmDataFunc``.

wrap_PixbufModuleLoadXpmDataFunc :: Maybe (Ptr (FunPtr C_PixbufModuleLoadXpmDataFunc)) -> PixbufModuleLoadXpmDataFunc -> C_PixbufModuleLoadXpmDataFunc Source #

Wrap a `PixbufModuleLoadXpmDataFunc` into a `C_PixbufModuleLoadXpmDataFunc`.

## PixbufModulePreparedFunc

type C_PixbufModulePreparedFunc = Ptr Pixbuf -> Ptr PixbufAnimation -> Ptr () -> IO () Source #

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

type PixbufModulePreparedFunc Source #

Arguments

= Pixbuf | `pixbuf`: the `Pixbuf` that is currently being loaded.
-> PixbufAnimation | `anim`: if an animation is being loaded, the `PixbufAnimation`, else `Nothing`.
-> IO () |

Defines the type of the function that gets called once the initial setup of `pixbuf` is done.

`PixbufLoader` uses a function of this type to emit the "<link linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" signal.

Since: 2.2

type PixbufModulePreparedFunc_WithClosures Source #

Arguments

= Pixbuf | `pixbuf`: the `Pixbuf` that is currently being loaded.
-> PixbufAnimation | `anim`: if an animation is being loaded, the `PixbufAnimation`, else `Nothing`.
-> Ptr () | `userData`: the loader.
-> IO () |

Defines the type of the function that gets called once the initial setup of `pixbuf` is done.

`PixbufLoader` uses a function of this type to emit the "<link linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" signal.

Since: 2.2

drop_closures_PixbufModulePreparedFunc :: PixbufModulePreparedFunc -> PixbufModulePreparedFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PixbufModulePreparedFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbufAnimation b) |
=> FunPtr C_PixbufModulePreparedFunc |
-> a | `pixbuf`: the `Pixbuf` that is currently being loaded.
-> b | `anim`: if an animation is being loaded, the `PixbufAnimation`, else `Nothing`.
-> Ptr () | `userData`: the loader.
-> m () |

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufModulePreparedFunc :: MonadIO m => PixbufModulePreparedFunc -> m (GClosure C_PixbufModulePreparedFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufModulePreparedFunc :: C_PixbufModulePreparedFunc -> IO (FunPtr C_PixbufModulePreparedFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModulePreparedFunc`.

noPixbufModulePreparedFunc :: Maybe PixbufModulePreparedFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModulePreparedFunc``.

noPixbufModulePreparedFunc_WithClosures :: Maybe PixbufModulePreparedFunc_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModulePreparedFunc_WithClosures``.

wrap_PixbufModulePreparedFunc :: Maybe (Ptr (FunPtr C_PixbufModulePreparedFunc)) -> PixbufModulePreparedFunc_WithClosures -> C_PixbufModulePreparedFunc Source #

Wrap a `PixbufModulePreparedFunc` into a `C_PixbufModulePreparedFunc`.

## PixbufModuleSaveFunc

type C_PixbufModuleSaveFunc = Ptr () -> Ptr Pixbuf -> Ptr CString -> Ptr CString -> Ptr (Ptr GError) -> IO CInt Source #

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

type PixbufModuleSaveFunc Source #

Arguments

= Ptr () | `f`: the file stream into which the image should be saved
-> Pixbuf | `pixbuf`: the image to save
-> Maybe [Text] | `paramKeys`: parameter keys to save
-> Maybe [Text] | `paramValues`: parameter values to save
-> IO () | Returns: `TRUE` on success; in case of failure, `FALSE` is returned and the `error` is set (Can throw `GError`)

Saves a `GdkPixbuf` into a standard C file stream.

The optional `param_keys` and `param_values` arrays contain the keys and values (in the same order) for attributes to be saved alongside the image data.

dynamic_PixbufModuleSaveFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbuf a) |
=> FunPtr C_PixbufModuleSaveFunc |
-> Ptr () | `f`: the file stream into which the image should be saved
-> a | `pixbuf`: the image to save
-> Maybe [Text] | `paramKeys`: parameter keys to save
-> Maybe [Text] | `paramValues`: parameter values to save
-> m () | (Can throw `GError`)

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_PixbufModuleSaveFunc :: C_PixbufModuleSaveFunc -> IO (FunPtr C_PixbufModuleSaveFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleSaveFunc`.

noPixbufModuleSaveFunc :: Maybe PixbufModuleSaveFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleSaveFunc``.

## PixbufModuleSaveOptionSupportedFunc

type C_PixbufModuleSaveOptionSupportedFunc = CString -> IO CInt Source #

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

type PixbufModuleSaveOptionSupportedFunc Source #

Arguments

= Text | `optionKey`: the option key to check
-> IO Bool | Returns: `TRUE` if the option is supported

Checks whether the given `option_key` is supported when saving.

dynamic_PixbufModuleSaveOptionSupportedFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleSaveOptionSupportedFunc |
-> Text | `optionKey`: the option key to check
-> m Bool | Returns: `TRUE` if the option is supported

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufModuleSaveOptionSupportedFunc :: MonadIO m => PixbufModuleSaveOptionSupportedFunc -> m (GClosure C_PixbufModuleSaveOptionSupportedFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufModuleSaveOptionSupportedFunc :: C_PixbufModuleSaveOptionSupportedFunc -> IO (FunPtr C_PixbufModuleSaveOptionSupportedFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleSaveOptionSupportedFunc`.

noPixbufModuleSaveOptionSupportedFunc :: Maybe PixbufModuleSaveOptionSupportedFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleSaveOptionSupportedFunc``.

wrap_PixbufModuleSaveOptionSupportedFunc :: Maybe (Ptr (FunPtr C_PixbufModuleSaveOptionSupportedFunc)) -> PixbufModuleSaveOptionSupportedFunc -> C_PixbufModuleSaveOptionSupportedFunc Source #

Wrap a `PixbufModuleSaveOptionSupportedFunc` into a `C_PixbufModuleSaveOptionSupportedFunc`.

## PixbufModuleSizeFunc

type C_PixbufModuleSizeFunc = Int32 -> Int32 -> Ptr () -> IO () Source #

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

type PixbufModuleSizeFunc Source #

Arguments

= Int32 | `width`: pointer to a location containing the current image width
-> Int32 | `height`: pointer to a location containing the current image height
-> IO () |

Defines the type of the function that gets called once the size of the loaded image is known.

The function is expected to set `width` and `height` to the desired size to which the image should be scaled. If a module has no efficient way to achieve the desired scaling during the loading of the image, it may either ignore the size request, or only approximate it - gdk-pixbuf will then perform the required scaling on the completely loaded image.

If the function sets `width` or `height` to zero, the module should interpret this as a hint that it will be closed soon and shouldn't allocate further resources. This convention is used to implement `pixbufGetFileInfo` efficiently.

Since: 2.2

type PixbufModuleSizeFunc_WithClosures Source #

Arguments

= Int32 | `width`: pointer to a location containing the current image width
-> Int32 | `height`: pointer to a location containing the current image height
-> Ptr () | `userData`: the loader.
-> IO () |

Defines the type of the function that gets called once the size of the loaded image is known.

The function is expected to set `width` and `height` to the desired size to which the image should be scaled. If a module has no efficient way to achieve the desired scaling during the loading of the image, it may either ignore the size request, or only approximate it - gdk-pixbuf will then perform the required scaling on the completely loaded image.

If the function sets `width` or `height` to zero, the module should interpret this as a hint that it will be closed soon and shouldn't allocate further resources. This convention is used to implement `pixbufGetFileInfo` efficiently.

Since: 2.2

drop_closures_PixbufModuleSizeFunc :: PixbufModuleSizeFunc -> PixbufModuleSizeFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PixbufModuleSizeFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleSizeFunc |
-> Int32 | `width`: pointer to a location containing the current image width
-> Int32 | `height`: pointer to a location containing the current image height
-> Ptr () | `userData`: the loader.
-> m () |

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufModuleSizeFunc :: MonadIO m => PixbufModuleSizeFunc -> m (GClosure C_PixbufModuleSizeFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufModuleSizeFunc :: C_PixbufModuleSizeFunc -> IO (FunPtr C_PixbufModuleSizeFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleSizeFunc`.

noPixbufModuleSizeFunc :: Maybe PixbufModuleSizeFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleSizeFunc``.

noPixbufModuleSizeFunc_WithClosures :: Maybe PixbufModuleSizeFunc_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleSizeFunc_WithClosures``.

wrap_PixbufModuleSizeFunc :: Maybe (Ptr (FunPtr C_PixbufModuleSizeFunc)) -> PixbufModuleSizeFunc_WithClosures -> C_PixbufModuleSizeFunc Source #

Wrap a `PixbufModuleSizeFunc` into a `C_PixbufModuleSizeFunc`.

## PixbufModuleStopLoadFunc

type C_PixbufModuleStopLoadFunc = Ptr () -> Ptr (Ptr GError) -> IO CInt Source #

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

type PixbufModuleStopLoadFunc Source #

Arguments

= Ptr () | `context`: the state object created by [callback`gdkPixbuf`.PixbufModuleBeginLoadFunc]
-> IO () | Returns: `TRUE` if the loading operation was successful (Can throw `GError`)

Finalizes the image loading state.

This function is called on success and error states.

dynamic_PixbufModuleStopLoadFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufModuleStopLoadFunc |
-> Ptr () | `context`: the state object created by [callback`gdkPixbuf`.PixbufModuleBeginLoadFunc]
-> m () | (Can throw `GError`)

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_PixbufModuleStopLoadFunc :: C_PixbufModuleStopLoadFunc -> IO (FunPtr C_PixbufModuleStopLoadFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleStopLoadFunc`.

noPixbufModuleStopLoadFunc :: Maybe PixbufModuleStopLoadFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleStopLoadFunc``.

## PixbufModuleUpdatedFunc

type C_PixbufModuleUpdatedFunc = Ptr Pixbuf -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr () -> IO () Source #

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

type PixbufModuleUpdatedFunc Source #

Arguments

= Pixbuf | `pixbuf`: the `Pixbuf` that is currently being loaded.
-> Int32 | `x`: the X origin of the updated area.
-> Int32 | `y`: the Y origin of the updated area.
-> Int32 | `width`: the width of the updated area.
-> Int32 | `height`: the height of the updated area.
-> IO () |

Defines the type of the function that gets called every time a region of `pixbuf` is updated.

`PixbufLoader` uses a function of this type to emit the "<link linkend="GdkPixbufLoader-area-updated">area_updated</link>" signal.

Since: 2.2

type PixbufModuleUpdatedFunc_WithClosures Source #

Arguments

= Pixbuf | `pixbuf`: the `Pixbuf` that is currently being loaded.
-> Int32 | `x`: the X origin of the updated area.
-> Int32 | `y`: the Y origin of the updated area.
-> Int32 | `width`: the width of the updated area.
-> Int32 | `height`: the height of the updated area.
-> Ptr () | `userData`: the loader.
-> IO () |

Defines the type of the function that gets called every time a region of `pixbuf` is updated.

`PixbufLoader` uses a function of this type to emit the "<link linkend="GdkPixbufLoader-area-updated">area_updated</link>" signal.

Since: 2.2

drop_closures_PixbufModuleUpdatedFunc :: PixbufModuleUpdatedFunc -> PixbufModuleUpdatedFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PixbufModuleUpdatedFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbuf a) |
=> FunPtr C_PixbufModuleUpdatedFunc |
-> a | `pixbuf`: the `Pixbuf` that is currently being loaded.
-> Int32 | `x`: the X origin of the updated area.
-> Int32 | `y`: the Y origin of the updated area.
-> Int32 | `width`: the width of the updated area.
-> Int32 | `height`: the height of the updated area.
-> Ptr () | `userData`: the loader.
-> m () |

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufModuleUpdatedFunc :: MonadIO m => PixbufModuleUpdatedFunc -> m (GClosure C_PixbufModuleUpdatedFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufModuleUpdatedFunc :: C_PixbufModuleUpdatedFunc -> IO (FunPtr C_PixbufModuleUpdatedFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufModuleUpdatedFunc`.

noPixbufModuleUpdatedFunc :: Maybe PixbufModuleUpdatedFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleUpdatedFunc``.

noPixbufModuleUpdatedFunc_WithClosures :: Maybe PixbufModuleUpdatedFunc_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufModuleUpdatedFunc_WithClosures``.

wrap_PixbufModuleUpdatedFunc :: Maybe (Ptr (FunPtr C_PixbufModuleUpdatedFunc)) -> PixbufModuleUpdatedFunc_WithClosures -> C_PixbufModuleUpdatedFunc Source #

Wrap a `PixbufModuleUpdatedFunc` into a `C_PixbufModuleUpdatedFunc`.

## PixbufSaveFunc

type C_PixbufSaveFunc = Ptr Word8 -> CSize -> Ptr (Ptr GError) -> Ptr () -> IO CInt Source #

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

type PixbufSaveFunc Source #

Arguments

= ByteString | `buf`: bytes to be written.
-> IO (Bool, GError) | Returns: `TRUE` if successful, `FALSE` otherwise

Save functions used by `Pixbuf`.`save_to_callback`().

This function is called once for each block of bytes that is "written" by `gdk_pixbuf_save_to_callback()`.

If successful it should return `TRUE`; if an error occurs it should set `error` and return `FALSE`, in which case `gdk_pixbuf_save_to_callback()` will fail with the same error.

Since: 2.4

type PixbufSaveFunc_WithClosures Source #

Arguments

= ByteString | `buf`: bytes to be written.
-> Ptr () | `data`: user data passed to `gdk_pixbuf_save_to_callback()`.
-> IO (Bool, GError) | Returns: `TRUE` if successful, `FALSE` otherwise

Save functions used by `Pixbuf`.`save_to_callback`().

This function is called once for each block of bytes that is "written" by `gdk_pixbuf_save_to_callback()`.

If successful it should return `TRUE`; if an error occurs it should set `error` and return `FALSE`, in which case `gdk_pixbuf_save_to_callback()` will fail with the same error.

Since: 2.4

drop_closures_PixbufSaveFunc :: PixbufSaveFunc -> PixbufSaveFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PixbufSaveFunc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> FunPtr C_PixbufSaveFunc |
-> ByteString | `buf`: bytes to be written.
-> Ptr () | `data`: user data passed to `gdk_pixbuf_save_to_callback()`.
-> m (Bool, GError) | Returns: `TRUE` if successful, `FALSE` otherwise

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_PixbufSaveFunc :: MonadIO m => PixbufSaveFunc -> m (GClosure C_PixbufSaveFunc) Source #

Wrap the callback into a `GClosure`.

mk_PixbufSaveFunc :: C_PixbufSaveFunc -> IO (FunPtr C_PixbufSaveFunc) Source #

Generate a function pointer callable from C code, from a `C_PixbufSaveFunc`.

noPixbufSaveFunc :: Maybe PixbufSaveFunc Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufSaveFunc``.

noPixbufSaveFunc_WithClosures :: Maybe PixbufSaveFunc_WithClosures Source #

A convenience synonym for ``Nothing` :: `Maybe` `PixbufSaveFunc_WithClosures``.

wrap_PixbufSaveFunc :: Maybe (Ptr (FunPtr C_PixbufSaveFunc)) -> PixbufSaveFunc_WithClosures -> C_PixbufSaveFunc Source #

Wrap a `PixbufSaveFunc` into a `C_PixbufSaveFunc`.