gi-gdkpixbuf-2.0.22: GdkPixbuf bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.GdkPixbuf.Callbacks

Contents

Description

 
Synopsis

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

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.

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

Generate a function pointer callable from C code, from 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

buf: bytes to be written.

-> IO (Bool, GError)

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

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

buf: bytes to be written.

-> Ptr ()

data: user data passed to gdk_pixbuf_save_to_callback().

-> IO (Bool, GError)

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

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

buf: bytes to be written.

-> Ptr ()

data: user data passed to gdk_pixbuf_save_to_callback().

-> m (Bool, GError)

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

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

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

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