#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Callbacks
(
ActionEntryActivateFieldCallback ,
ActionEntryActivateFieldCallback_WithClosures,
C_ActionEntryActivateFieldCallback ,
drop_closures_ActionEntryActivateFieldCallback,
dynamic_ActionEntryActivateFieldCallback,
genClosure_ActionEntryActivateFieldCallback,
mk_ActionEntryActivateFieldCallback ,
noActionEntryActivateFieldCallback ,
noActionEntryActivateFieldCallback_WithClosures,
wrap_ActionEntryActivateFieldCallback ,
ActionEntryChangeStateFieldCallback ,
ActionEntryChangeStateFieldCallback_WithClosures,
C_ActionEntryChangeStateFieldCallback ,
drop_closures_ActionEntryChangeStateFieldCallback,
dynamic_ActionEntryChangeStateFieldCallback,
genClosure_ActionEntryChangeStateFieldCallback,
mk_ActionEntryChangeStateFieldCallback ,
noActionEntryChangeStateFieldCallback ,
noActionEntryChangeStateFieldCallback_WithClosures,
wrap_ActionEntryChangeStateFieldCallback,
AsyncReadyCallback ,
AsyncReadyCallback_WithClosures ,
C_AsyncReadyCallback ,
drop_closures_AsyncReadyCallback ,
dynamic_AsyncReadyCallback ,
genClosure_AsyncReadyCallback ,
mk_AsyncReadyCallback ,
noAsyncReadyCallback ,
noAsyncReadyCallback_WithClosures ,
wrap_AsyncReadyCallback ,
BusAcquiredCallback ,
BusAcquiredCallback_WithClosures ,
C_BusAcquiredCallback ,
drop_closures_BusAcquiredCallback ,
dynamic_BusAcquiredCallback ,
genClosure_BusAcquiredCallback ,
mk_BusAcquiredCallback ,
noBusAcquiredCallback ,
noBusAcquiredCallback_WithClosures ,
wrap_BusAcquiredCallback ,
BusNameAcquiredCallback ,
BusNameAcquiredCallback_WithClosures ,
C_BusNameAcquiredCallback ,
drop_closures_BusNameAcquiredCallback ,
dynamic_BusNameAcquiredCallback ,
genClosure_BusNameAcquiredCallback ,
mk_BusNameAcquiredCallback ,
noBusNameAcquiredCallback ,
noBusNameAcquiredCallback_WithClosures ,
wrap_BusNameAcquiredCallback ,
BusNameAppearedCallback ,
BusNameAppearedCallback_WithClosures ,
C_BusNameAppearedCallback ,
drop_closures_BusNameAppearedCallback ,
dynamic_BusNameAppearedCallback ,
genClosure_BusNameAppearedCallback ,
mk_BusNameAppearedCallback ,
noBusNameAppearedCallback ,
noBusNameAppearedCallback_WithClosures ,
wrap_BusNameAppearedCallback ,
BusNameLostCallback ,
BusNameLostCallback_WithClosures ,
C_BusNameLostCallback ,
drop_closures_BusNameLostCallback ,
dynamic_BusNameLostCallback ,
genClosure_BusNameLostCallback ,
mk_BusNameLostCallback ,
noBusNameLostCallback ,
noBusNameLostCallback_WithClosures ,
wrap_BusNameLostCallback ,
BusNameVanishedCallback ,
BusNameVanishedCallback_WithClosures ,
C_BusNameVanishedCallback ,
drop_closures_BusNameVanishedCallback ,
dynamic_BusNameVanishedCallback ,
genClosure_BusNameVanishedCallback ,
mk_BusNameVanishedCallback ,
noBusNameVanishedCallback ,
noBusNameVanishedCallback_WithClosures ,
wrap_BusNameVanishedCallback ,
C_CancellableSourceFunc ,
CancellableSourceFunc ,
CancellableSourceFunc_WithClosures ,
drop_closures_CancellableSourceFunc ,
dynamic_CancellableSourceFunc ,
genClosure_CancellableSourceFunc ,
mk_CancellableSourceFunc ,
noCancellableSourceFunc ,
noCancellableSourceFunc_WithClosures ,
wrap_CancellableSourceFunc ,
C_DBusInterfaceGetPropertyFunc ,
DBusInterfaceGetPropertyFunc ,
DBusInterfaceGetPropertyFunc_WithClosures,
drop_closures_DBusInterfaceGetPropertyFunc,
dynamic_DBusInterfaceGetPropertyFunc ,
genClosure_DBusInterfaceGetPropertyFunc ,
mk_DBusInterfaceGetPropertyFunc ,
noDBusInterfaceGetPropertyFunc ,
noDBusInterfaceGetPropertyFunc_WithClosures,
wrap_DBusInterfaceGetPropertyFunc ,
C_DBusInterfaceMethodCallFunc ,
DBusInterfaceMethodCallFunc ,
DBusInterfaceMethodCallFunc_WithClosures,
drop_closures_DBusInterfaceMethodCallFunc,
dynamic_DBusInterfaceMethodCallFunc ,
genClosure_DBusInterfaceMethodCallFunc ,
mk_DBusInterfaceMethodCallFunc ,
noDBusInterfaceMethodCallFunc ,
noDBusInterfaceMethodCallFunc_WithClosures,
wrap_DBusInterfaceMethodCallFunc ,
C_DBusInterfaceSetPropertyFunc ,
DBusInterfaceSetPropertyFunc ,
DBusInterfaceSetPropertyFunc_WithClosures,
drop_closures_DBusInterfaceSetPropertyFunc,
dynamic_DBusInterfaceSetPropertyFunc ,
genClosure_DBusInterfaceSetPropertyFunc ,
mk_DBusInterfaceSetPropertyFunc ,
noDBusInterfaceSetPropertyFunc ,
noDBusInterfaceSetPropertyFunc_WithClosures,
wrap_DBusInterfaceSetPropertyFunc ,
C_DBusMessageFilterFunction ,
DBusMessageFilterFunction ,
DBusMessageFilterFunction_WithClosures ,
drop_closures_DBusMessageFilterFunction ,
dynamic_DBusMessageFilterFunction ,
genClosure_DBusMessageFilterFunction ,
mk_DBusMessageFilterFunction ,
noDBusMessageFilterFunction ,
noDBusMessageFilterFunction_WithClosures,
wrap_DBusMessageFilterFunction ,
C_DBusProxyTypeFunc ,
DBusProxyTypeFunc ,
DBusProxyTypeFunc_WithClosures ,
drop_closures_DBusProxyTypeFunc ,
dynamic_DBusProxyTypeFunc ,
genClosure_DBusProxyTypeFunc ,
mk_DBusProxyTypeFunc ,
noDBusProxyTypeFunc ,
noDBusProxyTypeFunc_WithClosures ,
wrap_DBusProxyTypeFunc ,
C_DBusSignalCallback ,
DBusSignalCallback ,
DBusSignalCallback_WithClosures ,
drop_closures_DBusSignalCallback ,
dynamic_DBusSignalCallback ,
genClosure_DBusSignalCallback ,
mk_DBusSignalCallback ,
noDBusSignalCallback ,
noDBusSignalCallback_WithClosures ,
wrap_DBusSignalCallback ,
C_DBusSubtreeDispatchFunc ,
DBusSubtreeDispatchFunc ,
DBusSubtreeDispatchFunc_WithClosures ,
drop_closures_DBusSubtreeDispatchFunc ,
dynamic_DBusSubtreeDispatchFunc ,
genClosure_DBusSubtreeDispatchFunc ,
mk_DBusSubtreeDispatchFunc ,
noDBusSubtreeDispatchFunc ,
noDBusSubtreeDispatchFunc_WithClosures ,
wrap_DBusSubtreeDispatchFunc ,
C_DBusSubtreeIntrospectFunc ,
DBusSubtreeIntrospectFunc ,
DBusSubtreeIntrospectFunc_WithClosures ,
drop_closures_DBusSubtreeIntrospectFunc ,
dynamic_DBusSubtreeIntrospectFunc ,
genClosure_DBusSubtreeIntrospectFunc ,
mk_DBusSubtreeIntrospectFunc ,
noDBusSubtreeIntrospectFunc ,
noDBusSubtreeIntrospectFunc_WithClosures,
wrap_DBusSubtreeIntrospectFunc ,
C_DatagramBasedSourceFunc ,
DatagramBasedSourceFunc ,
DatagramBasedSourceFunc_WithClosures ,
drop_closures_DatagramBasedSourceFunc ,
dynamic_DatagramBasedSourceFunc ,
genClosure_DatagramBasedSourceFunc ,
mk_DatagramBasedSourceFunc ,
noDatagramBasedSourceFunc ,
noDatagramBasedSourceFunc_WithClosures ,
wrap_DatagramBasedSourceFunc ,
C_DesktopAppLaunchCallback ,
DesktopAppLaunchCallback ,
DesktopAppLaunchCallback_WithClosures ,
drop_closures_DesktopAppLaunchCallback ,
dynamic_DesktopAppLaunchCallback ,
genClosure_DesktopAppLaunchCallback ,
mk_DesktopAppLaunchCallback ,
noDesktopAppLaunchCallback ,
noDesktopAppLaunchCallback_WithClosures ,
wrap_DesktopAppLaunchCallback ,
C_FileMeasureProgressCallback ,
FileMeasureProgressCallback ,
FileMeasureProgressCallback_WithClosures,
drop_closures_FileMeasureProgressCallback,
dynamic_FileMeasureProgressCallback ,
genClosure_FileMeasureProgressCallback ,
mk_FileMeasureProgressCallback ,
noFileMeasureProgressCallback ,
noFileMeasureProgressCallback_WithClosures,
wrap_FileMeasureProgressCallback ,
C_FileProgressCallback ,
FileProgressCallback ,
FileProgressCallback_WithClosures ,
drop_closures_FileProgressCallback ,
dynamic_FileProgressCallback ,
genClosure_FileProgressCallback ,
mk_FileProgressCallback ,
noFileProgressCallback ,
noFileProgressCallback_WithClosures ,
wrap_FileProgressCallback ,
C_FileReadMoreCallback ,
FileReadMoreCallback ,
FileReadMoreCallback_WithClosures ,
drop_closures_FileReadMoreCallback ,
dynamic_FileReadMoreCallback ,
genClosure_FileReadMoreCallback ,
mk_FileReadMoreCallback ,
noFileReadMoreCallback ,
noFileReadMoreCallback_WithClosures ,
wrap_FileReadMoreCallback ,
C_IOSchedulerJobFunc ,
IOSchedulerJobFunc ,
IOSchedulerJobFunc_WithClosures ,
drop_closures_IOSchedulerJobFunc ,
dynamic_IOSchedulerJobFunc ,
genClosure_IOSchedulerJobFunc ,
mk_IOSchedulerJobFunc ,
noIOSchedulerJobFunc ,
noIOSchedulerJobFunc_WithClosures ,
wrap_IOSchedulerJobFunc ,
C_PollableSourceFunc ,
PollableSourceFunc ,
PollableSourceFunc_WithClosures ,
drop_closures_PollableSourceFunc ,
dynamic_PollableSourceFunc ,
genClosure_PollableSourceFunc ,
mk_PollableSourceFunc ,
noPollableSourceFunc ,
noPollableSourceFunc_WithClosures ,
wrap_PollableSourceFunc ,
C_ReallocFunc ,
ReallocFunc ,
dynamic_ReallocFunc ,
genClosure_ReallocFunc ,
mk_ReallocFunc ,
noReallocFunc ,
wrap_ReallocFunc ,
C_SettingsBindGetMapping ,
SettingsBindGetMapping ,
SettingsBindGetMapping_WithClosures ,
drop_closures_SettingsBindGetMapping ,
dynamic_SettingsBindGetMapping ,
genClosure_SettingsBindGetMapping ,
mk_SettingsBindGetMapping ,
noSettingsBindGetMapping ,
noSettingsBindGetMapping_WithClosures ,
wrap_SettingsBindGetMapping ,
C_SettingsBindSetMapping ,
SettingsBindSetMapping ,
SettingsBindSetMapping_WithClosures ,
drop_closures_SettingsBindSetMapping ,
dynamic_SettingsBindSetMapping ,
genClosure_SettingsBindSetMapping ,
mk_SettingsBindSetMapping ,
noSettingsBindSetMapping ,
noSettingsBindSetMapping_WithClosures ,
wrap_SettingsBindSetMapping ,
C_SettingsGetMapping ,
SettingsGetMapping ,
SettingsGetMapping_WithClosures ,
drop_closures_SettingsGetMapping ,
dynamic_SettingsGetMapping ,
genClosure_SettingsGetMapping ,
mk_SettingsGetMapping ,
noSettingsGetMapping ,
noSettingsGetMapping_WithClosures ,
wrap_SettingsGetMapping ,
C_SimpleAsyncThreadFunc ,
SimpleAsyncThreadFunc ,
dynamic_SimpleAsyncThreadFunc ,
genClosure_SimpleAsyncThreadFunc ,
mk_SimpleAsyncThreadFunc ,
noSimpleAsyncThreadFunc ,
wrap_SimpleAsyncThreadFunc ,
C_SocketSourceFunc ,
SocketSourceFunc ,
SocketSourceFunc_WithClosures ,
drop_closures_SocketSourceFunc ,
dynamic_SocketSourceFunc ,
genClosure_SocketSourceFunc ,
mk_SocketSourceFunc ,
noSocketSourceFunc ,
noSocketSourceFunc_WithClosures ,
wrap_SocketSourceFunc ,
C_TaskThreadFunc ,
TaskThreadFunc ,
dynamic_TaskThreadFunc ,
genClosure_TaskThreadFunc ,
mk_TaskThreadFunc ,
noTaskThreadFunc ,
wrap_TaskThreadFunc ,
C_VfsFileLookupFunc ,
VfsFileLookupFunc ,
VfsFileLookupFunc_WithClosures ,
drop_closures_VfsFileLookupFunc ,
dynamic_VfsFileLookupFunc ,
genClosure_VfsFileLookupFunc ,
mk_VfsFileLookupFunc ,
noVfsFileLookupFunc ,
noVfsFileLookupFunc_WithClosures ,
wrap_VfsFileLookupFunc ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Flags as GLib.Flags
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DatagramBased as Gio.DatagramBased
import {-# SOURCE #-} qualified GI.Gio.Interfaces.File as Gio.File
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMessage as Gio.DBusMessage
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMethodInvocation as Gio.DBusMethodInvocation
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusObjectManagerClient as Gio.DBusObjectManagerClient
import {-# SOURCE #-} qualified GI.Gio.Objects.DesktopAppInfo as Gio.DesktopAppInfo
import {-# SOURCE #-} qualified GI.Gio.Objects.SimpleAction as Gio.SimpleAction
import {-# SOURCE #-} qualified GI.Gio.Objects.SimpleAsyncResult as Gio.SimpleAsyncResult
import {-# SOURCE #-} qualified GI.Gio.Objects.Socket as Gio.Socket
import {-# SOURCE #-} qualified GI.Gio.Objects.Task as Gio.Task
import {-# SOURCE #-} qualified GI.Gio.Objects.Vfs as Gio.Vfs
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceVTable as Gio.DBusInterfaceVTable
import {-# SOURCE #-} qualified GI.Gio.Structs.IOSchedulerJob as Gio.IOSchedulerJob
type C_VfsFileLookupFunc =
Ptr Gio.Vfs.Vfs ->
CString ->
Ptr () ->
IO (Ptr Gio.File.File)
foreign import ccall "dynamic" __dynamic_C_VfsFileLookupFunc :: FunPtr C_VfsFileLookupFunc -> C_VfsFileLookupFunc
dynamic_VfsFileLookupFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Vfs.IsVfs a) =>
FunPtr C_VfsFileLookupFunc
-> a
-> T.Text
-> Ptr ()
-> m Gio.File.File
dynamic_VfsFileLookupFunc :: FunPtr C_VfsFileLookupFunc -> a -> Text -> Ptr () -> m File
dynamic_VfsFileLookupFunc __funPtr :: FunPtr C_VfsFileLookupFunc
__funPtr vfs :: a
vfs identifier :: Text
identifier userData :: Ptr ()
userData = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
Ptr Vfs
vfs' <- a -> IO (Ptr Vfs)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
vfs
CString
identifier' <- Text -> IO CString
textToCString Text
identifier
Ptr File
result <- (FunPtr C_VfsFileLookupFunc -> C_VfsFileLookupFunc
__dynamic_C_VfsFileLookupFunc FunPtr C_VfsFileLookupFunc
__funPtr) Ptr Vfs
vfs' CString
identifier' Ptr ()
userData
Text -> Ptr File -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "vfsFileLookupFunc" Ptr File
result
File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
vfs
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
identifier'
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'
foreign import ccall "wrapper"
mk_VfsFileLookupFunc :: C_VfsFileLookupFunc -> IO (FunPtr C_VfsFileLookupFunc)
type VfsFileLookupFunc =
Gio.Vfs.Vfs
-> T.Text
-> IO Gio.File.File
noVfsFileLookupFunc :: Maybe VfsFileLookupFunc
noVfsFileLookupFunc :: Maybe VfsFileLookupFunc
noVfsFileLookupFunc = Maybe VfsFileLookupFunc
forall a. Maybe a
Nothing
type VfsFileLookupFunc_WithClosures =
Gio.Vfs.Vfs
-> T.Text
-> Ptr ()
-> IO Gio.File.File
noVfsFileLookupFunc_WithClosures :: Maybe VfsFileLookupFunc_WithClosures
noVfsFileLookupFunc_WithClosures :: Maybe VfsFileLookupFunc_WithClosures
noVfsFileLookupFunc_WithClosures = Maybe VfsFileLookupFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_VfsFileLookupFunc :: VfsFileLookupFunc -> VfsFileLookupFunc_WithClosures
drop_closures_VfsFileLookupFunc :: VfsFileLookupFunc -> VfsFileLookupFunc_WithClosures
drop_closures_VfsFileLookupFunc _f :: VfsFileLookupFunc
_f vfs :: Vfs
vfs identifier :: Text
identifier _ = VfsFileLookupFunc
_f Vfs
vfs Text
identifier
genClosure_VfsFileLookupFunc :: MonadIO m => VfsFileLookupFunc -> m (GClosure C_VfsFileLookupFunc)
genClosure_VfsFileLookupFunc :: VfsFileLookupFunc -> m (GClosure C_VfsFileLookupFunc)
genClosure_VfsFileLookupFunc cb :: VfsFileLookupFunc
cb = IO (GClosure C_VfsFileLookupFunc)
-> m (GClosure C_VfsFileLookupFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VfsFileLookupFunc)
-> m (GClosure C_VfsFileLookupFunc))
-> IO (GClosure C_VfsFileLookupFunc)
-> m (GClosure C_VfsFileLookupFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: VfsFileLookupFunc_WithClosures
cb' = VfsFileLookupFunc -> VfsFileLookupFunc_WithClosures
drop_closures_VfsFileLookupFunc VfsFileLookupFunc
cb
let cb'' :: C_VfsFileLookupFunc
cb'' = Maybe (Ptr (FunPtr C_VfsFileLookupFunc))
-> VfsFileLookupFunc_WithClosures -> C_VfsFileLookupFunc
wrap_VfsFileLookupFunc Maybe (Ptr (FunPtr C_VfsFileLookupFunc))
forall a. Maybe a
Nothing VfsFileLookupFunc_WithClosures
cb'
C_VfsFileLookupFunc -> IO (FunPtr C_VfsFileLookupFunc)
mk_VfsFileLookupFunc C_VfsFileLookupFunc
cb'' IO (FunPtr C_VfsFileLookupFunc)
-> (FunPtr C_VfsFileLookupFunc
-> IO (GClosure C_VfsFileLookupFunc))
-> IO (GClosure C_VfsFileLookupFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VfsFileLookupFunc -> IO (GClosure C_VfsFileLookupFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VfsFileLookupFunc ::
Maybe (Ptr (FunPtr C_VfsFileLookupFunc)) ->
VfsFileLookupFunc_WithClosures ->
C_VfsFileLookupFunc
wrap_VfsFileLookupFunc :: Maybe (Ptr (FunPtr C_VfsFileLookupFunc))
-> VfsFileLookupFunc_WithClosures -> C_VfsFileLookupFunc
wrap_VfsFileLookupFunc funptrptr :: Maybe (Ptr (FunPtr C_VfsFileLookupFunc))
funptrptr _cb :: VfsFileLookupFunc_WithClosures
_cb vfs :: Ptr Vfs
vfs identifier :: CString
identifier userData :: Ptr ()
userData = do
Vfs
vfs' <- ((ManagedPtr Vfs -> Vfs) -> Ptr Vfs -> IO Vfs
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Vfs -> Vfs
Gio.Vfs.Vfs) Ptr Vfs
vfs
Text
identifier' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
identifier
File
result <- VfsFileLookupFunc_WithClosures
_cb Vfs
vfs' Text
identifier' Ptr ()
userData
Maybe (Ptr (FunPtr C_VfsFileLookupFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_VfsFileLookupFunc))
funptrptr
Ptr File
result' <- File -> IO (Ptr File)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject File
result
Ptr File -> IO (Ptr File)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
result'
type C_TaskThreadFunc =
Ptr Gio.Task.Task ->
Ptr GObject.Object.Object ->
Ptr () ->
Ptr Gio.Cancellable.Cancellable ->
IO ()
foreign import ccall "dynamic" __dynamic_C_TaskThreadFunc :: FunPtr C_TaskThreadFunc -> C_TaskThreadFunc
dynamic_TaskThreadFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Task.IsTask a, GObject.Object.IsObject b, Gio.Cancellable.IsCancellable c) =>
FunPtr C_TaskThreadFunc
-> a
-> b
-> Ptr ()
-> Maybe (c)
-> m ()
dynamic_TaskThreadFunc :: FunPtr C_TaskThreadFunc -> a -> b -> Ptr () -> Maybe c -> m ()
dynamic_TaskThreadFunc __funPtr :: FunPtr C_TaskThreadFunc
__funPtr task :: a
task sourceObject :: b
sourceObject taskData :: Ptr ()
taskData cancellable :: Maybe c
cancellable = 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 Task
task' <- a -> IO (Ptr Task)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
task
Ptr Object
sourceObject' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
sourceObject
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
(FunPtr C_TaskThreadFunc -> C_TaskThreadFunc
__dynamic_C_TaskThreadFunc FunPtr C_TaskThreadFunc
__funPtr) Ptr Task
task' Ptr Object
sourceObject' Ptr ()
taskData Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
task
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
sourceObject
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_TaskThreadFunc :: C_TaskThreadFunc -> IO (FunPtr C_TaskThreadFunc)
type TaskThreadFunc =
Gio.Task.Task
-> GObject.Object.Object
-> Ptr ()
-> Maybe Gio.Cancellable.Cancellable
-> IO ()
noTaskThreadFunc :: Maybe TaskThreadFunc
noTaskThreadFunc :: Maybe TaskThreadFunc
noTaskThreadFunc = Maybe TaskThreadFunc
forall a. Maybe a
Nothing
genClosure_TaskThreadFunc :: MonadIO m => TaskThreadFunc -> m (GClosure C_TaskThreadFunc)
genClosure_TaskThreadFunc :: TaskThreadFunc -> m (GClosure C_TaskThreadFunc)
genClosure_TaskThreadFunc cb :: TaskThreadFunc
cb = IO (GClosure C_TaskThreadFunc) -> m (GClosure C_TaskThreadFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TaskThreadFunc) -> m (GClosure C_TaskThreadFunc))
-> IO (GClosure C_TaskThreadFunc) -> m (GClosure C_TaskThreadFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TaskThreadFunc
cb' = Maybe (Ptr (FunPtr C_TaskThreadFunc))
-> TaskThreadFunc -> C_TaskThreadFunc
wrap_TaskThreadFunc Maybe (Ptr (FunPtr C_TaskThreadFunc))
forall a. Maybe a
Nothing TaskThreadFunc
cb
C_TaskThreadFunc -> IO (FunPtr C_TaskThreadFunc)
mk_TaskThreadFunc C_TaskThreadFunc
cb' IO (FunPtr C_TaskThreadFunc)
-> (FunPtr C_TaskThreadFunc -> IO (GClosure C_TaskThreadFunc))
-> IO (GClosure C_TaskThreadFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TaskThreadFunc -> IO (GClosure C_TaskThreadFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TaskThreadFunc ::
Maybe (Ptr (FunPtr C_TaskThreadFunc)) ->
TaskThreadFunc ->
C_TaskThreadFunc
wrap_TaskThreadFunc :: Maybe (Ptr (FunPtr C_TaskThreadFunc))
-> TaskThreadFunc -> C_TaskThreadFunc
wrap_TaskThreadFunc funptrptr :: Maybe (Ptr (FunPtr C_TaskThreadFunc))
funptrptr _cb :: TaskThreadFunc
_cb task :: Ptr Task
task sourceObject :: Ptr Object
sourceObject taskData :: Ptr ()
taskData cancellable :: Ptr Cancellable
cancellable = do
Task
task' <- ((ManagedPtr Task -> Task) -> Ptr Task -> IO Task
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Task -> Task
Gio.Task.Task) Ptr Task
task
Object
sourceObject' <- ((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
GObject.Object.Object) Ptr Object
sourceObject
Maybe Cancellable
maybeCancellable <-
if Ptr Cancellable
cancellable Ptr Cancellable -> Ptr Cancellable -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Cancellable
forall a. Ptr a
nullPtr
then Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cancellable
forall a. Maybe a
Nothing
else do
Cancellable
cancellable' <- ((ManagedPtr Cancellable -> Cancellable)
-> Ptr Cancellable -> IO Cancellable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cancellable -> Cancellable
Gio.Cancellable.Cancellable) Ptr Cancellable
cancellable
Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Cancellable -> IO (Maybe Cancellable))
-> Maybe Cancellable -> IO (Maybe Cancellable)
forall a b. (a -> b) -> a -> b
$ Cancellable -> Maybe Cancellable
forall a. a -> Maybe a
Just Cancellable
cancellable'
TaskThreadFunc
_cb Task
task' Object
sourceObject' Ptr ()
taskData Maybe Cancellable
maybeCancellable
Maybe (Ptr (FunPtr C_TaskThreadFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TaskThreadFunc))
funptrptr
type C_SocketSourceFunc =
Ptr Gio.Socket.Socket ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SocketSourceFunc :: FunPtr C_SocketSourceFunc -> C_SocketSourceFunc
dynamic_SocketSourceFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Socket.IsSocket a) =>
FunPtr C_SocketSourceFunc
-> a
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> m Bool
dynamic_SocketSourceFunc :: FunPtr C_SocketSourceFunc -> a -> [IOCondition] -> Ptr () -> m Bool
dynamic_SocketSourceFunc __funPtr :: FunPtr C_SocketSourceFunc
__funPtr socket :: a
socket condition :: [IOCondition]
condition userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Socket
socket' <- a -> IO (Ptr Socket)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
socket
let condition' :: CUInt
condition' = [IOCondition] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [IOCondition]
condition
CInt
result <- (FunPtr C_SocketSourceFunc -> C_SocketSourceFunc
__dynamic_C_SocketSourceFunc FunPtr C_SocketSourceFunc
__funPtr) Ptr Socket
socket' CUInt
condition' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
socket
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_SocketSourceFunc :: C_SocketSourceFunc -> IO (FunPtr C_SocketSourceFunc)
type SocketSourceFunc =
Gio.Socket.Socket
-> [GLib.Flags.IOCondition]
-> IO Bool
noSocketSourceFunc :: Maybe SocketSourceFunc
noSocketSourceFunc :: Maybe SocketSourceFunc
noSocketSourceFunc = Maybe SocketSourceFunc
forall a. Maybe a
Nothing
type SocketSourceFunc_WithClosures =
Gio.Socket.Socket
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> IO Bool
noSocketSourceFunc_WithClosures :: Maybe SocketSourceFunc_WithClosures
noSocketSourceFunc_WithClosures :: Maybe SocketSourceFunc_WithClosures
noSocketSourceFunc_WithClosures = Maybe SocketSourceFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_SocketSourceFunc :: SocketSourceFunc -> SocketSourceFunc_WithClosures
drop_closures_SocketSourceFunc :: SocketSourceFunc -> SocketSourceFunc_WithClosures
drop_closures_SocketSourceFunc _f :: SocketSourceFunc
_f socket :: Socket
socket condition :: [IOCondition]
condition _ = SocketSourceFunc
_f Socket
socket [IOCondition]
condition
genClosure_SocketSourceFunc :: MonadIO m => SocketSourceFunc -> m (GClosure C_SocketSourceFunc)
genClosure_SocketSourceFunc :: SocketSourceFunc -> m (GClosure C_SocketSourceFunc)
genClosure_SocketSourceFunc cb :: SocketSourceFunc
cb = IO (GClosure C_SocketSourceFunc) -> m (GClosure C_SocketSourceFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SocketSourceFunc)
-> m (GClosure C_SocketSourceFunc))
-> IO (GClosure C_SocketSourceFunc)
-> m (GClosure C_SocketSourceFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: SocketSourceFunc_WithClosures
cb' = SocketSourceFunc -> SocketSourceFunc_WithClosures
drop_closures_SocketSourceFunc SocketSourceFunc
cb
let cb'' :: C_SocketSourceFunc
cb'' = Maybe (Ptr (FunPtr C_SocketSourceFunc))
-> SocketSourceFunc_WithClosures -> C_SocketSourceFunc
wrap_SocketSourceFunc Maybe (Ptr (FunPtr C_SocketSourceFunc))
forall a. Maybe a
Nothing SocketSourceFunc_WithClosures
cb'
C_SocketSourceFunc -> IO (FunPtr C_SocketSourceFunc)
mk_SocketSourceFunc C_SocketSourceFunc
cb'' IO (FunPtr C_SocketSourceFunc)
-> (FunPtr C_SocketSourceFunc -> IO (GClosure C_SocketSourceFunc))
-> IO (GClosure C_SocketSourceFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SocketSourceFunc -> IO (GClosure C_SocketSourceFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SocketSourceFunc ::
Maybe (Ptr (FunPtr C_SocketSourceFunc)) ->
SocketSourceFunc_WithClosures ->
C_SocketSourceFunc
wrap_SocketSourceFunc :: Maybe (Ptr (FunPtr C_SocketSourceFunc))
-> SocketSourceFunc_WithClosures -> C_SocketSourceFunc
wrap_SocketSourceFunc funptrptr :: Maybe (Ptr (FunPtr C_SocketSourceFunc))
funptrptr _cb :: SocketSourceFunc_WithClosures
_cb socket :: Ptr Socket
socket condition :: CUInt
condition userData :: Ptr ()
userData = do
Socket
socket' <- ((ManagedPtr Socket -> Socket) -> Ptr Socket -> IO Socket
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Socket -> Socket
Gio.Socket.Socket) Ptr Socket
socket
let condition' :: [IOCondition]
condition' = CUInt -> [IOCondition]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
condition
Bool
result <- SocketSourceFunc_WithClosures
_cb Socket
socket' [IOCondition]
condition' Ptr ()
userData
Maybe (Ptr (FunPtr C_SocketSourceFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SocketSourceFunc))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_SimpleAsyncThreadFunc =
Ptr Gio.SimpleAsyncResult.SimpleAsyncResult ->
Ptr GObject.Object.Object ->
Ptr Gio.Cancellable.Cancellable ->
IO ()
foreign import ccall "dynamic" __dynamic_C_SimpleAsyncThreadFunc :: FunPtr C_SimpleAsyncThreadFunc -> C_SimpleAsyncThreadFunc
dynamic_SimpleAsyncThreadFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.SimpleAsyncResult.IsSimpleAsyncResult a, GObject.Object.IsObject b, Gio.Cancellable.IsCancellable c) =>
FunPtr C_SimpleAsyncThreadFunc
-> a
-> b
-> Maybe (c)
-> m ()
dynamic_SimpleAsyncThreadFunc :: FunPtr C_SimpleAsyncThreadFunc -> a -> b -> Maybe c -> m ()
dynamic_SimpleAsyncThreadFunc __funPtr :: FunPtr C_SimpleAsyncThreadFunc
__funPtr res :: a
res object :: b
object cancellable :: Maybe c
cancellable = 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 SimpleAsyncResult
res' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
res
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
(FunPtr C_SimpleAsyncThreadFunc -> C_SimpleAsyncThreadFunc
__dynamic_C_SimpleAsyncThreadFunc FunPtr C_SimpleAsyncThreadFunc
__funPtr) Ptr SimpleAsyncResult
res' Ptr Object
object' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
res
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_SimpleAsyncThreadFunc :: C_SimpleAsyncThreadFunc -> IO (FunPtr C_SimpleAsyncThreadFunc)
type SimpleAsyncThreadFunc =
Gio.SimpleAsyncResult.SimpleAsyncResult
-> GObject.Object.Object
-> Maybe Gio.Cancellable.Cancellable
-> IO ()
noSimpleAsyncThreadFunc :: Maybe SimpleAsyncThreadFunc
noSimpleAsyncThreadFunc :: Maybe SimpleAsyncThreadFunc
noSimpleAsyncThreadFunc = Maybe SimpleAsyncThreadFunc
forall a. Maybe a
Nothing
genClosure_SimpleAsyncThreadFunc :: MonadIO m => SimpleAsyncThreadFunc -> m (GClosure C_SimpleAsyncThreadFunc)
genClosure_SimpleAsyncThreadFunc :: SimpleAsyncThreadFunc -> m (GClosure C_SimpleAsyncThreadFunc)
genClosure_SimpleAsyncThreadFunc cb :: SimpleAsyncThreadFunc
cb = IO (GClosure C_SimpleAsyncThreadFunc)
-> m (GClosure C_SimpleAsyncThreadFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SimpleAsyncThreadFunc)
-> m (GClosure C_SimpleAsyncThreadFunc))
-> IO (GClosure C_SimpleAsyncThreadFunc)
-> m (GClosure C_SimpleAsyncThreadFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SimpleAsyncThreadFunc
cb' = Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc))
-> SimpleAsyncThreadFunc -> C_SimpleAsyncThreadFunc
wrap_SimpleAsyncThreadFunc Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc))
forall a. Maybe a
Nothing SimpleAsyncThreadFunc
cb
C_SimpleAsyncThreadFunc -> IO (FunPtr C_SimpleAsyncThreadFunc)
mk_SimpleAsyncThreadFunc C_SimpleAsyncThreadFunc
cb' IO (FunPtr C_SimpleAsyncThreadFunc)
-> (FunPtr C_SimpleAsyncThreadFunc
-> IO (GClosure C_SimpleAsyncThreadFunc))
-> IO (GClosure C_SimpleAsyncThreadFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SimpleAsyncThreadFunc
-> IO (GClosure C_SimpleAsyncThreadFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SimpleAsyncThreadFunc ::
Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc)) ->
SimpleAsyncThreadFunc ->
C_SimpleAsyncThreadFunc
wrap_SimpleAsyncThreadFunc :: Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc))
-> SimpleAsyncThreadFunc -> C_SimpleAsyncThreadFunc
wrap_SimpleAsyncThreadFunc funptrptr :: Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc))
funptrptr _cb :: SimpleAsyncThreadFunc
_cb res :: Ptr SimpleAsyncResult
res object :: Ptr Object
object cancellable :: Ptr Cancellable
cancellable = do
SimpleAsyncResult
res' <- ((ManagedPtr SimpleAsyncResult -> SimpleAsyncResult)
-> Ptr SimpleAsyncResult -> IO SimpleAsyncResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SimpleAsyncResult -> SimpleAsyncResult
Gio.SimpleAsyncResult.SimpleAsyncResult) Ptr SimpleAsyncResult
res
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
GObject.Object.Object) Ptr Object
object
Maybe Cancellable
maybeCancellable <-
if Ptr Cancellable
cancellable Ptr Cancellable -> Ptr Cancellable -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Cancellable
forall a. Ptr a
nullPtr
then Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cancellable
forall a. Maybe a
Nothing
else do
Cancellable
cancellable' <- ((ManagedPtr Cancellable -> Cancellable)
-> Ptr Cancellable -> IO Cancellable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cancellable -> Cancellable
Gio.Cancellable.Cancellable) Ptr Cancellable
cancellable
Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Cancellable -> IO (Maybe Cancellable))
-> Maybe Cancellable -> IO (Maybe Cancellable)
forall a b. (a -> b) -> a -> b
$ Cancellable -> Maybe Cancellable
forall a. a -> Maybe a
Just Cancellable
cancellable'
SimpleAsyncThreadFunc
_cb SimpleAsyncResult
res' Object
object' Maybe Cancellable
maybeCancellable
Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc))
funptrptr
type C_SettingsGetMapping =
Ptr GVariant ->
Ptr (Ptr ()) ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SettingsGetMapping :: FunPtr C_SettingsGetMapping -> C_SettingsGetMapping
dynamic_SettingsGetMapping ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SettingsGetMapping
-> GVariant
-> Ptr ()
-> m ((Bool, Ptr ()))
dynamic_SettingsGetMapping :: FunPtr C_SettingsGetMapping
-> GVariant -> Ptr () -> m (Bool, Ptr ())
dynamic_SettingsGetMapping __funPtr :: FunPtr C_SettingsGetMapping
__funPtr value :: GVariant
value userData :: Ptr ()
userData = IO (Bool, Ptr ()) -> m (Bool, Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Ptr ()) -> m (Bool, Ptr ()))
-> IO (Bool, Ptr ()) -> m (Bool, Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr GVariant
value' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
value
Ptr (Ptr ())
result_ <- IO (Ptr (Ptr ()))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr ()))
CInt
result <- (FunPtr C_SettingsGetMapping -> C_SettingsGetMapping
__dynamic_C_SettingsGetMapping FunPtr C_SettingsGetMapping
__funPtr) Ptr GVariant
value' Ptr (Ptr ())
result_ Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
Ptr ()
result_' <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ())
result_
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
value
Ptr (Ptr ()) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ())
result_
(Bool, Ptr ()) -> IO (Bool, Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Ptr ()
result_')
foreign import ccall "wrapper"
mk_SettingsGetMapping :: C_SettingsGetMapping -> IO (FunPtr C_SettingsGetMapping)
type SettingsGetMapping =
GVariant
-> IO ((Bool, Ptr ()))
noSettingsGetMapping :: Maybe SettingsGetMapping
noSettingsGetMapping :: Maybe SettingsGetMapping
noSettingsGetMapping = Maybe SettingsGetMapping
forall a. Maybe a
Nothing
type SettingsGetMapping_WithClosures =
GVariant
-> Ptr ()
-> IO ((Bool, Ptr ()))
noSettingsGetMapping_WithClosures :: Maybe SettingsGetMapping_WithClosures
noSettingsGetMapping_WithClosures :: Maybe SettingsGetMapping_WithClosures
noSettingsGetMapping_WithClosures = Maybe SettingsGetMapping_WithClosures
forall a. Maybe a
Nothing
drop_closures_SettingsGetMapping :: SettingsGetMapping -> SettingsGetMapping_WithClosures
drop_closures_SettingsGetMapping :: SettingsGetMapping -> SettingsGetMapping_WithClosures
drop_closures_SettingsGetMapping _f :: SettingsGetMapping
_f value :: GVariant
value _ = SettingsGetMapping
_f GVariant
value
genClosure_SettingsGetMapping :: MonadIO m => SettingsGetMapping -> m (GClosure C_SettingsGetMapping)
genClosure_SettingsGetMapping :: SettingsGetMapping -> m (GClosure C_SettingsGetMapping)
genClosure_SettingsGetMapping cb :: SettingsGetMapping
cb = IO (GClosure C_SettingsGetMapping)
-> m (GClosure C_SettingsGetMapping)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SettingsGetMapping)
-> m (GClosure C_SettingsGetMapping))
-> IO (GClosure C_SettingsGetMapping)
-> m (GClosure C_SettingsGetMapping)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: SettingsGetMapping_WithClosures
cb' = SettingsGetMapping -> SettingsGetMapping_WithClosures
drop_closures_SettingsGetMapping SettingsGetMapping
cb
let cb'' :: C_SettingsGetMapping
cb'' = Maybe (Ptr (FunPtr C_SettingsGetMapping))
-> SettingsGetMapping_WithClosures -> C_SettingsGetMapping
wrap_SettingsGetMapping Maybe (Ptr (FunPtr C_SettingsGetMapping))
forall a. Maybe a
Nothing SettingsGetMapping_WithClosures
cb'
C_SettingsGetMapping -> IO (FunPtr C_SettingsGetMapping)
mk_SettingsGetMapping C_SettingsGetMapping
cb'' IO (FunPtr C_SettingsGetMapping)
-> (FunPtr C_SettingsGetMapping
-> IO (GClosure C_SettingsGetMapping))
-> IO (GClosure C_SettingsGetMapping)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SettingsGetMapping -> IO (GClosure C_SettingsGetMapping)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SettingsGetMapping ::
Maybe (Ptr (FunPtr C_SettingsGetMapping)) ->
SettingsGetMapping_WithClosures ->
C_SettingsGetMapping
wrap_SettingsGetMapping :: Maybe (Ptr (FunPtr C_SettingsGetMapping))
-> SettingsGetMapping_WithClosures -> C_SettingsGetMapping
wrap_SettingsGetMapping funptrptr :: Maybe (Ptr (FunPtr C_SettingsGetMapping))
funptrptr _cb :: SettingsGetMapping_WithClosures
_cb value :: Ptr GVariant
value result_ :: Ptr (Ptr ())
result_ userData :: Ptr ()
userData = do
GVariant
value' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
value
(result :: Bool
result, outresult_ :: Ptr ()
outresult_) <- SettingsGetMapping_WithClosures
_cb GVariant
value' Ptr ()
userData
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (Ptr ())
result_ Ptr ()
outresult_
Maybe (Ptr (FunPtr C_SettingsGetMapping)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SettingsGetMapping))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_SettingsBindSetMapping =
Ptr GValue ->
Ptr GLib.VariantType.VariantType ->
Ptr () ->
IO (Ptr GVariant)
foreign import ccall "dynamic" __dynamic_C_SettingsBindSetMapping :: FunPtr C_SettingsBindSetMapping -> C_SettingsBindSetMapping
dynamic_SettingsBindSetMapping ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SettingsBindSetMapping
-> GValue
-> GLib.VariantType.VariantType
-> Ptr ()
-> m GVariant
dynamic_SettingsBindSetMapping :: FunPtr C_SettingsBindSetMapping
-> GValue -> VariantType -> Ptr () -> m GVariant
dynamic_SettingsBindSetMapping __funPtr :: FunPtr C_SettingsBindSetMapping
__funPtr value :: GValue
value expectedType :: VariantType
expectedType userData :: Ptr ()
userData = IO GVariant -> m GVariant
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr VariantType
expectedType' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
expectedType
Ptr GVariant
result <- (FunPtr C_SettingsBindSetMapping -> C_SettingsBindSetMapping
__dynamic_C_SettingsBindSetMapping FunPtr C_SettingsBindSetMapping
__funPtr) Ptr GValue
value' Ptr VariantType
expectedType' Ptr ()
userData
Text -> Ptr GVariant -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "settingsBindSetMapping" Ptr GVariant
result
GVariant
result' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
VariantType -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VariantType
expectedType
GVariant -> IO GVariant
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result'
foreign import ccall "wrapper"
mk_SettingsBindSetMapping :: C_SettingsBindSetMapping -> IO (FunPtr C_SettingsBindSetMapping)
type SettingsBindSetMapping =
GValue
-> GLib.VariantType.VariantType
-> IO GVariant
noSettingsBindSetMapping :: Maybe SettingsBindSetMapping
noSettingsBindSetMapping :: Maybe SettingsBindSetMapping
noSettingsBindSetMapping = Maybe SettingsBindSetMapping
forall a. Maybe a
Nothing
type SettingsBindSetMapping_WithClosures =
GValue
-> GLib.VariantType.VariantType
-> Ptr ()
-> IO GVariant
noSettingsBindSetMapping_WithClosures :: Maybe SettingsBindSetMapping_WithClosures
noSettingsBindSetMapping_WithClosures :: Maybe SettingsBindSetMapping_WithClosures
noSettingsBindSetMapping_WithClosures = Maybe SettingsBindSetMapping_WithClosures
forall a. Maybe a
Nothing
drop_closures_SettingsBindSetMapping :: SettingsBindSetMapping -> SettingsBindSetMapping_WithClosures
drop_closures_SettingsBindSetMapping :: SettingsBindSetMapping -> SettingsBindSetMapping_WithClosures
drop_closures_SettingsBindSetMapping _f :: SettingsBindSetMapping
_f value :: GValue
value expectedType :: VariantType
expectedType _ = SettingsBindSetMapping
_f GValue
value VariantType
expectedType
genClosure_SettingsBindSetMapping :: MonadIO m => SettingsBindSetMapping -> m (GClosure C_SettingsBindSetMapping)
genClosure_SettingsBindSetMapping :: SettingsBindSetMapping -> m (GClosure C_SettingsBindSetMapping)
genClosure_SettingsBindSetMapping cb :: SettingsBindSetMapping
cb = IO (GClosure C_SettingsBindSetMapping)
-> m (GClosure C_SettingsBindSetMapping)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SettingsBindSetMapping)
-> m (GClosure C_SettingsBindSetMapping))
-> IO (GClosure C_SettingsBindSetMapping)
-> m (GClosure C_SettingsBindSetMapping)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: SettingsBindSetMapping_WithClosures
cb' = SettingsBindSetMapping -> SettingsBindSetMapping_WithClosures
drop_closures_SettingsBindSetMapping SettingsBindSetMapping
cb
let cb'' :: C_SettingsBindSetMapping
cb'' = Maybe (Ptr (FunPtr C_SettingsBindSetMapping))
-> SettingsBindSetMapping_WithClosures -> C_SettingsBindSetMapping
wrap_SettingsBindSetMapping Maybe (Ptr (FunPtr C_SettingsBindSetMapping))
forall a. Maybe a
Nothing SettingsBindSetMapping_WithClosures
cb'
C_SettingsBindSetMapping -> IO (FunPtr C_SettingsBindSetMapping)
mk_SettingsBindSetMapping C_SettingsBindSetMapping
cb'' IO (FunPtr C_SettingsBindSetMapping)
-> (FunPtr C_SettingsBindSetMapping
-> IO (GClosure C_SettingsBindSetMapping))
-> IO (GClosure C_SettingsBindSetMapping)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SettingsBindSetMapping
-> IO (GClosure C_SettingsBindSetMapping)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SettingsBindSetMapping ::
Maybe (Ptr (FunPtr C_SettingsBindSetMapping)) ->
SettingsBindSetMapping_WithClosures ->
C_SettingsBindSetMapping
wrap_SettingsBindSetMapping :: Maybe (Ptr (FunPtr C_SettingsBindSetMapping))
-> SettingsBindSetMapping_WithClosures -> C_SettingsBindSetMapping
wrap_SettingsBindSetMapping funptrptr :: Maybe (Ptr (FunPtr C_SettingsBindSetMapping))
funptrptr _cb :: SettingsBindSetMapping_WithClosures
_cb value :: Ptr GValue
value expectedType :: Ptr VariantType
expectedType userData :: Ptr ()
userData = do
(ManagedPtr GValue -> GValue)
-> Ptr GValue -> (GValue -> IO (Ptr GVariant)) -> IO (Ptr GVariant)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr GValue -> GValue
GValue Ptr GValue
value ((GValue -> IO (Ptr GVariant)) -> IO (Ptr GVariant))
-> (GValue -> IO (Ptr GVariant)) -> IO (Ptr GVariant)
forall a b. (a -> b) -> a -> b
$ \value' :: GValue
value' -> do
(ManagedPtr VariantType -> VariantType)
-> Ptr VariantType
-> (VariantType -> IO (Ptr GVariant))
-> IO (Ptr GVariant)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr VariantType -> VariantType
GLib.VariantType.VariantType Ptr VariantType
expectedType ((VariantType -> IO (Ptr GVariant)) -> IO (Ptr GVariant))
-> (VariantType -> IO (Ptr GVariant)) -> IO (Ptr GVariant)
forall a b. (a -> b) -> a -> b
$ \expectedType' :: VariantType
expectedType' -> do
GVariant
result <- SettingsBindSetMapping_WithClosures
_cb GValue
value' VariantType
expectedType' Ptr ()
userData
Maybe (Ptr (FunPtr C_SettingsBindSetMapping)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SettingsBindSetMapping))
funptrptr
Ptr GVariant
result' <- GVariant -> IO (Ptr GVariant)
B.GVariant.disownGVariant GVariant
result
Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
result'
type C_SettingsBindGetMapping =
Ptr GValue ->
Ptr GVariant ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SettingsBindGetMapping :: FunPtr C_SettingsBindGetMapping -> C_SettingsBindGetMapping
dynamic_SettingsBindGetMapping ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SettingsBindGetMapping
-> GValue
-> GVariant
-> Ptr ()
-> m Bool
dynamic_SettingsBindGetMapping :: FunPtr C_SettingsBindGetMapping
-> GValue -> GVariant -> Ptr () -> m Bool
dynamic_SettingsBindGetMapping __funPtr :: FunPtr C_SettingsBindGetMapping
__funPtr value :: GValue
value variant :: GVariant
variant userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr GVariant
variant' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
variant
CInt
result <- (FunPtr C_SettingsBindGetMapping -> C_SettingsBindGetMapping
__dynamic_C_SettingsBindGetMapping FunPtr C_SettingsBindGetMapping
__funPtr) Ptr GValue
value' Ptr GVariant
variant' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
variant
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_SettingsBindGetMapping :: C_SettingsBindGetMapping -> IO (FunPtr C_SettingsBindGetMapping)
type SettingsBindGetMapping =
GValue
-> GVariant
-> IO Bool
noSettingsBindGetMapping :: Maybe SettingsBindGetMapping
noSettingsBindGetMapping :: Maybe SettingsBindGetMapping
noSettingsBindGetMapping = Maybe SettingsBindGetMapping
forall a. Maybe a
Nothing
type SettingsBindGetMapping_WithClosures =
GValue
-> GVariant
-> Ptr ()
-> IO Bool
noSettingsBindGetMapping_WithClosures :: Maybe SettingsBindGetMapping_WithClosures
noSettingsBindGetMapping_WithClosures :: Maybe SettingsBindGetMapping_WithClosures
noSettingsBindGetMapping_WithClosures = Maybe SettingsBindGetMapping_WithClosures
forall a. Maybe a
Nothing
drop_closures_SettingsBindGetMapping :: SettingsBindGetMapping -> SettingsBindGetMapping_WithClosures
drop_closures_SettingsBindGetMapping :: SettingsBindGetMapping -> SettingsBindGetMapping_WithClosures
drop_closures_SettingsBindGetMapping _f :: SettingsBindGetMapping
_f value :: GValue
value variant :: GVariant
variant _ = SettingsBindGetMapping
_f GValue
value GVariant
variant
genClosure_SettingsBindGetMapping :: MonadIO m => SettingsBindGetMapping -> m (GClosure C_SettingsBindGetMapping)
genClosure_SettingsBindGetMapping :: SettingsBindGetMapping -> m (GClosure C_SettingsBindGetMapping)
genClosure_SettingsBindGetMapping cb :: SettingsBindGetMapping
cb = IO (GClosure C_SettingsBindGetMapping)
-> m (GClosure C_SettingsBindGetMapping)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SettingsBindGetMapping)
-> m (GClosure C_SettingsBindGetMapping))
-> IO (GClosure C_SettingsBindGetMapping)
-> m (GClosure C_SettingsBindGetMapping)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: SettingsBindGetMapping_WithClosures
cb' = SettingsBindGetMapping -> SettingsBindGetMapping_WithClosures
drop_closures_SettingsBindGetMapping SettingsBindGetMapping
cb
let cb'' :: C_SettingsBindGetMapping
cb'' = Maybe (Ptr (FunPtr C_SettingsBindGetMapping))
-> SettingsBindGetMapping_WithClosures -> C_SettingsBindGetMapping
wrap_SettingsBindGetMapping Maybe (Ptr (FunPtr C_SettingsBindGetMapping))
forall a. Maybe a
Nothing SettingsBindGetMapping_WithClosures
cb'
C_SettingsBindGetMapping -> IO (FunPtr C_SettingsBindGetMapping)
mk_SettingsBindGetMapping C_SettingsBindGetMapping
cb'' IO (FunPtr C_SettingsBindGetMapping)
-> (FunPtr C_SettingsBindGetMapping
-> IO (GClosure C_SettingsBindGetMapping))
-> IO (GClosure C_SettingsBindGetMapping)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SettingsBindGetMapping
-> IO (GClosure C_SettingsBindGetMapping)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SettingsBindGetMapping ::
Maybe (Ptr (FunPtr C_SettingsBindGetMapping)) ->
SettingsBindGetMapping_WithClosures ->
C_SettingsBindGetMapping
wrap_SettingsBindGetMapping :: Maybe (Ptr (FunPtr C_SettingsBindGetMapping))
-> SettingsBindGetMapping_WithClosures -> C_SettingsBindGetMapping
wrap_SettingsBindGetMapping funptrptr :: Maybe (Ptr (FunPtr C_SettingsBindGetMapping))
funptrptr _cb :: SettingsBindGetMapping_WithClosures
_cb value :: Ptr GValue
value variant :: Ptr GVariant
variant userData :: Ptr ()
userData = do
(ManagedPtr GValue -> GValue)
-> Ptr GValue -> (GValue -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr GValue -> GValue
GValue Ptr GValue
value ((GValue -> IO CInt) -> IO CInt) -> (GValue -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \value' :: GValue
value' -> do
GVariant
variant' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
variant
Bool
result <- SettingsBindGetMapping_WithClosures
_cb GValue
value' GVariant
variant' Ptr ()
userData
Maybe (Ptr (FunPtr C_SettingsBindGetMapping)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SettingsBindGetMapping))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_ReallocFunc =
Ptr () ->
Word64 ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_ReallocFunc :: FunPtr C_ReallocFunc -> C_ReallocFunc
dynamic_ReallocFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ReallocFunc
-> Ptr ()
-> Word64
-> m (Ptr ())
dynamic_ReallocFunc :: FunPtr C_ReallocFunc -> Ptr () -> Word64 -> m (Ptr ())
dynamic_ReallocFunc __funPtr :: FunPtr C_ReallocFunc
__funPtr data_ :: Ptr ()
data_ size :: Word64
size = IO (Ptr ()) -> m (Ptr ())
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
$ do
Ptr ()
result <- (FunPtr C_ReallocFunc -> C_ReallocFunc
__dynamic_C_ReallocFunc FunPtr C_ReallocFunc
__funPtr) Ptr ()
data_ Word64
size
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_ReallocFunc :: C_ReallocFunc -> IO (FunPtr C_ReallocFunc)
type ReallocFunc =
Ptr ()
-> Word64
-> IO (Ptr ())
noReallocFunc :: Maybe ReallocFunc
noReallocFunc :: Maybe C_ReallocFunc
noReallocFunc = Maybe C_ReallocFunc
forall a. Maybe a
Nothing
genClosure_ReallocFunc :: MonadIO m => ReallocFunc -> m (GClosure C_ReallocFunc)
genClosure_ReallocFunc :: C_ReallocFunc -> m (GClosure C_ReallocFunc)
genClosure_ReallocFunc cb :: C_ReallocFunc
cb = IO (GClosure C_ReallocFunc) -> m (GClosure C_ReallocFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ReallocFunc) -> m (GClosure C_ReallocFunc))
-> IO (GClosure C_ReallocFunc) -> m (GClosure C_ReallocFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ReallocFunc
cb' = Maybe (Ptr (FunPtr C_ReallocFunc))
-> C_ReallocFunc -> C_ReallocFunc
wrap_ReallocFunc Maybe (Ptr (FunPtr C_ReallocFunc))
forall a. Maybe a
Nothing C_ReallocFunc
cb
C_ReallocFunc -> IO (FunPtr C_ReallocFunc)
mk_ReallocFunc C_ReallocFunc
cb' IO (FunPtr C_ReallocFunc)
-> (FunPtr C_ReallocFunc -> IO (GClosure C_ReallocFunc))
-> IO (GClosure C_ReallocFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ReallocFunc -> IO (GClosure C_ReallocFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ReallocFunc ::
Maybe (Ptr (FunPtr C_ReallocFunc)) ->
ReallocFunc ->
C_ReallocFunc
wrap_ReallocFunc :: Maybe (Ptr (FunPtr C_ReallocFunc))
-> C_ReallocFunc -> C_ReallocFunc
wrap_ReallocFunc funptrptr :: Maybe (Ptr (FunPtr C_ReallocFunc))
funptrptr _cb :: C_ReallocFunc
_cb data_ :: Ptr ()
data_ size :: Word64
size = do
Ptr ()
result <- C_ReallocFunc
_cb Ptr ()
data_ Word64
size
Maybe (Ptr (FunPtr C_ReallocFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ReallocFunc))
funptrptr
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_PollableSourceFunc =
Ptr GObject.Object.Object ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_PollableSourceFunc :: FunPtr C_PollableSourceFunc -> C_PollableSourceFunc
dynamic_PollableSourceFunc ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
FunPtr C_PollableSourceFunc
-> a
-> Ptr ()
-> m Bool
dynamic_PollableSourceFunc :: FunPtr C_PollableSourceFunc -> a -> Ptr () -> m Bool
dynamic_PollableSourceFunc __funPtr :: FunPtr C_PollableSourceFunc
__funPtr pollableStream :: a
pollableStream userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Object
pollableStream' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pollableStream
CInt
result <- (FunPtr C_PollableSourceFunc -> C_PollableSourceFunc
__dynamic_C_PollableSourceFunc FunPtr C_PollableSourceFunc
__funPtr) Ptr Object
pollableStream' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pollableStream
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_PollableSourceFunc :: C_PollableSourceFunc -> IO (FunPtr C_PollableSourceFunc)
type PollableSourceFunc =
GObject.Object.Object
-> IO Bool
noPollableSourceFunc :: Maybe PollableSourceFunc
noPollableSourceFunc :: Maybe PollableSourceFunc
noPollableSourceFunc = Maybe PollableSourceFunc
forall a. Maybe a
Nothing
type PollableSourceFunc_WithClosures =
GObject.Object.Object
-> Ptr ()
-> IO Bool
noPollableSourceFunc_WithClosures :: Maybe PollableSourceFunc_WithClosures
noPollableSourceFunc_WithClosures :: Maybe PollableSourceFunc_WithClosures
noPollableSourceFunc_WithClosures = Maybe PollableSourceFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_PollableSourceFunc :: PollableSourceFunc -> PollableSourceFunc_WithClosures
drop_closures_PollableSourceFunc :: PollableSourceFunc -> PollableSourceFunc_WithClosures
drop_closures_PollableSourceFunc _f :: PollableSourceFunc
_f pollableStream :: Object
pollableStream _ = PollableSourceFunc
_f Object
pollableStream
genClosure_PollableSourceFunc :: MonadIO m => PollableSourceFunc -> m (GClosure C_PollableSourceFunc)
genClosure_PollableSourceFunc :: PollableSourceFunc -> m (GClosure C_PollableSourceFunc)
genClosure_PollableSourceFunc cb :: PollableSourceFunc
cb = IO (GClosure C_PollableSourceFunc)
-> m (GClosure C_PollableSourceFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PollableSourceFunc)
-> m (GClosure C_PollableSourceFunc))
-> IO (GClosure C_PollableSourceFunc)
-> m (GClosure C_PollableSourceFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: PollableSourceFunc_WithClosures
cb' = PollableSourceFunc -> PollableSourceFunc_WithClosures
drop_closures_PollableSourceFunc PollableSourceFunc
cb
let cb'' :: C_PollableSourceFunc
cb'' = Maybe (Ptr (FunPtr C_PollableSourceFunc))
-> PollableSourceFunc_WithClosures -> C_PollableSourceFunc
wrap_PollableSourceFunc Maybe (Ptr (FunPtr C_PollableSourceFunc))
forall a. Maybe a
Nothing PollableSourceFunc_WithClosures
cb'
C_PollableSourceFunc -> IO (FunPtr C_PollableSourceFunc)
mk_PollableSourceFunc C_PollableSourceFunc
cb'' IO (FunPtr C_PollableSourceFunc)
-> (FunPtr C_PollableSourceFunc
-> IO (GClosure C_PollableSourceFunc))
-> IO (GClosure C_PollableSourceFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PollableSourceFunc -> IO (GClosure C_PollableSourceFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PollableSourceFunc ::
Maybe (Ptr (FunPtr C_PollableSourceFunc)) ->
PollableSourceFunc_WithClosures ->
C_PollableSourceFunc
wrap_PollableSourceFunc :: Maybe (Ptr (FunPtr C_PollableSourceFunc))
-> PollableSourceFunc_WithClosures -> C_PollableSourceFunc
wrap_PollableSourceFunc funptrptr :: Maybe (Ptr (FunPtr C_PollableSourceFunc))
funptrptr _cb :: PollableSourceFunc_WithClosures
_cb pollableStream :: Ptr Object
pollableStream userData :: Ptr ()
userData = do
Object
pollableStream' <- ((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
GObject.Object.Object) Ptr Object
pollableStream
Bool
result <- PollableSourceFunc_WithClosures
_cb Object
pollableStream' Ptr ()
userData
Maybe (Ptr (FunPtr C_PollableSourceFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PollableSourceFunc))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_IOSchedulerJobFunc =
Ptr Gio.IOSchedulerJob.IOSchedulerJob ->
Ptr Gio.Cancellable.Cancellable ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_IOSchedulerJobFunc :: FunPtr C_IOSchedulerJobFunc -> C_IOSchedulerJobFunc
dynamic_IOSchedulerJobFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
FunPtr C_IOSchedulerJobFunc
-> Gio.IOSchedulerJob.IOSchedulerJob
-> Maybe (a)
-> Ptr ()
-> m Bool
dynamic_IOSchedulerJobFunc :: FunPtr C_IOSchedulerJobFunc
-> IOSchedulerJob -> Maybe a -> Ptr () -> m Bool
dynamic_IOSchedulerJobFunc __funPtr :: FunPtr C_IOSchedulerJobFunc
__funPtr job :: IOSchedulerJob
job cancellable :: Maybe a
cancellable userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr IOSchedulerJob
job' <- IOSchedulerJob -> IO (Ptr IOSchedulerJob)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOSchedulerJob
job
Ptr Cancellable
maybeCancellable <- case Maybe a
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: a
jCancellable -> do
Ptr Cancellable
jCancellable' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
CInt
result <- (FunPtr C_IOSchedulerJobFunc -> C_IOSchedulerJobFunc
__dynamic_C_IOSchedulerJobFunc FunPtr C_IOSchedulerJobFunc
__funPtr) Ptr IOSchedulerJob
job' Ptr Cancellable
maybeCancellable Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
IOSchedulerJob -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr IOSchedulerJob
job
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
cancellable a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_IOSchedulerJobFunc :: C_IOSchedulerJobFunc -> IO (FunPtr C_IOSchedulerJobFunc)
type IOSchedulerJobFunc =
Gio.IOSchedulerJob.IOSchedulerJob
-> Maybe Gio.Cancellable.Cancellable
-> IO Bool
noIOSchedulerJobFunc :: Maybe IOSchedulerJobFunc
noIOSchedulerJobFunc :: Maybe IOSchedulerJobFunc
noIOSchedulerJobFunc = Maybe IOSchedulerJobFunc
forall a. Maybe a
Nothing
type IOSchedulerJobFunc_WithClosures =
Gio.IOSchedulerJob.IOSchedulerJob
-> Maybe Gio.Cancellable.Cancellable
-> Ptr ()
-> IO Bool
noIOSchedulerJobFunc_WithClosures :: Maybe IOSchedulerJobFunc_WithClosures
noIOSchedulerJobFunc_WithClosures :: Maybe IOSchedulerJobFunc_WithClosures
noIOSchedulerJobFunc_WithClosures = Maybe IOSchedulerJobFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_IOSchedulerJobFunc :: IOSchedulerJobFunc -> IOSchedulerJobFunc_WithClosures
drop_closures_IOSchedulerJobFunc :: IOSchedulerJobFunc -> IOSchedulerJobFunc_WithClosures
drop_closures_IOSchedulerJobFunc _f :: IOSchedulerJobFunc
_f job :: IOSchedulerJob
job cancellable :: Maybe Cancellable
cancellable _ = IOSchedulerJobFunc
_f IOSchedulerJob
job Maybe Cancellable
cancellable
genClosure_IOSchedulerJobFunc :: MonadIO m => IOSchedulerJobFunc -> m (GClosure C_IOSchedulerJobFunc)
genClosure_IOSchedulerJobFunc :: IOSchedulerJobFunc -> m (GClosure C_IOSchedulerJobFunc)
genClosure_IOSchedulerJobFunc cb :: IOSchedulerJobFunc
cb = IO (GClosure C_IOSchedulerJobFunc)
-> m (GClosure C_IOSchedulerJobFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_IOSchedulerJobFunc)
-> m (GClosure C_IOSchedulerJobFunc))
-> IO (GClosure C_IOSchedulerJobFunc)
-> m (GClosure C_IOSchedulerJobFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: IOSchedulerJobFunc_WithClosures
cb' = IOSchedulerJobFunc -> IOSchedulerJobFunc_WithClosures
drop_closures_IOSchedulerJobFunc IOSchedulerJobFunc
cb
let cb'' :: C_IOSchedulerJobFunc
cb'' = Maybe (Ptr (FunPtr C_IOSchedulerJobFunc))
-> IOSchedulerJobFunc_WithClosures -> C_IOSchedulerJobFunc
wrap_IOSchedulerJobFunc Maybe (Ptr (FunPtr C_IOSchedulerJobFunc))
forall a. Maybe a
Nothing IOSchedulerJobFunc_WithClosures
cb'
C_IOSchedulerJobFunc -> IO (FunPtr C_IOSchedulerJobFunc)
mk_IOSchedulerJobFunc C_IOSchedulerJobFunc
cb'' IO (FunPtr C_IOSchedulerJobFunc)
-> (FunPtr C_IOSchedulerJobFunc
-> IO (GClosure C_IOSchedulerJobFunc))
-> IO (GClosure C_IOSchedulerJobFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_IOSchedulerJobFunc -> IO (GClosure C_IOSchedulerJobFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_IOSchedulerJobFunc ::
Maybe (Ptr (FunPtr C_IOSchedulerJobFunc)) ->
IOSchedulerJobFunc_WithClosures ->
C_IOSchedulerJobFunc
wrap_IOSchedulerJobFunc :: Maybe (Ptr (FunPtr C_IOSchedulerJobFunc))
-> IOSchedulerJobFunc_WithClosures -> C_IOSchedulerJobFunc
wrap_IOSchedulerJobFunc funptrptr :: Maybe (Ptr (FunPtr C_IOSchedulerJobFunc))
funptrptr _cb :: IOSchedulerJobFunc_WithClosures
_cb job :: Ptr IOSchedulerJob
job cancellable :: Ptr Cancellable
cancellable userData :: Ptr ()
userData = do
IOSchedulerJob
job' <- ((ManagedPtr IOSchedulerJob -> IOSchedulerJob)
-> Ptr IOSchedulerJob -> IO IOSchedulerJob
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr IOSchedulerJob -> IOSchedulerJob
Gio.IOSchedulerJob.IOSchedulerJob) Ptr IOSchedulerJob
job
Maybe Cancellable
maybeCancellable <-
if Ptr Cancellable
cancellable Ptr Cancellable -> Ptr Cancellable -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Cancellable
forall a. Ptr a
nullPtr
then Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cancellable
forall a. Maybe a
Nothing
else do
Cancellable
cancellable' <- ((ManagedPtr Cancellable -> Cancellable)
-> Ptr Cancellable -> IO Cancellable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cancellable -> Cancellable
Gio.Cancellable.Cancellable) Ptr Cancellable
cancellable
Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Cancellable -> IO (Maybe Cancellable))
-> Maybe Cancellable -> IO (Maybe Cancellable)
forall a b. (a -> b) -> a -> b
$ Cancellable -> Maybe Cancellable
forall a. a -> Maybe a
Just Cancellable
cancellable'
Bool
result <- IOSchedulerJobFunc_WithClosures
_cb IOSchedulerJob
job' Maybe Cancellable
maybeCancellable Ptr ()
userData
Maybe (Ptr (FunPtr C_IOSchedulerJobFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_IOSchedulerJobFunc))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_FileReadMoreCallback =
CString ->
Int64 ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_FileReadMoreCallback :: FunPtr C_FileReadMoreCallback -> C_FileReadMoreCallback
dynamic_FileReadMoreCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FileReadMoreCallback
-> T.Text
-> Int64
-> Ptr ()
-> m Bool
dynamic_FileReadMoreCallback :: FunPtr C_FileReadMoreCallback -> Text -> Int64 -> Ptr () -> m Bool
dynamic_FileReadMoreCallback __funPtr :: FunPtr C_FileReadMoreCallback
__funPtr fileContents :: Text
fileContents fileSize :: Int64
fileSize callbackData :: Ptr ()
callbackData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CString
fileContents' <- Text -> IO CString
textToCString Text
fileContents
CInt
result <- (FunPtr C_FileReadMoreCallback -> C_FileReadMoreCallback
__dynamic_C_FileReadMoreCallback FunPtr C_FileReadMoreCallback
__funPtr) CString
fileContents' Int64
fileSize Ptr ()
callbackData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileContents'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_FileReadMoreCallback :: C_FileReadMoreCallback -> IO (FunPtr C_FileReadMoreCallback)
type FileReadMoreCallback =
T.Text
-> Int64
-> IO Bool
noFileReadMoreCallback :: Maybe FileReadMoreCallback
noFileReadMoreCallback :: Maybe FileReadMoreCallback
noFileReadMoreCallback = Maybe FileReadMoreCallback
forall a. Maybe a
Nothing
type FileReadMoreCallback_WithClosures =
T.Text
-> Int64
-> Ptr ()
-> IO Bool
noFileReadMoreCallback_WithClosures :: Maybe FileReadMoreCallback_WithClosures
noFileReadMoreCallback_WithClosures :: Maybe FileReadMoreCallback_WithClosures
noFileReadMoreCallback_WithClosures = Maybe FileReadMoreCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_FileReadMoreCallback :: FileReadMoreCallback -> FileReadMoreCallback_WithClosures
drop_closures_FileReadMoreCallback :: FileReadMoreCallback -> FileReadMoreCallback_WithClosures
drop_closures_FileReadMoreCallback _f :: FileReadMoreCallback
_f fileContents :: Text
fileContents fileSize :: Int64
fileSize _ = FileReadMoreCallback
_f Text
fileContents Int64
fileSize
genClosure_FileReadMoreCallback :: MonadIO m => FileReadMoreCallback -> m (GClosure C_FileReadMoreCallback)
genClosure_FileReadMoreCallback :: FileReadMoreCallback -> m (GClosure C_FileReadMoreCallback)
genClosure_FileReadMoreCallback cb :: FileReadMoreCallback
cb = IO (GClosure C_FileReadMoreCallback)
-> m (GClosure C_FileReadMoreCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileReadMoreCallback)
-> m (GClosure C_FileReadMoreCallback))
-> IO (GClosure C_FileReadMoreCallback)
-> m (GClosure C_FileReadMoreCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FileReadMoreCallback_WithClosures
cb' = FileReadMoreCallback -> FileReadMoreCallback_WithClosures
drop_closures_FileReadMoreCallback FileReadMoreCallback
cb
let cb'' :: C_FileReadMoreCallback
cb'' = Maybe (Ptr (FunPtr C_FileReadMoreCallback))
-> FileReadMoreCallback_WithClosures -> C_FileReadMoreCallback
wrap_FileReadMoreCallback Maybe (Ptr (FunPtr C_FileReadMoreCallback))
forall a. Maybe a
Nothing FileReadMoreCallback_WithClosures
cb'
C_FileReadMoreCallback -> IO (FunPtr C_FileReadMoreCallback)
mk_FileReadMoreCallback C_FileReadMoreCallback
cb'' IO (FunPtr C_FileReadMoreCallback)
-> (FunPtr C_FileReadMoreCallback
-> IO (GClosure C_FileReadMoreCallback))
-> IO (GClosure C_FileReadMoreCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileReadMoreCallback
-> IO (GClosure C_FileReadMoreCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FileReadMoreCallback ::
Maybe (Ptr (FunPtr C_FileReadMoreCallback)) ->
FileReadMoreCallback_WithClosures ->
C_FileReadMoreCallback
wrap_FileReadMoreCallback :: Maybe (Ptr (FunPtr C_FileReadMoreCallback))
-> FileReadMoreCallback_WithClosures -> C_FileReadMoreCallback
wrap_FileReadMoreCallback funptrptr :: Maybe (Ptr (FunPtr C_FileReadMoreCallback))
funptrptr _cb :: FileReadMoreCallback_WithClosures
_cb fileContents :: CString
fileContents fileSize :: Int64
fileSize callbackData :: Ptr ()
callbackData = do
Text
fileContents' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
fileContents
Bool
result <- FileReadMoreCallback_WithClosures
_cb Text
fileContents' Int64
fileSize Ptr ()
callbackData
Maybe (Ptr (FunPtr C_FileReadMoreCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FileReadMoreCallback))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_FileProgressCallback =
Int64 ->
Int64 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_FileProgressCallback :: FunPtr C_FileProgressCallback -> C_FileProgressCallback
dynamic_FileProgressCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FileProgressCallback
-> Int64
-> Int64
-> Ptr ()
-> m ()
dynamic_FileProgressCallback :: FunPtr C_FileProgressCallback -> Int64 -> Int64 -> Ptr () -> m ()
dynamic_FileProgressCallback __funPtr :: FunPtr C_FileProgressCallback
__funPtr currentNumBytes :: Int64
currentNumBytes totalNumBytes :: Int64
totalNumBytes userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_FileProgressCallback -> C_FileProgressCallback
__dynamic_C_FileProgressCallback FunPtr C_FileProgressCallback
__funPtr) Int64
currentNumBytes Int64
totalNumBytes Ptr ()
userData
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_FileProgressCallback :: C_FileProgressCallback -> IO (FunPtr C_FileProgressCallback)
type FileProgressCallback =
Int64
-> Int64
-> IO ()
noFileProgressCallback :: Maybe FileProgressCallback
noFileProgressCallback :: Maybe FileProgressCallback
noFileProgressCallback = Maybe FileProgressCallback
forall a. Maybe a
Nothing
type FileProgressCallback_WithClosures =
Int64
-> Int64
-> Ptr ()
-> IO ()
noFileProgressCallback_WithClosures :: Maybe FileProgressCallback_WithClosures
noFileProgressCallback_WithClosures :: Maybe C_FileProgressCallback
noFileProgressCallback_WithClosures = Maybe C_FileProgressCallback
forall a. Maybe a
Nothing
drop_closures_FileProgressCallback :: FileProgressCallback -> FileProgressCallback_WithClosures
drop_closures_FileProgressCallback :: FileProgressCallback -> C_FileProgressCallback
drop_closures_FileProgressCallback _f :: FileProgressCallback
_f currentNumBytes :: Int64
currentNumBytes totalNumBytes :: Int64
totalNumBytes _ = FileProgressCallback
_f Int64
currentNumBytes Int64
totalNumBytes
genClosure_FileProgressCallback :: MonadIO m => FileProgressCallback -> m (GClosure C_FileProgressCallback)
genClosure_FileProgressCallback :: FileProgressCallback -> m (GClosure C_FileProgressCallback)
genClosure_FileProgressCallback cb :: FileProgressCallback
cb = IO (GClosure C_FileProgressCallback)
-> m (GClosure C_FileProgressCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileProgressCallback)
-> m (GClosure C_FileProgressCallback))
-> IO (GClosure C_FileProgressCallback)
-> m (GClosure C_FileProgressCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_FileProgressCallback
cb' = FileProgressCallback -> C_FileProgressCallback
drop_closures_FileProgressCallback FileProgressCallback
cb
let cb'' :: C_FileProgressCallback
cb'' = Maybe (Ptr (FunPtr C_FileProgressCallback))
-> C_FileProgressCallback -> C_FileProgressCallback
wrap_FileProgressCallback Maybe (Ptr (FunPtr C_FileProgressCallback))
forall a. Maybe a
Nothing C_FileProgressCallback
cb'
C_FileProgressCallback -> IO (FunPtr C_FileProgressCallback)
mk_FileProgressCallback C_FileProgressCallback
cb'' IO (FunPtr C_FileProgressCallback)
-> (FunPtr C_FileProgressCallback
-> IO (GClosure C_FileProgressCallback))
-> IO (GClosure C_FileProgressCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileProgressCallback
-> IO (GClosure C_FileProgressCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FileProgressCallback ::
Maybe (Ptr (FunPtr C_FileProgressCallback)) ->
FileProgressCallback_WithClosures ->
C_FileProgressCallback
wrap_FileProgressCallback :: Maybe (Ptr (FunPtr C_FileProgressCallback))
-> C_FileProgressCallback -> C_FileProgressCallback
wrap_FileProgressCallback funptrptr :: Maybe (Ptr (FunPtr C_FileProgressCallback))
funptrptr _cb :: C_FileProgressCallback
_cb currentNumBytes :: Int64
currentNumBytes totalNumBytes :: Int64
totalNumBytes userData :: Ptr ()
userData = do
C_FileProgressCallback
_cb Int64
currentNumBytes Int64
totalNumBytes Ptr ()
userData
Maybe (Ptr (FunPtr C_FileProgressCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FileProgressCallback))
funptrptr
type C_FileMeasureProgressCallback =
CInt ->
Word64 ->
Word64 ->
Word64 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_FileMeasureProgressCallback :: FunPtr C_FileMeasureProgressCallback -> C_FileMeasureProgressCallback
dynamic_FileMeasureProgressCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FileMeasureProgressCallback
-> Bool
-> Word64
-> Word64
-> Word64
-> Ptr ()
-> m ()
dynamic_FileMeasureProgressCallback :: FunPtr C_FileMeasureProgressCallback
-> Bool -> Word64 -> Word64 -> Word64 -> Ptr () -> m ()
dynamic_FileMeasureProgressCallback __funPtr :: FunPtr C_FileMeasureProgressCallback
__funPtr reporting :: Bool
reporting currentSize :: Word64
currentSize numDirs :: Word64
numDirs numFiles :: Word64
numFiles userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let reporting' :: CInt
reporting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
reporting
(FunPtr C_FileMeasureProgressCallback
-> C_FileMeasureProgressCallback
__dynamic_C_FileMeasureProgressCallback FunPtr C_FileMeasureProgressCallback
__funPtr) CInt
reporting' Word64
currentSize Word64
numDirs Word64
numFiles Ptr ()
userData
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_FileMeasureProgressCallback :: C_FileMeasureProgressCallback -> IO (FunPtr C_FileMeasureProgressCallback)
type FileMeasureProgressCallback =
Bool
-> Word64
-> Word64
-> Word64
-> IO ()
noFileMeasureProgressCallback :: Maybe FileMeasureProgressCallback
noFileMeasureProgressCallback :: Maybe FileMeasureProgressCallback
noFileMeasureProgressCallback = Maybe FileMeasureProgressCallback
forall a. Maybe a
Nothing
type FileMeasureProgressCallback_WithClosures =
Bool
-> Word64
-> Word64
-> Word64
-> Ptr ()
-> IO ()
noFileMeasureProgressCallback_WithClosures :: Maybe FileMeasureProgressCallback_WithClosures
noFileMeasureProgressCallback_WithClosures :: Maybe FileMeasureProgressCallback_WithClosures
noFileMeasureProgressCallback_WithClosures = Maybe FileMeasureProgressCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_FileMeasureProgressCallback :: FileMeasureProgressCallback -> FileMeasureProgressCallback_WithClosures
drop_closures_FileMeasureProgressCallback :: FileMeasureProgressCallback
-> FileMeasureProgressCallback_WithClosures
drop_closures_FileMeasureProgressCallback _f :: FileMeasureProgressCallback
_f reporting :: Bool
reporting currentSize :: Word64
currentSize numDirs :: Word64
numDirs numFiles :: Word64
numFiles _ = FileMeasureProgressCallback
_f Bool
reporting Word64
currentSize Word64
numDirs Word64
numFiles
genClosure_FileMeasureProgressCallback :: MonadIO m => FileMeasureProgressCallback -> m (GClosure C_FileMeasureProgressCallback)
genClosure_FileMeasureProgressCallback :: FileMeasureProgressCallback
-> m (GClosure C_FileMeasureProgressCallback)
genClosure_FileMeasureProgressCallback cb :: FileMeasureProgressCallback
cb = IO (GClosure C_FileMeasureProgressCallback)
-> m (GClosure C_FileMeasureProgressCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileMeasureProgressCallback)
-> m (GClosure C_FileMeasureProgressCallback))
-> IO (GClosure C_FileMeasureProgressCallback)
-> m (GClosure C_FileMeasureProgressCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: FileMeasureProgressCallback_WithClosures
cb' = FileMeasureProgressCallback
-> FileMeasureProgressCallback_WithClosures
drop_closures_FileMeasureProgressCallback FileMeasureProgressCallback
cb
let cb'' :: C_FileMeasureProgressCallback
cb'' = Maybe (Ptr (FunPtr C_FileMeasureProgressCallback))
-> FileMeasureProgressCallback_WithClosures
-> C_FileMeasureProgressCallback
wrap_FileMeasureProgressCallback Maybe (Ptr (FunPtr C_FileMeasureProgressCallback))
forall a. Maybe a
Nothing FileMeasureProgressCallback_WithClosures
cb'
C_FileMeasureProgressCallback
-> IO (FunPtr C_FileMeasureProgressCallback)
mk_FileMeasureProgressCallback C_FileMeasureProgressCallback
cb'' IO (FunPtr C_FileMeasureProgressCallback)
-> (FunPtr C_FileMeasureProgressCallback
-> IO (GClosure C_FileMeasureProgressCallback))
-> IO (GClosure C_FileMeasureProgressCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileMeasureProgressCallback
-> IO (GClosure C_FileMeasureProgressCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FileMeasureProgressCallback ::
Maybe (Ptr (FunPtr C_FileMeasureProgressCallback)) ->
FileMeasureProgressCallback_WithClosures ->
C_FileMeasureProgressCallback
wrap_FileMeasureProgressCallback :: Maybe (Ptr (FunPtr C_FileMeasureProgressCallback))
-> FileMeasureProgressCallback_WithClosures
-> C_FileMeasureProgressCallback
wrap_FileMeasureProgressCallback funptrptr :: Maybe (Ptr (FunPtr C_FileMeasureProgressCallback))
funptrptr _cb :: FileMeasureProgressCallback_WithClosures
_cb reporting :: CInt
reporting currentSize :: Word64
currentSize numDirs :: Word64
numDirs numFiles :: Word64
numFiles userData :: Ptr ()
userData = do
let reporting' :: Bool
reporting' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
reporting
FileMeasureProgressCallback_WithClosures
_cb Bool
reporting' Word64
currentSize Word64
numDirs Word64
numFiles Ptr ()
userData
Maybe (Ptr (FunPtr C_FileMeasureProgressCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FileMeasureProgressCallback))
funptrptr
type C_DesktopAppLaunchCallback =
Ptr Gio.DesktopAppInfo.DesktopAppInfo ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_DesktopAppLaunchCallback :: FunPtr C_DesktopAppLaunchCallback -> C_DesktopAppLaunchCallback
dynamic_DesktopAppLaunchCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DesktopAppInfo.IsDesktopAppInfo a) =>
FunPtr C_DesktopAppLaunchCallback
-> a
-> Int32
-> Ptr ()
-> m ()
dynamic_DesktopAppLaunchCallback :: FunPtr C_DesktopAppLaunchCallback -> a -> Int32 -> Ptr () -> m ()
dynamic_DesktopAppLaunchCallback __funPtr :: FunPtr C_DesktopAppLaunchCallback
__funPtr appinfo :: a
appinfo pid :: Int32
pid userData :: Ptr ()
userData = 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 DesktopAppInfo
appinfo' <- a -> IO (Ptr DesktopAppInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appinfo
(FunPtr C_DesktopAppLaunchCallback -> C_DesktopAppLaunchCallback
__dynamic_C_DesktopAppLaunchCallback FunPtr C_DesktopAppLaunchCallback
__funPtr) Ptr DesktopAppInfo
appinfo' Int32
pid Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appinfo
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_DesktopAppLaunchCallback :: C_DesktopAppLaunchCallback -> IO (FunPtr C_DesktopAppLaunchCallback)
type DesktopAppLaunchCallback =
Gio.DesktopAppInfo.DesktopAppInfo
-> Int32
-> IO ()
noDesktopAppLaunchCallback :: Maybe DesktopAppLaunchCallback
noDesktopAppLaunchCallback :: Maybe DesktopAppLaunchCallback
noDesktopAppLaunchCallback = Maybe DesktopAppLaunchCallback
forall a. Maybe a
Nothing
type DesktopAppLaunchCallback_WithClosures =
Gio.DesktopAppInfo.DesktopAppInfo
-> Int32
-> Ptr ()
-> IO ()
noDesktopAppLaunchCallback_WithClosures :: Maybe DesktopAppLaunchCallback_WithClosures
noDesktopAppLaunchCallback_WithClosures :: Maybe DesktopAppLaunchCallback_WithClosures
noDesktopAppLaunchCallback_WithClosures = Maybe DesktopAppLaunchCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_DesktopAppLaunchCallback :: DesktopAppLaunchCallback -> DesktopAppLaunchCallback_WithClosures
drop_closures_DesktopAppLaunchCallback :: DesktopAppLaunchCallback -> DesktopAppLaunchCallback_WithClosures
drop_closures_DesktopAppLaunchCallback _f :: DesktopAppLaunchCallback
_f appinfo :: DesktopAppInfo
appinfo pid :: Int32
pid _ = DesktopAppLaunchCallback
_f DesktopAppInfo
appinfo Int32
pid
genClosure_DesktopAppLaunchCallback :: MonadIO m => DesktopAppLaunchCallback -> m (GClosure C_DesktopAppLaunchCallback)
genClosure_DesktopAppLaunchCallback :: DesktopAppLaunchCallback -> m (GClosure C_DesktopAppLaunchCallback)
genClosure_DesktopAppLaunchCallback cb :: DesktopAppLaunchCallback
cb = IO (GClosure C_DesktopAppLaunchCallback)
-> m (GClosure C_DesktopAppLaunchCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DesktopAppLaunchCallback)
-> m (GClosure C_DesktopAppLaunchCallback))
-> IO (GClosure C_DesktopAppLaunchCallback)
-> m (GClosure C_DesktopAppLaunchCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DesktopAppLaunchCallback_WithClosures
cb' = DesktopAppLaunchCallback -> DesktopAppLaunchCallback_WithClosures
drop_closures_DesktopAppLaunchCallback DesktopAppLaunchCallback
cb
let cb'' :: C_DesktopAppLaunchCallback
cb'' = Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback))
-> DesktopAppLaunchCallback_WithClosures
-> C_DesktopAppLaunchCallback
wrap_DesktopAppLaunchCallback Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback))
forall a. Maybe a
Nothing DesktopAppLaunchCallback_WithClosures
cb'
C_DesktopAppLaunchCallback
-> IO (FunPtr C_DesktopAppLaunchCallback)
mk_DesktopAppLaunchCallback C_DesktopAppLaunchCallback
cb'' IO (FunPtr C_DesktopAppLaunchCallback)
-> (FunPtr C_DesktopAppLaunchCallback
-> IO (GClosure C_DesktopAppLaunchCallback))
-> IO (GClosure C_DesktopAppLaunchCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DesktopAppLaunchCallback
-> IO (GClosure C_DesktopAppLaunchCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DesktopAppLaunchCallback ::
Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback)) ->
DesktopAppLaunchCallback_WithClosures ->
C_DesktopAppLaunchCallback
wrap_DesktopAppLaunchCallback :: Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback))
-> DesktopAppLaunchCallback_WithClosures
-> C_DesktopAppLaunchCallback
wrap_DesktopAppLaunchCallback funptrptr :: Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback))
funptrptr _cb :: DesktopAppLaunchCallback_WithClosures
_cb appinfo :: Ptr DesktopAppInfo
appinfo pid :: Int32
pid userData :: Ptr ()
userData = do
DesktopAppInfo
appinfo' <- ((ManagedPtr DesktopAppInfo -> DesktopAppInfo)
-> Ptr DesktopAppInfo -> IO DesktopAppInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DesktopAppInfo -> DesktopAppInfo
Gio.DesktopAppInfo.DesktopAppInfo) Ptr DesktopAppInfo
appinfo
DesktopAppLaunchCallback_WithClosures
_cb DesktopAppInfo
appinfo' Int32
pid Ptr ()
userData
Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback))
funptrptr
type C_DatagramBasedSourceFunc =
Ptr Gio.DatagramBased.DatagramBased ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_DatagramBasedSourceFunc :: FunPtr C_DatagramBasedSourceFunc -> C_DatagramBasedSourceFunc
dynamic_DatagramBasedSourceFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DatagramBased.IsDatagramBased a) =>
FunPtr C_DatagramBasedSourceFunc
-> a
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> m Bool
dynamic_DatagramBasedSourceFunc :: FunPtr C_DatagramBasedSourceFunc
-> a -> [IOCondition] -> Ptr () -> m Bool
dynamic_DatagramBasedSourceFunc __funPtr :: FunPtr C_DatagramBasedSourceFunc
__funPtr datagramBased :: a
datagramBased condition :: [IOCondition]
condition userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr DatagramBased
datagramBased' <- a -> IO (Ptr DatagramBased)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
datagramBased
let condition' :: CUInt
condition' = [IOCondition] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [IOCondition]
condition
CInt
result <- (FunPtr C_DatagramBasedSourceFunc -> C_DatagramBasedSourceFunc
__dynamic_C_DatagramBasedSourceFunc FunPtr C_DatagramBasedSourceFunc
__funPtr) Ptr DatagramBased
datagramBased' CUInt
condition' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
datagramBased
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_DatagramBasedSourceFunc :: C_DatagramBasedSourceFunc -> IO (FunPtr C_DatagramBasedSourceFunc)
type DatagramBasedSourceFunc =
Gio.DatagramBased.DatagramBased
-> [GLib.Flags.IOCondition]
-> IO Bool
noDatagramBasedSourceFunc :: Maybe DatagramBasedSourceFunc
noDatagramBasedSourceFunc :: Maybe DatagramBasedSourceFunc
noDatagramBasedSourceFunc = Maybe DatagramBasedSourceFunc
forall a. Maybe a
Nothing
type DatagramBasedSourceFunc_WithClosures =
Gio.DatagramBased.DatagramBased
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> IO Bool
noDatagramBasedSourceFunc_WithClosures :: Maybe DatagramBasedSourceFunc_WithClosures
noDatagramBasedSourceFunc_WithClosures :: Maybe DatagramBasedSourceFunc_WithClosures
noDatagramBasedSourceFunc_WithClosures = Maybe DatagramBasedSourceFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_DatagramBasedSourceFunc :: DatagramBasedSourceFunc -> DatagramBasedSourceFunc_WithClosures
drop_closures_DatagramBasedSourceFunc :: DatagramBasedSourceFunc -> DatagramBasedSourceFunc_WithClosures
drop_closures_DatagramBasedSourceFunc _f :: DatagramBasedSourceFunc
_f datagramBased :: DatagramBased
datagramBased condition :: [IOCondition]
condition _ = DatagramBasedSourceFunc
_f DatagramBased
datagramBased [IOCondition]
condition
genClosure_DatagramBasedSourceFunc :: MonadIO m => DatagramBasedSourceFunc -> m (GClosure C_DatagramBasedSourceFunc)
genClosure_DatagramBasedSourceFunc :: DatagramBasedSourceFunc -> m (GClosure C_DatagramBasedSourceFunc)
genClosure_DatagramBasedSourceFunc cb :: DatagramBasedSourceFunc
cb = IO (GClosure C_DatagramBasedSourceFunc)
-> m (GClosure C_DatagramBasedSourceFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DatagramBasedSourceFunc)
-> m (GClosure C_DatagramBasedSourceFunc))
-> IO (GClosure C_DatagramBasedSourceFunc)
-> m (GClosure C_DatagramBasedSourceFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DatagramBasedSourceFunc_WithClosures
cb' = DatagramBasedSourceFunc -> DatagramBasedSourceFunc_WithClosures
drop_closures_DatagramBasedSourceFunc DatagramBasedSourceFunc
cb
let cb'' :: C_DatagramBasedSourceFunc
cb'' = Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc))
-> DatagramBasedSourceFunc_WithClosures
-> C_DatagramBasedSourceFunc
wrap_DatagramBasedSourceFunc Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc))
forall a. Maybe a
Nothing DatagramBasedSourceFunc_WithClosures
cb'
C_DatagramBasedSourceFunc -> IO (FunPtr C_DatagramBasedSourceFunc)
mk_DatagramBasedSourceFunc C_DatagramBasedSourceFunc
cb'' IO (FunPtr C_DatagramBasedSourceFunc)
-> (FunPtr C_DatagramBasedSourceFunc
-> IO (GClosure C_DatagramBasedSourceFunc))
-> IO (GClosure C_DatagramBasedSourceFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DatagramBasedSourceFunc
-> IO (GClosure C_DatagramBasedSourceFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DatagramBasedSourceFunc ::
Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc)) ->
DatagramBasedSourceFunc_WithClosures ->
C_DatagramBasedSourceFunc
wrap_DatagramBasedSourceFunc :: Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc))
-> DatagramBasedSourceFunc_WithClosures
-> C_DatagramBasedSourceFunc
wrap_DatagramBasedSourceFunc funptrptr :: Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc))
funptrptr _cb :: DatagramBasedSourceFunc_WithClosures
_cb datagramBased :: Ptr DatagramBased
datagramBased condition :: CUInt
condition userData :: Ptr ()
userData = do
DatagramBased
datagramBased' <- ((ManagedPtr DatagramBased -> DatagramBased)
-> Ptr DatagramBased -> IO DatagramBased
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DatagramBased -> DatagramBased
Gio.DatagramBased.DatagramBased) Ptr DatagramBased
datagramBased
let condition' :: [IOCondition]
condition' = CUInt -> [IOCondition]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
condition
Bool
result <- DatagramBasedSourceFunc_WithClosures
_cb DatagramBased
datagramBased' [IOCondition]
condition' Ptr ()
userData
Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_DBusSubtreeIntrospectFunc =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
CString ->
Ptr () ->
IO (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo)
foreign import ccall "dynamic" __dynamic_C_DBusSubtreeIntrospectFunc :: FunPtr C_DBusSubtreeIntrospectFunc -> C_DBusSubtreeIntrospectFunc
dynamic_DBusSubtreeIntrospectFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_DBusSubtreeIntrospectFunc
-> a
-> T.Text
-> T.Text
-> T.Text
-> Ptr ()
-> m Gio.DBusInterfaceInfo.DBusInterfaceInfo
dynamic_DBusSubtreeIntrospectFunc :: FunPtr C_DBusSubtreeIntrospectFunc
-> a -> Text -> Text -> Text -> Ptr () -> m DBusInterfaceInfo
dynamic_DBusSubtreeIntrospectFunc __funPtr :: FunPtr C_DBusSubtreeIntrospectFunc
__funPtr connection :: a
connection sender :: Text
sender objectPath :: Text
objectPath node :: Text
node userData :: Ptr ()
userData = IO DBusInterfaceInfo -> m DBusInterfaceInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusInterfaceInfo -> m DBusInterfaceInfo)
-> IO DBusInterfaceInfo -> m DBusInterfaceInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
sender' <- Text -> IO CString
textToCString Text
sender
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
node' <- Text -> IO CString
textToCString Text
node
Ptr DBusInterfaceInfo
result <- (FunPtr C_DBusSubtreeIntrospectFunc -> C_DBusSubtreeIntrospectFunc
__dynamic_C_DBusSubtreeIntrospectFunc FunPtr C_DBusSubtreeIntrospectFunc
__funPtr) Ptr DBusConnection
connection' CString
sender' CString
objectPath' CString
node' Ptr ()
userData
Text -> Ptr DBusInterfaceInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusSubtreeIntrospectFunc" Ptr DBusInterfaceInfo
result
DBusInterfaceInfo
result' <- ((ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo)
-> Ptr DBusInterfaceInfo -> IO DBusInterfaceInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo
Gio.DBusInterfaceInfo.DBusInterfaceInfo) Ptr DBusInterfaceInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sender'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
node'
DBusInterfaceInfo -> IO DBusInterfaceInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DBusInterfaceInfo
result'
foreign import ccall "wrapper"
mk_DBusSubtreeIntrospectFunc :: C_DBusSubtreeIntrospectFunc -> IO (FunPtr C_DBusSubtreeIntrospectFunc)
type DBusSubtreeIntrospectFunc =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> IO Gio.DBusInterfaceInfo.DBusInterfaceInfo
noDBusSubtreeIntrospectFunc :: Maybe DBusSubtreeIntrospectFunc
noDBusSubtreeIntrospectFunc :: Maybe DBusSubtreeIntrospectFunc
noDBusSubtreeIntrospectFunc = Maybe DBusSubtreeIntrospectFunc
forall a. Maybe a
Nothing
type DBusSubtreeIntrospectFunc_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> Ptr ()
-> IO Gio.DBusInterfaceInfo.DBusInterfaceInfo
noDBusSubtreeIntrospectFunc_WithClosures :: Maybe DBusSubtreeIntrospectFunc_WithClosures
noDBusSubtreeIntrospectFunc_WithClosures :: Maybe DBusSubtreeIntrospectFunc_WithClosures
noDBusSubtreeIntrospectFunc_WithClosures = Maybe DBusSubtreeIntrospectFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusSubtreeIntrospectFunc :: DBusSubtreeIntrospectFunc -> DBusSubtreeIntrospectFunc_WithClosures
drop_closures_DBusSubtreeIntrospectFunc :: DBusSubtreeIntrospectFunc -> DBusSubtreeIntrospectFunc_WithClosures
drop_closures_DBusSubtreeIntrospectFunc _f :: DBusSubtreeIntrospectFunc
_f connection :: DBusConnection
connection sender :: Text
sender objectPath :: Text
objectPath node :: Text
node _ = DBusSubtreeIntrospectFunc
_f DBusConnection
connection Text
sender Text
objectPath Text
node
genClosure_DBusSubtreeIntrospectFunc :: MonadIO m => DBusSubtreeIntrospectFunc -> m (GClosure C_DBusSubtreeIntrospectFunc)
genClosure_DBusSubtreeIntrospectFunc :: DBusSubtreeIntrospectFunc
-> m (GClosure C_DBusSubtreeIntrospectFunc)
genClosure_DBusSubtreeIntrospectFunc cb :: DBusSubtreeIntrospectFunc
cb = IO (GClosure C_DBusSubtreeIntrospectFunc)
-> m (GClosure C_DBusSubtreeIntrospectFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusSubtreeIntrospectFunc)
-> m (GClosure C_DBusSubtreeIntrospectFunc))
-> IO (GClosure C_DBusSubtreeIntrospectFunc)
-> m (GClosure C_DBusSubtreeIntrospectFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusSubtreeIntrospectFunc_WithClosures
cb' = DBusSubtreeIntrospectFunc -> DBusSubtreeIntrospectFunc_WithClosures
drop_closures_DBusSubtreeIntrospectFunc DBusSubtreeIntrospectFunc
cb
let cb'' :: C_DBusSubtreeIntrospectFunc
cb'' = Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc))
-> DBusSubtreeIntrospectFunc_WithClosures
-> C_DBusSubtreeIntrospectFunc
wrap_DBusSubtreeIntrospectFunc Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc))
forall a. Maybe a
Nothing DBusSubtreeIntrospectFunc_WithClosures
cb'
C_DBusSubtreeIntrospectFunc
-> IO (FunPtr C_DBusSubtreeIntrospectFunc)
mk_DBusSubtreeIntrospectFunc C_DBusSubtreeIntrospectFunc
cb'' IO (FunPtr C_DBusSubtreeIntrospectFunc)
-> (FunPtr C_DBusSubtreeIntrospectFunc
-> IO (GClosure C_DBusSubtreeIntrospectFunc))
-> IO (GClosure C_DBusSubtreeIntrospectFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusSubtreeIntrospectFunc
-> IO (GClosure C_DBusSubtreeIntrospectFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusSubtreeIntrospectFunc ::
Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc)) ->
DBusSubtreeIntrospectFunc_WithClosures ->
C_DBusSubtreeIntrospectFunc
wrap_DBusSubtreeIntrospectFunc :: Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc))
-> DBusSubtreeIntrospectFunc_WithClosures
-> C_DBusSubtreeIntrospectFunc
wrap_DBusSubtreeIntrospectFunc funptrptr :: Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc))
funptrptr _cb :: DBusSubtreeIntrospectFunc_WithClosures
_cb connection :: Ptr DBusConnection
connection sender :: CString
sender objectPath :: CString
objectPath node :: CString
node userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
sender' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
sender
Text
objectPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
objectPath
Text
node' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
node
DBusInterfaceInfo
result <- DBusSubtreeIntrospectFunc_WithClosures
_cb DBusConnection
connection' Text
sender' Text
objectPath' Text
node' Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc))
funptrptr
Ptr DBusInterfaceInfo
result' <- DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed DBusInterfaceInfo
result
Ptr DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusInterfaceInfo
result'
type C_DBusSubtreeDispatchFunc =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr () ->
Ptr () ->
IO (Ptr Gio.DBusInterfaceVTable.DBusInterfaceVTable)
foreign import ccall "dynamic" __dynamic_C_DBusSubtreeDispatchFunc :: FunPtr C_DBusSubtreeDispatchFunc -> C_DBusSubtreeDispatchFunc
dynamic_DBusSubtreeDispatchFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_DBusSubtreeDispatchFunc
-> a
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> Ptr ()
-> Ptr ()
-> m Gio.DBusInterfaceVTable.DBusInterfaceVTable
dynamic_DBusSubtreeDispatchFunc :: FunPtr C_DBusSubtreeDispatchFunc
-> a
-> Text
-> Text
-> Text
-> Text
-> Ptr ()
-> Ptr ()
-> m DBusInterfaceVTable
dynamic_DBusSubtreeDispatchFunc __funPtr :: FunPtr C_DBusSubtreeDispatchFunc
__funPtr connection :: a
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName node :: Text
node outUserData :: Ptr ()
outUserData userData :: Ptr ()
userData = IO DBusInterfaceVTable -> m DBusInterfaceVTable
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusInterfaceVTable -> m DBusInterfaceVTable)
-> IO DBusInterfaceVTable -> m DBusInterfaceVTable
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
sender' <- Text -> IO CString
textToCString Text
sender
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
CString
node' <- Text -> IO CString
textToCString Text
node
Ptr DBusInterfaceVTable
result <- (FunPtr C_DBusSubtreeDispatchFunc -> C_DBusSubtreeDispatchFunc
__dynamic_C_DBusSubtreeDispatchFunc FunPtr C_DBusSubtreeDispatchFunc
__funPtr) Ptr DBusConnection
connection' CString
sender' CString
objectPath' CString
interfaceName' CString
node' Ptr ()
outUserData Ptr ()
userData
Text -> Ptr DBusInterfaceVTable -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusSubtreeDispatchFunc" Ptr DBusInterfaceVTable
result
DBusInterfaceVTable
result' <- ((ManagedPtr DBusInterfaceVTable -> DBusInterfaceVTable)
-> Ptr DBusInterfaceVTable -> IO DBusInterfaceVTable
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr DBusInterfaceVTable -> DBusInterfaceVTable
Gio.DBusInterfaceVTable.DBusInterfaceVTable) Ptr DBusInterfaceVTable
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sender'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
node'
DBusInterfaceVTable -> IO DBusInterfaceVTable
forall (m :: * -> *) a. Monad m => a -> m a
return DBusInterfaceVTable
result'
foreign import ccall "wrapper"
mk_DBusSubtreeDispatchFunc :: C_DBusSubtreeDispatchFunc -> IO (FunPtr C_DBusSubtreeDispatchFunc)
type DBusSubtreeDispatchFunc =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> Ptr ()
-> IO Gio.DBusInterfaceVTable.DBusInterfaceVTable
noDBusSubtreeDispatchFunc :: Maybe DBusSubtreeDispatchFunc
noDBusSubtreeDispatchFunc :: Maybe DBusSubtreeDispatchFunc
noDBusSubtreeDispatchFunc = Maybe DBusSubtreeDispatchFunc
forall a. Maybe a
Nothing
type DBusSubtreeDispatchFunc_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> Ptr ()
-> Ptr ()
-> IO Gio.DBusInterfaceVTable.DBusInterfaceVTable
noDBusSubtreeDispatchFunc_WithClosures :: Maybe DBusSubtreeDispatchFunc_WithClosures
noDBusSubtreeDispatchFunc_WithClosures :: Maybe DBusSubtreeDispatchFunc_WithClosures
noDBusSubtreeDispatchFunc_WithClosures = Maybe DBusSubtreeDispatchFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusSubtreeDispatchFunc :: DBusSubtreeDispatchFunc -> DBusSubtreeDispatchFunc_WithClosures
drop_closures_DBusSubtreeDispatchFunc :: DBusSubtreeDispatchFunc -> DBusSubtreeDispatchFunc_WithClosures
drop_closures_DBusSubtreeDispatchFunc _f :: DBusSubtreeDispatchFunc
_f connection :: DBusConnection
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName node :: Text
node outUserData :: Ptr ()
outUserData _ = DBusSubtreeDispatchFunc
_f DBusConnection
connection Text
sender Text
objectPath Text
interfaceName Text
node Ptr ()
outUserData
genClosure_DBusSubtreeDispatchFunc :: MonadIO m => DBusSubtreeDispatchFunc -> m (GClosure C_DBusSubtreeDispatchFunc)
genClosure_DBusSubtreeDispatchFunc :: DBusSubtreeDispatchFunc -> m (GClosure C_DBusSubtreeDispatchFunc)
genClosure_DBusSubtreeDispatchFunc cb :: DBusSubtreeDispatchFunc
cb = IO (GClosure C_DBusSubtreeDispatchFunc)
-> m (GClosure C_DBusSubtreeDispatchFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusSubtreeDispatchFunc)
-> m (GClosure C_DBusSubtreeDispatchFunc))
-> IO (GClosure C_DBusSubtreeDispatchFunc)
-> m (GClosure C_DBusSubtreeDispatchFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusSubtreeDispatchFunc_WithClosures
cb' = DBusSubtreeDispatchFunc -> DBusSubtreeDispatchFunc_WithClosures
drop_closures_DBusSubtreeDispatchFunc DBusSubtreeDispatchFunc
cb
let cb'' :: C_DBusSubtreeDispatchFunc
cb'' = Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc))
-> DBusSubtreeDispatchFunc_WithClosures
-> C_DBusSubtreeDispatchFunc
wrap_DBusSubtreeDispatchFunc Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc))
forall a. Maybe a
Nothing DBusSubtreeDispatchFunc_WithClosures
cb'
C_DBusSubtreeDispatchFunc -> IO (FunPtr C_DBusSubtreeDispatchFunc)
mk_DBusSubtreeDispatchFunc C_DBusSubtreeDispatchFunc
cb'' IO (FunPtr C_DBusSubtreeDispatchFunc)
-> (FunPtr C_DBusSubtreeDispatchFunc
-> IO (GClosure C_DBusSubtreeDispatchFunc))
-> IO (GClosure C_DBusSubtreeDispatchFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusSubtreeDispatchFunc
-> IO (GClosure C_DBusSubtreeDispatchFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusSubtreeDispatchFunc ::
Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc)) ->
DBusSubtreeDispatchFunc_WithClosures ->
C_DBusSubtreeDispatchFunc
wrap_DBusSubtreeDispatchFunc :: Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc))
-> DBusSubtreeDispatchFunc_WithClosures
-> C_DBusSubtreeDispatchFunc
wrap_DBusSubtreeDispatchFunc funptrptr :: Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc))
funptrptr _cb :: DBusSubtreeDispatchFunc_WithClosures
_cb connection :: Ptr DBusConnection
connection sender :: CString
sender objectPath :: CString
objectPath interfaceName :: CString
interfaceName node :: CString
node outUserData :: Ptr ()
outUserData userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
sender' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
sender
Text
objectPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
objectPath
Text
interfaceName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
interfaceName
Text
node' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
node
DBusInterfaceVTable
result <- DBusSubtreeDispatchFunc_WithClosures
_cb DBusConnection
connection' Text
sender' Text
objectPath' Text
interfaceName' Text
node' Ptr ()
outUserData Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc))
funptrptr
Ptr DBusInterfaceVTable
result' <- DBusInterfaceVTable -> IO (Ptr DBusInterfaceVTable)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusInterfaceVTable
result
Ptr DBusInterfaceVTable -> IO (Ptr DBusInterfaceVTable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusInterfaceVTable
result'
type C_DBusSignalCallback =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_DBusSignalCallback :: FunPtr C_DBusSignalCallback -> C_DBusSignalCallback
dynamic_DBusSignalCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_DBusSignalCallback
-> a
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> Ptr ()
-> m ()
dynamic_DBusSignalCallback :: FunPtr C_DBusSignalCallback
-> a -> Text -> Text -> Text -> Text -> GVariant -> Ptr () -> m ()
dynamic_DBusSignalCallback __funPtr :: FunPtr C_DBusSignalCallback
__funPtr connection :: a
connection senderName :: Text
senderName objectPath :: Text
objectPath interfaceName :: Text
interfaceName signalName :: Text
signalName parameters :: GVariant
parameters userData :: Ptr ()
userData = 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 DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
senderName' <- Text -> IO CString
textToCString Text
senderName
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
CString
signalName' <- Text -> IO CString
textToCString Text
signalName
Ptr GVariant
parameters' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
parameters
(FunPtr C_DBusSignalCallback -> C_DBusSignalCallback
__dynamic_C_DBusSignalCallback FunPtr C_DBusSignalCallback
__funPtr) Ptr DBusConnection
connection' CString
senderName' CString
objectPath' CString
interfaceName' CString
signalName' Ptr GVariant
parameters' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
parameters
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
senderName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
signalName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_DBusSignalCallback :: C_DBusSignalCallback -> IO (FunPtr C_DBusSignalCallback)
type DBusSignalCallback =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> IO ()
noDBusSignalCallback :: Maybe DBusSignalCallback
noDBusSignalCallback :: Maybe DBusSignalCallback
noDBusSignalCallback = Maybe DBusSignalCallback
forall a. Maybe a
Nothing
type DBusSignalCallback_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> Ptr ()
-> IO ()
noDBusSignalCallback_WithClosures :: Maybe DBusSignalCallback_WithClosures
noDBusSignalCallback_WithClosures :: Maybe DBusSignalCallback_WithClosures
noDBusSignalCallback_WithClosures = Maybe DBusSignalCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusSignalCallback :: DBusSignalCallback -> DBusSignalCallback_WithClosures
drop_closures_DBusSignalCallback :: DBusSignalCallback -> DBusSignalCallback_WithClosures
drop_closures_DBusSignalCallback _f :: DBusSignalCallback
_f connection :: DBusConnection
connection senderName :: Text
senderName objectPath :: Text
objectPath interfaceName :: Text
interfaceName signalName :: Text
signalName parameters :: GVariant
parameters _ = DBusSignalCallback
_f DBusConnection
connection Text
senderName Text
objectPath Text
interfaceName Text
signalName GVariant
parameters
genClosure_DBusSignalCallback :: MonadIO m => DBusSignalCallback -> m (GClosure C_DBusSignalCallback)
genClosure_DBusSignalCallback :: DBusSignalCallback -> m (GClosure C_DBusSignalCallback)
genClosure_DBusSignalCallback cb :: DBusSignalCallback
cb = IO (GClosure C_DBusSignalCallback)
-> m (GClosure C_DBusSignalCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusSignalCallback)
-> m (GClosure C_DBusSignalCallback))
-> IO (GClosure C_DBusSignalCallback)
-> m (GClosure C_DBusSignalCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusSignalCallback_WithClosures
cb' = DBusSignalCallback -> DBusSignalCallback_WithClosures
drop_closures_DBusSignalCallback DBusSignalCallback
cb
let cb'' :: C_DBusSignalCallback
cb'' = Maybe (Ptr (FunPtr C_DBusSignalCallback))
-> DBusSignalCallback_WithClosures -> C_DBusSignalCallback
wrap_DBusSignalCallback Maybe (Ptr (FunPtr C_DBusSignalCallback))
forall a. Maybe a
Nothing DBusSignalCallback_WithClosures
cb'
C_DBusSignalCallback -> IO (FunPtr C_DBusSignalCallback)
mk_DBusSignalCallback C_DBusSignalCallback
cb'' IO (FunPtr C_DBusSignalCallback)
-> (FunPtr C_DBusSignalCallback
-> IO (GClosure C_DBusSignalCallback))
-> IO (GClosure C_DBusSignalCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusSignalCallback -> IO (GClosure C_DBusSignalCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusSignalCallback ::
Maybe (Ptr (FunPtr C_DBusSignalCallback)) ->
DBusSignalCallback_WithClosures ->
C_DBusSignalCallback
wrap_DBusSignalCallback :: Maybe (Ptr (FunPtr C_DBusSignalCallback))
-> DBusSignalCallback_WithClosures -> C_DBusSignalCallback
wrap_DBusSignalCallback funptrptr :: Maybe (Ptr (FunPtr C_DBusSignalCallback))
funptrptr _cb :: DBusSignalCallback_WithClosures
_cb connection :: Ptr DBusConnection
connection senderName :: CString
senderName objectPath :: CString
objectPath interfaceName :: CString
interfaceName signalName :: CString
signalName parameters :: Ptr GVariant
parameters userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
senderName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
senderName
Text
objectPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
objectPath
Text
interfaceName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
interfaceName
Text
signalName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
signalName
GVariant
parameters' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
parameters
DBusSignalCallback_WithClosures
_cb DBusConnection
connection' Text
senderName' Text
objectPath' Text
interfaceName' Text
signalName' GVariant
parameters' Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusSignalCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusSignalCallback))
funptrptr
type C_DBusProxyTypeFunc =
Ptr Gio.DBusObjectManagerClient.DBusObjectManagerClient ->
CString ->
CString ->
Ptr () ->
IO CGType
foreign import ccall "dynamic" __dynamic_C_DBusProxyTypeFunc :: FunPtr C_DBusProxyTypeFunc -> C_DBusProxyTypeFunc
dynamic_DBusProxyTypeFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusObjectManagerClient.IsDBusObjectManagerClient a) =>
FunPtr C_DBusProxyTypeFunc
-> a
-> T.Text
-> Maybe (T.Text)
-> Ptr ()
-> m GType
dynamic_DBusProxyTypeFunc :: FunPtr C_DBusProxyTypeFunc
-> a -> Text -> Maybe Text -> Ptr () -> m GType
dynamic_DBusProxyTypeFunc __funPtr :: FunPtr C_DBusProxyTypeFunc
__funPtr manager :: a
manager objectPath :: Text
objectPath interfaceName :: Maybe Text
interfaceName userData :: Ptr ()
userData = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManagerClient
manager' <- a -> IO (Ptr DBusObjectManagerClient)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
maybeInterfaceName <- case Maybe Text
interfaceName of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jInterfaceName :: Text
jInterfaceName -> do
CString
jInterfaceName' <- Text -> IO CString
textToCString Text
jInterfaceName
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jInterfaceName'
Word64
result <- (FunPtr C_DBusProxyTypeFunc -> C_DBusProxyTypeFunc
__dynamic_C_DBusProxyTypeFunc FunPtr C_DBusProxyTypeFunc
__funPtr) Ptr DBusObjectManagerClient
manager' CString
objectPath' CString
maybeInterfaceName Ptr ()
userData
let result' :: GType
result' = Word64 -> GType
GType Word64
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeInterfaceName
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
foreign import ccall "wrapper"
mk_DBusProxyTypeFunc :: C_DBusProxyTypeFunc -> IO (FunPtr C_DBusProxyTypeFunc)
type DBusProxyTypeFunc =
Gio.DBusObjectManagerClient.DBusObjectManagerClient
-> T.Text
-> Maybe T.Text
-> IO GType
noDBusProxyTypeFunc :: Maybe DBusProxyTypeFunc
noDBusProxyTypeFunc :: Maybe DBusProxyTypeFunc
noDBusProxyTypeFunc = Maybe DBusProxyTypeFunc
forall a. Maybe a
Nothing
type DBusProxyTypeFunc_WithClosures =
Gio.DBusObjectManagerClient.DBusObjectManagerClient
-> T.Text
-> Maybe T.Text
-> Ptr ()
-> IO GType
noDBusProxyTypeFunc_WithClosures :: Maybe DBusProxyTypeFunc_WithClosures
noDBusProxyTypeFunc_WithClosures :: Maybe DBusProxyTypeFunc_WithClosures
noDBusProxyTypeFunc_WithClosures = Maybe DBusProxyTypeFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusProxyTypeFunc :: DBusProxyTypeFunc -> DBusProxyTypeFunc_WithClosures
drop_closures_DBusProxyTypeFunc :: DBusProxyTypeFunc -> DBusProxyTypeFunc_WithClosures
drop_closures_DBusProxyTypeFunc _f :: DBusProxyTypeFunc
_f manager :: DBusObjectManagerClient
manager objectPath :: Text
objectPath interfaceName :: Maybe Text
interfaceName _ = DBusProxyTypeFunc
_f DBusObjectManagerClient
manager Text
objectPath Maybe Text
interfaceName
genClosure_DBusProxyTypeFunc :: MonadIO m => DBusProxyTypeFunc -> m (GClosure C_DBusProxyTypeFunc)
genClosure_DBusProxyTypeFunc :: DBusProxyTypeFunc -> m (GClosure C_DBusProxyTypeFunc)
genClosure_DBusProxyTypeFunc cb :: DBusProxyTypeFunc
cb = IO (GClosure C_DBusProxyTypeFunc)
-> m (GClosure C_DBusProxyTypeFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusProxyTypeFunc)
-> m (GClosure C_DBusProxyTypeFunc))
-> IO (GClosure C_DBusProxyTypeFunc)
-> m (GClosure C_DBusProxyTypeFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusProxyTypeFunc_WithClosures
cb' = DBusProxyTypeFunc -> DBusProxyTypeFunc_WithClosures
drop_closures_DBusProxyTypeFunc DBusProxyTypeFunc
cb
let cb'' :: C_DBusProxyTypeFunc
cb'' = Maybe (Ptr (FunPtr C_DBusProxyTypeFunc))
-> DBusProxyTypeFunc_WithClosures -> C_DBusProxyTypeFunc
wrap_DBusProxyTypeFunc Maybe (Ptr (FunPtr C_DBusProxyTypeFunc))
forall a. Maybe a
Nothing DBusProxyTypeFunc_WithClosures
cb'
C_DBusProxyTypeFunc -> IO (FunPtr C_DBusProxyTypeFunc)
mk_DBusProxyTypeFunc C_DBusProxyTypeFunc
cb'' IO (FunPtr C_DBusProxyTypeFunc)
-> (FunPtr C_DBusProxyTypeFunc
-> IO (GClosure C_DBusProxyTypeFunc))
-> IO (GClosure C_DBusProxyTypeFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusProxyTypeFunc -> IO (GClosure C_DBusProxyTypeFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusProxyTypeFunc ::
Maybe (Ptr (FunPtr C_DBusProxyTypeFunc)) ->
DBusProxyTypeFunc_WithClosures ->
C_DBusProxyTypeFunc
wrap_DBusProxyTypeFunc :: Maybe (Ptr (FunPtr C_DBusProxyTypeFunc))
-> DBusProxyTypeFunc_WithClosures -> C_DBusProxyTypeFunc
wrap_DBusProxyTypeFunc funptrptr :: Maybe (Ptr (FunPtr C_DBusProxyTypeFunc))
funptrptr _cb :: DBusProxyTypeFunc_WithClosures
_cb manager :: Ptr DBusObjectManagerClient
manager objectPath :: CString
objectPath interfaceName :: CString
interfaceName userData :: Ptr ()
userData = do
DBusObjectManagerClient
manager' <- ((ManagedPtr DBusObjectManagerClient -> DBusObjectManagerClient)
-> Ptr DBusObjectManagerClient -> IO DBusObjectManagerClient
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusObjectManagerClient -> DBusObjectManagerClient
Gio.DBusObjectManagerClient.DBusObjectManagerClient) Ptr DBusObjectManagerClient
manager
Text
objectPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
objectPath
Maybe Text
maybeInterfaceName <-
if CString
interfaceName CString -> CString -> Bool
forall a. Eq a => a -> a -> Bool
== CString
forall a. Ptr a
nullPtr
then Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
forall a. Maybe a
Nothing
else do
Text
interfaceName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
interfaceName
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Text -> IO (Maybe Text)) -> Maybe Text -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ Text -> Maybe Text
forall a. a -> Maybe a
Just Text
interfaceName'
GType
result <- DBusProxyTypeFunc_WithClosures
_cb DBusObjectManagerClient
manager' Text
objectPath' Maybe Text
maybeInterfaceName Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusProxyTypeFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusProxyTypeFunc))
funptrptr
let result' :: Word64
result' = GType -> Word64
gtypeToCGType GType
result
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result'
type C_DBusMessageFilterFunction =
Ptr Gio.DBusConnection.DBusConnection ->
Ptr Gio.DBusMessage.DBusMessage ->
CInt ->
Ptr () ->
IO (Ptr Gio.DBusMessage.DBusMessage)
foreign import ccall "dynamic" __dynamic_C_DBusMessageFilterFunction :: FunPtr C_DBusMessageFilterFunction -> C_DBusMessageFilterFunction
dynamic_DBusMessageFilterFunction ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a, Gio.DBusMessage.IsDBusMessage b) =>
FunPtr C_DBusMessageFilterFunction
-> a
-> b
-> Bool
-> Ptr ()
-> m (Maybe Gio.DBusMessage.DBusMessage)
dynamic_DBusMessageFilterFunction :: FunPtr C_DBusMessageFilterFunction
-> a -> b -> Bool -> Ptr () -> m (Maybe DBusMessage)
dynamic_DBusMessageFilterFunction __funPtr :: FunPtr C_DBusMessageFilterFunction
__funPtr connection :: a
connection message :: b
message incoming :: Bool
incoming userData :: Ptr ()
userData = IO (Maybe DBusMessage) -> m (Maybe DBusMessage)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusMessage) -> m (Maybe DBusMessage))
-> IO (Maybe DBusMessage) -> m (Maybe DBusMessage)
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
Ptr DBusMessage
message' <- b -> IO (Ptr DBusMessage)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
message
let incoming' :: CInt
incoming' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
incoming
Ptr DBusMessage
result <- (FunPtr C_DBusMessageFilterFunction -> C_DBusMessageFilterFunction
__dynamic_C_DBusMessageFilterFunction FunPtr C_DBusMessageFilterFunction
__funPtr) Ptr DBusConnection
connection' Ptr DBusMessage
message' CInt
incoming' Ptr ()
userData
Maybe DBusMessage
maybeResult <- Ptr DBusMessage
-> (Ptr DBusMessage -> IO DBusMessage) -> IO (Maybe DBusMessage)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr DBusMessage
result ((Ptr DBusMessage -> IO DBusMessage) -> IO (Maybe DBusMessage))
-> (Ptr DBusMessage -> IO DBusMessage) -> IO (Maybe DBusMessage)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr DBusMessage
result' -> do
DBusMessage
result'' <- ((ManagedPtr DBusMessage -> DBusMessage)
-> Ptr DBusMessage -> IO DBusMessage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusMessage -> DBusMessage
Gio.DBusMessage.DBusMessage) Ptr DBusMessage
result'
DBusMessage -> IO DBusMessage
forall (m :: * -> *) a. Monad m => a -> m a
return DBusMessage
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
message
Maybe DBusMessage -> IO (Maybe DBusMessage)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DBusMessage
maybeResult
foreign import ccall "wrapper"
mk_DBusMessageFilterFunction :: C_DBusMessageFilterFunction -> IO (FunPtr C_DBusMessageFilterFunction)
type DBusMessageFilterFunction =
Gio.DBusConnection.DBusConnection
-> Gio.DBusMessage.DBusMessage
-> Bool
-> IO (Maybe Gio.DBusMessage.DBusMessage)
noDBusMessageFilterFunction :: Maybe DBusMessageFilterFunction
noDBusMessageFilterFunction :: Maybe DBusMessageFilterFunction
noDBusMessageFilterFunction = Maybe DBusMessageFilterFunction
forall a. Maybe a
Nothing
type DBusMessageFilterFunction_WithClosures =
Gio.DBusConnection.DBusConnection
-> Gio.DBusMessage.DBusMessage
-> Bool
-> Ptr ()
-> IO (Maybe Gio.DBusMessage.DBusMessage)
noDBusMessageFilterFunction_WithClosures :: Maybe DBusMessageFilterFunction_WithClosures
noDBusMessageFilterFunction_WithClosures :: Maybe DBusMessageFilterFunction_WithClosures
noDBusMessageFilterFunction_WithClosures = Maybe DBusMessageFilterFunction_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusMessageFilterFunction :: DBusMessageFilterFunction -> DBusMessageFilterFunction_WithClosures
drop_closures_DBusMessageFilterFunction :: DBusMessageFilterFunction -> DBusMessageFilterFunction_WithClosures
drop_closures_DBusMessageFilterFunction _f :: DBusMessageFilterFunction
_f connection :: DBusConnection
connection message :: DBusMessage
message incoming :: Bool
incoming _ = DBusMessageFilterFunction
_f DBusConnection
connection DBusMessage
message Bool
incoming
genClosure_DBusMessageFilterFunction :: MonadIO m => DBusMessageFilterFunction -> m (GClosure C_DBusMessageFilterFunction)
genClosure_DBusMessageFilterFunction :: DBusMessageFilterFunction
-> m (GClosure C_DBusMessageFilterFunction)
genClosure_DBusMessageFilterFunction cb :: DBusMessageFilterFunction
cb = IO (GClosure C_DBusMessageFilterFunction)
-> m (GClosure C_DBusMessageFilterFunction)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusMessageFilterFunction)
-> m (GClosure C_DBusMessageFilterFunction))
-> IO (GClosure C_DBusMessageFilterFunction)
-> m (GClosure C_DBusMessageFilterFunction)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusMessageFilterFunction_WithClosures
cb' = DBusMessageFilterFunction -> DBusMessageFilterFunction_WithClosures
drop_closures_DBusMessageFilterFunction DBusMessageFilterFunction
cb
let cb'' :: C_DBusMessageFilterFunction
cb'' = Maybe (Ptr (FunPtr C_DBusMessageFilterFunction))
-> DBusMessageFilterFunction_WithClosures
-> C_DBusMessageFilterFunction
wrap_DBusMessageFilterFunction Maybe (Ptr (FunPtr C_DBusMessageFilterFunction))
forall a. Maybe a
Nothing DBusMessageFilterFunction_WithClosures
cb'
C_DBusMessageFilterFunction
-> IO (FunPtr C_DBusMessageFilterFunction)
mk_DBusMessageFilterFunction C_DBusMessageFilterFunction
cb'' IO (FunPtr C_DBusMessageFilterFunction)
-> (FunPtr C_DBusMessageFilterFunction
-> IO (GClosure C_DBusMessageFilterFunction))
-> IO (GClosure C_DBusMessageFilterFunction)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusMessageFilterFunction
-> IO (GClosure C_DBusMessageFilterFunction)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusMessageFilterFunction ::
Maybe (Ptr (FunPtr C_DBusMessageFilterFunction)) ->
DBusMessageFilterFunction_WithClosures ->
C_DBusMessageFilterFunction
wrap_DBusMessageFilterFunction :: Maybe (Ptr (FunPtr C_DBusMessageFilterFunction))
-> DBusMessageFilterFunction_WithClosures
-> C_DBusMessageFilterFunction
wrap_DBusMessageFilterFunction funptrptr :: Maybe (Ptr (FunPtr C_DBusMessageFilterFunction))
funptrptr _cb :: DBusMessageFilterFunction_WithClosures
_cb connection :: Ptr DBusConnection
connection message :: Ptr DBusMessage
message incoming :: CInt
incoming userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
DBusMessage
message' <- ((ManagedPtr DBusMessage -> DBusMessage)
-> Ptr DBusMessage -> IO DBusMessage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusMessage -> DBusMessage
Gio.DBusMessage.DBusMessage) Ptr DBusMessage
message
let incoming' :: Bool
incoming' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
incoming
Maybe DBusMessage
result <- DBusMessageFilterFunction_WithClosures
_cb DBusConnection
connection' DBusMessage
message' Bool
incoming' Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusMessageFilterFunction)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusMessageFilterFunction))
funptrptr
Ptr DBusMessage
-> Maybe DBusMessage
-> (DBusMessage -> IO (Ptr DBusMessage))
-> IO (Ptr DBusMessage)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr DBusMessage
forall a. Ptr a
nullPtr Maybe DBusMessage
result ((DBusMessage -> IO (Ptr DBusMessage)) -> IO (Ptr DBusMessage))
-> (DBusMessage -> IO (Ptr DBusMessage)) -> IO (Ptr DBusMessage)
forall a b. (a -> b) -> a -> b
$ \result' :: DBusMessage
result' -> do
Ptr DBusMessage
result'' <- DBusMessage -> IO (Ptr DBusMessage)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject DBusMessage
result'
Ptr DBusMessage -> IO (Ptr DBusMessage)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusMessage
result''
type C_DBusInterfaceSetPropertyFunc =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr GError ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_DBusInterfaceSetPropertyFunc :: FunPtr C_DBusInterfaceSetPropertyFunc -> C_DBusInterfaceSetPropertyFunc
dynamic_DBusInterfaceSetPropertyFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_DBusInterfaceSetPropertyFunc
-> a
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> GError
-> Ptr ()
-> m Bool
dynamic_DBusInterfaceSetPropertyFunc :: FunPtr C_DBusInterfaceSetPropertyFunc
-> a
-> Text
-> Text
-> Text
-> Text
-> GVariant
-> GError
-> Ptr ()
-> m Bool
dynamic_DBusInterfaceSetPropertyFunc __funPtr :: FunPtr C_DBusInterfaceSetPropertyFunc
__funPtr connection :: a
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName propertyName :: Text
propertyName value :: GVariant
value error_ :: GError
error_ userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
sender' <- Text -> IO CString
textToCString Text
sender
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
Ptr GVariant
value' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
value
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
CInt
result <- (FunPtr C_DBusInterfaceSetPropertyFunc
-> C_DBusInterfaceSetPropertyFunc
__dynamic_C_DBusInterfaceSetPropertyFunc FunPtr C_DBusInterfaceSetPropertyFunc
__funPtr) Ptr DBusConnection
connection' CString
sender' CString
objectPath' CString
interfaceName' CString
propertyName' Ptr GVariant
value' Ptr GError
error_' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
value
GError -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GError
error_
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sender'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_DBusInterfaceSetPropertyFunc :: C_DBusInterfaceSetPropertyFunc -> IO (FunPtr C_DBusInterfaceSetPropertyFunc)
type DBusInterfaceSetPropertyFunc =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> GError
-> IO Bool
noDBusInterfaceSetPropertyFunc :: Maybe DBusInterfaceSetPropertyFunc
noDBusInterfaceSetPropertyFunc :: Maybe DBusInterfaceSetPropertyFunc
noDBusInterfaceSetPropertyFunc = Maybe DBusInterfaceSetPropertyFunc
forall a. Maybe a
Nothing
type DBusInterfaceSetPropertyFunc_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> GError
-> Ptr ()
-> IO Bool
noDBusInterfaceSetPropertyFunc_WithClosures :: Maybe DBusInterfaceSetPropertyFunc_WithClosures
noDBusInterfaceSetPropertyFunc_WithClosures :: Maybe DBusInterfaceSetPropertyFunc_WithClosures
noDBusInterfaceSetPropertyFunc_WithClosures = Maybe DBusInterfaceSetPropertyFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusInterfaceSetPropertyFunc :: DBusInterfaceSetPropertyFunc -> DBusInterfaceSetPropertyFunc_WithClosures
drop_closures_DBusInterfaceSetPropertyFunc :: DBusInterfaceSetPropertyFunc
-> DBusInterfaceSetPropertyFunc_WithClosures
drop_closures_DBusInterfaceSetPropertyFunc _f :: DBusInterfaceSetPropertyFunc
_f connection :: DBusConnection
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName propertyName :: Text
propertyName value :: GVariant
value error_ :: GError
error_ _ = DBusInterfaceSetPropertyFunc
_f DBusConnection
connection Text
sender Text
objectPath Text
interfaceName Text
propertyName GVariant
value GError
error_
genClosure_DBusInterfaceSetPropertyFunc :: MonadIO m => DBusInterfaceSetPropertyFunc -> m (GClosure C_DBusInterfaceSetPropertyFunc)
genClosure_DBusInterfaceSetPropertyFunc :: DBusInterfaceSetPropertyFunc
-> m (GClosure C_DBusInterfaceSetPropertyFunc)
genClosure_DBusInterfaceSetPropertyFunc cb :: DBusInterfaceSetPropertyFunc
cb = IO (GClosure C_DBusInterfaceSetPropertyFunc)
-> m (GClosure C_DBusInterfaceSetPropertyFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusInterfaceSetPropertyFunc)
-> m (GClosure C_DBusInterfaceSetPropertyFunc))
-> IO (GClosure C_DBusInterfaceSetPropertyFunc)
-> m (GClosure C_DBusInterfaceSetPropertyFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusInterfaceSetPropertyFunc_WithClosures
cb' = DBusInterfaceSetPropertyFunc
-> DBusInterfaceSetPropertyFunc_WithClosures
drop_closures_DBusInterfaceSetPropertyFunc DBusInterfaceSetPropertyFunc
cb
let cb'' :: C_DBusInterfaceSetPropertyFunc
cb'' = Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc))
-> DBusInterfaceSetPropertyFunc_WithClosures
-> C_DBusInterfaceSetPropertyFunc
wrap_DBusInterfaceSetPropertyFunc Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc))
forall a. Maybe a
Nothing DBusInterfaceSetPropertyFunc_WithClosures
cb'
C_DBusInterfaceSetPropertyFunc
-> IO (FunPtr C_DBusInterfaceSetPropertyFunc)
mk_DBusInterfaceSetPropertyFunc C_DBusInterfaceSetPropertyFunc
cb'' IO (FunPtr C_DBusInterfaceSetPropertyFunc)
-> (FunPtr C_DBusInterfaceSetPropertyFunc
-> IO (GClosure C_DBusInterfaceSetPropertyFunc))
-> IO (GClosure C_DBusInterfaceSetPropertyFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusInterfaceSetPropertyFunc
-> IO (GClosure C_DBusInterfaceSetPropertyFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusInterfaceSetPropertyFunc ::
Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc)) ->
DBusInterfaceSetPropertyFunc_WithClosures ->
C_DBusInterfaceSetPropertyFunc
wrap_DBusInterfaceSetPropertyFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc))
-> DBusInterfaceSetPropertyFunc_WithClosures
-> C_DBusInterfaceSetPropertyFunc
wrap_DBusInterfaceSetPropertyFunc funptrptr :: Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc))
funptrptr _cb :: DBusInterfaceSetPropertyFunc_WithClosures
_cb connection :: Ptr DBusConnection
connection sender :: CString
sender objectPath :: CString
objectPath interfaceName :: CString
interfaceName propertyName :: CString
propertyName value :: Ptr GVariant
value error_ :: Ptr GError
error_ userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
sender' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
sender
Text
objectPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
objectPath
Text
interfaceName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
interfaceName
Text
propertyName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
propertyName
GVariant
value' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
value
GError
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
Bool
result <- DBusInterfaceSetPropertyFunc_WithClosures
_cb DBusConnection
connection' Text
sender' Text
objectPath' Text
interfaceName' Text
propertyName' GVariant
value' GError
error_' Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_DBusInterfaceMethodCallFunc =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr Gio.DBusMethodInvocation.DBusMethodInvocation ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_DBusInterfaceMethodCallFunc :: FunPtr C_DBusInterfaceMethodCallFunc -> C_DBusInterfaceMethodCallFunc
dynamic_DBusInterfaceMethodCallFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a, Gio.DBusMethodInvocation.IsDBusMethodInvocation b) =>
FunPtr C_DBusInterfaceMethodCallFunc
-> a
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> b
-> Ptr ()
-> m ()
dynamic_DBusInterfaceMethodCallFunc :: FunPtr C_DBusInterfaceMethodCallFunc
-> a
-> Text
-> Text
-> Text
-> Text
-> GVariant
-> b
-> Ptr ()
-> m ()
dynamic_DBusInterfaceMethodCallFunc __funPtr :: FunPtr C_DBusInterfaceMethodCallFunc
__funPtr connection :: a
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName methodName :: Text
methodName parameters :: GVariant
parameters invocation :: b
invocation userData :: Ptr ()
userData = 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 DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
sender' <- Text -> IO CString
textToCString Text
sender
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
CString
methodName' <- Text -> IO CString
textToCString Text
methodName
Ptr GVariant
parameters' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
parameters
Ptr DBusMethodInvocation
invocation' <- b -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
invocation
(FunPtr C_DBusInterfaceMethodCallFunc
-> C_DBusInterfaceMethodCallFunc
__dynamic_C_DBusInterfaceMethodCallFunc FunPtr C_DBusInterfaceMethodCallFunc
__funPtr) Ptr DBusConnection
connection' CString
sender' CString
objectPath' CString
interfaceName' CString
methodName' Ptr GVariant
parameters' Ptr DBusMethodInvocation
invocation' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
parameters
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
invocation
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sender'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
methodName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_DBusInterfaceMethodCallFunc :: C_DBusInterfaceMethodCallFunc -> IO (FunPtr C_DBusInterfaceMethodCallFunc)
type DBusInterfaceMethodCallFunc =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> Gio.DBusMethodInvocation.DBusMethodInvocation
-> IO ()
noDBusInterfaceMethodCallFunc :: Maybe DBusInterfaceMethodCallFunc
noDBusInterfaceMethodCallFunc :: Maybe DBusInterfaceMethodCallFunc
noDBusInterfaceMethodCallFunc = Maybe DBusInterfaceMethodCallFunc
forall a. Maybe a
Nothing
type DBusInterfaceMethodCallFunc_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GVariant
-> Gio.DBusMethodInvocation.DBusMethodInvocation
-> Ptr ()
-> IO ()
noDBusInterfaceMethodCallFunc_WithClosures :: Maybe DBusInterfaceMethodCallFunc_WithClosures
noDBusInterfaceMethodCallFunc_WithClosures :: Maybe DBusInterfaceMethodCallFunc_WithClosures
noDBusInterfaceMethodCallFunc_WithClosures = Maybe DBusInterfaceMethodCallFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusInterfaceMethodCallFunc :: DBusInterfaceMethodCallFunc -> DBusInterfaceMethodCallFunc_WithClosures
drop_closures_DBusInterfaceMethodCallFunc :: DBusInterfaceMethodCallFunc
-> DBusInterfaceMethodCallFunc_WithClosures
drop_closures_DBusInterfaceMethodCallFunc _f :: DBusInterfaceMethodCallFunc
_f connection :: DBusConnection
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName methodName :: Text
methodName parameters :: GVariant
parameters invocation :: DBusMethodInvocation
invocation _ = DBusInterfaceMethodCallFunc
_f DBusConnection
connection Text
sender Text
objectPath Text
interfaceName Text
methodName GVariant
parameters DBusMethodInvocation
invocation
genClosure_DBusInterfaceMethodCallFunc :: MonadIO m => DBusInterfaceMethodCallFunc -> m (GClosure C_DBusInterfaceMethodCallFunc)
genClosure_DBusInterfaceMethodCallFunc :: DBusInterfaceMethodCallFunc
-> m (GClosure C_DBusInterfaceMethodCallFunc)
genClosure_DBusInterfaceMethodCallFunc cb :: DBusInterfaceMethodCallFunc
cb = IO (GClosure C_DBusInterfaceMethodCallFunc)
-> m (GClosure C_DBusInterfaceMethodCallFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusInterfaceMethodCallFunc)
-> m (GClosure C_DBusInterfaceMethodCallFunc))
-> IO (GClosure C_DBusInterfaceMethodCallFunc)
-> m (GClosure C_DBusInterfaceMethodCallFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusInterfaceMethodCallFunc_WithClosures
cb' = DBusInterfaceMethodCallFunc
-> DBusInterfaceMethodCallFunc_WithClosures
drop_closures_DBusInterfaceMethodCallFunc DBusInterfaceMethodCallFunc
cb
let cb'' :: C_DBusInterfaceMethodCallFunc
cb'' = Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc))
-> DBusInterfaceMethodCallFunc_WithClosures
-> C_DBusInterfaceMethodCallFunc
wrap_DBusInterfaceMethodCallFunc Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc))
forall a. Maybe a
Nothing DBusInterfaceMethodCallFunc_WithClosures
cb'
C_DBusInterfaceMethodCallFunc
-> IO (FunPtr C_DBusInterfaceMethodCallFunc)
mk_DBusInterfaceMethodCallFunc C_DBusInterfaceMethodCallFunc
cb'' IO (FunPtr C_DBusInterfaceMethodCallFunc)
-> (FunPtr C_DBusInterfaceMethodCallFunc
-> IO (GClosure C_DBusInterfaceMethodCallFunc))
-> IO (GClosure C_DBusInterfaceMethodCallFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusInterfaceMethodCallFunc
-> IO (GClosure C_DBusInterfaceMethodCallFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusInterfaceMethodCallFunc ::
Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc)) ->
DBusInterfaceMethodCallFunc_WithClosures ->
C_DBusInterfaceMethodCallFunc
wrap_DBusInterfaceMethodCallFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc))
-> DBusInterfaceMethodCallFunc_WithClosures
-> C_DBusInterfaceMethodCallFunc
wrap_DBusInterfaceMethodCallFunc funptrptr :: Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc))
funptrptr _cb :: DBusInterfaceMethodCallFunc_WithClosures
_cb connection :: Ptr DBusConnection
connection sender :: CString
sender objectPath :: CString
objectPath interfaceName :: CString
interfaceName methodName :: CString
methodName parameters :: Ptr GVariant
parameters invocation :: Ptr DBusMethodInvocation
invocation userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
sender' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
sender
Text
objectPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
objectPath
Text
interfaceName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
interfaceName
Text
methodName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
methodName
GVariant
parameters' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
parameters
DBusMethodInvocation
invocation' <- ((ManagedPtr DBusMethodInvocation -> DBusMethodInvocation)
-> Ptr DBusMethodInvocation -> IO DBusMethodInvocation
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusMethodInvocation -> DBusMethodInvocation
Gio.DBusMethodInvocation.DBusMethodInvocation) Ptr DBusMethodInvocation
invocation
DBusInterfaceMethodCallFunc_WithClosures
_cb DBusConnection
connection' Text
sender' Text
objectPath' Text
interfaceName' Text
methodName' GVariant
parameters' DBusMethodInvocation
invocation' Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc))
funptrptr
type C_DBusInterfaceGetPropertyFunc =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GError ->
Ptr () ->
IO (Ptr GVariant)
foreign import ccall "dynamic" __dynamic_C_DBusInterfaceGetPropertyFunc :: FunPtr C_DBusInterfaceGetPropertyFunc -> C_DBusInterfaceGetPropertyFunc
dynamic_DBusInterfaceGetPropertyFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_DBusInterfaceGetPropertyFunc
-> a
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GError
-> Ptr ()
-> m GVariant
dynamic_DBusInterfaceGetPropertyFunc :: FunPtr C_DBusInterfaceGetPropertyFunc
-> a
-> Text
-> Text
-> Text
-> Text
-> GError
-> Ptr ()
-> m GVariant
dynamic_DBusInterfaceGetPropertyFunc __funPtr :: FunPtr C_DBusInterfaceGetPropertyFunc
__funPtr connection :: a
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName propertyName :: Text
propertyName error_ :: GError
error_ userData :: Ptr ()
userData = IO GVariant -> m GVariant
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
sender' <- Text -> IO CString
textToCString Text
sender
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
CString
propertyName' <- Text -> IO CString
textToCString Text
propertyName
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
Ptr GVariant
result <- (FunPtr C_DBusInterfaceGetPropertyFunc
-> C_DBusInterfaceGetPropertyFunc
__dynamic_C_DBusInterfaceGetPropertyFunc FunPtr C_DBusInterfaceGetPropertyFunc
__funPtr) Ptr DBusConnection
connection' CString
sender' CString
objectPath' CString
interfaceName' CString
propertyName' Ptr GError
error_' Ptr ()
userData
Text -> Ptr GVariant -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusInterfaceGetPropertyFunc" Ptr GVariant
result
GVariant
result' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
GError -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GError
error_
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
sender'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
GVariant -> IO GVariant
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result'
foreign import ccall "wrapper"
mk_DBusInterfaceGetPropertyFunc :: C_DBusInterfaceGetPropertyFunc -> IO (FunPtr C_DBusInterfaceGetPropertyFunc)
type DBusInterfaceGetPropertyFunc =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GError
-> IO GVariant
noDBusInterfaceGetPropertyFunc :: Maybe DBusInterfaceGetPropertyFunc
noDBusInterfaceGetPropertyFunc :: Maybe DBusInterfaceGetPropertyFunc
noDBusInterfaceGetPropertyFunc = Maybe DBusInterfaceGetPropertyFunc
forall a. Maybe a
Nothing
type DBusInterfaceGetPropertyFunc_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> GError
-> Ptr ()
-> IO GVariant
noDBusInterfaceGetPropertyFunc_WithClosures :: Maybe DBusInterfaceGetPropertyFunc_WithClosures
noDBusInterfaceGetPropertyFunc_WithClosures :: Maybe DBusInterfaceGetPropertyFunc_WithClosures
noDBusInterfaceGetPropertyFunc_WithClosures = Maybe DBusInterfaceGetPropertyFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_DBusInterfaceGetPropertyFunc :: DBusInterfaceGetPropertyFunc -> DBusInterfaceGetPropertyFunc_WithClosures
drop_closures_DBusInterfaceGetPropertyFunc :: DBusInterfaceGetPropertyFunc
-> DBusInterfaceGetPropertyFunc_WithClosures
drop_closures_DBusInterfaceGetPropertyFunc _f :: DBusInterfaceGetPropertyFunc
_f connection :: DBusConnection
connection sender :: Text
sender objectPath :: Text
objectPath interfaceName :: Text
interfaceName propertyName :: Text
propertyName error_ :: GError
error_ _ = DBusInterfaceGetPropertyFunc
_f DBusConnection
connection Text
sender Text
objectPath Text
interfaceName Text
propertyName GError
error_
genClosure_DBusInterfaceGetPropertyFunc :: MonadIO m => DBusInterfaceGetPropertyFunc -> m (GClosure C_DBusInterfaceGetPropertyFunc)
genClosure_DBusInterfaceGetPropertyFunc :: DBusInterfaceGetPropertyFunc
-> m (GClosure C_DBusInterfaceGetPropertyFunc)
genClosure_DBusInterfaceGetPropertyFunc cb :: DBusInterfaceGetPropertyFunc
cb = IO (GClosure C_DBusInterfaceGetPropertyFunc)
-> m (GClosure C_DBusInterfaceGetPropertyFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusInterfaceGetPropertyFunc)
-> m (GClosure C_DBusInterfaceGetPropertyFunc))
-> IO (GClosure C_DBusInterfaceGetPropertyFunc)
-> m (GClosure C_DBusInterfaceGetPropertyFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: DBusInterfaceGetPropertyFunc_WithClosures
cb' = DBusInterfaceGetPropertyFunc
-> DBusInterfaceGetPropertyFunc_WithClosures
drop_closures_DBusInterfaceGetPropertyFunc DBusInterfaceGetPropertyFunc
cb
let cb'' :: C_DBusInterfaceGetPropertyFunc
cb'' = Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc))
-> DBusInterfaceGetPropertyFunc_WithClosures
-> C_DBusInterfaceGetPropertyFunc
wrap_DBusInterfaceGetPropertyFunc Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc))
forall a. Maybe a
Nothing DBusInterfaceGetPropertyFunc_WithClosures
cb'
C_DBusInterfaceGetPropertyFunc
-> IO (FunPtr C_DBusInterfaceGetPropertyFunc)
mk_DBusInterfaceGetPropertyFunc C_DBusInterfaceGetPropertyFunc
cb'' IO (FunPtr C_DBusInterfaceGetPropertyFunc)
-> (FunPtr C_DBusInterfaceGetPropertyFunc
-> IO (GClosure C_DBusInterfaceGetPropertyFunc))
-> IO (GClosure C_DBusInterfaceGetPropertyFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusInterfaceGetPropertyFunc
-> IO (GClosure C_DBusInterfaceGetPropertyFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusInterfaceGetPropertyFunc ::
Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc)) ->
DBusInterfaceGetPropertyFunc_WithClosures ->
C_DBusInterfaceGetPropertyFunc
wrap_DBusInterfaceGetPropertyFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc))
-> DBusInterfaceGetPropertyFunc_WithClosures
-> C_DBusInterfaceGetPropertyFunc
wrap_DBusInterfaceGetPropertyFunc funptrptr :: Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc))
funptrptr _cb :: DBusInterfaceGetPropertyFunc_WithClosures
_cb connection :: Ptr DBusConnection
connection sender :: CString
sender objectPath :: CString
objectPath interfaceName :: CString
interfaceName propertyName :: CString
propertyName error_ :: Ptr GError
error_ userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
sender' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
sender
Text
objectPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
objectPath
Text
interfaceName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
interfaceName
Text
propertyName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
propertyName
GError
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
GVariant
result <- DBusInterfaceGetPropertyFunc_WithClosures
_cb DBusConnection
connection' Text
sender' Text
objectPath' Text
interfaceName' Text
propertyName' GError
error_' Ptr ()
userData
Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc))
funptrptr
Ptr GVariant
result' <- GVariant -> IO (Ptr GVariant)
B.GVariant.disownGVariant GVariant
result
Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
result'
type C_CancellableSourceFunc =
Ptr Gio.Cancellable.Cancellable ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_CancellableSourceFunc :: FunPtr C_CancellableSourceFunc -> C_CancellableSourceFunc
dynamic_CancellableSourceFunc ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
FunPtr C_CancellableSourceFunc
-> Maybe (a)
-> Ptr ()
-> m Bool
dynamic_CancellableSourceFunc :: FunPtr C_CancellableSourceFunc -> Maybe a -> Ptr () -> m Bool
dynamic_CancellableSourceFunc __funPtr :: FunPtr C_CancellableSourceFunc
__funPtr cancellable :: Maybe a
cancellable userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Cancellable
maybeCancellable <- case Maybe a
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: a
jCancellable -> do
Ptr Cancellable
jCancellable' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
CInt
result <- (FunPtr C_CancellableSourceFunc -> C_CancellableSourceFunc
__dynamic_C_CancellableSourceFunc FunPtr C_CancellableSourceFunc
__funPtr) Ptr Cancellable
maybeCancellable Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
cancellable a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_CancellableSourceFunc :: C_CancellableSourceFunc -> IO (FunPtr C_CancellableSourceFunc)
type CancellableSourceFunc =
Maybe Gio.Cancellable.Cancellable
-> IO Bool
noCancellableSourceFunc :: Maybe CancellableSourceFunc
noCancellableSourceFunc :: Maybe CancellableSourceFunc
noCancellableSourceFunc = Maybe CancellableSourceFunc
forall a. Maybe a
Nothing
type CancellableSourceFunc_WithClosures =
Maybe Gio.Cancellable.Cancellable
-> Ptr ()
-> IO Bool
noCancellableSourceFunc_WithClosures :: Maybe CancellableSourceFunc_WithClosures
noCancellableSourceFunc_WithClosures :: Maybe CancellableSourceFunc_WithClosures
noCancellableSourceFunc_WithClosures = Maybe CancellableSourceFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_CancellableSourceFunc :: CancellableSourceFunc -> CancellableSourceFunc_WithClosures
drop_closures_CancellableSourceFunc :: CancellableSourceFunc -> CancellableSourceFunc_WithClosures
drop_closures_CancellableSourceFunc _f :: CancellableSourceFunc
_f cancellable :: Maybe Cancellable
cancellable _ = CancellableSourceFunc
_f Maybe Cancellable
cancellable
genClosure_CancellableSourceFunc :: MonadIO m => CancellableSourceFunc -> m (GClosure C_CancellableSourceFunc)
genClosure_CancellableSourceFunc :: CancellableSourceFunc -> m (GClosure C_CancellableSourceFunc)
genClosure_CancellableSourceFunc cb :: CancellableSourceFunc
cb = IO (GClosure C_CancellableSourceFunc)
-> m (GClosure C_CancellableSourceFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CancellableSourceFunc)
-> m (GClosure C_CancellableSourceFunc))
-> IO (GClosure C_CancellableSourceFunc)
-> m (GClosure C_CancellableSourceFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: CancellableSourceFunc_WithClosures
cb' = CancellableSourceFunc -> CancellableSourceFunc_WithClosures
drop_closures_CancellableSourceFunc CancellableSourceFunc
cb
let cb'' :: C_CancellableSourceFunc
cb'' = Maybe (Ptr (FunPtr C_CancellableSourceFunc))
-> CancellableSourceFunc_WithClosures -> C_CancellableSourceFunc
wrap_CancellableSourceFunc Maybe (Ptr (FunPtr C_CancellableSourceFunc))
forall a. Maybe a
Nothing CancellableSourceFunc_WithClosures
cb'
C_CancellableSourceFunc -> IO (FunPtr C_CancellableSourceFunc)
mk_CancellableSourceFunc C_CancellableSourceFunc
cb'' IO (FunPtr C_CancellableSourceFunc)
-> (FunPtr C_CancellableSourceFunc
-> IO (GClosure C_CancellableSourceFunc))
-> IO (GClosure C_CancellableSourceFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CancellableSourceFunc
-> IO (GClosure C_CancellableSourceFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_CancellableSourceFunc ::
Maybe (Ptr (FunPtr C_CancellableSourceFunc)) ->
CancellableSourceFunc_WithClosures ->
C_CancellableSourceFunc
wrap_CancellableSourceFunc :: Maybe (Ptr (FunPtr C_CancellableSourceFunc))
-> CancellableSourceFunc_WithClosures -> C_CancellableSourceFunc
wrap_CancellableSourceFunc funptrptr :: Maybe (Ptr (FunPtr C_CancellableSourceFunc))
funptrptr _cb :: CancellableSourceFunc_WithClosures
_cb cancellable :: Ptr Cancellable
cancellable userData :: Ptr ()
userData = do
Maybe Cancellable
maybeCancellable <-
if Ptr Cancellable
cancellable Ptr Cancellable -> Ptr Cancellable -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Cancellable
forall a. Ptr a
nullPtr
then Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cancellable
forall a. Maybe a
Nothing
else do
Cancellable
cancellable' <- ((ManagedPtr Cancellable -> Cancellable)
-> Ptr Cancellable -> IO Cancellable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cancellable -> Cancellable
Gio.Cancellable.Cancellable) Ptr Cancellable
cancellable
Maybe Cancellable -> IO (Maybe Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Cancellable -> IO (Maybe Cancellable))
-> Maybe Cancellable -> IO (Maybe Cancellable)
forall a b. (a -> b) -> a -> b
$ Cancellable -> Maybe Cancellable
forall a. a -> Maybe a
Just Cancellable
cancellable'
Bool
result <- CancellableSourceFunc_WithClosures
_cb Maybe Cancellable
maybeCancellable Ptr ()
userData
Maybe (Ptr (FunPtr C_CancellableSourceFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CancellableSourceFunc))
funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_BusNameVanishedCallback =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_BusNameVanishedCallback :: FunPtr C_BusNameVanishedCallback -> C_BusNameVanishedCallback
dynamic_BusNameVanishedCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_BusNameVanishedCallback
-> a
-> T.Text
-> Ptr ()
-> m ()
dynamic_BusNameVanishedCallback :: FunPtr C_BusNameVanishedCallback -> a -> Text -> Ptr () -> m ()
dynamic_BusNameVanishedCallback __funPtr :: FunPtr C_BusNameVanishedCallback
__funPtr connection :: a
connection name :: Text
name userData :: Ptr ()
userData = 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 DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
name' <- Text -> IO CString
textToCString Text
name
(FunPtr C_BusNameVanishedCallback -> C_BusNameVanishedCallback
__dynamic_C_BusNameVanishedCallback FunPtr C_BusNameVanishedCallback
__funPtr) Ptr DBusConnection
connection' CString
name' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_BusNameVanishedCallback :: C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback)
type BusNameVanishedCallback =
Gio.DBusConnection.DBusConnection
-> T.Text
-> IO ()
noBusNameVanishedCallback :: Maybe BusNameVanishedCallback
noBusNameVanishedCallback :: Maybe BusNameVanishedCallback
noBusNameVanishedCallback = Maybe BusNameVanishedCallback
forall a. Maybe a
Nothing
type BusNameVanishedCallback_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> Ptr ()
-> IO ()
noBusNameVanishedCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures
noBusNameVanishedCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures
noBusNameVanishedCallback_WithClosures = Maybe BusNameVanishedCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_BusNameVanishedCallback :: BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusNameVanishedCallback :: BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusNameVanishedCallback _f :: BusNameVanishedCallback
_f connection :: DBusConnection
connection name :: Text
name _ = BusNameVanishedCallback
_f DBusConnection
connection Text
name
genClosure_BusNameVanishedCallback :: MonadIO m => BusNameVanishedCallback -> m (GClosure C_BusNameVanishedCallback)
genClosure_BusNameVanishedCallback :: BusNameVanishedCallback -> m (GClosure C_BusNameVanishedCallback)
genClosure_BusNameVanishedCallback cb :: BusNameVanishedCallback
cb = IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: BusNameVanishedCallback_WithClosures
cb' = BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusNameVanishedCallback BusNameVanishedCallback
cb
let cb'' :: C_BusNameVanishedCallback
cb'' = Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusNameVanishedCallback Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
forall a. Maybe a
Nothing BusNameVanishedCallback_WithClosures
cb'
C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback)
mk_BusNameVanishedCallback C_BusNameVanishedCallback
cb'' IO (FunPtr C_BusNameVanishedCallback)
-> (FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_BusNameVanishedCallback ::
Maybe (Ptr (FunPtr C_BusNameVanishedCallback)) ->
BusNameVanishedCallback_WithClosures ->
C_BusNameVanishedCallback
wrap_BusNameVanishedCallback :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusNameVanishedCallback funptrptr :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr _cb :: BusNameVanishedCallback_WithClosures
_cb connection :: Ptr DBusConnection
connection name :: CString
name userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
BusNameVanishedCallback_WithClosures
_cb DBusConnection
connection' Text
name' Ptr ()
userData
Maybe (Ptr (FunPtr C_BusNameVanishedCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr
type C_BusNameLostCallback =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_BusNameLostCallback :: FunPtr C_BusNameLostCallback -> C_BusNameLostCallback
dynamic_BusNameLostCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_BusNameLostCallback
-> a
-> T.Text
-> Ptr ()
-> m ()
dynamic_BusNameLostCallback :: FunPtr C_BusNameVanishedCallback -> a -> Text -> Ptr () -> m ()
dynamic_BusNameLostCallback __funPtr :: FunPtr C_BusNameVanishedCallback
__funPtr connection :: a
connection name :: Text
name userData :: Ptr ()
userData = 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 DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
name' <- Text -> IO CString
textToCString Text
name
(FunPtr C_BusNameVanishedCallback -> C_BusNameVanishedCallback
__dynamic_C_BusNameLostCallback FunPtr C_BusNameVanishedCallback
__funPtr) Ptr DBusConnection
connection' CString
name' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_BusNameLostCallback :: C_BusNameLostCallback -> IO (FunPtr C_BusNameLostCallback)
type BusNameLostCallback =
Gio.DBusConnection.DBusConnection
-> T.Text
-> IO ()
noBusNameLostCallback :: Maybe BusNameLostCallback
noBusNameLostCallback :: Maybe BusNameVanishedCallback
noBusNameLostCallback = Maybe BusNameVanishedCallback
forall a. Maybe a
Nothing
type BusNameLostCallback_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> Ptr ()
-> IO ()
noBusNameLostCallback_WithClosures :: Maybe BusNameLostCallback_WithClosures
noBusNameLostCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures
noBusNameLostCallback_WithClosures = Maybe BusNameVanishedCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_BusNameLostCallback :: BusNameLostCallback -> BusNameLostCallback_WithClosures
drop_closures_BusNameLostCallback :: BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusNameLostCallback _f :: BusNameVanishedCallback
_f connection :: DBusConnection
connection name :: Text
name _ = BusNameVanishedCallback
_f DBusConnection
connection Text
name
genClosure_BusNameLostCallback :: MonadIO m => BusNameLostCallback -> m (GClosure C_BusNameLostCallback)
genClosure_BusNameLostCallback :: BusNameVanishedCallback -> m (GClosure C_BusNameVanishedCallback)
genClosure_BusNameLostCallback cb :: BusNameVanishedCallback
cb = IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: BusNameVanishedCallback_WithClosures
cb' = BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusNameLostCallback BusNameVanishedCallback
cb
let cb'' :: C_BusNameVanishedCallback
cb'' = Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusNameLostCallback Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
forall a. Maybe a
Nothing BusNameVanishedCallback_WithClosures
cb'
C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback)
mk_BusNameLostCallback C_BusNameVanishedCallback
cb'' IO (FunPtr C_BusNameVanishedCallback)
-> (FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_BusNameLostCallback ::
Maybe (Ptr (FunPtr C_BusNameLostCallback)) ->
BusNameLostCallback_WithClosures ->
C_BusNameLostCallback
wrap_BusNameLostCallback :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusNameLostCallback funptrptr :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr _cb :: BusNameVanishedCallback_WithClosures
_cb connection :: Ptr DBusConnection
connection name :: CString
name userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
BusNameVanishedCallback_WithClosures
_cb DBusConnection
connection' Text
name' Ptr ()
userData
Maybe (Ptr (FunPtr C_BusNameVanishedCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr
type C_BusNameAppearedCallback =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
CString ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_BusNameAppearedCallback :: FunPtr C_BusNameAppearedCallback -> C_BusNameAppearedCallback
dynamic_BusNameAppearedCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_BusNameAppearedCallback
-> a
-> T.Text
-> T.Text
-> Ptr ()
-> m ()
dynamic_BusNameAppearedCallback :: FunPtr C_BusNameAppearedCallback
-> a -> Text -> Text -> Ptr () -> m ()
dynamic_BusNameAppearedCallback __funPtr :: FunPtr C_BusNameAppearedCallback
__funPtr connection :: a
connection name :: Text
name nameOwner :: Text
nameOwner userData :: Ptr ()
userData = 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 DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
name' <- Text -> IO CString
textToCString Text
name
CString
nameOwner' <- Text -> IO CString
textToCString Text
nameOwner
(FunPtr C_BusNameAppearedCallback -> C_BusNameAppearedCallback
__dynamic_C_BusNameAppearedCallback FunPtr C_BusNameAppearedCallback
__funPtr) Ptr DBusConnection
connection' CString
name' CString
nameOwner' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
nameOwner'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_BusNameAppearedCallback :: C_BusNameAppearedCallback -> IO (FunPtr C_BusNameAppearedCallback)
type BusNameAppearedCallback =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> IO ()
noBusNameAppearedCallback :: Maybe BusNameAppearedCallback
noBusNameAppearedCallback :: Maybe BusNameAppearedCallback
noBusNameAppearedCallback = Maybe BusNameAppearedCallback
forall a. Maybe a
Nothing
type BusNameAppearedCallback_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> T.Text
-> Ptr ()
-> IO ()
noBusNameAppearedCallback_WithClosures :: Maybe BusNameAppearedCallback_WithClosures
noBusNameAppearedCallback_WithClosures :: Maybe BusNameAppearedCallback_WithClosures
noBusNameAppearedCallback_WithClosures = Maybe BusNameAppearedCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_BusNameAppearedCallback :: BusNameAppearedCallback -> BusNameAppearedCallback_WithClosures
drop_closures_BusNameAppearedCallback :: BusNameAppearedCallback -> BusNameAppearedCallback_WithClosures
drop_closures_BusNameAppearedCallback _f :: BusNameAppearedCallback
_f connection :: DBusConnection
connection name :: Text
name nameOwner :: Text
nameOwner _ = BusNameAppearedCallback
_f DBusConnection
connection Text
name Text
nameOwner
genClosure_BusNameAppearedCallback :: MonadIO m => BusNameAppearedCallback -> m (GClosure C_BusNameAppearedCallback)
genClosure_BusNameAppearedCallback :: BusNameAppearedCallback -> m (GClosure C_BusNameAppearedCallback)
genClosure_BusNameAppearedCallback cb :: BusNameAppearedCallback
cb = IO (GClosure C_BusNameAppearedCallback)
-> m (GClosure C_BusNameAppearedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BusNameAppearedCallback)
-> m (GClosure C_BusNameAppearedCallback))
-> IO (GClosure C_BusNameAppearedCallback)
-> m (GClosure C_BusNameAppearedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: BusNameAppearedCallback_WithClosures
cb' = BusNameAppearedCallback -> BusNameAppearedCallback_WithClosures
drop_closures_BusNameAppearedCallback BusNameAppearedCallback
cb
let cb'' :: C_BusNameAppearedCallback
cb'' = Maybe (Ptr (FunPtr C_BusNameAppearedCallback))
-> BusNameAppearedCallback_WithClosures
-> C_BusNameAppearedCallback
wrap_BusNameAppearedCallback Maybe (Ptr (FunPtr C_BusNameAppearedCallback))
forall a. Maybe a
Nothing BusNameAppearedCallback_WithClosures
cb'
C_BusNameAppearedCallback -> IO (FunPtr C_BusNameAppearedCallback)
mk_BusNameAppearedCallback C_BusNameAppearedCallback
cb'' IO (FunPtr C_BusNameAppearedCallback)
-> (FunPtr C_BusNameAppearedCallback
-> IO (GClosure C_BusNameAppearedCallback))
-> IO (GClosure C_BusNameAppearedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BusNameAppearedCallback
-> IO (GClosure C_BusNameAppearedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_BusNameAppearedCallback ::
Maybe (Ptr (FunPtr C_BusNameAppearedCallback)) ->
BusNameAppearedCallback_WithClosures ->
C_BusNameAppearedCallback
wrap_BusNameAppearedCallback :: Maybe (Ptr (FunPtr C_BusNameAppearedCallback))
-> BusNameAppearedCallback_WithClosures
-> C_BusNameAppearedCallback
wrap_BusNameAppearedCallback funptrptr :: Maybe (Ptr (FunPtr C_BusNameAppearedCallback))
funptrptr _cb :: BusNameAppearedCallback_WithClosures
_cb connection :: Ptr DBusConnection
connection name :: CString
name nameOwner :: CString
nameOwner userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
Text
nameOwner' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
nameOwner
BusNameAppearedCallback_WithClosures
_cb DBusConnection
connection' Text
name' Text
nameOwner' Ptr ()
userData
Maybe (Ptr (FunPtr C_BusNameAppearedCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BusNameAppearedCallback))
funptrptr
type C_BusNameAcquiredCallback =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_BusNameAcquiredCallback :: FunPtr C_BusNameAcquiredCallback -> C_BusNameAcquiredCallback
dynamic_BusNameAcquiredCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_BusNameAcquiredCallback
-> a
-> T.Text
-> Ptr ()
-> m ()
dynamic_BusNameAcquiredCallback :: FunPtr C_BusNameVanishedCallback -> a -> Text -> Ptr () -> m ()
dynamic_BusNameAcquiredCallback __funPtr :: FunPtr C_BusNameVanishedCallback
__funPtr connection :: a
connection name :: Text
name userData :: Ptr ()
userData = 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 DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
name' <- Text -> IO CString
textToCString Text
name
(FunPtr C_BusNameVanishedCallback -> C_BusNameVanishedCallback
__dynamic_C_BusNameAcquiredCallback FunPtr C_BusNameVanishedCallback
__funPtr) Ptr DBusConnection
connection' CString
name' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_BusNameAcquiredCallback :: C_BusNameAcquiredCallback -> IO (FunPtr C_BusNameAcquiredCallback)
type BusNameAcquiredCallback =
Gio.DBusConnection.DBusConnection
-> T.Text
-> IO ()
noBusNameAcquiredCallback :: Maybe BusNameAcquiredCallback
noBusNameAcquiredCallback :: Maybe BusNameVanishedCallback
noBusNameAcquiredCallback = Maybe BusNameVanishedCallback
forall a. Maybe a
Nothing
type BusNameAcquiredCallback_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> Ptr ()
-> IO ()
noBusNameAcquiredCallback_WithClosures :: Maybe BusNameAcquiredCallback_WithClosures
noBusNameAcquiredCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures
noBusNameAcquiredCallback_WithClosures = Maybe BusNameVanishedCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_BusNameAcquiredCallback :: BusNameAcquiredCallback -> BusNameAcquiredCallback_WithClosures
drop_closures_BusNameAcquiredCallback :: BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusNameAcquiredCallback _f :: BusNameVanishedCallback
_f connection :: DBusConnection
connection name :: Text
name _ = BusNameVanishedCallback
_f DBusConnection
connection Text
name
genClosure_BusNameAcquiredCallback :: MonadIO m => BusNameAcquiredCallback -> m (GClosure C_BusNameAcquiredCallback)
genClosure_BusNameAcquiredCallback :: BusNameVanishedCallback -> m (GClosure C_BusNameVanishedCallback)
genClosure_BusNameAcquiredCallback cb :: BusNameVanishedCallback
cb = IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: BusNameVanishedCallback_WithClosures
cb' = BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusNameAcquiredCallback BusNameVanishedCallback
cb
let cb'' :: C_BusNameVanishedCallback
cb'' = Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusNameAcquiredCallback Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
forall a. Maybe a
Nothing BusNameVanishedCallback_WithClosures
cb'
C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback)
mk_BusNameAcquiredCallback C_BusNameVanishedCallback
cb'' IO (FunPtr C_BusNameVanishedCallback)
-> (FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_BusNameAcquiredCallback ::
Maybe (Ptr (FunPtr C_BusNameAcquiredCallback)) ->
BusNameAcquiredCallback_WithClosures ->
C_BusNameAcquiredCallback
wrap_BusNameAcquiredCallback :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusNameAcquiredCallback funptrptr :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr _cb :: BusNameVanishedCallback_WithClosures
_cb connection :: Ptr DBusConnection
connection name :: CString
name userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
BusNameVanishedCallback_WithClosures
_cb DBusConnection
connection' Text
name' Ptr ()
userData
Maybe (Ptr (FunPtr C_BusNameVanishedCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr
type C_BusAcquiredCallback =
Ptr Gio.DBusConnection.DBusConnection ->
CString ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_BusAcquiredCallback :: FunPtr C_BusAcquiredCallback -> C_BusAcquiredCallback
dynamic_BusAcquiredCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a) =>
FunPtr C_BusAcquiredCallback
-> a
-> T.Text
-> Ptr ()
-> m ()
dynamic_BusAcquiredCallback :: FunPtr C_BusNameVanishedCallback -> a -> Text -> Ptr () -> m ()
dynamic_BusAcquiredCallback __funPtr :: FunPtr C_BusNameVanishedCallback
__funPtr connection :: a
connection name :: Text
name userData :: Ptr ()
userData = 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 DBusConnection
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
CString
name' <- Text -> IO CString
textToCString Text
name
(FunPtr C_BusNameVanishedCallback -> C_BusNameVanishedCallback
__dynamic_C_BusAcquiredCallback FunPtr C_BusNameVanishedCallback
__funPtr) Ptr DBusConnection
connection' CString
name' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
connection
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_BusAcquiredCallback :: C_BusAcquiredCallback -> IO (FunPtr C_BusAcquiredCallback)
type BusAcquiredCallback =
Gio.DBusConnection.DBusConnection
-> T.Text
-> IO ()
noBusAcquiredCallback :: Maybe BusAcquiredCallback
noBusAcquiredCallback :: Maybe BusNameVanishedCallback
noBusAcquiredCallback = Maybe BusNameVanishedCallback
forall a. Maybe a
Nothing
type BusAcquiredCallback_WithClosures =
Gio.DBusConnection.DBusConnection
-> T.Text
-> Ptr ()
-> IO ()
noBusAcquiredCallback_WithClosures :: Maybe BusAcquiredCallback_WithClosures
noBusAcquiredCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures
noBusAcquiredCallback_WithClosures = Maybe BusNameVanishedCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_BusAcquiredCallback :: BusAcquiredCallback -> BusAcquiredCallback_WithClosures
drop_closures_BusAcquiredCallback :: BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusAcquiredCallback _f :: BusNameVanishedCallback
_f connection :: DBusConnection
connection name :: Text
name _ = BusNameVanishedCallback
_f DBusConnection
connection Text
name
genClosure_BusAcquiredCallback :: MonadIO m => BusAcquiredCallback -> m (GClosure C_BusAcquiredCallback)
genClosure_BusAcquiredCallback :: BusNameVanishedCallback -> m (GClosure C_BusNameVanishedCallback)
genClosure_BusAcquiredCallback cb :: BusNameVanishedCallback
cb = IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
-> m (GClosure C_BusNameVanishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: BusNameVanishedCallback_WithClosures
cb' = BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
drop_closures_BusAcquiredCallback BusNameVanishedCallback
cb
let cb'' :: C_BusNameVanishedCallback
cb'' = Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusAcquiredCallback Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
forall a. Maybe a
Nothing BusNameVanishedCallback_WithClosures
cb'
C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback)
mk_BusAcquiredCallback C_BusNameVanishedCallback
cb'' IO (FunPtr C_BusNameVanishedCallback)
-> (FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback))
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BusNameVanishedCallback
-> IO (GClosure C_BusNameVanishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_BusAcquiredCallback ::
Maybe (Ptr (FunPtr C_BusAcquiredCallback)) ->
BusAcquiredCallback_WithClosures ->
C_BusAcquiredCallback
wrap_BusAcquiredCallback :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
-> BusNameVanishedCallback_WithClosures
-> C_BusNameVanishedCallback
wrap_BusAcquiredCallback funptrptr :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr _cb :: BusNameVanishedCallback_WithClosures
_cb connection :: Ptr DBusConnection
connection name :: CString
name userData :: Ptr ()
userData = do
DBusConnection
connection' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
connection
Text
name' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
name
BusNameVanishedCallback_WithClosures
_cb DBusConnection
connection' Text
name' Ptr ()
userData
Maybe (Ptr (FunPtr C_BusNameVanishedCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BusNameVanishedCallback))
funptrptr
type C_AsyncReadyCallback =
Ptr GObject.Object.Object ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_AsyncReadyCallback :: FunPtr C_AsyncReadyCallback -> C_AsyncReadyCallback
dynamic_AsyncReadyCallback ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a, Gio.AsyncResult.IsAsyncResult b) =>
FunPtr C_AsyncReadyCallback
-> Maybe (a)
-> b
-> Ptr ()
-> m ()
dynamic_AsyncReadyCallback :: FunPtr C_AsyncReadyCallback -> Maybe a -> b -> Ptr () -> m ()
dynamic_AsyncReadyCallback __funPtr :: FunPtr C_AsyncReadyCallback
__funPtr sourceObject :: Maybe a
sourceObject res :: b
res userData :: Ptr ()
userData = 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 Object
maybeSourceObject <- case Maybe a
sourceObject of
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just jSourceObject :: a
jSourceObject -> do
Ptr Object
jSourceObject' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jSourceObject
Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jSourceObject'
Ptr AsyncResult
res' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
res
(FunPtr C_AsyncReadyCallback -> C_AsyncReadyCallback
__dynamic_C_AsyncReadyCallback FunPtr C_AsyncReadyCallback
__funPtr) Ptr Object
maybeSourceObject Ptr AsyncResult
res' Ptr ()
userData
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
sourceObject a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
res
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_AsyncReadyCallback :: C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
type AsyncReadyCallback =
Maybe GObject.Object.Object
-> Gio.AsyncResult.AsyncResult
-> IO ()
noAsyncReadyCallback :: Maybe AsyncReadyCallback
noAsyncReadyCallback :: Maybe AsyncReadyCallback
noAsyncReadyCallback = Maybe AsyncReadyCallback
forall a. Maybe a
Nothing
type AsyncReadyCallback_WithClosures =
Maybe GObject.Object.Object
-> Gio.AsyncResult.AsyncResult
-> Ptr ()
-> IO ()
noAsyncReadyCallback_WithClosures :: Maybe AsyncReadyCallback_WithClosures
noAsyncReadyCallback_WithClosures :: Maybe AsyncReadyCallback_WithClosures
noAsyncReadyCallback_WithClosures = Maybe AsyncReadyCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_AsyncReadyCallback :: AsyncReadyCallback -> AsyncReadyCallback_WithClosures
drop_closures_AsyncReadyCallback :: AsyncReadyCallback -> AsyncReadyCallback_WithClosures
drop_closures_AsyncReadyCallback _f :: AsyncReadyCallback
_f sourceObject :: Maybe Object
sourceObject res :: AsyncResult
res _ = AsyncReadyCallback
_f Maybe Object
sourceObject AsyncResult
res
genClosure_AsyncReadyCallback :: MonadIO m => AsyncReadyCallback -> m (GClosure C_AsyncReadyCallback)
genClosure_AsyncReadyCallback :: AsyncReadyCallback -> m (GClosure C_AsyncReadyCallback)
genClosure_AsyncReadyCallback cb :: AsyncReadyCallback
cb = IO (GClosure C_AsyncReadyCallback)
-> m (GClosure C_AsyncReadyCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AsyncReadyCallback)
-> m (GClosure C_AsyncReadyCallback))
-> IO (GClosure C_AsyncReadyCallback)
-> m (GClosure C_AsyncReadyCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: AsyncReadyCallback_WithClosures
cb' = AsyncReadyCallback -> AsyncReadyCallback_WithClosures
drop_closures_AsyncReadyCallback AsyncReadyCallback
cb
let cb'' :: C_AsyncReadyCallback
cb'' = Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
wrap_AsyncReadyCallback Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Maybe a
Nothing AsyncReadyCallback_WithClosures
cb'
C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
mk_AsyncReadyCallback C_AsyncReadyCallback
cb'' IO (FunPtr C_AsyncReadyCallback)
-> (FunPtr C_AsyncReadyCallback
-> IO (GClosure C_AsyncReadyCallback))
-> IO (GClosure C_AsyncReadyCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AsyncReadyCallback -> IO (GClosure C_AsyncReadyCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_AsyncReadyCallback ::
Maybe (Ptr (FunPtr C_AsyncReadyCallback)) ->
AsyncReadyCallback_WithClosures ->
C_AsyncReadyCallback
wrap_AsyncReadyCallback :: Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
wrap_AsyncReadyCallback funptrptr :: Maybe (Ptr (FunPtr C_AsyncReadyCallback))
funptrptr _cb :: AsyncReadyCallback_WithClosures
_cb sourceObject :: Ptr Object
sourceObject res :: Ptr AsyncResult
res userData :: Ptr ()
userData = do
Maybe Object
maybeSourceObject <-
if Ptr Object
sourceObject Ptr Object -> Ptr Object -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Object
forall a. Ptr a
nullPtr
then Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
forall a. Maybe a
Nothing
else do
Object
sourceObject' <- ((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
GObject.Object.Object) Ptr Object
sourceObject
Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Object -> IO (Maybe Object))
-> Maybe Object -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ Object -> Maybe Object
forall a. a -> Maybe a
Just Object
sourceObject'
AsyncResult
res' <- ((ManagedPtr AsyncResult -> AsyncResult)
-> Ptr AsyncResult -> IO AsyncResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AsyncResult -> AsyncResult
Gio.AsyncResult.AsyncResult) Ptr AsyncResult
res
AsyncReadyCallback_WithClosures
_cb Maybe Object
maybeSourceObject AsyncResult
res' Ptr ()
userData
Maybe (Ptr (FunPtr C_AsyncReadyCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_AsyncReadyCallback))
funptrptr
type C_ActionEntryChangeStateFieldCallback =
Ptr Gio.SimpleAction.SimpleAction ->
Ptr GVariant ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ActionEntryChangeStateFieldCallback :: FunPtr C_ActionEntryChangeStateFieldCallback -> C_ActionEntryChangeStateFieldCallback
dynamic_ActionEntryChangeStateFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.SimpleAction.IsSimpleAction a) =>
FunPtr C_ActionEntryChangeStateFieldCallback
-> a
-> GVariant
-> Ptr ()
-> m ()
dynamic_ActionEntryChangeStateFieldCallback :: FunPtr C_ActionEntryChangeStateFieldCallback
-> a -> GVariant -> Ptr () -> m ()
dynamic_ActionEntryChangeStateFieldCallback __funPtr :: FunPtr C_ActionEntryChangeStateFieldCallback
__funPtr action :: a
action value :: GVariant
value userData :: Ptr ()
userData = 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 SimpleAction
action' <- a -> IO (Ptr SimpleAction)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
action
Ptr GVariant
value' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
value
(FunPtr C_ActionEntryChangeStateFieldCallback
-> C_ActionEntryChangeStateFieldCallback
__dynamic_C_ActionEntryChangeStateFieldCallback FunPtr C_ActionEntryChangeStateFieldCallback
__funPtr) Ptr SimpleAction
action' Ptr GVariant
value' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
action
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
value
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ActionEntryChangeStateFieldCallback :: C_ActionEntryChangeStateFieldCallback -> IO (FunPtr C_ActionEntryChangeStateFieldCallback)
type ActionEntryChangeStateFieldCallback =
Gio.SimpleAction.SimpleAction
-> GVariant
-> IO ()
noActionEntryChangeStateFieldCallback :: Maybe ActionEntryChangeStateFieldCallback
noActionEntryChangeStateFieldCallback :: Maybe ActionEntryChangeStateFieldCallback
noActionEntryChangeStateFieldCallback = Maybe ActionEntryChangeStateFieldCallback
forall a. Maybe a
Nothing
type ActionEntryChangeStateFieldCallback_WithClosures =
Gio.SimpleAction.SimpleAction
-> GVariant
-> Ptr ()
-> IO ()
noActionEntryChangeStateFieldCallback_WithClosures :: Maybe ActionEntryChangeStateFieldCallback_WithClosures
noActionEntryChangeStateFieldCallback_WithClosures :: Maybe ActionEntryChangeStateFieldCallback_WithClosures
noActionEntryChangeStateFieldCallback_WithClosures = Maybe ActionEntryChangeStateFieldCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_ActionEntryChangeStateFieldCallback :: ActionEntryChangeStateFieldCallback -> ActionEntryChangeStateFieldCallback_WithClosures
drop_closures_ActionEntryChangeStateFieldCallback :: ActionEntryChangeStateFieldCallback
-> ActionEntryChangeStateFieldCallback_WithClosures
drop_closures_ActionEntryChangeStateFieldCallback _f :: ActionEntryChangeStateFieldCallback
_f action :: SimpleAction
action value :: GVariant
value _ = ActionEntryChangeStateFieldCallback
_f SimpleAction
action GVariant
value
genClosure_ActionEntryChangeStateFieldCallback :: MonadIO m => ActionEntryChangeStateFieldCallback -> m (GClosure C_ActionEntryChangeStateFieldCallback)
genClosure_ActionEntryChangeStateFieldCallback :: ActionEntryChangeStateFieldCallback
-> m (GClosure C_ActionEntryChangeStateFieldCallback)
genClosure_ActionEntryChangeStateFieldCallback cb :: ActionEntryChangeStateFieldCallback
cb = IO (GClosure C_ActionEntryChangeStateFieldCallback)
-> m (GClosure C_ActionEntryChangeStateFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ActionEntryChangeStateFieldCallback)
-> m (GClosure C_ActionEntryChangeStateFieldCallback))
-> IO (GClosure C_ActionEntryChangeStateFieldCallback)
-> m (GClosure C_ActionEntryChangeStateFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: ActionEntryChangeStateFieldCallback_WithClosures
cb' = ActionEntryChangeStateFieldCallback
-> ActionEntryChangeStateFieldCallback_WithClosures
drop_closures_ActionEntryChangeStateFieldCallback ActionEntryChangeStateFieldCallback
cb
let cb'' :: C_ActionEntryChangeStateFieldCallback
cb'' = Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
-> ActionEntryChangeStateFieldCallback_WithClosures
-> C_ActionEntryChangeStateFieldCallback
wrap_ActionEntryChangeStateFieldCallback Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
forall a. Maybe a
Nothing ActionEntryChangeStateFieldCallback_WithClosures
cb'
C_ActionEntryChangeStateFieldCallback
-> IO (FunPtr C_ActionEntryChangeStateFieldCallback)
mk_ActionEntryChangeStateFieldCallback C_ActionEntryChangeStateFieldCallback
cb'' IO (FunPtr C_ActionEntryChangeStateFieldCallback)
-> (FunPtr C_ActionEntryChangeStateFieldCallback
-> IO (GClosure C_ActionEntryChangeStateFieldCallback))
-> IO (GClosure C_ActionEntryChangeStateFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ActionEntryChangeStateFieldCallback
-> IO (GClosure C_ActionEntryChangeStateFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ActionEntryChangeStateFieldCallback ::
Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback)) ->
ActionEntryChangeStateFieldCallback_WithClosures ->
C_ActionEntryChangeStateFieldCallback
wrap_ActionEntryChangeStateFieldCallback :: Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
-> ActionEntryChangeStateFieldCallback_WithClosures
-> C_ActionEntryChangeStateFieldCallback
wrap_ActionEntryChangeStateFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
funptrptr _cb :: ActionEntryChangeStateFieldCallback_WithClosures
_cb action :: Ptr SimpleAction
action value :: Ptr GVariant
value userData :: Ptr ()
userData = do
SimpleAction
action' <- ((ManagedPtr SimpleAction -> SimpleAction)
-> Ptr SimpleAction -> IO SimpleAction
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SimpleAction -> SimpleAction
Gio.SimpleAction.SimpleAction) Ptr SimpleAction
action
GVariant
value' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
value
ActionEntryChangeStateFieldCallback_WithClosures
_cb SimpleAction
action' GVariant
value' Ptr ()
userData
Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
funptrptr
type C_ActionEntryActivateFieldCallback =
Ptr Gio.SimpleAction.SimpleAction ->
Ptr GVariant ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ActionEntryActivateFieldCallback :: FunPtr C_ActionEntryActivateFieldCallback -> C_ActionEntryActivateFieldCallback
dynamic_ActionEntryActivateFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m, Gio.SimpleAction.IsSimpleAction a) =>
FunPtr C_ActionEntryActivateFieldCallback
-> a
-> Maybe (GVariant)
-> Ptr ()
-> m ()
dynamic_ActionEntryActivateFieldCallback :: FunPtr C_ActionEntryChangeStateFieldCallback
-> a -> Maybe GVariant -> Ptr () -> m ()
dynamic_ActionEntryActivateFieldCallback __funPtr :: FunPtr C_ActionEntryChangeStateFieldCallback
__funPtr action :: a
action parameter :: Maybe GVariant
parameter userData :: Ptr ()
userData = 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 SimpleAction
action' <- a -> IO (Ptr SimpleAction)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
action
Ptr GVariant
maybeParameter <- case Maybe GVariant
parameter of
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
nullPtr
Just jParameter :: GVariant
jParameter -> do
Ptr GVariant
jParameter' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameter
Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jParameter'
(FunPtr C_ActionEntryChangeStateFieldCallback
-> C_ActionEntryChangeStateFieldCallback
__dynamic_C_ActionEntryActivateFieldCallback FunPtr C_ActionEntryChangeStateFieldCallback
__funPtr) Ptr SimpleAction
action' Ptr GVariant
maybeParameter Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
action
Maybe GVariant -> (GVariant -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
parameter GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ActionEntryActivateFieldCallback :: C_ActionEntryActivateFieldCallback -> IO (FunPtr C_ActionEntryActivateFieldCallback)
type ActionEntryActivateFieldCallback =
Gio.SimpleAction.SimpleAction
-> Maybe GVariant
-> IO ()
noActionEntryActivateFieldCallback :: Maybe ActionEntryActivateFieldCallback
noActionEntryActivateFieldCallback :: Maybe ActionEntryActivateFieldCallback
noActionEntryActivateFieldCallback = Maybe ActionEntryActivateFieldCallback
forall a. Maybe a
Nothing
type ActionEntryActivateFieldCallback_WithClosures =
Gio.SimpleAction.SimpleAction
-> Maybe GVariant
-> Ptr ()
-> IO ()
noActionEntryActivateFieldCallback_WithClosures :: Maybe ActionEntryActivateFieldCallback_WithClosures
noActionEntryActivateFieldCallback_WithClosures :: Maybe ActionEntryActivateFieldCallback_WithClosures
noActionEntryActivateFieldCallback_WithClosures = Maybe ActionEntryActivateFieldCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_ActionEntryActivateFieldCallback :: ActionEntryActivateFieldCallback -> ActionEntryActivateFieldCallback_WithClosures
drop_closures_ActionEntryActivateFieldCallback :: ActionEntryActivateFieldCallback
-> ActionEntryActivateFieldCallback_WithClosures
drop_closures_ActionEntryActivateFieldCallback _f :: ActionEntryActivateFieldCallback
_f action :: SimpleAction
action parameter :: Maybe GVariant
parameter _ = ActionEntryActivateFieldCallback
_f SimpleAction
action Maybe GVariant
parameter
genClosure_ActionEntryActivateFieldCallback :: MonadIO m => ActionEntryActivateFieldCallback -> m (GClosure C_ActionEntryActivateFieldCallback)
genClosure_ActionEntryActivateFieldCallback :: ActionEntryActivateFieldCallback
-> m (GClosure C_ActionEntryChangeStateFieldCallback)
genClosure_ActionEntryActivateFieldCallback cb :: ActionEntryActivateFieldCallback
cb = IO (GClosure C_ActionEntryChangeStateFieldCallback)
-> m (GClosure C_ActionEntryChangeStateFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ActionEntryChangeStateFieldCallback)
-> m (GClosure C_ActionEntryChangeStateFieldCallback))
-> IO (GClosure C_ActionEntryChangeStateFieldCallback)
-> m (GClosure C_ActionEntryChangeStateFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: ActionEntryActivateFieldCallback_WithClosures
cb' = ActionEntryActivateFieldCallback
-> ActionEntryActivateFieldCallback_WithClosures
drop_closures_ActionEntryActivateFieldCallback ActionEntryActivateFieldCallback
cb
let cb'' :: C_ActionEntryChangeStateFieldCallback
cb'' = Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
-> ActionEntryActivateFieldCallback_WithClosures
-> C_ActionEntryChangeStateFieldCallback
wrap_ActionEntryActivateFieldCallback Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
forall a. Maybe a
Nothing ActionEntryActivateFieldCallback_WithClosures
cb'
C_ActionEntryChangeStateFieldCallback
-> IO (FunPtr C_ActionEntryChangeStateFieldCallback)
mk_ActionEntryActivateFieldCallback C_ActionEntryChangeStateFieldCallback
cb'' IO (FunPtr C_ActionEntryChangeStateFieldCallback)
-> (FunPtr C_ActionEntryChangeStateFieldCallback
-> IO (GClosure C_ActionEntryChangeStateFieldCallback))
-> IO (GClosure C_ActionEntryChangeStateFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ActionEntryChangeStateFieldCallback
-> IO (GClosure C_ActionEntryChangeStateFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ActionEntryActivateFieldCallback ::
Maybe (Ptr (FunPtr C_ActionEntryActivateFieldCallback)) ->
ActionEntryActivateFieldCallback_WithClosures ->
C_ActionEntryActivateFieldCallback
wrap_ActionEntryActivateFieldCallback :: Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
-> ActionEntryActivateFieldCallback_WithClosures
-> C_ActionEntryChangeStateFieldCallback
wrap_ActionEntryActivateFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
funptrptr _cb :: ActionEntryActivateFieldCallback_WithClosures
_cb action :: Ptr SimpleAction
action parameter :: Ptr GVariant
parameter userData :: Ptr ()
userData = do
SimpleAction
action' <- ((ManagedPtr SimpleAction -> SimpleAction)
-> Ptr SimpleAction -> IO SimpleAction
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SimpleAction -> SimpleAction
Gio.SimpleAction.SimpleAction) Ptr SimpleAction
action
Maybe GVariant
maybeParameter <-
if Ptr GVariant
parameter Ptr GVariant -> Ptr GVariant -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr GVariant
forall a. Ptr a
nullPtr
then Maybe GVariant -> IO (Maybe GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GVariant
forall a. Maybe a
Nothing
else do
GVariant
parameter' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
parameter
Maybe GVariant -> IO (Maybe GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe GVariant -> IO (Maybe GVariant))
-> Maybe GVariant -> IO (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ GVariant -> Maybe GVariant
forall a. a -> Maybe a
Just GVariant
parameter'
ActionEntryActivateFieldCallback_WithClosures
_cb SimpleAction
action' Maybe GVariant
maybeParameter Ptr ()
userData
Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback))
funptrptr