{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The t'GI.Clutter.Objects.BehaviourOpacity.BehaviourOpacity' structure contains only private data and
-- should be accessed using the provided API
-- 
-- /Since: 0.2/

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

module GI.Clutter.Objects.BehaviourOpacity
    ( 

-- * Exported types
    BehaviourOpacity(..)                    ,
    IsBehaviourOpacity                      ,
    toBehaviourOpacity                      ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [actorsForeach]("GI.Clutter.Objects.Behaviour#g:method:actorsForeach"), [apply]("GI.Clutter.Objects.Behaviour#g:method:apply"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isApplied]("GI.Clutter.Objects.Behaviour#g:method:isApplied"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [parseCustomNode]("GI.Clutter.Interfaces.Scriptable#g:method:parseCustomNode"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [remove]("GI.Clutter.Objects.Behaviour#g:method:remove"), [removeAll]("GI.Clutter.Objects.Behaviour#g:method:removeAll"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getActors]("GI.Clutter.Objects.Behaviour#g:method:getActors"), [getAlpha]("GI.Clutter.Objects.Behaviour#g:method:getAlpha"), [getBounds]("GI.Clutter.Objects.BehaviourOpacity#g:method:getBounds"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getId]("GI.Clutter.Interfaces.Scriptable#g:method:getId"), [getNActors]("GI.Clutter.Objects.Behaviour#g:method:getNActors"), [getNthActor]("GI.Clutter.Objects.Behaviour#g:method:getNthActor"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setAlpha]("GI.Clutter.Objects.Behaviour#g:method:setAlpha"), [setBounds]("GI.Clutter.Objects.BehaviourOpacity#g:method:setBounds"), [setCustomProperty]("GI.Clutter.Interfaces.Scriptable#g:method:setCustomProperty"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setId]("GI.Clutter.Interfaces.Scriptable#g:method:setId"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveBehaviourOpacityMethod           ,
#endif

-- ** getBounds #method:getBounds#

#if defined(ENABLE_OVERLOADING)
    BehaviourOpacityGetBoundsMethodInfo     ,
#endif
    behaviourOpacityGetBounds               ,


-- ** new #method:new#

    behaviourOpacityNew                     ,


-- ** setBounds #method:setBounds#

#if defined(ENABLE_OVERLOADING)
    BehaviourOpacitySetBoundsMethodInfo     ,
#endif
    behaviourOpacitySetBounds               ,




 -- * Properties


-- ** opacityEnd #attr:opacityEnd#
-- | Final opacity level of the behaviour.
-- 
-- /Since: 0.2/

#if defined(ENABLE_OVERLOADING)
    BehaviourOpacityOpacityEndPropertyInfo  ,
#endif
#if defined(ENABLE_OVERLOADING)
    behaviourOpacityOpacityEnd              ,
#endif
    constructBehaviourOpacityOpacityEnd     ,
    getBehaviourOpacityOpacityEnd           ,
    setBehaviourOpacityOpacityEnd           ,


-- ** opacityStart #attr:opacityStart#
-- | Initial opacity level of the behaviour.
-- 
-- /Since: 0.2/

#if defined(ENABLE_OVERLOADING)
    BehaviourOpacityOpacityStartPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
    behaviourOpacityOpacityStart            ,
#endif
    constructBehaviourOpacityOpacityStart   ,
    getBehaviourOpacityOpacityStart         ,
    setBehaviourOpacityOpacityStart         ,




    ) 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.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 {-# SOURCE #-} qualified GI.Clutter.Interfaces.Scriptable as Clutter.Scriptable
import {-# SOURCE #-} qualified GI.Clutter.Objects.Alpha as Clutter.Alpha
import {-# SOURCE #-} qualified GI.Clutter.Objects.Behaviour as Clutter.Behaviour
import qualified GI.GObject.Objects.Object as GObject.Object

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

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

foreign import ccall "clutter_behaviour_opacity_get_type"
    c_clutter_behaviour_opacity_get_type :: IO B.Types.GType

instance B.Types.TypedObject BehaviourOpacity where
    glibType :: IO GType
glibType = IO GType
c_clutter_behaviour_opacity_get_type

instance B.Types.GObject BehaviourOpacity

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

instance O.HasParentTypes BehaviourOpacity
type instance O.ParentTypes BehaviourOpacity = '[Clutter.Behaviour.Behaviour, GObject.Object.Object, Clutter.Scriptable.Scriptable]

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

-- | Convert 'BehaviourOpacity' 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 BehaviourOpacity) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_behaviour_opacity_get_type
    gvalueSet_ :: Ptr GValue -> Maybe BehaviourOpacity -> IO ()
gvalueSet_ Ptr GValue
gv Maybe BehaviourOpacity
P.Nothing = Ptr GValue -> Ptr BehaviourOpacity -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr BehaviourOpacity
forall a. Ptr a
FP.nullPtr :: FP.Ptr BehaviourOpacity)
    gvalueSet_ Ptr GValue
gv (P.Just BehaviourOpacity
obj) = BehaviourOpacity -> (Ptr BehaviourOpacity -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BehaviourOpacity
obj (Ptr GValue -> Ptr BehaviourOpacity -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe BehaviourOpacity)
gvalueGet_ Ptr GValue
gv = do
        Ptr BehaviourOpacity
ptr <- Ptr GValue -> IO (Ptr BehaviourOpacity)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr BehaviourOpacity)
        if Ptr BehaviourOpacity
ptr Ptr BehaviourOpacity -> Ptr BehaviourOpacity -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr BehaviourOpacity
forall a. Ptr a
FP.nullPtr
        then BehaviourOpacity -> Maybe BehaviourOpacity
forall a. a -> Maybe a
P.Just (BehaviourOpacity -> Maybe BehaviourOpacity)
-> IO BehaviourOpacity -> IO (Maybe BehaviourOpacity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr BehaviourOpacity -> BehaviourOpacity)
-> Ptr BehaviourOpacity -> IO BehaviourOpacity
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr BehaviourOpacity -> BehaviourOpacity
BehaviourOpacity Ptr BehaviourOpacity
ptr
        else Maybe BehaviourOpacity -> IO (Maybe BehaviourOpacity)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BehaviourOpacity
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveBehaviourOpacityMethod (t :: Symbol) (o :: *) :: * where
    ResolveBehaviourOpacityMethod "actorsForeach" o = Clutter.Behaviour.BehaviourActorsForeachMethodInfo
    ResolveBehaviourOpacityMethod "apply" o = Clutter.Behaviour.BehaviourApplyMethodInfo
    ResolveBehaviourOpacityMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveBehaviourOpacityMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveBehaviourOpacityMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveBehaviourOpacityMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveBehaviourOpacityMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveBehaviourOpacityMethod "isApplied" o = Clutter.Behaviour.BehaviourIsAppliedMethodInfo
    ResolveBehaviourOpacityMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveBehaviourOpacityMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveBehaviourOpacityMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveBehaviourOpacityMethod "parseCustomNode" o = Clutter.Scriptable.ScriptableParseCustomNodeMethodInfo
    ResolveBehaviourOpacityMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveBehaviourOpacityMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveBehaviourOpacityMethod "remove" o = Clutter.Behaviour.BehaviourRemoveMethodInfo
    ResolveBehaviourOpacityMethod "removeAll" o = Clutter.Behaviour.BehaviourRemoveAllMethodInfo
    ResolveBehaviourOpacityMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveBehaviourOpacityMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveBehaviourOpacityMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveBehaviourOpacityMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveBehaviourOpacityMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveBehaviourOpacityMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveBehaviourOpacityMethod "getActors" o = Clutter.Behaviour.BehaviourGetActorsMethodInfo
    ResolveBehaviourOpacityMethod "getAlpha" o = Clutter.Behaviour.BehaviourGetAlphaMethodInfo
    ResolveBehaviourOpacityMethod "getBounds" o = BehaviourOpacityGetBoundsMethodInfo
    ResolveBehaviourOpacityMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveBehaviourOpacityMethod "getId" o = Clutter.Scriptable.ScriptableGetIdMethodInfo
    ResolveBehaviourOpacityMethod "getNActors" o = Clutter.Behaviour.BehaviourGetNActorsMethodInfo
    ResolveBehaviourOpacityMethod "getNthActor" o = Clutter.Behaviour.BehaviourGetNthActorMethodInfo
    ResolveBehaviourOpacityMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveBehaviourOpacityMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveBehaviourOpacityMethod "setAlpha" o = Clutter.Behaviour.BehaviourSetAlphaMethodInfo
    ResolveBehaviourOpacityMethod "setBounds" o = BehaviourOpacitySetBoundsMethodInfo
    ResolveBehaviourOpacityMethod "setCustomProperty" o = Clutter.Scriptable.ScriptableSetCustomPropertyMethodInfo
    ResolveBehaviourOpacityMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveBehaviourOpacityMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveBehaviourOpacityMethod "setId" o = Clutter.Scriptable.ScriptableSetIdMethodInfo
    ResolveBehaviourOpacityMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveBehaviourOpacityMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveBehaviourOpacityMethod t BehaviourOpacity, O.OverloadedMethod info BehaviourOpacity p) => OL.IsLabel t (BehaviourOpacity -> 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 ~ ResolveBehaviourOpacityMethod t BehaviourOpacity, O.OverloadedMethod info BehaviourOpacity p, R.HasField t BehaviourOpacity p) => R.HasField t BehaviourOpacity p where
    getField = O.overloadedMethod @info

#endif

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

#endif

-- VVV Prop "opacity-end"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

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

-- | Set the value of the “@opacity-end@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' behaviourOpacity [ #opacityEnd 'Data.GI.Base.Attributes.:=' value ]
-- @
setBehaviourOpacityOpacityEnd :: (MonadIO m, IsBehaviourOpacity o) => o -> Word32 -> m ()
setBehaviourOpacityOpacityEnd :: forall (m :: * -> *) o.
(MonadIO m, IsBehaviourOpacity o) =>
o -> Word32 -> m ()
setBehaviourOpacityOpacityEnd o
obj Word32
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 -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"opacity-end" Word32
val

-- | Construct a `GValueConstruct` with valid value for the “@opacity-end@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBehaviourOpacityOpacityEnd :: (IsBehaviourOpacity o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructBehaviourOpacityOpacityEnd :: forall o (m :: * -> *).
(IsBehaviourOpacity o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructBehaviourOpacityOpacityEnd Word32
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 -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"opacity-end" Word32
val

#if defined(ENABLE_OVERLOADING)
data BehaviourOpacityOpacityEndPropertyInfo
instance AttrInfo BehaviourOpacityOpacityEndPropertyInfo where
    type AttrAllowedOps BehaviourOpacityOpacityEndPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BehaviourOpacityOpacityEndPropertyInfo = IsBehaviourOpacity
    type AttrSetTypeConstraint BehaviourOpacityOpacityEndPropertyInfo = (~) Word32
    type AttrTransferTypeConstraint BehaviourOpacityOpacityEndPropertyInfo = (~) Word32
    type AttrTransferType BehaviourOpacityOpacityEndPropertyInfo = Word32
    type AttrGetType BehaviourOpacityOpacityEndPropertyInfo = Word32
    type AttrLabel BehaviourOpacityOpacityEndPropertyInfo = "opacity-end"
    type AttrOrigin BehaviourOpacityOpacityEndPropertyInfo = BehaviourOpacity
    attrGet = getBehaviourOpacityOpacityEnd
    attrSet = setBehaviourOpacityOpacityEnd
    attrTransfer _ v = do
        return v
    attrConstruct = constructBehaviourOpacityOpacityEnd
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.BehaviourOpacity.opacityEnd"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.3/docs/GI-Clutter-Objects-BehaviourOpacity.html#g:attr:opacityEnd"
        })
#endif

-- VVV Prop "opacity-start"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

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

-- | Set the value of the “@opacity-start@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' behaviourOpacity [ #opacityStart 'Data.GI.Base.Attributes.:=' value ]
-- @
setBehaviourOpacityOpacityStart :: (MonadIO m, IsBehaviourOpacity o) => o -> Word32 -> m ()
setBehaviourOpacityOpacityStart :: forall (m :: * -> *) o.
(MonadIO m, IsBehaviourOpacity o) =>
o -> Word32 -> m ()
setBehaviourOpacityOpacityStart o
obj Word32
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 -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"opacity-start" Word32
val

-- | Construct a `GValueConstruct` with valid value for the “@opacity-start@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBehaviourOpacityOpacityStart :: (IsBehaviourOpacity o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructBehaviourOpacityOpacityStart :: forall o (m :: * -> *).
(IsBehaviourOpacity o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructBehaviourOpacityOpacityStart Word32
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 -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"opacity-start" Word32
val

#if defined(ENABLE_OVERLOADING)
data BehaviourOpacityOpacityStartPropertyInfo
instance AttrInfo BehaviourOpacityOpacityStartPropertyInfo where
    type AttrAllowedOps BehaviourOpacityOpacityStartPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BehaviourOpacityOpacityStartPropertyInfo = IsBehaviourOpacity
    type AttrSetTypeConstraint BehaviourOpacityOpacityStartPropertyInfo = (~) Word32
    type AttrTransferTypeConstraint BehaviourOpacityOpacityStartPropertyInfo = (~) Word32
    type AttrTransferType BehaviourOpacityOpacityStartPropertyInfo = Word32
    type AttrGetType BehaviourOpacityOpacityStartPropertyInfo = Word32
    type AttrLabel BehaviourOpacityOpacityStartPropertyInfo = "opacity-start"
    type AttrOrigin BehaviourOpacityOpacityStartPropertyInfo = BehaviourOpacity
    attrGet = getBehaviourOpacityOpacityStart
    attrSet = setBehaviourOpacityOpacityStart
    attrTransfer _ v = do
        return v
    attrConstruct = constructBehaviourOpacityOpacityStart
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.BehaviourOpacity.opacityStart"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.3/docs/GI-Clutter-Objects-BehaviourOpacity.html#g:attr:opacityStart"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BehaviourOpacity
type instance O.AttributeList BehaviourOpacity = BehaviourOpacityAttributeList
type BehaviourOpacityAttributeList = ('[ '("alpha", Clutter.Behaviour.BehaviourAlphaPropertyInfo), '("opacityEnd", BehaviourOpacityOpacityEndPropertyInfo), '("opacityStart", BehaviourOpacityOpacityStartPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
behaviourOpacityOpacityEnd :: AttrLabelProxy "opacityEnd"
behaviourOpacityOpacityEnd = AttrLabelProxy

behaviourOpacityOpacityStart :: AttrLabelProxy "opacityStart"
behaviourOpacityOpacityStart = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList BehaviourOpacity = BehaviourOpacitySignalList
type BehaviourOpacitySignalList = ('[ '("applied", Clutter.Behaviour.BehaviourAppliedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("removed", Clutter.Behaviour.BehaviourRemovedSignalInfo)] :: [(Symbol, *)])

#endif

-- method BehaviourOpacity::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "alpha"
--           , argType =
--               TInterface Name { namespace = "Clutter" , name = "Alpha" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterAlpha instance, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity_start"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "minimum level of opacity"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity_end"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "maximum level of opacity"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "Clutter" , name = "BehaviourOpacity" })
-- throws : False
-- Skip return : False

foreign import ccall "clutter_behaviour_opacity_new" clutter_behaviour_opacity_new :: 
    Ptr Clutter.Alpha.Alpha ->              -- alpha : TInterface (Name {namespace = "Clutter", name = "Alpha"})
    Word8 ->                                -- opacity_start : TBasicType TUInt8
    Word8 ->                                -- opacity_end : TBasicType TUInt8
    IO (Ptr BehaviourOpacity)

{-# DEPRECATED behaviourOpacityNew ["(Since version 1.6)"] #-}
-- | Creates a new t'GI.Clutter.Objects.BehaviourOpacity.BehaviourOpacity' object, driven by /@alpha@/
-- which controls the opacity property of every actor, making it
-- change in the interval between /@opacityStart@/ and /@opacityEnd@/.
-- 
-- If /@alpha@/ is not 'P.Nothing', the t'GI.Clutter.Objects.Behaviour.Behaviour' will take ownership
-- of the t'GI.Clutter.Objects.Alpha.Alpha' instance. In the case when /@alpha@/ is 'P.Nothing',
-- it can be set later with 'GI.Clutter.Objects.Behaviour.behaviourSetAlpha'.
-- 
-- /Since: 0.2/
behaviourOpacityNew ::
    (B.CallStack.HasCallStack, MonadIO m, Clutter.Alpha.IsAlpha a) =>
    Maybe (a)
    -- ^ /@alpha@/: a t'GI.Clutter.Objects.Alpha.Alpha' instance, or 'P.Nothing'
    -> Word8
    -- ^ /@opacityStart@/: minimum level of opacity
    -> Word8
    -- ^ /@opacityEnd@/: maximum level of opacity
    -> m BehaviourOpacity
    -- ^ __Returns:__ the newly created t'GI.Clutter.Objects.BehaviourOpacity.BehaviourOpacity'
behaviourOpacityNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAlpha a) =>
Maybe a -> Word8 -> Word8 -> m BehaviourOpacity
behaviourOpacityNew Maybe a
alpha Word8
opacityStart Word8
opacityEnd = IO BehaviourOpacity -> m BehaviourOpacity
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BehaviourOpacity -> m BehaviourOpacity)
-> IO BehaviourOpacity -> m BehaviourOpacity
forall a b. (a -> b) -> a -> b
$ do
    Ptr Alpha
maybeAlpha <- case Maybe a
alpha of
        Maybe a
Nothing -> Ptr Alpha -> IO (Ptr Alpha)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Alpha
forall a. Ptr a
nullPtr
        Just a
jAlpha -> do
            Ptr Alpha
jAlpha' <- a -> IO (Ptr Alpha)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jAlpha
            Ptr Alpha -> IO (Ptr Alpha)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Alpha
jAlpha'
    Ptr BehaviourOpacity
result <- Ptr Alpha -> Word8 -> Word8 -> IO (Ptr BehaviourOpacity)
clutter_behaviour_opacity_new Ptr Alpha
maybeAlpha Word8
opacityStart Word8
opacityEnd
    Text -> Ptr BehaviourOpacity -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"behaviourOpacityNew" Ptr BehaviourOpacity
result
    BehaviourOpacity
result' <- ((ManagedPtr BehaviourOpacity -> BehaviourOpacity)
-> Ptr BehaviourOpacity -> IO BehaviourOpacity
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BehaviourOpacity -> BehaviourOpacity
BehaviourOpacity) Ptr BehaviourOpacity
result
    Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
alpha a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    BehaviourOpacity -> IO BehaviourOpacity
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return BehaviourOpacity
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method BehaviourOpacity::get_bounds
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "behaviour"
--           , argType =
--               TInterface
--                 Name { namespace = "Clutter" , name = "BehaviourOpacity" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterBehaviourOpacity"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity_start"
--           , argType = TBasicType TUInt8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the minimum level of opacity, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "opacity_end"
--           , argType = TBasicType TUInt8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the maximum level of opacity, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "clutter_behaviour_opacity_get_bounds" clutter_behaviour_opacity_get_bounds :: 
    Ptr BehaviourOpacity ->                 -- behaviour : TInterface (Name {namespace = "Clutter", name = "BehaviourOpacity"})
    Ptr Word8 ->                            -- opacity_start : TBasicType TUInt8
    Ptr Word8 ->                            -- opacity_end : TBasicType TUInt8
    IO ()

{-# DEPRECATED behaviourOpacityGetBounds ["(Since version 1.6)"] #-}
-- | Gets the initial and final levels of the opacity applied by /@behaviour@/
-- on each actor it controls.
-- 
-- /Since: 0.6/
behaviourOpacityGetBounds ::
    (B.CallStack.HasCallStack, MonadIO m, IsBehaviourOpacity a) =>
    a
    -- ^ /@behaviour@/: a t'GI.Clutter.Objects.BehaviourOpacity.BehaviourOpacity'
    -> m ((Word8, Word8))
behaviourOpacityGetBounds :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBehaviourOpacity a) =>
a -> m (Word8, Word8)
behaviourOpacityGetBounds a
behaviour = IO (Word8, Word8) -> m (Word8, Word8)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word8, Word8) -> m (Word8, Word8))
-> IO (Word8, Word8) -> m (Word8, Word8)
forall a b. (a -> b) -> a -> b
$ do
    Ptr BehaviourOpacity
behaviour' <- a -> IO (Ptr BehaviourOpacity)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
behaviour
    Ptr Word8
opacityStart <- IO (Ptr Word8)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word8)
    Ptr Word8
opacityEnd <- IO (Ptr Word8)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word8)
    Ptr BehaviourOpacity -> Ptr Word8 -> Ptr Word8 -> IO ()
clutter_behaviour_opacity_get_bounds Ptr BehaviourOpacity
behaviour' Ptr Word8
opacityStart Ptr Word8
opacityEnd
    Word8
opacityStart' <- Ptr Word8 -> IO Word8
forall a. Storable a => Ptr a -> IO a
peek Ptr Word8
opacityStart
    Word8
opacityEnd' <- Ptr Word8 -> IO Word8
forall a. Storable a => Ptr a -> IO a
peek Ptr Word8
opacityEnd
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
behaviour
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
opacityStart
    Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
opacityEnd
    (Word8, Word8) -> IO (Word8, Word8)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word8
opacityStart', Word8
opacityEnd')

#if defined(ENABLE_OVERLOADING)
data BehaviourOpacityGetBoundsMethodInfo
instance (signature ~ (m ((Word8, Word8))), MonadIO m, IsBehaviourOpacity a) => O.OverloadedMethod BehaviourOpacityGetBoundsMethodInfo a signature where
    overloadedMethod = behaviourOpacityGetBounds

instance O.OverloadedMethodInfo BehaviourOpacityGetBoundsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.BehaviourOpacity.behaviourOpacityGetBounds",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.3/docs/GI-Clutter-Objects-BehaviourOpacity.html#v:behaviourOpacityGetBounds"
        })


#endif

-- method BehaviourOpacity::set_bounds
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "behaviour"
--           , argType =
--               TInterface
--                 Name { namespace = "Clutter" , name = "BehaviourOpacity" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #ClutterBehaviourOpacity"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity_start"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "minimum level of opacity"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity_end"
--           , argType = TBasicType TUInt8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "maximum level of opacity"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "clutter_behaviour_opacity_set_bounds" clutter_behaviour_opacity_set_bounds :: 
    Ptr BehaviourOpacity ->                 -- behaviour : TInterface (Name {namespace = "Clutter", name = "BehaviourOpacity"})
    Word8 ->                                -- opacity_start : TBasicType TUInt8
    Word8 ->                                -- opacity_end : TBasicType TUInt8
    IO ()

{-# DEPRECATED behaviourOpacitySetBounds ["(Since version 1.6)"] #-}
-- | Sets the initial and final levels of the opacity applied by /@behaviour@/
-- on each actor it controls.
-- 
-- /Since: 0.6/
behaviourOpacitySetBounds ::
    (B.CallStack.HasCallStack, MonadIO m, IsBehaviourOpacity a) =>
    a
    -- ^ /@behaviour@/: a t'GI.Clutter.Objects.BehaviourOpacity.BehaviourOpacity'
    -> Word8
    -- ^ /@opacityStart@/: minimum level of opacity
    -> Word8
    -- ^ /@opacityEnd@/: maximum level of opacity
    -> m ()
behaviourOpacitySetBounds :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBehaviourOpacity a) =>
a -> Word8 -> Word8 -> m ()
behaviourOpacitySetBounds a
behaviour Word8
opacityStart Word8
opacityEnd = 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
$ do
    Ptr BehaviourOpacity
behaviour' <- a -> IO (Ptr BehaviourOpacity)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
behaviour
    Ptr BehaviourOpacity -> Word8 -> Word8 -> IO ()
clutter_behaviour_opacity_set_bounds Ptr BehaviourOpacity
behaviour' Word8
opacityStart Word8
opacityEnd
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
behaviour
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BehaviourOpacitySetBoundsMethodInfo
instance (signature ~ (Word8 -> Word8 -> m ()), MonadIO m, IsBehaviourOpacity a) => O.OverloadedMethod BehaviourOpacitySetBoundsMethodInfo a signature where
    overloadedMethod = behaviourOpacitySetBounds

instance O.OverloadedMethodInfo BehaviourOpacitySetBoundsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Clutter.Objects.BehaviourOpacity.behaviourOpacitySetBounds",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-clutter-1.0.3/docs/GI-Clutter-Objects-BehaviourOpacity.html#v:behaviourOpacitySetBounds"
        })


#endif