{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Structs.FileAttributeInfoList
(
FileAttributeInfoList(..) ,
newZeroFileAttributeInfoList ,
#if defined(ENABLE_OVERLOADING)
ResolveFileAttributeInfoListMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FileAttributeInfoListAddMethodInfo ,
#endif
fileAttributeInfoListAdd ,
#if defined(ENABLE_OVERLOADING)
FileAttributeInfoListDupMethodInfo ,
#endif
fileAttributeInfoListDup ,
#if defined(ENABLE_OVERLOADING)
FileAttributeInfoListLookupMethodInfo ,
#endif
fileAttributeInfoListLookup ,
fileAttributeInfoListNew ,
#if defined(ENABLE_OVERLOADING)
FileAttributeInfoListRefMethodInfo ,
#endif
fileAttributeInfoListRef ,
#if defined(ENABLE_OVERLOADING)
FileAttributeInfoListUnrefMethodInfo ,
#endif
fileAttributeInfoListUnref ,
clearFileAttributeInfoListInfos ,
#if defined(ENABLE_OVERLOADING)
fileAttributeInfoList_infos ,
#endif
getFileAttributeInfoListInfos ,
setFileAttributeInfoListInfos ,
#if defined(ENABLE_OVERLOADING)
fileAttributeInfoList_nInfos ,
#endif
getFileAttributeInfoListNInfos ,
setFileAttributeInfoListNInfos ,
) 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.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 {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Structs.FileAttributeInfo as Gio.FileAttributeInfo
newtype FileAttributeInfoList = FileAttributeInfoList (SP.ManagedPtr FileAttributeInfoList)
deriving (FileAttributeInfoList -> FileAttributeInfoList -> Bool
(FileAttributeInfoList -> FileAttributeInfoList -> Bool)
-> (FileAttributeInfoList -> FileAttributeInfoList -> Bool)
-> Eq FileAttributeInfoList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileAttributeInfoList -> FileAttributeInfoList -> Bool
$c/= :: FileAttributeInfoList -> FileAttributeInfoList -> Bool
== :: FileAttributeInfoList -> FileAttributeInfoList -> Bool
$c== :: FileAttributeInfoList -> FileAttributeInfoList -> Bool
Eq)
instance SP.ManagedPtrNewtype FileAttributeInfoList where
toManagedPtr :: FileAttributeInfoList -> ManagedPtr FileAttributeInfoList
toManagedPtr (FileAttributeInfoList ManagedPtr FileAttributeInfoList
p) = ManagedPtr FileAttributeInfoList
p
foreign import ccall "g_file_attribute_info_list_get_type" c_g_file_attribute_info_list_get_type ::
IO GType
type instance O.ParentTypes FileAttributeInfoList = '[]
instance O.HasParentTypes FileAttributeInfoList
instance B.Types.TypedObject FileAttributeInfoList where
glibType :: IO GType
glibType = IO GType
c_g_file_attribute_info_list_get_type
instance B.Types.GBoxed FileAttributeInfoList
instance B.GValue.IsGValue FileAttributeInfoList where
toGValue :: FileAttributeInfoList -> IO GValue
toGValue FileAttributeInfoList
o = do
GType
gtype <- IO GType
c_g_file_attribute_info_list_get_type
FileAttributeInfoList
-> (Ptr FileAttributeInfoList -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FileAttributeInfoList
o (GType
-> (GValue -> Ptr FileAttributeInfoList -> IO ())
-> Ptr FileAttributeInfoList
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr FileAttributeInfoList -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO FileAttributeInfoList
fromGValue GValue
gv = do
Ptr FileAttributeInfoList
ptr <- GValue -> IO (Ptr FileAttributeInfoList)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr FileAttributeInfoList)
(ManagedPtr FileAttributeInfoList -> FileAttributeInfoList)
-> Ptr FileAttributeInfoList -> IO FileAttributeInfoList
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr FileAttributeInfoList -> FileAttributeInfoList
FileAttributeInfoList Ptr FileAttributeInfoList
ptr
newZeroFileAttributeInfoList :: MonadIO m => m FileAttributeInfoList
newZeroFileAttributeInfoList :: m FileAttributeInfoList
newZeroFileAttributeInfoList = IO FileAttributeInfoList -> m FileAttributeInfoList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeInfoList -> m FileAttributeInfoList)
-> IO FileAttributeInfoList -> m FileAttributeInfoList
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr FileAttributeInfoList)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
16 IO (Ptr FileAttributeInfoList)
-> (Ptr FileAttributeInfoList -> IO FileAttributeInfoList)
-> IO FileAttributeInfoList
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr FileAttributeInfoList -> FileAttributeInfoList)
-> Ptr FileAttributeInfoList -> IO FileAttributeInfoList
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FileAttributeInfoList -> FileAttributeInfoList
FileAttributeInfoList
instance tag ~ 'AttrSet => Constructible FileAttributeInfoList tag where
new :: (ManagedPtr FileAttributeInfoList -> FileAttributeInfoList)
-> [AttrOp FileAttributeInfoList tag] -> m FileAttributeInfoList
new ManagedPtr FileAttributeInfoList -> FileAttributeInfoList
_ [AttrOp FileAttributeInfoList tag]
attrs = do
FileAttributeInfoList
o <- m FileAttributeInfoList
forall (m :: * -> *). MonadIO m => m FileAttributeInfoList
newZeroFileAttributeInfoList
FileAttributeInfoList
-> [AttrOp FileAttributeInfoList 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set FileAttributeInfoList
o [AttrOp FileAttributeInfoList tag]
[AttrOp FileAttributeInfoList 'AttrSet]
attrs
FileAttributeInfoList -> m FileAttributeInfoList
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeInfoList
o
getFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m (Maybe Gio.FileAttributeInfo.FileAttributeInfo)
getFileAttributeInfoListInfos :: FileAttributeInfoList -> m (Maybe FileAttributeInfo)
getFileAttributeInfoListInfos FileAttributeInfoList
s = IO (Maybe FileAttributeInfo) -> m (Maybe FileAttributeInfo)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FileAttributeInfo) -> m (Maybe FileAttributeInfo))
-> IO (Maybe FileAttributeInfo) -> m (Maybe FileAttributeInfo)
forall a b. (a -> b) -> a -> b
$ FileAttributeInfoList
-> (Ptr FileAttributeInfoList -> IO (Maybe FileAttributeInfo))
-> IO (Maybe FileAttributeInfo)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfoList
s ((Ptr FileAttributeInfoList -> IO (Maybe FileAttributeInfo))
-> IO (Maybe FileAttributeInfo))
-> (Ptr FileAttributeInfoList -> IO (Maybe FileAttributeInfo))
-> IO (Maybe FileAttributeInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr FileAttributeInfoList
ptr -> do
Ptr FileAttributeInfo
val <- Ptr (Ptr FileAttributeInfo) -> IO (Ptr FileAttributeInfo)
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileAttributeInfoList
ptr Ptr FileAttributeInfoList -> Int -> Ptr (Ptr FileAttributeInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO (Ptr Gio.FileAttributeInfo.FileAttributeInfo)
Maybe FileAttributeInfo
result <- Ptr FileAttributeInfo
-> (Ptr FileAttributeInfo -> IO FileAttributeInfo)
-> IO (Maybe FileAttributeInfo)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr FileAttributeInfo
val ((Ptr FileAttributeInfo -> IO FileAttributeInfo)
-> IO (Maybe FileAttributeInfo))
-> (Ptr FileAttributeInfo -> IO FileAttributeInfo)
-> IO (Maybe FileAttributeInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr FileAttributeInfo
val' -> do
FileAttributeInfo
val'' <- ((ManagedPtr FileAttributeInfo -> FileAttributeInfo)
-> Ptr FileAttributeInfo -> IO FileAttributeInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr FileAttributeInfo -> FileAttributeInfo
Gio.FileAttributeInfo.FileAttributeInfo) Ptr FileAttributeInfo
val'
FileAttributeInfo -> IO FileAttributeInfo
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeInfo
val''
Maybe FileAttributeInfo -> IO (Maybe FileAttributeInfo)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FileAttributeInfo
result
setFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> Ptr Gio.FileAttributeInfo.FileAttributeInfo -> m ()
setFileAttributeInfoListInfos :: FileAttributeInfoList -> Ptr FileAttributeInfo -> m ()
setFileAttributeInfoListInfos FileAttributeInfoList
s Ptr FileAttributeInfo
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileAttributeInfoList
-> (Ptr FileAttributeInfoList -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfoList
s ((Ptr FileAttributeInfoList -> IO ()) -> IO ())
-> (Ptr FileAttributeInfoList -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileAttributeInfoList
ptr -> do
Ptr (Ptr FileAttributeInfo) -> Ptr FileAttributeInfo -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileAttributeInfoList
ptr Ptr FileAttributeInfoList -> Int -> Ptr (Ptr FileAttributeInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr FileAttributeInfo
val :: Ptr Gio.FileAttributeInfo.FileAttributeInfo)
clearFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m ()
clearFileAttributeInfoListInfos :: FileAttributeInfoList -> m ()
clearFileAttributeInfoListInfos FileAttributeInfoList
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileAttributeInfoList
-> (Ptr FileAttributeInfoList -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfoList
s ((Ptr FileAttributeInfoList -> IO ()) -> IO ())
-> (Ptr FileAttributeInfoList -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileAttributeInfoList
ptr -> do
Ptr (Ptr FileAttributeInfo) -> Ptr FileAttributeInfo -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileAttributeInfoList
ptr Ptr FileAttributeInfoList -> Int -> Ptr (Ptr FileAttributeInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr FileAttributeInfo
forall a. Ptr a
FP.nullPtr :: Ptr Gio.FileAttributeInfo.FileAttributeInfo)
#if defined(ENABLE_OVERLOADING)
data FileAttributeInfoListInfosFieldInfo
instance AttrInfo FileAttributeInfoListInfosFieldInfo where
type AttrBaseTypeConstraint FileAttributeInfoListInfosFieldInfo = (~) FileAttributeInfoList
type AttrAllowedOps FileAttributeInfoListInfosFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint FileAttributeInfoListInfosFieldInfo = (~) (Ptr Gio.FileAttributeInfo.FileAttributeInfo)
type AttrTransferTypeConstraint FileAttributeInfoListInfosFieldInfo = (~)(Ptr Gio.FileAttributeInfo.FileAttributeInfo)
type AttrTransferType FileAttributeInfoListInfosFieldInfo = (Ptr Gio.FileAttributeInfo.FileAttributeInfo)
type AttrGetType FileAttributeInfoListInfosFieldInfo = Maybe Gio.FileAttributeInfo.FileAttributeInfo
type AttrLabel FileAttributeInfoListInfosFieldInfo = "infos"
type AttrOrigin FileAttributeInfoListInfosFieldInfo = FileAttributeInfoList
attrGet = getFileAttributeInfoListInfos
attrSet = setFileAttributeInfoListInfos
attrConstruct = undefined
attrClear = clearFileAttributeInfoListInfos
attrTransfer _ v = do
return v
fileAttributeInfoList_infos :: AttrLabelProxy "infos"
fileAttributeInfoList_infos = AttrLabelProxy
#endif
getFileAttributeInfoListNInfos :: MonadIO m => FileAttributeInfoList -> m Int32
getFileAttributeInfoListNInfos :: FileAttributeInfoList -> m Int32
getFileAttributeInfoListNInfos FileAttributeInfoList
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
$ FileAttributeInfoList
-> (Ptr FileAttributeInfoList -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfoList
s ((Ptr FileAttributeInfoList -> IO Int32) -> IO Int32)
-> (Ptr FileAttributeInfoList -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr FileAttributeInfoList
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileAttributeInfoList
ptr Ptr FileAttributeInfoList -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setFileAttributeInfoListNInfos :: MonadIO m => FileAttributeInfoList -> Int32 -> m ()
setFileAttributeInfoListNInfos :: FileAttributeInfoList -> Int32 -> m ()
setFileAttributeInfoListNInfos FileAttributeInfoList
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
$ FileAttributeInfoList
-> (Ptr FileAttributeInfoList -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfoList
s ((Ptr FileAttributeInfoList -> IO ()) -> IO ())
-> (Ptr FileAttributeInfoList -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileAttributeInfoList
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileAttributeInfoList
ptr Ptr FileAttributeInfoList -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data FileAttributeInfoListNInfosFieldInfo
instance AttrInfo FileAttributeInfoListNInfosFieldInfo where
type AttrBaseTypeConstraint FileAttributeInfoListNInfosFieldInfo = (~) FileAttributeInfoList
type AttrAllowedOps FileAttributeInfoListNInfosFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint FileAttributeInfoListNInfosFieldInfo = (~) Int32
type AttrTransferTypeConstraint FileAttributeInfoListNInfosFieldInfo = (~)Int32
type AttrTransferType FileAttributeInfoListNInfosFieldInfo = Int32
type AttrGetType FileAttributeInfoListNInfosFieldInfo = Int32
type AttrLabel FileAttributeInfoListNInfosFieldInfo = "n_infos"
type AttrOrigin FileAttributeInfoListNInfosFieldInfo = FileAttributeInfoList
attrGet = getFileAttributeInfoListNInfos
attrSet = setFileAttributeInfoListNInfos
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
fileAttributeInfoList_nInfos :: AttrLabelProxy "nInfos"
fileAttributeInfoList_nInfos = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FileAttributeInfoList
type instance O.AttributeList FileAttributeInfoList = FileAttributeInfoListAttributeList
type FileAttributeInfoListAttributeList = ('[ '("infos", FileAttributeInfoListInfosFieldInfo), '("nInfos", FileAttributeInfoListNInfosFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_file_attribute_info_list_new" g_file_attribute_info_list_new ::
IO (Ptr FileAttributeInfoList)
fileAttributeInfoListNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m FileAttributeInfoList
fileAttributeInfoListNew :: m FileAttributeInfoList
fileAttributeInfoListNew = IO FileAttributeInfoList -> m FileAttributeInfoList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeInfoList -> m FileAttributeInfoList)
-> IO FileAttributeInfoList -> m FileAttributeInfoList
forall a b. (a -> b) -> a -> b
$ do
Ptr FileAttributeInfoList
result <- IO (Ptr FileAttributeInfoList)
g_file_attribute_info_list_new
Text -> Ptr FileAttributeInfoList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileAttributeInfoListNew" Ptr FileAttributeInfoList
result
FileAttributeInfoList
result' <- ((ManagedPtr FileAttributeInfoList -> FileAttributeInfoList)
-> Ptr FileAttributeInfoList -> IO FileAttributeInfoList
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FileAttributeInfoList -> FileAttributeInfoList
FileAttributeInfoList) Ptr FileAttributeInfoList
result
FileAttributeInfoList -> IO FileAttributeInfoList
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeInfoList
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_file_attribute_info_list_add" g_file_attribute_info_list_add ::
Ptr FileAttributeInfoList ->
CString ->
CUInt ->
CUInt ->
IO ()
fileAttributeInfoListAdd ::
(B.CallStack.HasCallStack, MonadIO m) =>
FileAttributeInfoList
-> T.Text
-> Gio.Enums.FileAttributeType
-> [Gio.Flags.FileAttributeInfoFlags]
-> m ()
fileAttributeInfoListAdd :: FileAttributeInfoList
-> Text -> FileAttributeType -> [FileAttributeInfoFlags] -> m ()
fileAttributeInfoListAdd FileAttributeInfoList
list Text
name FileAttributeType
type_ [FileAttributeInfoFlags]
flags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileAttributeInfoList
list' <- FileAttributeInfoList -> IO (Ptr FileAttributeInfoList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FileAttributeInfoList
list
CString
name' <- Text -> IO CString
textToCString Text
name
let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (FileAttributeType -> Int) -> FileAttributeType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FileAttributeType -> Int
forall a. Enum a => a -> Int
fromEnum) FileAttributeType
type_
let flags' :: CUInt
flags' = [FileAttributeInfoFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [FileAttributeInfoFlags]
flags
Ptr FileAttributeInfoList -> CString -> CUInt -> CUInt -> IO ()
g_file_attribute_info_list_add Ptr FileAttributeInfoList
list' CString
name' CUInt
type_' CUInt
flags'
FileAttributeInfoList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FileAttributeInfoList
list
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileAttributeInfoListAddMethodInfo
instance (signature ~ (T.Text -> Gio.Enums.FileAttributeType -> [Gio.Flags.FileAttributeInfoFlags] -> m ()), MonadIO m) => O.MethodInfo FileAttributeInfoListAddMethodInfo FileAttributeInfoList signature where
overloadedMethod = fileAttributeInfoListAdd
#endif
foreign import ccall "g_file_attribute_info_list_dup" g_file_attribute_info_list_dup ::
Ptr FileAttributeInfoList ->
IO (Ptr FileAttributeInfoList)
fileAttributeInfoListDup ::
(B.CallStack.HasCallStack, MonadIO m) =>
FileAttributeInfoList
-> m FileAttributeInfoList
fileAttributeInfoListDup :: FileAttributeInfoList -> m FileAttributeInfoList
fileAttributeInfoListDup FileAttributeInfoList
list = IO FileAttributeInfoList -> m FileAttributeInfoList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeInfoList -> m FileAttributeInfoList)
-> IO FileAttributeInfoList -> m FileAttributeInfoList
forall a b. (a -> b) -> a -> b
$ do
Ptr FileAttributeInfoList
list' <- FileAttributeInfoList -> IO (Ptr FileAttributeInfoList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FileAttributeInfoList
list
Ptr FileAttributeInfoList
result <- Ptr FileAttributeInfoList -> IO (Ptr FileAttributeInfoList)
g_file_attribute_info_list_dup Ptr FileAttributeInfoList
list'
Text -> Ptr FileAttributeInfoList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileAttributeInfoListDup" Ptr FileAttributeInfoList
result
FileAttributeInfoList
result' <- ((ManagedPtr FileAttributeInfoList -> FileAttributeInfoList)
-> Ptr FileAttributeInfoList -> IO FileAttributeInfoList
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FileAttributeInfoList -> FileAttributeInfoList
FileAttributeInfoList) Ptr FileAttributeInfoList
result
FileAttributeInfoList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FileAttributeInfoList
list
FileAttributeInfoList -> IO FileAttributeInfoList
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeInfoList
result'
#if defined(ENABLE_OVERLOADING)
data FileAttributeInfoListDupMethodInfo
instance (signature ~ (m FileAttributeInfoList), MonadIO m) => O.MethodInfo FileAttributeInfoListDupMethodInfo FileAttributeInfoList signature where
overloadedMethod = fileAttributeInfoListDup
#endif
foreign import ccall "g_file_attribute_info_list_lookup" g_file_attribute_info_list_lookup ::
Ptr FileAttributeInfoList ->
CString ->
IO (Ptr Gio.FileAttributeInfo.FileAttributeInfo)
fileAttributeInfoListLookup ::
(B.CallStack.HasCallStack, MonadIO m) =>
FileAttributeInfoList
-> T.Text
-> m Gio.FileAttributeInfo.FileAttributeInfo
fileAttributeInfoListLookup :: FileAttributeInfoList -> Text -> m FileAttributeInfo
fileAttributeInfoListLookup FileAttributeInfoList
list Text
name = IO FileAttributeInfo -> m FileAttributeInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeInfo -> m FileAttributeInfo)
-> IO FileAttributeInfo -> m FileAttributeInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr FileAttributeInfoList
list' <- FileAttributeInfoList -> IO (Ptr FileAttributeInfoList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FileAttributeInfoList
list
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr FileAttributeInfo
result <- Ptr FileAttributeInfoList -> CString -> IO (Ptr FileAttributeInfo)
g_file_attribute_info_list_lookup Ptr FileAttributeInfoList
list' CString
name'
Text -> Ptr FileAttributeInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileAttributeInfoListLookup" Ptr FileAttributeInfo
result
FileAttributeInfo
result' <- ((ManagedPtr FileAttributeInfo -> FileAttributeInfo)
-> Ptr FileAttributeInfo -> IO FileAttributeInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr FileAttributeInfo -> FileAttributeInfo
Gio.FileAttributeInfo.FileAttributeInfo) Ptr FileAttributeInfo
result
FileAttributeInfoList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FileAttributeInfoList
list
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
FileAttributeInfo -> IO FileAttributeInfo
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeInfo
result'
#if defined(ENABLE_OVERLOADING)
data FileAttributeInfoListLookupMethodInfo
instance (signature ~ (T.Text -> m Gio.FileAttributeInfo.FileAttributeInfo), MonadIO m) => O.MethodInfo FileAttributeInfoListLookupMethodInfo FileAttributeInfoList signature where
overloadedMethod = fileAttributeInfoListLookup
#endif
foreign import ccall "g_file_attribute_info_list_ref" g_file_attribute_info_list_ref ::
Ptr FileAttributeInfoList ->
IO (Ptr FileAttributeInfoList)
fileAttributeInfoListRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
FileAttributeInfoList
-> m FileAttributeInfoList
fileAttributeInfoListRef :: FileAttributeInfoList -> m FileAttributeInfoList
fileAttributeInfoListRef FileAttributeInfoList
list = IO FileAttributeInfoList -> m FileAttributeInfoList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeInfoList -> m FileAttributeInfoList)
-> IO FileAttributeInfoList -> m FileAttributeInfoList
forall a b. (a -> b) -> a -> b
$ do
Ptr FileAttributeInfoList
list' <- FileAttributeInfoList -> IO (Ptr FileAttributeInfoList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FileAttributeInfoList
list
Ptr FileAttributeInfoList
result <- Ptr FileAttributeInfoList -> IO (Ptr FileAttributeInfoList)
g_file_attribute_info_list_ref Ptr FileAttributeInfoList
list'
Text -> Ptr FileAttributeInfoList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileAttributeInfoListRef" Ptr FileAttributeInfoList
result
FileAttributeInfoList
result' <- ((ManagedPtr FileAttributeInfoList -> FileAttributeInfoList)
-> Ptr FileAttributeInfoList -> IO FileAttributeInfoList
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FileAttributeInfoList -> FileAttributeInfoList
FileAttributeInfoList) Ptr FileAttributeInfoList
result
FileAttributeInfoList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FileAttributeInfoList
list
FileAttributeInfoList -> IO FileAttributeInfoList
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeInfoList
result'
#if defined(ENABLE_OVERLOADING)
data FileAttributeInfoListRefMethodInfo
instance (signature ~ (m FileAttributeInfoList), MonadIO m) => O.MethodInfo FileAttributeInfoListRefMethodInfo FileAttributeInfoList signature where
overloadedMethod = fileAttributeInfoListRef
#endif
foreign import ccall "g_file_attribute_info_list_unref" g_file_attribute_info_list_unref ::
Ptr FileAttributeInfoList ->
IO ()
fileAttributeInfoListUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
FileAttributeInfoList
-> m ()
fileAttributeInfoListUnref :: FileAttributeInfoList -> m ()
fileAttributeInfoListUnref FileAttributeInfoList
list = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileAttributeInfoList
list' <- FileAttributeInfoList -> IO (Ptr FileAttributeInfoList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FileAttributeInfoList
list
Ptr FileAttributeInfoList -> IO ()
g_file_attribute_info_list_unref Ptr FileAttributeInfoList
list'
FileAttributeInfoList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FileAttributeInfoList
list
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileAttributeInfoListUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo FileAttributeInfoListUnrefMethodInfo FileAttributeInfoList signature where
overloadedMethod = fileAttributeInfoListUnref
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveFileAttributeInfoListMethod (t :: Symbol) (o :: *) :: * where
ResolveFileAttributeInfoListMethod "add" o = FileAttributeInfoListAddMethodInfo
ResolveFileAttributeInfoListMethod "dup" o = FileAttributeInfoListDupMethodInfo
ResolveFileAttributeInfoListMethod "lookup" o = FileAttributeInfoListLookupMethodInfo
ResolveFileAttributeInfoListMethod "ref" o = FileAttributeInfoListRefMethodInfo
ResolveFileAttributeInfoListMethod "unref" o = FileAttributeInfoListUnrefMethodInfo
ResolveFileAttributeInfoListMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFileAttributeInfoListMethod t FileAttributeInfoList, O.MethodInfo info FileAttributeInfoList p) => OL.IsLabel t (FileAttributeInfoList -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif