{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GLib.Structs.Completion
(
Completion(..) ,
newZeroCompletion ,
#if defined(ENABLE_OVERLOADING)
ResolveCompletionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
CompletionClearItemsMethodInfo ,
#endif
completionClearItems ,
#if defined(ENABLE_OVERLOADING)
CompletionCompleteUtf8MethodInfo ,
#endif
completionCompleteUtf8 ,
#if defined(ENABLE_OVERLOADING)
CompletionFreeMethodInfo ,
#endif
completionFree ,
clearCompletionCache ,
#if defined(ENABLE_OVERLOADING)
completion_cache ,
#endif
getCompletionCache ,
setCompletionCache ,
clearCompletionFunc ,
#if defined(ENABLE_OVERLOADING)
completion_func ,
#endif
getCompletionFunc ,
setCompletionFunc ,
clearCompletionItems ,
#if defined(ENABLE_OVERLOADING)
completion_items ,
#endif
getCompletionItems ,
setCompletionItems ,
clearCompletionPrefix ,
#if defined(ENABLE_OVERLOADING)
completion_prefix ,
#endif
getCompletionPrefix ,
setCompletionPrefix ,
clearCompletionStrncmpFunc ,
#if defined(ENABLE_OVERLOADING)
completion_strncmpFunc ,
#endif
getCompletionStrncmpFunc ,
setCompletionStrncmpFunc ,
) 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.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
#else
import qualified GI.GLib.Callbacks as GLib.Callbacks
#endif
newtype Completion = Completion (SP.ManagedPtr Completion)
deriving (Completion -> Completion -> Bool
(Completion -> Completion -> Bool)
-> (Completion -> Completion -> Bool) -> Eq Completion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Completion -> Completion -> Bool
== :: Completion -> Completion -> Bool
$c/= :: Completion -> Completion -> Bool
/= :: Completion -> Completion -> Bool
Eq)
instance SP.ManagedPtrNewtype Completion where
toManagedPtr :: Completion -> ManagedPtr Completion
toManagedPtr (Completion ManagedPtr Completion
p) = ManagedPtr Completion
p
instance BoxedPtr Completion where
boxedPtrCopy :: Completion -> IO Completion
boxedPtrCopy = \Completion
p -> Completion -> (Ptr Completion -> IO Completion) -> IO Completion
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Completion
p (Int -> Ptr Completion -> IO (Ptr Completion)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
40 (Ptr Completion -> IO (Ptr Completion))
-> (Ptr Completion -> IO Completion)
-> Ptr Completion
-> IO Completion
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr Completion -> Completion)
-> Ptr Completion -> IO Completion
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr Completion -> Completion
Completion)
boxedPtrFree :: Completion -> IO ()
boxedPtrFree = \Completion
x -> Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr Completion
x Ptr Completion -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr Completion where
boxedPtrCalloc :: IO (Ptr Completion)
boxedPtrCalloc = Int -> IO (Ptr Completion)
forall a. Int -> IO (Ptr a)
callocBytes Int
40
newZeroCompletion :: MonadIO m => m Completion
newZeroCompletion :: forall (m :: * -> *). MonadIO m => m Completion
newZeroCompletion = IO Completion -> m Completion
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Completion -> m Completion) -> IO Completion -> m Completion
forall a b. (a -> b) -> a -> b
$ IO (Ptr Completion)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr Completion)
-> (Ptr Completion -> IO Completion) -> IO Completion
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Completion -> Completion)
-> Ptr Completion -> IO Completion
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr Completion -> Completion
Completion
instance tag ~ 'AttrSet => Constructible Completion tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr Completion -> Completion)
-> [AttrOp Completion tag] -> m Completion
new ManagedPtr Completion -> Completion
_ [AttrOp Completion tag]
attrs = do
Completion
o <- m Completion
forall (m :: * -> *). MonadIO m => m Completion
newZeroCompletion
Completion -> [AttrOp Completion 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Completion
o [AttrOp Completion tag]
[AttrOp Completion 'AttrSet]
attrs
Completion -> m Completion
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return Completion
o
getCompletionItems :: MonadIO m => Completion -> m ([Ptr ()])
getCompletionItems :: forall (m :: * -> *). MonadIO m => Completion -> m [Ptr ()]
getCompletionItems Completion
s = IO [Ptr ()] -> m [Ptr ()]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Ptr ()] -> m [Ptr ()]) -> IO [Ptr ()] -> m [Ptr ()]
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO [Ptr ()]) -> IO [Ptr ()]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO [Ptr ()]) -> IO [Ptr ()])
-> (Ptr Completion -> IO [Ptr ()]) -> IO [Ptr ()]
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (GList (Ptr ()))
val <- Ptr (Ptr (GList (Ptr ()))) -> IO (Ptr (GList (Ptr ())))
forall a. Storable a => Ptr a -> IO a
peek (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (Ptr (GList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO (Ptr (GList (Ptr ())))
[Ptr ()]
val' <- Ptr (GList (Ptr ())) -> IO [Ptr ()]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr ()))
val
[Ptr ()] -> IO [Ptr ()]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Ptr ()]
val'
setCompletionItems :: MonadIO m => Completion -> Ptr (GList (Ptr ())) -> m ()
setCompletionItems :: forall (m :: * -> *).
MonadIO m =>
Completion -> Ptr (GList (Ptr ())) -> m ()
setCompletionItems Completion
s Ptr (GList (Ptr ()))
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (Ptr (GList (Ptr ()))) -> Ptr (GList (Ptr ())) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (Ptr (GList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr (GList (Ptr ()))
val :: Ptr (GList (Ptr ())))
clearCompletionItems :: MonadIO m => Completion -> m ()
clearCompletionItems :: forall (m :: * -> *). MonadIO m => Completion -> m ()
clearCompletionItems Completion
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (Ptr (GList (Ptr ()))) -> Ptr (GList (Ptr ())) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (Ptr (GList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Ptr (GList (Ptr ()))
forall a. Ptr a
FP.nullPtr :: Ptr (GList (Ptr ())))
#if defined(ENABLE_OVERLOADING)
data CompletionItemsFieldInfo
instance AttrInfo CompletionItemsFieldInfo where
type AttrBaseTypeConstraint CompletionItemsFieldInfo = (~) Completion
type AttrAllowedOps CompletionItemsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionItemsFieldInfo = (~) (Ptr (GList (Ptr ())))
type AttrTransferTypeConstraint CompletionItemsFieldInfo = (~)(Ptr (GList (Ptr ())))
type AttrTransferType CompletionItemsFieldInfo = (Ptr (GList (Ptr ())))
type AttrGetType CompletionItemsFieldInfo = [Ptr ()]
type AttrLabel CompletionItemsFieldInfo = "items"
type AttrOrigin CompletionItemsFieldInfo = Completion
attrGet = getCompletionItems
attrSet = setCompletionItems
attrConstruct = undefined
attrClear = clearCompletionItems
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.items"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#g:attr:items"
})
completion_items :: AttrLabelProxy "items"
completion_items = AttrLabelProxy
#endif
getCompletionFunc :: MonadIO m => Completion -> m (Maybe GLib.Callbacks.CompletionFunc_WithClosures)
getCompletionFunc :: forall (m :: * -> *).
MonadIO m =>
Completion -> m (Maybe CompletionFunc_WithClosures)
getCompletionFunc Completion
s = IO (Maybe CompletionFunc_WithClosures)
-> m (Maybe CompletionFunc_WithClosures)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe CompletionFunc_WithClosures)
-> m (Maybe CompletionFunc_WithClosures))
-> IO (Maybe CompletionFunc_WithClosures)
-> m (Maybe CompletionFunc_WithClosures)
forall a b. (a -> b) -> a -> b
$ Completion
-> (Ptr Completion -> IO (Maybe CompletionFunc_WithClosures))
-> IO (Maybe CompletionFunc_WithClosures)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO (Maybe CompletionFunc_WithClosures))
-> IO (Maybe CompletionFunc_WithClosures))
-> (Ptr Completion -> IO (Maybe CompletionFunc_WithClosures))
-> IO (Maybe CompletionFunc_WithClosures)
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
FunPtr C_CompletionFunc
val <- Ptr (FunPtr C_CompletionFunc) -> IO (FunPtr C_CompletionFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (FunPtr C_CompletionFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (FunPtr GLib.Callbacks.C_CompletionFunc)
Maybe CompletionFunc_WithClosures
result <- FunPtr C_CompletionFunc
-> (FunPtr C_CompletionFunc -> IO CompletionFunc_WithClosures)
-> IO (Maybe CompletionFunc_WithClosures)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_CompletionFunc
val ((FunPtr C_CompletionFunc -> IO CompletionFunc_WithClosures)
-> IO (Maybe CompletionFunc_WithClosures))
-> (FunPtr C_CompletionFunc -> IO CompletionFunc_WithClosures)
-> IO (Maybe CompletionFunc_WithClosures)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_CompletionFunc
val' -> do
let val'' :: CompletionFunc_WithClosures
val'' = FunPtr C_CompletionFunc -> CompletionFunc_WithClosures
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_CompletionFunc -> Ptr () -> m Text
GLib.Callbacks.dynamic_CompletionFunc FunPtr C_CompletionFunc
val'
CompletionFunc_WithClosures -> IO CompletionFunc_WithClosures
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CompletionFunc_WithClosures
val''
Maybe CompletionFunc_WithClosures
-> IO (Maybe CompletionFunc_WithClosures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe CompletionFunc_WithClosures
result
setCompletionFunc :: MonadIO m => Completion -> FunPtr GLib.Callbacks.C_CompletionFunc -> m ()
setCompletionFunc :: forall (m :: * -> *).
MonadIO m =>
Completion -> FunPtr C_CompletionFunc -> m ()
setCompletionFunc Completion
s FunPtr C_CompletionFunc
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (FunPtr C_CompletionFunc) -> FunPtr C_CompletionFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (FunPtr C_CompletionFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (FunPtr C_CompletionFunc
val :: FunPtr GLib.Callbacks.C_CompletionFunc)
clearCompletionFunc :: MonadIO m => Completion -> m ()
clearCompletionFunc :: forall (m :: * -> *). MonadIO m => Completion -> m ()
clearCompletionFunc Completion
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (FunPtr C_CompletionFunc) -> FunPtr C_CompletionFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (FunPtr C_CompletionFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (FunPtr C_CompletionFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GLib.Callbacks.C_CompletionFunc)
#if defined(ENABLE_OVERLOADING)
data CompletionFuncFieldInfo
instance AttrInfo CompletionFuncFieldInfo where
type AttrBaseTypeConstraint CompletionFuncFieldInfo = (~) Completion
type AttrAllowedOps CompletionFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionFuncFieldInfo = (~) (FunPtr GLib.Callbacks.C_CompletionFunc)
type AttrTransferTypeConstraint CompletionFuncFieldInfo = (~)GLib.Callbacks.CompletionFunc_WithClosures
type AttrTransferType CompletionFuncFieldInfo = (FunPtr GLib.Callbacks.C_CompletionFunc)
type AttrGetType CompletionFuncFieldInfo = Maybe GLib.Callbacks.CompletionFunc_WithClosures
type AttrLabel CompletionFuncFieldInfo = "func"
type AttrOrigin CompletionFuncFieldInfo = Completion
attrGet = getCompletionFunc
attrSet = setCompletionFunc
attrConstruct = undefined
attrClear = clearCompletionFunc
attrTransfer _ v = do
GLib.Callbacks.mk_CompletionFunc (GLib.Callbacks.wrap_CompletionFunc Nothing v)
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.func"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#g:attr:func"
})
completion_func :: AttrLabelProxy "func"
completion_func = AttrLabelProxy
#endif
getCompletionPrefix :: MonadIO m => Completion -> m (Maybe T.Text)
getCompletionPrefix :: forall (m :: * -> *). MonadIO m => Completion -> m (Maybe Text)
getCompletionPrefix Completion
s = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ Completion
-> (Ptr Completion -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr Completion -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr Completion
ptr Ptr Completion -> 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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result
setCompletionPrefix :: MonadIO m => Completion -> CString -> m ()
setCompletionPrefix :: forall (m :: * -> *). MonadIO m => Completion -> CString -> m ()
setCompletionPrefix Completion
s CString
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CString
val :: CString)
clearCompletionPrefix :: MonadIO m => Completion -> m ()
clearCompletionPrefix :: forall (m :: * -> *). MonadIO m => Completion -> m ()
clearCompletionPrefix Completion
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> 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 CompletionPrefixFieldInfo
instance AttrInfo CompletionPrefixFieldInfo where
type AttrBaseTypeConstraint CompletionPrefixFieldInfo = (~) Completion
type AttrAllowedOps CompletionPrefixFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionPrefixFieldInfo = (~) CString
type AttrTransferTypeConstraint CompletionPrefixFieldInfo = (~)CString
type AttrTransferType CompletionPrefixFieldInfo = CString
type AttrGetType CompletionPrefixFieldInfo = Maybe T.Text
type AttrLabel CompletionPrefixFieldInfo = "prefix"
type AttrOrigin CompletionPrefixFieldInfo = Completion
attrGet = getCompletionPrefix
attrSet = setCompletionPrefix
attrConstruct = undefined
attrClear = clearCompletionPrefix
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.prefix"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#g:attr:prefix"
})
completion_prefix :: AttrLabelProxy "prefix"
completion_prefix = AttrLabelProxy
#endif
getCompletionCache :: MonadIO m => Completion -> m ([Ptr ()])
getCompletionCache :: forall (m :: * -> *). MonadIO m => Completion -> m [Ptr ()]
getCompletionCache Completion
s = IO [Ptr ()] -> m [Ptr ()]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Ptr ()] -> m [Ptr ()]) -> IO [Ptr ()] -> m [Ptr ()]
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO [Ptr ()]) -> IO [Ptr ()]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO [Ptr ()]) -> IO [Ptr ()])
-> (Ptr Completion -> IO [Ptr ()]) -> IO [Ptr ()]
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (GList (Ptr ()))
val <- Ptr (Ptr (GList (Ptr ()))) -> IO (Ptr (GList (Ptr ())))
forall a. Storable a => Ptr a -> IO a
peek (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (Ptr (GList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO (Ptr (GList (Ptr ())))
[Ptr ()]
val' <- Ptr (GList (Ptr ())) -> IO [Ptr ()]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr ()))
val
[Ptr ()] -> IO [Ptr ()]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Ptr ()]
val'
setCompletionCache :: MonadIO m => Completion -> Ptr (GList (Ptr ())) -> m ()
setCompletionCache :: forall (m :: * -> *).
MonadIO m =>
Completion -> Ptr (GList (Ptr ())) -> m ()
setCompletionCache Completion
s Ptr (GList (Ptr ()))
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (Ptr (GList (Ptr ()))) -> Ptr (GList (Ptr ())) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (Ptr (GList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr (GList (Ptr ()))
val :: Ptr (GList (Ptr ())))
clearCompletionCache :: MonadIO m => Completion -> m ()
clearCompletionCache :: forall (m :: * -> *). MonadIO m => Completion -> m ()
clearCompletionCache Completion
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (Ptr (GList (Ptr ()))) -> Ptr (GList (Ptr ())) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (Ptr (GList (Ptr ())))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr (GList (Ptr ()))
forall a. Ptr a
FP.nullPtr :: Ptr (GList (Ptr ())))
#if defined(ENABLE_OVERLOADING)
data CompletionCacheFieldInfo
instance AttrInfo CompletionCacheFieldInfo where
type AttrBaseTypeConstraint CompletionCacheFieldInfo = (~) Completion
type AttrAllowedOps CompletionCacheFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionCacheFieldInfo = (~) (Ptr (GList (Ptr ())))
type AttrTransferTypeConstraint CompletionCacheFieldInfo = (~)(Ptr (GList (Ptr ())))
type AttrTransferType CompletionCacheFieldInfo = (Ptr (GList (Ptr ())))
type AttrGetType CompletionCacheFieldInfo = [Ptr ()]
type AttrLabel CompletionCacheFieldInfo = "cache"
type AttrOrigin CompletionCacheFieldInfo = Completion
attrGet = getCompletionCache
attrSet = setCompletionCache
attrConstruct = undefined
attrClear = clearCompletionCache
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.cache"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#g:attr:cache"
})
completion_cache :: AttrLabelProxy "cache"
completion_cache = AttrLabelProxy
#endif
getCompletionStrncmpFunc :: MonadIO m => Completion -> m (Maybe GLib.Callbacks.CompletionStrncmpFunc)
getCompletionStrncmpFunc :: forall (m :: * -> *).
MonadIO m =>
Completion -> m (Maybe CompletionStrncmpFunc)
getCompletionStrncmpFunc Completion
s = IO (Maybe CompletionStrncmpFunc) -> m (Maybe CompletionStrncmpFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe CompletionStrncmpFunc)
-> m (Maybe CompletionStrncmpFunc))
-> IO (Maybe CompletionStrncmpFunc)
-> m (Maybe CompletionStrncmpFunc)
forall a b. (a -> b) -> a -> b
$ Completion
-> (Ptr Completion -> IO (Maybe CompletionStrncmpFunc))
-> IO (Maybe CompletionStrncmpFunc)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO (Maybe CompletionStrncmpFunc))
-> IO (Maybe CompletionStrncmpFunc))
-> (Ptr Completion -> IO (Maybe CompletionStrncmpFunc))
-> IO (Maybe CompletionStrncmpFunc)
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
FunPtr C_CompletionStrncmpFunc
val <- Ptr (FunPtr C_CompletionStrncmpFunc)
-> IO (FunPtr C_CompletionStrncmpFunc)
forall a. Storable a => Ptr a -> IO a
peek (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (FunPtr C_CompletionStrncmpFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO (FunPtr GLib.Callbacks.C_CompletionStrncmpFunc)
Maybe CompletionStrncmpFunc
result <- FunPtr C_CompletionStrncmpFunc
-> (FunPtr C_CompletionStrncmpFunc -> IO CompletionStrncmpFunc)
-> IO (Maybe CompletionStrncmpFunc)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_CompletionStrncmpFunc
val ((FunPtr C_CompletionStrncmpFunc -> IO CompletionStrncmpFunc)
-> IO (Maybe CompletionStrncmpFunc))
-> (FunPtr C_CompletionStrncmpFunc -> IO CompletionStrncmpFunc)
-> IO (Maybe CompletionStrncmpFunc)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_CompletionStrncmpFunc
val' -> do
let val'' :: CompletionStrncmpFunc
val'' = FunPtr C_CompletionStrncmpFunc -> CompletionStrncmpFunc
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_CompletionStrncmpFunc -> Text -> Text -> CSize -> m Int32
GLib.Callbacks.dynamic_CompletionStrncmpFunc FunPtr C_CompletionStrncmpFunc
val'
CompletionStrncmpFunc -> IO CompletionStrncmpFunc
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CompletionStrncmpFunc
val''
Maybe CompletionStrncmpFunc -> IO (Maybe CompletionStrncmpFunc)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe CompletionStrncmpFunc
result
setCompletionStrncmpFunc :: MonadIO m => Completion -> FunPtr GLib.Callbacks.C_CompletionStrncmpFunc -> m ()
setCompletionStrncmpFunc :: forall (m :: * -> *).
MonadIO m =>
Completion -> FunPtr C_CompletionStrncmpFunc -> m ()
setCompletionStrncmpFunc Completion
s FunPtr C_CompletionStrncmpFunc
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (FunPtr C_CompletionStrncmpFunc)
-> FunPtr C_CompletionStrncmpFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (FunPtr C_CompletionStrncmpFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (FunPtr C_CompletionStrncmpFunc
val :: FunPtr GLib.Callbacks.C_CompletionStrncmpFunc)
clearCompletionStrncmpFunc :: MonadIO m => Completion -> m ()
clearCompletionStrncmpFunc :: forall (m :: * -> *). MonadIO m => Completion -> m ()
clearCompletionStrncmpFunc Completion
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Completion -> (Ptr Completion -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Completion
s ((Ptr Completion -> IO ()) -> IO ())
-> (Ptr Completion -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Completion
ptr -> do
Ptr (FunPtr C_CompletionStrncmpFunc)
-> FunPtr C_CompletionStrncmpFunc -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Completion
ptr Ptr Completion -> Int -> Ptr (FunPtr C_CompletionStrncmpFunc)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (FunPtr C_CompletionStrncmpFunc
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GLib.Callbacks.C_CompletionStrncmpFunc)
#if defined(ENABLE_OVERLOADING)
data CompletionStrncmpFuncFieldInfo
instance AttrInfo CompletionStrncmpFuncFieldInfo where
type AttrBaseTypeConstraint CompletionStrncmpFuncFieldInfo = (~) Completion
type AttrAllowedOps CompletionStrncmpFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CompletionStrncmpFuncFieldInfo = (~) (FunPtr GLib.Callbacks.C_CompletionStrncmpFunc)
type AttrTransferTypeConstraint CompletionStrncmpFuncFieldInfo = (~)GLib.Callbacks.CompletionStrncmpFunc
type AttrTransferType CompletionStrncmpFuncFieldInfo = (FunPtr GLib.Callbacks.C_CompletionStrncmpFunc)
type AttrGetType CompletionStrncmpFuncFieldInfo = Maybe GLib.Callbacks.CompletionStrncmpFunc
type AttrLabel CompletionStrncmpFuncFieldInfo = "strncmp_func"
type AttrOrigin CompletionStrncmpFuncFieldInfo = Completion
attrGet = getCompletionStrncmpFunc
attrSet = setCompletionStrncmpFunc
attrConstruct = undefined
attrClear = clearCompletionStrncmpFunc
attrTransfer _ v = do
GLib.Callbacks.mk_CompletionStrncmpFunc (GLib.Callbacks.wrap_CompletionStrncmpFunc Nothing v)
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.strncmpFunc"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#g:attr:strncmpFunc"
})
completion_strncmpFunc :: AttrLabelProxy "strncmpFunc"
completion_strncmpFunc = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Completion
type instance O.AttributeList Completion = CompletionAttributeList
type CompletionAttributeList = ('[ '("items", CompletionItemsFieldInfo), '("func", CompletionFuncFieldInfo), '("prefix", CompletionPrefixFieldInfo), '("cache", CompletionCacheFieldInfo), '("strncmpFunc", CompletionStrncmpFuncFieldInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_completion_clear_items" g_completion_clear_items ::
Ptr Completion ->
IO ()
{-# DEPRECATED completionClearItems ["(Since version 2.26)","Rarely used API"] #-}
completionClearItems ::
(B.CallStack.HasCallStack, MonadIO m) =>
Completion
-> m ()
completionClearItems :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Completion -> m ()
completionClearItems Completion
cmp = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Completion
cmp' <- Completion -> IO (Ptr Completion)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Completion
cmp
Ptr Completion -> IO ()
g_completion_clear_items Ptr Completion
cmp'
Completion -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Completion
cmp
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CompletionClearItemsMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod CompletionClearItemsMethodInfo Completion signature where
overloadedMethod = completionClearItems
instance O.OverloadedMethodInfo CompletionClearItemsMethodInfo Completion where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.completionClearItems",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#v:completionClearItems"
})
#endif
foreign import ccall "g_completion_complete_utf8" g_completion_complete_utf8 ::
Ptr Completion ->
CString ->
CString ->
IO (Ptr (GList CString))
{-# DEPRECATED completionCompleteUtf8 ["(Since version 2.26)","Rarely used API"] #-}
completionCompleteUtf8 ::
(B.CallStack.HasCallStack, MonadIO m) =>
Completion
-> T.Text
-> T.Text
-> m [T.Text]
completionCompleteUtf8 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Completion -> Text -> Text -> m [Text]
completionCompleteUtf8 Completion
cmp Text
prefix Text
newPrefix = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Completion
cmp' <- Completion -> IO (Ptr Completion)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Completion
cmp
CString
prefix' <- Text -> IO CString
textToCString Text
prefix
CString
newPrefix' <- Text -> IO CString
textToCString Text
newPrefix
Ptr (GList CString)
result <- Ptr Completion -> CString -> CString -> IO (Ptr (GList CString))
g_completion_complete_utf8 Ptr Completion
cmp' CString
prefix' CString
newPrefix'
[CString]
result' <- Ptr (GList CString) -> IO [CString]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList CString)
result
[Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
Completion -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Completion
cmp
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
prefix'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
newPrefix'
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
#if defined(ENABLE_OVERLOADING)
data CompletionCompleteUtf8MethodInfo
instance (signature ~ (T.Text -> T.Text -> m [T.Text]), MonadIO m) => O.OverloadedMethod CompletionCompleteUtf8MethodInfo Completion signature where
overloadedMethod = completionCompleteUtf8
instance O.OverloadedMethodInfo CompletionCompleteUtf8MethodInfo Completion where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.completionCompleteUtf8",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#v:completionCompleteUtf8"
})
#endif
foreign import ccall "g_completion_free" g_completion_free ::
Ptr Completion ->
IO ()
{-# DEPRECATED completionFree ["(Since version 2.26)","Rarely used API"] #-}
completionFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Completion
-> m ()
completionFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Completion -> m ()
completionFree Completion
cmp = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Completion
cmp' <- Completion -> IO (Ptr Completion)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Completion
cmp
Ptr Completion -> IO ()
g_completion_free Ptr Completion
cmp'
Completion -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Completion
cmp
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CompletionFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod CompletionFreeMethodInfo Completion signature where
overloadedMethod = completionFree
instance O.OverloadedMethodInfo CompletionFreeMethodInfo Completion where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.Completion.completionFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.30/docs/GI-GLib-Structs-Completion.html#v:completionFree"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveCompletionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveCompletionMethod "clearItems" o = CompletionClearItemsMethodInfo
ResolveCompletionMethod "completeUtf8" o = CompletionCompleteUtf8MethodInfo
ResolveCompletionMethod "free" o = CompletionFreeMethodInfo
ResolveCompletionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveCompletionMethod t Completion, O.OverloadedMethod info Completion p) => OL.IsLabel t (Completion -> 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 ~ ResolveCompletionMethod t Completion, O.OverloadedMethod info Completion p, R.HasField t Completion p) => R.HasField t Completion p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveCompletionMethod t Completion, O.OverloadedMethodInfo info Completion) => OL.IsLabel t (O.MethodProxy info Completion) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif