-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | GdkPixbuf bindings
--   
--   Bindings for GdkPixbuf, autogenerated by haskell-gi.
@package gi-gdkpixbuf
@version 2.0.24


module GI.GdkPixbuf.Callbacks

-- | Type for the callback on the (unwrapped) C side.
type C_PixbufDestroyNotify = Ptr Word8 -> Ptr () -> IO ()

-- | A function of this type is responsible for freeing the pixel array of
--   a pixbuf. The <a>pixbufNewFromData</a> 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
--   <a>PixbufDestroyNotify</a> so that the pixel data can be freed when
--   the pixbuf is finalized.
type PixbufDestroyNotify = 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 <a>pixbufNewFromData</a> 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
--   <a>PixbufDestroyNotify</a> so that the pixel data can be freed when
--   the pixbuf is finalized.
type PixbufDestroyNotify_WithClosures = Ptr Word8 " /@pixels@/: The pixel array of the pixbuf that is being finalized." -> Ptr () " /@data@/: User closure data." -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_PixbufDestroyNotify :: PixbufDestroyNotify -> PixbufDestroyNotify_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_PixbufDestroyNotify :: (HasCallStack, MonadIO m) => FunPtr C_PixbufDestroyNotify -> Ptr Word8 -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_PixbufDestroyNotify :: MonadIO m => PixbufDestroyNotify -> m (GClosure C_PixbufDestroyNotify)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PixbufDestroyNotify</a>.
mk_PixbufDestroyNotify :: C_PixbufDestroyNotify -> IO (FunPtr C_PixbufDestroyNotify)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufDestroyNotify</a></tt>.
noPixbufDestroyNotify :: Maybe PixbufDestroyNotify

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufDestroyNotify_WithClosures</a></tt>.
noPixbufDestroyNotify_WithClosures :: Maybe PixbufDestroyNotify_WithClosures

-- | Wrap a <a>PixbufDestroyNotify</a> into a <a>C_PixbufDestroyNotify</a>.
wrap_PixbufDestroyNotify :: Maybe (Ptr (FunPtr C_PixbufDestroyNotify)) -> PixbufDestroyNotify_WithClosures -> C_PixbufDestroyNotify

-- | Type for the callback on the (unwrapped) C side.
type C_PixbufSaveFunc = Ptr Word8 -> Word64 -> Ptr (Ptr GError) -> Ptr () -> IO CInt

-- | Specifies the type of the function passed to
--   <tt><i>gdk_pixbuf_save_to_callback()</i></tt>. It is called once for
--   each block of bytes that is "written" by
--   <tt><i>gdk_pixbuf_save_to_callback()</i></tt>. If successful it should
--   return <a>True</a>. If an error occurs it should set
--   <i><tt>error</tt></i> and return <a>False</a>, in which case
--   <tt><i>gdk_pixbuf_save_to_callback()</i></tt> will fail with the same
--   error.
--   
--   <i>Since: 2.4</i>
type PixbufSaveFunc = ByteString " /@buf@/: bytes to be written." -> IO ((Bool, GError)) " __Returns:__ 'P.True' if successful, 'P.False' (with /@error@/ set) if failed."

-- | Specifies the type of the function passed to
--   <tt><i>gdk_pixbuf_save_to_callback()</i></tt>. It is called once for
--   each block of bytes that is "written" by
--   <tt><i>gdk_pixbuf_save_to_callback()</i></tt>. If successful it should
--   return <a>True</a>. If an error occurs it should set
--   <i><tt>error</tt></i> and return <a>False</a>, in which case
--   <tt><i>gdk_pixbuf_save_to_callback()</i></tt> will fail with the same
--   error.
--   
--   <i>Since: 2.4</i>
type PixbufSaveFunc_WithClosures = ByteString " /@buf@/: bytes to be written." -> Ptr () " /@data@/: user data passed to @/gdk_pixbuf_save_to_callback()/@." -> IO ((Bool, GError)) " __Returns:__ 'P.True' if successful, 'P.False' (with /@error@/ set) if failed."

-- | A simple wrapper that ignores the closure arguments.
drop_closures_PixbufSaveFunc :: PixbufSaveFunc -> PixbufSaveFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_PixbufSaveFunc :: (HasCallStack, MonadIO m) => FunPtr C_PixbufSaveFunc -> ByteString -> Ptr () -> m (Bool, GError)

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_PixbufSaveFunc :: MonadIO m => PixbufSaveFunc -> m (GClosure C_PixbufSaveFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PixbufSaveFunc</a>.
mk_PixbufSaveFunc :: C_PixbufSaveFunc -> IO (FunPtr C_PixbufSaveFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufSaveFunc</a></tt>.
noPixbufSaveFunc :: Maybe PixbufSaveFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufSaveFunc_WithClosures</a></tt>.
noPixbufSaveFunc_WithClosures :: Maybe PixbufSaveFunc_WithClosures

-- | Wrap a <a>PixbufSaveFunc</a> into a <a>C_PixbufSaveFunc</a>.
wrap_PixbufSaveFunc :: Maybe (Ptr (FunPtr C_PixbufSaveFunc)) -> PixbufSaveFunc_WithClosures -> C_PixbufSaveFunc


-- | Build time configuration used during code generation.
module GI.GdkPixbuf.Config

-- | Overrides used when generating these bindings.
overrides :: Text


module GI.GdkPixbuf.Constants

-- | Contains the full version of the gdk-pixbuf header as a string. This
--   is the version being compiled against; contrast with
--   <tt><i>gdk_pixbuf_version</i></tt>.
pattern PIXBUF_VERSION :: Text

-- | Minor version of gdk-pixbuf library, that is the "8" in "0.8.2" for
--   example.
pattern PIXBUF_MINOR :: Int32

-- | Micro version of gdk-pixbuf library, that is the "2" in "0.8.2" for
--   example.
pattern PIXBUF_MICRO :: Int32

-- | Major version of gdk-pixbuf library, that is the "0" in "0.8.2" for
--   example.
pattern PIXBUF_MAJOR :: Int32

-- | <i>No description available in the introspection data.</i>
pattern PIXBUF_FEATURES_H :: Int32


module GI.GdkPixbuf.Enums

-- | This enumeration defines the color spaces that are supported by the
--   gdk-pixbuf library. Currently only RGB is supported.
data Colorspace

-- | Indicates a red/green/blue additive color space.
ColorspaceRgb :: Colorspace

-- | Catch-all for unknown values
AnotherColorspace :: Int -> Colorspace

-- | This enumeration describes the different interpolation modes that can
--   be used with the scaling functions. <i><tt>gDKINTERPNEAREST</tt></i>
--   is the fastest scaling method, but has horrible quality when scaling
--   down. <i><tt>gDKINTERPBILINEAR</tt></i> is the best choice if you
--   aren't sure what to choose, it has a good speed/quality balance.
--   
--   <ul>
--   <li>*Note**: Cubic filtering is missing from the list; hyperbolic
--   interpolation is just as fast and results in higher quality.</li>
--   </ul>
data InterpType

-- | Nearest neighbor sampling; this is the fastest and lowest quality
--   mode. Quality is normally unacceptable when scaling down, but may be
--   OK when scaling up.
InterpTypeNearest :: InterpType

-- | This is an accurate simulation of the PostScript image operator
--   without any interpolation enabled. Each pixel is rendered as a tiny
--   parallelogram of solid color, the edges of which are implemented with
--   antialiasing. It resembles nearest neighbor for enlargement, and
--   bilinear for reduction.
InterpTypeTiles :: InterpType

-- | Best quality/speed balance; use this mode by default. Bilinear
--   interpolation. For enlargement, it is equivalent to point-sampling the
--   ideal bilinear-interpolated image. For reduction, it is equivalent to
--   laying down small tiles and integrating over the coverage area.
InterpTypeBilinear :: InterpType

-- | This is the slowest and highest quality reconstruction function. It is
--   derived from the hyperbolic filters in Wolberg's "Digital Image
--   Warping", and is formally defined as the hyperbolic-filter sampling
--   the ideal hyperbolic-filter interpolated image (the filter is designed
--   to be idempotent for 1:1 pixel mapping). **Deprecated**: this
--   interpolation filter is deprecated, as in reality it has a lower
--   quality than the <i><tt>gDKINTERPBILINEAR</tt></i> filter (Since:
--   2.38)
InterpTypeHyper :: InterpType

-- | Catch-all for unknown values
AnotherInterpType :: Int -> InterpType

-- | These values can be passed to
--   <tt><i>gdk_pixbuf_xlib_render_to_drawable_alpha()</i></tt> to control
--   how the alpha channel of an image should be handled. This function can
--   create a bilevel clipping mask (black and white) and use it while
--   painting the image. In the future, when the X Window System gets an
--   alpha channel extension, it will be possible to do full alpha
--   compositing onto arbitrary drawables. For now both cases fall back to
--   a bilevel clipping mask.
data PixbufAlphaMode

-- | A bilevel clipping mask (black and white) will be created and used to
--   draw the image. Pixels below 0.5 opacity will be considered fully
--   transparent, and all others will be considered fully opaque.
PixbufAlphaModeBilevel :: PixbufAlphaMode

-- | For now falls back to <tt><i>GDK_PIXBUF_ALPHA_BILEVEL</i></tt>. In the
--   future it will do full alpha compositing.
PixbufAlphaModeFull :: PixbufAlphaMode

-- | Catch-all for unknown values
AnotherPixbufAlphaMode :: Int -> PixbufAlphaMode

-- | An error code in the <tt><i>GDK_PIXBUF_ERROR</i></tt> domain. Many
--   gdk-pixbuf operations can cause errors in this domain, or in the
--   <tt><i>G_FILE_ERROR</i></tt> domain.
data PixbufError

-- | An image file was broken somehow.
PixbufErrorCorruptImage :: PixbufError

-- | Not enough memory.
PixbufErrorInsufficientMemory :: PixbufError

-- | A bad option was passed to a pixbuf save module.
PixbufErrorBadOption :: PixbufError

-- | Unknown image type.
PixbufErrorUnknownType :: PixbufError

-- | Don't know how to perform the given operation on the type of image at
--   hand.
PixbufErrorUnsupportedOperation :: PixbufError

-- | Generic failure code, something went wrong.
PixbufErrorFailed :: PixbufError

-- | Only part of the animation was loaded.
PixbufErrorIncompleteAnimation :: PixbufError

-- | Catch-all for unknown values
AnotherPixbufError :: Int -> PixbufError

-- | Catch exceptions of type <a>PixbufError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchPixbufError :: IO a -> (PixbufError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>PixbufError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
handlePixbufError :: (PixbufError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | The possible rotations which can be passed to
--   <a>pixbufRotateSimple</a>. To make them easier to use, their numerical
--   values are the actual degrees.
data PixbufRotation

-- | No rotation.
PixbufRotationNone :: PixbufRotation

-- | Rotate by 90 degrees.
PixbufRotationCounterclockwise :: PixbufRotation

-- | Rotate by 180 degrees.
PixbufRotationUpsidedown :: PixbufRotation

-- | Rotate by 270 degrees.
PixbufRotationClockwise :: PixbufRotation

-- | Catch-all for unknown values
AnotherPixbufRotation :: Int -> PixbufRotation
instance GHC.Classes.Eq GI.GdkPixbuf.Enums.Colorspace
instance GHC.Show.Show GI.GdkPixbuf.Enums.Colorspace
instance GHC.Classes.Eq GI.GdkPixbuf.Enums.InterpType
instance GHC.Show.Show GI.GdkPixbuf.Enums.InterpType
instance GHC.Classes.Eq GI.GdkPixbuf.Enums.PixbufAlphaMode
instance GHC.Show.Show GI.GdkPixbuf.Enums.PixbufAlphaMode
instance GHC.Classes.Eq GI.GdkPixbuf.Enums.PixbufError
instance GHC.Show.Show GI.GdkPixbuf.Enums.PixbufError
instance GHC.Classes.Eq GI.GdkPixbuf.Enums.PixbufRotation
instance GHC.Show.Show GI.GdkPixbuf.Enums.PixbufRotation
instance GHC.Enum.Enum GI.GdkPixbuf.Enums.Colorspace
instance GHC.Classes.Ord GI.GdkPixbuf.Enums.Colorspace
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Enums.Colorspace
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Enums.Colorspace
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GdkPixbuf.Enums.Colorspace
instance GHC.Enum.Enum GI.GdkPixbuf.Enums.InterpType
instance GHC.Classes.Ord GI.GdkPixbuf.Enums.InterpType
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Enums.InterpType
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Enums.InterpType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GdkPixbuf.Enums.InterpType
instance GHC.Enum.Enum GI.GdkPixbuf.Enums.PixbufAlphaMode
instance GHC.Classes.Ord GI.GdkPixbuf.Enums.PixbufAlphaMode
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Enums.PixbufAlphaMode
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Enums.PixbufAlphaMode
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GdkPixbuf.Enums.PixbufAlphaMode
instance GHC.Enum.Enum GI.GdkPixbuf.Enums.PixbufError
instance GHC.Classes.Ord GI.GdkPixbuf.Enums.PixbufError
instance Data.GI.Base.GError.GErrorClass GI.GdkPixbuf.Enums.PixbufError
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Enums.PixbufError
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Enums.PixbufError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GdkPixbuf.Enums.PixbufError
instance GHC.Enum.Enum GI.GdkPixbuf.Enums.PixbufRotation
instance GHC.Classes.Ord GI.GdkPixbuf.Enums.PixbufRotation
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Enums.PixbufRotation
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Enums.PixbufRotation
instance Data.GI.Base.BasicTypes.BoxedEnum GI.GdkPixbuf.Enums.PixbufRotation


-- | An opaque struct representing an animation.
module GI.GdkPixbuf.Objects.PixbufAnimation

-- | Memory-managed wrapper type.
newtype PixbufAnimation
PixbufAnimation :: ManagedPtr PixbufAnimation -> PixbufAnimation

-- | Type class for types which can be safely cast to
--   <a>PixbufAnimation</a>, for instance with <a>toPixbufAnimation</a>.
class (GObject o, IsDescendantOf PixbufAnimation o) => IsPixbufAnimation o

-- | Cast to <a>PixbufAnimation</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toPixbufAnimation :: (MonadIO m, IsPixbufAnimation o) => o -> m PixbufAnimation

-- | Queries the height of the bounding box of a pixbuf animation.
pixbufAnimationGetHeight :: (HasCallStack, MonadIO m, IsPixbufAnimation a) => a -> m Int32

-- | Get an iterator for displaying an animation. The iterator provides the
--   frames that should be displayed at a given time. It should be freed
--   after use with <a>objectUnref</a>.
--   
--   <i><tt>startTime</tt></i> would normally come from
--   <a>getCurrentTime</a>, and marks the beginning of animation playback.
--   After creating an iterator, you should immediately display the pixbuf
--   returned by <a>pixbufAnimationIterGetPixbuf</a>. Then, you should
--   install a timeout (with <tt><i>g_timeout_add()</i></tt>) or by some
--   other mechanism ensure that you'll update the image after
--   <a>pixbufAnimationIterGetDelayTime</a> milliseconds. Each time the
--   image is updated, you should reinstall the timeout with the new,
--   possibly-changed delay time.
--   
--   As a shortcut, if <i><tt>startTime</tt></i> is <a>Nothing</a>, the
--   result of <a>getCurrentTime</a> will be used automatically.
--   
--   To update the image (i.e. possibly change the result of
--   <a>pixbufAnimationIterGetPixbuf</a> to a new frame of the animation),
--   call <a>pixbufAnimationIterAdvance</a>.
--   
--   If you're using <a>PixbufLoader</a>, in addition to updating the image
--   after the delay time, you should also update it whenever you receive
--   the area_updated signal and
--   <a>pixbufAnimationIterOnCurrentlyLoadingFrame</a> returns <a>True</a>.
--   In this case, the frame currently being fed into the loader has
--   received new data, so needs to be refreshed. The delay time for a
--   frame may also be modified after an area_updated signal, for example
--   if the delay time for a frame is encoded in the data after the frame
--   itself. So your timeout should be reinstalled after any area_updated
--   signal.
--   
--   A delay time of -1 is possible, indicating "infinite."
pixbufAnimationGetIter :: (HasCallStack, MonadIO m, IsPixbufAnimation a) => a -> Maybe TimeVal -> m PixbufAnimationIter

-- | If an animation is really just a plain image (has only one frame),
--   this function returns that image. If the animation is an animation,
--   this function returns a reasonable thing to display as a static
--   unanimated image, which might be the first frame, or something more
--   sophisticated. If an animation hasn't loaded any frames yet, this
--   function will return <a>Nothing</a>.
pixbufAnimationGetStaticImage :: (HasCallStack, MonadIO m, IsPixbufAnimation a) => a -> m Pixbuf

-- | Queries the width of the bounding box of a pixbuf animation.
pixbufAnimationGetWidth :: (HasCallStack, MonadIO m, IsPixbufAnimation a) => a -> m Int32

-- | If you load a file with <a>pixbufAnimationNewFromFile</a> and it turns
--   out to be a plain, unanimated image, then this function will return
--   <a>True</a>. Use <a>pixbufAnimationGetStaticImage</a> to retrieve the
--   image.
pixbufAnimationIsStaticImage :: (HasCallStack, MonadIO m, IsPixbufAnimation a) => a -> m Bool

-- | Creates a new animation by loading it from a file. The file format is
--   detected automatically. If the file's format does not support
--   multi-frame images, then an animation with a single frame will be
--   created. Possible errors are in the <tt><i>GDK_PIXBUF_ERROR</i></tt>
--   and <tt><i>G_FILE_ERROR</i></tt> domains.
pixbufAnimationNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m PixbufAnimation

-- | Creates a new pixbuf animation by loading an image from an resource.
--   
--   The file format is detected automatically. If <a>Nothing</a> is
--   returned, then <i><tt>error</tt></i> will be set.
--   
--   <i>Since: 2.28</i>
pixbufAnimationNewFromResource :: (HasCallStack, MonadIO m) => Text -> m PixbufAnimation

-- | Creates a new animation by loading it from an input stream.
--   
--   The file format is detected automatically. If <a>Nothing</a> is
--   returned, then <i><tt>error</tt></i> will be set. The
--   <i><tt>cancellable</tt></i> can be used to abort the operation from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. Other possible errors
--   are in the <tt><i>GDK_PIXBUF_ERROR</i></tt> and
--   <tt><i>G_IO_ERROR</i></tt> domains.
--   
--   The stream is not closed.
--   
--   <i>Since: 2.28</i>
pixbufAnimationNewFromStream :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe b -> m PixbufAnimation

-- | Creates a new animation by asynchronously loading an image from an
--   input stream.
--   
--   For more details see <a>pixbufNewFromStream</a>, which is the
--   synchronous version of this function.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called in the main thread. You can then call
--   <a>pixbufAnimationNewFromStreamFinish</a> to get the result of the
--   operation.
--   
--   <i>Since: 2.28</i>
pixbufAnimationNewFromStreamAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous pixbuf animation creation operation started
--   with <a>pixbufAnimationNewFromStreamAsync</a>.
--   
--   <i>Since: 2.28</i>
pixbufAnimationNewFromStreamFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m PixbufAnimation
instance GHC.Classes.Eq GI.GdkPixbuf.Objects.PixbufAnimation.PixbufAnimation
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.GdkPixbuf.Objects.PixbufAnimation.PixbufAnimation o) => GI.GdkPixbuf.Objects.PixbufAnimation.IsPixbufAnimation o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GdkPixbuf.Objects.PixbufAnimation.PixbufAnimation
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Objects.PixbufAnimation.PixbufAnimation
instance Data.GI.Base.BasicTypes.GObject GI.GdkPixbuf.Objects.PixbufAnimation.PixbufAnimation
instance Data.GI.Base.GValue.IsGValue GI.GdkPixbuf.Objects.PixbufAnimation.PixbufAnimation
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Objects.PixbufAnimation.PixbufAnimation


-- | An opaque struct representing an iterator which points to a certain
--   position in an animation.
module GI.GdkPixbuf.Objects.PixbufAnimationIter

-- | Memory-managed wrapper type.
newtype PixbufAnimationIter
PixbufAnimationIter :: ManagedPtr PixbufAnimationIter -> PixbufAnimationIter

-- | Type class for types which can be safely cast to
--   <a>PixbufAnimationIter</a>, for instance with
--   <a>toPixbufAnimationIter</a>.
class (GObject o, IsDescendantOf PixbufAnimationIter o) => IsPixbufAnimationIter o

-- | Cast to <a>PixbufAnimationIter</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toPixbufAnimationIter :: (MonadIO m, IsPixbufAnimationIter o) => o -> m PixbufAnimationIter

-- | Possibly advances an animation to a new frame. Chooses the frame based
--   on the start time passed to <a>pixbufAnimationGetIter</a>.
--   
--   <i><tt>currentTime</tt></i> would normally come from
--   <a>getCurrentTime</a>, and must be greater than or equal to the time
--   passed to <a>pixbufAnimationGetIter</a>, and must increase or remain
--   unchanged each time <a>pixbufAnimationIterGetPixbuf</a> is called.
--   That is, you can't go backward in time; animations only play forward.
--   
--   As a shortcut, pass <a>Nothing</a> for the current time and
--   <a>getCurrentTime</a> will be invoked on your behalf. So you only need
--   to explicitly pass <i><tt>currentTime</tt></i> if you're doing
--   something odd like playing the animation at double speed.
--   
--   If this function returns <a>False</a>, there's no need to update the
--   animation display, assuming the display had been rendered prior to
--   advancing; if <a>True</a>, you need to call
--   <a>pixbufAnimationIterGetPixbuf</a> and update the display with the
--   new pixbuf.
pixbufAnimationIterAdvance :: (HasCallStack, MonadIO m, IsPixbufAnimationIter a) => a -> Maybe TimeVal -> m Bool

-- | Gets the number of milliseconds the current pixbuf should be
--   displayed, or -1 if the current pixbuf should be displayed forever.
--   <tt><i>g_timeout_add()</i></tt> conveniently takes a timeout in
--   milliseconds, so you can use a timeout to schedule the next update.
--   
--   Note that some formats, like GIF, might clamp the timeout values in
--   the image file to avoid updates that are just too quick. The minimum
--   timeout for GIF images is currently 20 milliseconds.
pixbufAnimationIterGetDelayTime :: (HasCallStack, MonadIO m, IsPixbufAnimationIter a) => a -> m Int32

-- | Gets the current pixbuf which should be displayed; the pixbuf might
--   not be the same size as the animation itself
--   (<a>pixbufAnimationGetWidth</a>, <a>pixbufAnimationGetHeight</a>).
--   This pixbuf should be displayed for
--   <a>pixbufAnimationIterGetDelayTime</a> milliseconds. The caller of
--   this function does not own a reference to the returned pixbuf; the
--   returned pixbuf will become invalid when the iterator advances to the
--   next frame, which may happen anytime you call
--   <a>pixbufAnimationIterAdvance</a>. Copy the pixbuf to keep it (don't
--   just add a reference), as it may get recycled as you advance the
--   iterator.
pixbufAnimationIterGetPixbuf :: (HasCallStack, MonadIO m, IsPixbufAnimationIter a) => a -> m Pixbuf

-- | Used to determine how to respond to the area_updated signal on
--   <a>PixbufLoader</a> when loading an animation. area_updated is emitted
--   for an area of the frame currently streaming in to the loader. So if
--   you're on the currently loading frame, you need to redraw the screen
--   for the updated area.
pixbufAnimationIterOnCurrentlyLoadingFrame :: (HasCallStack, MonadIO m, IsPixbufAnimationIter a) => a -> m Bool
instance GHC.Classes.Eq GI.GdkPixbuf.Objects.PixbufAnimationIter.PixbufAnimationIter
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.GdkPixbuf.Objects.PixbufAnimationIter.PixbufAnimationIter o) => GI.GdkPixbuf.Objects.PixbufAnimationIter.IsPixbufAnimationIter o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GdkPixbuf.Objects.PixbufAnimationIter.PixbufAnimationIter
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Objects.PixbufAnimationIter.PixbufAnimationIter
instance Data.GI.Base.BasicTypes.GObject GI.GdkPixbuf.Objects.PixbufAnimationIter.PixbufAnimationIter
instance Data.GI.Base.GValue.IsGValue GI.GdkPixbuf.Objects.PixbufAnimationIter.PixbufAnimationIter
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Objects.PixbufAnimationIter.PixbufAnimationIter


-- | An opaque struct representing a simple animation.
module GI.GdkPixbuf.Objects.PixbufSimpleAnim

-- | Memory-managed wrapper type.
newtype PixbufSimpleAnim
PixbufSimpleAnim :: ManagedPtr PixbufSimpleAnim -> PixbufSimpleAnim

-- | Type class for types which can be safely cast to
--   <a>PixbufSimpleAnim</a>, for instance with <a>toPixbufSimpleAnim</a>.
class (GObject o, IsDescendantOf PixbufSimpleAnim o) => IsPixbufSimpleAnim o

-- | Cast to <a>PixbufSimpleAnim</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toPixbufSimpleAnim :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m PixbufSimpleAnim

-- | Adds a new frame to <i><tt>animation</tt></i>. The
--   <i><tt>pixbuf</tt></i> must have the dimensions specified when the
--   animation was constructed.
--   
--   <i>Since: 2.8</i>
pixbufSimpleAnimAddFrame :: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a, IsPixbuf b) => a -> b -> m ()

-- | Gets whether <i><tt>animation</tt></i> should loop indefinitely when
--   it reaches the end.
--   
--   <i>Since: 2.18</i>
pixbufSimpleAnimGetLoop :: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a) => a -> m Bool

-- | Creates a new, empty animation.
--   
--   <i>Since: 2.8</i>
pixbufSimpleAnimNew :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> Float -> m PixbufSimpleAnim

-- | Sets whether <i><tt>animation</tt></i> should loop indefinitely when
--   it reaches the end.
--   
--   <i>Since: 2.18</i>
pixbufSimpleAnimSetLoop :: (HasCallStack, MonadIO m, IsPixbufSimpleAnim a) => a -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>loop</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructPixbufSimpleAnimLoop :: (IsPixbufSimpleAnim o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>loop</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbufSimpleAnim #loop
--   </pre>
getPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> m Bool

-- | Set the value of the “<tt>loop</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> pixbufSimpleAnim [ #loop <a>:=</a> value ]
--   </pre>
setPixbufSimpleAnimLoop :: (MonadIO m, IsPixbufSimpleAnim o) => o -> Bool -> m ()
instance GHC.Classes.Eq GI.GdkPixbuf.Objects.PixbufSimpleAnim.PixbufSimpleAnim
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.GdkPixbuf.Objects.PixbufSimpleAnim.PixbufSimpleAnim o) => GI.GdkPixbuf.Objects.PixbufSimpleAnim.IsPixbufSimpleAnim o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GdkPixbuf.Objects.PixbufSimpleAnim.PixbufSimpleAnim
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Objects.PixbufSimpleAnim.PixbufSimpleAnim
instance Data.GI.Base.BasicTypes.GObject GI.GdkPixbuf.Objects.PixbufSimpleAnim.PixbufSimpleAnim
instance Data.GI.Base.GValue.IsGValue GI.GdkPixbuf.Objects.PixbufSimpleAnim.PixbufSimpleAnim
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Objects.PixbufSimpleAnim.PixbufSimpleAnim


-- | <i>No description available in the introspection data.</i>
module GI.GdkPixbuf.Objects.PixbufSimpleAnimIter

-- | Memory-managed wrapper type.
newtype PixbufSimpleAnimIter
PixbufSimpleAnimIter :: ManagedPtr PixbufSimpleAnimIter -> PixbufSimpleAnimIter

-- | Type class for types which can be safely cast to
--   <a>PixbufSimpleAnimIter</a>, for instance with
--   <a>toPixbufSimpleAnimIter</a>.
class (GObject o, IsDescendantOf PixbufSimpleAnimIter o) => IsPixbufSimpleAnimIter o

-- | Cast to <a>PixbufSimpleAnimIter</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toPixbufSimpleAnimIter :: (MonadIO m, IsPixbufSimpleAnimIter o) => o -> m PixbufSimpleAnimIter
instance GHC.Classes.Eq GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.PixbufSimpleAnimIter
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.PixbufSimpleAnimIter o) => GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.IsPixbufSimpleAnimIter o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.PixbufSimpleAnimIter
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.PixbufSimpleAnimIter
instance Data.GI.Base.BasicTypes.GObject GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.PixbufSimpleAnimIter
instance Data.GI.Base.GValue.IsGValue GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.PixbufSimpleAnimIter
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Objects.PixbufSimpleAnimIter.PixbufSimpleAnimIter


-- | The GdkPixbufLoader struct contains only private fields.
module GI.GdkPixbuf.Objects.PixbufLoader

-- | Memory-managed wrapper type.
newtype PixbufLoader
PixbufLoader :: ManagedPtr PixbufLoader -> PixbufLoader

-- | Type class for types which can be safely cast to <a>PixbufLoader</a>,
--   for instance with <a>toPixbufLoader</a>.
class (GObject o, IsDescendantOf PixbufLoader o) => IsPixbufLoader o

-- | Cast to <a>PixbufLoader</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toPixbufLoader :: (MonadIO m, IsPixbufLoader o) => o -> m PixbufLoader

-- | Informs a pixbuf loader that no further writes with
--   <a>pixbufLoaderWrite</a> will occur, so that it can free its internal
--   loading structures. Also, tries to parse any data that hasn't yet been
--   parsed; if the remaining data is partial or corrupt, an error will be
--   returned. If <a>False</a> is returned, <i><tt>error</tt></i> will be
--   set to an error from the <tt><i>GDK_PIXBUF_ERROR</i></tt> or
--   <tt><i>G_FILE_ERROR</i></tt> domains. If you're just cancelling a load
--   rather than expecting it to be finished, passing <a>Nothing</a> for
--   <i><tt>error</tt></i> to ignore it is reasonable.
--   
--   Remember that this does not unref the loader, so if you plan not to
--   use it anymore, please <a>objectUnref</a> it.
pixbufLoaderClose :: (HasCallStack, MonadIO m, IsPixbufLoader a) => a -> m ()

-- | Queries the <a>PixbufAnimation</a> that a pixbuf loader is currently
--   creating. In general it only makes sense to call this function after
--   the "area-prepared" signal has been emitted by the loader. If the
--   loader doesn't have enough bytes yet (hasn't emitted the
--   "area-prepared" signal) this function will return <a>Nothing</a>.
pixbufLoaderGetAnimation :: (HasCallStack, MonadIO m, IsPixbufLoader a) => a -> m PixbufAnimation

-- | Obtains the available information about the format of the currently
--   loading image file.
--   
--   <i>Since: 2.2</i>
pixbufLoaderGetFormat :: (HasCallStack, MonadIO m, IsPixbufLoader a) => a -> m (Maybe PixbufFormat)

-- | Queries the <a>Pixbuf</a> that a pixbuf loader is currently creating.
--   In general it only makes sense to call this function after the
--   "area-prepared" signal has been emitted by the loader; this means that
--   enough data has been read to know the size of the image that will be
--   allocated. If the loader has not received enough data via
--   <a>pixbufLoaderWrite</a>, then this function returns <a>Nothing</a>.
--   The returned pixbuf will be the same in all future calls to the
--   loader, so simply calling <a>objectRef</a> should be sufficient to
--   continue using it. Additionally, if the loader is an animation, it
--   will return the "static image" of the animation (see
--   <a>pixbufAnimationGetStaticImage</a>).
pixbufLoaderGetPixbuf :: (HasCallStack, MonadIO m, IsPixbufLoader a) => a -> m (Maybe Pixbuf)

-- | Creates a new pixbuf loader object.
pixbufLoaderNew :: (HasCallStack, MonadIO m) => m PixbufLoader

-- | Creates a new pixbuf loader object that always attempts to parse image
--   data as if it were an image of mime type <i><tt>mimeType</tt></i>,
--   instead of identifying the type automatically. Useful if you want an
--   error if the image isn't the expected mime type, for loading image
--   formats that can't be reliably identified by looking at the data, or
--   if the user manually forces a specific mime type.
--   
--   The list of supported mime types depends on what image loaders are
--   installed, but typically "image/png", "image/jpeg", "image/gif",
--   "image/tiff" and "image/x-xpixmap" are among the supported mime types.
--   To obtain the full list of supported mime types, call
--   <a>pixbufFormatGetMimeTypes</a> on each of the <a>PixbufFormat</a>
--   structs returned by <a>pixbufGetFormats</a>.
--   
--   <i>Since: 2.4</i>
pixbufLoaderNewWithMimeType :: (HasCallStack, MonadIO m) => Text -> m PixbufLoader

-- | Creates a new pixbuf loader object that always attempts to parse image
--   data as if it were an image of type <i><tt>imageType</tt></i>, instead
--   of identifying the type automatically. Useful if you want an error if
--   the image isn't the expected type, for loading image formats that
--   can't be reliably identified by looking at the data, or if the user
--   manually forces a specific type.
--   
--   The list of supported image formats depends on what image loaders are
--   installed, but typically "png", "jpeg", "gif", "tiff" and "xpm" are
--   among the supported formats. To obtain the full list of supported
--   image formats, call <a>pixbufFormatGetName</a> on each of the
--   <a>PixbufFormat</a> structs returned by <a>pixbufGetFormats</a>.
pixbufLoaderNewWithType :: (HasCallStack, MonadIO m) => Text -> m PixbufLoader

-- | Causes the image to be scaled while it is loaded. The desired image
--   size can be determined relative to the original size of the image by
--   calling <a>pixbufLoaderSetSize</a> from a signal handler for the
--   <a>sizePrepared</a> signal.
--   
--   Attempts to set the desired image size are ignored after the emission
--   of the <a>sizePrepared</a> signal.
--   
--   <i>Since: 2.2</i>
pixbufLoaderSetSize :: (HasCallStack, MonadIO m, IsPixbufLoader a) => a -> Int32 -> Int32 -> m ()

-- | This will cause a pixbuf loader to parse the next
--   <i><tt>count</tt></i> bytes of an image. It will return <a>True</a> if
--   the data was loaded successfully, and <a>False</a> if an error
--   occurred. In the latter case, the loader will be closed, and will not
--   accept further writes. If <a>False</a> is returned,
--   <i><tt>error</tt></i> will be set to an error from the
--   <tt><i>GDK_PIXBUF_ERROR</i></tt> or <tt><i>G_FILE_ERROR</i></tt>
--   domains.
pixbufLoaderWrite :: (HasCallStack, MonadIO m, IsPixbufLoader a) => a -> ByteString -> m ()

-- | This will cause a pixbuf loader to parse a buffer inside a
--   <a>Bytes</a> for an image. It will return <a>True</a> if the data was
--   loaded successfully, and <a>False</a> if an error occurred. In the
--   latter case, the loader will be closed, and will not accept further
--   writes. If <a>False</a> is returned, <i><tt>error</tt></i> will be set
--   to an error from the <tt><i>GDK_PIXBUF_ERROR</i></tt> or
--   <tt><i>G_FILE_ERROR</i></tt> domains.
--   
--   See also: <a>pixbufLoaderWrite</a>
--   
--   <i>Since: 2.30</i>
pixbufLoaderWriteBytes :: (HasCallStack, MonadIO m, IsPixbufLoader a) => a -> Bytes -> m ()

-- | Type for the callback on the (unwrapped) C side.
type C_PixbufLoaderAreaPreparedCallback = Ptr () -> Ptr () -> IO ()

-- | This signal is emitted when the pixbuf loader has allocated the pixbuf
--   in the desired size. After this signal is emitted, applications can
--   call <a>pixbufLoaderGetPixbuf</a> to fetch the partially-loaded
--   pixbuf.
type PixbufLoaderAreaPreparedCallback = IO ()

-- | Connect a signal handler for the <a>areaPrepared</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> pixbufLoader #areaPrepared callback
--   </pre>
afterPixbufLoaderAreaPrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaPreparedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_PixbufLoaderAreaPrepared :: MonadIO m => PixbufLoaderAreaPreparedCallback -> m (GClosure C_PixbufLoaderAreaPreparedCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PixbufLoaderAreaPreparedCallback</a>.
mk_PixbufLoaderAreaPreparedCallback :: C_PixbufLoaderAreaPreparedCallback -> IO (FunPtr C_PixbufLoaderAreaPreparedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufLoaderAreaPreparedCallback</a></tt>.
noPixbufLoaderAreaPreparedCallback :: Maybe PixbufLoaderAreaPreparedCallback

-- | Connect a signal handler for the <a>areaPrepared</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> pixbufLoader #areaPrepared callback
--   </pre>
onPixbufLoaderAreaPrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaPreparedCallback -> m SignalHandlerId

-- | Wrap a <a>PixbufLoaderAreaPreparedCallback</a> into a
--   <a>C_PixbufLoaderAreaPreparedCallback</a>.
wrap_PixbufLoaderAreaPreparedCallback :: PixbufLoaderAreaPreparedCallback -> C_PixbufLoaderAreaPreparedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_PixbufLoaderAreaUpdatedCallback = Ptr () -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr () -> IO ()

-- | This signal is emitted when a significant area of the image being
--   loaded has been updated. Normally it means that a complete scanline
--   has been read in, but it could be a different area as well.
--   Applications can use this signal to know when to repaint areas of an
--   image that is being loaded.
type PixbufLoaderAreaUpdatedCallback = Int32 " /@x@/: X offset of upper-left corner of the updated area." -> Int32 " /@y@/: Y offset of upper-left corner of the updated area." -> Int32 " /@width@/: Width of updated area." -> Int32 " /@height@/: Height of updated area." -> IO ()

-- | Connect a signal handler for the <a>areaUpdated</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> pixbufLoader #areaUpdated callback
--   </pre>
afterPixbufLoaderAreaUpdated :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaUpdatedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_PixbufLoaderAreaUpdated :: MonadIO m => PixbufLoaderAreaUpdatedCallback -> m (GClosure C_PixbufLoaderAreaUpdatedCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PixbufLoaderAreaUpdatedCallback</a>.
mk_PixbufLoaderAreaUpdatedCallback :: C_PixbufLoaderAreaUpdatedCallback -> IO (FunPtr C_PixbufLoaderAreaUpdatedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufLoaderAreaUpdatedCallback</a></tt>.
noPixbufLoaderAreaUpdatedCallback :: Maybe PixbufLoaderAreaUpdatedCallback

-- | Connect a signal handler for the <a>areaUpdated</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> pixbufLoader #areaUpdated callback
--   </pre>
onPixbufLoaderAreaUpdated :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderAreaUpdatedCallback -> m SignalHandlerId

-- | Wrap a <a>PixbufLoaderAreaUpdatedCallback</a> into a
--   <a>C_PixbufLoaderAreaUpdatedCallback</a>.
wrap_PixbufLoaderAreaUpdatedCallback :: PixbufLoaderAreaUpdatedCallback -> C_PixbufLoaderAreaUpdatedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_PixbufLoaderClosedCallback = Ptr () -> Ptr () -> IO ()

-- | This signal is emitted when <a>pixbufLoaderClose</a> is called. It can
--   be used by different parts of an application to receive notification
--   when an image loader is closed by the code that drives it.
type PixbufLoaderClosedCallback = IO ()

-- | Connect a signal handler for the <a>closed</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> pixbufLoader #closed callback
--   </pre>
afterPixbufLoaderClosed :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderClosedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_PixbufLoaderClosed :: MonadIO m => PixbufLoaderClosedCallback -> m (GClosure C_PixbufLoaderClosedCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PixbufLoaderClosedCallback</a>.
mk_PixbufLoaderClosedCallback :: C_PixbufLoaderClosedCallback -> IO (FunPtr C_PixbufLoaderClosedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufLoaderClosedCallback</a></tt>.
noPixbufLoaderClosedCallback :: Maybe PixbufLoaderClosedCallback

-- | Connect a signal handler for the <a>closed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> pixbufLoader #closed callback
--   </pre>
onPixbufLoaderClosed :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderClosedCallback -> m SignalHandlerId

-- | Wrap a <a>PixbufLoaderClosedCallback</a> into a
--   <a>C_PixbufLoaderClosedCallback</a>.
wrap_PixbufLoaderClosedCallback :: PixbufLoaderClosedCallback -> C_PixbufLoaderClosedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_PixbufLoaderSizePreparedCallback = Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()

-- | This signal is emitted when the pixbuf loader has been fed the initial
--   amount of data that is required to figure out the size of the image
--   that it will create. Applications can call <a>pixbufLoaderSetSize</a>
--   in response to this signal to set the desired size to which the image
--   should be scaled.
type PixbufLoaderSizePreparedCallback = Int32 " /@width@/: the original width of the image" -> Int32 " /@height@/: the original height of the image" -> IO ()

-- | Connect a signal handler for the <a>sizePrepared</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> pixbufLoader #sizePrepared callback
--   </pre>
afterPixbufLoaderSizePrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderSizePreparedCallback -> m SignalHandlerId

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_PixbufLoaderSizePrepared :: MonadIO m => PixbufLoaderSizePreparedCallback -> m (GClosure C_PixbufLoaderSizePreparedCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PixbufLoaderSizePreparedCallback</a>.
mk_PixbufLoaderSizePreparedCallback :: C_PixbufLoaderSizePreparedCallback -> IO (FunPtr C_PixbufLoaderSizePreparedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PixbufLoaderSizePreparedCallback</a></tt>.
noPixbufLoaderSizePreparedCallback :: Maybe PixbufLoaderSizePreparedCallback

-- | Connect a signal handler for the <a>sizePrepared</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> pixbufLoader #sizePrepared callback
--   </pre>
onPixbufLoaderSizePrepared :: (IsPixbufLoader a, MonadIO m) => a -> PixbufLoaderSizePreparedCallback -> m SignalHandlerId

-- | Wrap a <a>PixbufLoaderSizePreparedCallback</a> into a
--   <a>C_PixbufLoaderSizePreparedCallback</a>.
wrap_PixbufLoaderSizePreparedCallback :: PixbufLoaderSizePreparedCallback -> C_PixbufLoaderSizePreparedCallback
instance GHC.Classes.Eq GI.GdkPixbuf.Objects.PixbufLoader.PixbufLoader
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.GdkPixbuf.Objects.PixbufLoader.PixbufLoader o) => GI.GdkPixbuf.Objects.PixbufLoader.IsPixbufLoader o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GdkPixbuf.Objects.PixbufLoader.PixbufLoader
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Objects.PixbufLoader.PixbufLoader
instance Data.GI.Base.BasicTypes.GObject GI.GdkPixbuf.Objects.PixbufLoader.PixbufLoader
instance Data.GI.Base.GValue.IsGValue GI.GdkPixbuf.Objects.PixbufLoader.PixbufLoader
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Objects.PixbufLoader.PixbufLoader


-- | This is the main structure in the gdk-pixbuf library. It is used to
--   represent images. It contains information about the image's pixel
--   data, its color space, bits per sample, width and height, and the
--   rowstride (the number of bytes between the start of one row and the
--   start of the next).
module GI.GdkPixbuf.Objects.Pixbuf

-- | Memory-managed wrapper type.
newtype Pixbuf
Pixbuf :: ManagedPtr Pixbuf -> Pixbuf

-- | Type class for types which can be safely cast to <a>Pixbuf</a>, for
--   instance with <a>toPixbuf</a>.
class (GObject o, IsDescendantOf Pixbuf o) => IsPixbuf o

-- | Cast to <a>Pixbuf</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toPixbuf :: (MonadIO m, IsPixbuf o) => o -> m Pixbuf

-- | Takes an existing pixbuf and adds an alpha channel to it. If the
--   existing pixbuf already had an alpha channel, the channel values are
--   copied from the original; otherwise, the alpha channel is initialized
--   to 255 (full opacity).
--   
--   If <i><tt>substituteColor</tt></i> is <a>True</a>, then the color
--   specified by (<i><tt>r</tt></i>, <i><tt>g</tt></i>, <i><tt>b</tt></i>)
--   will be assigned zero opacity. That is, if you pass (255, 255, 255)
--   for the substitute color, all white pixels will become fully
--   transparent.
pixbufAddAlpha :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Bool -> Word8 -> Word8 -> Word8 -> m Pixbuf

-- | Takes an existing pixbuf and checks for the presence of an associated
--   "orientation" option, which may be provided by the jpeg loader (which
--   reads the exif orientation tag) or the tiff loader (which reads the
--   tiff orientation tag, and compensates it for the partial transforms
--   performed by libtiff). If an orientation option/tag is present, the
--   appropriate transform will be performed so that the pixbuf is oriented
--   correctly.
--   
--   <i>Since: 2.12</i>
pixbufApplyEmbeddedOrientation :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Pixbuf

-- | Calculates the rowstride that an image created with those values would
--   have. This is useful for front-ends and backends that want to sanity
--   check image values without needing to create them.
--   
--   <i>Since: 2.36.8</i>
pixbufCalculateRowstride :: (HasCallStack, MonadIO m) => Colorspace -> Bool -> Int32 -> Int32 -> Int32 -> m Int32

-- | Creates a transformation of the source image <i><tt>src</tt></i> by
--   scaling by <i><tt>scaleX</tt></i> and <i><tt>scaleY</tt></i> then
--   translating by <i><tt>offsetX</tt></i> and <i><tt>offsetY</tt></i>.
--   This gives an image in the coordinates of the destination pixbuf. The
--   rectangle (<i><tt>destX</tt></i>, <i><tt>destY</tt></i>,
--   <i><tt>destWidth</tt></i>, <i><tt>destHeight</tt></i>) is then alpha
--   blended onto the corresponding rectangle of the original destination
--   image.
--   
--   When the destination rectangle contains parts not in the source image,
--   the data at the edges of the source image is replicated to infinity.
--   
pixbufComposite :: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbuf b) => a -> b -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> Double -> Double -> Double -> InterpType -> Int32 -> m ()

-- | Creates a transformation of the source image <i><tt>src</tt></i> by
--   scaling by <i><tt>scaleX</tt></i> and <i><tt>scaleY</tt></i> then
--   translating by <i><tt>offsetX</tt></i> and <i><tt>offsetY</tt></i>,
--   then alpha blends the rectangle (<i><tt>destX</tt></i>
--   ,<i><tt>destY</tt></i>, <i><tt>destWidth</tt></i>,
--   <i><tt>destHeight</tt></i>) of the resulting image with a checkboard
--   of the colors <i><tt>color1</tt></i> and <i><tt>color2</tt></i> and
--   renders it onto the destination image.
--   
--   If the source image has no alpha channel, and
--   <i><tt>overallAlpha</tt></i> is 255, a fast path is used which omits
--   the alpha blending and just performs the scaling.
--   
--   See <a>pixbufCompositeColorSimple</a> for a simpler variant of this
--   function suitable for many tasks.
pixbufCompositeColor :: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbuf b) => a -> b -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> Double -> Double -> Double -> InterpType -> Int32 -> Int32 -> Int32 -> Int32 -> Word32 -> Word32 -> m ()

-- | Creates a new <a>Pixbuf</a> by scaling <i><tt>src</tt></i> to
--   <i><tt>destWidth</tt></i> x <i><tt>destHeight</tt></i> and alpha
--   blending the result with a checkboard of colors <i><tt>color1</tt></i>
--   and <i><tt>color2</tt></i>.
pixbufCompositeColorSimple :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Int32 -> Int32 -> InterpType -> Int32 -> Int32 -> Word32 -> Word32 -> m (Maybe Pixbuf)

-- | Creates a new <a>Pixbuf</a> with a copy of the information in the
--   specified <i><tt>pixbuf</tt></i>. Note that this does not copy the
--   options set on the original <a>Pixbuf</a>, use
--   <a>pixbufCopyOptions</a> for this.
pixbufCopy :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m (Maybe Pixbuf)

-- | Copies a rectangular area from <i><tt>srcPixbuf</tt></i> to
--   <i><tt>destPixbuf</tt></i>. Conversion of pixbuf formats is done
--   automatically.
--   
--   If the source rectangle overlaps the destination rectangle on the same
--   pixbuf, it will be overwritten during the copy operation. Therefore,
--   you can not use this function to scroll a pixbuf.
pixbufCopyArea :: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbuf b) => a -> Int32 -> Int32 -> Int32 -> Int32 -> b -> Int32 -> Int32 -> m ()

-- | Copy the key/value pair options attached to a <a>Pixbuf</a> to
--   another. This is useful to keep original metadata after having
--   manipulated a file. However be careful to remove metadata which you've
--   already applied, such as the "orientation" option after rotating the
--   image.
--   
--   <i>Since: 2.36</i>
pixbufCopyOptions :: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbuf b) => a -> b -> m Bool

-- | Clears a pixbuf to the given RGBA value, converting the RGBA value
--   into the pixbuf's pixel format. The alpha will be ignored if the
--   pixbuf doesn't have an alpha channel.
pixbufFill :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Word32 -> m ()

-- | Flips a pixbuf horizontally or vertically and returns the result in a
--   new pixbuf.
--   
--   <i>Since: 2.6</i>
pixbufFlip :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Bool -> m (Maybe Pixbuf)

-- | Queries the number of bits per color sample in a pixbuf.
pixbufGetBitsPerSample :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Int32

-- | Returns the length of the pixel data, in bytes.
--   
--   <i>Since: 2.26</i>
pixbufGetByteLength :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Word64

-- | Queries the color space of a pixbuf.
pixbufGetColorspace :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Colorspace

-- | Parses an image file far enough to determine its format and size.
--   
--   <i>Since: 2.4</i>
pixbufGetFileInfo :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe PixbufFormat, Int32, Int32)

-- | Asynchronously parses an image file far enough to determine its format
--   and size.
--   
--   For more details see <a>pixbufGetFileInfo</a>, which is the
--   synchronous version of this function.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called in the main thread. You can then call
--   <a>pixbufGetFileInfoFinish</a> to get the result of the operation.
--   
--   <i>Since: 2.32</i>
pixbufGetFileInfoAsync :: (HasCallStack, MonadIO m, IsCancellable a) => [Char] -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous pixbuf parsing operation started with
--   <a>pixbufGetFileInfoAsync</a>.
--   
--   <i>Since: 2.32</i>
pixbufGetFileInfoFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (PixbufFormat, Int32, Int32)

-- | Obtains the available information about the image formats supported by
--   GdkPixbuf.
--   
--   <i>Since: 2.2</i>
pixbufGetFormats :: (HasCallStack, MonadIO m) => m [PixbufFormat]

-- | Queries whether a pixbuf has an alpha channel (opacity information).
pixbufGetHasAlpha :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Bool

-- | Queries the height of a pixbuf.
pixbufGetHeight :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Int32

-- | Queries the number of channels of a pixbuf.
pixbufGetNChannels :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Int32

-- | Looks up <i><tt>key</tt></i> in the list of options that may have been
--   attached to the <i><tt>pixbuf</tt></i> when it was loaded, or that may
--   have been attached by another function using <a>pixbufSetOption</a>.
--   
--   For instance, the ANI loader provides "Title" and "Artist" options.
--   The ICO, XBM, and XPM loaders provide "x_hot" and "y_hot" hot-spot
--   options for cursor definitions. The PNG loader provides the tEXt
--   ancillary chunk key/value pairs as options. Since 2.12, the TIFF and
--   JPEG loaders return an "orientation" option string that corresponds to
--   the embedded TIFF/Exif orientation tag (if present). Since 2.32, the
--   TIFF loader sets the "multipage" option string to "yes" when a
--   multi-page TIFF is loaded. Since 2.32 the JPEG and PNG loaders set
--   "x-dpi" and "y-dpi" if the file contains image density information in
--   dots per inch. Since 2.36.6, the JPEG loader sets the "comment" option
--   with the comment EXIF tag.
pixbufGetOption :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Text -> m Text

-- | Queries a pointer to the pixel data of a pixbuf.
--   
--   <i>Since: 2.26</i>
pixbufGetPixels :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m ByteString

-- | Queries the rowstride of a pixbuf, which is the number of bytes
--   between the start of a row and the start of the next row.
pixbufGetRowstride :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Int32

-- | Queries the width of a pixbuf.
pixbufGetWidth :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Int32

-- | Initalizes the gdk-pixbuf loader modules referenced by the
--   loaders.cache file present inside that directory.
--   
--   This is to be used by applications that want to ship certain loaders
--   in a different location from the system ones.
--   
--   This is needed when the OS or runtime ships a minimal number of
--   loaders so as to reduce the potential attack surface of carefully
--   crafted image files, especially for uncommon file types. Applications
--   that require broader image file types coverage, such as image viewers,
--   would be expected to ship the gdk-pixbuf modules in a separate
--   location, bundled with the application in a separate directory from
--   the OS or runtime- provided modules.
--   
--   <i>Since: 2.40</i>
pixbufInitModules :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Creates a new <a>Pixbuf</a> structure and allocates a buffer for it.
--   The buffer has an optimal rowstride. Note that the buffer is not
--   cleared; you will have to fill it completely yourself.
pixbufNew :: (HasCallStack, MonadIO m) => Colorspace -> Bool -> Int32 -> Int32 -> Int32 -> m (Maybe Pixbuf)

-- | Creates a new <a>Pixbuf</a> out of in-memory readonly image data.
--   Currently only RGB images with 8 bits per sample are supported. This
--   is the <a>Bytes</a> variant of <a>pixbufNewFromData</a>.
--   
--   <i>Since: 2.32</i>
pixbufNewFromBytes :: (HasCallStack, MonadIO m) => Bytes -> Colorspace -> Bool -> Int32 -> Int32 -> Int32 -> Int32 -> m Pixbuf

-- | Creates a new <a>Pixbuf</a> out of in-memory image data. Currently
--   only RGB images with 8 bits per sample are supported.
--   
--   Since you are providing a pre-allocated pixel buffer, you must also
--   specify a way to free that data. This is done with a function of type
--   <a>PixbufDestroyNotify</a>. When a pixbuf created with is finalized,
--   your destroy notification function will be called, and it is its
--   responsibility to free the pixel array.
--   
--   See also <a>pixbufNewFromBytes</a>.
pixbufNewFromData :: (HasCallStack, MonadIO m) => Ptr Word8 -> Colorspace -> Bool -> Int32 -> Int32 -> Int32 -> Int32 -> Maybe PixbufDestroyNotify -> m Pixbuf

-- | Creates a new pixbuf by loading an image from a file. The file format
--   is detected automatically. If <a>Nothing</a> is returned, then
--   <i><tt>error</tt></i> will be set. Possible errors are in the
--   <tt><i>GDK_PIXBUF_ERROR</i></tt> and <tt><i>G_FILE_ERROR</i></tt>
--   domains.
pixbufNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m Pixbuf

-- | Creates a new pixbuf by loading an image from a file. The file format
--   is detected automatically. If <a>Nothing</a> is returned, then
--   <i><tt>error</tt></i> will be set. Possible errors are in the
--   <tt><i>GDK_PIXBUF_ERROR</i></tt> and <tt><i>G_FILE_ERROR</i></tt>
--   domains. The image will be scaled to fit in the requested size,
--   optionally preserving the image's aspect ratio.
--   
--   When preserving the aspect ratio, a <i><tt>width</tt></i> of -1 will
--   cause the image to be scaled to the exact given height, and a
--   <i><tt>height</tt></i> of -1 will cause the image to be scaled to the
--   exact given width. When not preserving aspect ratio, a
--   <i><tt>width</tt></i> or <i><tt>height</tt></i> of -1 means to not
--   scale the image at all in that dimension. Negative values for
--   <i><tt>width</tt></i> and <i><tt>height</tt></i> are allowed since
--   2.8.
--   
--   <i>Since: 2.6</i>
pixbufNewFromFileAtScale :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> Int32 -> Bool -> m Pixbuf

-- | Creates a new pixbuf by loading an image from a file. The file format
--   is detected automatically. If <a>Nothing</a> is returned, then
--   <i><tt>error</tt></i> will be set. Possible errors are in the
--   <tt><i>GDK_PIXBUF_ERROR</i></tt> and <tt><i>G_FILE_ERROR</i></tt>
--   domains.
--   
--   The image will be scaled to fit in the requested size, preserving the
--   image's aspect ratio. Note that the returned pixbuf may be smaller
--   than <i><tt>width</tt></i> x <i><tt>height</tt></i>, if the aspect
--   ratio requires it. To load and image at the requested size, regardless
--   of aspect ratio, use <a>pixbufNewFromFileAtScale</a>.
--   
--   <i>Since: 2.4</i>
pixbufNewFromFileAtSize :: (HasCallStack, MonadIO m) => [Char] -> Int32 -> Int32 -> m Pixbuf

-- | Create a <a>Pixbuf</a> from a flat representation that is suitable for
--   storing as inline data in a program. This is useful if you want to
--   ship a program with images, but don't want to depend on any external
--   files.
--   
--   gdk-pixbuf ships with a program called
--   [gdk-pixbuf-csource][gdk-pixbuf-csource], which allows for conversion
--   of <tt><i>GdkPixbufs</i></tt> into such a inline representation. In
--   almost all cases, you should pass the <tt>--raw</tt> option to
--   <tt>gdk-pixbuf-csource</tt>. A sample invocation would be:
--   
--   <pre>
--   gdk-pixbuf-csource --raw --name=myimage_inline myimage.png
--   </pre>
--   
--   For the typical case where the inline pixbuf is read-only static data,
--   you don't need to copy the pixel data unless you intend to write to
--   it, so you can pass <a>False</a> for <i><tt>copyPixels</tt></i>. (If
--   you pass <tt>--rle</tt> to <tt>gdk-pixbuf-csource</tt>, a copy will be
--   made even if <i><tt>copyPixels</tt></i> is <a>False</a>, so using this
--   option is generally a bad idea.)
--   
--   If you create a pixbuf from const inline data compiled into your
--   program, it's probably safe to ignore errors and disable length
--   checks, since things will always succeed: &gt; &gt;pixbuf =
--   gdk_pixbuf_new_from_inline (-1, myimage_inline, FALSE, NULL);
--   
--   For non-const inline data, you could get out of memory. For untrusted
--   inline data located at runtime, you could have corrupt inline data in
--   addition.

-- | <i>Deprecated: (Since version 2.32)Use <a>Resource</a> instead.</i>
pixbufNewFromInline :: (HasCallStack, MonadIO m) => ByteString -> Bool -> m Pixbuf

-- | Creates a new pixbuf by loading an image from an resource.
--   
--   The file format is detected automatically. If <a>Nothing</a> is
--   returned, then <i><tt>error</tt></i> will be set.
--   
--   <i>Since: 2.26</i>
pixbufNewFromResource :: (HasCallStack, MonadIO m) => Text -> m Pixbuf

-- | Creates a new pixbuf by loading an image from an resource.
--   
--   The file format is detected automatically. If <a>Nothing</a> is
--   returned, then <i><tt>error</tt></i> will be set.
--   
--   The image will be scaled to fit in the requested size, optionally
--   preserving the image's aspect ratio. When preserving the aspect ratio,
--   a <i><tt>width</tt></i> of -1 will cause the image to be scaled to the
--   exact given height, and a <i><tt>height</tt></i> of -1 will cause the
--   image to be scaled to the exact given width. When not preserving
--   aspect ratio, a <i><tt>width</tt></i> or <i><tt>height</tt></i> of -1
--   means to not scale the image at all in that dimension.
--   
--   The stream is not closed.
--   
--   <i>Since: 2.26</i>
pixbufNewFromResourceAtScale :: (HasCallStack, MonadIO m) => Text -> Int32 -> Int32 -> Bool -> m Pixbuf

-- | Creates a new pixbuf by loading an image from an input stream.
--   
--   The file format is detected automatically. If <a>Nothing</a> is
--   returned, then <i><tt>error</tt></i> will be set. The
--   <i><tt>cancellable</tt></i> can be used to abort the operation from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. Other possible errors
--   are in the <tt><i>GDK_PIXBUF_ERROR</i></tt> and
--   <tt><i>G_IO_ERROR</i></tt> domains.
--   
--   The stream is not closed.
--   
--   <i>Since: 2.14</i>
pixbufNewFromStream :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe b -> m Pixbuf

-- | Creates a new pixbuf by asynchronously loading an image from an input
--   stream.
--   
--   For more details see <a>pixbufNewFromStream</a>, which is the
--   synchronous version of this function.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called in the main thread. You can then call
--   <a>pixbufNewFromStreamFinish</a> to get the result of the operation.
--   
--   <i>Since: 2.24</i>
pixbufNewFromStreamAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Creates a new pixbuf by loading an image from an input stream.
--   
--   The file format is detected automatically. If <a>Nothing</a> is
--   returned, then <i><tt>error</tt></i> will be set. The
--   <i><tt>cancellable</tt></i> can be used to abort the operation from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. Other possible errors
--   are in the <tt><i>GDK_PIXBUF_ERROR</i></tt> and
--   <tt><i>G_IO_ERROR</i></tt> domains.
--   
--   The image will be scaled to fit in the requested size, optionally
--   preserving the image's aspect ratio.
--   
--   When preserving the aspect ratio, a <i><tt>width</tt></i> of -1 will
--   cause the image to be scaled to the exact given height, and a
--   <i><tt>height</tt></i> of -1 will cause the image to be scaled to the
--   exact given width. If both <i><tt>width</tt></i> and
--   <i><tt>height</tt></i> are given, this function will behave as if the
--   smaller of the two values is passed as -1.
--   
--   When not preserving aspect ratio, a <i><tt>width</tt></i> or
--   <i><tt>height</tt></i> of -1 means to not scale the image at all in
--   that dimension.
--   
--   The stream is not closed.
--   
--   <i>Since: 2.14</i>
pixbufNewFromStreamAtScale :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Int32 -> Int32 -> Bool -> Maybe b -> m Pixbuf

-- | Creates a new pixbuf by asynchronously loading an image from an input
--   stream.
--   
--   For more details see <a>pixbufNewFromStreamAtScale</a>, which is the
--   synchronous version of this function.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called in the main thread. You can then call
--   <a>pixbufNewFromStreamFinish</a> to get the result of the operation.
--   
--   <i>Since: 2.24</i>
pixbufNewFromStreamAtScaleAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Int32 -> Int32 -> Bool -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous pixbuf creation operation started with
--   <a>pixbufNewFromStreamAsync</a>.
--   
--   <i>Since: 2.24</i>
pixbufNewFromStreamFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m Pixbuf

-- | Creates a new pixbuf by parsing XPM data in memory. This data is
--   commonly the result of including an XPM file into a program's C
--   source.
pixbufNewFromXpmData :: (HasCallStack, MonadIO m) => [Text] -> m Pixbuf

-- | Creates a new pixbuf which represents a sub-region of
--   <i><tt>srcPixbuf</tt></i>. The new pixbuf shares its pixels with the
--   original pixbuf, so writing to one affects both. The new pixbuf holds
--   a reference to <i><tt>srcPixbuf</tt></i>, so <i><tt>srcPixbuf</tt></i>
--   will not be finalized until the new pixbuf is finalized.
--   
--   Note that if <i><tt>srcPixbuf</tt></i> is read-only, this function
--   will force it to be mutable.
pixbufNewSubpixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Int32 -> Int32 -> Int32 -> Int32 -> m Pixbuf

-- | Provides a <a>Bytes</a> buffer containing the raw pixel data; the data
--   must not be modified. This function allows skipping the implicit copy
--   that must be made if <tt><i>gdk_pixbuf_get_pixels()</i></tt> is called
--   on a read-only pixbuf.
--   
--   <i>Since: 2.32</i>
pixbufReadPixelBytes :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Bytes

-- | Provides a read-only pointer to the raw pixel data; must not be
--   modified. This function allows skipping the implicit copy that must be
--   made if <tt><i>gdk_pixbuf_get_pixels()</i></tt> is called on a
--   read-only pixbuf.
--   
--   <i>Since: 2.32</i>
pixbufReadPixels :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m Word8

-- | Remove the key/value pair option attached to a <a>Pixbuf</a>.
--   
--   <i>Since: 2.36</i>
pixbufRemoveOption :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Text -> m Bool

-- | Rotates a pixbuf by a multiple of 90 degrees, and returns the result
--   in a new pixbuf.
--   
--   If <i><tt>angle</tt></i> is 0, a copy of <i><tt>src</tt></i> is
--   returned, avoiding any rotation.
--   
--   <i>Since: 2.6</i>
pixbufRotateSimple :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> PixbufRotation -> m (Maybe Pixbuf)

-- | Modifies saturation and optionally pixelates <i><tt>src</tt></i>,
--   placing the result in <i><tt>dest</tt></i>. <i><tt>src</tt></i> and
--   <i><tt>dest</tt></i> may be the same pixbuf with no ill effects. If
--   <i><tt>saturation</tt></i> is 1.0 then saturation is not changed. If
--   it's less than 1.0, saturation is reduced (the image turns toward
--   grayscale); if greater than 1.0, saturation is increased (the image
--   gets more vivid colors). If <i><tt>pixelate</tt></i> is <a>True</a>,
--   then pixels are faded in a checkerboard pattern to create a pixelated
--   image. <i><tt>src</tt></i> and <i><tt>dest</tt></i> must have the same
--   image format, size, and rowstride.
pixbufSaturateAndPixelate :: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbuf b) => a -> b -> Float -> Bool -> m ()

-- | Saves pixbuf to a new buffer in format <i><tt>type</tt></i>, which is
--   currently "jpeg", "tiff", "png", "ico" or "bmp". See
--   <tt><i>gdk_pixbuf_save_to_buffer()</i></tt> for more details.
--   
--   <i>Since: 2.4</i>
pixbufSaveToBufferv :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Text -> [Text] -> [Text] -> m ByteString

-- | Saves pixbuf to a callback in format <i><tt>type</tt></i>, which is
--   currently "jpeg", "png", "tiff", "ico" or "bmp". If
--   <i><tt>error</tt></i> is set, <a>False</a> will be returned. See
--   gdk_pixbuf_save_to_callback () for more details.
--   
--   <i>Since: 2.4</i>
pixbufSaveToCallbackv :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> PixbufSaveFunc -> Text -> [Text] -> [Text] -> m ()

-- | Finishes an asynchronous pixbuf save operation started with
--   <tt><i>gdk_pixbuf_save_to_stream_async()</i></tt>.
--   
--   <i>Since: 2.24</i>
pixbufSaveToStreamFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()

-- | Saves <i><tt>pixbuf</tt></i> to an output stream.
--   
--   Supported file formats are currently "jpeg", "tiff", "png", "ico" or
--   "bmp". See <tt><i>gdk_pixbuf_save_to_stream()</i></tt> for more
--   details.
--   
--   <i>Since: 2.36</i>
pixbufSaveToStreamv :: (HasCallStack, MonadIO m, IsPixbuf a, IsOutputStream b, IsCancellable c) => a -> b -> Text -> [Text] -> [Text] -> Maybe c -> m ()

-- | Saves <i><tt>pixbuf</tt></i> to an output stream asynchronously.
--   
--   For more details see <a>pixbufSaveToStreamv</a>, which is the
--   synchronous version of this function.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called in the main thread. You can then call
--   <a>pixbufSaveToStreamFinish</a> to get the result of the operation.
--   
--   <i>Since: 2.36</i>
pixbufSaveToStreamvAsync :: (HasCallStack, MonadIO m, IsPixbuf a, IsOutputStream b, IsCancellable c) => a -> b -> Text -> [Text] -> [Text] -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Saves pixbuf to a file in <i><tt>type</tt></i>, which is currently
--   "jpeg", "png", "tiff", "ico" or "bmp". If <i><tt>error</tt></i> is
--   set, <a>False</a> will be returned. See gdk_pixbuf_save () for more
--   details.
pixbufSavev :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> [Char] -> Text -> [Text] -> [Text] -> m ()

-- | Creates a transformation of the source image <i><tt>src</tt></i> by
--   scaling by <i><tt>scaleX</tt></i> and <i><tt>scaleY</tt></i> then
--   translating by <i><tt>offsetX</tt></i> and <i><tt>offsetY</tt></i>,
--   then renders the rectangle (<i><tt>destX</tt></i>,
--   <i><tt>destY</tt></i>, <i><tt>destWidth</tt></i>,
--   <i><tt>destHeight</tt></i>) of the resulting image onto the
--   destination image replacing the previous contents.
--   
--   Try to use <a>pixbufScaleSimple</a> first, this function is the
--   industrial-strength power tool you can fall back to if
--   <a>pixbufScaleSimple</a> isn't powerful enough.
--   
--   If the source rectangle overlaps the destination rectangle on the same
--   pixbuf, it will be overwritten during the scaling which results in
--   rendering artifacts.
pixbufScale :: (HasCallStack, MonadIO m, IsPixbuf a, IsPixbuf b) => a -> b -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> Double -> Double -> Double -> InterpType -> m ()

-- | Create a new <a>Pixbuf</a> containing a copy of <i><tt>src</tt></i>
--   scaled to <i><tt>destWidth</tt></i> x <i><tt>destHeight</tt></i>.
--   Leaves <i><tt>src</tt></i> unaffected. <i><tt>interpType</tt></i>
--   should be <tt><i>GDK_INTERP_NEAREST</i></tt> if you want maximum speed
--   (but when scaling down <tt><i>GDK_INTERP_NEAREST</i></tt> is usually
--   unusably ugly). The default <i><tt>interpType</tt></i> should be
--   <tt><i>GDK_INTERP_BILINEAR</i></tt> which offers reasonable quality
--   and speed.
--   
--   You can scale a sub-portion of <i><tt>src</tt></i> by creating a
--   sub-pixbuf pointing into <i><tt>src</tt></i>; see
--   <a>pixbufNewSubpixbuf</a>.
--   
--   If <i><tt>destWidth</tt></i> and <i><tt>destHeight</tt></i> are equal
--   to the <i><tt>src</tt></i> width and height, a copy of
--   <i><tt>src</tt></i> is returned, avoiding any scaling.
--   
--   For more complicated scaling/alpha blending see <a>pixbufScale</a> and
--   <a>pixbufComposite</a>.
pixbufScaleSimple :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Int32 -> Int32 -> InterpType -> m (Maybe Pixbuf)

-- | Attaches a key/value pair as an option to a <a>Pixbuf</a>. If
--   <i><tt>key</tt></i> already exists in the list of options attached to
--   <i><tt>pixbuf</tt></i>, the new value is ignored and <a>False</a> is
--   returned.
--   
--   <i>Since: 2.2</i>
pixbufSetOption :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> Text -> Text -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>bits-per-sample</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructPixbufBitsPerSample :: (IsPixbuf o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>bits-per-sample</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #bitsPerSample
--   </pre>
getPixbufBitsPerSample :: (MonadIO m, IsPixbuf o) => o -> m Int32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>colorspace</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructPixbufColorspace :: (IsPixbuf o, MonadIO m) => Colorspace -> m (GValueConstruct o)

-- | Get the value of the “<tt>colorspace</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #colorspace
--   </pre>
getPixbufColorspace :: (MonadIO m, IsPixbuf o) => o -> m Colorspace

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>has-alpha</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructPixbufHasAlpha :: (IsPixbuf o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>has-alpha</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #hasAlpha
--   </pre>
getPixbufHasAlpha :: (MonadIO m, IsPixbuf o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>height</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructPixbufHeight :: (IsPixbuf o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>height</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #height
--   </pre>
getPixbufHeight :: (MonadIO m, IsPixbuf o) => o -> m Int32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>n-channels</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructPixbufNChannels :: (IsPixbuf o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>n-channels</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #nChannels
--   </pre>
getPixbufNChannels :: (MonadIO m, IsPixbuf o) => o -> m Int32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>pixel-bytes</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructPixbufPixelBytes :: (IsPixbuf o, MonadIO m) => Bytes -> m (GValueConstruct o)

-- | Get the value of the “<tt>pixel-bytes</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #pixelBytes
--   </pre>
getPixbufPixelBytes :: (MonadIO m, IsPixbuf o) => o -> m (Maybe Bytes)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>pixels</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructPixbufPixels :: (IsPixbuf o, MonadIO m) => Ptr () -> m (GValueConstruct o)

-- | Get the value of the “<tt>pixels</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #pixels
--   </pre>
getPixbufPixels :: (MonadIO m, IsPixbuf o) => o -> m (Ptr ())

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>rowstride</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructPixbufRowstride :: (IsPixbuf o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>rowstride</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #rowstride
--   </pre>
getPixbufRowstride :: (MonadIO m, IsPixbuf o) => o -> m Int32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>width</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructPixbufWidth :: (IsPixbuf o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>width</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> pixbuf #width
--   </pre>
getPixbufWidth :: (MonadIO m, IsPixbuf o) => o -> m Int32
instance GHC.Classes.Eq GI.GdkPixbuf.Objects.Pixbuf.Pixbuf
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.GdkPixbuf.Objects.Pixbuf.Pixbuf o) => GI.GdkPixbuf.Objects.Pixbuf.IsPixbuf o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GdkPixbuf.Objects.Pixbuf.Pixbuf
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Objects.Pixbuf.Pixbuf
instance Data.GI.Base.BasicTypes.GObject GI.GdkPixbuf.Objects.Pixbuf.Pixbuf
instance Data.GI.Base.GValue.IsGValue GI.GdkPixbuf.Objects.Pixbuf.Pixbuf
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Objects.Pixbuf.Pixbuf


module GI.GdkPixbuf.Objects


-- | <i>No description available in the introspection data.</i>
module GI.GdkPixbuf.Structs.PixbufFormat

-- | Memory-managed wrapper type.
newtype PixbufFormat
PixbufFormat :: ManagedPtr PixbufFormat -> PixbufFormat

-- | Creates a copy of <i><tt>format</tt></i>
--   
--   <i>Since: 2.22</i>
pixbufFormatCopy :: (HasCallStack, MonadIO m) => PixbufFormat -> m PixbufFormat

-- | Frees the resources allocated when copying a <a>PixbufFormat</a> using
--   <a>pixbufFormatCopy</a>
--   
--   <i>Since: 2.22</i>
pixbufFormatFree :: (HasCallStack, MonadIO m) => PixbufFormat -> m ()

-- | Returns a description of the format.
--   
--   <i>Since: 2.2</i>
pixbufFormatGetDescription :: (HasCallStack, MonadIO m) => PixbufFormat -> m Text

-- | Returns the filename extensions typically used for files in the given
--   format.
--   
--   <i>Since: 2.2</i>
pixbufFormatGetExtensions :: (HasCallStack, MonadIO m) => PixbufFormat -> m [Text]

-- | Returns information about the license of the image loader for the
--   format. The returned string should be a shorthand for a wellknown
--   license, e.g. "LGPL", "GPL", "QPL", "GPL/QPL", or "other" to indicate
--   some other license. This string should be freed with <a>free</a> when
--   it's no longer needed.
--   
--   <i>Since: 2.6</i>
pixbufFormatGetLicense :: (HasCallStack, MonadIO m) => PixbufFormat -> m Text

-- | Returns the mime types supported by the format.
--   
--   <i>Since: 2.2</i>
pixbufFormatGetMimeTypes :: (HasCallStack, MonadIO m) => PixbufFormat -> m [Text]

-- | Returns the name of the format.
--   
--   <i>Since: 2.2</i>
pixbufFormatGetName :: (HasCallStack, MonadIO m) => PixbufFormat -> m Text

-- | Returns whether this image format is disabled. See
--   <a>pixbufFormatSetDisabled</a>.
--   
--   <i>Since: 2.6</i>
pixbufFormatIsDisabled :: (HasCallStack, MonadIO m) => PixbufFormat -> m Bool

-- | Returns <a>True</a> if the save option specified by
--   <i><tt>optionKey</tt></i> is supported when saving a pixbuf using the
--   module implementing <i><tt>format</tt></i>. See
--   <tt><i>gdk_pixbuf_save()</i></tt> for more information about option
--   keys.
--   
--   <i>Since: 2.36</i>
pixbufFormatIsSaveOptionSupported :: (HasCallStack, MonadIO m) => PixbufFormat -> Text -> m Bool

-- | Returns whether this image format is scalable. If a file is in a
--   scalable format, it is preferable to load it at the desired size,
--   rather than loading it at the default size and scaling the resulting
--   pixbuf to the desired size.
--   
--   <i>Since: 2.6</i>
pixbufFormatIsScalable :: (HasCallStack, MonadIO m) => PixbufFormat -> m Bool

-- | Returns whether pixbufs can be saved in the given format.
--   
--   <i>Since: 2.2</i>
pixbufFormatIsWritable :: (HasCallStack, MonadIO m) => PixbufFormat -> m Bool

-- | Disables or enables an image format. If a format is disabled,
--   gdk-pixbuf won't use the image loader for this format to load images.
--   Applications can use this to avoid using image loaders with an
--   inappropriate license, see <a>pixbufFormatGetLicense</a>.
--   
--   <i>Since: 2.6</i>
pixbufFormatSetDisabled :: (HasCallStack, MonadIO m) => PixbufFormat -> Bool -> m ()
instance GHC.Classes.Eq GI.GdkPixbuf.Structs.PixbufFormat.PixbufFormat
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.GdkPixbuf.Structs.PixbufFormat.PixbufFormat
instance Data.GI.Base.Overloading.HasParentTypes GI.GdkPixbuf.Structs.PixbufFormat.PixbufFormat
instance Data.GI.Base.BasicTypes.TypedObject GI.GdkPixbuf.Structs.PixbufFormat.PixbufFormat
instance Data.GI.Base.BasicTypes.GBoxed GI.GdkPixbuf.Structs.PixbufFormat.PixbufFormat
instance Data.GI.Base.GValue.IsGValue GI.GdkPixbuf.Structs.PixbufFormat.PixbufFormat


module GI.GdkPixbuf.Structs


module GI.GdkPixbuf
