{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.RecentData
(
RecentData(..) ,
newZeroRecentData ,
noRecentData ,
#if defined(ENABLE_OVERLOADING)
ResolveRecentDataMethod ,
#endif
clearRecentDataAppExec ,
getRecentDataAppExec ,
#if defined(ENABLE_OVERLOADING)
recentData_appExec ,
#endif
setRecentDataAppExec ,
clearRecentDataAppName ,
getRecentDataAppName ,
#if defined(ENABLE_OVERLOADING)
recentData_appName ,
#endif
setRecentDataAppName ,
clearRecentDataDescription ,
getRecentDataDescription ,
#if defined(ENABLE_OVERLOADING)
recentData_description ,
#endif
setRecentDataDescription ,
clearRecentDataDisplayName ,
getRecentDataDisplayName ,
#if defined(ENABLE_OVERLOADING)
recentData_displayName ,
#endif
setRecentDataDisplayName ,
clearRecentDataGroups ,
getRecentDataGroups ,
#if defined(ENABLE_OVERLOADING)
recentData_groups ,
#endif
setRecentDataGroups ,
getRecentDataIsPrivate ,
#if defined(ENABLE_OVERLOADING)
recentData_isPrivate ,
#endif
setRecentDataIsPrivate ,
clearRecentDataMimeType ,
getRecentDataMimeType ,
#if defined(ENABLE_OVERLOADING)
recentData_mimeType ,
#endif
setRecentDataMimeType ,
) 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.GI.Base.Signals as B.Signals
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
newtype RecentData = RecentData (ManagedPtr RecentData)
deriving (RecentData -> RecentData -> Bool
(RecentData -> RecentData -> Bool)
-> (RecentData -> RecentData -> Bool) -> Eq RecentData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecentData -> RecentData -> Bool
$c/= :: RecentData -> RecentData -> Bool
== :: RecentData -> RecentData -> Bool
$c== :: RecentData -> RecentData -> Bool
Eq)
instance WrappedPtr RecentData where
wrappedPtrCalloc :: IO (Ptr RecentData)
wrappedPtrCalloc = Int -> IO (Ptr RecentData)
forall a. Int -> IO (Ptr a)
callocBytes 56
wrappedPtrCopy :: RecentData -> IO RecentData
wrappedPtrCopy = \p :: RecentData
p -> RecentData -> (Ptr RecentData -> IO RecentData) -> IO RecentData
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
p (Int -> Ptr RecentData -> IO (Ptr RecentData)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 56 (Ptr RecentData -> IO (Ptr RecentData))
-> (Ptr RecentData -> IO RecentData)
-> Ptr RecentData
-> IO RecentData
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr RecentData -> RecentData)
-> Ptr RecentData -> IO RecentData
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr RecentData -> RecentData
RecentData)
wrappedPtrFree :: Maybe (GDestroyNotify RecentData)
wrappedPtrFree = GDestroyNotify RecentData -> Maybe (GDestroyNotify RecentData)
forall a. a -> Maybe a
Just GDestroyNotify RecentData
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroRecentData :: MonadIO m => m RecentData
newZeroRecentData :: m RecentData
newZeroRecentData = IO RecentData -> m RecentData
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RecentData -> m RecentData) -> IO RecentData -> m RecentData
forall a b. (a -> b) -> a -> b
$ IO (Ptr RecentData)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr RecentData)
-> (Ptr RecentData -> IO RecentData) -> IO RecentData
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr RecentData -> RecentData)
-> Ptr RecentData -> IO RecentData
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr RecentData -> RecentData
RecentData
instance tag ~ 'AttrSet => Constructible RecentData tag where
new :: (ManagedPtr RecentData -> RecentData)
-> [AttrOp RecentData tag] -> m RecentData
new _ attrs :: [AttrOp RecentData tag]
attrs = do
RecentData
o <- m RecentData
forall (m :: * -> *). MonadIO m => m RecentData
newZeroRecentData
RecentData -> [AttrOp RecentData 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set RecentData
o [AttrOp RecentData tag]
[AttrOp RecentData 'AttrSet]
attrs
RecentData -> m RecentData
forall (m :: * -> *) a. Monad m => a -> m a
return RecentData
o
noRecentData :: Maybe RecentData
noRecentData :: Maybe RecentData
noRecentData = Maybe RecentData
forall a. Maybe a
Nothing
getRecentDataDisplayName :: MonadIO m => RecentData -> m (Maybe T.Text)
getRecentDataDisplayName :: RecentData -> m (Maybe Text)
getRecentDataDisplayName s :: RecentData
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
$ RecentData
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: 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
$ \val' :: 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
setRecentDataDisplayName :: MonadIO m => RecentData -> CString -> m ()
setRecentDataDisplayName :: RecentData -> CString -> m ()
setRecentDataDisplayName s :: RecentData
s val :: 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
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (CString
val :: CString)
clearRecentDataDisplayName :: MonadIO m => RecentData -> m ()
clearRecentDataDisplayName :: RecentData -> m ()
clearRecentDataDisplayName s :: RecentData
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data RecentDataDisplayNameFieldInfo
instance AttrInfo RecentDataDisplayNameFieldInfo where
type AttrBaseTypeConstraint RecentDataDisplayNameFieldInfo = (~) RecentData
type AttrAllowedOps RecentDataDisplayNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentDataDisplayNameFieldInfo = (~) CString
type AttrTransferTypeConstraint RecentDataDisplayNameFieldInfo = (~)CString
type AttrTransferType RecentDataDisplayNameFieldInfo = CString
type AttrGetType RecentDataDisplayNameFieldInfo = Maybe T.Text
type AttrLabel RecentDataDisplayNameFieldInfo = "display_name"
type AttrOrigin RecentDataDisplayNameFieldInfo = RecentData
attrGet = getRecentDataDisplayName
attrSet = setRecentDataDisplayName
attrConstruct = undefined
attrClear = clearRecentDataDisplayName
attrTransfer _ v = do
return v
recentData_displayName :: AttrLabelProxy "displayName"
recentData_displayName = AttrLabelProxy
#endif
getRecentDataDescription :: MonadIO m => RecentData -> m (Maybe T.Text)
getRecentDataDescription :: RecentData -> m (Maybe Text)
getRecentDataDescription s :: RecentData
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
$ RecentData
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ \val' :: 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
setRecentDataDescription :: MonadIO m => RecentData -> CString -> m ()
setRecentDataDescription :: RecentData -> CString -> m ()
setRecentDataDescription s :: RecentData
s val :: 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
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (CString
val :: CString)
clearRecentDataDescription :: MonadIO m => RecentData -> m ()
clearRecentDataDescription :: RecentData -> m ()
clearRecentDataDescription s :: RecentData
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data RecentDataDescriptionFieldInfo
instance AttrInfo RecentDataDescriptionFieldInfo where
type AttrBaseTypeConstraint RecentDataDescriptionFieldInfo = (~) RecentData
type AttrAllowedOps RecentDataDescriptionFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentDataDescriptionFieldInfo = (~) CString
type AttrTransferTypeConstraint RecentDataDescriptionFieldInfo = (~)CString
type AttrTransferType RecentDataDescriptionFieldInfo = CString
type AttrGetType RecentDataDescriptionFieldInfo = Maybe T.Text
type AttrLabel RecentDataDescriptionFieldInfo = "description"
type AttrOrigin RecentDataDescriptionFieldInfo = RecentData
attrGet = getRecentDataDescription
attrSet = setRecentDataDescription
attrConstruct = undefined
attrClear = clearRecentDataDescription
attrTransfer _ v = do
return v
recentData_description :: AttrLabelProxy "description"
recentData_description = AttrLabelProxy
#endif
getRecentDataMimeType :: MonadIO m => RecentData -> m (Maybe T.Text)
getRecentDataMimeType :: RecentData -> m (Maybe Text)
getRecentDataMimeType s :: RecentData
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
$ RecentData
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ \val' :: 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
setRecentDataMimeType :: MonadIO m => RecentData -> CString -> m ()
setRecentDataMimeType :: RecentData -> CString -> m ()
setRecentDataMimeType s :: RecentData
s val :: 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
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (CString
val :: CString)
clearRecentDataMimeType :: MonadIO m => RecentData -> m ()
clearRecentDataMimeType :: RecentData -> m ()
clearRecentDataMimeType s :: RecentData
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data RecentDataMimeTypeFieldInfo
instance AttrInfo RecentDataMimeTypeFieldInfo where
type AttrBaseTypeConstraint RecentDataMimeTypeFieldInfo = (~) RecentData
type AttrAllowedOps RecentDataMimeTypeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentDataMimeTypeFieldInfo = (~) CString
type AttrTransferTypeConstraint RecentDataMimeTypeFieldInfo = (~)CString
type AttrTransferType RecentDataMimeTypeFieldInfo = CString
type AttrGetType RecentDataMimeTypeFieldInfo = Maybe T.Text
type AttrLabel RecentDataMimeTypeFieldInfo = "mime_type"
type AttrOrigin RecentDataMimeTypeFieldInfo = RecentData
attrGet = getRecentDataMimeType
attrSet = setRecentDataMimeType
attrConstruct = undefined
attrClear = clearRecentDataMimeType
attrTransfer _ v = do
return v
recentData_mimeType :: AttrLabelProxy "mimeType"
recentData_mimeType = AttrLabelProxy
#endif
getRecentDataAppName :: MonadIO m => RecentData -> m (Maybe T.Text)
getRecentDataAppName :: RecentData -> m (Maybe Text)
getRecentDataAppName s :: RecentData
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
$ RecentData
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ \val' :: 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
setRecentDataAppName :: MonadIO m => RecentData -> CString -> m ()
setRecentDataAppName :: RecentData -> CString -> m ()
setRecentDataAppName s :: RecentData
s val :: 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
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (CString
val :: CString)
clearRecentDataAppName :: MonadIO m => RecentData -> m ()
clearRecentDataAppName :: RecentData -> m ()
clearRecentDataAppName s :: RecentData
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data RecentDataAppNameFieldInfo
instance AttrInfo RecentDataAppNameFieldInfo where
type AttrBaseTypeConstraint RecentDataAppNameFieldInfo = (~) RecentData
type AttrAllowedOps RecentDataAppNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentDataAppNameFieldInfo = (~) CString
type AttrTransferTypeConstraint RecentDataAppNameFieldInfo = (~)CString
type AttrTransferType RecentDataAppNameFieldInfo = CString
type AttrGetType RecentDataAppNameFieldInfo = Maybe T.Text
type AttrLabel RecentDataAppNameFieldInfo = "app_name"
type AttrOrigin RecentDataAppNameFieldInfo = RecentData
attrGet = getRecentDataAppName
attrSet = setRecentDataAppName
attrConstruct = undefined
attrClear = clearRecentDataAppName
attrTransfer _ v = do
return v
recentData_appName :: AttrLabelProxy "appName"
recentData_appName = AttrLabelProxy
#endif
getRecentDataAppExec :: MonadIO m => RecentData -> m (Maybe T.Text)
getRecentDataAppExec :: RecentData -> m (Maybe Text)
getRecentDataAppExec s :: RecentData
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
$ RecentData
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr RecentData -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) :: 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
$ \val' :: 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
setRecentDataAppExec :: MonadIO m => RecentData -> CString -> m ()
setRecentDataAppExec :: RecentData -> CString -> m ()
setRecentDataAppExec s :: RecentData
s val :: 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
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (CString
val :: CString)
clearRecentDataAppExec :: MonadIO m => RecentData -> m ()
clearRecentDataAppExec :: RecentData -> m ()
clearRecentDataAppExec s :: RecentData
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (CString
forall a. Ptr a
FP.nullPtr :: CString)
#if defined(ENABLE_OVERLOADING)
data RecentDataAppExecFieldInfo
instance AttrInfo RecentDataAppExecFieldInfo where
type AttrBaseTypeConstraint RecentDataAppExecFieldInfo = (~) RecentData
type AttrAllowedOps RecentDataAppExecFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentDataAppExecFieldInfo = (~) CString
type AttrTransferTypeConstraint RecentDataAppExecFieldInfo = (~)CString
type AttrTransferType RecentDataAppExecFieldInfo = CString
type AttrGetType RecentDataAppExecFieldInfo = Maybe T.Text
type AttrLabel RecentDataAppExecFieldInfo = "app_exec"
type AttrOrigin RecentDataAppExecFieldInfo = RecentData
attrGet = getRecentDataAppExec
attrSet = setRecentDataAppExec
attrConstruct = undefined
attrClear = clearRecentDataAppExec
attrTransfer _ v = do
return v
recentData_appExec :: AttrLabelProxy "appExec"
recentData_appExec = AttrLabelProxy
#endif
getRecentDataGroups :: MonadIO m => RecentData -> m (Maybe [T.Text])
getRecentDataGroups :: RecentData -> m (Maybe [Text])
getRecentDataGroups s :: RecentData
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
$ RecentData
-> (Ptr RecentData -> IO (Maybe [Text])) -> IO (Maybe [Text])
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO (Maybe [Text])) -> IO (Maybe [Text]))
-> (Ptr RecentData -> IO (Maybe [Text])) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr CString
val <- Ptr (Ptr CString) -> IO (Ptr CString)
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ \val' :: 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
setRecentDataGroups :: MonadIO m => RecentData -> Ptr CString -> m ()
setRecentDataGroups :: RecentData -> Ptr CString -> m ()
setRecentDataGroups s :: RecentData
s val :: 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
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr (Ptr CString) -> Ptr CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (Ptr CString
val :: Ptr CString)
clearRecentDataGroups :: MonadIO m => RecentData -> m ()
clearRecentDataGroups :: RecentData -> m ()
clearRecentDataGroups s :: RecentData
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
Ptr (Ptr CString) -> Ptr CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr (Ptr CString)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (Ptr CString
forall a. Ptr a
FP.nullPtr :: Ptr CString)
#if defined(ENABLE_OVERLOADING)
data RecentDataGroupsFieldInfo
instance AttrInfo RecentDataGroupsFieldInfo where
type AttrBaseTypeConstraint RecentDataGroupsFieldInfo = (~) RecentData
type AttrAllowedOps RecentDataGroupsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint RecentDataGroupsFieldInfo = (~) (Ptr CString)
type AttrTransferTypeConstraint RecentDataGroupsFieldInfo = (~)(Ptr CString)
type AttrTransferType RecentDataGroupsFieldInfo = (Ptr CString)
type AttrGetType RecentDataGroupsFieldInfo = Maybe [T.Text]
type AttrLabel RecentDataGroupsFieldInfo = "groups"
type AttrOrigin RecentDataGroupsFieldInfo = RecentData
attrGet = getRecentDataGroups
attrSet = setRecentDataGroups
attrConstruct = undefined
attrClear = clearRecentDataGroups
attrTransfer _ v = do
return v
recentData_groups :: AttrLabelProxy "groups"
recentData_groups = AttrLabelProxy
#endif
getRecentDataIsPrivate :: MonadIO m => RecentData -> m Bool
getRecentDataIsPrivate :: RecentData -> m Bool
getRecentDataIsPrivate s :: RecentData
s = 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
$ RecentData -> (Ptr RecentData -> IO Bool) -> IO Bool
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO Bool) -> IO Bool)
-> (Ptr RecentData -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
CInt
val <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48) :: IO CInt
let val' :: Bool
val' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
val
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
val'
setRecentDataIsPrivate :: MonadIO m => RecentData -> Bool -> m ()
setRecentDataIsPrivate :: RecentData -> Bool -> m ()
setRecentDataIsPrivate s :: RecentData
s val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ RecentData -> (Ptr RecentData -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr RecentData
s ((Ptr RecentData -> IO ()) -> IO ())
-> (Ptr RecentData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr RecentData
ptr -> do
let val' :: CInt
val' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
val
Ptr CInt -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RecentData
ptr Ptr RecentData -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data RecentDataIsPrivateFieldInfo
instance AttrInfo RecentDataIsPrivateFieldInfo where
type AttrBaseTypeConstraint RecentDataIsPrivateFieldInfo = (~) RecentData
type AttrAllowedOps RecentDataIsPrivateFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint RecentDataIsPrivateFieldInfo = (~) Bool
type AttrTransferTypeConstraint RecentDataIsPrivateFieldInfo = (~)Bool
type AttrTransferType RecentDataIsPrivateFieldInfo = Bool
type AttrGetType RecentDataIsPrivateFieldInfo = Bool
type AttrLabel RecentDataIsPrivateFieldInfo = "is_private"
type AttrOrigin RecentDataIsPrivateFieldInfo = RecentData
attrGet = getRecentDataIsPrivate
attrSet = setRecentDataIsPrivate
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
recentData_isPrivate :: AttrLabelProxy "isPrivate"
recentData_isPrivate = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList RecentData
type instance O.AttributeList RecentData = RecentDataAttributeList
type RecentDataAttributeList = ('[ '("displayName", RecentDataDisplayNameFieldInfo), '("description", RecentDataDescriptionFieldInfo), '("mimeType", RecentDataMimeTypeFieldInfo), '("appName", RecentDataAppNameFieldInfo), '("appExec", RecentDataAppExecFieldInfo), '("groups", RecentDataGroupsFieldInfo), '("isPrivate", RecentDataIsPrivateFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveRecentDataMethod (t :: Symbol) (o :: *) :: * where
ResolveRecentDataMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRecentDataMethod t RecentData, O.MethodInfo info RecentData p) => OL.IsLabel t (RecentData -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif