{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A GtkRecentFilterInfo struct is used
-- to pass information about the tested file to 'GI.Gtk.Objects.RecentFilter.recentFilterFilter'.

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

module GI.Gtk.Structs.RecentFilterInfo
    ( 

-- * Exported types
    RecentFilterInfo(..)                    ,
    newZeroRecentFilterInfo                 ,


 -- * Methods

#if defined(ENABLE_OVERLOADING)
    ResolveRecentFilterInfoMethod           ,
#endif



 -- * Properties


-- ** age #attr:age#
-- | The number of days elapsed since the file has been
--    registered.

    getRecentFilterInfoAge                  ,
#if defined(ENABLE_OVERLOADING)
    recentFilterInfo_age                    ,
#endif
    setRecentFilterInfoAge                  ,


-- ** applications #attr:applications#
-- | The list of
--    applications that have registered the file.

    clearRecentFilterInfoApplications       ,
    getRecentFilterInfoApplications         ,
#if defined(ENABLE_OVERLOADING)
    recentFilterInfo_applications           ,
#endif
    setRecentFilterInfoApplications         ,


-- ** contains #attr:contains#
-- | t'GI.Gtk.Flags.RecentFilterFlags' to indicate which fields are set.

    getRecentFilterInfoContains             ,
#if defined(ENABLE_OVERLOADING)
    recentFilterInfo_contains               ,
#endif
    setRecentFilterInfoContains             ,


-- ** displayName #attr:displayName#
-- | The string that will be used to display
--    the file in the recent chooser.

    clearRecentFilterInfoDisplayName        ,
    getRecentFilterInfoDisplayName          ,
#if defined(ENABLE_OVERLOADING)
    recentFilterInfo_displayName            ,
#endif
    setRecentFilterInfoDisplayName          ,


-- ** groups #attr:groups#
-- | The groups to which
--    the file belongs to.

    clearRecentFilterInfoGroups             ,
    getRecentFilterInfoGroups               ,
#if defined(ENABLE_OVERLOADING)
    recentFilterInfo_groups                 ,
#endif
    setRecentFilterInfoGroups               ,


-- ** mimeType #attr:mimeType#
-- | MIME type of the file.

    clearRecentFilterInfoMimeType           ,
    getRecentFilterInfoMimeType             ,
#if defined(ENABLE_OVERLOADING)
    recentFilterInfo_mimeType               ,
#endif
    setRecentFilterInfoMimeType             ,


-- ** uri #attr:uri#
-- | The URI of the file being tested.

    clearRecentFilterInfoUri                ,
    getRecentFilterInfoUri                  ,
#if defined(ENABLE_OVERLOADING)
    recentFilterInfo_uri                    ,
#endif
    setRecentFilterInfoUri                  ,




    ) 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 GHC.Records as R

import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags

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

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

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


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

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


-- | Get the value of the “@contains@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' recentFilterInfo #contains
-- @
getRecentFilterInfoContains :: MonadIO m => RecentFilterInfo -> m [Gtk.Flags.RecentFilterFlags]
getRecentFilterInfoContains :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> m [RecentFilterFlags]
getRecentFilterInfoContains RecentFilterInfo
s = IO [RecentFilterFlags] -> m [RecentFilterFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [RecentFilterFlags] -> m [RecentFilterFlags])
-> IO [RecentFilterFlags] -> m [RecentFilterFlags]
forall a b. (a -> b) -> a -> b
$ RecentFilterInfo
-> (Ptr RecentFilterInfo -> IO [RecentFilterFlags])
-> IO [RecentFilterFlags]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO [RecentFilterFlags])
 -> IO [RecentFilterFlags])
-> (Ptr RecentFilterInfo -> IO [RecentFilterFlags])
-> IO [RecentFilterFlags]
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CUInt
    let val' :: [RecentFilterFlags]
val' = CUInt -> [RecentFilterFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
val
    [RecentFilterFlags] -> IO [RecentFilterFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [RecentFilterFlags]
val'

-- | Set the value of the “@contains@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' recentFilterInfo [ #contains 'Data.GI.Base.Attributes.:=' value ]
-- @
setRecentFilterInfoContains :: MonadIO m => RecentFilterInfo -> [Gtk.Flags.RecentFilterFlags] -> m ()
setRecentFilterInfoContains :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> [RecentFilterFlags] -> m ()
setRecentFilterInfoContains RecentFilterInfo
s [RecentFilterFlags]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    let val' :: CUInt
val' = [RecentFilterFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RecentFilterFlags]
val
    Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CUInt
val' :: CUInt)

#if defined(ENABLE_OVERLOADING)
data RecentFilterInfoContainsFieldInfo
instance AttrInfo RecentFilterInfoContainsFieldInfo where
    type AttrBaseTypeConstraint RecentFilterInfoContainsFieldInfo = (~) RecentFilterInfo
    type AttrAllowedOps RecentFilterInfoContainsFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint RecentFilterInfoContainsFieldInfo = (~) [Gtk.Flags.RecentFilterFlags]
    type AttrTransferTypeConstraint RecentFilterInfoContainsFieldInfo = (~)[Gtk.Flags.RecentFilterFlags]
    type AttrTransferType RecentFilterInfoContainsFieldInfo = [Gtk.Flags.RecentFilterFlags]
    type AttrGetType RecentFilterInfoContainsFieldInfo = [Gtk.Flags.RecentFilterFlags]
    type AttrLabel RecentFilterInfoContainsFieldInfo = "contains"
    type AttrOrigin RecentFilterInfoContainsFieldInfo = RecentFilterInfo
    attrGet = getRecentFilterInfoContains
    attrSet = setRecentFilterInfoContains
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v

recentFilterInfo_contains :: AttrLabelProxy "contains"
recentFilterInfo_contains = AttrLabelProxy

#endif


-- | Get the value of the “@uri@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' recentFilterInfo #uri
-- @
getRecentFilterInfoUri :: MonadIO m => RecentFilterInfo -> m (Maybe T.Text)
getRecentFilterInfoUri :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> m (Maybe Text)
getRecentFilterInfoUri RecentFilterInfo
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
$ RecentFilterInfo
-> (Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> 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 “@uri@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' recentFilterInfo [ #uri 'Data.GI.Base.Attributes.:=' value ]
-- @
setRecentFilterInfoUri :: MonadIO m => RecentFilterInfo -> CString -> m ()
setRecentFilterInfoUri :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> CString -> m ()
setRecentFilterInfoUri RecentFilterInfo
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
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (CString
val :: CString)

-- | Set the value of the “@uri@” 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' #uri
-- @
clearRecentFilterInfoUri :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoUri :: forall (m :: * -> *). MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoUri RecentFilterInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> 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 RecentFilterInfoUriFieldInfo
instance AttrInfo RecentFilterInfoUriFieldInfo where
    type AttrBaseTypeConstraint RecentFilterInfoUriFieldInfo = (~) RecentFilterInfo
    type AttrAllowedOps RecentFilterInfoUriFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RecentFilterInfoUriFieldInfo = (~) CString
    type AttrTransferTypeConstraint RecentFilterInfoUriFieldInfo = (~)CString
    type AttrTransferType RecentFilterInfoUriFieldInfo = CString
    type AttrGetType RecentFilterInfoUriFieldInfo = Maybe T.Text
    type AttrLabel RecentFilterInfoUriFieldInfo = "uri"
    type AttrOrigin RecentFilterInfoUriFieldInfo = RecentFilterInfo
    attrGet = getRecentFilterInfoUri
    attrSet = setRecentFilterInfoUri
    attrConstruct = undefined
    attrClear = clearRecentFilterInfoUri
    attrTransfer _ v = do
        return v

recentFilterInfo_uri :: AttrLabelProxy "uri"
recentFilterInfo_uri = AttrLabelProxy

#endif


-- | Get the value of the “@display_name@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' recentFilterInfo #displayName
-- @
getRecentFilterInfoDisplayName :: MonadIO m => RecentFilterInfo -> m (Maybe T.Text)
getRecentFilterInfoDisplayName :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> m (Maybe Text)
getRecentFilterInfoDisplayName RecentFilterInfo
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
$ RecentFilterInfo
-> (Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: 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 “@display_name@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' recentFilterInfo [ #displayName 'Data.GI.Base.Attributes.:=' value ]
-- @
setRecentFilterInfoDisplayName :: MonadIO m => RecentFilterInfo -> CString -> m ()
setRecentFilterInfoDisplayName :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> CString -> m ()
setRecentFilterInfoDisplayName RecentFilterInfo
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
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
val :: CString)

-- | Set the value of the “@display_name@” 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' #displayName
-- @
clearRecentFilterInfoDisplayName :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoDisplayName :: forall (m :: * -> *). MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoDisplayName RecentFilterInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
forall a. Ptr a
FP.nullPtr :: CString)

#if defined(ENABLE_OVERLOADING)
data RecentFilterInfoDisplayNameFieldInfo
instance AttrInfo RecentFilterInfoDisplayNameFieldInfo where
    type AttrBaseTypeConstraint RecentFilterInfoDisplayNameFieldInfo = (~) RecentFilterInfo
    type AttrAllowedOps RecentFilterInfoDisplayNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RecentFilterInfoDisplayNameFieldInfo = (~) CString
    type AttrTransferTypeConstraint RecentFilterInfoDisplayNameFieldInfo = (~)CString
    type AttrTransferType RecentFilterInfoDisplayNameFieldInfo = CString
    type AttrGetType RecentFilterInfoDisplayNameFieldInfo = Maybe T.Text
    type AttrLabel RecentFilterInfoDisplayNameFieldInfo = "display_name"
    type AttrOrigin RecentFilterInfoDisplayNameFieldInfo = RecentFilterInfo
    attrGet = getRecentFilterInfoDisplayName
    attrSet = setRecentFilterInfoDisplayName
    attrConstruct = undefined
    attrClear = clearRecentFilterInfoDisplayName
    attrTransfer _ v = do
        return v

recentFilterInfo_displayName :: AttrLabelProxy "displayName"
recentFilterInfo_displayName = AttrLabelProxy

#endif


-- | Get the value of the “@mime_type@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' recentFilterInfo #mimeType
-- @
getRecentFilterInfoMimeType :: MonadIO m => RecentFilterInfo -> m (Maybe T.Text)
getRecentFilterInfoMimeType :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> m (Maybe Text)
getRecentFilterInfoMimeType RecentFilterInfo
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
$ RecentFilterInfo
-> (Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentFilterInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: 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 “@mime_type@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' recentFilterInfo [ #mimeType 'Data.GI.Base.Attributes.:=' value ]
-- @
setRecentFilterInfoMimeType :: MonadIO m => RecentFilterInfo -> CString -> m ()
setRecentFilterInfoMimeType :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> CString -> m ()
setRecentFilterInfoMimeType RecentFilterInfo
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
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CString
val :: CString)

-- | Set the value of the “@mime_type@” 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' #mimeType
-- @
clearRecentFilterInfoMimeType :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoMimeType :: forall (m :: * -> *). MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoMimeType RecentFilterInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (CString
forall a. Ptr a
FP.nullPtr :: CString)

#if defined(ENABLE_OVERLOADING)
data RecentFilterInfoMimeTypeFieldInfo
instance AttrInfo RecentFilterInfoMimeTypeFieldInfo where
    type AttrBaseTypeConstraint RecentFilterInfoMimeTypeFieldInfo = (~) RecentFilterInfo
    type AttrAllowedOps RecentFilterInfoMimeTypeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RecentFilterInfoMimeTypeFieldInfo = (~) CString
    type AttrTransferTypeConstraint RecentFilterInfoMimeTypeFieldInfo = (~)CString
    type AttrTransferType RecentFilterInfoMimeTypeFieldInfo = CString
    type AttrGetType RecentFilterInfoMimeTypeFieldInfo = Maybe T.Text
    type AttrLabel RecentFilterInfoMimeTypeFieldInfo = "mime_type"
    type AttrOrigin RecentFilterInfoMimeTypeFieldInfo = RecentFilterInfo
    attrGet = getRecentFilterInfoMimeType
    attrSet = setRecentFilterInfoMimeType
    attrConstruct = undefined
    attrClear = clearRecentFilterInfoMimeType
    attrTransfer _ v = do
        return v

recentFilterInfo_mimeType :: AttrLabelProxy "mimeType"
recentFilterInfo_mimeType = AttrLabelProxy

#endif


-- | Get the value of the “@applications@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' recentFilterInfo #applications
-- @
getRecentFilterInfoApplications :: MonadIO m => RecentFilterInfo -> m (Maybe [T.Text])
getRecentFilterInfoApplications :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> m (Maybe [Text])
getRecentFilterInfoApplications RecentFilterInfo
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
$ RecentFilterInfo
-> (Ptr RecentFilterInfo -> IO (Maybe [Text])) -> IO (Maybe [Text])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO (Maybe [Text])) -> IO (Maybe [Text]))
-> (Ptr RecentFilterInfo -> IO (Maybe [Text])) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString
val <- Ptr (Ptr CString) -> IO (Ptr CString)
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO (Ptr CString)
    Maybe [Text]
result <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr CString
val ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
val' -> do
        [Text]
val'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr 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 “@applications@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' recentFilterInfo [ #applications 'Data.GI.Base.Attributes.:=' value ]
-- @
setRecentFilterInfoApplications :: MonadIO m => RecentFilterInfo -> Ptr CString -> m ()
setRecentFilterInfoApplications :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> Ptr CString -> m ()
setRecentFilterInfoApplications RecentFilterInfo
s Ptr 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
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr (Ptr CString) -> Ptr CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Ptr CString
val :: Ptr CString)

-- | Set the value of the “@applications@” 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' #applications
-- @
clearRecentFilterInfoApplications :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoApplications :: forall (m :: * -> *). MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoApplications RecentFilterInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr (Ptr CString) -> Ptr CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Ptr CString
forall a. Ptr a
FP.nullPtr :: Ptr CString)

#if defined(ENABLE_OVERLOADING)
data RecentFilterInfoApplicationsFieldInfo
instance AttrInfo RecentFilterInfoApplicationsFieldInfo where
    type AttrBaseTypeConstraint RecentFilterInfoApplicationsFieldInfo = (~) RecentFilterInfo
    type AttrAllowedOps RecentFilterInfoApplicationsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RecentFilterInfoApplicationsFieldInfo = (~) (Ptr CString)
    type AttrTransferTypeConstraint RecentFilterInfoApplicationsFieldInfo = (~)(Ptr CString)
    type AttrTransferType RecentFilterInfoApplicationsFieldInfo = (Ptr CString)
    type AttrGetType RecentFilterInfoApplicationsFieldInfo = Maybe [T.Text]
    type AttrLabel RecentFilterInfoApplicationsFieldInfo = "applications"
    type AttrOrigin RecentFilterInfoApplicationsFieldInfo = RecentFilterInfo
    attrGet = getRecentFilterInfoApplications
    attrSet = setRecentFilterInfoApplications
    attrConstruct = undefined
    attrClear = clearRecentFilterInfoApplications
    attrTransfer _ v = do
        return v

recentFilterInfo_applications :: AttrLabelProxy "applications"
recentFilterInfo_applications = AttrLabelProxy

#endif


-- | Get the value of the “@groups@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' recentFilterInfo #groups
-- @
getRecentFilterInfoGroups :: MonadIO m => RecentFilterInfo -> m (Maybe [T.Text])
getRecentFilterInfoGroups :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> m (Maybe [Text])
getRecentFilterInfoGroups RecentFilterInfo
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
$ RecentFilterInfo
-> (Ptr RecentFilterInfo -> IO (Maybe [Text])) -> IO (Maybe [Text])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO (Maybe [Text])) -> IO (Maybe [Text]))
-> (Ptr RecentFilterInfo -> IO (Maybe [Text])) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr CString
val <- Ptr (Ptr CString) -> IO (Ptr CString)
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO (Ptr CString)
    Maybe [Text]
result <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr CString
val ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
val' -> do
        [Text]
val'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr 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 “@groups@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' recentFilterInfo [ #groups 'Data.GI.Base.Attributes.:=' value ]
-- @
setRecentFilterInfoGroups :: MonadIO m => RecentFilterInfo -> Ptr CString -> m ()
setRecentFilterInfoGroups :: forall (m :: * -> *).
MonadIO m =>
RecentFilterInfo -> Ptr CString -> m ()
setRecentFilterInfoGroups RecentFilterInfo
s Ptr 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
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr (Ptr CString) -> Ptr CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (Ptr CString
val :: Ptr CString)

-- | Set the value of the “@groups@” 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' #groups
-- @
clearRecentFilterInfoGroups :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoGroups :: forall (m :: * -> *). MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoGroups RecentFilterInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentFilterInfo -> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentFilterInfo
s ((Ptr RecentFilterInfo -> IO ()) -> IO ())
-> (Ptr RecentFilterInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr RecentFilterInfo
ptr -> do
    Ptr (Ptr CString) -> Ptr CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentFilterInfo
ptr Ptr RecentFilterInfo -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (Ptr CString
forall a. Ptr a
FP.nullPtr :: Ptr CString)

#if defined(ENABLE_OVERLOADING)
data RecentFilterInfoGroupsFieldInfo
instance AttrInfo RecentFilterInfoGroupsFieldInfo where
    type AttrBaseTypeConstraint RecentFilterInfoGroupsFieldInfo = (~) RecentFilterInfo
    type AttrAllowedOps RecentFilterInfoGroupsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RecentFilterInfoGroupsFieldInfo = (~) (Ptr CString)
    type AttrTransferTypeConstraint RecentFilterInfoGroupsFieldInfo = (~)(Ptr CString)
    type AttrTransferType RecentFilterInfoGroupsFieldInfo = (Ptr CString)
    type AttrGetType RecentFilterInfoGroupsFieldInfo = Maybe [T.Text]
    type AttrLabel RecentFilterInfoGroupsFieldInfo = "groups"
    type AttrOrigin RecentFilterInfoGroupsFieldInfo = RecentFilterInfo
    attrGet = getRecentFilterInfoGroups
    attrSet = setRecentFilterInfoGroups
    attrConstruct = undefined
    attrClear = clearRecentFilterInfoGroups
    attrTransfer _ v = do
        return v

recentFilterInfo_groups :: AttrLabelProxy "groups"
recentFilterInfo_groups = AttrLabelProxy

#endif


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

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

#if defined(ENABLE_OVERLOADING)
data RecentFilterInfoAgeFieldInfo
instance AttrInfo RecentFilterInfoAgeFieldInfo where
    type AttrBaseTypeConstraint RecentFilterInfoAgeFieldInfo = (~) RecentFilterInfo
    type AttrAllowedOps RecentFilterInfoAgeFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint RecentFilterInfoAgeFieldInfo = (~) Int32
    type AttrTransferTypeConstraint RecentFilterInfoAgeFieldInfo = (~)Int32
    type AttrTransferType RecentFilterInfoAgeFieldInfo = Int32
    type AttrGetType RecentFilterInfoAgeFieldInfo = Int32
    type AttrLabel RecentFilterInfoAgeFieldInfo = "age"
    type AttrOrigin RecentFilterInfoAgeFieldInfo = RecentFilterInfo
    attrGet = getRecentFilterInfoAge
    attrSet = setRecentFilterInfoAge
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v

recentFilterInfo_age :: AttrLabelProxy "age"
recentFilterInfo_age = AttrLabelProxy

#endif



#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RecentFilterInfo
type instance O.AttributeList RecentFilterInfo = RecentFilterInfoAttributeList
type RecentFilterInfoAttributeList = ('[ '("contains", RecentFilterInfoContainsFieldInfo), '("uri", RecentFilterInfoUriFieldInfo), '("displayName", RecentFilterInfoDisplayNameFieldInfo), '("mimeType", RecentFilterInfoMimeTypeFieldInfo), '("applications", RecentFilterInfoApplicationsFieldInfo), '("groups", RecentFilterInfoGroupsFieldInfo), '("age", RecentFilterInfoAgeFieldInfo)] :: [(Symbol, *)])
#endif

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

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

#endif

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

#endif