#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Structs.RecentFilterInfo
(
RecentFilterInfo(..) ,
newZeroRecentFilterInfo ,
noRecentFilterInfo ,
getRecentFilterInfoAge ,
#if ENABLE_OVERLOADING
recentFilterInfo_age ,
#endif
setRecentFilterInfoAge ,
clearRecentFilterInfoApplications ,
getRecentFilterInfoApplications ,
#if ENABLE_OVERLOADING
recentFilterInfo_applications ,
#endif
setRecentFilterInfoApplications ,
getRecentFilterInfoContains ,
#if ENABLE_OVERLOADING
recentFilterInfo_contains ,
#endif
setRecentFilterInfoContains ,
clearRecentFilterInfoDisplayName ,
getRecentFilterInfoDisplayName ,
#if ENABLE_OVERLOADING
recentFilterInfo_displayName ,
#endif
setRecentFilterInfoDisplayName ,
clearRecentFilterInfoGroups ,
getRecentFilterInfoGroups ,
#if ENABLE_OVERLOADING
recentFilterInfo_groups ,
#endif
setRecentFilterInfoGroups ,
clearRecentFilterInfoMimeType ,
getRecentFilterInfoMimeType ,
#if ENABLE_OVERLOADING
recentFilterInfo_mimeType ,
#endif
setRecentFilterInfoMimeType ,
clearRecentFilterInfoUri ,
getRecentFilterInfoUri ,
#if 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.ManagedPtr as B.ManagedPtr
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.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 {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
newtype RecentFilterInfo = RecentFilterInfo (ManagedPtr RecentFilterInfo)
instance WrappedPtr RecentFilterInfo where
wrappedPtrCalloc = callocBytes 56
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 56 >=> wrapPtr RecentFilterInfo)
wrappedPtrFree = Just ptr_to_g_free
newZeroRecentFilterInfo :: MonadIO m => m RecentFilterInfo
newZeroRecentFilterInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr RecentFilterInfo
instance tag ~ 'AttrSet => Constructible RecentFilterInfo tag where
new _ attrs = do
o <- newZeroRecentFilterInfo
GI.Attributes.set o attrs
return o
noRecentFilterInfo :: Maybe RecentFilterInfo
noRecentFilterInfo = Nothing
getRecentFilterInfoContains :: MonadIO m => RecentFilterInfo -> m [Gtk.Flags.RecentFilterFlags]
getRecentFilterInfoContains s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CUInt
let val' = wordToGFlags val
return val'
setRecentFilterInfoContains :: MonadIO m => RecentFilterInfo -> [Gtk.Flags.RecentFilterFlags] -> m ()
setRecentFilterInfoContains s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = gflagsToWord val
poke (ptr `plusPtr` 0) (val' :: CUInt)
#if ENABLE_OVERLOADING
data RecentFilterInfoContainsFieldInfo
instance AttrInfo RecentFilterInfoContainsFieldInfo where
type AttrAllowedOps RecentFilterInfoContainsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RecentFilterInfoContainsFieldInfo = (~) [Gtk.Flags.RecentFilterFlags]
type AttrBaseTypeConstraint RecentFilterInfoContainsFieldInfo = (~) RecentFilterInfo
type AttrGetType RecentFilterInfoContainsFieldInfo = [Gtk.Flags.RecentFilterFlags]
type AttrLabel RecentFilterInfoContainsFieldInfo = "contains"
type AttrOrigin RecentFilterInfoContainsFieldInfo = RecentFilterInfo
attrGet _ = getRecentFilterInfoContains
attrSet _ = setRecentFilterInfoContains
attrConstruct = undefined
attrClear _ = undefined
recentFilterInfo_contains :: AttrLabelProxy "contains"
recentFilterInfo_contains = AttrLabelProxy
#endif
getRecentFilterInfoUri :: MonadIO m => RecentFilterInfo -> m (Maybe T.Text)
getRecentFilterInfoUri s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRecentFilterInfoUri :: MonadIO m => RecentFilterInfo -> CString -> m ()
setRecentFilterInfoUri s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: CString)
clearRecentFilterInfoUri :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoUri s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RecentFilterInfoUriFieldInfo
instance AttrInfo RecentFilterInfoUriFieldInfo where
type AttrAllowedOps RecentFilterInfoUriFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentFilterInfoUriFieldInfo = (~) CString
type AttrBaseTypeConstraint RecentFilterInfoUriFieldInfo = (~) RecentFilterInfo
type AttrGetType RecentFilterInfoUriFieldInfo = Maybe T.Text
type AttrLabel RecentFilterInfoUriFieldInfo = "uri"
type AttrOrigin RecentFilterInfoUriFieldInfo = RecentFilterInfo
attrGet _ = getRecentFilterInfoUri
attrSet _ = setRecentFilterInfoUri
attrConstruct = undefined
attrClear _ = clearRecentFilterInfoUri
recentFilterInfo_uri :: AttrLabelProxy "uri"
recentFilterInfo_uri = AttrLabelProxy
#endif
getRecentFilterInfoDisplayName :: MonadIO m => RecentFilterInfo -> m (Maybe T.Text)
getRecentFilterInfoDisplayName s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRecentFilterInfoDisplayName :: MonadIO m => RecentFilterInfo -> CString -> m ()
setRecentFilterInfoDisplayName s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: CString)
clearRecentFilterInfoDisplayName :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoDisplayName s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RecentFilterInfoDisplayNameFieldInfo
instance AttrInfo RecentFilterInfoDisplayNameFieldInfo where
type AttrAllowedOps RecentFilterInfoDisplayNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentFilterInfoDisplayNameFieldInfo = (~) CString
type AttrBaseTypeConstraint RecentFilterInfoDisplayNameFieldInfo = (~) RecentFilterInfo
type AttrGetType RecentFilterInfoDisplayNameFieldInfo = Maybe T.Text
type AttrLabel RecentFilterInfoDisplayNameFieldInfo = "display_name"
type AttrOrigin RecentFilterInfoDisplayNameFieldInfo = RecentFilterInfo
attrGet _ = getRecentFilterInfoDisplayName
attrSet _ = setRecentFilterInfoDisplayName
attrConstruct = undefined
attrClear _ = clearRecentFilterInfoDisplayName
recentFilterInfo_displayName :: AttrLabelProxy "displayName"
recentFilterInfo_displayName = AttrLabelProxy
#endif
getRecentFilterInfoMimeType :: MonadIO m => RecentFilterInfo -> m (Maybe T.Text)
getRecentFilterInfoMimeType s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO CString
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- cstringToText val'
return val''
return result
setRecentFilterInfoMimeType :: MonadIO m => RecentFilterInfo -> CString -> m ()
setRecentFilterInfoMimeType s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: CString)
clearRecentFilterInfoMimeType :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoMimeType s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (FP.nullPtr :: CString)
#if ENABLE_OVERLOADING
data RecentFilterInfoMimeTypeFieldInfo
instance AttrInfo RecentFilterInfoMimeTypeFieldInfo where
type AttrAllowedOps RecentFilterInfoMimeTypeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentFilterInfoMimeTypeFieldInfo = (~) CString
type AttrBaseTypeConstraint RecentFilterInfoMimeTypeFieldInfo = (~) RecentFilterInfo
type AttrGetType RecentFilterInfoMimeTypeFieldInfo = Maybe T.Text
type AttrLabel RecentFilterInfoMimeTypeFieldInfo = "mime_type"
type AttrOrigin RecentFilterInfoMimeTypeFieldInfo = RecentFilterInfo
attrGet _ = getRecentFilterInfoMimeType
attrSet _ = setRecentFilterInfoMimeType
attrConstruct = undefined
attrClear _ = clearRecentFilterInfoMimeType
recentFilterInfo_mimeType :: AttrLabelProxy "mimeType"
recentFilterInfo_mimeType = AttrLabelProxy
#endif
getRecentFilterInfoApplications :: MonadIO m => RecentFilterInfo -> m (Maybe [T.Text])
getRecentFilterInfoApplications s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO (Ptr CString)
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- unpackZeroTerminatedUTF8CArray val'
return val''
return result
setRecentFilterInfoApplications :: MonadIO m => RecentFilterInfo -> Ptr CString -> m ()
setRecentFilterInfoApplications s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (val :: Ptr CString)
clearRecentFilterInfoApplications :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoApplications s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (FP.nullPtr :: Ptr CString)
#if ENABLE_OVERLOADING
data RecentFilterInfoApplicationsFieldInfo
instance AttrInfo RecentFilterInfoApplicationsFieldInfo where
type AttrAllowedOps RecentFilterInfoApplicationsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentFilterInfoApplicationsFieldInfo = (~) (Ptr CString)
type AttrBaseTypeConstraint RecentFilterInfoApplicationsFieldInfo = (~) RecentFilterInfo
type AttrGetType RecentFilterInfoApplicationsFieldInfo = Maybe [T.Text]
type AttrLabel RecentFilterInfoApplicationsFieldInfo = "applications"
type AttrOrigin RecentFilterInfoApplicationsFieldInfo = RecentFilterInfo
attrGet _ = getRecentFilterInfoApplications
attrSet _ = setRecentFilterInfoApplications
attrConstruct = undefined
attrClear _ = clearRecentFilterInfoApplications
recentFilterInfo_applications :: AttrLabelProxy "applications"
recentFilterInfo_applications = AttrLabelProxy
#endif
getRecentFilterInfoGroups :: MonadIO m => RecentFilterInfo -> m (Maybe [T.Text])
getRecentFilterInfoGroups s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 40) :: IO (Ptr CString)
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- unpackZeroTerminatedUTF8CArray val'
return val''
return result
setRecentFilterInfoGroups :: MonadIO m => RecentFilterInfo -> Ptr CString -> m ()
setRecentFilterInfoGroups s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 40) (val :: Ptr CString)
clearRecentFilterInfoGroups :: MonadIO m => RecentFilterInfo -> m ()
clearRecentFilterInfoGroups s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 40) (FP.nullPtr :: Ptr CString)
#if ENABLE_OVERLOADING
data RecentFilterInfoGroupsFieldInfo
instance AttrInfo RecentFilterInfoGroupsFieldInfo where
type AttrAllowedOps RecentFilterInfoGroupsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentFilterInfoGroupsFieldInfo = (~) (Ptr CString)
type AttrBaseTypeConstraint RecentFilterInfoGroupsFieldInfo = (~) RecentFilterInfo
type AttrGetType RecentFilterInfoGroupsFieldInfo = Maybe [T.Text]
type AttrLabel RecentFilterInfoGroupsFieldInfo = "groups"
type AttrOrigin RecentFilterInfoGroupsFieldInfo = RecentFilterInfo
attrGet _ = getRecentFilterInfoGroups
attrSet _ = setRecentFilterInfoGroups
attrConstruct = undefined
attrClear _ = clearRecentFilterInfoGroups
recentFilterInfo_groups :: AttrLabelProxy "groups"
recentFilterInfo_groups = AttrLabelProxy
#endif
getRecentFilterInfoAge :: MonadIO m => RecentFilterInfo -> m Int32
getRecentFilterInfoAge s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 48) :: IO Int32
return val
setRecentFilterInfoAge :: MonadIO m => RecentFilterInfo -> Int32 -> m ()
setRecentFilterInfoAge s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 48) (val :: Int32)
#if ENABLE_OVERLOADING
data RecentFilterInfoAgeFieldInfo
instance AttrInfo RecentFilterInfoAgeFieldInfo where
type AttrAllowedOps RecentFilterInfoAgeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RecentFilterInfoAgeFieldInfo = (~) Int32
type AttrBaseTypeConstraint RecentFilterInfoAgeFieldInfo = (~) RecentFilterInfo
type AttrGetType RecentFilterInfoAgeFieldInfo = Int32
type AttrLabel RecentFilterInfoAgeFieldInfo = "age"
type AttrOrigin RecentFilterInfoAgeFieldInfo = RecentFilterInfo
attrGet _ = getRecentFilterInfoAge
attrSet _ = setRecentFilterInfoAge
attrConstruct = undefined
attrClear _ = undefined
recentFilterInfo_age :: AttrLabelProxy "age"
recentFilterInfo_age = AttrLabelProxy
#endif
#if 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 ENABLE_OVERLOADING
type family ResolveRecentFilterInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveRecentFilterInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRecentFilterInfoMethod t RecentFilterInfo, O.MethodInfo info RecentFilterInfo p) => OL.IsLabel t (RecentFilterInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif