gi-gdkpixbuf-2.0.28: GdkPixbuf bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GdkPixbuf.Callbacks

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

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

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

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

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 #

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

PixbufModuleIsSaveOptionSupportedFieldCallback

type C_PixbufModuleIsSaveOptionSupportedFieldCallback = CString -> IO CInt Source #

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

type PixbufModuleIsSaveOptionSupportedFieldCallback = Text -> IO Bool Source #

No description available in the introspection data.

dynamic_PixbufModuleIsSaveOptionSupportedFieldCallback :: (HasCallStack, MonadIO m) => FunPtr C_PixbufModuleIsSaveOptionSupportedFieldCallback -> Text -> m Bool Source #

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

PixbufModuleLoadIncrementFieldCallback

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

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

type PixbufModuleLoadIncrementFieldCallback Source #

Arguments

 = Ptr () 
-> Word8 
-> Word32 
-> IO ()

(Can throw GError)

No description available in the introspection data.

dynamic_PixbufModuleLoadIncrementFieldCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_PixbufModuleLoadIncrementFieldCallback 
-> Ptr () 
-> Word8 
-> Word32 
-> m ()

(Can throw GError)

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

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

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.

PixbufModuleSaveFieldCallback

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

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

type PixbufModuleSaveFieldCallback Source #

Arguments

 = Ptr () 
-> Pixbuf 
-> Text 
-> Text 
-> IO ()

(Can throw GError)

No description available in the introspection data.

dynamic_PixbufModuleSaveFieldCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbuf a) 
=> FunPtr C_PixbufModuleSaveFieldCallback 
-> Ptr () 
-> a 
-> Text 
-> Text 
-> m ()

(Can throw GError)

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

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

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.

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

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

PixbufModuleStopLoadFieldCallback

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

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

type PixbufModuleStopLoadFieldCallback Source #

Arguments

 = Ptr () 
-> IO ()

(Can throw GError)

No description available in the introspection data.

dynamic_PixbufModuleStopLoadFieldCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_PixbufModuleStopLoadFieldCallback 
-> Ptr () 
-> m ()

(Can throw GError)

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

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

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.

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

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

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