{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Deprecated

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

module GI.Gtk.Structs.RcProperty
    ( 

-- * Exported types
    RcProperty(..)                          ,
    newZeroRcProperty                       ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveRcPropertyMethod                 ,
#endif


-- ** parseBorder #method:parseBorder#

    rcPropertyParseBorder                   ,


-- ** parseColor #method:parseColor#

    rcPropertyParseColor                    ,


-- ** parseEnum #method:parseEnum#

    rcPropertyParseEnum                     ,


-- ** parseFlags #method:parseFlags#

    rcPropertyParseFlags                    ,


-- ** parseRequisition #method:parseRequisition#

    rcPropertyParseRequisition              ,




 -- * Properties
-- ** origin #attr:origin#
-- | field similar to one found in t'GI.Gtk.Structs.SettingsValue.SettingsValue'

    clearRcPropertyOrigin                   ,
    getRcPropertyOrigin                     ,
#if defined(ENABLE_OVERLOADING)
    rcProperty_origin                       ,
#endif
    setRcPropertyOrigin                     ,


-- ** propertyName #attr:propertyName#
-- | quark-ified property identifier like
--   “GtkScrollbar[spacing](#g:signal:spacing)”

    getRcPropertyPropertyName               ,
#if defined(ENABLE_OVERLOADING)
    rcProperty_propertyName                 ,
#endif
    setRcPropertyPropertyName               ,


-- ** typeName #attr:typeName#
-- | quark-ified type identifier

    getRcPropertyTypeName                   ,
#if defined(ENABLE_OVERLOADING)
    rcProperty_typeName                     ,
#endif
    setRcPropertyTypeName                   ,


-- ** value #attr:value#
-- | field similar to one found in t'GI.Gtk.Structs.SettingsValue.SettingsValue'

    clearRcPropertyValue                    ,
    getRcPropertyValue                      ,
#if defined(ENABLE_OVERLOADING)
    rcProperty_value                        ,
#endif
    setRcPropertyValue                      ,




    ) 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.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.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 GI.GLib.Structs.String as GLib.String

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

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

instance BoxedPtr RcProperty where
    boxedPtrCopy :: RcProperty -> IO RcProperty
boxedPtrCopy = \RcProperty
p -> RcProperty -> (Ptr RcProperty -> IO RcProperty) -> IO RcProperty
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr RcProperty
p (Int -> Ptr RcProperty -> IO (Ptr RcProperty)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
40 (Ptr RcProperty -> IO (Ptr RcProperty))
-> (Ptr RcProperty -> IO RcProperty)
-> Ptr RcProperty
-> IO RcProperty
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr RcProperty -> RcProperty)
-> Ptr RcProperty -> IO RcProperty
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr RcProperty -> RcProperty
RcProperty)
    boxedPtrFree :: RcProperty -> IO ()
boxedPtrFree = \RcProperty
x -> RcProperty -> (Ptr RcProperty -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr RcProperty
x Ptr RcProperty -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr RcProperty where
    boxedPtrCalloc :: IO (Ptr RcProperty)
boxedPtrCalloc = Int -> IO (Ptr RcProperty)
forall a. Int -> IO (Ptr a)
callocBytes Int
40


-- | Construct a `RcProperty` struct initialized to zero.
newZeroRcProperty :: MonadIO m => m RcProperty
newZeroRcProperty :: m RcProperty
newZeroRcProperty = IO RcProperty -> m RcProperty
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RcProperty -> m RcProperty) -> IO RcProperty -> m RcProperty
forall a b. (a -> b) -> a -> b
$ IO (Ptr RcProperty)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr RcProperty)
-> (Ptr RcProperty -> IO RcProperty) -> IO RcProperty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr RcProperty -> RcProperty)
-> Ptr RcProperty -> IO RcProperty
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr RcProperty -> RcProperty
RcProperty

instance tag ~ 'AttrSet => Constructible RcProperty tag where
    new :: (ManagedPtr RcProperty -> RcProperty)
-> [AttrOp RcProperty tag] -> m RcProperty
new ManagedPtr RcProperty -> RcProperty
_ [AttrOp RcProperty tag]
attrs = do
        RcProperty
o <- m RcProperty
forall (m :: * -> *). MonadIO m => m RcProperty
newZeroRcProperty
        RcProperty -> [AttrOp RcProperty 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set RcProperty
o [AttrOp RcProperty tag]
[AttrOp RcProperty 'AttrSet]
attrs
        RcProperty -> m RcProperty
forall (m :: * -> *) a. Monad m => a -> m a
return RcProperty
o


-- | Get the value of the “@type_name@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' rcProperty #typeName
-- @
getRcPropertyTypeName :: MonadIO m => RcProperty -> m Word32
getRcPropertyTypeName :: RcProperty -> m Word32
getRcPropertyTypeName RcProperty
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO Word32) -> IO Word32)
-> (Ptr RcProperty -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Word32
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@type_name@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' rcProperty [ #typeName 'Data.GI.Base.Attributes.:=' value ]
-- @
setRcPropertyTypeName :: MonadIO m => RcProperty -> Word32 -> m ()
setRcPropertyTypeName :: RcProperty -> Word32 -> m ()
setRcPropertyTypeName RcProperty
s Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO ()) -> IO ())
-> (Ptr RcProperty -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Word32
val :: Word32)

#if defined(ENABLE_OVERLOADING)
data RcPropertyTypeNameFieldInfo
instance AttrInfo RcPropertyTypeNameFieldInfo where
    type AttrBaseTypeConstraint RcPropertyTypeNameFieldInfo = (~) RcProperty
    type AttrAllowedOps RcPropertyTypeNameFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint RcPropertyTypeNameFieldInfo = (~) Word32
    type AttrTransferTypeConstraint RcPropertyTypeNameFieldInfo = (~)Word32
    type AttrTransferType RcPropertyTypeNameFieldInfo = Word32
    type AttrGetType RcPropertyTypeNameFieldInfo = Word32
    type AttrLabel RcPropertyTypeNameFieldInfo = "type_name"
    type AttrOrigin RcPropertyTypeNameFieldInfo = RcProperty
    attrGet = getRcPropertyTypeName
    attrSet = setRcPropertyTypeName
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v

rcProperty_typeName :: AttrLabelProxy "typeName"
rcProperty_typeName = AttrLabelProxy

#endif


-- | Get the value of the “@property_name@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' rcProperty #propertyName
-- @
getRcPropertyPropertyName :: MonadIO m => RcProperty -> m Word32
getRcPropertyPropertyName :: RcProperty -> m Word32
getRcPropertyPropertyName RcProperty
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO Word32) -> IO Word32)
-> (Ptr RcProperty -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO Word32
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val

-- | Set the value of the “@property_name@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' rcProperty [ #propertyName 'Data.GI.Base.Attributes.:=' value ]
-- @
setRcPropertyPropertyName :: MonadIO m => RcProperty -> Word32 -> m ()
setRcPropertyPropertyName :: RcProperty -> Word32 -> m ()
setRcPropertyPropertyName RcProperty
s Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO ()) -> IO ())
-> (Ptr RcProperty -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Word32
val :: Word32)

#if defined(ENABLE_OVERLOADING)
data RcPropertyPropertyNameFieldInfo
instance AttrInfo RcPropertyPropertyNameFieldInfo where
    type AttrBaseTypeConstraint RcPropertyPropertyNameFieldInfo = (~) RcProperty
    type AttrAllowedOps RcPropertyPropertyNameFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint RcPropertyPropertyNameFieldInfo = (~) Word32
    type AttrTransferTypeConstraint RcPropertyPropertyNameFieldInfo = (~)Word32
    type AttrTransferType RcPropertyPropertyNameFieldInfo = Word32
    type AttrGetType RcPropertyPropertyNameFieldInfo = Word32
    type AttrLabel RcPropertyPropertyNameFieldInfo = "property_name"
    type AttrOrigin RcPropertyPropertyNameFieldInfo = RcProperty
    attrGet = getRcPropertyPropertyName
    attrSet = setRcPropertyPropertyName
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v

rcProperty_propertyName :: AttrLabelProxy "propertyName"
rcProperty_propertyName = AttrLabelProxy

#endif


-- | Get the value of the “@origin@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' rcProperty #origin
-- @
getRcPropertyOrigin :: MonadIO m => RcProperty -> m (Maybe T.Text)
getRcPropertyOrigin :: RcProperty -> m (Maybe Text)
getRcPropertyOrigin RcProperty
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ RcProperty
-> (Ptr RcProperty -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RcProperty -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO CString
    Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
val' -> do
        Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result

-- | Set the value of the “@origin@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' rcProperty [ #origin 'Data.GI.Base.Attributes.:=' value ]
-- @
setRcPropertyOrigin :: MonadIO m => RcProperty -> CString -> m ()
setRcPropertyOrigin :: RcProperty -> CString -> m ()
setRcPropertyOrigin RcProperty
s CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO ()) -> IO ())
-> (Ptr RcProperty -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
val :: CString)

-- | Set the value of the “@origin@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #origin
-- @
clearRcPropertyOrigin :: MonadIO m => RcProperty -> m ()
clearRcPropertyOrigin :: RcProperty -> m ()
clearRcPropertyOrigin RcProperty
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO ()) -> IO ())
-> (Ptr RcProperty -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
forall a. Ptr a
FP.nullPtr :: CString)

#if defined(ENABLE_OVERLOADING)
data RcPropertyOriginFieldInfo
instance AttrInfo RcPropertyOriginFieldInfo where
    type AttrBaseTypeConstraint RcPropertyOriginFieldInfo = (~) RcProperty
    type AttrAllowedOps RcPropertyOriginFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RcPropertyOriginFieldInfo = (~) CString
    type AttrTransferTypeConstraint RcPropertyOriginFieldInfo = (~)CString
    type AttrTransferType RcPropertyOriginFieldInfo = CString
    type AttrGetType RcPropertyOriginFieldInfo = Maybe T.Text
    type AttrLabel RcPropertyOriginFieldInfo = "origin"
    type AttrOrigin RcPropertyOriginFieldInfo = RcProperty
    attrGet = getRcPropertyOrigin
    attrSet = setRcPropertyOrigin
    attrConstruct = undefined
    attrClear = clearRcPropertyOrigin
    attrTransfer _ v = do
        return v

rcProperty_origin :: AttrLabelProxy "origin"
rcProperty_origin = AttrLabelProxy

#endif


-- | Get the value of the “@value@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' rcProperty #value
-- @
getRcPropertyValue :: MonadIO m => RcProperty -> m (Maybe GValue)
getRcPropertyValue :: RcProperty -> m (Maybe GValue)
getRcPropertyValue RcProperty
s = IO (Maybe GValue) -> m (Maybe GValue)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GValue) -> m (Maybe GValue))
-> IO (Maybe GValue) -> m (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ RcProperty
-> (Ptr RcProperty -> IO (Maybe GValue)) -> IO (Maybe GValue)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO (Maybe GValue)) -> IO (Maybe GValue))
-> (Ptr RcProperty -> IO (Maybe GValue)) -> IO (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Ptr GValue
val <- Ptr (Ptr GValue) -> IO (Ptr GValue)
forall a. Storable a => Ptr a -> IO a
peek (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr (Ptr GValue)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO (Ptr GValue)
    Maybe GValue
result <- Ptr GValue -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr GValue
val ((Ptr GValue -> IO GValue) -> IO (Maybe GValue))
-> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ \Ptr GValue
val' -> do
        GValue
val'' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
val'
        GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
val''
    Maybe GValue -> IO (Maybe GValue)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GValue
result

-- | Set the value of the “@value@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' rcProperty [ #value 'Data.GI.Base.Attributes.:=' value ]
-- @
setRcPropertyValue :: MonadIO m => RcProperty -> Ptr GValue -> m ()
setRcPropertyValue :: RcProperty -> Ptr GValue -> m ()
setRcPropertyValue RcProperty
s Ptr GValue
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO ()) -> IO ())
-> (Ptr RcProperty -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Ptr (Ptr GValue) -> Ptr GValue -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr (Ptr GValue)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr GValue
val :: Ptr GValue)

-- | Set the value of the “@value@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #value
-- @
clearRcPropertyValue :: MonadIO m => RcProperty -> m ()
clearRcPropertyValue :: RcProperty -> m ()
clearRcPropertyValue RcProperty
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RcProperty -> (Ptr RcProperty -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RcProperty
s ((Ptr RcProperty -> IO ()) -> IO ())
-> (Ptr RcProperty -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RcProperty
ptr -> do
    Ptr (Ptr GValue) -> Ptr GValue -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RcProperty
ptr Ptr RcProperty -> Int -> Ptr (Ptr GValue)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Ptr GValue
forall a. Ptr a
FP.nullPtr :: Ptr GValue)

#if defined(ENABLE_OVERLOADING)
data RcPropertyValueFieldInfo
instance AttrInfo RcPropertyValueFieldInfo where
    type AttrBaseTypeConstraint RcPropertyValueFieldInfo = (~) RcProperty
    type AttrAllowedOps RcPropertyValueFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RcPropertyValueFieldInfo = (~) (Ptr GValue)
    type AttrTransferTypeConstraint RcPropertyValueFieldInfo = (~)(Ptr GValue)
    type AttrTransferType RcPropertyValueFieldInfo = (Ptr GValue)
    type AttrGetType RcPropertyValueFieldInfo = Maybe GValue
    type AttrLabel RcPropertyValueFieldInfo = "value"
    type AttrOrigin RcPropertyValueFieldInfo = RcProperty
    attrGet = getRcPropertyValue
    attrSet = setRcPropertyValue
    attrConstruct = undefined
    attrClear = clearRcPropertyValue
    attrTransfer _ v = do
        return v

rcProperty_value :: AttrLabelProxy "value"
rcProperty_value = AttrLabelProxy

#endif



#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RcProperty
type instance O.AttributeList RcProperty = RcPropertyAttributeList
type RcPropertyAttributeList = ('[ '("typeName", RcPropertyTypeNameFieldInfo), '("propertyName", RcPropertyPropertyNameFieldInfo), '("origin", RcPropertyOriginFieldInfo), '("value", RcPropertyValueFieldInfo)] :: [(Symbol, *)])
#endif

-- method RcProperty::parse_border
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "pspec"
--           , argType = TParamSpec
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GParamSpec" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "gstring"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "String" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GString to be parsed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GValue which must hold boxed values."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_border" gtk_rc_property_parse_border :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String.String ->               -- gstring : TInterface (Name {namespace = "GLib", name = "String"})
    Ptr GValue ->                           -- property_value : TGValue
    IO CInt

-- | A t'GI.Gtk.Callbacks.RcPropertyParser' for use with 'GI.Gtk.Objects.Settings.settingsInstallPropertyParser'
-- or @/gtk_widget_class_install_style_property_parser()/@ which parses
-- borders in the form
-- @\"{ left, right, top, bottom }\"@ for integers
-- left, right, top and bottom.
rcPropertyParseBorder ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GParamSpec
    -- ^ /@pspec@/: a t'GI.GObject.Objects.ParamSpec.ParamSpec'
    -> GLib.String.String
    -- ^ /@gstring@/: the t'GI.GLib.Structs.String.String' to be parsed
    -> GValue
    -- ^ /@propertyValue@/: a t'GI.GObject.Structs.Value.Value' which must hold boxed values.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@gstring@/ could be parsed and /@propertyValue@/
    -- has been set to the resulting t'GI.Gtk.Structs.Border.Border'.
rcPropertyParseBorder :: GParamSpec -> String -> GValue -> m Bool
rcPropertyParseBorder GParamSpec
pspec String
gstring GValue
propertyValue = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr String
gstring' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
gstring
    Ptr GValue
propertyValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
propertyValue
    CInt
result <- Ptr GParamSpec -> Ptr String -> Ptr GValue -> IO CInt
gtk_rc_property_parse_border Ptr GParamSpec
pspec' Ptr String
gstring' Ptr GValue
propertyValue'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
gstring
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
propertyValue
    Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
propertyValue'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method RcProperty::parse_color
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "pspec"
--           , argType = TParamSpec
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GParamSpec" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "gstring"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "String" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GString to be parsed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GValue which must hold #GdkColor values."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_color" gtk_rc_property_parse_color :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String.String ->               -- gstring : TInterface (Name {namespace = "GLib", name = "String"})
    Ptr GValue ->                           -- property_value : TGValue
    IO CInt

-- | A t'GI.Gtk.Callbacks.RcPropertyParser' for use with 'GI.Gtk.Objects.Settings.settingsInstallPropertyParser'
-- or @/gtk_widget_class_install_style_property_parser()/@ which parses a
-- color given either by its name or in the form
-- @{ red, green, blue }@ where red, green and
-- blue are integers between 0 and 65535 or floating-point numbers
-- between 0 and 1.
rcPropertyParseColor ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GParamSpec
    -- ^ /@pspec@/: a t'GI.GObject.Objects.ParamSpec.ParamSpec'
    -> GLib.String.String
    -- ^ /@gstring@/: the t'GI.GLib.Structs.String.String' to be parsed
    -> GValue
    -- ^ /@propertyValue@/: a t'GI.GObject.Structs.Value.Value' which must hold t'GI.Gdk.Structs.Color.Color' values.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@gstring@/ could be parsed and /@propertyValue@/
    -- has been set to the resulting t'GI.Gdk.Structs.Color.Color'.
rcPropertyParseColor :: GParamSpec -> String -> GValue -> m Bool
rcPropertyParseColor GParamSpec
pspec String
gstring GValue
propertyValue = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr String
gstring' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
gstring
    Ptr GValue
propertyValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
propertyValue
    CInt
result <- Ptr GParamSpec -> Ptr String -> Ptr GValue -> IO CInt
gtk_rc_property_parse_color Ptr GParamSpec
pspec' Ptr String
gstring' Ptr GValue
propertyValue'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
gstring
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
propertyValue
    Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
propertyValue'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method RcProperty::parse_enum
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "pspec"
--           , argType = TParamSpec
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GParamSpec" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "gstring"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "String" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GString to be parsed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GValue which must hold enum values."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_enum" gtk_rc_property_parse_enum :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String.String ->               -- gstring : TInterface (Name {namespace = "GLib", name = "String"})
    Ptr GValue ->                           -- property_value : TGValue
    IO CInt

-- | A t'GI.Gtk.Callbacks.RcPropertyParser' for use with 'GI.Gtk.Objects.Settings.settingsInstallPropertyParser'
-- or @/gtk_widget_class_install_style_property_parser()/@ which parses a single
-- enumeration value.
-- 
-- The enumeration value can be specified by its name, its nickname or
-- its numeric value. For consistency with flags parsing, the value
-- may be surrounded by parentheses.
rcPropertyParseEnum ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GParamSpec
    -- ^ /@pspec@/: a t'GI.GObject.Objects.ParamSpec.ParamSpec'
    -> GLib.String.String
    -- ^ /@gstring@/: the t'GI.GLib.Structs.String.String' to be parsed
    -> GValue
    -- ^ /@propertyValue@/: a t'GI.GObject.Structs.Value.Value' which must hold enum values.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@gstring@/ could be parsed and /@propertyValue@/
    -- has been set to the resulting t'GI.GObject.Structs.EnumValue.EnumValue'.
rcPropertyParseEnum :: GParamSpec -> String -> GValue -> m Bool
rcPropertyParseEnum GParamSpec
pspec String
gstring GValue
propertyValue = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr String
gstring' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
gstring
    Ptr GValue
propertyValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
propertyValue
    CInt
result <- Ptr GParamSpec -> Ptr String -> Ptr GValue -> IO CInt
gtk_rc_property_parse_enum Ptr GParamSpec
pspec' Ptr String
gstring' Ptr GValue
propertyValue'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
gstring
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
propertyValue
    Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
propertyValue'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method RcProperty::parse_flags
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "pspec"
--           , argType = TParamSpec
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GParamSpec" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "gstring"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "String" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GString to be parsed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GValue which must hold flags values."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_flags" gtk_rc_property_parse_flags :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String.String ->               -- gstring : TInterface (Name {namespace = "GLib", name = "String"})
    Ptr GValue ->                           -- property_value : TGValue
    IO CInt

-- | A t'GI.Gtk.Callbacks.RcPropertyParser' for use with 'GI.Gtk.Objects.Settings.settingsInstallPropertyParser'
-- or @/gtk_widget_class_install_style_property_parser()/@ which parses flags.
-- 
-- Flags can be specified by their name, their nickname or
-- numerically. Multiple flags can be specified in the form
-- @\"( flag1 | flag2 | ... )\"@.
rcPropertyParseFlags ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GParamSpec
    -- ^ /@pspec@/: a t'GI.GObject.Objects.ParamSpec.ParamSpec'
    -> GLib.String.String
    -- ^ /@gstring@/: the t'GI.GLib.Structs.String.String' to be parsed
    -> GValue
    -- ^ /@propertyValue@/: a t'GI.GObject.Structs.Value.Value' which must hold flags values.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@gstring@/ could be parsed and /@propertyValue@/
    -- has been set to the resulting flags value.
rcPropertyParseFlags :: GParamSpec -> String -> GValue -> m Bool
rcPropertyParseFlags GParamSpec
pspec String
gstring GValue
propertyValue = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr String
gstring' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
gstring
    Ptr GValue
propertyValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
propertyValue
    CInt
result <- Ptr GParamSpec -> Ptr String -> Ptr GValue -> IO CInt
gtk_rc_property_parse_flags Ptr GParamSpec
pspec' Ptr String
gstring' Ptr GValue
propertyValue'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
gstring
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
propertyValue
    Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
propertyValue'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method RcProperty::parse_requisition
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "pspec"
--           , argType = TParamSpec
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GParamSpec" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "gstring"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "String" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GString to be parsed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "property_value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GValue which must hold boxed values."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_property_parse_requisition" gtk_rc_property_parse_requisition :: 
    Ptr GParamSpec ->                       -- pspec : TParamSpec
    Ptr GLib.String.String ->               -- gstring : TInterface (Name {namespace = "GLib", name = "String"})
    Ptr GValue ->                           -- property_value : TGValue
    IO CInt

-- | A t'GI.Gtk.Callbacks.RcPropertyParser' for use with 'GI.Gtk.Objects.Settings.settingsInstallPropertyParser'
-- or @/gtk_widget_class_install_style_property_parser()/@ which parses a
-- requisition in the form
-- @\"{ width, height }\"@ for integers @/width/@ and @/height/@.
rcPropertyParseRequisition ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    GParamSpec
    -- ^ /@pspec@/: a t'GI.GObject.Objects.ParamSpec.ParamSpec'
    -> GLib.String.String
    -- ^ /@gstring@/: the t'GI.GLib.Structs.String.String' to be parsed
    -> GValue
    -- ^ /@propertyValue@/: a t'GI.GObject.Structs.Value.Value' which must hold boxed values.
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@gstring@/ could be parsed and /@propertyValue@/
    -- has been set to the resulting t'GI.Gtk.Structs.Requisition.Requisition'.
rcPropertyParseRequisition :: GParamSpec -> String -> GValue -> m Bool
rcPropertyParseRequisition GParamSpec
pspec String
gstring GValue
propertyValue = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr String
gstring' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
gstring
    Ptr GValue
propertyValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
propertyValue
    CInt
result <- Ptr GParamSpec -> Ptr String -> Ptr GValue -> IO CInt
gtk_rc_property_parse_requisition Ptr GParamSpec
pspec' Ptr String
gstring' Ptr GValue
propertyValue'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
gstring
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
propertyValue
    Ptr GValue -> IO ()
B.GValue.unsetGValue Ptr GValue
propertyValue'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveRcPropertyMethod (t :: Symbol) (o :: *) :: * where
    ResolveRcPropertyMethod l o = O.MethodResolutionFailed l o

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

#endif