#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.IBus.Callbacks
(
C_FreeFunc ,
FreeFunc ,
dynamic_FreeFunc ,
genClosure_FreeFunc ,
mk_FreeFunc ,
noFreeFunc ,
wrap_FreeFunc ,
C_ObjectDestroyFunc ,
ObjectDestroyFunc ,
dynamic_ObjectDestroyFunc ,
genClosure_ObjectDestroyFunc ,
mk_ObjectDestroyFunc ,
noObjectDestroyFunc ,
wrap_ObjectDestroyFunc ,
C_SerializableCopyFunc ,
SerializableCopyFunc ,
dynamic_SerializableCopyFunc ,
genClosure_SerializableCopyFunc ,
mk_SerializableCopyFunc ,
noSerializableCopyFunc ,
wrap_SerializableCopyFunc ,
C_SerializableDeserializeFunc ,
SerializableDeserializeFunc ,
dynamic_SerializableDeserializeFunc ,
genClosure_SerializableDeserializeFunc ,
mk_SerializableDeserializeFunc ,
noSerializableDeserializeFunc ,
wrap_SerializableDeserializeFunc ,
C_SerializableSerializeFunc ,
SerializableSerializeFunc ,
dynamic_SerializableSerializeFunc ,
genClosure_SerializableSerializeFunc ,
mk_SerializableSerializeFunc ,
noSerializableSerializeFunc ,
wrap_SerializableSerializeFunc ,
C_UnicodeDataLoadAsyncFinish ,
UnicodeDataLoadAsyncFinish ,
UnicodeDataLoadAsyncFinish_WithClosures ,
drop_closures_UnicodeDataLoadAsyncFinish,
dynamic_UnicodeDataLoadAsyncFinish ,
genClosure_UnicodeDataLoadAsyncFinish ,
mk_UnicodeDataLoadAsyncFinish ,
noUnicodeDataLoadAsyncFinish ,
noUnicodeDataLoadAsyncFinish_WithClosures,
wrap_UnicodeDataLoadAsyncFinish ,
) 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 GI.GLib.Structs.VariantBuilder as GLib.VariantBuilder
import {-# SOURCE #-} qualified GI.IBus.Objects.Object as IBus.Object
import {-# SOURCE #-} qualified GI.IBus.Objects.Serializable as IBus.Serializable
import {-# SOURCE #-} qualified GI.IBus.Objects.UnicodeData as IBus.UnicodeData
type C_UnicodeDataLoadAsyncFinish =
Ptr (GSList (Ptr IBus.UnicodeData.UnicodeData)) ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_UnicodeDataLoadAsyncFinish :: FunPtr C_UnicodeDataLoadAsyncFinish -> C_UnicodeDataLoadAsyncFinish
dynamic_UnicodeDataLoadAsyncFinish ::
(B.CallStack.HasCallStack, MonadIO m, IBus.UnicodeData.IsUnicodeData a) =>
FunPtr C_UnicodeDataLoadAsyncFinish
-> [a]
-> Ptr ()
-> m ()
dynamic_UnicodeDataLoadAsyncFinish :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUnicodeData a) =>
FunPtr C_UnicodeDataLoadAsyncFinish -> [a] -> Ptr () -> m ()
dynamic_UnicodeDataLoadAsyncFinish FunPtr C_UnicodeDataLoadAsyncFinish
__funPtr [a]
dataList Ptr ()
userData = 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 UnicodeData]
dataList' <- (a -> IO (Ptr UnicodeData)) -> [a] -> IO [Ptr UnicodeData]
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 a -> IO (Ptr UnicodeData)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject [a]
dataList
Ptr (GSList (Ptr UnicodeData))
dataList'' <- [Ptr UnicodeData] -> IO (Ptr (GSList (Ptr UnicodeData)))
forall a. [Ptr a] -> IO (Ptr (GSList (Ptr a)))
packGSList [Ptr UnicodeData]
dataList'
(FunPtr C_UnicodeDataLoadAsyncFinish -> C_UnicodeDataLoadAsyncFinish
__dynamic_C_UnicodeDataLoadAsyncFinish FunPtr C_UnicodeDataLoadAsyncFinish
__funPtr) Ptr (GSList (Ptr UnicodeData))
dataList'' Ptr ()
userData
(a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
dataList
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_UnicodeDataLoadAsyncFinish :: C_UnicodeDataLoadAsyncFinish -> IO (FunPtr C_UnicodeDataLoadAsyncFinish)
type UnicodeDataLoadAsyncFinish =
[IBus.UnicodeData.UnicodeData]
-> IO ()
noUnicodeDataLoadAsyncFinish :: Maybe UnicodeDataLoadAsyncFinish
noUnicodeDataLoadAsyncFinish :: Maybe UnicodeDataLoadAsyncFinish
noUnicodeDataLoadAsyncFinish = Maybe UnicodeDataLoadAsyncFinish
forall a. Maybe a
Nothing
type UnicodeDataLoadAsyncFinish_WithClosures =
[IBus.UnicodeData.UnicodeData]
-> Ptr ()
-> IO ()
noUnicodeDataLoadAsyncFinish_WithClosures :: Maybe UnicodeDataLoadAsyncFinish_WithClosures
noUnicodeDataLoadAsyncFinish_WithClosures :: Maybe UnicodeDataLoadAsyncFinish_WithClosures
noUnicodeDataLoadAsyncFinish_WithClosures = Maybe UnicodeDataLoadAsyncFinish_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnicodeDataLoadAsyncFinish :: UnicodeDataLoadAsyncFinish -> UnicodeDataLoadAsyncFinish_WithClosures
drop_closures_UnicodeDataLoadAsyncFinish :: UnicodeDataLoadAsyncFinish
-> UnicodeDataLoadAsyncFinish_WithClosures
drop_closures_UnicodeDataLoadAsyncFinish UnicodeDataLoadAsyncFinish
_f [UnicodeData]
dataList Ptr ()
_ = UnicodeDataLoadAsyncFinish
_f [UnicodeData]
dataList
genClosure_UnicodeDataLoadAsyncFinish :: MonadIO m => UnicodeDataLoadAsyncFinish -> m (GClosure C_UnicodeDataLoadAsyncFinish)
genClosure_UnicodeDataLoadAsyncFinish :: forall (m :: * -> *).
MonadIO m =>
UnicodeDataLoadAsyncFinish
-> m (GClosure C_UnicodeDataLoadAsyncFinish)
genClosure_UnicodeDataLoadAsyncFinish UnicodeDataLoadAsyncFinish
cb = IO (GClosure C_UnicodeDataLoadAsyncFinish)
-> m (GClosure C_UnicodeDataLoadAsyncFinish)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnicodeDataLoadAsyncFinish)
-> m (GClosure C_UnicodeDataLoadAsyncFinish))
-> IO (GClosure C_UnicodeDataLoadAsyncFinish)
-> m (GClosure C_UnicodeDataLoadAsyncFinish)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnicodeDataLoadAsyncFinish_WithClosures
cb' = UnicodeDataLoadAsyncFinish
-> UnicodeDataLoadAsyncFinish_WithClosures
drop_closures_UnicodeDataLoadAsyncFinish UnicodeDataLoadAsyncFinish
cb
let cb'' :: C_UnicodeDataLoadAsyncFinish
cb'' = Maybe (Ptr (FunPtr C_UnicodeDataLoadAsyncFinish))
-> UnicodeDataLoadAsyncFinish_WithClosures
-> C_UnicodeDataLoadAsyncFinish
wrap_UnicodeDataLoadAsyncFinish Maybe (Ptr (FunPtr C_UnicodeDataLoadAsyncFinish))
forall a. Maybe a
Nothing UnicodeDataLoadAsyncFinish_WithClosures
cb'
C_UnicodeDataLoadAsyncFinish
-> IO (FunPtr C_UnicodeDataLoadAsyncFinish)
mk_UnicodeDataLoadAsyncFinish C_UnicodeDataLoadAsyncFinish
cb'' IO (FunPtr C_UnicodeDataLoadAsyncFinish)
-> (FunPtr C_UnicodeDataLoadAsyncFinish
-> IO (GClosure C_UnicodeDataLoadAsyncFinish))
-> IO (GClosure C_UnicodeDataLoadAsyncFinish)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnicodeDataLoadAsyncFinish
-> IO (GClosure C_UnicodeDataLoadAsyncFinish)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnicodeDataLoadAsyncFinish ::
Maybe (Ptr (FunPtr C_UnicodeDataLoadAsyncFinish)) ->
UnicodeDataLoadAsyncFinish_WithClosures ->
C_UnicodeDataLoadAsyncFinish
wrap_UnicodeDataLoadAsyncFinish :: Maybe (Ptr (FunPtr C_UnicodeDataLoadAsyncFinish))
-> UnicodeDataLoadAsyncFinish_WithClosures
-> C_UnicodeDataLoadAsyncFinish
wrap_UnicodeDataLoadAsyncFinish Maybe (Ptr (FunPtr C_UnicodeDataLoadAsyncFinish))
gi'funptrptr UnicodeDataLoadAsyncFinish_WithClosures
gi'cb Ptr (GSList (Ptr UnicodeData))
dataList Ptr ()
userData = do
[Ptr UnicodeData]
dataList' <- Ptr (GSList (Ptr UnicodeData)) -> IO [Ptr UnicodeData]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr UnicodeData))
dataList
[UnicodeData]
dataList'' <- (Ptr UnicodeData -> IO UnicodeData)
-> [Ptr UnicodeData] -> IO [UnicodeData]
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 ((ManagedPtr UnicodeData -> UnicodeData)
-> Ptr UnicodeData -> IO UnicodeData
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr UnicodeData -> UnicodeData
IBus.UnicodeData.UnicodeData) [Ptr UnicodeData]
dataList'
UnicodeDataLoadAsyncFinish_WithClosures
gi'cb [UnicodeData]
dataList'' Ptr ()
userData
Maybe (Ptr (FunPtr C_UnicodeDataLoadAsyncFinish)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnicodeDataLoadAsyncFinish))
gi'funptrptr
type C_SerializableSerializeFunc =
Ptr IBus.Serializable.Serializable ->
Ptr GLib.VariantBuilder.VariantBuilder ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SerializableSerializeFunc :: FunPtr C_SerializableSerializeFunc -> C_SerializableSerializeFunc
dynamic_SerializableSerializeFunc ::
(B.CallStack.HasCallStack, MonadIO m, IBus.Serializable.IsSerializable a) =>
FunPtr C_SerializableSerializeFunc
-> a
-> GLib.VariantBuilder.VariantBuilder
-> m Bool
dynamic_SerializableSerializeFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSerializable a) =>
FunPtr C_SerializableSerializeFunc -> a -> VariantBuilder -> m Bool
dynamic_SerializableSerializeFunc FunPtr C_SerializableSerializeFunc
__funPtr a
serializable VariantBuilder
builder = IO Bool -> m Bool
forall a. IO a -> m a
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
$ do
Ptr Serializable
serializable' <- a -> IO (Ptr Serializable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializable
Ptr VariantBuilder
builder' <- VariantBuilder -> IO (Ptr VariantBuilder)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantBuilder
builder
CInt
result <- (FunPtr C_SerializableSerializeFunc -> C_SerializableSerializeFunc
__dynamic_C_SerializableSerializeFunc FunPtr C_SerializableSerializeFunc
__funPtr) Ptr Serializable
serializable' Ptr VariantBuilder
builder'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
serializable
VariantBuilder -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantBuilder
builder
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_SerializableSerializeFunc :: C_SerializableSerializeFunc -> IO (FunPtr C_SerializableSerializeFunc)
type SerializableSerializeFunc =
IBus.Serializable.Serializable
-> GLib.VariantBuilder.VariantBuilder
-> IO Bool
noSerializableSerializeFunc :: Maybe SerializableSerializeFunc
noSerializableSerializeFunc :: Maybe SerializableSerializeFunc
noSerializableSerializeFunc = Maybe SerializableSerializeFunc
forall a. Maybe a
Nothing
genClosure_SerializableSerializeFunc :: MonadIO m => SerializableSerializeFunc -> m (GClosure C_SerializableSerializeFunc)
genClosure_SerializableSerializeFunc :: forall (m :: * -> *).
MonadIO m =>
SerializableSerializeFunc
-> m (GClosure C_SerializableSerializeFunc)
genClosure_SerializableSerializeFunc SerializableSerializeFunc
cb = IO (GClosure C_SerializableSerializeFunc)
-> m (GClosure C_SerializableSerializeFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SerializableSerializeFunc)
-> m (GClosure C_SerializableSerializeFunc))
-> IO (GClosure C_SerializableSerializeFunc)
-> m (GClosure C_SerializableSerializeFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SerializableSerializeFunc
cb' = Maybe (Ptr (FunPtr C_SerializableSerializeFunc))
-> SerializableSerializeFunc -> C_SerializableSerializeFunc
wrap_SerializableSerializeFunc Maybe (Ptr (FunPtr C_SerializableSerializeFunc))
forall a. Maybe a
Nothing SerializableSerializeFunc
cb
C_SerializableSerializeFunc
-> IO (FunPtr C_SerializableSerializeFunc)
mk_SerializableSerializeFunc C_SerializableSerializeFunc
cb' IO (FunPtr C_SerializableSerializeFunc)
-> (FunPtr C_SerializableSerializeFunc
-> IO (GClosure C_SerializableSerializeFunc))
-> IO (GClosure C_SerializableSerializeFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SerializableSerializeFunc
-> IO (GClosure C_SerializableSerializeFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SerializableSerializeFunc ::
Maybe (Ptr (FunPtr C_SerializableSerializeFunc)) ->
SerializableSerializeFunc ->
C_SerializableSerializeFunc
wrap_SerializableSerializeFunc :: Maybe (Ptr (FunPtr C_SerializableSerializeFunc))
-> SerializableSerializeFunc -> C_SerializableSerializeFunc
wrap_SerializableSerializeFunc Maybe (Ptr (FunPtr C_SerializableSerializeFunc))
gi'funptrptr SerializableSerializeFunc
gi'cb Ptr Serializable
serializable Ptr VariantBuilder
builder = do
Serializable
serializable' <- ((ManagedPtr Serializable -> Serializable)
-> Ptr Serializable -> IO Serializable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Serializable -> Serializable
IBus.Serializable.Serializable) Ptr Serializable
serializable
Ptr VariantBuilder -> (VariantBuilder -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr VariantBuilder
builder ((VariantBuilder -> IO CInt) -> IO CInt)
-> (VariantBuilder -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \VariantBuilder
builder' -> do
Bool
result <- SerializableSerializeFunc
gi'cb Serializable
serializable' VariantBuilder
builder'
Maybe (Ptr (FunPtr C_SerializableSerializeFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SerializableSerializeFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
result
CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_SerializableDeserializeFunc =
Ptr IBus.Serializable.Serializable ->
Ptr GVariant ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_SerializableDeserializeFunc :: FunPtr C_SerializableDeserializeFunc -> C_SerializableDeserializeFunc
dynamic_SerializableDeserializeFunc ::
(B.CallStack.HasCallStack, MonadIO m, IBus.Serializable.IsSerializable a) =>
FunPtr C_SerializableDeserializeFunc
-> a
-> GVariant
-> m Int32
dynamic_SerializableDeserializeFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSerializable a) =>
FunPtr C_SerializableDeserializeFunc -> a -> GVariant -> m Int32
dynamic_SerializableDeserializeFunc FunPtr C_SerializableDeserializeFunc
__funPtr a
serializable GVariant
variant = IO Int32 -> m Int32
forall a. IO a -> m a
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
$ do
Ptr Serializable
serializable' <- a -> IO (Ptr Serializable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
serializable
Ptr GVariant
variant' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
variant
Int32
result <- (FunPtr C_SerializableDeserializeFunc
-> C_SerializableDeserializeFunc
__dynamic_C_SerializableDeserializeFunc FunPtr C_SerializableDeserializeFunc
__funPtr) Ptr Serializable
serializable' Ptr GVariant
variant'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
serializable
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
variant
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_SerializableDeserializeFunc :: C_SerializableDeserializeFunc -> IO (FunPtr C_SerializableDeserializeFunc)
type SerializableDeserializeFunc =
IBus.Serializable.Serializable
-> GVariant
-> IO Int32
noSerializableDeserializeFunc :: Maybe SerializableDeserializeFunc
noSerializableDeserializeFunc :: Maybe SerializableDeserializeFunc
noSerializableDeserializeFunc = Maybe SerializableDeserializeFunc
forall a. Maybe a
Nothing
genClosure_SerializableDeserializeFunc :: MonadIO m => SerializableDeserializeFunc -> m (GClosure C_SerializableDeserializeFunc)
genClosure_SerializableDeserializeFunc :: forall (m :: * -> *).
MonadIO m =>
SerializableDeserializeFunc
-> m (GClosure C_SerializableDeserializeFunc)
genClosure_SerializableDeserializeFunc SerializableDeserializeFunc
cb = IO (GClosure C_SerializableDeserializeFunc)
-> m (GClosure C_SerializableDeserializeFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SerializableDeserializeFunc)
-> m (GClosure C_SerializableDeserializeFunc))
-> IO (GClosure C_SerializableDeserializeFunc)
-> m (GClosure C_SerializableDeserializeFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SerializableDeserializeFunc
cb' = Maybe (Ptr (FunPtr C_SerializableDeserializeFunc))
-> SerializableDeserializeFunc -> C_SerializableDeserializeFunc
wrap_SerializableDeserializeFunc Maybe (Ptr (FunPtr C_SerializableDeserializeFunc))
forall a. Maybe a
Nothing SerializableDeserializeFunc
cb
C_SerializableDeserializeFunc
-> IO (FunPtr C_SerializableDeserializeFunc)
mk_SerializableDeserializeFunc C_SerializableDeserializeFunc
cb' IO (FunPtr C_SerializableDeserializeFunc)
-> (FunPtr C_SerializableDeserializeFunc
-> IO (GClosure C_SerializableDeserializeFunc))
-> IO (GClosure C_SerializableDeserializeFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SerializableDeserializeFunc
-> IO (GClosure C_SerializableDeserializeFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SerializableDeserializeFunc ::
Maybe (Ptr (FunPtr C_SerializableDeserializeFunc)) ->
SerializableDeserializeFunc ->
C_SerializableDeserializeFunc
wrap_SerializableDeserializeFunc :: Maybe (Ptr (FunPtr C_SerializableDeserializeFunc))
-> SerializableDeserializeFunc -> C_SerializableDeserializeFunc
wrap_SerializableDeserializeFunc Maybe (Ptr (FunPtr C_SerializableDeserializeFunc))
gi'funptrptr SerializableDeserializeFunc
gi'cb Ptr Serializable
serializable Ptr GVariant
variant = do
Serializable
serializable' <- ((ManagedPtr Serializable -> Serializable)
-> Ptr Serializable -> IO Serializable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Serializable -> Serializable
IBus.Serializable.Serializable) Ptr Serializable
serializable
GVariant
variant' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
variant
Int32
result <- SerializableDeserializeFunc
gi'cb Serializable
serializable' GVariant
variant'
Maybe (Ptr (FunPtr C_SerializableDeserializeFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SerializableDeserializeFunc))
gi'funptrptr
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_SerializableCopyFunc =
Ptr IBus.Serializable.Serializable ->
Ptr IBus.Serializable.Serializable ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SerializableCopyFunc :: FunPtr C_SerializableCopyFunc -> C_SerializableCopyFunc
dynamic_SerializableCopyFunc ::
(B.CallStack.HasCallStack, MonadIO m, IBus.Serializable.IsSerializable a, IBus.Serializable.IsSerializable b) =>
FunPtr C_SerializableCopyFunc
-> a
-> b
-> m Bool
dynamic_SerializableCopyFunc :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSerializable a, IsSerializable b) =>
FunPtr C_SerializableCopyFunc -> a -> b -> m Bool
dynamic_SerializableCopyFunc FunPtr C_SerializableCopyFunc
__funPtr a
dest b
src = IO Bool -> m Bool
forall a. IO a -> m a
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
$ do
Ptr Serializable
dest' <- a -> IO (Ptr Serializable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dest
Ptr Serializable
src' <- b -> IO (Ptr Serializable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
src
CInt
result <- (FunPtr C_SerializableCopyFunc -> C_SerializableCopyFunc
__dynamic_C_SerializableCopyFunc FunPtr C_SerializableCopyFunc
__funPtr) Ptr Serializable
dest' Ptr Serializable
src'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dest
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
src
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_SerializableCopyFunc :: C_SerializableCopyFunc -> IO (FunPtr C_SerializableCopyFunc)
type SerializableCopyFunc =
IBus.Serializable.Serializable
-> IBus.Serializable.Serializable
-> IO Bool
noSerializableCopyFunc :: Maybe SerializableCopyFunc
noSerializableCopyFunc :: Maybe SerializableCopyFunc
noSerializableCopyFunc = Maybe SerializableCopyFunc
forall a. Maybe a
Nothing
genClosure_SerializableCopyFunc :: MonadIO m => SerializableCopyFunc -> m (GClosure C_SerializableCopyFunc)
genClosure_SerializableCopyFunc :: forall (m :: * -> *).
MonadIO m =>
SerializableCopyFunc -> m (GClosure C_SerializableCopyFunc)
genClosure_SerializableCopyFunc SerializableCopyFunc
cb = IO (GClosure C_SerializableCopyFunc)
-> m (GClosure C_SerializableCopyFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SerializableCopyFunc)
-> m (GClosure C_SerializableCopyFunc))
-> IO (GClosure C_SerializableCopyFunc)
-> m (GClosure C_SerializableCopyFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SerializableCopyFunc
cb' = Maybe (Ptr (FunPtr C_SerializableCopyFunc))
-> SerializableCopyFunc -> C_SerializableCopyFunc
wrap_SerializableCopyFunc Maybe (Ptr (FunPtr C_SerializableCopyFunc))
forall a. Maybe a
Nothing SerializableCopyFunc
cb
C_SerializableCopyFunc -> IO (FunPtr C_SerializableCopyFunc)
mk_SerializableCopyFunc C_SerializableCopyFunc
cb' IO (FunPtr C_SerializableCopyFunc)
-> (FunPtr C_SerializableCopyFunc
-> IO (GClosure C_SerializableCopyFunc))
-> IO (GClosure C_SerializableCopyFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SerializableCopyFunc
-> IO (GClosure C_SerializableCopyFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SerializableCopyFunc ::
Maybe (Ptr (FunPtr C_SerializableCopyFunc)) ->
SerializableCopyFunc ->
C_SerializableCopyFunc
wrap_SerializableCopyFunc :: Maybe (Ptr (FunPtr C_SerializableCopyFunc))
-> SerializableCopyFunc -> C_SerializableCopyFunc
wrap_SerializableCopyFunc Maybe (Ptr (FunPtr C_SerializableCopyFunc))
gi'funptrptr SerializableCopyFunc
gi'cb Ptr Serializable
dest Ptr Serializable
src = do
Serializable
dest' <- ((ManagedPtr Serializable -> Serializable)
-> Ptr Serializable -> IO Serializable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Serializable -> Serializable
IBus.Serializable.Serializable) Ptr Serializable
dest
Serializable
src' <- ((ManagedPtr Serializable -> Serializable)
-> Ptr Serializable -> IO Serializable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Serializable -> Serializable
IBus.Serializable.Serializable) Ptr Serializable
src
Bool
result <- SerializableCopyFunc
gi'cb Serializable
dest' Serializable
src'
Maybe (Ptr (FunPtr C_SerializableCopyFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SerializableCopyFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
result
CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_ObjectDestroyFunc =
Ptr IBus.Object.Object ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ObjectDestroyFunc :: FunPtr C_ObjectDestroyFunc -> C_ObjectDestroyFunc
dynamic_ObjectDestroyFunc ::
(B.CallStack.HasCallStack, MonadIO m, IBus.Object.IsObject a) =>
FunPtr C_ObjectDestroyFunc
-> a
-> m ()
dynamic_ObjectDestroyFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
FunPtr C_ObjectDestroyFunc -> a -> m ()
dynamic_ObjectDestroyFunc FunPtr C_ObjectDestroyFunc
__funPtr a
object = 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 Object
object' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
(FunPtr C_ObjectDestroyFunc -> C_ObjectDestroyFunc
__dynamic_C_ObjectDestroyFunc FunPtr C_ObjectDestroyFunc
__funPtr) Ptr Object
object'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ObjectDestroyFunc :: C_ObjectDestroyFunc -> IO (FunPtr C_ObjectDestroyFunc)
type ObjectDestroyFunc =
IBus.Object.Object
-> IO ()
noObjectDestroyFunc :: Maybe ObjectDestroyFunc
noObjectDestroyFunc :: Maybe ObjectDestroyFunc
noObjectDestroyFunc = Maybe ObjectDestroyFunc
forall a. Maybe a
Nothing
genClosure_ObjectDestroyFunc :: MonadIO m => ObjectDestroyFunc -> m (GClosure C_ObjectDestroyFunc)
genClosure_ObjectDestroyFunc :: forall (m :: * -> *).
MonadIO m =>
ObjectDestroyFunc -> m (GClosure C_ObjectDestroyFunc)
genClosure_ObjectDestroyFunc ObjectDestroyFunc
cb = IO (GClosure C_ObjectDestroyFunc)
-> m (GClosure C_ObjectDestroyFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ObjectDestroyFunc)
-> m (GClosure C_ObjectDestroyFunc))
-> IO (GClosure C_ObjectDestroyFunc)
-> m (GClosure C_ObjectDestroyFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ObjectDestroyFunc
cb' = Maybe (Ptr (FunPtr C_ObjectDestroyFunc))
-> ObjectDestroyFunc -> C_ObjectDestroyFunc
wrap_ObjectDestroyFunc Maybe (Ptr (FunPtr C_ObjectDestroyFunc))
forall a. Maybe a
Nothing ObjectDestroyFunc
cb
C_ObjectDestroyFunc -> IO (FunPtr C_ObjectDestroyFunc)
mk_ObjectDestroyFunc C_ObjectDestroyFunc
cb' IO (FunPtr C_ObjectDestroyFunc)
-> (FunPtr C_ObjectDestroyFunc
-> IO (GClosure C_ObjectDestroyFunc))
-> IO (GClosure C_ObjectDestroyFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ObjectDestroyFunc -> IO (GClosure C_ObjectDestroyFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ObjectDestroyFunc ::
Maybe (Ptr (FunPtr C_ObjectDestroyFunc)) ->
ObjectDestroyFunc ->
C_ObjectDestroyFunc
wrap_ObjectDestroyFunc :: Maybe (Ptr (FunPtr C_ObjectDestroyFunc))
-> ObjectDestroyFunc -> C_ObjectDestroyFunc
wrap_ObjectDestroyFunc Maybe (Ptr (FunPtr C_ObjectDestroyFunc))
gi'funptrptr ObjectDestroyFunc
gi'cb Ptr Object
object = do
Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
IBus.Object.Object) Ptr Object
object
ObjectDestroyFunc
gi'cb Object
object'
Maybe (Ptr (FunPtr C_ObjectDestroyFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ObjectDestroyFunc))
gi'funptrptr
type C_FreeFunc =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_FreeFunc :: FunPtr C_FreeFunc -> C_FreeFunc
dynamic_FreeFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FreeFunc
-> Ptr ()
-> m ()
dynamic_FreeFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_FreeFunc -> Ptr () -> m ()
dynamic_FreeFunc FunPtr C_FreeFunc
__funPtr Ptr ()
object = 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
(FunPtr C_FreeFunc -> C_FreeFunc
__dynamic_C_FreeFunc FunPtr C_FreeFunc
__funPtr) Ptr ()
object
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_FreeFunc :: C_FreeFunc -> IO (FunPtr C_FreeFunc)
type FreeFunc =
Ptr ()
-> IO ()
noFreeFunc :: Maybe FreeFunc
noFreeFunc :: Maybe C_FreeFunc
noFreeFunc = Maybe C_FreeFunc
forall a. Maybe a
Nothing
genClosure_FreeFunc :: MonadIO m => FreeFunc -> m (GClosure C_FreeFunc)
genClosure_FreeFunc :: forall (m :: * -> *).
MonadIO m =>
C_FreeFunc -> m (GClosure C_FreeFunc)
genClosure_FreeFunc C_FreeFunc
cb = IO (GClosure C_FreeFunc) -> m (GClosure C_FreeFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FreeFunc) -> m (GClosure C_FreeFunc))
-> IO (GClosure C_FreeFunc) -> m (GClosure C_FreeFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_FreeFunc
cb' = Maybe (Ptr (FunPtr C_FreeFunc)) -> C_FreeFunc -> C_FreeFunc
wrap_FreeFunc Maybe (Ptr (FunPtr C_FreeFunc))
forall a. Maybe a
Nothing C_FreeFunc
cb
C_FreeFunc -> IO (FunPtr C_FreeFunc)
mk_FreeFunc C_FreeFunc
cb' IO (FunPtr C_FreeFunc)
-> (FunPtr C_FreeFunc -> IO (GClosure C_FreeFunc))
-> IO (GClosure C_FreeFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FreeFunc -> IO (GClosure C_FreeFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FreeFunc ::
Maybe (Ptr (FunPtr C_FreeFunc)) ->
FreeFunc ->
C_FreeFunc
wrap_FreeFunc :: Maybe (Ptr (FunPtr C_FreeFunc)) -> C_FreeFunc -> C_FreeFunc
wrap_FreeFunc Maybe (Ptr (FunPtr C_FreeFunc))
gi'funptrptr C_FreeFunc
gi'cb Ptr ()
object = do
C_FreeFunc
gi'cb Ptr ()
object
Maybe (Ptr (FunPtr C_FreeFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FreeFunc))
gi'funptrptr