{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Vips.Objects.ForeignSave
    ( 

-- * Exported types
    ForeignSave(..)                         ,
    IsForeignSave                           ,
    toForeignSave                           ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [argumentIsset]("GI.Vips.Objects.Object#g:method:argumentIsset"), [argumentNeedsstring]("GI.Vips.Objects.Object#g:method:argumentNeedsstring"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [build]("GI.Vips.Objects.Object#g:method:build"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [invalidate]("GI.Vips.Objects.Operation#g:method:invalidate"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [localCb]("GI.Vips.Objects.Object#g:method:localCb"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [preclose]("GI.Vips.Objects.Object#g:method:preclose"), [printDump]("GI.Vips.Objects.Object#g:method:printDump"), [printName]("GI.Vips.Objects.Object#g:method:printName"), [printSummary]("GI.Vips.Objects.Object#g:method:printSummary"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [rewind]("GI.Vips.Objects.Object#g:method:rewind"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [sanity]("GI.Vips.Objects.Object#g:method:sanity"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [toString]("GI.Vips.Objects.Object#g:method:toString"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unrefOutputs]("GI.Vips.Objects.Object#g:method:unrefOutputs"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getArgumentFlags]("GI.Vips.Objects.Object#g:method:getArgumentFlags"), [getArgumentPriority]("GI.Vips.Objects.Object#g:method:getArgumentPriority"), [getArgumentToString]("GI.Vips.Objects.Object#g:method:getArgumentToString"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDescription]("GI.Vips.Objects.Object#g:method:getDescription"), [getFlags]("GI.Vips.Objects.Operation#g:method:getFlags"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setArgumentFromString]("GI.Vips.Objects.Object#g:method:setArgumentFromString"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setFromString]("GI.Vips.Objects.Object#g:method:setFromString"), [setRequired]("GI.Vips.Objects.Object#g:method:setRequired"), [setStatic]("GI.Vips.Objects.Object#g:method:setStatic").

#if defined(ENABLE_OVERLOADING)
    ResolveForeignSaveMethod                ,
#endif



 -- * Properties


-- ** background #attr:background#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ForeignSaveBackgroundPropertyInfo       ,
#endif
    clearForeignSaveBackground              ,
    constructForeignSaveBackground          ,
#if defined(ENABLE_OVERLOADING)
    foreignSaveBackground                   ,
#endif
    getForeignSaveBackground                ,
    setForeignSaveBackground                ,


-- ** in #attr:in#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ForeignSaveInPropertyInfo               ,
#endif
    clearForeignSaveIn                      ,
    constructForeignSaveIn                  ,
#if defined(ENABLE_OVERLOADING)
    foreignSaveIn                           ,
#endif
    getForeignSaveIn                        ,
    setForeignSaveIn                        ,


-- ** pageHeight #attr:pageHeight#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ForeignSavePageHeightPropertyInfo       ,
#endif
    constructForeignSavePageHeight          ,
#if defined(ENABLE_OVERLOADING)
    foreignSavePageHeight                   ,
#endif
    getForeignSavePageHeight                ,
    setForeignSavePageHeight                ,


-- ** strip #attr:strip#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ForeignSaveStripPropertyInfo            ,
#endif
    constructForeignSaveStrip               ,
#if defined(ENABLE_OVERLOADING)
    foreignSaveStrip                        ,
#endif
    getForeignSaveStrip                     ,
    setForeignSaveStrip                     ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Vips.Objects.Foreign as Vips.Foreign
import {-# SOURCE #-} qualified GI.Vips.Objects.Image as Vips.Image
import {-# SOURCE #-} qualified GI.Vips.Objects.Object as Vips.Object
import {-# SOURCE #-} qualified GI.Vips.Objects.Operation as Vips.Operation
import {-# SOURCE #-} qualified GI.Vips.Structs.ArrayDouble as Vips.ArrayDouble

-- | Memory-managed wrapper type.
newtype ForeignSave = ForeignSave (SP.ManagedPtr ForeignSave)
    deriving (ForeignSave -> ForeignSave -> Bool
(ForeignSave -> ForeignSave -> Bool)
-> (ForeignSave -> ForeignSave -> Bool) -> Eq ForeignSave
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ForeignSave -> ForeignSave -> Bool
== :: ForeignSave -> ForeignSave -> Bool
$c/= :: ForeignSave -> ForeignSave -> Bool
/= :: ForeignSave -> ForeignSave -> Bool
Eq)

instance SP.ManagedPtrNewtype ForeignSave where
    toManagedPtr :: ForeignSave -> ManagedPtr ForeignSave
toManagedPtr (ForeignSave ManagedPtr ForeignSave
p) = ManagedPtr ForeignSave
p

foreign import ccall "vips_foreign_save_get_type"
    c_vips_foreign_save_get_type :: IO B.Types.GType

instance B.Types.TypedObject ForeignSave where
    glibType :: IO GType
glibType = IO GType
c_vips_foreign_save_get_type

instance B.Types.GObject ForeignSave

-- | Type class for types which can be safely cast to `ForeignSave`, for instance with `toForeignSave`.
class (SP.GObject o, O.IsDescendantOf ForeignSave o) => IsForeignSave o
instance (SP.GObject o, O.IsDescendantOf ForeignSave o) => IsForeignSave o

instance O.HasParentTypes ForeignSave
type instance O.ParentTypes ForeignSave = '[Vips.Foreign.Foreign, Vips.Operation.Operation, Vips.Object.Object, GObject.Object.Object]

-- | Cast to `ForeignSave`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toForeignSave :: (MIO.MonadIO m, IsForeignSave o) => o -> m ForeignSave
toForeignSave :: forall (m :: * -> *) o.
(MonadIO m, IsForeignSave o) =>
o -> m ForeignSave
toForeignSave = IO ForeignSave -> m ForeignSave
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ForeignSave -> m ForeignSave)
-> (o -> IO ForeignSave) -> o -> m ForeignSave
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ForeignSave -> ForeignSave) -> o -> IO ForeignSave
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ForeignSave -> ForeignSave
ForeignSave

-- | Convert 'ForeignSave' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe ForeignSave) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_vips_foreign_save_get_type
    gvalueSet_ :: Ptr GValue -> Maybe ForeignSave -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ForeignSave
P.Nothing = Ptr GValue -> Ptr ForeignSave -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ForeignSave
forall a. Ptr a
FP.nullPtr :: FP.Ptr ForeignSave)
    gvalueSet_ Ptr GValue
gv (P.Just ForeignSave
obj) = ForeignSave -> (Ptr ForeignSave -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ForeignSave
obj (Ptr GValue -> Ptr ForeignSave -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe ForeignSave)
gvalueGet_ Ptr GValue
gv = do
        Ptr ForeignSave
ptr <- Ptr GValue -> IO (Ptr ForeignSave)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ForeignSave)
        if Ptr ForeignSave
ptr Ptr ForeignSave -> Ptr ForeignSave -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ForeignSave
forall a. Ptr a
FP.nullPtr
        then ForeignSave -> Maybe ForeignSave
forall a. a -> Maybe a
P.Just (ForeignSave -> Maybe ForeignSave)
-> IO ForeignSave -> IO (Maybe ForeignSave)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ForeignSave -> ForeignSave)
-> Ptr ForeignSave -> IO ForeignSave
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ForeignSave -> ForeignSave
ForeignSave Ptr ForeignSave
ptr
        else Maybe ForeignSave -> IO (Maybe ForeignSave)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ForeignSave
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveForeignSaveMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveForeignSaveMethod "argumentIsset" o = Vips.Object.ObjectArgumentIssetMethodInfo
    ResolveForeignSaveMethod "argumentNeedsstring" o = Vips.Object.ObjectArgumentNeedsstringMethodInfo
    ResolveForeignSaveMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveForeignSaveMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveForeignSaveMethod "build" o = Vips.Object.ObjectBuildMethodInfo
    ResolveForeignSaveMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveForeignSaveMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveForeignSaveMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveForeignSaveMethod "invalidate" o = Vips.Operation.OperationInvalidateMethodInfo
    ResolveForeignSaveMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveForeignSaveMethod "localCb" o = Vips.Object.ObjectLocalCbMethodInfo
    ResolveForeignSaveMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveForeignSaveMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveForeignSaveMethod "preclose" o = Vips.Object.ObjectPrecloseMethodInfo
    ResolveForeignSaveMethod "printDump" o = Vips.Object.ObjectPrintDumpMethodInfo
    ResolveForeignSaveMethod "printName" o = Vips.Object.ObjectPrintNameMethodInfo
    ResolveForeignSaveMethod "printSummary" o = Vips.Object.ObjectPrintSummaryMethodInfo
    ResolveForeignSaveMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveForeignSaveMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveForeignSaveMethod "rewind" o = Vips.Object.ObjectRewindMethodInfo
    ResolveForeignSaveMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveForeignSaveMethod "sanity" o = Vips.Object.ObjectSanityMethodInfo
    ResolveForeignSaveMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveForeignSaveMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveForeignSaveMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveForeignSaveMethod "toString" o = Vips.Object.ObjectToStringMethodInfo
    ResolveForeignSaveMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveForeignSaveMethod "unrefOutputs" o = Vips.Object.ObjectUnrefOutputsMethodInfo
    ResolveForeignSaveMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveForeignSaveMethod "getArgumentFlags" o = Vips.Object.ObjectGetArgumentFlagsMethodInfo
    ResolveForeignSaveMethod "getArgumentPriority" o = Vips.Object.ObjectGetArgumentPriorityMethodInfo
    ResolveForeignSaveMethod "getArgumentToString" o = Vips.Object.ObjectGetArgumentToStringMethodInfo
    ResolveForeignSaveMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveForeignSaveMethod "getDescription" o = Vips.Object.ObjectGetDescriptionMethodInfo
    ResolveForeignSaveMethod "getFlags" o = Vips.Operation.OperationGetFlagsMethodInfo
    ResolveForeignSaveMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveForeignSaveMethod "setArgumentFromString" o = Vips.Object.ObjectSetArgumentFromStringMethodInfo
    ResolveForeignSaveMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveForeignSaveMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveForeignSaveMethod "setFromString" o = Vips.Object.ObjectSetFromStringMethodInfo
    ResolveForeignSaveMethod "setRequired" o = Vips.Object.ObjectSetRequiredMethodInfo
    ResolveForeignSaveMethod "setStatic" o = Vips.Object.ObjectSetStaticMethodInfo
    ResolveForeignSaveMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveForeignSaveMethod t ForeignSave, O.OverloadedMethod info ForeignSave p) => OL.IsLabel t (ForeignSave -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveForeignSaveMethod t ForeignSave, O.OverloadedMethod info ForeignSave p, R.HasField t ForeignSave p) => R.HasField t ForeignSave p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveForeignSaveMethod t ForeignSave, O.OverloadedMethodInfo info ForeignSave) => OL.IsLabel t (O.MethodProxy info ForeignSave) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- VVV Prop "background"
   -- Type: TInterface (Name {namespace = "Vips", name = "ArrayDouble"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@background@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' foreignSave #background
-- @
getForeignSaveBackground :: (MonadIO m, IsForeignSave o) => o -> m (Maybe Vips.ArrayDouble.ArrayDouble)
getForeignSaveBackground :: forall (m :: * -> *) o.
(MonadIO m, IsForeignSave o) =>
o -> m (Maybe ArrayDouble)
getForeignSaveBackground o
obj = IO (Maybe ArrayDouble) -> m (Maybe ArrayDouble)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe ArrayDouble) -> m (Maybe ArrayDouble))
-> IO (Maybe ArrayDouble) -> m (Maybe ArrayDouble)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr ArrayDouble -> ArrayDouble)
-> IO (Maybe ArrayDouble)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"background" ManagedPtr ArrayDouble -> ArrayDouble
Vips.ArrayDouble.ArrayDouble

-- | Set the value of the “@background@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' foreignSave [ #background 'Data.GI.Base.Attributes.:=' value ]
-- @
setForeignSaveBackground :: (MonadIO m, IsForeignSave o) => o -> Vips.ArrayDouble.ArrayDouble -> m ()
setForeignSaveBackground :: forall (m :: * -> *) o.
(MonadIO m, IsForeignSave o) =>
o -> ArrayDouble -> m ()
setForeignSaveBackground o
obj ArrayDouble
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe ArrayDouble -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"background" (ArrayDouble -> Maybe ArrayDouble
forall a. a -> Maybe a
Just ArrayDouble
val)

-- | Construct a `GValueConstruct` with valid value for the “@background@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructForeignSaveBackground :: (IsForeignSave o, MIO.MonadIO m) => Vips.ArrayDouble.ArrayDouble -> m (GValueConstruct o)
constructForeignSaveBackground :: forall o (m :: * -> *).
(IsForeignSave o, MonadIO m) =>
ArrayDouble -> m (GValueConstruct o)
constructForeignSaveBackground ArrayDouble
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe ArrayDouble -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"background" (ArrayDouble -> Maybe ArrayDouble
forall a. a -> Maybe a
P.Just ArrayDouble
val)

-- | Set the value of the “@background@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #background
-- @
clearForeignSaveBackground :: (MonadIO m, IsForeignSave o) => o -> m ()
clearForeignSaveBackground :: forall (m :: * -> *) o. (MonadIO m, IsForeignSave o) => o -> m ()
clearForeignSaveBackground o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe ArrayDouble -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"background" (Maybe ArrayDouble
forall a. Maybe a
Nothing :: Maybe Vips.ArrayDouble.ArrayDouble)

#if defined(ENABLE_OVERLOADING)
data ForeignSaveBackgroundPropertyInfo
instance AttrInfo ForeignSaveBackgroundPropertyInfo where
    type AttrAllowedOps ForeignSaveBackgroundPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ForeignSaveBackgroundPropertyInfo = IsForeignSave
    type AttrSetTypeConstraint ForeignSaveBackgroundPropertyInfo = (~) Vips.ArrayDouble.ArrayDouble
    type AttrTransferTypeConstraint ForeignSaveBackgroundPropertyInfo = (~) Vips.ArrayDouble.ArrayDouble
    type AttrTransferType ForeignSaveBackgroundPropertyInfo = Vips.ArrayDouble.ArrayDouble
    type AttrGetType ForeignSaveBackgroundPropertyInfo = (Maybe Vips.ArrayDouble.ArrayDouble)
    type AttrLabel ForeignSaveBackgroundPropertyInfo = "background"
    type AttrOrigin ForeignSaveBackgroundPropertyInfo = ForeignSave
    attrGet = getForeignSaveBackground
    attrSet = setForeignSaveBackground
    attrTransfer _ v = do
        return v
    attrConstruct = constructForeignSaveBackground
    attrClear = clearForeignSaveBackground
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.ForeignSave.background"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-ForeignSave.html#g:attr:background"
        })
#endif

-- VVV Prop "in"
   -- Type: TInterface (Name {namespace = "Vips", name = "Image"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@in@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' foreignSave #in
-- @
getForeignSaveIn :: (MonadIO m, IsForeignSave o) => o -> m (Maybe Vips.Image.Image)
getForeignSaveIn :: forall (m :: * -> *) o.
(MonadIO m, IsForeignSave o) =>
o -> m (Maybe Image)
getForeignSaveIn o
obj = IO (Maybe Image) -> m (Maybe Image)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Image) -> m (Maybe Image))
-> IO (Maybe Image) -> m (Maybe Image)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Image -> Image) -> IO (Maybe Image)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"in" ManagedPtr Image -> Image
Vips.Image.Image

-- | Set the value of the “@in@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' foreignSave [ #in 'Data.GI.Base.Attributes.:=' value ]
-- @
setForeignSaveIn :: (MonadIO m, IsForeignSave o, Vips.Image.IsImage a) => o -> a -> m ()
setForeignSaveIn :: forall (m :: * -> *) o a.
(MonadIO m, IsForeignSave o, IsImage a) =>
o -> a -> m ()
setForeignSaveIn o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"in" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@in@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructForeignSaveIn :: (IsForeignSave o, MIO.MonadIO m, Vips.Image.IsImage a) => a -> m (GValueConstruct o)
constructForeignSaveIn :: forall o (m :: * -> *) a.
(IsForeignSave o, MonadIO m, IsImage a) =>
a -> m (GValueConstruct o)
constructForeignSaveIn a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"in" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

-- | Set the value of the “@in@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #in
-- @
clearForeignSaveIn :: (MonadIO m, IsForeignSave o) => o -> m ()
clearForeignSaveIn :: forall (m :: * -> *) o. (MonadIO m, IsForeignSave o) => o -> m ()
clearForeignSaveIn o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Image -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"in" (Maybe Image
forall a. Maybe a
Nothing :: Maybe Vips.Image.Image)

#if defined(ENABLE_OVERLOADING)
data ForeignSaveInPropertyInfo
instance AttrInfo ForeignSaveInPropertyInfo where
    type AttrAllowedOps ForeignSaveInPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ForeignSaveInPropertyInfo = IsForeignSave
    type AttrSetTypeConstraint ForeignSaveInPropertyInfo = Vips.Image.IsImage
    type AttrTransferTypeConstraint ForeignSaveInPropertyInfo = Vips.Image.IsImage
    type AttrTransferType ForeignSaveInPropertyInfo = Vips.Image.Image
    type AttrGetType ForeignSaveInPropertyInfo = (Maybe Vips.Image.Image)
    type AttrLabel ForeignSaveInPropertyInfo = "in"
    type AttrOrigin ForeignSaveInPropertyInfo = ForeignSave
    attrGet = getForeignSaveIn
    attrSet = setForeignSaveIn
    attrTransfer _ v = do
        unsafeCastTo Vips.Image.Image v
    attrConstruct = constructForeignSaveIn
    attrClear = clearForeignSaveIn
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.ForeignSave.in"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-ForeignSave.html#g:attr:in"
        })
#endif

-- VVV Prop "page-height"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@page-height@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' foreignSave #pageHeight
-- @
getForeignSavePageHeight :: (MonadIO m, IsForeignSave o) => o -> m Int32
getForeignSavePageHeight :: forall (m :: * -> *) o.
(MonadIO m, IsForeignSave o) =>
o -> m Int32
getForeignSavePageHeight o
obj = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"page-height"

-- | Set the value of the “@page-height@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' foreignSave [ #pageHeight 'Data.GI.Base.Attributes.:=' value ]
-- @
setForeignSavePageHeight :: (MonadIO m, IsForeignSave o) => o -> Int32 -> m ()
setForeignSavePageHeight :: forall (m :: * -> *) o.
(MonadIO m, IsForeignSave o) =>
o -> Int32 -> m ()
setForeignSavePageHeight o
obj Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"page-height" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@page-height@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructForeignSavePageHeight :: (IsForeignSave o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructForeignSavePageHeight :: forall o (m :: * -> *).
(IsForeignSave o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructForeignSavePageHeight Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"page-height" Int32
val

#if defined(ENABLE_OVERLOADING)
data ForeignSavePageHeightPropertyInfo
instance AttrInfo ForeignSavePageHeightPropertyInfo where
    type AttrAllowedOps ForeignSavePageHeightPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ForeignSavePageHeightPropertyInfo = IsForeignSave
    type AttrSetTypeConstraint ForeignSavePageHeightPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint ForeignSavePageHeightPropertyInfo = (~) Int32
    type AttrTransferType ForeignSavePageHeightPropertyInfo = Int32
    type AttrGetType ForeignSavePageHeightPropertyInfo = Int32
    type AttrLabel ForeignSavePageHeightPropertyInfo = "page-height"
    type AttrOrigin ForeignSavePageHeightPropertyInfo = ForeignSave
    attrGet = getForeignSavePageHeight
    attrSet = setForeignSavePageHeight
    attrTransfer _ v = do
        return v
    attrConstruct = constructForeignSavePageHeight
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.ForeignSave.pageHeight"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-ForeignSave.html#g:attr:pageHeight"
        })
#endif

-- VVV Prop "strip"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@strip@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' foreignSave #strip
-- @
getForeignSaveStrip :: (MonadIO m, IsForeignSave o) => o -> m Bool
getForeignSaveStrip :: forall (m :: * -> *) o. (MonadIO m, IsForeignSave o) => o -> m Bool
getForeignSaveStrip o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"strip"

-- | Set the value of the “@strip@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' foreignSave [ #strip 'Data.GI.Base.Attributes.:=' value ]
-- @
setForeignSaveStrip :: (MonadIO m, IsForeignSave o) => o -> Bool -> m ()
setForeignSaveStrip :: forall (m :: * -> *) o.
(MonadIO m, IsForeignSave o) =>
o -> Bool -> m ()
setForeignSaveStrip o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"strip" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@strip@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructForeignSaveStrip :: (IsForeignSave o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructForeignSaveStrip :: forall o (m :: * -> *).
(IsForeignSave o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructForeignSaveStrip Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"strip" Bool
val

#if defined(ENABLE_OVERLOADING)
data ForeignSaveStripPropertyInfo
instance AttrInfo ForeignSaveStripPropertyInfo where
    type AttrAllowedOps ForeignSaveStripPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ForeignSaveStripPropertyInfo = IsForeignSave
    type AttrSetTypeConstraint ForeignSaveStripPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint ForeignSaveStripPropertyInfo = (~) Bool
    type AttrTransferType ForeignSaveStripPropertyInfo = Bool
    type AttrGetType ForeignSaveStripPropertyInfo = Bool
    type AttrLabel ForeignSaveStripPropertyInfo = "strip"
    type AttrOrigin ForeignSaveStripPropertyInfo = ForeignSave
    attrGet = getForeignSaveStrip
    attrSet = setForeignSaveStrip
    attrTransfer _ v = do
        return v
    attrConstruct = constructForeignSaveStrip
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Vips.Objects.ForeignSave.strip"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-vips-8.0.4/docs/GI-Vips-Objects-ForeignSave.html#g:attr:strip"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ForeignSave
type instance O.AttributeList ForeignSave = ForeignSaveAttributeList
type ForeignSaveAttributeList = ('[ '("background", ForeignSaveBackgroundPropertyInfo), '("description", Vips.Object.ObjectDescriptionPropertyInfo), '("in", ForeignSaveInPropertyInfo), '("nickname", Vips.Object.ObjectNicknamePropertyInfo), '("pageHeight", ForeignSavePageHeightPropertyInfo), '("strip", ForeignSaveStripPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
foreignSaveBackground :: AttrLabelProxy "background"
foreignSaveBackground = AttrLabelProxy

foreignSaveIn :: AttrLabelProxy "in"
foreignSaveIn = AttrLabelProxy

foreignSavePageHeight :: AttrLabelProxy "pageHeight"
foreignSavePageHeight = AttrLabelProxy

foreignSaveStrip :: AttrLabelProxy "strip"
foreignSaveStrip = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ForeignSave = ForeignSaveSignalList
type ForeignSaveSignalList = ('[ '("close", Vips.Object.ObjectCloseSignalInfo), '("invalidate", Vips.Operation.OperationInvalidateSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("postbuild", Vips.Object.ObjectPostbuildSignalInfo), '("postclose", Vips.Object.ObjectPostcloseSignalInfo), '("preclose", Vips.Object.ObjectPrecloseSignalInfo)] :: [(Symbol, DK.Type)])

#endif