| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GdkPixbuf.Callbacks
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 :: PixbufDestroyNotify -> IO Closure
- 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_PixbufSaveFunc = Ptr Word8 -> Word64 -> 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 :: PixbufSaveFunc -> IO Closure
- 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 #
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 PixbufDestroyNotify so that the pixel data can be freed
when the pixbuf is finalized.
type PixbufDestroyNotify_WithClosures Source #
Arguments
| = Ptr Word8 |
|
| -> Ptr () |
|
| -> 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 PixbufDestroyNotify 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 |
|
| -> Ptr () |
|
| -> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_PixbufDestroyNotify :: PixbufDestroyNotify -> IO Closure Source #
Wrap the callback into a Closure.
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.
PixbufSaveFunc
type C_PixbufSaveFunc = Ptr Word8 -> Word64 -> Ptr (Ptr GError) -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type PixbufSaveFunc Source #
Arguments
| = ByteString |
|
| -> IO (Bool, GError) | Returns: |
Specifies the type of the function passed to
gdk_pixbuf_save_to_callback(). It 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 |
|
| -> Ptr () |
|
| -> IO (Bool, GError) | Returns: |
Specifies the type of the function passed to
gdk_pixbuf_save_to_callback(). It 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 |
|
| -> Ptr () |
|
| -> m (Bool, GError) | Returns: |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_PixbufSaveFunc :: PixbufSaveFunc -> IO Closure Source #
Wrap the callback into a Closure.
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.