gi-gio-0.2.44.12: GI/Gio/Functions.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Gio.Functions
(
-- * Methods
-- ** actionNameIsValid
actionNameIsValid ,
-- ** actionParseDetailedName
actionParseDetailedName ,
-- ** actionPrintDetailedName
actionPrintDetailedName ,
-- ** appInfoCreateFromCommandline
appInfoCreateFromCommandline ,
-- ** appInfoGetAll
appInfoGetAll ,
-- ** appInfoGetAllForType
appInfoGetAllForType ,
-- ** appInfoGetDefaultForType
appInfoGetDefaultForType ,
-- ** appInfoGetDefaultForUriScheme
appInfoGetDefaultForUriScheme ,
-- ** appInfoGetFallbackForType
appInfoGetFallbackForType ,
-- ** appInfoGetRecommendedForType
appInfoGetRecommendedForType ,
-- ** appInfoLaunchDefaultForUri
appInfoLaunchDefaultForUri ,
-- ** appInfoResetTypeAssociations
appInfoResetTypeAssociations ,
-- ** asyncInitableNewvAsync
asyncInitableNewvAsync ,
-- ** busGet
busGet ,
-- ** busGetFinish
busGetFinish ,
-- ** busGetSync
busGetSync ,
-- ** busOwnName
busOwnName ,
-- ** busOwnNameOnConnection
busOwnNameOnConnection ,
-- ** busUnownName
busUnownName ,
-- ** busUnwatchName
busUnwatchName ,
-- ** busWatchName
busWatchName ,
-- ** busWatchNameOnConnection
busWatchNameOnConnection ,
-- ** contentTypeCanBeExecutable
contentTypeCanBeExecutable ,
-- ** contentTypeEquals
contentTypeEquals ,
-- ** contentTypeFromMimeType
contentTypeFromMimeType ,
-- ** contentTypeGetDescription
contentTypeGetDescription ,
-- ** contentTypeGetGenericIconName
contentTypeGetGenericIconName ,
-- ** contentTypeGetIcon
contentTypeGetIcon ,
-- ** contentTypeGetMimeType
contentTypeGetMimeType ,
-- ** contentTypeGetSymbolicIcon
contentTypeGetSymbolicIcon ,
-- ** contentTypeGuess
contentTypeGuess ,
-- ** contentTypeGuessForTree
contentTypeGuessForTree ,
-- ** contentTypeIsA
contentTypeIsA ,
-- ** contentTypeIsUnknown
contentTypeIsUnknown ,
-- ** contentTypesGetRegistered
contentTypesGetRegistered ,
-- ** dbusAddressEscapeValue
dbusAddressEscapeValue ,
-- ** dbusAddressGetForBusSync
dbusAddressGetForBusSync ,
-- ** dbusAddressGetStream
dbusAddressGetStream ,
-- ** dbusAddressGetStreamFinish
dbusAddressGetStreamFinish ,
-- ** dbusAddressGetStreamSync
dbusAddressGetStreamSync ,
-- ** dbusAnnotationInfoLookup
dbusAnnotationInfoLookup ,
-- ** dbusErrorEncodeGerror
dbusErrorEncodeGerror ,
-- ** dbusErrorGetRemoteError
dbusErrorGetRemoteError ,
-- ** dbusErrorIsRemoteError
dbusErrorIsRemoteError ,
-- ** dbusErrorNewForDbusError
dbusErrorNewForDbusError ,
-- ** dbusErrorQuark
dbusErrorQuark ,
-- ** dbusErrorRegisterError
dbusErrorRegisterError ,
-- ** dbusErrorRegisterErrorDomain
dbusErrorRegisterErrorDomain ,
-- ** dbusErrorStripRemoteError
dbusErrorStripRemoteError ,
-- ** dbusErrorUnregisterError
dbusErrorUnregisterError ,
-- ** dbusGenerateGuid
dbusGenerateGuid ,
-- ** dbusGvalueToGvariant
dbusGvalueToGvariant ,
-- ** dbusGvariantToGvalue
dbusGvariantToGvalue ,
-- ** dbusIsAddress
dbusIsAddress ,
-- ** dbusIsGuid
dbusIsGuid ,
-- ** dbusIsInterfaceName
dbusIsInterfaceName ,
-- ** dbusIsMemberName
dbusIsMemberName ,
-- ** dbusIsName
dbusIsName ,
-- ** dbusIsSupportedAddress
dbusIsSupportedAddress ,
-- ** dbusIsUniqueName
dbusIsUniqueName ,
-- ** fileNewForCommandlineArg
fileNewForCommandlineArg ,
-- ** fileNewForCommandlineArgAndCwd
fileNewForCommandlineArgAndCwd ,
-- ** fileNewForPath
fileNewForPath ,
-- ** fileNewForUri
fileNewForUri ,
-- ** fileNewTmp
fileNewTmp ,
-- ** fileParseName
fileParseName ,
-- ** iconDeserialize
iconDeserialize ,
-- ** iconHash
iconHash ,
-- ** iconNewForString
iconNewForString ,
-- ** initableNewv
initableNewv ,
-- ** ioErrorFromErrno
ioErrorFromErrno ,
-- ** ioErrorQuark
ioErrorQuark ,
-- ** ioExtensionPointImplement
ioExtensionPointImplement ,
-- ** ioExtensionPointLookup
ioExtensionPointLookup ,
-- ** ioExtensionPointRegister
ioExtensionPointRegister ,
-- ** ioModulesScanAllInDirectory
ioModulesScanAllInDirectory ,
-- ** ioModulesScanAllInDirectoryWithScope
ioModulesScanAllInDirectoryWithScope ,
-- ** ioSchedulerCancelAllJobs
ioSchedulerCancelAllJobs ,
-- ** ioSchedulerPushJob
ioSchedulerPushJob ,
-- ** networkMonitorGetDefault
networkMonitorGetDefault ,
-- ** networkingInit
networkingInit ,
-- ** pollableSourceNew
pollableSourceNew ,
-- ** pollableSourceNewFull
pollableSourceNewFull ,
-- ** pollableStreamRead
pollableStreamRead ,
-- ** pollableStreamWrite
pollableStreamWrite ,
-- ** pollableStreamWriteAll
pollableStreamWriteAll ,
-- ** proxyGetDefaultForProtocol
proxyGetDefaultForProtocol ,
-- ** proxyResolverGetDefault
proxyResolverGetDefault ,
-- ** resolverErrorQuark
resolverErrorQuark ,
-- ** resourceErrorQuark
resourceErrorQuark ,
-- ** resourceLoad
resourceLoad ,
-- ** resourcesEnumerateChildren
resourcesEnumerateChildren ,
-- ** resourcesGetInfo
resourcesGetInfo ,
-- ** resourcesLookupData
resourcesLookupData ,
-- ** resourcesOpenStream
resourcesOpenStream ,
-- ** resourcesRegister
resourcesRegister ,
-- ** resourcesUnregister
resourcesUnregister ,
-- ** settingsSchemaSourceGetDefault
settingsSchemaSourceGetDefault ,
-- ** simpleAsyncReportGerrorInIdle
simpleAsyncReportGerrorInIdle ,
-- ** tlsBackendGetDefault
tlsBackendGetDefault ,
-- ** tlsClientConnectionNew
tlsClientConnectionNew ,
-- ** tlsErrorQuark
tlsErrorQuark ,
-- ** tlsFileDatabaseNew
tlsFileDatabaseNew ,
-- ** tlsServerConnectionNew
tlsServerConnectionNew ,
-- ** unixIsMountPathSystemInternal
unixIsMountPathSystemInternal ,
-- ** unixMountCompare
unixMountCompare ,
-- ** unixMountFree
unixMountFree ,
-- ** unixMountGetDevicePath
unixMountGetDevicePath ,
-- ** unixMountGetFsType
unixMountGetFsType ,
-- ** unixMountGetMountPath
unixMountGetMountPath ,
-- ** unixMountGuessCanEject
unixMountGuessCanEject ,
-- ** unixMountGuessIcon
unixMountGuessIcon ,
-- ** unixMountGuessName
unixMountGuessName ,
-- ** unixMountGuessShouldDisplay
unixMountGuessShouldDisplay ,
-- ** unixMountGuessSymbolicIcon
unixMountGuessSymbolicIcon ,
-- ** unixMountIsReadonly
unixMountIsReadonly ,
-- ** unixMountIsSystemInternal
unixMountIsSystemInternal ,
-- ** unixMountPointsChangedSince
unixMountPointsChangedSince ,
-- ** unixMountsChangedSince
unixMountsChangedSince ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gio.Types
import GI.Gio.Callbacks
import qualified GI.GLib as GLib
import qualified GI.GObject as GObject
-- function g_unix_mounts_changed_since
-- Args : [Arg {argName = "time", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "time", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mounts_changed_since" g_unix_mounts_changed_since ::
Word64 -> -- time : TBasicType TUInt64
IO CInt
unixMountsChangedSince ::
(MonadIO m) =>
Word64 -> -- time
m Bool
unixMountsChangedSince time = liftIO $ do
result <- g_unix_mounts_changed_since time
let result' = (/= 0) result
return result'
-- function g_unix_mount_points_changed_since
-- Args : [Arg {argName = "time", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "time", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_points_changed_since" g_unix_mount_points_changed_since ::
Word64 -> -- time : TBasicType TUInt64
IO CInt
unixMountPointsChangedSince ::
(MonadIO m) =>
Word64 -> -- time
m Bool
unixMountPointsChangedSince time = liftIO $ do
result <- g_unix_mount_points_changed_since time
let result' = (/= 0) result
return result'
-- function g_unix_mount_is_system_internal
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_is_system_internal" g_unix_mount_is_system_internal ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CInt
unixMountIsSystemInternal ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m Bool
unixMountIsSystemInternal mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_is_system_internal mount_entry'
let result' = (/= 0) result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_is_readonly
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_is_readonly" g_unix_mount_is_readonly ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CInt
unixMountIsReadonly ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m Bool
unixMountIsReadonly mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_is_readonly mount_entry'
let result' = (/= 0) result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_guess_symbolic_icon
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_guess_symbolic_icon" g_unix_mount_guess_symbolic_icon ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO (Ptr Icon)
unixMountGuessSymbolicIcon ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m Icon
unixMountGuessSymbolicIcon mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_guess_symbolic_icon mount_entry'
checkUnexpectedReturnNULL "g_unix_mount_guess_symbolic_icon" result
result' <- (wrapObject Icon) result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_guess_should_display
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_guess_should_display" g_unix_mount_guess_should_display ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CInt
unixMountGuessShouldDisplay ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m Bool
unixMountGuessShouldDisplay mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_guess_should_display mount_entry'
let result' = (/= 0) result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_guess_name
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_guess_name" g_unix_mount_guess_name ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CString
unixMountGuessName ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m T.Text
unixMountGuessName mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_guess_name mount_entry'
checkUnexpectedReturnNULL "g_unix_mount_guess_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_guess_icon
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_guess_icon" g_unix_mount_guess_icon ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO (Ptr Icon)
unixMountGuessIcon ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m Icon
unixMountGuessIcon mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_guess_icon mount_entry'
checkUnexpectedReturnNULL "g_unix_mount_guess_icon" result
result' <- (wrapObject Icon) result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_guess_can_eject
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_guess_can_eject" g_unix_mount_guess_can_eject ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CInt
unixMountGuessCanEject ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m Bool
unixMountGuessCanEject mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_guess_can_eject mount_entry'
let result' = (/= 0) result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_get_mount_path
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_get_mount_path" g_unix_mount_get_mount_path ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CString
unixMountGetMountPath ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m T.Text
unixMountGetMountPath mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_get_mount_path mount_entry'
checkUnexpectedReturnNULL "g_unix_mount_get_mount_path" result
result' <- cstringToText result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_get_fs_type
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_get_fs_type" g_unix_mount_get_fs_type ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CString
unixMountGetFsType ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m T.Text
unixMountGetFsType mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_get_fs_type mount_entry'
checkUnexpectedReturnNULL "g_unix_mount_get_fs_type" result
result' <- cstringToText result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_get_device_path
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_get_device_path" g_unix_mount_get_device_path ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO CString
unixMountGetDevicePath ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m T.Text
unixMountGetDevicePath mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
result <- g_unix_mount_get_device_path mount_entry'
checkUnexpectedReturnNULL "g_unix_mount_get_device_path" result
result' <- cstringToText result
touchManagedPtr mount_entry
return result'
-- function g_unix_mount_free
-- Args : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_entry", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_free" g_unix_mount_free ::
Ptr UnixMountEntry -> -- mount_entry : TInterface "Gio" "UnixMountEntry"
IO ()
unixMountFree ::
(MonadIO m) =>
UnixMountEntry -> -- mount_entry
m ()
unixMountFree mount_entry = liftIO $ do
let mount_entry' = unsafeManagedPtrGetPtr mount_entry
g_unix_mount_free mount_entry'
touchManagedPtr mount_entry
return ()
-- function g_unix_mount_compare
-- Args : [Arg {argName = "mount1", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mount2", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount1", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mount2", argType = TInterface "Gio" "UnixMountEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_mount_compare" g_unix_mount_compare ::
Ptr UnixMountEntry -> -- mount1 : TInterface "Gio" "UnixMountEntry"
Ptr UnixMountEntry -> -- mount2 : TInterface "Gio" "UnixMountEntry"
IO Int32
unixMountCompare ::
(MonadIO m) =>
UnixMountEntry -> -- mount1
UnixMountEntry -> -- mount2
m Int32
unixMountCompare mount1 mount2 = liftIO $ do
let mount1' = unsafeManagedPtrGetPtr mount1
let mount2' = unsafeManagedPtrGetPtr mount2
result <- g_unix_mount_compare mount1' mount2'
touchManagedPtr mount1
touchManagedPtr mount2
return result
-- function g_unix_is_mount_path_system_internal
-- Args : [Arg {argName = "mount_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mount_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_unix_is_mount_path_system_internal" g_unix_is_mount_path_system_internal ::
CString -> -- mount_path : TBasicType TUTF8
IO CInt
unixIsMountPathSystemInternal ::
(MonadIO m) =>
T.Text -> -- mount_path
m Bool
unixIsMountPathSystemInternal mount_path = liftIO $ do
mount_path' <- textToCString mount_path
result <- g_unix_is_mount_path_system_internal mount_path'
let result' = (/= 0) result
freeMem mount_path'
return result'
-- function g_tls_server_connection_new
-- Args : [Arg {argName = "base_io_stream", argType = TInterface "Gio" "IOStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "certificate", argType = TInterface "Gio" "TlsCertificate", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "base_io_stream", argType = TInterface "Gio" "IOStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "certificate", argType = TInterface "Gio" "TlsCertificate", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "TlsServerConnection"
-- throws : True
-- Skip return : False
foreign import ccall "g_tls_server_connection_new" g_tls_server_connection_new ::
Ptr IOStream -> -- base_io_stream : TInterface "Gio" "IOStream"
Ptr TlsCertificate -> -- certificate : TInterface "Gio" "TlsCertificate"
Ptr (Ptr GError) -> -- error
IO (Ptr TlsServerConnection)
tlsServerConnectionNew ::
(MonadIO m, IOStreamK a, TlsCertificateK b) =>
a -> -- base_io_stream
Maybe (b) -> -- certificate
m TlsServerConnection
tlsServerConnectionNew base_io_stream certificate = liftIO $ do
let base_io_stream' = unsafeManagedPtrCastPtr base_io_stream
maybeCertificate <- case certificate of
Nothing -> return nullPtr
Just jCertificate -> do
let jCertificate' = unsafeManagedPtrCastPtr jCertificate
return jCertificate'
onException (do
result <- propagateGError $ g_tls_server_connection_new base_io_stream' maybeCertificate
checkUnexpectedReturnNULL "g_tls_server_connection_new" result
result' <- (wrapObject TlsServerConnection) result
touchManagedPtr base_io_stream
whenJust certificate touchManagedPtr
return result'
) (do
return ()
)
-- function g_tls_file_database_new
-- Args : [Arg {argName = "anchors", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "anchors", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "TlsFileDatabase"
-- throws : True
-- Skip return : False
foreign import ccall "g_tls_file_database_new" g_tls_file_database_new ::
CString -> -- anchors : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO (Ptr TlsFileDatabase)
tlsFileDatabaseNew ::
(MonadIO m) =>
T.Text -> -- anchors
m TlsFileDatabase
tlsFileDatabaseNew anchors = liftIO $ do
anchors' <- textToCString anchors
onException (do
result <- propagateGError $ g_tls_file_database_new anchors'
checkUnexpectedReturnNULL "g_tls_file_database_new" result
result' <- (wrapObject TlsFileDatabase) result
freeMem anchors'
return result'
) (do
freeMem anchors'
)
-- function g_tls_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_tls_error_quark" g_tls_error_quark ::
IO Word32
tlsErrorQuark ::
(MonadIO m) =>
m Word32
tlsErrorQuark = liftIO $ do
result <- g_tls_error_quark
return result
-- function g_tls_client_connection_new
-- Args : [Arg {argName = "base_io_stream", argType = TInterface "Gio" "IOStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "server_identity", argType = TInterface "Gio" "SocketConnectable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "base_io_stream", argType = TInterface "Gio" "IOStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "server_identity", argType = TInterface "Gio" "SocketConnectable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "TlsClientConnection"
-- throws : True
-- Skip return : False
foreign import ccall "g_tls_client_connection_new" g_tls_client_connection_new ::
Ptr IOStream -> -- base_io_stream : TInterface "Gio" "IOStream"
Ptr SocketConnectable -> -- server_identity : TInterface "Gio" "SocketConnectable"
Ptr (Ptr GError) -> -- error
IO (Ptr TlsClientConnection)
tlsClientConnectionNew ::
(MonadIO m, IOStreamK a, SocketConnectableK b) =>
a -> -- base_io_stream
Maybe (b) -> -- server_identity
m TlsClientConnection
tlsClientConnectionNew base_io_stream server_identity = liftIO $ do
let base_io_stream' = unsafeManagedPtrCastPtr base_io_stream
maybeServer_identity <- case server_identity of
Nothing -> return nullPtr
Just jServer_identity -> do
let jServer_identity' = unsafeManagedPtrCastPtr jServer_identity
return jServer_identity'
onException (do
result <- propagateGError $ g_tls_client_connection_new base_io_stream' maybeServer_identity
checkUnexpectedReturnNULL "g_tls_client_connection_new" result
result' <- (wrapObject TlsClientConnection) result
touchManagedPtr base_io_stream
whenJust server_identity touchManagedPtr
return result'
) (do
return ()
)
-- function g_tls_backend_get_default
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gio" "TlsBackend"
-- throws : False
-- Skip return : False
foreign import ccall "g_tls_backend_get_default" g_tls_backend_get_default ::
IO (Ptr TlsBackend)
tlsBackendGetDefault ::
(MonadIO m) =>
m TlsBackend
tlsBackendGetDefault = liftIO $ do
result <- g_tls_backend_get_default
checkUnexpectedReturnNULL "g_tls_backend_get_default" result
result' <- (newObject TlsBackend) result
return result'
-- function g_simple_async_report_gerror_in_idle
-- Args : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "object", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 2, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_simple_async_report_gerror_in_idle" g_simple_async_report_gerror_in_idle ::
Ptr GObject.Object -> -- object : TInterface "GObject" "Object"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
Ptr GError -> -- error : TError
IO ()
simpleAsyncReportGerrorInIdle ::
(MonadIO m, GObject.ObjectK a) =>
Maybe (a) -> -- object
Maybe (AsyncReadyCallback) -> -- callback
GError -> -- error
m ()
simpleAsyncReportGerrorInIdle object callback error_ = liftIO $ do
maybeObject <- case object of
Nothing -> return nullPtr
Just jObject -> do
let jObject' = unsafeManagedPtrCastPtr jObject
return jObject'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let error_' = unsafeManagedPtrGetPtr error_
let user_data = nullPtr
g_simple_async_report_gerror_in_idle maybeObject maybeCallback user_data error_'
whenJust object touchManagedPtr
touchManagedPtr error_
return ()
-- function g_settings_schema_source_get_default
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gio" "SettingsSchemaSource"
-- throws : False
-- Skip return : False
foreign import ccall "g_settings_schema_source_get_default" g_settings_schema_source_get_default ::
IO (Ptr SettingsSchemaSource)
settingsSchemaSourceGetDefault ::
(MonadIO m) =>
m SettingsSchemaSource
settingsSchemaSourceGetDefault = liftIO $ do
result <- g_settings_schema_source_get_default
checkUnexpectedReturnNULL "g_settings_schema_source_get_default" result
result' <- (newBoxed SettingsSchemaSource) result
return result'
-- function g_resources_unregister
-- Args : [Arg {argName = "resource", argType = TInterface "Gio" "Resource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "resource", argType = TInterface "Gio" "Resource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_resources_unregister" g_resources_unregister ::
Ptr Resource -> -- resource : TInterface "Gio" "Resource"
IO ()
resourcesUnregister ::
(MonadIO m) =>
Resource -> -- resource
m ()
resourcesUnregister resource = liftIO $ do
let resource' = unsafeManagedPtrGetPtr resource
g_resources_unregister resource'
touchManagedPtr resource
return ()
-- function g_resources_register
-- Args : [Arg {argName = "resource", argType = TInterface "Gio" "Resource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "resource", argType = TInterface "Gio" "Resource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_resources_register" g_resources_register ::
Ptr Resource -> -- resource : TInterface "Gio" "Resource"
IO ()
resourcesRegister ::
(MonadIO m) =>
Resource -> -- resource
m ()
resourcesRegister resource = liftIO $ do
let resource' = unsafeManagedPtrGetPtr resource
g_resources_register resource'
touchManagedPtr resource
return ()
-- function g_resources_open_stream
-- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "InputStream"
-- throws : True
-- Skip return : False
foreign import ccall "g_resources_open_stream" g_resources_open_stream ::
CString -> -- path : TBasicType TUTF8
CUInt -> -- lookup_flags : TInterface "Gio" "ResourceLookupFlags"
Ptr (Ptr GError) -> -- error
IO (Ptr InputStream)
resourcesOpenStream ::
(MonadIO m) =>
T.Text -> -- path
[ResourceLookupFlags] -> -- lookup_flags
m InputStream
resourcesOpenStream path lookup_flags = liftIO $ do
path' <- textToCString path
let lookup_flags' = gflagsToWord lookup_flags
onException (do
result <- propagateGError $ g_resources_open_stream path' lookup_flags'
checkUnexpectedReturnNULL "g_resources_open_stream" result
result' <- (wrapObject InputStream) result
freeMem path'
return result'
) (do
freeMem path'
)
-- function g_resources_lookup_data
-- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GLib" "Bytes"
-- throws : True
-- Skip return : False
foreign import ccall "g_resources_lookup_data" g_resources_lookup_data ::
CString -> -- path : TBasicType TUTF8
CUInt -> -- lookup_flags : TInterface "Gio" "ResourceLookupFlags"
Ptr (Ptr GError) -> -- error
IO (Ptr GLib.Bytes)
resourcesLookupData ::
(MonadIO m) =>
T.Text -> -- path
[ResourceLookupFlags] -> -- lookup_flags
m GLib.Bytes
resourcesLookupData path lookup_flags = liftIO $ do
path' <- textToCString path
let lookup_flags' = gflagsToWord lookup_flags
onException (do
result <- propagateGError $ g_resources_lookup_data path' lookup_flags'
checkUnexpectedReturnNULL "g_resources_lookup_data" result
result' <- (wrapBoxed GLib.Bytes) result
freeMem path'
return result'
) (do
freeMem path'
)
-- function g_resources_get_info
-- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "flags", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False
foreign import ccall "g_resources_get_info" g_resources_get_info ::
CString -> -- path : TBasicType TUTF8
CUInt -> -- lookup_flags : TInterface "Gio" "ResourceLookupFlags"
Ptr Word64 -> -- size : TBasicType TUInt64
Ptr Word32 -> -- flags : TBasicType TUInt32
Ptr (Ptr GError) -> -- error
IO CInt
resourcesGetInfo ::
(MonadIO m) =>
T.Text -> -- path
[ResourceLookupFlags] -> -- lookup_flags
m (Word64,Word32)
resourcesGetInfo path lookup_flags = liftIO $ do
path' <- textToCString path
let lookup_flags' = gflagsToWord lookup_flags
size <- allocMem :: IO (Ptr Word64)
flags <- allocMem :: IO (Ptr Word32)
onException (do
_ <- propagateGError $ g_resources_get_info path' lookup_flags' size flags
size' <- peek size
flags' <- peek flags
freeMem path'
freeMem size
freeMem flags
return (size', flags')
) (do
freeMem path'
freeMem size
freeMem flags
)
-- function g_resources_enumerate_children
-- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "lookup_flags", argType = TInterface "Gio" "ResourceLookupFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : True
-- Skip return : False
foreign import ccall "g_resources_enumerate_children" g_resources_enumerate_children ::
CString -> -- path : TBasicType TUTF8
CUInt -> -- lookup_flags : TInterface "Gio" "ResourceLookupFlags"
Ptr (Ptr GError) -> -- error
IO (Ptr CString)
resourcesEnumerateChildren ::
(MonadIO m) =>
T.Text -> -- path
[ResourceLookupFlags] -> -- lookup_flags
m [T.Text]
resourcesEnumerateChildren path lookup_flags = liftIO $ do
path' <- textToCString path
let lookup_flags' = gflagsToWord lookup_flags
onException (do
result <- propagateGError $ g_resources_enumerate_children path' lookup_flags'
checkUnexpectedReturnNULL "g_resources_enumerate_children" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
freeMem path'
return result'
) (do
freeMem path'
)
-- function g_resource_load
-- Args : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Resource"
-- throws : True
-- Skip return : False
foreign import ccall "g_resource_load" g_resource_load ::
CString -> -- filename : TBasicType TFileName
Ptr (Ptr GError) -> -- error
IO (Ptr Resource)
resourceLoad ::
(MonadIO m) =>
[Char] -> -- filename
m Resource
resourceLoad filename = liftIO $ do
filename' <- stringToCString filename
onException (do
result <- propagateGError $ g_resource_load filename'
checkUnexpectedReturnNULL "g_resource_load" result
result' <- (wrapBoxed Resource) result
freeMem filename'
return result'
) (do
freeMem filename'
)
-- function g_resource_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_resource_error_quark" g_resource_error_quark ::
IO Word32
resourceErrorQuark ::
(MonadIO m) =>
m Word32
resourceErrorQuark = liftIO $ do
result <- g_resource_error_quark
return result
-- function g_resolver_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_resolver_error_quark" g_resolver_error_quark ::
IO Word32
resolverErrorQuark ::
(MonadIO m) =>
m Word32
resolverErrorQuark = liftIO $ do
result <- g_resolver_error_quark
return result
-- function g_proxy_resolver_get_default
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gio" "ProxyResolver"
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_resolver_get_default" g_proxy_resolver_get_default ::
IO (Ptr ProxyResolver)
proxyResolverGetDefault ::
(MonadIO m) =>
m ProxyResolver
proxyResolverGetDefault = liftIO $ do
result <- g_proxy_resolver_get_default
checkUnexpectedReturnNULL "g_proxy_resolver_get_default" result
result' <- (newObject ProxyResolver) result
return result'
-- function g_proxy_get_default_for_protocol
-- Args : [Arg {argName = "protocol", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "protocol", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Proxy"
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_get_default_for_protocol" g_proxy_get_default_for_protocol ::
CString -> -- protocol : TBasicType TUTF8
IO (Ptr Proxy)
proxyGetDefaultForProtocol ::
(MonadIO m) =>
T.Text -> -- protocol
m Proxy
proxyGetDefaultForProtocol protocol = liftIO $ do
protocol' <- textToCString protocol
result <- g_proxy_get_default_for_protocol protocol'
checkUnexpectedReturnNULL "g_proxy_get_default_for_protocol" result
result' <- (wrapObject Proxy) result
freeMem protocol'
return result'
-- function g_pollable_stream_write_all
-- Args : [Arg {argName = "stream", argType = TInterface "Gio" "OutputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "stream", argType = TInterface "Gio" "OutputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False
foreign import ccall "g_pollable_stream_write_all" g_pollable_stream_write_all ::
Ptr OutputStream -> -- stream : TInterface "Gio" "OutputStream"
Ptr Word8 -> -- buffer : TCArray False (-1) 2 (TBasicType TUInt8)
Word64 -> -- count : TBasicType TUInt64
CInt -> -- blocking : TBasicType TBoolean
Ptr Word64 -> -- bytes_written : TBasicType TUInt64
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO CInt
pollableStreamWriteAll ::
(MonadIO m, OutputStreamK a, CancellableK b) =>
a -> -- stream
ByteString -> -- buffer
Bool -> -- blocking
Maybe (b) -> -- cancellable
m (Word64)
pollableStreamWriteAll stream buffer blocking cancellable = liftIO $ do
let count = fromIntegral $ B.length buffer
let stream' = unsafeManagedPtrCastPtr stream
buffer' <- packByteString buffer
let blocking' = (fromIntegral . fromEnum) blocking
bytes_written <- allocMem :: IO (Ptr Word64)
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_pollable_stream_write_all stream' buffer' count blocking' bytes_written maybeCancellable
bytes_written' <- peek bytes_written
touchManagedPtr stream
whenJust cancellable touchManagedPtr
freeMem buffer'
freeMem bytes_written
return bytes_written'
) (do
freeMem buffer'
freeMem bytes_written
)
-- function g_pollable_stream_write
-- Args : [Arg {argName = "stream", argType = TInterface "Gio" "OutputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "stream", argType = TInterface "Gio" "OutputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : True
-- Skip return : False
foreign import ccall "g_pollable_stream_write" g_pollable_stream_write ::
Ptr OutputStream -> -- stream : TInterface "Gio" "OutputStream"
Ptr Word8 -> -- buffer : TCArray False (-1) 2 (TBasicType TUInt8)
Word64 -> -- count : TBasicType TUInt64
CInt -> -- blocking : TBasicType TBoolean
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO Int64
pollableStreamWrite ::
(MonadIO m, OutputStreamK a, CancellableK b) =>
a -> -- stream
ByteString -> -- buffer
Bool -> -- blocking
Maybe (b) -> -- cancellable
m Int64
pollableStreamWrite stream buffer blocking cancellable = liftIO $ do
let count = fromIntegral $ B.length buffer
let stream' = unsafeManagedPtrCastPtr stream
buffer' <- packByteString buffer
let blocking' = (fromIntegral . fromEnum) blocking
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_pollable_stream_write stream' buffer' count blocking' maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
freeMem buffer'
return result
) (do
freeMem buffer'
)
-- function g_pollable_stream_read
-- Args : [Arg {argName = "stream", argType = TInterface "Gio" "InputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "stream", argType = TInterface "Gio" "InputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "buffer", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blocking", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : True
-- Skip return : False
foreign import ccall "g_pollable_stream_read" g_pollable_stream_read ::
Ptr InputStream -> -- stream : TInterface "Gio" "InputStream"
Ptr Word8 -> -- buffer : TCArray False (-1) 2 (TBasicType TUInt8)
Word64 -> -- count : TBasicType TUInt64
CInt -> -- blocking : TBasicType TBoolean
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO Int64
pollableStreamRead ::
(MonadIO m, InputStreamK a, CancellableK b) =>
a -> -- stream
ByteString -> -- buffer
Bool -> -- blocking
Maybe (b) -> -- cancellable
m Int64
pollableStreamRead stream buffer blocking cancellable = liftIO $ do
let count = fromIntegral $ B.length buffer
let stream' = unsafeManagedPtrCastPtr stream
buffer' <- packByteString buffer
let blocking' = (fromIntegral . fromEnum) blocking
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_pollable_stream_read stream' buffer' count blocking' maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
freeMem buffer'
return result
) (do
freeMem buffer'
)
-- function g_pollable_source_new_full
-- Args : [Arg {argName = "pollable_stream", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_source", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pollable_stream", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_source", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GLib" "Source"
-- throws : False
-- Skip return : False
foreign import ccall "g_pollable_source_new_full" g_pollable_source_new_full ::
Ptr GObject.Object -> -- pollable_stream : TInterface "GObject" "Object"
Ptr GLib.Source -> -- child_source : TInterface "GLib" "Source"
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
IO (Ptr GLib.Source)
pollableSourceNewFull ::
(MonadIO m, GObject.ObjectK a, CancellableK b) =>
a -> -- pollable_stream
Maybe (GLib.Source) -> -- child_source
Maybe (b) -> -- cancellable
m GLib.Source
pollableSourceNewFull pollable_stream child_source cancellable = liftIO $ do
let pollable_stream' = unsafeManagedPtrCastPtr pollable_stream
maybeChild_source <- case child_source of
Nothing -> return nullPtr
Just jChild_source -> do
let jChild_source' = unsafeManagedPtrGetPtr jChild_source
return jChild_source'
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
result <- g_pollable_source_new_full pollable_stream' maybeChild_source maybeCancellable
checkUnexpectedReturnNULL "g_pollable_source_new_full" result
result' <- (wrapBoxed GLib.Source) result
touchManagedPtr pollable_stream
whenJust child_source touchManagedPtr
whenJust cancellable touchManagedPtr
return result'
-- function g_pollable_source_new
-- Args : [Arg {argName = "pollable_stream", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "pollable_stream", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GLib" "Source"
-- throws : False
-- Skip return : False
foreign import ccall "g_pollable_source_new" g_pollable_source_new ::
Ptr GObject.Object -> -- pollable_stream : TInterface "GObject" "Object"
IO (Ptr GLib.Source)
pollableSourceNew ::
(MonadIO m, GObject.ObjectK a) =>
a -> -- pollable_stream
m GLib.Source
pollableSourceNew pollable_stream = liftIO $ do
let pollable_stream' = unsafeManagedPtrCastPtr pollable_stream
result <- g_pollable_source_new pollable_stream'
checkUnexpectedReturnNULL "g_pollable_source_new" result
result' <- (wrapBoxed GLib.Source) result
touchManagedPtr pollable_stream
return result'
-- function g_networking_init
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_networking_init" g_networking_init ::
IO ()
networkingInit ::
(MonadIO m) =>
m ()
networkingInit = liftIO $ do
g_networking_init
return ()
-- function g_network_monitor_get_default
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gio" "NetworkMonitor"
-- throws : False
-- Skip return : False
foreign import ccall "g_network_monitor_get_default" g_network_monitor_get_default ::
IO (Ptr NetworkMonitor)
networkMonitorGetDefault ::
(MonadIO m) =>
m NetworkMonitor
networkMonitorGetDefault = liftIO $ do
result <- g_network_monitor_get_default
checkUnexpectedReturnNULL "g_network_monitor_get_default" result
result' <- (newObject NetworkMonitor) result
return result'
-- function g_io_scheduler_push_job
-- Args : [Arg {argName = "job_func", argType = TInterface "Gio" "IOSchedulerJobFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 1, argDestroy = 2, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "io_priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "job_func", argType = TInterface "Gio" "IOSchedulerJobFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 1, argDestroy = 2, transfer = TransferNothing},Arg {argName = "io_priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_io_scheduler_push_job" g_io_scheduler_push_job ::
FunPtr IOSchedulerJobFuncC -> -- job_func : TInterface "Gio" "IOSchedulerJobFunc"
Ptr () -> -- user_data : TBasicType TVoid
FunPtr GLib.DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"
Int32 -> -- io_priority : TBasicType TInt32
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
IO ()
{-# DEPRECATED ioSchedulerPushJob ["use #GThreadPool or g_task_run_in_thread()"]#-}
ioSchedulerPushJob ::
(MonadIO m, CancellableK a) =>
IOSchedulerJobFunc -> -- job_func
Int32 -> -- io_priority
Maybe (a) -> -- cancellable
m ()
ioSchedulerPushJob job_func io_priority cancellable = liftIO $ do
job_func' <- mkIOSchedulerJobFunc (iOSchedulerJobFuncWrapper Nothing job_func)
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
let user_data = castFunPtrToPtr job_func'
let notify = safeFreeFunPtrPtr
g_io_scheduler_push_job job_func' user_data notify io_priority maybeCancellable
whenJust cancellable touchManagedPtr
return ()
-- function g_io_scheduler_cancel_all_jobs
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_io_scheduler_cancel_all_jobs" g_io_scheduler_cancel_all_jobs ::
IO ()
{-# DEPRECATED ioSchedulerCancelAllJobs ["You should never call this function, since you don't","know how other libraries in your program might be making use of","gioscheduler."]#-}
ioSchedulerCancelAllJobs ::
(MonadIO m) =>
m ()
ioSchedulerCancelAllJobs = liftIO $ do
g_io_scheduler_cancel_all_jobs
return ()
-- function g_io_modules_scan_all_in_directory_with_scope
-- Args : [Arg {argName = "dirname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scope", argType = TInterface "Gio" "IOModuleScope", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "dirname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scope", argType = TInterface "Gio" "IOModuleScope", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_io_modules_scan_all_in_directory_with_scope" g_io_modules_scan_all_in_directory_with_scope ::
CString -> -- dirname : TBasicType TUTF8
Ptr IOModuleScope -> -- scope : TInterface "Gio" "IOModuleScope"
IO ()
ioModulesScanAllInDirectoryWithScope ::
(MonadIO m) =>
T.Text -> -- dirname
IOModuleScope -> -- scope
m ()
ioModulesScanAllInDirectoryWithScope dirname scope = liftIO $ do
dirname' <- textToCString dirname
let scope' = unsafeManagedPtrGetPtr scope
g_io_modules_scan_all_in_directory_with_scope dirname' scope'
touchManagedPtr scope
freeMem dirname'
return ()
-- function g_io_modules_scan_all_in_directory
-- Args : [Arg {argName = "dirname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "dirname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_io_modules_scan_all_in_directory" g_io_modules_scan_all_in_directory ::
CString -> -- dirname : TBasicType TUTF8
IO ()
ioModulesScanAllInDirectory ::
(MonadIO m) =>
T.Text -> -- dirname
m ()
ioModulesScanAllInDirectory dirname = liftIO $ do
dirname' <- textToCString dirname
g_io_modules_scan_all_in_directory dirname'
freeMem dirname'
return ()
-- function g_io_extension_point_register
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "IOExtensionPoint"
-- throws : False
-- Skip return : False
foreign import ccall "g_io_extension_point_register" g_io_extension_point_register ::
CString -> -- name : TBasicType TUTF8
IO (Ptr IOExtensionPoint)
ioExtensionPointRegister ::
(MonadIO m) =>
T.Text -> -- name
m IOExtensionPoint
ioExtensionPointRegister name = liftIO $ do
name' <- textToCString name
result <- g_io_extension_point_register name'
checkUnexpectedReturnNULL "g_io_extension_point_register" result
-- XXX Wrapping a foreign struct/union with no known destructor, leak?
result' <- (\x -> IOExtensionPoint <$> newForeignPtr_ x) result
freeMem name'
return result'
-- function g_io_extension_point_lookup
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "IOExtensionPoint"
-- throws : False
-- Skip return : False
foreign import ccall "g_io_extension_point_lookup" g_io_extension_point_lookup ::
CString -> -- name : TBasicType TUTF8
IO (Ptr IOExtensionPoint)
ioExtensionPointLookup ::
(MonadIO m) =>
T.Text -> -- name
m IOExtensionPoint
ioExtensionPointLookup name = liftIO $ do
name' <- textToCString name
result <- g_io_extension_point_lookup name'
checkUnexpectedReturnNULL "g_io_extension_point_lookup" result
-- XXX Wrapping a foreign struct/union with no known destructor, leak?
result' <- (\x -> IOExtensionPoint <$> newForeignPtr_ x) result
freeMem name'
return result'
-- function g_io_extension_point_implement
-- Args : [Arg {argName = "extension_point_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "extension_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "extension_point_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "extension_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "IOExtension"
-- throws : False
-- Skip return : False
foreign import ccall "g_io_extension_point_implement" g_io_extension_point_implement ::
CString -> -- extension_point_name : TBasicType TUTF8
CGType -> -- type : TBasicType TGType
CString -> -- extension_name : TBasicType TUTF8
Int32 -> -- priority : TBasicType TInt32
IO (Ptr IOExtension)
ioExtensionPointImplement ::
(MonadIO m) =>
T.Text -> -- extension_point_name
GType -> -- type
T.Text -> -- extension_name
Int32 -> -- priority
m IOExtension
ioExtensionPointImplement extension_point_name type_ extension_name priority = liftIO $ do
extension_point_name' <- textToCString extension_point_name
let type_' = gtypeToCGType type_
extension_name' <- textToCString extension_name
result <- g_io_extension_point_implement extension_point_name' type_' extension_name' priority
checkUnexpectedReturnNULL "g_io_extension_point_implement" result
-- XXX Wrapping a foreign struct/union with no known destructor, leak?
result' <- (\x -> IOExtension <$> newForeignPtr_ x) result
freeMem extension_point_name'
freeMem extension_name'
return result'
-- function g_io_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_io_error_quark" g_io_error_quark ::
IO Word32
ioErrorQuark ::
(MonadIO m) =>
m Word32
ioErrorQuark = liftIO $ do
result <- g_io_error_quark
return result
-- function g_io_error_from_errno
-- Args : [Arg {argName = "err_no", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "err_no", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "IOErrorEnum"
-- throws : False
-- Skip return : False
foreign import ccall "g_io_error_from_errno" g_io_error_from_errno ::
Int32 -> -- err_no : TBasicType TInt32
IO CUInt
ioErrorFromErrno ::
(MonadIO m) =>
Int32 -> -- err_no
m IOErrorEnum
ioErrorFromErrno err_no = liftIO $ do
result <- g_io_error_from_errno err_no
let result' = (toEnum . fromIntegral) result
return result'
-- function g_initable_newv
-- Args : [Arg {argName = "object_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_parameters", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TCArray False (-1) 1 (TInterface "GObject" "Parameter"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_parameters", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "object_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TCArray False (-1) 1 (TInterface "GObject" "Parameter"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Object"
-- throws : True
-- Skip return : False
foreign import ccall "g_initable_newv" g_initable_newv ::
CGType -> -- object_type : TBasicType TGType
Word32 -> -- n_parameters : TBasicType TUInt32
Ptr GObject.Parameter -> -- parameters : TCArray False (-1) 1 (TInterface "GObject" "Parameter")
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO (Ptr GObject.Object)
initableNewv ::
(MonadIO m, CancellableK a) =>
GType -> -- object_type
[GObject.Parameter] -> -- parameters
Maybe (a) -> -- cancellable
m GObject.Object
initableNewv object_type parameters cancellable = liftIO $ do
let n_parameters = fromIntegral $ length parameters
let object_type' = gtypeToCGType object_type
let parameters' = map unsafeManagedPtrGetPtr parameters
parameters'' <- packBlockArray 32 parameters'
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_initable_newv object_type' n_parameters parameters'' maybeCancellable
checkUnexpectedReturnNULL "g_initable_newv" result
result' <- (wrapObject GObject.Object) result
mapM_ touchManagedPtr parameters
whenJust cancellable touchManagedPtr
freeMem parameters''
return result'
) (do
freeMem parameters''
)
-- function g_icon_new_for_string
-- Args : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : True
-- Skip return : False
foreign import ccall "g_icon_new_for_string" g_icon_new_for_string ::
CString -> -- str : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO (Ptr Icon)
iconNewForString ::
(MonadIO m) =>
T.Text -> -- str
m Icon
iconNewForString str = liftIO $ do
str' <- textToCString str
onException (do
result <- propagateGError $ g_icon_new_for_string str'
checkUnexpectedReturnNULL "g_icon_new_for_string" result
result' <- (wrapObject Icon) result
freeMem str'
return result'
) (do
freeMem str'
)
-- function g_icon_hash
-- Args : [Arg {argName = "icon", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "icon", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_icon_hash" g_icon_hash ::
Ptr () -> -- icon : TBasicType TVoid
IO Word32
iconHash ::
(MonadIO m) =>
Ptr () -> -- icon
m Word32
iconHash icon = liftIO $ do
result <- g_icon_hash icon
return result
-- function g_icon_deserialize
-- Args : [Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False
foreign import ccall "g_icon_deserialize" g_icon_deserialize ::
Ptr GVariant -> -- value : TVariant
IO (Ptr Icon)
iconDeserialize ::
(MonadIO m) =>
GVariant -> -- value
m Icon
iconDeserialize value = liftIO $ do
let value' = unsafeManagedPtrGetPtr value
result <- g_icon_deserialize value'
checkUnexpectedReturnNULL "g_icon_deserialize" result
result' <- (wrapObject Icon) result
return result'
-- function g_file_parse_name
-- Args : [Arg {argName = "parse_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "parse_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False
foreign import ccall "g_file_parse_name" g_file_parse_name ::
CString -> -- parse_name : TBasicType TUTF8
IO (Ptr File)
fileParseName ::
(MonadIO m) =>
T.Text -> -- parse_name
m File
fileParseName parse_name = liftIO $ do
parse_name' <- textToCString parse_name
result <- g_file_parse_name parse_name'
checkUnexpectedReturnNULL "g_file_parse_name" result
result' <- (wrapObject File) result
freeMem parse_name'
return result'
-- function g_file_new_tmp
-- Args : [Arg {argName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "iostream", argType = TInterface "Gio" "FileIOStream", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : True
-- Skip return : False
foreign import ccall "g_file_new_tmp" g_file_new_tmp ::
CString -> -- tmpl : TBasicType TFileName
Ptr (Ptr FileIOStream) -> -- iostream : TInterface "Gio" "FileIOStream"
Ptr (Ptr GError) -> -- error
IO (Ptr File)
fileNewTmp ::
(MonadIO m) =>
Maybe ([Char]) -> -- tmpl
m (File,FileIOStream)
fileNewTmp tmpl = liftIO $ do
maybeTmpl <- case tmpl of
Nothing -> return nullPtr
Just jTmpl -> do
jTmpl' <- stringToCString jTmpl
return jTmpl'
iostream <- allocMem :: IO (Ptr (Ptr FileIOStream))
onException (do
result <- propagateGError $ g_file_new_tmp maybeTmpl iostream
checkUnexpectedReturnNULL "g_file_new_tmp" result
result' <- (wrapObject File) result
iostream' <- peek iostream
iostream'' <- (wrapObject FileIOStream) iostream'
freeMem maybeTmpl
freeMem iostream
return (result', iostream'')
) (do
freeMem maybeTmpl
freeMem iostream
)
-- function g_file_new_for_uri
-- Args : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False
foreign import ccall "g_file_new_for_uri" g_file_new_for_uri ::
CString -> -- uri : TBasicType TUTF8
IO (Ptr File)
fileNewForUri ::
(MonadIO m) =>
T.Text -> -- uri
m File
fileNewForUri uri = liftIO $ do
uri' <- textToCString uri
result <- g_file_new_for_uri uri'
checkUnexpectedReturnNULL "g_file_new_for_uri" result
result' <- (wrapObject File) result
freeMem uri'
return result'
-- function g_file_new_for_path
-- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False
foreign import ccall "g_file_new_for_path" g_file_new_for_path ::
CString -> -- path : TBasicType TUTF8
IO (Ptr File)
fileNewForPath ::
(MonadIO m) =>
T.Text -> -- path
m File
fileNewForPath path = liftIO $ do
path' <- textToCString path
result <- g_file_new_for_path path'
checkUnexpectedReturnNULL "g_file_new_for_path" result
result' <- (wrapObject File) result
freeMem path'
return result'
-- function g_file_new_for_commandline_arg_and_cwd
-- Args : [Arg {argName = "arg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cwd", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "arg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cwd", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False
foreign import ccall "g_file_new_for_commandline_arg_and_cwd" g_file_new_for_commandline_arg_and_cwd ::
CString -> -- arg : TBasicType TUTF8
CString -> -- cwd : TBasicType TUTF8
IO (Ptr File)
fileNewForCommandlineArgAndCwd ::
(MonadIO m) =>
T.Text -> -- arg
T.Text -> -- cwd
m File
fileNewForCommandlineArgAndCwd arg cwd = liftIO $ do
arg' <- textToCString arg
cwd' <- textToCString cwd
result <- g_file_new_for_commandline_arg_and_cwd arg' cwd'
checkUnexpectedReturnNULL "g_file_new_for_commandline_arg_and_cwd" result
result' <- (wrapObject File) result
freeMem arg'
freeMem cwd'
return result'
-- function g_file_new_for_commandline_arg
-- Args : [Arg {argName = "arg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "arg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "File"
-- throws : False
-- Skip return : False
foreign import ccall "g_file_new_for_commandline_arg" g_file_new_for_commandline_arg ::
CString -> -- arg : TBasicType TUTF8
IO (Ptr File)
fileNewForCommandlineArg ::
(MonadIO m) =>
T.Text -> -- arg
m File
fileNewForCommandlineArg arg = liftIO $ do
arg' <- textToCString arg
result <- g_file_new_for_commandline_arg arg'
checkUnexpectedReturnNULL "g_file_new_for_commandline_arg" result
result' <- (wrapObject File) result
freeMem arg'
return result'
-- function g_dbus_is_unique_name
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_is_unique_name" g_dbus_is_unique_name ::
CString -> -- string : TBasicType TUTF8
IO CInt
dbusIsUniqueName ::
(MonadIO m) =>
T.Text -> -- string
m Bool
dbusIsUniqueName string = liftIO $ do
string' <- textToCString string
result <- g_dbus_is_unique_name string'
let result' = (/= 0) result
freeMem string'
return result'
-- function g_dbus_is_supported_address
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_is_supported_address" g_dbus_is_supported_address ::
CString -> -- string : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO CInt
dbusIsSupportedAddress ::
(MonadIO m) =>
T.Text -> -- string
m ()
dbusIsSupportedAddress string = liftIO $ do
string' <- textToCString string
onException (do
_ <- propagateGError $ g_dbus_is_supported_address string'
freeMem string'
return ()
) (do
freeMem string'
)
-- function g_dbus_is_name
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_is_name" g_dbus_is_name ::
CString -> -- string : TBasicType TUTF8
IO CInt
dbusIsName ::
(MonadIO m) =>
T.Text -> -- string
m Bool
dbusIsName string = liftIO $ do
string' <- textToCString string
result <- g_dbus_is_name string'
let result' = (/= 0) result
freeMem string'
return result'
-- function g_dbus_is_member_name
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_is_member_name" g_dbus_is_member_name ::
CString -> -- string : TBasicType TUTF8
IO CInt
dbusIsMemberName ::
(MonadIO m) =>
T.Text -> -- string
m Bool
dbusIsMemberName string = liftIO $ do
string' <- textToCString string
result <- g_dbus_is_member_name string'
let result' = (/= 0) result
freeMem string'
return result'
-- function g_dbus_is_interface_name
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_is_interface_name" g_dbus_is_interface_name ::
CString -> -- string : TBasicType TUTF8
IO CInt
dbusIsInterfaceName ::
(MonadIO m) =>
T.Text -> -- string
m Bool
dbusIsInterfaceName string = liftIO $ do
string' <- textToCString string
result <- g_dbus_is_interface_name string'
let result' = (/= 0) result
freeMem string'
return result'
-- function g_dbus_is_guid
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_is_guid" g_dbus_is_guid ::
CString -> -- string : TBasicType TUTF8
IO CInt
dbusIsGuid ::
(MonadIO m) =>
T.Text -> -- string
m Bool
dbusIsGuid string = liftIO $ do
string' <- textToCString string
result <- g_dbus_is_guid string'
let result' = (/= 0) result
freeMem string'
return result'
-- function g_dbus_is_address
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_is_address" g_dbus_is_address ::
CString -> -- string : TBasicType TUTF8
IO CInt
dbusIsAddress ::
(MonadIO m) =>
T.Text -> -- string
m Bool
dbusIsAddress string = liftIO $ do
string' <- textToCString string
result <- g_dbus_is_address string'
let result' = (/= 0) result
freeMem string'
return result'
-- function g_dbus_gvariant_to_gvalue
-- Args : [Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_gvalue", argType = TInterface "GObject" "Value", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_gvariant_to_gvalue" g_dbus_gvariant_to_gvalue ::
Ptr GVariant -> -- value : TVariant
Ptr GValue -> -- out_gvalue : TInterface "GObject" "Value"
IO ()
dbusGvariantToGvalue ::
(MonadIO m) =>
GVariant -> -- value
m (GValue)
dbusGvariantToGvalue value = liftIO $ do
let value' = unsafeManagedPtrGetPtr value
out_gvalue <- callocBoxedBytes 24 :: IO (Ptr GValue)
g_dbus_gvariant_to_gvalue value' out_gvalue
out_gvalue' <- (wrapBoxed GValue) out_gvalue
return out_gvalue'
-- function g_dbus_gvalue_to_gvariant
-- Args : [Arg {argName = "gvalue", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "gvalue", argType = TInterface "GObject" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_gvalue_to_gvariant" g_dbus_gvalue_to_gvariant ::
Ptr GValue -> -- gvalue : TInterface "GObject" "Value"
Ptr GLib.VariantType -> -- type : TInterface "GLib" "VariantType"
IO (Ptr GVariant)
dbusGvalueToGvariant ::
(MonadIO m) =>
GValue -> -- gvalue
GLib.VariantType -> -- type
m GVariant
dbusGvalueToGvariant gvalue type_ = liftIO $ do
let gvalue' = unsafeManagedPtrGetPtr gvalue
let type_' = unsafeManagedPtrGetPtr type_
result <- g_dbus_gvalue_to_gvariant gvalue' type_'
checkUnexpectedReturnNULL "g_dbus_gvalue_to_gvariant" result
result' <- wrapGVariantPtr result
touchManagedPtr gvalue
touchManagedPtr type_
return result'
-- function g_dbus_generate_guid
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_generate_guid" g_dbus_generate_guid ::
IO CString
dbusGenerateGuid ::
(MonadIO m) =>
m T.Text
dbusGenerateGuid = liftIO $ do
result <- g_dbus_generate_guid
checkUnexpectedReturnNULL "g_dbus_generate_guid" result
result' <- cstringToText result
freeMem result
return result'
-- function g_dbus_error_unregister_error
-- Args : [Arg {argName = "error_domain", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_code", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dbus_error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "error_domain", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_code", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dbus_error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_unregister_error" g_dbus_error_unregister_error ::
Word32 -> -- error_domain : TBasicType TUInt32
Int32 -> -- error_code : TBasicType TInt32
CString -> -- dbus_error_name : TBasicType TUTF8
IO CInt
dbusErrorUnregisterError ::
(MonadIO m) =>
Word32 -> -- error_domain
Int32 -> -- error_code
T.Text -> -- dbus_error_name
m Bool
dbusErrorUnregisterError error_domain error_code dbus_error_name = liftIO $ do
dbus_error_name' <- textToCString dbus_error_name
result <- g_dbus_error_unregister_error error_domain error_code dbus_error_name'
let result' = (/= 0) result
freeMem dbus_error_name'
return result'
-- function g_dbus_error_strip_remote_error
-- Args : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_strip_remote_error" g_dbus_error_strip_remote_error ::
Ptr GError -> -- error : TError
IO CInt
dbusErrorStripRemoteError ::
(MonadIO m) =>
GError -> -- error
m Bool
dbusErrorStripRemoteError error_ = liftIO $ do
let error_' = unsafeManagedPtrGetPtr error_
result <- g_dbus_error_strip_remote_error error_'
let result' = (/= 0) result
touchManagedPtr error_
return result'
-- function g_dbus_error_register_error_domain
-- Args : [Arg {argName = "error_domain_quark_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "quark_volatile", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entries", argType = TInterface "Gio" "DBusErrorEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "num_entries", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "error_domain_quark_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "quark_volatile", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "entries", argType = TInterface "Gio" "DBusErrorEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "num_entries", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_register_error_domain" g_dbus_error_register_error_domain ::
CString -> -- error_domain_quark_name : TBasicType TUTF8
Word64 -> -- quark_volatile : TBasicType TUInt64
Ptr DBusErrorEntry -> -- entries : TInterface "Gio" "DBusErrorEntry"
Word32 -> -- num_entries : TBasicType TUInt32
IO ()
dbusErrorRegisterErrorDomain ::
(MonadIO m) =>
T.Text -> -- error_domain_quark_name
Word64 -> -- quark_volatile
DBusErrorEntry -> -- entries
Word32 -> -- num_entries
m ()
dbusErrorRegisterErrorDomain error_domain_quark_name quark_volatile entries num_entries = liftIO $ do
error_domain_quark_name' <- textToCString error_domain_quark_name
let entries' = unsafeManagedPtrGetPtr entries
g_dbus_error_register_error_domain error_domain_quark_name' quark_volatile entries' num_entries
touchManagedPtr entries
freeMem error_domain_quark_name'
return ()
-- function g_dbus_error_register_error
-- Args : [Arg {argName = "error_domain", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_code", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dbus_error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "error_domain", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_code", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dbus_error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_register_error" g_dbus_error_register_error ::
Word32 -> -- error_domain : TBasicType TUInt32
Int32 -> -- error_code : TBasicType TInt32
CString -> -- dbus_error_name : TBasicType TUTF8
IO CInt
dbusErrorRegisterError ::
(MonadIO m) =>
Word32 -> -- error_domain
Int32 -> -- error_code
T.Text -> -- dbus_error_name
m Bool
dbusErrorRegisterError error_domain error_code dbus_error_name = liftIO $ do
dbus_error_name' <- textToCString dbus_error_name
result <- g_dbus_error_register_error error_domain error_code dbus_error_name'
let result' = (/= 0) result
freeMem dbus_error_name'
return result'
-- function g_dbus_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_quark" g_dbus_error_quark ::
IO Word32
dbusErrorQuark ::
(MonadIO m) =>
m Word32
dbusErrorQuark = liftIO $ do
result <- g_dbus_error_quark
return result
-- function g_dbus_error_new_for_dbus_error
-- Args : [Arg {argName = "dbus_error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dbus_error_message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "dbus_error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dbus_error_message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TError
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_new_for_dbus_error" g_dbus_error_new_for_dbus_error ::
CString -> -- dbus_error_name : TBasicType TUTF8
CString -> -- dbus_error_message : TBasicType TUTF8
IO (Ptr GError)
dbusErrorNewForDbusError ::
(MonadIO m) =>
T.Text -> -- dbus_error_name
T.Text -> -- dbus_error_message
m GError
dbusErrorNewForDbusError dbus_error_name dbus_error_message = liftIO $ do
dbus_error_name' <- textToCString dbus_error_name
dbus_error_message' <- textToCString dbus_error_message
result <- g_dbus_error_new_for_dbus_error dbus_error_name' dbus_error_message'
checkUnexpectedReturnNULL "g_dbus_error_new_for_dbus_error" result
result' <- (wrapBoxed GError) result
freeMem dbus_error_name'
freeMem dbus_error_message'
return result'
-- function g_dbus_error_is_remote_error
-- Args : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_is_remote_error" g_dbus_error_is_remote_error ::
Ptr GError -> -- error : TError
IO CInt
dbusErrorIsRemoteError ::
(MonadIO m) =>
GError -> -- error
m Bool
dbusErrorIsRemoteError error_ = liftIO $ do
let error_' = unsafeManagedPtrGetPtr error_
result <- g_dbus_error_is_remote_error error_'
let result' = (/= 0) result
touchManagedPtr error_
return result'
-- function g_dbus_error_get_remote_error
-- Args : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_get_remote_error" g_dbus_error_get_remote_error ::
Ptr GError -> -- error : TError
IO CString
dbusErrorGetRemoteError ::
(MonadIO m) =>
GError -> -- error
m T.Text
dbusErrorGetRemoteError error_ = liftIO $ do
let error_' = unsafeManagedPtrGetPtr error_
result <- g_dbus_error_get_remote_error error_'
checkUnexpectedReturnNULL "g_dbus_error_get_remote_error" result
result' <- cstringToText result
freeMem result
touchManagedPtr error_
return result'
-- function g_dbus_error_encode_gerror
-- Args : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_error_encode_gerror" g_dbus_error_encode_gerror ::
Ptr GError -> -- error : TError
IO CString
dbusErrorEncodeGerror ::
(MonadIO m) =>
GError -> -- error
m T.Text
dbusErrorEncodeGerror error_ = liftIO $ do
let error_' = unsafeManagedPtrGetPtr error_
result <- g_dbus_error_encode_gerror error_'
checkUnexpectedReturnNULL "g_dbus_error_encode_gerror" result
result' <- cstringToText result
freeMem result
touchManagedPtr error_
return result'
-- function g_dbus_annotation_info_lookup
-- Args : [Arg {argName = "annotations", argType = TCArray True (-1) (-1) (TInterface "Gio" "DBusAnnotationInfo"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "annotations", argType = TCArray True (-1) (-1) (TInterface "Gio" "DBusAnnotationInfo"), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_annotation_info_lookup" g_dbus_annotation_info_lookup ::
Ptr (Ptr DBusAnnotationInfo) -> -- annotations : TCArray True (-1) (-1) (TInterface "Gio" "DBusAnnotationInfo")
CString -> -- name : TBasicType TUTF8
IO CString
dbusAnnotationInfoLookup ::
(MonadIO m) =>
Maybe ([DBusAnnotationInfo]) -> -- annotations
T.Text -> -- name
m T.Text
dbusAnnotationInfoLookup annotations name = liftIO $ do
maybeAnnotations <- case annotations of
Nothing -> return nullPtr
Just jAnnotations -> do
let jAnnotations' = map unsafeManagedPtrGetPtr jAnnotations
jAnnotations'' <- packZeroTerminatedPtrArray jAnnotations'
return jAnnotations''
name' <- textToCString name
result <- g_dbus_annotation_info_lookup maybeAnnotations name'
checkUnexpectedReturnNULL "g_dbus_annotation_info_lookup" result
result' <- cstringToText result
whenJust annotations (mapM_ touchManagedPtr)
freeMem maybeAnnotations
freeMem name'
return result'
-- function g_dbus_address_get_stream_sync
-- Args : [Arg {argName = "address", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_guid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "address", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_guid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "IOStream"
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_address_get_stream_sync" g_dbus_address_get_stream_sync ::
CString -> -- address : TBasicType TUTF8
CString -> -- out_guid : TBasicType TUTF8
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO (Ptr IOStream)
dbusAddressGetStreamSync ::
(MonadIO m, CancellableK a) =>
T.Text -> -- address
T.Text -> -- out_guid
Maybe (a) -> -- cancellable
m IOStream
dbusAddressGetStreamSync address out_guid cancellable = liftIO $ do
address' <- textToCString address
out_guid' <- textToCString out_guid
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_address_get_stream_sync address' out_guid' maybeCancellable
checkUnexpectedReturnNULL "g_dbus_address_get_stream_sync" result
result' <- (wrapObject IOStream) result
whenJust cancellable touchManagedPtr
freeMem address'
freeMem out_guid'
return result'
) (do
freeMem address'
freeMem out_guid'
)
-- function g_dbus_address_get_stream_finish
-- Args : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_guid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_guid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "IOStream"
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_address_get_stream_finish" g_dbus_address_get_stream_finish ::
Ptr AsyncResult -> -- res : TInterface "Gio" "AsyncResult"
CString -> -- out_guid : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO (Ptr IOStream)
dbusAddressGetStreamFinish ::
(MonadIO m, AsyncResultK a) =>
a -> -- res
T.Text -> -- out_guid
m IOStream
dbusAddressGetStreamFinish res out_guid = liftIO $ do
let res' = unsafeManagedPtrCastPtr res
out_guid' <- textToCString out_guid
onException (do
result <- propagateGError $ g_dbus_address_get_stream_finish res' out_guid'
checkUnexpectedReturnNULL "g_dbus_address_get_stream_finish" result
result' <- (wrapObject IOStream) result
touchManagedPtr res
freeMem out_guid'
return result'
) (do
freeMem out_guid'
)
-- function g_dbus_address_get_stream
-- Args : [Arg {argName = "address", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "address", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_address_get_stream" g_dbus_address_get_stream ::
CString -> -- address : TBasicType TUTF8
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
IO ()
dbusAddressGetStream ::
(MonadIO m, CancellableK a) =>
T.Text -> -- address
Maybe (a) -> -- cancellable
Maybe (AsyncReadyCallback) -> -- callback
m ()
dbusAddressGetStream address cancellable callback = liftIO $ do
address' <- textToCString address
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let user_data = nullPtr
g_dbus_address_get_stream address' maybeCancellable maybeCallback user_data
whenJust cancellable touchManagedPtr
freeMem address'
return ()
-- function g_dbus_address_get_for_bus_sync
-- Args : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : True
-- Skip return : False
foreign import ccall "g_dbus_address_get_for_bus_sync" g_dbus_address_get_for_bus_sync ::
CUInt -> -- bus_type : TInterface "Gio" "BusType"
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO CString
dbusAddressGetForBusSync ::
(MonadIO m, CancellableK a) =>
BusType -> -- bus_type
Maybe (a) -> -- cancellable
m T.Text
dbusAddressGetForBusSync bus_type cancellable = liftIO $ do
let bus_type' = (fromIntegral . fromEnum) bus_type
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_address_get_for_bus_sync bus_type' maybeCancellable
checkUnexpectedReturnNULL "g_dbus_address_get_for_bus_sync" result
result' <- cstringToText result
freeMem result
whenJust cancellable touchManagedPtr
return result'
) (do
return ()
)
-- function g_dbus_address_escape_value
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_dbus_address_escape_value" g_dbus_address_escape_value ::
CString -> -- string : TBasicType TUTF8
IO CString
dbusAddressEscapeValue ::
(MonadIO m) =>
T.Text -> -- string
m T.Text
dbusAddressEscapeValue string = liftIO $ do
string' <- textToCString string
result <- g_dbus_address_escape_value string'
checkUnexpectedReturnNULL "g_dbus_address_escape_value" result
result' <- cstringToText result
freeMem result
freeMem string'
return result'
-- function g_content_types_get_registered
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TGList (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "g_content_types_get_registered" g_content_types_get_registered ::
IO (Ptr (GList CString))
contentTypesGetRegistered ::
(MonadIO m) =>
m [T.Text]
contentTypesGetRegistered = liftIO $ do
result <- g_content_types_get_registered
checkUnexpectedReturnNULL "g_content_types_get_registered" result
result' <- unpackGList result
result'' <- mapM cstringToText result'
mapGList freeMem result
g_list_free result
return result''
-- function g_content_type_is_unknown
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_is_unknown" g_content_type_is_unknown ::
CString -> -- type : TBasicType TUTF8
IO CInt
contentTypeIsUnknown ::
(MonadIO m) =>
T.Text -> -- type
m Bool
contentTypeIsUnknown type_ = liftIO $ do
type_' <- textToCString type_
result <- g_content_type_is_unknown type_'
let result' = (/= 0) result
freeMem type_'
return result'
-- function g_content_type_is_a
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "supertype", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "supertype", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_is_a" g_content_type_is_a ::
CString -> -- type : TBasicType TUTF8
CString -> -- supertype : TBasicType TUTF8
IO CInt
contentTypeIsA ::
(MonadIO m) =>
T.Text -> -- type
T.Text -> -- supertype
m Bool
contentTypeIsA type_ supertype = liftIO $ do
type_' <- textToCString type_
supertype' <- textToCString supertype
result <- g_content_type_is_a type_' supertype'
let result' = (/= 0) result
freeMem type_'
freeMem supertype'
return result'
-- function g_content_type_guess_for_tree
-- Args : [Arg {argName = "root", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "root", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_guess_for_tree" g_content_type_guess_for_tree ::
Ptr File -> -- root : TInterface "Gio" "File"
IO (Ptr CString)
contentTypeGuessForTree ::
(MonadIO m, FileK a) =>
a -> -- root
m [T.Text]
contentTypeGuessForTree root = liftIO $ do
let root' = unsafeManagedPtrCastPtr root
result <- g_content_type_guess_for_tree root'
checkUnexpectedReturnNULL "g_content_type_guess_for_tree" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr root
return result'
-- function g_content_type_guess
-- Args : [Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data_size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result_uncertain", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "data_size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "data", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_guess" g_content_type_guess ::
CString -> -- filename : TBasicType TUTF8
Ptr Word8 -> -- data : TCArray False (-1) 2 (TBasicType TUInt8)
Word64 -> -- data_size : TBasicType TUInt64
Ptr CInt -> -- result_uncertain : TBasicType TBoolean
IO CString
contentTypeGuess ::
(MonadIO m) =>
Maybe (T.Text) -> -- filename
Maybe (ByteString) -> -- data
m (T.Text,Bool)
contentTypeGuess filename data_ = liftIO $ do
let data_size = case data_ of
Nothing -> 0
Just jData_ -> fromIntegral $ B.length jData_
maybeFilename <- case filename of
Nothing -> return nullPtr
Just jFilename -> do
jFilename' <- textToCString jFilename
return jFilename'
maybeData_ <- case data_ of
Nothing -> return nullPtr
Just jData_ -> do
jData_' <- packByteString jData_
return jData_'
result_uncertain <- allocMem :: IO (Ptr CInt)
result <- g_content_type_guess maybeFilename maybeData_ data_size result_uncertain
checkUnexpectedReturnNULL "g_content_type_guess" result
result' <- cstringToText result
freeMem result
result_uncertain' <- peek result_uncertain
let result_uncertain'' = (/= 0) result_uncertain'
freeMem maybeFilename
freeMem maybeData_
freeMem result_uncertain
return (result', result_uncertain'')
-- function g_content_type_get_symbolic_icon
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_get_symbolic_icon" g_content_type_get_symbolic_icon ::
CString -> -- type : TBasicType TUTF8
IO (Ptr Icon)
contentTypeGetSymbolicIcon ::
(MonadIO m) =>
T.Text -> -- type
m Icon
contentTypeGetSymbolicIcon type_ = liftIO $ do
type_' <- textToCString type_
result <- g_content_type_get_symbolic_icon type_'
checkUnexpectedReturnNULL "g_content_type_get_symbolic_icon" result
result' <- (wrapObject Icon) result
freeMem type_'
return result'
-- function g_content_type_get_mime_type
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_get_mime_type" g_content_type_get_mime_type ::
CString -> -- type : TBasicType TUTF8
IO CString
contentTypeGetMimeType ::
(MonadIO m) =>
T.Text -> -- type
m T.Text
contentTypeGetMimeType type_ = liftIO $ do
type_' <- textToCString type_
result <- g_content_type_get_mime_type type_'
checkUnexpectedReturnNULL "g_content_type_get_mime_type" result
result' <- cstringToText result
freeMem result
freeMem type_'
return result'
-- function g_content_type_get_icon
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_get_icon" g_content_type_get_icon ::
CString -> -- type : TBasicType TUTF8
IO (Ptr Icon)
contentTypeGetIcon ::
(MonadIO m) =>
T.Text -> -- type
m Icon
contentTypeGetIcon type_ = liftIO $ do
type_' <- textToCString type_
result <- g_content_type_get_icon type_'
checkUnexpectedReturnNULL "g_content_type_get_icon" result
result' <- (wrapObject Icon) result
freeMem type_'
return result'
-- function g_content_type_get_generic_icon_name
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_get_generic_icon_name" g_content_type_get_generic_icon_name ::
CString -> -- type : TBasicType TUTF8
IO CString
contentTypeGetGenericIconName ::
(MonadIO m) =>
T.Text -> -- type
m T.Text
contentTypeGetGenericIconName type_ = liftIO $ do
type_' <- textToCString type_
result <- g_content_type_get_generic_icon_name type_'
checkUnexpectedReturnNULL "g_content_type_get_generic_icon_name" result
result' <- cstringToText result
freeMem result
freeMem type_'
return result'
-- function g_content_type_get_description
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_get_description" g_content_type_get_description ::
CString -> -- type : TBasicType TUTF8
IO CString
contentTypeGetDescription ::
(MonadIO m) =>
T.Text -> -- type
m T.Text
contentTypeGetDescription type_ = liftIO $ do
type_' <- textToCString type_
result <- g_content_type_get_description type_'
checkUnexpectedReturnNULL "g_content_type_get_description" result
result' <- cstringToText result
freeMem result
freeMem type_'
return result'
-- function g_content_type_from_mime_type
-- Args : [Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_from_mime_type" g_content_type_from_mime_type ::
CString -> -- mime_type : TBasicType TUTF8
IO CString
contentTypeFromMimeType ::
(MonadIO m) =>
T.Text -> -- mime_type
m T.Text
contentTypeFromMimeType mime_type = liftIO $ do
mime_type' <- textToCString mime_type
result <- g_content_type_from_mime_type mime_type'
checkUnexpectedReturnNULL "g_content_type_from_mime_type" result
result' <- cstringToText result
freeMem result
freeMem mime_type'
return result'
-- function g_content_type_equals
-- Args : [Arg {argName = "type1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_equals" g_content_type_equals ::
CString -> -- type1 : TBasicType TUTF8
CString -> -- type2 : TBasicType TUTF8
IO CInt
contentTypeEquals ::
(MonadIO m) =>
T.Text -> -- type1
T.Text -> -- type2
m Bool
contentTypeEquals type1 type2 = liftIO $ do
type1' <- textToCString type1
type2' <- textToCString type2
result <- g_content_type_equals type1' type2'
let result' = (/= 0) result
freeMem type1'
freeMem type2'
return result'
-- function g_content_type_can_be_executable
-- Args : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_content_type_can_be_executable" g_content_type_can_be_executable ::
CString -> -- type : TBasicType TUTF8
IO CInt
contentTypeCanBeExecutable ::
(MonadIO m) =>
T.Text -> -- type
m Bool
contentTypeCanBeExecutable type_ = liftIO $ do
type_' <- textToCString type_
result <- g_content_type_can_be_executable type_'
let result' = (/= 0) result
freeMem type_'
return result'
-- function g_bus_watch_name_on_connection_with_closures
-- Args : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameWatcherFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_appeared_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_vanished_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameWatcherFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_appeared_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_vanished_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_bus_watch_name_on_connection_with_closures" g_bus_watch_name_on_connection_with_closures ::
Ptr DBusConnection -> -- connection : TInterface "Gio" "DBusConnection"
CString -> -- name : TBasicType TUTF8
CUInt -> -- flags : TInterface "Gio" "BusNameWatcherFlags"
Ptr Closure -> -- name_appeared_closure : TInterface "GObject" "Closure"
Ptr Closure -> -- name_vanished_closure : TInterface "GObject" "Closure"
IO Word32
busWatchNameOnConnection ::
(MonadIO m, DBusConnectionK a) =>
a -> -- connection
T.Text -> -- name
[BusNameWatcherFlags] -> -- flags
Maybe (Closure) -> -- name_appeared_closure
Maybe (Closure) -> -- name_vanished_closure
m Word32
busWatchNameOnConnection connection name flags name_appeared_closure name_vanished_closure = liftIO $ do
let connection' = unsafeManagedPtrCastPtr connection
name' <- textToCString name
let flags' = gflagsToWord flags
maybeName_appeared_closure <- case name_appeared_closure of
Nothing -> return nullPtr
Just jName_appeared_closure -> do
let jName_appeared_closure' = unsafeManagedPtrGetPtr jName_appeared_closure
return jName_appeared_closure'
maybeName_vanished_closure <- case name_vanished_closure of
Nothing -> return nullPtr
Just jName_vanished_closure -> do
let jName_vanished_closure' = unsafeManagedPtrGetPtr jName_vanished_closure
return jName_vanished_closure'
result <- g_bus_watch_name_on_connection_with_closures connection' name' flags' maybeName_appeared_closure maybeName_vanished_closure
touchManagedPtr connection
whenJust name_appeared_closure touchManagedPtr
whenJust name_vanished_closure touchManagedPtr
freeMem name'
return result
-- function g_bus_watch_name_with_closures
-- Args : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameWatcherFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_appeared_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_vanished_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameWatcherFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_appeared_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_vanished_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_bus_watch_name_with_closures" g_bus_watch_name_with_closures ::
CUInt -> -- bus_type : TInterface "Gio" "BusType"
CString -> -- name : TBasicType TUTF8
CUInt -> -- flags : TInterface "Gio" "BusNameWatcherFlags"
Ptr Closure -> -- name_appeared_closure : TInterface "GObject" "Closure"
Ptr Closure -> -- name_vanished_closure : TInterface "GObject" "Closure"
IO Word32
busWatchName ::
(MonadIO m) =>
BusType -> -- bus_type
T.Text -> -- name
[BusNameWatcherFlags] -> -- flags
Maybe (Closure) -> -- name_appeared_closure
Maybe (Closure) -> -- name_vanished_closure
m Word32
busWatchName bus_type name flags name_appeared_closure name_vanished_closure = liftIO $ do
let bus_type' = (fromIntegral . fromEnum) bus_type
name' <- textToCString name
let flags' = gflagsToWord flags
maybeName_appeared_closure <- case name_appeared_closure of
Nothing -> return nullPtr
Just jName_appeared_closure -> do
let jName_appeared_closure' = unsafeManagedPtrGetPtr jName_appeared_closure
return jName_appeared_closure'
maybeName_vanished_closure <- case name_vanished_closure of
Nothing -> return nullPtr
Just jName_vanished_closure -> do
let jName_vanished_closure' = unsafeManagedPtrGetPtr jName_vanished_closure
return jName_vanished_closure'
result <- g_bus_watch_name_with_closures bus_type' name' flags' maybeName_appeared_closure maybeName_vanished_closure
whenJust name_appeared_closure touchManagedPtr
whenJust name_vanished_closure touchManagedPtr
freeMem name'
return result
-- function g_bus_unwatch_name
-- Args : [Arg {argName = "watcher_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "watcher_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_bus_unwatch_name" g_bus_unwatch_name ::
Word32 -> -- watcher_id : TBasicType TUInt32
IO ()
busUnwatchName ::
(MonadIO m) =>
Word32 -> -- watcher_id
m ()
busUnwatchName watcher_id = liftIO $ do
g_bus_unwatch_name watcher_id
return ()
-- function g_bus_unown_name
-- Args : [Arg {argName = "owner_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "owner_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_bus_unown_name" g_bus_unown_name ::
Word32 -> -- owner_id : TBasicType TUInt32
IO ()
busUnownName ::
(MonadIO m) =>
Word32 -> -- owner_id
m ()
busUnownName owner_id = liftIO $ do
g_bus_unown_name owner_id
return ()
-- function g_bus_own_name_on_connection_with_closures
-- Args : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameOwnerFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_acquired_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_lost_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "connection", argType = TInterface "Gio" "DBusConnection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameOwnerFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_acquired_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_lost_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_bus_own_name_on_connection_with_closures" g_bus_own_name_on_connection_with_closures ::
Ptr DBusConnection -> -- connection : TInterface "Gio" "DBusConnection"
CString -> -- name : TBasicType TUTF8
CUInt -> -- flags : TInterface "Gio" "BusNameOwnerFlags"
Ptr Closure -> -- name_acquired_closure : TInterface "GObject" "Closure"
Ptr Closure -> -- name_lost_closure : TInterface "GObject" "Closure"
IO Word32
busOwnNameOnConnection ::
(MonadIO m, DBusConnectionK a) =>
a -> -- connection
T.Text -> -- name
[BusNameOwnerFlags] -> -- flags
Maybe (Closure) -> -- name_acquired_closure
Maybe (Closure) -> -- name_lost_closure
m Word32
busOwnNameOnConnection connection name flags name_acquired_closure name_lost_closure = liftIO $ do
let connection' = unsafeManagedPtrCastPtr connection
name' <- textToCString name
let flags' = gflagsToWord flags
maybeName_acquired_closure <- case name_acquired_closure of
Nothing -> return nullPtr
Just jName_acquired_closure -> do
let jName_acquired_closure' = unsafeManagedPtrGetPtr jName_acquired_closure
return jName_acquired_closure'
maybeName_lost_closure <- case name_lost_closure of
Nothing -> return nullPtr
Just jName_lost_closure -> do
let jName_lost_closure' = unsafeManagedPtrGetPtr jName_lost_closure
return jName_lost_closure'
result <- g_bus_own_name_on_connection_with_closures connection' name' flags' maybeName_acquired_closure maybeName_lost_closure
touchManagedPtr connection
whenJust name_acquired_closure touchManagedPtr
whenJust name_lost_closure touchManagedPtr
freeMem name'
return result
-- function g_bus_own_name_with_closures
-- Args : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameOwnerFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bus_acquired_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_acquired_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_lost_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "BusNameOwnerFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bus_acquired_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_acquired_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name_lost_closure", argType = TInterface "GObject" "Closure", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_bus_own_name_with_closures" g_bus_own_name_with_closures ::
CUInt -> -- bus_type : TInterface "Gio" "BusType"
CString -> -- name : TBasicType TUTF8
CUInt -> -- flags : TInterface "Gio" "BusNameOwnerFlags"
Ptr Closure -> -- bus_acquired_closure : TInterface "GObject" "Closure"
Ptr Closure -> -- name_acquired_closure : TInterface "GObject" "Closure"
Ptr Closure -> -- name_lost_closure : TInterface "GObject" "Closure"
IO Word32
busOwnName ::
(MonadIO m) =>
BusType -> -- bus_type
T.Text -> -- name
[BusNameOwnerFlags] -> -- flags
Maybe (Closure) -> -- bus_acquired_closure
Maybe (Closure) -> -- name_acquired_closure
Maybe (Closure) -> -- name_lost_closure
m Word32
busOwnName bus_type name flags bus_acquired_closure name_acquired_closure name_lost_closure = liftIO $ do
let bus_type' = (fromIntegral . fromEnum) bus_type
name' <- textToCString name
let flags' = gflagsToWord flags
maybeBus_acquired_closure <- case bus_acquired_closure of
Nothing -> return nullPtr
Just jBus_acquired_closure -> do
let jBus_acquired_closure' = unsafeManagedPtrGetPtr jBus_acquired_closure
return jBus_acquired_closure'
maybeName_acquired_closure <- case name_acquired_closure of
Nothing -> return nullPtr
Just jName_acquired_closure -> do
let jName_acquired_closure' = unsafeManagedPtrGetPtr jName_acquired_closure
return jName_acquired_closure'
maybeName_lost_closure <- case name_lost_closure of
Nothing -> return nullPtr
Just jName_lost_closure -> do
let jName_lost_closure' = unsafeManagedPtrGetPtr jName_lost_closure
return jName_lost_closure'
result <- g_bus_own_name_with_closures bus_type' name' flags' maybeBus_acquired_closure maybeName_acquired_closure maybeName_lost_closure
whenJust bus_acquired_closure touchManagedPtr
whenJust name_acquired_closure touchManagedPtr
whenJust name_lost_closure touchManagedPtr
freeMem name'
return result
-- function g_bus_get_sync
-- Args : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusConnection"
-- throws : True
-- Skip return : False
foreign import ccall "g_bus_get_sync" g_bus_get_sync ::
CUInt -> -- bus_type : TInterface "Gio" "BusType"
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
Ptr (Ptr GError) -> -- error
IO (Ptr DBusConnection)
busGetSync ::
(MonadIO m, CancellableK a) =>
BusType -> -- bus_type
Maybe (a) -> -- cancellable
m DBusConnection
busGetSync bus_type cancellable = liftIO $ do
let bus_type' = (fromIntegral . fromEnum) bus_type
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_bus_get_sync bus_type' maybeCancellable
checkUnexpectedReturnNULL "g_bus_get_sync" result
result' <- (wrapObject DBusConnection) result
whenJust cancellable touchManagedPtr
return result'
) (do
return ()
)
-- function g_bus_get_finish
-- Args : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "res", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "DBusConnection"
-- throws : True
-- Skip return : False
foreign import ccall "g_bus_get_finish" g_bus_get_finish ::
Ptr AsyncResult -> -- res : TInterface "Gio" "AsyncResult"
Ptr (Ptr GError) -> -- error
IO (Ptr DBusConnection)
busGetFinish ::
(MonadIO m, AsyncResultK a) =>
a -> -- res
m DBusConnection
busGetFinish res = liftIO $ do
let res' = unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_bus_get_finish res'
checkUnexpectedReturnNULL "g_bus_get_finish" result
result' <- (wrapObject DBusConnection) result
touchManagedPtr res
return result'
) (do
return ()
)
-- function g_bus_get
-- Args : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bus_type", argType = TInterface "Gio" "BusType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_bus_get" g_bus_get ::
CUInt -> -- bus_type : TInterface "Gio" "BusType"
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
IO ()
busGet ::
(MonadIO m, CancellableK a) =>
BusType -> -- bus_type
Maybe (a) -> -- cancellable
Maybe (AsyncReadyCallback) -> -- callback
m ()
busGet bus_type cancellable callback = liftIO $ do
let bus_type' = (fromIntegral . fromEnum) bus_type
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let user_data = nullPtr
g_bus_get bus_type' maybeCancellable maybeCallback user_data
whenJust cancellable touchManagedPtr
return ()
-- function g_async_initable_newv_async
-- Args : [Arg {argName = "object_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_parameters", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TInterface "GObject" "Parameter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "io_priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 6, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "object_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_parameters", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parameters", argType = TInterface "GObject" "Parameter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "io_priority", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 6, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_async_initable_newv_async" g_async_initable_newv_async ::
CGType -> -- object_type : TBasicType TGType
Word32 -> -- n_parameters : TBasicType TUInt32
Ptr GObject.Parameter -> -- parameters : TInterface "GObject" "Parameter"
Int32 -> -- io_priority : TBasicType TInt32
Ptr Cancellable -> -- cancellable : TInterface "Gio" "Cancellable"
FunPtr AsyncReadyCallbackC -> -- callback : TInterface "Gio" "AsyncReadyCallback"
Ptr () -> -- user_data : TBasicType TVoid
IO ()
asyncInitableNewvAsync ::
(MonadIO m, CancellableK a) =>
GType -> -- object_type
Word32 -> -- n_parameters
GObject.Parameter -> -- parameters
Int32 -> -- io_priority
Maybe (a) -> -- cancellable
Maybe (AsyncReadyCallback) -> -- callback
m ()
asyncInitableNewvAsync object_type n_parameters parameters io_priority cancellable callback = liftIO $ do
let object_type' = gtypeToCGType object_type
let parameters' = unsafeManagedPtrGetPtr parameters
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
let jCancellable' = unsafeManagedPtrCastPtr jCancellable
return jCancellable'
ptrcallback <- callocMem :: IO (Ptr (FunPtr AsyncReadyCallbackC))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
jCallback' <- mkAsyncReadyCallback (asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
poke ptrcallback jCallback'
return jCallback'
let user_data = nullPtr
g_async_initable_newv_async object_type' n_parameters parameters' io_priority maybeCancellable maybeCallback user_data
touchManagedPtr parameters
whenJust cancellable touchManagedPtr
return ()
-- function g_app_info_reset_type_associations
-- Args : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_app_info_reset_type_associations" g_app_info_reset_type_associations ::
CString -> -- content_type : TBasicType TUTF8
IO ()
appInfoResetTypeAssociations ::
(MonadIO m) =>
T.Text -> -- content_type
m ()
appInfoResetTypeAssociations content_type = liftIO $ do
content_type' <- textToCString content_type
g_app_info_reset_type_associations content_type'
freeMem content_type'
return ()
-- function g_app_info_launch_default_for_uri
-- Args : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "launch_context", argType = TInterface "Gio" "AppLaunchContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "launch_context", argType = TInterface "Gio" "AppLaunchContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False
foreign import ccall "g_app_info_launch_default_for_uri" g_app_info_launch_default_for_uri ::
CString -> -- uri : TBasicType TUTF8
Ptr AppLaunchContext -> -- launch_context : TInterface "Gio" "AppLaunchContext"
Ptr (Ptr GError) -> -- error
IO CInt
appInfoLaunchDefaultForUri ::
(MonadIO m, AppLaunchContextK a) =>
T.Text -> -- uri
Maybe (a) -> -- launch_context
m ()
appInfoLaunchDefaultForUri uri launch_context = liftIO $ do
uri' <- textToCString uri
maybeLaunch_context <- case launch_context of
Nothing -> return nullPtr
Just jLaunch_context -> do
let jLaunch_context' = unsafeManagedPtrCastPtr jLaunch_context
return jLaunch_context'
onException (do
_ <- propagateGError $ g_app_info_launch_default_for_uri uri' maybeLaunch_context
whenJust launch_context touchManagedPtr
freeMem uri'
return ()
) (do
freeMem uri'
)
-- function g_app_info_get_recommended_for_type
-- Args : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gio" "AppInfo")
-- throws : False
-- Skip return : False
foreign import ccall "g_app_info_get_recommended_for_type" g_app_info_get_recommended_for_type ::
CString -> -- content_type : TBasicType TUTF8
IO (Ptr (GList (Ptr AppInfo)))
appInfoGetRecommendedForType ::
(MonadIO m) =>
T.Text -> -- content_type
m [AppInfo]
appInfoGetRecommendedForType content_type = liftIO $ do
content_type' <- textToCString content_type
result <- g_app_info_get_recommended_for_type content_type'
checkUnexpectedReturnNULL "g_app_info_get_recommended_for_type" result
result' <- unpackGList result
result'' <- mapM (wrapObject AppInfo) result'
g_list_free result
freeMem content_type'
return result''
-- function g_app_info_get_fallback_for_type
-- Args : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gio" "AppInfo")
-- throws : False
-- Skip return : False
foreign import ccall "g_app_info_get_fallback_for_type" g_app_info_get_fallback_for_type ::
CString -> -- content_type : TBasicType TUTF8
IO (Ptr (GList (Ptr AppInfo)))
appInfoGetFallbackForType ::
(MonadIO m) =>
T.Text -> -- content_type
m [AppInfo]
appInfoGetFallbackForType content_type = liftIO $ do
content_type' <- textToCString content_type
result <- g_app_info_get_fallback_for_type content_type'
checkUnexpectedReturnNULL "g_app_info_get_fallback_for_type" result
result' <- unpackGList result
result'' <- mapM (wrapObject AppInfo) result'
g_list_free result
freeMem content_type'
return result''
-- function g_app_info_get_default_for_uri_scheme
-- Args : [Arg {argName = "uri_scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "uri_scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "AppInfo"
-- throws : False
-- Skip return : False
foreign import ccall "g_app_info_get_default_for_uri_scheme" g_app_info_get_default_for_uri_scheme ::
CString -> -- uri_scheme : TBasicType TUTF8
IO (Ptr AppInfo)
appInfoGetDefaultForUriScheme ::
(MonadIO m) =>
T.Text -> -- uri_scheme
m AppInfo
appInfoGetDefaultForUriScheme uri_scheme = liftIO $ do
uri_scheme' <- textToCString uri_scheme
result <- g_app_info_get_default_for_uri_scheme uri_scheme'
checkUnexpectedReturnNULL "g_app_info_get_default_for_uri_scheme" result
result' <- (wrapObject AppInfo) result
freeMem uri_scheme'
return result'
-- function g_app_info_get_default_for_type
-- Args : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "must_support_uris", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "must_support_uris", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "AppInfo"
-- throws : False
-- Skip return : False
foreign import ccall "g_app_info_get_default_for_type" g_app_info_get_default_for_type ::
CString -> -- content_type : TBasicType TUTF8
CInt -> -- must_support_uris : TBasicType TBoolean
IO (Ptr AppInfo)
appInfoGetDefaultForType ::
(MonadIO m) =>
T.Text -> -- content_type
Bool -> -- must_support_uris
m AppInfo
appInfoGetDefaultForType content_type must_support_uris = liftIO $ do
content_type' <- textToCString content_type
let must_support_uris' = (fromIntegral . fromEnum) must_support_uris
result <- g_app_info_get_default_for_type content_type' must_support_uris'
checkUnexpectedReturnNULL "g_app_info_get_default_for_type" result
result' <- (wrapObject AppInfo) result
freeMem content_type'
return result'
-- function g_app_info_get_all_for_type
-- Args : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "Gio" "AppInfo")
-- throws : False
-- Skip return : False
foreign import ccall "g_app_info_get_all_for_type" g_app_info_get_all_for_type ::
CString -> -- content_type : TBasicType TUTF8
IO (Ptr (GList (Ptr AppInfo)))
appInfoGetAllForType ::
(MonadIO m) =>
T.Text -> -- content_type
m [AppInfo]
appInfoGetAllForType content_type = liftIO $ do
content_type' <- textToCString content_type
result <- g_app_info_get_all_for_type content_type'
checkUnexpectedReturnNULL "g_app_info_get_all_for_type" result
result' <- unpackGList result
result'' <- mapM (wrapObject AppInfo) result'
g_list_free result
freeMem content_type'
return result''
-- function g_app_info_get_all
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TGList (TInterface "Gio" "AppInfo")
-- throws : False
-- Skip return : False
foreign import ccall "g_app_info_get_all" g_app_info_get_all ::
IO (Ptr (GList (Ptr AppInfo)))
appInfoGetAll ::
(MonadIO m) =>
m [AppInfo]
appInfoGetAll = liftIO $ do
result <- g_app_info_get_all
checkUnexpectedReturnNULL "g_app_info_get_all" result
result' <- unpackGList result
result'' <- mapM (wrapObject AppInfo) result'
g_list_free result
return result''
-- function g_app_info_create_from_commandline
-- Args : [Arg {argName = "commandline", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "AppInfoCreateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "commandline", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "AppInfoCreateFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "AppInfo"
-- throws : True
-- Skip return : False
foreign import ccall "g_app_info_create_from_commandline" g_app_info_create_from_commandline ::
CString -> -- commandline : TBasicType TUTF8
CString -> -- application_name : TBasicType TUTF8
CUInt -> -- flags : TInterface "Gio" "AppInfoCreateFlags"
Ptr (Ptr GError) -> -- error
IO (Ptr AppInfo)
appInfoCreateFromCommandline ::
(MonadIO m) =>
T.Text -> -- commandline
Maybe (T.Text) -> -- application_name
[AppInfoCreateFlags] -> -- flags
m AppInfo
appInfoCreateFromCommandline commandline application_name flags = liftIO $ do
commandline' <- textToCString commandline
maybeApplication_name <- case application_name of
Nothing -> return nullPtr
Just jApplication_name -> do
jApplication_name' <- textToCString jApplication_name
return jApplication_name'
let flags' = gflagsToWord flags
onException (do
result <- propagateGError $ g_app_info_create_from_commandline commandline' maybeApplication_name flags'
checkUnexpectedReturnNULL "g_app_info_create_from_commandline" result
result' <- (wrapObject AppInfo) result
freeMem commandline'
freeMem maybeApplication_name
return result'
) (do
freeMem commandline'
freeMem maybeApplication_name
)
-- function g_action_print_detailed_name
-- Args : [Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_value", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_value", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_action_print_detailed_name" g_action_print_detailed_name ::
CString -> -- action_name : TBasicType TUTF8
Ptr GVariant -> -- target_value : TVariant
IO CString
actionPrintDetailedName ::
(MonadIO m) =>
T.Text -> -- action_name
Maybe (GVariant) -> -- target_value
m T.Text
actionPrintDetailedName action_name target_value = liftIO $ do
action_name' <- textToCString action_name
maybeTarget_value <- case target_value of
Nothing -> return nullPtr
Just jTarget_value -> do
let jTarget_value' = unsafeManagedPtrGetPtr jTarget_value
return jTarget_value'
result <- g_action_print_detailed_name action_name' maybeTarget_value
checkUnexpectedReturnNULL "g_action_print_detailed_name" result
result' <- cstringToText result
freeMem result
freeMem action_name'
return result'
-- function g_action_parse_detailed_name
-- Args : [Arg {argName = "detailed_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "target_value", argType = TVariant, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "detailed_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False
foreign import ccall "g_action_parse_detailed_name" g_action_parse_detailed_name ::
CString -> -- detailed_name : TBasicType TUTF8
Ptr CString -> -- action_name : TBasicType TUTF8
Ptr (Ptr GVariant) -> -- target_value : TVariant
Ptr (Ptr GError) -> -- error
IO CInt
actionParseDetailedName ::
(MonadIO m) =>
T.Text -> -- detailed_name
m (T.Text,GVariant)
actionParseDetailedName detailed_name = liftIO $ do
detailed_name' <- textToCString detailed_name
action_name <- allocMem :: IO (Ptr CString)
target_value <- allocMem :: IO (Ptr (Ptr GVariant))
onException (do
_ <- propagateGError $ g_action_parse_detailed_name detailed_name' action_name target_value
action_name' <- peek action_name
action_name'' <- cstringToText action_name'
freeMem action_name'
target_value' <- peek target_value
target_value'' <- wrapGVariantPtr target_value'
freeMem detailed_name'
freeMem action_name
freeMem target_value
return (action_name'', target_value'')
) (do
freeMem detailed_name'
freeMem action_name
freeMem target_value
)
-- function g_action_name_is_valid
-- Args : [Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "action_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_action_name_is_valid" g_action_name_is_valid ::
CString -> -- action_name : TBasicType TUTF8
IO CInt
actionNameIsValid ::
(MonadIO m) =>
T.Text -> -- action_name
m Bool
actionNameIsValid action_name = liftIO $ do
action_name' <- textToCString action_name
result <- g_action_name_is_valid action_name'
let result' = (/= 0) result
freeMem action_name'
return result'