gi-glib 0.2.46.15 → 2.0.1
raw patch · 148 files changed
+56/−51160 lines, 148 filesdep ~haskell-gi-basedep ~transformersbuild-type:Customsetup-changed
Dependency ranges changed: haskell-gi-base, transformers
Files
- GI/GLib.hs +0/−44
- GI/GLib/Callbacks.hs +0/−2554
- GI/GLib/Constants.hs +0/−545
- GI/GLib/Enums.hs +0/−2152
- GI/GLib/Flags.hs +0/−631
- GI/GLib/Functions.hs +0/−11321
- GI/GLib/Structs.hs +0/−153
- GI/GLib/Structs/AsyncQueue.hs +0/−504
- GI/GLib/Structs/AsyncQueue.hs-boot +0/−24
- GI/GLib/Structs/BookmarkFile.hs +0/−1796
- GI/GLib/Structs/BookmarkFile.hs-boot +0/−49
- GI/GLib/Structs/ByteArray.hs +0/−278
- GI/GLib/Structs/ByteArray.hs-boot +0/−11
- GI/GLib/Structs/Bytes.hs +0/−513
- GI/GLib/Structs/Bytes.hs-boot +0/−21
- GI/GLib/Structs/Checksum.hs +0/−290
- GI/GLib/Structs/Checksum.hs-boot +0/−16
- GI/GLib/Structs/Cond.hs +0/−343
- GI/GLib/Structs/Cond.hs-boot +0/−17
- GI/GLib/Structs/Data.hs +0/−58
- GI/GLib/Structs/Data.hs-boot +0/−11
- GI/GLib/Structs/Date.hs +0/−1849
- GI/GLib/Structs/Date.hs-boot +0/−45
- GI/GLib/Structs/DateTime.hs +0/−1663
- GI/GLib/Structs/DateTime.hs-boot +0/−45
- GI/GLib/Structs/DebugKey.hs +0/−141
- GI/GLib/Structs/DebugKey.hs-boot +0/−11
- GI/GLib/Structs/Dir.hs +0/−199
- GI/GLib/Structs/Dir.hs-boot +0/−14
- GI/GLib/Structs/HashTableIter.hs +0/−252
- GI/GLib/Structs/HashTableIter.hs-boot +0/−16
- GI/GLib/Structs/Hmac.hs +0/−205
- GI/GLib/Structs/Hmac.hs-boot +0/−15
- GI/GLib/Structs/Hook.hs +0/−543
- GI/GLib/Structs/Hook.hs-boot +0/−12
- GI/GLib/Structs/HookList.hs +0/−383
- GI/GLib/Structs/HookList.hs-boot +0/−15
- GI/GLib/Structs/IConv.hs +0/−93
- GI/GLib/Structs/IConv.hs-boot +0/−12
- GI/GLib/Structs/IOChannel.hs +0/−1372
- GI/GLib/Structs/IOChannel.hs-boot +0/−41
- GI/GLib/Structs/IOFuncs.hs +0/−76
- GI/GLib/Structs/IOFuncs.hs-boot +0/−11
- GI/GLib/Structs/KeyFile.hs +0/−2168
- GI/GLib/Structs/KeyFile.hs-boot +0/−54
- GI/GLib/Structs/MainContext.hs +0/−935
- GI/GLib/Structs/MainContext.hs-boot +0/−32
- GI/GLib/Structs/MainLoop.hs +0/−299
- GI/GLib/Structs/MainLoop.hs-boot +0/−17
- GI/GLib/Structs/MappedFile.hs +0/−338
- GI/GLib/Structs/MappedFile.hs-boot +0/−17
- GI/GLib/Structs/MarkupParseContext.hs +0/−359
- GI/GLib/Structs/MarkupParseContext.hs-boot +0/−18
- GI/GLib/Structs/MarkupParser.hs +0/−78
- GI/GLib/Structs/MarkupParser.hs-boot +0/−11
- GI/GLib/Structs/MatchInfo.hs +0/−620
- GI/GLib/Structs/MatchInfo.hs-boot +0/−26
- GI/GLib/Structs/MemVTable.hs +0/−72
- GI/GLib/Structs/MemVTable.hs-boot +0/−11
- GI/GLib/Structs/Node.hs +0/−609
- GI/GLib/Structs/Node.hs-boot +0/−21
- GI/GLib/Structs/Once.hs +0/−197
- GI/GLib/Structs/Once.hs-boot +0/−11
- GI/GLib/Structs/OptionContext.hs +0/−845
- GI/GLib/Structs/OptionContext.hs-boot +0/−31
- GI/GLib/Structs/OptionEntry.hs +0/−320
- GI/GLib/Structs/OptionEntry.hs-boot +0/−11
- GI/GLib/Structs/OptionGroup.hs +0/−332
- GI/GLib/Structs/OptionGroup.hs-boot +0/−17
- GI/GLib/Structs/PatternSpec.hs +0/−131
- GI/GLib/Structs/PatternSpec.hs-boot +0/−13
- GI/GLib/Structs/PollFD.hs +0/−165
- GI/GLib/Structs/PollFD.hs-boot +0/−11
- GI/GLib/Structs/PtrArray.hs +0/−138
- GI/GLib/Structs/PtrArray.hs-boot +0/−11
- GI/GLib/Structs/Queue.hs +0/−629
- GI/GLib/Structs/Queue.hs-boot +0/−24
- GI/GLib/Structs/RWLock.hs +0/−394
- GI/GLib/Structs/RWLock.hs-boot +0/−19
- GI/GLib/Structs/Rand.hs +0/−309
- GI/GLib/Structs/Rand.hs-boot +0/−18
- GI/GLib/Structs/RecMutex.hs +0/−247
- GI/GLib/Structs/RecMutex.hs-boot +0/−16
- GI/GLib/Structs/Regex.hs +0/−1134
- GI/GLib/Structs/Regex.hs-boot +0/−29
- GI/GLib/Structs/Scanner.hs +0/−1081
- GI/GLib/Structs/Scanner.hs-boot +0/−25
- GI/GLib/Structs/ScannerConfig.hs +0/−910
- GI/GLib/Structs/ScannerConfig.hs-boot +0/−11
- GI/GLib/Structs/Sequence.hs +0/−310
- GI/GLib/Structs/Sequence.hs-boot +0/−13
- GI/GLib/Structs/SequenceIter.hs +0/−198
- GI/GLib/Structs/SequenceIter.hs-boot +0/−15
- GI/GLib/Structs/Source.hs +0/−1179
- GI/GLib/Structs/Source.hs-boot +0/−38
- GI/GLib/Structs/SourceCallbackFuncs.hs +0/−70
- GI/GLib/Structs/SourceCallbackFuncs.hs-boot +0/−11
- GI/GLib/Structs/SourceFuncs.hs +0/−89
- GI/GLib/Structs/SourceFuncs.hs-boot +0/−11
- GI/GLib/Structs/StatBuf.hs +0/−59
- GI/GLib/Structs/StatBuf.hs-boot +0/−11
- GI/GLib/Structs/String.hs +0/−1216
- GI/GLib/Structs/String.hs-boot +0/−38
- GI/GLib/Structs/StringChunk.hs +0/−248
- GI/GLib/Structs/StringChunk.hs-boot +0/−16
- GI/GLib/Structs/TestCase.hs +0/−56
- GI/GLib/Structs/TestCase.hs-boot +0/−11
- GI/GLib/Structs/TestConfig.hs +0/−266
- GI/GLib/Structs/TestConfig.hs-boot +0/−11
- GI/GLib/Structs/TestLogBuffer.hs +0/−138
- GI/GLib/Structs/TestLogBuffer.hs-boot +0/−13
- GI/GLib/Structs/TestLogMsg.hs +0/−269
- GI/GLib/Structs/TestLogMsg.hs-boot +0/−12
- GI/GLib/Structs/TestSuite.hs +0/−133
- GI/GLib/Structs/TestSuite.hs-boot +0/−13
- GI/GLib/Structs/Thread.hs +0/−235
- GI/GLib/Structs/Thread.hs-boot +0/−13
- GI/GLib/Structs/ThreadPool.hs +0/−541
- GI/GLib/Structs/ThreadPool.hs-boot +0/−18
- GI/GLib/Structs/TimeVal.hs +0/−243
- GI/GLib/Structs/TimeVal.hs-boot +0/−13
- GI/GLib/Structs/TimeZone.hs +0/−395
- GI/GLib/Structs/TimeZone.hs-boot +0/−18
- GI/GLib/Structs/Timer.hs +0/−260
- GI/GLib/Structs/Timer.hs-boot +0/−17
- GI/GLib/Structs/TrashStack.hs +0/−169
- GI/GLib/Structs/TrashStack.hs-boot +0/−11
- GI/GLib/Structs/Tree.hs +0/−379
- GI/GLib/Structs/Tree.hs-boot +0/−20
- GI/GLib/Structs/VariantBuilder.hs +0/−315
- GI/GLib/Structs/VariantBuilder.hs-boot +0/−17
- GI/GLib/Structs/VariantDict.hs +0/−490
- GI/GLib/Structs/VariantDict.hs-boot +0/−19
- GI/GLib/Structs/VariantType.hs +0/−1180
- GI/GLib/Structs/VariantType.hs-boot +0/−32
- GI/GLib/Types.hs +0/−148
- GI/GLib/Unions.hs +0/−33
- GI/GLib/Unions/DoubleIEEE754.hs +0/−101
- GI/GLib/Unions/DoubleIEEE754.hs-boot +0/−11
- GI/GLib/Unions/FloatIEEE754.hs +0/−101
- GI/GLib/Unions/FloatIEEE754.hs-boot +0/−11
- GI/GLib/Unions/Mutex.hs +0/−234
- GI/GLib/Unions/Mutex.hs-boot +0/−16
- GI/GLib/Unions/TokenValue.hs +0/−471
- GI/GLib/Unions/TokenValue.hs-boot +0/−11
- GLib.overrides +31/−0
- Setup.hs +12/−3
- gi-glib.cabal +13/−83
− GI/GLib.hs
@@ -1,44 +0,0 @@---{- |-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.GLib- ( module GI.GLib.Callbacks ,- module GI.GLib.Constants ,- module GI.GLib.Enums ,- module GI.GLib.Flags ,- module GI.GLib.Functions ,- module GI.GLib.Structs ,- module GI.GLib.Unions ,---- module Data.GI.Base ,--- ) where--import GI.GLib.Callbacks-import GI.GLib.Constants-import GI.GLib.Enums-import GI.GLib.Flags-import GI.GLib.Functions-import GI.GLib.Structs-import GI.GLib.Unions--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--import Data.GI.Base-
− GI/GLib/Callbacks.hs
@@ -1,2554 +0,0 @@---{- |-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.GLib.Callbacks- ( -- -- * Signals--- ** ChildWatchFunc- ChildWatchFunc ,- ChildWatchFuncC ,- childWatchFuncClosure ,- childWatchFuncWrapper ,- mkChildWatchFunc ,- noChildWatchFunc ,----- ** CompareDataFunc- CompareDataFunc ,- CompareDataFuncC ,- compareDataFuncClosure ,- compareDataFuncWrapper ,- mkCompareDataFunc ,- noCompareDataFunc ,----- ** CompareFunc- CompareFunc ,- CompareFuncC ,- compareFuncClosure ,- compareFuncWrapper ,- mkCompareFunc ,- noCompareFunc ,----- ** DataForeachFunc- DataForeachFunc ,- DataForeachFuncC ,- dataForeachFuncClosure ,- dataForeachFuncWrapper ,- mkDataForeachFunc ,- noDataForeachFunc ,----- ** DestroyNotify- DestroyNotify ,- DestroyNotifyC ,- destroyNotifyClosure ,- destroyNotifyWrapper ,- mkDestroyNotify ,- noDestroyNotify ,----- ** EqualFunc- EqualFunc ,- EqualFuncC ,- equalFuncClosure ,- equalFuncWrapper ,- mkEqualFunc ,- noEqualFunc ,----- ** FreeFunc- FreeFunc ,- FreeFuncC ,- freeFuncClosure ,- freeFuncWrapper ,- mkFreeFunc ,- noFreeFunc ,----- ** Func- Func ,- FuncC ,- funcClosure ,- funcWrapper ,- mkFunc ,- noFunc ,----- ** HFunc- HFunc ,- HFuncC ,- hFuncClosure ,- hFuncWrapper ,- mkHFunc ,- noHFunc ,----- ** HRFunc- HRFunc ,- HRFuncC ,- hRFuncClosure ,- hRFuncWrapper ,- mkHRFunc ,- noHRFunc ,----- ** HashFunc- HashFunc ,- HashFuncC ,- hashFuncClosure ,- hashFuncWrapper ,- mkHashFunc ,- noHashFunc ,----- ** HookCheckFunc- HookCheckFunc ,- HookCheckFuncC ,- hookCheckFuncClosure ,- hookCheckFuncWrapper ,- mkHookCheckFunc ,- noHookCheckFunc ,----- ** HookCheckMarshaller- HookCheckMarshaller ,- HookCheckMarshallerC ,- hookCheckMarshallerClosure ,- hookCheckMarshallerWrapper ,- mkHookCheckMarshaller ,- noHookCheckMarshaller ,----- ** HookCompareFunc- HookCompareFunc ,- HookCompareFuncC ,- hookCompareFuncClosure ,- hookCompareFuncWrapper ,- mkHookCompareFunc ,- noHookCompareFunc ,----- ** HookFinalizeFunc- HookFinalizeFunc ,- HookFinalizeFuncC ,- hookFinalizeFuncClosure ,- hookFinalizeFuncWrapper ,- mkHookFinalizeFunc ,- noHookFinalizeFunc ,----- ** HookFindFunc- HookFindFunc ,- HookFindFuncC ,- hookFindFuncClosure ,- hookFindFuncWrapper ,- mkHookFindFunc ,- noHookFindFunc ,----- ** HookFunc- HookFunc ,- HookFuncC ,- hookFuncClosure ,- hookFuncWrapper ,- mkHookFunc ,- noHookFunc ,----- ** HookMarshaller- HookMarshaller ,- HookMarshallerC ,- hookMarshallerClosure ,- hookMarshallerWrapper ,- mkHookMarshaller ,- noHookMarshaller ,----- ** IOFunc- IOFunc ,- IOFuncC ,- iOFuncClosure ,- iOFuncWrapper ,- mkIOFunc ,- noIOFunc ,----- ** IOFuncsIoCloseFieldCallback- IOFuncsIoCloseFieldCallback ,- IOFuncsIoCloseFieldCallbackC ,- iOFuncsIoCloseFieldCallbackClosure ,- iOFuncsIoCloseFieldCallbackWrapper ,- mkIOFuncsIoCloseFieldCallback ,- noIOFuncsIoCloseFieldCallback ,----- ** IOFuncsIoCreateWatchFieldCallback- IOFuncsIoCreateWatchFieldCallback ,- IOFuncsIoCreateWatchFieldCallbackC ,- iOFuncsIoCreateWatchFieldCallbackClosure,- iOFuncsIoCreateWatchFieldCallbackWrapper,- mkIOFuncsIoCreateWatchFieldCallback ,- noIOFuncsIoCreateWatchFieldCallback ,----- ** IOFuncsIoFreeFieldCallback- IOFuncsIoFreeFieldCallback ,- IOFuncsIoFreeFieldCallbackC ,- iOFuncsIoFreeFieldCallbackClosure ,- iOFuncsIoFreeFieldCallbackWrapper ,- mkIOFuncsIoFreeFieldCallback ,- noIOFuncsIoFreeFieldCallback ,----- ** IOFuncsIoGetFlagsFieldCallback- IOFuncsIoGetFlagsFieldCallback ,- IOFuncsIoGetFlagsFieldCallbackC ,- iOFuncsIoGetFlagsFieldCallbackClosure ,- iOFuncsIoGetFlagsFieldCallbackWrapper ,- mkIOFuncsIoGetFlagsFieldCallback ,- noIOFuncsIoGetFlagsFieldCallback ,----- ** IOFuncsIoReadFieldCallback- IOFuncsIoReadFieldCallback ,- IOFuncsIoReadFieldCallbackC ,- iOFuncsIoReadFieldCallbackClosure ,- iOFuncsIoReadFieldCallbackWrapper ,- mkIOFuncsIoReadFieldCallback ,- noIOFuncsIoReadFieldCallback ,----- ** IOFuncsIoSeekFieldCallback- IOFuncsIoSeekFieldCallback ,- IOFuncsIoSeekFieldCallbackC ,- iOFuncsIoSeekFieldCallbackClosure ,- iOFuncsIoSeekFieldCallbackWrapper ,- mkIOFuncsIoSeekFieldCallback ,- noIOFuncsIoSeekFieldCallback ,----- ** IOFuncsIoSetFlagsFieldCallback- IOFuncsIoSetFlagsFieldCallback ,- IOFuncsIoSetFlagsFieldCallbackC ,- iOFuncsIoSetFlagsFieldCallbackClosure ,- iOFuncsIoSetFlagsFieldCallbackWrapper ,- mkIOFuncsIoSetFlagsFieldCallback ,- noIOFuncsIoSetFlagsFieldCallback ,----- ** IOFuncsIoWriteFieldCallback- IOFuncsIoWriteFieldCallback ,- IOFuncsIoWriteFieldCallbackC ,- iOFuncsIoWriteFieldCallbackClosure ,- iOFuncsIoWriteFieldCallbackWrapper ,- mkIOFuncsIoWriteFieldCallback ,- noIOFuncsIoWriteFieldCallback ,----- ** LogFunc- LogFunc ,- LogFuncC ,- logFuncClosure ,- logFuncWrapper ,- mkLogFunc ,- noLogFunc ,----- ** MarkupParserEndElementFieldCallback- MarkupParserEndElementFieldCallback ,- MarkupParserEndElementFieldCallbackC ,- markupParserEndElementFieldCallbackClosure,- markupParserEndElementFieldCallbackWrapper,- mkMarkupParserEndElementFieldCallback ,- noMarkupParserEndElementFieldCallback ,----- ** MarkupParserErrorFieldCallback- MarkupParserErrorFieldCallback ,- MarkupParserErrorFieldCallbackC ,- markupParserErrorFieldCallbackClosure ,- markupParserErrorFieldCallbackWrapper ,- mkMarkupParserErrorFieldCallback ,- noMarkupParserErrorFieldCallback ,----- ** MarkupParserPassthroughFieldCallback- MarkupParserPassthroughFieldCallback ,- MarkupParserPassthroughFieldCallbackC ,- markupParserPassthroughFieldCallbackClosure,- markupParserPassthroughFieldCallbackWrapper,- mkMarkupParserPassthroughFieldCallback ,- noMarkupParserPassthroughFieldCallback ,----- ** MarkupParserStartElementFieldCallback- MarkupParserStartElementFieldCallback ,- MarkupParserStartElementFieldCallbackC ,- markupParserStartElementFieldCallbackClosure,- markupParserStartElementFieldCallbackWrapper,- mkMarkupParserStartElementFieldCallback ,- noMarkupParserStartElementFieldCallback ,----- ** MarkupParserTextFieldCallback- MarkupParserTextFieldCallback ,- MarkupParserTextFieldCallbackC ,- markupParserTextFieldCallbackClosure ,- markupParserTextFieldCallbackWrapper ,- mkMarkupParserTextFieldCallback ,- noMarkupParserTextFieldCallback ,----- ** MemVTableFreeFieldCallback- MemVTableFreeFieldCallback ,- MemVTableFreeFieldCallbackC ,- memVTableFreeFieldCallbackClosure ,- memVTableFreeFieldCallbackWrapper ,- mkMemVTableFreeFieldCallback ,- noMemVTableFreeFieldCallback ,----- ** NodeForeachFunc- NodeForeachFunc ,- NodeForeachFuncC ,- mkNodeForeachFunc ,- noNodeForeachFunc ,- nodeForeachFuncClosure ,- nodeForeachFuncWrapper ,----- ** NodeTraverseFunc- NodeTraverseFunc ,- NodeTraverseFuncC ,- mkNodeTraverseFunc ,- noNodeTraverseFunc ,- nodeTraverseFuncClosure ,- nodeTraverseFuncWrapper ,----- ** OptionArgFunc- OptionArgFunc ,- OptionArgFuncC ,- mkOptionArgFunc ,- noOptionArgFunc ,- optionArgFuncClosure ,- optionArgFuncWrapper ,----- ** OptionErrorFunc- OptionErrorFunc ,- OptionErrorFuncC ,- mkOptionErrorFunc ,- noOptionErrorFunc ,- optionErrorFuncClosure ,- optionErrorFuncWrapper ,----- ** OptionParseFunc- OptionParseFunc ,- OptionParseFuncC ,- mkOptionParseFunc ,- noOptionParseFunc ,- optionParseFuncClosure ,- optionParseFuncWrapper ,----- ** PollFunc- PollFunc ,- PollFuncC ,- mkPollFunc ,- noPollFunc ,- pollFuncClosure ,- pollFuncWrapper ,----- ** PrintFunc- PrintFunc ,- PrintFuncC ,- mkPrintFunc ,- noPrintFunc ,- printFuncClosure ,- printFuncWrapper ,----- ** RegexEvalCallback- RegexEvalCallback ,- RegexEvalCallbackC ,- mkRegexEvalCallback ,- noRegexEvalCallback ,- regexEvalCallbackClosure ,- regexEvalCallbackWrapper ,----- ** ScannerMsgFunc- ScannerMsgFunc ,- ScannerMsgFuncC ,- mkScannerMsgFunc ,- noScannerMsgFunc ,- scannerMsgFuncClosure ,- scannerMsgFuncWrapper ,----- ** SequenceIterCompareFunc- SequenceIterCompareFunc ,- SequenceIterCompareFuncC ,- mkSequenceIterCompareFunc ,- noSequenceIterCompareFunc ,- sequenceIterCompareFuncClosure ,- sequenceIterCompareFuncWrapper ,----- ** SourceCallbackFuncsRefFieldCallback- SourceCallbackFuncsRefFieldCallback ,- SourceCallbackFuncsRefFieldCallbackC ,- mkSourceCallbackFuncsRefFieldCallback ,- noSourceCallbackFuncsRefFieldCallback ,- sourceCallbackFuncsRefFieldCallbackClosure,- sourceCallbackFuncsRefFieldCallbackWrapper,----- ** SourceCallbackFuncsUnrefFieldCallback- SourceCallbackFuncsUnrefFieldCallback ,- SourceCallbackFuncsUnrefFieldCallbackC ,- mkSourceCallbackFuncsUnrefFieldCallback ,- noSourceCallbackFuncsUnrefFieldCallback ,- sourceCallbackFuncsUnrefFieldCallbackClosure,- sourceCallbackFuncsUnrefFieldCallbackWrapper,----- ** SourceDummyMarshal- SourceDummyMarshal ,- SourceDummyMarshalC ,- mkSourceDummyMarshal ,- noSourceDummyMarshal ,- sourceDummyMarshalClosure ,- sourceDummyMarshalWrapper ,----- ** SourceFunc- SourceFunc ,- SourceFuncC ,- mkSourceFunc ,- noSourceFunc ,- sourceFuncClosure ,- sourceFuncWrapper ,----- ** SourceFuncsCheckFieldCallback- SourceFuncsCheckFieldCallback ,- SourceFuncsCheckFieldCallbackC ,- mkSourceFuncsCheckFieldCallback ,- noSourceFuncsCheckFieldCallback ,- sourceFuncsCheckFieldCallbackClosure ,- sourceFuncsCheckFieldCallbackWrapper ,----- ** SourceFuncsFinalizeFieldCallback- SourceFuncsFinalizeFieldCallback ,- SourceFuncsFinalizeFieldCallbackC ,- mkSourceFuncsFinalizeFieldCallback ,- noSourceFuncsFinalizeFieldCallback ,- sourceFuncsFinalizeFieldCallbackClosure ,- sourceFuncsFinalizeFieldCallbackWrapper ,----- ** SourceFuncsPrepareFieldCallback- SourceFuncsPrepareFieldCallback ,- SourceFuncsPrepareFieldCallbackC ,- mkSourceFuncsPrepareFieldCallback ,- noSourceFuncsPrepareFieldCallback ,- sourceFuncsPrepareFieldCallbackClosure ,- sourceFuncsPrepareFieldCallbackWrapper ,----- ** SpawnChildSetupFunc- SpawnChildSetupFunc ,- SpawnChildSetupFuncC ,- mkSpawnChildSetupFunc ,- noSpawnChildSetupFunc ,- spawnChildSetupFuncClosure ,- spawnChildSetupFuncWrapper ,----- ** TestDataFunc- TestDataFunc ,- TestDataFuncC ,- mkTestDataFunc ,- noTestDataFunc ,- testDataFuncClosure ,- testDataFuncWrapper ,----- ** TestFixtureFunc- TestFixtureFunc ,- TestFixtureFuncC ,- mkTestFixtureFunc ,- noTestFixtureFunc ,- testFixtureFuncClosure ,- testFixtureFuncWrapper ,----- ** TestFunc- TestFunc ,- TestFuncC ,- mkTestFunc ,- noTestFunc ,- testFuncClosure ,- testFuncWrapper ,----- ** TestLogFatalFunc- TestLogFatalFunc ,- TestLogFatalFuncC ,- mkTestLogFatalFunc ,- noTestLogFatalFunc ,- testLogFatalFuncClosure ,- testLogFatalFuncWrapper ,----- ** TranslateFunc- TranslateFunc ,- TranslateFuncC ,- mkTranslateFunc ,- noTranslateFunc ,- translateFuncClosure ,- translateFuncWrapper ,----- ** TraverseFunc- TraverseFunc ,- TraverseFuncC ,- mkTraverseFunc ,- noTraverseFunc ,- traverseFuncClosure ,- traverseFuncWrapper ,----- ** UnixFDSourceFunc- UnixFDSourceFunc ,- UnixFDSourceFuncC ,- mkUnixFDSourceFunc ,- noUnixFDSourceFunc ,- unixFDSourceFuncClosure ,- unixFDSourceFuncWrapper ,----- ** VoidFunc- VoidFunc ,- VoidFuncC ,- mkVoidFunc ,- noVoidFunc ,- voidFuncClosure ,- voidFuncWrapper ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types----- callback VoidFunc-voidFuncClosure :: VoidFunc -> IO Closure-voidFuncClosure cb = newCClosure =<< mkVoidFunc wrapped- where wrapped = voidFuncWrapper Nothing cb--type VoidFuncC =- IO ()--foreign import ccall "wrapper"- mkVoidFunc :: VoidFuncC -> IO (FunPtr VoidFuncC)--type VoidFunc =- IO ()--noVoidFunc :: Maybe VoidFunc-noVoidFunc = Nothing--voidFuncWrapper ::- Maybe (Ptr (FunPtr (VoidFuncC))) ->- VoidFunc ->- IO ()-voidFuncWrapper funptrptr _cb = do- _cb - maybeReleaseFunPtr funptrptr---- callback UnixFDSourceFunc-unixFDSourceFuncClosure :: UnixFDSourceFunc -> IO Closure-unixFDSourceFuncClosure cb = newCClosure =<< mkUnixFDSourceFunc wrapped- where wrapped = unixFDSourceFuncWrapper Nothing cb--type UnixFDSourceFuncC =- Int32 ->- CUInt ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkUnixFDSourceFunc :: UnixFDSourceFuncC -> IO (FunPtr UnixFDSourceFuncC)--type UnixFDSourceFunc =- Int32 ->- [IOCondition] ->- IO Bool--noUnixFDSourceFunc :: Maybe UnixFDSourceFunc-noUnixFDSourceFunc = Nothing--unixFDSourceFuncWrapper ::- Maybe (Ptr (FunPtr (UnixFDSourceFuncC))) ->- UnixFDSourceFunc ->- Int32 ->- CUInt ->- Ptr () ->- IO CInt-unixFDSourceFuncWrapper funptrptr _cb fd condition _ = do- let condition' = wordToGFlags condition- result <- _cb fd condition'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback TraverseFunc-traverseFuncClosure :: TraverseFunc -> IO Closure-traverseFuncClosure cb = newCClosure =<< mkTraverseFunc wrapped- where wrapped = traverseFuncWrapper Nothing cb--type TraverseFuncC =- Ptr () ->- Ptr () ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkTraverseFunc :: TraverseFuncC -> IO (FunPtr TraverseFuncC)--type TraverseFunc =- Ptr () ->- Ptr () ->- Ptr () ->- IO Bool--noTraverseFunc :: Maybe TraverseFunc-noTraverseFunc = Nothing--traverseFuncWrapper ::- Maybe (Ptr (FunPtr (TraverseFuncC))) ->- TraverseFunc ->- Ptr () ->- Ptr () ->- Ptr () ->- IO CInt-traverseFuncWrapper funptrptr _cb key value data_ = do- result <- _cb key value data_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback TranslateFunc-translateFuncClosure :: TranslateFunc -> IO Closure-translateFuncClosure cb = newCClosure =<< mkTranslateFunc wrapped- where wrapped = translateFuncWrapper Nothing cb--type TranslateFuncC =- CString ->- Ptr () ->- IO CString--foreign import ccall "wrapper"- mkTranslateFunc :: TranslateFuncC -> IO (FunPtr TranslateFuncC)--type TranslateFunc =- T.Text ->- Ptr () ->- IO T.Text--noTranslateFunc :: Maybe TranslateFunc-noTranslateFunc = Nothing--translateFuncWrapper ::- Maybe (Ptr (FunPtr (TranslateFuncC))) ->- TranslateFunc ->- CString ->- Ptr () ->- IO CString-translateFuncWrapper funptrptr _cb str data_ = do- str' <- cstringToText str- result <- _cb str' data_- maybeReleaseFunPtr funptrptr- result' <- textToCString result- return result'---- callback TestLogFatalFunc-testLogFatalFuncClosure :: TestLogFatalFunc -> IO Closure-testLogFatalFuncClosure cb = newCClosure =<< mkTestLogFatalFunc wrapped- where wrapped = testLogFatalFuncWrapper Nothing cb--type TestLogFatalFuncC =- CString ->- CUInt ->- CString ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkTestLogFatalFunc :: TestLogFatalFuncC -> IO (FunPtr TestLogFatalFuncC)--type TestLogFatalFunc =- T.Text ->- [LogLevelFlags] ->- T.Text ->- IO Bool--noTestLogFatalFunc :: Maybe TestLogFatalFunc-noTestLogFatalFunc = Nothing--testLogFatalFuncWrapper ::- Maybe (Ptr (FunPtr (TestLogFatalFuncC))) ->- TestLogFatalFunc ->- CString ->- CUInt ->- CString ->- Ptr () ->- IO CInt-testLogFatalFuncWrapper funptrptr _cb logDomain logLevel message _ = do- logDomain' <- cstringToText logDomain- let logLevel' = wordToGFlags logLevel- message' <- cstringToText message- result <- _cb logDomain' logLevel' message'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback TestFunc-testFuncClosure :: TestFunc -> IO Closure-testFuncClosure cb = newCClosure =<< mkTestFunc wrapped- where wrapped = testFuncWrapper Nothing cb--type TestFuncC =- IO ()--foreign import ccall "wrapper"- mkTestFunc :: TestFuncC -> IO (FunPtr TestFuncC)--type TestFunc =- IO ()--noTestFunc :: Maybe TestFunc-noTestFunc = Nothing--testFuncWrapper ::- Maybe (Ptr (FunPtr (TestFuncC))) ->- TestFunc ->- IO ()-testFuncWrapper funptrptr _cb = do- _cb - maybeReleaseFunPtr funptrptr---- callback TestFixtureFunc-testFixtureFuncClosure :: TestFixtureFunc -> IO Closure-testFixtureFuncClosure cb = newCClosure =<< mkTestFixtureFunc wrapped- where wrapped = testFixtureFuncWrapper Nothing cb--type TestFixtureFuncC =- Ptr () ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkTestFixtureFunc :: TestFixtureFuncC -> IO (FunPtr TestFixtureFuncC)--type TestFixtureFunc =- Ptr () ->- IO ()--noTestFixtureFunc :: Maybe TestFixtureFunc-noTestFixtureFunc = Nothing--testFixtureFuncWrapper ::- Maybe (Ptr (FunPtr (TestFixtureFuncC))) ->- TestFixtureFunc ->- Ptr () ->- Ptr () ->- IO ()-testFixtureFuncWrapper funptrptr _cb fixture _ = do- _cb fixture- maybeReleaseFunPtr funptrptr---- callback TestDataFunc-testDataFuncClosure :: TestDataFunc -> IO Closure-testDataFuncClosure cb = newCClosure =<< mkTestDataFunc wrapped- where wrapped = testDataFuncWrapper Nothing cb--type TestDataFuncC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkTestDataFunc :: TestDataFuncC -> IO (FunPtr TestDataFuncC)--type TestDataFunc =- IO ()--noTestDataFunc :: Maybe TestDataFunc-noTestDataFunc = Nothing--testDataFuncWrapper ::- Maybe (Ptr (FunPtr (TestDataFuncC))) ->- TestDataFunc ->- Ptr () ->- IO ()-testDataFuncWrapper funptrptr _cb _ = do- _cb - maybeReleaseFunPtr funptrptr---- callback SpawnChildSetupFunc-spawnChildSetupFuncClosure :: SpawnChildSetupFunc -> IO Closure-spawnChildSetupFuncClosure cb = newCClosure =<< mkSpawnChildSetupFunc wrapped- where wrapped = spawnChildSetupFuncWrapper Nothing cb--type SpawnChildSetupFuncC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkSpawnChildSetupFunc :: SpawnChildSetupFuncC -> IO (FunPtr SpawnChildSetupFuncC)--type SpawnChildSetupFunc =- IO ()--noSpawnChildSetupFunc :: Maybe SpawnChildSetupFunc-noSpawnChildSetupFunc = Nothing--spawnChildSetupFuncWrapper ::- Maybe (Ptr (FunPtr (SpawnChildSetupFuncC))) ->- SpawnChildSetupFunc ->- Ptr () ->- IO ()-spawnChildSetupFuncWrapper funptrptr _cb _ = do- _cb - maybeReleaseFunPtr funptrptr---- callback SourceFuncsPrepareFieldCallback-sourceFuncsPrepareFieldCallbackClosure :: SourceFuncsPrepareFieldCallback -> IO Closure-sourceFuncsPrepareFieldCallbackClosure cb = newCClosure =<< mkSourceFuncsPrepareFieldCallback wrapped- where wrapped = sourceFuncsPrepareFieldCallbackWrapper Nothing cb--type SourceFuncsPrepareFieldCallbackC =- Ptr Source ->- Int32 ->- IO CInt--foreign import ccall "wrapper"- mkSourceFuncsPrepareFieldCallback :: SourceFuncsPrepareFieldCallbackC -> IO (FunPtr SourceFuncsPrepareFieldCallbackC)--type SourceFuncsPrepareFieldCallback =- Source ->- Int32 ->- IO Bool--noSourceFuncsPrepareFieldCallback :: Maybe SourceFuncsPrepareFieldCallback-noSourceFuncsPrepareFieldCallback = Nothing--sourceFuncsPrepareFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (SourceFuncsPrepareFieldCallbackC))) ->- SourceFuncsPrepareFieldCallback ->- Ptr Source ->- Int32 ->- IO CInt-sourceFuncsPrepareFieldCallbackWrapper funptrptr _cb source timeout_ = do- source' <- (newBoxed Source) source- result <- _cb source' timeout_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback SourceFuncsFinalizeFieldCallback-sourceFuncsFinalizeFieldCallbackClosure :: SourceFuncsFinalizeFieldCallback -> IO Closure-sourceFuncsFinalizeFieldCallbackClosure cb = newCClosure =<< mkSourceFuncsFinalizeFieldCallback wrapped- where wrapped = sourceFuncsFinalizeFieldCallbackWrapper Nothing cb--type SourceFuncsFinalizeFieldCallbackC =- Ptr Source ->- IO ()--foreign import ccall "wrapper"- mkSourceFuncsFinalizeFieldCallback :: SourceFuncsFinalizeFieldCallbackC -> IO (FunPtr SourceFuncsFinalizeFieldCallbackC)--type SourceFuncsFinalizeFieldCallback =- Source ->- IO ()--noSourceFuncsFinalizeFieldCallback :: Maybe SourceFuncsFinalizeFieldCallback-noSourceFuncsFinalizeFieldCallback = Nothing--sourceFuncsFinalizeFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (SourceFuncsFinalizeFieldCallbackC))) ->- SourceFuncsFinalizeFieldCallback ->- Ptr Source ->- IO ()-sourceFuncsFinalizeFieldCallbackWrapper funptrptr _cb source = do- source' <- (newBoxed Source) source- _cb source'- maybeReleaseFunPtr funptrptr---- callback SourceFuncsCheckFieldCallback-sourceFuncsCheckFieldCallbackClosure :: SourceFuncsCheckFieldCallback -> IO Closure-sourceFuncsCheckFieldCallbackClosure cb = newCClosure =<< mkSourceFuncsCheckFieldCallback wrapped- where wrapped = sourceFuncsCheckFieldCallbackWrapper Nothing cb--type SourceFuncsCheckFieldCallbackC =- Ptr Source ->- IO CInt--foreign import ccall "wrapper"- mkSourceFuncsCheckFieldCallback :: SourceFuncsCheckFieldCallbackC -> IO (FunPtr SourceFuncsCheckFieldCallbackC)--type SourceFuncsCheckFieldCallback =- Source ->- IO Bool--noSourceFuncsCheckFieldCallback :: Maybe SourceFuncsCheckFieldCallback-noSourceFuncsCheckFieldCallback = Nothing--sourceFuncsCheckFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (SourceFuncsCheckFieldCallbackC))) ->- SourceFuncsCheckFieldCallback ->- Ptr Source ->- IO CInt-sourceFuncsCheckFieldCallbackWrapper funptrptr _cb source = do- source' <- (newBoxed Source) source- result <- _cb source'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback SourceFunc-sourceFuncClosure :: SourceFunc -> IO Closure-sourceFuncClosure cb = newCClosure =<< mkSourceFunc wrapped- where wrapped = sourceFuncWrapper Nothing cb--type SourceFuncC =- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkSourceFunc :: SourceFuncC -> IO (FunPtr SourceFuncC)--type SourceFunc =- IO Bool--noSourceFunc :: Maybe SourceFunc-noSourceFunc = Nothing--sourceFuncWrapper ::- Maybe (Ptr (FunPtr (SourceFuncC))) ->- SourceFunc ->- Ptr () ->- IO CInt-sourceFuncWrapper funptrptr _cb _ = do- result <- _cb - maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback SourceDummyMarshal-sourceDummyMarshalClosure :: SourceDummyMarshal -> IO Closure-sourceDummyMarshalClosure cb = newCClosure =<< mkSourceDummyMarshal wrapped- where wrapped = sourceDummyMarshalWrapper Nothing cb--type SourceDummyMarshalC =- IO ()--foreign import ccall "wrapper"- mkSourceDummyMarshal :: SourceDummyMarshalC -> IO (FunPtr SourceDummyMarshalC)--type SourceDummyMarshal =- IO ()--noSourceDummyMarshal :: Maybe SourceDummyMarshal-noSourceDummyMarshal = Nothing--sourceDummyMarshalWrapper ::- Maybe (Ptr (FunPtr (SourceDummyMarshalC))) ->- SourceDummyMarshal ->- IO ()-sourceDummyMarshalWrapper funptrptr _cb = do- _cb - maybeReleaseFunPtr funptrptr---- callback SourceCallbackFuncsUnrefFieldCallback-sourceCallbackFuncsUnrefFieldCallbackClosure :: SourceCallbackFuncsUnrefFieldCallback -> IO Closure-sourceCallbackFuncsUnrefFieldCallbackClosure cb = newCClosure =<< mkSourceCallbackFuncsUnrefFieldCallback wrapped- where wrapped = sourceCallbackFuncsUnrefFieldCallbackWrapper Nothing cb--type SourceCallbackFuncsUnrefFieldCallbackC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkSourceCallbackFuncsUnrefFieldCallback :: SourceCallbackFuncsUnrefFieldCallbackC -> IO (FunPtr SourceCallbackFuncsUnrefFieldCallbackC)--type SourceCallbackFuncsUnrefFieldCallback =- Ptr () ->- IO ()--noSourceCallbackFuncsUnrefFieldCallback :: Maybe SourceCallbackFuncsUnrefFieldCallback-noSourceCallbackFuncsUnrefFieldCallback = Nothing--sourceCallbackFuncsUnrefFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (SourceCallbackFuncsUnrefFieldCallbackC))) ->- SourceCallbackFuncsUnrefFieldCallback ->- Ptr () ->- IO ()-sourceCallbackFuncsUnrefFieldCallbackWrapper funptrptr _cb cbData = do- _cb cbData- maybeReleaseFunPtr funptrptr---- callback SourceCallbackFuncsRefFieldCallback-sourceCallbackFuncsRefFieldCallbackClosure :: SourceCallbackFuncsRefFieldCallback -> IO Closure-sourceCallbackFuncsRefFieldCallbackClosure cb = newCClosure =<< mkSourceCallbackFuncsRefFieldCallback wrapped- where wrapped = sourceCallbackFuncsRefFieldCallbackWrapper Nothing cb--type SourceCallbackFuncsRefFieldCallbackC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkSourceCallbackFuncsRefFieldCallback :: SourceCallbackFuncsRefFieldCallbackC -> IO (FunPtr SourceCallbackFuncsRefFieldCallbackC)--type SourceCallbackFuncsRefFieldCallback =- Ptr () ->- IO ()--noSourceCallbackFuncsRefFieldCallback :: Maybe SourceCallbackFuncsRefFieldCallback-noSourceCallbackFuncsRefFieldCallback = Nothing--sourceCallbackFuncsRefFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (SourceCallbackFuncsRefFieldCallbackC))) ->- SourceCallbackFuncsRefFieldCallback ->- Ptr () ->- IO ()-sourceCallbackFuncsRefFieldCallbackWrapper funptrptr _cb cbData = do- _cb cbData- maybeReleaseFunPtr funptrptr---- callback SequenceIterCompareFunc-sequenceIterCompareFuncClosure :: SequenceIterCompareFunc -> IO Closure-sequenceIterCompareFuncClosure cb = newCClosure =<< mkSequenceIterCompareFunc wrapped- where wrapped = sequenceIterCompareFuncWrapper Nothing cb--type SequenceIterCompareFuncC =- Ptr SequenceIter ->- Ptr SequenceIter ->- Ptr () ->- IO Int32--foreign import ccall "wrapper"- mkSequenceIterCompareFunc :: SequenceIterCompareFuncC -> IO (FunPtr SequenceIterCompareFuncC)--type SequenceIterCompareFunc =- SequenceIter ->- SequenceIter ->- Ptr () ->- IO Int32--noSequenceIterCompareFunc :: Maybe SequenceIterCompareFunc-noSequenceIterCompareFunc = Nothing--sequenceIterCompareFuncWrapper ::- Maybe (Ptr (FunPtr (SequenceIterCompareFuncC))) ->- SequenceIterCompareFunc ->- Ptr SequenceIter ->- Ptr SequenceIter ->- Ptr () ->- IO Int32-sequenceIterCompareFuncWrapper funptrptr _cb a b data_ = do- a' <- (newPtr SequenceIter) a- b' <- (newPtr SequenceIter) b- result <- _cb a' b' data_- maybeReleaseFunPtr funptrptr- return result---- callback ScannerMsgFunc-scannerMsgFuncClosure :: ScannerMsgFunc -> IO Closure-scannerMsgFuncClosure cb = newCClosure =<< mkScannerMsgFunc wrapped- where wrapped = scannerMsgFuncWrapper Nothing cb--type ScannerMsgFuncC =- Ptr Scanner ->- CString ->- CInt ->- IO ()--foreign import ccall "wrapper"- mkScannerMsgFunc :: ScannerMsgFuncC -> IO (FunPtr ScannerMsgFuncC)--type ScannerMsgFunc =- Scanner ->- T.Text ->- Bool ->- IO ()--noScannerMsgFunc :: Maybe ScannerMsgFunc-noScannerMsgFunc = Nothing--scannerMsgFuncWrapper ::- Maybe (Ptr (FunPtr (ScannerMsgFuncC))) ->- ScannerMsgFunc ->- Ptr Scanner ->- CString ->- CInt ->- IO ()-scannerMsgFuncWrapper funptrptr _cb scanner message error_ = do- scanner' <- (newPtr Scanner) scanner- message' <- cstringToText message- let error_' = (/= 0) error_- _cb scanner' message' error_'- maybeReleaseFunPtr funptrptr---- callback RegexEvalCallback-regexEvalCallbackClosure :: RegexEvalCallback -> IO Closure-regexEvalCallbackClosure cb = newCClosure =<< mkRegexEvalCallback wrapped- where wrapped = regexEvalCallbackWrapper Nothing cb--type RegexEvalCallbackC =- Ptr MatchInfo ->- Ptr String ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkRegexEvalCallback :: RegexEvalCallbackC -> IO (FunPtr RegexEvalCallbackC)--type RegexEvalCallback =- MatchInfo ->- String ->- IO Bool--noRegexEvalCallback :: Maybe RegexEvalCallback-noRegexEvalCallback = Nothing--regexEvalCallbackWrapper ::- Maybe (Ptr (FunPtr (RegexEvalCallbackC))) ->- RegexEvalCallback ->- Ptr MatchInfo ->- Ptr String ->- Ptr () ->- IO CInt-regexEvalCallbackWrapper funptrptr _cb matchInfo result_ _ = do- matchInfo' <- (newBoxed MatchInfo) matchInfo- result_' <- (newBoxed String) result_- result <- _cb matchInfo' result_'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback PrintFunc-printFuncClosure :: PrintFunc -> IO Closure-printFuncClosure cb = newCClosure =<< mkPrintFunc wrapped- where wrapped = printFuncWrapper Nothing cb--type PrintFuncC =- CString ->- IO ()--foreign import ccall "wrapper"- mkPrintFunc :: PrintFuncC -> IO (FunPtr PrintFuncC)--type PrintFunc =- T.Text ->- IO ()--noPrintFunc :: Maybe PrintFunc-noPrintFunc = Nothing--printFuncWrapper ::- Maybe (Ptr (FunPtr (PrintFuncC))) ->- PrintFunc ->- CString ->- IO ()-printFuncWrapper funptrptr _cb string = do- string' <- cstringToText string- _cb string'- maybeReleaseFunPtr funptrptr---- callback PollFunc-pollFuncClosure :: PollFunc -> IO Closure-pollFuncClosure cb = newCClosure =<< mkPollFunc wrapped- where wrapped = pollFuncWrapper Nothing cb--type PollFuncC =- Ptr PollFD ->- Word32 ->- Int32 ->- IO Int32--foreign import ccall "wrapper"- mkPollFunc :: PollFuncC -> IO (FunPtr PollFuncC)--type PollFunc =- PollFD ->- Word32 ->- Int32 ->- IO Int32--noPollFunc :: Maybe PollFunc-noPollFunc = Nothing--pollFuncWrapper ::- Maybe (Ptr (FunPtr (PollFuncC))) ->- PollFunc ->- Ptr PollFD ->- Word32 ->- Int32 ->- IO Int32-pollFuncWrapper funptrptr _cb ufds nfsd timeout_ = do- ufds' <- (newBoxed PollFD) ufds- result <- _cb ufds' nfsd timeout_- maybeReleaseFunPtr funptrptr- return result---- callback OptionParseFunc-optionParseFuncClosure :: OptionParseFunc -> IO Closure-optionParseFuncClosure cb = newCClosure =<< mkOptionParseFunc wrapped- where wrapped = optionParseFuncWrapper Nothing cb--type OptionParseFuncC =- Ptr OptionContext ->- Ptr OptionGroup ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkOptionParseFunc :: OptionParseFuncC -> IO (FunPtr OptionParseFuncC)--type OptionParseFunc =- OptionContext ->- OptionGroup ->- Ptr () ->- IO Bool--noOptionParseFunc :: Maybe OptionParseFunc-noOptionParseFunc = Nothing--optionParseFuncWrapper ::- Maybe (Ptr (FunPtr (OptionParseFuncC))) ->- OptionParseFunc ->- Ptr OptionContext ->- Ptr OptionGroup ->- Ptr () ->- IO CInt-optionParseFuncWrapper funptrptr _cb context group data_ = do- context' <- (newPtr OptionContext) context- group' <- (newBoxed OptionGroup) group- result <- _cb context' group' data_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback OptionErrorFunc-optionErrorFuncClosure :: OptionErrorFunc -> IO Closure-optionErrorFuncClosure cb = newCClosure =<< mkOptionErrorFunc wrapped- where wrapped = optionErrorFuncWrapper Nothing cb--type OptionErrorFuncC =- Ptr OptionContext ->- Ptr OptionGroup ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkOptionErrorFunc :: OptionErrorFuncC -> IO (FunPtr OptionErrorFuncC)--type OptionErrorFunc =- OptionContext ->- OptionGroup ->- Ptr () ->- IO ()--noOptionErrorFunc :: Maybe OptionErrorFunc-noOptionErrorFunc = Nothing--optionErrorFuncWrapper ::- Maybe (Ptr (FunPtr (OptionErrorFuncC))) ->- OptionErrorFunc ->- Ptr OptionContext ->- Ptr OptionGroup ->- Ptr () ->- IO ()-optionErrorFuncWrapper funptrptr _cb context group data_ = do- context' <- (newPtr OptionContext) context- group' <- (newBoxed OptionGroup) group- _cb context' group' data_- maybeReleaseFunPtr funptrptr---- callback OptionArgFunc-optionArgFuncClosure :: OptionArgFunc -> IO Closure-optionArgFuncClosure cb = newCClosure =<< mkOptionArgFunc wrapped- where wrapped = optionArgFuncWrapper Nothing cb--type OptionArgFuncC =- CString ->- CString ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkOptionArgFunc :: OptionArgFuncC -> IO (FunPtr OptionArgFuncC)--type OptionArgFunc =- T.Text ->- T.Text ->- Ptr () ->- IO Bool--noOptionArgFunc :: Maybe OptionArgFunc-noOptionArgFunc = Nothing--optionArgFuncWrapper ::- Maybe (Ptr (FunPtr (OptionArgFuncC))) ->- OptionArgFunc ->- CString ->- CString ->- Ptr () ->- IO CInt-optionArgFuncWrapper funptrptr _cb optionName value data_ = do- optionName' <- cstringToText optionName- value' <- cstringToText value- result <- _cb optionName' value' data_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback NodeTraverseFunc-nodeTraverseFuncClosure :: NodeTraverseFunc -> IO Closure-nodeTraverseFuncClosure cb = newCClosure =<< mkNodeTraverseFunc wrapped- where wrapped = nodeTraverseFuncWrapper Nothing cb--type NodeTraverseFuncC =- Ptr Node ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkNodeTraverseFunc :: NodeTraverseFuncC -> IO (FunPtr NodeTraverseFuncC)--type NodeTraverseFunc =- Node ->- Ptr () ->- IO Bool--noNodeTraverseFunc :: Maybe NodeTraverseFunc-noNodeTraverseFunc = Nothing--nodeTraverseFuncWrapper ::- Maybe (Ptr (FunPtr (NodeTraverseFuncC))) ->- NodeTraverseFunc ->- Ptr Node ->- Ptr () ->- IO CInt-nodeTraverseFuncWrapper funptrptr _cb node data_ = do- node' <- (newPtr Node) node- result <- _cb node' data_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback NodeForeachFunc-nodeForeachFuncClosure :: NodeForeachFunc -> IO Closure-nodeForeachFuncClosure cb = newCClosure =<< mkNodeForeachFunc wrapped- where wrapped = nodeForeachFuncWrapper Nothing cb--type NodeForeachFuncC =- Ptr Node ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkNodeForeachFunc :: NodeForeachFuncC -> IO (FunPtr NodeForeachFuncC)--type NodeForeachFunc =- Node ->- Ptr () ->- IO ()--noNodeForeachFunc :: Maybe NodeForeachFunc-noNodeForeachFunc = Nothing--nodeForeachFuncWrapper ::- Maybe (Ptr (FunPtr (NodeForeachFuncC))) ->- NodeForeachFunc ->- Ptr Node ->- Ptr () ->- IO ()-nodeForeachFuncWrapper funptrptr _cb node data_ = do- node' <- (newPtr Node) node- _cb node' data_- maybeReleaseFunPtr funptrptr---- callback MemVTableFreeFieldCallback-memVTableFreeFieldCallbackClosure :: MemVTableFreeFieldCallback -> IO Closure-memVTableFreeFieldCallbackClosure cb = newCClosure =<< mkMemVTableFreeFieldCallback wrapped- where wrapped = memVTableFreeFieldCallbackWrapper Nothing cb--type MemVTableFreeFieldCallbackC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkMemVTableFreeFieldCallback :: MemVTableFreeFieldCallbackC -> IO (FunPtr MemVTableFreeFieldCallbackC)--type MemVTableFreeFieldCallback =- Ptr () ->- IO ()--noMemVTableFreeFieldCallback :: Maybe MemVTableFreeFieldCallback-noMemVTableFreeFieldCallback = Nothing--memVTableFreeFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (MemVTableFreeFieldCallbackC))) ->- MemVTableFreeFieldCallback ->- Ptr () ->- IO ()-memVTableFreeFieldCallbackWrapper funptrptr _cb mem = do- _cb mem- maybeReleaseFunPtr funptrptr---- callback MarkupParserTextFieldCallback-markupParserTextFieldCallbackClosure :: MarkupParserTextFieldCallback -> IO Closure-markupParserTextFieldCallbackClosure cb = newCClosure =<< mkMarkupParserTextFieldCallback wrapped- where wrapped = markupParserTextFieldCallbackWrapper Nothing cb--type MarkupParserTextFieldCallbackC =- Ptr MarkupParseContext ->- CString ->- Word64 ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkMarkupParserTextFieldCallback :: MarkupParserTextFieldCallbackC -> IO (FunPtr MarkupParserTextFieldCallbackC)--type MarkupParserTextFieldCallback =- MarkupParseContext ->- T.Text ->- Word64 ->- IO ()--noMarkupParserTextFieldCallback :: Maybe MarkupParserTextFieldCallback-noMarkupParserTextFieldCallback = Nothing--markupParserTextFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (MarkupParserTextFieldCallbackC))) ->- MarkupParserTextFieldCallback ->- Ptr MarkupParseContext ->- CString ->- Word64 ->- Ptr () ->- IO ()-markupParserTextFieldCallbackWrapper funptrptr _cb context text textLen _ = do- context' <- (newBoxed MarkupParseContext) context- text' <- cstringToText text- _cb context' text' textLen- maybeReleaseFunPtr funptrptr---- callback MarkupParserStartElementFieldCallback-markupParserStartElementFieldCallbackClosure :: MarkupParserStartElementFieldCallback -> IO Closure-markupParserStartElementFieldCallbackClosure cb = newCClosure =<< mkMarkupParserStartElementFieldCallback wrapped- where wrapped = markupParserStartElementFieldCallbackWrapper Nothing cb--type MarkupParserStartElementFieldCallbackC =- Ptr MarkupParseContext ->- CString ->- CString ->- CString ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkMarkupParserStartElementFieldCallback :: MarkupParserStartElementFieldCallbackC -> IO (FunPtr MarkupParserStartElementFieldCallbackC)--type MarkupParserStartElementFieldCallback =- MarkupParseContext ->- T.Text ->- T.Text ->- T.Text ->- IO ()--noMarkupParserStartElementFieldCallback :: Maybe MarkupParserStartElementFieldCallback-noMarkupParserStartElementFieldCallback = Nothing--markupParserStartElementFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (MarkupParserStartElementFieldCallbackC))) ->- MarkupParserStartElementFieldCallback ->- Ptr MarkupParseContext ->- CString ->- CString ->- CString ->- Ptr () ->- IO ()-markupParserStartElementFieldCallbackWrapper funptrptr _cb context elementName attributeNames attributeValues _ = do- context' <- (newBoxed MarkupParseContext) context- elementName' <- cstringToText elementName- attributeNames' <- cstringToText attributeNames- attributeValues' <- cstringToText attributeValues- _cb context' elementName' attributeNames' attributeValues'- maybeReleaseFunPtr funptrptr---- callback MarkupParserPassthroughFieldCallback-markupParserPassthroughFieldCallbackClosure :: MarkupParserPassthroughFieldCallback -> IO Closure-markupParserPassthroughFieldCallbackClosure cb = newCClosure =<< mkMarkupParserPassthroughFieldCallback wrapped- where wrapped = markupParserPassthroughFieldCallbackWrapper Nothing cb--type MarkupParserPassthroughFieldCallbackC =- Ptr MarkupParseContext ->- CString ->- Word64 ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkMarkupParserPassthroughFieldCallback :: MarkupParserPassthroughFieldCallbackC -> IO (FunPtr MarkupParserPassthroughFieldCallbackC)--type MarkupParserPassthroughFieldCallback =- MarkupParseContext ->- T.Text ->- Word64 ->- IO ()--noMarkupParserPassthroughFieldCallback :: Maybe MarkupParserPassthroughFieldCallback-noMarkupParserPassthroughFieldCallback = Nothing--markupParserPassthroughFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (MarkupParserPassthroughFieldCallbackC))) ->- MarkupParserPassthroughFieldCallback ->- Ptr MarkupParseContext ->- CString ->- Word64 ->- Ptr () ->- IO ()-markupParserPassthroughFieldCallbackWrapper funptrptr _cb context passthroughText textLen _ = do- context' <- (newBoxed MarkupParseContext) context- passthroughText' <- cstringToText passthroughText- _cb context' passthroughText' textLen- maybeReleaseFunPtr funptrptr---- callback MarkupParserErrorFieldCallback-markupParserErrorFieldCallbackClosure :: MarkupParserErrorFieldCallback -> IO Closure-markupParserErrorFieldCallbackClosure cb = newCClosure =<< mkMarkupParserErrorFieldCallback wrapped- where wrapped = markupParserErrorFieldCallbackWrapper Nothing cb--type MarkupParserErrorFieldCallbackC =- Ptr MarkupParseContext ->- Ptr GError ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkMarkupParserErrorFieldCallback :: MarkupParserErrorFieldCallbackC -> IO (FunPtr MarkupParserErrorFieldCallbackC)--type MarkupParserErrorFieldCallback =- MarkupParseContext ->- GError ->- IO ()--noMarkupParserErrorFieldCallback :: Maybe MarkupParserErrorFieldCallback-noMarkupParserErrorFieldCallback = Nothing--markupParserErrorFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (MarkupParserErrorFieldCallbackC))) ->- MarkupParserErrorFieldCallback ->- Ptr MarkupParseContext ->- Ptr GError ->- Ptr () ->- IO ()-markupParserErrorFieldCallbackWrapper funptrptr _cb context error_ _ = do- context' <- (newBoxed MarkupParseContext) context- error_' <- (newBoxed GError) error_- _cb context' error_'- maybeReleaseFunPtr funptrptr---- callback MarkupParserEndElementFieldCallback-markupParserEndElementFieldCallbackClosure :: MarkupParserEndElementFieldCallback -> IO Closure-markupParserEndElementFieldCallbackClosure cb = newCClosure =<< mkMarkupParserEndElementFieldCallback wrapped- where wrapped = markupParserEndElementFieldCallbackWrapper Nothing cb--type MarkupParserEndElementFieldCallbackC =- Ptr MarkupParseContext ->- CString ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkMarkupParserEndElementFieldCallback :: MarkupParserEndElementFieldCallbackC -> IO (FunPtr MarkupParserEndElementFieldCallbackC)--type MarkupParserEndElementFieldCallback =- MarkupParseContext ->- T.Text ->- IO ()--noMarkupParserEndElementFieldCallback :: Maybe MarkupParserEndElementFieldCallback-noMarkupParserEndElementFieldCallback = Nothing--markupParserEndElementFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (MarkupParserEndElementFieldCallbackC))) ->- MarkupParserEndElementFieldCallback ->- Ptr MarkupParseContext ->- CString ->- Ptr () ->- IO ()-markupParserEndElementFieldCallbackWrapper funptrptr _cb context elementName _ = do- context' <- (newBoxed MarkupParseContext) context- elementName' <- cstringToText elementName- _cb context' elementName'- maybeReleaseFunPtr funptrptr---- callback LogFunc-logFuncClosure :: LogFunc -> IO Closure-logFuncClosure cb = newCClosure =<< mkLogFunc wrapped- where wrapped = logFuncWrapper Nothing cb--type LogFuncC =- CString ->- CUInt ->- CString ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkLogFunc :: LogFuncC -> IO (FunPtr LogFuncC)--type LogFunc =- T.Text ->- [LogLevelFlags] ->- T.Text ->- IO ()--noLogFunc :: Maybe LogFunc-noLogFunc = Nothing--logFuncWrapper ::- Maybe (Ptr (FunPtr (LogFuncC))) ->- LogFunc ->- CString ->- CUInt ->- CString ->- Ptr () ->- IO ()-logFuncWrapper funptrptr _cb logDomain logLevel message _ = do- logDomain' <- cstringToText logDomain- let logLevel' = wordToGFlags logLevel- message' <- cstringToText message- _cb logDomain' logLevel' message'- maybeReleaseFunPtr funptrptr---- callback IOFuncsIoWriteFieldCallback-iOFuncsIoWriteFieldCallbackClosure :: IOFuncsIoWriteFieldCallback -> IO Closure-iOFuncsIoWriteFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoWriteFieldCallback wrapped- where wrapped = iOFuncsIoWriteFieldCallbackWrapper Nothing cb--type IOFuncsIoWriteFieldCallbackC =- Ptr IOChannel ->- CString ->- Word64 ->- Word64 ->- IO CUInt--foreign import ccall "wrapper"- mkIOFuncsIoWriteFieldCallback :: IOFuncsIoWriteFieldCallbackC -> IO (FunPtr IOFuncsIoWriteFieldCallbackC)--type IOFuncsIoWriteFieldCallback =- IOChannel ->- T.Text ->- Word64 ->- Word64 ->- IO IOStatus--noIOFuncsIoWriteFieldCallback :: Maybe IOFuncsIoWriteFieldCallback-noIOFuncsIoWriteFieldCallback = Nothing--iOFuncsIoWriteFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoWriteFieldCallbackC))) ->- IOFuncsIoWriteFieldCallback ->- Ptr IOChannel ->- CString ->- Word64 ->- Word64 ->- IO CUInt-iOFuncsIoWriteFieldCallbackWrapper funptrptr _cb channel buf count bytesWritten = do- channel' <- (newBoxed IOChannel) channel- buf' <- cstringToText buf- result <- _cb channel' buf' count bytesWritten- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback IOFuncsIoSetFlagsFieldCallback-iOFuncsIoSetFlagsFieldCallbackClosure :: IOFuncsIoSetFlagsFieldCallback -> IO Closure-iOFuncsIoSetFlagsFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoSetFlagsFieldCallback wrapped- where wrapped = iOFuncsIoSetFlagsFieldCallbackWrapper Nothing cb--type IOFuncsIoSetFlagsFieldCallbackC =- Ptr IOChannel ->- CUInt ->- IO CUInt--foreign import ccall "wrapper"- mkIOFuncsIoSetFlagsFieldCallback :: IOFuncsIoSetFlagsFieldCallbackC -> IO (FunPtr IOFuncsIoSetFlagsFieldCallbackC)--type IOFuncsIoSetFlagsFieldCallback =- IOChannel ->- [IOFlags] ->- IO IOStatus--noIOFuncsIoSetFlagsFieldCallback :: Maybe IOFuncsIoSetFlagsFieldCallback-noIOFuncsIoSetFlagsFieldCallback = Nothing--iOFuncsIoSetFlagsFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoSetFlagsFieldCallbackC))) ->- IOFuncsIoSetFlagsFieldCallback ->- Ptr IOChannel ->- CUInt ->- IO CUInt-iOFuncsIoSetFlagsFieldCallbackWrapper funptrptr _cb channel flags = do- channel' <- (newBoxed IOChannel) channel- let flags' = wordToGFlags flags- result <- _cb channel' flags'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback IOFuncsIoSeekFieldCallback-iOFuncsIoSeekFieldCallbackClosure :: IOFuncsIoSeekFieldCallback -> IO Closure-iOFuncsIoSeekFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoSeekFieldCallback wrapped- where wrapped = iOFuncsIoSeekFieldCallbackWrapper Nothing cb--type IOFuncsIoSeekFieldCallbackC =- Ptr IOChannel ->- Int64 ->- CUInt ->- IO CUInt--foreign import ccall "wrapper"- mkIOFuncsIoSeekFieldCallback :: IOFuncsIoSeekFieldCallbackC -> IO (FunPtr IOFuncsIoSeekFieldCallbackC)--type IOFuncsIoSeekFieldCallback =- IOChannel ->- Int64 ->- SeekType ->- IO IOStatus--noIOFuncsIoSeekFieldCallback :: Maybe IOFuncsIoSeekFieldCallback-noIOFuncsIoSeekFieldCallback = Nothing--iOFuncsIoSeekFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoSeekFieldCallbackC))) ->- IOFuncsIoSeekFieldCallback ->- Ptr IOChannel ->- Int64 ->- CUInt ->- IO CUInt-iOFuncsIoSeekFieldCallbackWrapper funptrptr _cb channel offset type_ = do- channel' <- (newBoxed IOChannel) channel- let type_' = (toEnum . fromIntegral) type_- result <- _cb channel' offset type_'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback IOFuncsIoReadFieldCallback-iOFuncsIoReadFieldCallbackClosure :: IOFuncsIoReadFieldCallback -> IO Closure-iOFuncsIoReadFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoReadFieldCallback wrapped- where wrapped = iOFuncsIoReadFieldCallbackWrapper Nothing cb--type IOFuncsIoReadFieldCallbackC =- Ptr IOChannel ->- CString ->- Word64 ->- Word64 ->- IO CUInt--foreign import ccall "wrapper"- mkIOFuncsIoReadFieldCallback :: IOFuncsIoReadFieldCallbackC -> IO (FunPtr IOFuncsIoReadFieldCallbackC)--type IOFuncsIoReadFieldCallback =- IOChannel ->- T.Text ->- Word64 ->- Word64 ->- IO IOStatus--noIOFuncsIoReadFieldCallback :: Maybe IOFuncsIoReadFieldCallback-noIOFuncsIoReadFieldCallback = Nothing--iOFuncsIoReadFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoReadFieldCallbackC))) ->- IOFuncsIoReadFieldCallback ->- Ptr IOChannel ->- CString ->- Word64 ->- Word64 ->- IO CUInt-iOFuncsIoReadFieldCallbackWrapper funptrptr _cb channel buf count bytesRead = do- channel' <- (newBoxed IOChannel) channel- buf' <- cstringToText buf- result <- _cb channel' buf' count bytesRead- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback IOFuncsIoGetFlagsFieldCallback-iOFuncsIoGetFlagsFieldCallbackClosure :: IOFuncsIoGetFlagsFieldCallback -> IO Closure-iOFuncsIoGetFlagsFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoGetFlagsFieldCallback wrapped- where wrapped = iOFuncsIoGetFlagsFieldCallbackWrapper Nothing cb--type IOFuncsIoGetFlagsFieldCallbackC =- Ptr IOChannel ->- IO CUInt--foreign import ccall "wrapper"- mkIOFuncsIoGetFlagsFieldCallback :: IOFuncsIoGetFlagsFieldCallbackC -> IO (FunPtr IOFuncsIoGetFlagsFieldCallbackC)--type IOFuncsIoGetFlagsFieldCallback =- IOChannel ->- IO [IOFlags]--noIOFuncsIoGetFlagsFieldCallback :: Maybe IOFuncsIoGetFlagsFieldCallback-noIOFuncsIoGetFlagsFieldCallback = Nothing--iOFuncsIoGetFlagsFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoGetFlagsFieldCallbackC))) ->- IOFuncsIoGetFlagsFieldCallback ->- Ptr IOChannel ->- IO CUInt-iOFuncsIoGetFlagsFieldCallbackWrapper funptrptr _cb channel = do- channel' <- (newBoxed IOChannel) channel- result <- _cb channel'- maybeReleaseFunPtr funptrptr- let result' = gflagsToWord result- return result'---- callback IOFuncsIoFreeFieldCallback-iOFuncsIoFreeFieldCallbackClosure :: IOFuncsIoFreeFieldCallback -> IO Closure-iOFuncsIoFreeFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoFreeFieldCallback wrapped- where wrapped = iOFuncsIoFreeFieldCallbackWrapper Nothing cb--type IOFuncsIoFreeFieldCallbackC =- Ptr IOChannel ->- IO ()--foreign import ccall "wrapper"- mkIOFuncsIoFreeFieldCallback :: IOFuncsIoFreeFieldCallbackC -> IO (FunPtr IOFuncsIoFreeFieldCallbackC)--type IOFuncsIoFreeFieldCallback =- IOChannel ->- IO ()--noIOFuncsIoFreeFieldCallback :: Maybe IOFuncsIoFreeFieldCallback-noIOFuncsIoFreeFieldCallback = Nothing--iOFuncsIoFreeFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoFreeFieldCallbackC))) ->- IOFuncsIoFreeFieldCallback ->- Ptr IOChannel ->- IO ()-iOFuncsIoFreeFieldCallbackWrapper funptrptr _cb channel = do- channel' <- (newBoxed IOChannel) channel- _cb channel'- maybeReleaseFunPtr funptrptr---- callback IOFuncsIoCreateWatchFieldCallback-iOFuncsIoCreateWatchFieldCallbackClosure :: IOFuncsIoCreateWatchFieldCallback -> IO Closure-iOFuncsIoCreateWatchFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoCreateWatchFieldCallback wrapped- where wrapped = iOFuncsIoCreateWatchFieldCallbackWrapper Nothing cb--type IOFuncsIoCreateWatchFieldCallbackC =- Ptr IOChannel ->- CUInt ->- IO (Ptr Source)--foreign import ccall "wrapper"- mkIOFuncsIoCreateWatchFieldCallback :: IOFuncsIoCreateWatchFieldCallbackC -> IO (FunPtr IOFuncsIoCreateWatchFieldCallbackC)--type IOFuncsIoCreateWatchFieldCallback =- IOChannel ->- [IOCondition] ->- IO Source--noIOFuncsIoCreateWatchFieldCallback :: Maybe IOFuncsIoCreateWatchFieldCallback-noIOFuncsIoCreateWatchFieldCallback = Nothing--iOFuncsIoCreateWatchFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoCreateWatchFieldCallbackC))) ->- IOFuncsIoCreateWatchFieldCallback ->- Ptr IOChannel ->- CUInt ->- IO (Ptr Source)-iOFuncsIoCreateWatchFieldCallbackWrapper funptrptr _cb channel condition = do- channel' <- (newBoxed IOChannel) channel- let condition' = wordToGFlags condition- result <- _cb channel' condition'- maybeReleaseFunPtr funptrptr- result' <- copyBoxed result- return result'---- callback IOFuncsIoCloseFieldCallback-iOFuncsIoCloseFieldCallbackClosure :: IOFuncsIoCloseFieldCallback -> IO Closure-iOFuncsIoCloseFieldCallbackClosure cb = newCClosure =<< mkIOFuncsIoCloseFieldCallback wrapped- where wrapped = iOFuncsIoCloseFieldCallbackWrapper Nothing cb--type IOFuncsIoCloseFieldCallbackC =- Ptr IOChannel ->- IO CUInt--foreign import ccall "wrapper"- mkIOFuncsIoCloseFieldCallback :: IOFuncsIoCloseFieldCallbackC -> IO (FunPtr IOFuncsIoCloseFieldCallbackC)--type IOFuncsIoCloseFieldCallback =- IOChannel ->- IO IOStatus--noIOFuncsIoCloseFieldCallback :: Maybe IOFuncsIoCloseFieldCallback-noIOFuncsIoCloseFieldCallback = Nothing--iOFuncsIoCloseFieldCallbackWrapper ::- Maybe (Ptr (FunPtr (IOFuncsIoCloseFieldCallbackC))) ->- IOFuncsIoCloseFieldCallback ->- Ptr IOChannel ->- IO CUInt-iOFuncsIoCloseFieldCallbackWrapper funptrptr _cb channel = do- channel' <- (newBoxed IOChannel) channel- result <- _cb channel'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback IOFunc-iOFuncClosure :: IOFunc -> IO Closure-iOFuncClosure cb = newCClosure =<< mkIOFunc wrapped- where wrapped = iOFuncWrapper Nothing cb--type IOFuncC =- Ptr IOChannel ->- CUInt ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkIOFunc :: IOFuncC -> IO (FunPtr IOFuncC)--type IOFunc =- IOChannel ->- [IOCondition] ->- Ptr () ->- IO Bool--noIOFunc :: Maybe IOFunc-noIOFunc = Nothing--iOFuncWrapper ::- Maybe (Ptr (FunPtr (IOFuncC))) ->- IOFunc ->- Ptr IOChannel ->- CUInt ->- Ptr () ->- IO CInt-iOFuncWrapper funptrptr _cb source condition data_ = do- source' <- (newBoxed IOChannel) source- let condition' = wordToGFlags condition- result <- _cb source' condition' data_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback HookMarshaller-hookMarshallerClosure :: HookMarshaller -> IO Closure-hookMarshallerClosure cb = newCClosure =<< mkHookMarshaller wrapped- where wrapped = hookMarshallerWrapper Nothing cb--type HookMarshallerC =- Ptr Hook ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkHookMarshaller :: HookMarshallerC -> IO (FunPtr HookMarshallerC)--type HookMarshaller =- Hook ->- Ptr () ->- IO ()--noHookMarshaller :: Maybe HookMarshaller-noHookMarshaller = Nothing--hookMarshallerWrapper ::- Maybe (Ptr (FunPtr (HookMarshallerC))) ->- HookMarshaller ->- Ptr Hook ->- Ptr () ->- IO ()-hookMarshallerWrapper funptrptr _cb hook marshalData = do- hook' <- (newPtr Hook) hook- _cb hook' marshalData- maybeReleaseFunPtr funptrptr---- callback HookFunc-hookFuncClosure :: HookFunc -> IO Closure-hookFuncClosure cb = newCClosure =<< mkHookFunc wrapped- where wrapped = hookFuncWrapper Nothing cb--type HookFuncC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkHookFunc :: HookFuncC -> IO (FunPtr HookFuncC)--type HookFunc =- Ptr () ->- IO ()--noHookFunc :: Maybe HookFunc-noHookFunc = Nothing--hookFuncWrapper ::- Maybe (Ptr (FunPtr (HookFuncC))) ->- HookFunc ->- Ptr () ->- IO ()-hookFuncWrapper funptrptr _cb data_ = do- _cb data_- maybeReleaseFunPtr funptrptr---- callback HookFindFunc-hookFindFuncClosure :: HookFindFunc -> IO Closure-hookFindFuncClosure cb = newCClosure =<< mkHookFindFunc wrapped- where wrapped = hookFindFuncWrapper Nothing cb--type HookFindFuncC =- Ptr Hook ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkHookFindFunc :: HookFindFuncC -> IO (FunPtr HookFindFuncC)--type HookFindFunc =- Hook ->- Ptr () ->- IO Bool--noHookFindFunc :: Maybe HookFindFunc-noHookFindFunc = Nothing--hookFindFuncWrapper ::- Maybe (Ptr (FunPtr (HookFindFuncC))) ->- HookFindFunc ->- Ptr Hook ->- Ptr () ->- IO CInt-hookFindFuncWrapper funptrptr _cb hook data_ = do- hook' <- (newPtr Hook) hook- result <- _cb hook' data_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback HookFinalizeFunc-hookFinalizeFuncClosure :: HookFinalizeFunc -> IO Closure-hookFinalizeFuncClosure cb = newCClosure =<< mkHookFinalizeFunc wrapped- where wrapped = hookFinalizeFuncWrapper Nothing cb--type HookFinalizeFuncC =- Ptr HookList ->- Ptr Hook ->- IO ()--foreign import ccall "wrapper"- mkHookFinalizeFunc :: HookFinalizeFuncC -> IO (FunPtr HookFinalizeFuncC)--type HookFinalizeFunc =- HookList ->- Hook ->- IO ()--noHookFinalizeFunc :: Maybe HookFinalizeFunc-noHookFinalizeFunc = Nothing--hookFinalizeFuncWrapper ::- Maybe (Ptr (FunPtr (HookFinalizeFuncC))) ->- HookFinalizeFunc ->- Ptr HookList ->- Ptr Hook ->- IO ()-hookFinalizeFuncWrapper funptrptr _cb hookList hook = do- hookList' <- (newPtr HookList) hookList- hook' <- (newPtr Hook) hook- _cb hookList' hook'- maybeReleaseFunPtr funptrptr---- callback HookCompareFunc-hookCompareFuncClosure :: HookCompareFunc -> IO Closure-hookCompareFuncClosure cb = newCClosure =<< mkHookCompareFunc wrapped- where wrapped = hookCompareFuncWrapper Nothing cb--type HookCompareFuncC =- Ptr Hook ->- Ptr Hook ->- IO Int32--foreign import ccall "wrapper"- mkHookCompareFunc :: HookCompareFuncC -> IO (FunPtr HookCompareFuncC)--type HookCompareFunc =- Hook ->- Hook ->- IO Int32--noHookCompareFunc :: Maybe HookCompareFunc-noHookCompareFunc = Nothing--hookCompareFuncWrapper ::- Maybe (Ptr (FunPtr (HookCompareFuncC))) ->- HookCompareFunc ->- Ptr Hook ->- Ptr Hook ->- IO Int32-hookCompareFuncWrapper funptrptr _cb newHook sibling = do- newHook' <- (newPtr Hook) newHook- sibling' <- (newPtr Hook) sibling- result <- _cb newHook' sibling'- maybeReleaseFunPtr funptrptr- return result---- callback HookCheckMarshaller-hookCheckMarshallerClosure :: HookCheckMarshaller -> IO Closure-hookCheckMarshallerClosure cb = newCClosure =<< mkHookCheckMarshaller wrapped- where wrapped = hookCheckMarshallerWrapper Nothing cb--type HookCheckMarshallerC =- Ptr Hook ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkHookCheckMarshaller :: HookCheckMarshallerC -> IO (FunPtr HookCheckMarshallerC)--type HookCheckMarshaller =- Hook ->- Ptr () ->- IO Bool--noHookCheckMarshaller :: Maybe HookCheckMarshaller-noHookCheckMarshaller = Nothing--hookCheckMarshallerWrapper ::- Maybe (Ptr (FunPtr (HookCheckMarshallerC))) ->- HookCheckMarshaller ->- Ptr Hook ->- Ptr () ->- IO CInt-hookCheckMarshallerWrapper funptrptr _cb hook marshalData = do- hook' <- (newPtr Hook) hook- result <- _cb hook' marshalData- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback HookCheckFunc-hookCheckFuncClosure :: HookCheckFunc -> IO Closure-hookCheckFuncClosure cb = newCClosure =<< mkHookCheckFunc wrapped- where wrapped = hookCheckFuncWrapper Nothing cb--type HookCheckFuncC =- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkHookCheckFunc :: HookCheckFuncC -> IO (FunPtr HookCheckFuncC)--type HookCheckFunc =- Ptr () ->- IO Bool--noHookCheckFunc :: Maybe HookCheckFunc-noHookCheckFunc = Nothing--hookCheckFuncWrapper ::- Maybe (Ptr (FunPtr (HookCheckFuncC))) ->- HookCheckFunc ->- Ptr () ->- IO CInt-hookCheckFuncWrapper funptrptr _cb data_ = do- result <- _cb data_- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback HashFunc-hashFuncClosure :: HashFunc -> IO Closure-hashFuncClosure cb = newCClosure =<< mkHashFunc wrapped- where wrapped = hashFuncWrapper Nothing cb--type HashFuncC =- Ptr () ->- IO Word32--foreign import ccall "wrapper"- mkHashFunc :: HashFuncC -> IO (FunPtr HashFuncC)--type HashFunc =- Ptr () ->- IO Word32--noHashFunc :: Maybe HashFunc-noHashFunc = Nothing--hashFuncWrapper ::- Maybe (Ptr (FunPtr (HashFuncC))) ->- HashFunc ->- Ptr () ->- IO Word32-hashFuncWrapper funptrptr _cb key = do- result <- _cb key- maybeReleaseFunPtr funptrptr- return result---- callback HRFunc-hRFuncClosure :: HRFunc -> IO Closure-hRFuncClosure cb = newCClosure =<< mkHRFunc wrapped- where wrapped = hRFuncWrapper Nothing cb--type HRFuncC =- Ptr () ->- Ptr () ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkHRFunc :: HRFuncC -> IO (FunPtr HRFuncC)--type HRFunc =- Ptr () ->- Ptr () ->- IO Bool--noHRFunc :: Maybe HRFunc-noHRFunc = Nothing--hRFuncWrapper ::- Maybe (Ptr (FunPtr (HRFuncC))) ->- HRFunc ->- Ptr () ->- Ptr () ->- Ptr () ->- IO CInt-hRFuncWrapper funptrptr _cb key value _ = do- result <- _cb key value- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback HFunc-hFuncClosure :: HFunc -> IO Closure-hFuncClosure cb = newCClosure =<< mkHFunc wrapped- where wrapped = hFuncWrapper Nothing cb--type HFuncC =- Ptr () ->- Ptr () ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkHFunc :: HFuncC -> IO (FunPtr HFuncC)--type HFunc =- Ptr () ->- Ptr () ->- IO ()--noHFunc :: Maybe HFunc-noHFunc = Nothing--hFuncWrapper ::- Maybe (Ptr (FunPtr (HFuncC))) ->- HFunc ->- Ptr () ->- Ptr () ->- Ptr () ->- IO ()-hFuncWrapper funptrptr _cb key value _ = do- _cb key value- maybeReleaseFunPtr funptrptr---- callback Func-funcClosure :: Func -> IO Closure-funcClosure cb = newCClosure =<< mkFunc wrapped- where wrapped = funcWrapper Nothing cb--type FuncC =- Ptr () ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkFunc :: FuncC -> IO (FunPtr FuncC)--type Func =- Ptr () ->- IO ()--noFunc :: Maybe Func-noFunc = Nothing--funcWrapper ::- Maybe (Ptr (FunPtr (FuncC))) ->- Func ->- Ptr () ->- Ptr () ->- IO ()-funcWrapper funptrptr _cb data_ _ = do- _cb data_- maybeReleaseFunPtr funptrptr---- callback FreeFunc-freeFuncClosure :: FreeFunc -> IO Closure-freeFuncClosure cb = newCClosure =<< mkFreeFunc wrapped- where wrapped = freeFuncWrapper Nothing cb--type FreeFuncC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkFreeFunc :: FreeFuncC -> IO (FunPtr FreeFuncC)--type FreeFunc =- Ptr () ->- IO ()--noFreeFunc :: Maybe FreeFunc-noFreeFunc = Nothing--freeFuncWrapper ::- Maybe (Ptr (FunPtr (FreeFuncC))) ->- FreeFunc ->- Ptr () ->- IO ()-freeFuncWrapper funptrptr _cb data_ = do- _cb data_- maybeReleaseFunPtr funptrptr---- callback EqualFunc-equalFuncClosure :: EqualFunc -> IO Closure-equalFuncClosure cb = newCClosure =<< mkEqualFunc wrapped- where wrapped = equalFuncWrapper Nothing cb--type EqualFuncC =- Ptr () ->- Ptr () ->- IO CInt--foreign import ccall "wrapper"- mkEqualFunc :: EqualFuncC -> IO (FunPtr EqualFuncC)--type EqualFunc =- Ptr () ->- Ptr () ->- IO Bool--noEqualFunc :: Maybe EqualFunc-noEqualFunc = Nothing--equalFuncWrapper ::- Maybe (Ptr (FunPtr (EqualFuncC))) ->- EqualFunc ->- Ptr () ->- Ptr () ->- IO CInt-equalFuncWrapper funptrptr _cb a b = do- result <- _cb a b- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'---- callback DestroyNotify-destroyNotifyClosure :: DestroyNotify -> IO Closure-destroyNotifyClosure cb = newCClosure =<< mkDestroyNotify wrapped- where wrapped = destroyNotifyWrapper Nothing cb--type DestroyNotifyC =- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkDestroyNotify :: DestroyNotifyC -> IO (FunPtr DestroyNotifyC)--type DestroyNotify =- Ptr () ->- IO ()--noDestroyNotify :: Maybe DestroyNotify-noDestroyNotify = Nothing--destroyNotifyWrapper ::- Maybe (Ptr (FunPtr (DestroyNotifyC))) ->- DestroyNotify ->- Ptr () ->- IO ()-destroyNotifyWrapper funptrptr _cb data_ = do- _cb data_- maybeReleaseFunPtr funptrptr---- callback DataForeachFunc-dataForeachFuncClosure :: DataForeachFunc -> IO Closure-dataForeachFuncClosure cb = newCClosure =<< mkDataForeachFunc wrapped- where wrapped = dataForeachFuncWrapper Nothing cb--type DataForeachFuncC =- Word32 ->- Ptr () ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkDataForeachFunc :: DataForeachFuncC -> IO (FunPtr DataForeachFuncC)--type DataForeachFunc =- Word32 ->- Ptr () ->- IO ()--noDataForeachFunc :: Maybe DataForeachFunc-noDataForeachFunc = Nothing--dataForeachFuncWrapper ::- Maybe (Ptr (FunPtr (DataForeachFuncC))) ->- DataForeachFunc ->- Word32 ->- Ptr () ->- Ptr () ->- IO ()-dataForeachFuncWrapper funptrptr _cb keyId data_ _ = do- _cb keyId data_- maybeReleaseFunPtr funptrptr---- callback CompareFunc-compareFuncClosure :: CompareFunc -> IO Closure-compareFuncClosure cb = newCClosure =<< mkCompareFunc wrapped- where wrapped = compareFuncWrapper Nothing cb--type CompareFuncC =- Ptr () ->- Ptr () ->- IO Int32--foreign import ccall "wrapper"- mkCompareFunc :: CompareFuncC -> IO (FunPtr CompareFuncC)--type CompareFunc =- Ptr () ->- Ptr () ->- IO Int32--noCompareFunc :: Maybe CompareFunc-noCompareFunc = Nothing--compareFuncWrapper ::- Maybe (Ptr (FunPtr (CompareFuncC))) ->- CompareFunc ->- Ptr () ->- Ptr () ->- IO Int32-compareFuncWrapper funptrptr _cb a b = do- result <- _cb a b- maybeReleaseFunPtr funptrptr- return result---- callback CompareDataFunc-compareDataFuncClosure :: CompareDataFunc -> IO Closure-compareDataFuncClosure cb = newCClosure =<< mkCompareDataFunc wrapped- where wrapped = compareDataFuncWrapper Nothing cb--type CompareDataFuncC =- Ptr () ->- Ptr () ->- Ptr () ->- IO Int32--foreign import ccall "wrapper"- mkCompareDataFunc :: CompareDataFuncC -> IO (FunPtr CompareDataFuncC)--type CompareDataFunc =- Ptr () ->- Ptr () ->- IO Int32--noCompareDataFunc :: Maybe CompareDataFunc-noCompareDataFunc = Nothing--compareDataFuncWrapper ::- Maybe (Ptr (FunPtr (CompareDataFuncC))) ->- CompareDataFunc ->- Ptr () ->- Ptr () ->- Ptr () ->- IO Int32-compareDataFuncWrapper funptrptr _cb a b _ = do- result <- _cb a b- maybeReleaseFunPtr funptrptr- return result---- callback ChildWatchFunc-childWatchFuncClosure :: ChildWatchFunc -> IO Closure-childWatchFuncClosure cb = newCClosure =<< mkChildWatchFunc wrapped- where wrapped = childWatchFuncWrapper Nothing cb--type ChildWatchFuncC =- Int32 ->- Int32 ->- Ptr () ->- IO ()--foreign import ccall "wrapper"- mkChildWatchFunc :: ChildWatchFuncC -> IO (FunPtr ChildWatchFuncC)--type ChildWatchFunc =- Int32 ->- Int32 ->- IO ()--noChildWatchFunc :: Maybe ChildWatchFunc-noChildWatchFunc = Nothing--childWatchFuncWrapper ::- Maybe (Ptr (FunPtr (ChildWatchFuncC))) ->- ChildWatchFunc ->- Int32 ->- Int32 ->- Ptr () ->- IO ()-childWatchFuncWrapper funptrptr _cb pid status _ = do- _cb pid status- maybeReleaseFunPtr funptrptr--
− GI/GLib/Constants.hs
@@ -1,545 +0,0 @@-{-# LANGUAGE PatternSynonyms, ScopedTypeVariables, ViewPatterns #-}---{- |-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.GLib.Constants- ( - pattern WIN32_MSG_HANDLE ,- pattern VERSION_MIN_REQUIRED ,- pattern VA_COPY_AS_ARRAY ,- pattern USEC_PER_SEC ,- pattern URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS,- pattern URI_RESERVED_CHARS_GENERIC_DELIMITERS,- pattern UNICHAR_MAX_DECOMPOSITION_LENGTH,- pattern TIME_SPAN_SECOND ,- pattern TIME_SPAN_MINUTE ,- pattern TIME_SPAN_MILLISECOND ,- pattern TIME_SPAN_HOUR ,- pattern TIME_SPAN_DAY ,- pattern SYSDEF_MSG_PEEK ,- pattern SYSDEF_MSG_OOB ,- pattern SYSDEF_MSG_DONTROUTE ,- pattern SYSDEF_AF_UNIX ,- pattern SYSDEF_AF_INET6 ,- pattern SYSDEF_AF_INET ,- pattern STR_DELIMITERS ,- pattern SQRT2 ,- pattern SOURCE_REMOVE ,- pattern SOURCE_CONTINUE ,- pattern SIZEOF_VOID_P ,- pattern SIZEOF_SSIZE_T ,- pattern SIZEOF_SIZE_T ,- pattern SIZEOF_LONG ,- pattern SEARCHPATH_SEPARATOR_S ,- pattern SEARCHPATH_SEPARATOR ,- pattern PRIORITY_LOW ,- pattern PRIORITY_HIGH_IDLE ,- pattern PRIORITY_HIGH ,- pattern PRIORITY_DEFAULT_IDLE ,- pattern PRIORITY_DEFAULT ,- pattern POLLFD_FORMAT ,- pattern PI_4 ,- pattern PI_2 ,- pattern PI ,- pattern PDP_ENDIAN ,- pattern OPTION_REMAINING ,- pattern MODULE_SUFFIX ,- pattern MINOR_VERSION ,- pattern MININT8 ,- pattern MININT64 ,- pattern MININT32 ,- pattern MININT16 ,- pattern MICRO_VERSION ,- pattern MAXUINT8 ,- pattern MAXUINT64 ,- pattern MAXUINT32 ,- pattern MAXUINT16 ,- pattern MAXINT8 ,- pattern MAXINT64 ,- pattern MAXINT32 ,- pattern MAXINT16 ,- pattern MAJOR_VERSION ,- pattern LOG_LEVEL_USER_SHIFT ,- pattern LOG_FATAL_MASK ,- pattern LOG_DOMAIN ,- pattern LOG_2_BASE_10 ,- pattern LN2 ,- pattern LN10 ,- pattern LITTLE_ENDIAN ,- pattern KEY_FILE_DESKTOP_TYPE_LINK ,- pattern KEY_FILE_DESKTOP_TYPE_DIRECTORY ,- pattern KEY_FILE_DESKTOP_TYPE_APPLICATION,- pattern KEY_FILE_DESKTOP_KEY_VERSION ,- pattern KEY_FILE_DESKTOP_KEY_URL ,- pattern KEY_FILE_DESKTOP_KEY_TYPE ,- pattern KEY_FILE_DESKTOP_KEY_TRY_EXEC ,- pattern KEY_FILE_DESKTOP_KEY_TERMINAL ,- pattern KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS,- pattern KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY,- pattern KEY_FILE_DESKTOP_KEY_PATH ,- pattern KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN,- pattern KEY_FILE_DESKTOP_KEY_NO_DISPLAY ,- pattern KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN,- pattern KEY_FILE_DESKTOP_KEY_NAME ,- pattern KEY_FILE_DESKTOP_KEY_MIME_TYPE ,- pattern KEY_FILE_DESKTOP_KEY_ICON ,- pattern KEY_FILE_DESKTOP_KEY_HIDDEN ,- pattern KEY_FILE_DESKTOP_KEY_GENERIC_NAME,- pattern KEY_FILE_DESKTOP_KEY_EXEC ,- pattern KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE,- pattern KEY_FILE_DESKTOP_KEY_COMMENT ,- pattern KEY_FILE_DESKTOP_KEY_CATEGORIES ,- pattern KEY_FILE_DESKTOP_KEY_ACTIONS ,- pattern KEY_FILE_DESKTOP_GROUP ,- pattern IEEE754_FLOAT_BIAS ,- pattern IEEE754_DOUBLE_BIAS ,- pattern HOOK_FLAG_USER_SHIFT ,- pattern HAVE___INLINE__ ,- pattern HAVE___INLINE ,- pattern HAVE_ISO_VARARGS ,- pattern HAVE_INLINE ,- pattern HAVE_GROWING_STACK ,- pattern HAVE_GNUC_VISIBILITY ,- pattern HAVE_GNUC_VARARGS ,- pattern HAVE_GINT64 ,- pattern GUINTPTR_FORMAT ,- pattern GUINT64_FORMAT ,- pattern GUINT32_FORMAT ,- pattern GUINT16_FORMAT ,- pattern GSSIZE_MODIFIER ,- pattern GSSIZE_FORMAT ,- pattern GSIZE_MODIFIER ,- pattern GSIZE_FORMAT ,- pattern GNUC_PRETTY_FUNCTION ,- pattern GNUC_FUNCTION ,- pattern GINTPTR_MODIFIER ,- pattern GINTPTR_FORMAT ,- pattern GINT64_MODIFIER ,- pattern GINT64_FORMAT ,- pattern GINT32_MODIFIER ,- pattern GINT32_FORMAT ,- pattern GINT16_MODIFIER ,- pattern GINT16_FORMAT ,- pattern E ,- pattern DIR_SEPARATOR_S ,- pattern DIR_SEPARATOR ,- pattern DATE_BAD_YEAR ,- pattern DATE_BAD_JULIAN ,- pattern DATE_BAD_DAY ,- pattern DATALIST_FLAGS_MASK ,- pattern CSET_a_2_z ,- pattern CSET_DIGITS ,- pattern CSET_A_2_Z ,- pattern CAN_INLINE ,- pattern BIG_ENDIAN ,- pattern ASCII_DTOSTR_BUF_SIZE ,- pattern ANALYZER_ANALYZING ,-- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks---pattern WIN32_MSG_HANDLE = 19981206 :: Int32---pattern VERSION_MIN_REQUIRED = 2 :: Int32---pattern VA_COPY_AS_ARRAY = 1 :: Int32---pattern USEC_PER_SEC = 1000000 :: Int32---pattern URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS = "!$&'()*+,;=" :: T.Text---pattern URI_RESERVED_CHARS_GENERIC_DELIMITERS = ":/?#[]@" :: T.Text---pattern UNICHAR_MAX_DECOMPOSITION_LENGTH = 18 :: Int32---pattern TIME_SPAN_SECOND = 1000000 :: Int64---pattern TIME_SPAN_MINUTE = 60000000 :: Int64---pattern TIME_SPAN_MILLISECOND = 1000 :: Int64---pattern TIME_SPAN_HOUR = 3600000000 :: Int64---pattern TIME_SPAN_DAY = 86400000000 :: Int64---pattern SYSDEF_MSG_PEEK = 2 :: Int32---pattern SYSDEF_MSG_OOB = 1 :: Int32---pattern SYSDEF_MSG_DONTROUTE = 4 :: Int32---pattern SYSDEF_AF_UNIX = 1 :: Int32---pattern SYSDEF_AF_INET6 = 10 :: Int32---pattern SYSDEF_AF_INET = 2 :: Int32---pattern STR_DELIMITERS = "_-|> <." :: T.Text---pattern SQRT2 = 1.414214 :: Double---pattern SOURCE_REMOVE = False :: Bool---pattern SOURCE_CONTINUE = True :: Bool---pattern SIZEOF_VOID_P = 8 :: Int32---pattern SIZEOF_SSIZE_T = 8 :: Int32---pattern SIZEOF_SIZE_T = 8 :: Int32---pattern SIZEOF_LONG = 8 :: Int32---pattern SEARCHPATH_SEPARATOR_S = ";" :: T.Text---pattern SEARCHPATH_SEPARATOR = 59 :: Int32---pattern PRIORITY_LOW = 300 :: Int32---pattern PRIORITY_HIGH_IDLE = 100 :: Int32---pattern PRIORITY_HIGH = -100 :: Int32---pattern PRIORITY_DEFAULT_IDLE = 200 :: Int32---pattern PRIORITY_DEFAULT = 0 :: Int32---pattern POLLFD_FORMAT = "%#I64x" :: T.Text---pattern PI_4 = 0.785398 :: Double---pattern PI_2 = 1.570796 :: Double---pattern PI = 3.141593 :: Double---pattern PDP_ENDIAN = 3412 :: Int32---pattern OPTION_REMAINING = "" :: T.Text---pattern MODULE_SUFFIX = "so" :: T.Text---pattern MINOR_VERSION = 46 :: Int32---pattern MININT8 = 128 :: Int8---pattern MININT64 = -9223372036854775808 :: Int64---pattern MININT32 = 2147483648 :: Int32---pattern MININT16 = 32768 :: Int16---pattern MICRO_VERSION = 0 :: Int32---pattern MAXUINT8 = 255 :: Word8---pattern MAXUINT64 = 18446744073709551615 :: Word64---pattern MAXUINT32 = 4294967295 :: Word32---pattern MAXUINT16 = 65535 :: Word16---pattern MAXINT8 = 127 :: Int8---pattern MAXINT64 = 9223372036854775807 :: Int64---pattern MAXINT32 = 2147483647 :: Int32---pattern MAXINT16 = 32767 :: Int16---pattern MAJOR_VERSION = 2 :: Int32---pattern LOG_LEVEL_USER_SHIFT = 8 :: Int32---pattern LOG_FATAL_MASK = 0 :: Int32---pattern LOG_DOMAIN = 0 :: Int8---pattern LOG_2_BASE_10 = 0.301030 :: Double---pattern LN2 = 0.693147 :: Double---pattern LN10 = 2.302585 :: Double---pattern LITTLE_ENDIAN = 1234 :: Int32---pattern KEY_FILE_DESKTOP_TYPE_LINK = "Link" :: T.Text---pattern KEY_FILE_DESKTOP_TYPE_DIRECTORY = "Directory" :: T.Text---pattern KEY_FILE_DESKTOP_TYPE_APPLICATION = "Application" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_VERSION = "Version" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_URL = "URL" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_TYPE = "Type" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_TRY_EXEC = "TryExec" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_TERMINAL = "Terminal" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = "StartupWMClass" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = "StartupNotify" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_PATH = "Path" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = "OnlyShowIn" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_NO_DISPLAY = "NoDisplay" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = "NotShowIn" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_NAME = "Name" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_MIME_TYPE = "MimeType" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_ICON = "Icon" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_HIDDEN = "Hidden" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_GENERIC_NAME = "GenericName" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_EXEC = "Exec" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = "DBusActivatable" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_COMMENT = "Comment" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_CATEGORIES = "Categories" :: T.Text---pattern KEY_FILE_DESKTOP_KEY_ACTIONS = "Actions" :: T.Text---pattern KEY_FILE_DESKTOP_GROUP = "Desktop Entry" :: T.Text---pattern IEEE754_FLOAT_BIAS = 127 :: Int32---pattern IEEE754_DOUBLE_BIAS = 1023 :: Int32---pattern HOOK_FLAG_USER_SHIFT = 4 :: Int32---pattern HAVE___INLINE__ = 1 :: Int32---pattern HAVE___INLINE = 1 :: Int32---pattern HAVE_ISO_VARARGS = 1 :: Int32---pattern HAVE_INLINE = 1 :: Int32---pattern HAVE_GROWING_STACK = 0 :: Int32---pattern HAVE_GNUC_VISIBILITY = 1 :: Int32---pattern HAVE_GNUC_VARARGS = 1 :: Int32---pattern HAVE_GINT64 = 1 :: Int32---pattern GUINTPTR_FORMAT = "lu" :: T.Text---pattern GUINT64_FORMAT = "lu" :: T.Text---pattern GUINT32_FORMAT = "u" :: T.Text---pattern GUINT16_FORMAT = "hu" :: T.Text---pattern GSSIZE_MODIFIER = "l" :: T.Text---pattern GSSIZE_FORMAT = "li" :: T.Text---pattern GSIZE_MODIFIER = "l" :: T.Text---pattern GSIZE_FORMAT = "lu" :: T.Text--{-# DEPRECATED GNUC_PRETTY_FUNCTION ["(Since version 2.16)","Use G_STRFUNC() instead"]#-}-pattern GNUC_PRETTY_FUNCTION = "" :: T.Text--{-# DEPRECATED GNUC_FUNCTION ["(Since version 2.16)","Use G_STRFUNC() instead"]#-}-pattern GNUC_FUNCTION = "" :: T.Text---pattern GINTPTR_MODIFIER = "l" :: T.Text---pattern GINTPTR_FORMAT = "li" :: T.Text---pattern GINT64_MODIFIER = "l" :: T.Text---pattern GINT64_FORMAT = "li" :: T.Text---pattern GINT32_MODIFIER = "" :: T.Text---pattern GINT32_FORMAT = "i" :: T.Text---pattern GINT16_MODIFIER = "h" :: T.Text---pattern GINT16_FORMAT = "hi" :: T.Text---pattern E = 2.718282 :: Double---pattern DIR_SEPARATOR_S = "\\" :: T.Text---pattern DIR_SEPARATOR = 92 :: Int32---pattern DATE_BAD_YEAR = 0 :: Int32---pattern DATE_BAD_JULIAN = 0 :: Int32---pattern DATE_BAD_DAY = 0 :: Int32---pattern DATALIST_FLAGS_MASK = 3 :: Int32---pattern CSET_a_2_z = "abcdefghijklmnopqrstuvwxyz" :: T.Text---pattern CSET_DIGITS = "0123456789" :: T.Text---pattern CSET_A_2_Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" :: T.Text---pattern CAN_INLINE = 1 :: Int32---pattern BIG_ENDIAN = 4321 :: Int32---pattern ASCII_DTOSTR_BUF_SIZE = 39 :: Int32---pattern ANALYZER_ANALYZING = 1 :: Int32--
− GI/GLib/Enums.hs
@@ -1,2152 +0,0 @@---{- |-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.GLib.Enums- ( - catchVariantParseError ,- handleVariantParseError ,- catchThreadError ,- handleThreadError ,- catchSpawnError ,- handleSpawnError ,- catchShellError ,- handleShellError ,- catchRegexError ,- handleRegexError ,- catchOptionError ,- handleOptionError ,- catchMarkupError ,- handleMarkupError ,- catchKeyFileError ,- handleKeyFileError ,- catchIOChannelError ,- handleIOChannelError ,- catchFileError ,- handleFileError ,- catchConvertError ,- handleConvertError ,- catchBookmarkFileError ,- handleBookmarkFileError ,---- * Exported types- VariantParseError(..) ,- VariantClass(..) ,- UserDirectory(..) ,- UnicodeType(..) ,- UnicodeScript(..) ,- UnicodeBreakType(..) ,- TraverseType(..) ,- TokenType(..) ,- TimeType(..) ,- ThreadError(..) ,- TestLogType(..) ,- TestFileType(..) ,- SpawnError(..) ,- SliceConfig(..) ,- ShellError(..) ,- SeekType(..) ,- RegexError(..) ,- OptionError(..) ,- OptionArg(..) ,- OnceStatus(..) ,- NormalizeMode(..) ,- MarkupError(..) ,- KeyFileError(..) ,- IOStatus(..) ,- IOError(..) ,- IOChannelError(..) ,- FileError(..) ,- ErrorType(..) ,- DateWeekday(..) ,- DateMonth(..) ,- DateDMY(..) ,- ConvertError(..) ,- ChecksumType(..) ,- BookmarkFileError(..) ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map------- Enum VariantParseError--data VariantParseError = - VariantParseErrorFailed- | VariantParseErrorBasicTypeExpected- | VariantParseErrorCannotInferType- | VariantParseErrorDefiniteTypeExpected- | VariantParseErrorInputNotAtEnd- | VariantParseErrorInvalidCharacter- | VariantParseErrorInvalidFormatString- | VariantParseErrorInvalidObjectPath- | VariantParseErrorInvalidSignature- | VariantParseErrorInvalidTypeString- | VariantParseErrorNoCommonType- | VariantParseErrorNumberOutOfRange- | VariantParseErrorNumberTooBig- | VariantParseErrorTypeError- | VariantParseErrorUnexpectedToken- | VariantParseErrorUnknownKeyword- | VariantParseErrorUnterminatedStringConstant- | VariantParseErrorValueExpected- | AnotherVariantParseError Int- deriving (Show, Eq)--instance Enum VariantParseError where- fromEnum VariantParseErrorFailed = 0- fromEnum VariantParseErrorBasicTypeExpected = 1- fromEnum VariantParseErrorCannotInferType = 2- fromEnum VariantParseErrorDefiniteTypeExpected = 3- fromEnum VariantParseErrorInputNotAtEnd = 4- fromEnum VariantParseErrorInvalidCharacter = 5- fromEnum VariantParseErrorInvalidFormatString = 6- fromEnum VariantParseErrorInvalidObjectPath = 7- fromEnum VariantParseErrorInvalidSignature = 8- fromEnum VariantParseErrorInvalidTypeString = 9- fromEnum VariantParseErrorNoCommonType = 10- fromEnum VariantParseErrorNumberOutOfRange = 11- fromEnum VariantParseErrorNumberTooBig = 12- fromEnum VariantParseErrorTypeError = 13- fromEnum VariantParseErrorUnexpectedToken = 14- fromEnum VariantParseErrorUnknownKeyword = 15- fromEnum VariantParseErrorUnterminatedStringConstant = 16- fromEnum VariantParseErrorValueExpected = 17- fromEnum (AnotherVariantParseError k) = k-- toEnum 0 = VariantParseErrorFailed- toEnum 1 = VariantParseErrorBasicTypeExpected- toEnum 2 = VariantParseErrorCannotInferType- toEnum 3 = VariantParseErrorDefiniteTypeExpected- toEnum 4 = VariantParseErrorInputNotAtEnd- toEnum 5 = VariantParseErrorInvalidCharacter- toEnum 6 = VariantParseErrorInvalidFormatString- toEnum 7 = VariantParseErrorInvalidObjectPath- toEnum 8 = VariantParseErrorInvalidSignature- toEnum 9 = VariantParseErrorInvalidTypeString- toEnum 10 = VariantParseErrorNoCommonType- toEnum 11 = VariantParseErrorNumberOutOfRange- toEnum 12 = VariantParseErrorNumberTooBig- toEnum 13 = VariantParseErrorTypeError- toEnum 14 = VariantParseErrorUnexpectedToken- toEnum 15 = VariantParseErrorUnknownKeyword- toEnum 16 = VariantParseErrorUnterminatedStringConstant- toEnum 17 = VariantParseErrorValueExpected- toEnum k = AnotherVariantParseError k--instance GErrorClass VariantParseError where- gerrorClassDomain _ = "g-variant-parse-error-quark"--catchVariantParseError ::- IO a ->- (VariantParseError -> GErrorMessage -> IO a) ->- IO a-catchVariantParseError = catchGErrorJustDomain--handleVariantParseError ::- (VariantParseError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleVariantParseError = handleGErrorJustDomain---- Enum VariantClass--data VariantClass = - VariantClassBoolean- | VariantClassByte- | VariantClassInt16- | VariantClassUint16- | VariantClassInt32- | VariantClassUint32- | VariantClassInt64- | VariantClassUint64- | VariantClassHandle- | VariantClassDouble- | VariantClassString- | VariantClassObjectPath- | VariantClassSignature- | VariantClassVariant- | VariantClassMaybe- | VariantClassArray- | VariantClassTuple- | VariantClassDictEntry- | AnotherVariantClass Int- deriving (Show, Eq)--instance Enum VariantClass where- fromEnum VariantClassBoolean = 98- fromEnum VariantClassByte = 121- fromEnum VariantClassInt16 = 110- fromEnum VariantClassUint16 = 113- fromEnum VariantClassInt32 = 105- fromEnum VariantClassUint32 = 117- fromEnum VariantClassInt64 = 120- fromEnum VariantClassUint64 = 116- fromEnum VariantClassHandle = 104- fromEnum VariantClassDouble = 100- fromEnum VariantClassString = 115- fromEnum VariantClassObjectPath = 111- fromEnum VariantClassSignature = 103- fromEnum VariantClassVariant = 118- fromEnum VariantClassMaybe = 109- fromEnum VariantClassArray = 97- fromEnum VariantClassTuple = 40- fromEnum VariantClassDictEntry = 123- fromEnum (AnotherVariantClass k) = k-- toEnum 40 = VariantClassTuple- toEnum 97 = VariantClassArray- toEnum 98 = VariantClassBoolean- toEnum 100 = VariantClassDouble- toEnum 103 = VariantClassSignature- toEnum 104 = VariantClassHandle- toEnum 105 = VariantClassInt32- toEnum 109 = VariantClassMaybe- toEnum 110 = VariantClassInt16- toEnum 111 = VariantClassObjectPath- toEnum 113 = VariantClassUint16- toEnum 115 = VariantClassString- toEnum 116 = VariantClassUint64- toEnum 117 = VariantClassUint32- toEnum 118 = VariantClassVariant- toEnum 120 = VariantClassInt64- toEnum 121 = VariantClassByte- toEnum 123 = VariantClassDictEntry- toEnum k = AnotherVariantClass k---- Enum UserDirectory--data UserDirectory = - UserDirectoryDirectoryDesktop- | UserDirectoryDirectoryDocuments- | UserDirectoryDirectoryDownload- | UserDirectoryDirectoryMusic- | UserDirectoryDirectoryPictures- | UserDirectoryDirectoryPublicShare- | UserDirectoryDirectoryTemplates- | UserDirectoryDirectoryVideos- | UserDirectoryNDirectories- | AnotherUserDirectory Int- deriving (Show, Eq)--instance Enum UserDirectory where- fromEnum UserDirectoryDirectoryDesktop = 0- fromEnum UserDirectoryDirectoryDocuments = 1- fromEnum UserDirectoryDirectoryDownload = 2- fromEnum UserDirectoryDirectoryMusic = 3- fromEnum UserDirectoryDirectoryPictures = 4- fromEnum UserDirectoryDirectoryPublicShare = 5- fromEnum UserDirectoryDirectoryTemplates = 6- fromEnum UserDirectoryDirectoryVideos = 7- fromEnum UserDirectoryNDirectories = 8- fromEnum (AnotherUserDirectory k) = k-- toEnum 0 = UserDirectoryDirectoryDesktop- toEnum 1 = UserDirectoryDirectoryDocuments- toEnum 2 = UserDirectoryDirectoryDownload- toEnum 3 = UserDirectoryDirectoryMusic- toEnum 4 = UserDirectoryDirectoryPictures- toEnum 5 = UserDirectoryDirectoryPublicShare- toEnum 6 = UserDirectoryDirectoryTemplates- toEnum 7 = UserDirectoryDirectoryVideos- toEnum 8 = UserDirectoryNDirectories- toEnum k = AnotherUserDirectory k---- Enum UnicodeType--data UnicodeType = - UnicodeTypeControl- | UnicodeTypeFormat- | UnicodeTypeUnassigned- | UnicodeTypePrivateUse- | UnicodeTypeSurrogate- | UnicodeTypeLowercaseLetter- | UnicodeTypeModifierLetter- | UnicodeTypeOtherLetter- | UnicodeTypeTitlecaseLetter- | UnicodeTypeUppercaseLetter- | UnicodeTypeSpacingMark- | UnicodeTypeEnclosingMark- | UnicodeTypeNonSpacingMark- | UnicodeTypeDecimalNumber- | UnicodeTypeLetterNumber- | UnicodeTypeOtherNumber- | UnicodeTypeConnectPunctuation- | UnicodeTypeDashPunctuation- | UnicodeTypeClosePunctuation- | UnicodeTypeFinalPunctuation- | UnicodeTypeInitialPunctuation- | UnicodeTypeOtherPunctuation- | UnicodeTypeOpenPunctuation- | UnicodeTypeCurrencySymbol- | UnicodeTypeModifierSymbol- | UnicodeTypeMathSymbol- | UnicodeTypeOtherSymbol- | UnicodeTypeLineSeparator- | UnicodeTypeParagraphSeparator- | UnicodeTypeSpaceSeparator- | AnotherUnicodeType Int- deriving (Show, Eq)--instance Enum UnicodeType where- fromEnum UnicodeTypeControl = 0- fromEnum UnicodeTypeFormat = 1- fromEnum UnicodeTypeUnassigned = 2- fromEnum UnicodeTypePrivateUse = 3- fromEnum UnicodeTypeSurrogate = 4- fromEnum UnicodeTypeLowercaseLetter = 5- fromEnum UnicodeTypeModifierLetter = 6- fromEnum UnicodeTypeOtherLetter = 7- fromEnum UnicodeTypeTitlecaseLetter = 8- fromEnum UnicodeTypeUppercaseLetter = 9- fromEnum UnicodeTypeSpacingMark = 10- fromEnum UnicodeTypeEnclosingMark = 11- fromEnum UnicodeTypeNonSpacingMark = 12- fromEnum UnicodeTypeDecimalNumber = 13- fromEnum UnicodeTypeLetterNumber = 14- fromEnum UnicodeTypeOtherNumber = 15- fromEnum UnicodeTypeConnectPunctuation = 16- fromEnum UnicodeTypeDashPunctuation = 17- fromEnum UnicodeTypeClosePunctuation = 18- fromEnum UnicodeTypeFinalPunctuation = 19- fromEnum UnicodeTypeInitialPunctuation = 20- fromEnum UnicodeTypeOtherPunctuation = 21- fromEnum UnicodeTypeOpenPunctuation = 22- fromEnum UnicodeTypeCurrencySymbol = 23- fromEnum UnicodeTypeModifierSymbol = 24- fromEnum UnicodeTypeMathSymbol = 25- fromEnum UnicodeTypeOtherSymbol = 26- fromEnum UnicodeTypeLineSeparator = 27- fromEnum UnicodeTypeParagraphSeparator = 28- fromEnum UnicodeTypeSpaceSeparator = 29- fromEnum (AnotherUnicodeType k) = k-- toEnum 0 = UnicodeTypeControl- toEnum 1 = UnicodeTypeFormat- toEnum 2 = UnicodeTypeUnassigned- toEnum 3 = UnicodeTypePrivateUse- toEnum 4 = UnicodeTypeSurrogate- toEnum 5 = UnicodeTypeLowercaseLetter- toEnum 6 = UnicodeTypeModifierLetter- toEnum 7 = UnicodeTypeOtherLetter- toEnum 8 = UnicodeTypeTitlecaseLetter- toEnum 9 = UnicodeTypeUppercaseLetter- toEnum 10 = UnicodeTypeSpacingMark- toEnum 11 = UnicodeTypeEnclosingMark- toEnum 12 = UnicodeTypeNonSpacingMark- toEnum 13 = UnicodeTypeDecimalNumber- toEnum 14 = UnicodeTypeLetterNumber- toEnum 15 = UnicodeTypeOtherNumber- toEnum 16 = UnicodeTypeConnectPunctuation- toEnum 17 = UnicodeTypeDashPunctuation- toEnum 18 = UnicodeTypeClosePunctuation- toEnum 19 = UnicodeTypeFinalPunctuation- toEnum 20 = UnicodeTypeInitialPunctuation- toEnum 21 = UnicodeTypeOtherPunctuation- toEnum 22 = UnicodeTypeOpenPunctuation- toEnum 23 = UnicodeTypeCurrencySymbol- toEnum 24 = UnicodeTypeModifierSymbol- toEnum 25 = UnicodeTypeMathSymbol- toEnum 26 = UnicodeTypeOtherSymbol- toEnum 27 = UnicodeTypeLineSeparator- toEnum 28 = UnicodeTypeParagraphSeparator- toEnum 29 = UnicodeTypeSpaceSeparator- toEnum k = AnotherUnicodeType k---- Enum UnicodeScript--data UnicodeScript = - UnicodeScriptInvalidCode- | UnicodeScriptCommon- | UnicodeScriptInherited- | UnicodeScriptArabic- | UnicodeScriptArmenian- | UnicodeScriptBengali- | UnicodeScriptBopomofo- | UnicodeScriptCherokee- | UnicodeScriptCoptic- | UnicodeScriptCyrillic- | UnicodeScriptDeseret- | UnicodeScriptDevanagari- | UnicodeScriptEthiopic- | UnicodeScriptGeorgian- | UnicodeScriptGothic- | UnicodeScriptGreek- | UnicodeScriptGujarati- | UnicodeScriptGurmukhi- | UnicodeScriptHan- | UnicodeScriptHangul- | UnicodeScriptHebrew- | UnicodeScriptHiragana- | UnicodeScriptKannada- | UnicodeScriptKatakana- | UnicodeScriptKhmer- | UnicodeScriptLao- | UnicodeScriptLatin- | UnicodeScriptMalayalam- | UnicodeScriptMongolian- | UnicodeScriptMyanmar- | UnicodeScriptOgham- | UnicodeScriptOldItalic- | UnicodeScriptOriya- | UnicodeScriptRunic- | UnicodeScriptSinhala- | UnicodeScriptSyriac- | UnicodeScriptTamil- | UnicodeScriptTelugu- | UnicodeScriptThaana- | UnicodeScriptThai- | UnicodeScriptTibetan- | UnicodeScriptCanadianAboriginal- | UnicodeScriptYi- | UnicodeScriptTagalog- | UnicodeScriptHanunoo- | UnicodeScriptBuhid- | UnicodeScriptTagbanwa- | UnicodeScriptBraille- | UnicodeScriptCypriot- | UnicodeScriptLimbu- | UnicodeScriptOsmanya- | UnicodeScriptShavian- | UnicodeScriptLinearB- | UnicodeScriptTaiLe- | UnicodeScriptUgaritic- | UnicodeScriptNewTaiLue- | UnicodeScriptBuginese- | UnicodeScriptGlagolitic- | UnicodeScriptTifinagh- | UnicodeScriptSylotiNagri- | UnicodeScriptOldPersian- | UnicodeScriptKharoshthi- | UnicodeScriptUnknown- | UnicodeScriptBalinese- | UnicodeScriptCuneiform- | UnicodeScriptPhoenician- | UnicodeScriptPhagsPa- | UnicodeScriptNko- | UnicodeScriptKayahLi- | UnicodeScriptLepcha- | UnicodeScriptRejang- | UnicodeScriptSundanese- | UnicodeScriptSaurashtra- | UnicodeScriptCham- | UnicodeScriptOlChiki- | UnicodeScriptVai- | UnicodeScriptCarian- | UnicodeScriptLycian- | UnicodeScriptLydian- | UnicodeScriptAvestan- | UnicodeScriptBamum- | UnicodeScriptEgyptianHieroglyphs- | UnicodeScriptImperialAramaic- | UnicodeScriptInscriptionalPahlavi- | UnicodeScriptInscriptionalParthian- | UnicodeScriptJavanese- | UnicodeScriptKaithi- | UnicodeScriptLisu- | UnicodeScriptMeeteiMayek- | UnicodeScriptOldSouthArabian- | UnicodeScriptOldTurkic- | UnicodeScriptSamaritan- | UnicodeScriptTaiTham- | UnicodeScriptTaiViet- | UnicodeScriptBatak- | UnicodeScriptBrahmi- | UnicodeScriptMandaic- | UnicodeScriptChakma- | UnicodeScriptMeroiticCursive- | UnicodeScriptMeroiticHieroglyphs- | UnicodeScriptMiao- | UnicodeScriptSharada- | UnicodeScriptSoraSompeng- | UnicodeScriptTakri- | UnicodeScriptBassaVah- | UnicodeScriptCaucasianAlbanian- | UnicodeScriptDuployan- | UnicodeScriptElbasan- | UnicodeScriptGrantha- | UnicodeScriptKhojki- | UnicodeScriptKhudawadi- | UnicodeScriptLinearA- | UnicodeScriptMahajani- | UnicodeScriptManichaean- | UnicodeScriptMendeKikakui- | UnicodeScriptModi- | UnicodeScriptMro- | UnicodeScriptNabataean- | UnicodeScriptOldNorthArabian- | UnicodeScriptOldPermic- | UnicodeScriptPahawhHmong- | UnicodeScriptPalmyrene- | UnicodeScriptPauCinHau- | UnicodeScriptPsalterPahlavi- | UnicodeScriptSiddham- | UnicodeScriptTirhuta- | UnicodeScriptWarangCiti- | AnotherUnicodeScript Int- deriving (Show, Eq)--instance Enum UnicodeScript where- fromEnum UnicodeScriptInvalidCode = -1- fromEnum UnicodeScriptCommon = 0- fromEnum UnicodeScriptInherited = 1- fromEnum UnicodeScriptArabic = 2- fromEnum UnicodeScriptArmenian = 3- fromEnum UnicodeScriptBengali = 4- fromEnum UnicodeScriptBopomofo = 5- fromEnum UnicodeScriptCherokee = 6- fromEnum UnicodeScriptCoptic = 7- fromEnum UnicodeScriptCyrillic = 8- fromEnum UnicodeScriptDeseret = 9- fromEnum UnicodeScriptDevanagari = 10- fromEnum UnicodeScriptEthiopic = 11- fromEnum UnicodeScriptGeorgian = 12- fromEnum UnicodeScriptGothic = 13- fromEnum UnicodeScriptGreek = 14- fromEnum UnicodeScriptGujarati = 15- fromEnum UnicodeScriptGurmukhi = 16- fromEnum UnicodeScriptHan = 17- fromEnum UnicodeScriptHangul = 18- fromEnum UnicodeScriptHebrew = 19- fromEnum UnicodeScriptHiragana = 20- fromEnum UnicodeScriptKannada = 21- fromEnum UnicodeScriptKatakana = 22- fromEnum UnicodeScriptKhmer = 23- fromEnum UnicodeScriptLao = 24- fromEnum UnicodeScriptLatin = 25- fromEnum UnicodeScriptMalayalam = 26- fromEnum UnicodeScriptMongolian = 27- fromEnum UnicodeScriptMyanmar = 28- fromEnum UnicodeScriptOgham = 29- fromEnum UnicodeScriptOldItalic = 30- fromEnum UnicodeScriptOriya = 31- fromEnum UnicodeScriptRunic = 32- fromEnum UnicodeScriptSinhala = 33- fromEnum UnicodeScriptSyriac = 34- fromEnum UnicodeScriptTamil = 35- fromEnum UnicodeScriptTelugu = 36- fromEnum UnicodeScriptThaana = 37- fromEnum UnicodeScriptThai = 38- fromEnum UnicodeScriptTibetan = 39- fromEnum UnicodeScriptCanadianAboriginal = 40- fromEnum UnicodeScriptYi = 41- fromEnum UnicodeScriptTagalog = 42- fromEnum UnicodeScriptHanunoo = 43- fromEnum UnicodeScriptBuhid = 44- fromEnum UnicodeScriptTagbanwa = 45- fromEnum UnicodeScriptBraille = 46- fromEnum UnicodeScriptCypriot = 47- fromEnum UnicodeScriptLimbu = 48- fromEnum UnicodeScriptOsmanya = 49- fromEnum UnicodeScriptShavian = 50- fromEnum UnicodeScriptLinearB = 51- fromEnum UnicodeScriptTaiLe = 52- fromEnum UnicodeScriptUgaritic = 53- fromEnum UnicodeScriptNewTaiLue = 54- fromEnum UnicodeScriptBuginese = 55- fromEnum UnicodeScriptGlagolitic = 56- fromEnum UnicodeScriptTifinagh = 57- fromEnum UnicodeScriptSylotiNagri = 58- fromEnum UnicodeScriptOldPersian = 59- fromEnum UnicodeScriptKharoshthi = 60- fromEnum UnicodeScriptUnknown = 61- fromEnum UnicodeScriptBalinese = 62- fromEnum UnicodeScriptCuneiform = 63- fromEnum UnicodeScriptPhoenician = 64- fromEnum UnicodeScriptPhagsPa = 65- fromEnum UnicodeScriptNko = 66- fromEnum UnicodeScriptKayahLi = 67- fromEnum UnicodeScriptLepcha = 68- fromEnum UnicodeScriptRejang = 69- fromEnum UnicodeScriptSundanese = 70- fromEnum UnicodeScriptSaurashtra = 71- fromEnum UnicodeScriptCham = 72- fromEnum UnicodeScriptOlChiki = 73- fromEnum UnicodeScriptVai = 74- fromEnum UnicodeScriptCarian = 75- fromEnum UnicodeScriptLycian = 76- fromEnum UnicodeScriptLydian = 77- fromEnum UnicodeScriptAvestan = 78- fromEnum UnicodeScriptBamum = 79- fromEnum UnicodeScriptEgyptianHieroglyphs = 80- fromEnum UnicodeScriptImperialAramaic = 81- fromEnum UnicodeScriptInscriptionalPahlavi = 82- fromEnum UnicodeScriptInscriptionalParthian = 83- fromEnum UnicodeScriptJavanese = 84- fromEnum UnicodeScriptKaithi = 85- fromEnum UnicodeScriptLisu = 86- fromEnum UnicodeScriptMeeteiMayek = 87- fromEnum UnicodeScriptOldSouthArabian = 88- fromEnum UnicodeScriptOldTurkic = 89- fromEnum UnicodeScriptSamaritan = 90- fromEnum UnicodeScriptTaiTham = 91- fromEnum UnicodeScriptTaiViet = 92- fromEnum UnicodeScriptBatak = 93- fromEnum UnicodeScriptBrahmi = 94- fromEnum UnicodeScriptMandaic = 95- fromEnum UnicodeScriptChakma = 96- fromEnum UnicodeScriptMeroiticCursive = 97- fromEnum UnicodeScriptMeroiticHieroglyphs = 98- fromEnum UnicodeScriptMiao = 99- fromEnum UnicodeScriptSharada = 100- fromEnum UnicodeScriptSoraSompeng = 101- fromEnum UnicodeScriptTakri = 102- fromEnum UnicodeScriptBassaVah = 103- fromEnum UnicodeScriptCaucasianAlbanian = 104- fromEnum UnicodeScriptDuployan = 105- fromEnum UnicodeScriptElbasan = 106- fromEnum UnicodeScriptGrantha = 107- fromEnum UnicodeScriptKhojki = 108- fromEnum UnicodeScriptKhudawadi = 109- fromEnum UnicodeScriptLinearA = 110- fromEnum UnicodeScriptMahajani = 111- fromEnum UnicodeScriptManichaean = 112- fromEnum UnicodeScriptMendeKikakui = 113- fromEnum UnicodeScriptModi = 114- fromEnum UnicodeScriptMro = 115- fromEnum UnicodeScriptNabataean = 116- fromEnum UnicodeScriptOldNorthArabian = 117- fromEnum UnicodeScriptOldPermic = 118- fromEnum UnicodeScriptPahawhHmong = 119- fromEnum UnicodeScriptPalmyrene = 120- fromEnum UnicodeScriptPauCinHau = 121- fromEnum UnicodeScriptPsalterPahlavi = 122- fromEnum UnicodeScriptSiddham = 123- fromEnum UnicodeScriptTirhuta = 124- fromEnum UnicodeScriptWarangCiti = 125- fromEnum (AnotherUnicodeScript k) = k-- toEnum -1 = UnicodeScriptInvalidCode- toEnum 0 = UnicodeScriptCommon- toEnum 1 = UnicodeScriptInherited- toEnum 2 = UnicodeScriptArabic- toEnum 3 = UnicodeScriptArmenian- toEnum 4 = UnicodeScriptBengali- toEnum 5 = UnicodeScriptBopomofo- toEnum 6 = UnicodeScriptCherokee- toEnum 7 = UnicodeScriptCoptic- toEnum 8 = UnicodeScriptCyrillic- toEnum 9 = UnicodeScriptDeseret- toEnum 10 = UnicodeScriptDevanagari- toEnum 11 = UnicodeScriptEthiopic- toEnum 12 = UnicodeScriptGeorgian- toEnum 13 = UnicodeScriptGothic- toEnum 14 = UnicodeScriptGreek- toEnum 15 = UnicodeScriptGujarati- toEnum 16 = UnicodeScriptGurmukhi- toEnum 17 = UnicodeScriptHan- toEnum 18 = UnicodeScriptHangul- toEnum 19 = UnicodeScriptHebrew- toEnum 20 = UnicodeScriptHiragana- toEnum 21 = UnicodeScriptKannada- toEnum 22 = UnicodeScriptKatakana- toEnum 23 = UnicodeScriptKhmer- toEnum 24 = UnicodeScriptLao- toEnum 25 = UnicodeScriptLatin- toEnum 26 = UnicodeScriptMalayalam- toEnum 27 = UnicodeScriptMongolian- toEnum 28 = UnicodeScriptMyanmar- toEnum 29 = UnicodeScriptOgham- toEnum 30 = UnicodeScriptOldItalic- toEnum 31 = UnicodeScriptOriya- toEnum 32 = UnicodeScriptRunic- toEnum 33 = UnicodeScriptSinhala- toEnum 34 = UnicodeScriptSyriac- toEnum 35 = UnicodeScriptTamil- toEnum 36 = UnicodeScriptTelugu- toEnum 37 = UnicodeScriptThaana- toEnum 38 = UnicodeScriptThai- toEnum 39 = UnicodeScriptTibetan- toEnum 40 = UnicodeScriptCanadianAboriginal- toEnum 41 = UnicodeScriptYi- toEnum 42 = UnicodeScriptTagalog- toEnum 43 = UnicodeScriptHanunoo- toEnum 44 = UnicodeScriptBuhid- toEnum 45 = UnicodeScriptTagbanwa- toEnum 46 = UnicodeScriptBraille- toEnum 47 = UnicodeScriptCypriot- toEnum 48 = UnicodeScriptLimbu- toEnum 49 = UnicodeScriptOsmanya- toEnum 50 = UnicodeScriptShavian- toEnum 51 = UnicodeScriptLinearB- toEnum 52 = UnicodeScriptTaiLe- toEnum 53 = UnicodeScriptUgaritic- toEnum 54 = UnicodeScriptNewTaiLue- toEnum 55 = UnicodeScriptBuginese- toEnum 56 = UnicodeScriptGlagolitic- toEnum 57 = UnicodeScriptTifinagh- toEnum 58 = UnicodeScriptSylotiNagri- toEnum 59 = UnicodeScriptOldPersian- toEnum 60 = UnicodeScriptKharoshthi- toEnum 61 = UnicodeScriptUnknown- toEnum 62 = UnicodeScriptBalinese- toEnum 63 = UnicodeScriptCuneiform- toEnum 64 = UnicodeScriptPhoenician- toEnum 65 = UnicodeScriptPhagsPa- toEnum 66 = UnicodeScriptNko- toEnum 67 = UnicodeScriptKayahLi- toEnum 68 = UnicodeScriptLepcha- toEnum 69 = UnicodeScriptRejang- toEnum 70 = UnicodeScriptSundanese- toEnum 71 = UnicodeScriptSaurashtra- toEnum 72 = UnicodeScriptCham- toEnum 73 = UnicodeScriptOlChiki- toEnum 74 = UnicodeScriptVai- toEnum 75 = UnicodeScriptCarian- toEnum 76 = UnicodeScriptLycian- toEnum 77 = UnicodeScriptLydian- toEnum 78 = UnicodeScriptAvestan- toEnum 79 = UnicodeScriptBamum- toEnum 80 = UnicodeScriptEgyptianHieroglyphs- toEnum 81 = UnicodeScriptImperialAramaic- toEnum 82 = UnicodeScriptInscriptionalPahlavi- toEnum 83 = UnicodeScriptInscriptionalParthian- toEnum 84 = UnicodeScriptJavanese- toEnum 85 = UnicodeScriptKaithi- toEnum 86 = UnicodeScriptLisu- toEnum 87 = UnicodeScriptMeeteiMayek- toEnum 88 = UnicodeScriptOldSouthArabian- toEnum 89 = UnicodeScriptOldTurkic- toEnum 90 = UnicodeScriptSamaritan- toEnum 91 = UnicodeScriptTaiTham- toEnum 92 = UnicodeScriptTaiViet- toEnum 93 = UnicodeScriptBatak- toEnum 94 = UnicodeScriptBrahmi- toEnum 95 = UnicodeScriptMandaic- toEnum 96 = UnicodeScriptChakma- toEnum 97 = UnicodeScriptMeroiticCursive- toEnum 98 = UnicodeScriptMeroiticHieroglyphs- toEnum 99 = UnicodeScriptMiao- toEnum 100 = UnicodeScriptSharada- toEnum 101 = UnicodeScriptSoraSompeng- toEnum 102 = UnicodeScriptTakri- toEnum 103 = UnicodeScriptBassaVah- toEnum 104 = UnicodeScriptCaucasianAlbanian- toEnum 105 = UnicodeScriptDuployan- toEnum 106 = UnicodeScriptElbasan- toEnum 107 = UnicodeScriptGrantha- toEnum 108 = UnicodeScriptKhojki- toEnum 109 = UnicodeScriptKhudawadi- toEnum 110 = UnicodeScriptLinearA- toEnum 111 = UnicodeScriptMahajani- toEnum 112 = UnicodeScriptManichaean- toEnum 113 = UnicodeScriptMendeKikakui- toEnum 114 = UnicodeScriptModi- toEnum 115 = UnicodeScriptMro- toEnum 116 = UnicodeScriptNabataean- toEnum 117 = UnicodeScriptOldNorthArabian- toEnum 118 = UnicodeScriptOldPermic- toEnum 119 = UnicodeScriptPahawhHmong- toEnum 120 = UnicodeScriptPalmyrene- toEnum 121 = UnicodeScriptPauCinHau- toEnum 122 = UnicodeScriptPsalterPahlavi- toEnum 123 = UnicodeScriptSiddham- toEnum 124 = UnicodeScriptTirhuta- toEnum 125 = UnicodeScriptWarangCiti- toEnum k = AnotherUnicodeScript k---- Enum UnicodeBreakType--data UnicodeBreakType = - UnicodeBreakTypeMandatory- | UnicodeBreakTypeCarriageReturn- | UnicodeBreakTypeLineFeed- | UnicodeBreakTypeCombiningMark- | UnicodeBreakTypeSurrogate- | UnicodeBreakTypeZeroWidthSpace- | UnicodeBreakTypeInseparable- | UnicodeBreakTypeNonBreakingGlue- | UnicodeBreakTypeContingent- | UnicodeBreakTypeSpace- | UnicodeBreakTypeAfter- | UnicodeBreakTypeBefore- | UnicodeBreakTypeBeforeAndAfter- | UnicodeBreakTypeHyphen- | UnicodeBreakTypeNonStarter- | UnicodeBreakTypeOpenPunctuation- | UnicodeBreakTypeClosePunctuation- | UnicodeBreakTypeQuotation- | UnicodeBreakTypeExclamation- | UnicodeBreakTypeIdeographic- | UnicodeBreakTypeNumeric- | UnicodeBreakTypeInfixSeparator- | UnicodeBreakTypeSymbol- | UnicodeBreakTypeAlphabetic- | UnicodeBreakTypePrefix- | UnicodeBreakTypePostfix- | UnicodeBreakTypeComplexContext- | UnicodeBreakTypeAmbiguous- | UnicodeBreakTypeUnknown- | UnicodeBreakTypeNextLine- | UnicodeBreakTypeWordJoiner- | UnicodeBreakTypeHangulLJamo- | UnicodeBreakTypeHangulVJamo- | UnicodeBreakTypeHangulTJamo- | UnicodeBreakTypeHangulLvSyllable- | UnicodeBreakTypeHangulLvtSyllable- | UnicodeBreakTypeCloseParanthesis- | UnicodeBreakTypeConditionalJapaneseStarter- | UnicodeBreakTypeHebrewLetter- | UnicodeBreakTypeRegionalIndicator- | AnotherUnicodeBreakType Int- deriving (Show, Eq)--instance Enum UnicodeBreakType where- fromEnum UnicodeBreakTypeMandatory = 0- fromEnum UnicodeBreakTypeCarriageReturn = 1- fromEnum UnicodeBreakTypeLineFeed = 2- fromEnum UnicodeBreakTypeCombiningMark = 3- fromEnum UnicodeBreakTypeSurrogate = 4- fromEnum UnicodeBreakTypeZeroWidthSpace = 5- fromEnum UnicodeBreakTypeInseparable = 6- fromEnum UnicodeBreakTypeNonBreakingGlue = 7- fromEnum UnicodeBreakTypeContingent = 8- fromEnum UnicodeBreakTypeSpace = 9- fromEnum UnicodeBreakTypeAfter = 10- fromEnum UnicodeBreakTypeBefore = 11- fromEnum UnicodeBreakTypeBeforeAndAfter = 12- fromEnum UnicodeBreakTypeHyphen = 13- fromEnum UnicodeBreakTypeNonStarter = 14- fromEnum UnicodeBreakTypeOpenPunctuation = 15- fromEnum UnicodeBreakTypeClosePunctuation = 16- fromEnum UnicodeBreakTypeQuotation = 17- fromEnum UnicodeBreakTypeExclamation = 18- fromEnum UnicodeBreakTypeIdeographic = 19- fromEnum UnicodeBreakTypeNumeric = 20- fromEnum UnicodeBreakTypeInfixSeparator = 21- fromEnum UnicodeBreakTypeSymbol = 22- fromEnum UnicodeBreakTypeAlphabetic = 23- fromEnum UnicodeBreakTypePrefix = 24- fromEnum UnicodeBreakTypePostfix = 25- fromEnum UnicodeBreakTypeComplexContext = 26- fromEnum UnicodeBreakTypeAmbiguous = 27- fromEnum UnicodeBreakTypeUnknown = 28- fromEnum UnicodeBreakTypeNextLine = 29- fromEnum UnicodeBreakTypeWordJoiner = 30- fromEnum UnicodeBreakTypeHangulLJamo = 31- fromEnum UnicodeBreakTypeHangulVJamo = 32- fromEnum UnicodeBreakTypeHangulTJamo = 33- fromEnum UnicodeBreakTypeHangulLvSyllable = 34- fromEnum UnicodeBreakTypeHangulLvtSyllable = 35- fromEnum UnicodeBreakTypeCloseParanthesis = 36- fromEnum UnicodeBreakTypeConditionalJapaneseStarter = 37- fromEnum UnicodeBreakTypeHebrewLetter = 38- fromEnum UnicodeBreakTypeRegionalIndicator = 39- fromEnum (AnotherUnicodeBreakType k) = k-- toEnum 0 = UnicodeBreakTypeMandatory- toEnum 1 = UnicodeBreakTypeCarriageReturn- toEnum 2 = UnicodeBreakTypeLineFeed- toEnum 3 = UnicodeBreakTypeCombiningMark- toEnum 4 = UnicodeBreakTypeSurrogate- toEnum 5 = UnicodeBreakTypeZeroWidthSpace- toEnum 6 = UnicodeBreakTypeInseparable- toEnum 7 = UnicodeBreakTypeNonBreakingGlue- toEnum 8 = UnicodeBreakTypeContingent- toEnum 9 = UnicodeBreakTypeSpace- toEnum 10 = UnicodeBreakTypeAfter- toEnum 11 = UnicodeBreakTypeBefore- toEnum 12 = UnicodeBreakTypeBeforeAndAfter- toEnum 13 = UnicodeBreakTypeHyphen- toEnum 14 = UnicodeBreakTypeNonStarter- toEnum 15 = UnicodeBreakTypeOpenPunctuation- toEnum 16 = UnicodeBreakTypeClosePunctuation- toEnum 17 = UnicodeBreakTypeQuotation- toEnum 18 = UnicodeBreakTypeExclamation- toEnum 19 = UnicodeBreakTypeIdeographic- toEnum 20 = UnicodeBreakTypeNumeric- toEnum 21 = UnicodeBreakTypeInfixSeparator- toEnum 22 = UnicodeBreakTypeSymbol- toEnum 23 = UnicodeBreakTypeAlphabetic- toEnum 24 = UnicodeBreakTypePrefix- toEnum 25 = UnicodeBreakTypePostfix- toEnum 26 = UnicodeBreakTypeComplexContext- toEnum 27 = UnicodeBreakTypeAmbiguous- toEnum 28 = UnicodeBreakTypeUnknown- toEnum 29 = UnicodeBreakTypeNextLine- toEnum 30 = UnicodeBreakTypeWordJoiner- toEnum 31 = UnicodeBreakTypeHangulLJamo- toEnum 32 = UnicodeBreakTypeHangulVJamo- toEnum 33 = UnicodeBreakTypeHangulTJamo- toEnum 34 = UnicodeBreakTypeHangulLvSyllable- toEnum 35 = UnicodeBreakTypeHangulLvtSyllable- toEnum 36 = UnicodeBreakTypeCloseParanthesis- toEnum 37 = UnicodeBreakTypeConditionalJapaneseStarter- toEnum 38 = UnicodeBreakTypeHebrewLetter- toEnum 39 = UnicodeBreakTypeRegionalIndicator- toEnum k = AnotherUnicodeBreakType k---- Enum TraverseType--data TraverseType = - TraverseTypeInOrder- | TraverseTypePreOrder- | TraverseTypePostOrder- | TraverseTypeLevelOrder- | AnotherTraverseType Int- deriving (Show, Eq)--instance Enum TraverseType where- fromEnum TraverseTypeInOrder = 0- fromEnum TraverseTypePreOrder = 1- fromEnum TraverseTypePostOrder = 2- fromEnum TraverseTypeLevelOrder = 3- fromEnum (AnotherTraverseType k) = k-- toEnum 0 = TraverseTypeInOrder- toEnum 1 = TraverseTypePreOrder- toEnum 2 = TraverseTypePostOrder- toEnum 3 = TraverseTypeLevelOrder- toEnum k = AnotherTraverseType k---- Enum TokenType--data TokenType = - TokenTypeEof- | TokenTypeLeftParen- | TokenTypeRightParen- | TokenTypeLeftCurly- | TokenTypeRightCurly- | TokenTypeLeftBrace- | TokenTypeRightBrace- | TokenTypeEqualSign- | TokenTypeComma- | TokenTypeNone- | TokenTypeError- | TokenTypeChar- | TokenTypeBinary- | TokenTypeOctal- | TokenTypeInt- | TokenTypeHex- | TokenTypeFloat- | TokenTypeString- | TokenTypeSymbol- | TokenTypeIdentifier- | TokenTypeIdentifierNull- | TokenTypeCommentSingle- | TokenTypeCommentMulti- | AnotherTokenType Int- deriving (Show, Eq)--instance Enum TokenType where- fromEnum TokenTypeEof = 0- fromEnum TokenTypeLeftParen = 40- fromEnum TokenTypeRightParen = 41- fromEnum TokenTypeLeftCurly = 123- fromEnum TokenTypeRightCurly = 125- fromEnum TokenTypeLeftBrace = 91- fromEnum TokenTypeRightBrace = 93- fromEnum TokenTypeEqualSign = 61- fromEnum TokenTypeComma = 44- fromEnum TokenTypeNone = 256- fromEnum TokenTypeError = 257- fromEnum TokenTypeChar = 258- fromEnum TokenTypeBinary = 259- fromEnum TokenTypeOctal = 260- fromEnum TokenTypeInt = 261- fromEnum TokenTypeHex = 262- fromEnum TokenTypeFloat = 263- fromEnum TokenTypeString = 264- fromEnum TokenTypeSymbol = 265- fromEnum TokenTypeIdentifier = 266- fromEnum TokenTypeIdentifierNull = 267- fromEnum TokenTypeCommentSingle = 268- fromEnum TokenTypeCommentMulti = 269- fromEnum (AnotherTokenType k) = k-- toEnum 0 = TokenTypeEof- toEnum 40 = TokenTypeLeftParen- toEnum 41 = TokenTypeRightParen- toEnum 44 = TokenTypeComma- toEnum 61 = TokenTypeEqualSign- toEnum 91 = TokenTypeLeftBrace- toEnum 93 = TokenTypeRightBrace- toEnum 123 = TokenTypeLeftCurly- toEnum 125 = TokenTypeRightCurly- toEnum 256 = TokenTypeNone- toEnum 257 = TokenTypeError- toEnum 258 = TokenTypeChar- toEnum 259 = TokenTypeBinary- toEnum 260 = TokenTypeOctal- toEnum 261 = TokenTypeInt- toEnum 262 = TokenTypeHex- toEnum 263 = TokenTypeFloat- toEnum 264 = TokenTypeString- toEnum 265 = TokenTypeSymbol- toEnum 266 = TokenTypeIdentifier- toEnum 267 = TokenTypeIdentifierNull- toEnum 268 = TokenTypeCommentSingle- toEnum 269 = TokenTypeCommentMulti- toEnum k = AnotherTokenType k---- Enum TimeType--data TimeType = - TimeTypeStandard- | TimeTypeDaylight- | TimeTypeUniversal- | AnotherTimeType Int- deriving (Show, Eq)--instance Enum TimeType where- fromEnum TimeTypeStandard = 0- fromEnum TimeTypeDaylight = 1- fromEnum TimeTypeUniversal = 2- fromEnum (AnotherTimeType k) = k-- toEnum 0 = TimeTypeStandard- toEnum 1 = TimeTypeDaylight- toEnum 2 = TimeTypeUniversal- toEnum k = AnotherTimeType k---- Enum ThreadError--data ThreadError = - ThreadErrorThreadErrorAgain- | AnotherThreadError Int- deriving (Show, Eq)--instance Enum ThreadError where- fromEnum ThreadErrorThreadErrorAgain = 0- fromEnum (AnotherThreadError k) = k-- toEnum 0 = ThreadErrorThreadErrorAgain- toEnum k = AnotherThreadError k--instance GErrorClass ThreadError where- gerrorClassDomain _ = "g_thread_error"--catchThreadError ::- IO a ->- (ThreadError -> GErrorMessage -> IO a) ->- IO a-catchThreadError = catchGErrorJustDomain--handleThreadError ::- (ThreadError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleThreadError = handleGErrorJustDomain---- Enum TestLogType--data TestLogType = - TestLogTypeNone- | TestLogTypeError- | TestLogTypeStartBinary- | TestLogTypeListCase- | TestLogTypeSkipCase- | TestLogTypeStartCase- | TestLogTypeStopCase- | TestLogTypeMinResult- | TestLogTypeMaxResult- | TestLogTypeMessage- | TestLogTypeStartSuite- | TestLogTypeStopSuite- | AnotherTestLogType Int- deriving (Show, Eq)--instance Enum TestLogType where- fromEnum TestLogTypeNone = 0- fromEnum TestLogTypeError = 1- fromEnum TestLogTypeStartBinary = 2- fromEnum TestLogTypeListCase = 3- fromEnum TestLogTypeSkipCase = 4- fromEnum TestLogTypeStartCase = 5- fromEnum TestLogTypeStopCase = 6- fromEnum TestLogTypeMinResult = 7- fromEnum TestLogTypeMaxResult = 8- fromEnum TestLogTypeMessage = 9- fromEnum TestLogTypeStartSuite = 10- fromEnum TestLogTypeStopSuite = 11- fromEnum (AnotherTestLogType k) = k-- toEnum 0 = TestLogTypeNone- toEnum 1 = TestLogTypeError- toEnum 2 = TestLogTypeStartBinary- toEnum 3 = TestLogTypeListCase- toEnum 4 = TestLogTypeSkipCase- toEnum 5 = TestLogTypeStartCase- toEnum 6 = TestLogTypeStopCase- toEnum 7 = TestLogTypeMinResult- toEnum 8 = TestLogTypeMaxResult- toEnum 9 = TestLogTypeMessage- toEnum 10 = TestLogTypeStartSuite- toEnum 11 = TestLogTypeStopSuite- toEnum k = AnotherTestLogType k---- Enum TestFileType--data TestFileType = - TestFileTypeDist- | TestFileTypeBuilt- | AnotherTestFileType Int- deriving (Show, Eq)--instance Enum TestFileType where- fromEnum TestFileTypeDist = 0- fromEnum TestFileTypeBuilt = 1- fromEnum (AnotherTestFileType k) = k-- toEnum 0 = TestFileTypeDist- toEnum 1 = TestFileTypeBuilt- toEnum k = AnotherTestFileType k---- Enum SpawnError--data SpawnError = - SpawnErrorFork- | SpawnErrorRead- | SpawnErrorChdir- | SpawnErrorAcces- | SpawnErrorPerm- | SpawnErrorTooBig- | SpawnError2big- | SpawnErrorNoexec- | SpawnErrorNametoolong- | SpawnErrorNoent- | SpawnErrorNomem- | SpawnErrorNotdir- | SpawnErrorLoop- | SpawnErrorTxtbusy- | SpawnErrorIo- | SpawnErrorNfile- | SpawnErrorMfile- | SpawnErrorInval- | SpawnErrorIsdir- | SpawnErrorLibbad- | SpawnErrorFailed- | AnotherSpawnError Int- deriving (Show, Eq)--instance Enum SpawnError where- fromEnum SpawnErrorFork = 0- fromEnum SpawnErrorRead = 1- fromEnum SpawnErrorChdir = 2- fromEnum SpawnErrorAcces = 3- fromEnum SpawnErrorPerm = 4- fromEnum SpawnErrorTooBig = 5- fromEnum SpawnError2big = 5- fromEnum SpawnErrorNoexec = 6- fromEnum SpawnErrorNametoolong = 7- fromEnum SpawnErrorNoent = 8- fromEnum SpawnErrorNomem = 9- fromEnum SpawnErrorNotdir = 10- fromEnum SpawnErrorLoop = 11- fromEnum SpawnErrorTxtbusy = 12- fromEnum SpawnErrorIo = 13- fromEnum SpawnErrorNfile = 14- fromEnum SpawnErrorMfile = 15- fromEnum SpawnErrorInval = 16- fromEnum SpawnErrorIsdir = 17- fromEnum SpawnErrorLibbad = 18- fromEnum SpawnErrorFailed = 19- fromEnum (AnotherSpawnError k) = k-- toEnum 0 = SpawnErrorFork- toEnum 1 = SpawnErrorRead- toEnum 2 = SpawnErrorChdir- toEnum 3 = SpawnErrorAcces- toEnum 4 = SpawnErrorPerm- toEnum 5 = SpawnErrorTooBig- toEnum 6 = SpawnErrorNoexec- toEnum 7 = SpawnErrorNametoolong- toEnum 8 = SpawnErrorNoent- toEnum 9 = SpawnErrorNomem- toEnum 10 = SpawnErrorNotdir- toEnum 11 = SpawnErrorLoop- toEnum 12 = SpawnErrorTxtbusy- toEnum 13 = SpawnErrorIo- toEnum 14 = SpawnErrorNfile- toEnum 15 = SpawnErrorMfile- toEnum 16 = SpawnErrorInval- toEnum 17 = SpawnErrorIsdir- toEnum 18 = SpawnErrorLibbad- toEnum 19 = SpawnErrorFailed- toEnum k = AnotherSpawnError k--instance GErrorClass SpawnError where- gerrorClassDomain _ = "g-exec-error-quark"--catchSpawnError ::- IO a ->- (SpawnError -> GErrorMessage -> IO a) ->- IO a-catchSpawnError = catchGErrorJustDomain--handleSpawnError ::- (SpawnError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleSpawnError = handleGErrorJustDomain---- Enum SliceConfig--data SliceConfig = - SliceConfigAlwaysMalloc- | SliceConfigBypassMagazines- | SliceConfigWorkingSetMsecs- | SliceConfigColorIncrement- | SliceConfigChunkSizes- | SliceConfigContentionCounter- | AnotherSliceConfig Int- deriving (Show, Eq)--instance Enum SliceConfig where- fromEnum SliceConfigAlwaysMalloc = 1- fromEnum SliceConfigBypassMagazines = 2- fromEnum SliceConfigWorkingSetMsecs = 3- fromEnum SliceConfigColorIncrement = 4- fromEnum SliceConfigChunkSizes = 5- fromEnum SliceConfigContentionCounter = 6- fromEnum (AnotherSliceConfig k) = k-- toEnum 1 = SliceConfigAlwaysMalloc- toEnum 2 = SliceConfigBypassMagazines- toEnum 3 = SliceConfigWorkingSetMsecs- toEnum 4 = SliceConfigColorIncrement- toEnum 5 = SliceConfigChunkSizes- toEnum 6 = SliceConfigContentionCounter- toEnum k = AnotherSliceConfig k---- Enum ShellError--data ShellError = - ShellErrorBadQuoting- | ShellErrorEmptyString- | ShellErrorFailed- | AnotherShellError Int- deriving (Show, Eq)--instance Enum ShellError where- fromEnum ShellErrorBadQuoting = 0- fromEnum ShellErrorEmptyString = 1- fromEnum ShellErrorFailed = 2- fromEnum (AnotherShellError k) = k-- toEnum 0 = ShellErrorBadQuoting- toEnum 1 = ShellErrorEmptyString- toEnum 2 = ShellErrorFailed- toEnum k = AnotherShellError k--instance GErrorClass ShellError where- gerrorClassDomain _ = "g-shell-error-quark"--catchShellError ::- IO a ->- (ShellError -> GErrorMessage -> IO a) ->- IO a-catchShellError = catchGErrorJustDomain--handleShellError ::- (ShellError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleShellError = handleGErrorJustDomain---- Enum SeekType--data SeekType = - SeekTypeCur- | SeekTypeSet- | SeekTypeEnd- | AnotherSeekType Int- deriving (Show, Eq)--instance Enum SeekType where- fromEnum SeekTypeCur = 0- fromEnum SeekTypeSet = 1- fromEnum SeekTypeEnd = 2- fromEnum (AnotherSeekType k) = k-- toEnum 0 = SeekTypeCur- toEnum 1 = SeekTypeSet- toEnum 2 = SeekTypeEnd- toEnum k = AnotherSeekType k---- Enum RegexError--data RegexError = - RegexErrorCompile- | RegexErrorOptimize- | RegexErrorReplace- | RegexErrorMatch- | RegexErrorInternal- | RegexErrorStrayBackslash- | RegexErrorMissingControlChar- | RegexErrorUnrecognizedEscape- | RegexErrorQuantifiersOutOfOrder- | RegexErrorQuantifierTooBig- | RegexErrorUnterminatedCharacterClass- | RegexErrorInvalidEscapeInCharacterClass- | RegexErrorRangeOutOfOrder- | RegexErrorNothingToRepeat- | RegexErrorUnrecognizedCharacter- | RegexErrorPosixNamedClassOutsideClass- | RegexErrorUnmatchedParenthesis- | RegexErrorInexistentSubpatternReference- | RegexErrorUnterminatedComment- | RegexErrorExpressionTooLarge- | RegexErrorMemoryError- | RegexErrorVariableLengthLookbehind- | RegexErrorMalformedCondition- | RegexErrorTooManyConditionalBranches- | RegexErrorAssertionExpected- | RegexErrorUnknownPosixClassName- | RegexErrorPosixCollatingElementsNotSupported- | RegexErrorHexCodeTooLarge- | RegexErrorInvalidCondition- | RegexErrorSingleByteMatchInLookbehind- | RegexErrorInfiniteLoop- | RegexErrorMissingSubpatternNameTerminator- | RegexErrorDuplicateSubpatternName- | RegexErrorMalformedProperty- | RegexErrorUnknownProperty- | RegexErrorSubpatternNameTooLong- | RegexErrorTooManySubpatterns- | RegexErrorInvalidOctalValue- | RegexErrorTooManyBranchesInDefine- | RegexErrorDefineRepetion- | RegexErrorInconsistentNewlineOptions- | RegexErrorMissingBackReference- | RegexErrorInvalidRelativeReference- | RegexErrorBacktrackingControlVerbArgumentForbidden- | RegexErrorUnknownBacktrackingControlVerb- | RegexErrorNumberTooBig- | RegexErrorMissingSubpatternName- | RegexErrorMissingDigit- | RegexErrorInvalidDataCharacter- | RegexErrorExtraSubpatternName- | RegexErrorBacktrackingControlVerbArgumentRequired- | RegexErrorInvalidControlChar- | RegexErrorMissingName- | RegexErrorNotSupportedInClass- | RegexErrorTooManyForwardReferences- | RegexErrorNameTooLong- | RegexErrorCharacterValueTooLarge- | AnotherRegexError Int- deriving (Show, Eq)--instance Enum RegexError where- fromEnum RegexErrorCompile = 0- fromEnum RegexErrorOptimize = 1- fromEnum RegexErrorReplace = 2- fromEnum RegexErrorMatch = 3- fromEnum RegexErrorInternal = 4- fromEnum RegexErrorStrayBackslash = 101- fromEnum RegexErrorMissingControlChar = 102- fromEnum RegexErrorUnrecognizedEscape = 103- fromEnum RegexErrorQuantifiersOutOfOrder = 104- fromEnum RegexErrorQuantifierTooBig = 105- fromEnum RegexErrorUnterminatedCharacterClass = 106- fromEnum RegexErrorInvalidEscapeInCharacterClass = 107- fromEnum RegexErrorRangeOutOfOrder = 108- fromEnum RegexErrorNothingToRepeat = 109- fromEnum RegexErrorUnrecognizedCharacter = 112- fromEnum RegexErrorPosixNamedClassOutsideClass = 113- fromEnum RegexErrorUnmatchedParenthesis = 114- fromEnum RegexErrorInexistentSubpatternReference = 115- fromEnum RegexErrorUnterminatedComment = 118- fromEnum RegexErrorExpressionTooLarge = 120- fromEnum RegexErrorMemoryError = 121- fromEnum RegexErrorVariableLengthLookbehind = 125- fromEnum RegexErrorMalformedCondition = 126- fromEnum RegexErrorTooManyConditionalBranches = 127- fromEnum RegexErrorAssertionExpected = 128- fromEnum RegexErrorUnknownPosixClassName = 130- fromEnum RegexErrorPosixCollatingElementsNotSupported = 131- fromEnum RegexErrorHexCodeTooLarge = 134- fromEnum RegexErrorInvalidCondition = 135- fromEnum RegexErrorSingleByteMatchInLookbehind = 136- fromEnum RegexErrorInfiniteLoop = 140- fromEnum RegexErrorMissingSubpatternNameTerminator = 142- fromEnum RegexErrorDuplicateSubpatternName = 143- fromEnum RegexErrorMalformedProperty = 146- fromEnum RegexErrorUnknownProperty = 147- fromEnum RegexErrorSubpatternNameTooLong = 148- fromEnum RegexErrorTooManySubpatterns = 149- fromEnum RegexErrorInvalidOctalValue = 151- fromEnum RegexErrorTooManyBranchesInDefine = 154- fromEnum RegexErrorDefineRepetion = 155- fromEnum RegexErrorInconsistentNewlineOptions = 156- fromEnum RegexErrorMissingBackReference = 157- fromEnum RegexErrorInvalidRelativeReference = 158- fromEnum RegexErrorBacktrackingControlVerbArgumentForbidden = 159- fromEnum RegexErrorUnknownBacktrackingControlVerb = 160- fromEnum RegexErrorNumberTooBig = 161- fromEnum RegexErrorMissingSubpatternName = 162- fromEnum RegexErrorMissingDigit = 163- fromEnum RegexErrorInvalidDataCharacter = 164- fromEnum RegexErrorExtraSubpatternName = 165- fromEnum RegexErrorBacktrackingControlVerbArgumentRequired = 166- fromEnum RegexErrorInvalidControlChar = 168- fromEnum RegexErrorMissingName = 169- fromEnum RegexErrorNotSupportedInClass = 171- fromEnum RegexErrorTooManyForwardReferences = 172- fromEnum RegexErrorNameTooLong = 175- fromEnum RegexErrorCharacterValueTooLarge = 176- fromEnum (AnotherRegexError k) = k-- toEnum 0 = RegexErrorCompile- toEnum 1 = RegexErrorOptimize- toEnum 2 = RegexErrorReplace- toEnum 3 = RegexErrorMatch- toEnum 4 = RegexErrorInternal- toEnum 101 = RegexErrorStrayBackslash- toEnum 102 = RegexErrorMissingControlChar- toEnum 103 = RegexErrorUnrecognizedEscape- toEnum 104 = RegexErrorQuantifiersOutOfOrder- toEnum 105 = RegexErrorQuantifierTooBig- toEnum 106 = RegexErrorUnterminatedCharacterClass- toEnum 107 = RegexErrorInvalidEscapeInCharacterClass- toEnum 108 = RegexErrorRangeOutOfOrder- toEnum 109 = RegexErrorNothingToRepeat- toEnum 112 = RegexErrorUnrecognizedCharacter- toEnum 113 = RegexErrorPosixNamedClassOutsideClass- toEnum 114 = RegexErrorUnmatchedParenthesis- toEnum 115 = RegexErrorInexistentSubpatternReference- toEnum 118 = RegexErrorUnterminatedComment- toEnum 120 = RegexErrorExpressionTooLarge- toEnum 121 = RegexErrorMemoryError- toEnum 125 = RegexErrorVariableLengthLookbehind- toEnum 126 = RegexErrorMalformedCondition- toEnum 127 = RegexErrorTooManyConditionalBranches- toEnum 128 = RegexErrorAssertionExpected- toEnum 130 = RegexErrorUnknownPosixClassName- toEnum 131 = RegexErrorPosixCollatingElementsNotSupported- toEnum 134 = RegexErrorHexCodeTooLarge- toEnum 135 = RegexErrorInvalidCondition- toEnum 136 = RegexErrorSingleByteMatchInLookbehind- toEnum 140 = RegexErrorInfiniteLoop- toEnum 142 = RegexErrorMissingSubpatternNameTerminator- toEnum 143 = RegexErrorDuplicateSubpatternName- toEnum 146 = RegexErrorMalformedProperty- toEnum 147 = RegexErrorUnknownProperty- toEnum 148 = RegexErrorSubpatternNameTooLong- toEnum 149 = RegexErrorTooManySubpatterns- toEnum 151 = RegexErrorInvalidOctalValue- toEnum 154 = RegexErrorTooManyBranchesInDefine- toEnum 155 = RegexErrorDefineRepetion- toEnum 156 = RegexErrorInconsistentNewlineOptions- toEnum 157 = RegexErrorMissingBackReference- toEnum 158 = RegexErrorInvalidRelativeReference- toEnum 159 = RegexErrorBacktrackingControlVerbArgumentForbidden- toEnum 160 = RegexErrorUnknownBacktrackingControlVerb- toEnum 161 = RegexErrorNumberTooBig- toEnum 162 = RegexErrorMissingSubpatternName- toEnum 163 = RegexErrorMissingDigit- toEnum 164 = RegexErrorInvalidDataCharacter- toEnum 165 = RegexErrorExtraSubpatternName- toEnum 166 = RegexErrorBacktrackingControlVerbArgumentRequired- toEnum 168 = RegexErrorInvalidControlChar- toEnum 169 = RegexErrorMissingName- toEnum 171 = RegexErrorNotSupportedInClass- toEnum 172 = RegexErrorTooManyForwardReferences- toEnum 175 = RegexErrorNameTooLong- toEnum 176 = RegexErrorCharacterValueTooLarge- toEnum k = AnotherRegexError k--instance GErrorClass RegexError where- gerrorClassDomain _ = "g-regex-error-quark"--catchRegexError ::- IO a ->- (RegexError -> GErrorMessage -> IO a) ->- IO a-catchRegexError = catchGErrorJustDomain--handleRegexError ::- (RegexError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleRegexError = handleGErrorJustDomain---- Enum OptionError--data OptionError = - OptionErrorUnknownOption- | OptionErrorBadValue- | OptionErrorFailed- | AnotherOptionError Int- deriving (Show, Eq)--instance Enum OptionError where- fromEnum OptionErrorUnknownOption = 0- fromEnum OptionErrorBadValue = 1- fromEnum OptionErrorFailed = 2- fromEnum (AnotherOptionError k) = k-- toEnum 0 = OptionErrorUnknownOption- toEnum 1 = OptionErrorBadValue- toEnum 2 = OptionErrorFailed- toEnum k = AnotherOptionError k--instance GErrorClass OptionError where- gerrorClassDomain _ = "g-option-context-error-quark"--catchOptionError ::- IO a ->- (OptionError -> GErrorMessage -> IO a) ->- IO a-catchOptionError = catchGErrorJustDomain--handleOptionError ::- (OptionError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleOptionError = handleGErrorJustDomain---- Enum OptionArg--data OptionArg = - OptionArgNone- | OptionArgString- | OptionArgInt- | OptionArgCallback- | OptionArgFilename- | OptionArgStringArray- | OptionArgFilenameArray- | OptionArgDouble- | OptionArgInt64- | AnotherOptionArg Int- deriving (Show, Eq)--instance Enum OptionArg where- fromEnum OptionArgNone = 0- fromEnum OptionArgString = 1- fromEnum OptionArgInt = 2- fromEnum OptionArgCallback = 3- fromEnum OptionArgFilename = 4- fromEnum OptionArgStringArray = 5- fromEnum OptionArgFilenameArray = 6- fromEnum OptionArgDouble = 7- fromEnum OptionArgInt64 = 8- fromEnum (AnotherOptionArg k) = k-- toEnum 0 = OptionArgNone- toEnum 1 = OptionArgString- toEnum 2 = OptionArgInt- toEnum 3 = OptionArgCallback- toEnum 4 = OptionArgFilename- toEnum 5 = OptionArgStringArray- toEnum 6 = OptionArgFilenameArray- toEnum 7 = OptionArgDouble- toEnum 8 = OptionArgInt64- toEnum k = AnotherOptionArg k---- Enum OnceStatus--data OnceStatus = - OnceStatusNotcalled- | OnceStatusProgress- | OnceStatusReady- | AnotherOnceStatus Int- deriving (Show, Eq)--instance Enum OnceStatus where- fromEnum OnceStatusNotcalled = 0- fromEnum OnceStatusProgress = 1- fromEnum OnceStatusReady = 2- fromEnum (AnotherOnceStatus k) = k-- toEnum 0 = OnceStatusNotcalled- toEnum 1 = OnceStatusProgress- toEnum 2 = OnceStatusReady- toEnum k = AnotherOnceStatus k---- Enum NormalizeMode--data NormalizeMode = - NormalizeModeDefault- | NormalizeModeNfd- | NormalizeModeDefaultCompose- | NormalizeModeNfc- | NormalizeModeAll- | NormalizeModeNfkd- | NormalizeModeAllCompose- | NormalizeModeNfkc- | AnotherNormalizeMode Int- deriving (Show, Eq)--instance Enum NormalizeMode where- fromEnum NormalizeModeDefault = 0- fromEnum NormalizeModeNfd = 0- fromEnum NormalizeModeDefaultCompose = 1- fromEnum NormalizeModeNfc = 1- fromEnum NormalizeModeAll = 2- fromEnum NormalizeModeNfkd = 2- fromEnum NormalizeModeAllCompose = 3- fromEnum NormalizeModeNfkc = 3- fromEnum (AnotherNormalizeMode k) = k-- toEnum 0 = NormalizeModeDefault- toEnum 1 = NormalizeModeDefaultCompose- toEnum 2 = NormalizeModeAll- toEnum 3 = NormalizeModeAllCompose- toEnum k = AnotherNormalizeMode k---- Enum MarkupError--data MarkupError = - MarkupErrorBadUtf8- | MarkupErrorEmpty- | MarkupErrorParse- | MarkupErrorUnknownElement- | MarkupErrorUnknownAttribute- | MarkupErrorInvalidContent- | MarkupErrorMissingAttribute- | AnotherMarkupError Int- deriving (Show, Eq)--instance Enum MarkupError where- fromEnum MarkupErrorBadUtf8 = 0- fromEnum MarkupErrorEmpty = 1- fromEnum MarkupErrorParse = 2- fromEnum MarkupErrorUnknownElement = 3- fromEnum MarkupErrorUnknownAttribute = 4- fromEnum MarkupErrorInvalidContent = 5- fromEnum MarkupErrorMissingAttribute = 6- fromEnum (AnotherMarkupError k) = k-- toEnum 0 = MarkupErrorBadUtf8- toEnum 1 = MarkupErrorEmpty- toEnum 2 = MarkupErrorParse- toEnum 3 = MarkupErrorUnknownElement- toEnum 4 = MarkupErrorUnknownAttribute- toEnum 5 = MarkupErrorInvalidContent- toEnum 6 = MarkupErrorMissingAttribute- toEnum k = AnotherMarkupError k--instance GErrorClass MarkupError where- gerrorClassDomain _ = "g-markup-error-quark"--catchMarkupError ::- IO a ->- (MarkupError -> GErrorMessage -> IO a) ->- IO a-catchMarkupError = catchGErrorJustDomain--handleMarkupError ::- (MarkupError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleMarkupError = handleGErrorJustDomain---- Enum KeyFileError--data KeyFileError = - KeyFileErrorUnknownEncoding- | KeyFileErrorParse- | KeyFileErrorNotFound- | KeyFileErrorKeyNotFound- | KeyFileErrorGroupNotFound- | KeyFileErrorInvalidValue- | AnotherKeyFileError Int- deriving (Show, Eq)--instance Enum KeyFileError where- fromEnum KeyFileErrorUnknownEncoding = 0- fromEnum KeyFileErrorParse = 1- fromEnum KeyFileErrorNotFound = 2- fromEnum KeyFileErrorKeyNotFound = 3- fromEnum KeyFileErrorGroupNotFound = 4- fromEnum KeyFileErrorInvalidValue = 5- fromEnum (AnotherKeyFileError k) = k-- toEnum 0 = KeyFileErrorUnknownEncoding- toEnum 1 = KeyFileErrorParse- toEnum 2 = KeyFileErrorNotFound- toEnum 3 = KeyFileErrorKeyNotFound- toEnum 4 = KeyFileErrorGroupNotFound- toEnum 5 = KeyFileErrorInvalidValue- toEnum k = AnotherKeyFileError k--instance GErrorClass KeyFileError where- gerrorClassDomain _ = "g-key-file-error-quark"--catchKeyFileError ::- IO a ->- (KeyFileError -> GErrorMessage -> IO a) ->- IO a-catchKeyFileError = catchGErrorJustDomain--handleKeyFileError ::- (KeyFileError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleKeyFileError = handleGErrorJustDomain---- Enum IOStatus--data IOStatus = - IOStatusError- | IOStatusNormal- | IOStatusEof- | IOStatusAgain- | AnotherIOStatus Int- deriving (Show, Eq)--instance Enum IOStatus where- fromEnum IOStatusError = 0- fromEnum IOStatusNormal = 1- fromEnum IOStatusEof = 2- fromEnum IOStatusAgain = 3- fromEnum (AnotherIOStatus k) = k-- toEnum 0 = IOStatusError- toEnum 1 = IOStatusNormal- toEnum 2 = IOStatusEof- toEnum 3 = IOStatusAgain- toEnum k = AnotherIOStatus k---- Enum IOError--data IOError = - IOErrorNone- | IOErrorAgain- | IOErrorInval- | IOErrorUnknown- | AnotherIOError Int- deriving (Show, Eq)--instance Enum IOError where- fromEnum IOErrorNone = 0- fromEnum IOErrorAgain = 1- fromEnum IOErrorInval = 2- fromEnum IOErrorUnknown = 3- fromEnum (AnotherIOError k) = k-- toEnum 0 = IOErrorNone- toEnum 1 = IOErrorAgain- toEnum 2 = IOErrorInval- toEnum 3 = IOErrorUnknown- toEnum k = AnotherIOError k---- Enum IOChannelError--data IOChannelError = - IOChannelErrorFbig- | IOChannelErrorInval- | IOChannelErrorIo- | IOChannelErrorIsdir- | IOChannelErrorNospc- | IOChannelErrorNxio- | IOChannelErrorOverflow- | IOChannelErrorPipe- | IOChannelErrorFailed- | AnotherIOChannelError Int- deriving (Show, Eq)--instance Enum IOChannelError where- fromEnum IOChannelErrorFbig = 0- fromEnum IOChannelErrorInval = 1- fromEnum IOChannelErrorIo = 2- fromEnum IOChannelErrorIsdir = 3- fromEnum IOChannelErrorNospc = 4- fromEnum IOChannelErrorNxio = 5- fromEnum IOChannelErrorOverflow = 6- fromEnum IOChannelErrorPipe = 7- fromEnum IOChannelErrorFailed = 8- fromEnum (AnotherIOChannelError k) = k-- toEnum 0 = IOChannelErrorFbig- toEnum 1 = IOChannelErrorInval- toEnum 2 = IOChannelErrorIo- toEnum 3 = IOChannelErrorIsdir- toEnum 4 = IOChannelErrorNospc- toEnum 5 = IOChannelErrorNxio- toEnum 6 = IOChannelErrorOverflow- toEnum 7 = IOChannelErrorPipe- toEnum 8 = IOChannelErrorFailed- toEnum k = AnotherIOChannelError k--instance GErrorClass IOChannelError where- gerrorClassDomain _ = "g-io-channel-error-quark"--catchIOChannelError ::- IO a ->- (IOChannelError -> GErrorMessage -> IO a) ->- IO a-catchIOChannelError = catchGErrorJustDomain--handleIOChannelError ::- (IOChannelError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleIOChannelError = handleGErrorJustDomain---- Enum FileError--data FileError = - FileErrorExist- | FileErrorIsdir- | FileErrorAcces- | FileErrorNametoolong- | FileErrorNoent- | FileErrorNotdir- | FileErrorNxio- | FileErrorNodev- | FileErrorRofs- | FileErrorTxtbsy- | FileErrorFault- | FileErrorLoop- | FileErrorNospc- | FileErrorNomem- | FileErrorMfile- | FileErrorNfile- | FileErrorBadf- | FileErrorInval- | FileErrorPipe- | FileErrorAgain- | FileErrorIntr- | FileErrorIo- | FileErrorPerm- | FileErrorNosys- | FileErrorFailed- | AnotherFileError Int- deriving (Show, Eq)--instance Enum FileError where- fromEnum FileErrorExist = 0- fromEnum FileErrorIsdir = 1- fromEnum FileErrorAcces = 2- fromEnum FileErrorNametoolong = 3- fromEnum FileErrorNoent = 4- fromEnum FileErrorNotdir = 5- fromEnum FileErrorNxio = 6- fromEnum FileErrorNodev = 7- fromEnum FileErrorRofs = 8- fromEnum FileErrorTxtbsy = 9- fromEnum FileErrorFault = 10- fromEnum FileErrorLoop = 11- fromEnum FileErrorNospc = 12- fromEnum FileErrorNomem = 13- fromEnum FileErrorMfile = 14- fromEnum FileErrorNfile = 15- fromEnum FileErrorBadf = 16- fromEnum FileErrorInval = 17- fromEnum FileErrorPipe = 18- fromEnum FileErrorAgain = 19- fromEnum FileErrorIntr = 20- fromEnum FileErrorIo = 21- fromEnum FileErrorPerm = 22- fromEnum FileErrorNosys = 23- fromEnum FileErrorFailed = 24- fromEnum (AnotherFileError k) = k-- toEnum 0 = FileErrorExist- toEnum 1 = FileErrorIsdir- toEnum 2 = FileErrorAcces- toEnum 3 = FileErrorNametoolong- toEnum 4 = FileErrorNoent- toEnum 5 = FileErrorNotdir- toEnum 6 = FileErrorNxio- toEnum 7 = FileErrorNodev- toEnum 8 = FileErrorRofs- toEnum 9 = FileErrorTxtbsy- toEnum 10 = FileErrorFault- toEnum 11 = FileErrorLoop- toEnum 12 = FileErrorNospc- toEnum 13 = FileErrorNomem- toEnum 14 = FileErrorMfile- toEnum 15 = FileErrorNfile- toEnum 16 = FileErrorBadf- toEnum 17 = FileErrorInval- toEnum 18 = FileErrorPipe- toEnum 19 = FileErrorAgain- toEnum 20 = FileErrorIntr- toEnum 21 = FileErrorIo- toEnum 22 = FileErrorPerm- toEnum 23 = FileErrorNosys- toEnum 24 = FileErrorFailed- toEnum k = AnotherFileError k--instance GErrorClass FileError where- gerrorClassDomain _ = "g-file-error-quark"--catchFileError ::- IO a ->- (FileError -> GErrorMessage -> IO a) ->- IO a-catchFileError = catchGErrorJustDomain--handleFileError ::- (FileError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleFileError = handleGErrorJustDomain---- Enum ErrorType--data ErrorType = - ErrorTypeUnknown- | ErrorTypeUnexpEof- | ErrorTypeUnexpEofInString- | ErrorTypeUnexpEofInComment- | ErrorTypeNonDigitInConst- | ErrorTypeDigitRadix- | ErrorTypeFloatRadix- | ErrorTypeFloatMalformed- | AnotherErrorType Int- deriving (Show, Eq)--instance Enum ErrorType where- fromEnum ErrorTypeUnknown = 0- fromEnum ErrorTypeUnexpEof = 1- fromEnum ErrorTypeUnexpEofInString = 2- fromEnum ErrorTypeUnexpEofInComment = 3- fromEnum ErrorTypeNonDigitInConst = 4- fromEnum ErrorTypeDigitRadix = 5- fromEnum ErrorTypeFloatRadix = 6- fromEnum ErrorTypeFloatMalformed = 7- fromEnum (AnotherErrorType k) = k-- toEnum 0 = ErrorTypeUnknown- toEnum 1 = ErrorTypeUnexpEof- toEnum 2 = ErrorTypeUnexpEofInString- toEnum 3 = ErrorTypeUnexpEofInComment- toEnum 4 = ErrorTypeNonDigitInConst- toEnum 5 = ErrorTypeDigitRadix- toEnum 6 = ErrorTypeFloatRadix- toEnum 7 = ErrorTypeFloatMalformed- toEnum k = AnotherErrorType k---- Enum DateWeekday--data DateWeekday = - DateWeekdayBadWeekday- | DateWeekdayMonday- | DateWeekdayTuesday- | DateWeekdayWednesday- | DateWeekdayThursday- | DateWeekdayFriday- | DateWeekdaySaturday- | DateWeekdaySunday- | AnotherDateWeekday Int- deriving (Show, Eq)--instance Enum DateWeekday where- fromEnum DateWeekdayBadWeekday = 0- fromEnum DateWeekdayMonday = 1- fromEnum DateWeekdayTuesday = 2- fromEnum DateWeekdayWednesday = 3- fromEnum DateWeekdayThursday = 4- fromEnum DateWeekdayFriday = 5- fromEnum DateWeekdaySaturday = 6- fromEnum DateWeekdaySunday = 7- fromEnum (AnotherDateWeekday k) = k-- toEnum 0 = DateWeekdayBadWeekday- toEnum 1 = DateWeekdayMonday- toEnum 2 = DateWeekdayTuesday- toEnum 3 = DateWeekdayWednesday- toEnum 4 = DateWeekdayThursday- toEnum 5 = DateWeekdayFriday- toEnum 6 = DateWeekdaySaturday- toEnum 7 = DateWeekdaySunday- toEnum k = AnotherDateWeekday k---- Enum DateMonth--data DateMonth = - DateMonthBadMonth- | DateMonthJanuary- | DateMonthFebruary- | DateMonthMarch- | DateMonthApril- | DateMonthMay- | DateMonthJune- | DateMonthJuly- | DateMonthAugust- | DateMonthSeptember- | DateMonthOctober- | DateMonthNovember- | DateMonthDecember- | AnotherDateMonth Int- deriving (Show, Eq)--instance Enum DateMonth where- fromEnum DateMonthBadMonth = 0- fromEnum DateMonthJanuary = 1- fromEnum DateMonthFebruary = 2- fromEnum DateMonthMarch = 3- fromEnum DateMonthApril = 4- fromEnum DateMonthMay = 5- fromEnum DateMonthJune = 6- fromEnum DateMonthJuly = 7- fromEnum DateMonthAugust = 8- fromEnum DateMonthSeptember = 9- fromEnum DateMonthOctober = 10- fromEnum DateMonthNovember = 11- fromEnum DateMonthDecember = 12- fromEnum (AnotherDateMonth k) = k-- toEnum 0 = DateMonthBadMonth- toEnum 1 = DateMonthJanuary- toEnum 2 = DateMonthFebruary- toEnum 3 = DateMonthMarch- toEnum 4 = DateMonthApril- toEnum 5 = DateMonthMay- toEnum 6 = DateMonthJune- toEnum 7 = DateMonthJuly- toEnum 8 = DateMonthAugust- toEnum 9 = DateMonthSeptember- toEnum 10 = DateMonthOctober- toEnum 11 = DateMonthNovember- toEnum 12 = DateMonthDecember- toEnum k = AnotherDateMonth k---- Enum DateDMY--data DateDMY = - DateDMYDay- | DateDMYMonth- | DateDMYYear- | AnotherDateDMY Int- deriving (Show, Eq)--instance Enum DateDMY where- fromEnum DateDMYDay = 0- fromEnum DateDMYMonth = 1- fromEnum DateDMYYear = 2- fromEnum (AnotherDateDMY k) = k-- toEnum 0 = DateDMYDay- toEnum 1 = DateDMYMonth- toEnum 2 = DateDMYYear- toEnum k = AnotherDateDMY k---- Enum ConvertError--data ConvertError = - ConvertErrorNoConversion- | ConvertErrorIllegalSequence- | ConvertErrorFailed- | ConvertErrorPartialInput- | ConvertErrorBadUri- | ConvertErrorNotAbsolutePath- | ConvertErrorNoMemory- | AnotherConvertError Int- deriving (Show, Eq)--instance Enum ConvertError where- fromEnum ConvertErrorNoConversion = 0- fromEnum ConvertErrorIllegalSequence = 1- fromEnum ConvertErrorFailed = 2- fromEnum ConvertErrorPartialInput = 3- fromEnum ConvertErrorBadUri = 4- fromEnum ConvertErrorNotAbsolutePath = 5- fromEnum ConvertErrorNoMemory = 6- fromEnum (AnotherConvertError k) = k-- toEnum 0 = ConvertErrorNoConversion- toEnum 1 = ConvertErrorIllegalSequence- toEnum 2 = ConvertErrorFailed- toEnum 3 = ConvertErrorPartialInput- toEnum 4 = ConvertErrorBadUri- toEnum 5 = ConvertErrorNotAbsolutePath- toEnum 6 = ConvertErrorNoMemory- toEnum k = AnotherConvertError k--instance GErrorClass ConvertError where- gerrorClassDomain _ = "g_convert_error"--catchConvertError ::- IO a ->- (ConvertError -> GErrorMessage -> IO a) ->- IO a-catchConvertError = catchGErrorJustDomain--handleConvertError ::- (ConvertError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleConvertError = handleGErrorJustDomain---- Enum ChecksumType--data ChecksumType = - ChecksumTypeMd5- | ChecksumTypeSha1- | ChecksumTypeSha256- | ChecksumTypeSha512- | AnotherChecksumType Int- deriving (Show, Eq)--instance Enum ChecksumType where- fromEnum ChecksumTypeMd5 = 0- fromEnum ChecksumTypeSha1 = 1- fromEnum ChecksumTypeSha256 = 2- fromEnum ChecksumTypeSha512 = 3- fromEnum (AnotherChecksumType k) = k-- toEnum 0 = ChecksumTypeMd5- toEnum 1 = ChecksumTypeSha1- toEnum 2 = ChecksumTypeSha256- toEnum 3 = ChecksumTypeSha512- toEnum k = AnotherChecksumType k---- Enum BookmarkFileError--data BookmarkFileError = - BookmarkFileErrorInvalidUri- | BookmarkFileErrorInvalidValue- | BookmarkFileErrorAppNotRegistered- | BookmarkFileErrorUriNotFound- | BookmarkFileErrorRead- | BookmarkFileErrorUnknownEncoding- | BookmarkFileErrorWrite- | BookmarkFileErrorFileNotFound- | AnotherBookmarkFileError Int- deriving (Show, Eq)--instance Enum BookmarkFileError where- fromEnum BookmarkFileErrorInvalidUri = 0- fromEnum BookmarkFileErrorInvalidValue = 1- fromEnum BookmarkFileErrorAppNotRegistered = 2- fromEnum BookmarkFileErrorUriNotFound = 3- fromEnum BookmarkFileErrorRead = 4- fromEnum BookmarkFileErrorUnknownEncoding = 5- fromEnum BookmarkFileErrorWrite = 6- fromEnum BookmarkFileErrorFileNotFound = 7- fromEnum (AnotherBookmarkFileError k) = k-- toEnum 0 = BookmarkFileErrorInvalidUri- toEnum 1 = BookmarkFileErrorInvalidValue- toEnum 2 = BookmarkFileErrorAppNotRegistered- toEnum 3 = BookmarkFileErrorUriNotFound- toEnum 4 = BookmarkFileErrorRead- toEnum 5 = BookmarkFileErrorUnknownEncoding- toEnum 6 = BookmarkFileErrorWrite- toEnum 7 = BookmarkFileErrorFileNotFound- toEnum k = AnotherBookmarkFileError k--instance GErrorClass BookmarkFileError where- gerrorClassDomain _ = "g-bookmark-file-error-quark"--catchBookmarkFileError ::- IO a ->- (BookmarkFileError -> GErrorMessage -> IO a) ->- IO a-catchBookmarkFileError = catchGErrorJustDomain--handleBookmarkFileError ::- (BookmarkFileError -> GErrorMessage -> IO a) ->- IO a ->- IO a-handleBookmarkFileError = handleGErrorJustDomain--
− GI/GLib/Flags.hs
@@ -1,631 +0,0 @@---{- |-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.GLib.Flags- ( ---- * Exported types- TraverseFlags(..) ,- TestTrapFlags(..) ,- TestSubprocessFlags(..) ,- SpawnFlags(..) ,- RegexMatchFlags(..) ,- RegexCompileFlags(..) ,- OptionFlags(..) ,- MarkupParseFlags(..) ,- MarkupCollectType(..) ,- LogLevelFlags(..) ,- KeyFileFlags(..) ,- IOFlags(..) ,- IOCondition(..) ,- HookFlagMask(..) ,- FormatSizeFlags(..) ,- FileTest(..) ,- AsciiType(..) ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map------- Flags TraverseFlags--data TraverseFlags = - TraverseFlagsLeaves- | TraverseFlagsNonLeaves- | TraverseFlagsAll- | TraverseFlagsMask- | TraverseFlagsLeafs- | TraverseFlagsNonLeafs- | AnotherTraverseFlags Int- deriving (Show, Eq)--instance Enum TraverseFlags where- fromEnum TraverseFlagsLeaves = 1- fromEnum TraverseFlagsNonLeaves = 2- fromEnum TraverseFlagsAll = 3- fromEnum TraverseFlagsMask = 3- fromEnum TraverseFlagsLeafs = 1- fromEnum TraverseFlagsNonLeafs = 2- fromEnum (AnotherTraverseFlags k) = k-- toEnum 1 = TraverseFlagsLeaves- toEnum 2 = TraverseFlagsNonLeaves- toEnum 3 = TraverseFlagsAll- toEnum k = AnotherTraverseFlags k--instance IsGFlag TraverseFlags---- Flags TestTrapFlags-{-# DEPRECATED TestTrapFlags ["#GTestTrapFlags is used only with g_test_trap_fork(),","which is deprecated. g_test_trap_subprocess() uses","#GTestTrapSubprocessFlags."]#-}-data TestTrapFlags = - TestTrapFlagsSilenceStdout- | TestTrapFlagsSilenceStderr- | TestTrapFlagsInheritStdin- | AnotherTestTrapFlags Int- deriving (Show, Eq)--instance Enum TestTrapFlags where- fromEnum TestTrapFlagsSilenceStdout = 128- fromEnum TestTrapFlagsSilenceStderr = 256- fromEnum TestTrapFlagsInheritStdin = 512- fromEnum (AnotherTestTrapFlags k) = k-- toEnum 128 = TestTrapFlagsSilenceStdout- toEnum 256 = TestTrapFlagsSilenceStderr- toEnum 512 = TestTrapFlagsInheritStdin- toEnum k = AnotherTestTrapFlags k--instance IsGFlag TestTrapFlags---- Flags TestSubprocessFlags--data TestSubprocessFlags = - TestSubprocessFlagsStdin- | TestSubprocessFlagsStdout- | TestSubprocessFlagsStderr- | AnotherTestSubprocessFlags Int- deriving (Show, Eq)--instance Enum TestSubprocessFlags where- fromEnum TestSubprocessFlagsStdin = 1- fromEnum TestSubprocessFlagsStdout = 2- fromEnum TestSubprocessFlagsStderr = 4- fromEnum (AnotherTestSubprocessFlags k) = k-- toEnum 1 = TestSubprocessFlagsStdin- toEnum 2 = TestSubprocessFlagsStdout- toEnum 4 = TestSubprocessFlagsStderr- toEnum k = AnotherTestSubprocessFlags k--instance IsGFlag TestSubprocessFlags---- Flags SpawnFlags--data SpawnFlags = - SpawnFlagsDefault- | SpawnFlagsLeaveDescriptorsOpen- | SpawnFlagsDoNotReapChild- | SpawnFlagsSearchPath- | SpawnFlagsStdoutToDevNull- | SpawnFlagsStderrToDevNull- | SpawnFlagsChildInheritsStdin- | SpawnFlagsFileAndArgvZero- | SpawnFlagsSearchPathFromEnvp- | SpawnFlagsCloexecPipes- | AnotherSpawnFlags Int- deriving (Show, Eq)--instance Enum SpawnFlags where- fromEnum SpawnFlagsDefault = 0- fromEnum SpawnFlagsLeaveDescriptorsOpen = 1- fromEnum SpawnFlagsDoNotReapChild = 2- fromEnum SpawnFlagsSearchPath = 4- fromEnum SpawnFlagsStdoutToDevNull = 8- fromEnum SpawnFlagsStderrToDevNull = 16- fromEnum SpawnFlagsChildInheritsStdin = 32- fromEnum SpawnFlagsFileAndArgvZero = 64- fromEnum SpawnFlagsSearchPathFromEnvp = 128- fromEnum SpawnFlagsCloexecPipes = 256- fromEnum (AnotherSpawnFlags k) = k-- toEnum 0 = SpawnFlagsDefault- toEnum 1 = SpawnFlagsLeaveDescriptorsOpen- toEnum 2 = SpawnFlagsDoNotReapChild- toEnum 4 = SpawnFlagsSearchPath- toEnum 8 = SpawnFlagsStdoutToDevNull- toEnum 16 = SpawnFlagsStderrToDevNull- toEnum 32 = SpawnFlagsChildInheritsStdin- toEnum 64 = SpawnFlagsFileAndArgvZero- toEnum 128 = SpawnFlagsSearchPathFromEnvp- toEnum 256 = SpawnFlagsCloexecPipes- toEnum k = AnotherSpawnFlags k--instance IsGFlag SpawnFlags---- Flags RegexMatchFlags--data RegexMatchFlags = - RegexMatchFlagsAnchored- | RegexMatchFlagsNotbol- | RegexMatchFlagsNoteol- | RegexMatchFlagsNotempty- | RegexMatchFlagsPartial- | RegexMatchFlagsNewlineCr- | RegexMatchFlagsNewlineLf- | RegexMatchFlagsNewlineCrlf- | RegexMatchFlagsNewlineAny- | RegexMatchFlagsNewlineAnycrlf- | RegexMatchFlagsBsrAnycrlf- | RegexMatchFlagsBsrAny- | RegexMatchFlagsPartialSoft- | RegexMatchFlagsPartialHard- | RegexMatchFlagsNotemptyAtstart- | AnotherRegexMatchFlags Int- deriving (Show, Eq)--instance Enum RegexMatchFlags where- fromEnum RegexMatchFlagsAnchored = 16- fromEnum RegexMatchFlagsNotbol = 128- fromEnum RegexMatchFlagsNoteol = 256- fromEnum RegexMatchFlagsNotempty = 1024- fromEnum RegexMatchFlagsPartial = 32768- fromEnum RegexMatchFlagsNewlineCr = 1048576- fromEnum RegexMatchFlagsNewlineLf = 2097152- fromEnum RegexMatchFlagsNewlineCrlf = 3145728- fromEnum RegexMatchFlagsNewlineAny = 4194304- fromEnum RegexMatchFlagsNewlineAnycrlf = 5242880- fromEnum RegexMatchFlagsBsrAnycrlf = 8388608- fromEnum RegexMatchFlagsBsrAny = 16777216- fromEnum RegexMatchFlagsPartialSoft = 32768- fromEnum RegexMatchFlagsPartialHard = 134217728- fromEnum RegexMatchFlagsNotemptyAtstart = 268435456- fromEnum (AnotherRegexMatchFlags k) = k-- toEnum 16 = RegexMatchFlagsAnchored- toEnum 128 = RegexMatchFlagsNotbol- toEnum 256 = RegexMatchFlagsNoteol- toEnum 1024 = RegexMatchFlagsNotempty- toEnum 32768 = RegexMatchFlagsPartial- toEnum 1048576 = RegexMatchFlagsNewlineCr- toEnum 2097152 = RegexMatchFlagsNewlineLf- toEnum 3145728 = RegexMatchFlagsNewlineCrlf- toEnum 4194304 = RegexMatchFlagsNewlineAny- toEnum 5242880 = RegexMatchFlagsNewlineAnycrlf- toEnum 8388608 = RegexMatchFlagsBsrAnycrlf- toEnum 16777216 = RegexMatchFlagsBsrAny- toEnum 134217728 = RegexMatchFlagsPartialHard- toEnum 268435456 = RegexMatchFlagsNotemptyAtstart- toEnum k = AnotherRegexMatchFlags k--instance IsGFlag RegexMatchFlags---- Flags RegexCompileFlags--data RegexCompileFlags = - RegexCompileFlagsCaseless- | RegexCompileFlagsMultiline- | RegexCompileFlagsDotall- | RegexCompileFlagsExtended- | RegexCompileFlagsAnchored- | RegexCompileFlagsDollarEndonly- | RegexCompileFlagsUngreedy- | RegexCompileFlagsRaw- | RegexCompileFlagsNoAutoCapture- | RegexCompileFlagsOptimize- | RegexCompileFlagsFirstline- | RegexCompileFlagsDupnames- | RegexCompileFlagsNewlineCr- | RegexCompileFlagsNewlineLf- | RegexCompileFlagsNewlineCrlf- | RegexCompileFlagsNewlineAnycrlf- | RegexCompileFlagsBsrAnycrlf- | RegexCompileFlagsJavascriptCompat- | AnotherRegexCompileFlags Int- deriving (Show, Eq)--instance Enum RegexCompileFlags where- fromEnum RegexCompileFlagsCaseless = 1- fromEnum RegexCompileFlagsMultiline = 2- fromEnum RegexCompileFlagsDotall = 4- fromEnum RegexCompileFlagsExtended = 8- fromEnum RegexCompileFlagsAnchored = 16- fromEnum RegexCompileFlagsDollarEndonly = 32- fromEnum RegexCompileFlagsUngreedy = 512- fromEnum RegexCompileFlagsRaw = 2048- fromEnum RegexCompileFlagsNoAutoCapture = 4096- fromEnum RegexCompileFlagsOptimize = 8192- fromEnum RegexCompileFlagsFirstline = 262144- fromEnum RegexCompileFlagsDupnames = 524288- fromEnum RegexCompileFlagsNewlineCr = 1048576- fromEnum RegexCompileFlagsNewlineLf = 2097152- fromEnum RegexCompileFlagsNewlineCrlf = 3145728- fromEnum RegexCompileFlagsNewlineAnycrlf = 5242880- fromEnum RegexCompileFlagsBsrAnycrlf = 8388608- fromEnum RegexCompileFlagsJavascriptCompat = 33554432- fromEnum (AnotherRegexCompileFlags k) = k-- toEnum 1 = RegexCompileFlagsCaseless- toEnum 2 = RegexCompileFlagsMultiline- toEnum 4 = RegexCompileFlagsDotall- toEnum 8 = RegexCompileFlagsExtended- toEnum 16 = RegexCompileFlagsAnchored- toEnum 32 = RegexCompileFlagsDollarEndonly- toEnum 512 = RegexCompileFlagsUngreedy- toEnum 2048 = RegexCompileFlagsRaw- toEnum 4096 = RegexCompileFlagsNoAutoCapture- toEnum 8192 = RegexCompileFlagsOptimize- toEnum 262144 = RegexCompileFlagsFirstline- toEnum 524288 = RegexCompileFlagsDupnames- toEnum 1048576 = RegexCompileFlagsNewlineCr- toEnum 2097152 = RegexCompileFlagsNewlineLf- toEnum 3145728 = RegexCompileFlagsNewlineCrlf- toEnum 5242880 = RegexCompileFlagsNewlineAnycrlf- toEnum 8388608 = RegexCompileFlagsBsrAnycrlf- toEnum 33554432 = RegexCompileFlagsJavascriptCompat- toEnum k = AnotherRegexCompileFlags k--instance IsGFlag RegexCompileFlags---- Flags OptionFlags--data OptionFlags = - OptionFlagsNone- | OptionFlagsHidden- | OptionFlagsInMain- | OptionFlagsReverse- | OptionFlagsNoArg- | OptionFlagsFilename- | OptionFlagsOptionalArg- | OptionFlagsNoalias- | AnotherOptionFlags Int- deriving (Show, Eq)--instance Enum OptionFlags where- fromEnum OptionFlagsNone = 0- fromEnum OptionFlagsHidden = 1- fromEnum OptionFlagsInMain = 2- fromEnum OptionFlagsReverse = 4- fromEnum OptionFlagsNoArg = 8- fromEnum OptionFlagsFilename = 16- fromEnum OptionFlagsOptionalArg = 32- fromEnum OptionFlagsNoalias = 64- fromEnum (AnotherOptionFlags k) = k-- toEnum 0 = OptionFlagsNone- toEnum 1 = OptionFlagsHidden- toEnum 2 = OptionFlagsInMain- toEnum 4 = OptionFlagsReverse- toEnum 8 = OptionFlagsNoArg- toEnum 16 = OptionFlagsFilename- toEnum 32 = OptionFlagsOptionalArg- toEnum 64 = OptionFlagsNoalias- toEnum k = AnotherOptionFlags k--instance IsGFlag OptionFlags---- Flags MarkupParseFlags--data MarkupParseFlags = - MarkupParseFlagsDoNotUseThisUnsupportedFlag- | MarkupParseFlagsTreatCdataAsText- | MarkupParseFlagsPrefixErrorPosition- | MarkupParseFlagsIgnoreQualified- | AnotherMarkupParseFlags Int- deriving (Show, Eq)--instance Enum MarkupParseFlags where- fromEnum MarkupParseFlagsDoNotUseThisUnsupportedFlag = 1- fromEnum MarkupParseFlagsTreatCdataAsText = 2- fromEnum MarkupParseFlagsPrefixErrorPosition = 4- fromEnum MarkupParseFlagsIgnoreQualified = 8- fromEnum (AnotherMarkupParseFlags k) = k-- toEnum 1 = MarkupParseFlagsDoNotUseThisUnsupportedFlag- toEnum 2 = MarkupParseFlagsTreatCdataAsText- toEnum 4 = MarkupParseFlagsPrefixErrorPosition- toEnum 8 = MarkupParseFlagsIgnoreQualified- toEnum k = AnotherMarkupParseFlags k--instance IsGFlag MarkupParseFlags---- Flags MarkupCollectType--data MarkupCollectType = - MarkupCollectTypeInvalid- | MarkupCollectTypeString- | MarkupCollectTypeStrdup- | MarkupCollectTypeBoolean- | MarkupCollectTypeTristate- | MarkupCollectTypeOptional- | AnotherMarkupCollectType Int- deriving (Show, Eq)--instance Enum MarkupCollectType where- fromEnum MarkupCollectTypeInvalid = 0- fromEnum MarkupCollectTypeString = 1- fromEnum MarkupCollectTypeStrdup = 2- fromEnum MarkupCollectTypeBoolean = 3- fromEnum MarkupCollectTypeTristate = 4- fromEnum MarkupCollectTypeOptional = 65536- fromEnum (AnotherMarkupCollectType k) = k-- toEnum 0 = MarkupCollectTypeInvalid- toEnum 1 = MarkupCollectTypeString- toEnum 2 = MarkupCollectTypeStrdup- toEnum 3 = MarkupCollectTypeBoolean- toEnum 4 = MarkupCollectTypeTristate- toEnum 65536 = MarkupCollectTypeOptional- toEnum k = AnotherMarkupCollectType k--instance IsGFlag MarkupCollectType---- Flags LogLevelFlags--data LogLevelFlags = - LogLevelFlagsFlagRecursion- | LogLevelFlagsFlagFatal- | LogLevelFlagsLevelError- | LogLevelFlagsLevelCritical- | LogLevelFlagsLevelWarning- | LogLevelFlagsLevelMessage- | LogLevelFlagsLevelInfo- | LogLevelFlagsLevelDebug- | LogLevelFlagsLevelMask- | AnotherLogLevelFlags Int- deriving (Show, Eq)--instance Enum LogLevelFlags where- fromEnum LogLevelFlagsFlagRecursion = 1- fromEnum LogLevelFlagsFlagFatal = 2- fromEnum LogLevelFlagsLevelError = 4- fromEnum LogLevelFlagsLevelCritical = 8- fromEnum LogLevelFlagsLevelWarning = 16- fromEnum LogLevelFlagsLevelMessage = 32- fromEnum LogLevelFlagsLevelInfo = 64- fromEnum LogLevelFlagsLevelDebug = 128- fromEnum LogLevelFlagsLevelMask = -4- fromEnum (AnotherLogLevelFlags k) = k-- toEnum -4 = LogLevelFlagsLevelMask- toEnum 1 = LogLevelFlagsFlagRecursion- toEnum 2 = LogLevelFlagsFlagFatal- toEnum 4 = LogLevelFlagsLevelError- toEnum 8 = LogLevelFlagsLevelCritical- toEnum 16 = LogLevelFlagsLevelWarning- toEnum 32 = LogLevelFlagsLevelMessage- toEnum 64 = LogLevelFlagsLevelInfo- toEnum 128 = LogLevelFlagsLevelDebug- toEnum k = AnotherLogLevelFlags k--instance IsGFlag LogLevelFlags---- Flags KeyFileFlags--data KeyFileFlags = - KeyFileFlagsNone- | KeyFileFlagsKeepComments- | KeyFileFlagsKeepTranslations- | AnotherKeyFileFlags Int- deriving (Show, Eq)--instance Enum KeyFileFlags where- fromEnum KeyFileFlagsNone = 0- fromEnum KeyFileFlagsKeepComments = 1- fromEnum KeyFileFlagsKeepTranslations = 2- fromEnum (AnotherKeyFileFlags k) = k-- toEnum 0 = KeyFileFlagsNone- toEnum 1 = KeyFileFlagsKeepComments- toEnum 2 = KeyFileFlagsKeepTranslations- toEnum k = AnotherKeyFileFlags k--instance IsGFlag KeyFileFlags---- Flags IOFlags--data IOFlags = - IOFlagsAppend- | IOFlagsNonblock- | IOFlagsIsReadable- | IOFlagsIsWritable- | IOFlagsIsWriteable- | IOFlagsIsSeekable- | IOFlagsMask- | IOFlagsGetMask- | IOFlagsSetMask- | AnotherIOFlags Int- deriving (Show, Eq)--instance Enum IOFlags where- fromEnum IOFlagsAppend = 1- fromEnum IOFlagsNonblock = 2- fromEnum IOFlagsIsReadable = 4- fromEnum IOFlagsIsWritable = 8- fromEnum IOFlagsIsWriteable = 8- fromEnum IOFlagsIsSeekable = 16- fromEnum IOFlagsMask = 31- fromEnum IOFlagsGetMask = 31- fromEnum IOFlagsSetMask = 3- fromEnum (AnotherIOFlags k) = k-- toEnum 1 = IOFlagsAppend- toEnum 2 = IOFlagsNonblock- toEnum 3 = IOFlagsSetMask- toEnum 4 = IOFlagsIsReadable- toEnum 8 = IOFlagsIsWritable- toEnum 16 = IOFlagsIsSeekable- toEnum 31 = IOFlagsMask- toEnum k = AnotherIOFlags k--instance IsGFlag IOFlags---- Flags IOCondition--data IOCondition = - IOConditionIn- | IOConditionOut- | IOConditionPri- | IOConditionErr- | IOConditionHup- | IOConditionNval- | AnotherIOCondition Int- deriving (Show, Eq)--instance Enum IOCondition where- fromEnum IOConditionIn = 1- fromEnum IOConditionOut = 4- fromEnum IOConditionPri = 2- fromEnum IOConditionErr = 8- fromEnum IOConditionHup = 16- fromEnum IOConditionNval = 32- fromEnum (AnotherIOCondition k) = k-- toEnum 1 = IOConditionIn- toEnum 2 = IOConditionPri- toEnum 4 = IOConditionOut- toEnum 8 = IOConditionErr- toEnum 16 = IOConditionHup- toEnum 32 = IOConditionNval- toEnum k = AnotherIOCondition k--foreign import ccall "g_io_condition_get_type" c_g_io_condition_get_type :: - IO GType--instance BoxedFlags IOCondition where- boxedFlagsType _ = c_g_io_condition_get_type--instance IsGFlag IOCondition---- Flags HookFlagMask--data HookFlagMask = - HookFlagMaskActive- | HookFlagMaskInCall- | HookFlagMaskMask- | AnotherHookFlagMask Int- deriving (Show, Eq)--instance Enum HookFlagMask where- fromEnum HookFlagMaskActive = 1- fromEnum HookFlagMaskInCall = 2- fromEnum HookFlagMaskMask = 15- fromEnum (AnotherHookFlagMask k) = k-- toEnum 1 = HookFlagMaskActive- toEnum 2 = HookFlagMaskInCall- toEnum 15 = HookFlagMaskMask- toEnum k = AnotherHookFlagMask k--instance IsGFlag HookFlagMask---- Flags FormatSizeFlags--data FormatSizeFlags = - FormatSizeFlagsDefault- | FormatSizeFlagsLongFormat- | FormatSizeFlagsIecUnits- | AnotherFormatSizeFlags Int- deriving (Show, Eq)--instance Enum FormatSizeFlags where- fromEnum FormatSizeFlagsDefault = 0- fromEnum FormatSizeFlagsLongFormat = 1- fromEnum FormatSizeFlagsIecUnits = 2- fromEnum (AnotherFormatSizeFlags k) = k-- toEnum 0 = FormatSizeFlagsDefault- toEnum 1 = FormatSizeFlagsLongFormat- toEnum 2 = FormatSizeFlagsIecUnits- toEnum k = AnotherFormatSizeFlags k--instance IsGFlag FormatSizeFlags---- Flags FileTest--data FileTest = - FileTestIsRegular- | FileTestIsSymlink- | FileTestIsDir- | FileTestIsExecutable- | FileTestExists- | AnotherFileTest Int- deriving (Show, Eq)--instance Enum FileTest where- fromEnum FileTestIsRegular = 1- fromEnum FileTestIsSymlink = 2- fromEnum FileTestIsDir = 4- fromEnum FileTestIsExecutable = 8- fromEnum FileTestExists = 16- fromEnum (AnotherFileTest k) = k-- toEnum 1 = FileTestIsRegular- toEnum 2 = FileTestIsSymlink- toEnum 4 = FileTestIsDir- toEnum 8 = FileTestIsExecutable- toEnum 16 = FileTestExists- toEnum k = AnotherFileTest k--instance IsGFlag FileTest---- Flags AsciiType--data AsciiType = - AsciiTypeAlnum- | AsciiTypeAlpha- | AsciiTypeCntrl- | AsciiTypeDigit- | AsciiTypeGraph- | AsciiTypeLower- | AsciiTypePrint- | AsciiTypePunct- | AsciiTypeSpace- | AsciiTypeUpper- | AsciiTypeXdigit- | AnotherAsciiType Int- deriving (Show, Eq)--instance Enum AsciiType where- fromEnum AsciiTypeAlnum = 1- fromEnum AsciiTypeAlpha = 2- fromEnum AsciiTypeCntrl = 4- fromEnum AsciiTypeDigit = 8- fromEnum AsciiTypeGraph = 16- fromEnum AsciiTypeLower = 32- fromEnum AsciiTypePrint = 64- fromEnum AsciiTypePunct = 128- fromEnum AsciiTypeSpace = 256- fromEnum AsciiTypeUpper = 512- fromEnum AsciiTypeXdigit = 1024- fromEnum (AnotherAsciiType k) = k-- toEnum 1 = AsciiTypeAlnum- toEnum 2 = AsciiTypeAlpha- toEnum 4 = AsciiTypeCntrl- toEnum 8 = AsciiTypeDigit- toEnum 16 = AsciiTypeGraph- toEnum 32 = AsciiTypeLower- toEnum 64 = AsciiTypePrint- toEnum 128 = AsciiTypePunct- toEnum 256 = AsciiTypeSpace- toEnum 512 = AsciiTypeUpper- toEnum 1024 = AsciiTypeXdigit- toEnum k = AnotherAsciiType k--instance IsGFlag AsciiType--
− GI/GLib/Functions.hs
@@ -1,11321 +0,0 @@---{- |-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.GLib.Functions- ( -- -- * Methods--- ** access- access ,----- ** asciiDigitValue- asciiDigitValue ,----- ** asciiDtostr- asciiDtostr ,----- ** asciiFormatd- asciiFormatd ,----- ** asciiStrcasecmp- asciiStrcasecmp ,----- ** asciiStrdown- asciiStrdown ,----- ** asciiStrncasecmp- asciiStrncasecmp ,----- ** asciiStrtod- asciiStrtod ,----- ** asciiStrtoll- asciiStrtoll ,----- ** asciiStrtoull- asciiStrtoull ,----- ** asciiStrup- asciiStrup ,----- ** asciiTolower- asciiTolower ,----- ** asciiToupper- asciiToupper ,----- ** asciiXdigitValue- asciiXdigitValue ,----- ** assertWarning- assertWarning ,----- ** assertionMessage- assertionMessage ,----- ** assertionMessageCmpstr- assertionMessageCmpstr ,----- ** assertionMessageError- assertionMessageError ,----- ** assertionMessageExpr- assertionMessageExpr ,----- ** atexit- atexit ,----- ** atomicIntAdd- atomicIntAdd ,----- ** atomicIntAnd- atomicIntAnd ,----- ** atomicIntCompareAndExchange- atomicIntCompareAndExchange ,----- ** atomicIntDecAndTest- atomicIntDecAndTest ,----- ** atomicIntExchangeAndAdd- atomicIntExchangeAndAdd ,----- ** atomicIntGet- atomicIntGet ,----- ** atomicIntInc- atomicIntInc ,----- ** atomicIntOr- atomicIntOr ,----- ** atomicIntSet- atomicIntSet ,----- ** atomicIntXor- atomicIntXor ,----- ** atomicPointerAdd- atomicPointerAdd ,----- ** atomicPointerAnd- atomicPointerAnd ,----- ** atomicPointerCompareAndExchange- atomicPointerCompareAndExchange ,----- ** atomicPointerOr- atomicPointerOr ,----- ** atomicPointerSet- atomicPointerSet ,----- ** atomicPointerXor- atomicPointerXor ,----- ** base64Decode- base64Decode ,----- ** base64DecodeInplace- base64DecodeInplace ,----- ** base64Encode- base64Encode ,----- ** basename- basename ,----- ** bitLock- bitLock ,----- ** bitNthLsf- bitNthLsf ,----- ** bitNthMsf- bitNthMsf ,----- ** bitStorage- bitStorage ,----- ** bitTrylock- bitTrylock ,----- ** bitUnlock- bitUnlock ,----- ** buildFilenamev- buildFilenamev ,----- ** buildPathv- buildPathv ,----- ** chdir- chdir ,----- ** checkVersion- checkVersion ,----- ** childWatchAdd- childWatchAdd ,----- ** childWatchSourceNew- childWatchSourceNew ,----- ** clearError- clearError ,----- ** close- close ,----- ** computeChecksumForBytes- computeChecksumForBytes ,----- ** computeChecksumForData- computeChecksumForData ,----- ** computeChecksumForString- computeChecksumForString ,----- ** computeHmacForData- computeHmacForData ,----- ** computeHmacForString- computeHmacForString ,----- ** convert- convert ,----- ** convertErrorQuark- convertErrorQuark ,----- ** convertWithFallback- convertWithFallback ,----- ** convertWithIconv- convertWithIconv ,----- ** datalistClear- datalistClear ,----- ** datalistGetFlags- datalistGetFlags ,----- ** datalistIdReplaceData- datalistIdReplaceData ,----- ** datalistIdSetDataFull- datalistIdSetDataFull ,----- ** datalistInit- datalistInit ,----- ** datalistSetFlags- datalistSetFlags ,----- ** datalistUnsetFlags- datalistUnsetFlags ,----- ** datasetDestroy- datasetDestroy ,----- ** datasetIdSetDataFull- datasetIdSetDataFull ,----- ** dcgettext- dcgettext ,----- ** dgettext- dgettext ,----- ** directEqual- directEqual ,----- ** directHash- directHash ,----- ** dngettext- dngettext ,----- ** doubleEqual- doubleEqual ,----- ** doubleHash- doubleHash ,----- ** dpgettext- dpgettext ,----- ** dpgettext2- dpgettext2 ,----- ** environGetenv- environGetenv ,----- ** environSetenv- environSetenv ,----- ** environUnsetenv- environUnsetenv ,----- ** fileErrorFromErrno- fileErrorFromErrno ,----- ** fileErrorQuark- fileErrorQuark ,----- ** fileGetContents- fileGetContents ,----- ** fileOpenTmp- fileOpenTmp ,----- ** fileReadLink- fileReadLink ,----- ** fileSetContents- fileSetContents ,----- ** fileTest- fileTest ,----- ** filenameDisplayBasename- filenameDisplayBasename ,----- ** filenameDisplayName- filenameDisplayName ,----- ** filenameFromUri- filenameFromUri ,----- ** filenameFromUtf8- filenameFromUtf8 ,----- ** filenameToUri- filenameToUri ,----- ** filenameToUtf8- filenameToUtf8 ,----- ** findProgramInPath- findProgramInPath ,----- ** formatSize- formatSize ,----- ** formatSizeForDisplay- formatSizeForDisplay ,----- ** formatSizeFull- formatSizeFull ,----- ** free- free ,----- ** getApplicationName- getApplicationName ,----- ** getCharset- getCharset ,----- ** getCodeset- getCodeset ,----- ** getCurrentDir- getCurrentDir ,----- ** getCurrentTime- getCurrentTime ,----- ** getEnviron- getEnviron ,----- ** getFilenameCharsets- getFilenameCharsets ,----- ** getHomeDir- getHomeDir ,----- ** getHostName- getHostName ,----- ** getLanguageNames- getLanguageNames ,----- ** getLocaleVariants- getLocaleVariants ,----- ** getMonotonicTime- getMonotonicTime ,----- ** getNumProcessors- getNumProcessors ,----- ** getPrgname- getPrgname ,----- ** getRealName- getRealName ,----- ** getRealTime- getRealTime ,----- ** getSystemConfigDirs- getSystemConfigDirs ,----- ** getSystemDataDirs- getSystemDataDirs ,----- ** getTmpDir- getTmpDir ,----- ** getUserCacheDir- getUserCacheDir ,----- ** getUserConfigDir- getUserConfigDir ,----- ** getUserDataDir- getUserDataDir ,----- ** getUserName- getUserName ,----- ** getUserRuntimeDir- getUserRuntimeDir ,----- ** getUserSpecialDir- getUserSpecialDir ,----- ** getenv- getenv ,----- ** hostnameIsAsciiEncoded- hostnameIsAsciiEncoded ,----- ** hostnameIsIpAddress- hostnameIsIpAddress ,----- ** hostnameIsNonAscii- hostnameIsNonAscii ,----- ** hostnameToAscii- hostnameToAscii ,----- ** hostnameToUnicode- hostnameToUnicode ,----- ** iconv- iconv ,----- ** idleAdd- idleAdd ,----- ** idleRemoveByData- idleRemoveByData ,----- ** idleSourceNew- idleSourceNew ,----- ** int64Equal- int64Equal ,----- ** int64Hash- int64Hash ,----- ** intEqual- intEqual ,----- ** intHash- intHash ,----- ** internStaticString- internStaticString ,----- ** internString- internString ,----- ** ioAddWatch- ioAddWatch ,----- ** ioCreateWatch- ioCreateWatch ,----- ** listenv- listenv ,----- ** localeFromUtf8- localeFromUtf8 ,----- ** localeToUtf8- localeToUtf8 ,----- ** logDefaultHandler- logDefaultHandler ,----- ** logRemoveHandler- logRemoveHandler ,----- ** logSetAlwaysFatal- logSetAlwaysFatal ,----- ** logSetFatalMask- logSetFatalMask ,----- ** logSetHandler- logSetHandler ,----- ** mainCurrentSource- mainCurrentSource ,----- ** mainDepth- mainDepth ,----- ** markupErrorQuark- markupErrorQuark ,----- ** markupEscapeText- markupEscapeText ,----- ** memIsSystemMalloc- memIsSystemMalloc ,----- ** memProfile- memProfile ,----- ** memSetVtable- memSetVtable ,----- ** mkdirWithParents- mkdirWithParents ,----- ** mkdtemp- mkdtemp ,----- ** mkdtempFull- mkdtempFull ,----- ** mkstemp- mkstemp ,----- ** mkstempFull- mkstempFull ,----- ** nullifyPointer- nullifyPointer ,----- ** onErrorQuery- onErrorQuery ,----- ** onErrorStackTrace- onErrorStackTrace ,----- ** optionErrorQuark- optionErrorQuark ,----- ** parseDebugString- parseDebugString ,----- ** pathGetBasename- pathGetBasename ,----- ** pathGetDirname- pathGetDirname ,----- ** pathIsAbsolute- pathIsAbsolute ,----- ** pathSkipRoot- pathSkipRoot ,----- ** patternMatch- patternMatch ,----- ** patternMatchSimple- patternMatchSimple ,----- ** patternMatchString- patternMatchString ,----- ** pointerBitLock- pointerBitLock ,----- ** pointerBitTrylock- pointerBitTrylock ,----- ** pointerBitUnlock- pointerBitUnlock ,----- ** poll- poll ,----- ** propagateError- propagateError ,----- ** quarkFromStaticString- quarkFromStaticString ,----- ** quarkFromString- quarkFromString ,----- ** quarkToString- quarkToString ,----- ** quarkTryString- quarkTryString ,----- ** randomDouble- randomDouble ,----- ** randomDoubleRange- randomDoubleRange ,----- ** randomInt- randomInt ,----- ** randomIntRange- randomIntRange ,----- ** randomSetSeed- randomSetSeed ,----- ** reloadUserSpecialDirsCache- reloadUserSpecialDirsCache ,----- ** returnIfFailWarning- returnIfFailWarning ,----- ** rmdir- rmdir ,----- ** setApplicationName- setApplicationName ,----- ** setErrorLiteral- setErrorLiteral ,----- ** setPrgname- setPrgname ,----- ** setenv- setenv ,----- ** shellErrorQuark- shellErrorQuark ,----- ** shellParseArgv- shellParseArgv ,----- ** shellQuote- shellQuote ,----- ** shellUnquote- shellUnquote ,----- ** sliceFree1- sliceFree1 ,----- ** sliceFreeChainWithOffset- sliceFreeChainWithOffset ,----- ** sliceGetConfig- sliceGetConfig ,----- ** sliceGetConfigState- sliceGetConfigState ,----- ** sliceSetConfig- sliceSetConfig ,----- ** spacedPrimesClosest- spacedPrimesClosest ,----- ** spawnAsync- spawnAsync ,----- ** spawnAsyncWithPipes- spawnAsyncWithPipes ,----- ** spawnCheckExitStatus- spawnCheckExitStatus ,----- ** spawnClosePid- spawnClosePid ,----- ** spawnCommandLineAsync- spawnCommandLineAsync ,----- ** spawnCommandLineSync- spawnCommandLineSync ,----- ** spawnErrorQuark- spawnErrorQuark ,----- ** spawnExitErrorQuark- spawnExitErrorQuark ,----- ** spawnSync- spawnSync ,----- ** stpcpy- stpcpy ,----- ** strEqual- strEqual ,----- ** strHasPrefix- strHasPrefix ,----- ** strHasSuffix- strHasSuffix ,----- ** strHash- strHash ,----- ** strIsAscii- strIsAscii ,----- ** strMatchString- strMatchString ,----- ** strToAscii- strToAscii ,----- ** strTokenizeAndFold- strTokenizeAndFold ,----- ** strcanon- strcanon ,----- ** strcasecmp- strcasecmp ,----- ** strchomp- strchomp ,----- ** strchug- strchug ,----- ** strcmp0- strcmp0 ,----- ** strcompress- strcompress ,----- ** strdelimit- strdelimit ,----- ** strdown- strdown ,----- ** strdup- strdup ,----- ** strerror- strerror ,----- ** strescape- strescape ,----- ** strfreev- strfreev ,----- ** stringNew- stringNew ,----- ** stringNewLen- stringNewLen ,----- ** stringSizedNew- stringSizedNew ,----- ** stripContext- stripContext ,----- ** strjoinv- strjoinv ,----- ** strlcat- strlcat ,----- ** strlcpy- strlcpy ,----- ** strncasecmp- strncasecmp ,----- ** strndup- strndup ,----- ** strnfill- strnfill ,----- ** strreverse- strreverse ,----- ** strrstr- strrstr ,----- ** strrstrLen- strrstrLen ,----- ** strsignal- strsignal ,----- ** strstrLen- strstrLen ,----- ** strtod- strtod ,----- ** strup- strup ,----- ** strvContains- strvContains ,----- ** strvGetType- strvGetType ,----- ** strvLength- strvLength ,----- ** testAddDataFunc- testAddDataFunc ,----- ** testAddFunc- testAddFunc ,----- ** testAssertExpectedMessagesInternal- testAssertExpectedMessagesInternal ,----- ** testBug- testBug ,----- ** testBugBase- testBugBase ,----- ** testExpectMessage- testExpectMessage ,----- ** testFail- testFail ,----- ** testFailed- testFailed ,----- ** testGetDir- testGetDir ,----- ** testIncomplete- testIncomplete ,----- ** testLogTypeName- testLogTypeName ,----- ** testQueueDestroy- testQueueDestroy ,----- ** testQueueFree- testQueueFree ,----- ** testRandDouble- testRandDouble ,----- ** testRandDoubleRange- testRandDoubleRange ,----- ** testRandInt- testRandInt ,----- ** testRandIntRange- testRandIntRange ,----- ** testRun- testRun ,----- ** testRunSuite- testRunSuite ,----- ** testSetNonfatalAssertions- testSetNonfatalAssertions ,----- ** testSkip- testSkip ,----- ** testSubprocess- testSubprocess ,----- ** testTimerElapsed- testTimerElapsed ,----- ** testTimerLast- testTimerLast ,----- ** testTimerStart- testTimerStart ,----- ** testTrapAssertions- testTrapAssertions ,----- ** testTrapFork- testTrapFork ,----- ** testTrapHasPassed- testTrapHasPassed ,----- ** testTrapReachedTimeout- testTrapReachedTimeout ,----- ** testTrapSubprocess- testTrapSubprocess ,----- ** timeoutAdd- timeoutAdd ,----- ** timeoutAddSeconds- timeoutAddSeconds ,----- ** timeoutSourceNew- timeoutSourceNew ,----- ** timeoutSourceNewSeconds- timeoutSourceNewSeconds ,----- ** unicharBreakType- unicharBreakType ,----- ** unicharCombiningClass- unicharCombiningClass ,----- ** unicharCompose- unicharCompose ,----- ** unicharDecompose- unicharDecompose ,----- ** unicharDigitValue- unicharDigitValue ,----- ** unicharGetMirrorChar- unicharGetMirrorChar ,----- ** unicharGetScript- unicharGetScript ,----- ** unicharIsalnum- unicharIsalnum ,----- ** unicharIsalpha- unicharIsalpha ,----- ** unicharIscntrl- unicharIscntrl ,----- ** unicharIsdefined- unicharIsdefined ,----- ** unicharIsdigit- unicharIsdigit ,----- ** unicharIsgraph- unicharIsgraph ,----- ** unicharIslower- unicharIslower ,----- ** unicharIsmark- unicharIsmark ,----- ** unicharIsprint- unicharIsprint ,----- ** unicharIspunct- unicharIspunct ,----- ** unicharIsspace- unicharIsspace ,----- ** unicharIstitle- unicharIstitle ,----- ** unicharIsupper- unicharIsupper ,----- ** unicharIswide- unicharIswide ,----- ** unicharIswideCjk- unicharIswideCjk ,----- ** unicharIsxdigit- unicharIsxdigit ,----- ** unicharIszerowidth- unicharIszerowidth ,----- ** unicharToUtf8- unicharToUtf8 ,----- ** unicharTolower- unicharTolower ,----- ** unicharTotitle- unicharTotitle ,----- ** unicharToupper- unicharToupper ,----- ** unicharType- unicharType ,----- ** unicharValidate- unicharValidate ,----- ** unicharXdigitValue- unicharXdigitValue ,----- ** unicodeCanonicalDecomposition- unicodeCanonicalDecomposition ,----- ** unicodeCanonicalOrdering- unicodeCanonicalOrdering ,----- ** unicodeScriptFromIso15924- unicodeScriptFromIso15924 ,----- ** unicodeScriptToIso15924- unicodeScriptToIso15924 ,----- ** unixErrorQuark- unixErrorQuark ,----- ** unixFdAddFull- unixFdAddFull ,----- ** unixFdSourceNew- unixFdSourceNew ,----- ** unixOpenPipe- unixOpenPipe ,----- ** unixSetFdNonblocking- unixSetFdNonblocking ,----- ** unixSignalAdd- unixSignalAdd ,----- ** unixSignalSourceNew- unixSignalSourceNew ,----- ** unlink- unlink ,----- ** unsetenv- unsetenv ,----- ** uriEscapeString- uriEscapeString ,----- ** uriListExtractUris- uriListExtractUris ,----- ** uriParseScheme- uriParseScheme ,----- ** uriUnescapeSegment- uriUnescapeSegment ,----- ** uriUnescapeString- uriUnescapeString ,----- ** usleep- usleep ,----- ** utf8Casefold- utf8Casefold ,----- ** utf8Collate- utf8Collate ,----- ** utf8CollateKey- utf8CollateKey ,----- ** utf8CollateKeyForFilename- utf8CollateKeyForFilename ,----- ** utf8FindNextChar- utf8FindNextChar ,----- ** utf8FindPrevChar- utf8FindPrevChar ,----- ** utf8GetChar- utf8GetChar ,----- ** utf8GetCharValidated- utf8GetCharValidated ,----- ** utf8Normalize- utf8Normalize ,----- ** utf8OffsetToPointer- utf8OffsetToPointer ,----- ** utf8PointerToOffset- utf8PointerToOffset ,----- ** utf8PrevChar- utf8PrevChar ,----- ** utf8Strchr- utf8Strchr ,----- ** utf8Strdown- utf8Strdown ,----- ** utf8Strlen- utf8Strlen ,----- ** utf8Strncpy- utf8Strncpy ,----- ** utf8Strrchr- utf8Strrchr ,----- ** utf8Strreverse- utf8Strreverse ,----- ** utf8Strup- utf8Strup ,----- ** utf8Substring- utf8Substring ,----- ** utf8Validate- utf8Validate ,----- ** variantGetGtype- variantGetGtype ,----- ** warnMessage- warnMessage ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks---- function g_warn_message--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "warnexpr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_warn_message" g_warn_message :: - CString -> -- domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- func : TBasicType TUTF8- CString -> -- warnexpr : TBasicType TUTF8- IO ()---warnMessage ::- (MonadIO m) =>- T.Text -- domain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- func- -> T.Text -- warnexpr- -> m () -- result-warnMessage domain file line func warnexpr = liftIO $ do- domain' <- textToCString domain- file' <- textToCString file- func' <- textToCString func- warnexpr' <- textToCString warnexpr- g_warn_message domain' file' line func' warnexpr'- freeMem domain'- freeMem file'- freeMem func'- freeMem warnexpr'- return ()----- function g_variant_get_gtype--- Args : []--- Lengths : []--- returnType : Just (TBasicType TGType)--- throws : False--- Skip return : False--foreign import ccall "g_variant_get_gtype" g_variant_get_gtype :: - IO CGType---variantGetGtype ::- (MonadIO m) =>- m GType -- result-variantGetGtype = liftIO $ do- result <- g_variant_get_gtype- let result' = GType result- return result'----- function g_utf8_validate--- Args : [Arg {argCName = "str", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "max_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_validate" g_utf8_validate :: - Ptr Word8 -> -- str : TCArray False (-1) 1 (TBasicType TUInt8)- Int64 -> -- max_len : TBasicType TInt64- Ptr CString -> -- end : TBasicType TUTF8- IO CInt---utf8Validate ::- (MonadIO m) =>- ByteString -- str- -> m (Bool,T.Text) -- result-utf8Validate str = liftIO $ do- let maxLen = fromIntegral $ B.length str- str' <- packByteString str- end <- allocMem :: IO (Ptr CString)- result <- g_utf8_validate str' maxLen end- let result' = (/= 0) result- end' <- peek end- end'' <- cstringToText end'- freeMem str'- freeMem end- return (result', end'')----- function g_utf8_substring--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_pos", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end_pos", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_substring" g_utf8_substring :: - CString -> -- str : TBasicType TUTF8- CLong -> -- start_pos : TBasicType TLong- CLong -> -- end_pos : TBasicType TLong- IO CString---utf8Substring ::- (MonadIO m) =>- T.Text -- str- -> CLong -- startPos- -> CLong -- endPos- -> m T.Text -- result-utf8Substring str startPos endPos = liftIO $ do- str' <- textToCString str- result <- g_utf8_substring str' startPos endPos- checkUnexpectedReturnNULL "g_utf8_substring" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_strup--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_strup" g_utf8_strup :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---utf8Strup ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-utf8Strup str len = liftIO $ do- str' <- textToCString str- result <- g_utf8_strup str' len- checkUnexpectedReturnNULL "g_utf8_strup" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_strreverse--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_strreverse" g_utf8_strreverse :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---utf8Strreverse ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-utf8Strreverse str len = liftIO $ do- str' <- textToCString str- result <- g_utf8_strreverse str' len- checkUnexpectedReturnNULL "g_utf8_strreverse" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_strrchr--- Args : [Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_strrchr" g_utf8_strrchr :: - CString -> -- p : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- CInt -> -- c : TBasicType TUniChar- IO CString---utf8Strrchr ::- (MonadIO m) =>- T.Text -- p- -> Int64 -- len- -> Char -- c- -> m T.Text -- result-utf8Strrchr p len c = liftIO $ do- p' <- textToCString p- let c' = (fromIntegral . ord) c- result <- g_utf8_strrchr p' len c'- checkUnexpectedReturnNULL "g_utf8_strrchr" result- result' <- cstringToText result- freeMem result- freeMem p'- return result'----- function g_utf8_strncpy--- Args : [Arg {argCName = "dest", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_strncpy" g_utf8_strncpy :: - CString -> -- dest : TBasicType TUTF8- CString -> -- src : TBasicType TUTF8- Word64 -> -- n : TBasicType TUInt64- IO CString---utf8Strncpy ::- (MonadIO m) =>- T.Text -- dest- -> T.Text -- src- -> Word64 -- n- -> m T.Text -- result-utf8Strncpy dest src n = liftIO $ do- dest' <- textToCString dest- src' <- textToCString src- result <- g_utf8_strncpy dest' src' n- checkUnexpectedReturnNULL "g_utf8_strncpy" result- result' <- cstringToText result- freeMem result- freeMem dest'- freeMem src'- return result'----- function g_utf8_strlen--- Args : [Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TLong)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_strlen" g_utf8_strlen :: - CString -> -- p : TBasicType TUTF8- Int64 -> -- max : TBasicType TInt64- IO CLong---utf8Strlen ::- (MonadIO m) =>- T.Text -- p- -> Int64 -- max- -> m CLong -- result-utf8Strlen p max = liftIO $ do- p' <- textToCString p- result <- g_utf8_strlen p' max- freeMem p'- return result----- function g_utf8_strdown--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_strdown" g_utf8_strdown :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---utf8Strdown ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-utf8Strdown str len = liftIO $ do- str' <- textToCString str- result <- g_utf8_strdown str' len- checkUnexpectedReturnNULL "g_utf8_strdown" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_strchr--- Args : [Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_strchr" g_utf8_strchr :: - CString -> -- p : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- CInt -> -- c : TBasicType TUniChar- IO CString---utf8Strchr ::- (MonadIO m) =>- T.Text -- p- -> Int64 -- len- -> Char -- c- -> m T.Text -- result-utf8Strchr p len c = liftIO $ do- p' <- textToCString p- let c' = (fromIntegral . ord) c- result <- g_utf8_strchr p' len c'- checkUnexpectedReturnNULL "g_utf8_strchr" result- result' <- cstringToText result- freeMem result- freeMem p'- return result'----- function g_utf8_prev_char--- Args : [Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_prev_char" g_utf8_prev_char :: - CString -> -- p : TBasicType TUTF8- IO CString---utf8PrevChar ::- (MonadIO m) =>- T.Text -- p- -> m T.Text -- result-utf8PrevChar p = liftIO $ do- p' <- textToCString p- result <- g_utf8_prev_char p'- checkUnexpectedReturnNULL "g_utf8_prev_char" result- result' <- cstringToText result- freeMem result- freeMem p'- return result'----- function g_utf8_pointer_to_offset--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TLong)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_pointer_to_offset" g_utf8_pointer_to_offset :: - CString -> -- str : TBasicType TUTF8- CString -> -- pos : TBasicType TUTF8- IO CLong---utf8PointerToOffset ::- (MonadIO m) =>- T.Text -- str- -> T.Text -- pos- -> m CLong -- result-utf8PointerToOffset str pos = liftIO $ do- str' <- textToCString str- pos' <- textToCString pos- result <- g_utf8_pointer_to_offset str' pos'- freeMem str'- freeMem pos'- return result----- function g_utf8_offset_to_pointer--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "offset", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_offset_to_pointer" g_utf8_offset_to_pointer :: - CString -> -- str : TBasicType TUTF8- CLong -> -- offset : TBasicType TLong- IO CString---utf8OffsetToPointer ::- (MonadIO m) =>- T.Text -- str- -> CLong -- offset- -> m T.Text -- result-utf8OffsetToPointer str offset = liftIO $ do- str' <- textToCString str- result <- g_utf8_offset_to_pointer str' offset- checkUnexpectedReturnNULL "g_utf8_offset_to_pointer" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_normalize--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TInterface "GLib" "NormalizeMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_normalize" g_utf8_normalize :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- CUInt -> -- mode : TInterface "GLib" "NormalizeMode"- IO CString---utf8Normalize ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> NormalizeMode -- mode- -> m T.Text -- result-utf8Normalize str len mode = liftIO $ do- str' <- textToCString str- let mode' = (fromIntegral . fromEnum) mode- result <- g_utf8_normalize str' len mode'- checkUnexpectedReturnNULL "g_utf8_normalize" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_get_char_validated--- Args : [Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUniChar)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_get_char_validated" g_utf8_get_char_validated :: - CString -> -- p : TBasicType TUTF8- Int64 -> -- max_len : TBasicType TInt64- IO CInt---utf8GetCharValidated ::- (MonadIO m) =>- T.Text -- p- -> Int64 -- maxLen- -> m Char -- result-utf8GetCharValidated p maxLen = liftIO $ do- p' <- textToCString p- result <- g_utf8_get_char_validated p' maxLen- let result' = (chr . fromIntegral) result- freeMem p'- return result'----- function g_utf8_get_char--- Args : [Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUniChar)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_get_char" g_utf8_get_char :: - CString -> -- p : TBasicType TUTF8- IO CInt---utf8GetChar ::- (MonadIO m) =>- T.Text -- p- -> m Char -- result-utf8GetChar p = liftIO $ do- p' <- textToCString p- result <- g_utf8_get_char p'- let result' = (chr . fromIntegral) result- freeMem p'- return result'----- function g_utf8_find_prev_char--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_find_prev_char" g_utf8_find_prev_char :: - CString -> -- str : TBasicType TUTF8- CString -> -- p : TBasicType TUTF8- IO CString---utf8FindPrevChar ::- (MonadIO m) =>- T.Text -- str- -> T.Text -- p- -> m T.Text -- result-utf8FindPrevChar str p = liftIO $ do- str' <- textToCString str- p' <- textToCString p- result <- g_utf8_find_prev_char str' p'- checkUnexpectedReturnNULL "g_utf8_find_prev_char" result- result' <- cstringToText result- freeMem result- freeMem str'- freeMem p'- return result'----- function g_utf8_find_next_char--- Args : [Arg {argCName = "p", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_find_next_char" g_utf8_find_next_char :: - CString -> -- p : TBasicType TUTF8- CString -> -- end : TBasicType TUTF8- IO CString---utf8FindNextChar ::- (MonadIO m) =>- T.Text -- p- -> T.Text -- end- -> m T.Text -- result-utf8FindNextChar p end = liftIO $ do- p' <- textToCString p- end' <- textToCString end- result <- g_utf8_find_next_char p' end'- checkUnexpectedReturnNULL "g_utf8_find_next_char" result- result' <- cstringToText result- freeMem result- freeMem p'- freeMem end'- return result'----- function g_utf8_collate_key_for_filename--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_collate_key_for_filename" g_utf8_collate_key_for_filename :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---utf8CollateKeyForFilename ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-utf8CollateKeyForFilename str len = liftIO $ do- str' <- textToCString str- result <- g_utf8_collate_key_for_filename str' len- checkUnexpectedReturnNULL "g_utf8_collate_key_for_filename" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_collate_key--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_collate_key" g_utf8_collate_key :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---utf8CollateKey ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-utf8CollateKey str len = liftIO $ do- str' <- textToCString str- result <- g_utf8_collate_key str' len- checkUnexpectedReturnNULL "g_utf8_collate_key" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_utf8_collate--- Args : [Arg {argCName = "str1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_collate" g_utf8_collate :: - CString -> -- str1 : TBasicType TUTF8- CString -> -- str2 : TBasicType TUTF8- IO Int32---utf8Collate ::- (MonadIO m) =>- T.Text -- str1- -> T.Text -- str2- -> m Int32 -- result-utf8Collate str1 str2 = liftIO $ do- str1' <- textToCString str1- str2' <- textToCString str2- result <- g_utf8_collate str1' str2'- freeMem str1'- freeMem str2'- return result----- function g_utf8_casefold--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_utf8_casefold" g_utf8_casefold :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---utf8Casefold ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-utf8Casefold str len = liftIO $ do- str' <- textToCString str- result <- g_utf8_casefold str' len- checkUnexpectedReturnNULL "g_utf8_casefold" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_usleep--- Args : [Arg {argCName = "microseconds", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_usleep" g_usleep :: - CULong -> -- microseconds : TBasicType TULong- IO ()---usleep ::- (MonadIO m) =>- CULong -- microseconds- -> m () -- result-usleep microseconds = liftIO $ do- g_usleep microseconds- return ()----- function g_uri_unescape_string--- Args : [Arg {argCName = "escaped_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "illegal_characters", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_uri_unescape_string" g_uri_unescape_string :: - CString -> -- escaped_string : TBasicType TUTF8- CString -> -- illegal_characters : TBasicType TUTF8- IO CString---uriUnescapeString ::- (MonadIO m) =>- T.Text -- escapedString- -> Maybe (T.Text) -- illegalCharacters- -> m T.Text -- result-uriUnescapeString escapedString illegalCharacters = liftIO $ do- escapedString' <- textToCString escapedString- maybeIllegalCharacters <- case illegalCharacters of- Nothing -> return nullPtr- Just jIllegalCharacters -> do- jIllegalCharacters' <- textToCString jIllegalCharacters- return jIllegalCharacters'- result <- g_uri_unescape_string escapedString' maybeIllegalCharacters- checkUnexpectedReturnNULL "g_uri_unescape_string" result- result' <- cstringToText result- freeMem result- freeMem escapedString'- freeMem maybeIllegalCharacters- return result'----- function g_uri_unescape_segment--- Args : [Arg {argCName = "escaped_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "escaped_string_end", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "illegal_characters", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_uri_unescape_segment" g_uri_unescape_segment :: - CString -> -- escaped_string : TBasicType TUTF8- CString -> -- escaped_string_end : TBasicType TUTF8- CString -> -- illegal_characters : TBasicType TUTF8- IO CString---uriUnescapeSegment ::- (MonadIO m) =>- Maybe (T.Text) -- escapedString- -> Maybe (T.Text) -- escapedStringEnd- -> Maybe (T.Text) -- illegalCharacters- -> m T.Text -- result-uriUnescapeSegment escapedString escapedStringEnd illegalCharacters = liftIO $ do- maybeEscapedString <- case escapedString of- Nothing -> return nullPtr- Just jEscapedString -> do- jEscapedString' <- textToCString jEscapedString- return jEscapedString'- maybeEscapedStringEnd <- case escapedStringEnd of- Nothing -> return nullPtr- Just jEscapedStringEnd -> do- jEscapedStringEnd' <- textToCString jEscapedStringEnd- return jEscapedStringEnd'- maybeIllegalCharacters <- case illegalCharacters of- Nothing -> return nullPtr- Just jIllegalCharacters -> do- jIllegalCharacters' <- textToCString jIllegalCharacters- return jIllegalCharacters'- result <- g_uri_unescape_segment maybeEscapedString maybeEscapedStringEnd maybeIllegalCharacters- checkUnexpectedReturnNULL "g_uri_unescape_segment" result- result' <- cstringToText result- freeMem result- freeMem maybeEscapedString- freeMem maybeEscapedStringEnd- freeMem maybeIllegalCharacters- return result'----- function g_uri_parse_scheme--- Args : [Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_uri_parse_scheme" g_uri_parse_scheme :: - CString -> -- uri : TBasicType TUTF8- IO CString---uriParseScheme ::- (MonadIO m) =>- T.Text -- uri- -> m T.Text -- result-uriParseScheme uri = liftIO $ do- uri' <- textToCString uri- result <- g_uri_parse_scheme uri'- checkUnexpectedReturnNULL "g_uri_parse_scheme" result- result' <- cstringToText result- freeMem result- freeMem uri'- return result'----- function g_uri_list_extract_uris--- Args : [Arg {argCName = "uri_list", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_uri_list_extract_uris" g_uri_list_extract_uris :: - CString -> -- uri_list : TBasicType TUTF8- IO (Ptr CString)---uriListExtractUris ::- (MonadIO m) =>- T.Text -- uriList- -> m [T.Text] -- result-uriListExtractUris uriList = liftIO $ do- uriList' <- textToCString uriList- result <- g_uri_list_extract_uris uriList'- checkUnexpectedReturnNULL "g_uri_list_extract_uris" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- freeMem uriList'- return result'----- function g_uri_escape_string--- Args : [Arg {argCName = "unescaped", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "reserved_chars_allowed", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "allow_utf8", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_uri_escape_string" g_uri_escape_string :: - CString -> -- unescaped : TBasicType TUTF8- CString -> -- reserved_chars_allowed : TBasicType TUTF8- CInt -> -- allow_utf8 : TBasicType TBoolean- IO CString---uriEscapeString ::- (MonadIO m) =>- T.Text -- unescaped- -> Maybe (T.Text) -- reservedCharsAllowed- -> Bool -- allowUtf8- -> m T.Text -- result-uriEscapeString unescaped reservedCharsAllowed allowUtf8 = liftIO $ do- unescaped' <- textToCString unescaped- maybeReservedCharsAllowed <- case reservedCharsAllowed of- Nothing -> return nullPtr- Just jReservedCharsAllowed -> do- jReservedCharsAllowed' <- textToCString jReservedCharsAllowed- return jReservedCharsAllowed'- let allowUtf8' = (fromIntegral . fromEnum) allowUtf8- result <- g_uri_escape_string unescaped' maybeReservedCharsAllowed allowUtf8'- checkUnexpectedReturnNULL "g_uri_escape_string" result- result' <- cstringToText result- freeMem result- freeMem unescaped'- freeMem maybeReservedCharsAllowed- return result'----- function g_unsetenv--- Args : [Arg {argCName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_unsetenv" g_unsetenv :: - CString -> -- variable : TBasicType TUTF8- IO ()---unsetenv ::- (MonadIO m) =>- T.Text -- variable- -> m () -- result-unsetenv variable = liftIO $ do- variable' <- textToCString variable- g_unsetenv variable'- freeMem variable'- return ()----- function g_unlink--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_unlink" g_unlink :: - CString -> -- filename : TBasicType TUTF8- IO Int32---unlink ::- (MonadIO m) =>- T.Text -- filename- -> m Int32 -- result-unlink filename = liftIO $ do- filename' <- textToCString filename- result <- g_unlink filename'- freeMem filename'- return result----- function g_unix_signal_source_new--- Args : [Arg {argCName = "signum", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_unix_signal_source_new" g_unix_signal_source_new :: - Int32 -> -- signum : TBasicType TInt- IO (Ptr Source)---unixSignalSourceNew ::- (MonadIO m) =>- Int32 -- signum- -> m Source -- result-unixSignalSourceNew signum = liftIO $ do- result <- g_unix_signal_source_new signum- checkUnexpectedReturnNULL "g_unix_signal_source_new" result- result' <- (wrapBoxed Source) result- return result'----- function g_unix_signal_add_full--- Args : [Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "signum", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "handler", argType = TInterface "GLib" "SourceFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_unix_signal_add_full" g_unix_signal_add_full :: - Int32 -> -- priority : TBasicType TInt- Int32 -> -- signum : TBasicType TInt- FunPtr SourceFuncC -> -- handler : TInterface "GLib" "SourceFunc"- Ptr () -> -- user_data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO Word32---unixSignalAdd ::- (MonadIO m) =>- Int32 -- priority- -> Int32 -- signum- -> SourceFunc -- handler- -> m Word32 -- result-unixSignalAdd priority signum handler = liftIO $ do- handler' <- mkSourceFunc (sourceFuncWrapper Nothing handler)- let userData = castFunPtrToPtr handler'- let notify = safeFreeFunPtrPtr- result <- g_unix_signal_add_full priority signum handler' userData notify- return result----- function g_unix_set_fd_nonblocking--- Args : [Arg {argCName = "fd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nonblock", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_unix_set_fd_nonblocking" g_unix_set_fd_nonblocking :: - Int32 -> -- fd : TBasicType TInt- CInt -> -- nonblock : TBasicType TBoolean- Ptr (Ptr GError) -> -- error- IO CInt---unixSetFdNonblocking ::- (MonadIO m) =>- Int32 -- fd- -> Bool -- nonblock- -> m () -- result-unixSetFdNonblocking fd nonblock = liftIO $ do- let nonblock' = (fromIntegral . fromEnum) nonblock- onException (do- _ <- propagateGError $ g_unix_set_fd_nonblocking fd nonblock'- return ()- ) (do- return ()- )----- function g_unix_open_pipe--- Args : [Arg {argCName = "fds", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_unix_open_pipe" g_unix_open_pipe :: - Int32 -> -- fds : TBasicType TInt- Int32 -> -- flags : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---unixOpenPipe ::- (MonadIO m) =>- Int32 -- fds- -> Int32 -- flags- -> m () -- result-unixOpenPipe fds flags = liftIO $ do- onException (do- _ <- propagateGError $ g_unix_open_pipe fds flags- return ()- ) (do- return ()- )----- function g_unix_fd_source_new--- Args : [Arg {argCName = "fd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "condition", argType = TInterface "GLib" "IOCondition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_unix_fd_source_new" g_unix_fd_source_new :: - Int32 -> -- fd : TBasicType TInt- CUInt -> -- condition : TInterface "GLib" "IOCondition"- IO (Ptr Source)---unixFdSourceNew ::- (MonadIO m) =>- Int32 -- fd- -> [IOCondition] -- condition- -> m Source -- result-unixFdSourceNew fd condition = liftIO $ do- let condition' = gflagsToWord condition- result <- g_unix_fd_source_new fd condition'- checkUnexpectedReturnNULL "g_unix_fd_source_new" result- result' <- (wrapBoxed Source) result- return result'----- function g_unix_fd_add_full--- Args : [Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "condition", argType = TInterface "GLib" "IOCondition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "function", argType = TInterface "GLib" "UnixFDSourceFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 4, argDestroy = 5, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_unix_fd_add_full" g_unix_fd_add_full :: - Int32 -> -- priority : TBasicType TInt- Int32 -> -- fd : TBasicType TInt- CUInt -> -- condition : TInterface "GLib" "IOCondition"- FunPtr UnixFDSourceFuncC -> -- function : TInterface "GLib" "UnixFDSourceFunc"- Ptr () -> -- user_data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO Word32---unixFdAddFull ::- (MonadIO m) =>- Int32 -- priority- -> Int32 -- fd- -> [IOCondition] -- condition- -> UnixFDSourceFunc -- function- -> m Word32 -- result-unixFdAddFull priority fd condition function = liftIO $ do- let condition' = gflagsToWord condition- function' <- mkUnixFDSourceFunc (unixFDSourceFuncWrapper Nothing function)- let userData = castFunPtrToPtr function'- let notify = safeFreeFunPtrPtr- result <- g_unix_fd_add_full priority fd condition' function' userData notify- return result----- function g_unix_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_unix_error_quark" g_unix_error_quark :: - IO Word32---unixErrorQuark ::- (MonadIO m) =>- m Word32 -- result-unixErrorQuark = liftIO $ do- result <- g_unix_error_quark- return result----- function g_unicode_script_to_iso15924--- Args : [Arg {argCName = "script", argType = TInterface "GLib" "UnicodeScript", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_unicode_script_to_iso15924" g_unicode_script_to_iso15924 :: - CUInt -> -- script : TInterface "GLib" "UnicodeScript"- IO Word32---unicodeScriptToIso15924 ::- (MonadIO m) =>- UnicodeScript -- script- -> m Word32 -- result-unicodeScriptToIso15924 script = liftIO $ do- let script' = (fromIntegral . fromEnum) script- result <- g_unicode_script_to_iso15924 script'- return result----- function g_unicode_script_from_iso15924--- Args : [Arg {argCName = "iso15924", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "UnicodeScript")--- throws : False--- Skip return : False--foreign import ccall "g_unicode_script_from_iso15924" g_unicode_script_from_iso15924 :: - Word32 -> -- iso15924 : TBasicType TUInt32- IO CUInt---unicodeScriptFromIso15924 ::- (MonadIO m) =>- Word32 -- iso15924- -> m UnicodeScript -- result-unicodeScriptFromIso15924 iso15924 = liftIO $ do- result <- g_unicode_script_from_iso15924 iso15924- let result' = (toEnum . fromIntegral) result- return result'----- function g_unicode_canonical_ordering--- Args : [Arg {argCName = "string", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_unicode_canonical_ordering" g_unicode_canonical_ordering :: - CInt -> -- string : TBasicType TUniChar- Word64 -> -- len : TBasicType TUInt64- IO ()---unicodeCanonicalOrdering ::- (MonadIO m) =>- Char -- string- -> Word64 -- len- -> m () -- result-unicodeCanonicalOrdering string len = liftIO $ do- let string' = (fromIntegral . ord) string- g_unicode_canonical_ordering string' len- return ()----- function g_unicode_canonical_decomposition--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUniChar)--- throws : False--- Skip return : False--foreign import ccall "g_unicode_canonical_decomposition" g_unicode_canonical_decomposition :: - CInt -> -- ch : TBasicType TUniChar- Word64 -> -- result_len : TBasicType TUInt64- IO CInt--{-# DEPRECATED unicodeCanonicalDecomposition ["(Since version 2.30)","Use the more flexible g_unichar_fully_decompose()"," instead."]#-}-unicodeCanonicalDecomposition ::- (MonadIO m) =>- Char -- ch- -> Word64 -- resultLen- -> m Char -- result-unicodeCanonicalDecomposition ch resultLen = liftIO $ do- let ch' = (fromIntegral . ord) ch- result <- g_unicode_canonical_decomposition ch' resultLen- let result' = (chr . fromIntegral) result- return result'----- function g_unichar_xdigit_value--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_xdigit_value" g_unichar_xdigit_value :: - CInt -> -- c : TBasicType TUniChar- IO Int32---unicharXdigitValue ::- (MonadIO m) =>- Char -- c- -> m Int32 -- result-unicharXdigitValue c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_xdigit_value c'- return result----- function g_unichar_validate--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_validate" g_unichar_validate :: - CInt -> -- ch : TBasicType TUniChar- IO CInt---unicharValidate ::- (MonadIO m) =>- Char -- ch- -> m Bool -- result-unicharValidate ch = liftIO $ do- let ch' = (fromIntegral . ord) ch- result <- g_unichar_validate ch'- let result' = (/= 0) result- return result'----- function g_unichar_type--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "UnicodeType")--- throws : False--- Skip return : False--foreign import ccall "g_unichar_type" g_unichar_type :: - CInt -> -- c : TBasicType TUniChar- IO CUInt---unicharType ::- (MonadIO m) =>- Char -- c- -> m UnicodeType -- result-unicharType c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_type c'- let result' = (toEnum . fromIntegral) result- return result'----- function g_unichar_toupper--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUniChar)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_toupper" g_unichar_toupper :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharToupper ::- (MonadIO m) =>- Char -- c- -> m Char -- result-unicharToupper c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_toupper c'- let result' = (chr . fromIntegral) result- return result'----- function g_unichar_totitle--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUniChar)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_totitle" g_unichar_totitle :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharTotitle ::- (MonadIO m) =>- Char -- c- -> m Char -- result-unicharTotitle c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_totitle c'- let result' = (chr . fromIntegral) result- return result'----- function g_unichar_tolower--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUniChar)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_tolower" g_unichar_tolower :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharTolower ::- (MonadIO m) =>- Char -- c- -> m Char -- result-unicharTolower c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_tolower c'- let result' = (chr . fromIntegral) result- return result'----- function g_unichar_to_utf8--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "outbuf", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_to_utf8" g_unichar_to_utf8 :: - CInt -> -- c : TBasicType TUniChar- CString -> -- outbuf : TBasicType TUTF8- IO Int32---unicharToUtf8 ::- (MonadIO m) =>- Char -- c- -> T.Text -- outbuf- -> m Int32 -- result-unicharToUtf8 c outbuf = liftIO $ do- let c' = (fromIntegral . ord) c- outbuf' <- textToCString outbuf- result <- g_unichar_to_utf8 c' outbuf'- freeMem outbuf'- return result----- function g_unichar_iszerowidth--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_iszerowidth" g_unichar_iszerowidth :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIszerowidth ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIszerowidth c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_iszerowidth c'- let result' = (/= 0) result- return result'----- function g_unichar_isxdigit--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isxdigit" g_unichar_isxdigit :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsxdigit ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsxdigit c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isxdigit c'- let result' = (/= 0) result- return result'----- function g_unichar_iswide_cjk--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_iswide_cjk" g_unichar_iswide_cjk :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIswideCjk ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIswideCjk c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_iswide_cjk c'- let result' = (/= 0) result- return result'----- function g_unichar_iswide--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_iswide" g_unichar_iswide :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIswide ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIswide c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_iswide c'- let result' = (/= 0) result- return result'----- function g_unichar_isupper--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isupper" g_unichar_isupper :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsupper ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsupper c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isupper c'- let result' = (/= 0) result- return result'----- function g_unichar_istitle--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_istitle" g_unichar_istitle :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIstitle ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIstitle c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_istitle c'- let result' = (/= 0) result- return result'----- function g_unichar_isspace--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isspace" g_unichar_isspace :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsspace ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsspace c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isspace c'- let result' = (/= 0) result- return result'----- function g_unichar_ispunct--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_ispunct" g_unichar_ispunct :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIspunct ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIspunct c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_ispunct c'- let result' = (/= 0) result- return result'----- function g_unichar_isprint--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isprint" g_unichar_isprint :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsprint ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsprint c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isprint c'- let result' = (/= 0) result- return result'----- function g_unichar_ismark--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_ismark" g_unichar_ismark :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsmark ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsmark c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_ismark c'- let result' = (/= 0) result- return result'----- function g_unichar_islower--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_islower" g_unichar_islower :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIslower ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIslower c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_islower c'- let result' = (/= 0) result- return result'----- function g_unichar_isgraph--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isgraph" g_unichar_isgraph :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsgraph ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsgraph c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isgraph c'- let result' = (/= 0) result- return result'----- function g_unichar_isdigit--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isdigit" g_unichar_isdigit :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsdigit ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsdigit c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isdigit c'- let result' = (/= 0) result- return result'----- function g_unichar_isdefined--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isdefined" g_unichar_isdefined :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsdefined ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsdefined c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isdefined c'- let result' = (/= 0) result- return result'----- function g_unichar_iscntrl--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_iscntrl" g_unichar_iscntrl :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIscntrl ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIscntrl c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_iscntrl c'- let result' = (/= 0) result- return result'----- function g_unichar_isalpha--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isalpha" g_unichar_isalpha :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsalpha ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsalpha c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isalpha c'- let result' = (/= 0) result- return result'----- function g_unichar_isalnum--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_isalnum" g_unichar_isalnum :: - CInt -> -- c : TBasicType TUniChar- IO CInt---unicharIsalnum ::- (MonadIO m) =>- Char -- c- -> m Bool -- result-unicharIsalnum c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_isalnum c'- let result' = (/= 0) result- return result'----- function g_unichar_get_script--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "UnicodeScript")--- throws : False--- Skip return : False--foreign import ccall "g_unichar_get_script" g_unichar_get_script :: - CInt -> -- ch : TBasicType TUniChar- IO CUInt---unicharGetScript ::- (MonadIO m) =>- Char -- ch- -> m UnicodeScript -- result-unicharGetScript ch = liftIO $ do- let ch' = (fromIntegral . ord) ch- result <- g_unichar_get_script ch'- let result' = (toEnum . fromIntegral) result- return result'----- function g_unichar_get_mirror_char--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mirrored_ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_get_mirror_char" g_unichar_get_mirror_char :: - CInt -> -- ch : TBasicType TUniChar- CInt -> -- mirrored_ch : TBasicType TUniChar- IO CInt---unicharGetMirrorChar ::- (MonadIO m) =>- Char -- ch- -> Char -- mirroredCh- -> m Bool -- result-unicharGetMirrorChar ch mirroredCh = liftIO $ do- let ch' = (fromIntegral . ord) ch- let mirroredCh' = (fromIntegral . ord) mirroredCh- result <- g_unichar_get_mirror_char ch' mirroredCh'- let result' = (/= 0) result- return result'----- function g_unichar_digit_value--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_digit_value" g_unichar_digit_value :: - CInt -> -- c : TBasicType TUniChar- IO Int32---unicharDigitValue ::- (MonadIO m) =>- Char -- c- -> m Int32 -- result-unicharDigitValue c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_digit_value c'- return result----- function g_unichar_decompose--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "a", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "b", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_decompose" g_unichar_decompose :: - CInt -> -- ch : TBasicType TUniChar- CInt -> -- a : TBasicType TUniChar- CInt -> -- b : TBasicType TUniChar- IO CInt---unicharDecompose ::- (MonadIO m) =>- Char -- ch- -> Char -- a- -> Char -- b- -> m Bool -- result-unicharDecompose ch a b = liftIO $ do- let ch' = (fromIntegral . ord) ch- let a' = (fromIntegral . ord) a- let b' = (fromIntegral . ord) b- result <- g_unichar_decompose ch' a' b'- let result' = (/= 0) result- return result'----- function g_unichar_compose--- Args : [Arg {argCName = "a", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "b", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_compose" g_unichar_compose :: - CInt -> -- a : TBasicType TUniChar- CInt -> -- b : TBasicType TUniChar- CInt -> -- ch : TBasicType TUniChar- IO CInt---unicharCompose ::- (MonadIO m) =>- Char -- a- -> Char -- b- -> Char -- ch- -> m Bool -- result-unicharCompose a b ch = liftIO $ do- let a' = (fromIntegral . ord) a- let b' = (fromIntegral . ord) b- let ch' = (fromIntegral . ord) ch- result <- g_unichar_compose a' b' ch'- let result' = (/= 0) result- return result'----- function g_unichar_combining_class--- Args : [Arg {argCName = "uc", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_unichar_combining_class" g_unichar_combining_class :: - CInt -> -- uc : TBasicType TUniChar- IO Int32---unicharCombiningClass ::- (MonadIO m) =>- Char -- uc- -> m Int32 -- result-unicharCombiningClass uc = liftIO $ do- let uc' = (fromIntegral . ord) uc- result <- g_unichar_combining_class uc'- return result----- function g_unichar_break_type--- Args : [Arg {argCName = "c", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "UnicodeBreakType")--- throws : False--- Skip return : False--foreign import ccall "g_unichar_break_type" g_unichar_break_type :: - CInt -> -- c : TBasicType TUniChar- IO CUInt---unicharBreakType ::- (MonadIO m) =>- Char -- c- -> m UnicodeBreakType -- result-unicharBreakType c = liftIO $ do- let c' = (fromIntegral . ord) c- result <- g_unichar_break_type c'- let result' = (toEnum . fromIntegral) result- return result'----- function g_timeout_source_new_seconds--- Args : [Arg {argCName = "interval", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_timeout_source_new_seconds" g_timeout_source_new_seconds :: - Word32 -> -- interval : TBasicType TUInt- IO (Ptr Source)---timeoutSourceNewSeconds ::- (MonadIO m) =>- Word32 -- interval- -> m Source -- result-timeoutSourceNewSeconds interval = liftIO $ do- result <- g_timeout_source_new_seconds interval- checkUnexpectedReturnNULL "g_timeout_source_new_seconds" result- result' <- (wrapBoxed Source) result- return result'----- function g_timeout_source_new--- Args : [Arg {argCName = "interval", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_timeout_source_new" g_timeout_source_new :: - Word32 -> -- interval : TBasicType TUInt- IO (Ptr Source)---timeoutSourceNew ::- (MonadIO m) =>- Word32 -- interval- -> m Source -- result-timeoutSourceNew interval = liftIO $ do- result <- g_timeout_source_new interval- checkUnexpectedReturnNULL "g_timeout_source_new" result- result' <- (wrapBoxed Source) result- return result'----- function g_timeout_add_seconds_full--- Args : [Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interval", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "function", argType = TInterface "GLib" "SourceFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_timeout_add_seconds_full" g_timeout_add_seconds_full :: - Int32 -> -- priority : TBasicType TInt- Word32 -> -- interval : TBasicType TUInt- FunPtr SourceFuncC -> -- function : TInterface "GLib" "SourceFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO Word32---timeoutAddSeconds ::- (MonadIO m) =>- Int32 -- priority- -> Word32 -- interval- -> SourceFunc -- function- -> m Word32 -- result-timeoutAddSeconds priority interval function = liftIO $ do- function' <- mkSourceFunc (sourceFuncWrapper Nothing function)- let data_ = castFunPtrToPtr function'- let notify = safeFreeFunPtrPtr- result <- g_timeout_add_seconds_full priority interval function' data_ notify- return result----- function g_timeout_add_full--- Args : [Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interval", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "function", argType = TInterface "GLib" "SourceFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_timeout_add_full" g_timeout_add_full :: - Int32 -> -- priority : TBasicType TInt- Word32 -> -- interval : TBasicType TUInt- FunPtr SourceFuncC -> -- function : TInterface "GLib" "SourceFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO Word32---timeoutAdd ::- (MonadIO m) =>- Int32 -- priority- -> Word32 -- interval- -> SourceFunc -- function- -> m Word32 -- result-timeoutAdd priority interval function = liftIO $ do- function' <- mkSourceFunc (sourceFuncWrapper Nothing function)- let data_ = castFunPtrToPtr function'- let notify = safeFreeFunPtrPtr- result <- g_timeout_add_full priority interval function' data_ notify- return result----- function g_test_trap_subprocess--- Args : [Arg {argCName = "test_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "usec_timeout", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "test_flags", argType = TInterface "GLib" "TestSubprocessFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_trap_subprocess" g_test_trap_subprocess :: - CString -> -- test_path : TBasicType TUTF8- Word64 -> -- usec_timeout : TBasicType TUInt64- CUInt -> -- test_flags : TInterface "GLib" "TestSubprocessFlags"- IO ()---testTrapSubprocess ::- (MonadIO m) =>- Maybe (T.Text) -- testPath- -> Word64 -- usecTimeout- -> [TestSubprocessFlags] -- testFlags- -> m () -- result-testTrapSubprocess testPath usecTimeout testFlags = liftIO $ do- maybeTestPath <- case testPath of- Nothing -> return nullPtr- Just jTestPath -> do- jTestPath' <- textToCString jTestPath- return jTestPath'- let testFlags' = gflagsToWord testFlags- g_test_trap_subprocess maybeTestPath usecTimeout testFlags'- freeMem maybeTestPath- return ()----- function g_test_trap_reached_timeout--- Args : []--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_test_trap_reached_timeout" g_test_trap_reached_timeout :: - IO CInt---testTrapReachedTimeout ::- (MonadIO m) =>- m Bool -- result-testTrapReachedTimeout = liftIO $ do- result <- g_test_trap_reached_timeout- let result' = (/= 0) result- return result'----- function g_test_trap_has_passed--- Args : []--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_test_trap_has_passed" g_test_trap_has_passed :: - IO CInt---testTrapHasPassed ::- (MonadIO m) =>- m Bool -- result-testTrapHasPassed = liftIO $ do- result <- g_test_trap_has_passed- let result' = (/= 0) result- return result'----- function g_test_trap_fork--- Args : [Arg {argCName = "usec_timeout", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "test_trap_flags", argType = TInterface "GLib" "TestTrapFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_test_trap_fork" g_test_trap_fork :: - Word64 -> -- usec_timeout : TBasicType TUInt64- CUInt -> -- test_trap_flags : TInterface "GLib" "TestTrapFlags"- IO CInt--{-# DEPRECATED testTrapFork ["This function is implemented only on Unix platforms,","and is not always reliable due to problems inherent in","fork-without-exec. Use g_test_trap_subprocess() instead."]#-}-testTrapFork ::- (MonadIO m) =>- Word64 -- usecTimeout- -> [TestTrapFlags] -- testTrapFlags- -> m Bool -- result-testTrapFork usecTimeout testTrapFlags = liftIO $ do- let testTrapFlags' = gflagsToWord testTrapFlags- result <- g_test_trap_fork usecTimeout testTrapFlags'- let result' = (/= 0) result- return result'----- function g_test_trap_assertions--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "assertion_flags", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_trap_assertions" g_test_trap_assertions :: - CString -> -- domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- func : TBasicType TUTF8- Word64 -> -- assertion_flags : TBasicType TUInt64- CString -> -- pattern : TBasicType TUTF8- IO ()---testTrapAssertions ::- (MonadIO m) =>- T.Text -- domain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- func- -> Word64 -- assertionFlags- -> T.Text -- pattern- -> m () -- result-testTrapAssertions domain file line func assertionFlags pattern = liftIO $ do- domain' <- textToCString domain- file' <- textToCString file- func' <- textToCString func- pattern' <- textToCString pattern- g_test_trap_assertions domain' file' line func' assertionFlags pattern'- freeMem domain'- freeMem file'- freeMem func'- freeMem pattern'- return ()----- function g_test_timer_start--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_timer_start" g_test_timer_start :: - IO ()---testTimerStart ::- (MonadIO m) =>- m () -- result-testTimerStart = liftIO $ do- g_test_timer_start- return ()----- function g_test_timer_last--- Args : []--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_test_timer_last" g_test_timer_last :: - IO CDouble---testTimerLast ::- (MonadIO m) =>- m Double -- result-testTimerLast = liftIO $ do- result <- g_test_timer_last- let result' = realToFrac result- return result'----- function g_test_timer_elapsed--- Args : []--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_test_timer_elapsed" g_test_timer_elapsed :: - IO CDouble---testTimerElapsed ::- (MonadIO m) =>- m Double -- result-testTimerElapsed = liftIO $ do- result <- g_test_timer_elapsed- let result' = realToFrac result- return result'----- function g_test_subprocess--- Args : []--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_test_subprocess" g_test_subprocess :: - IO CInt---testSubprocess ::- (MonadIO m) =>- m Bool -- result-testSubprocess = liftIO $ do- result <- g_test_subprocess- let result' = (/= 0) result- return result'----- function g_test_skip--- Args : [Arg {argCName = "msg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_skip" g_test_skip :: - CString -> -- msg : TBasicType TUTF8- IO ()---testSkip ::- (MonadIO m) =>- Maybe (T.Text) -- msg- -> m () -- result-testSkip msg = liftIO $ do- maybeMsg <- case msg of- Nothing -> return nullPtr- Just jMsg -> do- jMsg' <- textToCString jMsg- return jMsg'- g_test_skip maybeMsg- freeMem maybeMsg- return ()----- function g_test_set_nonfatal_assertions--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_set_nonfatal_assertions" g_test_set_nonfatal_assertions :: - IO ()---testSetNonfatalAssertions ::- (MonadIO m) =>- m () -- result-testSetNonfatalAssertions = liftIO $ do- g_test_set_nonfatal_assertions- return ()----- function g_test_run_suite--- Args : [Arg {argCName = "suite", argType = TInterface "GLib" "TestSuite", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_test_run_suite" g_test_run_suite :: - Ptr TestSuite -> -- suite : TInterface "GLib" "TestSuite"- IO Int32---testRunSuite ::- (MonadIO m) =>- TestSuite -- suite- -> m Int32 -- result-testRunSuite suite = liftIO $ do- let suite' = unsafeManagedPtrGetPtr suite- result <- g_test_run_suite suite'- touchManagedPtr suite- return result----- function g_test_run--- Args : []--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_test_run" g_test_run :: - IO Int32---testRun ::- (MonadIO m) =>- m Int32 -- result-testRun = liftIO $ do- result <- g_test_run- return result----- function g_test_rand_int_range--- Args : [Arg {argCName = "begin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt32)--- throws : False--- Skip return : False--foreign import ccall "g_test_rand_int_range" g_test_rand_int_range :: - Int32 -> -- begin : TBasicType TInt32- Int32 -> -- end : TBasicType TInt32- IO Int32---testRandIntRange ::- (MonadIO m) =>- Int32 -- begin- -> Int32 -- end- -> m Int32 -- result-testRandIntRange begin end = liftIO $ do- result <- g_test_rand_int_range begin end- return result----- function g_test_rand_int--- Args : []--- Lengths : []--- returnType : Just (TBasicType TInt32)--- throws : False--- Skip return : False--foreign import ccall "g_test_rand_int" g_test_rand_int :: - IO Int32---testRandInt ::- (MonadIO m) =>- m Int32 -- result-testRandInt = liftIO $ do- result <- g_test_rand_int- return result----- function g_test_rand_double_range--- Args : [Arg {argCName = "range_start", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "range_end", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_test_rand_double_range" g_test_rand_double_range :: - CDouble -> -- range_start : TBasicType TDouble- CDouble -> -- range_end : TBasicType TDouble- IO CDouble---testRandDoubleRange ::- (MonadIO m) =>- Double -- rangeStart- -> Double -- rangeEnd- -> m Double -- result-testRandDoubleRange rangeStart rangeEnd = liftIO $ do- let rangeStart' = realToFrac rangeStart- let rangeEnd' = realToFrac rangeEnd- result <- g_test_rand_double_range rangeStart' rangeEnd'- let result' = realToFrac result- return result'----- function g_test_rand_double--- Args : []--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_test_rand_double" g_test_rand_double :: - IO CDouble---testRandDouble ::- (MonadIO m) =>- m Double -- result-testRandDouble = liftIO $ do- result <- g_test_rand_double- let result' = realToFrac result- return result'----- function g_test_queue_free--- Args : [Arg {argCName = "gfree_pointer", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_queue_free" g_test_queue_free :: - Ptr () -> -- gfree_pointer : TBasicType TPtr- IO ()---testQueueFree ::- (MonadIO m) =>- Ptr () -- gfreePointer- -> m () -- result-testQueueFree gfreePointer = liftIO $ do- g_test_queue_free gfreePointer- return ()----- function g_test_queue_destroy--- Args : [Arg {argCName = "destroy_func", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_queue_destroy" g_test_queue_destroy :: - FunPtr DestroyNotifyC -> -- destroy_func : TInterface "GLib" "DestroyNotify"- Ptr () -> -- destroy_data : TBasicType TPtr- IO ()---testQueueDestroy ::- (MonadIO m) =>- DestroyNotify -- destroyFunc- -> Ptr () -- destroyData- -> m () -- result-testQueueDestroy destroyFunc destroyData = liftIO $ do- ptrdestroyFunc <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- destroyFunc' <- mkDestroyNotify (destroyNotifyWrapper (Just ptrdestroyFunc) destroyFunc)- poke ptrdestroyFunc destroyFunc'- g_test_queue_destroy destroyFunc' destroyData- return ()----- function g_test_log_type_name--- Args : [Arg {argCName = "log_type", argType = TInterface "GLib" "TestLogType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_test_log_type_name" g_test_log_type_name :: - CUInt -> -- log_type : TInterface "GLib" "TestLogType"- IO CString---testLogTypeName ::- (MonadIO m) =>- TestLogType -- logType- -> m T.Text -- result-testLogTypeName logType = liftIO $ do- let logType' = (fromIntegral . fromEnum) logType- result <- g_test_log_type_name logType'- checkUnexpectedReturnNULL "g_test_log_type_name" result- result' <- cstringToText result- return result'----- function g_test_incomplete--- Args : [Arg {argCName = "msg", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_incomplete" g_test_incomplete :: - CString -> -- msg : TBasicType TUTF8- IO ()---testIncomplete ::- (MonadIO m) =>- Maybe (T.Text) -- msg- -> m () -- result-testIncomplete msg = liftIO $ do- maybeMsg <- case msg of- Nothing -> return nullPtr- Just jMsg -> do- jMsg' <- textToCString jMsg- return jMsg'- g_test_incomplete maybeMsg- freeMem maybeMsg- return ()----- function g_test_get_dir--- Args : [Arg {argCName = "file_type", argType = TInterface "GLib" "TestFileType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_test_get_dir" g_test_get_dir :: - CUInt -> -- file_type : TInterface "GLib" "TestFileType"- IO CString---testGetDir ::- (MonadIO m) =>- TestFileType -- fileType- -> m T.Text -- result-testGetDir fileType = liftIO $ do- let fileType' = (fromIntegral . fromEnum) fileType- result <- g_test_get_dir fileType'- checkUnexpectedReturnNULL "g_test_get_dir" result- result' <- cstringToText result- return result'----- function g_test_failed--- Args : []--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_test_failed" g_test_failed :: - IO CInt---testFailed ::- (MonadIO m) =>- m Bool -- result-testFailed = liftIO $ do- result <- g_test_failed- let result' = (/= 0) result- return result'----- function g_test_fail--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_fail" g_test_fail :: - IO ()---testFail ::- (MonadIO m) =>- m () -- result-testFail = liftIO $ do- g_test_fail- return ()----- function g_test_expect_message--- Args : [Arg {argCName = "log_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_level", argType = TInterface "GLib" "LogLevelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_expect_message" g_test_expect_message :: - CString -> -- log_domain : TBasicType TUTF8- CUInt -> -- log_level : TInterface "GLib" "LogLevelFlags"- CString -> -- pattern : TBasicType TUTF8- IO ()---testExpectMessage ::- (MonadIO m) =>- Maybe (T.Text) -- logDomain- -> [LogLevelFlags] -- logLevel- -> T.Text -- pattern- -> m () -- result-testExpectMessage logDomain logLevel pattern = liftIO $ do- maybeLogDomain <- case logDomain of- Nothing -> return nullPtr- Just jLogDomain -> do- jLogDomain' <- textToCString jLogDomain- return jLogDomain'- let logLevel' = gflagsToWord logLevel- pattern' <- textToCString pattern- g_test_expect_message maybeLogDomain logLevel' pattern'- freeMem maybeLogDomain- freeMem pattern'- return ()----- function g_test_bug_base--- Args : [Arg {argCName = "uri_pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_bug_base" g_test_bug_base :: - CString -> -- uri_pattern : TBasicType TUTF8- IO ()---testBugBase ::- (MonadIO m) =>- T.Text -- uriPattern- -> m () -- result-testBugBase uriPattern = liftIO $ do- uriPattern' <- textToCString uriPattern- g_test_bug_base uriPattern'- freeMem uriPattern'- return ()----- function g_test_bug--- Args : [Arg {argCName = "bug_uri_snippet", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_bug" g_test_bug :: - CString -> -- bug_uri_snippet : TBasicType TUTF8- IO ()---testBug ::- (MonadIO m) =>- T.Text -- bugUriSnippet- -> m () -- result-testBug bugUriSnippet = liftIO $ do- bugUriSnippet' <- textToCString bugUriSnippet- g_test_bug bugUriSnippet'- freeMem bugUriSnippet'- return ()----- function g_test_assert_expected_messages_internal--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_assert_expected_messages_internal" g_test_assert_expected_messages_internal :: - CString -> -- domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- func : TBasicType TUTF8- IO ()---testAssertExpectedMessagesInternal ::- (MonadIO m) =>- T.Text -- domain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- func- -> m () -- result-testAssertExpectedMessagesInternal domain file line func = liftIO $ do- domain' <- textToCString domain- file' <- textToCString file- func' <- textToCString func- g_test_assert_expected_messages_internal domain' file' line func'- freeMem domain'- freeMem file'- freeMem func'- return ()----- function g_test_add_func--- Args : [Arg {argCName = "testpath", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "test_func", argType = TInterface "GLib" "TestFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_add_func" g_test_add_func :: - CString -> -- testpath : TBasicType TUTF8- FunPtr TestFuncC -> -- test_func : TInterface "GLib" "TestFunc"- IO ()---testAddFunc ::- (MonadIO m) =>- T.Text -- testpath- -> TestFunc -- testFunc- -> m () -- result-testAddFunc testpath testFunc = liftIO $ do- testpath' <- textToCString testpath- ptrtestFunc <- callocMem :: IO (Ptr (FunPtr TestFuncC))- testFunc' <- mkTestFunc (testFuncWrapper (Just ptrtestFunc) testFunc)- poke ptrtestFunc testFunc'- g_test_add_func testpath' testFunc'- freeMem testpath'- return ()----- function g_test_add_data_func--- Args : [Arg {argCName = "testpath", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "test_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "test_func", argType = TInterface "GLib" "TestDataFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_add_data_func" g_test_add_data_func :: - CString -> -- testpath : TBasicType TUTF8- Ptr () -> -- test_data : TBasicType TPtr- FunPtr TestDataFuncC -> -- test_func : TInterface "GLib" "TestDataFunc"- IO ()---testAddDataFunc ::- (MonadIO m) =>- T.Text -- testpath- -> Ptr () -- testData- -> TestDataFunc -- testFunc- -> m () -- result-testAddDataFunc testpath testData testFunc = liftIO $ do- testpath' <- textToCString testpath- ptrtestFunc <- callocMem :: IO (Ptr (FunPtr TestDataFuncC))- testFunc' <- mkTestDataFunc (testDataFuncWrapper (Just ptrtestFunc) testFunc)- poke ptrtestFunc testFunc'- g_test_add_data_func testpath' testData testFunc'- freeMem testpath'- return ()----- function g_strv_length--- Args : [Arg {argCName = "str_array", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_strv_length" g_strv_length :: - CString -> -- str_array : TBasicType TUTF8- IO Word32---strvLength ::- (MonadIO m) =>- T.Text -- strArray- -> m Word32 -- result-strvLength strArray = liftIO $ do- strArray' <- textToCString strArray- result <- g_strv_length strArray'- freeMem strArray'- return result----- function g_strv_get_type--- Args : []--- Lengths : []--- returnType : Just (TBasicType TGType)--- throws : False--- Skip return : False--foreign import ccall "g_strv_get_type" g_strv_get_type :: - IO CGType---strvGetType ::- (MonadIO m) =>- m GType -- result-strvGetType = liftIO $ do- result <- g_strv_get_type- let result' = GType result- return result'----- function g_strv_contains--- Args : [Arg {argCName = "strv", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_strv_contains" g_strv_contains :: - CString -> -- strv : TBasicType TUTF8- CString -> -- str : TBasicType TUTF8- IO CInt---strvContains ::- (MonadIO m) =>- T.Text -- strv- -> T.Text -- str- -> m Bool -- result-strvContains strv str = liftIO $ do- strv' <- textToCString strv- str' <- textToCString str- result <- g_strv_contains strv' str'- let result' = (/= 0) result- freeMem strv'- freeMem str'- return result'----- function g_strup--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strup" g_strup :: - CString -> -- string : TBasicType TUTF8- IO CString--{-# DEPRECATED strup ["(Since version 2.2)","This function is totally broken for the reasons"," discussed in the g_strncasecmp() docs - use g_ascii_strup()"," or g_utf8_strup() instead."]#-}-strup ::- (MonadIO m) =>- T.Text -- string- -> m T.Text -- result-strup string = liftIO $ do- string' <- textToCString string- result <- g_strup string'- checkUnexpectedReturnNULL "g_strup" result- result' <- cstringToText result- freeMem result- freeMem string'- return result'----- function g_strtod--- Args : [Arg {argCName = "nptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "endptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_strtod" g_strtod :: - CString -> -- nptr : TBasicType TUTF8- CString -> -- endptr : TBasicType TUTF8- IO CDouble---strtod ::- (MonadIO m) =>- T.Text -- nptr- -> T.Text -- endptr- -> m Double -- result-strtod nptr endptr = liftIO $ do- nptr' <- textToCString nptr- endptr' <- textToCString endptr- result <- g_strtod nptr' endptr'- let result' = realToFrac result- freeMem nptr'- freeMem endptr'- return result'----- function g_strstr_len--- Args : [Arg {argCName = "haystack", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "haystack_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "needle", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strstr_len" g_strstr_len :: - CString -> -- haystack : TBasicType TUTF8- Int64 -> -- haystack_len : TBasicType TInt64- CString -> -- needle : TBasicType TUTF8- IO CString---strstrLen ::- (MonadIO m) =>- T.Text -- haystack- -> Int64 -- haystackLen- -> T.Text -- needle- -> m T.Text -- result-strstrLen haystack haystackLen needle = liftIO $ do- haystack' <- textToCString haystack- needle' <- textToCString needle- result <- g_strstr_len haystack' haystackLen needle'- checkUnexpectedReturnNULL "g_strstr_len" result- result' <- cstringToText result- freeMem result- freeMem haystack'- freeMem needle'- return result'----- function g_strsignal--- Args : [Arg {argCName = "signum", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strsignal" g_strsignal :: - Int32 -> -- signum : TBasicType TInt- IO CString---strsignal ::- (MonadIO m) =>- Int32 -- signum- -> m T.Text -- result-strsignal signum = liftIO $ do- result <- g_strsignal signum- checkUnexpectedReturnNULL "g_strsignal" result- result' <- cstringToText result- return result'----- function g_strrstr_len--- Args : [Arg {argCName = "haystack", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "haystack_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "needle", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strrstr_len" g_strrstr_len :: - CString -> -- haystack : TBasicType TUTF8- Int64 -> -- haystack_len : TBasicType TInt64- CString -> -- needle : TBasicType TUTF8- IO CString---strrstrLen ::- (MonadIO m) =>- T.Text -- haystack- -> Int64 -- haystackLen- -> T.Text -- needle- -> m T.Text -- result-strrstrLen haystack haystackLen needle = liftIO $ do- haystack' <- textToCString haystack- needle' <- textToCString needle- result <- g_strrstr_len haystack' haystackLen needle'- checkUnexpectedReturnNULL "g_strrstr_len" result- result' <- cstringToText result- freeMem result- freeMem haystack'- freeMem needle'- return result'----- function g_strrstr--- Args : [Arg {argCName = "haystack", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "needle", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strrstr" g_strrstr :: - CString -> -- haystack : TBasicType TUTF8- CString -> -- needle : TBasicType TUTF8- IO CString---strrstr ::- (MonadIO m) =>- T.Text -- haystack- -> T.Text -- needle- -> m T.Text -- result-strrstr haystack needle = liftIO $ do- haystack' <- textToCString haystack- needle' <- textToCString needle- result <- g_strrstr haystack' needle'- checkUnexpectedReturnNULL "g_strrstr" result- result' <- cstringToText result- freeMem result- freeMem haystack'- freeMem needle'- return result'----- function g_strreverse--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strreverse" g_strreverse :: - CString -> -- string : TBasicType TUTF8- IO CString---strreverse ::- (MonadIO m) =>- T.Text -- string- -> m T.Text -- result-strreverse string = liftIO $ do- string' <- textToCString string- result <- g_strreverse string'- checkUnexpectedReturnNULL "g_strreverse" result- result' <- cstringToText result- freeMem result- freeMem string'- return result'----- function g_strnfill--- Args : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fill_char", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strnfill" g_strnfill :: - Word64 -> -- length : TBasicType TUInt64- Int8 -> -- fill_char : TBasicType TInt8- IO CString---strnfill ::- (MonadIO m) =>- Word64 -- length_- -> Int8 -- fillChar- -> m T.Text -- result-strnfill length_ fillChar = liftIO $ do- result <- g_strnfill length_ fillChar- checkUnexpectedReturnNULL "g_strnfill" result- result' <- cstringToText result- freeMem result- return result'----- function g_strndup--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strndup" g_strndup :: - CString -> -- str : TBasicType TUTF8- Word64 -> -- n : TBasicType TUInt64- IO CString---strndup ::- (MonadIO m) =>- T.Text -- str- -> Word64 -- n- -> m T.Text -- result-strndup str n = liftIO $ do- str' <- textToCString str- result <- g_strndup str' n- checkUnexpectedReturnNULL "g_strndup" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_strncasecmp--- Args : [Arg {argCName = "s1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "s2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_strncasecmp" g_strncasecmp :: - CString -> -- s1 : TBasicType TUTF8- CString -> -- s2 : TBasicType TUTF8- Word32 -> -- n : TBasicType TUInt- IO Int32--{-# DEPRECATED strncasecmp ["(Since version 2.2)","The problem with g_strncasecmp() is that it does"," the comparison by calling toupper()/tolower(). These functions"," are locale-specific and operate on single bytes. However, it is"," impossible to handle things correctly from an internationalization"," standpoint by operating on bytes, since characters may be multibyte."," Thus g_strncasecmp() is broken if your string is guaranteed to be"," ASCII, since it is locale-sensitive, and it's broken if your string"," is localized, since it doesn't work on many encodings at all,"," including UTF-8, EUC-JP, etc.",""," There are therefore two replacement techniques: g_ascii_strncasecmp(),"," which only works on ASCII and is not locale-sensitive, and"," g_utf8_casefold() followed by strcmp() on the resulting strings,"," which is good for case-insensitive sorting of UTF-8."]#-}-strncasecmp ::- (MonadIO m) =>- T.Text -- s1- -> T.Text -- s2- -> Word32 -- n- -> m Int32 -- result-strncasecmp s1 s2 n = liftIO $ do- s1' <- textToCString s1- s2' <- textToCString s2- result <- g_strncasecmp s1' s2' n- freeMem s1'- freeMem s2'- return result----- function g_strlcpy--- Args : [Arg {argCName = "dest", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_strlcpy" g_strlcpy :: - CString -> -- dest : TBasicType TUTF8- CString -> -- src : TBasicType TUTF8- Word64 -> -- dest_size : TBasicType TUInt64- IO Word64---strlcpy ::- (MonadIO m) =>- T.Text -- dest- -> T.Text -- src- -> Word64 -- destSize- -> m Word64 -- result-strlcpy dest src destSize = liftIO $ do- dest' <- textToCString dest- src' <- textToCString src- result <- g_strlcpy dest' src' destSize- freeMem dest'- freeMem src'- return result----- function g_strlcat--- Args : [Arg {argCName = "dest", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_strlcat" g_strlcat :: - CString -> -- dest : TBasicType TUTF8- CString -> -- src : TBasicType TUTF8- Word64 -> -- dest_size : TBasicType TUInt64- IO Word64---strlcat ::- (MonadIO m) =>- T.Text -- dest- -> T.Text -- src- -> Word64 -- destSize- -> m Word64 -- result-strlcat dest src destSize = liftIO $ do- dest' <- textToCString dest- src' <- textToCString src- result <- g_strlcat dest' src' destSize- freeMem dest'- freeMem src'- return result----- function g_strjoinv--- Args : [Arg {argCName = "separator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str_array", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strjoinv" g_strjoinv :: - CString -> -- separator : TBasicType TUTF8- CString -> -- str_array : TBasicType TUTF8- IO CString---strjoinv ::- (MonadIO m) =>- Maybe (T.Text) -- separator- -> T.Text -- strArray- -> m T.Text -- result-strjoinv separator strArray = liftIO $ do- maybeSeparator <- case separator of- Nothing -> return nullPtr- Just jSeparator -> do- jSeparator' <- textToCString jSeparator- return jSeparator'- strArray' <- textToCString strArray- result <- g_strjoinv maybeSeparator strArray'- checkUnexpectedReturnNULL "g_strjoinv" result- result' <- cstringToText result- freeMem result- freeMem maybeSeparator- freeMem strArray'- return result'----- function g_strip_context--- Args : [Arg {argCName = "msgid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgval", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strip_context" g_strip_context :: - CString -> -- msgid : TBasicType TUTF8- CString -> -- msgval : TBasicType TUTF8- IO CString---stripContext ::- (MonadIO m) =>- T.Text -- msgid- -> T.Text -- msgval- -> m T.Text -- result-stripContext msgid msgval = liftIO $ do- msgid' <- textToCString msgid- msgval' <- textToCString msgval- result <- g_strip_context msgid' msgval'- checkUnexpectedReturnNULL "g_strip_context" result- result' <- cstringToText result- freeMem msgid'- freeMem msgval'- return result'----- function g_string_sized_new--- Args : [Arg {argCName = "dfl_size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_sized_new" g_string_sized_new :: - Word64 -> -- dfl_size : TBasicType TUInt64- IO (Ptr String)---stringSizedNew ::- (MonadIO m) =>- Word64 -- dflSize- -> m String -- result-stringSizedNew dflSize = liftIO $ do- result <- g_string_sized_new dflSize- checkUnexpectedReturnNULL "g_string_sized_new" result- result' <- (wrapBoxed String) result- return result'----- function g_string_new_len--- Args : [Arg {argCName = "init", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_new_len" g_string_new_len :: - CString -> -- init : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO (Ptr String)---stringNewLen ::- (MonadIO m) =>- T.Text -- init- -> Int64 -- len- -> m String -- result-stringNewLen init len = liftIO $ do- init' <- textToCString init- result <- g_string_new_len init' len- checkUnexpectedReturnNULL "g_string_new_len" result- result' <- (wrapBoxed String) result- freeMem init'- return result'----- function g_string_new--- Args : [Arg {argCName = "init", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_new" g_string_new :: - CString -> -- init : TBasicType TUTF8- IO (Ptr String)---stringNew ::- (MonadIO m) =>- Maybe (T.Text) -- init- -> m String -- result-stringNew init = liftIO $ do- maybeInit <- case init of- Nothing -> return nullPtr- Just jInit -> do- jInit' <- textToCString jInit- return jInit'- result <- g_string_new maybeInit- checkUnexpectedReturnNULL "g_string_new" result- result' <- (wrapBoxed String) result- freeMem maybeInit- return result'----- function g_strfreev--- Args : [Arg {argCName = "str_array", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_strfreev" g_strfreev :: - CString -> -- str_array : TBasicType TUTF8- IO ()---strfreev ::- (MonadIO m) =>- T.Text -- strArray- -> m () -- result-strfreev strArray = liftIO $ do- strArray' <- textToCString strArray- g_strfreev strArray'- freeMem strArray'- return ()----- function g_strescape--- Args : [Arg {argCName = "source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "exceptions", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strescape" g_strescape :: - CString -> -- source : TBasicType TUTF8- CString -> -- exceptions : TBasicType TUTF8- IO CString---strescape ::- (MonadIO m) =>- T.Text -- source- -> T.Text -- exceptions- -> m T.Text -- result-strescape source exceptions = liftIO $ do- source' <- textToCString source- exceptions' <- textToCString exceptions- result <- g_strescape source' exceptions'- checkUnexpectedReturnNULL "g_strescape" result- result' <- cstringToText result- freeMem result- freeMem source'- freeMem exceptions'- return result'----- function g_strerror--- Args : [Arg {argCName = "errnum", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strerror" g_strerror :: - Int32 -> -- errnum : TBasicType TInt- IO CString---strerror ::- (MonadIO m) =>- Int32 -- errnum- -> m T.Text -- result-strerror errnum = liftIO $ do- result <- g_strerror errnum- checkUnexpectedReturnNULL "g_strerror" result- result' <- cstringToText result- return result'----- function g_strdup--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strdup" g_strdup :: - CString -> -- str : TBasicType TUTF8- IO CString---strdup ::- (MonadIO m) =>- T.Text -- str- -> m T.Text -- result-strdup str = liftIO $ do- str' <- textToCString str- result <- g_strdup str'- checkUnexpectedReturnNULL "g_strdup" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_strdown--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strdown" g_strdown :: - CString -> -- string : TBasicType TUTF8- IO CString--{-# DEPRECATED strdown ["(Since version 2.2)","This function is totally broken for the reasons discussed","in the g_strncasecmp() docs - use g_ascii_strdown() or g_utf8_strdown()","instead."]#-}-strdown ::- (MonadIO m) =>- T.Text -- string- -> m T.Text -- result-strdown string = liftIO $ do- string' <- textToCString string- result <- g_strdown string'- checkUnexpectedReturnNULL "g_strdown" result- result' <- cstringToText result- freeMem result- freeMem string'- return result'----- function g_strdelimit--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "delimiters", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_delimiter", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strdelimit" g_strdelimit :: - CString -> -- string : TBasicType TUTF8- CString -> -- delimiters : TBasicType TUTF8- Int8 -> -- new_delimiter : TBasicType TInt8- IO CString---strdelimit ::- (MonadIO m) =>- T.Text -- string- -> Maybe (T.Text) -- delimiters- -> Int8 -- newDelimiter- -> m T.Text -- result-strdelimit string delimiters newDelimiter = liftIO $ do- string' <- textToCString string- maybeDelimiters <- case delimiters of- Nothing -> return nullPtr- Just jDelimiters -> do- jDelimiters' <- textToCString jDelimiters- return jDelimiters'- result <- g_strdelimit string' maybeDelimiters newDelimiter- checkUnexpectedReturnNULL "g_strdelimit" result- result' <- cstringToText result- freeMem result- freeMem string'- freeMem maybeDelimiters- return result'----- function g_strcompress--- Args : [Arg {argCName = "source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strcompress" g_strcompress :: - CString -> -- source : TBasicType TUTF8- IO CString---strcompress ::- (MonadIO m) =>- T.Text -- source- -> m T.Text -- result-strcompress source = liftIO $ do- source' <- textToCString source- result <- g_strcompress source'- checkUnexpectedReturnNULL "g_strcompress" result- result' <- cstringToText result- freeMem result- freeMem source'- return result'----- function g_strcmp0--- Args : [Arg {argCName = "str1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_strcmp0" g_strcmp0 :: - CString -> -- str1 : TBasicType TUTF8- CString -> -- str2 : TBasicType TUTF8- IO Int32---strcmp0 ::- (MonadIO m) =>- Maybe (T.Text) -- str1- -> Maybe (T.Text) -- str2- -> m Int32 -- result-strcmp0 str1 str2 = liftIO $ do- maybeStr1 <- case str1 of- Nothing -> return nullPtr- Just jStr1 -> do- jStr1' <- textToCString jStr1- return jStr1'- maybeStr2 <- case str2 of- Nothing -> return nullPtr- Just jStr2 -> do- jStr2' <- textToCString jStr2- return jStr2'- result <- g_strcmp0 maybeStr1 maybeStr2- freeMem maybeStr1- freeMem maybeStr2- return result----- function g_strchug--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strchug" g_strchug :: - CString -> -- string : TBasicType TUTF8- IO CString---strchug ::- (MonadIO m) =>- T.Text -- string- -> m T.Text -- result-strchug string = liftIO $ do- string' <- textToCString string- result <- g_strchug string'- checkUnexpectedReturnNULL "g_strchug" result- result' <- cstringToText result- freeMem result- freeMem string'- return result'----- function g_strchomp--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strchomp" g_strchomp :: - CString -> -- string : TBasicType TUTF8- IO CString---strchomp ::- (MonadIO m) =>- T.Text -- string- -> m T.Text -- result-strchomp string = liftIO $ do- string' <- textToCString string- result <- g_strchomp string'- checkUnexpectedReturnNULL "g_strchomp" result- result' <- cstringToText result- freeMem result- freeMem string'- return result'----- function g_strcasecmp--- Args : [Arg {argCName = "s1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "s2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_strcasecmp" g_strcasecmp :: - CString -> -- s1 : TBasicType TUTF8- CString -> -- s2 : TBasicType TUTF8- IO Int32--{-# DEPRECATED strcasecmp ["(Since version 2.2)","See g_strncasecmp() for a discussion of why this"," function is deprecated and how to replace it."]#-}-strcasecmp ::- (MonadIO m) =>- T.Text -- s1- -> T.Text -- s2- -> m Int32 -- result-strcasecmp s1 s2 = liftIO $ do- s1' <- textToCString s1- s2' <- textToCString s2- result <- g_strcasecmp s1' s2'- freeMem s1'- freeMem s2'- return result----- function g_strcanon--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "valid_chars", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "substitutor", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_strcanon" g_strcanon :: - CString -> -- string : TBasicType TUTF8- CString -> -- valid_chars : TBasicType TUTF8- Int8 -> -- substitutor : TBasicType TInt8- IO CString---strcanon ::- (MonadIO m) =>- T.Text -- string- -> T.Text -- validChars- -> Int8 -- substitutor- -> m T.Text -- result-strcanon string validChars substitutor = liftIO $ do- string' <- textToCString string- validChars' <- textToCString validChars- result <- g_strcanon string' validChars' substitutor- checkUnexpectedReturnNULL "g_strcanon" result- result' <- cstringToText result- freeMem result- freeMem string'- freeMem validChars'- return result'----- function g_str_tokenize_and_fold--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "translit_locale", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ascii_alternates", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_str_tokenize_and_fold" g_str_tokenize_and_fold :: - CString -> -- string : TBasicType TUTF8- CString -> -- translit_locale : TBasicType TUTF8- Ptr (Ptr CString) -> -- ascii_alternates : TCArray True (-1) (-1) (TBasicType TUTF8)- IO (Ptr CString)---strTokenizeAndFold ::- (MonadIO m) =>- T.Text -- string- -> Maybe (T.Text) -- translitLocale- -> m ([T.Text],[T.Text]) -- result-strTokenizeAndFold string translitLocale = liftIO $ do- string' <- textToCString string- maybeTranslitLocale <- case translitLocale of- Nothing -> return nullPtr- Just jTranslitLocale -> do- jTranslitLocale' <- textToCString jTranslitLocale- return jTranslitLocale'- asciiAlternates <- allocMem :: IO (Ptr (Ptr CString))- result <- g_str_tokenize_and_fold string' maybeTranslitLocale asciiAlternates- checkUnexpectedReturnNULL "g_str_tokenize_and_fold" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- asciiAlternates' <- peek asciiAlternates- asciiAlternates'' <- unpackZeroTerminatedUTF8CArray asciiAlternates'- mapZeroTerminatedCArray freeMem asciiAlternates'- freeMem asciiAlternates'- freeMem string'- freeMem maybeTranslitLocale- freeMem asciiAlternates- return (result', asciiAlternates'')----- function g_str_to_ascii--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "from_locale", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_str_to_ascii" g_str_to_ascii :: - CString -> -- str : TBasicType TUTF8- CString -> -- from_locale : TBasicType TUTF8- IO CString---strToAscii ::- (MonadIO m) =>- T.Text -- str- -> Maybe (T.Text) -- fromLocale- -> m T.Text -- result-strToAscii str fromLocale = liftIO $ do- str' <- textToCString str- maybeFromLocale <- case fromLocale of- Nothing -> return nullPtr- Just jFromLocale -> do- jFromLocale' <- textToCString jFromLocale- return jFromLocale'- result <- g_str_to_ascii str' maybeFromLocale- checkUnexpectedReturnNULL "g_str_to_ascii" result- result' <- cstringToText result- freeMem result- freeMem str'- freeMem maybeFromLocale- return result'----- function g_str_match_string--- Args : [Arg {argCName = "search_term", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "potential_hit", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "accept_alternates", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_str_match_string" g_str_match_string :: - CString -> -- search_term : TBasicType TUTF8- CString -> -- potential_hit : TBasicType TUTF8- CInt -> -- accept_alternates : TBasicType TBoolean- IO CInt---strMatchString ::- (MonadIO m) =>- T.Text -- searchTerm- -> T.Text -- potentialHit- -> Bool -- acceptAlternates- -> m Bool -- result-strMatchString searchTerm potentialHit acceptAlternates = liftIO $ do- searchTerm' <- textToCString searchTerm- potentialHit' <- textToCString potentialHit- let acceptAlternates' = (fromIntegral . fromEnum) acceptAlternates- result <- g_str_match_string searchTerm' potentialHit' acceptAlternates'- let result' = (/= 0) result- freeMem searchTerm'- freeMem potentialHit'- return result'----- function g_str_is_ascii--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_str_is_ascii" g_str_is_ascii :: - CString -> -- str : TBasicType TUTF8- IO CInt---strIsAscii ::- (MonadIO m) =>- T.Text -- str- -> m Bool -- result-strIsAscii str = liftIO $ do- str' <- textToCString str- result <- g_str_is_ascii str'- let result' = (/= 0) result- freeMem str'- return result'----- function g_str_hash--- Args : [Arg {argCName = "v", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_str_hash" g_str_hash :: - Ptr () -> -- v : TBasicType TPtr- IO Word32---strHash ::- (MonadIO m) =>- Ptr () -- v- -> m Word32 -- result-strHash v = liftIO $ do- result <- g_str_hash v- return result----- function g_str_has_suffix--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "suffix", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_str_has_suffix" g_str_has_suffix :: - CString -> -- str : TBasicType TUTF8- CString -> -- suffix : TBasicType TUTF8- IO CInt---strHasSuffix ::- (MonadIO m) =>- T.Text -- str- -> T.Text -- suffix- -> m Bool -- result-strHasSuffix str suffix = liftIO $ do- str' <- textToCString str- suffix' <- textToCString suffix- result <- g_str_has_suffix str' suffix'- let result' = (/= 0) result- freeMem str'- freeMem suffix'- return result'----- function g_str_has_prefix--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "prefix", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_str_has_prefix" g_str_has_prefix :: - CString -> -- str : TBasicType TUTF8- CString -> -- prefix : TBasicType TUTF8- IO CInt---strHasPrefix ::- (MonadIO m) =>- T.Text -- str- -> T.Text -- prefix- -> m Bool -- result-strHasPrefix str prefix = liftIO $ do- str' <- textToCString str- prefix' <- textToCString prefix- result <- g_str_has_prefix str' prefix'- let result' = (/= 0) result- freeMem str'- freeMem prefix'- return result'----- function g_str_equal--- Args : [Arg {argCName = "v1", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "v2", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_str_equal" g_str_equal :: - Ptr () -> -- v1 : TBasicType TPtr- Ptr () -> -- v2 : TBasicType TPtr- IO CInt---strEqual ::- (MonadIO m) =>- Ptr () -- v1- -> Ptr () -- v2- -> m Bool -- result-strEqual v1 v2 = liftIO $ do- result <- g_str_equal v1 v2- let result' = (/= 0) result- return result'----- function g_stpcpy--- Args : [Arg {argCName = "dest", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_stpcpy" g_stpcpy :: - CString -> -- dest : TBasicType TUTF8- CString -> -- src : TBasicType TUTF8- IO CString---stpcpy ::- (MonadIO m) =>- T.Text -- dest- -> T.Text -- src- -> m T.Text -- result-stpcpy dest src = liftIO $ do- dest' <- textToCString dest- src' <- textToCString src- result <- g_stpcpy dest' src'- checkUnexpectedReturnNULL "g_stpcpy" result- result' <- cstringToText result- freeMem result- freeMem dest'- freeMem src'- return result'----- function g_spawn_sync--- Args : [Arg {argCName = "working_directory", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "argv", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "envp", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "SpawnFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child_setup", argType = TInterface "GLib" "SpawnChildSetupFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "standard_output", argType = TCArray True (-1) (-1) (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "standard_error", argType = TCArray True (-1) (-1) (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "exit_status", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_spawn_sync" g_spawn_sync :: - CString -> -- working_directory : TBasicType TUTF8- Ptr CString -> -- argv : TCArray True (-1) (-1) (TBasicType TUTF8)- Ptr CString -> -- envp : TCArray True (-1) (-1) (TBasicType TUTF8)- CUInt -> -- flags : TInterface "GLib" "SpawnFlags"- FunPtr SpawnChildSetupFuncC -> -- child_setup : TInterface "GLib" "SpawnChildSetupFunc"- Ptr () -> -- user_data : TBasicType TPtr- Ptr (Ptr Word8) -> -- standard_output : TCArray True (-1) (-1) (TBasicType TUInt8)- Ptr (Ptr Word8) -> -- standard_error : TCArray True (-1) (-1) (TBasicType TUInt8)- Ptr Int32 -> -- exit_status : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---spawnSync ::- (MonadIO m) =>- Maybe (T.Text) -- workingDirectory- -> [T.Text] -- argv- -> Maybe ([T.Text]) -- envp- -> [SpawnFlags] -- flags- -> Maybe (SpawnChildSetupFunc) -- childSetup- -> m (ByteString,ByteString,Int32) -- result-spawnSync workingDirectory argv envp flags childSetup = liftIO $ do- maybeWorkingDirectory <- case workingDirectory of- Nothing -> return nullPtr- Just jWorkingDirectory -> do- jWorkingDirectory' <- textToCString jWorkingDirectory- return jWorkingDirectory'- argv' <- packZeroTerminatedUTF8CArray argv- maybeEnvp <- case envp of- Nothing -> return nullPtr- Just jEnvp -> do- jEnvp' <- packZeroTerminatedUTF8CArray jEnvp- return jEnvp'- let flags' = gflagsToWord flags- ptrchildSetup <- callocMem :: IO (Ptr (FunPtr SpawnChildSetupFuncC))- maybeChildSetup <- case childSetup of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jChildSetup -> do- jChildSetup' <- mkSpawnChildSetupFunc (spawnChildSetupFuncWrapper (Just ptrchildSetup) jChildSetup)- poke ptrchildSetup jChildSetup'- return jChildSetup'- standardOutput <- allocMem :: IO (Ptr (Ptr Word8))- standardError <- allocMem :: IO (Ptr (Ptr Word8))- exitStatus <- allocMem :: IO (Ptr Int32)- let userData = nullPtr- onException (do- _ <- propagateGError $ g_spawn_sync maybeWorkingDirectory argv' maybeEnvp flags' maybeChildSetup userData standardOutput standardError exitStatus- standardOutput' <- peek standardOutput- standardOutput'' <- unpackZeroTerminatedByteString standardOutput'- freeMem standardOutput'- standardError' <- peek standardError- standardError'' <- unpackZeroTerminatedByteString standardError'- freeMem standardError'- exitStatus' <- peek exitStatus- freeMem maybeWorkingDirectory- mapZeroTerminatedCArray freeMem argv'- freeMem argv'- mapZeroTerminatedCArray freeMem maybeEnvp- freeMem maybeEnvp- freeMem standardOutput- freeMem standardError- freeMem exitStatus- return (standardOutput'', standardError'', exitStatus')- ) (do- freeMem maybeWorkingDirectory- mapZeroTerminatedCArray freeMem argv'- freeMem argv'- mapZeroTerminatedCArray freeMem maybeEnvp- freeMem maybeEnvp- freeMem standardOutput- freeMem standardError- freeMem exitStatus- )----- function g_spawn_exit_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_spawn_exit_error_quark" g_spawn_exit_error_quark :: - IO Word32---spawnExitErrorQuark ::- (MonadIO m) =>- m Word32 -- result-spawnExitErrorQuark = liftIO $ do- result <- g_spawn_exit_error_quark- return result----- function g_spawn_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_spawn_error_quark" g_spawn_error_quark :: - IO Word32---spawnErrorQuark ::- (MonadIO m) =>- m Word32 -- result-spawnErrorQuark = liftIO $ do- result <- g_spawn_error_quark- return result----- function g_spawn_command_line_sync--- Args : [Arg {argCName = "command_line", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "standard_output", argType = TCArray True (-1) (-1) (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "standard_error", argType = TCArray True (-1) (-1) (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "exit_status", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_spawn_command_line_sync" g_spawn_command_line_sync :: - CString -> -- command_line : TBasicType TUTF8- Ptr (Ptr Word8) -> -- standard_output : TCArray True (-1) (-1) (TBasicType TUInt8)- Ptr (Ptr Word8) -> -- standard_error : TCArray True (-1) (-1) (TBasicType TUInt8)- Ptr Int32 -> -- exit_status : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---spawnCommandLineSync ::- (MonadIO m) =>- T.Text -- commandLine- -> m (ByteString,ByteString,Int32) -- result-spawnCommandLineSync commandLine = liftIO $ do- commandLine' <- textToCString commandLine- standardOutput <- allocMem :: IO (Ptr (Ptr Word8))- standardError <- allocMem :: IO (Ptr (Ptr Word8))- exitStatus <- allocMem :: IO (Ptr Int32)- onException (do- _ <- propagateGError $ g_spawn_command_line_sync commandLine' standardOutput standardError exitStatus- standardOutput' <- peek standardOutput- standardOutput'' <- unpackZeroTerminatedByteString standardOutput'- freeMem standardOutput'- standardError' <- peek standardError- standardError'' <- unpackZeroTerminatedByteString standardError'- freeMem standardError'- exitStatus' <- peek exitStatus- freeMem commandLine'- freeMem standardOutput- freeMem standardError- freeMem exitStatus- return (standardOutput'', standardError'', exitStatus')- ) (do- freeMem commandLine'- freeMem standardOutput- freeMem standardError- freeMem exitStatus- )----- function g_spawn_command_line_async--- Args : [Arg {argCName = "command_line", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_spawn_command_line_async" g_spawn_command_line_async :: - CString -> -- command_line : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---spawnCommandLineAsync ::- (MonadIO m) =>- T.Text -- commandLine- -> m () -- result-spawnCommandLineAsync commandLine = liftIO $ do- commandLine' <- textToCString commandLine- onException (do- _ <- propagateGError $ g_spawn_command_line_async commandLine'- freeMem commandLine'- return ()- ) (do- freeMem commandLine'- )----- function g_spawn_close_pid--- Args : [Arg {argCName = "pid", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_spawn_close_pid" g_spawn_close_pid :: - Int32 -> -- pid : TBasicType TInt- IO ()---spawnClosePid ::- (MonadIO m) =>- Int32 -- pid- -> m () -- result-spawnClosePid pid = liftIO $ do- g_spawn_close_pid pid- return ()----- function g_spawn_check_exit_status--- Args : [Arg {argCName = "exit_status", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_spawn_check_exit_status" g_spawn_check_exit_status :: - Int32 -> -- exit_status : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---spawnCheckExitStatus ::- (MonadIO m) =>- Int32 -- exitStatus- -> m () -- result-spawnCheckExitStatus exitStatus = liftIO $ do- onException (do- _ <- propagateGError $ g_spawn_check_exit_status exitStatus- return ()- ) (do- return ()- )----- function g_spawn_async_with_pipes--- Args : [Arg {argCName = "working_directory", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "argv", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "envp", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "SpawnFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child_setup", argType = TInterface "GLib" "SpawnChildSetupFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child_pid", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "standard_input", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "standard_output", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "standard_error", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_spawn_async_with_pipes" g_spawn_async_with_pipes :: - CString -> -- working_directory : TBasicType TUTF8- Ptr CString -> -- argv : TCArray True (-1) (-1) (TBasicType TUTF8)- Ptr CString -> -- envp : TCArray True (-1) (-1) (TBasicType TUTF8)- CUInt -> -- flags : TInterface "GLib" "SpawnFlags"- FunPtr SpawnChildSetupFuncC -> -- child_setup : TInterface "GLib" "SpawnChildSetupFunc"- Ptr () -> -- user_data : TBasicType TPtr- Ptr Int32 -> -- child_pid : TBasicType TInt- Ptr Int32 -> -- standard_input : TBasicType TInt- Ptr Int32 -> -- standard_output : TBasicType TInt- Ptr Int32 -> -- standard_error : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---spawnAsyncWithPipes ::- (MonadIO m) =>- Maybe (T.Text) -- workingDirectory- -> [T.Text] -- argv- -> Maybe ([T.Text]) -- envp- -> [SpawnFlags] -- flags- -> Maybe (SpawnChildSetupFunc) -- childSetup- -> m (Int32,Int32,Int32,Int32) -- result-spawnAsyncWithPipes workingDirectory argv envp flags childSetup = liftIO $ do- maybeWorkingDirectory <- case workingDirectory of- Nothing -> return nullPtr- Just jWorkingDirectory -> do- jWorkingDirectory' <- textToCString jWorkingDirectory- return jWorkingDirectory'- argv' <- packZeroTerminatedUTF8CArray argv- maybeEnvp <- case envp of- Nothing -> return nullPtr- Just jEnvp -> do- jEnvp' <- packZeroTerminatedUTF8CArray jEnvp- return jEnvp'- let flags' = gflagsToWord flags- ptrchildSetup <- callocMem :: IO (Ptr (FunPtr SpawnChildSetupFuncC))- maybeChildSetup <- case childSetup of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jChildSetup -> do- jChildSetup' <- mkSpawnChildSetupFunc (spawnChildSetupFuncWrapper (Just ptrchildSetup) jChildSetup)- poke ptrchildSetup jChildSetup'- return jChildSetup'- childPid <- allocMem :: IO (Ptr Int32)- standardInput <- allocMem :: IO (Ptr Int32)- standardOutput <- allocMem :: IO (Ptr Int32)- standardError <- allocMem :: IO (Ptr Int32)- let userData = nullPtr- onException (do- _ <- propagateGError $ g_spawn_async_with_pipes maybeWorkingDirectory argv' maybeEnvp flags' maybeChildSetup userData childPid standardInput standardOutput standardError- childPid' <- peek childPid- standardInput' <- peek standardInput- standardOutput' <- peek standardOutput- standardError' <- peek standardError- freeMem maybeWorkingDirectory- mapZeroTerminatedCArray freeMem argv'- freeMem argv'- mapZeroTerminatedCArray freeMem maybeEnvp- freeMem maybeEnvp- freeMem childPid- freeMem standardInput- freeMem standardOutput- freeMem standardError- return (childPid', standardInput', standardOutput', standardError')- ) (do- freeMem maybeWorkingDirectory- mapZeroTerminatedCArray freeMem argv'- freeMem argv'- mapZeroTerminatedCArray freeMem maybeEnvp- freeMem maybeEnvp- freeMem childPid- freeMem standardInput- freeMem standardOutput- freeMem standardError- )----- function g_spawn_async--- Args : [Arg {argCName = "working_directory", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "argv", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "envp", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "SpawnFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child_setup", argType = TInterface "GLib" "SpawnChildSetupFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child_pid", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_spawn_async" g_spawn_async :: - CString -> -- working_directory : TBasicType TUTF8- Ptr CString -> -- argv : TCArray True (-1) (-1) (TBasicType TUTF8)- Ptr CString -> -- envp : TCArray True (-1) (-1) (TBasicType TUTF8)- CUInt -> -- flags : TInterface "GLib" "SpawnFlags"- FunPtr SpawnChildSetupFuncC -> -- child_setup : TInterface "GLib" "SpawnChildSetupFunc"- Ptr () -> -- user_data : TBasicType TPtr- Ptr Int32 -> -- child_pid : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---spawnAsync ::- (MonadIO m) =>- Maybe (T.Text) -- workingDirectory- -> [T.Text] -- argv- -> Maybe ([T.Text]) -- envp- -> [SpawnFlags] -- flags- -> Maybe (SpawnChildSetupFunc) -- childSetup- -> m (Int32) -- result-spawnAsync workingDirectory argv envp flags childSetup = liftIO $ do- maybeWorkingDirectory <- case workingDirectory of- Nothing -> return nullPtr- Just jWorkingDirectory -> do- jWorkingDirectory' <- textToCString jWorkingDirectory- return jWorkingDirectory'- argv' <- packZeroTerminatedUTF8CArray argv- maybeEnvp <- case envp of- Nothing -> return nullPtr- Just jEnvp -> do- jEnvp' <- packZeroTerminatedUTF8CArray jEnvp- return jEnvp'- let flags' = gflagsToWord flags- ptrchildSetup <- callocMem :: IO (Ptr (FunPtr SpawnChildSetupFuncC))- maybeChildSetup <- case childSetup of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jChildSetup -> do- jChildSetup' <- mkSpawnChildSetupFunc (spawnChildSetupFuncWrapper (Just ptrchildSetup) jChildSetup)- poke ptrchildSetup jChildSetup'- return jChildSetup'- childPid <- allocMem :: IO (Ptr Int32)- let userData = nullPtr- onException (do- _ <- propagateGError $ g_spawn_async maybeWorkingDirectory argv' maybeEnvp flags' maybeChildSetup userData childPid- childPid' <- peek childPid- freeMem maybeWorkingDirectory- mapZeroTerminatedCArray freeMem argv'- freeMem argv'- mapZeroTerminatedCArray freeMem maybeEnvp- freeMem maybeEnvp- freeMem childPid- return childPid'- ) (do- freeMem maybeWorkingDirectory- mapZeroTerminatedCArray freeMem argv'- freeMem argv'- mapZeroTerminatedCArray freeMem maybeEnvp- freeMem maybeEnvp- freeMem childPid- )----- function g_spaced_primes_closest--- Args : [Arg {argCName = "num", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_spaced_primes_closest" g_spaced_primes_closest :: - Word32 -> -- num : TBasicType TUInt- IO Word32---spacedPrimesClosest ::- (MonadIO m) =>- Word32 -- num- -> m Word32 -- result-spacedPrimesClosest num = liftIO $ do- result <- g_spaced_primes_closest num- return result----- function g_slice_set_config--- Args : [Arg {argCName = "ckey", argType = TInterface "GLib" "SliceConfig", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_slice_set_config" g_slice_set_config :: - CUInt -> -- ckey : TInterface "GLib" "SliceConfig"- Int64 -> -- value : TBasicType TInt64- IO ()---sliceSetConfig ::- (MonadIO m) =>- SliceConfig -- ckey- -> Int64 -- value- -> m () -- result-sliceSetConfig ckey value = liftIO $ do- let ckey' = (fromIntegral . fromEnum) ckey- g_slice_set_config ckey' value- return ()----- function g_slice_get_config_state--- Args : [Arg {argCName = "ckey", argType = TInterface "GLib" "SliceConfig", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "address", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_slice_get_config_state" g_slice_get_config_state :: - CUInt -> -- ckey : TInterface "GLib" "SliceConfig"- Int64 -> -- address : TBasicType TInt64- Word32 -> -- n_values : TBasicType TUInt- IO Int64---sliceGetConfigState ::- (MonadIO m) =>- SliceConfig -- ckey- -> Int64 -- address- -> Word32 -- nValues- -> m Int64 -- result-sliceGetConfigState ckey address nValues = liftIO $ do- let ckey' = (fromIntegral . fromEnum) ckey- result <- g_slice_get_config_state ckey' address nValues- return result----- function g_slice_get_config--- Args : [Arg {argCName = "ckey", argType = TInterface "GLib" "SliceConfig", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_slice_get_config" g_slice_get_config :: - CUInt -> -- ckey : TInterface "GLib" "SliceConfig"- IO Int64---sliceGetConfig ::- (MonadIO m) =>- SliceConfig -- ckey- -> m Int64 -- result-sliceGetConfig ckey = liftIO $ do- let ckey' = (fromIntegral . fromEnum) ckey- result <- g_slice_get_config ckey'- return result----- function g_slice_free_chain_with_offset--- Args : [Arg {argCName = "block_size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mem_chain", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "next_offset", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_slice_free_chain_with_offset" g_slice_free_chain_with_offset :: - Word64 -> -- block_size : TBasicType TUInt64- Ptr () -> -- mem_chain : TBasicType TPtr- Word64 -> -- next_offset : TBasicType TUInt64- IO ()---sliceFreeChainWithOffset ::- (MonadIO m) =>- Word64 -- blockSize- -> Ptr () -- memChain- -> Word64 -- nextOffset- -> m () -- result-sliceFreeChainWithOffset blockSize memChain nextOffset = liftIO $ do- g_slice_free_chain_with_offset blockSize memChain nextOffset- return ()----- function g_slice_free1--- Args : [Arg {argCName = "block_size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mem_block", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_slice_free1" g_slice_free1 :: - Word64 -> -- block_size : TBasicType TUInt64- Ptr () -> -- mem_block : TBasicType TPtr- IO ()---sliceFree1 ::- (MonadIO m) =>- Word64 -- blockSize- -> Ptr () -- memBlock- -> m () -- result-sliceFree1 blockSize memBlock = liftIO $ do- g_slice_free1 blockSize memBlock- return ()----- function g_shell_unquote--- Args : [Arg {argCName = "quoted_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_shell_unquote" g_shell_unquote :: - CString -> -- quoted_string : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---shellUnquote ::- (MonadIO m) =>- T.Text -- quotedString- -> m T.Text -- result-shellUnquote quotedString = liftIO $ do- quotedString' <- textToCString quotedString- onException (do- result <- propagateGError $ g_shell_unquote quotedString'- checkUnexpectedReturnNULL "g_shell_unquote" result- result' <- cstringToText result- freeMem result- freeMem quotedString'- return result'- ) (do- freeMem quotedString'- )----- function g_shell_quote--- Args : [Arg {argCName = "unquoted_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_shell_quote" g_shell_quote :: - CString -> -- unquoted_string : TBasicType TUTF8- IO CString---shellQuote ::- (MonadIO m) =>- T.Text -- unquotedString- -> m T.Text -- result-shellQuote unquotedString = liftIO $ do- unquotedString' <- textToCString unquotedString- result <- g_shell_quote unquotedString'- checkUnexpectedReturnNULL "g_shell_quote" result- result' <- cstringToText result- freeMem result- freeMem unquotedString'- return result'----- function g_shell_parse_argv--- Args : [Arg {argCName = "command_line", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "argcp", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "argvp", argType = TCArray True (-1) 1 (TBasicType TUTF8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_shell_parse_argv" g_shell_parse_argv :: - CString -> -- command_line : TBasicType TUTF8- Ptr Int32 -> -- argcp : TBasicType TInt- Ptr (Ptr CString) -> -- argvp : TCArray True (-1) 1 (TBasicType TUTF8)- Ptr (Ptr GError) -> -- error- IO CInt---shellParseArgv ::- (MonadIO m) =>- T.Text -- commandLine- -> m (Int32,[T.Text]) -- result-shellParseArgv commandLine = liftIO $ do- commandLine' <- textToCString commandLine- argcp <- allocMem :: IO (Ptr Int32)- argvp <- allocMem :: IO (Ptr (Ptr CString))- onException (do- _ <- propagateGError $ g_shell_parse_argv commandLine' argcp argvp- argcp' <- peek argcp- argvp' <- peek argvp- argvp'' <- unpackZeroTerminatedUTF8CArray argvp'- mapZeroTerminatedCArray freeMem argvp'- freeMem argvp'- freeMem commandLine'- freeMem argcp- freeMem argvp- return (argcp', argvp'')- ) (do- freeMem commandLine'- freeMem argcp- freeMem argvp- )----- function g_shell_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_shell_error_quark" g_shell_error_quark :: - IO Word32---shellErrorQuark ::- (MonadIO m) =>- m Word32 -- result-shellErrorQuark = liftIO $ do- result <- g_shell_error_quark- return result----- function g_setenv--- Args : [Arg {argCName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_setenv" g_setenv :: - CString -> -- variable : TBasicType TUTF8- CString -> -- value : TBasicType TUTF8- CInt -> -- overwrite : TBasicType TBoolean- IO CInt---setenv ::- (MonadIO m) =>- T.Text -- variable- -> T.Text -- value- -> Bool -- overwrite- -> m Bool -- result-setenv variable value overwrite = liftIO $ do- variable' <- textToCString variable- value' <- textToCString value- let overwrite' = (fromIntegral . fromEnum) overwrite- result <- g_setenv variable' value' overwrite'- let result' = (/= 0) result- freeMem variable'- freeMem value'- return result'----- function g_set_prgname--- Args : [Arg {argCName = "prgname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_set_prgname" g_set_prgname :: - CString -> -- prgname : TBasicType TUTF8- IO ()---setPrgname ::- (MonadIO m) =>- T.Text -- prgname- -> m () -- result-setPrgname prgname = liftIO $ do- prgname' <- textToCString prgname- g_set_prgname prgname'- freeMem prgname'- return ()----- function g_set_error_literal--- Args : [Arg {argCName = "err", argType = TError, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "domain", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "code", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_set_error_literal" g_set_error_literal :: - Ptr GError -> -- err : TError- Word32 -> -- domain : TBasicType TUInt32- Int32 -> -- code : TBasicType TInt- CString -> -- message : TBasicType TUTF8- IO ()---setErrorLiteral ::- (MonadIO m) =>- Maybe (GError) -- err- -> Word32 -- domain- -> Int32 -- code- -> T.Text -- message- -> m () -- result-setErrorLiteral err domain code message = liftIO $ do- maybeErr <- case err of- Nothing -> return nullPtr- Just jErr -> do- let jErr' = unsafeManagedPtrGetPtr jErr- return jErr'- message' <- textToCString message- g_set_error_literal maybeErr domain code message'- whenJust err touchManagedPtr- freeMem message'- return ()----- function g_set_application_name--- Args : [Arg {argCName = "application_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_set_application_name" g_set_application_name :: - CString -> -- application_name : TBasicType TUTF8- IO ()---setApplicationName ::- (MonadIO m) =>- T.Text -- applicationName- -> m () -- result-setApplicationName applicationName = liftIO $ do- applicationName' <- textToCString applicationName- g_set_application_name applicationName'- freeMem applicationName'- return ()----- function g_rmdir--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_rmdir" g_rmdir :: - CString -> -- filename : TBasicType TUTF8- IO Int32---rmdir ::- (MonadIO m) =>- T.Text -- filename- -> m Int32 -- result-rmdir filename = liftIO $ do- filename' <- textToCString filename- result <- g_rmdir filename'- freeMem filename'- return result----- function g_return_if_fail_warning--- Args : [Arg {argCName = "log_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pretty_function", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "expression", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_return_if_fail_warning" g_return_if_fail_warning :: - CString -> -- log_domain : TBasicType TUTF8- CString -> -- pretty_function : TBasicType TUTF8- CString -> -- expression : TBasicType TUTF8- IO ()---returnIfFailWarning ::- (MonadIO m) =>- T.Text -- logDomain- -> T.Text -- prettyFunction- -> T.Text -- expression- -> m () -- result-returnIfFailWarning logDomain prettyFunction expression = liftIO $ do- logDomain' <- textToCString logDomain- prettyFunction' <- textToCString prettyFunction- expression' <- textToCString expression- g_return_if_fail_warning logDomain' prettyFunction' expression'- freeMem logDomain'- freeMem prettyFunction'- freeMem expression'- return ()----- function g_reload_user_special_dirs_cache--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_reload_user_special_dirs_cache" g_reload_user_special_dirs_cache :: - IO ()---reloadUserSpecialDirsCache ::- (MonadIO m) =>- m () -- result-reloadUserSpecialDirsCache = liftIO $ do- g_reload_user_special_dirs_cache- return ()----- function g_random_set_seed--- Args : [Arg {argCName = "seed", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_random_set_seed" g_random_set_seed :: - Word32 -> -- seed : TBasicType TUInt32- IO ()---randomSetSeed ::- (MonadIO m) =>- Word32 -- seed- -> m () -- result-randomSetSeed seed = liftIO $ do- g_random_set_seed seed- return ()----- function g_random_int_range--- Args : [Arg {argCName = "begin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt32)--- throws : False--- Skip return : False--foreign import ccall "g_random_int_range" g_random_int_range :: - Int32 -> -- begin : TBasicType TInt32- Int32 -> -- end : TBasicType TInt32- IO Int32---randomIntRange ::- (MonadIO m) =>- Int32 -- begin- -> Int32 -- end- -> m Int32 -- result-randomIntRange begin end = liftIO $ do- result <- g_random_int_range begin end- return result----- function g_random_int--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_random_int" g_random_int :: - IO Word32---randomInt ::- (MonadIO m) =>- m Word32 -- result-randomInt = liftIO $ do- result <- g_random_int- return result----- function g_random_double_range--- Args : [Arg {argCName = "begin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_random_double_range" g_random_double_range :: - CDouble -> -- begin : TBasicType TDouble- CDouble -> -- end : TBasicType TDouble- IO CDouble---randomDoubleRange ::- (MonadIO m) =>- Double -- begin- -> Double -- end- -> m Double -- result-randomDoubleRange begin end = liftIO $ do- let begin' = realToFrac begin- let end' = realToFrac end- result <- g_random_double_range begin' end'- let result' = realToFrac result- return result'----- function g_random_double--- Args : []--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_random_double" g_random_double :: - IO CDouble---randomDouble ::- (MonadIO m) =>- m Double -- result-randomDouble = liftIO $ do- result <- g_random_double- let result' = realToFrac result- return result'----- function g_quark_try_string--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_quark_try_string" g_quark_try_string :: - CString -> -- string : TBasicType TUTF8- IO Word32---quarkTryString ::- (MonadIO m) =>- Maybe (T.Text) -- string- -> m Word32 -- result-quarkTryString string = liftIO $ do- maybeString <- case string of- Nothing -> return nullPtr- Just jString -> do- jString' <- textToCString jString- return jString'- result <- g_quark_try_string maybeString- freeMem maybeString- return result----- function g_quark_to_string--- Args : [Arg {argCName = "quark", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_quark_to_string" g_quark_to_string :: - Word32 -> -- quark : TBasicType TUInt32- IO CString---quarkToString ::- (MonadIO m) =>- Word32 -- quark- -> m T.Text -- result-quarkToString quark = liftIO $ do- result <- g_quark_to_string quark- checkUnexpectedReturnNULL "g_quark_to_string" result- result' <- cstringToText result- return result'----- function g_quark_from_string--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_quark_from_string" g_quark_from_string :: - CString -> -- string : TBasicType TUTF8- IO Word32---quarkFromString ::- (MonadIO m) =>- Maybe (T.Text) -- string- -> m Word32 -- result-quarkFromString string = liftIO $ do- maybeString <- case string of- Nothing -> return nullPtr- Just jString -> do- jString' <- textToCString jString- return jString'- result <- g_quark_from_string maybeString- freeMem maybeString- return result----- function g_quark_from_static_string--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_quark_from_static_string" g_quark_from_static_string :: - CString -> -- string : TBasicType TUTF8- IO Word32---quarkFromStaticString ::- (MonadIO m) =>- Maybe (T.Text) -- string- -> m Word32 -- result-quarkFromStaticString string = liftIO $ do- maybeString <- case string of- Nothing -> return nullPtr- Just jString -> do- jString' <- textToCString jString- return jString'- result <- g_quark_from_static_string maybeString- freeMem maybeString- return result----- function g_propagate_error--- Args : [Arg {argCName = "dest", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_propagate_error" g_propagate_error :: - Ptr GError -> -- dest : TError- Ptr GError -> -- src : TError- IO ()---propagateError ::- (MonadIO m) =>- GError -- dest- -> GError -- src- -> m () -- result-propagateError dest src = liftIO $ do- let dest' = unsafeManagedPtrGetPtr dest- let src' = unsafeManagedPtrGetPtr src- g_propagate_error dest' src'- touchManagedPtr dest- touchManagedPtr src- return ()----- function g_poll--- Args : [Arg {argCName = "fds", argType = TInterface "GLib" "PollFD", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nfds", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timeout", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_poll" g_poll :: - Ptr PollFD -> -- fds : TInterface "GLib" "PollFD"- Word32 -> -- nfds : TBasicType TUInt- Int32 -> -- timeout : TBasicType TInt- IO Int32---poll ::- (MonadIO m) =>- PollFD -- fds- -> Word32 -- nfds- -> Int32 -- timeout- -> m Int32 -- result-poll fds nfds timeout = liftIO $ do- let fds' = unsafeManagedPtrGetPtr fds- result <- g_poll fds' nfds timeout- touchManagedPtr fds- return result----- function g_pointer_bit_unlock--- Args : [Arg {argCName = "address", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lock_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_pointer_bit_unlock" g_pointer_bit_unlock :: - Ptr () -> -- address : TBasicType TPtr- Int32 -> -- lock_bit : TBasicType TInt- IO ()---pointerBitUnlock ::- (MonadIO m) =>- Ptr () -- address- -> Int32 -- lockBit- -> m () -- result-pointerBitUnlock address lockBit = liftIO $ do- g_pointer_bit_unlock address lockBit- return ()----- function g_pointer_bit_trylock--- Args : [Arg {argCName = "address", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lock_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_pointer_bit_trylock" g_pointer_bit_trylock :: - Ptr () -> -- address : TBasicType TPtr- Int32 -> -- lock_bit : TBasicType TInt- IO CInt---pointerBitTrylock ::- (MonadIO m) =>- Ptr () -- address- -> Int32 -- lockBit- -> m Bool -- result-pointerBitTrylock address lockBit = liftIO $ do- result <- g_pointer_bit_trylock address lockBit- let result' = (/= 0) result- return result'----- function g_pointer_bit_lock--- Args : [Arg {argCName = "address", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lock_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_pointer_bit_lock" g_pointer_bit_lock :: - Ptr () -> -- address : TBasicType TPtr- Int32 -> -- lock_bit : TBasicType TInt- IO ()---pointerBitLock ::- (MonadIO m) =>- Ptr () -- address- -> Int32 -- lockBit- -> m () -- result-pointerBitLock address lockBit = liftIO $ do- g_pointer_bit_lock address lockBit- return ()----- function g_pattern_match_string--- Args : [Arg {argCName = "pspec", argType = TInterface "GLib" "PatternSpec", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_pattern_match_string" g_pattern_match_string :: - Ptr PatternSpec -> -- pspec : TInterface "GLib" "PatternSpec"- CString -> -- string : TBasicType TUTF8- IO CInt---patternMatchString ::- (MonadIO m) =>- PatternSpec -- pspec- -> T.Text -- string- -> m Bool -- result-patternMatchString pspec string = liftIO $ do- let pspec' = unsafeManagedPtrGetPtr pspec- string' <- textToCString string- result <- g_pattern_match_string pspec' string'- let result' = (/= 0) result- touchManagedPtr pspec- freeMem string'- return result'----- function g_pattern_match_simple--- Args : [Arg {argCName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_pattern_match_simple" g_pattern_match_simple :: - CString -> -- pattern : TBasicType TUTF8- CString -> -- string : TBasicType TUTF8- IO CInt---patternMatchSimple ::- (MonadIO m) =>- T.Text -- pattern- -> T.Text -- string- -> m Bool -- result-patternMatchSimple pattern string = liftIO $ do- pattern' <- textToCString pattern- string' <- textToCString string- result <- g_pattern_match_simple pattern' string'- let result' = (/= 0) result- freeMem pattern'- freeMem string'- return result'----- function g_pattern_match--- Args : [Arg {argCName = "pspec", argType = TInterface "GLib" "PatternSpec", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_length", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_reversed", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_pattern_match" g_pattern_match :: - Ptr PatternSpec -> -- pspec : TInterface "GLib" "PatternSpec"- Word32 -> -- string_length : TBasicType TUInt- CString -> -- string : TBasicType TUTF8- CString -> -- string_reversed : TBasicType TUTF8- IO CInt---patternMatch ::- (MonadIO m) =>- PatternSpec -- pspec- -> Word32 -- stringLength- -> T.Text -- string- -> Maybe (T.Text) -- stringReversed- -> m Bool -- result-patternMatch pspec stringLength string stringReversed = liftIO $ do- let pspec' = unsafeManagedPtrGetPtr pspec- string' <- textToCString string- maybeStringReversed <- case stringReversed of- Nothing -> return nullPtr- Just jStringReversed -> do- jStringReversed' <- textToCString jStringReversed- return jStringReversed'- result <- g_pattern_match pspec' stringLength string' maybeStringReversed- let result' = (/= 0) result- touchManagedPtr pspec- freeMem string'- freeMem maybeStringReversed- return result'----- function g_path_skip_root--- Args : [Arg {argCName = "file_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_path_skip_root" g_path_skip_root :: - CString -> -- file_name : TBasicType TUTF8- IO CString---pathSkipRoot ::- (MonadIO m) =>- T.Text -- fileName- -> m (Maybe T.Text) -- result-pathSkipRoot fileName = liftIO $ do- fileName' <- textToCString fileName- result <- g_path_skip_root fileName'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- cstringToText result'- return result''- freeMem fileName'- return maybeResult----- function g_path_is_absolute--- Args : [Arg {argCName = "file_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_path_is_absolute" g_path_is_absolute :: - CString -> -- file_name : TBasicType TUTF8- IO CInt---pathIsAbsolute ::- (MonadIO m) =>- T.Text -- fileName- -> m Bool -- result-pathIsAbsolute fileName = liftIO $ do- fileName' <- textToCString fileName- result <- g_path_is_absolute fileName'- let result' = (/= 0) result- freeMem fileName'- return result'----- function g_path_get_dirname--- Args : [Arg {argCName = "file_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_path_get_dirname" g_path_get_dirname :: - CString -> -- file_name : TBasicType TUTF8- IO CString---pathGetDirname ::- (MonadIO m) =>- T.Text -- fileName- -> m T.Text -- result-pathGetDirname fileName = liftIO $ do- fileName' <- textToCString fileName- result <- g_path_get_dirname fileName'- checkUnexpectedReturnNULL "g_path_get_dirname" result- result' <- cstringToText result- freeMem result- freeMem fileName'- return result'----- function g_path_get_basename--- Args : [Arg {argCName = "file_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_path_get_basename" g_path_get_basename :: - CString -> -- file_name : TBasicType TUTF8- IO CString---pathGetBasename ::- (MonadIO m) =>- T.Text -- fileName- -> m T.Text -- result-pathGetBasename fileName = liftIO $ do- fileName' <- textToCString fileName- result <- g_path_get_basename fileName'- checkUnexpectedReturnNULL "g_path_get_basename" result- result' <- cstringToText result- freeMem result- freeMem fileName'- return result'----- function g_parse_debug_string--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "keys", argType = TCArray False (-1) 2 (TInterface "GLib" "DebugKey"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nkeys", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "nkeys", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_parse_debug_string" g_parse_debug_string :: - CString -> -- string : TBasicType TUTF8- Ptr DebugKey -> -- keys : TCArray False (-1) 2 (TInterface "GLib" "DebugKey")- Word32 -> -- nkeys : TBasicType TUInt- IO Word32---parseDebugString ::- (MonadIO m) =>- Maybe (T.Text) -- string- -> [DebugKey] -- keys- -> m Word32 -- result-parseDebugString string keys = liftIO $ do- let nkeys = fromIntegral $ length keys- maybeString <- case string of- Nothing -> return nullPtr- Just jString -> do- jString' <- textToCString jString- return jString'- let keys' = map unsafeManagedPtrGetPtr keys- keys'' <- packBlockArray 16 keys'- result <- g_parse_debug_string maybeString keys'' nkeys- mapM_ touchManagedPtr keys- freeMem maybeString- freeMem keys''- return result----- function g_option_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_option_error_quark" g_option_error_quark :: - IO Word32---optionErrorQuark ::- (MonadIO m) =>- m Word32 -- result-optionErrorQuark = liftIO $ do- result <- g_option_error_quark- return result----- function g_on_error_stack_trace--- Args : [Arg {argCName = "prg_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_on_error_stack_trace" g_on_error_stack_trace :: - CString -> -- prg_name : TBasicType TUTF8- IO ()---onErrorStackTrace ::- (MonadIO m) =>- T.Text -- prgName- -> m () -- result-onErrorStackTrace prgName = liftIO $ do- prgName' <- textToCString prgName- g_on_error_stack_trace prgName'- freeMem prgName'- return ()----- function g_on_error_query--- Args : [Arg {argCName = "prg_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_on_error_query" g_on_error_query :: - CString -> -- prg_name : TBasicType TUTF8- IO ()---onErrorQuery ::- (MonadIO m) =>- T.Text -- prgName- -> m () -- result-onErrorQuery prgName = liftIO $ do- prgName' <- textToCString prgName- g_on_error_query prgName'- freeMem prgName'- return ()----- function g_nullify_pointer--- Args : [Arg {argCName = "nullify_location", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_nullify_pointer" g_nullify_pointer :: - Ptr () -> -- nullify_location : TBasicType TPtr- IO ()---nullifyPointer ::- (MonadIO m) =>- Ptr () -- nullifyLocation- -> m () -- result-nullifyPointer nullifyLocation = liftIO $ do- g_nullify_pointer nullifyLocation- return ()----- function g_mkstemp_full--- Args : [Arg {argCName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_mkstemp_full" g_mkstemp_full :: - CString -> -- tmpl : TBasicType TFileName- Int32 -> -- flags : TBasicType TInt- Int32 -> -- mode : TBasicType TInt- IO Int32---mkstempFull ::- (MonadIO m) =>- [Char] -- tmpl- -> Int32 -- flags- -> Int32 -- mode- -> m Int32 -- result-mkstempFull tmpl flags mode = liftIO $ do- tmpl' <- stringToCString tmpl- result <- g_mkstemp_full tmpl' flags mode- freeMem tmpl'- return result----- function g_mkstemp--- Args : [Arg {argCName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_mkstemp" g_mkstemp :: - CString -> -- tmpl : TBasicType TFileName- IO Int32---mkstemp ::- (MonadIO m) =>- [Char] -- tmpl- -> m Int32 -- result-mkstemp tmpl = liftIO $ do- tmpl' <- stringToCString tmpl- result <- g_mkstemp tmpl'- freeMem tmpl'- return result----- function g_mkdtemp_full--- Args : [Arg {argCName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_mkdtemp_full" g_mkdtemp_full :: - CString -> -- tmpl : TBasicType TFileName- Int32 -> -- mode : TBasicType TInt- IO CString---mkdtempFull ::- (MonadIO m) =>- [Char] -- tmpl- -> Int32 -- mode- -> m T.Text -- result-mkdtempFull tmpl mode = liftIO $ do- tmpl' <- stringToCString tmpl- result <- g_mkdtemp_full tmpl' mode- checkUnexpectedReturnNULL "g_mkdtemp_full" result- result' <- cstringToText result- freeMem result- freeMem tmpl'- return result'----- function g_mkdtemp--- Args : [Arg {argCName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_mkdtemp" g_mkdtemp :: - CString -> -- tmpl : TBasicType TFileName- IO CString---mkdtemp ::- (MonadIO m) =>- [Char] -- tmpl- -> m T.Text -- result-mkdtemp tmpl = liftIO $ do- tmpl' <- stringToCString tmpl- result <- g_mkdtemp tmpl'- checkUnexpectedReturnNULL "g_mkdtemp" result- result' <- cstringToText result- freeMem result- freeMem tmpl'- return result'----- function g_mkdir_with_parents--- Args : [Arg {argCName = "pathname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_mkdir_with_parents" g_mkdir_with_parents :: - CString -> -- pathname : TBasicType TUTF8- Int32 -> -- mode : TBasicType TInt- IO Int32---mkdirWithParents ::- (MonadIO m) =>- T.Text -- pathname- -> Int32 -- mode- -> m Int32 -- result-mkdirWithParents pathname mode = liftIO $ do- pathname' <- textToCString pathname- result <- g_mkdir_with_parents pathname' mode- freeMem pathname'- return result----- function g_mem_set_vtable--- Args : [Arg {argCName = "vtable", argType = TInterface "GLib" "MemVTable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mem_set_vtable" g_mem_set_vtable :: - Ptr MemVTable -> -- vtable : TInterface "GLib" "MemVTable"- IO ()--{-# DEPRECATED memSetVtable ["(Since version 2.46)","Use other memory profiling tools instead"]#-}-memSetVtable ::- (MonadIO m) =>- MemVTable -- vtable- -> m () -- result-memSetVtable vtable = liftIO $ do- let vtable' = unsafeManagedPtrGetPtr vtable- g_mem_set_vtable vtable'- touchManagedPtr vtable- return ()----- function g_mem_profile--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mem_profile" g_mem_profile :: - IO ()--{-# DEPRECATED memProfile ["(Since version 2.46)","Use other memory profiling tools instead"]#-}-memProfile ::- (MonadIO m) =>- m () -- result-memProfile = liftIO $ do- g_mem_profile- return ()----- function g_mem_is_system_malloc--- Args : []--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_mem_is_system_malloc" g_mem_is_system_malloc :: - IO CInt--{-# DEPRECATED memIsSystemMalloc ["(Since version 2.46)","GLib always uses the system malloc, so this function always","returns %TRUE."]#-}-memIsSystemMalloc ::- (MonadIO m) =>- m Bool -- result-memIsSystemMalloc = liftIO $ do- result <- g_mem_is_system_malloc- let result' = (/= 0) result- return result'----- function g_markup_escape_text--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_markup_escape_text" g_markup_escape_text :: - CString -> -- text : TBasicType TUTF8- Int64 -> -- length : TBasicType TInt64- IO CString---markupEscapeText ::- (MonadIO m) =>- T.Text -- text- -> Int64 -- length_- -> m T.Text -- result-markupEscapeText text length_ = liftIO $ do- text' <- textToCString text- result <- g_markup_escape_text text' length_- checkUnexpectedReturnNULL "g_markup_escape_text" result- result' <- cstringToText result- freeMem result- freeMem text'- return result'----- function g_markup_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_markup_error_quark" g_markup_error_quark :: - IO Word32---markupErrorQuark ::- (MonadIO m) =>- m Word32 -- result-markupErrorQuark = liftIO $ do- result <- g_markup_error_quark- return result----- function g_main_depth--- Args : []--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_main_depth" g_main_depth :: - IO Int32---mainDepth ::- (MonadIO m) =>- m Int32 -- result-mainDepth = liftIO $ do- result <- g_main_depth- return result----- function g_main_current_source--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_main_current_source" g_main_current_source :: - IO (Ptr Source)---mainCurrentSource ::- (MonadIO m) =>- m Source -- result-mainCurrentSource = liftIO $ do- result <- g_main_current_source- checkUnexpectedReturnNULL "g_main_current_source" result- result' <- (newBoxed Source) result- return result'----- function g_log_set_handler_full--- Args : [Arg {argCName = "log_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_levels", argType = TInterface "GLib" "LogLevelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_func", argType = TInterface "GLib" "LogFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_log_set_handler_full" g_log_set_handler_full :: - CString -> -- log_domain : TBasicType TUTF8- CUInt -> -- log_levels : TInterface "GLib" "LogLevelFlags"- FunPtr LogFuncC -> -- log_func : TInterface "GLib" "LogFunc"- Ptr () -> -- user_data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- destroy : TInterface "GLib" "DestroyNotify"- IO Word32---logSetHandler ::- (MonadIO m) =>- Maybe (T.Text) -- logDomain- -> [LogLevelFlags] -- logLevels- -> LogFunc -- logFunc- -> m Word32 -- result-logSetHandler logDomain logLevels logFunc = liftIO $ do- maybeLogDomain <- case logDomain of- Nothing -> return nullPtr- Just jLogDomain -> do- jLogDomain' <- textToCString jLogDomain- return jLogDomain'- let logLevels' = gflagsToWord logLevels- logFunc' <- mkLogFunc (logFuncWrapper Nothing logFunc)- let userData = castFunPtrToPtr logFunc'- let destroy = safeFreeFunPtrPtr- result <- g_log_set_handler_full maybeLogDomain logLevels' logFunc' userData destroy- freeMem maybeLogDomain- return result----- function g_log_set_fatal_mask--- Args : [Arg {argCName = "log_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fatal_mask", argType = TInterface "GLib" "LogLevelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "LogLevelFlags")--- throws : False--- Skip return : False--foreign import ccall "g_log_set_fatal_mask" g_log_set_fatal_mask :: - CString -> -- log_domain : TBasicType TUTF8- CUInt -> -- fatal_mask : TInterface "GLib" "LogLevelFlags"- IO CUInt---logSetFatalMask ::- (MonadIO m) =>- T.Text -- logDomain- -> [LogLevelFlags] -- fatalMask- -> m [LogLevelFlags] -- result-logSetFatalMask logDomain fatalMask = liftIO $ do- logDomain' <- textToCString logDomain- let fatalMask' = gflagsToWord fatalMask- result <- g_log_set_fatal_mask logDomain' fatalMask'- let result' = wordToGFlags result- freeMem logDomain'- return result'----- function g_log_set_always_fatal--- Args : [Arg {argCName = "fatal_mask", argType = TInterface "GLib" "LogLevelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "LogLevelFlags")--- throws : False--- Skip return : False--foreign import ccall "g_log_set_always_fatal" g_log_set_always_fatal :: - CUInt -> -- fatal_mask : TInterface "GLib" "LogLevelFlags"- IO CUInt---logSetAlwaysFatal ::- (MonadIO m) =>- [LogLevelFlags] -- fatalMask- -> m [LogLevelFlags] -- result-logSetAlwaysFatal fatalMask = liftIO $ do- let fatalMask' = gflagsToWord fatalMask- result <- g_log_set_always_fatal fatalMask'- let result' = wordToGFlags result- return result'----- function g_log_remove_handler--- Args : [Arg {argCName = "log_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "handler_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_log_remove_handler" g_log_remove_handler :: - CString -> -- log_domain : TBasicType TUTF8- Word32 -> -- handler_id : TBasicType TUInt- IO ()---logRemoveHandler ::- (MonadIO m) =>- T.Text -- logDomain- -> Word32 -- handlerId- -> m () -- result-logRemoveHandler logDomain handlerId = liftIO $ do- logDomain' <- textToCString logDomain- g_log_remove_handler logDomain' handlerId- freeMem logDomain'- return ()----- function g_log_default_handler--- Args : [Arg {argCName = "log_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_level", argType = TInterface "GLib" "LogLevelFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "unused_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_log_default_handler" g_log_default_handler :: - CString -> -- log_domain : TBasicType TUTF8- CUInt -> -- log_level : TInterface "GLib" "LogLevelFlags"- CString -> -- message : TBasicType TUTF8- Ptr () -> -- unused_data : TBasicType TPtr- IO ()---logDefaultHandler ::- (MonadIO m) =>- T.Text -- logDomain- -> [LogLevelFlags] -- logLevel- -> T.Text -- message- -> Ptr () -- unusedData- -> m () -- result-logDefaultHandler logDomain logLevel message unusedData = liftIO $ do- logDomain' <- textToCString logDomain- let logLevel' = gflagsToWord logLevel- message' <- textToCString message- g_log_default_handler logDomain' logLevel' message' unusedData- freeMem logDomain'- freeMem message'- return ()----- function g_locale_to_utf8--- Args : [Arg {argCName = "opsysstring", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_locale_to_utf8" g_locale_to_utf8 :: - CString -> -- opsysstring : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- Word64 -> -- bytes_read : TBasicType TUInt64- Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---localeToUtf8 ::- (MonadIO m) =>- T.Text -- opsysstring- -> Int64 -- len- -> Word64 -- bytesRead- -> Word64 -- bytesWritten- -> m T.Text -- result-localeToUtf8 opsysstring len bytesRead bytesWritten = liftIO $ do- opsysstring' <- textToCString opsysstring- onException (do- result <- propagateGError $ g_locale_to_utf8 opsysstring' len bytesRead bytesWritten- checkUnexpectedReturnNULL "g_locale_to_utf8" result- result' <- cstringToText result- freeMem result- freeMem opsysstring'- return result'- ) (do- freeMem opsysstring'- )----- function g_locale_from_utf8--- Args : [Arg {argCName = "utf8string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_locale_from_utf8" g_locale_from_utf8 :: - CString -> -- utf8string : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- Word64 -> -- bytes_read : TBasicType TUInt64- Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---localeFromUtf8 ::- (MonadIO m) =>- T.Text -- utf8string- -> Int64 -- len- -> Word64 -- bytesRead- -> Word64 -- bytesWritten- -> m T.Text -- result-localeFromUtf8 utf8string len bytesRead bytesWritten = liftIO $ do- utf8string' <- textToCString utf8string- onException (do- result <- propagateGError $ g_locale_from_utf8 utf8string' len bytesRead bytesWritten- checkUnexpectedReturnNULL "g_locale_from_utf8" result- result' <- cstringToText result- freeMem result- freeMem utf8string'- return result'- ) (do- freeMem utf8string'- )----- function g_listenv--- Args : []--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_listenv" g_listenv :: - IO (Ptr CString)---listenv ::- (MonadIO m) =>- m [T.Text] -- result-listenv = liftIO $ do- result <- g_listenv- checkUnexpectedReturnNULL "g_listenv" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- return result'----- function g_io_create_watch--- Args : [Arg {argCName = "channel", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "condition", argType = TInterface "GLib" "IOCondition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_io_create_watch" g_io_create_watch :: - Ptr IOChannel -> -- channel : TInterface "GLib" "IOChannel"- CUInt -> -- condition : TInterface "GLib" "IOCondition"- IO (Ptr Source)---ioCreateWatch ::- (MonadIO m) =>- IOChannel -- channel- -> [IOCondition] -- condition- -> m Source -- result-ioCreateWatch channel condition = liftIO $ do- let channel' = unsafeManagedPtrGetPtr channel- let condition' = gflagsToWord condition- result <- g_io_create_watch channel' condition'- checkUnexpectedReturnNULL "g_io_create_watch" result- result' <- (wrapBoxed Source) result- touchManagedPtr channel- return result'----- function g_io_add_watch_full--- Args : [Arg {argCName = "channel", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "condition", argType = TInterface "GLib" "IOCondition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TInterface "GLib" "IOFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 4, argDestroy = 5, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_io_add_watch_full" g_io_add_watch_full :: - Ptr IOChannel -> -- channel : TInterface "GLib" "IOChannel"- Int32 -> -- priority : TBasicType TInt- CUInt -> -- condition : TInterface "GLib" "IOCondition"- FunPtr IOFuncC -> -- func : TInterface "GLib" "IOFunc"- Ptr () -> -- user_data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO Word32---ioAddWatch ::- (MonadIO m) =>- IOChannel -- channel- -> Int32 -- priority- -> [IOCondition] -- condition- -> IOFunc -- func- -> m Word32 -- result-ioAddWatch channel priority condition func = liftIO $ do- let channel' = unsafeManagedPtrGetPtr channel- let condition' = gflagsToWord condition- func' <- mkIOFunc (iOFuncWrapper Nothing func)- let userData = castFunPtrToPtr func'- let notify = safeFreeFunPtrPtr- result <- g_io_add_watch_full channel' priority condition' func' userData notify- touchManagedPtr channel- return result----- function g_intern_string--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_intern_string" g_intern_string :: - CString -> -- string : TBasicType TUTF8- IO CString---internString ::- (MonadIO m) =>- Maybe (T.Text) -- string- -> m T.Text -- result-internString string = liftIO $ do- maybeString <- case string of- Nothing -> return nullPtr- Just jString -> do- jString' <- textToCString jString- return jString'- result <- g_intern_string maybeString- checkUnexpectedReturnNULL "g_intern_string" result- result' <- cstringToText result- freeMem maybeString- return result'----- function g_intern_static_string--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_intern_static_string" g_intern_static_string :: - CString -> -- string : TBasicType TUTF8- IO CString---internStaticString ::- (MonadIO m) =>- Maybe (T.Text) -- string- -> m T.Text -- result-internStaticString string = liftIO $ do- maybeString <- case string of- Nothing -> return nullPtr- Just jString -> do- jString' <- textToCString jString- return jString'- result <- g_intern_static_string maybeString- checkUnexpectedReturnNULL "g_intern_static_string" result- result' <- cstringToText result- freeMem maybeString- return result'----- function g_int_hash--- Args : [Arg {argCName = "v", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_int_hash" g_int_hash :: - Ptr () -> -- v : TBasicType TPtr- IO Word32---intHash ::- (MonadIO m) =>- Ptr () -- v- -> m Word32 -- result-intHash v = liftIO $ do- result <- g_int_hash v- return result----- function g_int_equal--- Args : [Arg {argCName = "v1", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "v2", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_int_equal" g_int_equal :: - Ptr () -> -- v1 : TBasicType TPtr- Ptr () -> -- v2 : TBasicType TPtr- IO CInt---intEqual ::- (MonadIO m) =>- Ptr () -- v1- -> Ptr () -- v2- -> m Bool -- result-intEqual v1 v2 = liftIO $ do- result <- g_int_equal v1 v2- let result' = (/= 0) result- return result'----- function g_int64_hash--- Args : [Arg {argCName = "v", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_int64_hash" g_int64_hash :: - Ptr () -> -- v : TBasicType TPtr- IO Word32---int64Hash ::- (MonadIO m) =>- Ptr () -- v- -> m Word32 -- result-int64Hash v = liftIO $ do- result <- g_int64_hash v- return result----- function g_int64_equal--- Args : [Arg {argCName = "v1", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "v2", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_int64_equal" g_int64_equal :: - Ptr () -> -- v1 : TBasicType TPtr- Ptr () -> -- v2 : TBasicType TPtr- IO CInt---int64Equal ::- (MonadIO m) =>- Ptr () -- v1- -> Ptr () -- v2- -> m Bool -- result-int64Equal v1 v2 = liftIO $ do- result <- g_int64_equal v1 v2- let result' = (/= 0) result- return result'----- function g_idle_source_new--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_idle_source_new" g_idle_source_new :: - IO (Ptr Source)---idleSourceNew ::- (MonadIO m) =>- m Source -- result-idleSourceNew = liftIO $ do- result <- g_idle_source_new- checkUnexpectedReturnNULL "g_idle_source_new" result- result' <- (wrapBoxed Source) result- return result'----- function g_idle_remove_by_data--- Args : [Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_idle_remove_by_data" g_idle_remove_by_data :: - Ptr () -> -- data : TBasicType TPtr- IO CInt---idleRemoveByData ::- (MonadIO m) =>- Ptr () -- data_- -> m Bool -- result-idleRemoveByData data_ = liftIO $ do- result <- g_idle_remove_by_data data_- let result' = (/= 0) result- return result'----- function g_idle_add_full--- Args : [Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "function", argType = TInterface "GLib" "SourceFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_idle_add_full" g_idle_add_full :: - Int32 -> -- priority : TBasicType TInt- FunPtr SourceFuncC -> -- function : TInterface "GLib" "SourceFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO Word32---idleAdd ::- (MonadIO m) =>- Int32 -- priority- -> SourceFunc -- function- -> m Word32 -- result-idleAdd priority function = liftIO $ do- function' <- mkSourceFunc (sourceFuncWrapper Nothing function)- let data_ = castFunPtrToPtr function'- let notify = safeFreeFunPtrPtr- result <- g_idle_add_full priority function' data_ notify- return result----- function g_iconv--- Args : [Arg {argCName = "converter", argType = TInterface "GLib" "IConv", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "inbuf", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "inbytes_left", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "outbuf", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "outbytes_left", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_iconv" g_iconv :: - Ptr IConv -> -- converter : TInterface "GLib" "IConv"- CString -> -- inbuf : TBasicType TUTF8- Word64 -> -- inbytes_left : TBasicType TUInt64- CString -> -- outbuf : TBasicType TUTF8- Word64 -> -- outbytes_left : TBasicType TUInt64- IO Word64---iconv ::- (MonadIO m) =>- IConv -- converter- -> T.Text -- inbuf- -> Word64 -- inbytesLeft- -> T.Text -- outbuf- -> Word64 -- outbytesLeft- -> m Word64 -- result-iconv converter inbuf inbytesLeft outbuf outbytesLeft = liftIO $ do- let converter' = unsafeManagedPtrGetPtr converter- inbuf' <- textToCString inbuf- outbuf' <- textToCString outbuf- result <- g_iconv converter' inbuf' inbytesLeft outbuf' outbytesLeft- touchManagedPtr converter- freeMem inbuf'- freeMem outbuf'- return result----- function g_hostname_to_unicode--- Args : [Arg {argCName = "hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_hostname_to_unicode" g_hostname_to_unicode :: - CString -> -- hostname : TBasicType TUTF8- IO CString---hostnameToUnicode ::- (MonadIO m) =>- T.Text -- hostname- -> m T.Text -- result-hostnameToUnicode hostname = liftIO $ do- hostname' <- textToCString hostname- result <- g_hostname_to_unicode hostname'- checkUnexpectedReturnNULL "g_hostname_to_unicode" result- result' <- cstringToText result- freeMem result- freeMem hostname'- return result'----- function g_hostname_to_ascii--- Args : [Arg {argCName = "hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_hostname_to_ascii" g_hostname_to_ascii :: - CString -> -- hostname : TBasicType TUTF8- IO CString---hostnameToAscii ::- (MonadIO m) =>- T.Text -- hostname- -> m T.Text -- result-hostnameToAscii hostname = liftIO $ do- hostname' <- textToCString hostname- result <- g_hostname_to_ascii hostname'- checkUnexpectedReturnNULL "g_hostname_to_ascii" result- result' <- cstringToText result- freeMem result- freeMem hostname'- return result'----- function g_hostname_is_non_ascii--- Args : [Arg {argCName = "hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_hostname_is_non_ascii" g_hostname_is_non_ascii :: - CString -> -- hostname : TBasicType TUTF8- IO CInt---hostnameIsNonAscii ::- (MonadIO m) =>- T.Text -- hostname- -> m Bool -- result-hostnameIsNonAscii hostname = liftIO $ do- hostname' <- textToCString hostname- result <- g_hostname_is_non_ascii hostname'- let result' = (/= 0) result- freeMem hostname'- return result'----- function g_hostname_is_ip_address--- Args : [Arg {argCName = "hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_hostname_is_ip_address" g_hostname_is_ip_address :: - CString -> -- hostname : TBasicType TUTF8- IO CInt---hostnameIsIpAddress ::- (MonadIO m) =>- T.Text -- hostname- -> m Bool -- result-hostnameIsIpAddress hostname = liftIO $ do- hostname' <- textToCString hostname- result <- g_hostname_is_ip_address hostname'- let result' = (/= 0) result- freeMem hostname'- return result'----- function g_hostname_is_ascii_encoded--- Args : [Arg {argCName = "hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_hostname_is_ascii_encoded" g_hostname_is_ascii_encoded :: - CString -> -- hostname : TBasicType TUTF8- IO CInt---hostnameIsAsciiEncoded ::- (MonadIO m) =>- T.Text -- hostname- -> m Bool -- result-hostnameIsAsciiEncoded hostname = liftIO $ do- hostname' <- textToCString hostname- result <- g_hostname_is_ascii_encoded hostname'- let result' = (/= 0) result- freeMem hostname'- return result'----- function g_getenv--- Args : [Arg {argCName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_getenv" g_getenv :: - CString -> -- variable : TBasicType TUTF8- IO CString---getenv ::- (MonadIO m) =>- T.Text -- variable- -> m T.Text -- result-getenv variable = liftIO $ do- variable' <- textToCString variable- result <- g_getenv variable'- checkUnexpectedReturnNULL "g_getenv" result- result' <- cstringToText result- freeMem variable'- return result'----- function g_get_user_special_dir--- Args : [Arg {argCName = "directory", argType = TInterface "GLib" "UserDirectory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_user_special_dir" g_get_user_special_dir :: - CUInt -> -- directory : TInterface "GLib" "UserDirectory"- IO CString---getUserSpecialDir ::- (MonadIO m) =>- UserDirectory -- directory- -> m T.Text -- result-getUserSpecialDir directory = liftIO $ do- let directory' = (fromIntegral . fromEnum) directory- result <- g_get_user_special_dir directory'- checkUnexpectedReturnNULL "g_get_user_special_dir" result- result' <- cstringToText result- return result'----- function g_get_user_runtime_dir--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_user_runtime_dir" g_get_user_runtime_dir :: - IO CString---getUserRuntimeDir ::- (MonadIO m) =>- m T.Text -- result-getUserRuntimeDir = liftIO $ do- result <- g_get_user_runtime_dir- checkUnexpectedReturnNULL "g_get_user_runtime_dir" result- result' <- cstringToText result- return result'----- function g_get_user_name--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_user_name" g_get_user_name :: - IO CString---getUserName ::- (MonadIO m) =>- m T.Text -- result-getUserName = liftIO $ do- result <- g_get_user_name- checkUnexpectedReturnNULL "g_get_user_name" result- result' <- cstringToText result- return result'----- function g_get_user_data_dir--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_user_data_dir" g_get_user_data_dir :: - IO CString---getUserDataDir ::- (MonadIO m) =>- m T.Text -- result-getUserDataDir = liftIO $ do- result <- g_get_user_data_dir- checkUnexpectedReturnNULL "g_get_user_data_dir" result- result' <- cstringToText result- return result'----- function g_get_user_config_dir--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_user_config_dir" g_get_user_config_dir :: - IO CString---getUserConfigDir ::- (MonadIO m) =>- m T.Text -- result-getUserConfigDir = liftIO $ do- result <- g_get_user_config_dir- checkUnexpectedReturnNULL "g_get_user_config_dir" result- result' <- cstringToText result- return result'----- function g_get_user_cache_dir--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_user_cache_dir" g_get_user_cache_dir :: - IO CString---getUserCacheDir ::- (MonadIO m) =>- m T.Text -- result-getUserCacheDir = liftIO $ do- result <- g_get_user_cache_dir- checkUnexpectedReturnNULL "g_get_user_cache_dir" result- result' <- cstringToText result- return result'----- function g_get_tmp_dir--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_tmp_dir" g_get_tmp_dir :: - IO CString---getTmpDir ::- (MonadIO m) =>- m T.Text -- result-getTmpDir = liftIO $ do- result <- g_get_tmp_dir- checkUnexpectedReturnNULL "g_get_tmp_dir" result- result' <- cstringToText result- return result'----- function g_get_system_data_dirs--- Args : []--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_get_system_data_dirs" g_get_system_data_dirs :: - IO (Ptr CString)---getSystemDataDirs ::- (MonadIO m) =>- m [T.Text] -- result-getSystemDataDirs = liftIO $ do- result <- g_get_system_data_dirs- checkUnexpectedReturnNULL "g_get_system_data_dirs" result- result' <- unpackZeroTerminatedUTF8CArray result- return result'----- function g_get_system_config_dirs--- Args : []--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_get_system_config_dirs" g_get_system_config_dirs :: - IO (Ptr CString)---getSystemConfigDirs ::- (MonadIO m) =>- m [T.Text] -- result-getSystemConfigDirs = liftIO $ do- result <- g_get_system_config_dirs- checkUnexpectedReturnNULL "g_get_system_config_dirs" result- result' <- unpackZeroTerminatedUTF8CArray result- return result'----- function g_get_real_time--- Args : []--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_get_real_time" g_get_real_time :: - IO Int64---getRealTime ::- (MonadIO m) =>- m Int64 -- result-getRealTime = liftIO $ do- result <- g_get_real_time- return result----- function g_get_real_name--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_real_name" g_get_real_name :: - IO CString---getRealName ::- (MonadIO m) =>- m T.Text -- result-getRealName = liftIO $ do- result <- g_get_real_name- checkUnexpectedReturnNULL "g_get_real_name" result- result' <- cstringToText result- return result'----- function g_get_prgname--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_prgname" g_get_prgname :: - IO CString---getPrgname ::- (MonadIO m) =>- m T.Text -- result-getPrgname = liftIO $ do- result <- g_get_prgname- checkUnexpectedReturnNULL "g_get_prgname" result- result' <- cstringToText result- return result'----- function g_get_num_processors--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_get_num_processors" g_get_num_processors :: - IO Word32---getNumProcessors ::- (MonadIO m) =>- m Word32 -- result-getNumProcessors = liftIO $ do- result <- g_get_num_processors- return result----- function g_get_monotonic_time--- Args : []--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_get_monotonic_time" g_get_monotonic_time :: - IO Int64---getMonotonicTime ::- (MonadIO m) =>- m Int64 -- result-getMonotonicTime = liftIO $ do- result <- g_get_monotonic_time- return result----- function g_get_locale_variants--- Args : [Arg {argCName = "locale", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_get_locale_variants" g_get_locale_variants :: - CString -> -- locale : TBasicType TUTF8- IO (Ptr CString)---getLocaleVariants ::- (MonadIO m) =>- T.Text -- locale- -> m [T.Text] -- result-getLocaleVariants locale = liftIO $ do- locale' <- textToCString locale- result <- g_get_locale_variants locale'- checkUnexpectedReturnNULL "g_get_locale_variants" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- freeMem locale'- return result'----- function g_get_language_names--- Args : []--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_get_language_names" g_get_language_names :: - IO (Ptr CString)---getLanguageNames ::- (MonadIO m) =>- m [T.Text] -- result-getLanguageNames = liftIO $ do- result <- g_get_language_names- checkUnexpectedReturnNULL "g_get_language_names" result- result' <- unpackZeroTerminatedUTF8CArray result- return result'----- function g_get_host_name--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_host_name" g_get_host_name :: - IO CString---getHostName ::- (MonadIO m) =>- m T.Text -- result-getHostName = liftIO $ do- result <- g_get_host_name- checkUnexpectedReturnNULL "g_get_host_name" result- result' <- cstringToText result- return result'----- function g_get_home_dir--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_home_dir" g_get_home_dir :: - IO CString---getHomeDir ::- (MonadIO m) =>- m T.Text -- result-getHomeDir = liftIO $ do- result <- g_get_home_dir- checkUnexpectedReturnNULL "g_get_home_dir" result- result' <- cstringToText result- return result'----- function g_get_filename_charsets--- Args : [Arg {argCName = "charsets", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_get_filename_charsets" g_get_filename_charsets :: - CString -> -- charsets : TBasicType TUTF8- IO CInt---getFilenameCharsets ::- (MonadIO m) =>- T.Text -- charsets- -> m Bool -- result-getFilenameCharsets charsets = liftIO $ do- charsets' <- textToCString charsets- result <- g_get_filename_charsets charsets'- let result' = (/= 0) result- freeMem charsets'- return result'----- function g_get_environ--- Args : []--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_get_environ" g_get_environ :: - IO (Ptr CString)---getEnviron ::- (MonadIO m) =>- m [T.Text] -- result-getEnviron = liftIO $ do- result <- g_get_environ- checkUnexpectedReturnNULL "g_get_environ" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- return result'----- function g_get_current_time--- Args : [Arg {argCName = "result", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_get_current_time" g_get_current_time :: - Ptr TimeVal -> -- result : TInterface "GLib" "TimeVal"- IO ()---getCurrentTime ::- (MonadIO m) =>- TimeVal -- result_- -> m () -- result-getCurrentTime result_ = liftIO $ do- let result_' = unsafeManagedPtrGetPtr result_- g_get_current_time result_'- touchManagedPtr result_- return ()----- function g_get_current_dir--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_current_dir" g_get_current_dir :: - IO CString---getCurrentDir ::- (MonadIO m) =>- m T.Text -- result-getCurrentDir = liftIO $ do- result <- g_get_current_dir- checkUnexpectedReturnNULL "g_get_current_dir" result- result' <- cstringToText result- freeMem result- return result'----- function g_get_codeset--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_codeset" g_get_codeset :: - IO CString---getCodeset ::- (MonadIO m) =>- m T.Text -- result-getCodeset = liftIO $ do- result <- g_get_codeset- checkUnexpectedReturnNULL "g_get_codeset" result- result' <- cstringToText result- freeMem result- return result'----- function g_get_charset--- Args : [Arg {argCName = "charset", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_get_charset" g_get_charset :: - Ptr CString -> -- charset : TBasicType TUTF8- IO CInt---getCharset ::- (MonadIO m) =>- m (Bool,T.Text) -- result-getCharset = liftIO $ do- charset <- allocMem :: IO (Ptr CString)- result <- g_get_charset charset- let result' = (/= 0) result- charset' <- peek charset- charset'' <- cstringToText charset'- freeMem charset- return (result', charset'')----- function g_get_application_name--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_get_application_name" g_get_application_name :: - IO CString---getApplicationName ::- (MonadIO m) =>- m T.Text -- result-getApplicationName = liftIO $ do- result <- g_get_application_name- checkUnexpectedReturnNULL "g_get_application_name" result- result' <- cstringToText result- return result'----- function g_free--- Args : [Arg {argCName = "mem", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_free" g_free :: - Ptr () -> -- mem : TBasicType TPtr- IO ()---free ::- (MonadIO m) =>- Ptr () -- mem- -> m () -- result-free mem = liftIO $ do- g_free mem- return ()----- function g_format_size_full--- Args : [Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "FormatSizeFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_format_size_full" g_format_size_full :: - Word64 -> -- size : TBasicType TUInt64- CUInt -> -- flags : TInterface "GLib" "FormatSizeFlags"- IO CString---formatSizeFull ::- (MonadIO m) =>- Word64 -- size- -> [FormatSizeFlags] -- flags- -> m T.Text -- result-formatSizeFull size flags = liftIO $ do- let flags' = gflagsToWord flags- result <- g_format_size_full size flags'- checkUnexpectedReturnNULL "g_format_size_full" result- result' <- cstringToText result- freeMem result- return result'----- function g_format_size_for_display--- Args : [Arg {argCName = "size", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_format_size_for_display" g_format_size_for_display :: - Int64 -> -- size : TBasicType TInt64- IO CString--{-# DEPRECATED formatSizeForDisplay ["(Since version 2.30)","This function is broken due to its use of SI"," suffixes to denote IEC units. Use g_format_size() instead."]#-}-formatSizeForDisplay ::- (MonadIO m) =>- Int64 -- size- -> m T.Text -- result-formatSizeForDisplay size = liftIO $ do- result <- g_format_size_for_display size- checkUnexpectedReturnNULL "g_format_size_for_display" result- result' <- cstringToText result- freeMem result- return result'----- function g_format_size--- Args : [Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_format_size" g_format_size :: - Word64 -> -- size : TBasicType TUInt64- IO CString---formatSize ::- (MonadIO m) =>- Word64 -- size- -> m T.Text -- result-formatSize size = liftIO $ do- result <- g_format_size size- checkUnexpectedReturnNULL "g_format_size" result- result' <- cstringToText result- freeMem result- return result'----- function g_find_program_in_path--- Args : [Arg {argCName = "program", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_find_program_in_path" g_find_program_in_path :: - CString -> -- program : TBasicType TUTF8- IO CString---findProgramInPath ::- (MonadIO m) =>- T.Text -- program- -> m T.Text -- result-findProgramInPath program = liftIO $ do- program' <- textToCString program- result <- g_find_program_in_path program'- checkUnexpectedReturnNULL "g_find_program_in_path" result- result' <- cstringToText result- freeMem result- freeMem program'- return result'----- function g_filename_to_utf8--- Args : [Arg {argCName = "opsysstring", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_filename_to_utf8" g_filename_to_utf8 :: - CString -> -- opsysstring : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- Word64 -> -- bytes_read : TBasicType TUInt64- Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---filenameToUtf8 ::- (MonadIO m) =>- T.Text -- opsysstring- -> Int64 -- len- -> Word64 -- bytesRead- -> Word64 -- bytesWritten- -> m T.Text -- result-filenameToUtf8 opsysstring len bytesRead bytesWritten = liftIO $ do- opsysstring' <- textToCString opsysstring- onException (do- result <- propagateGError $ g_filename_to_utf8 opsysstring' len bytesRead bytesWritten- checkUnexpectedReturnNULL "g_filename_to_utf8" result- result' <- cstringToText result- freeMem result- freeMem opsysstring'- return result'- ) (do- freeMem opsysstring'- )----- function g_filename_to_uri--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_filename_to_uri" g_filename_to_uri :: - CString -> -- filename : TBasicType TUTF8- CString -> -- hostname : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---filenameToUri ::- (MonadIO m) =>- T.Text -- filename- -> Maybe (T.Text) -- hostname- -> m T.Text -- result-filenameToUri filename hostname = liftIO $ do- filename' <- textToCString filename- maybeHostname <- case hostname of- Nothing -> return nullPtr- Just jHostname -> do- jHostname' <- textToCString jHostname- return jHostname'- onException (do- result <- propagateGError $ g_filename_to_uri filename' maybeHostname- checkUnexpectedReturnNULL "g_filename_to_uri" result- result' <- cstringToText result- freeMem result- freeMem filename'- freeMem maybeHostname- return result'- ) (do- freeMem filename'- freeMem maybeHostname- )----- function g_filename_from_utf8--- Args : [Arg {argCName = "utf8string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 3 (TBasicType TUInt8))--- throws : True--- Skip return : False--foreign import ccall "g_filename_from_utf8" g_filename_from_utf8 :: - CString -> -- utf8string : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- Ptr Word64 -> -- bytes_read : TBasicType TUInt64- Ptr Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr Word8)---filenameFromUtf8 ::- (MonadIO m) =>- T.Text -- utf8string- -> Int64 -- len- -> m (ByteString,Word64) -- result-filenameFromUtf8 utf8string len = liftIO $ do- utf8string' <- textToCString utf8string- bytesRead <- allocMem :: IO (Ptr Word64)- bytesWritten <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_filename_from_utf8 utf8string' len bytesRead bytesWritten- bytesWritten' <- peek bytesWritten- checkUnexpectedReturnNULL "g_filename_from_utf8" result- result' <- (unpackByteStringWithLength bytesWritten') result- freeMem result- bytesRead' <- peek bytesRead- freeMem utf8string'- freeMem bytesRead- freeMem bytesWritten- return (result', bytesRead')- ) (do- freeMem utf8string'- freeMem bytesRead- freeMem bytesWritten- )----- function g_filename_from_uri--- Args : [Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hostname", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TFileName)--- throws : True--- Skip return : False--foreign import ccall "g_filename_from_uri" g_filename_from_uri :: - CString -> -- uri : TBasicType TUTF8- Ptr CString -> -- hostname : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---filenameFromUri ::- (MonadIO m) =>- T.Text -- uri- -> m ([Char],T.Text) -- result-filenameFromUri uri = liftIO $ do- uri' <- textToCString uri- hostname <- allocMem :: IO (Ptr CString)- onException (do- result <- propagateGError $ g_filename_from_uri uri' hostname- checkUnexpectedReturnNULL "g_filename_from_uri" result- result' <- cstringToString result- freeMem result- hostname' <- peek hostname- hostname'' <- cstringToText hostname'- freeMem hostname'- freeMem uri'- freeMem hostname- return (result', hostname'')- ) (do- freeMem uri'- freeMem hostname- )----- function g_filename_display_name--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_filename_display_name" g_filename_display_name :: - CString -> -- filename : TBasicType TUTF8- IO CString---filenameDisplayName ::- (MonadIO m) =>- T.Text -- filename- -> m T.Text -- result-filenameDisplayName filename = liftIO $ do- filename' <- textToCString filename- result <- g_filename_display_name filename'- checkUnexpectedReturnNULL "g_filename_display_name" result- result' <- cstringToText result- freeMem result- freeMem filename'- return result'----- function g_filename_display_basename--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_filename_display_basename" g_filename_display_basename :: - CString -> -- filename : TBasicType TUTF8- IO CString---filenameDisplayBasename ::- (MonadIO m) =>- T.Text -- filename- -> m T.Text -- result-filenameDisplayBasename filename = liftIO $ do- filename' <- textToCString filename- result <- g_filename_display_basename filename'- checkUnexpectedReturnNULL "g_filename_display_basename" result- result' <- cstringToText result- freeMem result- freeMem filename'- return result'----- function g_file_test--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "test", argType = TInterface "GLib" "FileTest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_file_test" g_file_test :: - CString -> -- filename : TBasicType TUTF8- CUInt -> -- test : TInterface "GLib" "FileTest"- IO CInt---fileTest ::- (MonadIO m) =>- T.Text -- filename- -> [FileTest] -- test- -> m Bool -- result-fileTest filename test = liftIO $ do- filename' <- textToCString filename- let test' = gflagsToWord test- result <- g_file_test filename' test'- let result' = (/= 0) result- freeMem filename'- return result'----- function g_file_set_contents--- Args : [Arg {argCName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "contents", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_file_set_contents" g_file_set_contents :: - CString -> -- filename : TBasicType TFileName- Ptr Word8 -> -- contents : TCArray False (-1) 2 (TBasicType TUInt8)- Int64 -> -- length : TBasicType TInt64- Ptr (Ptr GError) -> -- error- IO CInt---fileSetContents ::- (MonadIO m) =>- [Char] -- filename- -> ByteString -- contents- -> m () -- result-fileSetContents filename contents = liftIO $ do- let length_ = fromIntegral $ B.length contents- filename' <- stringToCString filename- contents' <- packByteString contents- onException (do- _ <- propagateGError $ g_file_set_contents filename' contents' length_- freeMem filename'- freeMem contents'- return ()- ) (do- freeMem filename'- freeMem contents'- )----- function g_file_read_link--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_file_read_link" g_file_read_link :: - CString -> -- filename : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---fileReadLink ::- (MonadIO m) =>- T.Text -- filename- -> m T.Text -- result-fileReadLink filename = liftIO $ do- filename' <- textToCString filename- onException (do- result <- propagateGError $ g_file_read_link filename'- checkUnexpectedReturnNULL "g_file_read_link" result- result' <- cstringToText result- freeMem result- freeMem filename'- return result'- ) (do- freeMem filename'- )----- function g_file_open_tmp--- Args : [Arg {argCName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name_used", argType = TBasicType TFileName, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : True--- Skip return : False--foreign import ccall "g_file_open_tmp" g_file_open_tmp :: - CString -> -- tmpl : TBasicType TFileName- Ptr CString -> -- name_used : TBasicType TFileName- Ptr (Ptr GError) -> -- error- IO Int32---fileOpenTmp ::- (MonadIO m) =>- Maybe ([Char]) -- tmpl- -> m (Int32,[Char]) -- result-fileOpenTmp tmpl = liftIO $ do- maybeTmpl <- case tmpl of- Nothing -> return nullPtr- Just jTmpl -> do- jTmpl' <- stringToCString jTmpl- return jTmpl'- nameUsed <- allocMem :: IO (Ptr CString)- onException (do- result <- propagateGError $ g_file_open_tmp maybeTmpl nameUsed- nameUsed' <- peek nameUsed- nameUsed'' <- cstringToString nameUsed'- freeMem nameUsed'- freeMem maybeTmpl- freeMem nameUsed- return (result, nameUsed'')- ) (do- freeMem maybeTmpl- freeMem nameUsed- )----- function g_file_get_contents--- Args : [Arg {argCName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "contents", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_file_get_contents" g_file_get_contents :: - CString -> -- filename : TBasicType TFileName- Ptr (Ptr Word8) -> -- contents : TCArray False (-1) 2 (TBasicType TUInt8)- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CInt---fileGetContents ::- (MonadIO m) =>- [Char] -- filename- -> m (ByteString) -- result-fileGetContents filename = liftIO $ do- filename' <- stringToCString filename- contents <- allocMem :: IO (Ptr (Ptr Word8))- length_ <- allocMem :: IO (Ptr Word64)- onException (do- _ <- propagateGError $ g_file_get_contents filename' contents length_- length_' <- peek length_- contents' <- peek contents- contents'' <- (unpackByteStringWithLength length_') contents'- freeMem contents'- freeMem filename'- freeMem contents- freeMem length_- return contents''- ) (do- freeMem filename'- freeMem contents- freeMem length_- )----- function g_file_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_file_error_quark" g_file_error_quark :: - IO Word32---fileErrorQuark ::- (MonadIO m) =>- m Word32 -- result-fileErrorQuark = liftIO $ do- result <- g_file_error_quark- return result----- function g_file_error_from_errno--- Args : [Arg {argCName = "err_no", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "FileError")--- throws : False--- Skip return : False--foreign import ccall "g_file_error_from_errno" g_file_error_from_errno :: - Int32 -> -- err_no : TBasicType TInt- IO CUInt---fileErrorFromErrno ::- (MonadIO m) =>- Int32 -- errNo- -> m FileError -- result-fileErrorFromErrno errNo = liftIO $ do- result <- g_file_error_from_errno errNo- let result' = (toEnum . fromIntegral) result- return result'----- function g_environ_unsetenv--- Args : [Arg {argCName = "envp", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_environ_unsetenv" g_environ_unsetenv :: - Ptr CString -> -- envp : TCArray True (-1) (-1) (TBasicType TUTF8)- CString -> -- variable : TBasicType TUTF8- IO (Ptr CString)---environUnsetenv ::- (MonadIO m) =>- Maybe ([T.Text]) -- envp- -> T.Text -- variable- -> m [T.Text] -- result-environUnsetenv envp variable = liftIO $ do- maybeEnvp <- case envp of- Nothing -> return nullPtr- Just jEnvp -> do- jEnvp' <- packZeroTerminatedUTF8CArray jEnvp- return jEnvp'- variable' <- textToCString variable- result <- g_environ_unsetenv maybeEnvp variable'- checkUnexpectedReturnNULL "g_environ_unsetenv" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- freeMem variable'- return result'----- function g_environ_setenv--- Args : [Arg {argCName = "envp", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_environ_setenv" g_environ_setenv :: - Ptr CString -> -- envp : TCArray True (-1) (-1) (TBasicType TUTF8)- CString -> -- variable : TBasicType TUTF8- CString -> -- value : TBasicType TUTF8- CInt -> -- overwrite : TBasicType TBoolean- IO (Ptr CString)---environSetenv ::- (MonadIO m) =>- Maybe ([T.Text]) -- envp- -> T.Text -- variable- -> T.Text -- value- -> Bool -- overwrite- -> m [T.Text] -- result-environSetenv envp variable value overwrite = liftIO $ do- maybeEnvp <- case envp of- Nothing -> return nullPtr- Just jEnvp -> do- jEnvp' <- packZeroTerminatedUTF8CArray jEnvp- return jEnvp'- variable' <- textToCString variable- value' <- textToCString value- let overwrite' = (fromIntegral . fromEnum) overwrite- result <- g_environ_setenv maybeEnvp variable' value' overwrite'- checkUnexpectedReturnNULL "g_environ_setenv" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- freeMem variable'- freeMem value'- return result'----- function g_environ_getenv--- Args : [Arg {argCName = "envp", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_environ_getenv" g_environ_getenv :: - Ptr CString -> -- envp : TCArray True (-1) (-1) (TBasicType TUTF8)- CString -> -- variable : TBasicType TUTF8- IO CString---environGetenv ::- (MonadIO m) =>- Maybe ([T.Text]) -- envp- -> T.Text -- variable- -> m T.Text -- result-environGetenv envp variable = liftIO $ do- maybeEnvp <- case envp of- Nothing -> return nullPtr- Just jEnvp -> do- jEnvp' <- packZeroTerminatedUTF8CArray jEnvp- return jEnvp'- variable' <- textToCString variable- result <- g_environ_getenv maybeEnvp variable'- checkUnexpectedReturnNULL "g_environ_getenv" result- result' <- cstringToText result- mapZeroTerminatedCArray freeMem maybeEnvp- freeMem maybeEnvp- freeMem variable'- return result'----- function g_dpgettext2--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_dpgettext2" g_dpgettext2 :: - CString -> -- domain : TBasicType TUTF8- CString -> -- context : TBasicType TUTF8- CString -> -- msgid : TBasicType TUTF8- IO CString---dpgettext2 ::- (MonadIO m) =>- Maybe (T.Text) -- domain- -> T.Text -- context- -> T.Text -- msgid- -> m T.Text -- result-dpgettext2 domain context msgid = liftIO $ do- maybeDomain <- case domain of- Nothing -> return nullPtr- Just jDomain -> do- jDomain' <- textToCString jDomain- return jDomain'- context' <- textToCString context- msgid' <- textToCString msgid- result <- g_dpgettext2 maybeDomain context' msgid'- checkUnexpectedReturnNULL "g_dpgettext2" result- result' <- cstringToText result- freeMem maybeDomain- freeMem context'- freeMem msgid'- return result'----- function g_dpgettext--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgctxtid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgidoffset", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_dpgettext" g_dpgettext :: - CString -> -- domain : TBasicType TUTF8- CString -> -- msgctxtid : TBasicType TUTF8- Word64 -> -- msgidoffset : TBasicType TUInt64- IO CString---dpgettext ::- (MonadIO m) =>- Maybe (T.Text) -- domain- -> T.Text -- msgctxtid- -> Word64 -- msgidoffset- -> m T.Text -- result-dpgettext domain msgctxtid msgidoffset = liftIO $ do- maybeDomain <- case domain of- Nothing -> return nullPtr- Just jDomain -> do- jDomain' <- textToCString jDomain- return jDomain'- msgctxtid' <- textToCString msgctxtid- result <- g_dpgettext maybeDomain msgctxtid' msgidoffset- checkUnexpectedReturnNULL "g_dpgettext" result- result' <- cstringToText result- freeMem maybeDomain- freeMem msgctxtid'- return result'----- function g_double_hash--- Args : [Arg {argCName = "v", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_double_hash" g_double_hash :: - Ptr () -> -- v : TBasicType TPtr- IO Word32---doubleHash ::- (MonadIO m) =>- Ptr () -- v- -> m Word32 -- result-doubleHash v = liftIO $ do- result <- g_double_hash v- return result----- function g_double_equal--- Args : [Arg {argCName = "v1", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "v2", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_double_equal" g_double_equal :: - Ptr () -> -- v1 : TBasicType TPtr- Ptr () -> -- v2 : TBasicType TPtr- IO CInt---doubleEqual ::- (MonadIO m) =>- Ptr () -- v1- -> Ptr () -- v2- -> m Bool -- result-doubleEqual v1 v2 = liftIO $ do- result <- g_double_equal v1 v2- let result' = (/= 0) result- return result'----- function g_dngettext--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgid_plural", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_dngettext" g_dngettext :: - CString -> -- domain : TBasicType TUTF8- CString -> -- msgid : TBasicType TUTF8- CString -> -- msgid_plural : TBasicType TUTF8- CULong -> -- n : TBasicType TULong- IO CString---dngettext ::- (MonadIO m) =>- Maybe (T.Text) -- domain- -> T.Text -- msgid- -> T.Text -- msgidPlural- -> CULong -- n- -> m T.Text -- result-dngettext domain msgid msgidPlural n = liftIO $ do- maybeDomain <- case domain of- Nothing -> return nullPtr- Just jDomain -> do- jDomain' <- textToCString jDomain- return jDomain'- msgid' <- textToCString msgid- msgidPlural' <- textToCString msgidPlural- result <- g_dngettext maybeDomain msgid' msgidPlural' n- checkUnexpectedReturnNULL "g_dngettext" result- result' <- cstringToText result- freeMem maybeDomain- freeMem msgid'- freeMem msgidPlural'- return result'----- function g_direct_hash--- Args : [Arg {argCName = "v", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_direct_hash" g_direct_hash :: - Ptr () -> -- v : TBasicType TPtr- IO Word32---directHash ::- (MonadIO m) =>- Ptr () -- v- -> m Word32 -- result-directHash v = liftIO $ do- result <- g_direct_hash v- return result----- function g_direct_equal--- Args : [Arg {argCName = "v1", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "v2", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_direct_equal" g_direct_equal :: - Ptr () -> -- v1 : TBasicType TPtr- Ptr () -> -- v2 : TBasicType TPtr- IO CInt---directEqual ::- (MonadIO m) =>- Ptr () -- v1- -> Ptr () -- v2- -> m Bool -- result-directEqual v1 v2 = liftIO $ do- result <- g_direct_equal v1 v2- let result' = (/= 0) result- return result'----- function g_dgettext--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_dgettext" g_dgettext :: - CString -> -- domain : TBasicType TUTF8- CString -> -- msgid : TBasicType TUTF8- IO CString---dgettext ::- (MonadIO m) =>- Maybe (T.Text) -- domain- -> T.Text -- msgid- -> m T.Text -- result-dgettext domain msgid = liftIO $ do- maybeDomain <- case domain of- Nothing -> return nullPtr- Just jDomain -> do- jDomain' <- textToCString jDomain- return jDomain'- msgid' <- textToCString msgid- result <- g_dgettext maybeDomain msgid'- checkUnexpectedReturnNULL "g_dgettext" result- result' <- cstringToText result- freeMem maybeDomain- freeMem msgid'- return result'----- function g_dcgettext--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "msgid", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "category", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_dcgettext" g_dcgettext :: - CString -> -- domain : TBasicType TUTF8- CString -> -- msgid : TBasicType TUTF8- Int32 -> -- category : TBasicType TInt- IO CString---dcgettext ::- (MonadIO m) =>- Maybe (T.Text) -- domain- -> T.Text -- msgid- -> Int32 -- category- -> m T.Text -- result-dcgettext domain msgid category = liftIO $ do- maybeDomain <- case domain of- Nothing -> return nullPtr- Just jDomain -> do- jDomain' <- textToCString jDomain- return jDomain'- msgid' <- textToCString msgid- result <- g_dcgettext maybeDomain msgid' category- checkUnexpectedReturnNULL "g_dcgettext" result- result' <- cstringToText result- freeMem maybeDomain- freeMem msgid'- return result'----- function g_dataset_id_set_data_full--- Args : [Arg {argCName = "dataset_location", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy_func", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_dataset_id_set_data_full" g_dataset_id_set_data_full :: - Ptr () -> -- dataset_location : TBasicType TPtr- Word32 -> -- key_id : TBasicType TUInt32- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- destroy_func : TInterface "GLib" "DestroyNotify"- IO ()---datasetIdSetDataFull ::- (MonadIO m) =>- Ptr () -- datasetLocation- -> Word32 -- keyId- -> Ptr () -- data_- -> DestroyNotify -- destroyFunc- -> m () -- result-datasetIdSetDataFull datasetLocation keyId data_ destroyFunc = liftIO $ do- ptrdestroyFunc <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- destroyFunc' <- mkDestroyNotify (destroyNotifyWrapper (Just ptrdestroyFunc) destroyFunc)- poke ptrdestroyFunc destroyFunc'- g_dataset_id_set_data_full datasetLocation keyId data_ destroyFunc'- return ()----- function g_dataset_destroy--- Args : [Arg {argCName = "dataset_location", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_dataset_destroy" g_dataset_destroy :: - Ptr () -> -- dataset_location : TBasicType TPtr- IO ()---datasetDestroy ::- (MonadIO m) =>- Ptr () -- datasetLocation- -> m () -- result-datasetDestroy datasetLocation = liftIO $ do- g_dataset_destroy datasetLocation- return ()----- function g_datalist_unset_flags--- Args : [Arg {argCName = "datalist", argType = TInterface "GLib" "Data", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_datalist_unset_flags" g_datalist_unset_flags :: - Ptr Data -> -- datalist : TInterface "GLib" "Data"- Word32 -> -- flags : TBasicType TUInt- IO ()---datalistUnsetFlags ::- (MonadIO m) =>- Data -- datalist- -> Word32 -- flags- -> m () -- result-datalistUnsetFlags datalist flags = liftIO $ do- let datalist' = unsafeManagedPtrGetPtr datalist- g_datalist_unset_flags datalist' flags- touchManagedPtr datalist- return ()----- function g_datalist_set_flags--- Args : [Arg {argCName = "datalist", argType = TInterface "GLib" "Data", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_datalist_set_flags" g_datalist_set_flags :: - Ptr Data -> -- datalist : TInterface "GLib" "Data"- Word32 -> -- flags : TBasicType TUInt- IO ()---datalistSetFlags ::- (MonadIO m) =>- Data -- datalist- -> Word32 -- flags- -> m () -- result-datalistSetFlags datalist flags = liftIO $ do- let datalist' = unsafeManagedPtrGetPtr datalist- g_datalist_set_flags datalist' flags- touchManagedPtr datalist- return ()----- function g_datalist_init--- Args : [Arg {argCName = "datalist", argType = TInterface "GLib" "Data", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_datalist_init" g_datalist_init :: - Ptr Data -> -- datalist : TInterface "GLib" "Data"- IO ()---datalistInit ::- (MonadIO m) =>- Data -- datalist- -> m () -- result-datalistInit datalist = liftIO $ do- let datalist' = unsafeManagedPtrGetPtr datalist- g_datalist_init datalist'- touchManagedPtr datalist- return ()----- function g_datalist_id_set_data_full--- Args : [Arg {argCName = "datalist", argType = TInterface "GLib" "Data", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy_func", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_datalist_id_set_data_full" g_datalist_id_set_data_full :: - Ptr Data -> -- datalist : TInterface "GLib" "Data"- Word32 -> -- key_id : TBasicType TUInt32- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- destroy_func : TInterface "GLib" "DestroyNotify"- IO ()---datalistIdSetDataFull ::- (MonadIO m) =>- Data -- datalist- -> Word32 -- keyId- -> Ptr () -- data_- -> DestroyNotify -- destroyFunc- -> m () -- result-datalistIdSetDataFull datalist keyId data_ destroyFunc = liftIO $ do- let datalist' = unsafeManagedPtrGetPtr datalist- ptrdestroyFunc <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- destroyFunc' <- mkDestroyNotify (destroyNotifyWrapper (Just ptrdestroyFunc) destroyFunc)- poke ptrdestroyFunc destroyFunc'- g_datalist_id_set_data_full datalist' keyId data_ destroyFunc'- touchManagedPtr datalist- return ()----- function g_datalist_id_replace_data--- Args : [Arg {argCName = "datalist", argType = TInterface "GLib" "Data", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oldval", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "newval", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "old_destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_datalist_id_replace_data" g_datalist_id_replace_data :: - Ptr Data -> -- datalist : TInterface "GLib" "Data"- Word32 -> -- key_id : TBasicType TUInt32- Ptr () -> -- oldval : TBasicType TPtr- Ptr () -> -- newval : TBasicType TPtr- FunPtr DestroyNotifyC -> -- destroy : TInterface "GLib" "DestroyNotify"- FunPtr DestroyNotifyC -> -- old_destroy : TInterface "GLib" "DestroyNotify"- IO CInt---datalistIdReplaceData ::- (MonadIO m) =>- Data -- datalist- -> Word32 -- keyId- -> Ptr () -- oldval- -> Ptr () -- newval- -> Maybe (DestroyNotify) -- destroy- -> Maybe (DestroyNotify) -- oldDestroy- -> m Bool -- result-datalistIdReplaceData datalist keyId oldval newval destroy oldDestroy = liftIO $ do- let datalist' = unsafeManagedPtrGetPtr datalist- ptrdestroy <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- maybeDestroy <- case destroy of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jDestroy -> do- jDestroy' <- mkDestroyNotify (destroyNotifyWrapper (Just ptrdestroy) jDestroy)- poke ptrdestroy jDestroy'- return jDestroy'- ptroldDestroy <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- maybeOldDestroy <- case oldDestroy of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jOldDestroy -> do- jOldDestroy' <- mkDestroyNotify (destroyNotifyWrapper (Just ptroldDestroy) jOldDestroy)- poke ptroldDestroy jOldDestroy'- return jOldDestroy'- result <- g_datalist_id_replace_data datalist' keyId oldval newval maybeDestroy maybeOldDestroy- let result' = (/= 0) result- touchManagedPtr datalist- return result'----- function g_datalist_get_flags--- Args : [Arg {argCName = "datalist", argType = TInterface "GLib" "Data", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_datalist_get_flags" g_datalist_get_flags :: - Ptr Data -> -- datalist : TInterface "GLib" "Data"- IO Word32---datalistGetFlags ::- (MonadIO m) =>- Data -- datalist- -> m Word32 -- result-datalistGetFlags datalist = liftIO $ do- let datalist' = unsafeManagedPtrGetPtr datalist- result <- g_datalist_get_flags datalist'- touchManagedPtr datalist- return result----- function g_datalist_clear--- Args : [Arg {argCName = "datalist", argType = TInterface "GLib" "Data", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_datalist_clear" g_datalist_clear :: - Ptr Data -> -- datalist : TInterface "GLib" "Data"- IO ()---datalistClear ::- (MonadIO m) =>- Data -- datalist- -> m () -- result-datalistClear datalist = liftIO $ do- let datalist' = unsafeManagedPtrGetPtr datalist- g_datalist_clear datalist'- touchManagedPtr datalist- return ()----- function g_convert_with_iconv--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "converter", argType = TInterface "GLib" "IConv", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_convert_with_iconv" g_convert_with_iconv :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- Ptr IConv -> -- converter : TInterface "GLib" "IConv"- Word64 -> -- bytes_read : TBasicType TUInt64- Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---convertWithIconv ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> IConv -- converter- -> Word64 -- bytesRead- -> Word64 -- bytesWritten- -> m T.Text -- result-convertWithIconv str len converter bytesRead bytesWritten = liftIO $ do- str' <- textToCString str- let converter' = unsafeManagedPtrGetPtr converter- onException (do- result <- propagateGError $ g_convert_with_iconv str' len converter' bytesRead bytesWritten- checkUnexpectedReturnNULL "g_convert_with_iconv" result- result' <- cstringToText result- freeMem result- touchManagedPtr converter- freeMem str'- return result'- ) (do- freeMem str'- )----- function g_convert_with_fallback--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "to_codeset", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "from_codeset", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fallback", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_convert_with_fallback" g_convert_with_fallback :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- CString -> -- to_codeset : TBasicType TUTF8- CString -> -- from_codeset : TBasicType TUTF8- CString -> -- fallback : TBasicType TUTF8- Word64 -> -- bytes_read : TBasicType TUInt64- Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---convertWithFallback ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> T.Text -- toCodeset- -> T.Text -- fromCodeset- -> T.Text -- fallback- -> Word64 -- bytesRead- -> Word64 -- bytesWritten- -> m T.Text -- result-convertWithFallback str len toCodeset fromCodeset fallback bytesRead bytesWritten = liftIO $ do- str' <- textToCString str- toCodeset' <- textToCString toCodeset- fromCodeset' <- textToCString fromCodeset- fallback' <- textToCString fallback- onException (do- result <- propagateGError $ g_convert_with_fallback str' len toCodeset' fromCodeset' fallback' bytesRead bytesWritten- checkUnexpectedReturnNULL "g_convert_with_fallback" result- result' <- cstringToText result- freeMem result- freeMem str'- freeMem toCodeset'- freeMem fromCodeset'- freeMem fallback'- return result'- ) (do- freeMem str'- freeMem toCodeset'- freeMem fromCodeset'- freeMem fallback'- )----- function g_convert_error_quark--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_convert_error_quark" g_convert_error_quark :: - IO Word32---convertErrorQuark ::- (MonadIO m) =>- m Word32 -- result-convertErrorQuark = liftIO $ do- result <- g_convert_error_quark- return result----- function g_convert--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "to_codeset", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "from_codeset", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_convert" g_convert :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- CString -> -- to_codeset : TBasicType TUTF8- CString -> -- from_codeset : TBasicType TUTF8- Ptr Word64 -> -- bytes_read : TBasicType TUInt64- Ptr Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---convert ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> T.Text -- toCodeset- -> T.Text -- fromCodeset- -> m (T.Text,Word64,Word64) -- result-convert str len toCodeset fromCodeset = liftIO $ do- str' <- textToCString str- toCodeset' <- textToCString toCodeset- fromCodeset' <- textToCString fromCodeset- bytesRead <- allocMem :: IO (Ptr Word64)- bytesWritten <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_convert str' len toCodeset' fromCodeset' bytesRead bytesWritten- checkUnexpectedReturnNULL "g_convert" result- result' <- cstringToText result- freeMem result- bytesRead' <- peek bytesRead- bytesWritten' <- peek bytesWritten- freeMem str'- freeMem toCodeset'- freeMem fromCodeset'- freeMem bytesRead- freeMem bytesWritten- return (result', bytesRead', bytesWritten')- ) (do- freeMem str'- freeMem toCodeset'- freeMem fromCodeset'- freeMem bytesRead- freeMem bytesWritten- )----- function g_compute_hmac_for_string--- Args : [Arg {argCName = "digest_type", argType = TInterface "GLib" "ChecksumType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "key_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_compute_hmac_for_string" g_compute_hmac_for_string :: - CUInt -> -- digest_type : TInterface "GLib" "ChecksumType"- Ptr Word8 -> -- key : TCArray False (-1) 2 (TBasicType TUInt8)- Word64 -> -- key_len : TBasicType TUInt64- CString -> -- str : TBasicType TUTF8- Int64 -> -- length : TBasicType TInt64- IO CString---computeHmacForString ::- (MonadIO m) =>- ChecksumType -- digestType- -> ByteString -- key- -> T.Text -- str- -> Int64 -- length_- -> m T.Text -- result-computeHmacForString digestType key str length_ = liftIO $ do- let keyLen = fromIntegral $ B.length key- let digestType' = (fromIntegral . fromEnum) digestType- key' <- packByteString key- str' <- textToCString str- result <- g_compute_hmac_for_string digestType' key' keyLen str' length_- checkUnexpectedReturnNULL "g_compute_hmac_for_string" result- result' <- cstringToText result- freeMem result- freeMem key'- freeMem str'- return result'----- function g_compute_hmac_for_data--- Args : [Arg {argCName = "digest_type", argType = TInterface "GLib" "ChecksumType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "key_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_compute_hmac_for_data" g_compute_hmac_for_data :: - CUInt -> -- digest_type : TInterface "GLib" "ChecksumType"- Ptr Word8 -> -- key : TCArray False (-1) 2 (TBasicType TUInt8)- Word64 -> -- key_len : TBasicType TUInt64- Word8 -> -- data : TBasicType TUInt8- Word64 -> -- length : TBasicType TUInt64- IO CString---computeHmacForData ::- (MonadIO m) =>- ChecksumType -- digestType- -> ByteString -- key- -> Word8 -- data_- -> Word64 -- length_- -> m T.Text -- result-computeHmacForData digestType key data_ length_ = liftIO $ do- let keyLen = fromIntegral $ B.length key- let digestType' = (fromIntegral . fromEnum) digestType- key' <- packByteString key- result <- g_compute_hmac_for_data digestType' key' keyLen data_ length_- checkUnexpectedReturnNULL "g_compute_hmac_for_data" result- result' <- cstringToText result- freeMem result- freeMem key'- return result'----- function g_compute_checksum_for_string--- Args : [Arg {argCName = "checksum_type", argType = TInterface "GLib" "ChecksumType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_compute_checksum_for_string" g_compute_checksum_for_string :: - CUInt -> -- checksum_type : TInterface "GLib" "ChecksumType"- CString -> -- str : TBasicType TUTF8- Int64 -> -- length : TBasicType TInt64- IO CString---computeChecksumForString ::- (MonadIO m) =>- ChecksumType -- checksumType- -> T.Text -- str- -> Int64 -- length_- -> m T.Text -- result-computeChecksumForString checksumType str length_ = liftIO $ do- let checksumType' = (fromIntegral . fromEnum) checksumType- str' <- textToCString str- result <- g_compute_checksum_for_string checksumType' str' length_- checkUnexpectedReturnNULL "g_compute_checksum_for_string" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_compute_checksum_for_data--- Args : [Arg {argCName = "checksum_type", argType = TInterface "GLib" "ChecksumType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_compute_checksum_for_data" g_compute_checksum_for_data :: - CUInt -> -- checksum_type : TInterface "GLib" "ChecksumType"- Ptr Word8 -> -- data : TCArray False (-1) 2 (TBasicType TUInt8)- Word64 -> -- length : TBasicType TUInt64- IO CString---computeChecksumForData ::- (MonadIO m) =>- ChecksumType -- checksumType- -> ByteString -- data_- -> m T.Text -- result-computeChecksumForData checksumType data_ = liftIO $ do- let length_ = fromIntegral $ B.length data_- let checksumType' = (fromIntegral . fromEnum) checksumType- data_' <- packByteString data_- result <- g_compute_checksum_for_data checksumType' data_' length_- checkUnexpectedReturnNULL "g_compute_checksum_for_data" result- result' <- cstringToText result- freeMem result- freeMem data_'- return result'----- function g_compute_checksum_for_bytes--- Args : [Arg {argCName = "checksum_type", argType = TInterface "GLib" "ChecksumType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_compute_checksum_for_bytes" g_compute_checksum_for_bytes :: - CUInt -> -- checksum_type : TInterface "GLib" "ChecksumType"- Ptr Bytes -> -- data : TInterface "GLib" "Bytes"- IO CString---computeChecksumForBytes ::- (MonadIO m) =>- ChecksumType -- checksumType- -> Bytes -- data_- -> m T.Text -- result-computeChecksumForBytes checksumType data_ = liftIO $ do- let checksumType' = (fromIntegral . fromEnum) checksumType- let data_' = unsafeManagedPtrGetPtr data_- result <- g_compute_checksum_for_bytes checksumType' data_'- checkUnexpectedReturnNULL "g_compute_checksum_for_bytes" result- result' <- cstringToText result- freeMem result- touchManagedPtr data_- return result'----- function g_close--- Args : [Arg {argCName = "fd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_close" g_close :: - Int32 -> -- fd : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---close ::- (MonadIO m) =>- Int32 -- fd- -> m () -- result-close fd = liftIO $ do- onException (do- _ <- propagateGError $ g_close fd- return ()- ) (do- return ()- )----- function g_clear_error--- Args : []--- Lengths : []--- returnType : Nothing--- throws : True--- Skip return : False--foreign import ccall "g_clear_error" g_clear_error :: - Ptr (Ptr GError) -> -- error- IO ()---clearError ::- (MonadIO m) =>- m () -- result-clearError = liftIO $ do- onException (do- propagateGError $ g_clear_error- return ()- ) (do- return ()- )----- function g_child_watch_source_new--- Args : [Arg {argCName = "pid", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_child_watch_source_new" g_child_watch_source_new :: - Int32 -> -- pid : TBasicType TInt- IO (Ptr Source)---childWatchSourceNew ::- (MonadIO m) =>- Int32 -- pid- -> m Source -- result-childWatchSourceNew pid = liftIO $ do- result <- g_child_watch_source_new pid- checkUnexpectedReturnNULL "g_child_watch_source_new" result- result' <- (wrapBoxed Source) result- return result'----- function g_child_watch_add_full--- Args : [Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pid", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "function", argType = TInterface "GLib" "ChildWatchFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_child_watch_add_full" g_child_watch_add_full :: - Int32 -> -- priority : TBasicType TInt- Int32 -> -- pid : TBasicType TInt- FunPtr ChildWatchFuncC -> -- function : TInterface "GLib" "ChildWatchFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO Word32---childWatchAdd ::- (MonadIO m) =>- Int32 -- priority- -> Int32 -- pid- -> ChildWatchFunc -- function- -> m Word32 -- result-childWatchAdd priority pid function = liftIO $ do- function' <- mkChildWatchFunc (childWatchFuncWrapper Nothing function)- let data_ = castFunPtrToPtr function'- let notify = safeFreeFunPtrPtr- result <- g_child_watch_add_full priority pid function' data_ notify- return result----- function glib_check_version--- Args : [Arg {argCName = "required_major", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "required_minor", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "required_micro", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "glib_check_version" glib_check_version :: - Word32 -> -- required_major : TBasicType TUInt- Word32 -> -- required_minor : TBasicType TUInt- Word32 -> -- required_micro : TBasicType TUInt- IO CString---checkVersion ::- (MonadIO m) =>- Word32 -- requiredMajor- -> Word32 -- requiredMinor- -> Word32 -- requiredMicro- -> m T.Text -- result-checkVersion requiredMajor requiredMinor requiredMicro = liftIO $ do- result <- glib_check_version requiredMajor requiredMinor requiredMicro- checkUnexpectedReturnNULL "glib_check_version" result- result' <- cstringToText result- return result'----- function g_chdir--- Args : [Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_chdir" g_chdir :: - CString -> -- path : TBasicType TUTF8- IO Int32---chdir ::- (MonadIO m) =>- T.Text -- path- -> m Int32 -- result-chdir path = liftIO $ do- path' <- textToCString path- result <- g_chdir path'- freeMem path'- return result----- function g_build_pathv--- Args : [Arg {argCName = "separator", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "args", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_build_pathv" g_build_pathv :: - CString -> -- separator : TBasicType TUTF8- Ptr CString -> -- args : TCArray True (-1) (-1) (TBasicType TUTF8)- IO CString---buildPathv ::- (MonadIO m) =>- T.Text -- separator- -> [T.Text] -- args- -> m T.Text -- result-buildPathv separator args = liftIO $ do- separator' <- textToCString separator- args' <- packZeroTerminatedUTF8CArray args- result <- g_build_pathv separator' args'- checkUnexpectedReturnNULL "g_build_pathv" result- result' <- cstringToText result- freeMem result- freeMem separator'- mapZeroTerminatedCArray freeMem args'- freeMem args'- return result'----- function g_build_filenamev--- Args : [Arg {argCName = "args", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_build_filenamev" g_build_filenamev :: - Ptr CString -> -- args : TCArray True (-1) (-1) (TBasicType TUTF8)- IO CString---buildFilenamev ::- (MonadIO m) =>- [T.Text] -- args- -> m T.Text -- result-buildFilenamev args = liftIO $ do- args' <- packZeroTerminatedUTF8CArray args- result <- g_build_filenamev args'- checkUnexpectedReturnNULL "g_build_filenamev" result- result' <- cstringToText result- freeMem result- mapZeroTerminatedCArray freeMem args'- freeMem args'- return result'----- function g_bit_unlock--- Args : [Arg {argCName = "address", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lock_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bit_unlock" g_bit_unlock :: - Int32 -> -- address : TBasicType TInt- Int32 -> -- lock_bit : TBasicType TInt- IO ()---bitUnlock ::- (MonadIO m) =>- Int32 -- address- -> Int32 -- lockBit- -> m () -- result-bitUnlock address lockBit = liftIO $ do- g_bit_unlock address lockBit- return ()----- function g_bit_trylock--- Args : [Arg {argCName = "address", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lock_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_bit_trylock" g_bit_trylock :: - Int32 -> -- address : TBasicType TInt- Int32 -> -- lock_bit : TBasicType TInt- IO CInt---bitTrylock ::- (MonadIO m) =>- Int32 -- address- -> Int32 -- lockBit- -> m Bool -- result-bitTrylock address lockBit = liftIO $ do- result <- g_bit_trylock address lockBit- let result' = (/= 0) result- return result'----- function g_bit_storage--- Args : [Arg {argCName = "number", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_bit_storage" g_bit_storage :: - CULong -> -- number : TBasicType TULong- IO Word32---bitStorage ::- (MonadIO m) =>- CULong -- number- -> m Word32 -- result-bitStorage number = liftIO $ do- result <- g_bit_storage number- return result----- function g_bit_nth_msf--- Args : [Arg {argCName = "mask", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nth_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_bit_nth_msf" g_bit_nth_msf :: - CULong -> -- mask : TBasicType TULong- Int32 -> -- nth_bit : TBasicType TInt- IO Int32---bitNthMsf ::- (MonadIO m) =>- CULong -- mask- -> Int32 -- nthBit- -> m Int32 -- result-bitNthMsf mask nthBit = liftIO $ do- result <- g_bit_nth_msf mask nthBit- return result----- function g_bit_nth_lsf--- Args : [Arg {argCName = "mask", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nth_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_bit_nth_lsf" g_bit_nth_lsf :: - CULong -> -- mask : TBasicType TULong- Int32 -> -- nth_bit : TBasicType TInt- IO Int32---bitNthLsf ::- (MonadIO m) =>- CULong -- mask- -> Int32 -- nthBit- -> m Int32 -- result-bitNthLsf mask nthBit = liftIO $ do- result <- g_bit_nth_lsf mask nthBit- return result----- function g_bit_lock--- Args : [Arg {argCName = "address", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lock_bit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bit_lock" g_bit_lock :: - Int32 -> -- address : TBasicType TInt- Int32 -> -- lock_bit : TBasicType TInt- IO ()---bitLock ::- (MonadIO m) =>- Int32 -- address- -> Int32 -- lockBit- -> m () -- result-bitLock address lockBit = liftIO $ do- g_bit_lock address lockBit- return ()----- function g_basename--- Args : [Arg {argCName = "file_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_basename" g_basename :: - CString -> -- file_name : TBasicType TUTF8- IO CString--{-# DEPRECATED basename ["(Since version 2.2)","Use g_path_get_basename() instead, but notice"," that g_path_get_basename() allocates new memory for the"," returned string, unlike this function which returns a pointer"," into the argument."]#-}-basename ::- (MonadIO m) =>- T.Text -- fileName- -> m T.Text -- result-basename fileName = liftIO $ do- fileName' <- textToCString fileName- result <- g_basename fileName'- checkUnexpectedReturnNULL "g_basename" result- result' <- cstringToText result- freeMem fileName'- return result'----- function g_base64_encode--- Args : [Arg {argCName = "data", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_base64_encode" g_base64_encode :: - Ptr Word8 -> -- data : TCArray False (-1) 1 (TBasicType TUInt8)- Word64 -> -- len : TBasicType TUInt64- IO CString---base64Encode ::- (MonadIO m) =>- ByteString -- data_- -> m T.Text -- result-base64Encode data_ = liftIO $ do- let len = fromIntegral $ B.length data_- data_' <- packByteString data_- result <- g_base64_encode data_' len- checkUnexpectedReturnNULL "g_base64_encode" result- result' <- cstringToText result- freeMem result- freeMem data_'- return result'----- function g_base64_decode_inplace--- Args : [Arg {argCName = "text", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "out_len", argType = TBasicType TUInt64, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "out_len", argType = TBasicType TUInt64, direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUInt8)--- throws : False--- Skip return : False--foreign import ccall "g_base64_decode_inplace" g_base64_decode_inplace :: - Ptr (Ptr Word8) -> -- text : TCArray False (-1) 1 (TBasicType TUInt8)- Ptr Word64 -> -- out_len : TBasicType TUInt64- IO Word8---base64DecodeInplace ::- (MonadIO m) =>- ByteString -- text- -> m (Word8,ByteString) -- result-base64DecodeInplace text = liftIO $ do- let outLen = fromIntegral $ B.length text- text' <- packByteString text- text'' <- allocMem :: IO (Ptr (Ptr Word8))- poke text'' text'- outLen' <- allocMem :: IO (Ptr Word64)- poke outLen' outLen- result <- g_base64_decode_inplace text'' outLen'- outLen'' <- peek outLen'- text''' <- peek text''- text'''' <- (unpackByteStringWithLength outLen'') text'''- freeMem text'''- freeMem text''- freeMem outLen'- return (result, text'''')----- function g_base64_decode--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "out_len", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "out_len", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 1 (TBasicType TUInt8))--- throws : False--- Skip return : False--foreign import ccall "g_base64_decode" g_base64_decode :: - CString -> -- text : TBasicType TUTF8- Ptr Word64 -> -- out_len : TBasicType TUInt64- IO (Ptr Word8)---base64Decode ::- (MonadIO m) =>- T.Text -- text- -> m ByteString -- result-base64Decode text = liftIO $ do- text' <- textToCString text- outLen <- allocMem :: IO (Ptr Word64)- result <- g_base64_decode text' outLen- outLen' <- peek outLen- checkUnexpectedReturnNULL "g_base64_decode" result- result' <- (unpackByteStringWithLength outLen') result- freeMem result- freeMem text'- freeMem outLen- return result'----- function g_atomic_pointer_xor--- Args : [Arg {argCName = "atomic", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_pointer_xor" g_atomic_pointer_xor :: - Ptr () -> -- atomic : TBasicType TPtr- Word64 -> -- val : TBasicType TUInt64- IO Word64---atomicPointerXor ::- (MonadIO m) =>- Ptr () -- atomic- -> Word64 -- val- -> m Word64 -- result-atomicPointerXor atomic val = liftIO $ do- result <- g_atomic_pointer_xor atomic val- return result----- function g_atomic_pointer_set--- Args : [Arg {argCName = "atomic", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "newval", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_atomic_pointer_set" g_atomic_pointer_set :: - Ptr () -> -- atomic : TBasicType TPtr- Ptr () -> -- newval : TBasicType TPtr- IO ()---atomicPointerSet ::- (MonadIO m) =>- Ptr () -- atomic- -> Ptr () -- newval- -> m () -- result-atomicPointerSet atomic newval = liftIO $ do- g_atomic_pointer_set atomic newval- return ()----- function g_atomic_pointer_or--- Args : [Arg {argCName = "atomic", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_pointer_or" g_atomic_pointer_or :: - Ptr () -> -- atomic : TBasicType TPtr- Word64 -> -- val : TBasicType TUInt64- IO Word64---atomicPointerOr ::- (MonadIO m) =>- Ptr () -- atomic- -> Word64 -- val- -> m Word64 -- result-atomicPointerOr atomic val = liftIO $ do- result <- g_atomic_pointer_or atomic val- return result----- function g_atomic_pointer_compare_and_exchange--- Args : [Arg {argCName = "atomic", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oldval", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "newval", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_pointer_compare_and_exchange" g_atomic_pointer_compare_and_exchange :: - Ptr () -> -- atomic : TBasicType TPtr- Ptr () -> -- oldval : TBasicType TPtr- Ptr () -> -- newval : TBasicType TPtr- IO CInt---atomicPointerCompareAndExchange ::- (MonadIO m) =>- Ptr () -- atomic- -> Ptr () -- oldval- -> Ptr () -- newval- -> m Bool -- result-atomicPointerCompareAndExchange atomic oldval newval = liftIO $ do- result <- g_atomic_pointer_compare_and_exchange atomic oldval newval- let result' = (/= 0) result- return result'----- function g_atomic_pointer_and--- Args : [Arg {argCName = "atomic", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_pointer_and" g_atomic_pointer_and :: - Ptr () -> -- atomic : TBasicType TPtr- Word64 -> -- val : TBasicType TUInt64- IO Word64---atomicPointerAnd ::- (MonadIO m) =>- Ptr () -- atomic- -> Word64 -- val- -> m Word64 -- result-atomicPointerAnd atomic val = liftIO $ do- result <- g_atomic_pointer_and atomic val- return result----- function g_atomic_pointer_add--- Args : [Arg {argCName = "atomic", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_pointer_add" g_atomic_pointer_add :: - Ptr () -> -- atomic : TBasicType TPtr- Int64 -> -- val : TBasicType TInt64- IO Int64---atomicPointerAdd ::- (MonadIO m) =>- Ptr () -- atomic- -> Int64 -- val- -> m Int64 -- result-atomicPointerAdd atomic val = liftIO $ do- result <- g_atomic_pointer_add atomic val- return result----- function g_atomic_int_xor--- Args : [Arg {argCName = "atomic", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_xor" g_atomic_int_xor :: - Word32 -> -- atomic : TBasicType TUInt- Word32 -> -- val : TBasicType TUInt- IO Word32---atomicIntXor ::- (MonadIO m) =>- Word32 -- atomic- -> Word32 -- val- -> m Word32 -- result-atomicIntXor atomic val = liftIO $ do- result <- g_atomic_int_xor atomic val- return result----- function g_atomic_int_set--- Args : [Arg {argCName = "atomic", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "newval", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_set" g_atomic_int_set :: - Int32 -> -- atomic : TBasicType TInt- Int32 -> -- newval : TBasicType TInt- IO ()---atomicIntSet ::- (MonadIO m) =>- Int32 -- atomic- -> Int32 -- newval- -> m () -- result-atomicIntSet atomic newval = liftIO $ do- g_atomic_int_set atomic newval- return ()----- function g_atomic_int_or--- Args : [Arg {argCName = "atomic", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_or" g_atomic_int_or :: - Word32 -> -- atomic : TBasicType TUInt- Word32 -> -- val : TBasicType TUInt- IO Word32---atomicIntOr ::- (MonadIO m) =>- Word32 -- atomic- -> Word32 -- val- -> m Word32 -- result-atomicIntOr atomic val = liftIO $ do- result <- g_atomic_int_or atomic val- return result----- function g_atomic_int_inc--- Args : [Arg {argCName = "atomic", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_inc" g_atomic_int_inc :: - Int32 -> -- atomic : TBasicType TInt- IO ()---atomicIntInc ::- (MonadIO m) =>- Int32 -- atomic- -> m () -- result-atomicIntInc atomic = liftIO $ do- g_atomic_int_inc atomic- return ()----- function g_atomic_int_get--- Args : [Arg {argCName = "atomic", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_get" g_atomic_int_get :: - Int32 -> -- atomic : TBasicType TInt- IO Int32---atomicIntGet ::- (MonadIO m) =>- Int32 -- atomic- -> m Int32 -- result-atomicIntGet atomic = liftIO $ do- result <- g_atomic_int_get atomic- return result----- function g_atomic_int_exchange_and_add--- Args : [Arg {argCName = "atomic", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_exchange_and_add" g_atomic_int_exchange_and_add :: - Int32 -> -- atomic : TBasicType TInt- Int32 -> -- val : TBasicType TInt- IO Int32--{-# DEPRECATED atomicIntExchangeAndAdd ["(Since version 2.30)","Use g_atomic_int_add() instead."]#-}-atomicIntExchangeAndAdd ::- (MonadIO m) =>- Int32 -- atomic- -> Int32 -- val- -> m Int32 -- result-atomicIntExchangeAndAdd atomic val = liftIO $ do- result <- g_atomic_int_exchange_and_add atomic val- return result----- function g_atomic_int_dec_and_test--- Args : [Arg {argCName = "atomic", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_dec_and_test" g_atomic_int_dec_and_test :: - Int32 -> -- atomic : TBasicType TInt- IO CInt---atomicIntDecAndTest ::- (MonadIO m) =>- Int32 -- atomic- -> m Bool -- result-atomicIntDecAndTest atomic = liftIO $ do- result <- g_atomic_int_dec_and_test atomic- let result' = (/= 0) result- return result'----- function g_atomic_int_compare_and_exchange--- Args : [Arg {argCName = "atomic", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oldval", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "newval", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_compare_and_exchange" g_atomic_int_compare_and_exchange :: - Int32 -> -- atomic : TBasicType TInt- Int32 -> -- oldval : TBasicType TInt- Int32 -> -- newval : TBasicType TInt- IO CInt---atomicIntCompareAndExchange ::- (MonadIO m) =>- Int32 -- atomic- -> Int32 -- oldval- -> Int32 -- newval- -> m Bool -- result-atomicIntCompareAndExchange atomic oldval newval = liftIO $ do- result <- g_atomic_int_compare_and_exchange atomic oldval newval- let result' = (/= 0) result- return result'----- function g_atomic_int_and--- Args : [Arg {argCName = "atomic", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_and" g_atomic_int_and :: - Word32 -> -- atomic : TBasicType TUInt- Word32 -> -- val : TBasicType TUInt- IO Word32---atomicIntAnd ::- (MonadIO m) =>- Word32 -- atomic- -> Word32 -- val- -> m Word32 -- result-atomicIntAnd atomic val = liftIO $ do- result <- g_atomic_int_and atomic val- return result----- function g_atomic_int_add--- Args : [Arg {argCName = "atomic", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_atomic_int_add" g_atomic_int_add :: - Int32 -> -- atomic : TBasicType TInt- Int32 -> -- val : TBasicType TInt- IO Int32---atomicIntAdd ::- (MonadIO m) =>- Int32 -- atomic- -> Int32 -- val- -> m Int32 -- result-atomicIntAdd atomic val = liftIO $ do- result <- g_atomic_int_add atomic val- return result----- function g_atexit--- Args : [Arg {argCName = "func", argType = TInterface "GLib" "VoidFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_atexit" g_atexit :: - FunPtr VoidFuncC -> -- func : TInterface "GLib" "VoidFunc"- IO ()--{-# DEPRECATED atexit ["(Since version 2.32)","It is best to avoid g_atexit()."]#-}-atexit ::- (MonadIO m) =>- VoidFunc -- func- -> m () -- result-atexit func = liftIO $ do- ptrfunc <- callocMem :: IO (Ptr (FunPtr VoidFuncC))- func' <- mkVoidFunc (voidFuncWrapper (Just ptrfunc) func)- poke ptrfunc func'- g_atexit func'- return ()----- function g_assertion_message_expr--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "expr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_assertion_message_expr" g_assertion_message_expr :: - CString -> -- domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- func : TBasicType TUTF8- CString -> -- expr : TBasicType TUTF8- IO ()---assertionMessageExpr ::- (MonadIO m) =>- T.Text -- domain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- func- -> T.Text -- expr- -> m () -- result-assertionMessageExpr domain file line func expr = liftIO $ do- domain' <- textToCString domain- file' <- textToCString file- func' <- textToCString func- expr' <- textToCString expr- g_assertion_message_expr domain' file' line func' expr'- freeMem domain'- freeMem file'- freeMem func'- freeMem expr'- return ()----- function g_assertion_message_error--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "expr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "error", argType = TError, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "error_domain", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "error_code", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_assertion_message_error" g_assertion_message_error :: - CString -> -- domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- func : TBasicType TUTF8- CString -> -- expr : TBasicType TUTF8- Ptr GError -> -- error : TError- Word32 -> -- error_domain : TBasicType TUInt32- Int32 -> -- error_code : TBasicType TInt- IO ()---assertionMessageError ::- (MonadIO m) =>- T.Text -- domain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- func- -> T.Text -- expr- -> GError -- error_- -> Word32 -- errorDomain- -> Int32 -- errorCode- -> m () -- result-assertionMessageError domain file line func expr error_ errorDomain errorCode = liftIO $ do- domain' <- textToCString domain- file' <- textToCString file- func' <- textToCString func- expr' <- textToCString expr- let error_' = unsafeManagedPtrGetPtr error_- g_assertion_message_error domain' file' line func' expr' error_' errorDomain errorCode- touchManagedPtr error_- freeMem domain'- freeMem file'- freeMem func'- freeMem expr'- return ()----- function g_assertion_message_cmpstr--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "expr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "arg1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cmp", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "arg2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_assertion_message_cmpstr" g_assertion_message_cmpstr :: - CString -> -- domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- func : TBasicType TUTF8- CString -> -- expr : TBasicType TUTF8- CString -> -- arg1 : TBasicType TUTF8- CString -> -- cmp : TBasicType TUTF8- CString -> -- arg2 : TBasicType TUTF8- IO ()---assertionMessageCmpstr ::- (MonadIO m) =>- T.Text -- domain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- func- -> T.Text -- expr- -> T.Text -- arg1- -> T.Text -- cmp- -> T.Text -- arg2- -> m () -- result-assertionMessageCmpstr domain file line func expr arg1 cmp arg2 = liftIO $ do- domain' <- textToCString domain- file' <- textToCString file- func' <- textToCString func- expr' <- textToCString expr- arg1' <- textToCString arg1- cmp' <- textToCString cmp- arg2' <- textToCString arg2- g_assertion_message_cmpstr domain' file' line func' expr' arg1' cmp' arg2'- freeMem domain'- freeMem file'- freeMem func'- freeMem expr'- freeMem arg1'- freeMem cmp'- freeMem arg2'- return ()----- function g_assertion_message--- Args : [Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_assertion_message" g_assertion_message :: - CString -> -- domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- func : TBasicType TUTF8- CString -> -- message : TBasicType TUTF8- IO ()---assertionMessage ::- (MonadIO m) =>- T.Text -- domain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- func- -> T.Text -- message- -> m () -- result-assertionMessage domain file line func message = liftIO $ do- domain' <- textToCString domain- file' <- textToCString file- func' <- textToCString func- message' <- textToCString message- g_assertion_message domain' file' line func' message'- freeMem domain'- freeMem file'- freeMem func'- freeMem message'- return ()----- function g_assert_warning--- Args : [Arg {argCName = "log_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pretty_function", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "expression", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_assert_warning" g_assert_warning :: - CString -> -- log_domain : TBasicType TUTF8- CString -> -- file : TBasicType TUTF8- Int32 -> -- line : TBasicType TInt- CString -> -- pretty_function : TBasicType TUTF8- CString -> -- expression : TBasicType TUTF8- IO ()---assertWarning ::- (MonadIO m) =>- T.Text -- logDomain- -> T.Text -- file- -> Int32 -- line- -> T.Text -- prettyFunction- -> T.Text -- expression- -> m () -- result-assertWarning logDomain file line prettyFunction expression = liftIO $ do- logDomain' <- textToCString logDomain- file' <- textToCString file- prettyFunction' <- textToCString prettyFunction- expression' <- textToCString expression- g_assert_warning logDomain' file' line prettyFunction' expression'- freeMem logDomain'- freeMem file'- freeMem prettyFunction'- freeMem expression'- return ()----- function g_ascii_xdigit_value--- Args : [Arg {argCName = "c", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_xdigit_value" g_ascii_xdigit_value :: - Int8 -> -- c : TBasicType TInt8- IO Int32---asciiXdigitValue ::- (MonadIO m) =>- Int8 -- c- -> m Int32 -- result-asciiXdigitValue c = liftIO $ do- result <- g_ascii_xdigit_value c- return result----- function g_ascii_toupper--- Args : [Arg {argCName = "c", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt8)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_toupper" g_ascii_toupper :: - Int8 -> -- c : TBasicType TInt8- IO Int8---asciiToupper ::- (MonadIO m) =>- Int8 -- c- -> m Int8 -- result-asciiToupper c = liftIO $ do- result <- g_ascii_toupper c- return result----- function g_ascii_tolower--- Args : [Arg {argCName = "c", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt8)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_tolower" g_ascii_tolower :: - Int8 -> -- c : TBasicType TInt8- IO Int8---asciiTolower ::- (MonadIO m) =>- Int8 -- c- -> m Int8 -- result-asciiTolower c = liftIO $ do- result <- g_ascii_tolower c- return result----- function g_ascii_strup--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_strup" g_ascii_strup :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---asciiStrup ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-asciiStrup str len = liftIO $ do- str' <- textToCString str- result <- g_ascii_strup str' len- checkUnexpectedReturnNULL "g_ascii_strup" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_ascii_strtoull--- Args : [Arg {argCName = "nptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "endptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "base", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_strtoull" g_ascii_strtoull :: - CString -> -- nptr : TBasicType TUTF8- CString -> -- endptr : TBasicType TUTF8- Word32 -> -- base : TBasicType TUInt- IO Word64---asciiStrtoull ::- (MonadIO m) =>- T.Text -- nptr- -> T.Text -- endptr- -> Word32 -- base- -> m Word64 -- result-asciiStrtoull nptr endptr base = liftIO $ do- nptr' <- textToCString nptr- endptr' <- textToCString endptr- result <- g_ascii_strtoull nptr' endptr' base- freeMem nptr'- freeMem endptr'- return result----- function g_ascii_strtoll--- Args : [Arg {argCName = "nptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "endptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "base", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_strtoll" g_ascii_strtoll :: - CString -> -- nptr : TBasicType TUTF8- CString -> -- endptr : TBasicType TUTF8- Word32 -> -- base : TBasicType TUInt- IO Int64---asciiStrtoll ::- (MonadIO m) =>- T.Text -- nptr- -> T.Text -- endptr- -> Word32 -- base- -> m Int64 -- result-asciiStrtoll nptr endptr base = liftIO $ do- nptr' <- textToCString nptr- endptr' <- textToCString endptr- result <- g_ascii_strtoll nptr' endptr' base- freeMem nptr'- freeMem endptr'- return result----- function g_ascii_strtod--- Args : [Arg {argCName = "nptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "endptr", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_strtod" g_ascii_strtod :: - CString -> -- nptr : TBasicType TUTF8- CString -> -- endptr : TBasicType TUTF8- IO CDouble---asciiStrtod ::- (MonadIO m) =>- T.Text -- nptr- -> T.Text -- endptr- -> m Double -- result-asciiStrtod nptr endptr = liftIO $ do- nptr' <- textToCString nptr- endptr' <- textToCString endptr- result <- g_ascii_strtod nptr' endptr'- let result' = realToFrac result- freeMem nptr'- freeMem endptr'- return result'----- function g_ascii_strncasecmp--- Args : [Arg {argCName = "s1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "s2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_strncasecmp" g_ascii_strncasecmp :: - CString -> -- s1 : TBasicType TUTF8- CString -> -- s2 : TBasicType TUTF8- Word64 -> -- n : TBasicType TUInt64- IO Int32---asciiStrncasecmp ::- (MonadIO m) =>- T.Text -- s1- -> T.Text -- s2- -> Word64 -- n- -> m Int32 -- result-asciiStrncasecmp s1 s2 n = liftIO $ do- s1' <- textToCString s1- s2' <- textToCString s2- result <- g_ascii_strncasecmp s1' s2' n- freeMem s1'- freeMem s2'- return result----- function g_ascii_strdown--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_strdown" g_ascii_strdown :: - CString -> -- str : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---asciiStrdown ::- (MonadIO m) =>- T.Text -- str- -> Int64 -- len- -> m T.Text -- result-asciiStrdown str len = liftIO $ do- str' <- textToCString str- result <- g_ascii_strdown str' len- checkUnexpectedReturnNULL "g_ascii_strdown" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function g_ascii_strcasecmp--- Args : [Arg {argCName = "s1", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "s2", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_strcasecmp" g_ascii_strcasecmp :: - CString -> -- s1 : TBasicType TUTF8- CString -> -- s2 : TBasicType TUTF8- IO Int32---asciiStrcasecmp ::- (MonadIO m) =>- T.Text -- s1- -> T.Text -- s2- -> m Int32 -- result-asciiStrcasecmp s1 s2 = liftIO $ do- s1' <- textToCString s1- s2' <- textToCString s2- result <- g_ascii_strcasecmp s1' s2'- freeMem s1'- freeMem s2'- return result----- function g_ascii_formatd--- Args : [Arg {argCName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buf_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "format", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "d", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_formatd" g_ascii_formatd :: - CString -> -- buffer : TBasicType TUTF8- Int32 -> -- buf_len : TBasicType TInt- CString -> -- format : TBasicType TUTF8- CDouble -> -- d : TBasicType TDouble- IO CString---asciiFormatd ::- (MonadIO m) =>- T.Text -- buffer- -> Int32 -- bufLen- -> T.Text -- format- -> Double -- d- -> m T.Text -- result-asciiFormatd buffer bufLen format d = liftIO $ do- buffer' <- textToCString buffer- format' <- textToCString format- let d' = realToFrac d- result <- g_ascii_formatd buffer' bufLen format' d'- checkUnexpectedReturnNULL "g_ascii_formatd" result- result' <- cstringToText result- freeMem result- freeMem buffer'- freeMem format'- return result'----- function g_ascii_dtostr--- Args : [Arg {argCName = "buffer", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buf_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "d", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_dtostr" g_ascii_dtostr :: - CString -> -- buffer : TBasicType TUTF8- Int32 -> -- buf_len : TBasicType TInt- CDouble -> -- d : TBasicType TDouble- IO CString---asciiDtostr ::- (MonadIO m) =>- T.Text -- buffer- -> Int32 -- bufLen- -> Double -- d- -> m T.Text -- result-asciiDtostr buffer bufLen d = liftIO $ do- buffer' <- textToCString buffer- let d' = realToFrac d- result <- g_ascii_dtostr buffer' bufLen d'- checkUnexpectedReturnNULL "g_ascii_dtostr" result- result' <- cstringToText result- freeMem result- freeMem buffer'- return result'----- function g_ascii_digit_value--- Args : [Arg {argCName = "c", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_ascii_digit_value" g_ascii_digit_value :: - Int8 -> -- c : TBasicType TInt8- IO Int32---asciiDigitValue ::- (MonadIO m) =>- Int8 -- c- -> m Int32 -- result-asciiDigitValue c = liftIO $ do- result <- g_ascii_digit_value c- return result----- function g_access--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_access" g_access :: - CString -> -- filename : TBasicType TUTF8- Int32 -> -- mode : TBasicType TInt- IO Int32---access ::- (MonadIO m) =>- T.Text -- filename- -> Int32 -- mode- -> m Int32 -- result-access filename mode = liftIO $ do- filename' <- textToCString filename- result <- g_access filename' mode- freeMem filename'- return result---
− GI/GLib/Structs.hs
@@ -1,153 +0,0 @@---{- |-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.GLib.Structs- ( module GI.GLib.Structs.AsyncQueue ,- module GI.GLib.Structs.BookmarkFile ,- module GI.GLib.Structs.ByteArray ,- module GI.GLib.Structs.Bytes ,- module GI.GLib.Structs.Checksum ,- module GI.GLib.Structs.Cond ,- module GI.GLib.Structs.Data ,- module GI.GLib.Structs.Date ,- module GI.GLib.Structs.DateTime ,- module GI.GLib.Structs.DebugKey ,- module GI.GLib.Structs.Dir ,- module GI.GLib.Structs.HashTableIter ,- module GI.GLib.Structs.Hmac ,- module GI.GLib.Structs.Hook ,- module GI.GLib.Structs.HookList ,- module GI.GLib.Structs.IConv ,- module GI.GLib.Structs.IOChannel ,- module GI.GLib.Structs.IOFuncs ,- module GI.GLib.Structs.KeyFile ,- module GI.GLib.Structs.MainContext ,- module GI.GLib.Structs.MainLoop ,- module GI.GLib.Structs.MappedFile ,- module GI.GLib.Structs.MarkupParseContext,- module GI.GLib.Structs.MarkupParser ,- module GI.GLib.Structs.MatchInfo ,- module GI.GLib.Structs.MemVTable ,- module GI.GLib.Structs.Node ,- module GI.GLib.Structs.Once ,- module GI.GLib.Structs.OptionContext ,- module GI.GLib.Structs.OptionEntry ,- module GI.GLib.Structs.OptionGroup ,- module GI.GLib.Structs.PatternSpec ,- module GI.GLib.Structs.PollFD ,- module GI.GLib.Structs.PtrArray ,- module GI.GLib.Structs.Queue ,- module GI.GLib.Structs.RWLock ,- module GI.GLib.Structs.Rand ,- module GI.GLib.Structs.RecMutex ,- module GI.GLib.Structs.Regex ,- module GI.GLib.Structs.Scanner ,- module GI.GLib.Structs.ScannerConfig ,- module GI.GLib.Structs.Sequence ,- module GI.GLib.Structs.SequenceIter ,- module GI.GLib.Structs.Source ,- module GI.GLib.Structs.SourceCallbackFuncs,- module GI.GLib.Structs.SourceFuncs ,- module GI.GLib.Structs.StatBuf ,- module GI.GLib.Structs.String ,- module GI.GLib.Structs.StringChunk ,- module GI.GLib.Structs.TestCase ,- module GI.GLib.Structs.TestConfig ,- module GI.GLib.Structs.TestLogBuffer ,- module GI.GLib.Structs.TestLogMsg ,- module GI.GLib.Structs.TestSuite ,- module GI.GLib.Structs.Thread ,- module GI.GLib.Structs.ThreadPool ,- module GI.GLib.Structs.TimeVal ,- module GI.GLib.Structs.TimeZone ,- module GI.GLib.Structs.Timer ,- module GI.GLib.Structs.TrashStack ,- module GI.GLib.Structs.Tree ,- module GI.GLib.Structs.VariantBuilder ,- module GI.GLib.Structs.VariantDict ,- module GI.GLib.Structs.VariantType ,--- ) where--import GI.GLib.Structs.AsyncQueue-import GI.GLib.Structs.BookmarkFile-import GI.GLib.Structs.ByteArray-import GI.GLib.Structs.Bytes-import GI.GLib.Structs.Checksum-import GI.GLib.Structs.Cond-import GI.GLib.Structs.Data-import GI.GLib.Structs.Date-import GI.GLib.Structs.DateTime-import GI.GLib.Structs.DebugKey-import GI.GLib.Structs.Dir-import GI.GLib.Structs.HashTableIter-import GI.GLib.Structs.Hmac-import GI.GLib.Structs.Hook-import GI.GLib.Structs.HookList-import GI.GLib.Structs.IConv-import GI.GLib.Structs.IOChannel-import GI.GLib.Structs.IOFuncs-import GI.GLib.Structs.KeyFile-import GI.GLib.Structs.MainContext-import GI.GLib.Structs.MainLoop-import GI.GLib.Structs.MappedFile-import GI.GLib.Structs.MarkupParseContext-import GI.GLib.Structs.MarkupParser-import GI.GLib.Structs.MatchInfo-import GI.GLib.Structs.MemVTable-import GI.GLib.Structs.Node-import GI.GLib.Structs.Once-import GI.GLib.Structs.OptionContext-import GI.GLib.Structs.OptionEntry-import GI.GLib.Structs.OptionGroup-import GI.GLib.Structs.PatternSpec-import GI.GLib.Structs.PollFD-import GI.GLib.Structs.PtrArray-import GI.GLib.Structs.Queue-import GI.GLib.Structs.RWLock-import GI.GLib.Structs.Rand-import GI.GLib.Structs.RecMutex-import GI.GLib.Structs.Regex-import GI.GLib.Structs.Scanner-import GI.GLib.Structs.ScannerConfig-import GI.GLib.Structs.Sequence-import GI.GLib.Structs.SequenceIter-import GI.GLib.Structs.Source-import GI.GLib.Structs.SourceCallbackFuncs-import GI.GLib.Structs.SourceFuncs-import GI.GLib.Structs.StatBuf-import GI.GLib.Structs.String-import GI.GLib.Structs.StringChunk-import GI.GLib.Structs.TestCase-import GI.GLib.Structs.TestConfig-import GI.GLib.Structs.TestLogBuffer-import GI.GLib.Structs.TestLogMsg-import GI.GLib.Structs.TestSuite-import GI.GLib.Structs.Thread-import GI.GLib.Structs.ThreadPool-import GI.GLib.Structs.TimeVal-import GI.GLib.Structs.TimeZone-import GI.GLib.Structs.Timer-import GI.GLib.Structs.TrashStack-import GI.GLib.Structs.Tree-import GI.GLib.Structs.VariantBuilder-import GI.GLib.Structs.VariantDict-import GI.GLib.Structs.VariantType--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--
− GI/GLib/Structs/AsyncQueue.hs
@@ -1,504 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GAsyncQueue struct is an opaque data structure which represents-an asynchronous queue. It should only be accessed through the-g_async_queue_* functions.--}--module GI.GLib.Structs.AsyncQueue- ( ---- * Exported types- AsyncQueue(..) ,- noAsyncQueue ,--- -- * Methods--- ** asyncQueueLength- AsyncQueueLengthMethodInfo ,- asyncQueueLength ,----- ** asyncQueueLengthUnlocked- AsyncQueueLengthUnlockedMethodInfo ,- asyncQueueLengthUnlocked ,----- ** asyncQueueLock- AsyncQueueLockMethodInfo ,- asyncQueueLock ,----- ** asyncQueuePush- AsyncQueuePushMethodInfo ,- asyncQueuePush ,----- ** asyncQueuePushFront- AsyncQueuePushFrontMethodInfo ,- asyncQueuePushFront ,----- ** asyncQueuePushFrontUnlocked- AsyncQueuePushFrontUnlockedMethodInfo ,- asyncQueuePushFrontUnlocked ,----- ** asyncQueuePushUnlocked- AsyncQueuePushUnlockedMethodInfo ,- asyncQueuePushUnlocked ,----- ** asyncQueueRefUnlocked- AsyncQueueRefUnlockedMethodInfo ,- asyncQueueRefUnlocked ,----- ** asyncQueueRemove- AsyncQueueRemoveMethodInfo ,- asyncQueueRemove ,----- ** asyncQueueRemoveUnlocked- AsyncQueueRemoveUnlockedMethodInfo ,- asyncQueueRemoveUnlocked ,----- ** asyncQueueUnlock- AsyncQueueUnlockMethodInfo ,- asyncQueueUnlock ,----- ** asyncQueueUnref- AsyncQueueUnrefMethodInfo ,- asyncQueueUnref ,----- ** asyncQueueUnrefAndUnlock- AsyncQueueUnrefAndUnlockMethodInfo ,- asyncQueueUnrefAndUnlock ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype AsyncQueue = AsyncQueue (ForeignPtr AsyncQueue)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr AsyncQueue where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noAsyncQueue :: Maybe AsyncQueue-noAsyncQueue = Nothing---type instance AttributeList AsyncQueue = AsyncQueueAttributeList-type AsyncQueueAttributeList = ('[ ] :: [(Symbol, *)])---- method AsyncQueue::length--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_length" g_async_queue_length :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- IO Int32---asyncQueueLength ::- (MonadIO m) =>- AsyncQueue -- _obj- -> m Int32 -- result-asyncQueueLength _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_async_queue_length _obj'- touchManagedPtr _obj- return result--data AsyncQueueLengthMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo AsyncQueueLengthMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueLength---- method AsyncQueue::length_unlocked--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_length_unlocked" g_async_queue_length_unlocked :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- IO Int32---asyncQueueLengthUnlocked ::- (MonadIO m) =>- AsyncQueue -- _obj- -> m Int32 -- result-asyncQueueLengthUnlocked _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_async_queue_length_unlocked _obj'- touchManagedPtr _obj- return result--data AsyncQueueLengthUnlockedMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo AsyncQueueLengthUnlockedMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueLengthUnlocked---- method AsyncQueue::lock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_lock" g_async_queue_lock :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- IO ()---asyncQueueLock ::- (MonadIO m) =>- AsyncQueue -- _obj- -> m () -- result-asyncQueueLock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_lock _obj'- touchManagedPtr _obj- return ()--data AsyncQueueLockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo AsyncQueueLockMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueLock---- method AsyncQueue::push--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_push" g_async_queue_push :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- Ptr () -> -- data : TBasicType TPtr- IO ()---asyncQueuePush ::- (MonadIO m) =>- AsyncQueue -- _obj- -> Ptr () -- data_- -> m () -- result-asyncQueuePush _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_push _obj' data_- touchManagedPtr _obj- return ()--data AsyncQueuePushMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo AsyncQueuePushMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueuePush---- method AsyncQueue::push_front--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "item", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_push_front" g_async_queue_push_front :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- Ptr () -> -- item : TBasicType TPtr- IO ()---asyncQueuePushFront ::- (MonadIO m) =>- AsyncQueue -- _obj- -> Ptr () -- item- -> m () -- result-asyncQueuePushFront _obj item = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_push_front _obj' item- touchManagedPtr _obj- return ()--data AsyncQueuePushFrontMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo AsyncQueuePushFrontMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueuePushFront---- method AsyncQueue::push_front_unlocked--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "item", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_push_front_unlocked" g_async_queue_push_front_unlocked :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- Ptr () -> -- item : TBasicType TPtr- IO ()---asyncQueuePushFrontUnlocked ::- (MonadIO m) =>- AsyncQueue -- _obj- -> Ptr () -- item- -> m () -- result-asyncQueuePushFrontUnlocked _obj item = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_push_front_unlocked _obj' item- touchManagedPtr _obj- return ()--data AsyncQueuePushFrontUnlockedMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo AsyncQueuePushFrontUnlockedMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueuePushFrontUnlocked---- method AsyncQueue::push_unlocked--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_push_unlocked" g_async_queue_push_unlocked :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- Ptr () -> -- data : TBasicType TPtr- IO ()---asyncQueuePushUnlocked ::- (MonadIO m) =>- AsyncQueue -- _obj- -> Ptr () -- data_- -> m () -- result-asyncQueuePushUnlocked _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_push_unlocked _obj' data_- touchManagedPtr _obj- return ()--data AsyncQueuePushUnlockedMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo AsyncQueuePushUnlockedMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueuePushUnlocked---- method AsyncQueue::ref_unlocked--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_ref_unlocked" g_async_queue_ref_unlocked :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- IO ()--{-# DEPRECATED asyncQueueRefUnlocked ["(Since version 2.8)","Reference counting is done atomically.","so g_async_queue_ref() can be used regardless of the @queue's","lock."]#-}-asyncQueueRefUnlocked ::- (MonadIO m) =>- AsyncQueue -- _obj- -> m () -- result-asyncQueueRefUnlocked _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_ref_unlocked _obj'- touchManagedPtr _obj- return ()--data AsyncQueueRefUnlockedMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo AsyncQueueRefUnlockedMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueRefUnlocked---- method AsyncQueue::remove--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "item", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_remove" g_async_queue_remove :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- Ptr () -> -- item : TBasicType TPtr- IO CInt---asyncQueueRemove ::- (MonadIO m) =>- AsyncQueue -- _obj- -> Ptr () -- item- -> m Bool -- result-asyncQueueRemove _obj item = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_async_queue_remove _obj' item- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data AsyncQueueRemoveMethodInfo-instance (signature ~ (Ptr () -> m Bool), MonadIO m) => MethodInfo AsyncQueueRemoveMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueRemove---- method AsyncQueue::remove_unlocked--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "item", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_remove_unlocked" g_async_queue_remove_unlocked :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- Ptr () -> -- item : TBasicType TPtr- IO CInt---asyncQueueRemoveUnlocked ::- (MonadIO m) =>- AsyncQueue -- _obj- -> Ptr () -- item- -> m Bool -- result-asyncQueueRemoveUnlocked _obj item = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_async_queue_remove_unlocked _obj' item- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data AsyncQueueRemoveUnlockedMethodInfo-instance (signature ~ (Ptr () -> m Bool), MonadIO m) => MethodInfo AsyncQueueRemoveUnlockedMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueRemoveUnlocked---- method AsyncQueue::unlock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_unlock" g_async_queue_unlock :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- IO ()---asyncQueueUnlock ::- (MonadIO m) =>- AsyncQueue -- _obj- -> m () -- result-asyncQueueUnlock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_unlock _obj'- touchManagedPtr _obj- return ()--data AsyncQueueUnlockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo AsyncQueueUnlockMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueUnlock---- method AsyncQueue::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_unref" g_async_queue_unref :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- IO ()---asyncQueueUnref ::- (MonadIO m) =>- AsyncQueue -- _obj- -> m () -- result-asyncQueueUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_unref _obj'- touchManagedPtr _obj- return ()--data AsyncQueueUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo AsyncQueueUnrefMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueUnref---- method AsyncQueue::unref_and_unlock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "AsyncQueue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_async_queue_unref_and_unlock" g_async_queue_unref_and_unlock :: - Ptr AsyncQueue -> -- _obj : TInterface "GLib" "AsyncQueue"- IO ()--{-# DEPRECATED asyncQueueUnrefAndUnlock ["(Since version 2.8)","Reference counting is done atomically.","so g_async_queue_unref() can be used regardless of the @queue's","lock."]#-}-asyncQueueUnrefAndUnlock ::- (MonadIO m) =>- AsyncQueue -- _obj- -> m () -- result-asyncQueueUnrefAndUnlock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_async_queue_unref_and_unlock _obj'- touchManagedPtr _obj- return ()--data AsyncQueueUnrefAndUnlockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo AsyncQueueUnrefAndUnlockMethodInfo AsyncQueue signature where- overloadedMethod _ = asyncQueueUnrefAndUnlock--type family ResolveAsyncQueueMethod (t :: Symbol) (o :: *) :: * where- ResolveAsyncQueueMethod "length" o = AsyncQueueLengthMethodInfo- ResolveAsyncQueueMethod "lengthUnlocked" o = AsyncQueueLengthUnlockedMethodInfo- ResolveAsyncQueueMethod "lock" o = AsyncQueueLockMethodInfo- ResolveAsyncQueueMethod "push" o = AsyncQueuePushMethodInfo- ResolveAsyncQueueMethod "pushFront" o = AsyncQueuePushFrontMethodInfo- ResolveAsyncQueueMethod "pushFrontUnlocked" o = AsyncQueuePushFrontUnlockedMethodInfo- ResolveAsyncQueueMethod "pushUnlocked" o = AsyncQueuePushUnlockedMethodInfo- ResolveAsyncQueueMethod "refUnlocked" o = AsyncQueueRefUnlockedMethodInfo- ResolveAsyncQueueMethod "remove" o = AsyncQueueRemoveMethodInfo- ResolveAsyncQueueMethod "removeUnlocked" o = AsyncQueueRemoveUnlockedMethodInfo- ResolveAsyncQueueMethod "unlock" o = AsyncQueueUnlockMethodInfo- ResolveAsyncQueueMethod "unref" o = AsyncQueueUnrefMethodInfo- ResolveAsyncQueueMethod "unrefAndUnlock" o = AsyncQueueUnrefAndUnlockMethodInfo- ResolveAsyncQueueMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveAsyncQueueMethod t AsyncQueue, MethodInfo info AsyncQueue p) => IsLabelProxy t (AsyncQueue -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveAsyncQueueMethod t AsyncQueue, MethodInfo info AsyncQueue p) => IsLabel t (AsyncQueue -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/AsyncQueue.hs-boot
@@ -1,24 +0,0 @@-module GI.GLib.Structs.AsyncQueue where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype AsyncQueue = AsyncQueue (ForeignPtr AsyncQueue)-instance WrappedPtr AsyncQueue where-data AsyncQueueLengthMethodInfo-data AsyncQueueLengthUnlockedMethodInfo-data AsyncQueueLockMethodInfo-data AsyncQueuePushMethodInfo-data AsyncQueuePushFrontMethodInfo-data AsyncQueuePushFrontUnlockedMethodInfo-data AsyncQueuePushUnlockedMethodInfo-data AsyncQueueRefUnlockedMethodInfo-data AsyncQueueRemoveMethodInfo-data AsyncQueueRemoveUnlockedMethodInfo-data AsyncQueueUnlockMethodInfo-data AsyncQueueUnrefMethodInfo-data AsyncQueueUnrefAndUnlockMethodInfo
− GI/GLib/Structs/BookmarkFile.hs
@@ -1,1796 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The `GBookmarkFile` structure contains only-private data and should not be directly accessed.--}--module GI.GLib.Structs.BookmarkFile- ( ---- * Exported types- BookmarkFile(..) ,- noBookmarkFile ,--- -- * Methods--- ** bookmarkFileAddApplication- BookmarkFileAddApplicationMethodInfo ,- bookmarkFileAddApplication ,----- ** bookmarkFileAddGroup- BookmarkFileAddGroupMethodInfo ,- bookmarkFileAddGroup ,----- ** bookmarkFileErrorQuark- bookmarkFileErrorQuark ,----- ** bookmarkFileFree- BookmarkFileFreeMethodInfo ,- bookmarkFileFree ,----- ** bookmarkFileGetAdded- BookmarkFileGetAddedMethodInfo ,- bookmarkFileGetAdded ,----- ** bookmarkFileGetAppInfo- BookmarkFileGetAppInfoMethodInfo ,- bookmarkFileGetAppInfo ,----- ** bookmarkFileGetApplications- BookmarkFileGetApplicationsMethodInfo ,- bookmarkFileGetApplications ,----- ** bookmarkFileGetDescription- BookmarkFileGetDescriptionMethodInfo ,- bookmarkFileGetDescription ,----- ** bookmarkFileGetGroups- BookmarkFileGetGroupsMethodInfo ,- bookmarkFileGetGroups ,----- ** bookmarkFileGetIcon- BookmarkFileGetIconMethodInfo ,- bookmarkFileGetIcon ,----- ** bookmarkFileGetIsPrivate- BookmarkFileGetIsPrivateMethodInfo ,- bookmarkFileGetIsPrivate ,----- ** bookmarkFileGetMimeType- BookmarkFileGetMimeTypeMethodInfo ,- bookmarkFileGetMimeType ,----- ** bookmarkFileGetModified- BookmarkFileGetModifiedMethodInfo ,- bookmarkFileGetModified ,----- ** bookmarkFileGetSize- BookmarkFileGetSizeMethodInfo ,- bookmarkFileGetSize ,----- ** bookmarkFileGetTitle- BookmarkFileGetTitleMethodInfo ,- bookmarkFileGetTitle ,----- ** bookmarkFileGetUris- BookmarkFileGetUrisMethodInfo ,- bookmarkFileGetUris ,----- ** bookmarkFileGetVisited- BookmarkFileGetVisitedMethodInfo ,- bookmarkFileGetVisited ,----- ** bookmarkFileHasApplication- BookmarkFileHasApplicationMethodInfo ,- bookmarkFileHasApplication ,----- ** bookmarkFileHasGroup- BookmarkFileHasGroupMethodInfo ,- bookmarkFileHasGroup ,----- ** bookmarkFileHasItem- BookmarkFileHasItemMethodInfo ,- bookmarkFileHasItem ,----- ** bookmarkFileLoadFromData- BookmarkFileLoadFromDataMethodInfo ,- bookmarkFileLoadFromData ,----- ** bookmarkFileLoadFromDataDirs- BookmarkFileLoadFromDataDirsMethodInfo ,- bookmarkFileLoadFromDataDirs ,----- ** bookmarkFileLoadFromFile- BookmarkFileLoadFromFileMethodInfo ,- bookmarkFileLoadFromFile ,----- ** bookmarkFileMoveItem- BookmarkFileMoveItemMethodInfo ,- bookmarkFileMoveItem ,----- ** bookmarkFileRemoveApplication- BookmarkFileRemoveApplicationMethodInfo ,- bookmarkFileRemoveApplication ,----- ** bookmarkFileRemoveGroup- BookmarkFileRemoveGroupMethodInfo ,- bookmarkFileRemoveGroup ,----- ** bookmarkFileRemoveItem- BookmarkFileRemoveItemMethodInfo ,- bookmarkFileRemoveItem ,----- ** bookmarkFileSetAdded- BookmarkFileSetAddedMethodInfo ,- bookmarkFileSetAdded ,----- ** bookmarkFileSetAppInfo- BookmarkFileSetAppInfoMethodInfo ,- bookmarkFileSetAppInfo ,----- ** bookmarkFileSetDescription- BookmarkFileSetDescriptionMethodInfo ,- bookmarkFileSetDescription ,----- ** bookmarkFileSetGroups- BookmarkFileSetGroupsMethodInfo ,- bookmarkFileSetGroups ,----- ** bookmarkFileSetIcon- BookmarkFileSetIconMethodInfo ,- bookmarkFileSetIcon ,----- ** bookmarkFileSetIsPrivate- BookmarkFileSetIsPrivateMethodInfo ,- bookmarkFileSetIsPrivate ,----- ** bookmarkFileSetMimeType- BookmarkFileSetMimeTypeMethodInfo ,- bookmarkFileSetMimeType ,----- ** bookmarkFileSetModified- BookmarkFileSetModifiedMethodInfo ,- bookmarkFileSetModified ,----- ** bookmarkFileSetTitle- BookmarkFileSetTitleMethodInfo ,- bookmarkFileSetTitle ,----- ** bookmarkFileSetVisited- BookmarkFileSetVisitedMethodInfo ,- bookmarkFileSetVisited ,----- ** bookmarkFileToData- BookmarkFileToDataMethodInfo ,- bookmarkFileToData ,----- ** bookmarkFileToFile- BookmarkFileToFileMethodInfo ,- bookmarkFileToFile ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype BookmarkFile = BookmarkFile (ForeignPtr BookmarkFile)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr BookmarkFile where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noBookmarkFile :: Maybe BookmarkFile-noBookmarkFile = Nothing---type instance AttributeList BookmarkFile = BookmarkFileAttributeList-type BookmarkFileAttributeList = ('[ ] :: [(Symbol, *)])---- method BookmarkFile::add_application--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "exec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_add_application" g_bookmark_file_add_application :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- name : TBasicType TUTF8- CString -> -- exec : TBasicType TUTF8- IO ()---bookmarkFileAddApplication ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> Maybe (T.Text) -- name- -> Maybe (T.Text) -- exec- -> m () -- result-bookmarkFileAddApplication _obj uri name exec = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- maybeName <- case name of- Nothing -> return nullPtr- Just jName -> do- jName' <- textToCString jName- return jName'- maybeExec <- case exec of- Nothing -> return nullPtr- Just jExec -> do- jExec' <- textToCString jExec- return jExec'- g_bookmark_file_add_application _obj' uri' maybeName maybeExec- touchManagedPtr _obj- freeMem uri'- freeMem maybeName- freeMem maybeExec- return ()--data BookmarkFileAddApplicationMethodInfo-instance (signature ~ (T.Text -> Maybe (T.Text) -> Maybe (T.Text) -> m ()), MonadIO m) => MethodInfo BookmarkFileAddApplicationMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileAddApplication---- method BookmarkFile::add_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_add_group" g_bookmark_file_add_group :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- group : TBasicType TUTF8- IO ()---bookmarkFileAddGroup ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- group- -> m () -- result-bookmarkFileAddGroup _obj uri group = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- group' <- textToCString group- g_bookmark_file_add_group _obj' uri' group'- touchManagedPtr _obj- freeMem uri'- freeMem group'- return ()--data BookmarkFileAddGroupMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileAddGroupMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileAddGroup---- method BookmarkFile::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_free" g_bookmark_file_free :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- IO ()---bookmarkFileFree ::- (MonadIO m) =>- BookmarkFile -- _obj- -> m () -- result-bookmarkFileFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_bookmark_file_free _obj'- touchManagedPtr _obj- return ()--data BookmarkFileFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo BookmarkFileFreeMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileFree---- method BookmarkFile::get_added--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TLong)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_added" g_bookmark_file_get_added :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CLong---bookmarkFileGetAdded ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m CLong -- result-bookmarkFileGetAdded _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- onException (do- result <- propagateGError $ g_bookmark_file_get_added _obj' uri'- touchManagedPtr _obj- freeMem uri'- return result- ) (do- freeMem uri'- )--data BookmarkFileGetAddedMethodInfo-instance (signature ~ (T.Text -> m CLong), MonadIO m) => MethodInfo BookmarkFileGetAddedMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetAdded---- method BookmarkFile::get_app_info--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "exec", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "count", argType = TBasicType TUInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "stamp", argType = TBasicType TLong, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_app_info" g_bookmark_file_get_app_info :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- name : TBasicType TUTF8- Ptr CString -> -- exec : TBasicType TUTF8- Ptr Word32 -> -- count : TBasicType TUInt- Ptr CLong -> -- stamp : TBasicType TLong- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileGetAppInfo ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- name- -> m (T.Text,Word32,CLong) -- result-bookmarkFileGetAppInfo _obj uri name = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- name' <- textToCString name- exec <- allocMem :: IO (Ptr CString)- count <- allocMem :: IO (Ptr Word32)- stamp <- allocMem :: IO (Ptr CLong)- onException (do- _ <- propagateGError $ g_bookmark_file_get_app_info _obj' uri' name' exec count stamp- exec' <- peek exec- exec'' <- cstringToText exec'- freeMem exec'- count' <- peek count- stamp' <- peek stamp- touchManagedPtr _obj- freeMem uri'- freeMem name'- freeMem exec- freeMem count- freeMem stamp- return (exec'', count', stamp')- ) (do- freeMem uri'- freeMem name'- freeMem exec- freeMem count- freeMem stamp- )--data BookmarkFileGetAppInfoMethodInfo-instance (signature ~ (T.Text -> T.Text -> m (T.Text,Word32,CLong)), MonadIO m) => MethodInfo BookmarkFileGetAppInfoMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetAppInfo---- method BookmarkFile::get_applications--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 2 (TBasicType TUTF8))--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_applications" g_bookmark_file_get_applications :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr CString)---bookmarkFileGetApplications ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m [T.Text] -- result-bookmarkFileGetApplications _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_bookmark_file_get_applications _obj' uri' length_- length_' <- peek length_- checkUnexpectedReturnNULL "g_bookmark_file_get_applications" result- result' <- (unpackUTF8CArrayWithLength length_') result- (mapCArrayWithLength length_') freeMem result- freeMem result- touchManagedPtr _obj- freeMem uri'- freeMem length_- return result'- ) (do- freeMem uri'- freeMem length_- )--data BookmarkFileGetApplicationsMethodInfo-instance (signature ~ (T.Text -> m [T.Text]), MonadIO m) => MethodInfo BookmarkFileGetApplicationsMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetApplications---- method BookmarkFile::get_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_description" g_bookmark_file_get_description :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---bookmarkFileGetDescription ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m T.Text -- result-bookmarkFileGetDescription _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- onException (do- result <- propagateGError $ g_bookmark_file_get_description _obj' uri'- checkUnexpectedReturnNULL "g_bookmark_file_get_description" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem uri'- return result'- ) (do- freeMem uri'- )--data BookmarkFileGetDescriptionMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m) => MethodInfo BookmarkFileGetDescriptionMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetDescription---- method BookmarkFile::get_groups--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 2 (TBasicType TUTF8))--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_groups" g_bookmark_file_get_groups :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr CString)---bookmarkFileGetGroups ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m [T.Text] -- result-bookmarkFileGetGroups _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_bookmark_file_get_groups _obj' uri' length_- length_' <- peek length_- checkUnexpectedReturnNULL "g_bookmark_file_get_groups" result- result' <- (unpackUTF8CArrayWithLength length_') result- (mapCArrayWithLength length_') freeMem result- freeMem result- touchManagedPtr _obj- freeMem uri'- freeMem length_- return result'- ) (do- freeMem uri'- freeMem length_- )--data BookmarkFileGetGroupsMethodInfo-instance (signature ~ (T.Text -> m [T.Text]), MonadIO m) => MethodInfo BookmarkFileGetGroupsMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetGroups---- method BookmarkFile::get_icon--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "href", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "mime_type", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_icon" g_bookmark_file_get_icon :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr CString -> -- href : TBasicType TUTF8- Ptr CString -> -- mime_type : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileGetIcon ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m (T.Text,T.Text) -- result-bookmarkFileGetIcon _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- href <- allocMem :: IO (Ptr CString)- mimeType <- allocMem :: IO (Ptr CString)- onException (do- _ <- propagateGError $ g_bookmark_file_get_icon _obj' uri' href mimeType- href' <- peek href- href'' <- cstringToText href'- freeMem href'- mimeType' <- peek mimeType- mimeType'' <- cstringToText mimeType'- freeMem mimeType'- touchManagedPtr _obj- freeMem uri'- freeMem href- freeMem mimeType- return (href'', mimeType'')- ) (do- freeMem uri'- freeMem href- freeMem mimeType- )--data BookmarkFileGetIconMethodInfo-instance (signature ~ (T.Text -> m (T.Text,T.Text)), MonadIO m) => MethodInfo BookmarkFileGetIconMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetIcon---- method BookmarkFile::get_is_private--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_is_private" g_bookmark_file_get_is_private :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileGetIsPrivate ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m () -- result-bookmarkFileGetIsPrivate _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- onException (do- _ <- propagateGError $ g_bookmark_file_get_is_private _obj' uri'- touchManagedPtr _obj- freeMem uri'- return ()- ) (do- freeMem uri'- )--data BookmarkFileGetIsPrivateMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileGetIsPrivateMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetIsPrivate---- method BookmarkFile::get_mime_type--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_mime_type" g_bookmark_file_get_mime_type :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---bookmarkFileGetMimeType ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m T.Text -- result-bookmarkFileGetMimeType _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- onException (do- result <- propagateGError $ g_bookmark_file_get_mime_type _obj' uri'- checkUnexpectedReturnNULL "g_bookmark_file_get_mime_type" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem uri'- return result'- ) (do- freeMem uri'- )--data BookmarkFileGetMimeTypeMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m) => MethodInfo BookmarkFileGetMimeTypeMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetMimeType---- method BookmarkFile::get_modified--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TLong)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_modified" g_bookmark_file_get_modified :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CLong---bookmarkFileGetModified ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m CLong -- result-bookmarkFileGetModified _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- onException (do- result <- propagateGError $ g_bookmark_file_get_modified _obj' uri'- touchManagedPtr _obj- freeMem uri'- return result- ) (do- freeMem uri'- )--data BookmarkFileGetModifiedMethodInfo-instance (signature ~ (T.Text -> m CLong), MonadIO m) => MethodInfo BookmarkFileGetModifiedMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetModified---- method BookmarkFile::get_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_get_size" g_bookmark_file_get_size :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- IO Int32---bookmarkFileGetSize ::- (MonadIO m) =>- BookmarkFile -- _obj- -> m Int32 -- result-bookmarkFileGetSize _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_bookmark_file_get_size _obj'- touchManagedPtr _obj- return result--data BookmarkFileGetSizeMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo BookmarkFileGetSizeMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetSize---- method BookmarkFile::get_title--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_title" g_bookmark_file_get_title :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---bookmarkFileGetTitle ::- (MonadIO m) =>- BookmarkFile -- _obj- -> Maybe (T.Text) -- uri- -> m T.Text -- result-bookmarkFileGetTitle _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeUri <- case uri of- Nothing -> return nullPtr- Just jUri -> do- jUri' <- textToCString jUri- return jUri'- onException (do- result <- propagateGError $ g_bookmark_file_get_title _obj' maybeUri- checkUnexpectedReturnNULL "g_bookmark_file_get_title" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem maybeUri- return result'- ) (do- freeMem maybeUri- )--data BookmarkFileGetTitleMethodInfo-instance (signature ~ (Maybe (T.Text) -> m T.Text), MonadIO m) => MethodInfo BookmarkFileGetTitleMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetTitle---- method BookmarkFile::get_uris--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 1 (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_get_uris" g_bookmark_file_get_uris :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- Ptr Word64 -> -- length : TBasicType TUInt64- IO (Ptr CString)---bookmarkFileGetUris ::- (MonadIO m) =>- BookmarkFile -- _obj- -> m [T.Text] -- result-bookmarkFileGetUris _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- length_ <- allocMem :: IO (Ptr Word64)- result <- g_bookmark_file_get_uris _obj' length_- length_' <- peek length_- checkUnexpectedReturnNULL "g_bookmark_file_get_uris" result- result' <- (unpackUTF8CArrayWithLength length_') result- (mapCArrayWithLength length_') freeMem result- freeMem result- touchManagedPtr _obj- freeMem length_- return result'--data BookmarkFileGetUrisMethodInfo-instance (signature ~ (m [T.Text]), MonadIO m) => MethodInfo BookmarkFileGetUrisMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetUris---- method BookmarkFile::get_visited--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TLong)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_get_visited" g_bookmark_file_get_visited :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CLong---bookmarkFileGetVisited ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m CLong -- result-bookmarkFileGetVisited _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- onException (do- result <- propagateGError $ g_bookmark_file_get_visited _obj' uri'- touchManagedPtr _obj- freeMem uri'- return result- ) (do- freeMem uri'- )--data BookmarkFileGetVisitedMethodInfo-instance (signature ~ (T.Text -> m CLong), MonadIO m) => MethodInfo BookmarkFileGetVisitedMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileGetVisited---- method BookmarkFile::has_application--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_has_application" g_bookmark_file_has_application :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- name : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileHasApplication ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- name- -> m () -- result-bookmarkFileHasApplication _obj uri name = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- name' <- textToCString name- onException (do- _ <- propagateGError $ g_bookmark_file_has_application _obj' uri' name'- touchManagedPtr _obj- freeMem uri'- freeMem name'- return ()- ) (do- freeMem uri'- freeMem name'- )--data BookmarkFileHasApplicationMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileHasApplicationMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileHasApplication---- method BookmarkFile::has_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_has_group" g_bookmark_file_has_group :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- group : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileHasGroup ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- group- -> m () -- result-bookmarkFileHasGroup _obj uri group = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- group' <- textToCString group- onException (do- _ <- propagateGError $ g_bookmark_file_has_group _obj' uri' group'- touchManagedPtr _obj- freeMem uri'- freeMem group'- return ()- ) (do- freeMem uri'- freeMem group'- )--data BookmarkFileHasGroupMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileHasGroupMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileHasGroup---- method BookmarkFile::has_item--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_has_item" g_bookmark_file_has_item :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- IO CInt---bookmarkFileHasItem ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m Bool -- result-bookmarkFileHasItem _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- result <- g_bookmark_file_has_item _obj' uri'- let result' = (/= 0) result- touchManagedPtr _obj- freeMem uri'- return result'--data BookmarkFileHasItemMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m) => MethodInfo BookmarkFileHasItemMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileHasItem---- method BookmarkFile::load_from_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_load_from_data" g_bookmark_file_load_from_data :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- data : TBasicType TUTF8- Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileLoadFromData ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- data_- -> Word64 -- length_- -> m () -- result-bookmarkFileLoadFromData _obj data_ length_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- data_' <- textToCString data_- onException (do- _ <- propagateGError $ g_bookmark_file_load_from_data _obj' data_' length_- touchManagedPtr _obj- freeMem data_'- return ()- ) (do- freeMem data_'- )--data BookmarkFileLoadFromDataMethodInfo-instance (signature ~ (T.Text -> Word64 -> m ()), MonadIO m) => MethodInfo BookmarkFileLoadFromDataMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileLoadFromData---- method BookmarkFile::load_from_data_dirs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "full_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_load_from_data_dirs" g_bookmark_file_load_from_data_dirs :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- file : TBasicType TUTF8- CString -> -- full_path : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileLoadFromDataDirs ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- file- -> Maybe (T.Text) -- fullPath- -> m () -- result-bookmarkFileLoadFromDataDirs _obj file fullPath = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- file' <- textToCString file- maybeFullPath <- case fullPath of- Nothing -> return nullPtr- Just jFullPath -> do- jFullPath' <- textToCString jFullPath- return jFullPath'- onException (do- _ <- propagateGError $ g_bookmark_file_load_from_data_dirs _obj' file' maybeFullPath- touchManagedPtr _obj- freeMem file'- freeMem maybeFullPath- return ()- ) (do- freeMem file'- freeMem maybeFullPath- )--data BookmarkFileLoadFromDataDirsMethodInfo-instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m) => MethodInfo BookmarkFileLoadFromDataDirsMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileLoadFromDataDirs---- method BookmarkFile::load_from_file--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_load_from_file" g_bookmark_file_load_from_file :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- filename : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileLoadFromFile ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- filename- -> m () -- result-bookmarkFileLoadFromFile _obj filename = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- filename' <- textToCString filename- onException (do- _ <- propagateGError $ g_bookmark_file_load_from_file _obj' filename'- touchManagedPtr _obj- freeMem filename'- return ()- ) (do- freeMem filename'- )--data BookmarkFileLoadFromFileMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileLoadFromFileMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileLoadFromFile---- method BookmarkFile::move_item--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "old_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_move_item" g_bookmark_file_move_item :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- old_uri : TBasicType TUTF8- CString -> -- new_uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileMoveItem ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- oldUri- -> Maybe (T.Text) -- newUri- -> m () -- result-bookmarkFileMoveItem _obj oldUri newUri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- oldUri' <- textToCString oldUri- maybeNewUri <- case newUri of- Nothing -> return nullPtr- Just jNewUri -> do- jNewUri' <- textToCString jNewUri- return jNewUri'- onException (do- _ <- propagateGError $ g_bookmark_file_move_item _obj' oldUri' maybeNewUri- touchManagedPtr _obj- freeMem oldUri'- freeMem maybeNewUri- return ()- ) (do- freeMem oldUri'- freeMem maybeNewUri- )--data BookmarkFileMoveItemMethodInfo-instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m) => MethodInfo BookmarkFileMoveItemMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileMoveItem---- method BookmarkFile::remove_application--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_remove_application" g_bookmark_file_remove_application :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- name : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileRemoveApplication ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- name- -> m () -- result-bookmarkFileRemoveApplication _obj uri name = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- name' <- textToCString name- onException (do- _ <- propagateGError $ g_bookmark_file_remove_application _obj' uri' name'- touchManagedPtr _obj- freeMem uri'- freeMem name'- return ()- ) (do- freeMem uri'- freeMem name'- )--data BookmarkFileRemoveApplicationMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileRemoveApplicationMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileRemoveApplication---- method BookmarkFile::remove_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_remove_group" g_bookmark_file_remove_group :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- group : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileRemoveGroup ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- group- -> m () -- result-bookmarkFileRemoveGroup _obj uri group = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- group' <- textToCString group- onException (do- _ <- propagateGError $ g_bookmark_file_remove_group _obj' uri' group'- touchManagedPtr _obj- freeMem uri'- freeMem group'- return ()- ) (do- freeMem uri'- freeMem group'- )--data BookmarkFileRemoveGroupMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileRemoveGroupMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileRemoveGroup---- method BookmarkFile::remove_item--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_remove_item" g_bookmark_file_remove_item :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileRemoveItem ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> m () -- result-bookmarkFileRemoveItem _obj uri = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- onException (do- _ <- propagateGError $ g_bookmark_file_remove_item _obj' uri'- touchManagedPtr _obj- freeMem uri'- return ()- ) (do- freeMem uri'- )--data BookmarkFileRemoveItemMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileRemoveItemMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileRemoveItem---- method BookmarkFile::set_added--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "added", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_added" g_bookmark_file_set_added :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CLong -> -- added : TBasicType TLong- IO ()---bookmarkFileSetAdded ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> CLong -- added- -> m () -- result-bookmarkFileSetAdded _obj uri added = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- g_bookmark_file_set_added _obj' uri' added- touchManagedPtr _obj- freeMem uri'- return ()--data BookmarkFileSetAddedMethodInfo-instance (signature ~ (T.Text -> CLong -> m ()), MonadIO m) => MethodInfo BookmarkFileSetAddedMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetAdded---- method BookmarkFile::set_app_info--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "exec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "count", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "stamp", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_set_app_info" g_bookmark_file_set_app_info :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- name : TBasicType TUTF8- CString -> -- exec : TBasicType TUTF8- Int32 -> -- count : TBasicType TInt- CLong -> -- stamp : TBasicType TLong- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileSetAppInfo ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- name- -> T.Text -- exec- -> Int32 -- count- -> CLong -- stamp- -> m () -- result-bookmarkFileSetAppInfo _obj uri name exec count stamp = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- name' <- textToCString name- exec' <- textToCString exec- onException (do- _ <- propagateGError $ g_bookmark_file_set_app_info _obj' uri' name' exec' count stamp- touchManagedPtr _obj- freeMem uri'- freeMem name'- freeMem exec'- return ()- ) (do- freeMem uri'- freeMem name'- freeMem exec'- )--data BookmarkFileSetAppInfoMethodInfo-instance (signature ~ (T.Text -> T.Text -> T.Text -> Int32 -> CLong -> m ()), MonadIO m) => MethodInfo BookmarkFileSetAppInfoMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetAppInfo---- method BookmarkFile::set_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_description" g_bookmark_file_set_description :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- description : TBasicType TUTF8- IO ()---bookmarkFileSetDescription ::- (MonadIO m) =>- BookmarkFile -- _obj- -> Maybe (T.Text) -- uri- -> T.Text -- description- -> m () -- result-bookmarkFileSetDescription _obj uri description = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeUri <- case uri of- Nothing -> return nullPtr- Just jUri -> do- jUri' <- textToCString jUri- return jUri'- description' <- textToCString description- g_bookmark_file_set_description _obj' maybeUri description'- touchManagedPtr _obj- freeMem maybeUri- freeMem description'- return ()--data BookmarkFileSetDescriptionMethodInfo-instance (signature ~ (Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileSetDescriptionMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetDescription---- method BookmarkFile::set_groups--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "groups", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_groups" g_bookmark_file_set_groups :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- groups : TBasicType TUTF8- Word64 -> -- length : TBasicType TUInt64- IO ()---bookmarkFileSetGroups ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> Maybe (T.Text) -- groups- -> Word64 -- length_- -> m () -- result-bookmarkFileSetGroups _obj uri groups length_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- maybeGroups <- case groups of- Nothing -> return nullPtr- Just jGroups -> do- jGroups' <- textToCString jGroups- return jGroups'- g_bookmark_file_set_groups _obj' uri' maybeGroups length_- touchManagedPtr _obj- freeMem uri'- freeMem maybeGroups- return ()--data BookmarkFileSetGroupsMethodInfo-instance (signature ~ (T.Text -> Maybe (T.Text) -> Word64 -> m ()), MonadIO m) => MethodInfo BookmarkFileSetGroupsMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetGroups---- method BookmarkFile::set_icon--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "href", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_icon" g_bookmark_file_set_icon :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- href : TBasicType TUTF8- CString -> -- mime_type : TBasicType TUTF8- IO ()---bookmarkFileSetIcon ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> Maybe (T.Text) -- href- -> T.Text -- mimeType- -> m () -- result-bookmarkFileSetIcon _obj uri href mimeType = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- maybeHref <- case href of- Nothing -> return nullPtr- Just jHref -> do- jHref' <- textToCString jHref- return jHref'- mimeType' <- textToCString mimeType- g_bookmark_file_set_icon _obj' uri' maybeHref mimeType'- touchManagedPtr _obj- freeMem uri'- freeMem maybeHref- freeMem mimeType'- return ()--data BookmarkFileSetIconMethodInfo-instance (signature ~ (T.Text -> Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileSetIconMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetIcon---- method BookmarkFile::set_is_private--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_private", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_is_private" g_bookmark_file_set_is_private :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CInt -> -- is_private : TBasicType TBoolean- IO ()---bookmarkFileSetIsPrivate ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> Bool -- isPrivate- -> m () -- result-bookmarkFileSetIsPrivate _obj uri isPrivate = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- let isPrivate' = (fromIntegral . fromEnum) isPrivate- g_bookmark_file_set_is_private _obj' uri' isPrivate'- touchManagedPtr _obj- freeMem uri'- return ()--data BookmarkFileSetIsPrivateMethodInfo-instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m) => MethodInfo BookmarkFileSetIsPrivateMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetIsPrivate---- method BookmarkFile::set_mime_type--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_mime_type" g_bookmark_file_set_mime_type :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- mime_type : TBasicType TUTF8- IO ()---bookmarkFileSetMimeType ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> T.Text -- mimeType- -> m () -- result-bookmarkFileSetMimeType _obj uri mimeType = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- mimeType' <- textToCString mimeType- g_bookmark_file_set_mime_type _obj' uri' mimeType'- touchManagedPtr _obj- freeMem uri'- freeMem mimeType'- return ()--data BookmarkFileSetMimeTypeMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileSetMimeTypeMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetMimeType---- method BookmarkFile::set_modified--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "modified", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_modified" g_bookmark_file_set_modified :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CLong -> -- modified : TBasicType TLong- IO ()---bookmarkFileSetModified ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> CLong -- modified- -> m () -- result-bookmarkFileSetModified _obj uri modified = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- g_bookmark_file_set_modified _obj' uri' modified- touchManagedPtr _obj- freeMem uri'- return ()--data BookmarkFileSetModifiedMethodInfo-instance (signature ~ (T.Text -> CLong -> m ()), MonadIO m) => MethodInfo BookmarkFileSetModifiedMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetModified---- method BookmarkFile::set_title--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_title" g_bookmark_file_set_title :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CString -> -- title : TBasicType TUTF8- IO ()---bookmarkFileSetTitle ::- (MonadIO m) =>- BookmarkFile -- _obj- -> Maybe (T.Text) -- uri- -> T.Text -- title- -> m () -- result-bookmarkFileSetTitle _obj uri title = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeUri <- case uri of- Nothing -> return nullPtr- Just jUri -> do- jUri' <- textToCString jUri- return jUri'- title' <- textToCString title- g_bookmark_file_set_title _obj' maybeUri title'- touchManagedPtr _obj- freeMem maybeUri- freeMem title'- return ()--data BookmarkFileSetTitleMethodInfo-instance (signature ~ (Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileSetTitleMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetTitle---- method BookmarkFile::set_visited--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "visited", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_set_visited" g_bookmark_file_set_visited :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- uri : TBasicType TUTF8- CLong -> -- visited : TBasicType TLong- IO ()---bookmarkFileSetVisited ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- uri- -> CLong -- visited- -> m () -- result-bookmarkFileSetVisited _obj uri visited = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- uri' <- textToCString uri- g_bookmark_file_set_visited _obj' uri' visited- touchManagedPtr _obj- freeMem uri'- return ()--data BookmarkFileSetVisitedMethodInfo-instance (signature ~ (T.Text -> CLong -> m ()), MonadIO m) => MethodInfo BookmarkFileSetVisitedMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileSetVisited---- method BookmarkFile::to_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_to_data" g_bookmark_file_to_data :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---bookmarkFileToData ::- (MonadIO m) =>- BookmarkFile -- _obj- -> m (T.Text,Word64) -- result-bookmarkFileToData _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_bookmark_file_to_data _obj' length_- checkUnexpectedReturnNULL "g_bookmark_file_to_data" result- result' <- cstringToText result- freeMem result- length_' <- peek length_- touchManagedPtr _obj- freeMem length_- return (result', length_')- ) (do- freeMem length_- )--data BookmarkFileToDataMethodInfo-instance (signature ~ (m (T.Text,Word64)), MonadIO m) => MethodInfo BookmarkFileToDataMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileToData---- method BookmarkFile::to_file--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "BookmarkFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_bookmark_file_to_file" g_bookmark_file_to_file :: - Ptr BookmarkFile -> -- _obj : TInterface "GLib" "BookmarkFile"- CString -> -- filename : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---bookmarkFileToFile ::- (MonadIO m) =>- BookmarkFile -- _obj- -> T.Text -- filename- -> m () -- result-bookmarkFileToFile _obj filename = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- filename' <- textToCString filename- onException (do- _ <- propagateGError $ g_bookmark_file_to_file _obj' filename'- touchManagedPtr _obj- freeMem filename'- return ()- ) (do- freeMem filename'- )--data BookmarkFileToFileMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo BookmarkFileToFileMethodInfo BookmarkFile signature where- overloadedMethod _ = bookmarkFileToFile---- method BookmarkFile::error_quark--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_bookmark_file_error_quark" g_bookmark_file_error_quark :: - IO Word32---bookmarkFileErrorQuark ::- (MonadIO m) =>- m Word32 -- result-bookmarkFileErrorQuark = liftIO $ do- result <- g_bookmark_file_error_quark- return result--type family ResolveBookmarkFileMethod (t :: Symbol) (o :: *) :: * where- ResolveBookmarkFileMethod "addApplication" o = BookmarkFileAddApplicationMethodInfo- ResolveBookmarkFileMethod "addGroup" o = BookmarkFileAddGroupMethodInfo- ResolveBookmarkFileMethod "free" o = BookmarkFileFreeMethodInfo- ResolveBookmarkFileMethod "hasApplication" o = BookmarkFileHasApplicationMethodInfo- ResolveBookmarkFileMethod "hasGroup" o = BookmarkFileHasGroupMethodInfo- ResolveBookmarkFileMethod "hasItem" o = BookmarkFileHasItemMethodInfo- ResolveBookmarkFileMethod "loadFromData" o = BookmarkFileLoadFromDataMethodInfo- ResolveBookmarkFileMethod "loadFromDataDirs" o = BookmarkFileLoadFromDataDirsMethodInfo- ResolveBookmarkFileMethod "loadFromFile" o = BookmarkFileLoadFromFileMethodInfo- ResolveBookmarkFileMethod "moveItem" o = BookmarkFileMoveItemMethodInfo- ResolveBookmarkFileMethod "removeApplication" o = BookmarkFileRemoveApplicationMethodInfo- ResolveBookmarkFileMethod "removeGroup" o = BookmarkFileRemoveGroupMethodInfo- ResolveBookmarkFileMethod "removeItem" o = BookmarkFileRemoveItemMethodInfo- ResolveBookmarkFileMethod "toData" o = BookmarkFileToDataMethodInfo- ResolveBookmarkFileMethod "toFile" o = BookmarkFileToFileMethodInfo- ResolveBookmarkFileMethod "getAdded" o = BookmarkFileGetAddedMethodInfo- ResolveBookmarkFileMethod "getAppInfo" o = BookmarkFileGetAppInfoMethodInfo- ResolveBookmarkFileMethod "getApplications" o = BookmarkFileGetApplicationsMethodInfo- ResolveBookmarkFileMethod "getDescription" o = BookmarkFileGetDescriptionMethodInfo- ResolveBookmarkFileMethod "getGroups" o = BookmarkFileGetGroupsMethodInfo- ResolveBookmarkFileMethod "getIcon" o = BookmarkFileGetIconMethodInfo- ResolveBookmarkFileMethod "getIsPrivate" o = BookmarkFileGetIsPrivateMethodInfo- ResolveBookmarkFileMethod "getMimeType" o = BookmarkFileGetMimeTypeMethodInfo- ResolveBookmarkFileMethod "getModified" o = BookmarkFileGetModifiedMethodInfo- ResolveBookmarkFileMethod "getSize" o = BookmarkFileGetSizeMethodInfo- ResolveBookmarkFileMethod "getTitle" o = BookmarkFileGetTitleMethodInfo- ResolveBookmarkFileMethod "getUris" o = BookmarkFileGetUrisMethodInfo- ResolveBookmarkFileMethod "getVisited" o = BookmarkFileGetVisitedMethodInfo- ResolveBookmarkFileMethod "setAdded" o = BookmarkFileSetAddedMethodInfo- ResolveBookmarkFileMethod "setAppInfo" o = BookmarkFileSetAppInfoMethodInfo- ResolveBookmarkFileMethod "setDescription" o = BookmarkFileSetDescriptionMethodInfo- ResolveBookmarkFileMethod "setGroups" o = BookmarkFileSetGroupsMethodInfo- ResolveBookmarkFileMethod "setIcon" o = BookmarkFileSetIconMethodInfo- ResolveBookmarkFileMethod "setIsPrivate" o = BookmarkFileSetIsPrivateMethodInfo- ResolveBookmarkFileMethod "setMimeType" o = BookmarkFileSetMimeTypeMethodInfo- ResolveBookmarkFileMethod "setModified" o = BookmarkFileSetModifiedMethodInfo- ResolveBookmarkFileMethod "setTitle" o = BookmarkFileSetTitleMethodInfo- ResolveBookmarkFileMethod "setVisited" o = BookmarkFileSetVisitedMethodInfo- ResolveBookmarkFileMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveBookmarkFileMethod t BookmarkFile, MethodInfo info BookmarkFile p) => IsLabelProxy t (BookmarkFile -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveBookmarkFileMethod t BookmarkFile, MethodInfo info BookmarkFile p) => IsLabel t (BookmarkFile -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/BookmarkFile.hs-boot
@@ -1,49 +0,0 @@-module GI.GLib.Structs.BookmarkFile where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype BookmarkFile = BookmarkFile (ForeignPtr BookmarkFile)-instance WrappedPtr BookmarkFile where-data BookmarkFileAddApplicationMethodInfo-data BookmarkFileAddGroupMethodInfo-data BookmarkFileFreeMethodInfo-data BookmarkFileGetAddedMethodInfo-data BookmarkFileGetAppInfoMethodInfo-data BookmarkFileGetApplicationsMethodInfo-data BookmarkFileGetDescriptionMethodInfo-data BookmarkFileGetGroupsMethodInfo-data BookmarkFileGetIconMethodInfo-data BookmarkFileGetIsPrivateMethodInfo-data BookmarkFileGetMimeTypeMethodInfo-data BookmarkFileGetModifiedMethodInfo-data BookmarkFileGetSizeMethodInfo-data BookmarkFileGetTitleMethodInfo-data BookmarkFileGetUrisMethodInfo-data BookmarkFileGetVisitedMethodInfo-data BookmarkFileHasApplicationMethodInfo-data BookmarkFileHasGroupMethodInfo-data BookmarkFileHasItemMethodInfo-data BookmarkFileLoadFromDataMethodInfo-data BookmarkFileLoadFromDataDirsMethodInfo-data BookmarkFileLoadFromFileMethodInfo-data BookmarkFileMoveItemMethodInfo-data BookmarkFileRemoveApplicationMethodInfo-data BookmarkFileRemoveGroupMethodInfo-data BookmarkFileRemoveItemMethodInfo-data BookmarkFileSetAddedMethodInfo-data BookmarkFileSetAppInfoMethodInfo-data BookmarkFileSetDescriptionMethodInfo-data BookmarkFileSetGroupsMethodInfo-data BookmarkFileSetIconMethodInfo-data BookmarkFileSetIsPrivateMethodInfo-data BookmarkFileSetMimeTypeMethodInfo-data BookmarkFileSetModifiedMethodInfo-data BookmarkFileSetTitleMethodInfo-data BookmarkFileSetVisitedMethodInfo-data BookmarkFileToDataMethodInfo-data BookmarkFileToFileMethodInfo
− GI/GLib/Structs/ByteArray.hs
@@ -1,278 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Contains the public fields of a GByteArray.--}--module GI.GLib.Structs.ByteArray- ( ---- * Exported types- ByteArray(..) ,- newZeroByteArray ,- noByteArray ,--- -- * Methods--- ** byteArrayFree- byteArrayFree ,----- ** byteArrayFreeToBytes- byteArrayFreeToBytes ,----- ** byteArrayNew- byteArrayNew ,----- ** byteArrayNewTake- byteArrayNewTake ,----- ** byteArrayUnref- byteArrayUnref ,----- -- * Properties--- ** Data- byteArrayData ,- byteArrayReadData ,- byteArrayWriteData ,----- ** Len- byteArrayLen ,- byteArrayReadLen ,- byteArrayWriteLen ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype ByteArray = ByteArray (ForeignPtr ByteArray)-foreign import ccall "g_byte_array_get_type" c_g_byte_array_get_type :: - IO GType--instance BoxedObject ByteArray where- boxedType _ = c_g_byte_array_get_type---- | Construct a `ByteArray` struct initialized to zero.-newZeroByteArray :: MonadIO m => m ByteArray-newZeroByteArray = liftIO $ callocBoxedBytes 16 >>= wrapBoxed ByteArray--instance tag ~ 'AttrSet => Constructible ByteArray tag where- new _ attrs = do- o <- newZeroByteArray- GI.Attributes.set o attrs- return o---noByteArray :: Maybe ByteArray-noByteArray = Nothing--byteArrayReadData :: MonadIO m => ByteArray -> m Word8-byteArrayReadData s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word8- return val--byteArrayWriteData :: MonadIO m => ByteArray -> Word8 -> m ()-byteArrayWriteData s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word8)--data ByteArrayDataFieldInfo-instance AttrInfo ByteArrayDataFieldInfo where- type AttrAllowedOps ByteArrayDataFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ByteArrayDataFieldInfo = (~) Word8- type AttrBaseTypeConstraint ByteArrayDataFieldInfo = (~) ByteArray- type AttrGetType ByteArrayDataFieldInfo = Word8- type AttrLabel ByteArrayDataFieldInfo = "data"- attrGet _ = byteArrayReadData- attrSet _ = byteArrayWriteData- attrConstruct = undefined- attrClear _ = undefined--byteArrayData :: AttrLabelProxy "data"-byteArrayData = AttrLabelProxy---byteArrayReadLen :: MonadIO m => ByteArray -> m Word32-byteArrayReadLen s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--byteArrayWriteLen :: MonadIO m => ByteArray -> Word32 -> m ()-byteArrayWriteLen s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--data ByteArrayLenFieldInfo-instance AttrInfo ByteArrayLenFieldInfo where- type AttrAllowedOps ByteArrayLenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ByteArrayLenFieldInfo = (~) Word32- type AttrBaseTypeConstraint ByteArrayLenFieldInfo = (~) ByteArray- type AttrGetType ByteArrayLenFieldInfo = Word32- type AttrLabel ByteArrayLenFieldInfo = "len"- attrGet _ = byteArrayReadLen- attrSet _ = byteArrayWriteLen- attrConstruct = undefined- attrClear _ = undefined--byteArrayLen :: AttrLabelProxy "len"-byteArrayLen = AttrLabelProxy----type instance AttributeList ByteArray = ByteArrayAttributeList-type ByteArrayAttributeList = ('[ '("data", ByteArrayDataFieldInfo), '("len", ByteArrayLenFieldInfo)] :: [(Symbol, *)])---- method ByteArray::free--- method type : MemberFunction--- Args : [Arg {argCName = "array", argType = TByteArray, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "free_segment", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt8)--- throws : False--- Skip return : False--foreign import ccall "g_byte_array_free" g_byte_array_free :: - Ptr GByteArray -> -- array : TByteArray- CInt -> -- free_segment : TBasicType TBoolean- IO Word8---byteArrayFree ::- (MonadIO m) =>- ByteString -- array- -> Bool -- freeSegment- -> m Word8 -- result-byteArrayFree array freeSegment = liftIO $ do- array' <- packGByteArray array- let freeSegment' = (fromIntegral . fromEnum) freeSegment- result <- g_byte_array_free array' freeSegment'- unrefGByteArray array'- return result---- method ByteArray::free_to_bytes--- method type : MemberFunction--- Args : [Arg {argCName = "array", argType = TByteArray, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Bytes")--- throws : False--- Skip return : False--foreign import ccall "g_byte_array_free_to_bytes" g_byte_array_free_to_bytes :: - Ptr GByteArray -> -- array : TByteArray- IO (Ptr Bytes)---byteArrayFreeToBytes ::- (MonadIO m) =>- ByteString -- array- -> m Bytes -- result-byteArrayFreeToBytes array = liftIO $ do- array' <- packGByteArray array- result <- g_byte_array_free_to_bytes array'- checkUnexpectedReturnNULL "g_byte_array_free_to_bytes" result- result' <- (wrapBoxed Bytes) result- return result'---- method ByteArray::new--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just TByteArray--- throws : False--- Skip return : False--foreign import ccall "g_byte_array_new" g_byte_array_new :: - IO (Ptr GByteArray)---byteArrayNew ::- (MonadIO m) =>- m ByteString -- result-byteArrayNew = liftIO $ do- result <- g_byte_array_new- checkUnexpectedReturnNULL "g_byte_array_new" result- result' <- unpackGByteArray result- unrefGByteArray result- return result'---- method ByteArray::new_take--- method type : MemberFunction--- Args : [Arg {argCName = "data", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just TByteArray--- throws : False--- Skip return : False--foreign import ccall "g_byte_array_new_take" g_byte_array_new_take :: - Ptr Word8 -> -- data : TCArray False (-1) 1 (TBasicType TUInt8)- Word64 -> -- len : TBasicType TUInt64- IO (Ptr GByteArray)---byteArrayNewTake ::- (MonadIO m) =>- ByteString -- data_- -> m ByteString -- result-byteArrayNewTake data_ = liftIO $ do- let len = fromIntegral $ B.length data_- data_' <- packByteString data_- result <- g_byte_array_new_take data_' len- checkUnexpectedReturnNULL "g_byte_array_new_take" result- result' <- unpackGByteArray result- unrefGByteArray result- return result'---- method ByteArray::unref--- method type : MemberFunction--- Args : [Arg {argCName = "array", argType = TByteArray, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_byte_array_unref" g_byte_array_unref :: - Ptr GByteArray -> -- array : TByteArray- IO ()---byteArrayUnref ::- (MonadIO m) =>- ByteString -- array- -> m () -- result-byteArrayUnref array = liftIO $ do- array' <- packGByteArray array- g_byte_array_unref array'- unrefGByteArray array'- return ()--type family ResolveByteArrayMethod (t :: Symbol) (o :: *) :: * where- ResolveByteArrayMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveByteArrayMethod t ByteArray, MethodInfo info ByteArray p) => IsLabelProxy t (ByteArray -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveByteArrayMethod t ByteArray, MethodInfo info ByteArray p) => IsLabel t (ByteArray -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/ByteArray.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.ByteArray where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype ByteArray = ByteArray (ForeignPtr ByteArray)-instance BoxedObject ByteArray where
− GI/GLib/Structs/Bytes.hs
@@ -1,513 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A simple refcounted data type representing an immutable sequence of zero or-more bytes from an unspecified origin.--The purpose of a #GBytes is to keep the memory region that it holds-alive for as long as anyone holds a reference to the bytes. When-the last reference count is dropped, the memory is released. Multiple-unrelated callers can use byte data in the #GBytes without coordinating-their activities, resting assured that the byte data will not change or-move while they hold a reference.--A #GBytes can come from many different origins that may have-different procedures for freeing the memory region. Examples are-memory from g_malloc(), from memory slices, from a #GMappedFile or-memory from other allocators.--#GBytes work well as keys in #GHashTable. Use g_bytes_equal() and-g_bytes_hash() as parameters to g_hash_table_new() or g_hash_table_new_full().-#GBytes can also be used as keys in a #GTree by passing the g_bytes_compare()-function to g_tree_new().--The data pointed to by this bytes must not be modified. For a mutable-array of bytes see #GByteArray. Use g_bytes_unref_to_array() to create a-mutable array for a #GBytes sequence. To create an immutable #GBytes from-a mutable #GByteArray, use the g_byte_array_free_to_bytes() function.--}--module GI.GLib.Structs.Bytes- ( ---- * Exported types- Bytes(..) ,- noBytes ,--- -- * Methods--- ** bytesCompare- BytesCompareMethodInfo ,- bytesCompare ,----- ** bytesEqual- BytesEqualMethodInfo ,- bytesEqual ,----- ** bytesGetData- BytesGetDataMethodInfo ,- bytesGetData ,----- ** bytesGetSize- BytesGetSizeMethodInfo ,- bytesGetSize ,----- ** bytesHash- BytesHashMethodInfo ,- bytesHash ,----- ** bytesNew- bytesNew ,----- ** bytesNewFromBytes- BytesNewFromBytesMethodInfo ,- bytesNewFromBytes ,----- ** bytesNewTake- bytesNewTake ,----- ** bytesRef- BytesRefMethodInfo ,- bytesRef ,----- ** bytesUnref- BytesUnrefMethodInfo ,- bytesUnref ,----- ** bytesUnrefToArray- BytesUnrefToArrayMethodInfo ,- bytesUnrefToArray ,----- ** bytesUnrefToData- BytesUnrefToDataMethodInfo ,- bytesUnrefToData ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Bytes = Bytes (ForeignPtr Bytes)-foreign import ccall "g_bytes_get_type" c_g_bytes_get_type :: - IO GType--instance BoxedObject Bytes where- boxedType _ = c_g_bytes_get_type--noBytes :: Maybe Bytes-noBytes = Nothing---type instance AttributeList Bytes = BytesAttributeList-type BytesAttributeList = ('[ ] :: [(Symbol, *)])---- method Bytes::new--- method type : Constructor--- Args : [Arg {argCName = "data", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TInterface "GLib" "Bytes")--- throws : False--- Skip return : False--foreign import ccall "g_bytes_new" g_bytes_new :: - Ptr Word8 -> -- data : TCArray False (-1) 1 (TBasicType TUInt8)- Word64 -> -- size : TBasicType TUInt64- IO (Ptr Bytes)---bytesNew ::- (MonadIO m) =>- Maybe (ByteString) -- data_- -> m Bytes -- result-bytesNew data_ = liftIO $ do- let size = case data_ of- Nothing -> 0- Just jData_ -> fromIntegral $ B.length jData_- maybeData_ <- case data_ of- Nothing -> return nullPtr- Just jData_ -> do- jData_' <- packByteString jData_- return jData_'- result <- g_bytes_new maybeData_ size- checkUnexpectedReturnNULL "g_bytes_new" result- result' <- (wrapBoxed Bytes) result- freeMem maybeData_- return result'---- method Bytes::new_take--- method type : Constructor--- Args : [Arg {argCName = "data", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TInterface "GLib" "Bytes")--- throws : False--- Skip return : False--foreign import ccall "g_bytes_new_take" g_bytes_new_take :: - Ptr Word8 -> -- data : TCArray False (-1) 1 (TBasicType TUInt8)- Word64 -> -- size : TBasicType TUInt64- IO (Ptr Bytes)---bytesNewTake ::- (MonadIO m) =>- Maybe (ByteString) -- data_- -> m Bytes -- result-bytesNewTake data_ = liftIO $ do- let size = case data_ of- Nothing -> 0- Just jData_ -> fromIntegral $ B.length jData_- maybeData_ <- case data_ of- Nothing -> return nullPtr- Just jData_ -> do- jData_' <- packByteString jData_- return jData_'- result <- g_bytes_new_take maybeData_ size- checkUnexpectedReturnNULL "g_bytes_new_take" result- result' <- (wrapBoxed Bytes) result- return result'---- method Bytes::compare--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes2", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_bytes_compare" g_bytes_compare :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- Ptr Bytes -> -- bytes2 : TInterface "GLib" "Bytes"- IO Int32---bytesCompare ::- (MonadIO m) =>- Bytes -- _obj- -> Bytes -- bytes2- -> m Int32 -- result-bytesCompare _obj bytes2 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let bytes2' = unsafeManagedPtrGetPtr bytes2- result <- g_bytes_compare _obj' bytes2'- touchManagedPtr _obj- touchManagedPtr bytes2- return result--data BytesCompareMethodInfo-instance (signature ~ (Bytes -> m Int32), MonadIO m) => MethodInfo BytesCompareMethodInfo Bytes signature where- overloadedMethod _ = bytesCompare---- method Bytes::equal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes2", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_bytes_equal" g_bytes_equal :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- Ptr Bytes -> -- bytes2 : TInterface "GLib" "Bytes"- IO CInt---bytesEqual ::- (MonadIO m) =>- Bytes -- _obj- -> Bytes -- bytes2- -> m Bool -- result-bytesEqual _obj bytes2 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let bytes2' = unsafeManagedPtrGetPtr bytes2- result <- g_bytes_equal _obj' bytes2'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr bytes2- return result'--data BytesEqualMethodInfo-instance (signature ~ (Bytes -> m Bool), MonadIO m) => MethodInfo BytesEqualMethodInfo Bytes signature where- overloadedMethod _ = bytesEqual---- method Bytes::get_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 1 (TBasicType TUInt8))--- throws : False--- Skip return : False--foreign import ccall "g_bytes_get_data" g_bytes_get_data :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- Ptr Word64 -> -- size : TBasicType TUInt64- IO (Ptr Word8)---bytesGetData ::- (MonadIO m) =>- Bytes -- _obj- -> m ByteString -- result-bytesGetData _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- size <- allocMem :: IO (Ptr Word64)- result <- g_bytes_get_data _obj' size- size' <- peek size- checkUnexpectedReturnNULL "g_bytes_get_data" result- result' <- (unpackByteStringWithLength size') result- touchManagedPtr _obj- freeMem size- return result'--data BytesGetDataMethodInfo-instance (signature ~ (m ByteString), MonadIO m) => MethodInfo BytesGetDataMethodInfo Bytes signature where- overloadedMethod _ = bytesGetData---- method Bytes::get_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_bytes_get_size" g_bytes_get_size :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- IO Word64---bytesGetSize ::- (MonadIO m) =>- Bytes -- _obj- -> m Word64 -- result-bytesGetSize _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_bytes_get_size _obj'- touchManagedPtr _obj- return result--data BytesGetSizeMethodInfo-instance (signature ~ (m Word64), MonadIO m) => MethodInfo BytesGetSizeMethodInfo Bytes signature where- overloadedMethod _ = bytesGetSize---- method Bytes::hash--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_bytes_hash" g_bytes_hash :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- IO Word32---bytesHash ::- (MonadIO m) =>- Bytes -- _obj- -> m Word32 -- result-bytesHash _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_bytes_hash _obj'- touchManagedPtr _obj- return result--data BytesHashMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo BytesHashMethodInfo Bytes signature where- overloadedMethod _ = bytesHash---- method Bytes::new_from_bytes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "offset", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Bytes")--- throws : False--- Skip return : False--foreign import ccall "g_bytes_new_from_bytes" g_bytes_new_from_bytes :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- Word64 -> -- offset : TBasicType TUInt64- Word64 -> -- length : TBasicType TUInt64- IO (Ptr Bytes)---bytesNewFromBytes ::- (MonadIO m) =>- Bytes -- _obj- -> Word64 -- offset- -> Word64 -- length_- -> m Bytes -- result-bytesNewFromBytes _obj offset length_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_bytes_new_from_bytes _obj' offset length_- checkUnexpectedReturnNULL "g_bytes_new_from_bytes" result- result' <- (wrapBoxed Bytes) result- touchManagedPtr _obj- return result'--data BytesNewFromBytesMethodInfo-instance (signature ~ (Word64 -> Word64 -> m Bytes), MonadIO m) => MethodInfo BytesNewFromBytesMethodInfo Bytes signature where- overloadedMethod _ = bytesNewFromBytes---- method Bytes::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Bytes")--- throws : False--- Skip return : False--foreign import ccall "g_bytes_ref" g_bytes_ref :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- IO (Ptr Bytes)---bytesRef ::- (MonadIO m) =>- Bytes -- _obj- -> m Bytes -- result-bytesRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_bytes_ref _obj'- checkUnexpectedReturnNULL "g_bytes_ref" result- result' <- (wrapBoxed Bytes) result- touchManagedPtr _obj- return result'--data BytesRefMethodInfo-instance (signature ~ (m Bytes), MonadIO m) => MethodInfo BytesRefMethodInfo Bytes signature where- overloadedMethod _ = bytesRef---- method Bytes::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_bytes_unref" g_bytes_unref :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- IO ()---bytesUnref ::- (MonadIO m) =>- Bytes -- _obj- -> m () -- result-bytesUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_bytes_unref _obj'- touchManagedPtr _obj- return ()--data BytesUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo BytesUnrefMethodInfo Bytes signature where- overloadedMethod _ = bytesUnref---- method Bytes::unref_to_array--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just TByteArray--- throws : False--- Skip return : False--foreign import ccall "g_bytes_unref_to_array" g_bytes_unref_to_array :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- IO (Ptr GByteArray)---bytesUnrefToArray ::- (MonadIO m) =>- Bytes -- _obj- -> m ByteString -- result-bytesUnrefToArray _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_bytes_unref_to_array _obj'- checkUnexpectedReturnNULL "g_bytes_unref_to_array" result- result' <- unpackGByteArray result- unrefGByteArray result- touchManagedPtr _obj- return result'--data BytesUnrefToArrayMethodInfo-instance (signature ~ (m ByteString), MonadIO m) => MethodInfo BytesUnrefToArrayMethodInfo Bytes signature where- overloadedMethod _ = bytesUnrefToArray---- method Bytes::unref_to_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TPtr)--- throws : False--- Skip return : False--foreign import ccall "g_bytes_unref_to_data" g_bytes_unref_to_data :: - Ptr Bytes -> -- _obj : TInterface "GLib" "Bytes"- Word64 -> -- size : TBasicType TUInt64- IO (Ptr ())---bytesUnrefToData ::- (MonadIO m) =>- Bytes -- _obj- -> Word64 -- size- -> m (Ptr ()) -- result-bytesUnrefToData _obj size = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_bytes_unref_to_data _obj' size- touchManagedPtr _obj- return result--data BytesUnrefToDataMethodInfo-instance (signature ~ (Word64 -> m (Ptr ())), MonadIO m) => MethodInfo BytesUnrefToDataMethodInfo Bytes signature where- overloadedMethod _ = bytesUnrefToData--type family ResolveBytesMethod (t :: Symbol) (o :: *) :: * where- ResolveBytesMethod "compare" o = BytesCompareMethodInfo- ResolveBytesMethod "equal" o = BytesEqualMethodInfo- ResolveBytesMethod "hash" o = BytesHashMethodInfo- ResolveBytesMethod "newFromBytes" o = BytesNewFromBytesMethodInfo- ResolveBytesMethod "ref" o = BytesRefMethodInfo- ResolveBytesMethod "unref" o = BytesUnrefMethodInfo- ResolveBytesMethod "unrefToArray" o = BytesUnrefToArrayMethodInfo- ResolveBytesMethod "unrefToData" o = BytesUnrefToDataMethodInfo- ResolveBytesMethod "getData" o = BytesGetDataMethodInfo- ResolveBytesMethod "getSize" o = BytesGetSizeMethodInfo- ResolveBytesMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveBytesMethod t Bytes, MethodInfo info Bytes p) => IsLabelProxy t (Bytes -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveBytesMethod t Bytes, MethodInfo info Bytes p) => IsLabel t (Bytes -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Bytes.hs-boot
@@ -1,21 +0,0 @@-module GI.GLib.Structs.Bytes where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Bytes = Bytes (ForeignPtr Bytes)-instance BoxedObject Bytes where-data BytesCompareMethodInfo-data BytesEqualMethodInfo-data BytesGetDataMethodInfo-data BytesGetSizeMethodInfo-data BytesHashMethodInfo-data BytesNewFromBytesMethodInfo-data BytesRefMethodInfo-data BytesUnrefMethodInfo-data BytesUnrefToArrayMethodInfo-data BytesUnrefToDataMethodInfo
− GI/GLib/Structs/Checksum.hs
@@ -1,290 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--An opaque structure representing a checksumming operation.-To create a new GChecksum, use g_checksum_new(). To free-a GChecksum, use g_checksum_free().--}--module GI.GLib.Structs.Checksum- ( ---- * Exported types- Checksum(..) ,- noChecksum ,--- -- * Methods--- ** checksumCopy- ChecksumCopyMethodInfo ,- checksumCopy ,----- ** checksumFree- ChecksumFreeMethodInfo ,- checksumFree ,----- ** checksumGetString- ChecksumGetStringMethodInfo ,- checksumGetString ,----- ** checksumNew- checksumNew ,----- ** checksumReset- ChecksumResetMethodInfo ,- checksumReset ,----- ** checksumTypeGetLength- checksumTypeGetLength ,----- ** checksumUpdate- ChecksumUpdateMethodInfo ,- checksumUpdate ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Checksum = Checksum (ForeignPtr Checksum)-foreign import ccall "g_checksum_get_type" c_g_checksum_get_type :: - IO GType--instance BoxedObject Checksum where- boxedType _ = c_g_checksum_get_type--noChecksum :: Maybe Checksum-noChecksum = Nothing---type instance AttributeList Checksum = ChecksumAttributeList-type ChecksumAttributeList = ('[ ] :: [(Symbol, *)])---- method Checksum::new--- method type : Constructor--- Args : [Arg {argCName = "checksum_type", argType = TInterface "GLib" "ChecksumType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Checksum")--- throws : False--- Skip return : False--foreign import ccall "g_checksum_new" g_checksum_new :: - CUInt -> -- checksum_type : TInterface "GLib" "ChecksumType"- IO (Ptr Checksum)---checksumNew ::- (MonadIO m) =>- ChecksumType -- checksumType- -> m Checksum -- result-checksumNew checksumType = liftIO $ do- let checksumType' = (fromIntegral . fromEnum) checksumType- result <- g_checksum_new checksumType'- checkUnexpectedReturnNULL "g_checksum_new" result- result' <- (wrapBoxed Checksum) result- return result'---- method Checksum::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Checksum", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Checksum")--- throws : False--- Skip return : False--foreign import ccall "g_checksum_copy" g_checksum_copy :: - Ptr Checksum -> -- _obj : TInterface "GLib" "Checksum"- IO (Ptr Checksum)---checksumCopy ::- (MonadIO m) =>- Checksum -- _obj- -> m Checksum -- result-checksumCopy _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_checksum_copy _obj'- checkUnexpectedReturnNULL "g_checksum_copy" result- result' <- (wrapBoxed Checksum) result- touchManagedPtr _obj- return result'--data ChecksumCopyMethodInfo-instance (signature ~ (m Checksum), MonadIO m) => MethodInfo ChecksumCopyMethodInfo Checksum signature where- overloadedMethod _ = checksumCopy---- method Checksum::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Checksum", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_checksum_free" g_checksum_free :: - Ptr Checksum -> -- _obj : TInterface "GLib" "Checksum"- IO ()---checksumFree ::- (MonadIO m) =>- Checksum -- _obj- -> m () -- result-checksumFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_checksum_free _obj'- touchManagedPtr _obj- return ()--data ChecksumFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo ChecksumFreeMethodInfo Checksum signature where- overloadedMethod _ = checksumFree---- method Checksum::get_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Checksum", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_checksum_get_string" g_checksum_get_string :: - Ptr Checksum -> -- _obj : TInterface "GLib" "Checksum"- IO CString---checksumGetString ::- (MonadIO m) =>- Checksum -- _obj- -> m T.Text -- result-checksumGetString _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_checksum_get_string _obj'- checkUnexpectedReturnNULL "g_checksum_get_string" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data ChecksumGetStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo ChecksumGetStringMethodInfo Checksum signature where- overloadedMethod _ = checksumGetString---- method Checksum::reset--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Checksum", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_checksum_reset" g_checksum_reset :: - Ptr Checksum -> -- _obj : TInterface "GLib" "Checksum"- IO ()---checksumReset ::- (MonadIO m) =>- Checksum -- _obj- -> m () -- result-checksumReset _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_checksum_reset _obj'- touchManagedPtr _obj- return ()--data ChecksumResetMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo ChecksumResetMethodInfo Checksum signature where- overloadedMethod _ = checksumReset---- method Checksum::update--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Checksum", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_checksum_update" g_checksum_update :: - Ptr Checksum -> -- _obj : TInterface "GLib" "Checksum"- Ptr Word8 -> -- data : TCArray False (-1) 2 (TBasicType TUInt8)- Int64 -> -- length : TBasicType TInt64- IO ()---checksumUpdate ::- (MonadIO m) =>- Checksum -- _obj- -> ByteString -- data_- -> m () -- result-checksumUpdate _obj data_ = liftIO $ do- let length_ = fromIntegral $ B.length data_- let _obj' = unsafeManagedPtrGetPtr _obj- data_' <- packByteString data_- g_checksum_update _obj' data_' length_- touchManagedPtr _obj- freeMem data_'- return ()--data ChecksumUpdateMethodInfo-instance (signature ~ (ByteString -> m ()), MonadIO m) => MethodInfo ChecksumUpdateMethodInfo Checksum signature where- overloadedMethod _ = checksumUpdate---- method Checksum::type_get_length--- method type : MemberFunction--- Args : [Arg {argCName = "checksum_type", argType = TInterface "GLib" "ChecksumType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_checksum_type_get_length" g_checksum_type_get_length :: - CUInt -> -- checksum_type : TInterface "GLib" "ChecksumType"- IO Int64---checksumTypeGetLength ::- (MonadIO m) =>- ChecksumType -- checksumType- -> m Int64 -- result-checksumTypeGetLength checksumType = liftIO $ do- let checksumType' = (fromIntegral . fromEnum) checksumType- result <- g_checksum_type_get_length checksumType'- return result--type family ResolveChecksumMethod (t :: Symbol) (o :: *) :: * where- ResolveChecksumMethod "copy" o = ChecksumCopyMethodInfo- ResolveChecksumMethod "free" o = ChecksumFreeMethodInfo- ResolveChecksumMethod "reset" o = ChecksumResetMethodInfo- ResolveChecksumMethod "update" o = ChecksumUpdateMethodInfo- ResolveChecksumMethod "getString" o = ChecksumGetStringMethodInfo- ResolveChecksumMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveChecksumMethod t Checksum, MethodInfo info Checksum p) => IsLabelProxy t (Checksum -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveChecksumMethod t Checksum, MethodInfo info Checksum p) => IsLabel t (Checksum -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Checksum.hs-boot
@@ -1,16 +0,0 @@-module GI.GLib.Structs.Checksum where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Checksum = Checksum (ForeignPtr Checksum)-instance BoxedObject Checksum where-data ChecksumCopyMethodInfo-data ChecksumFreeMethodInfo-data ChecksumGetStringMethodInfo-data ChecksumResetMethodInfo-data ChecksumUpdateMethodInfo
− GI/GLib/Structs/Cond.hs
@@ -1,343 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GCond struct is an opaque data structure that represents a-condition. Threads can block on a #GCond if they find a certain-condition to be false. If other threads change the state of this-condition they signal the #GCond, and that causes the waiting-threads to be woken up.--Consider the following example of a shared variable. One or more-threads can wait for data to be published to the variable and when-another thread publishes the data, it can signal one of the waiting-threads to wake up to collect the data.--Here is an example for using GCond to block a thread until a condition-is satisfied:-|[<!-- language="C" -->- gpointer current_data = NULL;- GMutex data_mutex;- GCond data_cond;-- void- push_data (gpointer data)- {- g_mutex_lock (&data_mutex);- current_data = data;- g_cond_signal (&data_cond);- g_mutex_unlock (&data_mutex);- }-- gpointer- pop_data (void)- {- gpointer data;-- g_mutex_lock (&data_mutex);- while (!current_data)- g_cond_wait (&data_cond, &data_mutex);- data = current_data;- current_data = NULL;- g_mutex_unlock (&data_mutex);-- return data;- }-]|-Whenever a thread calls pop_data() now, it will wait until-current_data is non-%NULL, i.e. until some other thread-has called push_data().--The example shows that use of a condition variable must always be-paired with a mutex. Without the use of a mutex, there would be a-race between the check of @current_data by the while loop in-pop_data() and waiting. Specifically, another thread could set-@current_data after the check, and signal the cond (with nobody-waiting on it) before the first thread goes to sleep. #GCond is-specifically useful for its ability to release the mutex and go-to sleep atomically.--It is also important to use the g_cond_wait() and g_cond_wait_until()-functions only inside a loop which checks for the condition to be-true. See g_cond_wait() for an explanation of why the condition may-not be true even after it returns.--If a #GCond is allocated in static storage then it can be used-without initialisation. Otherwise, you should call g_cond_init()-on it and g_cond_clear() when done.--A #GCond should only be accessed via the g_cond_ functions.--}--module GI.GLib.Structs.Cond- ( ---- * Exported types- Cond(..) ,- newZeroCond ,- noCond ,--- -- * Methods--- ** condBroadcast- CondBroadcastMethodInfo ,- condBroadcast ,----- ** condClear- CondClearMethodInfo ,- condClear ,----- ** condInit- CondInitMethodInfo ,- condInit ,----- ** condSignal- CondSignalMethodInfo ,- condSignal ,----- ** condWait- CondWaitMethodInfo ,- condWait ,----- ** condWaitUntil- CondWaitUntilMethodInfo ,- condWaitUntil ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Cond = Cond (ForeignPtr Cond)-instance WrappedPtr Cond where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = copyPtr 16- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Cond` struct initialized to zero.-newZeroCond :: MonadIO m => m Cond-newZeroCond = liftIO $ wrappedPtrCalloc >>= wrapPtr Cond--instance tag ~ 'AttrSet => Constructible Cond tag where- new _ attrs = do- o <- newZeroCond- GI.Attributes.set o attrs- return o---noCond :: Maybe Cond-noCond = Nothing---type instance AttributeList Cond = CondAttributeList-type CondAttributeList = ('[ ] :: [(Symbol, *)])---- method Cond::broadcast--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Cond", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_cond_broadcast" g_cond_broadcast :: - Ptr Cond -> -- _obj : TInterface "GLib" "Cond"- IO ()---condBroadcast ::- (MonadIO m) =>- Cond -- _obj- -> m () -- result-condBroadcast _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_cond_broadcast _obj'- touchManagedPtr _obj- return ()--data CondBroadcastMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo CondBroadcastMethodInfo Cond signature where- overloadedMethod _ = condBroadcast---- method Cond::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Cond", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_cond_clear" g_cond_clear :: - Ptr Cond -> -- _obj : TInterface "GLib" "Cond"- IO ()---condClear ::- (MonadIO m) =>- Cond -- _obj- -> m () -- result-condClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_cond_clear _obj'- touchManagedPtr _obj- return ()--data CondClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo CondClearMethodInfo Cond signature where- overloadedMethod _ = condClear---- method Cond::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Cond", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_cond_init" g_cond_init :: - Ptr Cond -> -- _obj : TInterface "GLib" "Cond"- IO ()---condInit ::- (MonadIO m) =>- Cond -- _obj- -> m () -- result-condInit _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_cond_init _obj'- touchManagedPtr _obj- return ()--data CondInitMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo CondInitMethodInfo Cond signature where- overloadedMethod _ = condInit---- method Cond::signal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Cond", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_cond_signal" g_cond_signal :: - Ptr Cond -> -- _obj : TInterface "GLib" "Cond"- IO ()---condSignal ::- (MonadIO m) =>- Cond -- _obj- -> m () -- result-condSignal _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_cond_signal _obj'- touchManagedPtr _obj- return ()--data CondSignalMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo CondSignalMethodInfo Cond signature where- overloadedMethod _ = condSignal---- method Cond::wait--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Cond", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mutex", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_cond_wait" g_cond_wait :: - Ptr Cond -> -- _obj : TInterface "GLib" "Cond"- Ptr Mutex -> -- mutex : TInterface "GLib" "Mutex"- IO ()---condWait ::- (MonadIO m) =>- Cond -- _obj- -> Mutex -- mutex- -> m () -- result-condWait _obj mutex = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let mutex' = unsafeManagedPtrGetPtr mutex- g_cond_wait _obj' mutex'- touchManagedPtr _obj- touchManagedPtr mutex- return ()--data CondWaitMethodInfo-instance (signature ~ (Mutex -> m ()), MonadIO m) => MethodInfo CondWaitMethodInfo Cond signature where- overloadedMethod _ = condWait---- method Cond::wait_until--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Cond", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mutex", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end_time", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_cond_wait_until" g_cond_wait_until :: - Ptr Cond -> -- _obj : TInterface "GLib" "Cond"- Ptr Mutex -> -- mutex : TInterface "GLib" "Mutex"- Int64 -> -- end_time : TBasicType TInt64- IO CInt---condWaitUntil ::- (MonadIO m) =>- Cond -- _obj- -> Mutex -- mutex- -> Int64 -- endTime- -> m Bool -- result-condWaitUntil _obj mutex endTime = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let mutex' = unsafeManagedPtrGetPtr mutex- result <- g_cond_wait_until _obj' mutex' endTime- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr mutex- return result'--data CondWaitUntilMethodInfo-instance (signature ~ (Mutex -> Int64 -> m Bool), MonadIO m) => MethodInfo CondWaitUntilMethodInfo Cond signature where- overloadedMethod _ = condWaitUntil--type family ResolveCondMethod (t :: Symbol) (o :: *) :: * where- ResolveCondMethod "broadcast" o = CondBroadcastMethodInfo- ResolveCondMethod "clear" o = CondClearMethodInfo- ResolveCondMethod "init" o = CondInitMethodInfo- ResolveCondMethod "signal" o = CondSignalMethodInfo- ResolveCondMethod "wait" o = CondWaitMethodInfo- ResolveCondMethod "waitUntil" o = CondWaitUntilMethodInfo- ResolveCondMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveCondMethod t Cond, MethodInfo info Cond p) => IsLabelProxy t (Cond -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveCondMethod t Cond, MethodInfo info Cond p) => IsLabel t (Cond -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Cond.hs-boot
@@ -1,17 +0,0 @@-module GI.GLib.Structs.Cond where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Cond = Cond (ForeignPtr Cond)-instance WrappedPtr Cond where-data CondBroadcastMethodInfo-data CondClearMethodInfo-data CondInitMethodInfo-data CondSignalMethodInfo-data CondWaitMethodInfo-data CondWaitUntilMethodInfo
− GI/GLib/Structs/Data.hs
@@ -1,58 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GData struct is an opaque data structure to represent a-[Keyed Data List][glib-Keyed-Data-Lists]. It should only be-accessed via the following functions.--}--module GI.GLib.Structs.Data- ( ---- * Exported types- Data(..) ,- noData ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Data = Data (ForeignPtr Data)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Data where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noData :: Maybe Data-noData = Nothing---type instance AttributeList Data = DataAttributeList-type DataAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveDataMethod (t :: Symbol) (o :: *) :: * where- ResolveDataMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveDataMethod t Data, MethodInfo info Data p) => IsLabelProxy t (Data -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveDataMethod t Data, MethodInfo info Data p) => IsLabel t (Data -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Data.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.Data where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Data = Data (ForeignPtr Data)-instance WrappedPtr Data where
− GI/GLib/Structs/Date.hs
@@ -1,1849 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Represents a day between January 1, Year 1 and a few thousand years in-the future. None of its members should be accessed directly.--If the #GDate-struct is obtained from g_date_new(), it will be safe-to mutate but invalid and thus not safe for calendrical computations.--If it's declared on the stack, it will contain garbage so must be-initialized with g_date_clear(). g_date_clear() makes the date invalid-but sane. An invalid date doesn't represent a day, it's "empty." A date-becomes valid after you set it to a Julian day or you set a day, month,-and year.--}--module GI.GLib.Structs.Date- ( ---- * Exported types- Date(..) ,- newZeroDate ,- noDate ,--- -- * Methods--- ** dateAddDays- DateAddDaysMethodInfo ,- dateAddDays ,----- ** dateAddMonths- DateAddMonthsMethodInfo ,- dateAddMonths ,----- ** dateAddYears- DateAddYearsMethodInfo ,- dateAddYears ,----- ** dateClamp- DateClampMethodInfo ,- dateClamp ,----- ** dateClear- DateClearMethodInfo ,- dateClear ,----- ** dateCompare- DateCompareMethodInfo ,- dateCompare ,----- ** dateDaysBetween- DateDaysBetweenMethodInfo ,- dateDaysBetween ,----- ** dateFree- DateFreeMethodInfo ,- dateFree ,----- ** dateGetDay- DateGetDayMethodInfo ,- dateGetDay ,----- ** dateGetDayOfYear- DateGetDayOfYearMethodInfo ,- dateGetDayOfYear ,----- ** dateGetDaysInMonth- dateGetDaysInMonth ,----- ** dateGetIso8601WeekOfYear- DateGetIso8601WeekOfYearMethodInfo ,- dateGetIso8601WeekOfYear ,----- ** dateGetJulian- DateGetJulianMethodInfo ,- dateGetJulian ,----- ** dateGetMondayWeekOfYear- DateGetMondayWeekOfYearMethodInfo ,- dateGetMondayWeekOfYear ,----- ** dateGetMondayWeeksInYear- dateGetMondayWeeksInYear ,----- ** dateGetMonth- DateGetMonthMethodInfo ,- dateGetMonth ,----- ** dateGetSundayWeekOfYear- DateGetSundayWeekOfYearMethodInfo ,- dateGetSundayWeekOfYear ,----- ** dateGetSundayWeeksInYear- dateGetSundayWeeksInYear ,----- ** dateGetWeekday- DateGetWeekdayMethodInfo ,- dateGetWeekday ,----- ** dateGetYear- DateGetYearMethodInfo ,- dateGetYear ,----- ** dateIsFirstOfMonth- DateIsFirstOfMonthMethodInfo ,- dateIsFirstOfMonth ,----- ** dateIsLastOfMonth- DateIsLastOfMonthMethodInfo ,- dateIsLastOfMonth ,----- ** dateIsLeapYear- dateIsLeapYear ,----- ** dateNew- dateNew ,----- ** dateNewDmy- dateNewDmy ,----- ** dateNewJulian- dateNewJulian ,----- ** dateOrder- DateOrderMethodInfo ,- dateOrder ,----- ** dateSetDay- DateSetDayMethodInfo ,- dateSetDay ,----- ** dateSetDmy- DateSetDmyMethodInfo ,- dateSetDmy ,----- ** dateSetJulian- DateSetJulianMethodInfo ,- dateSetJulian ,----- ** dateSetMonth- DateSetMonthMethodInfo ,- dateSetMonth ,----- ** dateSetParse- DateSetParseMethodInfo ,- dateSetParse ,----- ** dateSetTime- DateSetTimeMethodInfo ,- dateSetTime ,----- ** dateSetTimeT- DateSetTimeTMethodInfo ,- dateSetTimeT ,----- ** dateSetTimeVal- DateSetTimeValMethodInfo ,- dateSetTimeVal ,----- ** dateSetYear- DateSetYearMethodInfo ,- dateSetYear ,----- ** dateStrftime- dateStrftime ,----- ** dateSubtractDays- DateSubtractDaysMethodInfo ,- dateSubtractDays ,----- ** dateSubtractMonths- DateSubtractMonthsMethodInfo ,- dateSubtractMonths ,----- ** dateSubtractYears- DateSubtractYearsMethodInfo ,- dateSubtractYears ,----- ** dateToStructTm- DateToStructTmMethodInfo ,- dateToStructTm ,----- ** dateValid- DateValidMethodInfo ,- dateValid ,----- ** dateValidDay- dateValidDay ,----- ** dateValidDmy- dateValidDmy ,----- ** dateValidJulian- dateValidJulian ,----- ** dateValidMonth- dateValidMonth ,----- ** dateValidWeekday- dateValidWeekday ,----- ** dateValidYear- dateValidYear ,----- -- * Properties--- ** Day- dateDay ,- dateReadDay ,- dateWriteDay ,----- ** Dmy- dateDmy ,- dateReadDmy ,- dateWriteDmy ,----- ** Julian- dateJulian ,- dateReadJulian ,- dateWriteJulian ,----- ** JulianDays- dateJulianDays ,- dateReadJulianDays ,- dateWriteJulianDays ,----- ** Month- dateMonth ,- dateReadMonth ,- dateWriteMonth ,----- ** Year- dateReadYear ,- dateWriteYear ,- dateYear ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Date = Date (ForeignPtr Date)-foreign import ccall "g_date_get_type" c_g_date_get_type :: - IO GType--instance BoxedObject Date where- boxedType _ = c_g_date_get_type---- | Construct a `Date` struct initialized to zero.-newZeroDate :: MonadIO m => m Date-newZeroDate = liftIO $ callocBoxedBytes 24 >>= wrapBoxed Date--instance tag ~ 'AttrSet => Constructible Date tag where- new _ attrs = do- o <- newZeroDate- GI.Attributes.set o attrs- return o---noDate :: Maybe Date-noDate = Nothing--dateReadJulianDays :: MonadIO m => Date -> m Word32-dateReadJulianDays s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word32- return val--dateWriteJulianDays :: MonadIO m => Date -> Word32 -> m ()-dateWriteJulianDays s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word32)--data DateJulianDaysFieldInfo-instance AttrInfo DateJulianDaysFieldInfo where- type AttrAllowedOps DateJulianDaysFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DateJulianDaysFieldInfo = (~) Word32- type AttrBaseTypeConstraint DateJulianDaysFieldInfo = (~) Date- type AttrGetType DateJulianDaysFieldInfo = Word32- type AttrLabel DateJulianDaysFieldInfo = "julian_days"- attrGet _ = dateReadJulianDays- attrSet _ = dateWriteJulianDays- attrConstruct = undefined- attrClear _ = undefined--dateJulianDays :: AttrLabelProxy "julianDays"-dateJulianDays = AttrLabelProxy---dateReadJulian :: MonadIO m => Date -> m Word32-dateReadJulian s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Word32- return val--dateWriteJulian :: MonadIO m => Date -> Word32 -> m ()-dateWriteJulian s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Word32)--data DateJulianFieldInfo-instance AttrInfo DateJulianFieldInfo where- type AttrAllowedOps DateJulianFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DateJulianFieldInfo = (~) Word32- type AttrBaseTypeConstraint DateJulianFieldInfo = (~) Date- type AttrGetType DateJulianFieldInfo = Word32- type AttrLabel DateJulianFieldInfo = "julian"- attrGet _ = dateReadJulian- attrSet _ = dateWriteJulian- attrConstruct = undefined- attrClear _ = undefined--dateJulian :: AttrLabelProxy "julian"-dateJulian = AttrLabelProxy---dateReadDmy :: MonadIO m => Date -> m Word32-dateReadDmy s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--dateWriteDmy :: MonadIO m => Date -> Word32 -> m ()-dateWriteDmy s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--data DateDmyFieldInfo-instance AttrInfo DateDmyFieldInfo where- type AttrAllowedOps DateDmyFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DateDmyFieldInfo = (~) Word32- type AttrBaseTypeConstraint DateDmyFieldInfo = (~) Date- type AttrGetType DateDmyFieldInfo = Word32- type AttrLabel DateDmyFieldInfo = "dmy"- attrGet _ = dateReadDmy- attrSet _ = dateWriteDmy- attrConstruct = undefined- attrClear _ = undefined--dateDmy :: AttrLabelProxy "dmy"-dateDmy = AttrLabelProxy---dateReadDay :: MonadIO m => Date -> m Word32-dateReadDay s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Word32- return val--dateWriteDay :: MonadIO m => Date -> Word32 -> m ()-dateWriteDay s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Word32)--data DateDayFieldInfo-instance AttrInfo DateDayFieldInfo where- type AttrAllowedOps DateDayFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DateDayFieldInfo = (~) Word32- type AttrBaseTypeConstraint DateDayFieldInfo = (~) Date- type AttrGetType DateDayFieldInfo = Word32- type AttrLabel DateDayFieldInfo = "day"- attrGet _ = dateReadDay- attrSet _ = dateWriteDay- attrConstruct = undefined- attrClear _ = undefined--dateDay :: AttrLabelProxy "day"-dateDay = AttrLabelProxy---dateReadMonth :: MonadIO m => Date -> m Word32-dateReadMonth s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Word32- return val--dateWriteMonth :: MonadIO m => Date -> Word32 -> m ()-dateWriteMonth s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Word32)--data DateMonthFieldInfo-instance AttrInfo DateMonthFieldInfo where- type AttrAllowedOps DateMonthFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DateMonthFieldInfo = (~) Word32- type AttrBaseTypeConstraint DateMonthFieldInfo = (~) Date- type AttrGetType DateMonthFieldInfo = Word32- type AttrLabel DateMonthFieldInfo = "month"- attrGet _ = dateReadMonth- attrSet _ = dateWriteMonth- attrConstruct = undefined- attrClear _ = undefined--dateMonth :: AttrLabelProxy "month"-dateMonth = AttrLabelProxy---dateReadYear :: MonadIO m => Date -> m Word32-dateReadYear s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 20) :: IO Word32- return val--dateWriteYear :: MonadIO m => Date -> Word32 -> m ()-dateWriteYear s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 20) (val :: Word32)--data DateYearFieldInfo-instance AttrInfo DateYearFieldInfo where- type AttrAllowedOps DateYearFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DateYearFieldInfo = (~) Word32- type AttrBaseTypeConstraint DateYearFieldInfo = (~) Date- type AttrGetType DateYearFieldInfo = Word32- type AttrLabel DateYearFieldInfo = "year"- attrGet _ = dateReadYear- attrSet _ = dateWriteYear- attrConstruct = undefined- attrClear _ = undefined--dateYear :: AttrLabelProxy "year"-dateYear = AttrLabelProxy----type instance AttributeList Date = DateAttributeList-type DateAttributeList = ('[ '("julianDays", DateJulianDaysFieldInfo), '("julian", DateJulianFieldInfo), '("dmy", DateDmyFieldInfo), '("day", DateDayFieldInfo), '("month", DateMonthFieldInfo), '("year", DateYearFieldInfo)] :: [(Symbol, *)])---- method Date::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "Date")--- throws : False--- Skip return : False--foreign import ccall "g_date_new" g_date_new :: - IO (Ptr Date)---dateNew ::- (MonadIO m) =>- m Date -- result-dateNew = liftIO $ do- result <- g_date_new- checkUnexpectedReturnNULL "g_date_new" result- result' <- (wrapBoxed Date) result- return result'---- method Date::new_dmy--- method type : Constructor--- Args : [Arg {argCName = "day", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TInterface "GLib" "DateMonth", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Date")--- throws : False--- Skip return : False--foreign import ccall "g_date_new_dmy" g_date_new_dmy :: - Word8 -> -- day : TBasicType TUInt8- CUInt -> -- month : TInterface "GLib" "DateMonth"- Word16 -> -- year : TBasicType TUInt16- IO (Ptr Date)---dateNewDmy ::- (MonadIO m) =>- Word8 -- day- -> DateMonth -- month- -> Word16 -- year- -> m Date -- result-dateNewDmy day month year = liftIO $ do- let month' = (fromIntegral . fromEnum) month- result <- g_date_new_dmy day month' year- checkUnexpectedReturnNULL "g_date_new_dmy" result- result' <- (wrapBoxed Date) result- return result'---- method Date::new_julian--- method type : Constructor--- Args : [Arg {argCName = "julian_day", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Date")--- throws : False--- Skip return : False--foreign import ccall "g_date_new_julian" g_date_new_julian :: - Word32 -> -- julian_day : TBasicType TUInt32- IO (Ptr Date)---dateNewJulian ::- (MonadIO m) =>- Word32 -- julianDay- -> m Date -- result-dateNewJulian julianDay = liftIO $ do- result <- g_date_new_julian julianDay- checkUnexpectedReturnNULL "g_date_new_julian" result- result' <- (wrapBoxed Date) result- return result'---- method Date::add_days--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_days", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_add_days" g_date_add_days :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- n_days : TBasicType TUInt- IO ()---dateAddDays ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- nDays- -> m () -- result-dateAddDays _obj nDays = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_add_days _obj' nDays- touchManagedPtr _obj- return ()--data DateAddDaysMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateAddDaysMethodInfo Date signature where- overloadedMethod _ = dateAddDays---- method Date::add_months--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_months", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_add_months" g_date_add_months :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- n_months : TBasicType TUInt- IO ()---dateAddMonths ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- nMonths- -> m () -- result-dateAddMonths _obj nMonths = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_add_months _obj' nMonths- touchManagedPtr _obj- return ()--data DateAddMonthsMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateAddMonthsMethodInfo Date signature where- overloadedMethod _ = dateAddMonths---- method Date::add_years--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_years", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_add_years" g_date_add_years :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- n_years : TBasicType TUInt- IO ()---dateAddYears ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- nYears- -> m () -- result-dateAddYears _obj nYears = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_add_years _obj' nYears- touchManagedPtr _obj- return ()--data DateAddYearsMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateAddYearsMethodInfo Date signature where- overloadedMethod _ = dateAddYears---- method Date::clamp--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "min_date", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_date", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_clamp" g_date_clamp :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Ptr Date -> -- min_date : TInterface "GLib" "Date"- Ptr Date -> -- max_date : TInterface "GLib" "Date"- IO ()---dateClamp ::- (MonadIO m) =>- Date -- _obj- -> Date -- minDate- -> Date -- maxDate- -> m () -- result-dateClamp _obj minDate maxDate = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let minDate' = unsafeManagedPtrGetPtr minDate- let maxDate' = unsafeManagedPtrGetPtr maxDate- g_date_clamp _obj' minDate' maxDate'- touchManagedPtr _obj- touchManagedPtr minDate- touchManagedPtr maxDate- return ()--data DateClampMethodInfo-instance (signature ~ (Date -> Date -> m ()), MonadIO m) => MethodInfo DateClampMethodInfo Date signature where- overloadedMethod _ = dateClamp---- method Date::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_dates", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_clear" g_date_clear :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- n_dates : TBasicType TUInt- IO ()---dateClear ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- nDates- -> m () -- result-dateClear _obj nDates = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_clear _obj' nDates- touchManagedPtr _obj- return ()--data DateClearMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateClearMethodInfo Date signature where- overloadedMethod _ = dateClear---- method Date::compare--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "rhs", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_compare" g_date_compare :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Ptr Date -> -- rhs : TInterface "GLib" "Date"- IO Int32---dateCompare ::- (MonadIO m) =>- Date -- _obj- -> Date -- rhs- -> m Int32 -- result-dateCompare _obj rhs = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let rhs' = unsafeManagedPtrGetPtr rhs- result <- g_date_compare _obj' rhs'- touchManagedPtr _obj- touchManagedPtr rhs- return result--data DateCompareMethodInfo-instance (signature ~ (Date -> m Int32), MonadIO m) => MethodInfo DateCompareMethodInfo Date signature where- overloadedMethod _ = dateCompare---- method Date::days_between--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "date2", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_days_between" g_date_days_between :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Ptr Date -> -- date2 : TInterface "GLib" "Date"- IO Int32---dateDaysBetween ::- (MonadIO m) =>- Date -- _obj- -> Date -- date2- -> m Int32 -- result-dateDaysBetween _obj date2 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let date2' = unsafeManagedPtrGetPtr date2- result <- g_date_days_between _obj' date2'- touchManagedPtr _obj- touchManagedPtr date2- return result--data DateDaysBetweenMethodInfo-instance (signature ~ (Date -> m Int32), MonadIO m) => MethodInfo DateDaysBetweenMethodInfo Date signature where- overloadedMethod _ = dateDaysBetween---- method Date::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_free" g_date_free :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO ()---dateFree ::- (MonadIO m) =>- Date -- _obj- -> m () -- result-dateFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_free _obj'- touchManagedPtr _obj- return ()--data DateFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo DateFreeMethodInfo Date signature where- overloadedMethod _ = dateFree---- method Date::get_day--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt8)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_day" g_date_get_day :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO Word8---dateGetDay ::- (MonadIO m) =>- Date -- _obj- -> m Word8 -- result-dateGetDay _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_day _obj'- touchManagedPtr _obj- return result--data DateGetDayMethodInfo-instance (signature ~ (m Word8), MonadIO m) => MethodInfo DateGetDayMethodInfo Date signature where- overloadedMethod _ = dateGetDay---- method Date::get_day_of_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_day_of_year" g_date_get_day_of_year :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO Word32---dateGetDayOfYear ::- (MonadIO m) =>- Date -- _obj- -> m Word32 -- result-dateGetDayOfYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_day_of_year _obj'- touchManagedPtr _obj- return result--data DateGetDayOfYearMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo DateGetDayOfYearMethodInfo Date signature where- overloadedMethod _ = dateGetDayOfYear---- method Date::get_iso8601_week_of_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_iso8601_week_of_year" g_date_get_iso8601_week_of_year :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO Word32---dateGetIso8601WeekOfYear ::- (MonadIO m) =>- Date -- _obj- -> m Word32 -- result-dateGetIso8601WeekOfYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_iso8601_week_of_year _obj'- touchManagedPtr _obj- return result--data DateGetIso8601WeekOfYearMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo DateGetIso8601WeekOfYearMethodInfo Date signature where- overloadedMethod _ = dateGetIso8601WeekOfYear---- method Date::get_julian--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_julian" g_date_get_julian :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO Word32---dateGetJulian ::- (MonadIO m) =>- Date -- _obj- -> m Word32 -- result-dateGetJulian _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_julian _obj'- touchManagedPtr _obj- return result--data DateGetJulianMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo DateGetJulianMethodInfo Date signature where- overloadedMethod _ = dateGetJulian---- method Date::get_monday_week_of_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_monday_week_of_year" g_date_get_monday_week_of_year :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO Word32---dateGetMondayWeekOfYear ::- (MonadIO m) =>- Date -- _obj- -> m Word32 -- result-dateGetMondayWeekOfYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_monday_week_of_year _obj'- touchManagedPtr _obj- return result--data DateGetMondayWeekOfYearMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo DateGetMondayWeekOfYearMethodInfo Date signature where- overloadedMethod _ = dateGetMondayWeekOfYear---- method Date::get_month--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateMonth")--- throws : False--- Skip return : False--foreign import ccall "g_date_get_month" g_date_get_month :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO CUInt---dateGetMonth ::- (MonadIO m) =>- Date -- _obj- -> m DateMonth -- result-dateGetMonth _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_month _obj'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'--data DateGetMonthMethodInfo-instance (signature ~ (m DateMonth), MonadIO m) => MethodInfo DateGetMonthMethodInfo Date signature where- overloadedMethod _ = dateGetMonth---- method Date::get_sunday_week_of_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_sunday_week_of_year" g_date_get_sunday_week_of_year :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO Word32---dateGetSundayWeekOfYear ::- (MonadIO m) =>- Date -- _obj- -> m Word32 -- result-dateGetSundayWeekOfYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_sunday_week_of_year _obj'- touchManagedPtr _obj- return result--data DateGetSundayWeekOfYearMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo DateGetSundayWeekOfYearMethodInfo Date signature where- overloadedMethod _ = dateGetSundayWeekOfYear---- method Date::get_weekday--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateWeekday")--- throws : False--- Skip return : False--foreign import ccall "g_date_get_weekday" g_date_get_weekday :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO CUInt---dateGetWeekday ::- (MonadIO m) =>- Date -- _obj- -> m DateWeekday -- result-dateGetWeekday _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_weekday _obj'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'--data DateGetWeekdayMethodInfo-instance (signature ~ (m DateWeekday), MonadIO m) => MethodInfo DateGetWeekdayMethodInfo Date signature where- overloadedMethod _ = dateGetWeekday---- method Date::get_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt16)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_year" g_date_get_year :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO Word16---dateGetYear ::- (MonadIO m) =>- Date -- _obj- -> m Word16 -- result-dateGetYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_get_year _obj'- touchManagedPtr _obj- return result--data DateGetYearMethodInfo-instance (signature ~ (m Word16), MonadIO m) => MethodInfo DateGetYearMethodInfo Date signature where- overloadedMethod _ = dateGetYear---- method Date::is_first_of_month--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_is_first_of_month" g_date_is_first_of_month :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO CInt---dateIsFirstOfMonth ::- (MonadIO m) =>- Date -- _obj- -> m Bool -- result-dateIsFirstOfMonth _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_is_first_of_month _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data DateIsFirstOfMonthMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo DateIsFirstOfMonthMethodInfo Date signature where- overloadedMethod _ = dateIsFirstOfMonth---- method Date::is_last_of_month--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_is_last_of_month" g_date_is_last_of_month :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO CInt---dateIsLastOfMonth ::- (MonadIO m) =>- Date -- _obj- -> m Bool -- result-dateIsLastOfMonth _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_is_last_of_month _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data DateIsLastOfMonthMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo DateIsLastOfMonthMethodInfo Date signature where- overloadedMethod _ = dateIsLastOfMonth---- method Date::order--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "date2", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_order" g_date_order :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Ptr Date -> -- date2 : TInterface "GLib" "Date"- IO ()---dateOrder ::- (MonadIO m) =>- Date -- _obj- -> Date -- date2- -> m () -- result-dateOrder _obj date2 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let date2' = unsafeManagedPtrGetPtr date2- g_date_order _obj' date2'- touchManagedPtr _obj- touchManagedPtr date2- return ()--data DateOrderMethodInfo-instance (signature ~ (Date -> m ()), MonadIO m) => MethodInfo DateOrderMethodInfo Date signature where- overloadedMethod _ = dateOrder---- method Date::set_day--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "day", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_day" g_date_set_day :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word8 -> -- day : TBasicType TUInt8- IO ()---dateSetDay ::- (MonadIO m) =>- Date -- _obj- -> Word8 -- day- -> m () -- result-dateSetDay _obj day = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_set_day _obj' day- touchManagedPtr _obj- return ()--data DateSetDayMethodInfo-instance (signature ~ (Word8 -> m ()), MonadIO m) => MethodInfo DateSetDayMethodInfo Date signature where- overloadedMethod _ = dateSetDay---- method Date::set_dmy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "day", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TInterface "GLib" "DateMonth", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_dmy" g_date_set_dmy :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word8 -> -- day : TBasicType TUInt8- CUInt -> -- month : TInterface "GLib" "DateMonth"- Word16 -> -- y : TBasicType TUInt16- IO ()---dateSetDmy ::- (MonadIO m) =>- Date -- _obj- -> Word8 -- day- -> DateMonth -- month- -> Word16 -- y- -> m () -- result-dateSetDmy _obj day month y = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let month' = (fromIntegral . fromEnum) month- g_date_set_dmy _obj' day month' y- touchManagedPtr _obj- return ()--data DateSetDmyMethodInfo-instance (signature ~ (Word8 -> DateMonth -> Word16 -> m ()), MonadIO m) => MethodInfo DateSetDmyMethodInfo Date signature where- overloadedMethod _ = dateSetDmy---- method Date::set_julian--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "julian_date", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_julian" g_date_set_julian :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- julian_date : TBasicType TUInt32- IO ()---dateSetJulian ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- julianDate- -> m () -- result-dateSetJulian _obj julianDate = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_set_julian _obj' julianDate- touchManagedPtr _obj- return ()--data DateSetJulianMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateSetJulianMethodInfo Date signature where- overloadedMethod _ = dateSetJulian---- method Date::set_month--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TInterface "GLib" "DateMonth", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_month" g_date_set_month :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- CUInt -> -- month : TInterface "GLib" "DateMonth"- IO ()---dateSetMonth ::- (MonadIO m) =>- Date -- _obj- -> DateMonth -- month- -> m () -- result-dateSetMonth _obj month = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let month' = (fromIntegral . fromEnum) month- g_date_set_month _obj' month'- touchManagedPtr _obj- return ()--data DateSetMonthMethodInfo-instance (signature ~ (DateMonth -> m ()), MonadIO m) => MethodInfo DateSetMonthMethodInfo Date signature where- overloadedMethod _ = dateSetMonth---- method Date::set_parse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_parse" g_date_set_parse :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- CString -> -- str : TBasicType TUTF8- IO ()---dateSetParse ::- (MonadIO m) =>- Date -- _obj- -> T.Text -- str- -> m () -- result-dateSetParse _obj str = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- str' <- textToCString str- g_date_set_parse _obj' str'- touchManagedPtr _obj- freeMem str'- return ()--data DateSetParseMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo DateSetParseMethodInfo Date signature where- overloadedMethod _ = dateSetParse---- method Date::set_time--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "time_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_time" g_date_set_time :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Int32 -> -- time_ : TBasicType TInt32- IO ()--{-# DEPRECATED dateSetTime ["(Since version 2.10)","Use g_date_set_time_t() instead."]#-}-dateSetTime ::- (MonadIO m) =>- Date -- _obj- -> Int32 -- time_- -> m () -- result-dateSetTime _obj time_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_set_time _obj' time_- touchManagedPtr _obj- return ()--data DateSetTimeMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m) => MethodInfo DateSetTimeMethodInfo Date signature where- overloadedMethod _ = dateSetTime---- method Date::set_time_t--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timet", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_time_t" g_date_set_time_t :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- CLong -> -- timet : TBasicType TLong- IO ()---dateSetTimeT ::- (MonadIO m) =>- Date -- _obj- -> CLong -- timet- -> m () -- result-dateSetTimeT _obj timet = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_set_time_t _obj' timet- touchManagedPtr _obj- return ()--data DateSetTimeTMethodInfo-instance (signature ~ (CLong -> m ()), MonadIO m) => MethodInfo DateSetTimeTMethodInfo Date signature where- overloadedMethod _ = dateSetTimeT---- method Date::set_time_val--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timeval", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_time_val" g_date_set_time_val :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Ptr TimeVal -> -- timeval : TInterface "GLib" "TimeVal"- IO ()---dateSetTimeVal ::- (MonadIO m) =>- Date -- _obj- -> TimeVal -- timeval- -> m () -- result-dateSetTimeVal _obj timeval = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let timeval' = unsafeManagedPtrGetPtr timeval- g_date_set_time_val _obj' timeval'- touchManagedPtr _obj- touchManagedPtr timeval- return ()--data DateSetTimeValMethodInfo-instance (signature ~ (TimeVal -> m ()), MonadIO m) => MethodInfo DateSetTimeValMethodInfo Date signature where- overloadedMethod _ = dateSetTimeVal---- method Date::set_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_set_year" g_date_set_year :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word16 -> -- year : TBasicType TUInt16- IO ()---dateSetYear ::- (MonadIO m) =>- Date -- _obj- -> Word16 -- year- -> m () -- result-dateSetYear _obj year = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_set_year _obj' year- touchManagedPtr _obj- return ()--data DateSetYearMethodInfo-instance (signature ~ (Word16 -> m ()), MonadIO m) => MethodInfo DateSetYearMethodInfo Date signature where- overloadedMethod _ = dateSetYear---- method Date::subtract_days--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_days", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_subtract_days" g_date_subtract_days :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- n_days : TBasicType TUInt- IO ()---dateSubtractDays ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- nDays- -> m () -- result-dateSubtractDays _obj nDays = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_subtract_days _obj' nDays- touchManagedPtr _obj- return ()--data DateSubtractDaysMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateSubtractDaysMethodInfo Date signature where- overloadedMethod _ = dateSubtractDays---- method Date::subtract_months--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_months", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_subtract_months" g_date_subtract_months :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- n_months : TBasicType TUInt- IO ()---dateSubtractMonths ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- nMonths- -> m () -- result-dateSubtractMonths _obj nMonths = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_subtract_months _obj' nMonths- touchManagedPtr _obj- return ()--data DateSubtractMonthsMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateSubtractMonthsMethodInfo Date signature where- overloadedMethod _ = dateSubtractMonths---- method Date::subtract_years--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_years", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_subtract_years" g_date_subtract_years :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Word32 -> -- n_years : TBasicType TUInt- IO ()---dateSubtractYears ::- (MonadIO m) =>- Date -- _obj- -> Word32 -- nYears- -> m () -- result-dateSubtractYears _obj nYears = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_subtract_years _obj' nYears- touchManagedPtr _obj- return ()--data DateSubtractYearsMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo DateSubtractYearsMethodInfo Date signature where- overloadedMethod _ = dateSubtractYears---- method Date::to_struct_tm--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tm", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_to_struct_tm" g_date_to_struct_tm :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- Ptr () -> -- tm : TBasicType TPtr- IO ()---dateToStructTm ::- (MonadIO m) =>- Date -- _obj- -> Ptr () -- tm- -> m () -- result-dateToStructTm _obj tm = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_to_struct_tm _obj' tm- touchManagedPtr _obj- return ()--data DateToStructTmMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo DateToStructTmMethodInfo Date signature where- overloadedMethod _ = dateToStructTm---- method Date::valid--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_valid" g_date_valid :: - Ptr Date -> -- _obj : TInterface "GLib" "Date"- IO CInt---dateValid ::- (MonadIO m) =>- Date -- _obj- -> m Bool -- result-dateValid _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_valid _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data DateValidMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo DateValidMethodInfo Date signature where- overloadedMethod _ = dateValid---- method Date::get_days_in_month--- method type : MemberFunction--- Args : [Arg {argCName = "month", argType = TInterface "GLib" "DateMonth", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt8)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_days_in_month" g_date_get_days_in_month :: - CUInt -> -- month : TInterface "GLib" "DateMonth"- Word16 -> -- year : TBasicType TUInt16- IO Word8---dateGetDaysInMonth ::- (MonadIO m) =>- DateMonth -- month- -> Word16 -- year- -> m Word8 -- result-dateGetDaysInMonth month year = liftIO $ do- let month' = (fromIntegral . fromEnum) month- result <- g_date_get_days_in_month month' year- return result---- method Date::get_monday_weeks_in_year--- method type : MemberFunction--- Args : [Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt8)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_monday_weeks_in_year" g_date_get_monday_weeks_in_year :: - Word16 -> -- year : TBasicType TUInt16- IO Word8---dateGetMondayWeeksInYear ::- (MonadIO m) =>- Word16 -- year- -> m Word8 -- result-dateGetMondayWeeksInYear year = liftIO $ do- result <- g_date_get_monday_weeks_in_year year- return result---- method Date::get_sunday_weeks_in_year--- method type : MemberFunction--- Args : [Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt8)--- throws : False--- Skip return : False--foreign import ccall "g_date_get_sunday_weeks_in_year" g_date_get_sunday_weeks_in_year :: - Word16 -> -- year : TBasicType TUInt16- IO Word8---dateGetSundayWeeksInYear ::- (MonadIO m) =>- Word16 -- year- -> m Word8 -- result-dateGetSundayWeeksInYear year = liftIO $ do- result <- g_date_get_sunday_weeks_in_year year- return result---- method Date::is_leap_year--- method type : MemberFunction--- Args : [Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_is_leap_year" g_date_is_leap_year :: - Word16 -> -- year : TBasicType TUInt16- IO CInt---dateIsLeapYear ::- (MonadIO m) =>- Word16 -- year- -> m Bool -- result-dateIsLeapYear year = liftIO $ do- result <- g_date_is_leap_year year- let result' = (/= 0) result- return result'---- method Date::strftime--- method type : MemberFunction--- Args : [Arg {argCName = "s", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "slen", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "format", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "date", argType = TInterface "GLib" "Date", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_date_strftime" g_date_strftime :: - CString -> -- s : TBasicType TUTF8- Word64 -> -- slen : TBasicType TUInt64- CString -> -- format : TBasicType TUTF8- Ptr Date -> -- date : TInterface "GLib" "Date"- IO Word64---dateStrftime ::- (MonadIO m) =>- T.Text -- s- -> Word64 -- slen- -> T.Text -- format- -> Date -- date- -> m Word64 -- result-dateStrftime s slen format date = liftIO $ do- s' <- textToCString s- format' <- textToCString format- let date' = unsafeManagedPtrGetPtr date- result <- g_date_strftime s' slen format' date'- touchManagedPtr date- freeMem s'- freeMem format'- return result---- method Date::valid_day--- method type : MemberFunction--- Args : [Arg {argCName = "day", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_valid_day" g_date_valid_day :: - Word8 -> -- day : TBasicType TUInt8- IO CInt---dateValidDay ::- (MonadIO m) =>- Word8 -- day- -> m Bool -- result-dateValidDay day = liftIO $ do- result <- g_date_valid_day day- let result' = (/= 0) result- return result'---- method Date::valid_dmy--- method type : MemberFunction--- Args : [Arg {argCName = "day", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TInterface "GLib" "DateMonth", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_valid_dmy" g_date_valid_dmy :: - Word8 -> -- day : TBasicType TUInt8- CUInt -> -- month : TInterface "GLib" "DateMonth"- Word16 -> -- year : TBasicType TUInt16- IO CInt---dateValidDmy ::- (MonadIO m) =>- Word8 -- day- -> DateMonth -- month- -> Word16 -- year- -> m Bool -- result-dateValidDmy day month year = liftIO $ do- let month' = (fromIntegral . fromEnum) month- result <- g_date_valid_dmy day month' year- let result' = (/= 0) result- return result'---- method Date::valid_julian--- method type : MemberFunction--- Args : [Arg {argCName = "julian_date", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_valid_julian" g_date_valid_julian :: - Word32 -> -- julian_date : TBasicType TUInt32- IO CInt---dateValidJulian ::- (MonadIO m) =>- Word32 -- julianDate- -> m Bool -- result-dateValidJulian julianDate = liftIO $ do- result <- g_date_valid_julian julianDate- let result' = (/= 0) result- return result'---- method Date::valid_month--- method type : MemberFunction--- Args : [Arg {argCName = "month", argType = TInterface "GLib" "DateMonth", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_valid_month" g_date_valid_month :: - CUInt -> -- month : TInterface "GLib" "DateMonth"- IO CInt---dateValidMonth ::- (MonadIO m) =>- DateMonth -- month- -> m Bool -- result-dateValidMonth month = liftIO $ do- let month' = (fromIntegral . fromEnum) month- result <- g_date_valid_month month'- let result' = (/= 0) result- return result'---- method Date::valid_weekday--- method type : MemberFunction--- Args : [Arg {argCName = "weekday", argType = TInterface "GLib" "DateWeekday", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_valid_weekday" g_date_valid_weekday :: - CUInt -> -- weekday : TInterface "GLib" "DateWeekday"- IO CInt---dateValidWeekday ::- (MonadIO m) =>- DateWeekday -- weekday- -> m Bool -- result-dateValidWeekday weekday = liftIO $ do- let weekday' = (fromIntegral . fromEnum) weekday- result <- g_date_valid_weekday weekday'- let result' = (/= 0) result- return result'---- method Date::valid_year--- method type : MemberFunction--- Args : [Arg {argCName = "year", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_valid_year" g_date_valid_year :: - Word16 -> -- year : TBasicType TUInt16- IO CInt---dateValidYear ::- (MonadIO m) =>- Word16 -- year- -> m Bool -- result-dateValidYear year = liftIO $ do- result <- g_date_valid_year year- let result' = (/= 0) result- return result'--type family ResolveDateMethod (t :: Symbol) (o :: *) :: * where- ResolveDateMethod "addDays" o = DateAddDaysMethodInfo- ResolveDateMethod "addMonths" o = DateAddMonthsMethodInfo- ResolveDateMethod "addYears" o = DateAddYearsMethodInfo- ResolveDateMethod "clamp" o = DateClampMethodInfo- ResolveDateMethod "clear" o = DateClearMethodInfo- ResolveDateMethod "compare" o = DateCompareMethodInfo- ResolveDateMethod "daysBetween" o = DateDaysBetweenMethodInfo- ResolveDateMethod "free" o = DateFreeMethodInfo- ResolveDateMethod "isFirstOfMonth" o = DateIsFirstOfMonthMethodInfo- ResolveDateMethod "isLastOfMonth" o = DateIsLastOfMonthMethodInfo- ResolveDateMethod "order" o = DateOrderMethodInfo- ResolveDateMethod "subtractDays" o = DateSubtractDaysMethodInfo- ResolveDateMethod "subtractMonths" o = DateSubtractMonthsMethodInfo- ResolveDateMethod "subtractYears" o = DateSubtractYearsMethodInfo- ResolveDateMethod "toStructTm" o = DateToStructTmMethodInfo- ResolveDateMethod "valid" o = DateValidMethodInfo- ResolveDateMethod "getDay" o = DateGetDayMethodInfo- ResolveDateMethod "getDayOfYear" o = DateGetDayOfYearMethodInfo- ResolveDateMethod "getIso8601WeekOfYear" o = DateGetIso8601WeekOfYearMethodInfo- ResolveDateMethod "getJulian" o = DateGetJulianMethodInfo- ResolveDateMethod "getMondayWeekOfYear" o = DateGetMondayWeekOfYearMethodInfo- ResolveDateMethod "getMonth" o = DateGetMonthMethodInfo- ResolveDateMethod "getSundayWeekOfYear" o = DateGetSundayWeekOfYearMethodInfo- ResolveDateMethod "getWeekday" o = DateGetWeekdayMethodInfo- ResolveDateMethod "getYear" o = DateGetYearMethodInfo- ResolveDateMethod "setDay" o = DateSetDayMethodInfo- ResolveDateMethod "setDmy" o = DateSetDmyMethodInfo- ResolveDateMethod "setJulian" o = DateSetJulianMethodInfo- ResolveDateMethod "setMonth" o = DateSetMonthMethodInfo- ResolveDateMethod "setParse" o = DateSetParseMethodInfo- ResolveDateMethod "setTime" o = DateSetTimeMethodInfo- ResolveDateMethod "setTimeT" o = DateSetTimeTMethodInfo- ResolveDateMethod "setTimeVal" o = DateSetTimeValMethodInfo- ResolveDateMethod "setYear" o = DateSetYearMethodInfo- ResolveDateMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveDateMethod t Date, MethodInfo info Date p) => IsLabelProxy t (Date -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveDateMethod t Date, MethodInfo info Date p) => IsLabel t (Date -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Date.hs-boot
@@ -1,45 +0,0 @@-module GI.GLib.Structs.Date where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Date = Date (ForeignPtr Date)-instance BoxedObject Date where-data DateAddDaysMethodInfo-data DateAddMonthsMethodInfo-data DateAddYearsMethodInfo-data DateClampMethodInfo-data DateClearMethodInfo-data DateCompareMethodInfo-data DateDaysBetweenMethodInfo-data DateFreeMethodInfo-data DateGetDayMethodInfo-data DateGetDayOfYearMethodInfo-data DateGetIso8601WeekOfYearMethodInfo-data DateGetJulianMethodInfo-data DateGetMondayWeekOfYearMethodInfo-data DateGetMonthMethodInfo-data DateGetSundayWeekOfYearMethodInfo-data DateGetWeekdayMethodInfo-data DateGetYearMethodInfo-data DateIsFirstOfMonthMethodInfo-data DateIsLastOfMonthMethodInfo-data DateOrderMethodInfo-data DateSetDayMethodInfo-data DateSetDmyMethodInfo-data DateSetJulianMethodInfo-data DateSetMonthMethodInfo-data DateSetParseMethodInfo-data DateSetTimeMethodInfo-data DateSetTimeTMethodInfo-data DateSetTimeValMethodInfo-data DateSetYearMethodInfo-data DateSubtractDaysMethodInfo-data DateSubtractMonthsMethodInfo-data DateSubtractYearsMethodInfo-data DateToStructTmMethodInfo-data DateValidMethodInfo
− GI/GLib/Structs/DateTime.hs
@@ -1,1663 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--`GDateTime` is an opaque structure whose members-cannot be accessed directly.--}--module GI.GLib.Structs.DateTime- ( ---- * Exported types- DateTime(..) ,- noDateTime ,--- -- * Methods--- ** dateTimeAdd- DateTimeAddMethodInfo ,- dateTimeAdd ,----- ** dateTimeAddDays- DateTimeAddDaysMethodInfo ,- dateTimeAddDays ,----- ** dateTimeAddFull- DateTimeAddFullMethodInfo ,- dateTimeAddFull ,----- ** dateTimeAddHours- DateTimeAddHoursMethodInfo ,- dateTimeAddHours ,----- ** dateTimeAddMinutes- DateTimeAddMinutesMethodInfo ,- dateTimeAddMinutes ,----- ** dateTimeAddMonths- DateTimeAddMonthsMethodInfo ,- dateTimeAddMonths ,----- ** dateTimeAddSeconds- DateTimeAddSecondsMethodInfo ,- dateTimeAddSeconds ,----- ** dateTimeAddWeeks- DateTimeAddWeeksMethodInfo ,- dateTimeAddWeeks ,----- ** dateTimeAddYears- DateTimeAddYearsMethodInfo ,- dateTimeAddYears ,----- ** dateTimeCompare- dateTimeCompare ,----- ** dateTimeDifference- DateTimeDifferenceMethodInfo ,- dateTimeDifference ,----- ** dateTimeEqual- dateTimeEqual ,----- ** dateTimeFormat- DateTimeFormatMethodInfo ,- dateTimeFormat ,----- ** dateTimeGetDayOfMonth- DateTimeGetDayOfMonthMethodInfo ,- dateTimeGetDayOfMonth ,----- ** dateTimeGetDayOfWeek- DateTimeGetDayOfWeekMethodInfo ,- dateTimeGetDayOfWeek ,----- ** dateTimeGetDayOfYear- DateTimeGetDayOfYearMethodInfo ,- dateTimeGetDayOfYear ,----- ** dateTimeGetHour- DateTimeGetHourMethodInfo ,- dateTimeGetHour ,----- ** dateTimeGetMicrosecond- DateTimeGetMicrosecondMethodInfo ,- dateTimeGetMicrosecond ,----- ** dateTimeGetMinute- DateTimeGetMinuteMethodInfo ,- dateTimeGetMinute ,----- ** dateTimeGetMonth- DateTimeGetMonthMethodInfo ,- dateTimeGetMonth ,----- ** dateTimeGetSecond- DateTimeGetSecondMethodInfo ,- dateTimeGetSecond ,----- ** dateTimeGetSeconds- DateTimeGetSecondsMethodInfo ,- dateTimeGetSeconds ,----- ** dateTimeGetTimezoneAbbreviation- DateTimeGetTimezoneAbbreviationMethodInfo,- dateTimeGetTimezoneAbbreviation ,----- ** dateTimeGetUtcOffset- DateTimeGetUtcOffsetMethodInfo ,- dateTimeGetUtcOffset ,----- ** dateTimeGetWeekNumberingYear- DateTimeGetWeekNumberingYearMethodInfo ,- dateTimeGetWeekNumberingYear ,----- ** dateTimeGetWeekOfYear- DateTimeGetWeekOfYearMethodInfo ,- dateTimeGetWeekOfYear ,----- ** dateTimeGetYear- DateTimeGetYearMethodInfo ,- dateTimeGetYear ,----- ** dateTimeGetYmd- DateTimeGetYmdMethodInfo ,- dateTimeGetYmd ,----- ** dateTimeHash- dateTimeHash ,----- ** dateTimeIsDaylightSavings- DateTimeIsDaylightSavingsMethodInfo ,- dateTimeIsDaylightSavings ,----- ** dateTimeNew- dateTimeNew ,----- ** dateTimeNewFromTimevalLocal- dateTimeNewFromTimevalLocal ,----- ** dateTimeNewFromTimevalUtc- dateTimeNewFromTimevalUtc ,----- ** dateTimeNewFromUnixLocal- dateTimeNewFromUnixLocal ,----- ** dateTimeNewFromUnixUtc- dateTimeNewFromUnixUtc ,----- ** dateTimeNewLocal- dateTimeNewLocal ,----- ** dateTimeNewNow- dateTimeNewNow ,----- ** dateTimeNewNowLocal- dateTimeNewNowLocal ,----- ** dateTimeNewNowUtc- dateTimeNewNowUtc ,----- ** dateTimeNewUtc- dateTimeNewUtc ,----- ** dateTimeRef- DateTimeRefMethodInfo ,- dateTimeRef ,----- ** dateTimeToLocal- DateTimeToLocalMethodInfo ,- dateTimeToLocal ,----- ** dateTimeToTimeval- DateTimeToTimevalMethodInfo ,- dateTimeToTimeval ,----- ** dateTimeToTimezone- DateTimeToTimezoneMethodInfo ,- dateTimeToTimezone ,----- ** dateTimeToUnix- DateTimeToUnixMethodInfo ,- dateTimeToUnix ,----- ** dateTimeToUtc- DateTimeToUtcMethodInfo ,- dateTimeToUtc ,----- ** dateTimeUnref- DateTimeUnrefMethodInfo ,- dateTimeUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype DateTime = DateTime (ForeignPtr DateTime)-foreign import ccall "g_date_time_get_type" c_g_date_time_get_type :: - IO GType--instance BoxedObject DateTime where- boxedType _ = c_g_date_time_get_type--noDateTime :: Maybe DateTime-noDateTime = Nothing---type instance AttributeList DateTime = DateTimeAttributeList-type DateTimeAttributeList = ('[ ] :: [(Symbol, *)])---- method DateTime::new--- method type : Constructor--- Args : [Arg {argCName = "tz", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "year", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "day", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hour", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minute", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new" g_date_time_new :: - Ptr TimeZone -> -- tz : TInterface "GLib" "TimeZone"- Int32 -> -- year : TBasicType TInt- Int32 -> -- month : TBasicType TInt- Int32 -> -- day : TBasicType TInt- Int32 -> -- hour : TBasicType TInt- Int32 -> -- minute : TBasicType TInt- CDouble -> -- seconds : TBasicType TDouble- IO (Ptr DateTime)---dateTimeNew ::- (MonadIO m) =>- TimeZone -- tz- -> Int32 -- year- -> Int32 -- month- -> Int32 -- day- -> Int32 -- hour- -> Int32 -- minute- -> Double -- seconds- -> m DateTime -- result-dateTimeNew tz year month day hour minute seconds = liftIO $ do- let tz' = unsafeManagedPtrGetPtr tz- let seconds' = realToFrac seconds- result <- g_date_time_new tz' year month day hour minute seconds'- checkUnexpectedReturnNULL "g_date_time_new" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr tz- return result'---- method DateTime::new_from_timeval_local--- method type : Constructor--- Args : [Arg {argCName = "tv", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_from_timeval_local" g_date_time_new_from_timeval_local :: - Ptr TimeVal -> -- tv : TInterface "GLib" "TimeVal"- IO (Ptr DateTime)---dateTimeNewFromTimevalLocal ::- (MonadIO m) =>- TimeVal -- tv- -> m DateTime -- result-dateTimeNewFromTimevalLocal tv = liftIO $ do- let tv' = unsafeManagedPtrGetPtr tv- result <- g_date_time_new_from_timeval_local tv'- checkUnexpectedReturnNULL "g_date_time_new_from_timeval_local" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr tv- return result'---- method DateTime::new_from_timeval_utc--- method type : Constructor--- Args : [Arg {argCName = "tv", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_from_timeval_utc" g_date_time_new_from_timeval_utc :: - Ptr TimeVal -> -- tv : TInterface "GLib" "TimeVal"- IO (Ptr DateTime)---dateTimeNewFromTimevalUtc ::- (MonadIO m) =>- TimeVal -- tv- -> m DateTime -- result-dateTimeNewFromTimevalUtc tv = liftIO $ do- let tv' = unsafeManagedPtrGetPtr tv- result <- g_date_time_new_from_timeval_utc tv'- checkUnexpectedReturnNULL "g_date_time_new_from_timeval_utc" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr tv- return result'---- method DateTime::new_from_unix_local--- method type : Constructor--- Args : [Arg {argCName = "t", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_from_unix_local" g_date_time_new_from_unix_local :: - Int64 -> -- t : TBasicType TInt64- IO (Ptr DateTime)---dateTimeNewFromUnixLocal ::- (MonadIO m) =>- Int64 -- t- -> m DateTime -- result-dateTimeNewFromUnixLocal t = liftIO $ do- result <- g_date_time_new_from_unix_local t- checkUnexpectedReturnNULL "g_date_time_new_from_unix_local" result- result' <- (wrapBoxed DateTime) result- return result'---- method DateTime::new_from_unix_utc--- method type : Constructor--- Args : [Arg {argCName = "t", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_from_unix_utc" g_date_time_new_from_unix_utc :: - Int64 -> -- t : TBasicType TInt64- IO (Ptr DateTime)---dateTimeNewFromUnixUtc ::- (MonadIO m) =>- Int64 -- t- -> m DateTime -- result-dateTimeNewFromUnixUtc t = liftIO $ do- result <- g_date_time_new_from_unix_utc t- checkUnexpectedReturnNULL "g_date_time_new_from_unix_utc" result- result' <- (wrapBoxed DateTime) result- return result'---- method DateTime::new_local--- method type : Constructor--- Args : [Arg {argCName = "year", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "day", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hour", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minute", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_local" g_date_time_new_local :: - Int32 -> -- year : TBasicType TInt- Int32 -> -- month : TBasicType TInt- Int32 -> -- day : TBasicType TInt- Int32 -> -- hour : TBasicType TInt- Int32 -> -- minute : TBasicType TInt- CDouble -> -- seconds : TBasicType TDouble- IO (Ptr DateTime)---dateTimeNewLocal ::- (MonadIO m) =>- Int32 -- year- -> Int32 -- month- -> Int32 -- day- -> Int32 -- hour- -> Int32 -- minute- -> Double -- seconds- -> m DateTime -- result-dateTimeNewLocal year month day hour minute seconds = liftIO $ do- let seconds' = realToFrac seconds- result <- g_date_time_new_local year month day hour minute seconds'- checkUnexpectedReturnNULL "g_date_time_new_local" result- result' <- (wrapBoxed DateTime) result- return result'---- method DateTime::new_now--- method type : Constructor--- Args : [Arg {argCName = "tz", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_now" g_date_time_new_now :: - Ptr TimeZone -> -- tz : TInterface "GLib" "TimeZone"- IO (Ptr DateTime)---dateTimeNewNow ::- (MonadIO m) =>- TimeZone -- tz- -> m DateTime -- result-dateTimeNewNow tz = liftIO $ do- let tz' = unsafeManagedPtrGetPtr tz- result <- g_date_time_new_now tz'- checkUnexpectedReturnNULL "g_date_time_new_now" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr tz- return result'---- method DateTime::new_now_local--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_now_local" g_date_time_new_now_local :: - IO (Ptr DateTime)---dateTimeNewNowLocal ::- (MonadIO m) =>- m DateTime -- result-dateTimeNewNowLocal = liftIO $ do- result <- g_date_time_new_now_local- checkUnexpectedReturnNULL "g_date_time_new_now_local" result- result' <- (wrapBoxed DateTime) result- return result'---- method DateTime::new_now_utc--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_now_utc" g_date_time_new_now_utc :: - IO (Ptr DateTime)---dateTimeNewNowUtc ::- (MonadIO m) =>- m DateTime -- result-dateTimeNewNowUtc = liftIO $ do- result <- g_date_time_new_now_utc- checkUnexpectedReturnNULL "g_date_time_new_now_utc" result- result' <- (wrapBoxed DateTime) result- return result'---- method DateTime::new_utc--- method type : Constructor--- Args : [Arg {argCName = "year", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "day", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hour", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minute", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_new_utc" g_date_time_new_utc :: - Int32 -> -- year : TBasicType TInt- Int32 -> -- month : TBasicType TInt- Int32 -> -- day : TBasicType TInt- Int32 -> -- hour : TBasicType TInt- Int32 -> -- minute : TBasicType TInt- CDouble -> -- seconds : TBasicType TDouble- IO (Ptr DateTime)---dateTimeNewUtc ::- (MonadIO m) =>- Int32 -- year- -> Int32 -- month- -> Int32 -- day- -> Int32 -- hour- -> Int32 -- minute- -> Double -- seconds- -> m DateTime -- result-dateTimeNewUtc year month day hour minute seconds = liftIO $ do- let seconds' = realToFrac seconds- result <- g_date_time_new_utc year month day hour minute seconds'- checkUnexpectedReturnNULL "g_date_time_new_utc" result- result' <- (wrapBoxed DateTime) result- return result'---- method DateTime::add--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timespan", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add" g_date_time_add :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int64 -> -- timespan : TBasicType TInt64- IO (Ptr DateTime)---dateTimeAdd ::- (MonadIO m) =>- DateTime -- _obj- -> Int64 -- timespan- -> m DateTime -- result-dateTimeAdd _obj timespan = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_add _obj' timespan- checkUnexpectedReturnNULL "g_date_time_add" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddMethodInfo-instance (signature ~ (Int64 -> m DateTime), MonadIO m) => MethodInfo DateTimeAddMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAdd---- method DateTime::add_days--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "days", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_days" g_date_time_add_days :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int32 -> -- days : TBasicType TInt- IO (Ptr DateTime)---dateTimeAddDays ::- (MonadIO m) =>- DateTime -- _obj- -> Int32 -- days- -> m DateTime -- result-dateTimeAddDays _obj days = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_add_days _obj' days- checkUnexpectedReturnNULL "g_date_time_add_days" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddDaysMethodInfo-instance (signature ~ (Int32 -> m DateTime), MonadIO m) => MethodInfo DateTimeAddDaysMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddDays---- method DateTime::add_full--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "years", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "months", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "days", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hours", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minutes", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_full" g_date_time_add_full :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int32 -> -- years : TBasicType TInt- Int32 -> -- months : TBasicType TInt- Int32 -> -- days : TBasicType TInt- Int32 -> -- hours : TBasicType TInt- Int32 -> -- minutes : TBasicType TInt- CDouble -> -- seconds : TBasicType TDouble- IO (Ptr DateTime)---dateTimeAddFull ::- (MonadIO m) =>- DateTime -- _obj- -> Int32 -- years- -> Int32 -- months- -> Int32 -- days- -> Int32 -- hours- -> Int32 -- minutes- -> Double -- seconds- -> m DateTime -- result-dateTimeAddFull _obj years months days hours minutes seconds = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let seconds' = realToFrac seconds- result <- g_date_time_add_full _obj' years months days hours minutes seconds'- checkUnexpectedReturnNULL "g_date_time_add_full" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddFullMethodInfo-instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Double -> m DateTime), MonadIO m) => MethodInfo DateTimeAddFullMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddFull---- method DateTime::add_hours--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hours", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_hours" g_date_time_add_hours :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int32 -> -- hours : TBasicType TInt- IO (Ptr DateTime)---dateTimeAddHours ::- (MonadIO m) =>- DateTime -- _obj- -> Int32 -- hours- -> m DateTime -- result-dateTimeAddHours _obj hours = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_add_hours _obj' hours- checkUnexpectedReturnNULL "g_date_time_add_hours" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddHoursMethodInfo-instance (signature ~ (Int32 -> m DateTime), MonadIO m) => MethodInfo DateTimeAddHoursMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddHours---- method DateTime::add_minutes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minutes", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_minutes" g_date_time_add_minutes :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int32 -> -- minutes : TBasicType TInt- IO (Ptr DateTime)---dateTimeAddMinutes ::- (MonadIO m) =>- DateTime -- _obj- -> Int32 -- minutes- -> m DateTime -- result-dateTimeAddMinutes _obj minutes = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_add_minutes _obj' minutes- checkUnexpectedReturnNULL "g_date_time_add_minutes" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddMinutesMethodInfo-instance (signature ~ (Int32 -> m DateTime), MonadIO m) => MethodInfo DateTimeAddMinutesMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddMinutes---- method DateTime::add_months--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "months", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_months" g_date_time_add_months :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int32 -> -- months : TBasicType TInt- IO (Ptr DateTime)---dateTimeAddMonths ::- (MonadIO m) =>- DateTime -- _obj- -> Int32 -- months- -> m DateTime -- result-dateTimeAddMonths _obj months = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_add_months _obj' months- checkUnexpectedReturnNULL "g_date_time_add_months" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddMonthsMethodInfo-instance (signature ~ (Int32 -> m DateTime), MonadIO m) => MethodInfo DateTimeAddMonthsMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddMonths---- method DateTime::add_seconds--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_seconds" g_date_time_add_seconds :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- CDouble -> -- seconds : TBasicType TDouble- IO (Ptr DateTime)---dateTimeAddSeconds ::- (MonadIO m) =>- DateTime -- _obj- -> Double -- seconds- -> m DateTime -- result-dateTimeAddSeconds _obj seconds = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let seconds' = realToFrac seconds- result <- g_date_time_add_seconds _obj' seconds'- checkUnexpectedReturnNULL "g_date_time_add_seconds" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddSecondsMethodInfo-instance (signature ~ (Double -> m DateTime), MonadIO m) => MethodInfo DateTimeAddSecondsMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddSeconds---- method DateTime::add_weeks--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "weeks", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_weeks" g_date_time_add_weeks :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int32 -> -- weeks : TBasicType TInt- IO (Ptr DateTime)---dateTimeAddWeeks ::- (MonadIO m) =>- DateTime -- _obj- -> Int32 -- weeks- -> m DateTime -- result-dateTimeAddWeeks _obj weeks = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_add_weeks _obj' weeks- checkUnexpectedReturnNULL "g_date_time_add_weeks" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddWeeksMethodInfo-instance (signature ~ (Int32 -> m DateTime), MonadIO m) => MethodInfo DateTimeAddWeeksMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddWeeks---- method DateTime::add_years--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "years", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_add_years" g_date_time_add_years :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Int32 -> -- years : TBasicType TInt- IO (Ptr DateTime)---dateTimeAddYears ::- (MonadIO m) =>- DateTime -- _obj- -> Int32 -- years- -> m DateTime -- result-dateTimeAddYears _obj years = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_add_years _obj' years- checkUnexpectedReturnNULL "g_date_time_add_years" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeAddYearsMethodInfo-instance (signature ~ (Int32 -> m DateTime), MonadIO m) => MethodInfo DateTimeAddYearsMethodInfo DateTime signature where- overloadedMethod _ = dateTimeAddYears---- method DateTime::difference--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "begin", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_difference" g_date_time_difference :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Ptr DateTime -> -- begin : TInterface "GLib" "DateTime"- IO Int64---dateTimeDifference ::- (MonadIO m) =>- DateTime -- _obj- -> DateTime -- begin- -> m Int64 -- result-dateTimeDifference _obj begin = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let begin' = unsafeManagedPtrGetPtr begin- result <- g_date_time_difference _obj' begin'- touchManagedPtr _obj- touchManagedPtr begin- return result--data DateTimeDifferenceMethodInfo-instance (signature ~ (DateTime -> m Int64), MonadIO m) => MethodInfo DateTimeDifferenceMethodInfo DateTime signature where- overloadedMethod _ = dateTimeDifference---- method DateTime::format--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "format", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_format" g_date_time_format :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- CString -> -- format : TBasicType TUTF8- IO CString---dateTimeFormat ::- (MonadIO m) =>- DateTime -- _obj- -> T.Text -- format- -> m T.Text -- result-dateTimeFormat _obj format = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- format' <- textToCString format- result <- g_date_time_format _obj' format'- checkUnexpectedReturnNULL "g_date_time_format" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem format'- return result'--data DateTimeFormatMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m) => MethodInfo DateTimeFormatMethodInfo DateTime signature where- overloadedMethod _ = dateTimeFormat---- method DateTime::get_day_of_month--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_day_of_month" g_date_time_get_day_of_month :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetDayOfMonth ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetDayOfMonth _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_day_of_month _obj'- touchManagedPtr _obj- return result--data DateTimeGetDayOfMonthMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetDayOfMonthMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetDayOfMonth---- method DateTime::get_day_of_week--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_day_of_week" g_date_time_get_day_of_week :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetDayOfWeek ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetDayOfWeek _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_day_of_week _obj'- touchManagedPtr _obj- return result--data DateTimeGetDayOfWeekMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetDayOfWeekMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetDayOfWeek---- method DateTime::get_day_of_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_day_of_year" g_date_time_get_day_of_year :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetDayOfYear ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetDayOfYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_day_of_year _obj'- touchManagedPtr _obj- return result--data DateTimeGetDayOfYearMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetDayOfYearMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetDayOfYear---- method DateTime::get_hour--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_hour" g_date_time_get_hour :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetHour ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetHour _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_hour _obj'- touchManagedPtr _obj- return result--data DateTimeGetHourMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetHourMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetHour---- method DateTime::get_microsecond--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_microsecond" g_date_time_get_microsecond :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetMicrosecond ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetMicrosecond _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_microsecond _obj'- touchManagedPtr _obj- return result--data DateTimeGetMicrosecondMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetMicrosecondMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetMicrosecond---- method DateTime::get_minute--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_minute" g_date_time_get_minute :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetMinute ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetMinute _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_minute _obj'- touchManagedPtr _obj- return result--data DateTimeGetMinuteMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetMinuteMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetMinute---- method DateTime::get_month--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_month" g_date_time_get_month :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetMonth ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetMonth _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_month _obj'- touchManagedPtr _obj- return result--data DateTimeGetMonthMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetMonthMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetMonth---- method DateTime::get_second--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_second" g_date_time_get_second :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetSecond ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetSecond _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_second _obj'- touchManagedPtr _obj- return result--data DateTimeGetSecondMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetSecondMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetSecond---- method DateTime::get_seconds--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_seconds" g_date_time_get_seconds :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO CDouble---dateTimeGetSeconds ::- (MonadIO m) =>- DateTime -- _obj- -> m Double -- result-dateTimeGetSeconds _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_seconds _obj'- let result' = realToFrac result- touchManagedPtr _obj- return result'--data DateTimeGetSecondsMethodInfo-instance (signature ~ (m Double), MonadIO m) => MethodInfo DateTimeGetSecondsMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetSeconds---- method DateTime::get_timezone_abbreviation--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_timezone_abbreviation" g_date_time_get_timezone_abbreviation :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO CString---dateTimeGetTimezoneAbbreviation ::- (MonadIO m) =>- DateTime -- _obj- -> m T.Text -- result-dateTimeGetTimezoneAbbreviation _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_timezone_abbreviation _obj'- checkUnexpectedReturnNULL "g_date_time_get_timezone_abbreviation" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data DateTimeGetTimezoneAbbreviationMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo DateTimeGetTimezoneAbbreviationMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetTimezoneAbbreviation---- method DateTime::get_utc_offset--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_utc_offset" g_date_time_get_utc_offset :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int64---dateTimeGetUtcOffset ::- (MonadIO m) =>- DateTime -- _obj- -> m Int64 -- result-dateTimeGetUtcOffset _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_utc_offset _obj'- touchManagedPtr _obj- return result--data DateTimeGetUtcOffsetMethodInfo-instance (signature ~ (m Int64), MonadIO m) => MethodInfo DateTimeGetUtcOffsetMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetUtcOffset---- method DateTime::get_week_numbering_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_week_numbering_year" g_date_time_get_week_numbering_year :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetWeekNumberingYear ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetWeekNumberingYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_week_numbering_year _obj'- touchManagedPtr _obj- return result--data DateTimeGetWeekNumberingYearMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetWeekNumberingYearMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetWeekNumberingYear---- method DateTime::get_week_of_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_week_of_year" g_date_time_get_week_of_year :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetWeekOfYear ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetWeekOfYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_week_of_year _obj'- touchManagedPtr _obj- return result--data DateTimeGetWeekOfYearMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetWeekOfYearMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetWeekOfYear---- method DateTime::get_year--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_year" g_date_time_get_year :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int32---dateTimeGetYear ::- (MonadIO m) =>- DateTime -- _obj- -> m Int32 -- result-dateTimeGetYear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_get_year _obj'- touchManagedPtr _obj- return result--data DateTimeGetYearMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo DateTimeGetYearMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetYear---- method DateTime::get_ymd--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "year", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "month", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "day", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_time_get_ymd" g_date_time_get_ymd :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Ptr Int32 -> -- year : TBasicType TInt- Ptr Int32 -> -- month : TBasicType TInt- Ptr Int32 -> -- day : TBasicType TInt- IO ()---dateTimeGetYmd ::- (MonadIO m) =>- DateTime -- _obj- -> m (Int32,Int32,Int32) -- result-dateTimeGetYmd _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- year <- allocMem :: IO (Ptr Int32)- month <- allocMem :: IO (Ptr Int32)- day <- allocMem :: IO (Ptr Int32)- g_date_time_get_ymd _obj' year month day- year' <- peek year- month' <- peek month- day' <- peek day- touchManagedPtr _obj- freeMem year- freeMem month- freeMem day- return (year', month', day')--data DateTimeGetYmdMethodInfo-instance (signature ~ (m (Int32,Int32,Int32)), MonadIO m) => MethodInfo DateTimeGetYmdMethodInfo DateTime signature where- overloadedMethod _ = dateTimeGetYmd---- method DateTime::is_daylight_savings--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_is_daylight_savings" g_date_time_is_daylight_savings :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO CInt---dateTimeIsDaylightSavings ::- (MonadIO m) =>- DateTime -- _obj- -> m Bool -- result-dateTimeIsDaylightSavings _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_is_daylight_savings _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data DateTimeIsDaylightSavingsMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo DateTimeIsDaylightSavingsMethodInfo DateTime signature where- overloadedMethod _ = dateTimeIsDaylightSavings---- method DateTime::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_ref" g_date_time_ref :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO (Ptr DateTime)---dateTimeRef ::- (MonadIO m) =>- DateTime -- _obj- -> m DateTime -- result-dateTimeRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_ref _obj'- checkUnexpectedReturnNULL "g_date_time_ref" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeRefMethodInfo-instance (signature ~ (m DateTime), MonadIO m) => MethodInfo DateTimeRefMethodInfo DateTime signature where- overloadedMethod _ = dateTimeRef---- method DateTime::to_local--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_to_local" g_date_time_to_local :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO (Ptr DateTime)---dateTimeToLocal ::- (MonadIO m) =>- DateTime -- _obj- -> m DateTime -- result-dateTimeToLocal _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_to_local _obj'- checkUnexpectedReturnNULL "g_date_time_to_local" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeToLocalMethodInfo-instance (signature ~ (m DateTime), MonadIO m) => MethodInfo DateTimeToLocalMethodInfo DateTime signature where- overloadedMethod _ = dateTimeToLocal---- method DateTime::to_timeval--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tv", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_to_timeval" g_date_time_to_timeval :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Ptr TimeVal -> -- tv : TInterface "GLib" "TimeVal"- IO CInt---dateTimeToTimeval ::- (MonadIO m) =>- DateTime -- _obj- -> TimeVal -- tv- -> m Bool -- result-dateTimeToTimeval _obj tv = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let tv' = unsafeManagedPtrGetPtr tv- result <- g_date_time_to_timeval _obj' tv'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr tv- return result'--data DateTimeToTimevalMethodInfo-instance (signature ~ (TimeVal -> m Bool), MonadIO m) => MethodInfo DateTimeToTimevalMethodInfo DateTime signature where- overloadedMethod _ = dateTimeToTimeval---- method DateTime::to_timezone--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tz", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_to_timezone" g_date_time_to_timezone :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- Ptr TimeZone -> -- tz : TInterface "GLib" "TimeZone"- IO (Ptr DateTime)---dateTimeToTimezone ::- (MonadIO m) =>- DateTime -- _obj- -> TimeZone -- tz- -> m DateTime -- result-dateTimeToTimezone _obj tz = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let tz' = unsafeManagedPtrGetPtr tz- result <- g_date_time_to_timezone _obj' tz'- checkUnexpectedReturnNULL "g_date_time_to_timezone" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- touchManagedPtr tz- return result'--data DateTimeToTimezoneMethodInfo-instance (signature ~ (TimeZone -> m DateTime), MonadIO m) => MethodInfo DateTimeToTimezoneMethodInfo DateTime signature where- overloadedMethod _ = dateTimeToTimezone---- method DateTime::to_unix--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_to_unix" g_date_time_to_unix :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO Int64---dateTimeToUnix ::- (MonadIO m) =>- DateTime -- _obj- -> m Int64 -- result-dateTimeToUnix _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_to_unix _obj'- touchManagedPtr _obj- return result--data DateTimeToUnixMethodInfo-instance (signature ~ (m Int64), MonadIO m) => MethodInfo DateTimeToUnixMethodInfo DateTime signature where- overloadedMethod _ = dateTimeToUnix---- method DateTime::to_utc--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "DateTime")--- throws : False--- Skip return : False--foreign import ccall "g_date_time_to_utc" g_date_time_to_utc :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO (Ptr DateTime)---dateTimeToUtc ::- (MonadIO m) =>- DateTime -- _obj- -> m DateTime -- result-dateTimeToUtc _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_date_time_to_utc _obj'- checkUnexpectedReturnNULL "g_date_time_to_utc" result- result' <- (wrapBoxed DateTime) result- touchManagedPtr _obj- return result'--data DateTimeToUtcMethodInfo-instance (signature ~ (m DateTime), MonadIO m) => MethodInfo DateTimeToUtcMethodInfo DateTime signature where- overloadedMethod _ = dateTimeToUtc---- method DateTime::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "DateTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_date_time_unref" g_date_time_unref :: - Ptr DateTime -> -- _obj : TInterface "GLib" "DateTime"- IO ()---dateTimeUnref ::- (MonadIO m) =>- DateTime -- _obj- -> m () -- result-dateTimeUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_date_time_unref _obj'- touchManagedPtr _obj- return ()--data DateTimeUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo DateTimeUnrefMethodInfo DateTime signature where- overloadedMethod _ = dateTimeUnref---- method DateTime::compare--- method type : MemberFunction--- Args : [Arg {argCName = "dt1", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dt2", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_compare" g_date_time_compare :: - Ptr () -> -- dt1 : TBasicType TPtr- Ptr () -> -- dt2 : TBasicType TPtr- IO Int32---dateTimeCompare ::- (MonadIO m) =>- Ptr () -- dt1- -> Ptr () -- dt2- -> m Int32 -- result-dateTimeCompare dt1 dt2 = liftIO $ do- result <- g_date_time_compare dt1 dt2- return result---- method DateTime::equal--- method type : MemberFunction--- Args : [Arg {argCName = "dt1", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dt2", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_equal" g_date_time_equal :: - Ptr () -> -- dt1 : TBasicType TPtr- Ptr () -> -- dt2 : TBasicType TPtr- IO CInt---dateTimeEqual ::- (MonadIO m) =>- Ptr () -- dt1- -> Ptr () -- dt2- -> m Bool -- result-dateTimeEqual dt1 dt2 = liftIO $ do- result <- g_date_time_equal dt1 dt2- let result' = (/= 0) result- return result'---- method DateTime::hash--- method type : MemberFunction--- Args : [Arg {argCName = "datetime", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_date_time_hash" g_date_time_hash :: - Ptr () -> -- datetime : TBasicType TPtr- IO Word32---dateTimeHash ::- (MonadIO m) =>- Ptr () -- datetime- -> m Word32 -- result-dateTimeHash datetime = liftIO $ do- result <- g_date_time_hash datetime- return result--type family ResolveDateTimeMethod (t :: Symbol) (o :: *) :: * where- ResolveDateTimeMethod "add" o = DateTimeAddMethodInfo- ResolveDateTimeMethod "addDays" o = DateTimeAddDaysMethodInfo- ResolveDateTimeMethod "addFull" o = DateTimeAddFullMethodInfo- ResolveDateTimeMethod "addHours" o = DateTimeAddHoursMethodInfo- ResolveDateTimeMethod "addMinutes" o = DateTimeAddMinutesMethodInfo- ResolveDateTimeMethod "addMonths" o = DateTimeAddMonthsMethodInfo- ResolveDateTimeMethod "addSeconds" o = DateTimeAddSecondsMethodInfo- ResolveDateTimeMethod "addWeeks" o = DateTimeAddWeeksMethodInfo- ResolveDateTimeMethod "addYears" o = DateTimeAddYearsMethodInfo- ResolveDateTimeMethod "difference" o = DateTimeDifferenceMethodInfo- ResolveDateTimeMethod "format" o = DateTimeFormatMethodInfo- ResolveDateTimeMethod "isDaylightSavings" o = DateTimeIsDaylightSavingsMethodInfo- ResolveDateTimeMethod "ref" o = DateTimeRefMethodInfo- ResolveDateTimeMethod "toLocal" o = DateTimeToLocalMethodInfo- ResolveDateTimeMethod "toTimeval" o = DateTimeToTimevalMethodInfo- ResolveDateTimeMethod "toTimezone" o = DateTimeToTimezoneMethodInfo- ResolveDateTimeMethod "toUnix" o = DateTimeToUnixMethodInfo- ResolveDateTimeMethod "toUtc" o = DateTimeToUtcMethodInfo- ResolveDateTimeMethod "unref" o = DateTimeUnrefMethodInfo- ResolveDateTimeMethod "getDayOfMonth" o = DateTimeGetDayOfMonthMethodInfo- ResolveDateTimeMethod "getDayOfWeek" o = DateTimeGetDayOfWeekMethodInfo- ResolveDateTimeMethod "getDayOfYear" o = DateTimeGetDayOfYearMethodInfo- ResolveDateTimeMethod "getHour" o = DateTimeGetHourMethodInfo- ResolveDateTimeMethod "getMicrosecond" o = DateTimeGetMicrosecondMethodInfo- ResolveDateTimeMethod "getMinute" o = DateTimeGetMinuteMethodInfo- ResolveDateTimeMethod "getMonth" o = DateTimeGetMonthMethodInfo- ResolveDateTimeMethod "getSecond" o = DateTimeGetSecondMethodInfo- ResolveDateTimeMethod "getSeconds" o = DateTimeGetSecondsMethodInfo- ResolveDateTimeMethod "getTimezoneAbbreviation" o = DateTimeGetTimezoneAbbreviationMethodInfo- ResolveDateTimeMethod "getUtcOffset" o = DateTimeGetUtcOffsetMethodInfo- ResolveDateTimeMethod "getWeekNumberingYear" o = DateTimeGetWeekNumberingYearMethodInfo- ResolveDateTimeMethod "getWeekOfYear" o = DateTimeGetWeekOfYearMethodInfo- ResolveDateTimeMethod "getYear" o = DateTimeGetYearMethodInfo- ResolveDateTimeMethod "getYmd" o = DateTimeGetYmdMethodInfo- ResolveDateTimeMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveDateTimeMethod t DateTime, MethodInfo info DateTime p) => IsLabelProxy t (DateTime -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveDateTimeMethod t DateTime, MethodInfo info DateTime p) => IsLabel t (DateTime -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/DateTime.hs-boot
@@ -1,45 +0,0 @@-module GI.GLib.Structs.DateTime where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype DateTime = DateTime (ForeignPtr DateTime)-instance BoxedObject DateTime where-data DateTimeAddMethodInfo-data DateTimeAddDaysMethodInfo-data DateTimeAddFullMethodInfo-data DateTimeAddHoursMethodInfo-data DateTimeAddMinutesMethodInfo-data DateTimeAddMonthsMethodInfo-data DateTimeAddSecondsMethodInfo-data DateTimeAddWeeksMethodInfo-data DateTimeAddYearsMethodInfo-data DateTimeDifferenceMethodInfo-data DateTimeFormatMethodInfo-data DateTimeGetDayOfMonthMethodInfo-data DateTimeGetDayOfWeekMethodInfo-data DateTimeGetDayOfYearMethodInfo-data DateTimeGetHourMethodInfo-data DateTimeGetMicrosecondMethodInfo-data DateTimeGetMinuteMethodInfo-data DateTimeGetMonthMethodInfo-data DateTimeGetSecondMethodInfo-data DateTimeGetSecondsMethodInfo-data DateTimeGetTimezoneAbbreviationMethodInfo-data DateTimeGetUtcOffsetMethodInfo-data DateTimeGetWeekNumberingYearMethodInfo-data DateTimeGetWeekOfYearMethodInfo-data DateTimeGetYearMethodInfo-data DateTimeGetYmdMethodInfo-data DateTimeIsDaylightSavingsMethodInfo-data DateTimeRefMethodInfo-data DateTimeToLocalMethodInfo-data DateTimeToTimevalMethodInfo-data DateTimeToTimezoneMethodInfo-data DateTimeToUnixMethodInfo-data DateTimeToUtcMethodInfo-data DateTimeUnrefMethodInfo
− GI/GLib/Structs/DebugKey.hs
@@ -1,141 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Associates a string with a bit flag.-Used in g_parse_debug_string().--}--module GI.GLib.Structs.DebugKey- ( ---- * Exported types- DebugKey(..) ,- newZeroDebugKey ,- noDebugKey ,--- -- * Properties--- ** Key- debugKeyClearKey ,- debugKeyKey ,- debugKeyReadKey ,- debugKeyWriteKey ,----- ** Value- debugKeyReadValue ,- debugKeyValue ,- debugKeyWriteValue ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype DebugKey = DebugKey (ForeignPtr DebugKey)-instance WrappedPtr DebugKey where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = copyPtr 16- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `DebugKey` struct initialized to zero.-newZeroDebugKey :: MonadIO m => m DebugKey-newZeroDebugKey = liftIO $ wrappedPtrCalloc >>= wrapPtr DebugKey--instance tag ~ 'AttrSet => Constructible DebugKey tag where- new _ attrs = do- o <- newZeroDebugKey- GI.Attributes.set o attrs- return o---noDebugKey :: Maybe DebugKey-noDebugKey = Nothing--debugKeyReadKey :: MonadIO m => DebugKey -> m (Maybe T.Text)-debugKeyReadKey s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--debugKeyWriteKey :: MonadIO m => DebugKey -> CString -> m ()-debugKeyWriteKey s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--debugKeyClearKey :: MonadIO m => DebugKey -> m ()-debugKeyClearKey s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: CString)--data DebugKeyKeyFieldInfo-instance AttrInfo DebugKeyKeyFieldInfo where- type AttrAllowedOps DebugKeyKeyFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint DebugKeyKeyFieldInfo = (~) CString- type AttrBaseTypeConstraint DebugKeyKeyFieldInfo = (~) DebugKey- type AttrGetType DebugKeyKeyFieldInfo = Maybe T.Text- type AttrLabel DebugKeyKeyFieldInfo = "key"- attrGet _ = debugKeyReadKey- attrSet _ = debugKeyWriteKey- attrConstruct = undefined- attrClear _ = debugKeyClearKey--debugKeyKey :: AttrLabelProxy "key"-debugKeyKey = AttrLabelProxy---debugKeyReadValue :: MonadIO m => DebugKey -> m Word32-debugKeyReadValue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--debugKeyWriteValue :: MonadIO m => DebugKey -> Word32 -> m ()-debugKeyWriteValue s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--data DebugKeyValueFieldInfo-instance AttrInfo DebugKeyValueFieldInfo where- type AttrAllowedOps DebugKeyValueFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DebugKeyValueFieldInfo = (~) Word32- type AttrBaseTypeConstraint DebugKeyValueFieldInfo = (~) DebugKey- type AttrGetType DebugKeyValueFieldInfo = Word32- type AttrLabel DebugKeyValueFieldInfo = "value"- attrGet _ = debugKeyReadValue- attrSet _ = debugKeyWriteValue- attrConstruct = undefined- attrClear _ = undefined--debugKeyValue :: AttrLabelProxy "value"-debugKeyValue = AttrLabelProxy----type instance AttributeList DebugKey = DebugKeyAttributeList-type DebugKeyAttributeList = ('[ '("key", DebugKeyKeyFieldInfo), '("value", DebugKeyValueFieldInfo)] :: [(Symbol, *)])--type family ResolveDebugKeyMethod (t :: Symbol) (o :: *) :: * where- ResolveDebugKeyMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveDebugKeyMethod t DebugKey, MethodInfo info DebugKey p) => IsLabelProxy t (DebugKey -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveDebugKeyMethod t DebugKey, MethodInfo info DebugKey p) => IsLabel t (DebugKey -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/DebugKey.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.DebugKey where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype DebugKey = DebugKey (ForeignPtr DebugKey)-instance WrappedPtr DebugKey where
− GI/GLib/Structs/Dir.hs
@@ -1,199 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--An opaque structure representing an opened directory.--}--module GI.GLib.Structs.Dir- ( ---- * Exported types- Dir(..) ,- noDir ,--- -- * Methods--- ** dirClose- DirCloseMethodInfo ,- dirClose ,----- ** dirMakeTmp- dirMakeTmp ,----- ** dirReadName- DirReadNameMethodInfo ,- dirReadName ,----- ** dirRewind- DirRewindMethodInfo ,- dirRewind ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Dir = Dir (ForeignPtr Dir)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Dir where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noDir :: Maybe Dir-noDir = Nothing---type instance AttributeList Dir = DirAttributeList-type DirAttributeList = ('[ ] :: [(Symbol, *)])---- method Dir::close--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Dir", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_dir_close" g_dir_close :: - Ptr Dir -> -- _obj : TInterface "GLib" "Dir"- IO ()---dirClose ::- (MonadIO m) =>- Dir -- _obj- -> m () -- result-dirClose _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_dir_close _obj'- touchManagedPtr _obj- return ()--data DirCloseMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo DirCloseMethodInfo Dir signature where- overloadedMethod _ = dirClose---- method Dir::read_name--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Dir", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_dir_read_name" g_dir_read_name :: - Ptr Dir -> -- _obj : TInterface "GLib" "Dir"- IO CString---dirReadName ::- (MonadIO m) =>- Dir -- _obj- -> m T.Text -- result-dirReadName _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_dir_read_name _obj'- checkUnexpectedReturnNULL "g_dir_read_name" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data DirReadNameMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo DirReadNameMethodInfo Dir signature where- overloadedMethod _ = dirReadName---- method Dir::rewind--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Dir", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_dir_rewind" g_dir_rewind :: - Ptr Dir -> -- _obj : TInterface "GLib" "Dir"- IO ()---dirRewind ::- (MonadIO m) =>- Dir -- _obj- -> m () -- result-dirRewind _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_dir_rewind _obj'- touchManagedPtr _obj- return ()--data DirRewindMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo DirRewindMethodInfo Dir signature where- overloadedMethod _ = dirRewind---- method Dir::make_tmp--- method type : MemberFunction--- Args : [Arg {argCName = "tmpl", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TFileName)--- throws : True--- Skip return : False--foreign import ccall "g_dir_make_tmp" g_dir_make_tmp :: - CString -> -- tmpl : TBasicType TFileName- Ptr (Ptr GError) -> -- error- IO CString---dirMakeTmp ::- (MonadIO m) =>- Maybe ([Char]) -- tmpl- -> m [Char] -- result-dirMakeTmp tmpl = liftIO $ do- maybeTmpl <- case tmpl of- Nothing -> return nullPtr- Just jTmpl -> do- jTmpl' <- stringToCString jTmpl- return jTmpl'- onException (do- result <- propagateGError $ g_dir_make_tmp maybeTmpl- checkUnexpectedReturnNULL "g_dir_make_tmp" result- result' <- cstringToString result- freeMem result- freeMem maybeTmpl- return result'- ) (do- freeMem maybeTmpl- )--type family ResolveDirMethod (t :: Symbol) (o :: *) :: * where- ResolveDirMethod "close" o = DirCloseMethodInfo- ResolveDirMethod "readName" o = DirReadNameMethodInfo- ResolveDirMethod "rewind" o = DirRewindMethodInfo- ResolveDirMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveDirMethod t Dir, MethodInfo info Dir p) => IsLabelProxy t (Dir -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveDirMethod t Dir, MethodInfo info Dir p) => IsLabel t (Dir -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Dir.hs-boot
@@ -1,14 +0,0 @@-module GI.GLib.Structs.Dir where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Dir = Dir (ForeignPtr Dir)-instance WrappedPtr Dir where-data DirCloseMethodInfo-data DirReadNameMethodInfo-data DirRewindMethodInfo
− GI/GLib/Structs/HashTableIter.hs
@@ -1,252 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A GHashTableIter structure represents an iterator that can be used-to iterate over the elements of a #GHashTable. GHashTableIter-structures are typically allocated on the stack and then initialized-with g_hash_table_iter_init().--}--module GI.GLib.Structs.HashTableIter- ( ---- * Exported types- HashTableIter(..) ,- newZeroHashTableIter ,- noHashTableIter ,--- -- * Methods--- ** hashTableIterInit- HashTableIterInitMethodInfo ,- hashTableIterInit ,----- ** hashTableIterNext- HashTableIterNextMethodInfo ,- hashTableIterNext ,----- ** hashTableIterRemove- HashTableIterRemoveMethodInfo ,- hashTableIterRemove ,----- ** hashTableIterReplace- HashTableIterReplaceMethodInfo ,- hashTableIterReplace ,----- ** hashTableIterSteal- HashTableIterStealMethodInfo ,- hashTableIterSteal ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype HashTableIter = HashTableIter (ForeignPtr HashTableIter)-instance WrappedPtr HashTableIter where- wrappedPtrCalloc = callocBytes 40- wrappedPtrCopy = copyPtr 40- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `HashTableIter` struct initialized to zero.-newZeroHashTableIter :: MonadIO m => m HashTableIter-newZeroHashTableIter = liftIO $ wrappedPtrCalloc >>= wrapPtr HashTableIter--instance tag ~ 'AttrSet => Constructible HashTableIter tag where- new _ attrs = do- o <- newZeroHashTableIter- GI.Attributes.set o attrs- return o---noHashTableIter :: Maybe HashTableIter-noHashTableIter = Nothing---type instance AttributeList HashTableIter = HashTableIterAttributeList-type HashTableIterAttributeList = ('[ ] :: [(Symbol, *)])---- method HashTableIter::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HashTableIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hash_table", argType = TGHash (TBasicType TPtr) (TBasicType TPtr), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hash_table_iter_init" g_hash_table_iter_init :: - Ptr HashTableIter -> -- _obj : TInterface "GLib" "HashTableIter"- Ptr (GHashTable (Ptr ()) (Ptr ())) -> -- hash_table : TGHash (TBasicType TPtr) (TBasicType TPtr)- IO ()---hashTableIterInit ::- (MonadIO m) =>- HashTableIter -- _obj- -> Map.Map (Ptr ()) (Ptr ()) -- hashTable- -> m () -- result-hashTableIterInit _obj hashTable = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let hashTable' = Map.toList hashTable- let hashTable'' = mapFirst ptrPackPtr hashTable'- let hashTable''' = mapSecond ptrPackPtr hashTable''- hashTable'''' <- packGHashTable gDirectHash gDirectEqual Nothing Nothing hashTable'''- g_hash_table_iter_init _obj' hashTable''''- touchManagedPtr _obj- unrefGHashTable hashTable''''- return ()--data HashTableIterInitMethodInfo-instance (signature ~ (Map.Map (Ptr ()) (Ptr ()) -> m ()), MonadIO m) => MethodInfo HashTableIterInitMethodInfo HashTableIter signature where- overloadedMethod _ = hashTableIterInit---- method HashTableIter::next--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HashTableIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_hash_table_iter_next" g_hash_table_iter_next :: - Ptr HashTableIter -> -- _obj : TInterface "GLib" "HashTableIter"- Ptr () -> -- key : TBasicType TPtr- Ptr () -> -- value : TBasicType TPtr- IO CInt---hashTableIterNext ::- (MonadIO m) =>- HashTableIter -- _obj- -> Ptr () -- key- -> Ptr () -- value- -> m Bool -- result-hashTableIterNext _obj key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_hash_table_iter_next _obj' key value- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data HashTableIterNextMethodInfo-instance (signature ~ (Ptr () -> Ptr () -> m Bool), MonadIO m) => MethodInfo HashTableIterNextMethodInfo HashTableIter signature where- overloadedMethod _ = hashTableIterNext---- method HashTableIter::remove--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HashTableIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hash_table_iter_remove" g_hash_table_iter_remove :: - Ptr HashTableIter -> -- _obj : TInterface "GLib" "HashTableIter"- IO ()---hashTableIterRemove ::- (MonadIO m) =>- HashTableIter -- _obj- -> m () -- result-hashTableIterRemove _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_hash_table_iter_remove _obj'- touchManagedPtr _obj- return ()--data HashTableIterRemoveMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo HashTableIterRemoveMethodInfo HashTableIter signature where- overloadedMethod _ = hashTableIterRemove---- method HashTableIter::replace--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HashTableIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hash_table_iter_replace" g_hash_table_iter_replace :: - Ptr HashTableIter -> -- _obj : TInterface "GLib" "HashTableIter"- Ptr () -> -- value : TBasicType TPtr- IO ()---hashTableIterReplace ::- (MonadIO m) =>- HashTableIter -- _obj- -> Ptr () -- value- -> m () -- result-hashTableIterReplace _obj value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_hash_table_iter_replace _obj' value- touchManagedPtr _obj- return ()--data HashTableIterReplaceMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo HashTableIterReplaceMethodInfo HashTableIter signature where- overloadedMethod _ = hashTableIterReplace---- method HashTableIter::steal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HashTableIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hash_table_iter_steal" g_hash_table_iter_steal :: - Ptr HashTableIter -> -- _obj : TInterface "GLib" "HashTableIter"- IO ()---hashTableIterSteal ::- (MonadIO m) =>- HashTableIter -- _obj- -> m () -- result-hashTableIterSteal _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_hash_table_iter_steal _obj'- touchManagedPtr _obj- return ()--data HashTableIterStealMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo HashTableIterStealMethodInfo HashTableIter signature where- overloadedMethod _ = hashTableIterSteal--type family ResolveHashTableIterMethod (t :: Symbol) (o :: *) :: * where- ResolveHashTableIterMethod "init" o = HashTableIterInitMethodInfo- ResolveHashTableIterMethod "next" o = HashTableIterNextMethodInfo- ResolveHashTableIterMethod "remove" o = HashTableIterRemoveMethodInfo- ResolveHashTableIterMethod "replace" o = HashTableIterReplaceMethodInfo- ResolveHashTableIterMethod "steal" o = HashTableIterStealMethodInfo- ResolveHashTableIterMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveHashTableIterMethod t HashTableIter, MethodInfo info HashTableIter p) => IsLabelProxy t (HashTableIter -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveHashTableIterMethod t HashTableIter, MethodInfo info HashTableIter p) => IsLabel t (HashTableIter -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/HashTableIter.hs-boot
@@ -1,16 +0,0 @@-module GI.GLib.Structs.HashTableIter where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype HashTableIter = HashTableIter (ForeignPtr HashTableIter)-instance WrappedPtr HashTableIter where-data HashTableIterInitMethodInfo-data HashTableIterNextMethodInfo-data HashTableIterRemoveMethodInfo-data HashTableIterReplaceMethodInfo-data HashTableIterStealMethodInfo
− GI/GLib/Structs/Hmac.hs
@@ -1,205 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--An opaque structure representing a HMAC operation.-To create a new GHmac, use g_hmac_new(). To free-a GHmac, use g_hmac_unref().--}--module GI.GLib.Structs.Hmac- ( ---- * Exported types- Hmac(..) ,- noHmac ,--- -- * Methods--- ** hmacGetDigest- HmacGetDigestMethodInfo ,- hmacGetDigest ,----- ** hmacGetString- HmacGetStringMethodInfo ,- hmacGetString ,----- ** hmacUnref- HmacUnrefMethodInfo ,- hmacUnref ,----- ** hmacUpdate- HmacUpdateMethodInfo ,- hmacUpdate ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Hmac = Hmac (ForeignPtr Hmac)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Hmac where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noHmac :: Maybe Hmac-noHmac = Nothing---type instance AttributeList Hmac = HmacAttributeList-type HmacAttributeList = ('[ ] :: [(Symbol, *)])---- method Hmac::get_digest--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Hmac", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buffer", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "digest_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hmac_get_digest" g_hmac_get_digest :: - Ptr Hmac -> -- _obj : TInterface "GLib" "Hmac"- Word8 -> -- buffer : TBasicType TUInt8- Word64 -> -- digest_len : TBasicType TUInt64- IO ()---hmacGetDigest ::- (MonadIO m) =>- Hmac -- _obj- -> Word8 -- buffer- -> Word64 -- digestLen- -> m () -- result-hmacGetDigest _obj buffer digestLen = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_hmac_get_digest _obj' buffer digestLen- touchManagedPtr _obj- return ()--data HmacGetDigestMethodInfo-instance (signature ~ (Word8 -> Word64 -> m ()), MonadIO m) => MethodInfo HmacGetDigestMethodInfo Hmac signature where- overloadedMethod _ = hmacGetDigest---- method Hmac::get_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Hmac", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_hmac_get_string" g_hmac_get_string :: - Ptr Hmac -> -- _obj : TInterface "GLib" "Hmac"- IO CString---hmacGetString ::- (MonadIO m) =>- Hmac -- _obj- -> m T.Text -- result-hmacGetString _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_hmac_get_string _obj'- checkUnexpectedReturnNULL "g_hmac_get_string" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data HmacGetStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo HmacGetStringMethodInfo Hmac signature where- overloadedMethod _ = hmacGetString---- method Hmac::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Hmac", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hmac_unref" g_hmac_unref :: - Ptr Hmac -> -- _obj : TInterface "GLib" "Hmac"- IO ()---hmacUnref ::- (MonadIO m) =>- Hmac -- _obj- -> m () -- result-hmacUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_hmac_unref _obj'- touchManagedPtr _obj- return ()--data HmacUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo HmacUnrefMethodInfo Hmac signature where- overloadedMethod _ = hmacUnref---- method Hmac::update--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Hmac", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hmac_update" g_hmac_update :: - Ptr Hmac -> -- _obj : TInterface "GLib" "Hmac"- Ptr Word8 -> -- data : TCArray False (-1) 2 (TBasicType TUInt8)- Int64 -> -- length : TBasicType TInt64- IO ()---hmacUpdate ::- (MonadIO m) =>- Hmac -- _obj- -> ByteString -- data_- -> m () -- result-hmacUpdate _obj data_ = liftIO $ do- let length_ = fromIntegral $ B.length data_- let _obj' = unsafeManagedPtrGetPtr _obj- data_' <- packByteString data_- g_hmac_update _obj' data_' length_- touchManagedPtr _obj- freeMem data_'- return ()--data HmacUpdateMethodInfo-instance (signature ~ (ByteString -> m ()), MonadIO m) => MethodInfo HmacUpdateMethodInfo Hmac signature where- overloadedMethod _ = hmacUpdate--type family ResolveHmacMethod (t :: Symbol) (o :: *) :: * where- ResolveHmacMethod "unref" o = HmacUnrefMethodInfo- ResolveHmacMethod "update" o = HmacUpdateMethodInfo- ResolveHmacMethod "getDigest" o = HmacGetDigestMethodInfo- ResolveHmacMethod "getString" o = HmacGetStringMethodInfo- ResolveHmacMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveHmacMethod t Hmac, MethodInfo info Hmac p) => IsLabelProxy t (Hmac -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveHmacMethod t Hmac, MethodInfo info Hmac p) => IsLabel t (Hmac -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Hmac.hs-boot
@@ -1,15 +0,0 @@-module GI.GLib.Structs.Hmac where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Hmac = Hmac (ForeignPtr Hmac)-instance WrappedPtr Hmac where-data HmacGetDigestMethodInfo-data HmacGetStringMethodInfo-data HmacUnrefMethodInfo-data HmacUpdateMethodInfo
− GI/GLib/Structs/Hook.hs
@@ -1,543 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GHook struct represents a single hook function in a #GHookList.--}--module GI.GLib.Structs.Hook- ( ---- * Exported types- Hook(..) ,- newZeroHook ,- noHook ,--- -- * Methods--- ** hookCompareIds- HookCompareIdsMethodInfo ,- hookCompareIds ,----- ** hookDestroy- hookDestroy ,----- ** hookDestroyLink- hookDestroyLink ,----- ** hookFree- hookFree ,----- ** hookInsertBefore- hookInsertBefore ,----- ** hookPrepend- hookPrepend ,----- ** hookUnref- hookUnref ,----- -- * Properties--- ** Data- hookClearData ,- hookData ,- hookReadData ,- hookWriteData ,----- ** Flags- hookFlags ,- hookReadFlags ,- hookWriteFlags ,----- ** Func- hookClearFunc ,- hookFunc ,- hookReadFunc ,- hookWriteFunc ,----- ** HookId- hookHookId ,- hookReadHookId ,- hookWriteHookId ,----- ** Next- hookClearNext ,- hookNext ,- hookReadNext ,- hookWriteNext ,----- ** Prev- hookClearPrev ,- hookPrev ,- hookReadPrev ,- hookWritePrev ,----- ** RefCount- hookReadRefCount ,- hookRefCount ,- hookWriteRefCount ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Hook = Hook (ForeignPtr Hook)-instance WrappedPtr Hook where- wrappedPtrCalloc = callocBytes 64- wrappedPtrCopy = copyPtr 64- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Hook` struct initialized to zero.-newZeroHook :: MonadIO m => m Hook-newZeroHook = liftIO $ wrappedPtrCalloc >>= wrapPtr Hook--instance tag ~ 'AttrSet => Constructible Hook tag where- new _ attrs = do- o <- newZeroHook- GI.Attributes.set o attrs- return o---noHook :: Maybe Hook-noHook = Nothing--hookReadData :: MonadIO m => Hook -> m (Ptr ())-hookReadData s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())- return val--hookWriteData :: MonadIO m => Hook -> Ptr () -> m ()-hookWriteData s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr ())--hookClearData :: MonadIO m => Hook -> m ()-hookClearData s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: Ptr ())--data HookDataFieldInfo-instance AttrInfo HookDataFieldInfo where- type AttrAllowedOps HookDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint HookDataFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint HookDataFieldInfo = (~) Hook- type AttrGetType HookDataFieldInfo = Ptr ()- type AttrLabel HookDataFieldInfo = "data"- attrGet _ = hookReadData- attrSet _ = hookWriteData- attrConstruct = undefined- attrClear _ = hookClearData--hookData :: AttrLabelProxy "data"-hookData = AttrLabelProxy---hookReadNext :: MonadIO m => Hook -> m (Maybe Hook)-hookReadNext s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (Ptr Hook)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Hook) val'- return val''- return result--hookWriteNext :: MonadIO m => Hook -> Ptr Hook -> m ()-hookWriteNext s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Ptr Hook)--hookClearNext :: MonadIO m => Hook -> m ()-hookClearNext s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (nullPtr :: Ptr Hook)--data HookNextFieldInfo-instance AttrInfo HookNextFieldInfo where- type AttrAllowedOps HookNextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint HookNextFieldInfo = (~) (Ptr Hook)- type AttrBaseTypeConstraint HookNextFieldInfo = (~) Hook- type AttrGetType HookNextFieldInfo = Maybe Hook- type AttrLabel HookNextFieldInfo = "next"- attrGet _ = hookReadNext- attrSet _ = hookWriteNext- attrConstruct = undefined- attrClear _ = hookClearNext--hookNext :: AttrLabelProxy "next"-hookNext = AttrLabelProxy---hookReadPrev :: MonadIO m => Hook -> m (Maybe Hook)-hookReadPrev s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (Ptr Hook)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Hook) val'- return val''- return result--hookWritePrev :: MonadIO m => Hook -> Ptr Hook -> m ()-hookWritePrev s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Ptr Hook)--hookClearPrev :: MonadIO m => Hook -> m ()-hookClearPrev s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (nullPtr :: Ptr Hook)--data HookPrevFieldInfo-instance AttrInfo HookPrevFieldInfo where- type AttrAllowedOps HookPrevFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint HookPrevFieldInfo = (~) (Ptr Hook)- type AttrBaseTypeConstraint HookPrevFieldInfo = (~) Hook- type AttrGetType HookPrevFieldInfo = Maybe Hook- type AttrLabel HookPrevFieldInfo = "prev"- attrGet _ = hookReadPrev- attrSet _ = hookWritePrev- attrConstruct = undefined- attrClear _ = hookClearPrev--hookPrev :: AttrLabelProxy "prev"-hookPrev = AttrLabelProxy---hookReadRefCount :: MonadIO m => Hook -> m Word32-hookReadRefCount s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO Word32- return val--hookWriteRefCount :: MonadIO m => Hook -> Word32 -> m ()-hookWriteRefCount s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Word32)--data HookRefCountFieldInfo-instance AttrInfo HookRefCountFieldInfo where- type AttrAllowedOps HookRefCountFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint HookRefCountFieldInfo = (~) Word32- type AttrBaseTypeConstraint HookRefCountFieldInfo = (~) Hook- type AttrGetType HookRefCountFieldInfo = Word32- type AttrLabel HookRefCountFieldInfo = "ref_count"- attrGet _ = hookReadRefCount- attrSet _ = hookWriteRefCount- attrConstruct = undefined- attrClear _ = undefined--hookRefCount :: AttrLabelProxy "refCount"-hookRefCount = AttrLabelProxy---hookReadHookId :: MonadIO m => Hook -> m CULong-hookReadHookId s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO CULong- return val--hookWriteHookId :: MonadIO m => Hook -> CULong -> m ()-hookWriteHookId s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: CULong)--data HookHookIdFieldInfo-instance AttrInfo HookHookIdFieldInfo where- type AttrAllowedOps HookHookIdFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint HookHookIdFieldInfo = (~) CULong- type AttrBaseTypeConstraint HookHookIdFieldInfo = (~) Hook- type AttrGetType HookHookIdFieldInfo = CULong- type AttrLabel HookHookIdFieldInfo = "hook_id"- attrGet _ = hookReadHookId- attrSet _ = hookWriteHookId- attrConstruct = undefined- attrClear _ = undefined--hookHookId :: AttrLabelProxy "hookId"-hookHookId = AttrLabelProxy---hookReadFlags :: MonadIO m => Hook -> m Word32-hookReadFlags s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 40) :: IO Word32- return val--hookWriteFlags :: MonadIO m => Hook -> Word32 -> m ()-hookWriteFlags s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 40) (val :: Word32)--data HookFlagsFieldInfo-instance AttrInfo HookFlagsFieldInfo where- type AttrAllowedOps HookFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint HookFlagsFieldInfo = (~) Word32- type AttrBaseTypeConstraint HookFlagsFieldInfo = (~) Hook- type AttrGetType HookFlagsFieldInfo = Word32- type AttrLabel HookFlagsFieldInfo = "flags"- attrGet _ = hookReadFlags- attrSet _ = hookWriteFlags- attrConstruct = undefined- attrClear _ = undefined--hookFlags :: AttrLabelProxy "flags"-hookFlags = AttrLabelProxy---hookReadFunc :: MonadIO m => Hook -> m (Ptr ())-hookReadFunc s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 48) :: IO (Ptr ())- return val--hookWriteFunc :: MonadIO m => Hook -> Ptr () -> m ()-hookWriteFunc s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (val :: Ptr ())--hookClearFunc :: MonadIO m => Hook -> m ()-hookClearFunc s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (nullPtr :: Ptr ())--data HookFuncFieldInfo-instance AttrInfo HookFuncFieldInfo where- type AttrAllowedOps HookFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint HookFuncFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint HookFuncFieldInfo = (~) Hook- type AttrGetType HookFuncFieldInfo = Ptr ()- type AttrLabel HookFuncFieldInfo = "func"- attrGet _ = hookReadFunc- attrSet _ = hookWriteFunc- attrConstruct = undefined- attrClear _ = hookClearFunc--hookFunc :: AttrLabelProxy "func"-hookFunc = AttrLabelProxy----- XXX Skipped attribute for "Hook:destroy" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--type instance AttributeList Hook = HookAttributeList-type HookAttributeList = ('[ '("data", HookDataFieldInfo), '("next", HookNextFieldInfo), '("prev", HookPrevFieldInfo), '("refCount", HookRefCountFieldInfo), '("hookId", HookHookIdFieldInfo), '("flags", HookFlagsFieldInfo), '("func", HookFuncFieldInfo)] :: [(Symbol, *)])---- method Hook::compare_ids--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sibling", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_hook_compare_ids" g_hook_compare_ids :: - Ptr Hook -> -- _obj : TInterface "GLib" "Hook"- Ptr Hook -> -- sibling : TInterface "GLib" "Hook"- IO Int32---hookCompareIds ::- (MonadIO m) =>- Hook -- _obj- -> Hook -- sibling- -> m Int32 -- result-hookCompareIds _obj sibling = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let sibling' = unsafeManagedPtrGetPtr sibling- result <- g_hook_compare_ids _obj' sibling'- touchManagedPtr _obj- touchManagedPtr sibling- return result--data HookCompareIdsMethodInfo-instance (signature ~ (Hook -> m Int32), MonadIO m) => MethodInfo HookCompareIdsMethodInfo Hook signature where- overloadedMethod _ = hookCompareIds---- method Hook::destroy--- method type : MemberFunction--- Args : [Arg {argCName = "hook_list", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hook_id", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_hook_destroy" g_hook_destroy :: - Ptr HookList -> -- hook_list : TInterface "GLib" "HookList"- CULong -> -- hook_id : TBasicType TULong- IO CInt---hookDestroy ::- (MonadIO m) =>- HookList -- hookList- -> CULong -- hookId- -> m Bool -- result-hookDestroy hookList hookId = liftIO $ do- let hookList' = unsafeManagedPtrGetPtr hookList- result <- g_hook_destroy hookList' hookId- let result' = (/= 0) result- touchManagedPtr hookList- return result'---- method Hook::destroy_link--- method type : MemberFunction--- Args : [Arg {argCName = "hook_list", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hook", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_destroy_link" g_hook_destroy_link :: - Ptr HookList -> -- hook_list : TInterface "GLib" "HookList"- Ptr Hook -> -- hook : TInterface "GLib" "Hook"- IO ()---hookDestroyLink ::- (MonadIO m) =>- HookList -- hookList- -> Hook -- hook- -> m () -- result-hookDestroyLink hookList hook = liftIO $ do- let hookList' = unsafeManagedPtrGetPtr hookList- let hook' = unsafeManagedPtrGetPtr hook- g_hook_destroy_link hookList' hook'- touchManagedPtr hookList- touchManagedPtr hook- return ()---- method Hook::free--- method type : MemberFunction--- Args : [Arg {argCName = "hook_list", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hook", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_free" g_hook_free :: - Ptr HookList -> -- hook_list : TInterface "GLib" "HookList"- Ptr Hook -> -- hook : TInterface "GLib" "Hook"- IO ()---hookFree ::- (MonadIO m) =>- HookList -- hookList- -> Hook -- hook- -> m () -- result-hookFree hookList hook = liftIO $ do- let hookList' = unsafeManagedPtrGetPtr hookList- let hook' = unsafeManagedPtrGetPtr hook- g_hook_free hookList' hook'- touchManagedPtr hookList- touchManagedPtr hook- return ()---- method Hook::insert_before--- method type : MemberFunction--- Args : [Arg {argCName = "hook_list", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sibling", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hook", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_insert_before" g_hook_insert_before :: - Ptr HookList -> -- hook_list : TInterface "GLib" "HookList"- Ptr Hook -> -- sibling : TInterface "GLib" "Hook"- Ptr Hook -> -- hook : TInterface "GLib" "Hook"- IO ()---hookInsertBefore ::- (MonadIO m) =>- HookList -- hookList- -> Hook -- sibling- -> Hook -- hook- -> m () -- result-hookInsertBefore hookList sibling hook = liftIO $ do- let hookList' = unsafeManagedPtrGetPtr hookList- let sibling' = unsafeManagedPtrGetPtr sibling- let hook' = unsafeManagedPtrGetPtr hook- g_hook_insert_before hookList' sibling' hook'- touchManagedPtr hookList- touchManagedPtr sibling- touchManagedPtr hook- return ()---- method Hook::prepend--- method type : MemberFunction--- Args : [Arg {argCName = "hook_list", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hook", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_prepend" g_hook_prepend :: - Ptr HookList -> -- hook_list : TInterface "GLib" "HookList"- Ptr Hook -> -- hook : TInterface "GLib" "Hook"- IO ()---hookPrepend ::- (MonadIO m) =>- HookList -- hookList- -> Hook -- hook- -> m () -- result-hookPrepend hookList hook = liftIO $ do- let hookList' = unsafeManagedPtrGetPtr hookList- let hook' = unsafeManagedPtrGetPtr hook- g_hook_prepend hookList' hook'- touchManagedPtr hookList- touchManagedPtr hook- return ()---- method Hook::unref--- method type : MemberFunction--- Args : [Arg {argCName = "hook_list", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hook", argType = TInterface "GLib" "Hook", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_unref" g_hook_unref :: - Ptr HookList -> -- hook_list : TInterface "GLib" "HookList"- Ptr Hook -> -- hook : TInterface "GLib" "Hook"- IO ()---hookUnref ::- (MonadIO m) =>- HookList -- hookList- -> Hook -- hook- -> m () -- result-hookUnref hookList hook = liftIO $ do- let hookList' = unsafeManagedPtrGetPtr hookList- let hook' = unsafeManagedPtrGetPtr hook- g_hook_unref hookList' hook'- touchManagedPtr hookList- touchManagedPtr hook- return ()--type family ResolveHookMethod (t :: Symbol) (o :: *) :: * where- ResolveHookMethod "compareIds" o = HookCompareIdsMethodInfo- ResolveHookMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveHookMethod t Hook, MethodInfo info Hook p) => IsLabelProxy t (Hook -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveHookMethod t Hook, MethodInfo info Hook p) => IsLabel t (Hook -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Hook.hs-boot
@@ -1,12 +0,0 @@-module GI.GLib.Structs.Hook where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Hook = Hook (ForeignPtr Hook)-instance WrappedPtr Hook where-data HookCompareIdsMethodInfo
− GI/GLib/Structs/HookList.hs
@@ -1,383 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GHookList struct represents a list of hook functions.--}--module GI.GLib.Structs.HookList- ( ---- * Exported types- HookList(..) ,- newZeroHookList ,- noHookList ,--- -- * Methods--- ** hookListClear- HookListClearMethodInfo ,- hookListClear ,----- ** hookListInit- HookListInitMethodInfo ,- hookListInit ,----- ** hookListInvoke- HookListInvokeMethodInfo ,- hookListInvoke ,----- ** hookListInvokeCheck- HookListInvokeCheckMethodInfo ,- hookListInvokeCheck ,----- -- * Properties--- ** Dummy3- hookListClearDummy3 ,- hookListDummy3 ,- hookListReadDummy3 ,- hookListWriteDummy3 ,----- ** HookSize- hookListHookSize ,- hookListReadHookSize ,- hookListWriteHookSize ,----- ** Hooks- hookListClearHooks ,- hookListHooks ,- hookListReadHooks ,- hookListWriteHooks ,----- ** IsSetup- hookListIsSetup ,- hookListReadIsSetup ,- hookListWriteIsSetup ,----- ** SeqId- hookListReadSeqId ,- hookListSeqId ,- hookListWriteSeqId ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype HookList = HookList (ForeignPtr HookList)-instance WrappedPtr HookList where- wrappedPtrCalloc = callocBytes 56- wrappedPtrCopy = copyPtr 56- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `HookList` struct initialized to zero.-newZeroHookList :: MonadIO m => m HookList-newZeroHookList = liftIO $ wrappedPtrCalloc >>= wrapPtr HookList--instance tag ~ 'AttrSet => Constructible HookList tag where- new _ attrs = do- o <- newZeroHookList- GI.Attributes.set o attrs- return o---noHookList :: Maybe HookList-noHookList = Nothing--hookListReadSeqId :: MonadIO m => HookList -> m CULong-hookListReadSeqId s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CULong- return val--hookListWriteSeqId :: MonadIO m => HookList -> CULong -> m ()-hookListWriteSeqId s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CULong)--data HookListSeqIdFieldInfo-instance AttrInfo HookListSeqIdFieldInfo where- type AttrAllowedOps HookListSeqIdFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint HookListSeqIdFieldInfo = (~) CULong- type AttrBaseTypeConstraint HookListSeqIdFieldInfo = (~) HookList- type AttrGetType HookListSeqIdFieldInfo = CULong- type AttrLabel HookListSeqIdFieldInfo = "seq_id"- attrGet _ = hookListReadSeqId- attrSet _ = hookListWriteSeqId- attrConstruct = undefined- attrClear _ = undefined--hookListSeqId :: AttrLabelProxy "seqId"-hookListSeqId = AttrLabelProxy---hookListReadHookSize :: MonadIO m => HookList -> m Word32-hookListReadHookSize s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--hookListWriteHookSize :: MonadIO m => HookList -> Word32 -> m ()-hookListWriteHookSize s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--data HookListHookSizeFieldInfo-instance AttrInfo HookListHookSizeFieldInfo where- type AttrAllowedOps HookListHookSizeFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint HookListHookSizeFieldInfo = (~) Word32- type AttrBaseTypeConstraint HookListHookSizeFieldInfo = (~) HookList- type AttrGetType HookListHookSizeFieldInfo = Word32- type AttrLabel HookListHookSizeFieldInfo = "hook_size"- attrGet _ = hookListReadHookSize- attrSet _ = hookListWriteHookSize- attrConstruct = undefined- attrClear _ = undefined--hookListHookSize :: AttrLabelProxy "hookSize"-hookListHookSize = AttrLabelProxy---hookListReadIsSetup :: MonadIO m => HookList -> m Word32-hookListReadIsSetup s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Word32- return val--hookListWriteIsSetup :: MonadIO m => HookList -> Word32 -> m ()-hookListWriteIsSetup s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Word32)--data HookListIsSetupFieldInfo-instance AttrInfo HookListIsSetupFieldInfo where- type AttrAllowedOps HookListIsSetupFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint HookListIsSetupFieldInfo = (~) Word32- type AttrBaseTypeConstraint HookListIsSetupFieldInfo = (~) HookList- type AttrGetType HookListIsSetupFieldInfo = Word32- type AttrLabel HookListIsSetupFieldInfo = "is_setup"- attrGet _ = hookListReadIsSetup- attrSet _ = hookListWriteIsSetup- attrConstruct = undefined- attrClear _ = undefined--hookListIsSetup :: AttrLabelProxy "isSetup"-hookListIsSetup = AttrLabelProxy---hookListReadHooks :: MonadIO m => HookList -> m (Maybe Hook)-hookListReadHooks s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (Ptr Hook)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Hook) val'- return val''- return result--hookListWriteHooks :: MonadIO m => HookList -> Ptr Hook -> m ()-hookListWriteHooks s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Ptr Hook)--hookListClearHooks :: MonadIO m => HookList -> m ()-hookListClearHooks s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (nullPtr :: Ptr Hook)--data HookListHooksFieldInfo-instance AttrInfo HookListHooksFieldInfo where- type AttrAllowedOps HookListHooksFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint HookListHooksFieldInfo = (~) (Ptr Hook)- type AttrBaseTypeConstraint HookListHooksFieldInfo = (~) HookList- type AttrGetType HookListHooksFieldInfo = Maybe Hook- type AttrLabel HookListHooksFieldInfo = "hooks"- attrGet _ = hookListReadHooks- attrSet _ = hookListWriteHooks- attrConstruct = undefined- attrClear _ = hookListClearHooks--hookListHooks :: AttrLabelProxy "hooks"-hookListHooks = AttrLabelProxy---hookListReadDummy3 :: MonadIO m => HookList -> m (Ptr ())-hookListReadDummy3 s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO (Ptr ())- return val--hookListWriteDummy3 :: MonadIO m => HookList -> Ptr () -> m ()-hookListWriteDummy3 s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Ptr ())--hookListClearDummy3 :: MonadIO m => HookList -> m ()-hookListClearDummy3 s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (nullPtr :: Ptr ())--data HookListDummy3FieldInfo-instance AttrInfo HookListDummy3FieldInfo where- type AttrAllowedOps HookListDummy3FieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint HookListDummy3FieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint HookListDummy3FieldInfo = (~) HookList- type AttrGetType HookListDummy3FieldInfo = Ptr ()- type AttrLabel HookListDummy3FieldInfo = "dummy3"- attrGet _ = hookListReadDummy3- attrSet _ = hookListWriteDummy3- attrConstruct = undefined- attrClear _ = hookListClearDummy3--hookListDummy3 :: AttrLabelProxy "dummy3"-hookListDummy3 = AttrLabelProxy----- XXX Skipped attribute for "HookList:finalize_hook" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "HookList:dummy" :: Not implemented: "Don't know how to unpack C array of type TCArray False 2 (-1) (TBasicType TPtr)"--type instance AttributeList HookList = HookListAttributeList-type HookListAttributeList = ('[ '("seqId", HookListSeqIdFieldInfo), '("hookSize", HookListHookSizeFieldInfo), '("isSetup", HookListIsSetupFieldInfo), '("hooks", HookListHooksFieldInfo), '("dummy3", HookListDummy3FieldInfo)] :: [(Symbol, *)])---- method HookList::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_list_clear" g_hook_list_clear :: - Ptr HookList -> -- _obj : TInterface "GLib" "HookList"- IO ()---hookListClear ::- (MonadIO m) =>- HookList -- _obj- -> m () -- result-hookListClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_hook_list_clear _obj'- touchManagedPtr _obj- return ()--data HookListClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo HookListClearMethodInfo HookList signature where- overloadedMethod _ = hookListClear---- method HookList::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hook_size", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_list_init" g_hook_list_init :: - Ptr HookList -> -- _obj : TInterface "GLib" "HookList"- Word32 -> -- hook_size : TBasicType TUInt- IO ()---hookListInit ::- (MonadIO m) =>- HookList -- _obj- -> Word32 -- hookSize- -> m () -- result-hookListInit _obj hookSize = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_hook_list_init _obj' hookSize- touchManagedPtr _obj- return ()--data HookListInitMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo HookListInitMethodInfo HookList signature where- overloadedMethod _ = hookListInit---- method HookList::invoke--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "may_recurse", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_list_invoke" g_hook_list_invoke :: - Ptr HookList -> -- _obj : TInterface "GLib" "HookList"- CInt -> -- may_recurse : TBasicType TBoolean- IO ()---hookListInvoke ::- (MonadIO m) =>- HookList -- _obj- -> Bool -- mayRecurse- -> m () -- result-hookListInvoke _obj mayRecurse = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let mayRecurse' = (fromIntegral . fromEnum) mayRecurse- g_hook_list_invoke _obj' mayRecurse'- touchManagedPtr _obj- return ()--data HookListInvokeMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo HookListInvokeMethodInfo HookList signature where- overloadedMethod _ = hookListInvoke---- method HookList::invoke_check--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "HookList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "may_recurse", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_hook_list_invoke_check" g_hook_list_invoke_check :: - Ptr HookList -> -- _obj : TInterface "GLib" "HookList"- CInt -> -- may_recurse : TBasicType TBoolean- IO ()---hookListInvokeCheck ::- (MonadIO m) =>- HookList -- _obj- -> Bool -- mayRecurse- -> m () -- result-hookListInvokeCheck _obj mayRecurse = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let mayRecurse' = (fromIntegral . fromEnum) mayRecurse- g_hook_list_invoke_check _obj' mayRecurse'- touchManagedPtr _obj- return ()--data HookListInvokeCheckMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo HookListInvokeCheckMethodInfo HookList signature where- overloadedMethod _ = hookListInvokeCheck--type family ResolveHookListMethod (t :: Symbol) (o :: *) :: * where- ResolveHookListMethod "clear" o = HookListClearMethodInfo- ResolveHookListMethod "init" o = HookListInitMethodInfo- ResolveHookListMethod "invoke" o = HookListInvokeMethodInfo- ResolveHookListMethod "invokeCheck" o = HookListInvokeCheckMethodInfo- ResolveHookListMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveHookListMethod t HookList, MethodInfo info HookList p) => IsLabelProxy t (HookList -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveHookListMethod t HookList, MethodInfo info HookList p) => IsLabel t (HookList -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/HookList.hs-boot
@@ -1,15 +0,0 @@-module GI.GLib.Structs.HookList where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype HookList = HookList (ForeignPtr HookList)-instance WrappedPtr HookList where-data HookListClearMethodInfo-data HookListInitMethodInfo-data HookListInvokeMethodInfo-data HookListInvokeCheckMethodInfo
− GI/GLib/Structs/IConv.hs
@@ -1,93 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GIConv struct wraps an iconv() conversion descriptor. It contains-private data and should only be accessed using the following functions.--}--module GI.GLib.Structs.IConv- ( ---- * Exported types- IConv(..) ,- noIConv ,--- -- * Methods--- ** iConvClose- IConvCloseMethodInfo ,- iConvClose ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype IConv = IConv (ForeignPtr IConv)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr IConv where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noIConv :: Maybe IConv-noIConv = Nothing---type instance AttributeList IConv = IConvAttributeList-type IConvAttributeList = ('[ ] :: [(Symbol, *)])---- method IConv::close--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IConv", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_iconv_close" g_iconv_close :: - Ptr IConv -> -- _obj : TInterface "GLib" "IConv"- IO Int32---iConvClose ::- (MonadIO m) =>- IConv -- _obj- -> m Int32 -- result-iConvClose _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_iconv_close _obj'- touchManagedPtr _obj- return result--data IConvCloseMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo IConvCloseMethodInfo IConv signature where- overloadedMethod _ = iConvClose--type family ResolveIConvMethod (t :: Symbol) (o :: *) :: * where- ResolveIConvMethod "close" o = IConvCloseMethodInfo- ResolveIConvMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveIConvMethod t IConv, MethodInfo info IConv p) => IsLabelProxy t (IConv -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveIConvMethod t IConv, MethodInfo info IConv p) => IsLabel t (IConv -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/IConv.hs-boot
@@ -1,12 +0,0 @@-module GI.GLib.Structs.IConv where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype IConv = IConv (ForeignPtr IConv)-instance WrappedPtr IConv where-data IConvCloseMethodInfo
− GI/GLib/Structs/IOChannel.hs
@@ -1,1372 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A data structure representing an IO Channel. The fields should be-considered private and should only be accessed with the following-functions.--}--module GI.GLib.Structs.IOChannel- ( ---- * Exported types- IOChannel(..) ,- newZeroIOChannel ,- noIOChannel ,--- -- * Methods--- ** iOChannelClose- IOChannelCloseMethodInfo ,- iOChannelClose ,----- ** iOChannelErrorFromErrno- iOChannelErrorFromErrno ,----- ** iOChannelErrorQuark- iOChannelErrorQuark ,----- ** iOChannelFlush- IOChannelFlushMethodInfo ,- iOChannelFlush ,----- ** iOChannelGetBufferCondition- IOChannelGetBufferConditionMethodInfo ,- iOChannelGetBufferCondition ,----- ** iOChannelGetBufferSize- IOChannelGetBufferSizeMethodInfo ,- iOChannelGetBufferSize ,----- ** iOChannelGetBuffered- IOChannelGetBufferedMethodInfo ,- iOChannelGetBuffered ,----- ** iOChannelGetCloseOnUnref- IOChannelGetCloseOnUnrefMethodInfo ,- iOChannelGetCloseOnUnref ,----- ** iOChannelGetEncoding- IOChannelGetEncodingMethodInfo ,- iOChannelGetEncoding ,----- ** iOChannelGetFlags- IOChannelGetFlagsMethodInfo ,- iOChannelGetFlags ,----- ** iOChannelGetLineTerm- IOChannelGetLineTermMethodInfo ,- iOChannelGetLineTerm ,----- ** iOChannelInit- IOChannelInitMethodInfo ,- iOChannelInit ,----- ** iOChannelNewFile- iOChannelNewFile ,----- ** iOChannelRead- IOChannelReadMethodInfo ,- iOChannelRead ,----- ** iOChannelReadChars- IOChannelReadCharsMethodInfo ,- iOChannelReadChars ,----- ** iOChannelReadLine- IOChannelReadLineMethodInfo ,- iOChannelReadLine ,----- ** iOChannelReadToEnd- IOChannelReadToEndMethodInfo ,- iOChannelReadToEnd ,----- ** iOChannelReadUnichar- IOChannelReadUnicharMethodInfo ,- iOChannelReadUnichar ,----- ** iOChannelRef- IOChannelRefMethodInfo ,- iOChannelRef ,----- ** iOChannelSeek- IOChannelSeekMethodInfo ,- iOChannelSeek ,----- ** iOChannelSeekPosition- IOChannelSeekPositionMethodInfo ,- iOChannelSeekPosition ,----- ** iOChannelSetBufferSize- IOChannelSetBufferSizeMethodInfo ,- iOChannelSetBufferSize ,----- ** iOChannelSetBuffered- IOChannelSetBufferedMethodInfo ,- iOChannelSetBuffered ,----- ** iOChannelSetCloseOnUnref- IOChannelSetCloseOnUnrefMethodInfo ,- iOChannelSetCloseOnUnref ,----- ** iOChannelSetEncoding- IOChannelSetEncodingMethodInfo ,- iOChannelSetEncoding ,----- ** iOChannelSetFlags- IOChannelSetFlagsMethodInfo ,- iOChannelSetFlags ,----- ** iOChannelSetLineTerm- IOChannelSetLineTermMethodInfo ,- iOChannelSetLineTerm ,----- ** iOChannelShutdown- IOChannelShutdownMethodInfo ,- iOChannelShutdown ,----- ** iOChannelUnixGetFd- IOChannelUnixGetFdMethodInfo ,- iOChannelUnixGetFd ,----- ** iOChannelUnixNew- iOChannelUnixNew ,----- ** iOChannelUnref- IOChannelUnrefMethodInfo ,- iOChannelUnref ,----- ** iOChannelWrite- IOChannelWriteMethodInfo ,- iOChannelWrite ,----- ** iOChannelWriteChars- IOChannelWriteCharsMethodInfo ,- iOChannelWriteChars ,----- ** iOChannelWriteUnichar- IOChannelWriteUnicharMethodInfo ,- iOChannelWriteUnichar ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype IOChannel = IOChannel (ForeignPtr IOChannel)-foreign import ccall "g_io_channel_get_type" c_g_io_channel_get_type :: - IO GType--instance BoxedObject IOChannel where- boxedType _ = c_g_io_channel_get_type---- | Construct a `IOChannel` struct initialized to zero.-newZeroIOChannel :: MonadIO m => m IOChannel-newZeroIOChannel = liftIO $ callocBoxedBytes 136 >>= wrapBoxed IOChannel--instance tag ~ 'AttrSet => Constructible IOChannel tag where- new _ attrs = do- o <- newZeroIOChannel- GI.Attributes.set o attrs- return o---noIOChannel :: Maybe IOChannel-noIOChannel = Nothing---type instance AttributeList IOChannel = IOChannelAttributeList-type IOChannelAttributeList = ('[ ] :: [(Symbol, *)])---- method IOChannel::new_file--- method type : Constructor--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOChannel")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_new_file" g_io_channel_new_file :: - CString -> -- filename : TBasicType TUTF8- CString -> -- mode : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO (Ptr IOChannel)---iOChannelNewFile ::- (MonadIO m) =>- T.Text -- filename- -> T.Text -- mode- -> m IOChannel -- result-iOChannelNewFile filename mode = liftIO $ do- filename' <- textToCString filename- mode' <- textToCString mode- onException (do- result <- propagateGError $ g_io_channel_new_file filename' mode'- checkUnexpectedReturnNULL "g_io_channel_new_file" result- result' <- (wrapBoxed IOChannel) result- freeMem filename'- freeMem mode'- return result'- ) (do- freeMem filename'- freeMem mode'- )---- method IOChannel::unix_new--- method type : Constructor--- Args : [Arg {argCName = "fd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOChannel")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_unix_new" g_io_channel_unix_new :: - Int32 -> -- fd : TBasicType TInt- IO (Ptr IOChannel)---iOChannelUnixNew ::- (MonadIO m) =>- Int32 -- fd- -> m IOChannel -- result-iOChannelUnixNew fd = liftIO $ do- result <- g_io_channel_unix_new fd- checkUnexpectedReturnNULL "g_io_channel_unix_new" result- result' <- (wrapBoxed IOChannel) result- return result'---- method IOChannel::close--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_close" g_io_channel_close :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO ()--{-# DEPRECATED iOChannelClose ["(Since version 2.2)","Use g_io_channel_shutdown() instead."]#-}-iOChannelClose ::- (MonadIO m) =>- IOChannel -- _obj- -> m () -- result-iOChannelClose _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_io_channel_close _obj'- touchManagedPtr _obj- return ()--data IOChannelCloseMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo IOChannelCloseMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelClose---- method IOChannel::flush--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_flush" g_io_channel_flush :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelFlush ::- (MonadIO m) =>- IOChannel -- _obj- -> m IOStatus -- result-iOChannelFlush _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- onException (do- result <- propagateGError $ g_io_channel_flush _obj'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'- ) (do- return ()- )--data IOChannelFlushMethodInfo-instance (signature ~ (m IOStatus), MonadIO m) => MethodInfo IOChannelFlushMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelFlush---- method IOChannel::get_buffer_condition--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOCondition")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_get_buffer_condition" g_io_channel_get_buffer_condition :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO CUInt---iOChannelGetBufferCondition ::- (MonadIO m) =>- IOChannel -- _obj- -> m [IOCondition] -- result-iOChannelGetBufferCondition _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_get_buffer_condition _obj'- let result' = wordToGFlags result- touchManagedPtr _obj- return result'--data IOChannelGetBufferConditionMethodInfo-instance (signature ~ (m [IOCondition]), MonadIO m) => MethodInfo IOChannelGetBufferConditionMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelGetBufferCondition---- method IOChannel::get_buffer_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_get_buffer_size" g_io_channel_get_buffer_size :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO Word64---iOChannelGetBufferSize ::- (MonadIO m) =>- IOChannel -- _obj- -> m Word64 -- result-iOChannelGetBufferSize _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_get_buffer_size _obj'- touchManagedPtr _obj- return result--data IOChannelGetBufferSizeMethodInfo-instance (signature ~ (m Word64), MonadIO m) => MethodInfo IOChannelGetBufferSizeMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelGetBufferSize---- method IOChannel::get_buffered--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_get_buffered" g_io_channel_get_buffered :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO CInt---iOChannelGetBuffered ::- (MonadIO m) =>- IOChannel -- _obj- -> m Bool -- result-iOChannelGetBuffered _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_get_buffered _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data IOChannelGetBufferedMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo IOChannelGetBufferedMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelGetBuffered---- method IOChannel::get_close_on_unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_get_close_on_unref" g_io_channel_get_close_on_unref :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO CInt---iOChannelGetCloseOnUnref ::- (MonadIO m) =>- IOChannel -- _obj- -> m Bool -- result-iOChannelGetCloseOnUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_get_close_on_unref _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data IOChannelGetCloseOnUnrefMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo IOChannelGetCloseOnUnrefMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelGetCloseOnUnref---- method IOChannel::get_encoding--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_get_encoding" g_io_channel_get_encoding :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO CString---iOChannelGetEncoding ::- (MonadIO m) =>- IOChannel -- _obj- -> m T.Text -- result-iOChannelGetEncoding _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_get_encoding _obj'- checkUnexpectedReturnNULL "g_io_channel_get_encoding" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data IOChannelGetEncodingMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo IOChannelGetEncodingMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelGetEncoding---- method IOChannel::get_flags--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOFlags")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_get_flags" g_io_channel_get_flags :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO CUInt---iOChannelGetFlags ::- (MonadIO m) =>- IOChannel -- _obj- -> m [IOFlags] -- result-iOChannelGetFlags _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_get_flags _obj'- let result' = wordToGFlags result- touchManagedPtr _obj- return result'--data IOChannelGetFlagsMethodInfo-instance (signature ~ (m [IOFlags]), MonadIO m) => MethodInfo IOChannelGetFlagsMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelGetFlags---- method IOChannel::get_line_term--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_get_line_term" g_io_channel_get_line_term :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Int32 -> -- length : TBasicType TInt- IO CString---iOChannelGetLineTerm ::- (MonadIO m) =>- IOChannel -- _obj- -> Int32 -- length_- -> m T.Text -- result-iOChannelGetLineTerm _obj length_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_get_line_term _obj' length_- checkUnexpectedReturnNULL "g_io_channel_get_line_term" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data IOChannelGetLineTermMethodInfo-instance (signature ~ (Int32 -> m T.Text), MonadIO m) => MethodInfo IOChannelGetLineTermMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelGetLineTerm---- method IOChannel::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_init" g_io_channel_init :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO ()---iOChannelInit ::- (MonadIO m) =>- IOChannel -- _obj- -> m () -- result-iOChannelInit _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_io_channel_init _obj'- touchManagedPtr _obj- return ()--data IOChannelInitMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo IOChannelInitMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelInit---- method IOChannel::read--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buf", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOError")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_read" g_io_channel_read :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CString -> -- buf : TBasicType TUTF8- Word64 -> -- count : TBasicType TUInt64- Word64 -> -- bytes_read : TBasicType TUInt64- IO CUInt--{-# DEPRECATED iOChannelRead ["(Since version 2.2)","Use g_io_channel_read_chars() instead."]#-}-iOChannelRead ::- (MonadIO m) =>- IOChannel -- _obj- -> T.Text -- buf- -> Word64 -- count- -> Word64 -- bytesRead- -> m IOError -- result-iOChannelRead _obj buf count bytesRead = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- buf' <- textToCString buf- result <- g_io_channel_read _obj' buf' count bytesRead- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- freeMem buf'- return result'--data IOChannelReadMethodInfo-instance (signature ~ (T.Text -> Word64 -> Word64 -> m IOError), MonadIO m) => MethodInfo IOChannelReadMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelRead---- method IOChannel::read_chars--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buf", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_read", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_read_chars" g_io_channel_read_chars :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Ptr Word8 -> -- buf : TCArray False (-1) 2 (TBasicType TUInt8)- Word64 -> -- count : TBasicType TUInt64- Ptr Word64 -> -- bytes_read : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelReadChars ::- (MonadIO m) =>- IOChannel -- _obj- -> ByteString -- buf- -> m (IOStatus,ByteString,Word64) -- result-iOChannelReadChars _obj buf = liftIO $ do- let count = fromIntegral $ B.length buf- let _obj' = unsafeManagedPtrGetPtr _obj- buf' <- packByteString buf- bytesRead <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_io_channel_read_chars _obj' buf' count bytesRead- let result' = (toEnum . fromIntegral) result- buf'' <- (unpackByteStringWithLength count) buf'- bytesRead' <- peek bytesRead- touchManagedPtr _obj- freeMem buf'- freeMem bytesRead- return (result', buf'', bytesRead')- ) (do- freeMem buf'- freeMem bytesRead- )--data IOChannelReadCharsMethodInfo-instance (signature ~ (ByteString -> m (IOStatus,ByteString,Word64)), MonadIO m) => MethodInfo IOChannelReadCharsMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelReadChars---- method IOChannel::read_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str_return", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "terminator_pos", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_read_line" g_io_channel_read_line :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Ptr CString -> -- str_return : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr Word64 -> -- terminator_pos : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelReadLine ::- (MonadIO m) =>- IOChannel -- _obj- -> m (IOStatus,T.Text,Word64,Word64) -- result-iOChannelReadLine _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- strReturn <- allocMem :: IO (Ptr CString)- length_ <- allocMem :: IO (Ptr Word64)- terminatorPos <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_io_channel_read_line _obj' strReturn length_ terminatorPos- let result' = (toEnum . fromIntegral) result- strReturn' <- peek strReturn- strReturn'' <- cstringToText strReturn'- freeMem strReturn'- length_' <- peek length_- terminatorPos' <- peek terminatorPos- touchManagedPtr _obj- freeMem strReturn- freeMem length_- freeMem terminatorPos- return (result', strReturn'', length_', terminatorPos')- ) (do- freeMem strReturn- freeMem length_- freeMem terminatorPos- )--data IOChannelReadLineMethodInfo-instance (signature ~ (m (IOStatus,T.Text,Word64,Word64)), MonadIO m) => MethodInfo IOChannelReadLineMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelReadLine---- method IOChannel::read_to_end--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str_return", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_read_to_end" g_io_channel_read_to_end :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Ptr (Ptr Word8) -> -- str_return : TCArray False (-1) 2 (TBasicType TUInt8)- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelReadToEnd ::- (MonadIO m) =>- IOChannel -- _obj- -> m (IOStatus,ByteString) -- result-iOChannelReadToEnd _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- strReturn <- allocMem :: IO (Ptr (Ptr Word8))- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_io_channel_read_to_end _obj' strReturn length_- length_' <- peek length_- let result' = (toEnum . fromIntegral) result- strReturn' <- peek strReturn- strReturn'' <- (unpackByteStringWithLength length_') strReturn'- freeMem strReturn'- touchManagedPtr _obj- freeMem strReturn- freeMem length_- return (result', strReturn'')- ) (do- freeMem strReturn- freeMem length_- )--data IOChannelReadToEndMethodInfo-instance (signature ~ (m (IOStatus,ByteString)), MonadIO m) => MethodInfo IOChannelReadToEndMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelReadToEnd---- method IOChannel::read_unichar--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "thechar", argType = TBasicType TUniChar, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_read_unichar" g_io_channel_read_unichar :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Ptr CInt -> -- thechar : TBasicType TUniChar- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelReadUnichar ::- (MonadIO m) =>- IOChannel -- _obj- -> m (IOStatus,Char) -- result-iOChannelReadUnichar _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- thechar <- allocMem :: IO (Ptr CInt)- onException (do- result <- propagateGError $ g_io_channel_read_unichar _obj' thechar- let result' = (toEnum . fromIntegral) result- thechar' <- peek thechar- let thechar'' = (chr . fromIntegral) thechar'- touchManagedPtr _obj- freeMem thechar- return (result', thechar'')- ) (do- freeMem thechar- )--data IOChannelReadUnicharMethodInfo-instance (signature ~ (m (IOStatus,Char)), MonadIO m) => MethodInfo IOChannelReadUnicharMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelReadUnichar---- method IOChannel::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOChannel")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_ref" g_io_channel_ref :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO (Ptr IOChannel)---iOChannelRef ::- (MonadIO m) =>- IOChannel -- _obj- -> m IOChannel -- result-iOChannelRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_ref _obj'- checkUnexpectedReturnNULL "g_io_channel_ref" result- result' <- (wrapBoxed IOChannel) result- touchManagedPtr _obj- return result'--data IOChannelRefMethodInfo-instance (signature ~ (m IOChannel), MonadIO m) => MethodInfo IOChannelRefMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelRef---- method IOChannel::seek--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "offset", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type", argType = TInterface "GLib" "SeekType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOError")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_seek" g_io_channel_seek :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Int64 -> -- offset : TBasicType TInt64- CUInt -> -- type : TInterface "GLib" "SeekType"- IO CUInt--{-# DEPRECATED iOChannelSeek ["(Since version 2.2)","Use g_io_channel_seek_position() instead."]#-}-iOChannelSeek ::- (MonadIO m) =>- IOChannel -- _obj- -> Int64 -- offset- -> SeekType -- type_- -> m IOError -- result-iOChannelSeek _obj offset type_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let type_' = (fromIntegral . fromEnum) type_- result <- g_io_channel_seek _obj' offset type_'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'--data IOChannelSeekMethodInfo-instance (signature ~ (Int64 -> SeekType -> m IOError), MonadIO m) => MethodInfo IOChannelSeekMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSeek---- method IOChannel::seek_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "offset", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type", argType = TInterface "GLib" "SeekType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_seek_position" g_io_channel_seek_position :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Int64 -> -- offset : TBasicType TInt64- CUInt -> -- type : TInterface "GLib" "SeekType"- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelSeekPosition ::- (MonadIO m) =>- IOChannel -- _obj- -> Int64 -- offset- -> SeekType -- type_- -> m IOStatus -- result-iOChannelSeekPosition _obj offset type_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let type_' = (fromIntegral . fromEnum) type_- onException (do- result <- propagateGError $ g_io_channel_seek_position _obj' offset type_'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'- ) (do- return ()- )--data IOChannelSeekPositionMethodInfo-instance (signature ~ (Int64 -> SeekType -> m IOStatus), MonadIO m) => MethodInfo IOChannelSeekPositionMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSeekPosition---- method IOChannel::set_buffer_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_set_buffer_size" g_io_channel_set_buffer_size :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Word64 -> -- size : TBasicType TUInt64- IO ()---iOChannelSetBufferSize ::- (MonadIO m) =>- IOChannel -- _obj- -> Word64 -- size- -> m () -- result-iOChannelSetBufferSize _obj size = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_io_channel_set_buffer_size _obj' size- touchManagedPtr _obj- return ()--data IOChannelSetBufferSizeMethodInfo-instance (signature ~ (Word64 -> m ()), MonadIO m) => MethodInfo IOChannelSetBufferSizeMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSetBufferSize---- method IOChannel::set_buffered--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buffered", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_set_buffered" g_io_channel_set_buffered :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CInt -> -- buffered : TBasicType TBoolean- IO ()---iOChannelSetBuffered ::- (MonadIO m) =>- IOChannel -- _obj- -> Bool -- buffered- -> m () -- result-iOChannelSetBuffered _obj buffered = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let buffered' = (fromIntegral . fromEnum) buffered- g_io_channel_set_buffered _obj' buffered'- touchManagedPtr _obj- return ()--data IOChannelSetBufferedMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo IOChannelSetBufferedMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSetBuffered---- method IOChannel::set_close_on_unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "do_close", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_set_close_on_unref" g_io_channel_set_close_on_unref :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CInt -> -- do_close : TBasicType TBoolean- IO ()---iOChannelSetCloseOnUnref ::- (MonadIO m) =>- IOChannel -- _obj- -> Bool -- doClose- -> m () -- result-iOChannelSetCloseOnUnref _obj doClose = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let doClose' = (fromIntegral . fromEnum) doClose- g_io_channel_set_close_on_unref _obj' doClose'- touchManagedPtr _obj- return ()--data IOChannelSetCloseOnUnrefMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo IOChannelSetCloseOnUnrefMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSetCloseOnUnref---- method IOChannel::set_encoding--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "encoding", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_set_encoding" g_io_channel_set_encoding :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CString -> -- encoding : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelSetEncoding ::- (MonadIO m) =>- IOChannel -- _obj- -> Maybe (T.Text) -- encoding- -> m IOStatus -- result-iOChannelSetEncoding _obj encoding = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeEncoding <- case encoding of- Nothing -> return nullPtr- Just jEncoding -> do- jEncoding' <- textToCString jEncoding- return jEncoding'- onException (do- result <- propagateGError $ g_io_channel_set_encoding _obj' maybeEncoding- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- freeMem maybeEncoding- return result'- ) (do- freeMem maybeEncoding- )--data IOChannelSetEncodingMethodInfo-instance (signature ~ (Maybe (T.Text) -> m IOStatus), MonadIO m) => MethodInfo IOChannelSetEncodingMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSetEncoding---- method IOChannel::set_flags--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "IOFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_set_flags" g_io_channel_set_flags :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CUInt -> -- flags : TInterface "GLib" "IOFlags"- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelSetFlags ::- (MonadIO m) =>- IOChannel -- _obj- -> [IOFlags] -- flags- -> m IOStatus -- result-iOChannelSetFlags _obj flags = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let flags' = gflagsToWord flags- onException (do- result <- propagateGError $ g_io_channel_set_flags _obj' flags'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'- ) (do- return ()- )--data IOChannelSetFlagsMethodInfo-instance (signature ~ ([IOFlags] -> m IOStatus), MonadIO m) => MethodInfo IOChannelSetFlagsMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSetFlags---- method IOChannel::set_line_term--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line_term", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_set_line_term" g_io_channel_set_line_term :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CString -> -- line_term : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- IO ()---iOChannelSetLineTerm ::- (MonadIO m) =>- IOChannel -- _obj- -> Maybe (T.Text) -- lineTerm- -> Int32 -- length_- -> m () -- result-iOChannelSetLineTerm _obj lineTerm length_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeLineTerm <- case lineTerm of- Nothing -> return nullPtr- Just jLineTerm -> do- jLineTerm' <- textToCString jLineTerm- return jLineTerm'- g_io_channel_set_line_term _obj' maybeLineTerm length_- touchManagedPtr _obj- freeMem maybeLineTerm- return ()--data IOChannelSetLineTermMethodInfo-instance (signature ~ (Maybe (T.Text) -> Int32 -> m ()), MonadIO m) => MethodInfo IOChannelSetLineTermMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelSetLineTerm---- method IOChannel::shutdown--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flush", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_shutdown" g_io_channel_shutdown :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CInt -> -- flush : TBasicType TBoolean- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelShutdown ::- (MonadIO m) =>- IOChannel -- _obj- -> Bool -- flush- -> m IOStatus -- result-iOChannelShutdown _obj flush = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let flush' = (fromIntegral . fromEnum) flush- onException (do- result <- propagateGError $ g_io_channel_shutdown _obj' flush'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'- ) (do- return ()- )--data IOChannelShutdownMethodInfo-instance (signature ~ (Bool -> m IOStatus), MonadIO m) => MethodInfo IOChannelShutdownMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelShutdown---- method IOChannel::unix_get_fd--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_unix_get_fd" g_io_channel_unix_get_fd :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO Int32---iOChannelUnixGetFd ::- (MonadIO m) =>- IOChannel -- _obj- -> m Int32 -- result-iOChannelUnixGetFd _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_io_channel_unix_get_fd _obj'- touchManagedPtr _obj- return result--data IOChannelUnixGetFdMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo IOChannelUnixGetFdMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelUnixGetFd---- method IOChannel::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_unref" g_io_channel_unref :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- IO ()---iOChannelUnref ::- (MonadIO m) =>- IOChannel -- _obj- -> m () -- result-iOChannelUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_io_channel_unref _obj'- touchManagedPtr _obj- return ()--data IOChannelUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo IOChannelUnrefMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelUnref---- method IOChannel::write--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buf", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "count", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOError")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_write" g_io_channel_write :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CString -> -- buf : TBasicType TUTF8- Word64 -> -- count : TBasicType TUInt64- Word64 -> -- bytes_written : TBasicType TUInt64- IO CUInt--{-# DEPRECATED iOChannelWrite ["(Since version 2.2)","Use g_io_channel_write_chars() instead."]#-}-iOChannelWrite ::- (MonadIO m) =>- IOChannel -- _obj- -> T.Text -- buf- -> Word64 -- count- -> Word64 -- bytesWritten- -> m IOError -- result-iOChannelWrite _obj buf count bytesWritten = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- buf' <- textToCString buf- result <- g_io_channel_write _obj' buf' count bytesWritten- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- freeMem buf'- return result'--data IOChannelWriteMethodInfo-instance (signature ~ (T.Text -> Word64 -> Word64 -> m IOError), MonadIO m) => MethodInfo IOChannelWriteMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelWrite---- method IOChannel::write_chars--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "buf", argType = TCArray False (-1) (-1) (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "count", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes_written", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_write_chars" g_io_channel_write_chars :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- Ptr Word8 -> -- buf : TCArray False (-1) (-1) (TBasicType TUInt8)- Int64 -> -- count : TBasicType TInt64- Ptr Word64 -> -- bytes_written : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelWriteChars ::- (MonadIO m) =>- IOChannel -- _obj- -> Ptr Word8 -- buf- -> Int64 -- count- -> m (IOStatus,Word64) -- result-iOChannelWriteChars _obj buf count = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- bytesWritten <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_io_channel_write_chars _obj' buf count bytesWritten- let result' = (toEnum . fromIntegral) result- bytesWritten' <- peek bytesWritten- touchManagedPtr _obj- freeMem bytesWritten- return (result', bytesWritten')- ) (do- freeMem bytesWritten- )--data IOChannelWriteCharsMethodInfo-instance (signature ~ (Ptr Word8 -> Int64 -> m (IOStatus,Word64)), MonadIO m) => MethodInfo IOChannelWriteCharsMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelWriteChars---- method IOChannel::write_unichar--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "IOChannel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "thechar", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOStatus")--- throws : True--- Skip return : False--foreign import ccall "g_io_channel_write_unichar" g_io_channel_write_unichar :: - Ptr IOChannel -> -- _obj : TInterface "GLib" "IOChannel"- CInt -> -- thechar : TBasicType TUniChar- Ptr (Ptr GError) -> -- error- IO CUInt---iOChannelWriteUnichar ::- (MonadIO m) =>- IOChannel -- _obj- -> Char -- thechar- -> m IOStatus -- result-iOChannelWriteUnichar _obj thechar = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let thechar' = (fromIntegral . ord) thechar- onException (do- result <- propagateGError $ g_io_channel_write_unichar _obj' thechar'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'- ) (do- return ()- )--data IOChannelWriteUnicharMethodInfo-instance (signature ~ (Char -> m IOStatus), MonadIO m) => MethodInfo IOChannelWriteUnicharMethodInfo IOChannel signature where- overloadedMethod _ = iOChannelWriteUnichar---- method IOChannel::error_from_errno--- method type : MemberFunction--- Args : [Arg {argCName = "en", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOChannelError")--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_error_from_errno" g_io_channel_error_from_errno :: - Int32 -> -- en : TBasicType TInt- IO CUInt---iOChannelErrorFromErrno ::- (MonadIO m) =>- Int32 -- en- -> m IOChannelError -- result-iOChannelErrorFromErrno en = liftIO $ do- result <- g_io_channel_error_from_errno en- let result' = (toEnum . fromIntegral) result- return result'---- method IOChannel::error_quark--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_io_channel_error_quark" g_io_channel_error_quark :: - IO Word32---iOChannelErrorQuark ::- (MonadIO m) =>- m Word32 -- result-iOChannelErrorQuark = liftIO $ do- result <- g_io_channel_error_quark- return result--type family ResolveIOChannelMethod (t :: Symbol) (o :: *) :: * where- ResolveIOChannelMethod "close" o = IOChannelCloseMethodInfo- ResolveIOChannelMethod "flush" o = IOChannelFlushMethodInfo- ResolveIOChannelMethod "init" o = IOChannelInitMethodInfo- ResolveIOChannelMethod "read" o = IOChannelReadMethodInfo- ResolveIOChannelMethod "readChars" o = IOChannelReadCharsMethodInfo- ResolveIOChannelMethod "readLine" o = IOChannelReadLineMethodInfo- ResolveIOChannelMethod "readToEnd" o = IOChannelReadToEndMethodInfo- ResolveIOChannelMethod "readUnichar" o = IOChannelReadUnicharMethodInfo- ResolveIOChannelMethod "ref" o = IOChannelRefMethodInfo- ResolveIOChannelMethod "seek" o = IOChannelSeekMethodInfo- ResolveIOChannelMethod "seekPosition" o = IOChannelSeekPositionMethodInfo- ResolveIOChannelMethod "shutdown" o = IOChannelShutdownMethodInfo- ResolveIOChannelMethod "unixGetFd" o = IOChannelUnixGetFdMethodInfo- ResolveIOChannelMethod "unref" o = IOChannelUnrefMethodInfo- ResolveIOChannelMethod "write" o = IOChannelWriteMethodInfo- ResolveIOChannelMethod "writeChars" o = IOChannelWriteCharsMethodInfo- ResolveIOChannelMethod "writeUnichar" o = IOChannelWriteUnicharMethodInfo- ResolveIOChannelMethod "getBufferCondition" o = IOChannelGetBufferConditionMethodInfo- ResolveIOChannelMethod "getBufferSize" o = IOChannelGetBufferSizeMethodInfo- ResolveIOChannelMethod "getBuffered" o = IOChannelGetBufferedMethodInfo- ResolveIOChannelMethod "getCloseOnUnref" o = IOChannelGetCloseOnUnrefMethodInfo- ResolveIOChannelMethod "getEncoding" o = IOChannelGetEncodingMethodInfo- ResolveIOChannelMethod "getFlags" o = IOChannelGetFlagsMethodInfo- ResolveIOChannelMethod "getLineTerm" o = IOChannelGetLineTermMethodInfo- ResolveIOChannelMethod "setBufferSize" o = IOChannelSetBufferSizeMethodInfo- ResolveIOChannelMethod "setBuffered" o = IOChannelSetBufferedMethodInfo- ResolveIOChannelMethod "setCloseOnUnref" o = IOChannelSetCloseOnUnrefMethodInfo- ResolveIOChannelMethod "setEncoding" o = IOChannelSetEncodingMethodInfo- ResolveIOChannelMethod "setFlags" o = IOChannelSetFlagsMethodInfo- ResolveIOChannelMethod "setLineTerm" o = IOChannelSetLineTermMethodInfo- ResolveIOChannelMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveIOChannelMethod t IOChannel, MethodInfo info IOChannel p) => IsLabelProxy t (IOChannel -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveIOChannelMethod t IOChannel, MethodInfo info IOChannel p) => IsLabel t (IOChannel -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/IOChannel.hs-boot
@@ -1,41 +0,0 @@-module GI.GLib.Structs.IOChannel where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype IOChannel = IOChannel (ForeignPtr IOChannel)-instance BoxedObject IOChannel where-data IOChannelCloseMethodInfo-data IOChannelFlushMethodInfo-data IOChannelGetBufferConditionMethodInfo-data IOChannelGetBufferSizeMethodInfo-data IOChannelGetBufferedMethodInfo-data IOChannelGetCloseOnUnrefMethodInfo-data IOChannelGetEncodingMethodInfo-data IOChannelGetFlagsMethodInfo-data IOChannelGetLineTermMethodInfo-data IOChannelInitMethodInfo-data IOChannelReadMethodInfo-data IOChannelReadCharsMethodInfo-data IOChannelReadLineMethodInfo-data IOChannelReadToEndMethodInfo-data IOChannelReadUnicharMethodInfo-data IOChannelRefMethodInfo-data IOChannelSeekMethodInfo-data IOChannelSeekPositionMethodInfo-data IOChannelSetBufferSizeMethodInfo-data IOChannelSetBufferedMethodInfo-data IOChannelSetCloseOnUnrefMethodInfo-data IOChannelSetEncodingMethodInfo-data IOChannelSetFlagsMethodInfo-data IOChannelSetLineTermMethodInfo-data IOChannelShutdownMethodInfo-data IOChannelUnixGetFdMethodInfo-data IOChannelUnrefMethodInfo-data IOChannelWriteMethodInfo-data IOChannelWriteCharsMethodInfo-data IOChannelWriteUnicharMethodInfo
− GI/GLib/Structs/IOFuncs.hs
@@ -1,76 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A table of functions used to handle different types of #GIOChannel-in a generic way.--}--module GI.GLib.Structs.IOFuncs- ( ---- * Exported types- IOFuncs(..) ,- newZeroIOFuncs ,- noIOFuncs ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype IOFuncs = IOFuncs (ForeignPtr IOFuncs)-instance WrappedPtr IOFuncs where- wrappedPtrCalloc = callocBytes 64- wrappedPtrCopy = copyPtr 64- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `IOFuncs` struct initialized to zero.-newZeroIOFuncs :: MonadIO m => m IOFuncs-newZeroIOFuncs = liftIO $ wrappedPtrCalloc >>= wrapPtr IOFuncs--instance tag ~ 'AttrSet => Constructible IOFuncs tag where- new _ attrs = do- o <- newZeroIOFuncs- GI.Attributes.set o attrs- return o---noIOFuncs :: Maybe IOFuncs-noIOFuncs = Nothing---- XXX Skipped attribute for "IOFuncs:io_read" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "IOFuncs:io_write" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "IOFuncs:io_seek" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "IOFuncs:io_close" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "IOFuncs:io_create_watch" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "IOFuncs:io_free" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "IOFuncs:io_set_flags" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "IOFuncs:io_get_flags" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--type instance AttributeList IOFuncs = IOFuncsAttributeList-type IOFuncsAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveIOFuncsMethod (t :: Symbol) (o :: *) :: * where- ResolveIOFuncsMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveIOFuncsMethod t IOFuncs, MethodInfo info IOFuncs p) => IsLabelProxy t (IOFuncs -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveIOFuncsMethod t IOFuncs, MethodInfo info IOFuncs p) => IsLabel t (IOFuncs -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/IOFuncs.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.IOFuncs where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype IOFuncs = IOFuncs (ForeignPtr IOFuncs)-instance WrappedPtr IOFuncs where
− GI/GLib/Structs/KeyFile.hs
@@ -1,2168 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GKeyFile struct contains only private data-and should not be accessed directly.--}--module GI.GLib.Structs.KeyFile- ( ---- * Exported types- KeyFile(..) ,- noKeyFile ,--- -- * Methods--- ** keyFileErrorQuark- keyFileErrorQuark ,----- ** keyFileGetBoolean- KeyFileGetBooleanMethodInfo ,- keyFileGetBoolean ,----- ** keyFileGetBooleanList- KeyFileGetBooleanListMethodInfo ,- keyFileGetBooleanList ,----- ** keyFileGetComment- KeyFileGetCommentMethodInfo ,- keyFileGetComment ,----- ** keyFileGetDouble- KeyFileGetDoubleMethodInfo ,- keyFileGetDouble ,----- ** keyFileGetDoubleList- KeyFileGetDoubleListMethodInfo ,- keyFileGetDoubleList ,----- ** keyFileGetGroups- KeyFileGetGroupsMethodInfo ,- keyFileGetGroups ,----- ** keyFileGetInt64- KeyFileGetInt64MethodInfo ,- keyFileGetInt64 ,----- ** keyFileGetInteger- KeyFileGetIntegerMethodInfo ,- keyFileGetInteger ,----- ** keyFileGetIntegerList- KeyFileGetIntegerListMethodInfo ,- keyFileGetIntegerList ,----- ** keyFileGetKeys- KeyFileGetKeysMethodInfo ,- keyFileGetKeys ,----- ** keyFileGetLocaleString- KeyFileGetLocaleStringMethodInfo ,- keyFileGetLocaleString ,----- ** keyFileGetLocaleStringList- KeyFileGetLocaleStringListMethodInfo ,- keyFileGetLocaleStringList ,----- ** keyFileGetStartGroup- KeyFileGetStartGroupMethodInfo ,- keyFileGetStartGroup ,----- ** keyFileGetString- KeyFileGetStringMethodInfo ,- keyFileGetString ,----- ** keyFileGetStringList- KeyFileGetStringListMethodInfo ,- keyFileGetStringList ,----- ** keyFileGetUint64- KeyFileGetUint64MethodInfo ,- keyFileGetUint64 ,----- ** keyFileGetValue- KeyFileGetValueMethodInfo ,- keyFileGetValue ,----- ** keyFileHasGroup- KeyFileHasGroupMethodInfo ,- keyFileHasGroup ,----- ** keyFileLoadFromData- KeyFileLoadFromDataMethodInfo ,- keyFileLoadFromData ,----- ** keyFileLoadFromDataDirs- KeyFileLoadFromDataDirsMethodInfo ,- keyFileLoadFromDataDirs ,----- ** keyFileLoadFromDirs- KeyFileLoadFromDirsMethodInfo ,- keyFileLoadFromDirs ,----- ** keyFileLoadFromFile- KeyFileLoadFromFileMethodInfo ,- keyFileLoadFromFile ,----- ** keyFileNew- keyFileNew ,----- ** keyFileRemoveComment- KeyFileRemoveCommentMethodInfo ,- keyFileRemoveComment ,----- ** keyFileRemoveGroup- KeyFileRemoveGroupMethodInfo ,- keyFileRemoveGroup ,----- ** keyFileRemoveKey- KeyFileRemoveKeyMethodInfo ,- keyFileRemoveKey ,----- ** keyFileSaveToFile- KeyFileSaveToFileMethodInfo ,- keyFileSaveToFile ,----- ** keyFileSetBoolean- KeyFileSetBooleanMethodInfo ,- keyFileSetBoolean ,----- ** keyFileSetBooleanList- KeyFileSetBooleanListMethodInfo ,- keyFileSetBooleanList ,----- ** keyFileSetComment- KeyFileSetCommentMethodInfo ,- keyFileSetComment ,----- ** keyFileSetDouble- KeyFileSetDoubleMethodInfo ,- keyFileSetDouble ,----- ** keyFileSetDoubleList- KeyFileSetDoubleListMethodInfo ,- keyFileSetDoubleList ,----- ** keyFileSetInt64- KeyFileSetInt64MethodInfo ,- keyFileSetInt64 ,----- ** keyFileSetInteger- KeyFileSetIntegerMethodInfo ,- keyFileSetInteger ,----- ** keyFileSetIntegerList- KeyFileSetIntegerListMethodInfo ,- keyFileSetIntegerList ,----- ** keyFileSetListSeparator- KeyFileSetListSeparatorMethodInfo ,- keyFileSetListSeparator ,----- ** keyFileSetLocaleString- KeyFileSetLocaleStringMethodInfo ,- keyFileSetLocaleString ,----- ** keyFileSetLocaleStringList- KeyFileSetLocaleStringListMethodInfo ,- keyFileSetLocaleStringList ,----- ** keyFileSetString- KeyFileSetStringMethodInfo ,- keyFileSetString ,----- ** keyFileSetStringList- KeyFileSetStringListMethodInfo ,- keyFileSetStringList ,----- ** keyFileSetUint64- KeyFileSetUint64MethodInfo ,- keyFileSetUint64 ,----- ** keyFileSetValue- KeyFileSetValueMethodInfo ,- keyFileSetValue ,----- ** keyFileToData- KeyFileToDataMethodInfo ,- keyFileToData ,----- ** keyFileUnref- KeyFileUnrefMethodInfo ,- keyFileUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype KeyFile = KeyFile (ForeignPtr KeyFile)-foreign import ccall "g_key_file_get_type" c_g_key_file_get_type :: - IO GType--instance BoxedObject KeyFile where- boxedType _ = c_g_key_file_get_type--noKeyFile :: Maybe KeyFile-noKeyFile = Nothing---type instance AttributeList KeyFile = KeyFileAttributeList-type KeyFileAttributeList = ('[ ] :: [(Symbol, *)])---- method KeyFile::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "KeyFile")--- throws : False--- Skip return : False--foreign import ccall "g_key_file_new" g_key_file_new :: - IO (Ptr KeyFile)---keyFileNew ::- (MonadIO m) =>- m KeyFile -- result-keyFileNew = liftIO $ do- result <- g_key_file_new- checkUnexpectedReturnNULL "g_key_file_new" result- result' <- (wrapBoxed KeyFile) result- return result'---- method KeyFile::get_boolean--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_boolean" g_key_file_get_boolean :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---keyFileGetBoolean ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m () -- result-keyFileGetBoolean _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- _ <- propagateGError $ g_key_file_get_boolean _obj' groupName' key'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return ()- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileGetBooleanMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo KeyFileGetBooleanMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetBoolean---- method KeyFile::get_boolean_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 3 (TBasicType TBoolean))--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_boolean_list" g_key_file_get_boolean_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr CInt)---keyFileGetBooleanList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m [Bool] -- result-keyFileGetBooleanList _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_key_file_get_boolean_list _obj' groupName' key' length_- length_' <- peek length_- checkUnexpectedReturnNULL "g_key_file_get_boolean_list" result- result' <- (unpackMapStorableArrayWithLength (/= 0) length_') result- freeMem result- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem length_- return result'- ) (do- freeMem groupName'- freeMem key'- freeMem length_- )--data KeyFileGetBooleanListMethodInfo-instance (signature ~ (T.Text -> T.Text -> m [Bool]), MonadIO m) => MethodInfo KeyFileGetBooleanListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetBooleanList---- method KeyFile::get_comment--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_comment" g_key_file_get_comment :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---keyFileGetComment ::- (MonadIO m) =>- KeyFile -- _obj- -> Maybe (T.Text) -- groupName- -> T.Text -- key- -> m T.Text -- result-keyFileGetComment _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeGroupName <- case groupName of- Nothing -> return nullPtr- Just jGroupName -> do- jGroupName' <- textToCString jGroupName- return jGroupName'- key' <- textToCString key- onException (do- result <- propagateGError $ g_key_file_get_comment _obj' maybeGroupName key'- checkUnexpectedReturnNULL "g_key_file_get_comment" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem maybeGroupName- freeMem key'- return result'- ) (do- freeMem maybeGroupName- freeMem key'- )--data KeyFileGetCommentMethodInfo-instance (signature ~ (Maybe (T.Text) -> T.Text -> m T.Text), MonadIO m) => MethodInfo KeyFileGetCommentMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetComment---- method KeyFile::get_double--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_double" g_key_file_get_double :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CDouble---keyFileGetDouble ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m Double -- result-keyFileGetDouble _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- result <- propagateGError $ g_key_file_get_double _obj' groupName' key'- let result' = realToFrac result- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return result'- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileGetDoubleMethodInfo-instance (signature ~ (T.Text -> T.Text -> m Double), MonadIO m) => MethodInfo KeyFileGetDoubleMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetDouble---- method KeyFile::get_double_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 3 (TBasicType TDouble))--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_double_list" g_key_file_get_double_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr CDouble)---keyFileGetDoubleList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m [Double] -- result-keyFileGetDoubleList _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_key_file_get_double_list _obj' groupName' key' length_- length_' <- peek length_- checkUnexpectedReturnNULL "g_key_file_get_double_list" result- result' <- (unpackMapStorableArrayWithLength realToFrac length_') result- freeMem result- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem length_- return result'- ) (do- freeMem groupName'- freeMem key'- freeMem length_- )--data KeyFileGetDoubleListMethodInfo-instance (signature ~ (T.Text -> T.Text -> m [Double]), MonadIO m) => MethodInfo KeyFileGetDoubleListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetDoubleList---- method KeyFile::get_groups--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_key_file_get_groups" g_key_file_get_groups :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- Ptr Word64 -> -- length : TBasicType TUInt64- IO (Ptr CString)---keyFileGetGroups ::- (MonadIO m) =>- KeyFile -- _obj- -> m ([T.Text],Word64) -- result-keyFileGetGroups _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- length_ <- allocMem :: IO (Ptr Word64)- result <- g_key_file_get_groups _obj' length_- checkUnexpectedReturnNULL "g_key_file_get_groups" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- length_' <- peek length_- touchManagedPtr _obj- freeMem length_- return (result', length_')--data KeyFileGetGroupsMethodInfo-instance (signature ~ (m ([T.Text],Word64)), MonadIO m) => MethodInfo KeyFileGetGroupsMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetGroups---- method KeyFile::get_int64--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_int64" g_key_file_get_int64 :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO Int64---keyFileGetInt64 ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m Int64 -- result-keyFileGetInt64 _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- result <- propagateGError $ g_key_file_get_int64 _obj' groupName' key'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return result- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileGetInt64MethodInfo-instance (signature ~ (T.Text -> T.Text -> m Int64), MonadIO m) => MethodInfo KeyFileGetInt64MethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetInt64---- method KeyFile::get_integer--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_integer" g_key_file_get_integer :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO Int32---keyFileGetInteger ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m Int32 -- result-keyFileGetInteger _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- result <- propagateGError $ g_key_file_get_integer _obj' groupName' key'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return result- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileGetIntegerMethodInfo-instance (signature ~ (T.Text -> T.Text -> m Int32), MonadIO m) => MethodInfo KeyFileGetIntegerMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetInteger---- method KeyFile::get_integer_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 3 (TBasicType TInt))--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_integer_list" g_key_file_get_integer_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr Int32)---keyFileGetIntegerList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m [Int32] -- result-keyFileGetIntegerList _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_key_file_get_integer_list _obj' groupName' key' length_- length_' <- peek length_- checkUnexpectedReturnNULL "g_key_file_get_integer_list" result- result' <- (unpackStorableArrayWithLength length_') result- freeMem result- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem length_- return result'- ) (do- freeMem groupName'- freeMem key'- freeMem length_- )--data KeyFileGetIntegerListMethodInfo-instance (signature ~ (T.Text -> T.Text -> m [Int32]), MonadIO m) => MethodInfo KeyFileGetIntegerListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetIntegerList---- method KeyFile::get_keys--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_keys" g_key_file_get_keys :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr CString)---keyFileGetKeys ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> m ([T.Text],Word64) -- result-keyFileGetKeys _obj groupName = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_key_file_get_keys _obj' groupName' length_- checkUnexpectedReturnNULL "g_key_file_get_keys" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- length_' <- peek length_- touchManagedPtr _obj- freeMem groupName'- freeMem length_- return (result', length_')- ) (do- freeMem groupName'- freeMem length_- )--data KeyFileGetKeysMethodInfo-instance (signature ~ (T.Text -> m ([T.Text],Word64)), MonadIO m) => MethodInfo KeyFileGetKeysMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetKeys---- method KeyFile::get_locale_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "locale", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_locale_string" g_key_file_get_locale_string :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CString -> -- locale : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---keyFileGetLocaleString ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> Maybe (T.Text) -- locale- -> m T.Text -- result-keyFileGetLocaleString _obj groupName key locale = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- maybeLocale <- case locale of- Nothing -> return nullPtr- Just jLocale -> do- jLocale' <- textToCString jLocale- return jLocale'- onException (do- result <- propagateGError $ g_key_file_get_locale_string _obj' groupName' key' maybeLocale- checkUnexpectedReturnNULL "g_key_file_get_locale_string" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem maybeLocale- return result'- ) (do- freeMem groupName'- freeMem key'- freeMem maybeLocale- )--data KeyFileGetLocaleStringMethodInfo-instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> m T.Text), MonadIO m) => MethodInfo KeyFileGetLocaleStringMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetLocaleString---- method KeyFile::get_locale_string_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "locale", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TCArray True (-1) 4 (TBasicType TUTF8))--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_locale_string_list" g_key_file_get_locale_string_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CString -> -- locale : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr CString)---keyFileGetLocaleStringList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> Maybe (T.Text) -- locale- -> m ([T.Text],Word64) -- result-keyFileGetLocaleStringList _obj groupName key locale = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- maybeLocale <- case locale of- Nothing -> return nullPtr- Just jLocale -> do- jLocale' <- textToCString jLocale- return jLocale'- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_key_file_get_locale_string_list _obj' groupName' key' maybeLocale length_- checkUnexpectedReturnNULL "g_key_file_get_locale_string_list" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- length_' <- peek length_- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem maybeLocale- freeMem length_- return (result', length_')- ) (do- freeMem groupName'- freeMem key'- freeMem maybeLocale- freeMem length_- )--data KeyFileGetLocaleStringListMethodInfo-instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> m ([T.Text],Word64)), MonadIO m) => MethodInfo KeyFileGetLocaleStringListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetLocaleStringList---- method KeyFile::get_start_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_key_file_get_start_group" g_key_file_get_start_group :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- IO CString---keyFileGetStartGroup ::- (MonadIO m) =>- KeyFile -- _obj- -> m T.Text -- result-keyFileGetStartGroup _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_key_file_get_start_group _obj'- checkUnexpectedReturnNULL "g_key_file_get_start_group" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- return result'--data KeyFileGetStartGroupMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo KeyFileGetStartGroupMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetStartGroup---- method KeyFile::get_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_string" g_key_file_get_string :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---keyFileGetString ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m T.Text -- result-keyFileGetString _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- result <- propagateGError $ g_key_file_get_string _obj' groupName' key'- checkUnexpectedReturnNULL "g_key_file_get_string" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return result'- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileGetStringMethodInfo-instance (signature ~ (T.Text -> T.Text -> m T.Text), MonadIO m) => MethodInfo KeyFileGetStringMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetString---- method KeyFile::get_string_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TCArray True (-1) 3 (TBasicType TUTF8))--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_string_list" g_key_file_get_string_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO (Ptr CString)---keyFileGetStringList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m ([T.Text],Word64) -- result-keyFileGetStringList _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_key_file_get_string_list _obj' groupName' key' length_- checkUnexpectedReturnNULL "g_key_file_get_string_list" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- length_' <- peek length_- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem length_- return (result', length_')- ) (do- freeMem groupName'- freeMem key'- freeMem length_- )--data KeyFileGetStringListMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ([T.Text],Word64)), MonadIO m) => MethodInfo KeyFileGetStringListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetStringList---- method KeyFile::get_uint64--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_uint64" g_key_file_get_uint64 :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO Word64---keyFileGetUint64 ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m Word64 -- result-keyFileGetUint64 _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- result <- propagateGError $ g_key_file_get_uint64 _obj' groupName' key'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return result- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileGetUint64MethodInfo-instance (signature ~ (T.Text -> T.Text -> m Word64), MonadIO m) => MethodInfo KeyFileGetUint64MethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetUint64---- method KeyFile::get_value--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_get_value" g_key_file_get_value :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---keyFileGetValue ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m T.Text -- result-keyFileGetValue _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- result <- propagateGError $ g_key_file_get_value _obj' groupName' key'- checkUnexpectedReturnNULL "g_key_file_get_value" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return result'- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileGetValueMethodInfo-instance (signature ~ (T.Text -> T.Text -> m T.Text), MonadIO m) => MethodInfo KeyFileGetValueMethodInfo KeyFile signature where- overloadedMethod _ = keyFileGetValue---- method KeyFile::has_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_key_file_has_group" g_key_file_has_group :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- IO CInt---keyFileHasGroup ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> m Bool -- result-keyFileHasGroup _obj groupName = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- result <- g_key_file_has_group _obj' groupName'- let result' = (/= 0) result- touchManagedPtr _obj- freeMem groupName'- return result'--data KeyFileHasGroupMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m) => MethodInfo KeyFileHasGroupMethodInfo KeyFile signature where- overloadedMethod _ = keyFileHasGroup---- method KeyFile::load_from_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "KeyFileFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_load_from_data" g_key_file_load_from_data :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- data : TBasicType TUTF8- Word64 -> -- length : TBasicType TUInt64- CUInt -> -- flags : TInterface "GLib" "KeyFileFlags"- Ptr (Ptr GError) -> -- error- IO CInt---keyFileLoadFromData ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- data_- -> Word64 -- length_- -> [KeyFileFlags] -- flags- -> m () -- result-keyFileLoadFromData _obj data_ length_ flags = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- data_' <- textToCString data_- let flags' = gflagsToWord flags- onException (do- _ <- propagateGError $ g_key_file_load_from_data _obj' data_' length_ flags'- touchManagedPtr _obj- freeMem data_'- return ()- ) (do- freeMem data_'- )--data KeyFileLoadFromDataMethodInfo-instance (signature ~ (T.Text -> Word64 -> [KeyFileFlags] -> m ()), MonadIO m) => MethodInfo KeyFileLoadFromDataMethodInfo KeyFile signature where- overloadedMethod _ = keyFileLoadFromData---- method KeyFile::load_from_data_dirs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "full_path", argType = TBasicType TFileName, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "flags", argType = TInterface "GLib" "KeyFileFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_load_from_data_dirs" g_key_file_load_from_data_dirs :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- file : TBasicType TFileName- Ptr CString -> -- full_path : TBasicType TFileName- CUInt -> -- flags : TInterface "GLib" "KeyFileFlags"- Ptr (Ptr GError) -> -- error- IO CInt---keyFileLoadFromDataDirs ::- (MonadIO m) =>- KeyFile -- _obj- -> [Char] -- file- -> [KeyFileFlags] -- flags- -> m ([Char]) -- result-keyFileLoadFromDataDirs _obj file flags = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- file' <- stringToCString file- fullPath <- allocMem :: IO (Ptr CString)- let flags' = gflagsToWord flags- onException (do- _ <- propagateGError $ g_key_file_load_from_data_dirs _obj' file' fullPath flags'- fullPath' <- peek fullPath- fullPath'' <- cstringToString fullPath'- freeMem fullPath'- touchManagedPtr _obj- freeMem file'- freeMem fullPath- return fullPath''- ) (do- freeMem file'- freeMem fullPath- )--data KeyFileLoadFromDataDirsMethodInfo-instance (signature ~ ([Char] -> [KeyFileFlags] -> m ([Char])), MonadIO m) => MethodInfo KeyFileLoadFromDataDirsMethodInfo KeyFile signature where- overloadedMethod _ = keyFileLoadFromDataDirs---- method KeyFile::load_from_dirs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "search_dirs", argType = TCArray True (-1) (-1) (TBasicType TFileName), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "full_path", argType = TBasicType TFileName, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "flags", argType = TInterface "GLib" "KeyFileFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_load_from_dirs" g_key_file_load_from_dirs :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- file : TBasicType TFileName- Ptr CString -> -- search_dirs : TCArray True (-1) (-1) (TBasicType TFileName)- Ptr CString -> -- full_path : TBasicType TFileName- CUInt -> -- flags : TInterface "GLib" "KeyFileFlags"- Ptr (Ptr GError) -> -- error- IO CInt---keyFileLoadFromDirs ::- (MonadIO m) =>- KeyFile -- _obj- -> [Char] -- file- -> [[Char]] -- searchDirs- -> [KeyFileFlags] -- flags- -> m ([Char]) -- result-keyFileLoadFromDirs _obj file searchDirs flags = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- file' <- stringToCString file- searchDirs' <- packZeroTerminatedFileNameArray searchDirs- fullPath <- allocMem :: IO (Ptr CString)- let flags' = gflagsToWord flags- onException (do- _ <- propagateGError $ g_key_file_load_from_dirs _obj' file' searchDirs' fullPath flags'- fullPath' <- peek fullPath- fullPath'' <- cstringToString fullPath'- freeMem fullPath'- touchManagedPtr _obj- freeMem file'- mapZeroTerminatedCArray freeMem searchDirs'- freeMem searchDirs'- freeMem fullPath- return fullPath''- ) (do- freeMem file'- mapZeroTerminatedCArray freeMem searchDirs'- freeMem searchDirs'- freeMem fullPath- )--data KeyFileLoadFromDirsMethodInfo-instance (signature ~ ([Char] -> [[Char]] -> [KeyFileFlags] -> m ([Char])), MonadIO m) => MethodInfo KeyFileLoadFromDirsMethodInfo KeyFile signature where- overloadedMethod _ = keyFileLoadFromDirs---- method KeyFile::load_from_file--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "KeyFileFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_load_from_file" g_key_file_load_from_file :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- file : TBasicType TFileName- CUInt -> -- flags : TInterface "GLib" "KeyFileFlags"- Ptr (Ptr GError) -> -- error- IO CInt---keyFileLoadFromFile ::- (MonadIO m) =>- KeyFile -- _obj- -> [Char] -- file- -> [KeyFileFlags] -- flags- -> m () -- result-keyFileLoadFromFile _obj file flags = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- file' <- stringToCString file- let flags' = gflagsToWord flags- onException (do- _ <- propagateGError $ g_key_file_load_from_file _obj' file' flags'- touchManagedPtr _obj- freeMem file'- return ()- ) (do- freeMem file'- )--data KeyFileLoadFromFileMethodInfo-instance (signature ~ ([Char] -> [KeyFileFlags] -> m ()), MonadIO m) => MethodInfo KeyFileLoadFromFileMethodInfo KeyFile signature where- overloadedMethod _ = keyFileLoadFromFile---- method KeyFile::remove_comment--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_remove_comment" g_key_file_remove_comment :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---keyFileRemoveComment ::- (MonadIO m) =>- KeyFile -- _obj- -> Maybe (T.Text) -- groupName- -> Maybe (T.Text) -- key- -> m () -- result-keyFileRemoveComment _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeGroupName <- case groupName of- Nothing -> return nullPtr- Just jGroupName -> do- jGroupName' <- textToCString jGroupName- return jGroupName'- maybeKey <- case key of- Nothing -> return nullPtr- Just jKey -> do- jKey' <- textToCString jKey- return jKey'- onException (do- _ <- propagateGError $ g_key_file_remove_comment _obj' maybeGroupName maybeKey- touchManagedPtr _obj- freeMem maybeGroupName- freeMem maybeKey- return ()- ) (do- freeMem maybeGroupName- freeMem maybeKey- )--data KeyFileRemoveCommentMethodInfo-instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> m ()), MonadIO m) => MethodInfo KeyFileRemoveCommentMethodInfo KeyFile signature where- overloadedMethod _ = keyFileRemoveComment---- method KeyFile::remove_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_remove_group" g_key_file_remove_group :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---keyFileRemoveGroup ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> m () -- result-keyFileRemoveGroup _obj groupName = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- onException (do- _ <- propagateGError $ g_key_file_remove_group _obj' groupName'- touchManagedPtr _obj- freeMem groupName'- return ()- ) (do- freeMem groupName'- )--data KeyFileRemoveGroupMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo KeyFileRemoveGroupMethodInfo KeyFile signature where- overloadedMethod _ = keyFileRemoveGroup---- method KeyFile::remove_key--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_remove_key" g_key_file_remove_key :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---keyFileRemoveKey ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> m () -- result-keyFileRemoveKey _obj groupName key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- onException (do- _ <- propagateGError $ g_key_file_remove_key _obj' groupName' key'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return ()- ) (do- freeMem groupName'- freeMem key'- )--data KeyFileRemoveKeyMethodInfo-instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo KeyFileRemoveKeyMethodInfo KeyFile signature where- overloadedMethod _ = keyFileRemoveKey---- method KeyFile::save_to_file--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_save_to_file" g_key_file_save_to_file :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- filename : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---keyFileSaveToFile ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- filename- -> m () -- result-keyFileSaveToFile _obj filename = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- filename' <- textToCString filename- onException (do- _ <- propagateGError $ g_key_file_save_to_file _obj' filename'- touchManagedPtr _obj- freeMem filename'- return ()- ) (do- freeMem filename'- )--data KeyFileSaveToFileMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo KeyFileSaveToFileMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSaveToFile---- method KeyFile::set_boolean--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_boolean" g_key_file_set_boolean :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CInt -> -- value : TBasicType TBoolean- IO ()---keyFileSetBoolean ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> Bool -- value- -> m () -- result-keyFileSetBoolean _obj groupName key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- let value' = (fromIntegral . fromEnum) value- g_key_file_set_boolean _obj' groupName' key' value'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return ()--data KeyFileSetBooleanMethodInfo-instance (signature ~ (T.Text -> T.Text -> Bool -> m ()), MonadIO m) => MethodInfo KeyFileSetBooleanMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetBoolean---- method KeyFile::set_boolean_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "list", argType = TCArray False (-1) 4 (TBasicType TBoolean), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_boolean_list" g_key_file_set_boolean_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr CInt -> -- list : TCArray False (-1) 4 (TBasicType TBoolean)- Word64 -> -- length : TBasicType TUInt64- IO ()---keyFileSetBooleanList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> [Bool] -- list- -> m () -- result-keyFileSetBooleanList _obj groupName key list = liftIO $ do- let length_ = fromIntegral $ length list- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- list' <- (packMapStorableArray (fromIntegral . fromEnum)) list- g_key_file_set_boolean_list _obj' groupName' key' list' length_- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem list'- return ()--data KeyFileSetBooleanListMethodInfo-instance (signature ~ (T.Text -> T.Text -> [Bool] -> m ()), MonadIO m) => MethodInfo KeyFileSetBooleanListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetBooleanList---- method KeyFile::set_comment--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "comment", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_set_comment" g_key_file_set_comment :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CString -> -- comment : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CInt---keyFileSetComment ::- (MonadIO m) =>- KeyFile -- _obj- -> Maybe (T.Text) -- groupName- -> Maybe (T.Text) -- key- -> T.Text -- comment- -> m () -- result-keyFileSetComment _obj groupName key comment = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeGroupName <- case groupName of- Nothing -> return nullPtr- Just jGroupName -> do- jGroupName' <- textToCString jGroupName- return jGroupName'- maybeKey <- case key of- Nothing -> return nullPtr- Just jKey -> do- jKey' <- textToCString jKey- return jKey'- comment' <- textToCString comment- onException (do- _ <- propagateGError $ g_key_file_set_comment _obj' maybeGroupName maybeKey comment'- touchManagedPtr _obj- freeMem maybeGroupName- freeMem maybeKey- freeMem comment'- return ()- ) (do- freeMem maybeGroupName- freeMem maybeKey- freeMem comment'- )--data KeyFileSetCommentMethodInfo-instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => MethodInfo KeyFileSetCommentMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetComment---- method KeyFile::set_double--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_double" g_key_file_set_double :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CDouble -> -- value : TBasicType TDouble- IO ()---keyFileSetDouble ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> Double -- value- -> m () -- result-keyFileSetDouble _obj groupName key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- let value' = realToFrac value- g_key_file_set_double _obj' groupName' key' value'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return ()--data KeyFileSetDoubleMethodInfo-instance (signature ~ (T.Text -> T.Text -> Double -> m ()), MonadIO m) => MethodInfo KeyFileSetDoubleMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetDouble---- method KeyFile::set_double_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "list", argType = TCArray False (-1) 4 (TBasicType TDouble), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_double_list" g_key_file_set_double_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr CDouble -> -- list : TCArray False (-1) 4 (TBasicType TDouble)- Word64 -> -- length : TBasicType TUInt64- IO ()---keyFileSetDoubleList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> [Double] -- list- -> m () -- result-keyFileSetDoubleList _obj groupName key list = liftIO $ do- let length_ = fromIntegral $ length list- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- list' <- (packMapStorableArray realToFrac) list- g_key_file_set_double_list _obj' groupName' key' list' length_- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem list'- return ()--data KeyFileSetDoubleListMethodInfo-instance (signature ~ (T.Text -> T.Text -> [Double] -> m ()), MonadIO m) => MethodInfo KeyFileSetDoubleListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetDoubleList---- method KeyFile::set_int64--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_int64" g_key_file_set_int64 :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Int64 -> -- value : TBasicType TInt64- IO ()---keyFileSetInt64 ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> Int64 -- value- -> m () -- result-keyFileSetInt64 _obj groupName key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- g_key_file_set_int64 _obj' groupName' key' value- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return ()--data KeyFileSetInt64MethodInfo-instance (signature ~ (T.Text -> T.Text -> Int64 -> m ()), MonadIO m) => MethodInfo KeyFileSetInt64MethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetInt64---- method KeyFile::set_integer--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_integer" g_key_file_set_integer :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Int32 -> -- value : TBasicType TInt- IO ()---keyFileSetInteger ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> Int32 -- value- -> m () -- result-keyFileSetInteger _obj groupName key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- g_key_file_set_integer _obj' groupName' key' value- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return ()--data KeyFileSetIntegerMethodInfo-instance (signature ~ (T.Text -> T.Text -> Int32 -> m ()), MonadIO m) => MethodInfo KeyFileSetIntegerMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetInteger---- method KeyFile::set_integer_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "list", argType = TCArray False (-1) 4 (TBasicType TInt), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_integer_list" g_key_file_set_integer_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr Int32 -> -- list : TCArray False (-1) 4 (TBasicType TInt)- Word64 -> -- length : TBasicType TUInt64- IO ()---keyFileSetIntegerList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> [Int32] -- list- -> m () -- result-keyFileSetIntegerList _obj groupName key list = liftIO $ do- let length_ = fromIntegral $ length list- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- list' <- packStorableArray list- g_key_file_set_integer_list _obj' groupName' key' list' length_- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem list'- return ()--data KeyFileSetIntegerListMethodInfo-instance (signature ~ (T.Text -> T.Text -> [Int32] -> m ()), MonadIO m) => MethodInfo KeyFileSetIntegerListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetIntegerList---- method KeyFile::set_list_separator--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "separator", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_list_separator" g_key_file_set_list_separator :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- Int8 -> -- separator : TBasicType TInt8- IO ()---keyFileSetListSeparator ::- (MonadIO m) =>- KeyFile -- _obj- -> Int8 -- separator- -> m () -- result-keyFileSetListSeparator _obj separator = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_key_file_set_list_separator _obj' separator- touchManagedPtr _obj- return ()--data KeyFileSetListSeparatorMethodInfo-instance (signature ~ (Int8 -> m ()), MonadIO m) => MethodInfo KeyFileSetListSeparatorMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetListSeparator---- method KeyFile::set_locale_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "locale", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_locale_string" g_key_file_set_locale_string :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CString -> -- locale : TBasicType TUTF8- CString -> -- string : TBasicType TUTF8- IO ()---keyFileSetLocaleString ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> T.Text -- locale- -> T.Text -- string- -> m () -- result-keyFileSetLocaleString _obj groupName key locale string = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- locale' <- textToCString locale- string' <- textToCString string- g_key_file_set_locale_string _obj' groupName' key' locale' string'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem locale'- freeMem string'- return ()--data KeyFileSetLocaleStringMethodInfo-instance (signature ~ (T.Text -> T.Text -> T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo KeyFileSetLocaleStringMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetLocaleString---- method KeyFile::set_locale_string_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "locale", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "list", argType = TCArray True (-1) 5 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_locale_string_list" g_key_file_set_locale_string_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CString -> -- locale : TBasicType TUTF8- Ptr CString -> -- list : TCArray True (-1) 5 (TBasicType TUTF8)- Word64 -> -- length : TBasicType TUInt64- IO ()---keyFileSetLocaleStringList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> T.Text -- locale- -> [T.Text] -- list- -> Word64 -- length_- -> m () -- result-keyFileSetLocaleStringList _obj groupName key locale list length_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- locale' <- textToCString locale- list' <- packZeroTerminatedUTF8CArray list- g_key_file_set_locale_string_list _obj' groupName' key' locale' list' length_- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem locale'- mapZeroTerminatedCArray freeMem list'- freeMem list'- return ()--data KeyFileSetLocaleStringListMethodInfo-instance (signature ~ (T.Text -> T.Text -> T.Text -> [T.Text] -> Word64 -> m ()), MonadIO m) => MethodInfo KeyFileSetLocaleStringListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetLocaleStringList---- method KeyFile::set_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_string" g_key_file_set_string :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CString -> -- string : TBasicType TUTF8- IO ()---keyFileSetString ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> T.Text -- string- -> m () -- result-keyFileSetString _obj groupName key string = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- string' <- textToCString string- g_key_file_set_string _obj' groupName' key' string'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem string'- return ()--data KeyFileSetStringMethodInfo-instance (signature ~ (T.Text -> T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo KeyFileSetStringMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetString---- method KeyFile::set_string_list--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "list", argType = TCArray True (-1) 4 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_string_list" g_key_file_set_string_list :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Ptr CString -> -- list : TCArray True (-1) 4 (TBasicType TUTF8)- Word64 -> -- length : TBasicType TUInt64- IO ()---keyFileSetStringList ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> [T.Text] -- list- -> Word64 -- length_- -> m () -- result-keyFileSetStringList _obj groupName key list length_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- list' <- packZeroTerminatedUTF8CArray list- g_key_file_set_string_list _obj' groupName' key' list' length_- touchManagedPtr _obj- freeMem groupName'- freeMem key'- mapZeroTerminatedCArray freeMem list'- freeMem list'- return ()--data KeyFileSetStringListMethodInfo-instance (signature ~ (T.Text -> T.Text -> [T.Text] -> Word64 -> m ()), MonadIO m) => MethodInfo KeyFileSetStringListMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetStringList---- method KeyFile::set_uint64--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_uint64" g_key_file_set_uint64 :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- Word64 -> -- value : TBasicType TUInt64- IO ()---keyFileSetUint64 ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> Word64 -- value- -> m () -- result-keyFileSetUint64 _obj groupName key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- g_key_file_set_uint64 _obj' groupName' key' value- touchManagedPtr _obj- freeMem groupName'- freeMem key'- return ()--data KeyFileSetUint64MethodInfo-instance (signature ~ (T.Text -> T.Text -> Word64 -> m ()), MonadIO m) => MethodInfo KeyFileSetUint64MethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetUint64---- method KeyFile::set_value--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_set_value" g_key_file_set_value :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- CString -> -- group_name : TBasicType TUTF8- CString -> -- key : TBasicType TUTF8- CString -> -- value : TBasicType TUTF8- IO ()---keyFileSetValue ::- (MonadIO m) =>- KeyFile -- _obj- -> T.Text -- groupName- -> T.Text -- key- -> T.Text -- value- -> m () -- result-keyFileSetValue _obj groupName key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- groupName' <- textToCString groupName- key' <- textToCString key- value' <- textToCString value- g_key_file_set_value _obj' groupName' key' value'- touchManagedPtr _obj- freeMem groupName'- freeMem key'- freeMem value'- return ()--data KeyFileSetValueMethodInfo-instance (signature ~ (T.Text -> T.Text -> T.Text -> m ()), MonadIO m) => MethodInfo KeyFileSetValueMethodInfo KeyFile signature where- overloadedMethod _ = keyFileSetValue---- method KeyFile::to_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_key_file_to_data" g_key_file_to_data :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- Ptr Word64 -> -- length : TBasicType TUInt64- Ptr (Ptr GError) -> -- error- IO CString---keyFileToData ::- (MonadIO m) =>- KeyFile -- _obj- -> m (T.Text,Word64) -- result-keyFileToData _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- length_ <- allocMem :: IO (Ptr Word64)- onException (do- result <- propagateGError $ g_key_file_to_data _obj' length_- checkUnexpectedReturnNULL "g_key_file_to_data" result- result' <- cstringToText result- freeMem result- length_' <- peek length_- touchManagedPtr _obj- freeMem length_- return (result', length_')- ) (do- freeMem length_- )--data KeyFileToDataMethodInfo-instance (signature ~ (m (T.Text,Word64)), MonadIO m) => MethodInfo KeyFileToDataMethodInfo KeyFile signature where- overloadedMethod _ = keyFileToData---- method KeyFile::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "KeyFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_key_file_unref" g_key_file_unref :: - Ptr KeyFile -> -- _obj : TInterface "GLib" "KeyFile"- IO ()---keyFileUnref ::- (MonadIO m) =>- KeyFile -- _obj- -> m () -- result-keyFileUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_key_file_unref _obj'- touchManagedPtr _obj- return ()--data KeyFileUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo KeyFileUnrefMethodInfo KeyFile signature where- overloadedMethod _ = keyFileUnref---- method KeyFile::error_quark--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_key_file_error_quark" g_key_file_error_quark :: - IO Word32---keyFileErrorQuark ::- (MonadIO m) =>- m Word32 -- result-keyFileErrorQuark = liftIO $ do- result <- g_key_file_error_quark- return result--type family ResolveKeyFileMethod (t :: Symbol) (o :: *) :: * where- ResolveKeyFileMethod "hasGroup" o = KeyFileHasGroupMethodInfo- ResolveKeyFileMethod "loadFromData" o = KeyFileLoadFromDataMethodInfo- ResolveKeyFileMethod "loadFromDataDirs" o = KeyFileLoadFromDataDirsMethodInfo- ResolveKeyFileMethod "loadFromDirs" o = KeyFileLoadFromDirsMethodInfo- ResolveKeyFileMethod "loadFromFile" o = KeyFileLoadFromFileMethodInfo- ResolveKeyFileMethod "removeComment" o = KeyFileRemoveCommentMethodInfo- ResolveKeyFileMethod "removeGroup" o = KeyFileRemoveGroupMethodInfo- ResolveKeyFileMethod "removeKey" o = KeyFileRemoveKeyMethodInfo- ResolveKeyFileMethod "saveToFile" o = KeyFileSaveToFileMethodInfo- ResolveKeyFileMethod "toData" o = KeyFileToDataMethodInfo- ResolveKeyFileMethod "unref" o = KeyFileUnrefMethodInfo- ResolveKeyFileMethod "getBoolean" o = KeyFileGetBooleanMethodInfo- ResolveKeyFileMethod "getBooleanList" o = KeyFileGetBooleanListMethodInfo- ResolveKeyFileMethod "getComment" o = KeyFileGetCommentMethodInfo- ResolveKeyFileMethod "getDouble" o = KeyFileGetDoubleMethodInfo- ResolveKeyFileMethod "getDoubleList" o = KeyFileGetDoubleListMethodInfo- ResolveKeyFileMethod "getGroups" o = KeyFileGetGroupsMethodInfo- ResolveKeyFileMethod "getInt64" o = KeyFileGetInt64MethodInfo- ResolveKeyFileMethod "getInteger" o = KeyFileGetIntegerMethodInfo- ResolveKeyFileMethod "getIntegerList" o = KeyFileGetIntegerListMethodInfo- ResolveKeyFileMethod "getKeys" o = KeyFileGetKeysMethodInfo- ResolveKeyFileMethod "getLocaleString" o = KeyFileGetLocaleStringMethodInfo- ResolveKeyFileMethod "getLocaleStringList" o = KeyFileGetLocaleStringListMethodInfo- ResolveKeyFileMethod "getStartGroup" o = KeyFileGetStartGroupMethodInfo- ResolveKeyFileMethod "getString" o = KeyFileGetStringMethodInfo- ResolveKeyFileMethod "getStringList" o = KeyFileGetStringListMethodInfo- ResolveKeyFileMethod "getUint64" o = KeyFileGetUint64MethodInfo- ResolveKeyFileMethod "getValue" o = KeyFileGetValueMethodInfo- ResolveKeyFileMethod "setBoolean" o = KeyFileSetBooleanMethodInfo- ResolveKeyFileMethod "setBooleanList" o = KeyFileSetBooleanListMethodInfo- ResolveKeyFileMethod "setComment" o = KeyFileSetCommentMethodInfo- ResolveKeyFileMethod "setDouble" o = KeyFileSetDoubleMethodInfo- ResolveKeyFileMethod "setDoubleList" o = KeyFileSetDoubleListMethodInfo- ResolveKeyFileMethod "setInt64" o = KeyFileSetInt64MethodInfo- ResolveKeyFileMethod "setInteger" o = KeyFileSetIntegerMethodInfo- ResolveKeyFileMethod "setIntegerList" o = KeyFileSetIntegerListMethodInfo- ResolveKeyFileMethod "setListSeparator" o = KeyFileSetListSeparatorMethodInfo- ResolveKeyFileMethod "setLocaleString" o = KeyFileSetLocaleStringMethodInfo- ResolveKeyFileMethod "setLocaleStringList" o = KeyFileSetLocaleStringListMethodInfo- ResolveKeyFileMethod "setString" o = KeyFileSetStringMethodInfo- ResolveKeyFileMethod "setStringList" o = KeyFileSetStringListMethodInfo- ResolveKeyFileMethod "setUint64" o = KeyFileSetUint64MethodInfo- ResolveKeyFileMethod "setValue" o = KeyFileSetValueMethodInfo- ResolveKeyFileMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveKeyFileMethod t KeyFile, MethodInfo info KeyFile p) => IsLabelProxy t (KeyFile -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveKeyFileMethod t KeyFile, MethodInfo info KeyFile p) => IsLabel t (KeyFile -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/KeyFile.hs-boot
@@ -1,54 +0,0 @@-module GI.GLib.Structs.KeyFile where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype KeyFile = KeyFile (ForeignPtr KeyFile)-instance BoxedObject KeyFile where-data KeyFileGetBooleanMethodInfo-data KeyFileGetBooleanListMethodInfo-data KeyFileGetCommentMethodInfo-data KeyFileGetDoubleMethodInfo-data KeyFileGetDoubleListMethodInfo-data KeyFileGetGroupsMethodInfo-data KeyFileGetInt64MethodInfo-data KeyFileGetIntegerMethodInfo-data KeyFileGetIntegerListMethodInfo-data KeyFileGetKeysMethodInfo-data KeyFileGetLocaleStringMethodInfo-data KeyFileGetLocaleStringListMethodInfo-data KeyFileGetStartGroupMethodInfo-data KeyFileGetStringMethodInfo-data KeyFileGetStringListMethodInfo-data KeyFileGetUint64MethodInfo-data KeyFileGetValueMethodInfo-data KeyFileHasGroupMethodInfo-data KeyFileLoadFromDataMethodInfo-data KeyFileLoadFromDataDirsMethodInfo-data KeyFileLoadFromDirsMethodInfo-data KeyFileLoadFromFileMethodInfo-data KeyFileRemoveCommentMethodInfo-data KeyFileRemoveGroupMethodInfo-data KeyFileRemoveKeyMethodInfo-data KeyFileSaveToFileMethodInfo-data KeyFileSetBooleanMethodInfo-data KeyFileSetBooleanListMethodInfo-data KeyFileSetCommentMethodInfo-data KeyFileSetDoubleMethodInfo-data KeyFileSetDoubleListMethodInfo-data KeyFileSetInt64MethodInfo-data KeyFileSetIntegerMethodInfo-data KeyFileSetIntegerListMethodInfo-data KeyFileSetListSeparatorMethodInfo-data KeyFileSetLocaleStringMethodInfo-data KeyFileSetLocaleStringListMethodInfo-data KeyFileSetStringMethodInfo-data KeyFileSetStringListMethodInfo-data KeyFileSetUint64MethodInfo-data KeyFileSetValueMethodInfo-data KeyFileToDataMethodInfo-data KeyFileUnrefMethodInfo
− GI/GLib/Structs/MainContext.hs
@@ -1,935 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The `GMainContext` struct is an opaque data-type representing a set of sources to be handled in a main loop.--}--module GI.GLib.Structs.MainContext- ( ---- * Exported types- MainContext(..) ,- noMainContext ,--- -- * Methods--- ** mainContextAcquire- MainContextAcquireMethodInfo ,- mainContextAcquire ,----- ** mainContextAddPoll- MainContextAddPollMethodInfo ,- mainContextAddPoll ,----- ** mainContextCheck- MainContextCheckMethodInfo ,- mainContextCheck ,----- ** mainContextDefault- mainContextDefault ,----- ** mainContextDispatch- MainContextDispatchMethodInfo ,- mainContextDispatch ,----- ** mainContextFindSourceByFuncsUserData- MainContextFindSourceByFuncsUserDataMethodInfo,- mainContextFindSourceByFuncsUserData ,----- ** mainContextFindSourceById- MainContextFindSourceByIdMethodInfo ,- mainContextFindSourceById ,----- ** mainContextFindSourceByUserData- MainContextFindSourceByUserDataMethodInfo,- mainContextFindSourceByUserData ,----- ** mainContextGetThreadDefault- mainContextGetThreadDefault ,----- ** mainContextInvokeFull- MainContextInvokeFullMethodInfo ,- mainContextInvokeFull ,----- ** mainContextIsOwner- MainContextIsOwnerMethodInfo ,- mainContextIsOwner ,----- ** mainContextIteration- MainContextIterationMethodInfo ,- mainContextIteration ,----- ** mainContextNew- mainContextNew ,----- ** mainContextPending- MainContextPendingMethodInfo ,- mainContextPending ,----- ** mainContextPopThreadDefault- MainContextPopThreadDefaultMethodInfo ,- mainContextPopThreadDefault ,----- ** mainContextPrepare- MainContextPrepareMethodInfo ,- mainContextPrepare ,----- ** mainContextPushThreadDefault- MainContextPushThreadDefaultMethodInfo ,- mainContextPushThreadDefault ,----- ** mainContextQuery- MainContextQueryMethodInfo ,- mainContextQuery ,----- ** mainContextRef- MainContextRefMethodInfo ,- mainContextRef ,----- ** mainContextRefThreadDefault- mainContextRefThreadDefault ,----- ** mainContextRelease- MainContextReleaseMethodInfo ,- mainContextRelease ,----- ** mainContextRemovePoll- MainContextRemovePollMethodInfo ,- mainContextRemovePoll ,----- ** mainContextUnref- MainContextUnrefMethodInfo ,- mainContextUnref ,----- ** mainContextWait- MainContextWaitMethodInfo ,- mainContextWait ,----- ** mainContextWakeup- MainContextWakeupMethodInfo ,- mainContextWakeup ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype MainContext = MainContext (ForeignPtr MainContext)-foreign import ccall "g_main_context_get_type" c_g_main_context_get_type :: - IO GType--instance BoxedObject MainContext where- boxedType _ = c_g_main_context_get_type--noMainContext :: Maybe MainContext-noMainContext = Nothing---type instance AttributeList MainContext = MainContextAttributeList-type MainContextAttributeList = ('[ ] :: [(Symbol, *)])---- method MainContext::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "MainContext")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_new" g_main_context_new :: - IO (Ptr MainContext)---mainContextNew ::- (MonadIO m) =>- m MainContext -- result-mainContextNew = liftIO $ do- result <- g_main_context_new- checkUnexpectedReturnNULL "g_main_context_new" result- result' <- (wrapBoxed MainContext) result- return result'---- method MainContext::acquire--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_acquire" g_main_context_acquire :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO CInt---mainContextAcquire ::- (MonadIO m) =>- MainContext -- _obj- -> m Bool -- result-mainContextAcquire _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_context_acquire _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MainContextAcquireMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo MainContextAcquireMethodInfo MainContext signature where- overloadedMethod _ = mainContextAcquire---- method MainContext::add_poll--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fd", argType = TInterface "GLib" "PollFD", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_add_poll" g_main_context_add_poll :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Ptr PollFD -> -- fd : TInterface "GLib" "PollFD"- Int32 -> -- priority : TBasicType TInt- IO ()---mainContextAddPoll ::- (MonadIO m) =>- MainContext -- _obj- -> PollFD -- fd- -> Int32 -- priority- -> m () -- result-mainContextAddPoll _obj fd priority = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let fd' = unsafeManagedPtrGetPtr fd- g_main_context_add_poll _obj' fd' priority- touchManagedPtr _obj- touchManagedPtr fd- return ()--data MainContextAddPollMethodInfo-instance (signature ~ (PollFD -> Int32 -> m ()), MonadIO m) => MethodInfo MainContextAddPollMethodInfo MainContext signature where- overloadedMethod _ = mainContextAddPoll---- method MainContext::check--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fds", argType = TCArray False (-1) 3 (TInterface "GLib" "PollFD"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_fds", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "n_fds", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_check" g_main_context_check :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Int32 -> -- max_priority : TBasicType TInt- Ptr PollFD -> -- fds : TCArray False (-1) 3 (TInterface "GLib" "PollFD")- Int32 -> -- n_fds : TBasicType TInt- IO Int32---mainContextCheck ::- (MonadIO m) =>- MainContext -- _obj- -> Int32 -- maxPriority- -> [PollFD] -- fds- -> m Int32 -- result-mainContextCheck _obj maxPriority fds = liftIO $ do- let nFds = fromIntegral $ length fds- let _obj' = unsafeManagedPtrGetPtr _obj- let fds' = map unsafeManagedPtrGetPtr fds- fds'' <- packBlockArray 8 fds'- result <- g_main_context_check _obj' maxPriority fds'' nFds- touchManagedPtr _obj- mapM_ touchManagedPtr fds- freeMem fds''- return result--data MainContextCheckMethodInfo-instance (signature ~ (Int32 -> [PollFD] -> m Int32), MonadIO m) => MethodInfo MainContextCheckMethodInfo MainContext signature where- overloadedMethod _ = mainContextCheck---- method MainContext::dispatch--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_dispatch" g_main_context_dispatch :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO ()---mainContextDispatch ::- (MonadIO m) =>- MainContext -- _obj- -> m () -- result-mainContextDispatch _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_context_dispatch _obj'- touchManagedPtr _obj- return ()--data MainContextDispatchMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainContextDispatchMethodInfo MainContext signature where- overloadedMethod _ = mainContextDispatch---- method MainContext::find_source_by_funcs_user_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "funcs", argType = TInterface "GLib" "SourceFuncs", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_find_source_by_funcs_user_data" g_main_context_find_source_by_funcs_user_data :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Ptr SourceFuncs -> -- funcs : TInterface "GLib" "SourceFuncs"- Ptr () -> -- user_data : TBasicType TPtr- IO (Ptr Source)---mainContextFindSourceByFuncsUserData ::- (MonadIO m) =>- MainContext -- _obj- -> SourceFuncs -- funcs- -> Ptr () -- userData- -> m Source -- result-mainContextFindSourceByFuncsUserData _obj funcs userData = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let funcs' = unsafeManagedPtrGetPtr funcs- result <- g_main_context_find_source_by_funcs_user_data _obj' funcs' userData- checkUnexpectedReturnNULL "g_main_context_find_source_by_funcs_user_data" result- result' <- (newBoxed Source) result- touchManagedPtr _obj- touchManagedPtr funcs- return result'--data MainContextFindSourceByFuncsUserDataMethodInfo-instance (signature ~ (SourceFuncs -> Ptr () -> m Source), MonadIO m) => MethodInfo MainContextFindSourceByFuncsUserDataMethodInfo MainContext signature where- overloadedMethod _ = mainContextFindSourceByFuncsUserData---- method MainContext::find_source_by_id--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "source_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_find_source_by_id" g_main_context_find_source_by_id :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Word32 -> -- source_id : TBasicType TUInt- IO (Ptr Source)---mainContextFindSourceById ::- (MonadIO m) =>- MainContext -- _obj- -> Word32 -- sourceId- -> m Source -- result-mainContextFindSourceById _obj sourceId = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_context_find_source_by_id _obj' sourceId- checkUnexpectedReturnNULL "g_main_context_find_source_by_id" result- result' <- (newBoxed Source) result- touchManagedPtr _obj- return result'--data MainContextFindSourceByIdMethodInfo-instance (signature ~ (Word32 -> m Source), MonadIO m) => MethodInfo MainContextFindSourceByIdMethodInfo MainContext signature where- overloadedMethod _ = mainContextFindSourceById---- method MainContext::find_source_by_user_data--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_find_source_by_user_data" g_main_context_find_source_by_user_data :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Ptr () -> -- user_data : TBasicType TPtr- IO (Ptr Source)---mainContextFindSourceByUserData ::- (MonadIO m) =>- MainContext -- _obj- -> Ptr () -- userData- -> m Source -- result-mainContextFindSourceByUserData _obj userData = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_context_find_source_by_user_data _obj' userData- checkUnexpectedReturnNULL "g_main_context_find_source_by_user_data" result- result' <- (newBoxed Source) result- touchManagedPtr _obj- return result'--data MainContextFindSourceByUserDataMethodInfo-instance (signature ~ (Ptr () -> m Source), MonadIO m) => MethodInfo MainContextFindSourceByUserDataMethodInfo MainContext signature where- overloadedMethod _ = mainContextFindSourceByUserData---- method MainContext::invoke_full--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "function", argType = TInterface "GLib" "SourceFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_invoke_full" g_main_context_invoke_full :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Int32 -> -- priority : TBasicType TInt- FunPtr SourceFuncC -> -- function : TInterface "GLib" "SourceFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO ()---mainContextInvokeFull ::- (MonadIO m) =>- MainContext -- _obj- -> Int32 -- priority- -> SourceFunc -- function- -> m () -- result-mainContextInvokeFull _obj priority function = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- function' <- mkSourceFunc (sourceFuncWrapper Nothing function)- let data_ = castFunPtrToPtr function'- let notify = safeFreeFunPtrPtr- g_main_context_invoke_full _obj' priority function' data_ notify- touchManagedPtr _obj- return ()--data MainContextInvokeFullMethodInfo-instance (signature ~ (Int32 -> SourceFunc -> m ()), MonadIO m) => MethodInfo MainContextInvokeFullMethodInfo MainContext signature where- overloadedMethod _ = mainContextInvokeFull---- method MainContext::is_owner--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_is_owner" g_main_context_is_owner :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO CInt---mainContextIsOwner ::- (MonadIO m) =>- MainContext -- _obj- -> m Bool -- result-mainContextIsOwner _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_context_is_owner _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MainContextIsOwnerMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo MainContextIsOwnerMethodInfo MainContext signature where- overloadedMethod _ = mainContextIsOwner---- method MainContext::iteration--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "may_block", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_iteration" g_main_context_iteration :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- CInt -> -- may_block : TBasicType TBoolean- IO CInt---mainContextIteration ::- (MonadIO m) =>- MainContext -- _obj- -> Bool -- mayBlock- -> m Bool -- result-mainContextIteration _obj mayBlock = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let mayBlock' = (fromIntegral . fromEnum) mayBlock- result <- g_main_context_iteration _obj' mayBlock'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MainContextIterationMethodInfo-instance (signature ~ (Bool -> m Bool), MonadIO m) => MethodInfo MainContextIterationMethodInfo MainContext signature where- overloadedMethod _ = mainContextIteration---- method MainContext::pending--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_pending" g_main_context_pending :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO CInt---mainContextPending ::- (MonadIO m) =>- MainContext -- _obj- -> m Bool -- result-mainContextPending _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_context_pending _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MainContextPendingMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo MainContextPendingMethodInfo MainContext signature where- overloadedMethod _ = mainContextPending---- method MainContext::pop_thread_default--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_pop_thread_default" g_main_context_pop_thread_default :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO ()---mainContextPopThreadDefault ::- (MonadIO m) =>- MainContext -- _obj- -> m () -- result-mainContextPopThreadDefault _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_context_pop_thread_default _obj'- touchManagedPtr _obj- return ()--data MainContextPopThreadDefaultMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainContextPopThreadDefaultMethodInfo MainContext signature where- overloadedMethod _ = mainContextPopThreadDefault---- method MainContext::prepare--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_prepare" g_main_context_prepare :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Int32 -> -- priority : TBasicType TInt- IO CInt---mainContextPrepare ::- (MonadIO m) =>- MainContext -- _obj- -> Int32 -- priority- -> m Bool -- result-mainContextPrepare _obj priority = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_context_prepare _obj' priority- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MainContextPrepareMethodInfo-instance (signature ~ (Int32 -> m Bool), MonadIO m) => MethodInfo MainContextPrepareMethodInfo MainContext signature where- overloadedMethod _ = mainContextPrepare---- method MainContext::push_thread_default--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_push_thread_default" g_main_context_push_thread_default :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO ()---mainContextPushThreadDefault ::- (MonadIO m) =>- MainContext -- _obj- -> m () -- result-mainContextPushThreadDefault _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_context_push_thread_default _obj'- touchManagedPtr _obj- return ()--data MainContextPushThreadDefaultMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainContextPushThreadDefaultMethodInfo MainContext signature where- overloadedMethod _ = mainContextPushThreadDefault---- method MainContext::query--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timeout_", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "fds", argType = TCArray False (-1) 4 (TInterface "GLib" "PollFD"), direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "n_fds", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_fds", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_query" g_main_context_query :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Int32 -> -- max_priority : TBasicType TInt- Ptr Int32 -> -- timeout_ : TBasicType TInt- Ptr PollFD -> -- fds : TCArray False (-1) 4 (TInterface "GLib" "PollFD")- Int32 -> -- n_fds : TBasicType TInt- IO Int32---mainContextQuery ::- (MonadIO m) =>- MainContext -- _obj- -> Int32 -- maxPriority- -> [PollFD] -- fds- -> m (Int32,Int32,[PollFD]) -- result-mainContextQuery _obj maxPriority fds = liftIO $ do- let nFds = fromIntegral $ length fds- let _obj' = unsafeManagedPtrGetPtr _obj- timeout_ <- allocMem :: IO (Ptr Int32)- let fds' = map unsafeManagedPtrGetPtr fds- fds'' <- packBlockArray 8 fds'- result <- g_main_context_query _obj' maxPriority timeout_ fds'' nFds- timeout_' <- peek timeout_- fds''' <- (unpackBoxedArrayWithLength 8 nFds) fds''- fds'''' <- mapM (newBoxed PollFD) fds'''- touchManagedPtr _obj- mapM_ touchManagedPtr fds- freeMem timeout_- freeMem fds''- return (result, timeout_', fds'''')--data MainContextQueryMethodInfo-instance (signature ~ (Int32 -> [PollFD] -> m (Int32,Int32,[PollFD])), MonadIO m) => MethodInfo MainContextQueryMethodInfo MainContext signature where- overloadedMethod _ = mainContextQuery---- method MainContext::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MainContext")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_ref" g_main_context_ref :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO (Ptr MainContext)---mainContextRef ::- (MonadIO m) =>- MainContext -- _obj- -> m MainContext -- result-mainContextRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_context_ref _obj'- checkUnexpectedReturnNULL "g_main_context_ref" result- result' <- (wrapBoxed MainContext) result- touchManagedPtr _obj- return result'--data MainContextRefMethodInfo-instance (signature ~ (m MainContext), MonadIO m) => MethodInfo MainContextRefMethodInfo MainContext signature where- overloadedMethod _ = mainContextRef---- method MainContext::release--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_release" g_main_context_release :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO ()---mainContextRelease ::- (MonadIO m) =>- MainContext -- _obj- -> m () -- result-mainContextRelease _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_context_release _obj'- touchManagedPtr _obj- return ()--data MainContextReleaseMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainContextReleaseMethodInfo MainContext signature where- overloadedMethod _ = mainContextRelease---- method MainContext::remove_poll--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fd", argType = TInterface "GLib" "PollFD", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_remove_poll" g_main_context_remove_poll :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Ptr PollFD -> -- fd : TInterface "GLib" "PollFD"- IO ()---mainContextRemovePoll ::- (MonadIO m) =>- MainContext -- _obj- -> PollFD -- fd- -> m () -- result-mainContextRemovePoll _obj fd = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let fd' = unsafeManagedPtrGetPtr fd- g_main_context_remove_poll _obj' fd'- touchManagedPtr _obj- touchManagedPtr fd- return ()--data MainContextRemovePollMethodInfo-instance (signature ~ (PollFD -> m ()), MonadIO m) => MethodInfo MainContextRemovePollMethodInfo MainContext signature where- overloadedMethod _ = mainContextRemovePoll---- method MainContext::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_unref" g_main_context_unref :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO ()---mainContextUnref ::- (MonadIO m) =>- MainContext -- _obj- -> m () -- result-mainContextUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_context_unref _obj'- touchManagedPtr _obj- return ()--data MainContextUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainContextUnrefMethodInfo MainContext signature where- overloadedMethod _ = mainContextUnref---- method MainContext::wait--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cond", argType = TInterface "GLib" "Cond", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mutex", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_main_context_wait" g_main_context_wait :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- Ptr Cond -> -- cond : TInterface "GLib" "Cond"- Ptr Mutex -> -- mutex : TInterface "GLib" "Mutex"- IO CInt---mainContextWait ::- (MonadIO m) =>- MainContext -- _obj- -> Cond -- cond- -> Mutex -- mutex- -> m Bool -- result-mainContextWait _obj cond mutex = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let cond' = unsafeManagedPtrGetPtr cond- let mutex' = unsafeManagedPtrGetPtr mutex- result <- g_main_context_wait _obj' cond' mutex'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr cond- touchManagedPtr mutex- return result'--data MainContextWaitMethodInfo-instance (signature ~ (Cond -> Mutex -> m Bool), MonadIO m) => MethodInfo MainContextWaitMethodInfo MainContext signature where- overloadedMethod _ = mainContextWait---- method MainContext::wakeup--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_context_wakeup" g_main_context_wakeup :: - Ptr MainContext -> -- _obj : TInterface "GLib" "MainContext"- IO ()---mainContextWakeup ::- (MonadIO m) =>- MainContext -- _obj- -> m () -- result-mainContextWakeup _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_context_wakeup _obj'- touchManagedPtr _obj- return ()--data MainContextWakeupMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainContextWakeupMethodInfo MainContext signature where- overloadedMethod _ = mainContextWakeup---- method MainContext::default--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "MainContext")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_default" g_main_context_default :: - IO (Ptr MainContext)---mainContextDefault ::- (MonadIO m) =>- m MainContext -- result-mainContextDefault = liftIO $ do- result <- g_main_context_default- checkUnexpectedReturnNULL "g_main_context_default" result- result' <- (newBoxed MainContext) result- return result'---- method MainContext::get_thread_default--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "MainContext")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_get_thread_default" g_main_context_get_thread_default :: - IO (Ptr MainContext)---mainContextGetThreadDefault ::- (MonadIO m) =>- m MainContext -- result-mainContextGetThreadDefault = liftIO $ do- result <- g_main_context_get_thread_default- checkUnexpectedReturnNULL "g_main_context_get_thread_default" result- result' <- (newBoxed MainContext) result- return result'---- method MainContext::ref_thread_default--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "MainContext")--- throws : False--- Skip return : False--foreign import ccall "g_main_context_ref_thread_default" g_main_context_ref_thread_default :: - IO (Ptr MainContext)---mainContextRefThreadDefault ::- (MonadIO m) =>- m MainContext -- result-mainContextRefThreadDefault = liftIO $ do- result <- g_main_context_ref_thread_default- checkUnexpectedReturnNULL "g_main_context_ref_thread_default" result- result' <- (wrapBoxed MainContext) result- return result'--type family ResolveMainContextMethod (t :: Symbol) (o :: *) :: * where- ResolveMainContextMethod "acquire" o = MainContextAcquireMethodInfo- ResolveMainContextMethod "addPoll" o = MainContextAddPollMethodInfo- ResolveMainContextMethod "check" o = MainContextCheckMethodInfo- ResolveMainContextMethod "dispatch" o = MainContextDispatchMethodInfo- ResolveMainContextMethod "findSourceByFuncsUserData" o = MainContextFindSourceByFuncsUserDataMethodInfo- ResolveMainContextMethod "findSourceById" o = MainContextFindSourceByIdMethodInfo- ResolveMainContextMethod "findSourceByUserData" o = MainContextFindSourceByUserDataMethodInfo- ResolveMainContextMethod "invokeFull" o = MainContextInvokeFullMethodInfo- ResolveMainContextMethod "isOwner" o = MainContextIsOwnerMethodInfo- ResolveMainContextMethod "iteration" o = MainContextIterationMethodInfo- ResolveMainContextMethod "pending" o = MainContextPendingMethodInfo- ResolveMainContextMethod "popThreadDefault" o = MainContextPopThreadDefaultMethodInfo- ResolveMainContextMethod "prepare" o = MainContextPrepareMethodInfo- ResolveMainContextMethod "pushThreadDefault" o = MainContextPushThreadDefaultMethodInfo- ResolveMainContextMethod "query" o = MainContextQueryMethodInfo- ResolveMainContextMethod "ref" o = MainContextRefMethodInfo- ResolveMainContextMethod "release" o = MainContextReleaseMethodInfo- ResolveMainContextMethod "removePoll" o = MainContextRemovePollMethodInfo- ResolveMainContextMethod "unref" o = MainContextUnrefMethodInfo- ResolveMainContextMethod "wait" o = MainContextWaitMethodInfo- ResolveMainContextMethod "wakeup" o = MainContextWakeupMethodInfo- ResolveMainContextMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMainContextMethod t MainContext, MethodInfo info MainContext p) => IsLabelProxy t (MainContext -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMainContextMethod t MainContext, MethodInfo info MainContext p) => IsLabel t (MainContext -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/MainContext.hs-boot
@@ -1,32 +0,0 @@-module GI.GLib.Structs.MainContext where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype MainContext = MainContext (ForeignPtr MainContext)-instance BoxedObject MainContext where-data MainContextAcquireMethodInfo-data MainContextAddPollMethodInfo-data MainContextCheckMethodInfo-data MainContextDispatchMethodInfo-data MainContextFindSourceByFuncsUserDataMethodInfo-data MainContextFindSourceByIdMethodInfo-data MainContextFindSourceByUserDataMethodInfo-data MainContextInvokeFullMethodInfo-data MainContextIsOwnerMethodInfo-data MainContextIterationMethodInfo-data MainContextPendingMethodInfo-data MainContextPopThreadDefaultMethodInfo-data MainContextPrepareMethodInfo-data MainContextPushThreadDefaultMethodInfo-data MainContextQueryMethodInfo-data MainContextRefMethodInfo-data MainContextReleaseMethodInfo-data MainContextRemovePollMethodInfo-data MainContextUnrefMethodInfo-data MainContextWaitMethodInfo-data MainContextWakeupMethodInfo
− GI/GLib/Structs/MainLoop.hs
@@ -1,299 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The `GMainLoop` struct is an opaque data type-representing the main event loop of a GLib or GTK+ application.--}--module GI.GLib.Structs.MainLoop- ( ---- * Exported types- MainLoop(..) ,- noMainLoop ,--- -- * Methods--- ** mainLoopGetContext- MainLoopGetContextMethodInfo ,- mainLoopGetContext ,----- ** mainLoopIsRunning- MainLoopIsRunningMethodInfo ,- mainLoopIsRunning ,----- ** mainLoopNew- mainLoopNew ,----- ** mainLoopQuit- MainLoopQuitMethodInfo ,- mainLoopQuit ,----- ** mainLoopRef- MainLoopRefMethodInfo ,- mainLoopRef ,----- ** mainLoopRun- MainLoopRunMethodInfo ,- mainLoopRun ,----- ** mainLoopUnref- MainLoopUnrefMethodInfo ,- mainLoopUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype MainLoop = MainLoop (ForeignPtr MainLoop)-foreign import ccall "g_main_loop_get_type" c_g_main_loop_get_type :: - IO GType--instance BoxedObject MainLoop where- boxedType _ = c_g_main_loop_get_type--noMainLoop :: Maybe MainLoop-noMainLoop = Nothing---type instance AttributeList MainLoop = MainLoopAttributeList-type MainLoopAttributeList = ('[ ] :: [(Symbol, *)])---- method MainLoop::new--- method type : Constructor--- Args : [Arg {argCName = "context", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_running", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MainLoop")--- throws : False--- Skip return : False--foreign import ccall "g_main_loop_new" g_main_loop_new :: - Ptr MainContext -> -- context : TInterface "GLib" "MainContext"- CInt -> -- is_running : TBasicType TBoolean- IO (Ptr MainLoop)---mainLoopNew ::- (MonadIO m) =>- Maybe (MainContext) -- context- -> Bool -- isRunning- -> m MainLoop -- result-mainLoopNew context isRunning = liftIO $ do- maybeContext <- case context of- Nothing -> return nullPtr- Just jContext -> do- let jContext' = unsafeManagedPtrGetPtr jContext- return jContext'- let isRunning' = (fromIntegral . fromEnum) isRunning- result <- g_main_loop_new maybeContext isRunning'- checkUnexpectedReturnNULL "g_main_loop_new" result- result' <- (wrapBoxed MainLoop) result- whenJust context touchManagedPtr- return result'---- method MainLoop::get_context--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainLoop", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MainContext")--- throws : False--- Skip return : False--foreign import ccall "g_main_loop_get_context" g_main_loop_get_context :: - Ptr MainLoop -> -- _obj : TInterface "GLib" "MainLoop"- IO (Ptr MainContext)---mainLoopGetContext ::- (MonadIO m) =>- MainLoop -- _obj- -> m MainContext -- result-mainLoopGetContext _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_loop_get_context _obj'- checkUnexpectedReturnNULL "g_main_loop_get_context" result- result' <- (newBoxed MainContext) result- touchManagedPtr _obj- return result'--data MainLoopGetContextMethodInfo-instance (signature ~ (m MainContext), MonadIO m) => MethodInfo MainLoopGetContextMethodInfo MainLoop signature where- overloadedMethod _ = mainLoopGetContext---- method MainLoop::is_running--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainLoop", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_main_loop_is_running" g_main_loop_is_running :: - Ptr MainLoop -> -- _obj : TInterface "GLib" "MainLoop"- IO CInt---mainLoopIsRunning ::- (MonadIO m) =>- MainLoop -- _obj- -> m Bool -- result-mainLoopIsRunning _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_loop_is_running _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MainLoopIsRunningMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo MainLoopIsRunningMethodInfo MainLoop signature where- overloadedMethod _ = mainLoopIsRunning---- method MainLoop::quit--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainLoop", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_loop_quit" g_main_loop_quit :: - Ptr MainLoop -> -- _obj : TInterface "GLib" "MainLoop"- IO ()---mainLoopQuit ::- (MonadIO m) =>- MainLoop -- _obj- -> m () -- result-mainLoopQuit _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_loop_quit _obj'- touchManagedPtr _obj- return ()--data MainLoopQuitMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainLoopQuitMethodInfo MainLoop signature where- overloadedMethod _ = mainLoopQuit---- method MainLoop::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainLoop", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MainLoop")--- throws : False--- Skip return : False--foreign import ccall "g_main_loop_ref" g_main_loop_ref :: - Ptr MainLoop -> -- _obj : TInterface "GLib" "MainLoop"- IO (Ptr MainLoop)---mainLoopRef ::- (MonadIO m) =>- MainLoop -- _obj- -> m MainLoop -- result-mainLoopRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_main_loop_ref _obj'- checkUnexpectedReturnNULL "g_main_loop_ref" result- result' <- (wrapBoxed MainLoop) result- touchManagedPtr _obj- return result'--data MainLoopRefMethodInfo-instance (signature ~ (m MainLoop), MonadIO m) => MethodInfo MainLoopRefMethodInfo MainLoop signature where- overloadedMethod _ = mainLoopRef---- method MainLoop::run--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainLoop", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_loop_run" g_main_loop_run :: - Ptr MainLoop -> -- _obj : TInterface "GLib" "MainLoop"- IO ()---mainLoopRun ::- (MonadIO m) =>- MainLoop -- _obj- -> m () -- result-mainLoopRun _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_loop_run _obj'- touchManagedPtr _obj- return ()--data MainLoopRunMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainLoopRunMethodInfo MainLoop signature where- overloadedMethod _ = mainLoopRun---- method MainLoop::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MainLoop", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_main_loop_unref" g_main_loop_unref :: - Ptr MainLoop -> -- _obj : TInterface "GLib" "MainLoop"- IO ()---mainLoopUnref ::- (MonadIO m) =>- MainLoop -- _obj- -> m () -- result-mainLoopUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_main_loop_unref _obj'- touchManagedPtr _obj- return ()--data MainLoopUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MainLoopUnrefMethodInfo MainLoop signature where- overloadedMethod _ = mainLoopUnref--type family ResolveMainLoopMethod (t :: Symbol) (o :: *) :: * where- ResolveMainLoopMethod "isRunning" o = MainLoopIsRunningMethodInfo- ResolveMainLoopMethod "quit" o = MainLoopQuitMethodInfo- ResolveMainLoopMethod "ref" o = MainLoopRefMethodInfo- ResolveMainLoopMethod "run" o = MainLoopRunMethodInfo- ResolveMainLoopMethod "unref" o = MainLoopUnrefMethodInfo- ResolveMainLoopMethod "getContext" o = MainLoopGetContextMethodInfo- ResolveMainLoopMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMainLoopMethod t MainLoop, MethodInfo info MainLoop p) => IsLabelProxy t (MainLoop -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMainLoopMethod t MainLoop, MethodInfo info MainLoop p) => IsLabel t (MainLoop -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/MainLoop.hs-boot
@@ -1,17 +0,0 @@-module GI.GLib.Structs.MainLoop where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype MainLoop = MainLoop (ForeignPtr MainLoop)-instance BoxedObject MainLoop where-data MainLoopGetContextMethodInfo-data MainLoopIsRunningMethodInfo-data MainLoopQuitMethodInfo-data MainLoopRefMethodInfo-data MainLoopRunMethodInfo-data MainLoopUnrefMethodInfo
− GI/GLib/Structs/MappedFile.hs
@@ -1,338 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GMappedFile represents a file mapping created with-g_mapped_file_new(). It has only private members and should-not be accessed directly.--}--module GI.GLib.Structs.MappedFile- ( ---- * Exported types- MappedFile(..) ,- noMappedFile ,--- -- * Methods--- ** mappedFileFree- MappedFileFreeMethodInfo ,- mappedFileFree ,----- ** mappedFileGetBytes- MappedFileGetBytesMethodInfo ,- mappedFileGetBytes ,----- ** mappedFileGetContents- MappedFileGetContentsMethodInfo ,- mappedFileGetContents ,----- ** mappedFileGetLength- MappedFileGetLengthMethodInfo ,- mappedFileGetLength ,----- ** mappedFileNew- mappedFileNew ,----- ** mappedFileNewFromFd- mappedFileNewFromFd ,----- ** mappedFileRef- MappedFileRefMethodInfo ,- mappedFileRef ,----- ** mappedFileUnref- MappedFileUnrefMethodInfo ,- mappedFileUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype MappedFile = MappedFile (ForeignPtr MappedFile)-foreign import ccall "g_mapped_file_get_type" c_g_mapped_file_get_type :: - IO GType--instance BoxedObject MappedFile where- boxedType _ = c_g_mapped_file_get_type--noMappedFile :: Maybe MappedFile-noMappedFile = Nothing---type instance AttributeList MappedFile = MappedFileAttributeList-type MappedFileAttributeList = ('[ ] :: [(Symbol, *)])---- method MappedFile::new--- method type : Constructor--- Args : [Arg {argCName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MappedFile")--- throws : True--- Skip return : False--foreign import ccall "g_mapped_file_new" g_mapped_file_new :: - CString -> -- filename : TBasicType TUTF8- CInt -> -- writable : TBasicType TBoolean- Ptr (Ptr GError) -> -- error- IO (Ptr MappedFile)---mappedFileNew ::- (MonadIO m) =>- T.Text -- filename- -> Bool -- writable- -> m MappedFile -- result-mappedFileNew filename writable = liftIO $ do- filename' <- textToCString filename- let writable' = (fromIntegral . fromEnum) writable- onException (do- result <- propagateGError $ g_mapped_file_new filename' writable'- checkUnexpectedReturnNULL "g_mapped_file_new" result- result' <- (wrapBoxed MappedFile) result- freeMem filename'- return result'- ) (do- freeMem filename'- )---- method MappedFile::new_from_fd--- method type : Constructor--- Args : [Arg {argCName = "fd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "writable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MappedFile")--- throws : True--- Skip return : False--foreign import ccall "g_mapped_file_new_from_fd" g_mapped_file_new_from_fd :: - Int32 -> -- fd : TBasicType TInt- CInt -> -- writable : TBasicType TBoolean- Ptr (Ptr GError) -> -- error- IO (Ptr MappedFile)---mappedFileNewFromFd ::- (MonadIO m) =>- Int32 -- fd- -> Bool -- writable- -> m MappedFile -- result-mappedFileNewFromFd fd writable = liftIO $ do- let writable' = (fromIntegral . fromEnum) writable- onException (do- result <- propagateGError $ g_mapped_file_new_from_fd fd writable'- checkUnexpectedReturnNULL "g_mapped_file_new_from_fd" result- result' <- (wrapBoxed MappedFile) result- return result'- ) (do- return ()- )---- method MappedFile::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MappedFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mapped_file_free" g_mapped_file_free :: - Ptr MappedFile -> -- _obj : TInterface "GLib" "MappedFile"- IO ()--{-# DEPRECATED mappedFileFree ["(Since version 2.22)","Use g_mapped_file_unref() instead."]#-}-mappedFileFree ::- (MonadIO m) =>- MappedFile -- _obj- -> m () -- result-mappedFileFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_mapped_file_free _obj'- touchManagedPtr _obj- return ()--data MappedFileFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MappedFileFreeMethodInfo MappedFile signature where- overloadedMethod _ = mappedFileFree---- method MappedFile::get_bytes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MappedFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Bytes")--- throws : False--- Skip return : False--foreign import ccall "g_mapped_file_get_bytes" g_mapped_file_get_bytes :: - Ptr MappedFile -> -- _obj : TInterface "GLib" "MappedFile"- IO (Ptr Bytes)---mappedFileGetBytes ::- (MonadIO m) =>- MappedFile -- _obj- -> m Bytes -- result-mappedFileGetBytes _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_mapped_file_get_bytes _obj'- checkUnexpectedReturnNULL "g_mapped_file_get_bytes" result- result' <- (wrapBoxed Bytes) result- touchManagedPtr _obj- return result'--data MappedFileGetBytesMethodInfo-instance (signature ~ (m Bytes), MonadIO m) => MethodInfo MappedFileGetBytesMethodInfo MappedFile signature where- overloadedMethod _ = mappedFileGetBytes---- method MappedFile::get_contents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MappedFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_mapped_file_get_contents" g_mapped_file_get_contents :: - Ptr MappedFile -> -- _obj : TInterface "GLib" "MappedFile"- IO CString---mappedFileGetContents ::- (MonadIO m) =>- MappedFile -- _obj- -> m T.Text -- result-mappedFileGetContents _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_mapped_file_get_contents _obj'- checkUnexpectedReturnNULL "g_mapped_file_get_contents" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- return result'--data MappedFileGetContentsMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo MappedFileGetContentsMethodInfo MappedFile signature where- overloadedMethod _ = mappedFileGetContents---- method MappedFile::get_length--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MappedFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_mapped_file_get_length" g_mapped_file_get_length :: - Ptr MappedFile -> -- _obj : TInterface "GLib" "MappedFile"- IO Word64---mappedFileGetLength ::- (MonadIO m) =>- MappedFile -- _obj- -> m Word64 -- result-mappedFileGetLength _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_mapped_file_get_length _obj'- touchManagedPtr _obj- return result--data MappedFileGetLengthMethodInfo-instance (signature ~ (m Word64), MonadIO m) => MethodInfo MappedFileGetLengthMethodInfo MappedFile signature where- overloadedMethod _ = mappedFileGetLength---- method MappedFile::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MappedFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MappedFile")--- throws : False--- Skip return : False--foreign import ccall "g_mapped_file_ref" g_mapped_file_ref :: - Ptr MappedFile -> -- _obj : TInterface "GLib" "MappedFile"- IO (Ptr MappedFile)---mappedFileRef ::- (MonadIO m) =>- MappedFile -- _obj- -> m MappedFile -- result-mappedFileRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_mapped_file_ref _obj'- checkUnexpectedReturnNULL "g_mapped_file_ref" result- result' <- (wrapBoxed MappedFile) result- touchManagedPtr _obj- return result'--data MappedFileRefMethodInfo-instance (signature ~ (m MappedFile), MonadIO m) => MethodInfo MappedFileRefMethodInfo MappedFile signature where- overloadedMethod _ = mappedFileRef---- method MappedFile::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MappedFile", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mapped_file_unref" g_mapped_file_unref :: - Ptr MappedFile -> -- _obj : TInterface "GLib" "MappedFile"- IO ()---mappedFileUnref ::- (MonadIO m) =>- MappedFile -- _obj- -> m () -- result-mappedFileUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_mapped_file_unref _obj'- touchManagedPtr _obj- return ()--data MappedFileUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MappedFileUnrefMethodInfo MappedFile signature where- overloadedMethod _ = mappedFileUnref--type family ResolveMappedFileMethod (t :: Symbol) (o :: *) :: * where- ResolveMappedFileMethod "free" o = MappedFileFreeMethodInfo- ResolveMappedFileMethod "ref" o = MappedFileRefMethodInfo- ResolveMappedFileMethod "unref" o = MappedFileUnrefMethodInfo- ResolveMappedFileMethod "getBytes" o = MappedFileGetBytesMethodInfo- ResolveMappedFileMethod "getContents" o = MappedFileGetContentsMethodInfo- ResolveMappedFileMethod "getLength" o = MappedFileGetLengthMethodInfo- ResolveMappedFileMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMappedFileMethod t MappedFile, MethodInfo info MappedFile p) => IsLabelProxy t (MappedFile -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMappedFileMethod t MappedFile, MethodInfo info MappedFile p) => IsLabel t (MappedFile -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/MappedFile.hs-boot
@@ -1,17 +0,0 @@-module GI.GLib.Structs.MappedFile where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype MappedFile = MappedFile (ForeignPtr MappedFile)-instance BoxedObject MappedFile where-data MappedFileFreeMethodInfo-data MappedFileGetBytesMethodInfo-data MappedFileGetContentsMethodInfo-data MappedFileGetLengthMethodInfo-data MappedFileRefMethodInfo-data MappedFileUnrefMethodInfo
− GI/GLib/Structs/MarkupParseContext.hs
@@ -1,359 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A parse context is used to parse a stream of bytes that-you expect to contain marked-up text.--See g_markup_parse_context_new(), #GMarkupParser, and so-on for more details.--}--module GI.GLib.Structs.MarkupParseContext- ( ---- * Exported types- MarkupParseContext(..) ,- noMarkupParseContext ,--- -- * Methods--- ** markupParseContextEndParse- MarkupParseContextEndParseMethodInfo ,- markupParseContextEndParse ,----- ** markupParseContextFree- MarkupParseContextFreeMethodInfo ,- markupParseContextFree ,----- ** markupParseContextGetElement- MarkupParseContextGetElementMethodInfo ,- markupParseContextGetElement ,----- ** markupParseContextNew- markupParseContextNew ,----- ** markupParseContextParse- MarkupParseContextParseMethodInfo ,- markupParseContextParse ,----- ** markupParseContextPush- MarkupParseContextPushMethodInfo ,- markupParseContextPush ,----- ** markupParseContextRef- MarkupParseContextRefMethodInfo ,- markupParseContextRef ,----- ** markupParseContextUnref- MarkupParseContextUnrefMethodInfo ,- markupParseContextUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype MarkupParseContext = MarkupParseContext (ForeignPtr MarkupParseContext)-foreign import ccall "g_markup_parse_context_get_type" c_g_markup_parse_context_get_type :: - IO GType--instance BoxedObject MarkupParseContext where- boxedType _ = c_g_markup_parse_context_get_type--noMarkupParseContext :: Maybe MarkupParseContext-noMarkupParseContext = Nothing---type instance AttributeList MarkupParseContext = MarkupParseContextAttributeList-type MarkupParseContextAttributeList = ('[ ] :: [(Symbol, *)])---- method MarkupParseContext::new--- method type : Constructor--- Args : [Arg {argCName = "parser", argType = TInterface "GLib" "MarkupParser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "MarkupParseFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data_dnotify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MarkupParseContext")--- throws : False--- Skip return : False--foreign import ccall "g_markup_parse_context_new" g_markup_parse_context_new :: - Ptr MarkupParser -> -- parser : TInterface "GLib" "MarkupParser"- CUInt -> -- flags : TInterface "GLib" "MarkupParseFlags"- Ptr () -> -- user_data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- user_data_dnotify : TInterface "GLib" "DestroyNotify"- IO (Ptr MarkupParseContext)---markupParseContextNew ::- (MonadIO m) =>- MarkupParser -- parser- -> [MarkupParseFlags] -- flags- -> Ptr () -- userData- -> DestroyNotify -- userDataDnotify- -> m MarkupParseContext -- result-markupParseContextNew parser flags userData userDataDnotify = liftIO $ do- let parser' = unsafeManagedPtrGetPtr parser- let flags' = gflagsToWord flags- ptruserDataDnotify <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- userDataDnotify' <- mkDestroyNotify (destroyNotifyWrapper (Just ptruserDataDnotify) userDataDnotify)- poke ptruserDataDnotify userDataDnotify'- result <- g_markup_parse_context_new parser' flags' userData userDataDnotify'- checkUnexpectedReturnNULL "g_markup_parse_context_new" result- result' <- (wrapBoxed MarkupParseContext) result- touchManagedPtr parser- return result'---- method MarkupParseContext::end_parse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MarkupParseContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_markup_parse_context_end_parse" g_markup_parse_context_end_parse :: - Ptr MarkupParseContext -> -- _obj : TInterface "GLib" "MarkupParseContext"- Ptr (Ptr GError) -> -- error- IO CInt---markupParseContextEndParse ::- (MonadIO m) =>- MarkupParseContext -- _obj- -> m () -- result-markupParseContextEndParse _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- onException (do- _ <- propagateGError $ g_markup_parse_context_end_parse _obj'- touchManagedPtr _obj- return ()- ) (do- return ()- )--data MarkupParseContextEndParseMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MarkupParseContextEndParseMethodInfo MarkupParseContext signature where- overloadedMethod _ = markupParseContextEndParse---- method MarkupParseContext::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MarkupParseContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_markup_parse_context_free" g_markup_parse_context_free :: - Ptr MarkupParseContext -> -- _obj : TInterface "GLib" "MarkupParseContext"- IO ()---markupParseContextFree ::- (MonadIO m) =>- MarkupParseContext -- _obj- -> m () -- result-markupParseContextFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_markup_parse_context_free _obj'- touchManagedPtr _obj- return ()--data MarkupParseContextFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MarkupParseContextFreeMethodInfo MarkupParseContext signature where- overloadedMethod _ = markupParseContextFree---- method MarkupParseContext::get_element--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MarkupParseContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_markup_parse_context_get_element" g_markup_parse_context_get_element :: - Ptr MarkupParseContext -> -- _obj : TInterface "GLib" "MarkupParseContext"- IO CString---markupParseContextGetElement ::- (MonadIO m) =>- MarkupParseContext -- _obj- -> m T.Text -- result-markupParseContextGetElement _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_markup_parse_context_get_element _obj'- checkUnexpectedReturnNULL "g_markup_parse_context_get_element" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data MarkupParseContextGetElementMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo MarkupParseContextGetElementMethodInfo MarkupParseContext signature where- overloadedMethod _ = markupParseContextGetElement---- method MarkupParseContext::parse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MarkupParseContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_markup_parse_context_parse" g_markup_parse_context_parse :: - Ptr MarkupParseContext -> -- _obj : TInterface "GLib" "MarkupParseContext"- CString -> -- text : TBasicType TUTF8- Int64 -> -- text_len : TBasicType TInt64- Ptr (Ptr GError) -> -- error- IO CInt---markupParseContextParse ::- (MonadIO m) =>- MarkupParseContext -- _obj- -> T.Text -- text- -> Int64 -- textLen- -> m () -- result-markupParseContextParse _obj text textLen = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- text' <- textToCString text- onException (do- _ <- propagateGError $ g_markup_parse_context_parse _obj' text' textLen- touchManagedPtr _obj- freeMem text'- return ()- ) (do- freeMem text'- )--data MarkupParseContextParseMethodInfo-instance (signature ~ (T.Text -> Int64 -> m ()), MonadIO m) => MethodInfo MarkupParseContextParseMethodInfo MarkupParseContext signature where- overloadedMethod _ = markupParseContextParse---- method MarkupParseContext::push--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MarkupParseContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parser", argType = TInterface "GLib" "MarkupParser", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_markup_parse_context_push" g_markup_parse_context_push :: - Ptr MarkupParseContext -> -- _obj : TInterface "GLib" "MarkupParseContext"- Ptr MarkupParser -> -- parser : TInterface "GLib" "MarkupParser"- Ptr () -> -- user_data : TBasicType TPtr- IO ()---markupParseContextPush ::- (MonadIO m) =>- MarkupParseContext -- _obj- -> MarkupParser -- parser- -> Ptr () -- userData- -> m () -- result-markupParseContextPush _obj parser userData = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let parser' = unsafeManagedPtrGetPtr parser- g_markup_parse_context_push _obj' parser' userData- touchManagedPtr _obj- touchManagedPtr parser- return ()--data MarkupParseContextPushMethodInfo-instance (signature ~ (MarkupParser -> Ptr () -> m ()), MonadIO m) => MethodInfo MarkupParseContextPushMethodInfo MarkupParseContext signature where- overloadedMethod _ = markupParseContextPush---- method MarkupParseContext::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MarkupParseContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MarkupParseContext")--- throws : False--- Skip return : False--foreign import ccall "g_markup_parse_context_ref" g_markup_parse_context_ref :: - Ptr MarkupParseContext -> -- _obj : TInterface "GLib" "MarkupParseContext"- IO (Ptr MarkupParseContext)---markupParseContextRef ::- (MonadIO m) =>- MarkupParseContext -- _obj- -> m MarkupParseContext -- result-markupParseContextRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_markup_parse_context_ref _obj'- checkUnexpectedReturnNULL "g_markup_parse_context_ref" result- result' <- (wrapBoxed MarkupParseContext) result- touchManagedPtr _obj- return result'--data MarkupParseContextRefMethodInfo-instance (signature ~ (m MarkupParseContext), MonadIO m) => MethodInfo MarkupParseContextRefMethodInfo MarkupParseContext signature where- overloadedMethod _ = markupParseContextRef---- method MarkupParseContext::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MarkupParseContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_markup_parse_context_unref" g_markup_parse_context_unref :: - Ptr MarkupParseContext -> -- _obj : TInterface "GLib" "MarkupParseContext"- IO ()---markupParseContextUnref ::- (MonadIO m) =>- MarkupParseContext -- _obj- -> m () -- result-markupParseContextUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_markup_parse_context_unref _obj'- touchManagedPtr _obj- return ()--data MarkupParseContextUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MarkupParseContextUnrefMethodInfo MarkupParseContext signature where- overloadedMethod _ = markupParseContextUnref--type family ResolveMarkupParseContextMethod (t :: Symbol) (o :: *) :: * where- ResolveMarkupParseContextMethod "endParse" o = MarkupParseContextEndParseMethodInfo- ResolveMarkupParseContextMethod "free" o = MarkupParseContextFreeMethodInfo- ResolveMarkupParseContextMethod "parse" o = MarkupParseContextParseMethodInfo- ResolveMarkupParseContextMethod "push" o = MarkupParseContextPushMethodInfo- ResolveMarkupParseContextMethod "ref" o = MarkupParseContextRefMethodInfo- ResolveMarkupParseContextMethod "unref" o = MarkupParseContextUnrefMethodInfo- ResolveMarkupParseContextMethod "getElement" o = MarkupParseContextGetElementMethodInfo- ResolveMarkupParseContextMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMarkupParseContextMethod t MarkupParseContext, MethodInfo info MarkupParseContext p) => IsLabelProxy t (MarkupParseContext -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMarkupParseContextMethod t MarkupParseContext, MethodInfo info MarkupParseContext p) => IsLabel t (MarkupParseContext -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/MarkupParseContext.hs-boot
@@ -1,18 +0,0 @@-module GI.GLib.Structs.MarkupParseContext where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype MarkupParseContext = MarkupParseContext (ForeignPtr MarkupParseContext)-instance BoxedObject MarkupParseContext where-data MarkupParseContextEndParseMethodInfo-data MarkupParseContextFreeMethodInfo-data MarkupParseContextGetElementMethodInfo-data MarkupParseContextParseMethodInfo-data MarkupParseContextPushMethodInfo-data MarkupParseContextRefMethodInfo-data MarkupParseContextUnrefMethodInfo
− GI/GLib/Structs/MarkupParser.hs
@@ -1,78 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Any of the fields in #GMarkupParser can be %NULL, in which case they-will be ignored. Except for the @error function, any of these callbacks-can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,-%G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT-errors are intended to be set from these callbacks. If you set an error-from a callback, g_markup_parse_context_parse() will report that error-back to its caller.--}--module GI.GLib.Structs.MarkupParser- ( ---- * Exported types- MarkupParser(..) ,- newZeroMarkupParser ,- noMarkupParser ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype MarkupParser = MarkupParser (ForeignPtr MarkupParser)-instance WrappedPtr MarkupParser where- wrappedPtrCalloc = callocBytes 40- wrappedPtrCopy = copyPtr 40- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `MarkupParser` struct initialized to zero.-newZeroMarkupParser :: MonadIO m => m MarkupParser-newZeroMarkupParser = liftIO $ wrappedPtrCalloc >>= wrapPtr MarkupParser--instance tag ~ 'AttrSet => Constructible MarkupParser tag where- new _ attrs = do- o <- newZeroMarkupParser- GI.Attributes.set o attrs- return o---noMarkupParser :: Maybe MarkupParser-noMarkupParser = Nothing---- XXX Skipped attribute for "MarkupParser:start_element" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "MarkupParser:end_element" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "MarkupParser:text" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "MarkupParser:passthrough" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "MarkupParser:error" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--type instance AttributeList MarkupParser = MarkupParserAttributeList-type MarkupParserAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveMarkupParserMethod (t :: Symbol) (o :: *) :: * where- ResolveMarkupParserMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMarkupParserMethod t MarkupParser, MethodInfo info MarkupParser p) => IsLabelProxy t (MarkupParser -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMarkupParserMethod t MarkupParser, MethodInfo info MarkupParser p) => IsLabel t (MarkupParser -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/MarkupParser.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.MarkupParser where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype MarkupParser = MarkupParser (ForeignPtr MarkupParser)-instance WrappedPtr MarkupParser where
− GI/GLib/Structs/MatchInfo.hs
@@ -1,620 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A GMatchInfo is an opaque struct used to return information about-matches.--}--module GI.GLib.Structs.MatchInfo- ( ---- * Exported types- MatchInfo(..) ,- noMatchInfo ,--- -- * Methods--- ** matchInfoExpandReferences- MatchInfoExpandReferencesMethodInfo ,- matchInfoExpandReferences ,----- ** matchInfoFetch- MatchInfoFetchMethodInfo ,- matchInfoFetch ,----- ** matchInfoFetchAll- MatchInfoFetchAllMethodInfo ,- matchInfoFetchAll ,----- ** matchInfoFetchNamed- MatchInfoFetchNamedMethodInfo ,- matchInfoFetchNamed ,----- ** matchInfoFetchNamedPos- MatchInfoFetchNamedPosMethodInfo ,- matchInfoFetchNamedPos ,----- ** matchInfoFetchPos- MatchInfoFetchPosMethodInfo ,- matchInfoFetchPos ,----- ** matchInfoFree- MatchInfoFreeMethodInfo ,- matchInfoFree ,----- ** matchInfoGetMatchCount- MatchInfoGetMatchCountMethodInfo ,- matchInfoGetMatchCount ,----- ** matchInfoGetRegex- MatchInfoGetRegexMethodInfo ,- matchInfoGetRegex ,----- ** matchInfoGetString- MatchInfoGetStringMethodInfo ,- matchInfoGetString ,----- ** matchInfoIsPartialMatch- MatchInfoIsPartialMatchMethodInfo ,- matchInfoIsPartialMatch ,----- ** matchInfoMatches- MatchInfoMatchesMethodInfo ,- matchInfoMatches ,----- ** matchInfoNext- MatchInfoNextMethodInfo ,- matchInfoNext ,----- ** matchInfoRef- MatchInfoRefMethodInfo ,- matchInfoRef ,----- ** matchInfoUnref- MatchInfoUnrefMethodInfo ,- matchInfoUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype MatchInfo = MatchInfo (ForeignPtr MatchInfo)-foreign import ccall "g_match_info_get_type" c_g_match_info_get_type :: - IO GType--instance BoxedObject MatchInfo where- boxedType _ = c_g_match_info_get_type--noMatchInfo :: Maybe MatchInfo-noMatchInfo = Nothing---type instance AttributeList MatchInfo = MatchInfoAttributeList-type MatchInfoAttributeList = ('[ ] :: [(Symbol, *)])---- method MatchInfo::expand_references--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_to_expand", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_match_info_expand_references" g_match_info_expand_references :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- CString -> -- string_to_expand : TBasicType TUTF8- Ptr (Ptr GError) -> -- error- IO CString---matchInfoExpandReferences ::- (MonadIO m) =>- MatchInfo -- _obj- -> T.Text -- stringToExpand- -> m T.Text -- result-matchInfoExpandReferences _obj stringToExpand = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- stringToExpand' <- textToCString stringToExpand- onException (do- result <- propagateGError $ g_match_info_expand_references _obj' stringToExpand'- checkUnexpectedReturnNULL "g_match_info_expand_references" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem stringToExpand'- return result'- ) (do- freeMem stringToExpand'- )--data MatchInfoExpandReferencesMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m) => MethodInfo MatchInfoExpandReferencesMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoExpandReferences---- method MatchInfo::fetch--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_fetch" g_match_info_fetch :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- Int32 -> -- match_num : TBasicType TInt- IO CString---matchInfoFetch ::- (MonadIO m) =>- MatchInfo -- _obj- -> Int32 -- matchNum- -> m T.Text -- result-matchInfoFetch _obj matchNum = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_fetch _obj' matchNum- checkUnexpectedReturnNULL "g_match_info_fetch" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- return result'--data MatchInfoFetchMethodInfo-instance (signature ~ (Int32 -> m T.Text), MonadIO m) => MethodInfo MatchInfoFetchMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoFetch---- method MatchInfo::fetch_all--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_match_info_fetch_all" g_match_info_fetch_all :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO (Ptr CString)---matchInfoFetchAll ::- (MonadIO m) =>- MatchInfo -- _obj- -> m [T.Text] -- result-matchInfoFetchAll _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_fetch_all _obj'- checkUnexpectedReturnNULL "g_match_info_fetch_all" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- touchManagedPtr _obj- return result'--data MatchInfoFetchAllMethodInfo-instance (signature ~ (m [T.Text]), MonadIO m) => MethodInfo MatchInfoFetchAllMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoFetchAll---- method MatchInfo::fetch_named--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_fetch_named" g_match_info_fetch_named :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- CString -> -- name : TBasicType TUTF8- IO CString---matchInfoFetchNamed ::- (MonadIO m) =>- MatchInfo -- _obj- -> T.Text -- name- -> m T.Text -- result-matchInfoFetchNamed _obj name = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- name' <- textToCString name- result <- g_match_info_fetch_named _obj' name'- checkUnexpectedReturnNULL "g_match_info_fetch_named" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem name'- return result'--data MatchInfoFetchNamedMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m) => MethodInfo MatchInfoFetchNamedMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoFetchNamed---- method MatchInfo::fetch_named_pos--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_pos", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "end_pos", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_fetch_named_pos" g_match_info_fetch_named_pos :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- CString -> -- name : TBasicType TUTF8- Ptr Int32 -> -- start_pos : TBasicType TInt- Ptr Int32 -> -- end_pos : TBasicType TInt- IO CInt---matchInfoFetchNamedPos ::- (MonadIO m) =>- MatchInfo -- _obj- -> T.Text -- name- -> m (Bool,Int32,Int32) -- result-matchInfoFetchNamedPos _obj name = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- name' <- textToCString name- startPos <- allocMem :: IO (Ptr Int32)- endPos <- allocMem :: IO (Ptr Int32)- result <- g_match_info_fetch_named_pos _obj' name' startPos endPos- let result' = (/= 0) result- startPos' <- peek startPos- endPos' <- peek endPos- touchManagedPtr _obj- freeMem name'- freeMem startPos- freeMem endPos- return (result', startPos', endPos')--data MatchInfoFetchNamedPosMethodInfo-instance (signature ~ (T.Text -> m (Bool,Int32,Int32)), MonadIO m) => MethodInfo MatchInfoFetchNamedPosMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoFetchNamedPos---- method MatchInfo::fetch_pos--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_pos", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "end_pos", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_fetch_pos" g_match_info_fetch_pos :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- Int32 -> -- match_num : TBasicType TInt- Ptr Int32 -> -- start_pos : TBasicType TInt- Ptr Int32 -> -- end_pos : TBasicType TInt- IO CInt---matchInfoFetchPos ::- (MonadIO m) =>- MatchInfo -- _obj- -> Int32 -- matchNum- -> m (Bool,Int32,Int32) -- result-matchInfoFetchPos _obj matchNum = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- startPos <- allocMem :: IO (Ptr Int32)- endPos <- allocMem :: IO (Ptr Int32)- result <- g_match_info_fetch_pos _obj' matchNum startPos endPos- let result' = (/= 0) result- startPos' <- peek startPos- endPos' <- peek endPos- touchManagedPtr _obj- freeMem startPos- freeMem endPos- return (result', startPos', endPos')--data MatchInfoFetchPosMethodInfo-instance (signature ~ (Int32 -> m (Bool,Int32,Int32)), MonadIO m) => MethodInfo MatchInfoFetchPosMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoFetchPos---- method MatchInfo::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_match_info_free" g_match_info_free :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO ()---matchInfoFree ::- (MonadIO m) =>- MatchInfo -- _obj- -> m () -- result-matchInfoFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_match_info_free _obj'- touchManagedPtr _obj- return ()--data MatchInfoFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MatchInfoFreeMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoFree---- method MatchInfo::get_match_count--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_get_match_count" g_match_info_get_match_count :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO Int32---matchInfoGetMatchCount ::- (MonadIO m) =>- MatchInfo -- _obj- -> m Int32 -- result-matchInfoGetMatchCount _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_get_match_count _obj'- touchManagedPtr _obj- return result--data MatchInfoGetMatchCountMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo MatchInfoGetMatchCountMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoGetMatchCount---- method MatchInfo::get_regex--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Regex")--- throws : False--- Skip return : False--foreign import ccall "g_match_info_get_regex" g_match_info_get_regex :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO (Ptr Regex)---matchInfoGetRegex ::- (MonadIO m) =>- MatchInfo -- _obj- -> m Regex -- result-matchInfoGetRegex _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_get_regex _obj'- checkUnexpectedReturnNULL "g_match_info_get_regex" result- result' <- (wrapBoxed Regex) result- touchManagedPtr _obj- return result'--data MatchInfoGetRegexMethodInfo-instance (signature ~ (m Regex), MonadIO m) => MethodInfo MatchInfoGetRegexMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoGetRegex---- method MatchInfo::get_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_get_string" g_match_info_get_string :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO CString---matchInfoGetString ::- (MonadIO m) =>- MatchInfo -- _obj- -> m T.Text -- result-matchInfoGetString _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_get_string _obj'- checkUnexpectedReturnNULL "g_match_info_get_string" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data MatchInfoGetStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo MatchInfoGetStringMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoGetString---- method MatchInfo::is_partial_match--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_is_partial_match" g_match_info_is_partial_match :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO CInt---matchInfoIsPartialMatch ::- (MonadIO m) =>- MatchInfo -- _obj- -> m Bool -- result-matchInfoIsPartialMatch _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_is_partial_match _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MatchInfoIsPartialMatchMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo MatchInfoIsPartialMatchMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoIsPartialMatch---- method MatchInfo::matches--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_match_info_matches" g_match_info_matches :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO CInt---matchInfoMatches ::- (MonadIO m) =>- MatchInfo -- _obj- -> m Bool -- result-matchInfoMatches _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_matches _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MatchInfoMatchesMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo MatchInfoMatchesMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoMatches---- method MatchInfo::next--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_match_info_next" g_match_info_next :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- Ptr (Ptr GError) -> -- error- IO CInt---matchInfoNext ::- (MonadIO m) =>- MatchInfo -- _obj- -> m () -- result-matchInfoNext _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- onException (do- _ <- propagateGError $ g_match_info_next _obj'- touchManagedPtr _obj- return ()- ) (do- return ()- )--data MatchInfoNextMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MatchInfoNextMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoNext---- method MatchInfo::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MatchInfo")--- throws : False--- Skip return : False--foreign import ccall "g_match_info_ref" g_match_info_ref :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO (Ptr MatchInfo)---matchInfoRef ::- (MonadIO m) =>- MatchInfo -- _obj- -> m MatchInfo -- result-matchInfoRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_match_info_ref _obj'- checkUnexpectedReturnNULL "g_match_info_ref" result- result' <- (wrapBoxed MatchInfo) result- touchManagedPtr _obj- return result'--data MatchInfoRefMethodInfo-instance (signature ~ (m MatchInfo), MonadIO m) => MethodInfo MatchInfoRefMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoRef---- method MatchInfo::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "MatchInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_match_info_unref" g_match_info_unref :: - Ptr MatchInfo -> -- _obj : TInterface "GLib" "MatchInfo"- IO ()---matchInfoUnref ::- (MonadIO m) =>- MatchInfo -- _obj- -> m () -- result-matchInfoUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_match_info_unref _obj'- touchManagedPtr _obj- return ()--data MatchInfoUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MatchInfoUnrefMethodInfo MatchInfo signature where- overloadedMethod _ = matchInfoUnref--type family ResolveMatchInfoMethod (t :: Symbol) (o :: *) :: * where- ResolveMatchInfoMethod "expandReferences" o = MatchInfoExpandReferencesMethodInfo- ResolveMatchInfoMethod "fetch" o = MatchInfoFetchMethodInfo- ResolveMatchInfoMethod "fetchAll" o = MatchInfoFetchAllMethodInfo- ResolveMatchInfoMethod "fetchNamed" o = MatchInfoFetchNamedMethodInfo- ResolveMatchInfoMethod "fetchNamedPos" o = MatchInfoFetchNamedPosMethodInfo- ResolveMatchInfoMethod "fetchPos" o = MatchInfoFetchPosMethodInfo- ResolveMatchInfoMethod "free" o = MatchInfoFreeMethodInfo- ResolveMatchInfoMethod "isPartialMatch" o = MatchInfoIsPartialMatchMethodInfo- ResolveMatchInfoMethod "matches" o = MatchInfoMatchesMethodInfo- ResolveMatchInfoMethod "next" o = MatchInfoNextMethodInfo- ResolveMatchInfoMethod "ref" o = MatchInfoRefMethodInfo- ResolveMatchInfoMethod "unref" o = MatchInfoUnrefMethodInfo- ResolveMatchInfoMethod "getMatchCount" o = MatchInfoGetMatchCountMethodInfo- ResolveMatchInfoMethod "getRegex" o = MatchInfoGetRegexMethodInfo- ResolveMatchInfoMethod "getString" o = MatchInfoGetStringMethodInfo- ResolveMatchInfoMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMatchInfoMethod t MatchInfo, MethodInfo info MatchInfo p) => IsLabelProxy t (MatchInfo -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMatchInfoMethod t MatchInfo, MethodInfo info MatchInfo p) => IsLabel t (MatchInfo -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/MatchInfo.hs-boot
@@ -1,26 +0,0 @@-module GI.GLib.Structs.MatchInfo where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype MatchInfo = MatchInfo (ForeignPtr MatchInfo)-instance BoxedObject MatchInfo where-data MatchInfoExpandReferencesMethodInfo-data MatchInfoFetchMethodInfo-data MatchInfoFetchAllMethodInfo-data MatchInfoFetchNamedMethodInfo-data MatchInfoFetchNamedPosMethodInfo-data MatchInfoFetchPosMethodInfo-data MatchInfoFreeMethodInfo-data MatchInfoGetMatchCountMethodInfo-data MatchInfoGetRegexMethodInfo-data MatchInfoGetStringMethodInfo-data MatchInfoIsPartialMatchMethodInfo-data MatchInfoMatchesMethodInfo-data MatchInfoNextMethodInfo-data MatchInfoRefMethodInfo-data MatchInfoUnrefMethodInfo
− GI/GLib/Structs/MemVTable.hs
@@ -1,72 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A set of functions used to perform memory allocation. The same #GMemVTable must-be used for all allocations in the same program; a call to g_mem_set_vtable(),-if it exists, should be prior to any use of GLib.--This functions related to this has been deprecated in 2.46, and no longer work.--}--module GI.GLib.Structs.MemVTable- ( ---- * Exported types- MemVTable(..) ,- newZeroMemVTable ,- noMemVTable ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype MemVTable = MemVTable (ForeignPtr MemVTable)-instance WrappedPtr MemVTable where- wrappedPtrCalloc = callocBytes 48- wrappedPtrCopy = copyPtr 48- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `MemVTable` struct initialized to zero.-newZeroMemVTable :: MonadIO m => m MemVTable-newZeroMemVTable = liftIO $ wrappedPtrCalloc >>= wrapPtr MemVTable--instance tag ~ 'AttrSet => Constructible MemVTable tag where- new _ attrs = do- o <- newZeroMemVTable- GI.Attributes.set o attrs- return o---noMemVTable :: Maybe MemVTable-noMemVTable = Nothing---- XXX Skipped attribute for "MemVTable:free" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--type instance AttributeList MemVTable = MemVTableAttributeList-type MemVTableAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveMemVTableMethod (t :: Symbol) (o :: *) :: * where- ResolveMemVTableMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMemVTableMethod t MemVTable, MethodInfo info MemVTable p) => IsLabelProxy t (MemVTable -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMemVTableMethod t MemVTable, MethodInfo info MemVTable p) => IsLabel t (MemVTable -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/MemVTable.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.MemVTable where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype MemVTable = MemVTable (ForeignPtr MemVTable)-instance WrappedPtr MemVTable where
− GI/GLib/Structs/Node.hs
@@ -1,609 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GNode struct represents one node in a [n-ary tree][glib-N-ary-Trees].--}--module GI.GLib.Structs.Node- ( ---- * Exported types- Node(..) ,- newZeroNode ,- noNode ,--- -- * Methods--- ** nodeChildIndex- NodeChildIndexMethodInfo ,- nodeChildIndex ,----- ** nodeChildPosition- NodeChildPositionMethodInfo ,- nodeChildPosition ,----- ** nodeDepth- NodeDepthMethodInfo ,- nodeDepth ,----- ** nodeDestroy- NodeDestroyMethodInfo ,- nodeDestroy ,----- ** nodeIsAncestor- NodeIsAncestorMethodInfo ,- nodeIsAncestor ,----- ** nodeMaxHeight- NodeMaxHeightMethodInfo ,- nodeMaxHeight ,----- ** nodeNChildren- NodeNChildrenMethodInfo ,- nodeNChildren ,----- ** nodeNNodes- NodeNNodesMethodInfo ,- nodeNNodes ,----- ** nodeReverseChildren- NodeReverseChildrenMethodInfo ,- nodeReverseChildren ,----- ** nodeUnlink- NodeUnlinkMethodInfo ,- nodeUnlink ,----- -- * Properties--- ** Children- nodeChildren ,- nodeClearChildren ,- nodeReadChildren ,- nodeWriteChildren ,----- ** Data- nodeClearData ,- nodeData ,- nodeReadData ,- nodeWriteData ,----- ** Next- nodeClearNext ,- nodeNext ,- nodeReadNext ,- nodeWriteNext ,----- ** Parent- nodeClearParent ,- nodeParent ,- nodeReadParent ,- nodeWriteParent ,----- ** Prev- nodeClearPrev ,- nodePrev ,- nodeReadPrev ,- nodeWritePrev ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Node = Node (ForeignPtr Node)-instance WrappedPtr Node where- wrappedPtrCalloc = callocBytes 40- wrappedPtrCopy = copyPtr 40- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Node` struct initialized to zero.-newZeroNode :: MonadIO m => m Node-newZeroNode = liftIO $ wrappedPtrCalloc >>= wrapPtr Node--instance tag ~ 'AttrSet => Constructible Node tag where- new _ attrs = do- o <- newZeroNode- GI.Attributes.set o attrs- return o---noNode :: Maybe Node-noNode = Nothing--nodeReadData :: MonadIO m => Node -> m (Ptr ())-nodeReadData s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())- return val--nodeWriteData :: MonadIO m => Node -> Ptr () -> m ()-nodeWriteData s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr ())--nodeClearData :: MonadIO m => Node -> m ()-nodeClearData s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: Ptr ())--data NodeDataFieldInfo-instance AttrInfo NodeDataFieldInfo where- type AttrAllowedOps NodeDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NodeDataFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint NodeDataFieldInfo = (~) Node- type AttrGetType NodeDataFieldInfo = Ptr ()- type AttrLabel NodeDataFieldInfo = "data"- attrGet _ = nodeReadData- attrSet _ = nodeWriteData- attrConstruct = undefined- attrClear _ = nodeClearData--nodeData :: AttrLabelProxy "data"-nodeData = AttrLabelProxy---nodeReadNext :: MonadIO m => Node -> m (Maybe Node)-nodeReadNext s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (Ptr Node)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Node) val'- return val''- return result--nodeWriteNext :: MonadIO m => Node -> Ptr Node -> m ()-nodeWriteNext s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Ptr Node)--nodeClearNext :: MonadIO m => Node -> m ()-nodeClearNext s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (nullPtr :: Ptr Node)--data NodeNextFieldInfo-instance AttrInfo NodeNextFieldInfo where- type AttrAllowedOps NodeNextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NodeNextFieldInfo = (~) (Ptr Node)- type AttrBaseTypeConstraint NodeNextFieldInfo = (~) Node- type AttrGetType NodeNextFieldInfo = Maybe Node- type AttrLabel NodeNextFieldInfo = "next"- attrGet _ = nodeReadNext- attrSet _ = nodeWriteNext- attrConstruct = undefined- attrClear _ = nodeClearNext--nodeNext :: AttrLabelProxy "next"-nodeNext = AttrLabelProxy---nodeReadPrev :: MonadIO m => Node -> m (Maybe Node)-nodeReadPrev s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (Ptr Node)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Node) val'- return val''- return result--nodeWritePrev :: MonadIO m => Node -> Ptr Node -> m ()-nodeWritePrev s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Ptr Node)--nodeClearPrev :: MonadIO m => Node -> m ()-nodeClearPrev s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (nullPtr :: Ptr Node)--data NodePrevFieldInfo-instance AttrInfo NodePrevFieldInfo where- type AttrAllowedOps NodePrevFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NodePrevFieldInfo = (~) (Ptr Node)- type AttrBaseTypeConstraint NodePrevFieldInfo = (~) Node- type AttrGetType NodePrevFieldInfo = Maybe Node- type AttrLabel NodePrevFieldInfo = "prev"- attrGet _ = nodeReadPrev- attrSet _ = nodeWritePrev- attrConstruct = undefined- attrClear _ = nodeClearPrev--nodePrev :: AttrLabelProxy "prev"-nodePrev = AttrLabelProxy---nodeReadParent :: MonadIO m => Node -> m (Maybe Node)-nodeReadParent s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO (Ptr Node)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Node) val'- return val''- return result--nodeWriteParent :: MonadIO m => Node -> Ptr Node -> m ()-nodeWriteParent s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Ptr Node)--nodeClearParent :: MonadIO m => Node -> m ()-nodeClearParent s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (nullPtr :: Ptr Node)--data NodeParentFieldInfo-instance AttrInfo NodeParentFieldInfo where- type AttrAllowedOps NodeParentFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NodeParentFieldInfo = (~) (Ptr Node)- type AttrBaseTypeConstraint NodeParentFieldInfo = (~) Node- type AttrGetType NodeParentFieldInfo = Maybe Node- type AttrLabel NodeParentFieldInfo = "parent"- attrGet _ = nodeReadParent- attrSet _ = nodeWriteParent- attrConstruct = undefined- attrClear _ = nodeClearParent--nodeParent :: AttrLabelProxy "parent"-nodeParent = AttrLabelProxy---nodeReadChildren :: MonadIO m => Node -> m (Maybe Node)-nodeReadChildren s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO (Ptr Node)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Node) val'- return val''- return result--nodeWriteChildren :: MonadIO m => Node -> Ptr Node -> m ()-nodeWriteChildren s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: Ptr Node)--nodeClearChildren :: MonadIO m => Node -> m ()-nodeClearChildren s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (nullPtr :: Ptr Node)--data NodeChildrenFieldInfo-instance AttrInfo NodeChildrenFieldInfo where- type AttrAllowedOps NodeChildrenFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint NodeChildrenFieldInfo = (~) (Ptr Node)- type AttrBaseTypeConstraint NodeChildrenFieldInfo = (~) Node- type AttrGetType NodeChildrenFieldInfo = Maybe Node- type AttrLabel NodeChildrenFieldInfo = "children"- attrGet _ = nodeReadChildren- attrSet _ = nodeWriteChildren- attrConstruct = undefined- attrClear _ = nodeClearChildren--nodeChildren :: AttrLabelProxy "children"-nodeChildren = AttrLabelProxy----type instance AttributeList Node = NodeAttributeList-type NodeAttributeList = ('[ '("data", NodeDataFieldInfo), '("next", NodeNextFieldInfo), '("prev", NodePrevFieldInfo), '("parent", NodeParentFieldInfo), '("children", NodeChildrenFieldInfo)] :: [(Symbol, *)])---- method Node::child_index--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_node_child_index" g_node_child_index :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- Ptr () -> -- data : TBasicType TPtr- IO Int32---nodeChildIndex ::- (MonadIO m) =>- Node -- _obj- -> Ptr () -- data_- -> m Int32 -- result-nodeChildIndex _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_node_child_index _obj' data_- touchManagedPtr _obj- return result--data NodeChildIndexMethodInfo-instance (signature ~ (Ptr () -> m Int32), MonadIO m) => MethodInfo NodeChildIndexMethodInfo Node signature where- overloadedMethod _ = nodeChildIndex---- method Node::child_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_node_child_position" g_node_child_position :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- Ptr Node -> -- child : TInterface "GLib" "Node"- IO Int32---nodeChildPosition ::- (MonadIO m) =>- Node -- _obj- -> Node -- child- -> m Int32 -- result-nodeChildPosition _obj child = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let child' = unsafeManagedPtrGetPtr child- result <- g_node_child_position _obj' child'- touchManagedPtr _obj- touchManagedPtr child- return result--data NodeChildPositionMethodInfo-instance (signature ~ (Node -> m Int32), MonadIO m) => MethodInfo NodeChildPositionMethodInfo Node signature where- overloadedMethod _ = nodeChildPosition---- method Node::depth--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_node_depth" g_node_depth :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- IO Word32---nodeDepth ::- (MonadIO m) =>- Node -- _obj- -> m Word32 -- result-nodeDepth _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_node_depth _obj'- touchManagedPtr _obj- return result--data NodeDepthMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo NodeDepthMethodInfo Node signature where- overloadedMethod _ = nodeDepth---- method Node::destroy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_node_destroy" g_node_destroy :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- IO ()---nodeDestroy ::- (MonadIO m) =>- Node -- _obj- -> m () -- result-nodeDestroy _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_node_destroy _obj'- touchManagedPtr _obj- return ()--data NodeDestroyMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo NodeDestroyMethodInfo Node signature where- overloadedMethod _ = nodeDestroy---- method Node::is_ancestor--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "descendant", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_node_is_ancestor" g_node_is_ancestor :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- Ptr Node -> -- descendant : TInterface "GLib" "Node"- IO CInt---nodeIsAncestor ::- (MonadIO m) =>- Node -- _obj- -> Node -- descendant- -> m Bool -- result-nodeIsAncestor _obj descendant = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let descendant' = unsafeManagedPtrGetPtr descendant- result <- g_node_is_ancestor _obj' descendant'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr descendant- return result'--data NodeIsAncestorMethodInfo-instance (signature ~ (Node -> m Bool), MonadIO m) => MethodInfo NodeIsAncestorMethodInfo Node signature where- overloadedMethod _ = nodeIsAncestor---- method Node::max_height--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_node_max_height" g_node_max_height :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- IO Word32---nodeMaxHeight ::- (MonadIO m) =>- Node -- _obj- -> m Word32 -- result-nodeMaxHeight _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_node_max_height _obj'- touchManagedPtr _obj- return result--data NodeMaxHeightMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo NodeMaxHeightMethodInfo Node signature where- overloadedMethod _ = nodeMaxHeight---- method Node::n_children--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_node_n_children" g_node_n_children :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- IO Word32---nodeNChildren ::- (MonadIO m) =>- Node -- _obj- -> m Word32 -- result-nodeNChildren _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_node_n_children _obj'- touchManagedPtr _obj- return result--data NodeNChildrenMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo NodeNChildrenMethodInfo Node signature where- overloadedMethod _ = nodeNChildren---- method Node::n_nodes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface "GLib" "TraverseFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_node_n_nodes" g_node_n_nodes :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- CUInt -> -- flags : TInterface "GLib" "TraverseFlags"- IO Word32---nodeNNodes ::- (MonadIO m) =>- Node -- _obj- -> [TraverseFlags] -- flags- -> m Word32 -- result-nodeNNodes _obj flags = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let flags' = gflagsToWord flags- result <- g_node_n_nodes _obj' flags'- touchManagedPtr _obj- return result--data NodeNNodesMethodInfo-instance (signature ~ ([TraverseFlags] -> m Word32), MonadIO m) => MethodInfo NodeNNodesMethodInfo Node signature where- overloadedMethod _ = nodeNNodes---- method Node::reverse_children--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_node_reverse_children" g_node_reverse_children :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- IO ()---nodeReverseChildren ::- (MonadIO m) =>- Node -- _obj- -> m () -- result-nodeReverseChildren _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_node_reverse_children _obj'- touchManagedPtr _obj- return ()--data NodeReverseChildrenMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo NodeReverseChildrenMethodInfo Node signature where- overloadedMethod _ = nodeReverseChildren---- method Node::unlink--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Node", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_node_unlink" g_node_unlink :: - Ptr Node -> -- _obj : TInterface "GLib" "Node"- IO ()---nodeUnlink ::- (MonadIO m) =>- Node -- _obj- -> m () -- result-nodeUnlink _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_node_unlink _obj'- touchManagedPtr _obj- return ()--data NodeUnlinkMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo NodeUnlinkMethodInfo Node signature where- overloadedMethod _ = nodeUnlink--type family ResolveNodeMethod (t :: Symbol) (o :: *) :: * where- ResolveNodeMethod "childIndex" o = NodeChildIndexMethodInfo- ResolveNodeMethod "childPosition" o = NodeChildPositionMethodInfo- ResolveNodeMethod "depth" o = NodeDepthMethodInfo- ResolveNodeMethod "destroy" o = NodeDestroyMethodInfo- ResolveNodeMethod "isAncestor" o = NodeIsAncestorMethodInfo- ResolveNodeMethod "maxHeight" o = NodeMaxHeightMethodInfo- ResolveNodeMethod "nChildren" o = NodeNChildrenMethodInfo- ResolveNodeMethod "nNodes" o = NodeNNodesMethodInfo- ResolveNodeMethod "reverseChildren" o = NodeReverseChildrenMethodInfo- ResolveNodeMethod "unlink" o = NodeUnlinkMethodInfo- ResolveNodeMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveNodeMethod t Node, MethodInfo info Node p) => IsLabelProxy t (Node -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveNodeMethod t Node, MethodInfo info Node p) => IsLabel t (Node -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Node.hs-boot
@@ -1,21 +0,0 @@-module GI.GLib.Structs.Node where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Node = Node (ForeignPtr Node)-instance WrappedPtr Node where-data NodeChildIndexMethodInfo-data NodeChildPositionMethodInfo-data NodeDepthMethodInfo-data NodeDestroyMethodInfo-data NodeIsAncestorMethodInfo-data NodeMaxHeightMethodInfo-data NodeNChildrenMethodInfo-data NodeNNodesMethodInfo-data NodeReverseChildrenMethodInfo-data NodeUnlinkMethodInfo
− GI/GLib/Structs/Once.hs
@@ -1,197 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A #GOnce struct controls a one-time initialization function. Any-one-time initialization function must have its own unique #GOnce-struct.--}--module GI.GLib.Structs.Once- ( ---- * Exported types- Once(..) ,- newZeroOnce ,- noOnce ,--- -- * Methods--- ** onceInitEnter- onceInitEnter ,----- ** onceInitLeave- onceInitLeave ,----- -- * Properties--- ** Retval- onceClearRetval ,- onceReadRetval ,- onceRetval ,- onceWriteRetval ,----- ** Status- onceReadStatus ,- onceStatus ,- onceWriteStatus ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Once = Once (ForeignPtr Once)-instance WrappedPtr Once where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = copyPtr 16- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Once` struct initialized to zero.-newZeroOnce :: MonadIO m => m Once-newZeroOnce = liftIO $ wrappedPtrCalloc >>= wrapPtr Once--instance tag ~ 'AttrSet => Constructible Once tag where- new _ attrs = do- o <- newZeroOnce- GI.Attributes.set o attrs- return o---noOnce :: Maybe Once-noOnce = Nothing--onceReadStatus :: MonadIO m => Once -> m OnceStatus-onceReadStatus s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CUInt- let val' = (toEnum . fromIntegral) val- return val'--onceWriteStatus :: MonadIO m => Once -> OnceStatus -> m ()-onceWriteStatus s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 0) (val' :: CUInt)--data OnceStatusFieldInfo-instance AttrInfo OnceStatusFieldInfo where- type AttrAllowedOps OnceStatusFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint OnceStatusFieldInfo = (~) OnceStatus- type AttrBaseTypeConstraint OnceStatusFieldInfo = (~) Once- type AttrGetType OnceStatusFieldInfo = OnceStatus- type AttrLabel OnceStatusFieldInfo = "status"- attrGet _ = onceReadStatus- attrSet _ = onceWriteStatus- attrConstruct = undefined- attrClear _ = undefined--onceStatus :: AttrLabelProxy "status"-onceStatus = AttrLabelProxy---onceReadRetval :: MonadIO m => Once -> m (Ptr ())-onceReadRetval s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (Ptr ())- return val--onceWriteRetval :: MonadIO m => Once -> Ptr () -> m ()-onceWriteRetval s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Ptr ())--onceClearRetval :: MonadIO m => Once -> m ()-onceClearRetval s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (nullPtr :: Ptr ())--data OnceRetvalFieldInfo-instance AttrInfo OnceRetvalFieldInfo where- type AttrAllowedOps OnceRetvalFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint OnceRetvalFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint OnceRetvalFieldInfo = (~) Once- type AttrGetType OnceRetvalFieldInfo = Ptr ()- type AttrLabel OnceRetvalFieldInfo = "retval"- attrGet _ = onceReadRetval- attrSet _ = onceWriteRetval- attrConstruct = undefined- attrClear _ = onceClearRetval--onceRetval :: AttrLabelProxy "retval"-onceRetval = AttrLabelProxy----type instance AttributeList Once = OnceAttributeList-type OnceAttributeList = ('[ '("status", OnceStatusFieldInfo), '("retval", OnceRetvalFieldInfo)] :: [(Symbol, *)])---- method Once::init_enter--- method type : MemberFunction--- Args : [Arg {argCName = "location", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_once_init_enter" g_once_init_enter :: - Ptr () -> -- location : TBasicType TPtr- IO CInt---onceInitEnter ::- (MonadIO m) =>- Ptr () -- location- -> m Bool -- result-onceInitEnter location = liftIO $ do- result <- g_once_init_enter location- let result' = (/= 0) result- return result'---- method Once::init_leave--- method type : MemberFunction--- Args : [Arg {argCName = "location", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_once_init_leave" g_once_init_leave :: - Ptr () -> -- location : TBasicType TPtr- Word64 -> -- result : TBasicType TUInt64- IO ()---onceInitLeave ::- (MonadIO m) =>- Ptr () -- location- -> Word64 -- result_- -> m () -- result-onceInitLeave location result_ = liftIO $ do- g_once_init_leave location result_- return ()--type family ResolveOnceMethod (t :: Symbol) (o :: *) :: * where- ResolveOnceMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveOnceMethod t Once, MethodInfo info Once p) => IsLabelProxy t (Once -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveOnceMethod t Once, MethodInfo info Once p) => IsLabel t (Once -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Once.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.Once where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Once = Once (ForeignPtr Once)-instance WrappedPtr Once where
− GI/GLib/Structs/OptionContext.hs
@@ -1,845 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A `GOptionContext` struct defines which options-are accepted by the commandline option parser. The struct has only private-fields and should not be directly accessed.--}--module GI.GLib.Structs.OptionContext- ( ---- * Exported types- OptionContext(..) ,- noOptionContext ,--- -- * Methods--- ** optionContextAddGroup- OptionContextAddGroupMethodInfo ,- optionContextAddGroup ,----- ** optionContextAddMainEntries- OptionContextAddMainEntriesMethodInfo ,- optionContextAddMainEntries ,----- ** optionContextFree- OptionContextFreeMethodInfo ,- optionContextFree ,----- ** optionContextGetDescription- OptionContextGetDescriptionMethodInfo ,- optionContextGetDescription ,----- ** optionContextGetHelp- OptionContextGetHelpMethodInfo ,- optionContextGetHelp ,----- ** optionContextGetHelpEnabled- OptionContextGetHelpEnabledMethodInfo ,- optionContextGetHelpEnabled ,----- ** optionContextGetIgnoreUnknownOptions- OptionContextGetIgnoreUnknownOptionsMethodInfo,- optionContextGetIgnoreUnknownOptions ,----- ** optionContextGetMainGroup- OptionContextGetMainGroupMethodInfo ,- optionContextGetMainGroup ,----- ** optionContextGetStrictPosix- OptionContextGetStrictPosixMethodInfo ,- optionContextGetStrictPosix ,----- ** optionContextGetSummary- OptionContextGetSummaryMethodInfo ,- optionContextGetSummary ,----- ** optionContextParse- OptionContextParseMethodInfo ,- optionContextParse ,----- ** optionContextParseStrv- OptionContextParseStrvMethodInfo ,- optionContextParseStrv ,----- ** optionContextSetDescription- OptionContextSetDescriptionMethodInfo ,- optionContextSetDescription ,----- ** optionContextSetHelpEnabled- OptionContextSetHelpEnabledMethodInfo ,- optionContextSetHelpEnabled ,----- ** optionContextSetIgnoreUnknownOptions- OptionContextSetIgnoreUnknownOptionsMethodInfo,- optionContextSetIgnoreUnknownOptions ,----- ** optionContextSetMainGroup- OptionContextSetMainGroupMethodInfo ,- optionContextSetMainGroup ,----- ** optionContextSetStrictPosix- OptionContextSetStrictPosixMethodInfo ,- optionContextSetStrictPosix ,----- ** optionContextSetSummary- OptionContextSetSummaryMethodInfo ,- optionContextSetSummary ,----- ** optionContextSetTranslateFunc- OptionContextSetTranslateFuncMethodInfo ,- optionContextSetTranslateFunc ,----- ** optionContextSetTranslationDomain- OptionContextSetTranslationDomainMethodInfo,- optionContextSetTranslationDomain ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype OptionContext = OptionContext (ForeignPtr OptionContext)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr OptionContext where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noOptionContext :: Maybe OptionContext-noOptionContext = Nothing---type instance AttributeList OptionContext = OptionContextAttributeList-type OptionContextAttributeList = ('[ ] :: [(Symbol, *)])---- method OptionContext::add_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_add_group" g_option_context_add_group :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- Ptr OptionGroup -> -- group : TInterface "GLib" "OptionGroup"- IO ()---optionContextAddGroup ::- (MonadIO m) =>- OptionContext -- _obj- -> OptionGroup -- group- -> m () -- result-optionContextAddGroup _obj group = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- group' <- copyBoxed group- g_option_context_add_group _obj' group'- touchManagedPtr _obj- touchManagedPtr group- return ()--data OptionContextAddGroupMethodInfo-instance (signature ~ (OptionGroup -> m ()), MonadIO m) => MethodInfo OptionContextAddGroupMethodInfo OptionContext signature where- overloadedMethod _ = optionContextAddGroup---- method OptionContext::add_main_entries--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "entries", argType = TInterface "GLib" "OptionEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "translation_domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_add_main_entries" g_option_context_add_main_entries :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- Ptr OptionEntry -> -- entries : TInterface "GLib" "OptionEntry"- CString -> -- translation_domain : TBasicType TUTF8- IO ()---optionContextAddMainEntries ::- (MonadIO m) =>- OptionContext -- _obj- -> OptionEntry -- entries- -> Maybe (T.Text) -- translationDomain- -> m () -- result-optionContextAddMainEntries _obj entries translationDomain = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let entries' = unsafeManagedPtrGetPtr entries- maybeTranslationDomain <- case translationDomain of- Nothing -> return nullPtr- Just jTranslationDomain -> do- jTranslationDomain' <- textToCString jTranslationDomain- return jTranslationDomain'- g_option_context_add_main_entries _obj' entries' maybeTranslationDomain- touchManagedPtr _obj- touchManagedPtr entries- freeMem maybeTranslationDomain- return ()--data OptionContextAddMainEntriesMethodInfo-instance (signature ~ (OptionEntry -> Maybe (T.Text) -> m ()), MonadIO m) => MethodInfo OptionContextAddMainEntriesMethodInfo OptionContext signature where- overloadedMethod _ = optionContextAddMainEntries---- method OptionContext::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_free" g_option_context_free :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- IO ()---optionContextFree ::- (MonadIO m) =>- OptionContext -- _obj- -> m () -- result-optionContextFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_option_context_free _obj'- touchManagedPtr _obj- return ()--data OptionContextFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo OptionContextFreeMethodInfo OptionContext signature where- overloadedMethod _ = optionContextFree---- method OptionContext::get_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_option_context_get_description" g_option_context_get_description :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- IO CString---optionContextGetDescription ::- (MonadIO m) =>- OptionContext -- _obj- -> m T.Text -- result-optionContextGetDescription _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_option_context_get_description _obj'- checkUnexpectedReturnNULL "g_option_context_get_description" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data OptionContextGetDescriptionMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo OptionContextGetDescriptionMethodInfo OptionContext signature where- overloadedMethod _ = optionContextGetDescription---- method OptionContext::get_help--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "main_help", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_option_context_get_help" g_option_context_get_help :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- CInt -> -- main_help : TBasicType TBoolean- Ptr OptionGroup -> -- group : TInterface "GLib" "OptionGroup"- IO CString---optionContextGetHelp ::- (MonadIO m) =>- OptionContext -- _obj- -> Bool -- mainHelp- -> Maybe (OptionGroup) -- group- -> m T.Text -- result-optionContextGetHelp _obj mainHelp group = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let mainHelp' = (fromIntegral . fromEnum) mainHelp- maybeGroup <- case group of- Nothing -> return nullPtr- Just jGroup -> do- let jGroup' = unsafeManagedPtrGetPtr jGroup- return jGroup'- result <- g_option_context_get_help _obj' mainHelp' maybeGroup- checkUnexpectedReturnNULL "g_option_context_get_help" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- whenJust group touchManagedPtr- return result'--data OptionContextGetHelpMethodInfo-instance (signature ~ (Bool -> Maybe (OptionGroup) -> m T.Text), MonadIO m) => MethodInfo OptionContextGetHelpMethodInfo OptionContext signature where- overloadedMethod _ = optionContextGetHelp---- method OptionContext::get_help_enabled--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_option_context_get_help_enabled" g_option_context_get_help_enabled :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- IO CInt---optionContextGetHelpEnabled ::- (MonadIO m) =>- OptionContext -- _obj- -> m Bool -- result-optionContextGetHelpEnabled _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_option_context_get_help_enabled _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data OptionContextGetHelpEnabledMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo OptionContextGetHelpEnabledMethodInfo OptionContext signature where- overloadedMethod _ = optionContextGetHelpEnabled---- method OptionContext::get_ignore_unknown_options--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_option_context_get_ignore_unknown_options" g_option_context_get_ignore_unknown_options :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- IO CInt---optionContextGetIgnoreUnknownOptions ::- (MonadIO m) =>- OptionContext -- _obj- -> m Bool -- result-optionContextGetIgnoreUnknownOptions _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_option_context_get_ignore_unknown_options _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data OptionContextGetIgnoreUnknownOptionsMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo OptionContextGetIgnoreUnknownOptionsMethodInfo OptionContext signature where- overloadedMethod _ = optionContextGetIgnoreUnknownOptions---- method OptionContext::get_main_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "OptionGroup")--- throws : False--- Skip return : False--foreign import ccall "g_option_context_get_main_group" g_option_context_get_main_group :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- IO (Ptr OptionGroup)---optionContextGetMainGroup ::- (MonadIO m) =>- OptionContext -- _obj- -> m OptionGroup -- result-optionContextGetMainGroup _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_option_context_get_main_group _obj'- checkUnexpectedReturnNULL "g_option_context_get_main_group" result- result' <- (newBoxed OptionGroup) result- touchManagedPtr _obj- return result'--data OptionContextGetMainGroupMethodInfo-instance (signature ~ (m OptionGroup), MonadIO m) => MethodInfo OptionContextGetMainGroupMethodInfo OptionContext signature where- overloadedMethod _ = optionContextGetMainGroup---- method OptionContext::get_strict_posix--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_option_context_get_strict_posix" g_option_context_get_strict_posix :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- IO CInt---optionContextGetStrictPosix ::- (MonadIO m) =>- OptionContext -- _obj- -> m Bool -- result-optionContextGetStrictPosix _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_option_context_get_strict_posix _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data OptionContextGetStrictPosixMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo OptionContextGetStrictPosixMethodInfo OptionContext signature where- overloadedMethod _ = optionContextGetStrictPosix---- method OptionContext::get_summary--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_option_context_get_summary" g_option_context_get_summary :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- IO CString---optionContextGetSummary ::- (MonadIO m) =>- OptionContext -- _obj- -> m T.Text -- result-optionContextGetSummary _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_option_context_get_summary _obj'- checkUnexpectedReturnNULL "g_option_context_get_summary" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data OptionContextGetSummaryMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo OptionContextGetSummaryMethodInfo OptionContext signature where- overloadedMethod _ = optionContextGetSummary---- method OptionContext::parse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "argc", argType = TBasicType TInt, direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "argv", argType = TCArray False (-1) 1 (TBasicType TUTF8), direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "argc", argType = TBasicType TInt, direction = DirectionInout, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_option_context_parse" g_option_context_parse :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- Ptr Int32 -> -- argc : TBasicType TInt- Ptr (Ptr CString) -> -- argv : TCArray False (-1) 1 (TBasicType TUTF8)- Ptr (Ptr GError) -> -- error- IO CInt---optionContextParse ::- (MonadIO m) =>- OptionContext -- _obj- -> Maybe ([T.Text]) -- argv- -> m ((Maybe [T.Text])) -- result-optionContextParse _obj argv = liftIO $ do- let argc = case argv of- Nothing -> 0- Just jArgv -> fromIntegral $ length jArgv- let _obj' = unsafeManagedPtrGetPtr _obj- argc' <- allocMem :: IO (Ptr Int32)- poke argc' argc- maybeArgv <- case argv of- Nothing -> return nullPtr- Just jArgv -> do- jArgv' <- packUTF8CArray jArgv- return jArgv'- maybeArgv' <- allocMem :: IO (Ptr (Ptr CString))- poke maybeArgv' maybeArgv- onException (do- _ <- propagateGError $ g_option_context_parse _obj' argc' maybeArgv'- argc'' <- peek argc'- maybeArgv'' <- peek maybeArgv'- maybeMaybeArgv'' <- convertIfNonNull maybeArgv'' $ \maybeArgv''' -> do- maybeArgv'''' <- (unpackUTF8CArrayWithLength argc'') maybeArgv'''- (mapCArrayWithLength argc'') freeMem maybeArgv'''- freeMem maybeArgv'''- return maybeArgv''''- touchManagedPtr _obj- freeMem argc'- freeMem maybeArgv'- return maybeMaybeArgv''- ) (do- freeMem argc'- freeMem maybeArgv'- )--data OptionContextParseMethodInfo-instance (signature ~ (Maybe ([T.Text]) -> m ((Maybe [T.Text]))), MonadIO m) => MethodInfo OptionContextParseMethodInfo OptionContext signature where- overloadedMethod _ = optionContextParse---- method OptionContext::parse_strv--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "arguments", argType = TCArray False (-1) (-1) (TBasicType TUTF8), direction = DirectionInout, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_option_context_parse_strv" g_option_context_parse_strv :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- Ptr (Ptr CString) -> -- arguments : TCArray False (-1) (-1) (TBasicType TUTF8)- Ptr (Ptr GError) -> -- error- IO CInt---optionContextParseStrv ::- (MonadIO m) =>- OptionContext -- _obj- -> Ptr CString -- arguments- -> m ((Ptr CString)) -- result-optionContextParseStrv _obj arguments = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- arguments' <- allocMem :: IO (Ptr (Ptr CString))- poke arguments' arguments- onException (do- _ <- propagateGError $ g_option_context_parse_strv _obj' arguments'- arguments'' <- peek arguments'- touchManagedPtr _obj- freeMem arguments'- return arguments''- ) (do- freeMem arguments'- )--data OptionContextParseStrvMethodInfo-instance (signature ~ (Ptr CString -> m ((Ptr CString))), MonadIO m) => MethodInfo OptionContextParseStrvMethodInfo OptionContext signature where- overloadedMethod _ = optionContextParseStrv---- method OptionContext::set_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_description" g_option_context_set_description :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- CString -> -- description : TBasicType TUTF8- IO ()---optionContextSetDescription ::- (MonadIO m) =>- OptionContext -- _obj- -> Maybe (T.Text) -- description- -> m () -- result-optionContextSetDescription _obj description = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeDescription <- case description of- Nothing -> return nullPtr- Just jDescription -> do- jDescription' <- textToCString jDescription- return jDescription'- g_option_context_set_description _obj' maybeDescription- touchManagedPtr _obj- freeMem maybeDescription- return ()--data OptionContextSetDescriptionMethodInfo-instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m) => MethodInfo OptionContextSetDescriptionMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetDescription---- method OptionContext::set_help_enabled--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "help_enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_help_enabled" g_option_context_set_help_enabled :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- CInt -> -- help_enabled : TBasicType TBoolean- IO ()---optionContextSetHelpEnabled ::- (MonadIO m) =>- OptionContext -- _obj- -> Bool -- helpEnabled- -> m () -- result-optionContextSetHelpEnabled _obj helpEnabled = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let helpEnabled' = (fromIntegral . fromEnum) helpEnabled- g_option_context_set_help_enabled _obj' helpEnabled'- touchManagedPtr _obj- return ()--data OptionContextSetHelpEnabledMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo OptionContextSetHelpEnabledMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetHelpEnabled---- method OptionContext::set_ignore_unknown_options--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ignore_unknown", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_ignore_unknown_options" g_option_context_set_ignore_unknown_options :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- CInt -> -- ignore_unknown : TBasicType TBoolean- IO ()---optionContextSetIgnoreUnknownOptions ::- (MonadIO m) =>- OptionContext -- _obj- -> Bool -- ignoreUnknown- -> m () -- result-optionContextSetIgnoreUnknownOptions _obj ignoreUnknown = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let ignoreUnknown' = (fromIntegral . fromEnum) ignoreUnknown- g_option_context_set_ignore_unknown_options _obj' ignoreUnknown'- touchManagedPtr _obj- return ()--data OptionContextSetIgnoreUnknownOptionsMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo OptionContextSetIgnoreUnknownOptionsMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetIgnoreUnknownOptions---- method OptionContext::set_main_group--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_main_group" g_option_context_set_main_group :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- Ptr OptionGroup -> -- group : TInterface "GLib" "OptionGroup"- IO ()---optionContextSetMainGroup ::- (MonadIO m) =>- OptionContext -- _obj- -> OptionGroup -- group- -> m () -- result-optionContextSetMainGroup _obj group = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- group' <- copyBoxed group- g_option_context_set_main_group _obj' group'- touchManagedPtr _obj- touchManagedPtr group- return ()--data OptionContextSetMainGroupMethodInfo-instance (signature ~ (OptionGroup -> m ()), MonadIO m) => MethodInfo OptionContextSetMainGroupMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetMainGroup---- method OptionContext::set_strict_posix--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "strict_posix", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_strict_posix" g_option_context_set_strict_posix :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- CInt -> -- strict_posix : TBasicType TBoolean- IO ()---optionContextSetStrictPosix ::- (MonadIO m) =>- OptionContext -- _obj- -> Bool -- strictPosix- -> m () -- result-optionContextSetStrictPosix _obj strictPosix = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let strictPosix' = (fromIntegral . fromEnum) strictPosix- g_option_context_set_strict_posix _obj' strictPosix'- touchManagedPtr _obj- return ()--data OptionContextSetStrictPosixMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo OptionContextSetStrictPosixMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetStrictPosix---- method OptionContext::set_summary--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "summary", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_summary" g_option_context_set_summary :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- CString -> -- summary : TBasicType TUTF8- IO ()---optionContextSetSummary ::- (MonadIO m) =>- OptionContext -- _obj- -> Maybe (T.Text) -- summary- -> m () -- result-optionContextSetSummary _obj summary = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeSummary <- case summary of- Nothing -> return nullPtr- Just jSummary -> do- jSummary' <- textToCString jSummary- return jSummary'- g_option_context_set_summary _obj' maybeSummary- touchManagedPtr _obj- freeMem maybeSummary- return ()--data OptionContextSetSummaryMethodInfo-instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m) => MethodInfo OptionContextSetSummaryMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetSummary---- method OptionContext::set_translate_func--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TInterface "GLib" "TranslateFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy_notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_translate_func" g_option_context_set_translate_func :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- FunPtr TranslateFuncC -> -- func : TInterface "GLib" "TranslateFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- destroy_notify : TInterface "GLib" "DestroyNotify"- IO ()---optionContextSetTranslateFunc ::- (MonadIO m) =>- OptionContext -- _obj- -> Maybe (TranslateFunc) -- func- -> m () -- result-optionContextSetTranslateFunc _obj func = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeFunc <- case func of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jFunc -> do- jFunc' <- mkTranslateFunc (translateFuncWrapper Nothing jFunc)- return jFunc'- let data_ = castFunPtrToPtr maybeFunc- let destroyNotify = safeFreeFunPtrPtr- g_option_context_set_translate_func _obj' maybeFunc data_ destroyNotify- touchManagedPtr _obj- return ()--data OptionContextSetTranslateFuncMethodInfo-instance (signature ~ (Maybe (TranslateFunc) -> m ()), MonadIO m) => MethodInfo OptionContextSetTranslateFuncMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetTranslateFunc---- method OptionContext::set_translation_domain--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_context_set_translation_domain" g_option_context_set_translation_domain :: - Ptr OptionContext -> -- _obj : TInterface "GLib" "OptionContext"- CString -> -- domain : TBasicType TUTF8- IO ()---optionContextSetTranslationDomain ::- (MonadIO m) =>- OptionContext -- _obj- -> T.Text -- domain- -> m () -- result-optionContextSetTranslationDomain _obj domain = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- domain' <- textToCString domain- g_option_context_set_translation_domain _obj' domain'- touchManagedPtr _obj- freeMem domain'- return ()--data OptionContextSetTranslationDomainMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo OptionContextSetTranslationDomainMethodInfo OptionContext signature where- overloadedMethod _ = optionContextSetTranslationDomain--type family ResolveOptionContextMethod (t :: Symbol) (o :: *) :: * where- ResolveOptionContextMethod "addGroup" o = OptionContextAddGroupMethodInfo- ResolveOptionContextMethod "addMainEntries" o = OptionContextAddMainEntriesMethodInfo- ResolveOptionContextMethod "free" o = OptionContextFreeMethodInfo- ResolveOptionContextMethod "parse" o = OptionContextParseMethodInfo- ResolveOptionContextMethod "parseStrv" o = OptionContextParseStrvMethodInfo- ResolveOptionContextMethod "getDescription" o = OptionContextGetDescriptionMethodInfo- ResolveOptionContextMethod "getHelp" o = OptionContextGetHelpMethodInfo- ResolveOptionContextMethod "getHelpEnabled" o = OptionContextGetHelpEnabledMethodInfo- ResolveOptionContextMethod "getIgnoreUnknownOptions" o = OptionContextGetIgnoreUnknownOptionsMethodInfo- ResolveOptionContextMethod "getMainGroup" o = OptionContextGetMainGroupMethodInfo- ResolveOptionContextMethod "getStrictPosix" o = OptionContextGetStrictPosixMethodInfo- ResolveOptionContextMethod "getSummary" o = OptionContextGetSummaryMethodInfo- ResolveOptionContextMethod "setDescription" o = OptionContextSetDescriptionMethodInfo- ResolveOptionContextMethod "setHelpEnabled" o = OptionContextSetHelpEnabledMethodInfo- ResolveOptionContextMethod "setIgnoreUnknownOptions" o = OptionContextSetIgnoreUnknownOptionsMethodInfo- ResolveOptionContextMethod "setMainGroup" o = OptionContextSetMainGroupMethodInfo- ResolveOptionContextMethod "setStrictPosix" o = OptionContextSetStrictPosixMethodInfo- ResolveOptionContextMethod "setSummary" o = OptionContextSetSummaryMethodInfo- ResolveOptionContextMethod "setTranslateFunc" o = OptionContextSetTranslateFuncMethodInfo- ResolveOptionContextMethod "setTranslationDomain" o = OptionContextSetTranslationDomainMethodInfo- ResolveOptionContextMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveOptionContextMethod t OptionContext, MethodInfo info OptionContext p) => IsLabelProxy t (OptionContext -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveOptionContextMethod t OptionContext, MethodInfo info OptionContext p) => IsLabel t (OptionContext -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/OptionContext.hs-boot
@@ -1,31 +0,0 @@-module GI.GLib.Structs.OptionContext where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype OptionContext = OptionContext (ForeignPtr OptionContext)-instance WrappedPtr OptionContext where-data OptionContextAddGroupMethodInfo-data OptionContextAddMainEntriesMethodInfo-data OptionContextFreeMethodInfo-data OptionContextGetDescriptionMethodInfo-data OptionContextGetHelpMethodInfo-data OptionContextGetHelpEnabledMethodInfo-data OptionContextGetIgnoreUnknownOptionsMethodInfo-data OptionContextGetMainGroupMethodInfo-data OptionContextGetStrictPosixMethodInfo-data OptionContextGetSummaryMethodInfo-data OptionContextParseMethodInfo-data OptionContextParseStrvMethodInfo-data OptionContextSetDescriptionMethodInfo-data OptionContextSetHelpEnabledMethodInfo-data OptionContextSetIgnoreUnknownOptionsMethodInfo-data OptionContextSetMainGroupMethodInfo-data OptionContextSetStrictPosixMethodInfo-data OptionContextSetSummaryMethodInfo-data OptionContextSetTranslateFuncMethodInfo-data OptionContextSetTranslationDomainMethodInfo
− GI/GLib/Structs/OptionEntry.hs
@@ -1,320 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A GOptionEntry struct defines a single option. To have an effect, they-must be added to a #GOptionGroup with g_option_context_add_main_entries()-or g_option_group_add_entries().--}--module GI.GLib.Structs.OptionEntry- ( ---- * Exported types- OptionEntry(..) ,- newZeroOptionEntry ,- noOptionEntry ,--- -- * Properties--- ** Arg- optionEntryArg ,- optionEntryReadArg ,- optionEntryWriteArg ,----- ** ArgData- optionEntryArgData ,- optionEntryClearArgData ,- optionEntryReadArgData ,- optionEntryWriteArgData ,----- ** ArgDescription- optionEntryArgDescription ,- optionEntryClearArgDescription ,- optionEntryReadArgDescription ,- optionEntryWriteArgDescription ,----- ** Description- optionEntryClearDescription ,- optionEntryDescription ,- optionEntryReadDescription ,- optionEntryWriteDescription ,----- ** Flags- optionEntryFlags ,- optionEntryReadFlags ,- optionEntryWriteFlags ,----- ** LongName- optionEntryClearLongName ,- optionEntryLongName ,- optionEntryReadLongName ,- optionEntryWriteLongName ,----- ** ShortName- optionEntryReadShortName ,- optionEntryShortName ,- optionEntryWriteShortName ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype OptionEntry = OptionEntry (ForeignPtr OptionEntry)-instance WrappedPtr OptionEntry where- wrappedPtrCalloc = callocBytes 48- wrappedPtrCopy = copyPtr 48- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `OptionEntry` struct initialized to zero.-newZeroOptionEntry :: MonadIO m => m OptionEntry-newZeroOptionEntry = liftIO $ wrappedPtrCalloc >>= wrapPtr OptionEntry--instance tag ~ 'AttrSet => Constructible OptionEntry tag where- new _ attrs = do- o <- newZeroOptionEntry- GI.Attributes.set o attrs- return o---noOptionEntry :: Maybe OptionEntry-noOptionEntry = Nothing--optionEntryReadLongName :: MonadIO m => OptionEntry -> m (Maybe T.Text)-optionEntryReadLongName s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--optionEntryWriteLongName :: MonadIO m => OptionEntry -> CString -> m ()-optionEntryWriteLongName s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--optionEntryClearLongName :: MonadIO m => OptionEntry -> m ()-optionEntryClearLongName s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: CString)--data OptionEntryLongNameFieldInfo-instance AttrInfo OptionEntryLongNameFieldInfo where- type AttrAllowedOps OptionEntryLongNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint OptionEntryLongNameFieldInfo = (~) CString- type AttrBaseTypeConstraint OptionEntryLongNameFieldInfo = (~) OptionEntry- type AttrGetType OptionEntryLongNameFieldInfo = Maybe T.Text- type AttrLabel OptionEntryLongNameFieldInfo = "long_name"- attrGet _ = optionEntryReadLongName- attrSet _ = optionEntryWriteLongName- attrConstruct = undefined- attrClear _ = optionEntryClearLongName--optionEntryLongName :: AttrLabelProxy "longName"-optionEntryLongName = AttrLabelProxy---optionEntryReadShortName :: MonadIO m => OptionEntry -> m Int8-optionEntryReadShortName s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Int8- return val--optionEntryWriteShortName :: MonadIO m => OptionEntry -> Int8 -> m ()-optionEntryWriteShortName s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Int8)--data OptionEntryShortNameFieldInfo-instance AttrInfo OptionEntryShortNameFieldInfo where- type AttrAllowedOps OptionEntryShortNameFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint OptionEntryShortNameFieldInfo = (~) Int8- type AttrBaseTypeConstraint OptionEntryShortNameFieldInfo = (~) OptionEntry- type AttrGetType OptionEntryShortNameFieldInfo = Int8- type AttrLabel OptionEntryShortNameFieldInfo = "short_name"- attrGet _ = optionEntryReadShortName- attrSet _ = optionEntryWriteShortName- attrConstruct = undefined- attrClear _ = undefined--optionEntryShortName :: AttrLabelProxy "shortName"-optionEntryShortName = AttrLabelProxy---optionEntryReadFlags :: MonadIO m => OptionEntry -> m Int32-optionEntryReadFlags s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Int32- return val--optionEntryWriteFlags :: MonadIO m => OptionEntry -> Int32 -> m ()-optionEntryWriteFlags s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Int32)--data OptionEntryFlagsFieldInfo-instance AttrInfo OptionEntryFlagsFieldInfo where- type AttrAllowedOps OptionEntryFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint OptionEntryFlagsFieldInfo = (~) Int32- type AttrBaseTypeConstraint OptionEntryFlagsFieldInfo = (~) OptionEntry- type AttrGetType OptionEntryFlagsFieldInfo = Int32- type AttrLabel OptionEntryFlagsFieldInfo = "flags"- attrGet _ = optionEntryReadFlags- attrSet _ = optionEntryWriteFlags- attrConstruct = undefined- attrClear _ = undefined--optionEntryFlags :: AttrLabelProxy "flags"-optionEntryFlags = AttrLabelProxy---optionEntryReadArg :: MonadIO m => OptionEntry -> m OptionArg-optionEntryReadArg s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CUInt- let val' = (toEnum . fromIntegral) val- return val'--optionEntryWriteArg :: MonadIO m => OptionEntry -> OptionArg -> m ()-optionEntryWriteArg s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 16) (val' :: CUInt)--data OptionEntryArgFieldInfo-instance AttrInfo OptionEntryArgFieldInfo where- type AttrAllowedOps OptionEntryArgFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint OptionEntryArgFieldInfo = (~) OptionArg- type AttrBaseTypeConstraint OptionEntryArgFieldInfo = (~) OptionEntry- type AttrGetType OptionEntryArgFieldInfo = OptionArg- type AttrLabel OptionEntryArgFieldInfo = "arg"- attrGet _ = optionEntryReadArg- attrSet _ = optionEntryWriteArg- attrConstruct = undefined- attrClear _ = undefined--optionEntryArg :: AttrLabelProxy "arg"-optionEntryArg = AttrLabelProxy---optionEntryReadArgData :: MonadIO m => OptionEntry -> m (Ptr ())-optionEntryReadArgData s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO (Ptr ())- return val--optionEntryWriteArgData :: MonadIO m => OptionEntry -> Ptr () -> m ()-optionEntryWriteArgData s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Ptr ())--optionEntryClearArgData :: MonadIO m => OptionEntry -> m ()-optionEntryClearArgData s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (nullPtr :: Ptr ())--data OptionEntryArgDataFieldInfo-instance AttrInfo OptionEntryArgDataFieldInfo where- type AttrAllowedOps OptionEntryArgDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint OptionEntryArgDataFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint OptionEntryArgDataFieldInfo = (~) OptionEntry- type AttrGetType OptionEntryArgDataFieldInfo = Ptr ()- type AttrLabel OptionEntryArgDataFieldInfo = "arg_data"- attrGet _ = optionEntryReadArgData- attrSet _ = optionEntryWriteArgData- attrConstruct = undefined- attrClear _ = optionEntryClearArgData--optionEntryArgData :: AttrLabelProxy "argData"-optionEntryArgData = AttrLabelProxy---optionEntryReadDescription :: MonadIO m => OptionEntry -> m (Maybe T.Text)-optionEntryReadDescription s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--optionEntryWriteDescription :: MonadIO m => OptionEntry -> CString -> m ()-optionEntryWriteDescription s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: CString)--optionEntryClearDescription :: MonadIO m => OptionEntry -> m ()-optionEntryClearDescription s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (nullPtr :: CString)--data OptionEntryDescriptionFieldInfo-instance AttrInfo OptionEntryDescriptionFieldInfo where- type AttrAllowedOps OptionEntryDescriptionFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint OptionEntryDescriptionFieldInfo = (~) CString- type AttrBaseTypeConstraint OptionEntryDescriptionFieldInfo = (~) OptionEntry- type AttrGetType OptionEntryDescriptionFieldInfo = Maybe T.Text- type AttrLabel OptionEntryDescriptionFieldInfo = "description"- attrGet _ = optionEntryReadDescription- attrSet _ = optionEntryWriteDescription- attrConstruct = undefined- attrClear _ = optionEntryClearDescription--optionEntryDescription :: AttrLabelProxy "description"-optionEntryDescription = AttrLabelProxy---optionEntryReadArgDescription :: MonadIO m => OptionEntry -> m (Maybe T.Text)-optionEntryReadArgDescription s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 40) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--optionEntryWriteArgDescription :: MonadIO m => OptionEntry -> CString -> m ()-optionEntryWriteArgDescription s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 40) (val :: CString)--optionEntryClearArgDescription :: MonadIO m => OptionEntry -> m ()-optionEntryClearArgDescription s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 40) (nullPtr :: CString)--data OptionEntryArgDescriptionFieldInfo-instance AttrInfo OptionEntryArgDescriptionFieldInfo where- type AttrAllowedOps OptionEntryArgDescriptionFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint OptionEntryArgDescriptionFieldInfo = (~) CString- type AttrBaseTypeConstraint OptionEntryArgDescriptionFieldInfo = (~) OptionEntry- type AttrGetType OptionEntryArgDescriptionFieldInfo = Maybe T.Text- type AttrLabel OptionEntryArgDescriptionFieldInfo = "arg_description"- attrGet _ = optionEntryReadArgDescription- attrSet _ = optionEntryWriteArgDescription- attrConstruct = undefined- attrClear _ = optionEntryClearArgDescription--optionEntryArgDescription :: AttrLabelProxy "argDescription"-optionEntryArgDescription = AttrLabelProxy----type instance AttributeList OptionEntry = OptionEntryAttributeList-type OptionEntryAttributeList = ('[ '("longName", OptionEntryLongNameFieldInfo), '("shortName", OptionEntryShortNameFieldInfo), '("flags", OptionEntryFlagsFieldInfo), '("arg", OptionEntryArgFieldInfo), '("argData", OptionEntryArgDataFieldInfo), '("description", OptionEntryDescriptionFieldInfo), '("argDescription", OptionEntryArgDescriptionFieldInfo)] :: [(Symbol, *)])--type family ResolveOptionEntryMethod (t :: Symbol) (o :: *) :: * where- ResolveOptionEntryMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveOptionEntryMethod t OptionEntry, MethodInfo info OptionEntry p) => IsLabelProxy t (OptionEntry -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveOptionEntryMethod t OptionEntry, MethodInfo info OptionEntry p) => IsLabel t (OptionEntry -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/OptionEntry.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.OptionEntry where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype OptionEntry = OptionEntry (ForeignPtr OptionEntry)-instance WrappedPtr OptionEntry where
− GI/GLib/Structs/OptionGroup.hs
@@ -1,332 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A `GOptionGroup` struct defines the options in a single-group. The struct has only private fields and should not be directly accessed.--All options in a group share the same translation function. Libraries which-need to parse commandline options are expected to provide a function for-getting a `GOptionGroup` holding their options, which-the application can then add to its #GOptionContext.--}--module GI.GLib.Structs.OptionGroup- ( ---- * Exported types- OptionGroup(..) ,- noOptionGroup ,--- -- * Methods--- ** optionGroupAddEntries- OptionGroupAddEntriesMethodInfo ,- optionGroupAddEntries ,----- ** optionGroupFree- OptionGroupFreeMethodInfo ,- optionGroupFree ,----- ** optionGroupNew- optionGroupNew ,----- ** optionGroupRef- OptionGroupRefMethodInfo ,- optionGroupRef ,----- ** optionGroupSetTranslateFunc- OptionGroupSetTranslateFuncMethodInfo ,- optionGroupSetTranslateFunc ,----- ** optionGroupSetTranslationDomain- OptionGroupSetTranslationDomainMethodInfo,- optionGroupSetTranslationDomain ,----- ** optionGroupUnref- OptionGroupUnrefMethodInfo ,- optionGroupUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype OptionGroup = OptionGroup (ForeignPtr OptionGroup)-foreign import ccall "g_option_group_get_type" c_g_option_group_get_type :: - IO GType--instance BoxedObject OptionGroup where- boxedType _ = c_g_option_group_get_type--noOptionGroup :: Maybe OptionGroup-noOptionGroup = Nothing---type instance AttributeList OptionGroup = OptionGroupAttributeList-type OptionGroupAttributeList = ('[ ] :: [(Symbol, *)])---- method OptionGroup::new--- method type : Constructor--- Args : [Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "help_description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "OptionGroup")--- throws : False--- Skip return : False--foreign import ccall "g_option_group_new" g_option_group_new :: - CString -> -- name : TBasicType TUTF8- CString -> -- description : TBasicType TUTF8- CString -> -- help_description : TBasicType TUTF8- Ptr () -> -- user_data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- destroy : TInterface "GLib" "DestroyNotify"- IO (Ptr OptionGroup)---optionGroupNew ::- (MonadIO m) =>- T.Text -- name- -> T.Text -- description- -> T.Text -- helpDescription- -> Ptr () -- userData- -> Maybe (DestroyNotify) -- destroy- -> m OptionGroup -- result-optionGroupNew name description helpDescription userData destroy = liftIO $ do- name' <- textToCString name- description' <- textToCString description- helpDescription' <- textToCString helpDescription- ptrdestroy <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- maybeDestroy <- case destroy of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jDestroy -> do- jDestroy' <- mkDestroyNotify (destroyNotifyWrapper (Just ptrdestroy) jDestroy)- poke ptrdestroy jDestroy'- return jDestroy'- result <- g_option_group_new name' description' helpDescription' userData maybeDestroy- checkUnexpectedReturnNULL "g_option_group_new" result- result' <- (wrapBoxed OptionGroup) result- freeMem name'- freeMem description'- freeMem helpDescription'- return result'---- method OptionGroup::add_entries--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "entries", argType = TInterface "GLib" "OptionEntry", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_group_add_entries" g_option_group_add_entries :: - Ptr OptionGroup -> -- _obj : TInterface "GLib" "OptionGroup"- Ptr OptionEntry -> -- entries : TInterface "GLib" "OptionEntry"- IO ()---optionGroupAddEntries ::- (MonadIO m) =>- OptionGroup -- _obj- -> OptionEntry -- entries- -> m () -- result-optionGroupAddEntries _obj entries = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let entries' = unsafeManagedPtrGetPtr entries- g_option_group_add_entries _obj' entries'- touchManagedPtr _obj- touchManagedPtr entries- return ()--data OptionGroupAddEntriesMethodInfo-instance (signature ~ (OptionEntry -> m ()), MonadIO m) => MethodInfo OptionGroupAddEntriesMethodInfo OptionGroup signature where- overloadedMethod _ = optionGroupAddEntries---- method OptionGroup::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_group_free" g_option_group_free :: - Ptr OptionGroup -> -- _obj : TInterface "GLib" "OptionGroup"- IO ()--{-# DEPRECATED optionGroupFree ["(Since version 2.44)","Use g_option_group_unref() instead."]#-}-optionGroupFree ::- (MonadIO m) =>- OptionGroup -- _obj- -> m () -- result-optionGroupFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_option_group_free _obj'- touchManagedPtr _obj- return ()--data OptionGroupFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo OptionGroupFreeMethodInfo OptionGroup signature where- overloadedMethod _ = optionGroupFree---- method OptionGroup::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "OptionGroup")--- throws : False--- Skip return : False--foreign import ccall "g_option_group_ref" g_option_group_ref :: - Ptr OptionGroup -> -- _obj : TInterface "GLib" "OptionGroup"- IO (Ptr OptionGroup)---optionGroupRef ::- (MonadIO m) =>- OptionGroup -- _obj- -> m OptionGroup -- result-optionGroupRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_option_group_ref _obj'- checkUnexpectedReturnNULL "g_option_group_ref" result- result' <- (wrapBoxed OptionGroup) result- touchManagedPtr _obj- return result'--data OptionGroupRefMethodInfo-instance (signature ~ (m OptionGroup), MonadIO m) => MethodInfo OptionGroupRefMethodInfo OptionGroup signature where- overloadedMethod _ = optionGroupRef---- method OptionGroup::set_translate_func--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TInterface "GLib" "TranslateFunc", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy_notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_group_set_translate_func" g_option_group_set_translate_func :: - Ptr OptionGroup -> -- _obj : TInterface "GLib" "OptionGroup"- FunPtr TranslateFuncC -> -- func : TInterface "GLib" "TranslateFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- destroy_notify : TInterface "GLib" "DestroyNotify"- IO ()---optionGroupSetTranslateFunc ::- (MonadIO m) =>- OptionGroup -- _obj- -> Maybe (TranslateFunc) -- func- -> m () -- result-optionGroupSetTranslateFunc _obj func = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeFunc <- case func of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jFunc -> do- jFunc' <- mkTranslateFunc (translateFuncWrapper Nothing jFunc)- return jFunc'- let data_ = castFunPtrToPtr maybeFunc- let destroyNotify = safeFreeFunPtrPtr- g_option_group_set_translate_func _obj' maybeFunc data_ destroyNotify- touchManagedPtr _obj- return ()--data OptionGroupSetTranslateFuncMethodInfo-instance (signature ~ (Maybe (TranslateFunc) -> m ()), MonadIO m) => MethodInfo OptionGroupSetTranslateFuncMethodInfo OptionGroup signature where- overloadedMethod _ = optionGroupSetTranslateFunc---- method OptionGroup::set_translation_domain--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "domain", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_group_set_translation_domain" g_option_group_set_translation_domain :: - Ptr OptionGroup -> -- _obj : TInterface "GLib" "OptionGroup"- CString -> -- domain : TBasicType TUTF8- IO ()---optionGroupSetTranslationDomain ::- (MonadIO m) =>- OptionGroup -- _obj- -> T.Text -- domain- -> m () -- result-optionGroupSetTranslationDomain _obj domain = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- domain' <- textToCString domain- g_option_group_set_translation_domain _obj' domain'- touchManagedPtr _obj- freeMem domain'- return ()--data OptionGroupSetTranslationDomainMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo OptionGroupSetTranslationDomainMethodInfo OptionGroup signature where- overloadedMethod _ = optionGroupSetTranslationDomain---- method OptionGroup::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "OptionGroup", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_option_group_unref" g_option_group_unref :: - Ptr OptionGroup -> -- _obj : TInterface "GLib" "OptionGroup"- IO ()---optionGroupUnref ::- (MonadIO m) =>- OptionGroup -- _obj- -> m () -- result-optionGroupUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_option_group_unref _obj'- touchManagedPtr _obj- return ()--data OptionGroupUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo OptionGroupUnrefMethodInfo OptionGroup signature where- overloadedMethod _ = optionGroupUnref--type family ResolveOptionGroupMethod (t :: Symbol) (o :: *) :: * where- ResolveOptionGroupMethod "addEntries" o = OptionGroupAddEntriesMethodInfo- ResolveOptionGroupMethod "free" o = OptionGroupFreeMethodInfo- ResolveOptionGroupMethod "ref" o = OptionGroupRefMethodInfo- ResolveOptionGroupMethod "unref" o = OptionGroupUnrefMethodInfo- ResolveOptionGroupMethod "setTranslateFunc" o = OptionGroupSetTranslateFuncMethodInfo- ResolveOptionGroupMethod "setTranslationDomain" o = OptionGroupSetTranslationDomainMethodInfo- ResolveOptionGroupMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveOptionGroupMethod t OptionGroup, MethodInfo info OptionGroup p) => IsLabelProxy t (OptionGroup -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveOptionGroupMethod t OptionGroup, MethodInfo info OptionGroup p) => IsLabel t (OptionGroup -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/OptionGroup.hs-boot
@@ -1,17 +0,0 @@-module GI.GLib.Structs.OptionGroup where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype OptionGroup = OptionGroup (ForeignPtr OptionGroup)-instance BoxedObject OptionGroup where-data OptionGroupAddEntriesMethodInfo-data OptionGroupFreeMethodInfo-data OptionGroupRefMethodInfo-data OptionGroupSetTranslateFuncMethodInfo-data OptionGroupSetTranslationDomainMethodInfo-data OptionGroupUnrefMethodInfo
− GI/GLib/Structs/PatternSpec.hs
@@ -1,131 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A GPatternSpec struct is the 'compiled' form of a pattern. This-structure is opaque and its fields cannot be accessed directly.--}--module GI.GLib.Structs.PatternSpec- ( ---- * Exported types- PatternSpec(..) ,- noPatternSpec ,--- -- * Methods--- ** patternSpecEqual- PatternSpecEqualMethodInfo ,- patternSpecEqual ,----- ** patternSpecFree- PatternSpecFreeMethodInfo ,- patternSpecFree ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype PatternSpec = PatternSpec (ForeignPtr PatternSpec)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr PatternSpec where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noPatternSpec :: Maybe PatternSpec-noPatternSpec = Nothing---type instance AttributeList PatternSpec = PatternSpecAttributeList-type PatternSpecAttributeList = ('[ ] :: [(Symbol, *)])---- method PatternSpec::equal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "PatternSpec", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pspec2", argType = TInterface "GLib" "PatternSpec", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_pattern_spec_equal" g_pattern_spec_equal :: - Ptr PatternSpec -> -- _obj : TInterface "GLib" "PatternSpec"- Ptr PatternSpec -> -- pspec2 : TInterface "GLib" "PatternSpec"- IO CInt---patternSpecEqual ::- (MonadIO m) =>- PatternSpec -- _obj- -> PatternSpec -- pspec2- -> m Bool -- result-patternSpecEqual _obj pspec2 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let pspec2' = unsafeManagedPtrGetPtr pspec2- result <- g_pattern_spec_equal _obj' pspec2'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr pspec2- return result'--data PatternSpecEqualMethodInfo-instance (signature ~ (PatternSpec -> m Bool), MonadIO m) => MethodInfo PatternSpecEqualMethodInfo PatternSpec signature where- overloadedMethod _ = patternSpecEqual---- method PatternSpec::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "PatternSpec", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_pattern_spec_free" g_pattern_spec_free :: - Ptr PatternSpec -> -- _obj : TInterface "GLib" "PatternSpec"- IO ()---patternSpecFree ::- (MonadIO m) =>- PatternSpec -- _obj- -> m () -- result-patternSpecFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_pattern_spec_free _obj'- touchManagedPtr _obj- return ()--data PatternSpecFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo PatternSpecFreeMethodInfo PatternSpec signature where- overloadedMethod _ = patternSpecFree--type family ResolvePatternSpecMethod (t :: Symbol) (o :: *) :: * where- ResolvePatternSpecMethod "equal" o = PatternSpecEqualMethodInfo- ResolvePatternSpecMethod "free" o = PatternSpecFreeMethodInfo- ResolvePatternSpecMethod l o = MethodResolutionFailed l o--instance (info ~ ResolvePatternSpecMethod t PatternSpec, MethodInfo info PatternSpec p) => IsLabelProxy t (PatternSpec -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolvePatternSpecMethod t PatternSpec, MethodInfo info PatternSpec p) => IsLabel t (PatternSpec -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/PatternSpec.hs-boot
@@ -1,13 +0,0 @@-module GI.GLib.Structs.PatternSpec where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype PatternSpec = PatternSpec (ForeignPtr PatternSpec)-instance WrappedPtr PatternSpec where-data PatternSpecEqualMethodInfo-data PatternSpecFreeMethodInfo
− GI/GLib/Structs/PollFD.hs
@@ -1,165 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Represents a file descriptor, which events to poll for, and which events-occurred.--}--module GI.GLib.Structs.PollFD- ( ---- * Exported types- PollFD(..) ,- newZeroPollFD ,- noPollFD ,--- -- * Properties--- ** Events- pollFDEvents ,- pollFDReadEvents ,- pollFDWriteEvents ,----- ** Fd- pollFDFd ,- pollFDReadFd ,- pollFDWriteFd ,----- ** Revents- pollFDReadRevents ,- pollFDRevents ,- pollFDWriteRevents ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype PollFD = PollFD (ForeignPtr PollFD)-foreign import ccall "g_pollfd_get_type" c_g_pollfd_get_type :: - IO GType--instance BoxedObject PollFD where- boxedType _ = c_g_pollfd_get_type---- | Construct a `PollFD` struct initialized to zero.-newZeroPollFD :: MonadIO m => m PollFD-newZeroPollFD = liftIO $ callocBoxedBytes 8 >>= wrapBoxed PollFD--instance tag ~ 'AttrSet => Constructible PollFD tag where- new _ attrs = do- o <- newZeroPollFD- GI.Attributes.set o attrs- return o---noPollFD :: Maybe PollFD-noPollFD = Nothing--pollFDReadFd :: MonadIO m => PollFD -> m Int32-pollFDReadFd s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Int32- return val--pollFDWriteFd :: MonadIO m => PollFD -> Int32 -> m ()-pollFDWriteFd s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Int32)--data PollFDFdFieldInfo-instance AttrInfo PollFDFdFieldInfo where- type AttrAllowedOps PollFDFdFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint PollFDFdFieldInfo = (~) Int32- type AttrBaseTypeConstraint PollFDFdFieldInfo = (~) PollFD- type AttrGetType PollFDFdFieldInfo = Int32- type AttrLabel PollFDFdFieldInfo = "fd"- attrGet _ = pollFDReadFd- attrSet _ = pollFDWriteFd- attrConstruct = undefined- attrClear _ = undefined--pollFDFd :: AttrLabelProxy "fd"-pollFDFd = AttrLabelProxy---pollFDReadEvents :: MonadIO m => PollFD -> m Word16-pollFDReadEvents s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Word16- return val--pollFDWriteEvents :: MonadIO m => PollFD -> Word16 -> m ()-pollFDWriteEvents s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Word16)--data PollFDEventsFieldInfo-instance AttrInfo PollFDEventsFieldInfo where- type AttrAllowedOps PollFDEventsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint PollFDEventsFieldInfo = (~) Word16- type AttrBaseTypeConstraint PollFDEventsFieldInfo = (~) PollFD- type AttrGetType PollFDEventsFieldInfo = Word16- type AttrLabel PollFDEventsFieldInfo = "events"- attrGet _ = pollFDReadEvents- attrSet _ = pollFDWriteEvents- attrConstruct = undefined- attrClear _ = undefined--pollFDEvents :: AttrLabelProxy "events"-pollFDEvents = AttrLabelProxy---pollFDReadRevents :: MonadIO m => PollFD -> m Word16-pollFDReadRevents s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 6) :: IO Word16- return val--pollFDWriteRevents :: MonadIO m => PollFD -> Word16 -> m ()-pollFDWriteRevents s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 6) (val :: Word16)--data PollFDReventsFieldInfo-instance AttrInfo PollFDReventsFieldInfo where- type AttrAllowedOps PollFDReventsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint PollFDReventsFieldInfo = (~) Word16- type AttrBaseTypeConstraint PollFDReventsFieldInfo = (~) PollFD- type AttrGetType PollFDReventsFieldInfo = Word16- type AttrLabel PollFDReventsFieldInfo = "revents"- attrGet _ = pollFDReadRevents- attrSet _ = pollFDWriteRevents- attrConstruct = undefined- attrClear _ = undefined--pollFDRevents :: AttrLabelProxy "revents"-pollFDRevents = AttrLabelProxy----type instance AttributeList PollFD = PollFDAttributeList-type PollFDAttributeList = ('[ '("fd", PollFDFdFieldInfo), '("events", PollFDEventsFieldInfo), '("revents", PollFDReventsFieldInfo)] :: [(Symbol, *)])--type family ResolvePollFDMethod (t :: Symbol) (o :: *) :: * where- ResolvePollFDMethod l o = MethodResolutionFailed l o--instance (info ~ ResolvePollFDMethod t PollFD, MethodInfo info PollFD p) => IsLabelProxy t (PollFD -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolvePollFDMethod t PollFD, MethodInfo info PollFD p) => IsLabel t (PollFD -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/PollFD.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.PollFD where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype PollFD = PollFD (ForeignPtr PollFD)-instance BoxedObject PollFD where
− GI/GLib/Structs/PtrArray.hs
@@ -1,138 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Contains the public fields of a pointer array.--}--module GI.GLib.Structs.PtrArray- ( ---- * Exported types- PtrArray(..) ,- newZeroPtrArray ,- noPtrArray ,--- -- * Properties--- ** Len- ptrArrayLen ,- ptrArrayReadLen ,- ptrArrayWriteLen ,----- ** Pdata- ptrArrayClearPdata ,- ptrArrayPdata ,- ptrArrayReadPdata ,- ptrArrayWritePdata ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype PtrArray = PtrArray (ForeignPtr PtrArray)-foreign import ccall "g_ptr_array_get_type" c_g_ptr_array_get_type :: - IO GType--instance BoxedObject PtrArray where- boxedType _ = c_g_ptr_array_get_type---- | Construct a `PtrArray` struct initialized to zero.-newZeroPtrArray :: MonadIO m => m PtrArray-newZeroPtrArray = liftIO $ callocBoxedBytes 16 >>= wrapBoxed PtrArray--instance tag ~ 'AttrSet => Constructible PtrArray tag where- new _ attrs = do- o <- newZeroPtrArray- GI.Attributes.set o attrs- return o---noPtrArray :: Maybe PtrArray-noPtrArray = Nothing--ptrArrayReadPdata :: MonadIO m => PtrArray -> m (Ptr ())-ptrArrayReadPdata s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())- return val--ptrArrayWritePdata :: MonadIO m => PtrArray -> Ptr () -> m ()-ptrArrayWritePdata s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr ())--ptrArrayClearPdata :: MonadIO m => PtrArray -> m ()-ptrArrayClearPdata s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: Ptr ())--data PtrArrayPdataFieldInfo-instance AttrInfo PtrArrayPdataFieldInfo where- type AttrAllowedOps PtrArrayPdataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint PtrArrayPdataFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint PtrArrayPdataFieldInfo = (~) PtrArray- type AttrGetType PtrArrayPdataFieldInfo = Ptr ()- type AttrLabel PtrArrayPdataFieldInfo = "pdata"- attrGet _ = ptrArrayReadPdata- attrSet _ = ptrArrayWritePdata- attrConstruct = undefined- attrClear _ = ptrArrayClearPdata--ptrArrayPdata :: AttrLabelProxy "pdata"-ptrArrayPdata = AttrLabelProxy---ptrArrayReadLen :: MonadIO m => PtrArray -> m Word32-ptrArrayReadLen s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--ptrArrayWriteLen :: MonadIO m => PtrArray -> Word32 -> m ()-ptrArrayWriteLen s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--data PtrArrayLenFieldInfo-instance AttrInfo PtrArrayLenFieldInfo where- type AttrAllowedOps PtrArrayLenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint PtrArrayLenFieldInfo = (~) Word32- type AttrBaseTypeConstraint PtrArrayLenFieldInfo = (~) PtrArray- type AttrGetType PtrArrayLenFieldInfo = Word32- type AttrLabel PtrArrayLenFieldInfo = "len"- attrGet _ = ptrArrayReadLen- attrSet _ = ptrArrayWriteLen- attrConstruct = undefined- attrClear _ = undefined--ptrArrayLen :: AttrLabelProxy "len"-ptrArrayLen = AttrLabelProxy----type instance AttributeList PtrArray = PtrArrayAttributeList-type PtrArrayAttributeList = ('[ '("pdata", PtrArrayPdataFieldInfo), '("len", PtrArrayLenFieldInfo)] :: [(Symbol, *)])--type family ResolvePtrArrayMethod (t :: Symbol) (o :: *) :: * where- ResolvePtrArrayMethod l o = MethodResolutionFailed l o--instance (info ~ ResolvePtrArrayMethod t PtrArray, MethodInfo info PtrArray p) => IsLabelProxy t (PtrArray -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolvePtrArrayMethod t PtrArray, MethodInfo info PtrArray p) => IsLabel t (PtrArray -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/PtrArray.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.PtrArray where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype PtrArray = PtrArray (ForeignPtr PtrArray)-instance BoxedObject PtrArray where
− GI/GLib/Structs/Queue.hs
@@ -1,629 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Contains the public fields of a-[Queue][glib-Double-ended-Queues].--}--module GI.GLib.Structs.Queue- ( ---- * Exported types- Queue(..) ,- newZeroQueue ,- noQueue ,--- -- * Methods--- ** queueClear- QueueClearMethodInfo ,- queueClear ,----- ** queueFree- QueueFreeMethodInfo ,- queueFree ,----- ** queueFreeFull- QueueFreeFullMethodInfo ,- queueFreeFull ,----- ** queueGetLength- QueueGetLengthMethodInfo ,- queueGetLength ,----- ** queueIndex- QueueIndexMethodInfo ,- queueIndex ,----- ** queueInit- QueueInitMethodInfo ,- queueInit ,----- ** queueIsEmpty- QueueIsEmptyMethodInfo ,- queueIsEmpty ,----- ** queuePushHead- QueuePushHeadMethodInfo ,- queuePushHead ,----- ** queuePushNth- QueuePushNthMethodInfo ,- queuePushNth ,----- ** queuePushTail- QueuePushTailMethodInfo ,- queuePushTail ,----- ** queueRemove- QueueRemoveMethodInfo ,- queueRemove ,----- ** queueRemoveAll- QueueRemoveAllMethodInfo ,- queueRemoveAll ,----- ** queueReverse- QueueReverseMethodInfo ,- queueReverse ,----- -- * Properties--- ** Head- queueClearHead ,- queueHead ,- queueReadHead ,- queueWriteHead ,----- ** Length- queueLength ,- queueReadLength ,- queueWriteLength ,----- ** Tail- queueClearTail ,- queueReadTail ,- queueTail ,- queueWriteTail ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Queue = Queue (ForeignPtr Queue)-instance WrappedPtr Queue where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = copyPtr 24- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Queue` struct initialized to zero.-newZeroQueue :: MonadIO m => m Queue-newZeroQueue = liftIO $ wrappedPtrCalloc >>= wrapPtr Queue--instance tag ~ 'AttrSet => Constructible Queue tag where- new _ attrs = do- o <- newZeroQueue- GI.Attributes.set o attrs- return o---noQueue :: Maybe Queue-noQueue = Nothing--queueReadHead :: MonadIO m => Queue -> m ([Ptr ()])-queueReadHead s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr (GList (Ptr ())))- val' <- unpackGList val- return val'--queueWriteHead :: MonadIO m => Queue -> Ptr (GList (Ptr ())) -> m ()-queueWriteHead s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr (GList (Ptr ())))--queueClearHead :: MonadIO m => Queue -> m ()-queueClearHead s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: Ptr (GList (Ptr ())))--data QueueHeadFieldInfo-instance AttrInfo QueueHeadFieldInfo where- type AttrAllowedOps QueueHeadFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint QueueHeadFieldInfo = (~) (Ptr (GList (Ptr ())))- type AttrBaseTypeConstraint QueueHeadFieldInfo = (~) Queue- type AttrGetType QueueHeadFieldInfo = [Ptr ()]- type AttrLabel QueueHeadFieldInfo = "head"- attrGet _ = queueReadHead- attrSet _ = queueWriteHead- attrConstruct = undefined- attrClear _ = queueClearHead--queueHead :: AttrLabelProxy "head"-queueHead = AttrLabelProxy---queueReadTail :: MonadIO m => Queue -> m ([Ptr ()])-queueReadTail s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (Ptr (GList (Ptr ())))- val' <- unpackGList val- return val'--queueWriteTail :: MonadIO m => Queue -> Ptr (GList (Ptr ())) -> m ()-queueWriteTail s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Ptr (GList (Ptr ())))--queueClearTail :: MonadIO m => Queue -> m ()-queueClearTail s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (nullPtr :: Ptr (GList (Ptr ())))--data QueueTailFieldInfo-instance AttrInfo QueueTailFieldInfo where- type AttrAllowedOps QueueTailFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint QueueTailFieldInfo = (~) (Ptr (GList (Ptr ())))- type AttrBaseTypeConstraint QueueTailFieldInfo = (~) Queue- type AttrGetType QueueTailFieldInfo = [Ptr ()]- type AttrLabel QueueTailFieldInfo = "tail"- attrGet _ = queueReadTail- attrSet _ = queueWriteTail- attrConstruct = undefined- attrClear _ = queueClearTail--queueTail :: AttrLabelProxy "tail"-queueTail = AttrLabelProxy---queueReadLength :: MonadIO m => Queue -> m Word32-queueReadLength s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Word32- return val--queueWriteLength :: MonadIO m => Queue -> Word32 -> m ()-queueWriteLength s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Word32)--data QueueLengthFieldInfo-instance AttrInfo QueueLengthFieldInfo where- type AttrAllowedOps QueueLengthFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint QueueLengthFieldInfo = (~) Word32- type AttrBaseTypeConstraint QueueLengthFieldInfo = (~) Queue- type AttrGetType QueueLengthFieldInfo = Word32- type AttrLabel QueueLengthFieldInfo = "length"- attrGet _ = queueReadLength- attrSet _ = queueWriteLength- attrConstruct = undefined- attrClear _ = undefined--queueLength :: AttrLabelProxy "length"-queueLength = AttrLabelProxy----type instance AttributeList Queue = QueueAttributeList-type QueueAttributeList = ('[ '("head", QueueHeadFieldInfo), '("tail", QueueTailFieldInfo), '("length", QueueLengthFieldInfo)] :: [(Symbol, *)])---- method Queue::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_clear" g_queue_clear :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- IO ()---queueClear ::- (MonadIO m) =>- Queue -- _obj- -> m () -- result-queueClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_queue_clear _obj'- touchManagedPtr _obj- return ()--data QueueClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo QueueClearMethodInfo Queue signature where- overloadedMethod _ = queueClear---- method Queue::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_free" g_queue_free :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- IO ()---queueFree ::- (MonadIO m) =>- Queue -- _obj- -> m () -- result-queueFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_queue_free _obj'- touchManagedPtr _obj- return ()--data QueueFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo QueueFreeMethodInfo Queue signature where- overloadedMethod _ = queueFree---- method Queue::free_full--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "free_func", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_free_full" g_queue_free_full :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- FunPtr DestroyNotifyC -> -- free_func : TInterface "GLib" "DestroyNotify"- IO ()---queueFreeFull ::- (MonadIO m) =>- Queue -- _obj- -> DestroyNotify -- freeFunc- -> m () -- result-queueFreeFull _obj freeFunc = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- ptrfreeFunc <- callocMem :: IO (Ptr (FunPtr DestroyNotifyC))- freeFunc' <- mkDestroyNotify (destroyNotifyWrapper (Just ptrfreeFunc) freeFunc)- poke ptrfreeFunc freeFunc'- g_queue_free_full _obj' freeFunc'- touchManagedPtr _obj- return ()--data QueueFreeFullMethodInfo-instance (signature ~ (DestroyNotify -> m ()), MonadIO m) => MethodInfo QueueFreeFullMethodInfo Queue signature where- overloadedMethod _ = queueFreeFull---- method Queue::get_length--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_queue_get_length" g_queue_get_length :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- IO Word32---queueGetLength ::- (MonadIO m) =>- Queue -- _obj- -> m Word32 -- result-queueGetLength _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_queue_get_length _obj'- touchManagedPtr _obj- return result--data QueueGetLengthMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo QueueGetLengthMethodInfo Queue signature where- overloadedMethod _ = queueGetLength---- method Queue::index--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_queue_index" g_queue_index :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- Ptr () -> -- data : TBasicType TPtr- IO Int32---queueIndex ::- (MonadIO m) =>- Queue -- _obj- -> Ptr () -- data_- -> m Int32 -- result-queueIndex _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_queue_index _obj' data_- touchManagedPtr _obj- return result--data QueueIndexMethodInfo-instance (signature ~ (Ptr () -> m Int32), MonadIO m) => MethodInfo QueueIndexMethodInfo Queue signature where- overloadedMethod _ = queueIndex---- method Queue::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_init" g_queue_init :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- IO ()---queueInit ::- (MonadIO m) =>- Queue -- _obj- -> m () -- result-queueInit _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_queue_init _obj'- touchManagedPtr _obj- return ()--data QueueInitMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo QueueInitMethodInfo Queue signature where- overloadedMethod _ = queueInit---- method Queue::is_empty--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_queue_is_empty" g_queue_is_empty :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- IO CInt---queueIsEmpty ::- (MonadIO m) =>- Queue -- _obj- -> m Bool -- result-queueIsEmpty _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_queue_is_empty _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data QueueIsEmptyMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo QueueIsEmptyMethodInfo Queue signature where- overloadedMethod _ = queueIsEmpty---- method Queue::push_head--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_push_head" g_queue_push_head :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- Ptr () -> -- data : TBasicType TPtr- IO ()---queuePushHead ::- (MonadIO m) =>- Queue -- _obj- -> Ptr () -- data_- -> m () -- result-queuePushHead _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_queue_push_head _obj' data_- touchManagedPtr _obj- return ()--data QueuePushHeadMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo QueuePushHeadMethodInfo Queue signature where- overloadedMethod _ = queuePushHead---- method Queue::push_nth--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_push_nth" g_queue_push_nth :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- Ptr () -> -- data : TBasicType TPtr- Int32 -> -- n : TBasicType TInt- IO ()---queuePushNth ::- (MonadIO m) =>- Queue -- _obj- -> Ptr () -- data_- -> Int32 -- n- -> m () -- result-queuePushNth _obj data_ n = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_queue_push_nth _obj' data_ n- touchManagedPtr _obj- return ()--data QueuePushNthMethodInfo-instance (signature ~ (Ptr () -> Int32 -> m ()), MonadIO m) => MethodInfo QueuePushNthMethodInfo Queue signature where- overloadedMethod _ = queuePushNth---- method Queue::push_tail--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_push_tail" g_queue_push_tail :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- Ptr () -> -- data : TBasicType TPtr- IO ()---queuePushTail ::- (MonadIO m) =>- Queue -- _obj- -> Ptr () -- data_- -> m () -- result-queuePushTail _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_queue_push_tail _obj' data_- touchManagedPtr _obj- return ()--data QueuePushTailMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo QueuePushTailMethodInfo Queue signature where- overloadedMethod _ = queuePushTail---- method Queue::remove--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_queue_remove" g_queue_remove :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- Ptr () -> -- data : TBasicType TPtr- IO CInt---queueRemove ::- (MonadIO m) =>- Queue -- _obj- -> Ptr () -- data_- -> m Bool -- result-queueRemove _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_queue_remove _obj' data_- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data QueueRemoveMethodInfo-instance (signature ~ (Ptr () -> m Bool), MonadIO m) => MethodInfo QueueRemoveMethodInfo Queue signature where- overloadedMethod _ = queueRemove---- method Queue::remove_all--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_queue_remove_all" g_queue_remove_all :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- Ptr () -> -- data : TBasicType TPtr- IO Word32---queueRemoveAll ::- (MonadIO m) =>- Queue -- _obj- -> Ptr () -- data_- -> m Word32 -- result-queueRemoveAll _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_queue_remove_all _obj' data_- touchManagedPtr _obj- return result--data QueueRemoveAllMethodInfo-instance (signature ~ (Ptr () -> m Word32), MonadIO m) => MethodInfo QueueRemoveAllMethodInfo Queue signature where- overloadedMethod _ = queueRemoveAll---- method Queue::reverse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Queue", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_queue_reverse" g_queue_reverse :: - Ptr Queue -> -- _obj : TInterface "GLib" "Queue"- IO ()---queueReverse ::- (MonadIO m) =>- Queue -- _obj- -> m () -- result-queueReverse _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_queue_reverse _obj'- touchManagedPtr _obj- return ()--data QueueReverseMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo QueueReverseMethodInfo Queue signature where- overloadedMethod _ = queueReverse--type family ResolveQueueMethod (t :: Symbol) (o :: *) :: * where- ResolveQueueMethod "clear" o = QueueClearMethodInfo- ResolveQueueMethod "free" o = QueueFreeMethodInfo- ResolveQueueMethod "freeFull" o = QueueFreeFullMethodInfo- ResolveQueueMethod "index" o = QueueIndexMethodInfo- ResolveQueueMethod "init" o = QueueInitMethodInfo- ResolveQueueMethod "isEmpty" o = QueueIsEmptyMethodInfo- ResolveQueueMethod "pushHead" o = QueuePushHeadMethodInfo- ResolveQueueMethod "pushNth" o = QueuePushNthMethodInfo- ResolveQueueMethod "pushTail" o = QueuePushTailMethodInfo- ResolveQueueMethod "remove" o = QueueRemoveMethodInfo- ResolveQueueMethod "removeAll" o = QueueRemoveAllMethodInfo- ResolveQueueMethod "reverse" o = QueueReverseMethodInfo- ResolveQueueMethod "getLength" o = QueueGetLengthMethodInfo- ResolveQueueMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveQueueMethod t Queue, MethodInfo info Queue p) => IsLabelProxy t (Queue -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveQueueMethod t Queue, MethodInfo info Queue p) => IsLabel t (Queue -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Queue.hs-boot
@@ -1,24 +0,0 @@-module GI.GLib.Structs.Queue where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Queue = Queue (ForeignPtr Queue)-instance WrappedPtr Queue where-data QueueClearMethodInfo-data QueueFreeMethodInfo-data QueueFreeFullMethodInfo-data QueueGetLengthMethodInfo-data QueueIndexMethodInfo-data QueueInitMethodInfo-data QueueIsEmptyMethodInfo-data QueuePushHeadMethodInfo-data QueuePushNthMethodInfo-data QueuePushTailMethodInfo-data QueueRemoveMethodInfo-data QueueRemoveAllMethodInfo-data QueueReverseMethodInfo
− GI/GLib/Structs/RWLock.hs
@@ -1,394 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GRWLock struct is an opaque data structure to represent a-reader-writer lock. It is similar to a #GMutex in that it allows-multiple threads to coordinate access to a shared resource.--The difference to a mutex is that a reader-writer lock discriminates-between read-only ('reader') and full ('writer') access. While only-one thread at a time is allowed write access (by holding the 'writer'-lock via g_rw_lock_writer_lock()), multiple threads can gain-simultaneous read-only access (by holding the 'reader' lock via-g_rw_lock_reader_lock()).--Here is an example for an array with access functions:-|[<!-- language="C" -->- GRWLock lock;- GPtrArray *array;-- gpointer- my_array_get (guint index)- {- gpointer retval = NULL;-- if (!array)- return NULL;-- g_rw_lock_reader_lock (&lock);- if (index < array->len)- retval = g_ptr_array_index (array, index);- g_rw_lock_reader_unlock (&lock);-- return retval;- }-- void- my_array_set (guint index, gpointer data)- {- g_rw_lock_writer_lock (&lock);-- if (!array)- array = g_ptr_array_new ();-- if (index >= array->len)- g_ptr_array_set_size (array, index+1);- g_ptr_array_index (array, index) = data;-- g_rw_lock_writer_unlock (&lock);- }- ]|-This example shows an array which can be accessed by many readers-(the my_array_get() function) simultaneously, whereas the writers-(the my_array_set() function) will only be allowed one at a time-and only if no readers currently access the array. This is because-of the potentially dangerous resizing of the array. Using these-functions is fully multi-thread safe now.--If a #GRWLock is allocated in static storage then it can be used-without initialisation. Otherwise, you should call-g_rw_lock_init() on it and g_rw_lock_clear() when done.--A GRWLock should only be accessed with the g_rw_lock_ functions.--}--module GI.GLib.Structs.RWLock- ( ---- * Exported types- RWLock(..) ,- newZeroRWLock ,- noRWLock ,--- -- * Methods--- ** rWLockClear- RWLockClearMethodInfo ,- rWLockClear ,----- ** rWLockInit- RWLockInitMethodInfo ,- rWLockInit ,----- ** rWLockReaderLock- RWLockReaderLockMethodInfo ,- rWLockReaderLock ,----- ** rWLockReaderTrylock- RWLockReaderTrylockMethodInfo ,- rWLockReaderTrylock ,----- ** rWLockReaderUnlock- RWLockReaderUnlockMethodInfo ,- rWLockReaderUnlock ,----- ** rWLockWriterLock- RWLockWriterLockMethodInfo ,- rWLockWriterLock ,----- ** rWLockWriterTrylock- RWLockWriterTrylockMethodInfo ,- rWLockWriterTrylock ,----- ** rWLockWriterUnlock- RWLockWriterUnlockMethodInfo ,- rWLockWriterUnlock ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype RWLock = RWLock (ForeignPtr RWLock)-instance WrappedPtr RWLock where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = copyPtr 16- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `RWLock` struct initialized to zero.-newZeroRWLock :: MonadIO m => m RWLock-newZeroRWLock = liftIO $ wrappedPtrCalloc >>= wrapPtr RWLock--instance tag ~ 'AttrSet => Constructible RWLock tag where- new _ attrs = do- o <- newZeroRWLock- GI.Attributes.set o attrs- return o---noRWLock :: Maybe RWLock-noRWLock = Nothing---type instance AttributeList RWLock = RWLockAttributeList-type RWLockAttributeList = ('[ ] :: [(Symbol, *)])---- method RWLock::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_clear" g_rw_lock_clear :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO ()---rWLockClear ::- (MonadIO m) =>- RWLock -- _obj- -> m () -- result-rWLockClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rw_lock_clear _obj'- touchManagedPtr _obj- return ()--data RWLockClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RWLockClearMethodInfo RWLock signature where- overloadedMethod _ = rWLockClear---- method RWLock::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_init" g_rw_lock_init :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO ()---rWLockInit ::- (MonadIO m) =>- RWLock -- _obj- -> m () -- result-rWLockInit _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rw_lock_init _obj'- touchManagedPtr _obj- return ()--data RWLockInitMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RWLockInitMethodInfo RWLock signature where- overloadedMethod _ = rWLockInit---- method RWLock::reader_lock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_reader_lock" g_rw_lock_reader_lock :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO ()---rWLockReaderLock ::- (MonadIO m) =>- RWLock -- _obj- -> m () -- result-rWLockReaderLock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rw_lock_reader_lock _obj'- touchManagedPtr _obj- return ()--data RWLockReaderLockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RWLockReaderLockMethodInfo RWLock signature where- overloadedMethod _ = rWLockReaderLock---- method RWLock::reader_trylock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_reader_trylock" g_rw_lock_reader_trylock :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO CInt---rWLockReaderTrylock ::- (MonadIO m) =>- RWLock -- _obj- -> m Bool -- result-rWLockReaderTrylock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_rw_lock_reader_trylock _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data RWLockReaderTrylockMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo RWLockReaderTrylockMethodInfo RWLock signature where- overloadedMethod _ = rWLockReaderTrylock---- method RWLock::reader_unlock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_reader_unlock" g_rw_lock_reader_unlock :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO ()---rWLockReaderUnlock ::- (MonadIO m) =>- RWLock -- _obj- -> m () -- result-rWLockReaderUnlock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rw_lock_reader_unlock _obj'- touchManagedPtr _obj- return ()--data RWLockReaderUnlockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RWLockReaderUnlockMethodInfo RWLock signature where- overloadedMethod _ = rWLockReaderUnlock---- method RWLock::writer_lock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_writer_lock" g_rw_lock_writer_lock :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO ()---rWLockWriterLock ::- (MonadIO m) =>- RWLock -- _obj- -> m () -- result-rWLockWriterLock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rw_lock_writer_lock _obj'- touchManagedPtr _obj- return ()--data RWLockWriterLockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RWLockWriterLockMethodInfo RWLock signature where- overloadedMethod _ = rWLockWriterLock---- method RWLock::writer_trylock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_writer_trylock" g_rw_lock_writer_trylock :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO CInt---rWLockWriterTrylock ::- (MonadIO m) =>- RWLock -- _obj- -> m Bool -- result-rWLockWriterTrylock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_rw_lock_writer_trylock _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data RWLockWriterTrylockMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo RWLockWriterTrylockMethodInfo RWLock signature where- overloadedMethod _ = rWLockWriterTrylock---- method RWLock::writer_unlock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RWLock", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rw_lock_writer_unlock" g_rw_lock_writer_unlock :: - Ptr RWLock -> -- _obj : TInterface "GLib" "RWLock"- IO ()---rWLockWriterUnlock ::- (MonadIO m) =>- RWLock -- _obj- -> m () -- result-rWLockWriterUnlock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rw_lock_writer_unlock _obj'- touchManagedPtr _obj- return ()--data RWLockWriterUnlockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RWLockWriterUnlockMethodInfo RWLock signature where- overloadedMethod _ = rWLockWriterUnlock--type family ResolveRWLockMethod (t :: Symbol) (o :: *) :: * where- ResolveRWLockMethod "clear" o = RWLockClearMethodInfo- ResolveRWLockMethod "init" o = RWLockInitMethodInfo- ResolveRWLockMethod "readerLock" o = RWLockReaderLockMethodInfo- ResolveRWLockMethod "readerTrylock" o = RWLockReaderTrylockMethodInfo- ResolveRWLockMethod "readerUnlock" o = RWLockReaderUnlockMethodInfo- ResolveRWLockMethod "writerLock" o = RWLockWriterLockMethodInfo- ResolveRWLockMethod "writerTrylock" o = RWLockWriterTrylockMethodInfo- ResolveRWLockMethod "writerUnlock" o = RWLockWriterUnlockMethodInfo- ResolveRWLockMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveRWLockMethod t RWLock, MethodInfo info RWLock p) => IsLabelProxy t (RWLock -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveRWLockMethod t RWLock, MethodInfo info RWLock p) => IsLabel t (RWLock -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/RWLock.hs-boot
@@ -1,19 +0,0 @@-module GI.GLib.Structs.RWLock where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype RWLock = RWLock (ForeignPtr RWLock)-instance WrappedPtr RWLock where-data RWLockClearMethodInfo-data RWLockInitMethodInfo-data RWLockReaderLockMethodInfo-data RWLockReaderTrylockMethodInfo-data RWLockReaderUnlockMethodInfo-data RWLockWriterLockMethodInfo-data RWLockWriterTrylockMethodInfo-data RWLockWriterUnlockMethodInfo
− GI/GLib/Structs/Rand.hs
@@ -1,309 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GRand struct is an opaque data structure. It should only be-accessed through the g_rand_* functions.--}--module GI.GLib.Structs.Rand- ( ---- * Exported types- Rand(..) ,- noRand ,--- -- * Methods--- ** randDouble- RandDoubleMethodInfo ,- randDouble ,----- ** randDoubleRange- RandDoubleRangeMethodInfo ,- randDoubleRange ,----- ** randFree- RandFreeMethodInfo ,- randFree ,----- ** randInt- RandIntMethodInfo ,- randInt ,----- ** randIntRange- RandIntRangeMethodInfo ,- randIntRange ,----- ** randSetSeed- RandSetSeedMethodInfo ,- randSetSeed ,----- ** randSetSeedArray- RandSetSeedArrayMethodInfo ,- randSetSeedArray ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Rand = Rand (ForeignPtr Rand)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Rand where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noRand :: Maybe Rand-noRand = Nothing---type instance AttributeList Rand = RandAttributeList-type RandAttributeList = ('[ ] :: [(Symbol, *)])---- method Rand::double--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Rand", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_rand_double" g_rand_double :: - Ptr Rand -> -- _obj : TInterface "GLib" "Rand"- IO CDouble---randDouble ::- (MonadIO m) =>- Rand -- _obj- -> m Double -- result-randDouble _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_rand_double _obj'- let result' = realToFrac result- touchManagedPtr _obj- return result'--data RandDoubleMethodInfo-instance (signature ~ (m Double), MonadIO m) => MethodInfo RandDoubleMethodInfo Rand signature where- overloadedMethod _ = randDouble---- method Rand::double_range--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Rand", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "begin", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_rand_double_range" g_rand_double_range :: - Ptr Rand -> -- _obj : TInterface "GLib" "Rand"- CDouble -> -- begin : TBasicType TDouble- CDouble -> -- end : TBasicType TDouble- IO CDouble---randDoubleRange ::- (MonadIO m) =>- Rand -- _obj- -> Double -- begin- -> Double -- end- -> m Double -- result-randDoubleRange _obj begin end = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let begin' = realToFrac begin- let end' = realToFrac end- result <- g_rand_double_range _obj' begin' end'- let result' = realToFrac result- touchManagedPtr _obj- return result'--data RandDoubleRangeMethodInfo-instance (signature ~ (Double -> Double -> m Double), MonadIO m) => MethodInfo RandDoubleRangeMethodInfo Rand signature where- overloadedMethod _ = randDoubleRange---- method Rand::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Rand", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rand_free" g_rand_free :: - Ptr Rand -> -- _obj : TInterface "GLib" "Rand"- IO ()---randFree ::- (MonadIO m) =>- Rand -- _obj- -> m () -- result-randFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rand_free _obj'- touchManagedPtr _obj- return ()--data RandFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RandFreeMethodInfo Rand signature where- overloadedMethod _ = randFree---- method Rand::int--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Rand", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_rand_int" g_rand_int :: - Ptr Rand -> -- _obj : TInterface "GLib" "Rand"- IO Word32---randInt ::- (MonadIO m) =>- Rand -- _obj- -> m Word32 -- result-randInt _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_rand_int _obj'- touchManagedPtr _obj- return result--data RandIntMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo RandIntMethodInfo Rand signature where- overloadedMethod _ = randInt---- method Rand::int_range--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Rand", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "begin", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt32)--- throws : False--- Skip return : False--foreign import ccall "g_rand_int_range" g_rand_int_range :: - Ptr Rand -> -- _obj : TInterface "GLib" "Rand"- Int32 -> -- begin : TBasicType TInt32- Int32 -> -- end : TBasicType TInt32- IO Int32---randIntRange ::- (MonadIO m) =>- Rand -- _obj- -> Int32 -- begin- -> Int32 -- end- -> m Int32 -- result-randIntRange _obj begin end = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_rand_int_range _obj' begin end- touchManagedPtr _obj- return result--data RandIntRangeMethodInfo-instance (signature ~ (Int32 -> Int32 -> m Int32), MonadIO m) => MethodInfo RandIntRangeMethodInfo Rand signature where- overloadedMethod _ = randIntRange---- method Rand::set_seed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Rand", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seed", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rand_set_seed" g_rand_set_seed :: - Ptr Rand -> -- _obj : TInterface "GLib" "Rand"- Word32 -> -- seed : TBasicType TUInt32- IO ()---randSetSeed ::- (MonadIO m) =>- Rand -- _obj- -> Word32 -- seed- -> m () -- result-randSetSeed _obj seed = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rand_set_seed _obj' seed- touchManagedPtr _obj- return ()--data RandSetSeedMethodInfo-instance (signature ~ (Word32 -> m ()), MonadIO m) => MethodInfo RandSetSeedMethodInfo Rand signature where- overloadedMethod _ = randSetSeed---- method Rand::set_seed_array--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Rand", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seed", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seed_length", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rand_set_seed_array" g_rand_set_seed_array :: - Ptr Rand -> -- _obj : TInterface "GLib" "Rand"- Word32 -> -- seed : TBasicType TUInt32- Word32 -> -- seed_length : TBasicType TUInt- IO ()---randSetSeedArray ::- (MonadIO m) =>- Rand -- _obj- -> Word32 -- seed- -> Word32 -- seedLength- -> m () -- result-randSetSeedArray _obj seed seedLength = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rand_set_seed_array _obj' seed seedLength- touchManagedPtr _obj- return ()--data RandSetSeedArrayMethodInfo-instance (signature ~ (Word32 -> Word32 -> m ()), MonadIO m) => MethodInfo RandSetSeedArrayMethodInfo Rand signature where- overloadedMethod _ = randSetSeedArray--type family ResolveRandMethod (t :: Symbol) (o :: *) :: * where- ResolveRandMethod "double" o = RandDoubleMethodInfo- ResolveRandMethod "doubleRange" o = RandDoubleRangeMethodInfo- ResolveRandMethod "free" o = RandFreeMethodInfo- ResolveRandMethod "int" o = RandIntMethodInfo- ResolveRandMethod "intRange" o = RandIntRangeMethodInfo- ResolveRandMethod "setSeed" o = RandSetSeedMethodInfo- ResolveRandMethod "setSeedArray" o = RandSetSeedArrayMethodInfo- ResolveRandMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveRandMethod t Rand, MethodInfo info Rand p) => IsLabelProxy t (Rand -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveRandMethod t Rand, MethodInfo info Rand p) => IsLabel t (Rand -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Rand.hs-boot
@@ -1,18 +0,0 @@-module GI.GLib.Structs.Rand where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Rand = Rand (ForeignPtr Rand)-instance WrappedPtr Rand where-data RandDoubleMethodInfo-data RandDoubleRangeMethodInfo-data RandFreeMethodInfo-data RandIntMethodInfo-data RandIntRangeMethodInfo-data RandSetSeedMethodInfo-data RandSetSeedArrayMethodInfo
− GI/GLib/Structs/RecMutex.hs
@@ -1,247 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GRecMutex struct is an opaque data structure to represent a-recursive mutex. It is similar to a #GMutex with the difference-that it is possible to lock a GRecMutex multiple times in the same-thread without deadlock. When doing so, care has to be taken to-unlock the recursive mutex as often as it has been locked.--If a #GRecMutex is allocated in static storage then it can be used-without initialisation. Otherwise, you should call-g_rec_mutex_init() on it and g_rec_mutex_clear() when done.--A GRecMutex should only be accessed with the-g_rec_mutex_ functions.--}--module GI.GLib.Structs.RecMutex- ( ---- * Exported types- RecMutex(..) ,- newZeroRecMutex ,- noRecMutex ,--- -- * Methods--- ** recMutexClear- RecMutexClearMethodInfo ,- recMutexClear ,----- ** recMutexInit- RecMutexInitMethodInfo ,- recMutexInit ,----- ** recMutexLock- RecMutexLockMethodInfo ,- recMutexLock ,----- ** recMutexTrylock- RecMutexTrylockMethodInfo ,- recMutexTrylock ,----- ** recMutexUnlock- RecMutexUnlockMethodInfo ,- recMutexUnlock ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype RecMutex = RecMutex (ForeignPtr RecMutex)-instance WrappedPtr RecMutex where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = copyPtr 16- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `RecMutex` struct initialized to zero.-newZeroRecMutex :: MonadIO m => m RecMutex-newZeroRecMutex = liftIO $ wrappedPtrCalloc >>= wrapPtr RecMutex--instance tag ~ 'AttrSet => Constructible RecMutex tag where- new _ attrs = do- o <- newZeroRecMutex- GI.Attributes.set o attrs- return o---noRecMutex :: Maybe RecMutex-noRecMutex = Nothing---type instance AttributeList RecMutex = RecMutexAttributeList-type RecMutexAttributeList = ('[ ] :: [(Symbol, *)])---- method RecMutex::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RecMutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rec_mutex_clear" g_rec_mutex_clear :: - Ptr RecMutex -> -- _obj : TInterface "GLib" "RecMutex"- IO ()---recMutexClear ::- (MonadIO m) =>- RecMutex -- _obj- -> m () -- result-recMutexClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rec_mutex_clear _obj'- touchManagedPtr _obj- return ()--data RecMutexClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RecMutexClearMethodInfo RecMutex signature where- overloadedMethod _ = recMutexClear---- method RecMutex::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RecMutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rec_mutex_init" g_rec_mutex_init :: - Ptr RecMutex -> -- _obj : TInterface "GLib" "RecMutex"- IO ()---recMutexInit ::- (MonadIO m) =>- RecMutex -- _obj- -> m () -- result-recMutexInit _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rec_mutex_init _obj'- touchManagedPtr _obj- return ()--data RecMutexInitMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RecMutexInitMethodInfo RecMutex signature where- overloadedMethod _ = recMutexInit---- method RecMutex::lock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RecMutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rec_mutex_lock" g_rec_mutex_lock :: - Ptr RecMutex -> -- _obj : TInterface "GLib" "RecMutex"- IO ()---recMutexLock ::- (MonadIO m) =>- RecMutex -- _obj- -> m () -- result-recMutexLock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rec_mutex_lock _obj'- touchManagedPtr _obj- return ()--data RecMutexLockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RecMutexLockMethodInfo RecMutex signature where- overloadedMethod _ = recMutexLock---- method RecMutex::trylock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RecMutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_rec_mutex_trylock" g_rec_mutex_trylock :: - Ptr RecMutex -> -- _obj : TInterface "GLib" "RecMutex"- IO CInt---recMutexTrylock ::- (MonadIO m) =>- RecMutex -- _obj- -> m Bool -- result-recMutexTrylock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_rec_mutex_trylock _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data RecMutexTrylockMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo RecMutexTrylockMethodInfo RecMutex signature where- overloadedMethod _ = recMutexTrylock---- method RecMutex::unlock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "RecMutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_rec_mutex_unlock" g_rec_mutex_unlock :: - Ptr RecMutex -> -- _obj : TInterface "GLib" "RecMutex"- IO ()---recMutexUnlock ::- (MonadIO m) =>- RecMutex -- _obj- -> m () -- result-recMutexUnlock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_rec_mutex_unlock _obj'- touchManagedPtr _obj- return ()--data RecMutexUnlockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RecMutexUnlockMethodInfo RecMutex signature where- overloadedMethod _ = recMutexUnlock--type family ResolveRecMutexMethod (t :: Symbol) (o :: *) :: * where- ResolveRecMutexMethod "clear" o = RecMutexClearMethodInfo- ResolveRecMutexMethod "init" o = RecMutexInitMethodInfo- ResolveRecMutexMethod "lock" o = RecMutexLockMethodInfo- ResolveRecMutexMethod "trylock" o = RecMutexTrylockMethodInfo- ResolveRecMutexMethod "unlock" o = RecMutexUnlockMethodInfo- ResolveRecMutexMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveRecMutexMethod t RecMutex, MethodInfo info RecMutex p) => IsLabelProxy t (RecMutex -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveRecMutexMethod t RecMutex, MethodInfo info RecMutex p) => IsLabel t (RecMutex -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/RecMutex.hs-boot
@@ -1,16 +0,0 @@-module GI.GLib.Structs.RecMutex where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype RecMutex = RecMutex (ForeignPtr RecMutex)-instance WrappedPtr RecMutex where-data RecMutexClearMethodInfo-data RecMutexInitMethodInfo-data RecMutexLockMethodInfo-data RecMutexTrylockMethodInfo-data RecMutexUnlockMethodInfo
− GI/GLib/Structs/Regex.hs
@@ -1,1134 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The g_regex_*() functions implement regular-expression pattern matching using syntax and semantics similar to-Perl regular expression.--Some functions accept a @start_position argument, setting it differs-from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL-in the case of a pattern that begins with any kind of lookbehind assertion.-For example, consider the pattern "\Biss\B" which finds occurrences of "iss"-in the middle of words. ("\B" matches only if the current position in the-subject is not a word boundary.) When applied to the string "Mississipi"-from the fourth byte, namely "issipi", it does not match, because "\B" is-always false at the start of the subject, which is deemed to be a word-boundary. However, if the entire string is passed , but with-@start_position set to 4, it finds the second occurrence of "iss" because-it is able to look behind the starting point to discover that it is-preceded by a letter.--Note that, unless you set the #G_REGEX_RAW flag, all the strings passed-to these functions must be encoded in UTF-8. The lengths and the positions-inside the strings are in bytes and not in characters, so, for instance,-"\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a-single character. If you set #G_REGEX_RAW the strings can be non-valid-UTF-8 strings and a byte is treated as a character, so "\xc3\xa0" is two-bytes and two characters long.--When matching a pattern, "\n" matches only against a "\n" character in-the string, and "\r" matches only a "\r" character. To match any newline-sequence use "\R". This particular group matches either the two-character-sequence CR + LF ("\r\n"), or one of the single characters LF (linefeed,-U+000A, "\n"), VT vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"),-CR (carriage return, U+000D, "\r"), NEL (next line, U+0085), LS (line-separator, U+2028), or PS (paragraph separator, U+2029).--The behaviour of the dot, circumflex, and dollar metacharacters are-affected by newline characters, the default is to recognize any newline-character (the same characters recognized by "\R"). This can be changed-with #G_REGEX_NEWLINE_CR, #G_REGEX_NEWLINE_LF and #G_REGEX_NEWLINE_CRLF-compile options, and with #G_REGEX_MATCH_NEWLINE_ANY,-#G_REGEX_MATCH_NEWLINE_CR, #G_REGEX_MATCH_NEWLINE_LF and-#G_REGEX_MATCH_NEWLINE_CRLF match options. These settings are also-relevant when compiling a pattern if #G_REGEX_EXTENDED is set, and an-unescaped "#" outside a character class is encountered. This indicates-a comment that lasts until after the next newline.--When setting the %G_REGEX_JAVASCRIPT_COMPAT flag, pattern syntax and pattern-matching is changed to be compatible with the way that regular expressions-work in JavaScript. More precisely, a lonely ']' character in the pattern-is a syntax error; the '\x' escape only allows 0 to 2 hexadecimal digits, and-you must use the '\u' escape sequence with 4 hex digits to specify a unicode-codepoint instead of '\x' or 'x{....}'. If '\x' or '\u' are not followed by-the specified number of hex digits, they match 'x' and 'u' literally; also-'\U' always matches 'U' instead of being an error in the pattern. Finally,-pattern matching is modified so that back references to an unset subpattern-group produces a match with the empty string instead of an error. See-pcreapi(3) for more information.--Creating and manipulating the same #GRegex structure from different-threads is not a problem as #GRegex does not modify its internal-state between creation and destruction, on the other hand #GMatchInfo-is not threadsafe.--The regular expressions low-level functionalities are obtained through-the excellent-[PCRE](http://www.pcre.org/)-library written by Philip Hazel.--}--module GI.GLib.Structs.Regex- ( ---- * Exported types- Regex(..) ,- noRegex ,--- -- * Methods--- ** regexCheckReplacement- regexCheckReplacement ,----- ** regexErrorQuark- regexErrorQuark ,----- ** regexEscapeNul- regexEscapeNul ,----- ** regexEscapeString- regexEscapeString ,----- ** regexGetCaptureCount- RegexGetCaptureCountMethodInfo ,- regexGetCaptureCount ,----- ** regexGetCompileFlags- RegexGetCompileFlagsMethodInfo ,- regexGetCompileFlags ,----- ** regexGetHasCrOrLf- RegexGetHasCrOrLfMethodInfo ,- regexGetHasCrOrLf ,----- ** regexGetMatchFlags- RegexGetMatchFlagsMethodInfo ,- regexGetMatchFlags ,----- ** regexGetMaxBackref- RegexGetMaxBackrefMethodInfo ,- regexGetMaxBackref ,----- ** regexGetMaxLookbehind- RegexGetMaxLookbehindMethodInfo ,- regexGetMaxLookbehind ,----- ** regexGetPattern- RegexGetPatternMethodInfo ,- regexGetPattern ,----- ** regexGetStringNumber- RegexGetStringNumberMethodInfo ,- regexGetStringNumber ,----- ** regexMatch- RegexMatchMethodInfo ,- regexMatch ,----- ** regexMatchAll- RegexMatchAllMethodInfo ,- regexMatchAll ,----- ** regexMatchAllFull- RegexMatchAllFullMethodInfo ,- regexMatchAllFull ,----- ** regexMatchFull- RegexMatchFullMethodInfo ,- regexMatchFull ,----- ** regexMatchSimple- regexMatchSimple ,----- ** regexNew- regexNew ,----- ** regexRef- RegexRefMethodInfo ,- regexRef ,----- ** regexReplace- RegexReplaceMethodInfo ,- regexReplace ,----- ** regexReplaceLiteral- RegexReplaceLiteralMethodInfo ,- regexReplaceLiteral ,----- ** regexSplit- RegexSplitMethodInfo ,- regexSplit ,----- ** regexSplitFull- RegexSplitFullMethodInfo ,- regexSplitFull ,----- ** regexSplitSimple- regexSplitSimple ,----- ** regexUnref- RegexUnrefMethodInfo ,- regexUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Regex = Regex (ForeignPtr Regex)-foreign import ccall "g_regex_get_type" c_g_regex_get_type :: - IO GType--instance BoxedObject Regex where- boxedType _ = c_g_regex_get_type--noRegex :: Maybe Regex-noRegex = Nothing---type instance AttributeList Regex = RegexAttributeList-type RegexAttributeList = ('[ ] :: [(Symbol, *)])---- method Regex::new--- method type : Constructor--- Args : [Arg {argCName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "compile_options", argType = TInterface "GLib" "RegexCompileFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Regex")--- throws : True--- Skip return : False--foreign import ccall "g_regex_new" g_regex_new :: - CString -> -- pattern : TBasicType TUTF8- CUInt -> -- compile_options : TInterface "GLib" "RegexCompileFlags"- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Ptr (Ptr GError) -> -- error- IO (Ptr Regex)---regexNew ::- (MonadIO m) =>- T.Text -- pattern- -> [RegexCompileFlags] -- compileOptions- -> [RegexMatchFlags] -- matchOptions- -> m Regex -- result-regexNew pattern compileOptions matchOptions = liftIO $ do- pattern' <- textToCString pattern- let compileOptions' = gflagsToWord compileOptions- let matchOptions' = gflagsToWord matchOptions- onException (do- result <- propagateGError $ g_regex_new pattern' compileOptions' matchOptions'- checkUnexpectedReturnNULL "g_regex_new" result- result' <- (wrapBoxed Regex) result- freeMem pattern'- return result'- ) (do- freeMem pattern'- )---- method Regex::get_capture_count--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_capture_count" g_regex_get_capture_count :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO Int32---regexGetCaptureCount ::- (MonadIO m) =>- Regex -- _obj- -> m Int32 -- result-regexGetCaptureCount _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_get_capture_count _obj'- touchManagedPtr _obj- return result--data RegexGetCaptureCountMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo RegexGetCaptureCountMethodInfo Regex signature where- overloadedMethod _ = regexGetCaptureCount---- method Regex::get_compile_flags--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "RegexCompileFlags")--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_compile_flags" g_regex_get_compile_flags :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO CUInt---regexGetCompileFlags ::- (MonadIO m) =>- Regex -- _obj- -> m [RegexCompileFlags] -- result-regexGetCompileFlags _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_get_compile_flags _obj'- let result' = wordToGFlags result- touchManagedPtr _obj- return result'--data RegexGetCompileFlagsMethodInfo-instance (signature ~ (m [RegexCompileFlags]), MonadIO m) => MethodInfo RegexGetCompileFlagsMethodInfo Regex signature where- overloadedMethod _ = regexGetCompileFlags---- method Regex::get_has_cr_or_lf--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_has_cr_or_lf" g_regex_get_has_cr_or_lf :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO CInt---regexGetHasCrOrLf ::- (MonadIO m) =>- Regex -- _obj- -> m Bool -- result-regexGetHasCrOrLf _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_get_has_cr_or_lf _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data RegexGetHasCrOrLfMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo RegexGetHasCrOrLfMethodInfo Regex signature where- overloadedMethod _ = regexGetHasCrOrLf---- method Regex::get_match_flags--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "RegexMatchFlags")--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_match_flags" g_regex_get_match_flags :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO CUInt---regexGetMatchFlags ::- (MonadIO m) =>- Regex -- _obj- -> m [RegexMatchFlags] -- result-regexGetMatchFlags _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_get_match_flags _obj'- let result' = wordToGFlags result- touchManagedPtr _obj- return result'--data RegexGetMatchFlagsMethodInfo-instance (signature ~ (m [RegexMatchFlags]), MonadIO m) => MethodInfo RegexGetMatchFlagsMethodInfo Regex signature where- overloadedMethod _ = regexGetMatchFlags---- method Regex::get_max_backref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_max_backref" g_regex_get_max_backref :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO Int32---regexGetMaxBackref ::- (MonadIO m) =>- Regex -- _obj- -> m Int32 -- result-regexGetMaxBackref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_get_max_backref _obj'- touchManagedPtr _obj- return result--data RegexGetMaxBackrefMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo RegexGetMaxBackrefMethodInfo Regex signature where- overloadedMethod _ = regexGetMaxBackref---- method Regex::get_max_lookbehind--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_max_lookbehind" g_regex_get_max_lookbehind :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO Int32---regexGetMaxLookbehind ::- (MonadIO m) =>- Regex -- _obj- -> m Int32 -- result-regexGetMaxLookbehind _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_get_max_lookbehind _obj'- touchManagedPtr _obj- return result--data RegexGetMaxLookbehindMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo RegexGetMaxLookbehindMethodInfo Regex signature where- overloadedMethod _ = regexGetMaxLookbehind---- method Regex::get_pattern--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_pattern" g_regex_get_pattern :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO CString---regexGetPattern ::- (MonadIO m) =>- Regex -- _obj- -> m T.Text -- result-regexGetPattern _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_get_pattern _obj'- checkUnexpectedReturnNULL "g_regex_get_pattern" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data RegexGetPatternMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo RegexGetPatternMethodInfo Regex signature where- overloadedMethod _ = regexGetPattern---- method Regex::get_string_number--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_regex_get_string_number" g_regex_get_string_number :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- CString -> -- name : TBasicType TUTF8- IO Int32---regexGetStringNumber ::- (MonadIO m) =>- Regex -- _obj- -> T.Text -- name- -> m Int32 -- result-regexGetStringNumber _obj name = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- name' <- textToCString name- result <- g_regex_get_string_number _obj' name'- touchManagedPtr _obj- freeMem name'- return result--data RegexGetStringNumberMethodInfo-instance (signature ~ (T.Text -> m Int32), MonadIO m) => MethodInfo RegexGetStringNumberMethodInfo Regex signature where- overloadedMethod _ = regexGetStringNumber---- method Regex::match--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_info", argType = TInterface "GLib" "MatchInfo", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_regex_match" g_regex_match :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- CString -> -- string : TBasicType TUTF8- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Ptr (Ptr MatchInfo) -> -- match_info : TInterface "GLib" "MatchInfo"- IO CInt---regexMatch ::- (MonadIO m) =>- Regex -- _obj- -> T.Text -- string- -> [RegexMatchFlags] -- matchOptions- -> m (Bool,MatchInfo) -- result-regexMatch _obj string matchOptions = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- textToCString string- let matchOptions' = gflagsToWord matchOptions- matchInfo <- allocMem :: IO (Ptr (Ptr MatchInfo))- result <- g_regex_match _obj' string' matchOptions' matchInfo- let result' = (/= 0) result- matchInfo' <- peek matchInfo- matchInfo'' <- (wrapBoxed MatchInfo) matchInfo'- touchManagedPtr _obj- freeMem string'- freeMem matchInfo- return (result', matchInfo'')--data RegexMatchMethodInfo-instance (signature ~ (T.Text -> [RegexMatchFlags] -> m (Bool,MatchInfo)), MonadIO m) => MethodInfo RegexMatchMethodInfo Regex signature where- overloadedMethod _ = regexMatch---- method Regex::match_all--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_info", argType = TInterface "GLib" "MatchInfo", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_regex_match_all" g_regex_match_all :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- CString -> -- string : TBasicType TUTF8- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Ptr (Ptr MatchInfo) -> -- match_info : TInterface "GLib" "MatchInfo"- IO CInt---regexMatchAll ::- (MonadIO m) =>- Regex -- _obj- -> T.Text -- string- -> [RegexMatchFlags] -- matchOptions- -> m (Bool,MatchInfo) -- result-regexMatchAll _obj string matchOptions = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- textToCString string- let matchOptions' = gflagsToWord matchOptions- matchInfo <- allocMem :: IO (Ptr (Ptr MatchInfo))- result <- g_regex_match_all _obj' string' matchOptions' matchInfo- let result' = (/= 0) result- matchInfo' <- peek matchInfo- matchInfo'' <- (wrapBoxed MatchInfo) matchInfo'- touchManagedPtr _obj- freeMem string'- freeMem matchInfo- return (result', matchInfo'')--data RegexMatchAllMethodInfo-instance (signature ~ (T.Text -> [RegexMatchFlags] -> m (Bool,MatchInfo)), MonadIO m) => MethodInfo RegexMatchAllMethodInfo Regex signature where- overloadedMethod _ = regexMatchAll---- method Regex::match_all_full--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TCArray False (-1) 2 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_position", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_info", argType = TInterface "GLib" "MatchInfo", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_regex_match_all_full" g_regex_match_all_full :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- Ptr CString -> -- string : TCArray False (-1) 2 (TBasicType TUTF8)- Int64 -> -- string_len : TBasicType TInt64- Int32 -> -- start_position : TBasicType TInt- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Ptr (Ptr MatchInfo) -> -- match_info : TInterface "GLib" "MatchInfo"- Ptr (Ptr GError) -> -- error- IO CInt---regexMatchAllFull ::- (MonadIO m) =>- Regex -- _obj- -> [T.Text] -- string- -> Int32 -- startPosition- -> [RegexMatchFlags] -- matchOptions- -> m (MatchInfo) -- result-regexMatchAllFull _obj string startPosition matchOptions = liftIO $ do- let stringLen = fromIntegral $ length string- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- packUTF8CArray string- let matchOptions' = gflagsToWord matchOptions- matchInfo <- allocMem :: IO (Ptr (Ptr MatchInfo))- onException (do- _ <- propagateGError $ g_regex_match_all_full _obj' string' stringLen startPosition matchOptions' matchInfo- matchInfo' <- peek matchInfo- matchInfo'' <- (wrapBoxed MatchInfo) matchInfo'- touchManagedPtr _obj- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem matchInfo- return matchInfo''- ) (do- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem matchInfo- )--data RegexMatchAllFullMethodInfo-instance (signature ~ ([T.Text] -> Int32 -> [RegexMatchFlags] -> m (MatchInfo)), MonadIO m) => MethodInfo RegexMatchAllFullMethodInfo Regex signature where- overloadedMethod _ = regexMatchAllFull---- method Regex::match_full--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TCArray False (-1) 2 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_position", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_info", argType = TInterface "GLib" "MatchInfo", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_regex_match_full" g_regex_match_full :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- Ptr CString -> -- string : TCArray False (-1) 2 (TBasicType TUTF8)- Int64 -> -- string_len : TBasicType TInt64- Int32 -> -- start_position : TBasicType TInt- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Ptr (Ptr MatchInfo) -> -- match_info : TInterface "GLib" "MatchInfo"- Ptr (Ptr GError) -> -- error- IO CInt---regexMatchFull ::- (MonadIO m) =>- Regex -- _obj- -> [T.Text] -- string- -> Int32 -- startPosition- -> [RegexMatchFlags] -- matchOptions- -> m (MatchInfo) -- result-regexMatchFull _obj string startPosition matchOptions = liftIO $ do- let stringLen = fromIntegral $ length string- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- packUTF8CArray string- let matchOptions' = gflagsToWord matchOptions- matchInfo <- allocMem :: IO (Ptr (Ptr MatchInfo))- onException (do- _ <- propagateGError $ g_regex_match_full _obj' string' stringLen startPosition matchOptions' matchInfo- matchInfo' <- peek matchInfo- matchInfo'' <- (wrapBoxed MatchInfo) matchInfo'- touchManagedPtr _obj- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem matchInfo- return matchInfo''- ) (do- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem matchInfo- )--data RegexMatchFullMethodInfo-instance (signature ~ ([T.Text] -> Int32 -> [RegexMatchFlags] -> m (MatchInfo)), MonadIO m) => MethodInfo RegexMatchFullMethodInfo Regex signature where- overloadedMethod _ = regexMatchFull---- method Regex::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Regex")--- throws : False--- Skip return : False--foreign import ccall "g_regex_ref" g_regex_ref :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO (Ptr Regex)---regexRef ::- (MonadIO m) =>- Regex -- _obj- -> m Regex -- result-regexRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_regex_ref _obj'- checkUnexpectedReturnNULL "g_regex_ref" result- result' <- (wrapBoxed Regex) result- touchManagedPtr _obj- return result'--data RegexRefMethodInfo-instance (signature ~ (m Regex), MonadIO m) => MethodInfo RegexRefMethodInfo Regex signature where- overloadedMethod _ = regexRef---- method Regex::replace--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TCArray False (-1) 2 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_position", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "replacement", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_regex_replace" g_regex_replace :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- Ptr CString -> -- string : TCArray False (-1) 2 (TBasicType TUTF8)- Int64 -> -- string_len : TBasicType TInt64- Int32 -> -- start_position : TBasicType TInt- CString -> -- replacement : TBasicType TUTF8- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Ptr (Ptr GError) -> -- error- IO CString---regexReplace ::- (MonadIO m) =>- Regex -- _obj- -> [T.Text] -- string- -> Int32 -- startPosition- -> T.Text -- replacement- -> [RegexMatchFlags] -- matchOptions- -> m T.Text -- result-regexReplace _obj string startPosition replacement matchOptions = liftIO $ do- let stringLen = fromIntegral $ length string- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- packUTF8CArray string- replacement' <- textToCString replacement- let matchOptions' = gflagsToWord matchOptions- onException (do- result <- propagateGError $ g_regex_replace _obj' string' stringLen startPosition replacement' matchOptions'- checkUnexpectedReturnNULL "g_regex_replace" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem replacement'- return result'- ) (do- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem replacement'- )--data RegexReplaceMethodInfo-instance (signature ~ ([T.Text] -> Int32 -> T.Text -> [RegexMatchFlags] -> m T.Text), MonadIO m) => MethodInfo RegexReplaceMethodInfo Regex signature where- overloadedMethod _ = regexReplace---- method Regex::replace_literal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TCArray False (-1) 2 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_position", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "replacement", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUTF8)--- throws : True--- Skip return : False--foreign import ccall "g_regex_replace_literal" g_regex_replace_literal :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- Ptr CString -> -- string : TCArray False (-1) 2 (TBasicType TUTF8)- Int64 -> -- string_len : TBasicType TInt64- Int32 -> -- start_position : TBasicType TInt- CString -> -- replacement : TBasicType TUTF8- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Ptr (Ptr GError) -> -- error- IO CString---regexReplaceLiteral ::- (MonadIO m) =>- Regex -- _obj- -> [T.Text] -- string- -> Int32 -- startPosition- -> T.Text -- replacement- -> [RegexMatchFlags] -- matchOptions- -> m T.Text -- result-regexReplaceLiteral _obj string startPosition replacement matchOptions = liftIO $ do- let stringLen = fromIntegral $ length string- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- packUTF8CArray string- replacement' <- textToCString replacement- let matchOptions' = gflagsToWord matchOptions- onException (do- result <- propagateGError $ g_regex_replace_literal _obj' string' stringLen startPosition replacement' matchOptions'- checkUnexpectedReturnNULL "g_regex_replace_literal" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem replacement'- return result'- ) (do- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- freeMem replacement'- )--data RegexReplaceLiteralMethodInfo-instance (signature ~ ([T.Text] -> Int32 -> T.Text -> [RegexMatchFlags] -> m T.Text), MonadIO m) => MethodInfo RegexReplaceLiteralMethodInfo Regex signature where- overloadedMethod _ = regexReplaceLiteral---- method Regex::split--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_regex_split" g_regex_split :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- CString -> -- string : TBasicType TUTF8- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- IO (Ptr CString)---regexSplit ::- (MonadIO m) =>- Regex -- _obj- -> T.Text -- string- -> [RegexMatchFlags] -- matchOptions- -> m [T.Text] -- result-regexSplit _obj string matchOptions = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- textToCString string- let matchOptions' = gflagsToWord matchOptions- result <- g_regex_split _obj' string' matchOptions'- checkUnexpectedReturnNULL "g_regex_split" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- touchManagedPtr _obj- freeMem string'- return result'--data RegexSplitMethodInfo-instance (signature ~ (T.Text -> [RegexMatchFlags] -> m [T.Text]), MonadIO m) => MethodInfo RegexSplitMethodInfo Regex signature where- overloadedMethod _ = regexSplit---- method Regex::split_full--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TCArray False (-1) 2 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_position", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_tokens", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "string_len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : True--- Skip return : False--foreign import ccall "g_regex_split_full" g_regex_split_full :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- Ptr CString -> -- string : TCArray False (-1) 2 (TBasicType TUTF8)- Int64 -> -- string_len : TBasicType TInt64- Int32 -> -- start_position : TBasicType TInt- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- Int32 -> -- max_tokens : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO (Ptr CString)---regexSplitFull ::- (MonadIO m) =>- Regex -- _obj- -> [T.Text] -- string- -> Int32 -- startPosition- -> [RegexMatchFlags] -- matchOptions- -> Int32 -- maxTokens- -> m [T.Text] -- result-regexSplitFull _obj string startPosition matchOptions maxTokens = liftIO $ do- let stringLen = fromIntegral $ length string- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- packUTF8CArray string- let matchOptions' = gflagsToWord matchOptions- onException (do- result <- propagateGError $ g_regex_split_full _obj' string' stringLen startPosition matchOptions' maxTokens- checkUnexpectedReturnNULL "g_regex_split_full" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- touchManagedPtr _obj- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- return result'- ) (do- (mapCArrayWithLength stringLen) freeMem string'- freeMem string'- )--data RegexSplitFullMethodInfo-instance (signature ~ ([T.Text] -> Int32 -> [RegexMatchFlags] -> Int32 -> m [T.Text]), MonadIO m) => MethodInfo RegexSplitFullMethodInfo Regex signature where- overloadedMethod _ = regexSplitFull---- method Regex::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Regex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_regex_unref" g_regex_unref :: - Ptr Regex -> -- _obj : TInterface "GLib" "Regex"- IO ()---regexUnref ::- (MonadIO m) =>- Regex -- _obj- -> m () -- result-regexUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_regex_unref _obj'- touchManagedPtr _obj- return ()--data RegexUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo RegexUnrefMethodInfo Regex signature where- overloadedMethod _ = regexUnref---- method Regex::check_replacement--- method type : MemberFunction--- Args : [Arg {argCName = "replacement", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "has_references", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_regex_check_replacement" g_regex_check_replacement :: - CString -> -- replacement : TBasicType TUTF8- Ptr CInt -> -- has_references : TBasicType TBoolean- Ptr (Ptr GError) -> -- error- IO CInt---regexCheckReplacement ::- (MonadIO m) =>- T.Text -- replacement- -> m (Bool) -- result-regexCheckReplacement replacement = liftIO $ do- replacement' <- textToCString replacement- hasReferences <- allocMem :: IO (Ptr CInt)- onException (do- _ <- propagateGError $ g_regex_check_replacement replacement' hasReferences- hasReferences' <- peek hasReferences- let hasReferences'' = (/= 0) hasReferences'- freeMem replacement'- freeMem hasReferences- return hasReferences''- ) (do- freeMem replacement'- freeMem hasReferences- )---- method Regex::error_quark--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_regex_error_quark" g_regex_error_quark :: - IO Word32---regexErrorQuark ::- (MonadIO m) =>- m Word32 -- result-regexErrorQuark = liftIO $ do- result <- g_regex_error_quark- return result---- method Regex::escape_nul--- method type : MemberFunction--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_regex_escape_nul" g_regex_escape_nul :: - CString -> -- string : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- IO CString---regexEscapeNul ::- (MonadIO m) =>- T.Text -- string- -> Int32 -- length_- -> m T.Text -- result-regexEscapeNul string length_ = liftIO $ do- string' <- textToCString string- result <- g_regex_escape_nul string' length_- checkUnexpectedReturnNULL "g_regex_escape_nul" result- result' <- cstringToText result- freeMem result- freeMem string'- return result'---- method Regex::escape_string--- method type : MemberFunction--- Args : [Arg {argCName = "string", argType = TCArray False (-1) 1 (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_regex_escape_string" g_regex_escape_string :: - Ptr CString -> -- string : TCArray False (-1) 1 (TBasicType TUTF8)- Int32 -> -- length : TBasicType TInt- IO CString---regexEscapeString ::- (MonadIO m) =>- [T.Text] -- string- -> m T.Text -- result-regexEscapeString string = liftIO $ do- let length_ = fromIntegral $ length string- string' <- packUTF8CArray string- result <- g_regex_escape_string string' length_- checkUnexpectedReturnNULL "g_regex_escape_string" result- result' <- cstringToText result- freeMem result- (mapCArrayWithLength length_) freeMem string'- freeMem string'- return result'---- method Regex::match_simple--- method type : MemberFunction--- Args : [Arg {argCName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "compile_options", argType = TInterface "GLib" "RegexCompileFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_regex_match_simple" g_regex_match_simple :: - CString -> -- pattern : TBasicType TUTF8- CString -> -- string : TBasicType TUTF8- CUInt -> -- compile_options : TInterface "GLib" "RegexCompileFlags"- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- IO CInt---regexMatchSimple ::- (MonadIO m) =>- T.Text -- pattern- -> T.Text -- string- -> [RegexCompileFlags] -- compileOptions- -> [RegexMatchFlags] -- matchOptions- -> m Bool -- result-regexMatchSimple pattern string compileOptions matchOptions = liftIO $ do- pattern' <- textToCString pattern- string' <- textToCString string- let compileOptions' = gflagsToWord compileOptions- let matchOptions' = gflagsToWord matchOptions- result <- g_regex_match_simple pattern' string' compileOptions' matchOptions'- let result' = (/= 0) result- freeMem pattern'- freeMem string'- return result'---- method Regex::split_simple--- method type : MemberFunction--- Args : [Arg {argCName = "pattern", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "compile_options", argType = TInterface "GLib" "RegexCompileFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "match_options", argType = TInterface "GLib" "RegexMatchFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TCArray True (-1) (-1) (TBasicType TUTF8))--- throws : False--- Skip return : False--foreign import ccall "g_regex_split_simple" g_regex_split_simple :: - CString -> -- pattern : TBasicType TUTF8- CString -> -- string : TBasicType TUTF8- CUInt -> -- compile_options : TInterface "GLib" "RegexCompileFlags"- CUInt -> -- match_options : TInterface "GLib" "RegexMatchFlags"- IO (Ptr CString)---regexSplitSimple ::- (MonadIO m) =>- T.Text -- pattern- -> T.Text -- string- -> [RegexCompileFlags] -- compileOptions- -> [RegexMatchFlags] -- matchOptions- -> m [T.Text] -- result-regexSplitSimple pattern string compileOptions matchOptions = liftIO $ do- pattern' <- textToCString pattern- string' <- textToCString string- let compileOptions' = gflagsToWord compileOptions- let matchOptions' = gflagsToWord matchOptions- result <- g_regex_split_simple pattern' string' compileOptions' matchOptions'- checkUnexpectedReturnNULL "g_regex_split_simple" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- freeMem pattern'- freeMem string'- return result'--type family ResolveRegexMethod (t :: Symbol) (o :: *) :: * where- ResolveRegexMethod "match" o = RegexMatchMethodInfo- ResolveRegexMethod "matchAll" o = RegexMatchAllMethodInfo- ResolveRegexMethod "matchAllFull" o = RegexMatchAllFullMethodInfo- ResolveRegexMethod "matchFull" o = RegexMatchFullMethodInfo- ResolveRegexMethod "ref" o = RegexRefMethodInfo- ResolveRegexMethod "replace" o = RegexReplaceMethodInfo- ResolveRegexMethod "replaceLiteral" o = RegexReplaceLiteralMethodInfo- ResolveRegexMethod "split" o = RegexSplitMethodInfo- ResolveRegexMethod "splitFull" o = RegexSplitFullMethodInfo- ResolveRegexMethod "unref" o = RegexUnrefMethodInfo- ResolveRegexMethod "getCaptureCount" o = RegexGetCaptureCountMethodInfo- ResolveRegexMethod "getCompileFlags" o = RegexGetCompileFlagsMethodInfo- ResolveRegexMethod "getHasCrOrLf" o = RegexGetHasCrOrLfMethodInfo- ResolveRegexMethod "getMatchFlags" o = RegexGetMatchFlagsMethodInfo- ResolveRegexMethod "getMaxBackref" o = RegexGetMaxBackrefMethodInfo- ResolveRegexMethod "getMaxLookbehind" o = RegexGetMaxLookbehindMethodInfo- ResolveRegexMethod "getPattern" o = RegexGetPatternMethodInfo- ResolveRegexMethod "getStringNumber" o = RegexGetStringNumberMethodInfo- ResolveRegexMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveRegexMethod t Regex, MethodInfo info Regex p) => IsLabelProxy t (Regex -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveRegexMethod t Regex, MethodInfo info Regex p) => IsLabel t (Regex -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Regex.hs-boot
@@ -1,29 +0,0 @@-module GI.GLib.Structs.Regex where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Regex = Regex (ForeignPtr Regex)-instance BoxedObject Regex where-data RegexGetCaptureCountMethodInfo-data RegexGetCompileFlagsMethodInfo-data RegexGetHasCrOrLfMethodInfo-data RegexGetMatchFlagsMethodInfo-data RegexGetMaxBackrefMethodInfo-data RegexGetMaxLookbehindMethodInfo-data RegexGetPatternMethodInfo-data RegexGetStringNumberMethodInfo-data RegexMatchMethodInfo-data RegexMatchAllMethodInfo-data RegexMatchAllFullMethodInfo-data RegexMatchFullMethodInfo-data RegexRefMethodInfo-data RegexReplaceMethodInfo-data RegexReplaceLiteralMethodInfo-data RegexSplitMethodInfo-data RegexSplitFullMethodInfo-data RegexUnrefMethodInfo
− GI/GLib/Structs/Scanner.hs
@@ -1,1081 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The data structure representing a lexical scanner.--You should set @input_name after creating the scanner, since-it is used by the default message handler when displaying-warnings and errors. If you are scanning a file, the filename-would be a good choice.--The @user_data and @max_parse_errors fields are not used.-If you need to associate extra data with the scanner you-can place them here.--If you want to use your own message handler you can set the-@msg_handler field. The type of the message handler function-is declared by #GScannerMsgFunc.--}--module GI.GLib.Structs.Scanner- ( ---- * Exported types- Scanner(..) ,- newZeroScanner ,- noScanner ,--- -- * Methods--- ** scannerCurLine- ScannerCurLineMethodInfo ,- scannerCurLine ,----- ** scannerCurPosition- ScannerCurPositionMethodInfo ,- scannerCurPosition ,----- ** scannerCurToken- ScannerCurTokenMethodInfo ,- scannerCurToken ,----- ** scannerDestroy- ScannerDestroyMethodInfo ,- scannerDestroy ,----- ** scannerEof- ScannerEofMethodInfo ,- scannerEof ,----- ** scannerGetNextToken- ScannerGetNextTokenMethodInfo ,- scannerGetNextToken ,----- ** scannerInputFile- ScannerInputFileMethodInfo ,- scannerInputFile ,----- ** scannerInputText- ScannerInputTextMethodInfo ,- scannerInputText ,----- ** scannerPeekNextToken- ScannerPeekNextTokenMethodInfo ,- scannerPeekNextToken ,----- ** scannerScopeAddSymbol- ScannerScopeAddSymbolMethodInfo ,- scannerScopeAddSymbol ,----- ** scannerScopeRemoveSymbol- ScannerScopeRemoveSymbolMethodInfo ,- scannerScopeRemoveSymbol ,----- ** scannerSetScope- ScannerSetScopeMethodInfo ,- scannerSetScope ,----- ** scannerSyncFileOffset- ScannerSyncFileOffsetMethodInfo ,- scannerSyncFileOffset ,----- ** scannerUnexpToken- ScannerUnexpTokenMethodInfo ,- scannerUnexpToken ,----- -- * Properties--- ** Config- scannerClearConfig ,- scannerConfig ,- scannerReadConfig ,- scannerWriteConfig ,----- ** InputName- scannerClearInputName ,- scannerInputName ,- scannerReadInputName ,- scannerWriteInputName ,----- ** Line- scannerLine ,- scannerReadLine ,- scannerWriteLine ,----- ** MaxParseErrors- scannerMaxParseErrors ,- scannerReadMaxParseErrors ,- scannerWriteMaxParseErrors ,----- ** NextLine- scannerNextLine ,- scannerReadNextLine ,- scannerWriteNextLine ,----- ** NextPosition- scannerNextPosition ,- scannerReadNextPosition ,- scannerWriteNextPosition ,----- ** NextToken- scannerNextToken ,- scannerReadNextToken ,- scannerWriteNextToken ,----- ** NextValue- scannerClearNextValue ,- scannerNextValue ,- scannerReadNextValue ,- scannerWriteNextValue ,----- ** ParseErrors- scannerParseErrors ,- scannerReadParseErrors ,- scannerWriteParseErrors ,----- ** Position- scannerPosition ,- scannerReadPosition ,- scannerWritePosition ,----- ** Qdata- scannerClearQdata ,- scannerQdata ,- scannerReadQdata ,- scannerWriteQdata ,----- ** Token- scannerReadToken ,- scannerToken ,- scannerWriteToken ,----- ** UserData- scannerClearUserData ,- scannerReadUserData ,- scannerUserData ,- scannerWriteUserData ,----- ** Value- scannerClearValue ,- scannerReadValue ,- scannerValue ,- scannerWriteValue ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Scanner = Scanner (ForeignPtr Scanner)-instance WrappedPtr Scanner where- wrappedPtrCalloc = callocBytes 144- wrappedPtrCopy = copyPtr 144- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Scanner` struct initialized to zero.-newZeroScanner :: MonadIO m => m Scanner-newZeroScanner = liftIO $ wrappedPtrCalloc >>= wrapPtr Scanner--instance tag ~ 'AttrSet => Constructible Scanner tag where- new _ attrs = do- o <- newZeroScanner- GI.Attributes.set o attrs- return o---noScanner :: Maybe Scanner-noScanner = Nothing--scannerReadUserData :: MonadIO m => Scanner -> m (Ptr ())-scannerReadUserData s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())- return val--scannerWriteUserData :: MonadIO m => Scanner -> Ptr () -> m ()-scannerWriteUserData s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr ())--scannerClearUserData :: MonadIO m => Scanner -> m ()-scannerClearUserData s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: Ptr ())--data ScannerUserDataFieldInfo-instance AttrInfo ScannerUserDataFieldInfo where- type AttrAllowedOps ScannerUserDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerUserDataFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint ScannerUserDataFieldInfo = (~) Scanner- type AttrGetType ScannerUserDataFieldInfo = Ptr ()- type AttrLabel ScannerUserDataFieldInfo = "user_data"- attrGet _ = scannerReadUserData- attrSet _ = scannerWriteUserData- attrConstruct = undefined- attrClear _ = scannerClearUserData--scannerUserData :: AttrLabelProxy "userData"-scannerUserData = AttrLabelProxy---scannerReadMaxParseErrors :: MonadIO m => Scanner -> m Word32-scannerReadMaxParseErrors s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--scannerWriteMaxParseErrors :: MonadIO m => Scanner -> Word32 -> m ()-scannerWriteMaxParseErrors s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--data ScannerMaxParseErrorsFieldInfo-instance AttrInfo ScannerMaxParseErrorsFieldInfo where- type AttrAllowedOps ScannerMaxParseErrorsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerMaxParseErrorsFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerMaxParseErrorsFieldInfo = (~) Scanner- type AttrGetType ScannerMaxParseErrorsFieldInfo = Word32- type AttrLabel ScannerMaxParseErrorsFieldInfo = "max_parse_errors"- attrGet _ = scannerReadMaxParseErrors- attrSet _ = scannerWriteMaxParseErrors- attrConstruct = undefined- attrClear _ = undefined--scannerMaxParseErrors :: AttrLabelProxy "maxParseErrors"-scannerMaxParseErrors = AttrLabelProxy---scannerReadParseErrors :: MonadIO m => Scanner -> m Word32-scannerReadParseErrors s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Word32- return val--scannerWriteParseErrors :: MonadIO m => Scanner -> Word32 -> m ()-scannerWriteParseErrors s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Word32)--data ScannerParseErrorsFieldInfo-instance AttrInfo ScannerParseErrorsFieldInfo where- type AttrAllowedOps ScannerParseErrorsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerParseErrorsFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerParseErrorsFieldInfo = (~) Scanner- type AttrGetType ScannerParseErrorsFieldInfo = Word32- type AttrLabel ScannerParseErrorsFieldInfo = "parse_errors"- attrGet _ = scannerReadParseErrors- attrSet _ = scannerWriteParseErrors- attrConstruct = undefined- attrClear _ = undefined--scannerParseErrors :: AttrLabelProxy "parseErrors"-scannerParseErrors = AttrLabelProxy---scannerReadInputName :: MonadIO m => Scanner -> m (Maybe T.Text)-scannerReadInputName s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--scannerWriteInputName :: MonadIO m => Scanner -> CString -> m ()-scannerWriteInputName s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: CString)--scannerClearInputName :: MonadIO m => Scanner -> m ()-scannerClearInputName s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (nullPtr :: CString)--data ScannerInputNameFieldInfo-instance AttrInfo ScannerInputNameFieldInfo where- type AttrAllowedOps ScannerInputNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerInputNameFieldInfo = (~) CString- type AttrBaseTypeConstraint ScannerInputNameFieldInfo = (~) Scanner- type AttrGetType ScannerInputNameFieldInfo = Maybe T.Text- type AttrLabel ScannerInputNameFieldInfo = "input_name"- attrGet _ = scannerReadInputName- attrSet _ = scannerWriteInputName- attrConstruct = undefined- attrClear _ = scannerClearInputName--scannerInputName :: AttrLabelProxy "inputName"-scannerInputName = AttrLabelProxy---scannerReadQdata :: MonadIO m => Scanner -> m (Maybe Data)-scannerReadQdata s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO (Ptr Data)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr Data) val'- return val''- return result--scannerWriteQdata :: MonadIO m => Scanner -> Ptr Data -> m ()-scannerWriteQdata s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Ptr Data)--scannerClearQdata :: MonadIO m => Scanner -> m ()-scannerClearQdata s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (nullPtr :: Ptr Data)--data ScannerQdataFieldInfo-instance AttrInfo ScannerQdataFieldInfo where- type AttrAllowedOps ScannerQdataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerQdataFieldInfo = (~) (Ptr Data)- type AttrBaseTypeConstraint ScannerQdataFieldInfo = (~) Scanner- type AttrGetType ScannerQdataFieldInfo = Maybe Data- type AttrLabel ScannerQdataFieldInfo = "qdata"- attrGet _ = scannerReadQdata- attrSet _ = scannerWriteQdata- attrConstruct = undefined- attrClear _ = scannerClearQdata--scannerQdata :: AttrLabelProxy "qdata"-scannerQdata = AttrLabelProxy---scannerReadConfig :: MonadIO m => Scanner -> m (Maybe ScannerConfig)-scannerReadConfig s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO (Ptr ScannerConfig)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr ScannerConfig) val'- return val''- return result--scannerWriteConfig :: MonadIO m => Scanner -> Ptr ScannerConfig -> m ()-scannerWriteConfig s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: Ptr ScannerConfig)--scannerClearConfig :: MonadIO m => Scanner -> m ()-scannerClearConfig s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (nullPtr :: Ptr ScannerConfig)--data ScannerConfigFieldInfo-instance AttrInfo ScannerConfigFieldInfo where- type AttrAllowedOps ScannerConfigFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerConfigFieldInfo = (~) (Ptr ScannerConfig)- type AttrBaseTypeConstraint ScannerConfigFieldInfo = (~) Scanner- type AttrGetType ScannerConfigFieldInfo = Maybe ScannerConfig- type AttrLabel ScannerConfigFieldInfo = "config"- attrGet _ = scannerReadConfig- attrSet _ = scannerWriteConfig- attrConstruct = undefined- attrClear _ = scannerClearConfig--scannerConfig :: AttrLabelProxy "config"-scannerConfig = AttrLabelProxy---scannerReadToken :: MonadIO m => Scanner -> m TokenType-scannerReadToken s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 40) :: IO CUInt- let val' = (toEnum . fromIntegral) val- return val'--scannerWriteToken :: MonadIO m => Scanner -> TokenType -> m ()-scannerWriteToken s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 40) (val' :: CUInt)--data ScannerTokenFieldInfo-instance AttrInfo ScannerTokenFieldInfo where- type AttrAllowedOps ScannerTokenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerTokenFieldInfo = (~) TokenType- type AttrBaseTypeConstraint ScannerTokenFieldInfo = (~) Scanner- type AttrGetType ScannerTokenFieldInfo = TokenType- type AttrLabel ScannerTokenFieldInfo = "token"- attrGet _ = scannerReadToken- attrSet _ = scannerWriteToken- attrConstruct = undefined- attrClear _ = undefined--scannerToken :: AttrLabelProxy "token"-scannerToken = AttrLabelProxy---scannerReadValue :: MonadIO m => Scanner -> m (Maybe TokenValue)-scannerReadValue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 48) :: IO (Ptr TokenValue)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr TokenValue) val'- return val''- return result--scannerWriteValue :: MonadIO m => Scanner -> Ptr TokenValue -> m ()-scannerWriteValue s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (val :: Ptr TokenValue)--scannerClearValue :: MonadIO m => Scanner -> m ()-scannerClearValue s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (nullPtr :: Ptr TokenValue)--data ScannerValueFieldInfo-instance AttrInfo ScannerValueFieldInfo where- type AttrAllowedOps ScannerValueFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerValueFieldInfo = (~) (Ptr TokenValue)- type AttrBaseTypeConstraint ScannerValueFieldInfo = (~) Scanner- type AttrGetType ScannerValueFieldInfo = Maybe TokenValue- type AttrLabel ScannerValueFieldInfo = "value"- attrGet _ = scannerReadValue- attrSet _ = scannerWriteValue- attrConstruct = undefined- attrClear _ = scannerClearValue--scannerValue :: AttrLabelProxy "value"-scannerValue = AttrLabelProxy---scannerReadLine :: MonadIO m => Scanner -> m Word32-scannerReadLine s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 56) :: IO Word32- return val--scannerWriteLine :: MonadIO m => Scanner -> Word32 -> m ()-scannerWriteLine s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 56) (val :: Word32)--data ScannerLineFieldInfo-instance AttrInfo ScannerLineFieldInfo where- type AttrAllowedOps ScannerLineFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerLineFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerLineFieldInfo = (~) Scanner- type AttrGetType ScannerLineFieldInfo = Word32- type AttrLabel ScannerLineFieldInfo = "line"- attrGet _ = scannerReadLine- attrSet _ = scannerWriteLine- attrConstruct = undefined- attrClear _ = undefined--scannerLine :: AttrLabelProxy "line"-scannerLine = AttrLabelProxy---scannerReadPosition :: MonadIO m => Scanner -> m Word32-scannerReadPosition s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 60) :: IO Word32- return val--scannerWritePosition :: MonadIO m => Scanner -> Word32 -> m ()-scannerWritePosition s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 60) (val :: Word32)--data ScannerPositionFieldInfo-instance AttrInfo ScannerPositionFieldInfo where- type AttrAllowedOps ScannerPositionFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerPositionFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerPositionFieldInfo = (~) Scanner- type AttrGetType ScannerPositionFieldInfo = Word32- type AttrLabel ScannerPositionFieldInfo = "position"- attrGet _ = scannerReadPosition- attrSet _ = scannerWritePosition- attrConstruct = undefined- attrClear _ = undefined--scannerPosition :: AttrLabelProxy "position"-scannerPosition = AttrLabelProxy---scannerReadNextToken :: MonadIO m => Scanner -> m TokenType-scannerReadNextToken s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 64) :: IO CUInt- let val' = (toEnum . fromIntegral) val- return val'--scannerWriteNextToken :: MonadIO m => Scanner -> TokenType -> m ()-scannerWriteNextToken s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 64) (val' :: CUInt)--data ScannerNextTokenFieldInfo-instance AttrInfo ScannerNextTokenFieldInfo where- type AttrAllowedOps ScannerNextTokenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerNextTokenFieldInfo = (~) TokenType- type AttrBaseTypeConstraint ScannerNextTokenFieldInfo = (~) Scanner- type AttrGetType ScannerNextTokenFieldInfo = TokenType- type AttrLabel ScannerNextTokenFieldInfo = "next_token"- attrGet _ = scannerReadNextToken- attrSet _ = scannerWriteNextToken- attrConstruct = undefined- attrClear _ = undefined--scannerNextToken :: AttrLabelProxy "nextToken"-scannerNextToken = AttrLabelProxy---scannerReadNextValue :: MonadIO m => Scanner -> m (Maybe TokenValue)-scannerReadNextValue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 72) :: IO (Ptr TokenValue)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr TokenValue) val'- return val''- return result--scannerWriteNextValue :: MonadIO m => Scanner -> Ptr TokenValue -> m ()-scannerWriteNextValue s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 72) (val :: Ptr TokenValue)--scannerClearNextValue :: MonadIO m => Scanner -> m ()-scannerClearNextValue s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 72) (nullPtr :: Ptr TokenValue)--data ScannerNextValueFieldInfo-instance AttrInfo ScannerNextValueFieldInfo where- type AttrAllowedOps ScannerNextValueFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerNextValueFieldInfo = (~) (Ptr TokenValue)- type AttrBaseTypeConstraint ScannerNextValueFieldInfo = (~) Scanner- type AttrGetType ScannerNextValueFieldInfo = Maybe TokenValue- type AttrLabel ScannerNextValueFieldInfo = "next_value"- attrGet _ = scannerReadNextValue- attrSet _ = scannerWriteNextValue- attrConstruct = undefined- attrClear _ = scannerClearNextValue--scannerNextValue :: AttrLabelProxy "nextValue"-scannerNextValue = AttrLabelProxy---scannerReadNextLine :: MonadIO m => Scanner -> m Word32-scannerReadNextLine s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 80) :: IO Word32- return val--scannerWriteNextLine :: MonadIO m => Scanner -> Word32 -> m ()-scannerWriteNextLine s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 80) (val :: Word32)--data ScannerNextLineFieldInfo-instance AttrInfo ScannerNextLineFieldInfo where- type AttrAllowedOps ScannerNextLineFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerNextLineFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerNextLineFieldInfo = (~) Scanner- type AttrGetType ScannerNextLineFieldInfo = Word32- type AttrLabel ScannerNextLineFieldInfo = "next_line"- attrGet _ = scannerReadNextLine- attrSet _ = scannerWriteNextLine- attrConstruct = undefined- attrClear _ = undefined--scannerNextLine :: AttrLabelProxy "nextLine"-scannerNextLine = AttrLabelProxy---scannerReadNextPosition :: MonadIO m => Scanner -> m Word32-scannerReadNextPosition s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 84) :: IO Word32- return val--scannerWriteNextPosition :: MonadIO m => Scanner -> Word32 -> m ()-scannerWriteNextPosition s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 84) (val :: Word32)--data ScannerNextPositionFieldInfo-instance AttrInfo ScannerNextPositionFieldInfo where- type AttrAllowedOps ScannerNextPositionFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerNextPositionFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerNextPositionFieldInfo = (~) Scanner- type AttrGetType ScannerNextPositionFieldInfo = Word32- type AttrLabel ScannerNextPositionFieldInfo = "next_position"- attrGet _ = scannerReadNextPosition- attrSet _ = scannerWriteNextPosition- attrConstruct = undefined- attrClear _ = undefined--scannerNextPosition :: AttrLabelProxy "nextPosition"-scannerNextPosition = AttrLabelProxy----- XXX Skipped attribute for "Scanner:msg_handler" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--type instance AttributeList Scanner = ScannerAttributeList-type ScannerAttributeList = ('[ '("userData", ScannerUserDataFieldInfo), '("maxParseErrors", ScannerMaxParseErrorsFieldInfo), '("parseErrors", ScannerParseErrorsFieldInfo), '("inputName", ScannerInputNameFieldInfo), '("qdata", ScannerQdataFieldInfo), '("config", ScannerConfigFieldInfo), '("token", ScannerTokenFieldInfo), '("value", ScannerValueFieldInfo), '("line", ScannerLineFieldInfo), '("position", ScannerPositionFieldInfo), '("nextToken", ScannerNextTokenFieldInfo), '("nextValue", ScannerNextValueFieldInfo), '("nextLine", ScannerNextLineFieldInfo), '("nextPosition", ScannerNextPositionFieldInfo)] :: [(Symbol, *)])---- method Scanner::cur_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_scanner_cur_line" g_scanner_cur_line :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO Word32---scannerCurLine ::- (MonadIO m) =>- Scanner -- _obj- -> m Word32 -- result-scannerCurLine _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_scanner_cur_line _obj'- touchManagedPtr _obj- return result--data ScannerCurLineMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo ScannerCurLineMethodInfo Scanner signature where- overloadedMethod _ = scannerCurLine---- method Scanner::cur_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_scanner_cur_position" g_scanner_cur_position :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO Word32---scannerCurPosition ::- (MonadIO m) =>- Scanner -- _obj- -> m Word32 -- result-scannerCurPosition _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_scanner_cur_position _obj'- touchManagedPtr _obj- return result--data ScannerCurPositionMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo ScannerCurPositionMethodInfo Scanner signature where- overloadedMethod _ = scannerCurPosition---- method Scanner::cur_token--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "TokenType")--- throws : False--- Skip return : False--foreign import ccall "g_scanner_cur_token" g_scanner_cur_token :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO CUInt---scannerCurToken ::- (MonadIO m) =>- Scanner -- _obj- -> m TokenType -- result-scannerCurToken _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_scanner_cur_token _obj'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'--data ScannerCurTokenMethodInfo-instance (signature ~ (m TokenType), MonadIO m) => MethodInfo ScannerCurTokenMethodInfo Scanner signature where- overloadedMethod _ = scannerCurToken---- method Scanner::destroy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_scanner_destroy" g_scanner_destroy :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO ()---scannerDestroy ::- (MonadIO m) =>- Scanner -- _obj- -> m () -- result-scannerDestroy _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_scanner_destroy _obj'- touchManagedPtr _obj- return ()--data ScannerDestroyMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo ScannerDestroyMethodInfo Scanner signature where- overloadedMethod _ = scannerDestroy---- method Scanner::eof--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_scanner_eof" g_scanner_eof :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO CInt---scannerEof ::- (MonadIO m) =>- Scanner -- _obj- -> m Bool -- result-scannerEof _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_scanner_eof _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data ScannerEofMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo ScannerEofMethodInfo Scanner signature where- overloadedMethod _ = scannerEof---- method Scanner::get_next_token--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "TokenType")--- throws : False--- Skip return : False--foreign import ccall "g_scanner_get_next_token" g_scanner_get_next_token :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO CUInt---scannerGetNextToken ::- (MonadIO m) =>- Scanner -- _obj- -> m TokenType -- result-scannerGetNextToken _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_scanner_get_next_token _obj'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'--data ScannerGetNextTokenMethodInfo-instance (signature ~ (m TokenType), MonadIO m) => MethodInfo ScannerGetNextTokenMethodInfo Scanner signature where- overloadedMethod _ = scannerGetNextToken---- method Scanner::input_file--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "input_fd", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_scanner_input_file" g_scanner_input_file :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- Int32 -> -- input_fd : TBasicType TInt- IO ()---scannerInputFile ::- (MonadIO m) =>- Scanner -- _obj- -> Int32 -- inputFd- -> m () -- result-scannerInputFile _obj inputFd = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_scanner_input_file _obj' inputFd- touchManagedPtr _obj- return ()--data ScannerInputFileMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m) => MethodInfo ScannerInputFileMethodInfo Scanner signature where- overloadedMethod _ = scannerInputFile---- method Scanner::input_text--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text_len", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_scanner_input_text" g_scanner_input_text :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- CString -> -- text : TBasicType TUTF8- Word32 -> -- text_len : TBasicType TUInt- IO ()---scannerInputText ::- (MonadIO m) =>- Scanner -- _obj- -> T.Text -- text- -> Word32 -- textLen- -> m () -- result-scannerInputText _obj text textLen = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- text' <- textToCString text- g_scanner_input_text _obj' text' textLen- touchManagedPtr _obj- freeMem text'- return ()--data ScannerInputTextMethodInfo-instance (signature ~ (T.Text -> Word32 -> m ()), MonadIO m) => MethodInfo ScannerInputTextMethodInfo Scanner signature where- overloadedMethod _ = scannerInputText---- method Scanner::peek_next_token--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "TokenType")--- throws : False--- Skip return : False--foreign import ccall "g_scanner_peek_next_token" g_scanner_peek_next_token :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO CUInt---scannerPeekNextToken ::- (MonadIO m) =>- Scanner -- _obj- -> m TokenType -- result-scannerPeekNextToken _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_scanner_peek_next_token _obj'- let result' = (toEnum . fromIntegral) result- touchManagedPtr _obj- return result'--data ScannerPeekNextTokenMethodInfo-instance (signature ~ (m TokenType), MonadIO m) => MethodInfo ScannerPeekNextTokenMethodInfo Scanner signature where- overloadedMethod _ = scannerPeekNextToken---- method Scanner::scope_add_symbol--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "scope_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "symbol", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_scanner_scope_add_symbol" g_scanner_scope_add_symbol :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- Word32 -> -- scope_id : TBasicType TUInt- CString -> -- symbol : TBasicType TUTF8- Ptr () -> -- value : TBasicType TPtr- IO ()---scannerScopeAddSymbol ::- (MonadIO m) =>- Scanner -- _obj- -> Word32 -- scopeId- -> T.Text -- symbol- -> Ptr () -- value- -> m () -- result-scannerScopeAddSymbol _obj scopeId symbol value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- symbol' <- textToCString symbol- g_scanner_scope_add_symbol _obj' scopeId symbol' value- touchManagedPtr _obj- freeMem symbol'- return ()--data ScannerScopeAddSymbolMethodInfo-instance (signature ~ (Word32 -> T.Text -> Ptr () -> m ()), MonadIO m) => MethodInfo ScannerScopeAddSymbolMethodInfo Scanner signature where- overloadedMethod _ = scannerScopeAddSymbol---- method Scanner::scope_remove_symbol--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "scope_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "symbol", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_scanner_scope_remove_symbol" g_scanner_scope_remove_symbol :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- Word32 -> -- scope_id : TBasicType TUInt- CString -> -- symbol : TBasicType TUTF8- IO ()---scannerScopeRemoveSymbol ::- (MonadIO m) =>- Scanner -- _obj- -> Word32 -- scopeId- -> T.Text -- symbol- -> m () -- result-scannerScopeRemoveSymbol _obj scopeId symbol = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- symbol' <- textToCString symbol- g_scanner_scope_remove_symbol _obj' scopeId symbol'- touchManagedPtr _obj- freeMem symbol'- return ()--data ScannerScopeRemoveSymbolMethodInfo-instance (signature ~ (Word32 -> T.Text -> m ()), MonadIO m) => MethodInfo ScannerScopeRemoveSymbolMethodInfo Scanner signature where- overloadedMethod _ = scannerScopeRemoveSymbol---- method Scanner::set_scope--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "scope_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_scanner_set_scope" g_scanner_set_scope :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- Word32 -> -- scope_id : TBasicType TUInt- IO Word32---scannerSetScope ::- (MonadIO m) =>- Scanner -- _obj- -> Word32 -- scopeId- -> m Word32 -- result-scannerSetScope _obj scopeId = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_scanner_set_scope _obj' scopeId- touchManagedPtr _obj- return result--data ScannerSetScopeMethodInfo-instance (signature ~ (Word32 -> m Word32), MonadIO m) => MethodInfo ScannerSetScopeMethodInfo Scanner signature where- overloadedMethod _ = scannerSetScope---- method Scanner::sync_file_offset--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_scanner_sync_file_offset" g_scanner_sync_file_offset :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- IO ()---scannerSyncFileOffset ::- (MonadIO m) =>- Scanner -- _obj- -> m () -- result-scannerSyncFileOffset _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_scanner_sync_file_offset _obj'- touchManagedPtr _obj- return ()--data ScannerSyncFileOffsetMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo ScannerSyncFileOffsetMethodInfo Scanner signature where- overloadedMethod _ = scannerSyncFileOffset---- method Scanner::unexp_token--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Scanner", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "expected_token", argType = TInterface "GLib" "TokenType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "identifier_spec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "symbol_spec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "symbol_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_error", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_scanner_unexp_token" g_scanner_unexp_token :: - Ptr Scanner -> -- _obj : TInterface "GLib" "Scanner"- CUInt -> -- expected_token : TInterface "GLib" "TokenType"- CString -> -- identifier_spec : TBasicType TUTF8- CString -> -- symbol_spec : TBasicType TUTF8- CString -> -- symbol_name : TBasicType TUTF8- CString -> -- message : TBasicType TUTF8- Int32 -> -- is_error : TBasicType TInt- IO ()---scannerUnexpToken ::- (MonadIO m) =>- Scanner -- _obj- -> TokenType -- expectedToken- -> T.Text -- identifierSpec- -> T.Text -- symbolSpec- -> T.Text -- symbolName- -> T.Text -- message- -> Int32 -- isError- -> m () -- result-scannerUnexpToken _obj expectedToken identifierSpec symbolSpec symbolName message isError = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let expectedToken' = (fromIntegral . fromEnum) expectedToken- identifierSpec' <- textToCString identifierSpec- symbolSpec' <- textToCString symbolSpec- symbolName' <- textToCString symbolName- message' <- textToCString message- g_scanner_unexp_token _obj' expectedToken' identifierSpec' symbolSpec' symbolName' message' isError- touchManagedPtr _obj- freeMem identifierSpec'- freeMem symbolSpec'- freeMem symbolName'- freeMem message'- return ()--data ScannerUnexpTokenMethodInfo-instance (signature ~ (TokenType -> T.Text -> T.Text -> T.Text -> T.Text -> Int32 -> m ()), MonadIO m) => MethodInfo ScannerUnexpTokenMethodInfo Scanner signature where- overloadedMethod _ = scannerUnexpToken--type family ResolveScannerMethod (t :: Symbol) (o :: *) :: * where- ResolveScannerMethod "curLine" o = ScannerCurLineMethodInfo- ResolveScannerMethod "curPosition" o = ScannerCurPositionMethodInfo- ResolveScannerMethod "curToken" o = ScannerCurTokenMethodInfo- ResolveScannerMethod "destroy" o = ScannerDestroyMethodInfo- ResolveScannerMethod "eof" o = ScannerEofMethodInfo- ResolveScannerMethod "inputFile" o = ScannerInputFileMethodInfo- ResolveScannerMethod "inputText" o = ScannerInputTextMethodInfo- ResolveScannerMethod "peekNextToken" o = ScannerPeekNextTokenMethodInfo- ResolveScannerMethod "scopeAddSymbol" o = ScannerScopeAddSymbolMethodInfo- ResolveScannerMethod "scopeRemoveSymbol" o = ScannerScopeRemoveSymbolMethodInfo- ResolveScannerMethod "syncFileOffset" o = ScannerSyncFileOffsetMethodInfo- ResolveScannerMethod "unexpToken" o = ScannerUnexpTokenMethodInfo- ResolveScannerMethod "getNextToken" o = ScannerGetNextTokenMethodInfo- ResolveScannerMethod "setScope" o = ScannerSetScopeMethodInfo- ResolveScannerMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveScannerMethod t Scanner, MethodInfo info Scanner p) => IsLabelProxy t (Scanner -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveScannerMethod t Scanner, MethodInfo info Scanner p) => IsLabel t (Scanner -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Scanner.hs-boot
@@ -1,25 +0,0 @@-module GI.GLib.Structs.Scanner where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Scanner = Scanner (ForeignPtr Scanner)-instance WrappedPtr Scanner where-data ScannerCurLineMethodInfo-data ScannerCurPositionMethodInfo-data ScannerCurTokenMethodInfo-data ScannerDestroyMethodInfo-data ScannerEofMethodInfo-data ScannerGetNextTokenMethodInfo-data ScannerInputFileMethodInfo-data ScannerInputTextMethodInfo-data ScannerPeekNextTokenMethodInfo-data ScannerScopeAddSymbolMethodInfo-data ScannerScopeRemoveSymbolMethodInfo-data ScannerSetScopeMethodInfo-data ScannerSyncFileOffsetMethodInfo-data ScannerUnexpTokenMethodInfo
− GI/GLib/Structs/ScannerConfig.hs
@@ -1,910 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Specifies the #GScanner parser configuration. Most settings can-be changed during the parsing phase and will affect the lexical-parsing of the next unpeeked token.--}--module GI.GLib.Structs.ScannerConfig- ( ---- * Exported types- ScannerConfig(..) ,- newZeroScannerConfig ,- noScannerConfig ,--- -- * Properties--- ** CaseSensitive- scannerConfigCaseSensitive ,- scannerConfigReadCaseSensitive ,- scannerConfigWriteCaseSensitive ,----- ** Char2Token- scannerConfigChar2Token ,- scannerConfigReadChar2Token ,- scannerConfigWriteChar2Token ,----- ** CpairCommentSingle- scannerConfigClearCpairCommentSingle ,- scannerConfigCpairCommentSingle ,- scannerConfigReadCpairCommentSingle ,- scannerConfigWriteCpairCommentSingle ,----- ** CsetIdentifierFirst- scannerConfigClearCsetIdentifierFirst ,- scannerConfigCsetIdentifierFirst ,- scannerConfigReadCsetIdentifierFirst ,- scannerConfigWriteCsetIdentifierFirst ,----- ** CsetIdentifierNth- scannerConfigClearCsetIdentifierNth ,- scannerConfigCsetIdentifierNth ,- scannerConfigReadCsetIdentifierNth ,- scannerConfigWriteCsetIdentifierNth ,----- ** CsetSkipCharacters- scannerConfigClearCsetSkipCharacters ,- scannerConfigCsetSkipCharacters ,- scannerConfigReadCsetSkipCharacters ,- scannerConfigWriteCsetSkipCharacters ,----- ** Identifier2String- scannerConfigIdentifier2String ,- scannerConfigReadIdentifier2String ,- scannerConfigWriteIdentifier2String ,----- ** Int2Float- scannerConfigInt2Float ,- scannerConfigReadInt2Float ,- scannerConfigWriteInt2Float ,----- ** Numbers2Int- scannerConfigNumbers2Int ,- scannerConfigReadNumbers2Int ,- scannerConfigWriteNumbers2Int ,----- ** ScanBinary- scannerConfigReadScanBinary ,- scannerConfigScanBinary ,- scannerConfigWriteScanBinary ,----- ** ScanCommentMulti- scannerConfigReadScanCommentMulti ,- scannerConfigScanCommentMulti ,- scannerConfigWriteScanCommentMulti ,----- ** ScanFloat- scannerConfigReadScanFloat ,- scannerConfigScanFloat ,- scannerConfigWriteScanFloat ,----- ** ScanHex- scannerConfigReadScanHex ,- scannerConfigScanHex ,- scannerConfigWriteScanHex ,----- ** ScanHexDollar- scannerConfigReadScanHexDollar ,- scannerConfigScanHexDollar ,- scannerConfigWriteScanHexDollar ,----- ** ScanIdentifier- scannerConfigReadScanIdentifier ,- scannerConfigScanIdentifier ,- scannerConfigWriteScanIdentifier ,----- ** ScanIdentifier1char- scannerConfigReadScanIdentifier1char ,- scannerConfigScanIdentifier1char ,- scannerConfigWriteScanIdentifier1char ,----- ** ScanIdentifierNULL- scannerConfigReadScanIdentifierNULL ,- scannerConfigScanIdentifierNULL ,- scannerConfigWriteScanIdentifierNULL ,----- ** ScanOctal- scannerConfigReadScanOctal ,- scannerConfigScanOctal ,- scannerConfigWriteScanOctal ,----- ** ScanStringDq- scannerConfigReadScanStringDq ,- scannerConfigScanStringDq ,- scannerConfigWriteScanStringDq ,----- ** ScanStringSq- scannerConfigReadScanStringSq ,- scannerConfigScanStringSq ,- scannerConfigWriteScanStringSq ,----- ** ScanSymbols- scannerConfigReadScanSymbols ,- scannerConfigScanSymbols ,- scannerConfigWriteScanSymbols ,----- ** Scope0Fallback- scannerConfigReadScope0Fallback ,- scannerConfigScope0Fallback ,- scannerConfigWriteScope0Fallback ,----- ** SkipCommentMulti- scannerConfigReadSkipCommentMulti ,- scannerConfigSkipCommentMulti ,- scannerConfigWriteSkipCommentMulti ,----- ** SkipCommentSingle- scannerConfigReadSkipCommentSingle ,- scannerConfigSkipCommentSingle ,- scannerConfigWriteSkipCommentSingle ,----- ** StoreInt64- scannerConfigReadStoreInt64 ,- scannerConfigStoreInt64 ,- scannerConfigWriteStoreInt64 ,----- ** Symbol2Token- scannerConfigReadSymbol2Token ,- scannerConfigSymbol2Token ,- scannerConfigWriteSymbol2Token ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype ScannerConfig = ScannerConfig (ForeignPtr ScannerConfig)-instance WrappedPtr ScannerConfig where- wrappedPtrCalloc = callocBytes 128- wrappedPtrCopy = copyPtr 128- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `ScannerConfig` struct initialized to zero.-newZeroScannerConfig :: MonadIO m => m ScannerConfig-newZeroScannerConfig = liftIO $ wrappedPtrCalloc >>= wrapPtr ScannerConfig--instance tag ~ 'AttrSet => Constructible ScannerConfig tag where- new _ attrs = do- o <- newZeroScannerConfig- GI.Attributes.set o attrs- return o---noScannerConfig :: Maybe ScannerConfig-noScannerConfig = Nothing--scannerConfigReadCsetSkipCharacters :: MonadIO m => ScannerConfig -> m (Maybe T.Text)-scannerConfigReadCsetSkipCharacters s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--scannerConfigWriteCsetSkipCharacters :: MonadIO m => ScannerConfig -> CString -> m ()-scannerConfigWriteCsetSkipCharacters s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--scannerConfigClearCsetSkipCharacters :: MonadIO m => ScannerConfig -> m ()-scannerConfigClearCsetSkipCharacters s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: CString)--data ScannerConfigCsetSkipCharactersFieldInfo-instance AttrInfo ScannerConfigCsetSkipCharactersFieldInfo where- type AttrAllowedOps ScannerConfigCsetSkipCharactersFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerConfigCsetSkipCharactersFieldInfo = (~) CString- type AttrBaseTypeConstraint ScannerConfigCsetSkipCharactersFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigCsetSkipCharactersFieldInfo = Maybe T.Text- type AttrLabel ScannerConfigCsetSkipCharactersFieldInfo = "cset_skip_characters"- attrGet _ = scannerConfigReadCsetSkipCharacters- attrSet _ = scannerConfigWriteCsetSkipCharacters- attrConstruct = undefined- attrClear _ = scannerConfigClearCsetSkipCharacters--scannerConfigCsetSkipCharacters :: AttrLabelProxy "csetSkipCharacters"-scannerConfigCsetSkipCharacters = AttrLabelProxy---scannerConfigReadCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m (Maybe T.Text)-scannerConfigReadCsetIdentifierFirst s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--scannerConfigWriteCsetIdentifierFirst :: MonadIO m => ScannerConfig -> CString -> m ()-scannerConfigWriteCsetIdentifierFirst s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: CString)--scannerConfigClearCsetIdentifierFirst :: MonadIO m => ScannerConfig -> m ()-scannerConfigClearCsetIdentifierFirst s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (nullPtr :: CString)--data ScannerConfigCsetIdentifierFirstFieldInfo-instance AttrInfo ScannerConfigCsetIdentifierFirstFieldInfo where- type AttrAllowedOps ScannerConfigCsetIdentifierFirstFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerConfigCsetIdentifierFirstFieldInfo = (~) CString- type AttrBaseTypeConstraint ScannerConfigCsetIdentifierFirstFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigCsetIdentifierFirstFieldInfo = Maybe T.Text- type AttrLabel ScannerConfigCsetIdentifierFirstFieldInfo = "cset_identifier_first"- attrGet _ = scannerConfigReadCsetIdentifierFirst- attrSet _ = scannerConfigWriteCsetIdentifierFirst- attrConstruct = undefined- attrClear _ = scannerConfigClearCsetIdentifierFirst--scannerConfigCsetIdentifierFirst :: AttrLabelProxy "csetIdentifierFirst"-scannerConfigCsetIdentifierFirst = AttrLabelProxy---scannerConfigReadCsetIdentifierNth :: MonadIO m => ScannerConfig -> m (Maybe T.Text)-scannerConfigReadCsetIdentifierNth s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--scannerConfigWriteCsetIdentifierNth :: MonadIO m => ScannerConfig -> CString -> m ()-scannerConfigWriteCsetIdentifierNth s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: CString)--scannerConfigClearCsetIdentifierNth :: MonadIO m => ScannerConfig -> m ()-scannerConfigClearCsetIdentifierNth s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (nullPtr :: CString)--data ScannerConfigCsetIdentifierNthFieldInfo-instance AttrInfo ScannerConfigCsetIdentifierNthFieldInfo where- type AttrAllowedOps ScannerConfigCsetIdentifierNthFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerConfigCsetIdentifierNthFieldInfo = (~) CString- type AttrBaseTypeConstraint ScannerConfigCsetIdentifierNthFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigCsetIdentifierNthFieldInfo = Maybe T.Text- type AttrLabel ScannerConfigCsetIdentifierNthFieldInfo = "cset_identifier_nth"- attrGet _ = scannerConfigReadCsetIdentifierNth- attrSet _ = scannerConfigWriteCsetIdentifierNth- attrConstruct = undefined- attrClear _ = scannerConfigClearCsetIdentifierNth--scannerConfigCsetIdentifierNth :: AttrLabelProxy "csetIdentifierNth"-scannerConfigCsetIdentifierNth = AttrLabelProxy---scannerConfigReadCpairCommentSingle :: MonadIO m => ScannerConfig -> m (Maybe T.Text)-scannerConfigReadCpairCommentSingle s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--scannerConfigWriteCpairCommentSingle :: MonadIO m => ScannerConfig -> CString -> m ()-scannerConfigWriteCpairCommentSingle s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: CString)--scannerConfigClearCpairCommentSingle :: MonadIO m => ScannerConfig -> m ()-scannerConfigClearCpairCommentSingle s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (nullPtr :: CString)--data ScannerConfigCpairCommentSingleFieldInfo-instance AttrInfo ScannerConfigCpairCommentSingleFieldInfo where- type AttrAllowedOps ScannerConfigCpairCommentSingleFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ScannerConfigCpairCommentSingleFieldInfo = (~) CString- type AttrBaseTypeConstraint ScannerConfigCpairCommentSingleFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigCpairCommentSingleFieldInfo = Maybe T.Text- type AttrLabel ScannerConfigCpairCommentSingleFieldInfo = "cpair_comment_single"- attrGet _ = scannerConfigReadCpairCommentSingle- attrSet _ = scannerConfigWriteCpairCommentSingle- attrConstruct = undefined- attrClear _ = scannerConfigClearCpairCommentSingle--scannerConfigCpairCommentSingle :: AttrLabelProxy "cpairCommentSingle"-scannerConfigCpairCommentSingle = AttrLabelProxy---scannerConfigReadCaseSensitive :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadCaseSensitive s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO Word32- return val--scannerConfigWriteCaseSensitive :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteCaseSensitive s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: Word32)--data ScannerConfigCaseSensitiveFieldInfo-instance AttrInfo ScannerConfigCaseSensitiveFieldInfo where- type AttrAllowedOps ScannerConfigCaseSensitiveFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigCaseSensitiveFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigCaseSensitiveFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigCaseSensitiveFieldInfo = Word32- type AttrLabel ScannerConfigCaseSensitiveFieldInfo = "case_sensitive"- attrGet _ = scannerConfigReadCaseSensitive- attrSet _ = scannerConfigWriteCaseSensitive- attrConstruct = undefined- attrClear _ = undefined--scannerConfigCaseSensitive :: AttrLabelProxy "caseSensitive"-scannerConfigCaseSensitive = AttrLabelProxy---scannerConfigReadSkipCommentMulti :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadSkipCommentMulti s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 36) :: IO Word32- return val--scannerConfigWriteSkipCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteSkipCommentMulti s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 36) (val :: Word32)--data ScannerConfigSkipCommentMultiFieldInfo-instance AttrInfo ScannerConfigSkipCommentMultiFieldInfo where- type AttrAllowedOps ScannerConfigSkipCommentMultiFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigSkipCommentMultiFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigSkipCommentMultiFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigSkipCommentMultiFieldInfo = Word32- type AttrLabel ScannerConfigSkipCommentMultiFieldInfo = "skip_comment_multi"- attrGet _ = scannerConfigReadSkipCommentMulti- attrSet _ = scannerConfigWriteSkipCommentMulti- attrConstruct = undefined- attrClear _ = undefined--scannerConfigSkipCommentMulti :: AttrLabelProxy "skipCommentMulti"-scannerConfigSkipCommentMulti = AttrLabelProxy---scannerConfigReadSkipCommentSingle :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadSkipCommentSingle s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 40) :: IO Word32- return val--scannerConfigWriteSkipCommentSingle :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteSkipCommentSingle s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 40) (val :: Word32)--data ScannerConfigSkipCommentSingleFieldInfo-instance AttrInfo ScannerConfigSkipCommentSingleFieldInfo where- type AttrAllowedOps ScannerConfigSkipCommentSingleFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigSkipCommentSingleFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigSkipCommentSingleFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigSkipCommentSingleFieldInfo = Word32- type AttrLabel ScannerConfigSkipCommentSingleFieldInfo = "skip_comment_single"- attrGet _ = scannerConfigReadSkipCommentSingle- attrSet _ = scannerConfigWriteSkipCommentSingle- attrConstruct = undefined- attrClear _ = undefined--scannerConfigSkipCommentSingle :: AttrLabelProxy "skipCommentSingle"-scannerConfigSkipCommentSingle = AttrLabelProxy---scannerConfigReadScanCommentMulti :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanCommentMulti s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 44) :: IO Word32- return val--scannerConfigWriteScanCommentMulti :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanCommentMulti s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 44) (val :: Word32)--data ScannerConfigScanCommentMultiFieldInfo-instance AttrInfo ScannerConfigScanCommentMultiFieldInfo where- type AttrAllowedOps ScannerConfigScanCommentMultiFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanCommentMultiFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanCommentMultiFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanCommentMultiFieldInfo = Word32- type AttrLabel ScannerConfigScanCommentMultiFieldInfo = "scan_comment_multi"- attrGet _ = scannerConfigReadScanCommentMulti- attrSet _ = scannerConfigWriteScanCommentMulti- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanCommentMulti :: AttrLabelProxy "scanCommentMulti"-scannerConfigScanCommentMulti = AttrLabelProxy---scannerConfigReadScanIdentifier :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanIdentifier s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 48) :: IO Word32- return val--scannerConfigWriteScanIdentifier :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanIdentifier s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (val :: Word32)--data ScannerConfigScanIdentifierFieldInfo-instance AttrInfo ScannerConfigScanIdentifierFieldInfo where- type AttrAllowedOps ScannerConfigScanIdentifierFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanIdentifierFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanIdentifierFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanIdentifierFieldInfo = Word32- type AttrLabel ScannerConfigScanIdentifierFieldInfo = "scan_identifier"- attrGet _ = scannerConfigReadScanIdentifier- attrSet _ = scannerConfigWriteScanIdentifier- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanIdentifier :: AttrLabelProxy "scanIdentifier"-scannerConfigScanIdentifier = AttrLabelProxy---scannerConfigReadScanIdentifier1char :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanIdentifier1char s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 52) :: IO Word32- return val--scannerConfigWriteScanIdentifier1char :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanIdentifier1char s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 52) (val :: Word32)--data ScannerConfigScanIdentifier1charFieldInfo-instance AttrInfo ScannerConfigScanIdentifier1charFieldInfo where- type AttrAllowedOps ScannerConfigScanIdentifier1charFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanIdentifier1charFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanIdentifier1charFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanIdentifier1charFieldInfo = Word32- type AttrLabel ScannerConfigScanIdentifier1charFieldInfo = "scan_identifier_1char"- attrGet _ = scannerConfigReadScanIdentifier1char- attrSet _ = scannerConfigWriteScanIdentifier1char- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanIdentifier1char :: AttrLabelProxy "scanIdentifier1char"-scannerConfigScanIdentifier1char = AttrLabelProxy---scannerConfigReadScanIdentifierNULL :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanIdentifierNULL s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 56) :: IO Word32- return val--scannerConfigWriteScanIdentifierNULL :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanIdentifierNULL s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 56) (val :: Word32)--data ScannerConfigScanIdentifierNULLFieldInfo-instance AttrInfo ScannerConfigScanIdentifierNULLFieldInfo where- type AttrAllowedOps ScannerConfigScanIdentifierNULLFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanIdentifierNULLFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanIdentifierNULLFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanIdentifierNULLFieldInfo = Word32- type AttrLabel ScannerConfigScanIdentifierNULLFieldInfo = "scan_identifier_NULL"- attrGet _ = scannerConfigReadScanIdentifierNULL- attrSet _ = scannerConfigWriteScanIdentifierNULL- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanIdentifierNULL :: AttrLabelProxy "scanIdentifierNULL"-scannerConfigScanIdentifierNULL = AttrLabelProxy---scannerConfigReadScanSymbols :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanSymbols s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 60) :: IO Word32- return val--scannerConfigWriteScanSymbols :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanSymbols s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 60) (val :: Word32)--data ScannerConfigScanSymbolsFieldInfo-instance AttrInfo ScannerConfigScanSymbolsFieldInfo where- type AttrAllowedOps ScannerConfigScanSymbolsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanSymbolsFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanSymbolsFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanSymbolsFieldInfo = Word32- type AttrLabel ScannerConfigScanSymbolsFieldInfo = "scan_symbols"- attrGet _ = scannerConfigReadScanSymbols- attrSet _ = scannerConfigWriteScanSymbols- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanSymbols :: AttrLabelProxy "scanSymbols"-scannerConfigScanSymbols = AttrLabelProxy---scannerConfigReadScanBinary :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanBinary s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 64) :: IO Word32- return val--scannerConfigWriteScanBinary :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanBinary s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 64) (val :: Word32)--data ScannerConfigScanBinaryFieldInfo-instance AttrInfo ScannerConfigScanBinaryFieldInfo where- type AttrAllowedOps ScannerConfigScanBinaryFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanBinaryFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanBinaryFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanBinaryFieldInfo = Word32- type AttrLabel ScannerConfigScanBinaryFieldInfo = "scan_binary"- attrGet _ = scannerConfigReadScanBinary- attrSet _ = scannerConfigWriteScanBinary- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanBinary :: AttrLabelProxy "scanBinary"-scannerConfigScanBinary = AttrLabelProxy---scannerConfigReadScanOctal :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanOctal s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 68) :: IO Word32- return val--scannerConfigWriteScanOctal :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanOctal s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 68) (val :: Word32)--data ScannerConfigScanOctalFieldInfo-instance AttrInfo ScannerConfigScanOctalFieldInfo where- type AttrAllowedOps ScannerConfigScanOctalFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanOctalFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanOctalFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanOctalFieldInfo = Word32- type AttrLabel ScannerConfigScanOctalFieldInfo = "scan_octal"- attrGet _ = scannerConfigReadScanOctal- attrSet _ = scannerConfigWriteScanOctal- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanOctal :: AttrLabelProxy "scanOctal"-scannerConfigScanOctal = AttrLabelProxy---scannerConfigReadScanFloat :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanFloat s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 72) :: IO Word32- return val--scannerConfigWriteScanFloat :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanFloat s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 72) (val :: Word32)--data ScannerConfigScanFloatFieldInfo-instance AttrInfo ScannerConfigScanFloatFieldInfo where- type AttrAllowedOps ScannerConfigScanFloatFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanFloatFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanFloatFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanFloatFieldInfo = Word32- type AttrLabel ScannerConfigScanFloatFieldInfo = "scan_float"- attrGet _ = scannerConfigReadScanFloat- attrSet _ = scannerConfigWriteScanFloat- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanFloat :: AttrLabelProxy "scanFloat"-scannerConfigScanFloat = AttrLabelProxy---scannerConfigReadScanHex :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanHex s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 76) :: IO Word32- return val--scannerConfigWriteScanHex :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanHex s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 76) (val :: Word32)--data ScannerConfigScanHexFieldInfo-instance AttrInfo ScannerConfigScanHexFieldInfo where- type AttrAllowedOps ScannerConfigScanHexFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanHexFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanHexFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanHexFieldInfo = Word32- type AttrLabel ScannerConfigScanHexFieldInfo = "scan_hex"- attrGet _ = scannerConfigReadScanHex- attrSet _ = scannerConfigWriteScanHex- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanHex :: AttrLabelProxy "scanHex"-scannerConfigScanHex = AttrLabelProxy---scannerConfigReadScanHexDollar :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanHexDollar s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 80) :: IO Word32- return val--scannerConfigWriteScanHexDollar :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanHexDollar s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 80) (val :: Word32)--data ScannerConfigScanHexDollarFieldInfo-instance AttrInfo ScannerConfigScanHexDollarFieldInfo where- type AttrAllowedOps ScannerConfigScanHexDollarFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanHexDollarFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanHexDollarFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanHexDollarFieldInfo = Word32- type AttrLabel ScannerConfigScanHexDollarFieldInfo = "scan_hex_dollar"- attrGet _ = scannerConfigReadScanHexDollar- attrSet _ = scannerConfigWriteScanHexDollar- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanHexDollar :: AttrLabelProxy "scanHexDollar"-scannerConfigScanHexDollar = AttrLabelProxy---scannerConfigReadScanStringSq :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanStringSq s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 84) :: IO Word32- return val--scannerConfigWriteScanStringSq :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanStringSq s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 84) (val :: Word32)--data ScannerConfigScanStringSqFieldInfo-instance AttrInfo ScannerConfigScanStringSqFieldInfo where- type AttrAllowedOps ScannerConfigScanStringSqFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanStringSqFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanStringSqFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanStringSqFieldInfo = Word32- type AttrLabel ScannerConfigScanStringSqFieldInfo = "scan_string_sq"- attrGet _ = scannerConfigReadScanStringSq- attrSet _ = scannerConfigWriteScanStringSq- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanStringSq :: AttrLabelProxy "scanStringSq"-scannerConfigScanStringSq = AttrLabelProxy---scannerConfigReadScanStringDq :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScanStringDq s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 88) :: IO Word32- return val--scannerConfigWriteScanStringDq :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScanStringDq s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 88) (val :: Word32)--data ScannerConfigScanStringDqFieldInfo-instance AttrInfo ScannerConfigScanStringDqFieldInfo where- type AttrAllowedOps ScannerConfigScanStringDqFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScanStringDqFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScanStringDqFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScanStringDqFieldInfo = Word32- type AttrLabel ScannerConfigScanStringDqFieldInfo = "scan_string_dq"- attrGet _ = scannerConfigReadScanStringDq- attrSet _ = scannerConfigWriteScanStringDq- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScanStringDq :: AttrLabelProxy "scanStringDq"-scannerConfigScanStringDq = AttrLabelProxy---scannerConfigReadNumbers2Int :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadNumbers2Int s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 92) :: IO Word32- return val--scannerConfigWriteNumbers2Int :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteNumbers2Int s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 92) (val :: Word32)--data ScannerConfigNumbers2IntFieldInfo-instance AttrInfo ScannerConfigNumbers2IntFieldInfo where- type AttrAllowedOps ScannerConfigNumbers2IntFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigNumbers2IntFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigNumbers2IntFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigNumbers2IntFieldInfo = Word32- type AttrLabel ScannerConfigNumbers2IntFieldInfo = "numbers_2_int"- attrGet _ = scannerConfigReadNumbers2Int- attrSet _ = scannerConfigWriteNumbers2Int- attrConstruct = undefined- attrClear _ = undefined--scannerConfigNumbers2Int :: AttrLabelProxy "numbers2Int"-scannerConfigNumbers2Int = AttrLabelProxy---scannerConfigReadInt2Float :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadInt2Float s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 96) :: IO Word32- return val--scannerConfigWriteInt2Float :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteInt2Float s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 96) (val :: Word32)--data ScannerConfigInt2FloatFieldInfo-instance AttrInfo ScannerConfigInt2FloatFieldInfo where- type AttrAllowedOps ScannerConfigInt2FloatFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigInt2FloatFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigInt2FloatFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigInt2FloatFieldInfo = Word32- type AttrLabel ScannerConfigInt2FloatFieldInfo = "int_2_float"- attrGet _ = scannerConfigReadInt2Float- attrSet _ = scannerConfigWriteInt2Float- attrConstruct = undefined- attrClear _ = undefined--scannerConfigInt2Float :: AttrLabelProxy "int2Float"-scannerConfigInt2Float = AttrLabelProxy---scannerConfigReadIdentifier2String :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadIdentifier2String s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 100) :: IO Word32- return val--scannerConfigWriteIdentifier2String :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteIdentifier2String s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 100) (val :: Word32)--data ScannerConfigIdentifier2StringFieldInfo-instance AttrInfo ScannerConfigIdentifier2StringFieldInfo where- type AttrAllowedOps ScannerConfigIdentifier2StringFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigIdentifier2StringFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigIdentifier2StringFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigIdentifier2StringFieldInfo = Word32- type AttrLabel ScannerConfigIdentifier2StringFieldInfo = "identifier_2_string"- attrGet _ = scannerConfigReadIdentifier2String- attrSet _ = scannerConfigWriteIdentifier2String- attrConstruct = undefined- attrClear _ = undefined--scannerConfigIdentifier2String :: AttrLabelProxy "identifier2String"-scannerConfigIdentifier2String = AttrLabelProxy---scannerConfigReadChar2Token :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadChar2Token s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 104) :: IO Word32- return val--scannerConfigWriteChar2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteChar2Token s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 104) (val :: Word32)--data ScannerConfigChar2TokenFieldInfo-instance AttrInfo ScannerConfigChar2TokenFieldInfo where- type AttrAllowedOps ScannerConfigChar2TokenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigChar2TokenFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigChar2TokenFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigChar2TokenFieldInfo = Word32- type AttrLabel ScannerConfigChar2TokenFieldInfo = "char_2_token"- attrGet _ = scannerConfigReadChar2Token- attrSet _ = scannerConfigWriteChar2Token- attrConstruct = undefined- attrClear _ = undefined--scannerConfigChar2Token :: AttrLabelProxy "char2Token"-scannerConfigChar2Token = AttrLabelProxy---scannerConfigReadSymbol2Token :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadSymbol2Token s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 108) :: IO Word32- return val--scannerConfigWriteSymbol2Token :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteSymbol2Token s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 108) (val :: Word32)--data ScannerConfigSymbol2TokenFieldInfo-instance AttrInfo ScannerConfigSymbol2TokenFieldInfo where- type AttrAllowedOps ScannerConfigSymbol2TokenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigSymbol2TokenFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigSymbol2TokenFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigSymbol2TokenFieldInfo = Word32- type AttrLabel ScannerConfigSymbol2TokenFieldInfo = "symbol_2_token"- attrGet _ = scannerConfigReadSymbol2Token- attrSet _ = scannerConfigWriteSymbol2Token- attrConstruct = undefined- attrClear _ = undefined--scannerConfigSymbol2Token :: AttrLabelProxy "symbol2Token"-scannerConfigSymbol2Token = AttrLabelProxy---scannerConfigReadScope0Fallback :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadScope0Fallback s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 112) :: IO Word32- return val--scannerConfigWriteScope0Fallback :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteScope0Fallback s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 112) (val :: Word32)--data ScannerConfigScope0FallbackFieldInfo-instance AttrInfo ScannerConfigScope0FallbackFieldInfo where- type AttrAllowedOps ScannerConfigScope0FallbackFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigScope0FallbackFieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigScope0FallbackFieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigScope0FallbackFieldInfo = Word32- type AttrLabel ScannerConfigScope0FallbackFieldInfo = "scope_0_fallback"- attrGet _ = scannerConfigReadScope0Fallback- attrSet _ = scannerConfigWriteScope0Fallback- attrConstruct = undefined- attrClear _ = undefined--scannerConfigScope0Fallback :: AttrLabelProxy "scope0Fallback"-scannerConfigScope0Fallback = AttrLabelProxy---scannerConfigReadStoreInt64 :: MonadIO m => ScannerConfig -> m Word32-scannerConfigReadStoreInt64 s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 116) :: IO Word32- return val--scannerConfigWriteStoreInt64 :: MonadIO m => ScannerConfig -> Word32 -> m ()-scannerConfigWriteStoreInt64 s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 116) (val :: Word32)--data ScannerConfigStoreInt64FieldInfo-instance AttrInfo ScannerConfigStoreInt64FieldInfo where- type AttrAllowedOps ScannerConfigStoreInt64FieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ScannerConfigStoreInt64FieldInfo = (~) Word32- type AttrBaseTypeConstraint ScannerConfigStoreInt64FieldInfo = (~) ScannerConfig- type AttrGetType ScannerConfigStoreInt64FieldInfo = Word32- type AttrLabel ScannerConfigStoreInt64FieldInfo = "store_int64"- attrGet _ = scannerConfigReadStoreInt64- attrSet _ = scannerConfigWriteStoreInt64- attrConstruct = undefined- attrClear _ = undefined--scannerConfigStoreInt64 :: AttrLabelProxy "storeInt64"-scannerConfigStoreInt64 = AttrLabelProxy----type instance AttributeList ScannerConfig = ScannerConfigAttributeList-type ScannerConfigAttributeList = ('[ '("csetSkipCharacters", ScannerConfigCsetSkipCharactersFieldInfo), '("csetIdentifierFirst", ScannerConfigCsetIdentifierFirstFieldInfo), '("csetIdentifierNth", ScannerConfigCsetIdentifierNthFieldInfo), '("cpairCommentSingle", ScannerConfigCpairCommentSingleFieldInfo), '("caseSensitive", ScannerConfigCaseSensitiveFieldInfo), '("skipCommentMulti", ScannerConfigSkipCommentMultiFieldInfo), '("skipCommentSingle", ScannerConfigSkipCommentSingleFieldInfo), '("scanCommentMulti", ScannerConfigScanCommentMultiFieldInfo), '("scanIdentifier", ScannerConfigScanIdentifierFieldInfo), '("scanIdentifier1char", ScannerConfigScanIdentifier1charFieldInfo), '("scanIdentifierNULL", ScannerConfigScanIdentifierNULLFieldInfo), '("scanSymbols", ScannerConfigScanSymbolsFieldInfo), '("scanBinary", ScannerConfigScanBinaryFieldInfo), '("scanOctal", ScannerConfigScanOctalFieldInfo), '("scanFloat", ScannerConfigScanFloatFieldInfo), '("scanHex", ScannerConfigScanHexFieldInfo), '("scanHexDollar", ScannerConfigScanHexDollarFieldInfo), '("scanStringSq", ScannerConfigScanStringSqFieldInfo), '("scanStringDq", ScannerConfigScanStringDqFieldInfo), '("numbers2Int", ScannerConfigNumbers2IntFieldInfo), '("int2Float", ScannerConfigInt2FloatFieldInfo), '("identifier2String", ScannerConfigIdentifier2StringFieldInfo), '("char2Token", ScannerConfigChar2TokenFieldInfo), '("symbol2Token", ScannerConfigSymbol2TokenFieldInfo), '("scope0Fallback", ScannerConfigScope0FallbackFieldInfo), '("storeInt64", ScannerConfigStoreInt64FieldInfo)] :: [(Symbol, *)])--type family ResolveScannerConfigMethod (t :: Symbol) (o :: *) :: * where- ResolveScannerConfigMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveScannerConfigMethod t ScannerConfig, MethodInfo info ScannerConfig p) => IsLabelProxy t (ScannerConfig -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveScannerConfigMethod t ScannerConfig, MethodInfo info ScannerConfig p) => IsLabel t (ScannerConfig -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/ScannerConfig.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.ScannerConfig where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype ScannerConfig = ScannerConfig (ForeignPtr ScannerConfig)-instance WrappedPtr ScannerConfig where
− GI/GLib/Structs/Sequence.hs
@@ -1,310 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GSequence struct is an opaque data type representing a-[sequence][glib-Sequences] data type.--}--module GI.GLib.Structs.Sequence- ( ---- * Exported types- Sequence(..) ,- noSequence ,--- -- * Methods--- ** sequenceFree- SequenceFreeMethodInfo ,- sequenceFree ,----- ** sequenceGetLength- SequenceGetLengthMethodInfo ,- sequenceGetLength ,----- ** sequenceMove- sequenceMove ,----- ** sequenceMoveRange- sequenceMoveRange ,----- ** sequenceRemove- sequenceRemove ,----- ** sequenceRemoveRange- sequenceRemoveRange ,----- ** sequenceSet- sequenceSet ,----- ** sequenceSwap- sequenceSwap ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Sequence = Sequence (ForeignPtr Sequence)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Sequence where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noSequence :: Maybe Sequence-noSequence = Nothing---type instance AttributeList Sequence = SequenceAttributeList-type SequenceAttributeList = ('[ ] :: [(Symbol, *)])---- method Sequence::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Sequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_sequence_free" g_sequence_free :: - Ptr Sequence -> -- _obj : TInterface "GLib" "Sequence"- IO ()---sequenceFree ::- (MonadIO m) =>- Sequence -- _obj- -> m () -- result-sequenceFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_sequence_free _obj'- touchManagedPtr _obj- return ()--data SequenceFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo SequenceFreeMethodInfo Sequence signature where- overloadedMethod _ = sequenceFree---- method Sequence::get_length--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Sequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_sequence_get_length" g_sequence_get_length :: - Ptr Sequence -> -- _obj : TInterface "GLib" "Sequence"- IO Int32---sequenceGetLength ::- (MonadIO m) =>- Sequence -- _obj- -> m Int32 -- result-sequenceGetLength _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_sequence_get_length _obj'- touchManagedPtr _obj- return result--data SequenceGetLengthMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo SequenceGetLengthMethodInfo Sequence signature where- overloadedMethod _ = sequenceGetLength---- method Sequence::move--- method type : MemberFunction--- Args : [Arg {argCName = "src", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_sequence_move" g_sequence_move :: - Ptr SequenceIter -> -- src : TInterface "GLib" "SequenceIter"- Ptr SequenceIter -> -- dest : TInterface "GLib" "SequenceIter"- IO ()---sequenceMove ::- (MonadIO m) =>- SequenceIter -- src- -> SequenceIter -- dest- -> m () -- result-sequenceMove src dest = liftIO $ do- let src' = unsafeManagedPtrGetPtr src- let dest' = unsafeManagedPtrGetPtr dest- g_sequence_move src' dest'- touchManagedPtr src- touchManagedPtr dest- return ()---- method Sequence::move_range--- method type : MemberFunction--- Args : [Arg {argCName = "dest", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "begin", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_sequence_move_range" g_sequence_move_range :: - Ptr SequenceIter -> -- dest : TInterface "GLib" "SequenceIter"- Ptr SequenceIter -> -- begin : TInterface "GLib" "SequenceIter"- Ptr SequenceIter -> -- end : TInterface "GLib" "SequenceIter"- IO ()---sequenceMoveRange ::- (MonadIO m) =>- SequenceIter -- dest- -> SequenceIter -- begin- -> SequenceIter -- end- -> m () -- result-sequenceMoveRange dest begin end = liftIO $ do- let dest' = unsafeManagedPtrGetPtr dest- let begin' = unsafeManagedPtrGetPtr begin- let end' = unsafeManagedPtrGetPtr end- g_sequence_move_range dest' begin' end'- touchManagedPtr dest- touchManagedPtr begin- touchManagedPtr end- return ()---- method Sequence::remove--- method type : MemberFunction--- Args : [Arg {argCName = "iter", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_sequence_remove" g_sequence_remove :: - Ptr SequenceIter -> -- iter : TInterface "GLib" "SequenceIter"- IO ()---sequenceRemove ::- (MonadIO m) =>- SequenceIter -- iter- -> m () -- result-sequenceRemove iter = liftIO $ do- let iter' = unsafeManagedPtrGetPtr iter- g_sequence_remove iter'- touchManagedPtr iter- return ()---- method Sequence::remove_range--- method type : MemberFunction--- Args : [Arg {argCName = "begin", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_sequence_remove_range" g_sequence_remove_range :: - Ptr SequenceIter -> -- begin : TInterface "GLib" "SequenceIter"- Ptr SequenceIter -> -- end : TInterface "GLib" "SequenceIter"- IO ()---sequenceRemoveRange ::- (MonadIO m) =>- SequenceIter -- begin- -> SequenceIter -- end- -> m () -- result-sequenceRemoveRange begin end = liftIO $ do- let begin' = unsafeManagedPtrGetPtr begin- let end' = unsafeManagedPtrGetPtr end- g_sequence_remove_range begin' end'- touchManagedPtr begin- touchManagedPtr end- return ()---- method Sequence::set--- method type : MemberFunction--- Args : [Arg {argCName = "iter", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_sequence_set" g_sequence_set :: - Ptr SequenceIter -> -- iter : TInterface "GLib" "SequenceIter"- Ptr () -> -- data : TBasicType TPtr- IO ()---sequenceSet ::- (MonadIO m) =>- SequenceIter -- iter- -> Ptr () -- data_- -> m () -- result-sequenceSet iter data_ = liftIO $ do- let iter' = unsafeManagedPtrGetPtr iter- g_sequence_set iter' data_- touchManagedPtr iter- return ()---- method Sequence::swap--- method type : MemberFunction--- Args : [Arg {argCName = "a", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "b", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_sequence_swap" g_sequence_swap :: - Ptr SequenceIter -> -- a : TInterface "GLib" "SequenceIter"- Ptr SequenceIter -> -- b : TInterface "GLib" "SequenceIter"- IO ()---sequenceSwap ::- (MonadIO m) =>- SequenceIter -- a- -> SequenceIter -- b- -> m () -- result-sequenceSwap a b = liftIO $ do- let a' = unsafeManagedPtrGetPtr a- let b' = unsafeManagedPtrGetPtr b- g_sequence_swap a' b'- touchManagedPtr a- touchManagedPtr b- return ()--type family ResolveSequenceMethod (t :: Symbol) (o :: *) :: * where- ResolveSequenceMethod "free" o = SequenceFreeMethodInfo- ResolveSequenceMethod "getLength" o = SequenceGetLengthMethodInfo- ResolveSequenceMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveSequenceMethod t Sequence, MethodInfo info Sequence p) => IsLabelProxy t (Sequence -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveSequenceMethod t Sequence, MethodInfo info Sequence p) => IsLabel t (Sequence -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Sequence.hs-boot
@@ -1,13 +0,0 @@-module GI.GLib.Structs.Sequence where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Sequence = Sequence (ForeignPtr Sequence)-instance WrappedPtr Sequence where-data SequenceFreeMethodInfo-data SequenceGetLengthMethodInfo
− GI/GLib/Structs/SequenceIter.hs
@@ -1,198 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GSequenceIter struct is an opaque data type representing an-iterator pointing into a #GSequence.--}--module GI.GLib.Structs.SequenceIter- ( ---- * Exported types- SequenceIter(..) ,- noSequenceIter ,--- -- * Methods--- ** sequenceIterCompare- SequenceIterCompareMethodInfo ,- sequenceIterCompare ,----- ** sequenceIterGetPosition- SequenceIterGetPositionMethodInfo ,- sequenceIterGetPosition ,----- ** sequenceIterIsBegin- SequenceIterIsBeginMethodInfo ,- sequenceIterIsBegin ,----- ** sequenceIterIsEnd- SequenceIterIsEndMethodInfo ,- sequenceIterIsEnd ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype SequenceIter = SequenceIter (ForeignPtr SequenceIter)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr SequenceIter where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noSequenceIter :: Maybe SequenceIter-noSequenceIter = Nothing---type instance AttributeList SequenceIter = SequenceIterAttributeList-type SequenceIterAttributeList = ('[ ] :: [(Symbol, *)])---- method SequenceIter::compare--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "b", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_sequence_iter_compare" g_sequence_iter_compare :: - Ptr SequenceIter -> -- _obj : TInterface "GLib" "SequenceIter"- Ptr SequenceIter -> -- b : TInterface "GLib" "SequenceIter"- IO Int32---sequenceIterCompare ::- (MonadIO m) =>- SequenceIter -- _obj- -> SequenceIter -- b- -> m Int32 -- result-sequenceIterCompare _obj b = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let b' = unsafeManagedPtrGetPtr b- result <- g_sequence_iter_compare _obj' b'- touchManagedPtr _obj- touchManagedPtr b- return result--data SequenceIterCompareMethodInfo-instance (signature ~ (SequenceIter -> m Int32), MonadIO m) => MethodInfo SequenceIterCompareMethodInfo SequenceIter signature where- overloadedMethod _ = sequenceIterCompare---- method SequenceIter::get_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_sequence_iter_get_position" g_sequence_iter_get_position :: - Ptr SequenceIter -> -- _obj : TInterface "GLib" "SequenceIter"- IO Int32---sequenceIterGetPosition ::- (MonadIO m) =>- SequenceIter -- _obj- -> m Int32 -- result-sequenceIterGetPosition _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_sequence_iter_get_position _obj'- touchManagedPtr _obj- return result--data SequenceIterGetPositionMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo SequenceIterGetPositionMethodInfo SequenceIter signature where- overloadedMethod _ = sequenceIterGetPosition---- method SequenceIter::is_begin--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_sequence_iter_is_begin" g_sequence_iter_is_begin :: - Ptr SequenceIter -> -- _obj : TInterface "GLib" "SequenceIter"- IO CInt---sequenceIterIsBegin ::- (MonadIO m) =>- SequenceIter -- _obj- -> m Bool -- result-sequenceIterIsBegin _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_sequence_iter_is_begin _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data SequenceIterIsBeginMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo SequenceIterIsBeginMethodInfo SequenceIter signature where- overloadedMethod _ = sequenceIterIsBegin---- method SequenceIter::is_end--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "SequenceIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_sequence_iter_is_end" g_sequence_iter_is_end :: - Ptr SequenceIter -> -- _obj : TInterface "GLib" "SequenceIter"- IO CInt---sequenceIterIsEnd ::- (MonadIO m) =>- SequenceIter -- _obj- -> m Bool -- result-sequenceIterIsEnd _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_sequence_iter_is_end _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data SequenceIterIsEndMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo SequenceIterIsEndMethodInfo SequenceIter signature where- overloadedMethod _ = sequenceIterIsEnd--type family ResolveSequenceIterMethod (t :: Symbol) (o :: *) :: * where- ResolveSequenceIterMethod "compare" o = SequenceIterCompareMethodInfo- ResolveSequenceIterMethod "isBegin" o = SequenceIterIsBeginMethodInfo- ResolveSequenceIterMethod "isEnd" o = SequenceIterIsEndMethodInfo- ResolveSequenceIterMethod "getPosition" o = SequenceIterGetPositionMethodInfo- ResolveSequenceIterMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveSequenceIterMethod t SequenceIter, MethodInfo info SequenceIter p) => IsLabelProxy t (SequenceIter -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveSequenceIterMethod t SequenceIter, MethodInfo info SequenceIter p) => IsLabel t (SequenceIter -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/SequenceIter.hs-boot
@@ -1,15 +0,0 @@-module GI.GLib.Structs.SequenceIter where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype SequenceIter = SequenceIter (ForeignPtr SequenceIter)-instance WrappedPtr SequenceIter where-data SequenceIterCompareMethodInfo-data SequenceIterGetPositionMethodInfo-data SequenceIterIsBeginMethodInfo-data SequenceIterIsEndMethodInfo
− GI/GLib/Structs/Source.hs
@@ -1,1179 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The `GSource` struct is an opaque data type-representing an event source.--}--module GI.GLib.Structs.Source- ( ---- * Exported types- Source(..) ,- newZeroSource ,- noSource ,--- -- * Methods--- ** sourceAddChildSource- SourceAddChildSourceMethodInfo ,- sourceAddChildSource ,----- ** sourceAddPoll- SourceAddPollMethodInfo ,- sourceAddPoll ,----- ** sourceAttach- SourceAttachMethodInfo ,- sourceAttach ,----- ** sourceDestroy- SourceDestroyMethodInfo ,- sourceDestroy ,----- ** sourceGetCanRecurse- SourceGetCanRecurseMethodInfo ,- sourceGetCanRecurse ,----- ** sourceGetContext- SourceGetContextMethodInfo ,- sourceGetContext ,----- ** sourceGetCurrentTime- SourceGetCurrentTimeMethodInfo ,- sourceGetCurrentTime ,----- ** sourceGetId- SourceGetIdMethodInfo ,- sourceGetId ,----- ** sourceGetName- SourceGetNameMethodInfo ,- sourceGetName ,----- ** sourceGetPriority- SourceGetPriorityMethodInfo ,- sourceGetPriority ,----- ** sourceGetReadyTime- SourceGetReadyTimeMethodInfo ,- sourceGetReadyTime ,----- ** sourceGetTime- SourceGetTimeMethodInfo ,- sourceGetTime ,----- ** sourceIsDestroyed- SourceIsDestroyedMethodInfo ,- sourceIsDestroyed ,----- ** sourceModifyUnixFd- SourceModifyUnixFdMethodInfo ,- sourceModifyUnixFd ,----- ** sourceNew- sourceNew ,----- ** sourceQueryUnixFd- SourceQueryUnixFdMethodInfo ,- sourceQueryUnixFd ,----- ** sourceRef- SourceRefMethodInfo ,- sourceRef ,----- ** sourceRemove- sourceRemove ,----- ** sourceRemoveByFuncsUserData- sourceRemoveByFuncsUserData ,----- ** sourceRemoveByUserData- sourceRemoveByUserData ,----- ** sourceRemoveChildSource- SourceRemoveChildSourceMethodInfo ,- sourceRemoveChildSource ,----- ** sourceRemovePoll- SourceRemovePollMethodInfo ,- sourceRemovePoll ,----- ** sourceRemoveUnixFd- SourceRemoveUnixFdMethodInfo ,- sourceRemoveUnixFd ,----- ** sourceSetCallback- SourceSetCallbackMethodInfo ,- sourceSetCallback ,----- ** sourceSetCallbackIndirect- SourceSetCallbackIndirectMethodInfo ,- sourceSetCallbackIndirect ,----- ** sourceSetCanRecurse- SourceSetCanRecurseMethodInfo ,- sourceSetCanRecurse ,----- ** sourceSetFuncs- SourceSetFuncsMethodInfo ,- sourceSetFuncs ,----- ** sourceSetName- SourceSetNameMethodInfo ,- sourceSetName ,----- ** sourceSetNameById- sourceSetNameById ,----- ** sourceSetPriority- SourceSetPriorityMethodInfo ,- sourceSetPriority ,----- ** sourceSetReadyTime- SourceSetReadyTimeMethodInfo ,- sourceSetReadyTime ,----- ** sourceUnref- SourceUnrefMethodInfo ,- sourceUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Source = Source (ForeignPtr Source)-foreign import ccall "g_source_get_type" c_g_source_get_type :: - IO GType--instance BoxedObject Source where- boxedType _ = c_g_source_get_type---- | Construct a `Source` struct initialized to zero.-newZeroSource :: MonadIO m => m Source-newZeroSource = liftIO $ callocBoxedBytes 96 >>= wrapBoxed Source--instance tag ~ 'AttrSet => Constructible Source tag where- new _ attrs = do- o <- newZeroSource- GI.Attributes.set o attrs- return o---noSource :: Maybe Source-noSource = Nothing---type instance AttributeList Source = SourceAttributeList-type SourceAttributeList = ('[ ] :: [(Symbol, *)])---- method Source::new--- method type : Constructor--- Args : [Arg {argCName = "source_funcs", argType = TInterface "GLib" "SourceFuncs", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "struct_size", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_source_new" g_source_new :: - Ptr SourceFuncs -> -- source_funcs : TInterface "GLib" "SourceFuncs"- Word32 -> -- struct_size : TBasicType TUInt- IO (Ptr Source)---sourceNew ::- (MonadIO m) =>- SourceFuncs -- sourceFuncs- -> Word32 -- structSize- -> m Source -- result-sourceNew sourceFuncs structSize = liftIO $ do- let sourceFuncs' = unsafeManagedPtrGetPtr sourceFuncs- result <- g_source_new sourceFuncs' structSize- checkUnexpectedReturnNULL "g_source_new" result- result' <- (wrapBoxed Source) result- touchManagedPtr sourceFuncs- return result'---- method Source::add_child_source--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child_source", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_add_child_source" g_source_add_child_source :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr Source -> -- child_source : TInterface "GLib" "Source"- IO ()---sourceAddChildSource ::- (MonadIO m) =>- Source -- _obj- -> Source -- childSource- -> m () -- result-sourceAddChildSource _obj childSource = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let childSource' = unsafeManagedPtrGetPtr childSource- g_source_add_child_source _obj' childSource'- touchManagedPtr _obj- touchManagedPtr childSource- return ()--data SourceAddChildSourceMethodInfo-instance (signature ~ (Source -> m ()), MonadIO m) => MethodInfo SourceAddChildSourceMethodInfo Source signature where- overloadedMethod _ = sourceAddChildSource---- method Source::add_poll--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fd", argType = TInterface "GLib" "PollFD", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_add_poll" g_source_add_poll :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr PollFD -> -- fd : TInterface "GLib" "PollFD"- IO ()---sourceAddPoll ::- (MonadIO m) =>- Source -- _obj- -> PollFD -- fd- -> m () -- result-sourceAddPoll _obj fd = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let fd' = unsafeManagedPtrGetPtr fd- g_source_add_poll _obj' fd'- touchManagedPtr _obj- touchManagedPtr fd- return ()--data SourceAddPollMethodInfo-instance (signature ~ (PollFD -> m ()), MonadIO m) => MethodInfo SourceAddPollMethodInfo Source signature where- overloadedMethod _ = sourceAddPoll---- method Source::attach--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface "GLib" "MainContext", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_source_attach" g_source_attach :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr MainContext -> -- context : TInterface "GLib" "MainContext"- IO Word32---sourceAttach ::- (MonadIO m) =>- Source -- _obj- -> Maybe (MainContext) -- context- -> m Word32 -- result-sourceAttach _obj context = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- maybeContext <- case context of- Nothing -> return nullPtr- Just jContext -> do- let jContext' = unsafeManagedPtrGetPtr jContext- return jContext'- result <- g_source_attach _obj' maybeContext- touchManagedPtr _obj- whenJust context touchManagedPtr- return result--data SourceAttachMethodInfo-instance (signature ~ (Maybe (MainContext) -> m Word32), MonadIO m) => MethodInfo SourceAttachMethodInfo Source signature where- overloadedMethod _ = sourceAttach---- method Source::destroy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_destroy" g_source_destroy :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO ()---sourceDestroy ::- (MonadIO m) =>- Source -- _obj- -> m () -- result-sourceDestroy _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_source_destroy _obj'- touchManagedPtr _obj- return ()--data SourceDestroyMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo SourceDestroyMethodInfo Source signature where- overloadedMethod _ = sourceDestroy---- method Source::get_can_recurse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_source_get_can_recurse" g_source_get_can_recurse :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO CInt---sourceGetCanRecurse ::- (MonadIO m) =>- Source -- _obj- -> m Bool -- result-sourceGetCanRecurse _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_get_can_recurse _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data SourceGetCanRecurseMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo SourceGetCanRecurseMethodInfo Source signature where- overloadedMethod _ = sourceGetCanRecurse---- method Source::get_context--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "MainContext")--- throws : False--- Skip return : False--foreign import ccall "g_source_get_context" g_source_get_context :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO (Ptr MainContext)---sourceGetContext ::- (MonadIO m) =>- Source -- _obj- -> m MainContext -- result-sourceGetContext _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_get_context _obj'- checkUnexpectedReturnNULL "g_source_get_context" result- result' <- (newBoxed MainContext) result- touchManagedPtr _obj- return result'--data SourceGetContextMethodInfo-instance (signature ~ (m MainContext), MonadIO m) => MethodInfo SourceGetContextMethodInfo Source signature where- overloadedMethod _ = sourceGetContext---- method Source::get_current_time--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "timeval", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_get_current_time" g_source_get_current_time :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr TimeVal -> -- timeval : TInterface "GLib" "TimeVal"- IO ()--{-# DEPRECATED sourceGetCurrentTime ["(Since version 2.28)","use g_source_get_time() instead"]#-}-sourceGetCurrentTime ::- (MonadIO m) =>- Source -- _obj- -> TimeVal -- timeval- -> m () -- result-sourceGetCurrentTime _obj timeval = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let timeval' = unsafeManagedPtrGetPtr timeval- g_source_get_current_time _obj' timeval'- touchManagedPtr _obj- touchManagedPtr timeval- return ()--data SourceGetCurrentTimeMethodInfo-instance (signature ~ (TimeVal -> m ()), MonadIO m) => MethodInfo SourceGetCurrentTimeMethodInfo Source signature where- overloadedMethod _ = sourceGetCurrentTime---- method Source::get_id--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_source_get_id" g_source_get_id :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO Word32---sourceGetId ::- (MonadIO m) =>- Source -- _obj- -> m Word32 -- result-sourceGetId _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_get_id _obj'- touchManagedPtr _obj- return result--data SourceGetIdMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo SourceGetIdMethodInfo Source signature where- overloadedMethod _ = sourceGetId---- method Source::get_name--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_source_get_name" g_source_get_name :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO CString---sourceGetName ::- (MonadIO m) =>- Source -- _obj- -> m T.Text -- result-sourceGetName _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_get_name _obj'- checkUnexpectedReturnNULL "g_source_get_name" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data SourceGetNameMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo SourceGetNameMethodInfo Source signature where- overloadedMethod _ = sourceGetName---- method Source::get_priority--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_source_get_priority" g_source_get_priority :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO Int32---sourceGetPriority ::- (MonadIO m) =>- Source -- _obj- -> m Int32 -- result-sourceGetPriority _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_get_priority _obj'- touchManagedPtr _obj- return result--data SourceGetPriorityMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo SourceGetPriorityMethodInfo Source signature where- overloadedMethod _ = sourceGetPriority---- method Source::get_ready_time--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_source_get_ready_time" g_source_get_ready_time :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO Int64---sourceGetReadyTime ::- (MonadIO m) =>- Source -- _obj- -> m Int64 -- result-sourceGetReadyTime _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_get_ready_time _obj'- touchManagedPtr _obj- return result--data SourceGetReadyTimeMethodInfo-instance (signature ~ (m Int64), MonadIO m) => MethodInfo SourceGetReadyTimeMethodInfo Source signature where- overloadedMethod _ = sourceGetReadyTime---- method Source::get_time--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt64)--- throws : False--- Skip return : False--foreign import ccall "g_source_get_time" g_source_get_time :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO Int64---sourceGetTime ::- (MonadIO m) =>- Source -- _obj- -> m Int64 -- result-sourceGetTime _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_get_time _obj'- touchManagedPtr _obj- return result--data SourceGetTimeMethodInfo-instance (signature ~ (m Int64), MonadIO m) => MethodInfo SourceGetTimeMethodInfo Source signature where- overloadedMethod _ = sourceGetTime---- method Source::is_destroyed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_source_is_destroyed" g_source_is_destroyed :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO CInt---sourceIsDestroyed ::- (MonadIO m) =>- Source -- _obj- -> m Bool -- result-sourceIsDestroyed _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_is_destroyed _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data SourceIsDestroyedMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo SourceIsDestroyedMethodInfo Source signature where- overloadedMethod _ = sourceIsDestroyed---- method Source::modify_unix_fd--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tag", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_events", argType = TInterface "GLib" "IOCondition", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_modify_unix_fd" g_source_modify_unix_fd :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr () -> -- tag : TBasicType TPtr- CUInt -> -- new_events : TInterface "GLib" "IOCondition"- IO ()---sourceModifyUnixFd ::- (MonadIO m) =>- Source -- _obj- -> Ptr () -- tag- -> [IOCondition] -- newEvents- -> m () -- result-sourceModifyUnixFd _obj tag newEvents = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let newEvents' = gflagsToWord newEvents- g_source_modify_unix_fd _obj' tag newEvents'- touchManagedPtr _obj- return ()--data SourceModifyUnixFdMethodInfo-instance (signature ~ (Ptr () -> [IOCondition] -> m ()), MonadIO m) => MethodInfo SourceModifyUnixFdMethodInfo Source signature where- overloadedMethod _ = sourceModifyUnixFd---- method Source::query_unix_fd--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tag", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "IOCondition")--- throws : False--- Skip return : False--foreign import ccall "g_source_query_unix_fd" g_source_query_unix_fd :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr () -> -- tag : TBasicType TPtr- IO CUInt---sourceQueryUnixFd ::- (MonadIO m) =>- Source -- _obj- -> Ptr () -- tag- -> m [IOCondition] -- result-sourceQueryUnixFd _obj tag = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_query_unix_fd _obj' tag- let result' = wordToGFlags result- touchManagedPtr _obj- return result'--data SourceQueryUnixFdMethodInfo-instance (signature ~ (Ptr () -> m [IOCondition]), MonadIO m) => MethodInfo SourceQueryUnixFdMethodInfo Source signature where- overloadedMethod _ = sourceQueryUnixFd---- method Source::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Source")--- throws : False--- Skip return : False--foreign import ccall "g_source_ref" g_source_ref :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO (Ptr Source)---sourceRef ::- (MonadIO m) =>- Source -- _obj- -> m Source -- result-sourceRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_source_ref _obj'- checkUnexpectedReturnNULL "g_source_ref" result- result' <- (wrapBoxed Source) result- touchManagedPtr _obj- return result'--data SourceRefMethodInfo-instance (signature ~ (m Source), MonadIO m) => MethodInfo SourceRefMethodInfo Source signature where- overloadedMethod _ = sourceRef---- method Source::remove_child_source--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child_source", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_remove_child_source" g_source_remove_child_source :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr Source -> -- child_source : TInterface "GLib" "Source"- IO ()---sourceRemoveChildSource ::- (MonadIO m) =>- Source -- _obj- -> Source -- childSource- -> m () -- result-sourceRemoveChildSource _obj childSource = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let childSource' = unsafeManagedPtrGetPtr childSource- g_source_remove_child_source _obj' childSource'- touchManagedPtr _obj- touchManagedPtr childSource- return ()--data SourceRemoveChildSourceMethodInfo-instance (signature ~ (Source -> m ()), MonadIO m) => MethodInfo SourceRemoveChildSourceMethodInfo Source signature where- overloadedMethod _ = sourceRemoveChildSource---- method Source::remove_poll--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fd", argType = TInterface "GLib" "PollFD", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_remove_poll" g_source_remove_poll :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr PollFD -> -- fd : TInterface "GLib" "PollFD"- IO ()---sourceRemovePoll ::- (MonadIO m) =>- Source -- _obj- -> PollFD -- fd- -> m () -- result-sourceRemovePoll _obj fd = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let fd' = unsafeManagedPtrGetPtr fd- g_source_remove_poll _obj' fd'- touchManagedPtr _obj- touchManagedPtr fd- return ()--data SourceRemovePollMethodInfo-instance (signature ~ (PollFD -> m ()), MonadIO m) => MethodInfo SourceRemovePollMethodInfo Source signature where- overloadedMethod _ = sourceRemovePoll---- method Source::remove_unix_fd--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tag", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_remove_unix_fd" g_source_remove_unix_fd :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr () -> -- tag : TBasicType TPtr- IO ()---sourceRemoveUnixFd ::- (MonadIO m) =>- Source -- _obj- -> Ptr () -- tag- -> m () -- result-sourceRemoveUnixFd _obj tag = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_source_remove_unix_fd _obj' tag- touchManagedPtr _obj- return ()--data SourceRemoveUnixFdMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo SourceRemoveUnixFdMethodInfo Source signature where- overloadedMethod _ = sourceRemoveUnixFd---- method Source::set_callback--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TInterface "GLib" "SourceFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_callback" g_source_set_callback :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- FunPtr SourceFuncC -> -- func : TInterface "GLib" "SourceFunc"- Ptr () -> -- data : TBasicType TPtr- FunPtr DestroyNotifyC -> -- notify : TInterface "GLib" "DestroyNotify"- IO ()---sourceSetCallback ::- (MonadIO m) =>- Source -- _obj- -> SourceFunc -- func- -> m () -- result-sourceSetCallback _obj func = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- func' <- mkSourceFunc (sourceFuncWrapper Nothing func)- let data_ = castFunPtrToPtr func'- let notify = safeFreeFunPtrPtr- g_source_set_callback _obj' func' data_ notify- touchManagedPtr _obj- return ()--data SourceSetCallbackMethodInfo-instance (signature ~ (SourceFunc -> m ()), MonadIO m) => MethodInfo SourceSetCallbackMethodInfo Source signature where- overloadedMethod _ = sourceSetCallback---- method Source::set_callback_indirect--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback_funcs", argType = TInterface "GLib" "SourceCallbackFuncs", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_callback_indirect" g_source_set_callback_indirect :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr () -> -- callback_data : TBasicType TPtr- Ptr SourceCallbackFuncs -> -- callback_funcs : TInterface "GLib" "SourceCallbackFuncs"- IO ()---sourceSetCallbackIndirect ::- (MonadIO m) =>- Source -- _obj- -> Ptr () -- callbackData- -> SourceCallbackFuncs -- callbackFuncs- -> m () -- result-sourceSetCallbackIndirect _obj callbackData callbackFuncs = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let callbackFuncs' = unsafeManagedPtrGetPtr callbackFuncs- g_source_set_callback_indirect _obj' callbackData callbackFuncs'- touchManagedPtr _obj- touchManagedPtr callbackFuncs- return ()--data SourceSetCallbackIndirectMethodInfo-instance (signature ~ (Ptr () -> SourceCallbackFuncs -> m ()), MonadIO m) => MethodInfo SourceSetCallbackIndirectMethodInfo Source signature where- overloadedMethod _ = sourceSetCallbackIndirect---- method Source::set_can_recurse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "can_recurse", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_can_recurse" g_source_set_can_recurse :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- CInt -> -- can_recurse : TBasicType TBoolean- IO ()---sourceSetCanRecurse ::- (MonadIO m) =>- Source -- _obj- -> Bool -- canRecurse- -> m () -- result-sourceSetCanRecurse _obj canRecurse = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let canRecurse' = (fromIntegral . fromEnum) canRecurse- g_source_set_can_recurse _obj' canRecurse'- touchManagedPtr _obj- return ()--data SourceSetCanRecurseMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m) => MethodInfo SourceSetCanRecurseMethodInfo Source signature where- overloadedMethod _ = sourceSetCanRecurse---- method Source::set_funcs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "funcs", argType = TInterface "GLib" "SourceFuncs", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_funcs" g_source_set_funcs :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Ptr SourceFuncs -> -- funcs : TInterface "GLib" "SourceFuncs"- IO ()---sourceSetFuncs ::- (MonadIO m) =>- Source -- _obj- -> SourceFuncs -- funcs- -> m () -- result-sourceSetFuncs _obj funcs = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let funcs' = unsafeManagedPtrGetPtr funcs- g_source_set_funcs _obj' funcs'- touchManagedPtr _obj- touchManagedPtr funcs- return ()--data SourceSetFuncsMethodInfo-instance (signature ~ (SourceFuncs -> m ()), MonadIO m) => MethodInfo SourceSetFuncsMethodInfo Source signature where- overloadedMethod _ = sourceSetFuncs---- method Source::set_name--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_name" g_source_set_name :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- CString -> -- name : TBasicType TUTF8- IO ()---sourceSetName ::- (MonadIO m) =>- Source -- _obj- -> T.Text -- name- -> m () -- result-sourceSetName _obj name = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- name' <- textToCString name- g_source_set_name _obj' name'- touchManagedPtr _obj- freeMem name'- return ()--data SourceSetNameMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => MethodInfo SourceSetNameMethodInfo Source signature where- overloadedMethod _ = sourceSetName---- method Source::set_priority--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "priority", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_priority" g_source_set_priority :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Int32 -> -- priority : TBasicType TInt- IO ()---sourceSetPriority ::- (MonadIO m) =>- Source -- _obj- -> Int32 -- priority- -> m () -- result-sourceSetPriority _obj priority = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_source_set_priority _obj' priority- touchManagedPtr _obj- return ()--data SourceSetPriorityMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m) => MethodInfo SourceSetPriorityMethodInfo Source signature where- overloadedMethod _ = sourceSetPriority---- method Source::set_ready_time--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ready_time", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_ready_time" g_source_set_ready_time :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- Int64 -> -- ready_time : TBasicType TInt64- IO ()---sourceSetReadyTime ::- (MonadIO m) =>- Source -- _obj- -> Int64 -- readyTime- -> m () -- result-sourceSetReadyTime _obj readyTime = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_source_set_ready_time _obj' readyTime- touchManagedPtr _obj- return ()--data SourceSetReadyTimeMethodInfo-instance (signature ~ (Int64 -> m ()), MonadIO m) => MethodInfo SourceSetReadyTimeMethodInfo Source signature where- overloadedMethod _ = sourceSetReadyTime---- method Source::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Source", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_unref" g_source_unref :: - Ptr Source -> -- _obj : TInterface "GLib" "Source"- IO ()---sourceUnref ::- (MonadIO m) =>- Source -- _obj- -> m () -- result-sourceUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_source_unref _obj'- touchManagedPtr _obj- return ()--data SourceUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo SourceUnrefMethodInfo Source signature where- overloadedMethod _ = sourceUnref---- method Source::remove--- method type : MemberFunction--- Args : [Arg {argCName = "tag", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_source_remove" g_source_remove :: - Word32 -> -- tag : TBasicType TUInt- IO CInt---sourceRemove ::- (MonadIO m) =>- Word32 -- tag- -> m Bool -- result-sourceRemove tag = liftIO $ do- result <- g_source_remove tag- let result' = (/= 0) result- return result'---- method Source::remove_by_funcs_user_data--- method type : MemberFunction--- Args : [Arg {argCName = "funcs", argType = TInterface "GLib" "SourceFuncs", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_source_remove_by_funcs_user_data" g_source_remove_by_funcs_user_data :: - Ptr SourceFuncs -> -- funcs : TInterface "GLib" "SourceFuncs"- Ptr () -> -- user_data : TBasicType TPtr- IO CInt---sourceRemoveByFuncsUserData ::- (MonadIO m) =>- SourceFuncs -- funcs- -> Ptr () -- userData- -> m Bool -- result-sourceRemoveByFuncsUserData funcs userData = liftIO $ do- let funcs' = unsafeManagedPtrGetPtr funcs- result <- g_source_remove_by_funcs_user_data funcs' userData- let result' = (/= 0) result- touchManagedPtr funcs- return result'---- method Source::remove_by_user_data--- method type : MemberFunction--- Args : [Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_source_remove_by_user_data" g_source_remove_by_user_data :: - Ptr () -> -- user_data : TBasicType TPtr- IO CInt---sourceRemoveByUserData ::- (MonadIO m) =>- Ptr () -- userData- -> m Bool -- result-sourceRemoveByUserData userData = liftIO $ do- result <- g_source_remove_by_user_data userData- let result' = (/= 0) result- return result'---- method Source::set_name_by_id--- method type : MemberFunction--- Args : [Arg {argCName = "tag", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_source_set_name_by_id" g_source_set_name_by_id :: - Word32 -> -- tag : TBasicType TUInt- CString -> -- name : TBasicType TUTF8- IO ()---sourceSetNameById ::- (MonadIO m) =>- Word32 -- tag- -> T.Text -- name- -> m () -- result-sourceSetNameById tag name = liftIO $ do- name' <- textToCString name- g_source_set_name_by_id tag name'- freeMem name'- return ()--type family ResolveSourceMethod (t :: Symbol) (o :: *) :: * where- ResolveSourceMethod "addChildSource" o = SourceAddChildSourceMethodInfo- ResolveSourceMethod "addPoll" o = SourceAddPollMethodInfo- ResolveSourceMethod "attach" o = SourceAttachMethodInfo- ResolveSourceMethod "destroy" o = SourceDestroyMethodInfo- ResolveSourceMethod "isDestroyed" o = SourceIsDestroyedMethodInfo- ResolveSourceMethod "modifyUnixFd" o = SourceModifyUnixFdMethodInfo- ResolveSourceMethod "queryUnixFd" o = SourceQueryUnixFdMethodInfo- ResolveSourceMethod "ref" o = SourceRefMethodInfo- ResolveSourceMethod "removeChildSource" o = SourceRemoveChildSourceMethodInfo- ResolveSourceMethod "removePoll" o = SourceRemovePollMethodInfo- ResolveSourceMethod "removeUnixFd" o = SourceRemoveUnixFdMethodInfo- ResolveSourceMethod "unref" o = SourceUnrefMethodInfo- ResolveSourceMethod "getCanRecurse" o = SourceGetCanRecurseMethodInfo- ResolveSourceMethod "getContext" o = SourceGetContextMethodInfo- ResolveSourceMethod "getCurrentTime" o = SourceGetCurrentTimeMethodInfo- ResolveSourceMethod "getId" o = SourceGetIdMethodInfo- ResolveSourceMethod "getName" o = SourceGetNameMethodInfo- ResolveSourceMethod "getPriority" o = SourceGetPriorityMethodInfo- ResolveSourceMethod "getReadyTime" o = SourceGetReadyTimeMethodInfo- ResolveSourceMethod "getTime" o = SourceGetTimeMethodInfo- ResolveSourceMethod "setCallback" o = SourceSetCallbackMethodInfo- ResolveSourceMethod "setCallbackIndirect" o = SourceSetCallbackIndirectMethodInfo- ResolveSourceMethod "setCanRecurse" o = SourceSetCanRecurseMethodInfo- ResolveSourceMethod "setFuncs" o = SourceSetFuncsMethodInfo- ResolveSourceMethod "setName" o = SourceSetNameMethodInfo- ResolveSourceMethod "setPriority" o = SourceSetPriorityMethodInfo- ResolveSourceMethod "setReadyTime" o = SourceSetReadyTimeMethodInfo- ResolveSourceMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveSourceMethod t Source, MethodInfo info Source p) => IsLabelProxy t (Source -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveSourceMethod t Source, MethodInfo info Source p) => IsLabel t (Source -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Source.hs-boot
@@ -1,38 +0,0 @@-module GI.GLib.Structs.Source where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Source = Source (ForeignPtr Source)-instance BoxedObject Source where-data SourceAddChildSourceMethodInfo-data SourceAddPollMethodInfo-data SourceAttachMethodInfo-data SourceDestroyMethodInfo-data SourceGetCanRecurseMethodInfo-data SourceGetContextMethodInfo-data SourceGetCurrentTimeMethodInfo-data SourceGetIdMethodInfo-data SourceGetNameMethodInfo-data SourceGetPriorityMethodInfo-data SourceGetReadyTimeMethodInfo-data SourceGetTimeMethodInfo-data SourceIsDestroyedMethodInfo-data SourceModifyUnixFdMethodInfo-data SourceQueryUnixFdMethodInfo-data SourceRefMethodInfo-data SourceRemoveChildSourceMethodInfo-data SourceRemovePollMethodInfo-data SourceRemoveUnixFdMethodInfo-data SourceSetCallbackMethodInfo-data SourceSetCallbackIndirectMethodInfo-data SourceSetCanRecurseMethodInfo-data SourceSetFuncsMethodInfo-data SourceSetNameMethodInfo-data SourceSetPriorityMethodInfo-data SourceSetReadyTimeMethodInfo-data SourceUnrefMethodInfo
− GI/GLib/Structs/SourceCallbackFuncs.hs
@@ -1,70 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The `GSourceCallbackFuncs` struct contains-functions for managing callback objects.--}--module GI.GLib.Structs.SourceCallbackFuncs- ( ---- * Exported types- SourceCallbackFuncs(..) ,- newZeroSourceCallbackFuncs ,- noSourceCallbackFuncs ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype SourceCallbackFuncs = SourceCallbackFuncs (ForeignPtr SourceCallbackFuncs)-instance WrappedPtr SourceCallbackFuncs where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = copyPtr 24- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `SourceCallbackFuncs` struct initialized to zero.-newZeroSourceCallbackFuncs :: MonadIO m => m SourceCallbackFuncs-newZeroSourceCallbackFuncs = liftIO $ wrappedPtrCalloc >>= wrapPtr SourceCallbackFuncs--instance tag ~ 'AttrSet => Constructible SourceCallbackFuncs tag where- new _ attrs = do- o <- newZeroSourceCallbackFuncs- GI.Attributes.set o attrs- return o---noSourceCallbackFuncs :: Maybe SourceCallbackFuncs-noSourceCallbackFuncs = Nothing---- XXX Skipped attribute for "SourceCallbackFuncs:ref" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "SourceCallbackFuncs:unref" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--type instance AttributeList SourceCallbackFuncs = SourceCallbackFuncsAttributeList-type SourceCallbackFuncsAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveSourceCallbackFuncsMethod (t :: Symbol) (o :: *) :: * where- ResolveSourceCallbackFuncsMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveSourceCallbackFuncsMethod t SourceCallbackFuncs, MethodInfo info SourceCallbackFuncs p) => IsLabelProxy t (SourceCallbackFuncs -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveSourceCallbackFuncsMethod t SourceCallbackFuncs, MethodInfo info SourceCallbackFuncs p) => IsLabel t (SourceCallbackFuncs -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/SourceCallbackFuncs.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.SourceCallbackFuncs where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype SourceCallbackFuncs = SourceCallbackFuncs (ForeignPtr SourceCallbackFuncs)-instance WrappedPtr SourceCallbackFuncs where
− GI/GLib/Structs/SourceFuncs.hs
@@ -1,89 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The `GSourceFuncs` struct contains a table of-functions used to handle event sources in a generic manner.--For idle sources, the prepare and check functions always return %TRUE-to indicate that the source is always ready to be processed. The prepare-function also returns a timeout value of 0 to ensure that the poll() call-doesn't block (since that would be time wasted which could have been spent-running the idle function).--For timeout sources, the prepare and check functions both return %TRUE-if the timeout interval has expired. The prepare function also returns-a timeout value to ensure that the poll() call doesn't block too long-and miss the next timeout.--For file descriptor sources, the prepare function typically returns %FALSE,-since it must wait until poll() has been called before it knows whether-any events need to be processed. It sets the returned timeout to -1 to-indicate that it doesn't mind how long the poll() call blocks. In the-check function, it tests the results of the poll() call to see if the-required condition has been met, and returns %TRUE if so.--}--module GI.GLib.Structs.SourceFuncs- ( ---- * Exported types- SourceFuncs(..) ,- newZeroSourceFuncs ,- noSourceFuncs ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype SourceFuncs = SourceFuncs (ForeignPtr SourceFuncs)-instance WrappedPtr SourceFuncs where- wrappedPtrCalloc = callocBytes 48- wrappedPtrCopy = copyPtr 48- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `SourceFuncs` struct initialized to zero.-newZeroSourceFuncs :: MonadIO m => m SourceFuncs-newZeroSourceFuncs = liftIO $ wrappedPtrCalloc >>= wrapPtr SourceFuncs--instance tag ~ 'AttrSet => Constructible SourceFuncs tag where- new _ attrs = do- o <- newZeroSourceFuncs- GI.Attributes.set o attrs- return o---noSourceFuncs :: Maybe SourceFuncs-noSourceFuncs = Nothing---- XXX Skipped attribute for "SourceFuncs:prepare" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "SourceFuncs:check" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--- XXX Skipped attribute for "SourceFuncs:finalize" :: Not implemented: "Wrapping foreign callbacks is not supported yet"--type instance AttributeList SourceFuncs = SourceFuncsAttributeList-type SourceFuncsAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveSourceFuncsMethod (t :: Symbol) (o :: *) :: * where- ResolveSourceFuncsMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveSourceFuncsMethod t SourceFuncs, MethodInfo info SourceFuncs p) => IsLabelProxy t (SourceFuncs -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveSourceFuncsMethod t SourceFuncs, MethodInfo info SourceFuncs p) => IsLabel t (SourceFuncs -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/SourceFuncs.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.SourceFuncs where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype SourceFuncs = SourceFuncs (ForeignPtr SourceFuncs)-instance WrappedPtr SourceFuncs where
− GI/GLib/Structs/StatBuf.hs
@@ -1,59 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A type corresponding to the appropriate struct type for the stat()-system call, depending on the platform and/or compiler being used.--See g_stat() for more information.--}--module GI.GLib.Structs.StatBuf- ( ---- * Exported types- StatBuf(..) ,- noStatBuf ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype StatBuf = StatBuf (ForeignPtr StatBuf)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr StatBuf where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noStatBuf :: Maybe StatBuf-noStatBuf = Nothing---type instance AttributeList StatBuf = StatBufAttributeList-type StatBufAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveStatBufMethod (t :: Symbol) (o :: *) :: * where- ResolveStatBufMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveStatBufMethod t StatBuf, MethodInfo info StatBuf p) => IsLabelProxy t (StatBuf -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveStatBufMethod t StatBuf, MethodInfo info StatBuf p) => IsLabel t (StatBuf -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/StatBuf.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.StatBuf where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype StatBuf = StatBuf (ForeignPtr StatBuf)-instance WrappedPtr StatBuf where
− GI/GLib/Structs/String.hs
@@ -1,1216 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GString struct contains the public fields of a GString.--}--module GI.GLib.Structs.String- ( ---- * Exported types- String(..) ,- newZeroString ,- noString ,--- -- * Methods--- ** stringAppend- StringAppendMethodInfo ,- stringAppend ,----- ** stringAppendC- StringAppendCMethodInfo ,- stringAppendC ,----- ** stringAppendLen- StringAppendLenMethodInfo ,- stringAppendLen ,----- ** stringAppendUnichar- StringAppendUnicharMethodInfo ,- stringAppendUnichar ,----- ** stringAppendUriEscaped- StringAppendUriEscapedMethodInfo ,- stringAppendUriEscaped ,----- ** stringAsciiDown- StringAsciiDownMethodInfo ,- stringAsciiDown ,----- ** stringAsciiUp- StringAsciiUpMethodInfo ,- stringAsciiUp ,----- ** stringAssign- StringAssignMethodInfo ,- stringAssign ,----- ** stringDown- StringDownMethodInfo ,- stringDown ,----- ** stringEqual- StringEqualMethodInfo ,- stringEqual ,----- ** stringErase- StringEraseMethodInfo ,- stringErase ,----- ** stringFree- StringFreeMethodInfo ,- stringFree ,----- ** stringFreeToBytes- StringFreeToBytesMethodInfo ,- stringFreeToBytes ,----- ** stringHash- StringHashMethodInfo ,- stringHash ,----- ** stringInsert- StringInsertMethodInfo ,- stringInsert ,----- ** stringInsertC- StringInsertCMethodInfo ,- stringInsertC ,----- ** stringInsertLen- StringInsertLenMethodInfo ,- stringInsertLen ,----- ** stringInsertUnichar- StringInsertUnicharMethodInfo ,- stringInsertUnichar ,----- ** stringOverwrite- StringOverwriteMethodInfo ,- stringOverwrite ,----- ** stringOverwriteLen- StringOverwriteLenMethodInfo ,- stringOverwriteLen ,----- ** stringPrepend- StringPrependMethodInfo ,- stringPrepend ,----- ** stringPrependC- StringPrependCMethodInfo ,- stringPrependC ,----- ** stringPrependLen- StringPrependLenMethodInfo ,- stringPrependLen ,----- ** stringPrependUnichar- StringPrependUnicharMethodInfo ,- stringPrependUnichar ,----- ** stringSetSize- StringSetSizeMethodInfo ,- stringSetSize ,----- ** stringTruncate- StringTruncateMethodInfo ,- stringTruncate ,----- ** stringUp- StringUpMethodInfo ,- stringUp ,----- -- * Properties--- ** AllocatedLen- stringAllocatedLen ,- stringReadAllocatedLen ,- stringWriteAllocatedLen ,----- ** Len- stringLen ,- stringReadLen ,- stringWriteLen ,----- ** Str- stringClearStr ,- stringReadStr ,- stringStr ,- stringWriteStr ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype String = String (ForeignPtr String)-foreign import ccall "g_gstring_get_type" c_g_gstring_get_type :: - IO GType--instance BoxedObject String where- boxedType _ = c_g_gstring_get_type---- | Construct a `String` struct initialized to zero.-newZeroString :: MonadIO m => m String-newZeroString = liftIO $ callocBoxedBytes 24 >>= wrapBoxed String--instance tag ~ 'AttrSet => Constructible String tag where- new _ attrs = do- o <- newZeroString- GI.Attributes.set o attrs- return o---noString :: Maybe String-noString = Nothing--stringReadStr :: MonadIO m => String -> m (Maybe T.Text)-stringReadStr s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--stringWriteStr :: MonadIO m => String -> CString -> m ()-stringWriteStr s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--stringClearStr :: MonadIO m => String -> m ()-stringClearStr s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: CString)--data StringStrFieldInfo-instance AttrInfo StringStrFieldInfo where- type AttrAllowedOps StringStrFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint StringStrFieldInfo = (~) CString- type AttrBaseTypeConstraint StringStrFieldInfo = (~) String- type AttrGetType StringStrFieldInfo = Maybe T.Text- type AttrLabel StringStrFieldInfo = "str"- attrGet _ = stringReadStr- attrSet _ = stringWriteStr- attrConstruct = undefined- attrClear _ = stringClearStr--stringStr :: AttrLabelProxy "str"-stringStr = AttrLabelProxy---stringReadLen :: MonadIO m => String -> m Word64-stringReadLen s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word64- return val--stringWriteLen :: MonadIO m => String -> Word64 -> m ()-stringWriteLen s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word64)--data StringLenFieldInfo-instance AttrInfo StringLenFieldInfo where- type AttrAllowedOps StringLenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint StringLenFieldInfo = (~) Word64- type AttrBaseTypeConstraint StringLenFieldInfo = (~) String- type AttrGetType StringLenFieldInfo = Word64- type AttrLabel StringLenFieldInfo = "len"- attrGet _ = stringReadLen- attrSet _ = stringWriteLen- attrConstruct = undefined- attrClear _ = undefined--stringLen :: AttrLabelProxy "len"-stringLen = AttrLabelProxy---stringReadAllocatedLen :: MonadIO m => String -> m Word64-stringReadAllocatedLen s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Word64- return val--stringWriteAllocatedLen :: MonadIO m => String -> Word64 -> m ()-stringWriteAllocatedLen s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Word64)--data StringAllocatedLenFieldInfo-instance AttrInfo StringAllocatedLenFieldInfo where- type AttrAllowedOps StringAllocatedLenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint StringAllocatedLenFieldInfo = (~) Word64- type AttrBaseTypeConstraint StringAllocatedLenFieldInfo = (~) String- type AttrGetType StringAllocatedLenFieldInfo = Word64- type AttrLabel StringAllocatedLenFieldInfo = "allocated_len"- attrGet _ = stringReadAllocatedLen- attrSet _ = stringWriteAllocatedLen- attrConstruct = undefined- attrClear _ = undefined--stringAllocatedLen :: AttrLabelProxy "allocatedLen"-stringAllocatedLen = AttrLabelProxy----type instance AttributeList String = StringAttributeList-type StringAttributeList = ('[ '("str", StringStrFieldInfo), '("len", StringLenFieldInfo), '("allocatedLen", StringAllocatedLenFieldInfo)] :: [(Symbol, *)])---- method String::append--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_append" g_string_append :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CString -> -- val : TBasicType TUTF8- IO (Ptr String)---stringAppend ::- (MonadIO m) =>- String -- _obj- -> T.Text -- val- -> m String -- result-stringAppend _obj val = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_append _obj' val'- checkUnexpectedReturnNULL "g_string_append" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringAppendMethodInfo-instance (signature ~ (T.Text -> m String), MonadIO m) => MethodInfo StringAppendMethodInfo String signature where- overloadedMethod _ = stringAppend---- method String::append_c--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "c", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_append_c" g_string_append_c :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Int8 -> -- c : TBasicType TInt8- IO (Ptr String)---stringAppendC ::- (MonadIO m) =>- String -- _obj- -> Int8 -- c- -> m String -- result-stringAppendC _obj c = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_append_c _obj' c- checkUnexpectedReturnNULL "g_string_append_c" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringAppendCMethodInfo-instance (signature ~ (Int8 -> m String), MonadIO m) => MethodInfo StringAppendCMethodInfo String signature where- overloadedMethod _ = stringAppendC---- method String::append_len--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_append_len" g_string_append_len :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CString -> -- val : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO (Ptr String)---stringAppendLen ::- (MonadIO m) =>- String -- _obj- -> T.Text -- val- -> Int64 -- len- -> m String -- result-stringAppendLen _obj val len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_append_len _obj' val' len- checkUnexpectedReturnNULL "g_string_append_len" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringAppendLenMethodInfo-instance (signature ~ (T.Text -> Int64 -> m String), MonadIO m) => MethodInfo StringAppendLenMethodInfo String signature where- overloadedMethod _ = stringAppendLen---- method String::append_unichar--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "wc", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_append_unichar" g_string_append_unichar :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CInt -> -- wc : TBasicType TUniChar- IO (Ptr String)---stringAppendUnichar ::- (MonadIO m) =>- String -- _obj- -> Char -- wc- -> m String -- result-stringAppendUnichar _obj wc = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let wc' = (fromIntegral . ord) wc- result <- g_string_append_unichar _obj' wc'- checkUnexpectedReturnNULL "g_string_append_unichar" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringAppendUnicharMethodInfo-instance (signature ~ (Char -> m String), MonadIO m) => MethodInfo StringAppendUnicharMethodInfo String signature where- overloadedMethod _ = stringAppendUnichar---- method String::append_uri_escaped--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "unescaped", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "reserved_chars_allowed", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "allow_utf8", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_append_uri_escaped" g_string_append_uri_escaped :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CString -> -- unescaped : TBasicType TUTF8- CString -> -- reserved_chars_allowed : TBasicType TUTF8- CInt -> -- allow_utf8 : TBasicType TBoolean- IO (Ptr String)---stringAppendUriEscaped ::- (MonadIO m) =>- String -- _obj- -> T.Text -- unescaped- -> T.Text -- reservedCharsAllowed- -> Bool -- allowUtf8- -> m String -- result-stringAppendUriEscaped _obj unescaped reservedCharsAllowed allowUtf8 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- unescaped' <- textToCString unescaped- reservedCharsAllowed' <- textToCString reservedCharsAllowed- let allowUtf8' = (fromIntegral . fromEnum) allowUtf8- result <- g_string_append_uri_escaped _obj' unescaped' reservedCharsAllowed' allowUtf8'- checkUnexpectedReturnNULL "g_string_append_uri_escaped" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem unescaped'- freeMem reservedCharsAllowed'- return result'--data StringAppendUriEscapedMethodInfo-instance (signature ~ (T.Text -> T.Text -> Bool -> m String), MonadIO m) => MethodInfo StringAppendUriEscapedMethodInfo String signature where- overloadedMethod _ = stringAppendUriEscaped---- method String::ascii_down--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_ascii_down" g_string_ascii_down :: - Ptr String -> -- _obj : TInterface "GLib" "String"- IO (Ptr String)---stringAsciiDown ::- (MonadIO m) =>- String -- _obj- -> m String -- result-stringAsciiDown _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_ascii_down _obj'- checkUnexpectedReturnNULL "g_string_ascii_down" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringAsciiDownMethodInfo-instance (signature ~ (m String), MonadIO m) => MethodInfo StringAsciiDownMethodInfo String signature where- overloadedMethod _ = stringAsciiDown---- method String::ascii_up--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_ascii_up" g_string_ascii_up :: - Ptr String -> -- _obj : TInterface "GLib" "String"- IO (Ptr String)---stringAsciiUp ::- (MonadIO m) =>- String -- _obj- -> m String -- result-stringAsciiUp _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_ascii_up _obj'- checkUnexpectedReturnNULL "g_string_ascii_up" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringAsciiUpMethodInfo-instance (signature ~ (m String), MonadIO m) => MethodInfo StringAsciiUpMethodInfo String signature where- overloadedMethod _ = stringAsciiUp---- method String::assign--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "rval", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_assign" g_string_assign :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CString -> -- rval : TBasicType TUTF8- IO (Ptr String)---stringAssign ::- (MonadIO m) =>- String -- _obj- -> T.Text -- rval- -> m String -- result-stringAssign _obj rval = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- rval' <- textToCString rval- result <- g_string_assign _obj' rval'- checkUnexpectedReturnNULL "g_string_assign" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem rval'- return result'--data StringAssignMethodInfo-instance (signature ~ (T.Text -> m String), MonadIO m) => MethodInfo StringAssignMethodInfo String signature where- overloadedMethod _ = stringAssign---- method String::down--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_down" g_string_down :: - Ptr String -> -- _obj : TInterface "GLib" "String"- IO (Ptr String)--{-# DEPRECATED stringDown ["(Since version 2.2)","This function uses the locale-specific"," tolower() function, which is almost never the right thing."," Use g_string_ascii_down() or g_utf8_strdown() instead."]#-}-stringDown ::- (MonadIO m) =>- String -- _obj- -> m String -- result-stringDown _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_down _obj'- checkUnexpectedReturnNULL "g_string_down" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringDownMethodInfo-instance (signature ~ (m String), MonadIO m) => MethodInfo StringDownMethodInfo String signature where- overloadedMethod _ = stringDown---- method String::equal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "v2", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_string_equal" g_string_equal :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Ptr String -> -- v2 : TInterface "GLib" "String"- IO CInt---stringEqual ::- (MonadIO m) =>- String -- _obj- -> String -- v2- -> m Bool -- result-stringEqual _obj v2 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let v2' = unsafeManagedPtrGetPtr v2- result <- g_string_equal _obj' v2'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr v2- return result'--data StringEqualMethodInfo-instance (signature ~ (String -> m Bool), MonadIO m) => MethodInfo StringEqualMethodInfo String signature where- overloadedMethod _ = stringEqual---- method String::erase--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_erase" g_string_erase :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Int64 -> -- pos : TBasicType TInt64- Int64 -> -- len : TBasicType TInt64- IO (Ptr String)---stringErase ::- (MonadIO m) =>- String -- _obj- -> Int64 -- pos- -> Int64 -- len- -> m String -- result-stringErase _obj pos len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_erase _obj' pos len- checkUnexpectedReturnNULL "g_string_erase" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringEraseMethodInfo-instance (signature ~ (Int64 -> Int64 -> m String), MonadIO m) => MethodInfo StringEraseMethodInfo String signature where- overloadedMethod _ = stringErase---- method String::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "free_segment", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_string_free" g_string_free :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CInt -> -- free_segment : TBasicType TBoolean- IO CString---stringFree ::- (MonadIO m) =>- String -- _obj- -> Bool -- freeSegment- -> m (Maybe T.Text) -- result-stringFree _obj freeSegment = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let freeSegment' = (fromIntegral . fromEnum) freeSegment- result <- g_string_free _obj' freeSegment'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- cstringToText result'- freeMem result'- return result''- touchManagedPtr _obj- return maybeResult--data StringFreeMethodInfo-instance (signature ~ (Bool -> m (Maybe T.Text)), MonadIO m) => MethodInfo StringFreeMethodInfo String signature where- overloadedMethod _ = stringFree---- method String::free_to_bytes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Bytes")--- throws : False--- Skip return : False--foreign import ccall "g_string_free_to_bytes" g_string_free_to_bytes :: - Ptr String -> -- _obj : TInterface "GLib" "String"- IO (Ptr Bytes)---stringFreeToBytes ::- (MonadIO m) =>- String -- _obj- -> m Bytes -- result-stringFreeToBytes _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_free_to_bytes _obj'- checkUnexpectedReturnNULL "g_string_free_to_bytes" result- result' <- (wrapBoxed Bytes) result- touchManagedPtr _obj- return result'--data StringFreeToBytesMethodInfo-instance (signature ~ (m Bytes), MonadIO m) => MethodInfo StringFreeToBytesMethodInfo String signature where- overloadedMethod _ = stringFreeToBytes---- method String::hash--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_string_hash" g_string_hash :: - Ptr String -> -- _obj : TInterface "GLib" "String"- IO Word32---stringHash ::- (MonadIO m) =>- String -- _obj- -> m Word32 -- result-stringHash _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_hash _obj'- touchManagedPtr _obj- return result--data StringHashMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo StringHashMethodInfo String signature where- overloadedMethod _ = stringHash---- method String::insert--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_insert" g_string_insert :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Int64 -> -- pos : TBasicType TInt64- CString -> -- val : TBasicType TUTF8- IO (Ptr String)---stringInsert ::- (MonadIO m) =>- String -- _obj- -> Int64 -- pos- -> T.Text -- val- -> m String -- result-stringInsert _obj pos val = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_insert _obj' pos val'- checkUnexpectedReturnNULL "g_string_insert" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringInsertMethodInfo-instance (signature ~ (Int64 -> T.Text -> m String), MonadIO m) => MethodInfo StringInsertMethodInfo String signature where- overloadedMethod _ = stringInsert---- method String::insert_c--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "c", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_insert_c" g_string_insert_c :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Int64 -> -- pos : TBasicType TInt64- Int8 -> -- c : TBasicType TInt8- IO (Ptr String)---stringInsertC ::- (MonadIO m) =>- String -- _obj- -> Int64 -- pos- -> Int8 -- c- -> m String -- result-stringInsertC _obj pos c = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_insert_c _obj' pos c- checkUnexpectedReturnNULL "g_string_insert_c" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringInsertCMethodInfo-instance (signature ~ (Int64 -> Int8 -> m String), MonadIO m) => MethodInfo StringInsertCMethodInfo String signature where- overloadedMethod _ = stringInsertC---- method String::insert_len--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_insert_len" g_string_insert_len :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Int64 -> -- pos : TBasicType TInt64- CString -> -- val : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO (Ptr String)---stringInsertLen ::- (MonadIO m) =>- String -- _obj- -> Int64 -- pos- -> T.Text -- val- -> Int64 -- len- -> m String -- result-stringInsertLen _obj pos val len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_insert_len _obj' pos val' len- checkUnexpectedReturnNULL "g_string_insert_len" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringInsertLenMethodInfo-instance (signature ~ (Int64 -> T.Text -> Int64 -> m String), MonadIO m) => MethodInfo StringInsertLenMethodInfo String signature where- overloadedMethod _ = stringInsertLen---- method String::insert_unichar--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "wc", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_insert_unichar" g_string_insert_unichar :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Int64 -> -- pos : TBasicType TInt64- CInt -> -- wc : TBasicType TUniChar- IO (Ptr String)---stringInsertUnichar ::- (MonadIO m) =>- String -- _obj- -> Int64 -- pos- -> Char -- wc- -> m String -- result-stringInsertUnichar _obj pos wc = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let wc' = (fromIntegral . ord) wc- result <- g_string_insert_unichar _obj' pos wc'- checkUnexpectedReturnNULL "g_string_insert_unichar" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringInsertUnicharMethodInfo-instance (signature ~ (Int64 -> Char -> m String), MonadIO m) => MethodInfo StringInsertUnicharMethodInfo String signature where- overloadedMethod _ = stringInsertUnichar---- method String::overwrite--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_overwrite" g_string_overwrite :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Word64 -> -- pos : TBasicType TUInt64- CString -> -- val : TBasicType TUTF8- IO (Ptr String)---stringOverwrite ::- (MonadIO m) =>- String -- _obj- -> Word64 -- pos- -> T.Text -- val- -> m String -- result-stringOverwrite _obj pos val = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_overwrite _obj' pos val'- checkUnexpectedReturnNULL "g_string_overwrite" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringOverwriteMethodInfo-instance (signature ~ (Word64 -> T.Text -> m String), MonadIO m) => MethodInfo StringOverwriteMethodInfo String signature where- overloadedMethod _ = stringOverwrite---- method String::overwrite_len--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_overwrite_len" g_string_overwrite_len :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Word64 -> -- pos : TBasicType TUInt64- CString -> -- val : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO (Ptr String)---stringOverwriteLen ::- (MonadIO m) =>- String -- _obj- -> Word64 -- pos- -> T.Text -- val- -> Int64 -- len- -> m String -- result-stringOverwriteLen _obj pos val len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_overwrite_len _obj' pos val' len- checkUnexpectedReturnNULL "g_string_overwrite_len" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringOverwriteLenMethodInfo-instance (signature ~ (Word64 -> T.Text -> Int64 -> m String), MonadIO m) => MethodInfo StringOverwriteLenMethodInfo String signature where- overloadedMethod _ = stringOverwriteLen---- method String::prepend--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_prepend" g_string_prepend :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CString -> -- val : TBasicType TUTF8- IO (Ptr String)---stringPrepend ::- (MonadIO m) =>- String -- _obj- -> T.Text -- val- -> m String -- result-stringPrepend _obj val = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_prepend _obj' val'- checkUnexpectedReturnNULL "g_string_prepend" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringPrependMethodInfo-instance (signature ~ (T.Text -> m String), MonadIO m) => MethodInfo StringPrependMethodInfo String signature where- overloadedMethod _ = stringPrepend---- method String::prepend_c--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "c", argType = TBasicType TInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_prepend_c" g_string_prepend_c :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Int8 -> -- c : TBasicType TInt8- IO (Ptr String)---stringPrependC ::- (MonadIO m) =>- String -- _obj- -> Int8 -- c- -> m String -- result-stringPrependC _obj c = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_prepend_c _obj' c- checkUnexpectedReturnNULL "g_string_prepend_c" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringPrependCMethodInfo-instance (signature ~ (Int8 -> m String), MonadIO m) => MethodInfo StringPrependCMethodInfo String signature where- overloadedMethod _ = stringPrependC---- method String::prepend_len--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "val", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_prepend_len" g_string_prepend_len :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CString -> -- val : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO (Ptr String)---stringPrependLen ::- (MonadIO m) =>- String -- _obj- -> T.Text -- val- -> Int64 -- len- -> m String -- result-stringPrependLen _obj val len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- val' <- textToCString val- result <- g_string_prepend_len _obj' val' len- checkUnexpectedReturnNULL "g_string_prepend_len" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- freeMem val'- return result'--data StringPrependLenMethodInfo-instance (signature ~ (T.Text -> Int64 -> m String), MonadIO m) => MethodInfo StringPrependLenMethodInfo String signature where- overloadedMethod _ = stringPrependLen---- method String::prepend_unichar--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "wc", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_prepend_unichar" g_string_prepend_unichar :: - Ptr String -> -- _obj : TInterface "GLib" "String"- CInt -> -- wc : TBasicType TUniChar- IO (Ptr String)---stringPrependUnichar ::- (MonadIO m) =>- String -- _obj- -> Char -- wc- -> m String -- result-stringPrependUnichar _obj wc = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let wc' = (fromIntegral . ord) wc- result <- g_string_prepend_unichar _obj' wc'- checkUnexpectedReturnNULL "g_string_prepend_unichar" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringPrependUnicharMethodInfo-instance (signature ~ (Char -> m String), MonadIO m) => MethodInfo StringPrependUnicharMethodInfo String signature where- overloadedMethod _ = stringPrependUnichar---- method String::set_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_set_size" g_string_set_size :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Word64 -> -- len : TBasicType TUInt64- IO (Ptr String)---stringSetSize ::- (MonadIO m) =>- String -- _obj- -> Word64 -- len- -> m String -- result-stringSetSize _obj len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_set_size _obj' len- checkUnexpectedReturnNULL "g_string_set_size" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringSetSizeMethodInfo-instance (signature ~ (Word64 -> m String), MonadIO m) => MethodInfo StringSetSizeMethodInfo String signature where- overloadedMethod _ = stringSetSize---- method String::truncate--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_truncate" g_string_truncate :: - Ptr String -> -- _obj : TInterface "GLib" "String"- Word64 -> -- len : TBasicType TUInt64- IO (Ptr String)---stringTruncate ::- (MonadIO m) =>- String -- _obj- -> Word64 -- len- -> m String -- result-stringTruncate _obj len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_truncate _obj' len- checkUnexpectedReturnNULL "g_string_truncate" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringTruncateMethodInfo-instance (signature ~ (Word64 -> m String), MonadIO m) => MethodInfo StringTruncateMethodInfo String signature where- overloadedMethod _ = stringTruncate---- method String::up--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "String", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "String")--- throws : False--- Skip return : False--foreign import ccall "g_string_up" g_string_up :: - Ptr String -> -- _obj : TInterface "GLib" "String"- IO (Ptr String)--{-# DEPRECATED stringUp ["(Since version 2.2)","This function uses the locale-specific"," toupper() function, which is almost never the right thing."," Use g_string_ascii_up() or g_utf8_strup() instead."]#-}-stringUp ::- (MonadIO m) =>- String -- _obj- -> m String -- result-stringUp _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_string_up _obj'- checkUnexpectedReturnNULL "g_string_up" result- result' <- (wrapBoxed String) result- touchManagedPtr _obj- return result'--data StringUpMethodInfo-instance (signature ~ (m String), MonadIO m) => MethodInfo StringUpMethodInfo String signature where- overloadedMethod _ = stringUp--type family ResolveStringMethod (t :: Symbol) (o :: *) :: * where- ResolveStringMethod "append" o = StringAppendMethodInfo- ResolveStringMethod "appendC" o = StringAppendCMethodInfo- ResolveStringMethod "appendLen" o = StringAppendLenMethodInfo- ResolveStringMethod "appendUnichar" o = StringAppendUnicharMethodInfo- ResolveStringMethod "appendUriEscaped" o = StringAppendUriEscapedMethodInfo- ResolveStringMethod "asciiDown" o = StringAsciiDownMethodInfo- ResolveStringMethod "asciiUp" o = StringAsciiUpMethodInfo- ResolveStringMethod "assign" o = StringAssignMethodInfo- ResolveStringMethod "down" o = StringDownMethodInfo- ResolveStringMethod "equal" o = StringEqualMethodInfo- ResolveStringMethod "erase" o = StringEraseMethodInfo- ResolveStringMethod "free" o = StringFreeMethodInfo- ResolveStringMethod "freeToBytes" o = StringFreeToBytesMethodInfo- ResolveStringMethod "hash" o = StringHashMethodInfo- ResolveStringMethod "insert" o = StringInsertMethodInfo- ResolveStringMethod "insertC" o = StringInsertCMethodInfo- ResolveStringMethod "insertLen" o = StringInsertLenMethodInfo- ResolveStringMethod "insertUnichar" o = StringInsertUnicharMethodInfo- ResolveStringMethod "overwrite" o = StringOverwriteMethodInfo- ResolveStringMethod "overwriteLen" o = StringOverwriteLenMethodInfo- ResolveStringMethod "prepend" o = StringPrependMethodInfo- ResolveStringMethod "prependC" o = StringPrependCMethodInfo- ResolveStringMethod "prependLen" o = StringPrependLenMethodInfo- ResolveStringMethod "prependUnichar" o = StringPrependUnicharMethodInfo- ResolveStringMethod "truncate" o = StringTruncateMethodInfo- ResolveStringMethod "up" o = StringUpMethodInfo- ResolveStringMethod "setSize" o = StringSetSizeMethodInfo- ResolveStringMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveStringMethod t String, MethodInfo info String p) => IsLabelProxy t (String -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveStringMethod t String, MethodInfo info String p) => IsLabel t (String -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/String.hs-boot
@@ -1,38 +0,0 @@-module GI.GLib.Structs.String where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype String = String (ForeignPtr String)-instance BoxedObject String where-data StringAppendMethodInfo-data StringAppendCMethodInfo-data StringAppendLenMethodInfo-data StringAppendUnicharMethodInfo-data StringAppendUriEscapedMethodInfo-data StringAsciiDownMethodInfo-data StringAsciiUpMethodInfo-data StringAssignMethodInfo-data StringDownMethodInfo-data StringEqualMethodInfo-data StringEraseMethodInfo-data StringFreeMethodInfo-data StringFreeToBytesMethodInfo-data StringHashMethodInfo-data StringInsertMethodInfo-data StringInsertCMethodInfo-data StringInsertLenMethodInfo-data StringInsertUnicharMethodInfo-data StringOverwriteMethodInfo-data StringOverwriteLenMethodInfo-data StringPrependMethodInfo-data StringPrependCMethodInfo-data StringPrependLenMethodInfo-data StringPrependUnicharMethodInfo-data StringSetSizeMethodInfo-data StringTruncateMethodInfo-data StringUpMethodInfo
− GI/GLib/Structs/StringChunk.hs
@@ -1,248 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--An opaque data structure representing String Chunks.-It should only be accessed by using the following functions.--}--module GI.GLib.Structs.StringChunk- ( ---- * Exported types- StringChunk(..) ,- noStringChunk ,--- -- * Methods--- ** stringChunkClear- StringChunkClearMethodInfo ,- stringChunkClear ,----- ** stringChunkFree- StringChunkFreeMethodInfo ,- stringChunkFree ,----- ** stringChunkInsert- StringChunkInsertMethodInfo ,- stringChunkInsert ,----- ** stringChunkInsertConst- StringChunkInsertConstMethodInfo ,- stringChunkInsertConst ,----- ** stringChunkInsertLen- StringChunkInsertLenMethodInfo ,- stringChunkInsertLen ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype StringChunk = StringChunk (ForeignPtr StringChunk)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr StringChunk where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noStringChunk :: Maybe StringChunk-noStringChunk = Nothing---type instance AttributeList StringChunk = StringChunkAttributeList-type StringChunkAttributeList = ('[ ] :: [(Symbol, *)])---- method StringChunk::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "StringChunk", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_string_chunk_clear" g_string_chunk_clear :: - Ptr StringChunk -> -- _obj : TInterface "GLib" "StringChunk"- IO ()---stringChunkClear ::- (MonadIO m) =>- StringChunk -- _obj- -> m () -- result-stringChunkClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_string_chunk_clear _obj'- touchManagedPtr _obj- return ()--data StringChunkClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo StringChunkClearMethodInfo StringChunk signature where- overloadedMethod _ = stringChunkClear---- method StringChunk::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "StringChunk", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_string_chunk_free" g_string_chunk_free :: - Ptr StringChunk -> -- _obj : TInterface "GLib" "StringChunk"- IO ()---stringChunkFree ::- (MonadIO m) =>- StringChunk -- _obj- -> m () -- result-stringChunkFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_string_chunk_free _obj'- touchManagedPtr _obj- return ()--data StringChunkFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo StringChunkFreeMethodInfo StringChunk signature where- overloadedMethod _ = stringChunkFree---- method StringChunk::insert--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "StringChunk", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_string_chunk_insert" g_string_chunk_insert :: - Ptr StringChunk -> -- _obj : TInterface "GLib" "StringChunk"- CString -> -- string : TBasicType TUTF8- IO CString---stringChunkInsert ::- (MonadIO m) =>- StringChunk -- _obj- -> T.Text -- string- -> m T.Text -- result-stringChunkInsert _obj string = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- textToCString string- result <- g_string_chunk_insert _obj' string'- checkUnexpectedReturnNULL "g_string_chunk_insert" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem string'- return result'--data StringChunkInsertMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m) => MethodInfo StringChunkInsertMethodInfo StringChunk signature where- overloadedMethod _ = stringChunkInsert---- method StringChunk::insert_const--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "StringChunk", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_string_chunk_insert_const" g_string_chunk_insert_const :: - Ptr StringChunk -> -- _obj : TInterface "GLib" "StringChunk"- CString -> -- string : TBasicType TUTF8- IO CString---stringChunkInsertConst ::- (MonadIO m) =>- StringChunk -- _obj- -> T.Text -- string- -> m T.Text -- result-stringChunkInsertConst _obj string = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- textToCString string- result <- g_string_chunk_insert_const _obj' string'- checkUnexpectedReturnNULL "g_string_chunk_insert_const" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem string'- return result'--data StringChunkInsertConstMethodInfo-instance (signature ~ (T.Text -> m T.Text), MonadIO m) => MethodInfo StringChunkInsertConstMethodInfo StringChunk signature where- overloadedMethod _ = stringChunkInsertConst---- method StringChunk::insert_len--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "StringChunk", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_string_chunk_insert_len" g_string_chunk_insert_len :: - Ptr StringChunk -> -- _obj : TInterface "GLib" "StringChunk"- CString -> -- string : TBasicType TUTF8- Int64 -> -- len : TBasicType TInt64- IO CString---stringChunkInsertLen ::- (MonadIO m) =>- StringChunk -- _obj- -> T.Text -- string- -> Int64 -- len- -> m T.Text -- result-stringChunkInsertLen _obj string len = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- string' <- textToCString string- result <- g_string_chunk_insert_len _obj' string' len- checkUnexpectedReturnNULL "g_string_chunk_insert_len" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- freeMem string'- return result'--data StringChunkInsertLenMethodInfo-instance (signature ~ (T.Text -> Int64 -> m T.Text), MonadIO m) => MethodInfo StringChunkInsertLenMethodInfo StringChunk signature where- overloadedMethod _ = stringChunkInsertLen--type family ResolveStringChunkMethod (t :: Symbol) (o :: *) :: * where- ResolveStringChunkMethod "clear" o = StringChunkClearMethodInfo- ResolveStringChunkMethod "free" o = StringChunkFreeMethodInfo- ResolveStringChunkMethod "insert" o = StringChunkInsertMethodInfo- ResolveStringChunkMethod "insertConst" o = StringChunkInsertConstMethodInfo- ResolveStringChunkMethod "insertLen" o = StringChunkInsertLenMethodInfo- ResolveStringChunkMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveStringChunkMethod t StringChunk, MethodInfo info StringChunk p) => IsLabelProxy t (StringChunk -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveStringChunkMethod t StringChunk, MethodInfo info StringChunk p) => IsLabel t (StringChunk -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/StringChunk.hs-boot
@@ -1,16 +0,0 @@-module GI.GLib.Structs.StringChunk where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype StringChunk = StringChunk (ForeignPtr StringChunk)-instance WrappedPtr StringChunk where-data StringChunkClearMethodInfo-data StringChunkFreeMethodInfo-data StringChunkInsertMethodInfo-data StringChunkInsertConstMethodInfo-data StringChunkInsertLenMethodInfo
− GI/GLib/Structs/TestCase.hs
@@ -1,56 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--An opaque structure representing a test case.--}--module GI.GLib.Structs.TestCase- ( ---- * Exported types- TestCase(..) ,- noTestCase ,--- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TestCase = TestCase (ForeignPtr TestCase)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr TestCase where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noTestCase :: Maybe TestCase-noTestCase = Nothing---type instance AttributeList TestCase = TestCaseAttributeList-type TestCaseAttributeList = ('[ ] :: [(Symbol, *)])--type family ResolveTestCaseMethod (t :: Symbol) (o :: *) :: * where- ResolveTestCaseMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTestCaseMethod t TestCase, MethodInfo info TestCase p) => IsLabelProxy t (TestCase -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTestCaseMethod t TestCase, MethodInfo info TestCase p) => IsLabel t (TestCase -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TestCase.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.TestCase where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TestCase = TestCase (ForeignPtr TestCase)-instance WrappedPtr TestCase where
− GI/GLib/Structs/TestConfig.hs
@@ -1,266 +0,0 @@---{- |-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.GLib.Structs.TestConfig- ( ---- * Exported types- TestConfig(..) ,- newZeroTestConfig ,- noTestConfig ,--- -- * Properties--- ** TestInitialized- testConfigReadTestInitialized ,- testConfigTestInitialized ,- testConfigWriteTestInitialized ,----- ** TestPerf- testConfigReadTestPerf ,- testConfigTestPerf ,- testConfigWriteTestPerf ,----- ** TestQuick- testConfigReadTestQuick ,- testConfigTestQuick ,- testConfigWriteTestQuick ,----- ** TestQuiet- testConfigReadTestQuiet ,- testConfigTestQuiet ,- testConfigWriteTestQuiet ,----- ** TestUndefined- testConfigReadTestUndefined ,- testConfigTestUndefined ,- testConfigWriteTestUndefined ,----- ** TestVerbose- testConfigReadTestVerbose ,- testConfigTestVerbose ,- testConfigWriteTestVerbose ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TestConfig = TestConfig (ForeignPtr TestConfig)-instance WrappedPtr TestConfig where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = copyPtr 24- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `TestConfig` struct initialized to zero.-newZeroTestConfig :: MonadIO m => m TestConfig-newZeroTestConfig = liftIO $ wrappedPtrCalloc >>= wrapPtr TestConfig--instance tag ~ 'AttrSet => Constructible TestConfig tag where- new _ attrs = do- o <- newZeroTestConfig- GI.Attributes.set o attrs- return o---noTestConfig :: Maybe TestConfig-noTestConfig = Nothing--testConfigReadTestInitialized :: MonadIO m => TestConfig -> m Bool-testConfigReadTestInitialized s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CInt- let val' = (/= 0) val- return val'--testConfigWriteTestInitialized :: MonadIO m => TestConfig -> Bool -> m ()-testConfigWriteTestInitialized s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 0) (val' :: CInt)--data TestConfigTestInitializedFieldInfo-instance AttrInfo TestConfigTestInitializedFieldInfo where- type AttrAllowedOps TestConfigTestInitializedFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestConfigTestInitializedFieldInfo = (~) Bool- type AttrBaseTypeConstraint TestConfigTestInitializedFieldInfo = (~) TestConfig- type AttrGetType TestConfigTestInitializedFieldInfo = Bool- type AttrLabel TestConfigTestInitializedFieldInfo = "test_initialized"- attrGet _ = testConfigReadTestInitialized- attrSet _ = testConfigWriteTestInitialized- attrConstruct = undefined- attrClear _ = undefined--testConfigTestInitialized :: AttrLabelProxy "testInitialized"-testConfigTestInitialized = AttrLabelProxy---testConfigReadTestQuick :: MonadIO m => TestConfig -> m Bool-testConfigReadTestQuick s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO CInt- let val' = (/= 0) val- return val'--testConfigWriteTestQuick :: MonadIO m => TestConfig -> Bool -> m ()-testConfigWriteTestQuick s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 4) (val' :: CInt)--data TestConfigTestQuickFieldInfo-instance AttrInfo TestConfigTestQuickFieldInfo where- type AttrAllowedOps TestConfigTestQuickFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestConfigTestQuickFieldInfo = (~) Bool- type AttrBaseTypeConstraint TestConfigTestQuickFieldInfo = (~) TestConfig- type AttrGetType TestConfigTestQuickFieldInfo = Bool- type AttrLabel TestConfigTestQuickFieldInfo = "test_quick"- attrGet _ = testConfigReadTestQuick- attrSet _ = testConfigWriteTestQuick- attrConstruct = undefined- attrClear _ = undefined--testConfigTestQuick :: AttrLabelProxy "testQuick"-testConfigTestQuick = AttrLabelProxy---testConfigReadTestPerf :: MonadIO m => TestConfig -> m Bool-testConfigReadTestPerf s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CInt- let val' = (/= 0) val- return val'--testConfigWriteTestPerf :: MonadIO m => TestConfig -> Bool -> m ()-testConfigWriteTestPerf s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 8) (val' :: CInt)--data TestConfigTestPerfFieldInfo-instance AttrInfo TestConfigTestPerfFieldInfo where- type AttrAllowedOps TestConfigTestPerfFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestConfigTestPerfFieldInfo = (~) Bool- type AttrBaseTypeConstraint TestConfigTestPerfFieldInfo = (~) TestConfig- type AttrGetType TestConfigTestPerfFieldInfo = Bool- type AttrLabel TestConfigTestPerfFieldInfo = "test_perf"- attrGet _ = testConfigReadTestPerf- attrSet _ = testConfigWriteTestPerf- attrConstruct = undefined- attrClear _ = undefined--testConfigTestPerf :: AttrLabelProxy "testPerf"-testConfigTestPerf = AttrLabelProxy---testConfigReadTestVerbose :: MonadIO m => TestConfig -> m Bool-testConfigReadTestVerbose s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO CInt- let val' = (/= 0) val- return val'--testConfigWriteTestVerbose :: MonadIO m => TestConfig -> Bool -> m ()-testConfigWriteTestVerbose s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 12) (val' :: CInt)--data TestConfigTestVerboseFieldInfo-instance AttrInfo TestConfigTestVerboseFieldInfo where- type AttrAllowedOps TestConfigTestVerboseFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestConfigTestVerboseFieldInfo = (~) Bool- type AttrBaseTypeConstraint TestConfigTestVerboseFieldInfo = (~) TestConfig- type AttrGetType TestConfigTestVerboseFieldInfo = Bool- type AttrLabel TestConfigTestVerboseFieldInfo = "test_verbose"- attrGet _ = testConfigReadTestVerbose- attrSet _ = testConfigWriteTestVerbose- attrConstruct = undefined- attrClear _ = undefined--testConfigTestVerbose :: AttrLabelProxy "testVerbose"-testConfigTestVerbose = AttrLabelProxy---testConfigReadTestQuiet :: MonadIO m => TestConfig -> m Bool-testConfigReadTestQuiet s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CInt- let val' = (/= 0) val- return val'--testConfigWriteTestQuiet :: MonadIO m => TestConfig -> Bool -> m ()-testConfigWriteTestQuiet s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 16) (val' :: CInt)--data TestConfigTestQuietFieldInfo-instance AttrInfo TestConfigTestQuietFieldInfo where- type AttrAllowedOps TestConfigTestQuietFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestConfigTestQuietFieldInfo = (~) Bool- type AttrBaseTypeConstraint TestConfigTestQuietFieldInfo = (~) TestConfig- type AttrGetType TestConfigTestQuietFieldInfo = Bool- type AttrLabel TestConfigTestQuietFieldInfo = "test_quiet"- attrGet _ = testConfigReadTestQuiet- attrSet _ = testConfigWriteTestQuiet- attrConstruct = undefined- attrClear _ = undefined--testConfigTestQuiet :: AttrLabelProxy "testQuiet"-testConfigTestQuiet = AttrLabelProxy---testConfigReadTestUndefined :: MonadIO m => TestConfig -> m Bool-testConfigReadTestUndefined s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 20) :: IO CInt- let val' = (/= 0) val- return val'--testConfigWriteTestUndefined :: MonadIO m => TestConfig -> Bool -> m ()-testConfigWriteTestUndefined s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 20) (val' :: CInt)--data TestConfigTestUndefinedFieldInfo-instance AttrInfo TestConfigTestUndefinedFieldInfo where- type AttrAllowedOps TestConfigTestUndefinedFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestConfigTestUndefinedFieldInfo = (~) Bool- type AttrBaseTypeConstraint TestConfigTestUndefinedFieldInfo = (~) TestConfig- type AttrGetType TestConfigTestUndefinedFieldInfo = Bool- type AttrLabel TestConfigTestUndefinedFieldInfo = "test_undefined"- attrGet _ = testConfigReadTestUndefined- attrSet _ = testConfigWriteTestUndefined- attrConstruct = undefined- attrClear _ = undefined--testConfigTestUndefined :: AttrLabelProxy "testUndefined"-testConfigTestUndefined = AttrLabelProxy----type instance AttributeList TestConfig = TestConfigAttributeList-type TestConfigAttributeList = ('[ '("testInitialized", TestConfigTestInitializedFieldInfo), '("testQuick", TestConfigTestQuickFieldInfo), '("testPerf", TestConfigTestPerfFieldInfo), '("testVerbose", TestConfigTestVerboseFieldInfo), '("testQuiet", TestConfigTestQuietFieldInfo), '("testUndefined", TestConfigTestUndefinedFieldInfo)] :: [(Symbol, *)])--type family ResolveTestConfigMethod (t :: Symbol) (o :: *) :: * where- ResolveTestConfigMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTestConfigMethod t TestConfig, MethodInfo info TestConfig p) => IsLabelProxy t (TestConfig -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTestConfigMethod t TestConfig, MethodInfo info TestConfig p) => IsLabel t (TestConfig -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TestConfig.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.TestConfig where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TestConfig = TestConfig (ForeignPtr TestConfig)-instance WrappedPtr TestConfig where
− GI/GLib/Structs/TestLogBuffer.hs
@@ -1,138 +0,0 @@---{- |-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.GLib.Structs.TestLogBuffer- ( ---- * Exported types- TestLogBuffer(..) ,- newZeroTestLogBuffer ,- noTestLogBuffer ,--- -- * Methods--- ** testLogBufferFree- TestLogBufferFreeMethodInfo ,- testLogBufferFree ,----- ** testLogBufferPush- TestLogBufferPushMethodInfo ,- testLogBufferPush ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TestLogBuffer = TestLogBuffer (ForeignPtr TestLogBuffer)-instance WrappedPtr TestLogBuffer where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = copyPtr 16- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `TestLogBuffer` struct initialized to zero.-newZeroTestLogBuffer :: MonadIO m => m TestLogBuffer-newZeroTestLogBuffer = liftIO $ wrappedPtrCalloc >>= wrapPtr TestLogBuffer--instance tag ~ 'AttrSet => Constructible TestLogBuffer tag where- new _ attrs = do- o <- newZeroTestLogBuffer- GI.Attributes.set o attrs- return o---noTestLogBuffer :: Maybe TestLogBuffer-noTestLogBuffer = Nothing---type instance AttributeList TestLogBuffer = TestLogBufferAttributeList-type TestLogBufferAttributeList = ('[ ] :: [(Symbol, *)])---- method TestLogBuffer::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TestLogBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_log_buffer_free" g_test_log_buffer_free :: - Ptr TestLogBuffer -> -- _obj : TInterface "GLib" "TestLogBuffer"- IO ()---testLogBufferFree ::- (MonadIO m) =>- TestLogBuffer -- _obj- -> m () -- result-testLogBufferFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_test_log_buffer_free _obj'- touchManagedPtr _obj- return ()--data TestLogBufferFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TestLogBufferFreeMethodInfo TestLogBuffer signature where- overloadedMethod _ = testLogBufferFree---- method TestLogBuffer::push--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TestLogBuffer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_bytes", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes", argType = TBasicType TUInt8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_log_buffer_push" g_test_log_buffer_push :: - Ptr TestLogBuffer -> -- _obj : TInterface "GLib" "TestLogBuffer"- Word32 -> -- n_bytes : TBasicType TUInt- Word8 -> -- bytes : TBasicType TUInt8- IO ()---testLogBufferPush ::- (MonadIO m) =>- TestLogBuffer -- _obj- -> Word32 -- nBytes- -> Word8 -- bytes- -> m () -- result-testLogBufferPush _obj nBytes bytes = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_test_log_buffer_push _obj' nBytes bytes- touchManagedPtr _obj- return ()--data TestLogBufferPushMethodInfo-instance (signature ~ (Word32 -> Word8 -> m ()), MonadIO m) => MethodInfo TestLogBufferPushMethodInfo TestLogBuffer signature where- overloadedMethod _ = testLogBufferPush--type family ResolveTestLogBufferMethod (t :: Symbol) (o :: *) :: * where- ResolveTestLogBufferMethod "free" o = TestLogBufferFreeMethodInfo- ResolveTestLogBufferMethod "push" o = TestLogBufferPushMethodInfo- ResolveTestLogBufferMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTestLogBufferMethod t TestLogBuffer, MethodInfo info TestLogBuffer p) => IsLabelProxy t (TestLogBuffer -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTestLogBufferMethod t TestLogBuffer, MethodInfo info TestLogBuffer p) => IsLabel t (TestLogBuffer -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TestLogBuffer.hs-boot
@@ -1,13 +0,0 @@-module GI.GLib.Structs.TestLogBuffer where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TestLogBuffer = TestLogBuffer (ForeignPtr TestLogBuffer)-instance WrappedPtr TestLogBuffer where-data TestLogBufferFreeMethodInfo-data TestLogBufferPushMethodInfo
− GI/GLib/Structs/TestLogMsg.hs
@@ -1,269 +0,0 @@---{- |-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.GLib.Structs.TestLogMsg- ( ---- * Exported types- TestLogMsg(..) ,- newZeroTestLogMsg ,- noTestLogMsg ,--- -- * Methods--- ** testLogMsgFree- TestLogMsgFreeMethodInfo ,- testLogMsgFree ,----- -- * Properties--- ** LogType- testLogMsgLogType ,- testLogMsgReadLogType ,- testLogMsgWriteLogType ,----- ** NNums- testLogMsgNNums ,- testLogMsgReadNNums ,- testLogMsgWriteNNums ,----- ** NStrings- testLogMsgNStrings ,- testLogMsgReadNStrings ,- testLogMsgWriteNStrings ,----- ** Nums- testLogMsgNums ,- testLogMsgReadNums ,- testLogMsgWriteNums ,----- ** Strings- testLogMsgClearStrings ,- testLogMsgReadStrings ,- testLogMsgStrings ,- testLogMsgWriteStrings ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TestLogMsg = TestLogMsg (ForeignPtr TestLogMsg)-instance WrappedPtr TestLogMsg where- wrappedPtrCalloc = callocBytes 32- wrappedPtrCopy = copyPtr 32- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `TestLogMsg` struct initialized to zero.-newZeroTestLogMsg :: MonadIO m => m TestLogMsg-newZeroTestLogMsg = liftIO $ wrappedPtrCalloc >>= wrapPtr TestLogMsg--instance tag ~ 'AttrSet => Constructible TestLogMsg tag where- new _ attrs = do- o <- newZeroTestLogMsg- GI.Attributes.set o attrs- return o---noTestLogMsg :: Maybe TestLogMsg-noTestLogMsg = Nothing--testLogMsgReadLogType :: MonadIO m => TestLogMsg -> m TestLogType-testLogMsgReadLogType s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CUInt- let val' = (toEnum . fromIntegral) val- return val'--testLogMsgWriteLogType :: MonadIO m => TestLogMsg -> TestLogType -> m ()-testLogMsgWriteLogType s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 0) (val' :: CUInt)--data TestLogMsgLogTypeFieldInfo-instance AttrInfo TestLogMsgLogTypeFieldInfo where- type AttrAllowedOps TestLogMsgLogTypeFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestLogMsgLogTypeFieldInfo = (~) TestLogType- type AttrBaseTypeConstraint TestLogMsgLogTypeFieldInfo = (~) TestLogMsg- type AttrGetType TestLogMsgLogTypeFieldInfo = TestLogType- type AttrLabel TestLogMsgLogTypeFieldInfo = "log_type"- attrGet _ = testLogMsgReadLogType- attrSet _ = testLogMsgWriteLogType- attrConstruct = undefined- attrClear _ = undefined--testLogMsgLogType :: AttrLabelProxy "logType"-testLogMsgLogType = AttrLabelProxy---testLogMsgReadNStrings :: MonadIO m => TestLogMsg -> m Word32-testLogMsgReadNStrings s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Word32- return val--testLogMsgWriteNStrings :: MonadIO m => TestLogMsg -> Word32 -> m ()-testLogMsgWriteNStrings s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Word32)--data TestLogMsgNStringsFieldInfo-instance AttrInfo TestLogMsgNStringsFieldInfo where- type AttrAllowedOps TestLogMsgNStringsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestLogMsgNStringsFieldInfo = (~) Word32- type AttrBaseTypeConstraint TestLogMsgNStringsFieldInfo = (~) TestLogMsg- type AttrGetType TestLogMsgNStringsFieldInfo = Word32- type AttrLabel TestLogMsgNStringsFieldInfo = "n_strings"- attrGet _ = testLogMsgReadNStrings- attrSet _ = testLogMsgWriteNStrings- attrConstruct = undefined- attrClear _ = undefined--testLogMsgNStrings :: AttrLabelProxy "nStrings"-testLogMsgNStrings = AttrLabelProxy---testLogMsgReadStrings :: MonadIO m => TestLogMsg -> m (Maybe T.Text)-testLogMsgReadStrings s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--testLogMsgWriteStrings :: MonadIO m => TestLogMsg -> CString -> m ()-testLogMsgWriteStrings s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: CString)--testLogMsgClearStrings :: MonadIO m => TestLogMsg -> m ()-testLogMsgClearStrings s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (nullPtr :: CString)--data TestLogMsgStringsFieldInfo-instance AttrInfo TestLogMsgStringsFieldInfo where- type AttrAllowedOps TestLogMsgStringsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint TestLogMsgStringsFieldInfo = (~) CString- type AttrBaseTypeConstraint TestLogMsgStringsFieldInfo = (~) TestLogMsg- type AttrGetType TestLogMsgStringsFieldInfo = Maybe T.Text- type AttrLabel TestLogMsgStringsFieldInfo = "strings"- attrGet _ = testLogMsgReadStrings- attrSet _ = testLogMsgWriteStrings- attrConstruct = undefined- attrClear _ = testLogMsgClearStrings--testLogMsgStrings :: AttrLabelProxy "strings"-testLogMsgStrings = AttrLabelProxy---testLogMsgReadNNums :: MonadIO m => TestLogMsg -> m Word32-testLogMsgReadNNums s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Word32- return val--testLogMsgWriteNNums :: MonadIO m => TestLogMsg -> Word32 -> m ()-testLogMsgWriteNNums s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Word32)--data TestLogMsgNNumsFieldInfo-instance AttrInfo TestLogMsgNNumsFieldInfo where- type AttrAllowedOps TestLogMsgNNumsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestLogMsgNNumsFieldInfo = (~) Word32- type AttrBaseTypeConstraint TestLogMsgNNumsFieldInfo = (~) TestLogMsg- type AttrGetType TestLogMsgNNumsFieldInfo = Word32- type AttrLabel TestLogMsgNNumsFieldInfo = "n_nums"- attrGet _ = testLogMsgReadNNums- attrSet _ = testLogMsgWriteNNums- attrConstruct = undefined- attrClear _ = undefined--testLogMsgNNums :: AttrLabelProxy "nNums"-testLogMsgNNums = AttrLabelProxy---testLogMsgReadNums :: MonadIO m => TestLogMsg -> m CLong-testLogMsgReadNums s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO CLong- return val--testLogMsgWriteNums :: MonadIO m => TestLogMsg -> CLong -> m ()-testLogMsgWriteNums s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: CLong)--data TestLogMsgNumsFieldInfo-instance AttrInfo TestLogMsgNumsFieldInfo where- type AttrAllowedOps TestLogMsgNumsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TestLogMsgNumsFieldInfo = (~) CLong- type AttrBaseTypeConstraint TestLogMsgNumsFieldInfo = (~) TestLogMsg- type AttrGetType TestLogMsgNumsFieldInfo = CLong- type AttrLabel TestLogMsgNumsFieldInfo = "nums"- attrGet _ = testLogMsgReadNums- attrSet _ = testLogMsgWriteNums- attrConstruct = undefined- attrClear _ = undefined--testLogMsgNums :: AttrLabelProxy "nums"-testLogMsgNums = AttrLabelProxy----type instance AttributeList TestLogMsg = TestLogMsgAttributeList-type TestLogMsgAttributeList = ('[ '("logType", TestLogMsgLogTypeFieldInfo), '("nStrings", TestLogMsgNStringsFieldInfo), '("strings", TestLogMsgStringsFieldInfo), '("nNums", TestLogMsgNNumsFieldInfo), '("nums", TestLogMsgNumsFieldInfo)] :: [(Symbol, *)])---- method TestLogMsg::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TestLogMsg", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_log_msg_free" g_test_log_msg_free :: - Ptr TestLogMsg -> -- _obj : TInterface "GLib" "TestLogMsg"- IO ()---testLogMsgFree ::- (MonadIO m) =>- TestLogMsg -- _obj- -> m () -- result-testLogMsgFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_test_log_msg_free _obj'- touchManagedPtr _obj- return ()--data TestLogMsgFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TestLogMsgFreeMethodInfo TestLogMsg signature where- overloadedMethod _ = testLogMsgFree--type family ResolveTestLogMsgMethod (t :: Symbol) (o :: *) :: * where- ResolveTestLogMsgMethod "free" o = TestLogMsgFreeMethodInfo- ResolveTestLogMsgMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTestLogMsgMethod t TestLogMsg, MethodInfo info TestLogMsg p) => IsLabelProxy t (TestLogMsg -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTestLogMsgMethod t TestLogMsg, MethodInfo info TestLogMsg p) => IsLabel t (TestLogMsg -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TestLogMsg.hs-boot
@@ -1,12 +0,0 @@-module GI.GLib.Structs.TestLogMsg where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TestLogMsg = TestLogMsg (ForeignPtr TestLogMsg)-instance WrappedPtr TestLogMsg where-data TestLogMsgFreeMethodInfo
− GI/GLib/Structs/TestSuite.hs
@@ -1,133 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--An opaque structure representing a test suite.--}--module GI.GLib.Structs.TestSuite- ( ---- * Exported types- TestSuite(..) ,- noTestSuite ,--- -- * Methods--- ** testSuiteAdd- TestSuiteAddMethodInfo ,- testSuiteAdd ,----- ** testSuiteAddSuite- TestSuiteAddSuiteMethodInfo ,- testSuiteAddSuite ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TestSuite = TestSuite (ForeignPtr TestSuite)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr TestSuite where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noTestSuite :: Maybe TestSuite-noTestSuite = Nothing---type instance AttributeList TestSuite = TestSuiteAttributeList-type TestSuiteAttributeList = ('[ ] :: [(Symbol, *)])---- method TestSuite::add--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TestSuite", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "test_case", argType = TInterface "GLib" "TestCase", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_suite_add" g_test_suite_add :: - Ptr TestSuite -> -- _obj : TInterface "GLib" "TestSuite"- Ptr TestCase -> -- test_case : TInterface "GLib" "TestCase"- IO ()---testSuiteAdd ::- (MonadIO m) =>- TestSuite -- _obj- -> TestCase -- testCase- -> m () -- result-testSuiteAdd _obj testCase = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let testCase' = unsafeManagedPtrGetPtr testCase- g_test_suite_add _obj' testCase'- touchManagedPtr _obj- touchManagedPtr testCase- return ()--data TestSuiteAddMethodInfo-instance (signature ~ (TestCase -> m ()), MonadIO m) => MethodInfo TestSuiteAddMethodInfo TestSuite signature where- overloadedMethod _ = testSuiteAdd---- method TestSuite::add_suite--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TestSuite", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nestedsuite", argType = TInterface "GLib" "TestSuite", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_test_suite_add_suite" g_test_suite_add_suite :: - Ptr TestSuite -> -- _obj : TInterface "GLib" "TestSuite"- Ptr TestSuite -> -- nestedsuite : TInterface "GLib" "TestSuite"- IO ()---testSuiteAddSuite ::- (MonadIO m) =>- TestSuite -- _obj- -> TestSuite -- nestedsuite- -> m () -- result-testSuiteAddSuite _obj nestedsuite = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let nestedsuite' = unsafeManagedPtrGetPtr nestedsuite- g_test_suite_add_suite _obj' nestedsuite'- touchManagedPtr _obj- touchManagedPtr nestedsuite- return ()--data TestSuiteAddSuiteMethodInfo-instance (signature ~ (TestSuite -> m ()), MonadIO m) => MethodInfo TestSuiteAddSuiteMethodInfo TestSuite signature where- overloadedMethod _ = testSuiteAddSuite--type family ResolveTestSuiteMethod (t :: Symbol) (o :: *) :: * where- ResolveTestSuiteMethod "add" o = TestSuiteAddMethodInfo- ResolveTestSuiteMethod "addSuite" o = TestSuiteAddSuiteMethodInfo- ResolveTestSuiteMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTestSuiteMethod t TestSuite, MethodInfo info TestSuite p) => IsLabelProxy t (TestSuite -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTestSuiteMethod t TestSuite, MethodInfo info TestSuite p) => IsLabel t (TestSuite -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TestSuite.hs-boot
@@ -1,13 +0,0 @@-module GI.GLib.Structs.TestSuite where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TestSuite = TestSuite (ForeignPtr TestSuite)-instance WrappedPtr TestSuite where-data TestSuiteAddMethodInfo-data TestSuiteAddSuiteMethodInfo
− GI/GLib/Structs/Thread.hs
@@ -1,235 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GThread struct represents a running thread. This struct-is returned by g_thread_new() or g_thread_try_new(). You can-obtain the #GThread struct representing the current thread by-calling g_thread_self().--GThread is refcounted, see g_thread_ref() and g_thread_unref().-The thread represented by it holds a reference while it is running,-and g_thread_join() consumes the reference that it is given, so-it is normally not necessary to manage GThread references-explicitly.--The structure is opaque -- none of its fields may be directly-accessed.--}--module GI.GLib.Structs.Thread- ( ---- * Exported types- Thread(..) ,- noThread ,--- -- * Methods--- ** threadErrorQuark- threadErrorQuark ,----- ** threadExit- threadExit ,----- ** threadRef- ThreadRefMethodInfo ,- threadRef ,----- ** threadSelf- threadSelf ,----- ** threadUnref- ThreadUnrefMethodInfo ,- threadUnref ,----- ** threadYield- threadYield ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Thread = Thread (ForeignPtr Thread)-foreign import ccall "g_thread_get_type" c_g_thread_get_type :: - IO GType--instance BoxedObject Thread where- boxedType _ = c_g_thread_get_type--noThread :: Maybe Thread-noThread = Nothing---type instance AttributeList Thread = ThreadAttributeList-type ThreadAttributeList = ('[ ] :: [(Symbol, *)])---- method Thread::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Thread", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "Thread")--- throws : False--- Skip return : False--foreign import ccall "g_thread_ref" g_thread_ref :: - Ptr Thread -> -- _obj : TInterface "GLib" "Thread"- IO (Ptr Thread)---threadRef ::- (MonadIO m) =>- Thread -- _obj- -> m Thread -- result-threadRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_thread_ref _obj'- checkUnexpectedReturnNULL "g_thread_ref" result- result' <- (wrapBoxed Thread) result- touchManagedPtr _obj- return result'--data ThreadRefMethodInfo-instance (signature ~ (m Thread), MonadIO m) => MethodInfo ThreadRefMethodInfo Thread signature where- overloadedMethod _ = threadRef---- method Thread::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Thread", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_thread_unref" g_thread_unref :: - Ptr Thread -> -- _obj : TInterface "GLib" "Thread"- IO ()---threadUnref ::- (MonadIO m) =>- Thread -- _obj- -> m () -- result-threadUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_thread_unref _obj'- touchManagedPtr _obj- return ()--data ThreadUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo ThreadUnrefMethodInfo Thread signature where- overloadedMethod _ = threadUnref---- method Thread::error_quark--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt32)--- throws : False--- Skip return : False--foreign import ccall "g_thread_error_quark" g_thread_error_quark :: - IO Word32---threadErrorQuark ::- (MonadIO m) =>- m Word32 -- result-threadErrorQuark = liftIO $ do- result <- g_thread_error_quark- return result---- method Thread::exit--- method type : MemberFunction--- Args : [Arg {argCName = "retval", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_thread_exit" g_thread_exit :: - Ptr () -> -- retval : TBasicType TPtr- IO ()---threadExit ::- (MonadIO m) =>- Ptr () -- retval- -> m () -- result-threadExit retval = liftIO $ do- g_thread_exit retval- return ()---- method Thread::self--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "Thread")--- throws : False--- Skip return : False--foreign import ccall "g_thread_self" g_thread_self :: - IO (Ptr Thread)---threadSelf ::- (MonadIO m) =>- m Thread -- result-threadSelf = liftIO $ do- result <- g_thread_self- checkUnexpectedReturnNULL "g_thread_self" result- result' <- (wrapBoxed Thread) result- return result'---- method Thread::yield--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_thread_yield" g_thread_yield :: - IO ()---threadYield ::- (MonadIO m) =>- m () -- result-threadYield = liftIO $ do- g_thread_yield- return ()--type family ResolveThreadMethod (t :: Symbol) (o :: *) :: * where- ResolveThreadMethod "ref" o = ThreadRefMethodInfo- ResolveThreadMethod "unref" o = ThreadUnrefMethodInfo- ResolveThreadMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveThreadMethod t Thread, MethodInfo info Thread p) => IsLabelProxy t (Thread -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveThreadMethod t Thread, MethodInfo info Thread p) => IsLabel t (Thread -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Thread.hs-boot
@@ -1,13 +0,0 @@-module GI.GLib.Structs.Thread where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Thread = Thread (ForeignPtr Thread)-instance BoxedObject Thread where-data ThreadRefMethodInfo-data ThreadUnrefMethodInfo
− GI/GLib/Structs/ThreadPool.hs
@@ -1,541 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The #GThreadPool struct represents a thread pool. It has three-public read-only members, but the underlying struct is bigger,-so you must not copy this struct.--}--module GI.GLib.Structs.ThreadPool- ( ---- * Exported types- ThreadPool(..) ,- newZeroThreadPool ,- noThreadPool ,--- -- * Methods--- ** threadPoolFree- ThreadPoolFreeMethodInfo ,- threadPoolFree ,----- ** threadPoolGetMaxIdleTime- threadPoolGetMaxIdleTime ,----- ** threadPoolGetMaxThreads- ThreadPoolGetMaxThreadsMethodInfo ,- threadPoolGetMaxThreads ,----- ** threadPoolGetMaxUnusedThreads- threadPoolGetMaxUnusedThreads ,----- ** threadPoolGetNumThreads- ThreadPoolGetNumThreadsMethodInfo ,- threadPoolGetNumThreads ,----- ** threadPoolGetNumUnusedThreads- threadPoolGetNumUnusedThreads ,----- ** threadPoolMoveToFront- ThreadPoolMoveToFrontMethodInfo ,- threadPoolMoveToFront ,----- ** threadPoolPush- ThreadPoolPushMethodInfo ,- threadPoolPush ,----- ** threadPoolSetMaxIdleTime- threadPoolSetMaxIdleTime ,----- ** threadPoolSetMaxThreads- ThreadPoolSetMaxThreadsMethodInfo ,- threadPoolSetMaxThreads ,----- ** threadPoolSetMaxUnusedThreads- threadPoolSetMaxUnusedThreads ,----- ** threadPoolStopUnusedThreads- threadPoolStopUnusedThreads ,----- ** threadPoolUnprocessed- ThreadPoolUnprocessedMethodInfo ,- threadPoolUnprocessed ,----- -- * Properties--- ** Exclusive- threadPoolExclusive ,- threadPoolReadExclusive ,- threadPoolWriteExclusive ,----- ** UserData- threadPoolClearUserData ,- threadPoolReadUserData ,- threadPoolUserData ,- threadPoolWriteUserData ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype ThreadPool = ThreadPool (ForeignPtr ThreadPool)-instance WrappedPtr ThreadPool where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = copyPtr 24- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `ThreadPool` struct initialized to zero.-newZeroThreadPool :: MonadIO m => m ThreadPool-newZeroThreadPool = liftIO $ wrappedPtrCalloc >>= wrapPtr ThreadPool--instance tag ~ 'AttrSet => Constructible ThreadPool tag where- new _ attrs = do- o <- newZeroThreadPool- GI.Attributes.set o attrs- return o---noThreadPool :: Maybe ThreadPool-noThreadPool = Nothing---- XXX Skipped attribute for "ThreadPool:func" :: Not implemented: "Wrapping foreign callbacks is not supported yet"-threadPoolReadUserData :: MonadIO m => ThreadPool -> m (Ptr ())-threadPoolReadUserData s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (Ptr ())- return val--threadPoolWriteUserData :: MonadIO m => ThreadPool -> Ptr () -> m ()-threadPoolWriteUserData s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Ptr ())--threadPoolClearUserData :: MonadIO m => ThreadPool -> m ()-threadPoolClearUserData s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (nullPtr :: Ptr ())--data ThreadPoolUserDataFieldInfo-instance AttrInfo ThreadPoolUserDataFieldInfo where- type AttrAllowedOps ThreadPoolUserDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint ThreadPoolUserDataFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint ThreadPoolUserDataFieldInfo = (~) ThreadPool- type AttrGetType ThreadPoolUserDataFieldInfo = Ptr ()- type AttrLabel ThreadPoolUserDataFieldInfo = "user_data"- attrGet _ = threadPoolReadUserData- attrSet _ = threadPoolWriteUserData- attrConstruct = undefined- attrClear _ = threadPoolClearUserData--threadPoolUserData :: AttrLabelProxy "userData"-threadPoolUserData = AttrLabelProxy---threadPoolReadExclusive :: MonadIO m => ThreadPool -> m Bool-threadPoolReadExclusive s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CInt- let val' = (/= 0) val- return val'--threadPoolWriteExclusive :: MonadIO m => ThreadPool -> Bool -> m ()-threadPoolWriteExclusive s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 16) (val' :: CInt)--data ThreadPoolExclusiveFieldInfo-instance AttrInfo ThreadPoolExclusiveFieldInfo where- type AttrAllowedOps ThreadPoolExclusiveFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ThreadPoolExclusiveFieldInfo = (~) Bool- type AttrBaseTypeConstraint ThreadPoolExclusiveFieldInfo = (~) ThreadPool- type AttrGetType ThreadPoolExclusiveFieldInfo = Bool- type AttrLabel ThreadPoolExclusiveFieldInfo = "exclusive"- attrGet _ = threadPoolReadExclusive- attrSet _ = threadPoolWriteExclusive- attrConstruct = undefined- attrClear _ = undefined--threadPoolExclusive :: AttrLabelProxy "exclusive"-threadPoolExclusive = AttrLabelProxy----type instance AttributeList ThreadPool = ThreadPoolAttributeList-type ThreadPoolAttributeList = ('[ '("userData", ThreadPoolUserDataFieldInfo), '("exclusive", ThreadPoolExclusiveFieldInfo)] :: [(Symbol, *)])---- method ThreadPool::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "ThreadPool", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "immediate", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "wait_", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_free" g_thread_pool_free :: - Ptr ThreadPool -> -- _obj : TInterface "GLib" "ThreadPool"- CInt -> -- immediate : TBasicType TBoolean- CInt -> -- wait_ : TBasicType TBoolean- IO ()---threadPoolFree ::- (MonadIO m) =>- ThreadPool -- _obj- -> Bool -- immediate- -> Bool -- wait_- -> m () -- result-threadPoolFree _obj immediate wait_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let immediate' = (fromIntegral . fromEnum) immediate- let wait_' = (fromIntegral . fromEnum) wait_- g_thread_pool_free _obj' immediate' wait_'- touchManagedPtr _obj- return ()--data ThreadPoolFreeMethodInfo-instance (signature ~ (Bool -> Bool -> m ()), MonadIO m) => MethodInfo ThreadPoolFreeMethodInfo ThreadPool signature where- overloadedMethod _ = threadPoolFree---- method ThreadPool::get_max_threads--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "ThreadPool", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_get_max_threads" g_thread_pool_get_max_threads :: - Ptr ThreadPool -> -- _obj : TInterface "GLib" "ThreadPool"- IO Int32---threadPoolGetMaxThreads ::- (MonadIO m) =>- ThreadPool -- _obj- -> m Int32 -- result-threadPoolGetMaxThreads _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_thread_pool_get_max_threads _obj'- touchManagedPtr _obj- return result--data ThreadPoolGetMaxThreadsMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo ThreadPoolGetMaxThreadsMethodInfo ThreadPool signature where- overloadedMethod _ = threadPoolGetMaxThreads---- method ThreadPool::get_num_threads--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "ThreadPool", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_get_num_threads" g_thread_pool_get_num_threads :: - Ptr ThreadPool -> -- _obj : TInterface "GLib" "ThreadPool"- IO Word32---threadPoolGetNumThreads ::- (MonadIO m) =>- ThreadPool -- _obj- -> m Word32 -- result-threadPoolGetNumThreads _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_thread_pool_get_num_threads _obj'- touchManagedPtr _obj- return result--data ThreadPoolGetNumThreadsMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo ThreadPoolGetNumThreadsMethodInfo ThreadPool signature where- overloadedMethod _ = threadPoolGetNumThreads---- method ThreadPool::move_to_front--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "ThreadPool", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_move_to_front" g_thread_pool_move_to_front :: - Ptr ThreadPool -> -- _obj : TInterface "GLib" "ThreadPool"- Ptr () -> -- data : TBasicType TPtr- IO CInt---threadPoolMoveToFront ::- (MonadIO m) =>- ThreadPool -- _obj- -> Ptr () -- data_- -> m Bool -- result-threadPoolMoveToFront _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_thread_pool_move_to_front _obj' data_- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data ThreadPoolMoveToFrontMethodInfo-instance (signature ~ (Ptr () -> m Bool), MonadIO m) => MethodInfo ThreadPoolMoveToFrontMethodInfo ThreadPool signature where- overloadedMethod _ = threadPoolMoveToFront---- method ThreadPool::push--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "ThreadPool", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_thread_pool_push" g_thread_pool_push :: - Ptr ThreadPool -> -- _obj : TInterface "GLib" "ThreadPool"- Ptr () -> -- data : TBasicType TPtr- Ptr (Ptr GError) -> -- error- IO CInt---threadPoolPush ::- (MonadIO m) =>- ThreadPool -- _obj- -> Ptr () -- data_- -> m () -- result-threadPoolPush _obj data_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- onException (do- _ <- propagateGError $ g_thread_pool_push _obj' data_- touchManagedPtr _obj- return ()- ) (do- return ()- )--data ThreadPoolPushMethodInfo-instance (signature ~ (Ptr () -> m ()), MonadIO m) => MethodInfo ThreadPoolPushMethodInfo ThreadPool signature where- overloadedMethod _ = threadPoolPush---- method ThreadPool::set_max_threads--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "ThreadPool", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_threads", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "g_thread_pool_set_max_threads" g_thread_pool_set_max_threads :: - Ptr ThreadPool -> -- _obj : TInterface "GLib" "ThreadPool"- Int32 -> -- max_threads : TBasicType TInt- Ptr (Ptr GError) -> -- error- IO CInt---threadPoolSetMaxThreads ::- (MonadIO m) =>- ThreadPool -- _obj- -> Int32 -- maxThreads- -> m () -- result-threadPoolSetMaxThreads _obj maxThreads = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- onException (do- _ <- propagateGError $ g_thread_pool_set_max_threads _obj' maxThreads- touchManagedPtr _obj- return ()- ) (do- return ()- )--data ThreadPoolSetMaxThreadsMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m) => MethodInfo ThreadPoolSetMaxThreadsMethodInfo ThreadPool signature where- overloadedMethod _ = threadPoolSetMaxThreads---- method ThreadPool::unprocessed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "ThreadPool", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_unprocessed" g_thread_pool_unprocessed :: - Ptr ThreadPool -> -- _obj : TInterface "GLib" "ThreadPool"- IO Word32---threadPoolUnprocessed ::- (MonadIO m) =>- ThreadPool -- _obj- -> m Word32 -- result-threadPoolUnprocessed _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_thread_pool_unprocessed _obj'- touchManagedPtr _obj- return result--data ThreadPoolUnprocessedMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo ThreadPoolUnprocessedMethodInfo ThreadPool signature where- overloadedMethod _ = threadPoolUnprocessed---- method ThreadPool::get_max_idle_time--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_get_max_idle_time" g_thread_pool_get_max_idle_time :: - IO Word32---threadPoolGetMaxIdleTime ::- (MonadIO m) =>- m Word32 -- result-threadPoolGetMaxIdleTime = liftIO $ do- result <- g_thread_pool_get_max_idle_time- return result---- method ThreadPool::get_max_unused_threads--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_get_max_unused_threads" g_thread_pool_get_max_unused_threads :: - IO Int32---threadPoolGetMaxUnusedThreads ::- (MonadIO m) =>- m Int32 -- result-threadPoolGetMaxUnusedThreads = liftIO $ do- result <- g_thread_pool_get_max_unused_threads- return result---- method ThreadPool::get_num_unused_threads--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_get_num_unused_threads" g_thread_pool_get_num_unused_threads :: - IO Word32---threadPoolGetNumUnusedThreads ::- (MonadIO m) =>- m Word32 -- result-threadPoolGetNumUnusedThreads = liftIO $ do- result <- g_thread_pool_get_num_unused_threads- return result---- method ThreadPool::set_max_idle_time--- method type : MemberFunction--- Args : [Arg {argCName = "interval", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_set_max_idle_time" g_thread_pool_set_max_idle_time :: - Word32 -> -- interval : TBasicType TUInt- IO ()---threadPoolSetMaxIdleTime ::- (MonadIO m) =>- Word32 -- interval- -> m () -- result-threadPoolSetMaxIdleTime interval = liftIO $ do- g_thread_pool_set_max_idle_time interval- return ()---- method ThreadPool::set_max_unused_threads--- method type : MemberFunction--- Args : [Arg {argCName = "max_threads", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_set_max_unused_threads" g_thread_pool_set_max_unused_threads :: - Int32 -> -- max_threads : TBasicType TInt- IO ()---threadPoolSetMaxUnusedThreads ::- (MonadIO m) =>- Int32 -- maxThreads- -> m () -- result-threadPoolSetMaxUnusedThreads maxThreads = liftIO $ do- g_thread_pool_set_max_unused_threads maxThreads- return ()---- method ThreadPool::stop_unused_threads--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_thread_pool_stop_unused_threads" g_thread_pool_stop_unused_threads :: - IO ()---threadPoolStopUnusedThreads ::- (MonadIO m) =>- m () -- result-threadPoolStopUnusedThreads = liftIO $ do- g_thread_pool_stop_unused_threads- return ()--type family ResolveThreadPoolMethod (t :: Symbol) (o :: *) :: * where- ResolveThreadPoolMethod "free" o = ThreadPoolFreeMethodInfo- ResolveThreadPoolMethod "moveToFront" o = ThreadPoolMoveToFrontMethodInfo- ResolveThreadPoolMethod "push" o = ThreadPoolPushMethodInfo- ResolveThreadPoolMethod "unprocessed" o = ThreadPoolUnprocessedMethodInfo- ResolveThreadPoolMethod "getMaxThreads" o = ThreadPoolGetMaxThreadsMethodInfo- ResolveThreadPoolMethod "getNumThreads" o = ThreadPoolGetNumThreadsMethodInfo- ResolveThreadPoolMethod "setMaxThreads" o = ThreadPoolSetMaxThreadsMethodInfo- ResolveThreadPoolMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveThreadPoolMethod t ThreadPool, MethodInfo info ThreadPool p) => IsLabelProxy t (ThreadPool -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveThreadPoolMethod t ThreadPool, MethodInfo info ThreadPool p) => IsLabel t (ThreadPool -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/ThreadPool.hs-boot
@@ -1,18 +0,0 @@-module GI.GLib.Structs.ThreadPool where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype ThreadPool = ThreadPool (ForeignPtr ThreadPool)-instance WrappedPtr ThreadPool where-data ThreadPoolFreeMethodInfo-data ThreadPoolGetMaxThreadsMethodInfo-data ThreadPoolGetNumThreadsMethodInfo-data ThreadPoolMoveToFrontMethodInfo-data ThreadPoolPushMethodInfo-data ThreadPoolSetMaxThreadsMethodInfo-data ThreadPoolUnprocessedMethodInfo
− GI/GLib/Structs/TimeVal.hs
@@ -1,243 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Represents a precise time, with seconds and microseconds.-Similar to the struct timeval returned by the gettimeofday()-UNIX system call.--GLib is attempting to unify around the use of 64bit integers to-represent microsecond-precision time. As such, this type will be-removed from a future version of GLib.--}--module GI.GLib.Structs.TimeVal- ( ---- * Exported types- TimeVal(..) ,- newZeroTimeVal ,- noTimeVal ,--- -- * Methods--- ** timeValAdd- TimeValAddMethodInfo ,- timeValAdd ,----- ** timeValFromIso8601- timeValFromIso8601 ,----- ** timeValToIso8601- TimeValToIso8601MethodInfo ,- timeValToIso8601 ,----- -- * Properties--- ** TvSec- timeValReadTvSec ,- timeValTvSec ,- timeValWriteTvSec ,----- ** TvUsec- timeValReadTvUsec ,- timeValTvUsec ,- timeValWriteTvUsec ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TimeVal = TimeVal (ForeignPtr TimeVal)-instance WrappedPtr TimeVal where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = copyPtr 16- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `TimeVal` struct initialized to zero.-newZeroTimeVal :: MonadIO m => m TimeVal-newZeroTimeVal = liftIO $ wrappedPtrCalloc >>= wrapPtr TimeVal--instance tag ~ 'AttrSet => Constructible TimeVal tag where- new _ attrs = do- o <- newZeroTimeVal- GI.Attributes.set o attrs- return o---noTimeVal :: Maybe TimeVal-noTimeVal = Nothing--timeValReadTvSec :: MonadIO m => TimeVal -> m CLong-timeValReadTvSec s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CLong- return val--timeValWriteTvSec :: MonadIO m => TimeVal -> CLong -> m ()-timeValWriteTvSec s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CLong)--data TimeValTvSecFieldInfo-instance AttrInfo TimeValTvSecFieldInfo where- type AttrAllowedOps TimeValTvSecFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TimeValTvSecFieldInfo = (~) CLong- type AttrBaseTypeConstraint TimeValTvSecFieldInfo = (~) TimeVal- type AttrGetType TimeValTvSecFieldInfo = CLong- type AttrLabel TimeValTvSecFieldInfo = "tv_sec"- attrGet _ = timeValReadTvSec- attrSet _ = timeValWriteTvSec- attrConstruct = undefined- attrClear _ = undefined--timeValTvSec :: AttrLabelProxy "tvSec"-timeValTvSec = AttrLabelProxy---timeValReadTvUsec :: MonadIO m => TimeVal -> m CLong-timeValReadTvUsec s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CLong- return val--timeValWriteTvUsec :: MonadIO m => TimeVal -> CLong -> m ()-timeValWriteTvUsec s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: CLong)--data TimeValTvUsecFieldInfo-instance AttrInfo TimeValTvUsecFieldInfo where- type AttrAllowedOps TimeValTvUsecFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TimeValTvUsecFieldInfo = (~) CLong- type AttrBaseTypeConstraint TimeValTvUsecFieldInfo = (~) TimeVal- type AttrGetType TimeValTvUsecFieldInfo = CLong- type AttrLabel TimeValTvUsecFieldInfo = "tv_usec"- attrGet _ = timeValReadTvUsec- attrSet _ = timeValWriteTvUsec- attrConstruct = undefined- attrClear _ = undefined--timeValTvUsec :: AttrLabelProxy "tvUsec"-timeValTvUsec = AttrLabelProxy----type instance AttributeList TimeVal = TimeValAttributeList-type TimeValAttributeList = ('[ '("tvSec", TimeValTvSecFieldInfo), '("tvUsec", TimeValTvUsecFieldInfo)] :: [(Symbol, *)])---- method TimeVal::add--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "microseconds", argType = TBasicType TLong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_time_val_add" g_time_val_add :: - Ptr TimeVal -> -- _obj : TInterface "GLib" "TimeVal"- CLong -> -- microseconds : TBasicType TLong- IO ()---timeValAdd ::- (MonadIO m) =>- TimeVal -- _obj- -> CLong -- microseconds- -> m () -- result-timeValAdd _obj microseconds = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_time_val_add _obj' microseconds- touchManagedPtr _obj- return ()--data TimeValAddMethodInfo-instance (signature ~ (CLong -> m ()), MonadIO m) => MethodInfo TimeValAddMethodInfo TimeVal signature where- overloadedMethod _ = timeValAdd---- method TimeVal::to_iso8601--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeVal", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_time_val_to_iso8601" g_time_val_to_iso8601 :: - Ptr TimeVal -> -- _obj : TInterface "GLib" "TimeVal"- IO CString---timeValToIso8601 ::- (MonadIO m) =>- TimeVal -- _obj- -> m T.Text -- result-timeValToIso8601 _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_time_val_to_iso8601 _obj'- checkUnexpectedReturnNULL "g_time_val_to_iso8601" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- return result'--data TimeValToIso8601MethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo TimeValToIso8601MethodInfo TimeVal signature where- overloadedMethod _ = timeValToIso8601---- method TimeVal::from_iso8601--- method type : MemberFunction--- Args : [Arg {argCName = "iso_date", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "time_", argType = TInterface "GLib" "TimeVal", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_time_val_from_iso8601" g_time_val_from_iso8601 :: - CString -> -- iso_date : TBasicType TUTF8- Ptr TimeVal -> -- time_ : TInterface "GLib" "TimeVal"- IO CInt---timeValFromIso8601 ::- (MonadIO m) =>- T.Text -- isoDate- -> m (Bool,TimeVal) -- result-timeValFromIso8601 isoDate = liftIO $ do- isoDate' <- textToCString isoDate- time_ <- callocBytes 16 :: IO (Ptr TimeVal)- result <- g_time_val_from_iso8601 isoDate' time_- let result' = (/= 0) result- time_' <- (wrapPtr TimeVal) time_- freeMem isoDate'- return (result', time_')--type family ResolveTimeValMethod (t :: Symbol) (o :: *) :: * where- ResolveTimeValMethod "add" o = TimeValAddMethodInfo- ResolveTimeValMethod "toIso8601" o = TimeValToIso8601MethodInfo- ResolveTimeValMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTimeValMethod t TimeVal, MethodInfo info TimeVal p) => IsLabelProxy t (TimeVal -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTimeValMethod t TimeVal, MethodInfo info TimeVal p) => IsLabel t (TimeVal -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TimeVal.hs-boot
@@ -1,13 +0,0 @@-module GI.GLib.Structs.TimeVal where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TimeVal = TimeVal (ForeignPtr TimeVal)-instance WrappedPtr TimeVal where-data TimeValAddMethodInfo-data TimeValToIso8601MethodInfo
− GI/GLib/Structs/TimeZone.hs
@@ -1,395 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--#GTimeZone is an opaque structure whose members cannot be accessed-directly.--}--module GI.GLib.Structs.TimeZone- ( ---- * Exported types- TimeZone(..) ,- noTimeZone ,--- -- * Methods--- ** timeZoneAdjustTime- TimeZoneAdjustTimeMethodInfo ,- timeZoneAdjustTime ,----- ** timeZoneFindInterval- TimeZoneFindIntervalMethodInfo ,- timeZoneFindInterval ,----- ** timeZoneGetAbbreviation- TimeZoneGetAbbreviationMethodInfo ,- timeZoneGetAbbreviation ,----- ** timeZoneGetOffset- TimeZoneGetOffsetMethodInfo ,- timeZoneGetOffset ,----- ** timeZoneIsDst- TimeZoneIsDstMethodInfo ,- timeZoneIsDst ,----- ** timeZoneNew- timeZoneNew ,----- ** timeZoneNewLocal- timeZoneNewLocal ,----- ** timeZoneNewUtc- timeZoneNewUtc ,----- ** timeZoneRef- TimeZoneRefMethodInfo ,- timeZoneRef ,----- ** timeZoneUnref- TimeZoneUnrefMethodInfo ,- timeZoneUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TimeZone = TimeZone (ForeignPtr TimeZone)-foreign import ccall "g_time_zone_get_type" c_g_time_zone_get_type :: - IO GType--instance BoxedObject TimeZone where- boxedType _ = c_g_time_zone_get_type--noTimeZone :: Maybe TimeZone-noTimeZone = Nothing---type instance AttributeList TimeZone = TimeZoneAttributeList-type TimeZoneAttributeList = ('[ ] :: [(Symbol, *)])---- method TimeZone::new--- method type : Constructor--- Args : [Arg {argCName = "identifier", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "TimeZone")--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_new" g_time_zone_new :: - CString -> -- identifier : TBasicType TUTF8- IO (Ptr TimeZone)---timeZoneNew ::- (MonadIO m) =>- Maybe (T.Text) -- identifier- -> m TimeZone -- result-timeZoneNew identifier = liftIO $ do- maybeIdentifier <- case identifier of- Nothing -> return nullPtr- Just jIdentifier -> do- jIdentifier' <- textToCString jIdentifier- return jIdentifier'- result <- g_time_zone_new maybeIdentifier- checkUnexpectedReturnNULL "g_time_zone_new" result- result' <- (wrapBoxed TimeZone) result- freeMem maybeIdentifier- return result'---- method TimeZone::new_local--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "TimeZone")--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_new_local" g_time_zone_new_local :: - IO (Ptr TimeZone)---timeZoneNewLocal ::- (MonadIO m) =>- m TimeZone -- result-timeZoneNewLocal = liftIO $ do- result <- g_time_zone_new_local- checkUnexpectedReturnNULL "g_time_zone_new_local" result- result' <- (wrapBoxed TimeZone) result- return result'---- method TimeZone::new_utc--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface "GLib" "TimeZone")--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_new_utc" g_time_zone_new_utc :: - IO (Ptr TimeZone)---timeZoneNewUtc ::- (MonadIO m) =>- m TimeZone -- result-timeZoneNewUtc = liftIO $ do- result <- g_time_zone_new_utc- checkUnexpectedReturnNULL "g_time_zone_new_utc" result- result' <- (wrapBoxed TimeZone) result- return result'---- method TimeZone::adjust_time--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type", argType = TInterface "GLib" "TimeType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "time_", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_adjust_time" g_time_zone_adjust_time :: - Ptr TimeZone -> -- _obj : TInterface "GLib" "TimeZone"- CUInt -> -- type : TInterface "GLib" "TimeType"- Int64 -> -- time_ : TBasicType TInt64- IO Int32---timeZoneAdjustTime ::- (MonadIO m) =>- TimeZone -- _obj- -> TimeType -- type_- -> Int64 -- time_- -> m Int32 -- result-timeZoneAdjustTime _obj type_ time_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let type_' = (fromIntegral . fromEnum) type_- result <- g_time_zone_adjust_time _obj' type_' time_- touchManagedPtr _obj- return result--data TimeZoneAdjustTimeMethodInfo-instance (signature ~ (TimeType -> Int64 -> m Int32), MonadIO m) => MethodInfo TimeZoneAdjustTimeMethodInfo TimeZone signature where- overloadedMethod _ = timeZoneAdjustTime---- method TimeZone::find_interval--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type", argType = TInterface "GLib" "TimeType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "time_", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_find_interval" g_time_zone_find_interval :: - Ptr TimeZone -> -- _obj : TInterface "GLib" "TimeZone"- CUInt -> -- type : TInterface "GLib" "TimeType"- Int64 -> -- time_ : TBasicType TInt64- IO Int32---timeZoneFindInterval ::- (MonadIO m) =>- TimeZone -- _obj- -> TimeType -- type_- -> Int64 -- time_- -> m Int32 -- result-timeZoneFindInterval _obj type_ time_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let type_' = (fromIntegral . fromEnum) type_- result <- g_time_zone_find_interval _obj' type_' time_- touchManagedPtr _obj- return result--data TimeZoneFindIntervalMethodInfo-instance (signature ~ (TimeType -> Int64 -> m Int32), MonadIO m) => MethodInfo TimeZoneFindIntervalMethodInfo TimeZone signature where- overloadedMethod _ = timeZoneFindInterval---- method TimeZone::get_abbreviation--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interval", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_get_abbreviation" g_time_zone_get_abbreviation :: - Ptr TimeZone -> -- _obj : TInterface "GLib" "TimeZone"- Int32 -> -- interval : TBasicType TInt- IO CString---timeZoneGetAbbreviation ::- (MonadIO m) =>- TimeZone -- _obj- -> Int32 -- interval- -> m T.Text -- result-timeZoneGetAbbreviation _obj interval = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_time_zone_get_abbreviation _obj' interval- checkUnexpectedReturnNULL "g_time_zone_get_abbreviation" result- result' <- cstringToText result- touchManagedPtr _obj- return result'--data TimeZoneGetAbbreviationMethodInfo-instance (signature ~ (Int32 -> m T.Text), MonadIO m) => MethodInfo TimeZoneGetAbbreviationMethodInfo TimeZone signature where- overloadedMethod _ = timeZoneGetAbbreviation---- method TimeZone::get_offset--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interval", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt32)--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_get_offset" g_time_zone_get_offset :: - Ptr TimeZone -> -- _obj : TInterface "GLib" "TimeZone"- Int32 -> -- interval : TBasicType TInt- IO Int32---timeZoneGetOffset ::- (MonadIO m) =>- TimeZone -- _obj- -> Int32 -- interval- -> m Int32 -- result-timeZoneGetOffset _obj interval = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_time_zone_get_offset _obj' interval- touchManagedPtr _obj- return result--data TimeZoneGetOffsetMethodInfo-instance (signature ~ (Int32 -> m Int32), MonadIO m) => MethodInfo TimeZoneGetOffsetMethodInfo TimeZone signature where- overloadedMethod _ = timeZoneGetOffset---- method TimeZone::is_dst--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interval", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_is_dst" g_time_zone_is_dst :: - Ptr TimeZone -> -- _obj : TInterface "GLib" "TimeZone"- Int32 -> -- interval : TBasicType TInt- IO CInt---timeZoneIsDst ::- (MonadIO m) =>- TimeZone -- _obj- -> Int32 -- interval- -> m Bool -- result-timeZoneIsDst _obj interval = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_time_zone_is_dst _obj' interval- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data TimeZoneIsDstMethodInfo-instance (signature ~ (Int32 -> m Bool), MonadIO m) => MethodInfo TimeZoneIsDstMethodInfo TimeZone signature where- overloadedMethod _ = timeZoneIsDst---- method TimeZone::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "TimeZone")--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_ref" g_time_zone_ref :: - Ptr TimeZone -> -- _obj : TInterface "GLib" "TimeZone"- IO (Ptr TimeZone)---timeZoneRef ::- (MonadIO m) =>- TimeZone -- _obj- -> m TimeZone -- result-timeZoneRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_time_zone_ref _obj'- checkUnexpectedReturnNULL "g_time_zone_ref" result- result' <- (wrapBoxed TimeZone) result- touchManagedPtr _obj- return result'--data TimeZoneRefMethodInfo-instance (signature ~ (m TimeZone), MonadIO m) => MethodInfo TimeZoneRefMethodInfo TimeZone signature where- overloadedMethod _ = timeZoneRef---- method TimeZone::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "TimeZone", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_time_zone_unref" g_time_zone_unref :: - Ptr TimeZone -> -- _obj : TInterface "GLib" "TimeZone"- IO ()---timeZoneUnref ::- (MonadIO m) =>- TimeZone -- _obj- -> m () -- result-timeZoneUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_time_zone_unref _obj'- touchManagedPtr _obj- return ()--data TimeZoneUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TimeZoneUnrefMethodInfo TimeZone signature where- overloadedMethod _ = timeZoneUnref--type family ResolveTimeZoneMethod (t :: Symbol) (o :: *) :: * where- ResolveTimeZoneMethod "adjustTime" o = TimeZoneAdjustTimeMethodInfo- ResolveTimeZoneMethod "findInterval" o = TimeZoneFindIntervalMethodInfo- ResolveTimeZoneMethod "isDst" o = TimeZoneIsDstMethodInfo- ResolveTimeZoneMethod "ref" o = TimeZoneRefMethodInfo- ResolveTimeZoneMethod "unref" o = TimeZoneUnrefMethodInfo- ResolveTimeZoneMethod "getAbbreviation" o = TimeZoneGetAbbreviationMethodInfo- ResolveTimeZoneMethod "getOffset" o = TimeZoneGetOffsetMethodInfo- ResolveTimeZoneMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTimeZoneMethod t TimeZone, MethodInfo info TimeZone p) => IsLabelProxy t (TimeZone -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTimeZoneMethod t TimeZone, MethodInfo info TimeZone p) => IsLabel t (TimeZone -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TimeZone.hs-boot
@@ -1,18 +0,0 @@-module GI.GLib.Structs.TimeZone where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TimeZone = TimeZone (ForeignPtr TimeZone)-instance BoxedObject TimeZone where-data TimeZoneAdjustTimeMethodInfo-data TimeZoneFindIntervalMethodInfo-data TimeZoneGetAbbreviationMethodInfo-data TimeZoneGetOffsetMethodInfo-data TimeZoneIsDstMethodInfo-data TimeZoneRefMethodInfo-data TimeZoneUnrefMethodInfo
− GI/GLib/Structs/Timer.hs
@@ -1,260 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Opaque datatype that records a start time.--}--module GI.GLib.Structs.Timer- ( ---- * Exported types- Timer(..) ,- noTimer ,--- -- * Methods--- ** timerContinue- TimerContinueMethodInfo ,- timerContinue ,----- ** timerDestroy- TimerDestroyMethodInfo ,- timerDestroy ,----- ** timerElapsed- TimerElapsedMethodInfo ,- timerElapsed ,----- ** timerReset- TimerResetMethodInfo ,- timerReset ,----- ** timerStart- TimerStartMethodInfo ,- timerStart ,----- ** timerStop- TimerStopMethodInfo ,- timerStop ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Timer = Timer (ForeignPtr Timer)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Timer where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noTimer :: Maybe Timer-noTimer = Nothing---type instance AttributeList Timer = TimerAttributeList-type TimerAttributeList = ('[ ] :: [(Symbol, *)])---- method Timer::continue--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Timer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_timer_continue" g_timer_continue :: - Ptr Timer -> -- _obj : TInterface "GLib" "Timer"- IO ()---timerContinue ::- (MonadIO m) =>- Timer -- _obj- -> m () -- result-timerContinue _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_timer_continue _obj'- touchManagedPtr _obj- return ()--data TimerContinueMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TimerContinueMethodInfo Timer signature where- overloadedMethod _ = timerContinue---- method Timer::destroy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Timer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_timer_destroy" g_timer_destroy :: - Ptr Timer -> -- _obj : TInterface "GLib" "Timer"- IO ()---timerDestroy ::- (MonadIO m) =>- Timer -- _obj- -> m () -- result-timerDestroy _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_timer_destroy _obj'- touchManagedPtr _obj- return ()--data TimerDestroyMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TimerDestroyMethodInfo Timer signature where- overloadedMethod _ = timerDestroy---- method Timer::elapsed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Timer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "microseconds", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "g_timer_elapsed" g_timer_elapsed :: - Ptr Timer -> -- _obj : TInterface "GLib" "Timer"- CULong -> -- microseconds : TBasicType TULong- IO CDouble---timerElapsed ::- (MonadIO m) =>- Timer -- _obj- -> CULong -- microseconds- -> m Double -- result-timerElapsed _obj microseconds = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_timer_elapsed _obj' microseconds- let result' = realToFrac result- touchManagedPtr _obj- return result'--data TimerElapsedMethodInfo-instance (signature ~ (CULong -> m Double), MonadIO m) => MethodInfo TimerElapsedMethodInfo Timer signature where- overloadedMethod _ = timerElapsed---- method Timer::reset--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Timer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_timer_reset" g_timer_reset :: - Ptr Timer -> -- _obj : TInterface "GLib" "Timer"- IO ()---timerReset ::- (MonadIO m) =>- Timer -- _obj- -> m () -- result-timerReset _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_timer_reset _obj'- touchManagedPtr _obj- return ()--data TimerResetMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TimerResetMethodInfo Timer signature where- overloadedMethod _ = timerReset---- method Timer::start--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Timer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_timer_start" g_timer_start :: - Ptr Timer -> -- _obj : TInterface "GLib" "Timer"- IO ()---timerStart ::- (MonadIO m) =>- Timer -- _obj- -> m () -- result-timerStart _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_timer_start _obj'- touchManagedPtr _obj- return ()--data TimerStartMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TimerStartMethodInfo Timer signature where- overloadedMethod _ = timerStart---- method Timer::stop--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Timer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_timer_stop" g_timer_stop :: - Ptr Timer -> -- _obj : TInterface "GLib" "Timer"- IO ()---timerStop ::- (MonadIO m) =>- Timer -- _obj- -> m () -- result-timerStop _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_timer_stop _obj'- touchManagedPtr _obj- return ()--data TimerStopMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TimerStopMethodInfo Timer signature where- overloadedMethod _ = timerStop--type family ResolveTimerMethod (t :: Symbol) (o :: *) :: * where- ResolveTimerMethod "continue" o = TimerContinueMethodInfo- ResolveTimerMethod "destroy" o = TimerDestroyMethodInfo- ResolveTimerMethod "elapsed" o = TimerElapsedMethodInfo- ResolveTimerMethod "reset" o = TimerResetMethodInfo- ResolveTimerMethod "start" o = TimerStartMethodInfo- ResolveTimerMethod "stop" o = TimerStopMethodInfo- ResolveTimerMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTimerMethod t Timer, MethodInfo info Timer p) => IsLabelProxy t (Timer -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTimerMethod t Timer, MethodInfo info Timer p) => IsLabel t (Timer -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Timer.hs-boot
@@ -1,17 +0,0 @@-module GI.GLib.Structs.Timer where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Timer = Timer (ForeignPtr Timer)-instance WrappedPtr Timer where-data TimerContinueMethodInfo-data TimerDestroyMethodInfo-data TimerElapsedMethodInfo-data TimerResetMethodInfo-data TimerStartMethodInfo-data TimerStopMethodInfo
− GI/GLib/Structs/TrashStack.hs
@@ -1,169 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--Each piece of memory that is pushed onto the stack-is cast to a GTrashStack*.--}--module GI.GLib.Structs.TrashStack- ( ---- * Exported types- TrashStack(..) ,- newZeroTrashStack ,- noTrashStack ,--- -- * Methods--- ** trashStackHeight- trashStackHeight ,----- ** trashStackPush- trashStackPush ,----- -- * Properties--- ** Next- trashStackClearNext ,- trashStackNext ,- trashStackReadNext ,- trashStackWriteNext ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TrashStack = TrashStack (ForeignPtr TrashStack)-instance WrappedPtr TrashStack where- wrappedPtrCalloc = callocBytes 8- wrappedPtrCopy = copyPtr 8- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `TrashStack` struct initialized to zero.-newZeroTrashStack :: MonadIO m => m TrashStack-newZeroTrashStack = liftIO $ wrappedPtrCalloc >>= wrapPtr TrashStack--instance tag ~ 'AttrSet => Constructible TrashStack tag where- new _ attrs = do- o <- newZeroTrashStack- GI.Attributes.set o attrs- return o---noTrashStack :: Maybe TrashStack-noTrashStack = Nothing--trashStackReadNext :: MonadIO m => TrashStack -> m (Maybe TrashStack)-trashStackReadNext s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr TrashStack)- result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr TrashStack) val'- return val''- return result--trashStackWriteNext :: MonadIO m => TrashStack -> Ptr TrashStack -> m ()-trashStackWriteNext s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr TrashStack)--trashStackClearNext :: MonadIO m => TrashStack -> m ()-trashStackClearNext s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: Ptr TrashStack)--data TrashStackNextFieldInfo-instance AttrInfo TrashStackNextFieldInfo where- type AttrAllowedOps TrashStackNextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint TrashStackNextFieldInfo = (~) (Ptr TrashStack)- type AttrBaseTypeConstraint TrashStackNextFieldInfo = (~) TrashStack- type AttrGetType TrashStackNextFieldInfo = Maybe TrashStack- type AttrLabel TrashStackNextFieldInfo = "next"- attrGet _ = trashStackReadNext- attrSet _ = trashStackWriteNext- attrConstruct = undefined- attrClear _ = trashStackClearNext--trashStackNext :: AttrLabelProxy "next"-trashStackNext = AttrLabelProxy----type instance AttributeList TrashStack = TrashStackAttributeList-type TrashStackAttributeList = ('[ '("next", TrashStackNextFieldInfo)] :: [(Symbol, *)])---- method TrashStack::height--- method type : MemberFunction--- Args : [Arg {argCName = "stack_p", argType = TInterface "GLib" "TrashStack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_trash_stack_height" g_trash_stack_height :: - Ptr TrashStack -> -- stack_p : TInterface "GLib" "TrashStack"- IO Word32---trashStackHeight ::- (MonadIO m) =>- TrashStack -- stackP- -> m Word32 -- result-trashStackHeight stackP = liftIO $ do- let stackP' = unsafeManagedPtrGetPtr stackP- result <- g_trash_stack_height stackP'- touchManagedPtr stackP- return result---- method TrashStack::push--- method type : MemberFunction--- Args : [Arg {argCName = "stack_p", argType = TInterface "GLib" "TrashStack", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data_p", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_trash_stack_push" g_trash_stack_push :: - Ptr TrashStack -> -- stack_p : TInterface "GLib" "TrashStack"- Ptr () -> -- data_p : TBasicType TPtr- IO ()---trashStackPush ::- (MonadIO m) =>- TrashStack -- stackP- -> Ptr () -- dataP- -> m () -- result-trashStackPush stackP dataP = liftIO $ do- let stackP' = unsafeManagedPtrGetPtr stackP- g_trash_stack_push stackP' dataP- touchManagedPtr stackP- return ()--type family ResolveTrashStackMethod (t :: Symbol) (o :: *) :: * where- ResolveTrashStackMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTrashStackMethod t TrashStack, MethodInfo info TrashStack p) => IsLabelProxy t (TrashStack -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTrashStackMethod t TrashStack, MethodInfo info TrashStack p) => IsLabel t (TrashStack -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/TrashStack.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Structs.TrashStack where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TrashStack = TrashStack (ForeignPtr TrashStack)-instance WrappedPtr TrashStack where
− GI/GLib/Structs/Tree.hs
@@ -1,379 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--The GTree struct is an opaque data structure representing a-[balanced binary tree][glib-Balanced-Binary-Trees]. It should be-accessed only by using the following functions.--}--module GI.GLib.Structs.Tree- ( ---- * Exported types- Tree(..) ,- noTree ,--- -- * Methods--- ** treeDestroy- TreeDestroyMethodInfo ,- treeDestroy ,----- ** treeHeight- TreeHeightMethodInfo ,- treeHeight ,----- ** treeInsert- TreeInsertMethodInfo ,- treeInsert ,----- ** treeLookupExtended- TreeLookupExtendedMethodInfo ,- treeLookupExtended ,----- ** treeNnodes- TreeNnodesMethodInfo ,- treeNnodes ,----- ** treeRemove- TreeRemoveMethodInfo ,- treeRemove ,----- ** treeReplace- TreeReplaceMethodInfo ,- treeReplace ,----- ** treeSteal- TreeStealMethodInfo ,- treeSteal ,----- ** treeUnref- TreeUnrefMethodInfo ,- treeUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Tree = Tree (ForeignPtr Tree)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Tree where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing--noTree :: Maybe Tree-noTree = Nothing---type instance AttributeList Tree = TreeAttributeList-type TreeAttributeList = ('[ ] :: [(Symbol, *)])---- method Tree::destroy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_tree_destroy" g_tree_destroy :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- IO ()---treeDestroy ::- (MonadIO m) =>- Tree -- _obj- -> m () -- result-treeDestroy _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_tree_destroy _obj'- touchManagedPtr _obj- return ()--data TreeDestroyMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TreeDestroyMethodInfo Tree signature where- overloadedMethod _ = treeDestroy---- method Tree::height--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_tree_height" g_tree_height :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- IO Int32---treeHeight ::- (MonadIO m) =>- Tree -- _obj- -> m Int32 -- result-treeHeight _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_tree_height _obj'- touchManagedPtr _obj- return result--data TreeHeightMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo TreeHeightMethodInfo Tree signature where- overloadedMethod _ = treeHeight---- method Tree::insert--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_tree_insert" g_tree_insert :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- Ptr () -> -- key : TBasicType TPtr- Ptr () -> -- value : TBasicType TPtr- IO ()---treeInsert ::- (MonadIO m) =>- Tree -- _obj- -> Ptr () -- key- -> Ptr () -- value- -> m () -- result-treeInsert _obj key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_tree_insert _obj' key value- touchManagedPtr _obj- return ()--data TreeInsertMethodInfo-instance (signature ~ (Ptr () -> Ptr () -> m ()), MonadIO m) => MethodInfo TreeInsertMethodInfo Tree signature where- overloadedMethod _ = treeInsert---- method Tree::lookup_extended--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lookup_key", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "orig_key", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_tree_lookup_extended" g_tree_lookup_extended :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- Ptr () -> -- lookup_key : TBasicType TPtr- Ptr () -> -- orig_key : TBasicType TPtr- Ptr () -> -- value : TBasicType TPtr- IO CInt---treeLookupExtended ::- (MonadIO m) =>- Tree -- _obj- -> Ptr () -- lookupKey- -> Ptr () -- origKey- -> Ptr () -- value- -> m Bool -- result-treeLookupExtended _obj lookupKey origKey value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_tree_lookup_extended _obj' lookupKey origKey value- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data TreeLookupExtendedMethodInfo-instance (signature ~ (Ptr () -> Ptr () -> Ptr () -> m Bool), MonadIO m) => MethodInfo TreeLookupExtendedMethodInfo Tree signature where- overloadedMethod _ = treeLookupExtended---- method Tree::nnodes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "g_tree_nnodes" g_tree_nnodes :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- IO Int32---treeNnodes ::- (MonadIO m) =>- Tree -- _obj- -> m Int32 -- result-treeNnodes _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_tree_nnodes _obj'- touchManagedPtr _obj- return result--data TreeNnodesMethodInfo-instance (signature ~ (m Int32), MonadIO m) => MethodInfo TreeNnodesMethodInfo Tree signature where- overloadedMethod _ = treeNnodes---- method Tree::remove--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_tree_remove" g_tree_remove :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- Ptr () -> -- key : TBasicType TPtr- IO CInt---treeRemove ::- (MonadIO m) =>- Tree -- _obj- -> Ptr () -- key- -> m Bool -- result-treeRemove _obj key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_tree_remove _obj' key- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data TreeRemoveMethodInfo-instance (signature ~ (Ptr () -> m Bool), MonadIO m) => MethodInfo TreeRemoveMethodInfo Tree signature where- overloadedMethod _ = treeRemove---- method Tree::replace--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_tree_replace" g_tree_replace :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- Ptr () -> -- key : TBasicType TPtr- Ptr () -> -- value : TBasicType TPtr- IO ()---treeReplace ::- (MonadIO m) =>- Tree -- _obj- -> Ptr () -- key- -> Ptr () -- value- -> m () -- result-treeReplace _obj key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_tree_replace _obj' key value- touchManagedPtr _obj- return ()--data TreeReplaceMethodInfo-instance (signature ~ (Ptr () -> Ptr () -> m ()), MonadIO m) => MethodInfo TreeReplaceMethodInfo Tree signature where- overloadedMethod _ = treeReplace---- method Tree::steal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_tree_steal" g_tree_steal :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- Ptr () -> -- key : TBasicType TPtr- IO CInt---treeSteal ::- (MonadIO m) =>- Tree -- _obj- -> Ptr () -- key- -> m Bool -- result-treeSteal _obj key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_tree_steal _obj' key- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data TreeStealMethodInfo-instance (signature ~ (Ptr () -> m Bool), MonadIO m) => MethodInfo TreeStealMethodInfo Tree signature where- overloadedMethod _ = treeSteal---- method Tree::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Tree", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_tree_unref" g_tree_unref :: - Ptr Tree -> -- _obj : TInterface "GLib" "Tree"- IO ()---treeUnref ::- (MonadIO m) =>- Tree -- _obj- -> m () -- result-treeUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_tree_unref _obj'- touchManagedPtr _obj- return ()--data TreeUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo TreeUnrefMethodInfo Tree signature where- overloadedMethod _ = treeUnref--type family ResolveTreeMethod (t :: Symbol) (o :: *) :: * where- ResolveTreeMethod "destroy" o = TreeDestroyMethodInfo- ResolveTreeMethod "height" o = TreeHeightMethodInfo- ResolveTreeMethod "insert" o = TreeInsertMethodInfo- ResolveTreeMethod "lookupExtended" o = TreeLookupExtendedMethodInfo- ResolveTreeMethod "nnodes" o = TreeNnodesMethodInfo- ResolveTreeMethod "remove" o = TreeRemoveMethodInfo- ResolveTreeMethod "replace" o = TreeReplaceMethodInfo- ResolveTreeMethod "steal" o = TreeStealMethodInfo- ResolveTreeMethod "unref" o = TreeUnrefMethodInfo- ResolveTreeMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTreeMethod t Tree, MethodInfo info Tree p) => IsLabelProxy t (Tree -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTreeMethod t Tree, MethodInfo info Tree p) => IsLabel t (Tree -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/Tree.hs-boot
@@ -1,20 +0,0 @@-module GI.GLib.Structs.Tree where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Tree = Tree (ForeignPtr Tree)-instance WrappedPtr Tree where-data TreeDestroyMethodInfo-data TreeHeightMethodInfo-data TreeInsertMethodInfo-data TreeLookupExtendedMethodInfo-data TreeNnodesMethodInfo-data TreeRemoveMethodInfo-data TreeReplaceMethodInfo-data TreeStealMethodInfo-data TreeUnrefMethodInfo
− GI/GLib/Structs/VariantBuilder.hs
@@ -1,315 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--A utility type for constructing container-type #GVariant instances.--This is an opaque structure and may only be accessed using the-following functions.--#GVariantBuilder is not threadsafe in any way. Do not attempt to-access it from more than one thread.--}--module GI.GLib.Structs.VariantBuilder- ( ---- * Exported types- VariantBuilder(..) ,- newZeroVariantBuilder ,- noVariantBuilder ,--- -- * Methods--- ** variantBuilderAddValue- VariantBuilderAddValueMethodInfo ,- variantBuilderAddValue ,----- ** variantBuilderClose- VariantBuilderCloseMethodInfo ,- variantBuilderClose ,----- ** variantBuilderEnd- VariantBuilderEndMethodInfo ,- variantBuilderEnd ,----- ** variantBuilderNew- variantBuilderNew ,----- ** variantBuilderOpen- VariantBuilderOpenMethodInfo ,- variantBuilderOpen ,----- ** variantBuilderRef- VariantBuilderRefMethodInfo ,- variantBuilderRef ,----- ** variantBuilderUnref- VariantBuilderUnrefMethodInfo ,- variantBuilderUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype VariantBuilder = VariantBuilder (ForeignPtr VariantBuilder)-foreign import ccall "g_variant_builder_get_type" c_g_variant_builder_get_type :: - IO GType--instance BoxedObject VariantBuilder where- boxedType _ = c_g_variant_builder_get_type---- | Construct a `VariantBuilder` struct initialized to zero.-newZeroVariantBuilder :: MonadIO m => m VariantBuilder-newZeroVariantBuilder = liftIO $ callocBoxedBytes 128 >>= wrapBoxed VariantBuilder--instance tag ~ 'AttrSet => Constructible VariantBuilder tag where- new _ attrs = do- o <- newZeroVariantBuilder- GI.Attributes.set o attrs- return o---noVariantBuilder :: Maybe VariantBuilder-noVariantBuilder = Nothing---type instance AttributeList VariantBuilder = VariantBuilderAttributeList-type VariantBuilderAttributeList = ('[ ] :: [(Symbol, *)])---- method VariantBuilder::new--- method type : Constructor--- Args : [Arg {argCName = "type", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantBuilder")--- throws : False--- Skip return : False--foreign import ccall "g_variant_builder_new" g_variant_builder_new :: - Ptr VariantType -> -- type : TInterface "GLib" "VariantType"- IO (Ptr VariantBuilder)---variantBuilderNew ::- (MonadIO m) =>- VariantType -- type_- -> m VariantBuilder -- result-variantBuilderNew type_ = liftIO $ do- let type_' = unsafeManagedPtrGetPtr type_- result <- g_variant_builder_new type_'- checkUnexpectedReturnNULL "g_variant_builder_new" result- result' <- (wrapBoxed VariantBuilder) result- touchManagedPtr type_- return result'---- method VariantBuilder::add_value--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantBuilder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_builder_add_value" g_variant_builder_add_value :: - Ptr VariantBuilder -> -- _obj : TInterface "GLib" "VariantBuilder"- Ptr GVariant -> -- value : TVariant- IO ()---variantBuilderAddValue ::- (MonadIO m) =>- VariantBuilder -- _obj- -> GVariant -- value- -> m () -- result-variantBuilderAddValue _obj value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let value' = unsafeManagedPtrGetPtr value- g_variant_builder_add_value _obj' value'- touchManagedPtr _obj- return ()--data VariantBuilderAddValueMethodInfo-instance (signature ~ (GVariant -> m ()), MonadIO m) => MethodInfo VariantBuilderAddValueMethodInfo VariantBuilder signature where- overloadedMethod _ = variantBuilderAddValue---- method VariantBuilder::close--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantBuilder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_builder_close" g_variant_builder_close :: - Ptr VariantBuilder -> -- _obj : TInterface "GLib" "VariantBuilder"- IO ()---variantBuilderClose ::- (MonadIO m) =>- VariantBuilder -- _obj- -> m () -- result-variantBuilderClose _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_variant_builder_close _obj'- touchManagedPtr _obj- return ()--data VariantBuilderCloseMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo VariantBuilderCloseMethodInfo VariantBuilder signature where- overloadedMethod _ = variantBuilderClose---- method VariantBuilder::end--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantBuilder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just TVariant--- throws : False--- Skip return : False--foreign import ccall "g_variant_builder_end" g_variant_builder_end :: - Ptr VariantBuilder -> -- _obj : TInterface "GLib" "VariantBuilder"- IO (Ptr GVariant)---variantBuilderEnd ::- (MonadIO m) =>- VariantBuilder -- _obj- -> m GVariant -- result-variantBuilderEnd _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_builder_end _obj'- checkUnexpectedReturnNULL "g_variant_builder_end" result- result' <- newGVariantFromPtr result- touchManagedPtr _obj- return result'--data VariantBuilderEndMethodInfo-instance (signature ~ (m GVariant), MonadIO m) => MethodInfo VariantBuilderEndMethodInfo VariantBuilder signature where- overloadedMethod _ = variantBuilderEnd---- method VariantBuilder::open--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantBuilder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_builder_open" g_variant_builder_open :: - Ptr VariantBuilder -> -- _obj : TInterface "GLib" "VariantBuilder"- Ptr VariantType -> -- type : TInterface "GLib" "VariantType"- IO ()---variantBuilderOpen ::- (MonadIO m) =>- VariantBuilder -- _obj- -> VariantType -- type_- -> m () -- result-variantBuilderOpen _obj type_ = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let type_' = unsafeManagedPtrGetPtr type_- g_variant_builder_open _obj' type_'- touchManagedPtr _obj- touchManagedPtr type_- return ()--data VariantBuilderOpenMethodInfo-instance (signature ~ (VariantType -> m ()), MonadIO m) => MethodInfo VariantBuilderOpenMethodInfo VariantBuilder signature where- overloadedMethod _ = variantBuilderOpen---- method VariantBuilder::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantBuilder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantBuilder")--- throws : False--- Skip return : False--foreign import ccall "g_variant_builder_ref" g_variant_builder_ref :: - Ptr VariantBuilder -> -- _obj : TInterface "GLib" "VariantBuilder"- IO (Ptr VariantBuilder)---variantBuilderRef ::- (MonadIO m) =>- VariantBuilder -- _obj- -> m VariantBuilder -- result-variantBuilderRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_builder_ref _obj'- checkUnexpectedReturnNULL "g_variant_builder_ref" result- result' <- (wrapBoxed VariantBuilder) result- touchManagedPtr _obj- return result'--data VariantBuilderRefMethodInfo-instance (signature ~ (m VariantBuilder), MonadIO m) => MethodInfo VariantBuilderRefMethodInfo VariantBuilder signature where- overloadedMethod _ = variantBuilderRef---- method VariantBuilder::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantBuilder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_builder_unref" g_variant_builder_unref :: - Ptr VariantBuilder -> -- _obj : TInterface "GLib" "VariantBuilder"- IO ()---variantBuilderUnref ::- (MonadIO m) =>- VariantBuilder -- _obj- -> m () -- result-variantBuilderUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_variant_builder_unref _obj'- touchManagedPtr _obj- return ()--data VariantBuilderUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo VariantBuilderUnrefMethodInfo VariantBuilder signature where- overloadedMethod _ = variantBuilderUnref--type family ResolveVariantBuilderMethod (t :: Symbol) (o :: *) :: * where- ResolveVariantBuilderMethod "addValue" o = VariantBuilderAddValueMethodInfo- ResolveVariantBuilderMethod "close" o = VariantBuilderCloseMethodInfo- ResolveVariantBuilderMethod "end" o = VariantBuilderEndMethodInfo- ResolveVariantBuilderMethod "open" o = VariantBuilderOpenMethodInfo- ResolveVariantBuilderMethod "ref" o = VariantBuilderRefMethodInfo- ResolveVariantBuilderMethod "unref" o = VariantBuilderUnrefMethodInfo- ResolveVariantBuilderMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveVariantBuilderMethod t VariantBuilder, MethodInfo info VariantBuilder p) => IsLabelProxy t (VariantBuilder -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveVariantBuilderMethod t VariantBuilder, MethodInfo info VariantBuilder p) => IsLabel t (VariantBuilder -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/VariantBuilder.hs-boot
@@ -1,17 +0,0 @@-module GI.GLib.Structs.VariantBuilder where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype VariantBuilder = VariantBuilder (ForeignPtr VariantBuilder)-instance BoxedObject VariantBuilder where-data VariantBuilderAddValueMethodInfo-data VariantBuilderCloseMethodInfo-data VariantBuilderEndMethodInfo-data VariantBuilderOpenMethodInfo-data VariantBuilderRefMethodInfo-data VariantBuilderUnrefMethodInfo
− GI/GLib/Structs/VariantDict.hs
@@ -1,490 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--#GVariantDict is a mutable interface to #GVariant dictionaries.--It can be used for doing a sequence of dictionary lookups in an-efficient way on an existing #GVariant dictionary or it can be used-to construct new dictionaries with a hashtable-like interface. It-can also be used for taking existing dictionaries and modifying them-in order to create new ones.--#GVariantDict can only be used with %G_VARIANT_TYPE_VARDICT-dictionaries.--It is possible to use #GVariantDict allocated on the stack or on the-heap. When using a stack-allocated #GVariantDict, you begin with a-call to g_variant_dict_init() and free the resources with a call to-g_variant_dict_clear().--Heap-allocated #GVariantDict follows normal refcounting rules: you-allocate it with g_variant_dict_new() and use g_variant_dict_ref()-and g_variant_dict_unref().--g_variant_dict_end() is used to convert the #GVariantDict back into a-dictionary-type #GVariant. When used with stack-allocated instances,-this also implicitly frees all associated memory, but for-heap-allocated instances, you must still call g_variant_dict_unref()-afterwards.--You will typically want to use a heap-allocated #GVariantDict when-you expose it as part of an API. For most other uses, the-stack-allocated form will be more convenient.--Consider the following two examples that do the same thing in each-style: take an existing dictionary and look up the "count" uint32-key, adding 1 to it if it is found, or returning an error if the-key is not found. Each returns the new dictionary as a floating-#GVariant.--## Using a stack-allocated GVariantDict--|[<!-- language="C" -->- GVariant *- add_to_count (GVariant *orig,- GError **error)- {- GVariantDict dict;- guint32 count;-- g_variant_dict_init (&dict, orig);- if (!g_variant_dict_lookup (&dict, "count", "u", &count))- {- g_set_error (...);- g_variant_dict_clear (&dict);- return NULL;- }-- g_variant_dict_insert (&dict, "count", "u", count + 1);-- return g_variant_dict_end (&dict);- }-]|--## Using heap-allocated GVariantDict--|[<!-- language="C" -->- GVariant *- add_to_count (GVariant *orig,- GError **error)- {- GVariantDict *dict;- GVariant *result;- guint32 count;-- dict = g_variant_dict_new (orig);-- if (g_variant_dict_lookup (dict, "count", "u", &count))- {- g_variant_dict_insert (dict, "count", "u", count + 1);- result = g_variant_dict_end (dict);- }- else- {- g_set_error (...);- result = NULL;- }-- g_variant_dict_unref (dict);-- return result;- }-]|--}--module GI.GLib.Structs.VariantDict- ( ---- * Exported types- VariantDict(..) ,- newZeroVariantDict ,- noVariantDict ,--- -- * Methods--- ** variantDictClear- VariantDictClearMethodInfo ,- variantDictClear ,----- ** variantDictContains- VariantDictContainsMethodInfo ,- variantDictContains ,----- ** variantDictEnd- VariantDictEndMethodInfo ,- variantDictEnd ,----- ** variantDictInsertValue- VariantDictInsertValueMethodInfo ,- variantDictInsertValue ,----- ** variantDictLookupValue- VariantDictLookupValueMethodInfo ,- variantDictLookupValue ,----- ** variantDictNew- variantDictNew ,----- ** variantDictRef- VariantDictRefMethodInfo ,- variantDictRef ,----- ** variantDictRemove- VariantDictRemoveMethodInfo ,- variantDictRemove ,----- ** variantDictUnref- VariantDictUnrefMethodInfo ,- variantDictUnref ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype VariantDict = VariantDict (ForeignPtr VariantDict)-foreign import ccall "g_variant_dict_get_type" c_g_variant_dict_get_type :: - IO GType--instance BoxedObject VariantDict where- boxedType _ = c_g_variant_dict_get_type---- | Construct a `VariantDict` struct initialized to zero.-newZeroVariantDict :: MonadIO m => m VariantDict-newZeroVariantDict = liftIO $ callocBoxedBytes 128 >>= wrapBoxed VariantDict--instance tag ~ 'AttrSet => Constructible VariantDict tag where- new _ attrs = do- o <- newZeroVariantDict- GI.Attributes.set o attrs- return o---noVariantDict :: Maybe VariantDict-noVariantDict = Nothing---type instance AttributeList VariantDict = VariantDictAttributeList-type VariantDictAttributeList = ('[ ] :: [(Symbol, *)])---- method VariantDict::new--- method type : Constructor--- Args : [Arg {argCName = "from_asv", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantDict")--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_new" g_variant_dict_new :: - Ptr GVariant -> -- from_asv : TVariant- IO (Ptr VariantDict)---variantDictNew ::- (MonadIO m) =>- Maybe (GVariant) -- fromAsv- -> m VariantDict -- result-variantDictNew fromAsv = liftIO $ do- maybeFromAsv <- case fromAsv of- Nothing -> return nullPtr- Just jFromAsv -> do- let jFromAsv' = unsafeManagedPtrGetPtr jFromAsv- return jFromAsv'- result <- g_variant_dict_new maybeFromAsv- checkUnexpectedReturnNULL "g_variant_dict_new" result- result' <- (wrapBoxed VariantDict) result- return result'---- method VariantDict::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_clear" g_variant_dict_clear :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- IO ()---variantDictClear ::- (MonadIO m) =>- VariantDict -- _obj- -> m () -- result-variantDictClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_variant_dict_clear _obj'- touchManagedPtr _obj- return ()--data VariantDictClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo VariantDictClearMethodInfo VariantDict signature where- overloadedMethod _ = variantDictClear---- method VariantDict::contains--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_contains" g_variant_dict_contains :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- CString -> -- key : TBasicType TUTF8- IO CInt---variantDictContains ::- (MonadIO m) =>- VariantDict -- _obj- -> T.Text -- key- -> m Bool -- result-variantDictContains _obj key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- key' <- textToCString key- result <- g_variant_dict_contains _obj' key'- let result' = (/= 0) result- touchManagedPtr _obj- freeMem key'- return result'--data VariantDictContainsMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m) => MethodInfo VariantDictContainsMethodInfo VariantDict signature where- overloadedMethod _ = variantDictContains---- method VariantDict::end--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just TVariant--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_end" g_variant_dict_end :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- IO (Ptr GVariant)---variantDictEnd ::- (MonadIO m) =>- VariantDict -- _obj- -> m GVariant -- result-variantDictEnd _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_dict_end _obj'- checkUnexpectedReturnNULL "g_variant_dict_end" result- result' <- newGVariantFromPtr result- touchManagedPtr _obj- return result'--data VariantDictEndMethodInfo-instance (signature ~ (m GVariant), MonadIO m) => MethodInfo VariantDictEndMethodInfo VariantDict signature where- overloadedMethod _ = variantDictEnd---- method VariantDict::insert_value--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_insert_value" g_variant_dict_insert_value :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- CString -> -- key : TBasicType TUTF8- Ptr GVariant -> -- value : TVariant- IO ()---variantDictInsertValue ::- (MonadIO m) =>- VariantDict -- _obj- -> T.Text -- key- -> GVariant -- value- -> m () -- result-variantDictInsertValue _obj key value = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- key' <- textToCString key- let value' = unsafeManagedPtrGetPtr value- g_variant_dict_insert_value _obj' key' value'- touchManagedPtr _obj- freeMem key'- return ()--data VariantDictInsertValueMethodInfo-instance (signature ~ (T.Text -> GVariant -> m ()), MonadIO m) => MethodInfo VariantDictInsertValueMethodInfo VariantDict signature where- overloadedMethod _ = variantDictInsertValue---- method VariantDict::lookup_value--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "expected_type", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just TVariant--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_lookup_value" g_variant_dict_lookup_value :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- CString -> -- key : TBasicType TUTF8- Ptr VariantType -> -- expected_type : TInterface "GLib" "VariantType"- IO (Ptr GVariant)---variantDictLookupValue ::- (MonadIO m) =>- VariantDict -- _obj- -> T.Text -- key- -> Maybe (VariantType) -- expectedType- -> m GVariant -- result-variantDictLookupValue _obj key expectedType = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- key' <- textToCString key- maybeExpectedType <- case expectedType of- Nothing -> return nullPtr- Just jExpectedType -> do- let jExpectedType' = unsafeManagedPtrGetPtr jExpectedType- return jExpectedType'- result <- g_variant_dict_lookup_value _obj' key' maybeExpectedType- checkUnexpectedReturnNULL "g_variant_dict_lookup_value" result- result' <- wrapGVariantPtr result- touchManagedPtr _obj- whenJust expectedType touchManagedPtr- freeMem key'- return result'--data VariantDictLookupValueMethodInfo-instance (signature ~ (T.Text -> Maybe (VariantType) -> m GVariant), MonadIO m) => MethodInfo VariantDictLookupValueMethodInfo VariantDict signature where- overloadedMethod _ = variantDictLookupValue---- method VariantDict::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantDict")--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_ref" g_variant_dict_ref :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- IO (Ptr VariantDict)---variantDictRef ::- (MonadIO m) =>- VariantDict -- _obj- -> m VariantDict -- result-variantDictRef _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_dict_ref _obj'- checkUnexpectedReturnNULL "g_variant_dict_ref" result- result' <- (wrapBoxed VariantDict) result- touchManagedPtr _obj- return result'--data VariantDictRefMethodInfo-instance (signature ~ (m VariantDict), MonadIO m) => MethodInfo VariantDictRefMethodInfo VariantDict signature where- overloadedMethod _ = variantDictRef---- method VariantDict::remove--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_remove" g_variant_dict_remove :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- CString -> -- key : TBasicType TUTF8- IO CInt---variantDictRemove ::- (MonadIO m) =>- VariantDict -- _obj- -> T.Text -- key- -> m Bool -- result-variantDictRemove _obj key = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- key' <- textToCString key- result <- g_variant_dict_remove _obj' key'- let result' = (/= 0) result- touchManagedPtr _obj- freeMem key'- return result'--data VariantDictRemoveMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m) => MethodInfo VariantDictRemoveMethodInfo VariantDict signature where- overloadedMethod _ = variantDictRemove---- method VariantDict::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantDict", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_dict_unref" g_variant_dict_unref :: - Ptr VariantDict -> -- _obj : TInterface "GLib" "VariantDict"- IO ()---variantDictUnref ::- (MonadIO m) =>- VariantDict -- _obj- -> m () -- result-variantDictUnref _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_variant_dict_unref _obj'- touchManagedPtr _obj- return ()--data VariantDictUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo VariantDictUnrefMethodInfo VariantDict signature where- overloadedMethod _ = variantDictUnref--type family ResolveVariantDictMethod (t :: Symbol) (o :: *) :: * where- ResolveVariantDictMethod "clear" o = VariantDictClearMethodInfo- ResolveVariantDictMethod "contains" o = VariantDictContainsMethodInfo- ResolveVariantDictMethod "end" o = VariantDictEndMethodInfo- ResolveVariantDictMethod "insertValue" o = VariantDictInsertValueMethodInfo- ResolveVariantDictMethod "lookupValue" o = VariantDictLookupValueMethodInfo- ResolveVariantDictMethod "ref" o = VariantDictRefMethodInfo- ResolveVariantDictMethod "remove" o = VariantDictRemoveMethodInfo- ResolveVariantDictMethod "unref" o = VariantDictUnrefMethodInfo- ResolveVariantDictMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveVariantDictMethod t VariantDict, MethodInfo info VariantDict p) => IsLabelProxy t (VariantDict -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveVariantDictMethod t VariantDict, MethodInfo info VariantDict p) => IsLabel t (VariantDict -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/VariantDict.hs-boot
@@ -1,19 +0,0 @@-module GI.GLib.Structs.VariantDict where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype VariantDict = VariantDict (ForeignPtr VariantDict)-instance BoxedObject VariantDict where-data VariantDictClearMethodInfo-data VariantDictContainsMethodInfo-data VariantDictEndMethodInfo-data VariantDictInsertValueMethodInfo-data VariantDictLookupValueMethodInfo-data VariantDictRefMethodInfo-data VariantDictRemoveMethodInfo-data VariantDictUnrefMethodInfo
− GI/GLib/Structs/VariantType.hs
@@ -1,1180 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)--This section introduces the GVariant type system. It is based, in-large part, on the D-Bus type system, with two major changes and-some minor lifting of restrictions. The-[D-Bus specification](http://dbus.freedesktop.org/doc/dbus-specification.html),-therefore, provides a significant amount of-information that is useful when working with GVariant.--The first major change with respect to the D-Bus type system is the-introduction of maybe (or "nullable") types. Any type in GVariant can be-converted to a maybe type, in which case, "nothing" (or "null") becomes a-valid value. Maybe types have been added by introducing the-character "m" to type strings.--The second major change is that the GVariant type system supports the-concept of "indefinite types" -- types that are less specific than-the normal types found in D-Bus. For example, it is possible to speak-of "an array of any type" in GVariant, where the D-Bus type system-would require you to speak of "an array of integers" or "an array of-strings". Indefinite types have been added by introducing the-characters "*", "?" and "r" to type strings.--Finally, all arbitrary restrictions relating to the complexity of-types are lifted along with the restriction that dictionary entries-may only appear nested inside of arrays.--Just as in D-Bus, GVariant types are described with strings ("type-strings"). Subject to the differences mentioned above, these strings-are of the same form as those found in DBus. Note, however: D-Bus-always works in terms of messages and therefore individual type-strings appear nowhere in its interface. Instead, "signatures"-are a concatenation of the strings of the type of each argument in a-message. GVariant deals with single values directly so GVariant type-strings always describe the type of exactly one value. This means-that a D-Bus signature string is generally not a valid GVariant type-string -- except in the case that it is the signature of a message-containing exactly one argument.--An indefinite type is similar in spirit to what may be called an-abstract type in other type systems. No value can exist that has an-indefinite type as its type, but values can exist that have types-that are subtypes of indefinite types. That is to say,-g_variant_get_type() will never return an indefinite type, but-calling g_variant_is_of_type() with an indefinite type may return-%TRUE. For example, you cannot have a value that represents "an-array of no particular type", but you can have an "array of integers"-which certainly matches the type of "an array of no particular type",-since "array of integers" is a subtype of "array of no particular-type".--This is similar to how instances of abstract classes may not-directly exist in other type systems, but instances of their-non-abstract subtypes may. For example, in GTK, no object that has-the type of #GtkBin can exist (since #GtkBin is an abstract class),-but a #GtkWindow can certainly be instantiated, and you would say-that the #GtkWindow is a #GtkBin (since #GtkWindow is a subclass of-#GtkBin).--## GVariant Type Strings--A GVariant type string can be any of the following:--- any basic type string (listed below)--- "v", "r" or "*"--- one of the characters 'a' or 'm', followed by another type string--- the character '(', followed by a concatenation of zero or more other- type strings, followed by the character ')'--- the character '{', followed by a basic type string (see below),- followed by another type string, followed by the character '}'--A basic type string describes a basic type (as per-g_variant_type_is_basic()) and is always a single character in length.-The valid basic type strings are "b", "y", "n", "q", "i", "u", "x", "t",-"h", "d", "s", "o", "g" and "?".--The above definition is recursive to arbitrary depth. "aaaaai" and-"(ui(nq((y)))s)" are both valid type strings, as is-"a(aa(ui)(qna{ya(yd)}))".--The meaning of each of the characters is as follows:-- `b`: the type string of %G_VARIANT_TYPE_BOOLEAN; a boolean value.-- `y`: the type string of %G_VARIANT_TYPE_BYTE; a byte.-- `n`: the type string of %G_VARIANT_TYPE_INT16; a signed 16 bit integer.-- `q`: the type string of %G_VARIANT_TYPE_UINT16; an unsigned 16 bit integer.-- `i`: the type string of %G_VARIANT_TYPE_INT32; a signed 32 bit integer.-- `u`: the type string of %G_VARIANT_TYPE_UINT32; an unsigned 32 bit integer.-- `x`: the type string of %G_VARIANT_TYPE_INT64; a signed 64 bit integer.-- `t`: the type string of %G_VARIANT_TYPE_UINT64; an unsigned 64 bit integer.-- `h`: the type string of %G_VARIANT_TYPE_HANDLE; a signed 32 bit value- that, by convention, is used as an index into an array of file- descriptors that are sent alongside a D-Bus message.-- `d`: the type string of %G_VARIANT_TYPE_DOUBLE; a double precision- floating point value.-- `s`: the type string of %G_VARIANT_TYPE_STRING; a string.-- `o`: the type string of %G_VARIANT_TYPE_OBJECT_PATH; a string in the form- of a D-Bus object path.-- `g`: the type string of %G_VARIANT_TYPE_STRING; a string in the form of- a D-Bus type signature.-- `?`: the type string of %G_VARIANT_TYPE_BASIC; an indefinite type that- is a supertype of any of the basic types.-- `v`: the type string of %G_VARIANT_TYPE_VARIANT; a container type that- contain any other type of value.-- `a`: used as a prefix on another type string to mean an array of that- type; the type string "ai", for example, is the type of an array of- signed 32-bit integers.-- `m`: used as a prefix on another type string to mean a "maybe", or- "nullable", version of that type; the type string "ms", for example,- is the type of a value that maybe contains a string, or maybe contains- nothing.-- `()`: used to enclose zero or more other concatenated type strings to- create a tuple type; the type string "(is)", for example, is the type of- a pair of an integer and a string.-- `r`: the type string of %G_VARIANT_TYPE_TUPLE; an indefinite type that is- a supertype of any tuple type, regardless of the number of items.-- `{}`: used to enclose a basic type string concatenated with another type- string to create a dictionary entry type, which usually appears inside of- an array to form a dictionary; the type string "a{sd}", for example, is- the type of a dictionary that maps strings to double precision floating- point values.-- The first type (the basic type) is the key type and the second type is- the value type. The reason that the first type is restricted to being a- basic type is so that it can easily be hashed.-- `*`: the type string of %G_VARIANT_TYPE_ANY; the indefinite type that is- a supertype of all types. Note that, as with all type strings, this- character represents exactly one type. It cannot be used inside of tuples- to mean "any number of items".--Any type string of a container that contains an indefinite type is,-itself, an indefinite type. For example, the type string "a*"-(corresponding to %G_VARIANT_TYPE_ARRAY) is an indefinite type-that is a supertype of every array type. "(*s)" is a supertype-of all tuples that contain exactly two items where the second-item is a string.--"a{?*}" is an indefinite type that is a supertype of all arrays-containing dictionary entries where the key is any basic type and-the value is any type at all. This is, by definition, a dictionary,-so this type string corresponds to %G_VARIANT_TYPE_DICTIONARY. Note-that, due to the restriction that the key of a dictionary entry must-be a basic type, "{**}" is not a valid type string.--}--module GI.GLib.Structs.VariantType- ( ---- * Exported types- VariantType(..) ,- noVariantType ,--- -- * Methods--- ** variantTypeChecked_- variantTypeChecked_ ,----- ** variantTypeCopy- VariantTypeCopyMethodInfo ,- variantTypeCopy ,----- ** variantTypeDupString- VariantTypeDupStringMethodInfo ,- variantTypeDupString ,----- ** variantTypeElement- VariantTypeElementMethodInfo ,- variantTypeElement ,----- ** variantTypeEqual- VariantTypeEqualMethodInfo ,- variantTypeEqual ,----- ** variantTypeFirst- VariantTypeFirstMethodInfo ,- variantTypeFirst ,----- ** variantTypeFree- VariantTypeFreeMethodInfo ,- variantTypeFree ,----- ** variantTypeGetStringLength- VariantTypeGetStringLengthMethodInfo ,- variantTypeGetStringLength ,----- ** variantTypeHash- VariantTypeHashMethodInfo ,- variantTypeHash ,----- ** variantTypeIsArray- VariantTypeIsArrayMethodInfo ,- variantTypeIsArray ,----- ** variantTypeIsBasic- VariantTypeIsBasicMethodInfo ,- variantTypeIsBasic ,----- ** variantTypeIsContainer- VariantTypeIsContainerMethodInfo ,- variantTypeIsContainer ,----- ** variantTypeIsDefinite- VariantTypeIsDefiniteMethodInfo ,- variantTypeIsDefinite ,----- ** variantTypeIsDictEntry- VariantTypeIsDictEntryMethodInfo ,- variantTypeIsDictEntry ,----- ** variantTypeIsMaybe- VariantTypeIsMaybeMethodInfo ,- variantTypeIsMaybe ,----- ** variantTypeIsSubtypeOf- VariantTypeIsSubtypeOfMethodInfo ,- variantTypeIsSubtypeOf ,----- ** variantTypeIsTuple- VariantTypeIsTupleMethodInfo ,- variantTypeIsTuple ,----- ** variantTypeIsVariant- VariantTypeIsVariantMethodInfo ,- variantTypeIsVariant ,----- ** variantTypeKey- VariantTypeKeyMethodInfo ,- variantTypeKey ,----- ** variantTypeNItems- VariantTypeNItemsMethodInfo ,- variantTypeNItems ,----- ** variantTypeNew- variantTypeNew ,----- ** variantTypeNewArray- variantTypeNewArray ,----- ** variantTypeNewDictEntry- variantTypeNewDictEntry ,----- ** variantTypeNewMaybe- variantTypeNewMaybe ,----- ** variantTypeNewTuple- variantTypeNewTuple ,----- ** variantTypeNext- VariantTypeNextMethodInfo ,- variantTypeNext ,----- ** variantTypeStringIsValid- variantTypeStringIsValid ,----- ** variantTypeStringScan- variantTypeStringScan ,----- ** variantTypeValue- VariantTypeValueMethodInfo ,- variantTypeValue ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype VariantType = VariantType (ForeignPtr VariantType)-foreign import ccall "g_variant_type_get_gtype" c_g_variant_type_get_gtype :: - IO GType--instance BoxedObject VariantType where- boxedType _ = c_g_variant_type_get_gtype--noVariantType :: Maybe VariantType-noVariantType = Nothing---type instance AttributeList VariantType = VariantTypeAttributeList-type VariantTypeAttributeList = ('[ ] :: [(Symbol, *)])---- method VariantType::new--- method type : Constructor--- Args : [Arg {argCName = "type_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_new" g_variant_type_new :: - CString -> -- type_string : TBasicType TUTF8- IO (Ptr VariantType)---variantTypeNew ::- (MonadIO m) =>- T.Text -- typeString- -> m VariantType -- result-variantTypeNew typeString = liftIO $ do- typeString' <- textToCString typeString- result <- g_variant_type_new typeString'- checkUnexpectedReturnNULL "g_variant_type_new" result- result' <- (wrapBoxed VariantType) result- freeMem typeString'- return result'---- method VariantType::new_array--- method type : Constructor--- Args : [Arg {argCName = "element", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_new_array" g_variant_type_new_array :: - Ptr VariantType -> -- element : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeNewArray ::- (MonadIO m) =>- VariantType -- element- -> m VariantType -- result-variantTypeNewArray element = liftIO $ do- let element' = unsafeManagedPtrGetPtr element- result <- g_variant_type_new_array element'- checkUnexpectedReturnNULL "g_variant_type_new_array" result- result' <- (wrapBoxed VariantType) result- touchManagedPtr element- return result'---- method VariantType::new_dict_entry--- method type : Constructor--- Args : [Arg {argCName = "key", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_new_dict_entry" g_variant_type_new_dict_entry :: - Ptr VariantType -> -- key : TInterface "GLib" "VariantType"- Ptr VariantType -> -- value : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeNewDictEntry ::- (MonadIO m) =>- VariantType -- key- -> VariantType -- value- -> m VariantType -- result-variantTypeNewDictEntry key value = liftIO $ do- let key' = unsafeManagedPtrGetPtr key- let value' = unsafeManagedPtrGetPtr value- result <- g_variant_type_new_dict_entry key' value'- checkUnexpectedReturnNULL "g_variant_type_new_dict_entry" result- result' <- (wrapBoxed VariantType) result- touchManagedPtr key- touchManagedPtr value- return result'---- method VariantType::new_maybe--- method type : Constructor--- Args : [Arg {argCName = "element", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_new_maybe" g_variant_type_new_maybe :: - Ptr VariantType -> -- element : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeNewMaybe ::- (MonadIO m) =>- VariantType -- element- -> m VariantType -- result-variantTypeNewMaybe element = liftIO $ do- let element' = unsafeManagedPtrGetPtr element- result <- g_variant_type_new_maybe element'- checkUnexpectedReturnNULL "g_variant_type_new_maybe" result- result' <- (wrapBoxed VariantType) result- touchManagedPtr element- return result'---- method VariantType::new_tuple--- method type : Constructor--- Args : [Arg {argCName = "items", argType = TCArray False (-1) 1 (TInterface "GLib" "VariantType"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_new_tuple" g_variant_type_new_tuple :: - Ptr (Ptr VariantType) -> -- items : TCArray False (-1) 1 (TInterface "GLib" "VariantType")- Int32 -> -- length : TBasicType TInt- IO (Ptr VariantType)---variantTypeNewTuple ::- (MonadIO m) =>- [VariantType] -- items- -> m VariantType -- result-variantTypeNewTuple items = liftIO $ do- let length_ = fromIntegral $ length items- let items' = map unsafeManagedPtrGetPtr items- items'' <- packPtrArray items'- result <- g_variant_type_new_tuple items'' length_- checkUnexpectedReturnNULL "g_variant_type_new_tuple" result- result' <- (wrapBoxed VariantType) result- mapM_ touchManagedPtr items- freeMem items''- return result'---- method VariantType::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_copy" g_variant_type_copy :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeCopy ::- (MonadIO m) =>- VariantType -- _obj- -> m VariantType -- result-variantTypeCopy _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_copy _obj'- checkUnexpectedReturnNULL "g_variant_type_copy" result- result' <- (wrapBoxed VariantType) result- touchManagedPtr _obj- return result'--data VariantTypeCopyMethodInfo-instance (signature ~ (m VariantType), MonadIO m) => MethodInfo VariantTypeCopyMethodInfo VariantType signature where- overloadedMethod _ = variantTypeCopy---- method VariantType::dup_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_dup_string" g_variant_type_dup_string :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CString---variantTypeDupString ::- (MonadIO m) =>- VariantType -- _obj- -> m T.Text -- result-variantTypeDupString _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_dup_string _obj'- checkUnexpectedReturnNULL "g_variant_type_dup_string" result- result' <- cstringToText result- freeMem result- touchManagedPtr _obj- return result'--data VariantTypeDupStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => MethodInfo VariantTypeDupStringMethodInfo VariantType signature where- overloadedMethod _ = variantTypeDupString---- method VariantType::element--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_element" g_variant_type_element :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeElement ::- (MonadIO m) =>- VariantType -- _obj- -> m VariantType -- result-variantTypeElement _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_element _obj'- checkUnexpectedReturnNULL "g_variant_type_element" result- result' <- (newBoxed VariantType) result- touchManagedPtr _obj- return result'--data VariantTypeElementMethodInfo-instance (signature ~ (m VariantType), MonadIO m) => MethodInfo VariantTypeElementMethodInfo VariantType signature where- overloadedMethod _ = variantTypeElement---- method VariantType::equal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "type2", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_equal" g_variant_type_equal :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- Ptr VariantType -> -- type2 : TInterface "GLib" "VariantType"- IO CInt---variantTypeEqual ::- (MonadIO m) =>- VariantType -- _obj- -> VariantType -- type2- -> m Bool -- result-variantTypeEqual _obj type2 = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let type2' = unsafeManagedPtrGetPtr type2- result <- g_variant_type_equal _obj' type2'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr type2- return result'--data VariantTypeEqualMethodInfo-instance (signature ~ (VariantType -> m Bool), MonadIO m) => MethodInfo VariantTypeEqualMethodInfo VariantType signature where- overloadedMethod _ = variantTypeEqual---- method VariantType::first--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_first" g_variant_type_first :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeFirst ::- (MonadIO m) =>- VariantType -- _obj- -> m VariantType -- result-variantTypeFirst _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_first _obj'- checkUnexpectedReturnNULL "g_variant_type_first" result- result' <- (newBoxed VariantType) result- touchManagedPtr _obj- return result'--data VariantTypeFirstMethodInfo-instance (signature ~ (m VariantType), MonadIO m) => MethodInfo VariantTypeFirstMethodInfo VariantType signature where- overloadedMethod _ = variantTypeFirst---- method VariantType::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_free" g_variant_type_free :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO ()---variantTypeFree ::- (MonadIO m) =>- VariantType -- _obj- -> m () -- result-variantTypeFree _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_variant_type_free _obj'- touchManagedPtr _obj- return ()--data VariantTypeFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo VariantTypeFreeMethodInfo VariantType signature where- overloadedMethod _ = variantTypeFree---- method VariantType::get_string_length--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_get_string_length" g_variant_type_get_string_length :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO Word64---variantTypeGetStringLength ::- (MonadIO m) =>- VariantType -- _obj- -> m Word64 -- result-variantTypeGetStringLength _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_get_string_length _obj'- touchManagedPtr _obj- return result--data VariantTypeGetStringLengthMethodInfo-instance (signature ~ (m Word64), MonadIO m) => MethodInfo VariantTypeGetStringLengthMethodInfo VariantType signature where- overloadedMethod _ = variantTypeGetStringLength---- method VariantType::hash--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_hash" g_variant_type_hash :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO Word32---variantTypeHash ::- (MonadIO m) =>- VariantType -- _obj- -> m Word32 -- result-variantTypeHash _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_hash _obj'- touchManagedPtr _obj- return result--data VariantTypeHashMethodInfo-instance (signature ~ (m Word32), MonadIO m) => MethodInfo VariantTypeHashMethodInfo VariantType signature where- overloadedMethod _ = variantTypeHash---- method VariantType::is_array--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_array" g_variant_type_is_array :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsArray ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsArray _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_array _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsArrayMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsArrayMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsArray---- method VariantType::is_basic--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_basic" g_variant_type_is_basic :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsBasic ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsBasic _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_basic _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsBasicMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsBasicMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsBasic---- method VariantType::is_container--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_container" g_variant_type_is_container :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsContainer ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsContainer _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_container _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsContainerMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsContainerMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsContainer---- method VariantType::is_definite--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_definite" g_variant_type_is_definite :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsDefinite ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsDefinite _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_definite _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsDefiniteMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsDefiniteMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsDefinite---- method VariantType::is_dict_entry--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_dict_entry" g_variant_type_is_dict_entry :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsDictEntry ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsDictEntry _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_dict_entry _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsDictEntryMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsDictEntryMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsDictEntry---- method VariantType::is_maybe--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_maybe" g_variant_type_is_maybe :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsMaybe ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsMaybe _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_maybe _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsMaybeMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsMaybeMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsMaybe---- method VariantType::is_subtype_of--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "supertype", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_subtype_of" g_variant_type_is_subtype_of :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- Ptr VariantType -> -- supertype : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsSubtypeOf ::- (MonadIO m) =>- VariantType -- _obj- -> VariantType -- supertype- -> m Bool -- result-variantTypeIsSubtypeOf _obj supertype = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- let supertype' = unsafeManagedPtrGetPtr supertype- result <- g_variant_type_is_subtype_of _obj' supertype'- let result' = (/= 0) result- touchManagedPtr _obj- touchManagedPtr supertype- return result'--data VariantTypeIsSubtypeOfMethodInfo-instance (signature ~ (VariantType -> m Bool), MonadIO m) => MethodInfo VariantTypeIsSubtypeOfMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsSubtypeOf---- method VariantType::is_tuple--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_tuple" g_variant_type_is_tuple :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsTuple ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsTuple _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_tuple _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsTupleMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsTupleMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsTuple---- method VariantType::is_variant--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_is_variant" g_variant_type_is_variant :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO CInt---variantTypeIsVariant ::- (MonadIO m) =>- VariantType -- _obj- -> m Bool -- result-variantTypeIsVariant _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_is_variant _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data VariantTypeIsVariantMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo VariantTypeIsVariantMethodInfo VariantType signature where- overloadedMethod _ = variantTypeIsVariant---- method VariantType::key--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_key" g_variant_type_key :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeKey ::- (MonadIO m) =>- VariantType -- _obj- -> m VariantType -- result-variantTypeKey _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_key _obj'- checkUnexpectedReturnNULL "g_variant_type_key" result- result' <- (newBoxed VariantType) result- touchManagedPtr _obj- return result'--data VariantTypeKeyMethodInfo-instance (signature ~ (m VariantType), MonadIO m) => MethodInfo VariantTypeKeyMethodInfo VariantType signature where- overloadedMethod _ = variantTypeKey---- method VariantType::n_items--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt64)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_n_items" g_variant_type_n_items :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO Word64---variantTypeNItems ::- (MonadIO m) =>- VariantType -- _obj- -> m Word64 -- result-variantTypeNItems _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_n_items _obj'- touchManagedPtr _obj- return result--data VariantTypeNItemsMethodInfo-instance (signature ~ (m Word64), MonadIO m) => MethodInfo VariantTypeNItemsMethodInfo VariantType signature where- overloadedMethod _ = variantTypeNItems---- method VariantType::next--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_next" g_variant_type_next :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeNext ::- (MonadIO m) =>- VariantType -- _obj- -> m VariantType -- result-variantTypeNext _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_next _obj'- checkUnexpectedReturnNULL "g_variant_type_next" result- result' <- (newBoxed VariantType) result- touchManagedPtr _obj- return result'--data VariantTypeNextMethodInfo-instance (signature ~ (m VariantType), MonadIO m) => MethodInfo VariantTypeNextMethodInfo VariantType signature where- overloadedMethod _ = variantTypeNext---- method VariantType::value--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "VariantType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_value" g_variant_type_value :: - Ptr VariantType -> -- _obj : TInterface "GLib" "VariantType"- IO (Ptr VariantType)---variantTypeValue ::- (MonadIO m) =>- VariantType -- _obj- -> m VariantType -- result-variantTypeValue _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_variant_type_value _obj'- checkUnexpectedReturnNULL "g_variant_type_value" result- result' <- (newBoxed VariantType) result- touchManagedPtr _obj- return result'--data VariantTypeValueMethodInfo-instance (signature ~ (m VariantType), MonadIO m) => MethodInfo VariantTypeValueMethodInfo VariantType signature where- overloadedMethod _ = variantTypeValue---- method VariantType::checked_--- method type : MemberFunction--- Args : [Arg {argCName = "arg0", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface "GLib" "VariantType")--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_checked_" g_variant_type_checked_ :: - CString -> -- arg0 : TBasicType TUTF8- IO (Ptr VariantType)---variantTypeChecked_ ::- (MonadIO m) =>- T.Text -- arg0- -> m VariantType -- result-variantTypeChecked_ arg0 = liftIO $ do- arg0' <- textToCString arg0- result <- g_variant_type_checked_ arg0'- checkUnexpectedReturnNULL "g_variant_type_checked_" result- result' <- (newBoxed VariantType) result- freeMem arg0'- return result'---- method VariantType::string_is_valid--- method type : MemberFunction--- Args : [Arg {argCName = "type_string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_string_is_valid" g_variant_type_string_is_valid :: - CString -> -- type_string : TBasicType TUTF8- IO CInt---variantTypeStringIsValid ::- (MonadIO m) =>- T.Text -- typeString- -> m Bool -- result-variantTypeStringIsValid typeString = liftIO $ do- typeString' <- textToCString typeString- result <- g_variant_type_string_is_valid typeString'- let result' = (/= 0) result- freeMem typeString'- return result'---- method VariantType::string_scan--- method type : MemberFunction--- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "limit", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "endptr", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_variant_type_string_scan" g_variant_type_string_scan :: - CString -> -- string : TBasicType TUTF8- CString -> -- limit : TBasicType TUTF8- Ptr CString -> -- endptr : TBasicType TUTF8- IO CInt---variantTypeStringScan ::- (MonadIO m) =>- T.Text -- string- -> Maybe (T.Text) -- limit- -> m (Bool,T.Text) -- result-variantTypeStringScan string limit = liftIO $ do- string' <- textToCString string- maybeLimit <- case limit of- Nothing -> return nullPtr- Just jLimit -> do- jLimit' <- textToCString jLimit- return jLimit'- endptr <- allocMem :: IO (Ptr CString)- result <- g_variant_type_string_scan string' maybeLimit endptr- let result' = (/= 0) result- endptr' <- peek endptr- endptr'' <- cstringToText endptr'- freeMem endptr'- freeMem string'- freeMem maybeLimit- freeMem endptr- return (result', endptr'')--type family ResolveVariantTypeMethod (t :: Symbol) (o :: *) :: * where- ResolveVariantTypeMethod "copy" o = VariantTypeCopyMethodInfo- ResolveVariantTypeMethod "dupString" o = VariantTypeDupStringMethodInfo- ResolveVariantTypeMethod "element" o = VariantTypeElementMethodInfo- ResolveVariantTypeMethod "equal" o = VariantTypeEqualMethodInfo- ResolveVariantTypeMethod "first" o = VariantTypeFirstMethodInfo- ResolveVariantTypeMethod "free" o = VariantTypeFreeMethodInfo- ResolveVariantTypeMethod "hash" o = VariantTypeHashMethodInfo- ResolveVariantTypeMethod "isArray" o = VariantTypeIsArrayMethodInfo- ResolveVariantTypeMethod "isBasic" o = VariantTypeIsBasicMethodInfo- ResolveVariantTypeMethod "isContainer" o = VariantTypeIsContainerMethodInfo- ResolveVariantTypeMethod "isDefinite" o = VariantTypeIsDefiniteMethodInfo- ResolveVariantTypeMethod "isDictEntry" o = VariantTypeIsDictEntryMethodInfo- ResolveVariantTypeMethod "isMaybe" o = VariantTypeIsMaybeMethodInfo- ResolveVariantTypeMethod "isSubtypeOf" o = VariantTypeIsSubtypeOfMethodInfo- ResolveVariantTypeMethod "isTuple" o = VariantTypeIsTupleMethodInfo- ResolveVariantTypeMethod "isVariant" o = VariantTypeIsVariantMethodInfo- ResolveVariantTypeMethod "key" o = VariantTypeKeyMethodInfo- ResolveVariantTypeMethod "nItems" o = VariantTypeNItemsMethodInfo- ResolveVariantTypeMethod "next" o = VariantTypeNextMethodInfo- ResolveVariantTypeMethod "value" o = VariantTypeValueMethodInfo- ResolveVariantTypeMethod "getStringLength" o = VariantTypeGetStringLengthMethodInfo- ResolveVariantTypeMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveVariantTypeMethod t VariantType, MethodInfo info VariantType p) => IsLabelProxy t (VariantType -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveVariantTypeMethod t VariantType, MethodInfo info VariantType p) => IsLabel t (VariantType -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Structs/VariantType.hs-boot
@@ -1,32 +0,0 @@-module GI.GLib.Structs.VariantType where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype VariantType = VariantType (ForeignPtr VariantType)-instance BoxedObject VariantType where-data VariantTypeCopyMethodInfo-data VariantTypeDupStringMethodInfo-data VariantTypeElementMethodInfo-data VariantTypeEqualMethodInfo-data VariantTypeFirstMethodInfo-data VariantTypeFreeMethodInfo-data VariantTypeGetStringLengthMethodInfo-data VariantTypeHashMethodInfo-data VariantTypeIsArrayMethodInfo-data VariantTypeIsBasicMethodInfo-data VariantTypeIsContainerMethodInfo-data VariantTypeIsDefiniteMethodInfo-data VariantTypeIsDictEntryMethodInfo-data VariantTypeIsMaybeMethodInfo-data VariantTypeIsSubtypeOfMethodInfo-data VariantTypeIsTupleMethodInfo-data VariantTypeIsVariantMethodInfo-data VariantTypeKeyMethodInfo-data VariantTypeNItemsMethodInfo-data VariantTypeNextMethodInfo-data VariantTypeValueMethodInfo
− GI/GLib/Types.hs
@@ -1,148 +0,0 @@-module GI.GLib.Types- ( module GI.GLib.Structs.AsyncQueue ,- module GI.GLib.Structs.BookmarkFile ,- module GI.GLib.Structs.ByteArray ,- module GI.GLib.Structs.Bytes ,- module GI.GLib.Structs.Checksum ,- module GI.GLib.Structs.Cond ,- module GI.GLib.Structs.Data ,- module GI.GLib.Structs.Date ,- module GI.GLib.Structs.DateTime ,- module GI.GLib.Structs.DebugKey ,- module GI.GLib.Structs.Dir ,- module GI.GLib.Structs.HashTableIter ,- module GI.GLib.Structs.Hmac ,- module GI.GLib.Structs.Hook ,- module GI.GLib.Structs.HookList ,- module GI.GLib.Structs.IConv ,- module GI.GLib.Structs.IOChannel ,- module GI.GLib.Structs.IOFuncs ,- module GI.GLib.Structs.KeyFile ,- module GI.GLib.Structs.MainContext ,- module GI.GLib.Structs.MainLoop ,- module GI.GLib.Structs.MappedFile ,- module GI.GLib.Structs.MarkupParseContext,- module GI.GLib.Structs.MarkupParser ,- module GI.GLib.Structs.MatchInfo ,- module GI.GLib.Structs.MemVTable ,- module GI.GLib.Structs.Node ,- module GI.GLib.Structs.Once ,- module GI.GLib.Structs.OptionContext ,- module GI.GLib.Structs.OptionEntry ,- module GI.GLib.Structs.OptionGroup ,- module GI.GLib.Structs.PatternSpec ,- module GI.GLib.Structs.PollFD ,- module GI.GLib.Structs.PtrArray ,- module GI.GLib.Structs.Queue ,- module GI.GLib.Structs.RWLock ,- module GI.GLib.Structs.Rand ,- module GI.GLib.Structs.RecMutex ,- module GI.GLib.Structs.Regex ,- module GI.GLib.Structs.Scanner ,- module GI.GLib.Structs.ScannerConfig ,- module GI.GLib.Structs.Sequence ,- module GI.GLib.Structs.SequenceIter ,- module GI.GLib.Structs.Source ,- module GI.GLib.Structs.SourceCallbackFuncs,- module GI.GLib.Structs.SourceFuncs ,- module GI.GLib.Structs.StatBuf ,- module GI.GLib.Structs.String ,- module GI.GLib.Structs.StringChunk ,- module GI.GLib.Structs.TestCase ,- module GI.GLib.Structs.TestConfig ,- module GI.GLib.Structs.TestLogBuffer ,- module GI.GLib.Structs.TestLogMsg ,- module GI.GLib.Structs.TestSuite ,- module GI.GLib.Structs.Thread ,- module GI.GLib.Structs.ThreadPool ,- module GI.GLib.Structs.TimeVal ,- module GI.GLib.Structs.TimeZone ,- module GI.GLib.Structs.Timer ,- module GI.GLib.Structs.TrashStack ,- module GI.GLib.Structs.Tree ,- module GI.GLib.Structs.VariantBuilder ,- module GI.GLib.Structs.VariantDict ,- module GI.GLib.Structs.VariantType ,- module GI.GLib.Unions.DoubleIEEE754 ,- module GI.GLib.Unions.FloatIEEE754 ,- module GI.GLib.Unions.Mutex ,- module GI.GLib.Unions.TokenValue ,- module GI.GLib.Enums ,- module GI.GLib.Flags ,--- ) where---import {-# SOURCE #-} GI.GLib.Structs.AsyncQueue-import {-# SOURCE #-} GI.GLib.Structs.BookmarkFile-import {-# SOURCE #-} GI.GLib.Structs.ByteArray-import {-# SOURCE #-} GI.GLib.Structs.Bytes-import {-# SOURCE #-} GI.GLib.Structs.Checksum-import {-# SOURCE #-} GI.GLib.Structs.Cond-import {-# SOURCE #-} GI.GLib.Structs.Data-import {-# SOURCE #-} GI.GLib.Structs.Date-import {-# SOURCE #-} GI.GLib.Structs.DateTime-import {-# SOURCE #-} GI.GLib.Structs.DebugKey-import {-# SOURCE #-} GI.GLib.Structs.Dir-import {-# SOURCE #-} GI.GLib.Structs.HashTableIter-import {-# SOURCE #-} GI.GLib.Structs.Hmac-import {-# SOURCE #-} GI.GLib.Structs.Hook-import {-# SOURCE #-} GI.GLib.Structs.HookList-import {-# SOURCE #-} GI.GLib.Structs.IConv-import {-# SOURCE #-} GI.GLib.Structs.IOChannel-import {-# SOURCE #-} GI.GLib.Structs.IOFuncs-import {-# SOURCE #-} GI.GLib.Structs.KeyFile-import {-# SOURCE #-} GI.GLib.Structs.MainContext-import {-# SOURCE #-} GI.GLib.Structs.MainLoop-import {-# SOURCE #-} GI.GLib.Structs.MappedFile-import {-# SOURCE #-} GI.GLib.Structs.MarkupParseContext-import {-# SOURCE #-} GI.GLib.Structs.MarkupParser-import {-# SOURCE #-} GI.GLib.Structs.MatchInfo-import {-# SOURCE #-} GI.GLib.Structs.MemVTable-import {-# SOURCE #-} GI.GLib.Structs.Node-import {-# SOURCE #-} GI.GLib.Structs.Once-import {-# SOURCE #-} GI.GLib.Structs.OptionContext-import {-# SOURCE #-} GI.GLib.Structs.OptionEntry-import {-# SOURCE #-} GI.GLib.Structs.OptionGroup-import {-# SOURCE #-} GI.GLib.Structs.PatternSpec-import {-# SOURCE #-} GI.GLib.Structs.PollFD-import {-# SOURCE #-} GI.GLib.Structs.PtrArray-import {-# SOURCE #-} GI.GLib.Structs.Queue-import {-# SOURCE #-} GI.GLib.Structs.RWLock-import {-# SOURCE #-} GI.GLib.Structs.Rand-import {-# SOURCE #-} GI.GLib.Structs.RecMutex-import {-# SOURCE #-} GI.GLib.Structs.Regex-import {-# SOURCE #-} GI.GLib.Structs.Scanner-import {-# SOURCE #-} GI.GLib.Structs.ScannerConfig-import {-# SOURCE #-} GI.GLib.Structs.Sequence-import {-# SOURCE #-} GI.GLib.Structs.SequenceIter-import {-# SOURCE #-} GI.GLib.Structs.Source-import {-# SOURCE #-} GI.GLib.Structs.SourceCallbackFuncs-import {-# SOURCE #-} GI.GLib.Structs.SourceFuncs-import {-# SOURCE #-} GI.GLib.Structs.StatBuf-import {-# SOURCE #-} GI.GLib.Structs.String-import {-# SOURCE #-} GI.GLib.Structs.StringChunk-import {-# SOURCE #-} GI.GLib.Structs.TestCase-import {-# SOURCE #-} GI.GLib.Structs.TestConfig-import {-# SOURCE #-} GI.GLib.Structs.TestLogBuffer-import {-# SOURCE #-} GI.GLib.Structs.TestLogMsg-import {-# SOURCE #-} GI.GLib.Structs.TestSuite-import {-# SOURCE #-} GI.GLib.Structs.Thread-import {-# SOURCE #-} GI.GLib.Structs.ThreadPool-import {-# SOURCE #-} GI.GLib.Structs.TimeVal-import {-# SOURCE #-} GI.GLib.Structs.TimeZone-import {-# SOURCE #-} GI.GLib.Structs.Timer-import {-# SOURCE #-} GI.GLib.Structs.TrashStack-import {-# SOURCE #-} GI.GLib.Structs.Tree-import {-# SOURCE #-} GI.GLib.Structs.VariantBuilder-import {-# SOURCE #-} GI.GLib.Structs.VariantDict-import {-# SOURCE #-} GI.GLib.Structs.VariantType-import {-# SOURCE #-} GI.GLib.Unions.DoubleIEEE754-import {-# SOURCE #-} GI.GLib.Unions.FloatIEEE754-import {-# SOURCE #-} GI.GLib.Unions.Mutex-import {-# SOURCE #-} GI.GLib.Unions.TokenValue--import GI.GLib.Enums-import GI.GLib.Flags-
− GI/GLib/Unions.hs
@@ -1,33 +0,0 @@---{- |-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.GLib.Unions- ( module GI.GLib.Unions.DoubleIEEE754 ,- module GI.GLib.Unions.FloatIEEE754 ,- module GI.GLib.Unions.Mutex ,- module GI.GLib.Unions.TokenValue ,--- ) where--import GI.GLib.Unions.DoubleIEEE754-import GI.GLib.Unions.FloatIEEE754-import GI.GLib.Unions.Mutex-import GI.GLib.Unions.TokenValue--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--
− GI/GLib/Unions/DoubleIEEE754.hs
@@ -1,101 +0,0 @@---{- |-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.GLib.Unions.DoubleIEEE754- ( ---- * Exported types- DoubleIEEE754(..) ,- newZeroDoubleIEEE754 ,- noDoubleIEEE754 ,--- -- * Properties--- ** VDouble- doubleIEEE754ReadVDouble ,- doubleIEEE754VDouble ,- doubleIEEE754WriteVDouble ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype DoubleIEEE754 = DoubleIEEE754 (ForeignPtr DoubleIEEE754)-instance WrappedPtr DoubleIEEE754 where- wrappedPtrCalloc = callocBytes 8- wrappedPtrCopy = copyPtr 8- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `DoubleIEEE754` struct initialized to zero.-newZeroDoubleIEEE754 :: MonadIO m => m DoubleIEEE754-newZeroDoubleIEEE754 = liftIO $ wrappedPtrCalloc >>= wrapPtr DoubleIEEE754--instance tag ~ 'AttrSet => Constructible DoubleIEEE754 tag where- new _ attrs = do- o <- newZeroDoubleIEEE754- GI.Attributes.set o attrs- return o---noDoubleIEEE754 :: Maybe DoubleIEEE754-noDoubleIEEE754 = Nothing--doubleIEEE754ReadVDouble :: MonadIO m => DoubleIEEE754 -> m Double-doubleIEEE754ReadVDouble s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CDouble- let val' = realToFrac val- return val'--doubleIEEE754WriteVDouble :: MonadIO m => DoubleIEEE754 -> Double -> m ()-doubleIEEE754WriteVDouble s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 0) (val' :: CDouble)--data DoubleIEEE754VDoubleFieldInfo-instance AttrInfo DoubleIEEE754VDoubleFieldInfo where- type AttrAllowedOps DoubleIEEE754VDoubleFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint DoubleIEEE754VDoubleFieldInfo = (~) Double- type AttrBaseTypeConstraint DoubleIEEE754VDoubleFieldInfo = (~) DoubleIEEE754- type AttrGetType DoubleIEEE754VDoubleFieldInfo = Double- type AttrLabel DoubleIEEE754VDoubleFieldInfo = "v_double"- attrGet _ = doubleIEEE754ReadVDouble- attrSet _ = doubleIEEE754WriteVDouble- attrConstruct = undefined- attrClear _ = undefined--doubleIEEE754VDouble :: AttrLabelProxy "vDouble"-doubleIEEE754VDouble = AttrLabelProxy----type instance AttributeList DoubleIEEE754 = DoubleIEEE754AttributeList-type DoubleIEEE754AttributeList = ('[ '("vDouble", DoubleIEEE754VDoubleFieldInfo)] :: [(Symbol, *)])--type family ResolveDoubleIEEE754Method (t :: Symbol) (o :: *) :: * where- ResolveDoubleIEEE754Method l o = MethodResolutionFailed l o--instance (info ~ ResolveDoubleIEEE754Method t DoubleIEEE754, MethodInfo info DoubleIEEE754 p) => IsLabelProxy t (DoubleIEEE754 -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveDoubleIEEE754Method t DoubleIEEE754, MethodInfo info DoubleIEEE754 p) => IsLabel t (DoubleIEEE754 -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Unions/DoubleIEEE754.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Unions.DoubleIEEE754 where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype DoubleIEEE754 = DoubleIEEE754 (ForeignPtr DoubleIEEE754)-instance WrappedPtr DoubleIEEE754 where
− GI/GLib/Unions/FloatIEEE754.hs
@@ -1,101 +0,0 @@---{- |-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.GLib.Unions.FloatIEEE754- ( ---- * Exported types- FloatIEEE754(..) ,- newZeroFloatIEEE754 ,- noFloatIEEE754 ,--- -- * Properties--- ** VFloat- floatIEEE754ReadVFloat ,- floatIEEE754VFloat ,- floatIEEE754WriteVFloat ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype FloatIEEE754 = FloatIEEE754 (ForeignPtr FloatIEEE754)-instance WrappedPtr FloatIEEE754 where- wrappedPtrCalloc = callocBytes 4- wrappedPtrCopy = copyPtr 4- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `FloatIEEE754` struct initialized to zero.-newZeroFloatIEEE754 :: MonadIO m => m FloatIEEE754-newZeroFloatIEEE754 = liftIO $ wrappedPtrCalloc >>= wrapPtr FloatIEEE754--instance tag ~ 'AttrSet => Constructible FloatIEEE754 tag where- new _ attrs = do- o <- newZeroFloatIEEE754- GI.Attributes.set o attrs- return o---noFloatIEEE754 :: Maybe FloatIEEE754-noFloatIEEE754 = Nothing--floatIEEE754ReadVFloat :: MonadIO m => FloatIEEE754 -> m Float-floatIEEE754ReadVFloat s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CFloat- let val' = realToFrac val- return val'--floatIEEE754WriteVFloat :: MonadIO m => FloatIEEE754 -> Float -> m ()-floatIEEE754WriteVFloat s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 0) (val' :: CFloat)--data FloatIEEE754VFloatFieldInfo-instance AttrInfo FloatIEEE754VFloatFieldInfo where- type AttrAllowedOps FloatIEEE754VFloatFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint FloatIEEE754VFloatFieldInfo = (~) Float- type AttrBaseTypeConstraint FloatIEEE754VFloatFieldInfo = (~) FloatIEEE754- type AttrGetType FloatIEEE754VFloatFieldInfo = Float- type AttrLabel FloatIEEE754VFloatFieldInfo = "v_float"- attrGet _ = floatIEEE754ReadVFloat- attrSet _ = floatIEEE754WriteVFloat- attrConstruct = undefined- attrClear _ = undefined--floatIEEE754VFloat :: AttrLabelProxy "vFloat"-floatIEEE754VFloat = AttrLabelProxy----type instance AttributeList FloatIEEE754 = FloatIEEE754AttributeList-type FloatIEEE754AttributeList = ('[ '("vFloat", FloatIEEE754VFloatFieldInfo)] :: [(Symbol, *)])--type family ResolveFloatIEEE754Method (t :: Symbol) (o :: *) :: * where- ResolveFloatIEEE754Method l o = MethodResolutionFailed l o--instance (info ~ ResolveFloatIEEE754Method t FloatIEEE754, MethodInfo info FloatIEEE754 p) => IsLabelProxy t (FloatIEEE754 -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveFloatIEEE754Method t FloatIEEE754, MethodInfo info FloatIEEE754 p) => IsLabel t (FloatIEEE754 -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Unions/FloatIEEE754.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Unions.FloatIEEE754 where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype FloatIEEE754 = FloatIEEE754 (ForeignPtr FloatIEEE754)-instance WrappedPtr FloatIEEE754 where
− GI/GLib/Unions/Mutex.hs
@@ -1,234 +0,0 @@---{- |-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.GLib.Unions.Mutex- ( ---- * Exported types- Mutex(..) ,- newZeroMutex ,- noMutex ,--- -- * Methods--- ** mutexClear- MutexClearMethodInfo ,- mutexClear ,----- ** mutexInit- MutexInitMethodInfo ,- mutexInit ,----- ** mutexLock- MutexLockMethodInfo ,- mutexLock ,----- ** mutexTrylock- MutexTrylockMethodInfo ,- mutexTrylock ,----- ** mutexUnlock- MutexUnlockMethodInfo ,- mutexUnlock ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype Mutex = Mutex (ForeignPtr Mutex)-instance WrappedPtr Mutex where- wrappedPtrCalloc = callocBytes 8- wrappedPtrCopy = copyPtr 8- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Mutex` struct initialized to zero.-newZeroMutex :: MonadIO m => m Mutex-newZeroMutex = liftIO $ wrappedPtrCalloc >>= wrapPtr Mutex--instance tag ~ 'AttrSet => Constructible Mutex tag where- new _ attrs = do- o <- newZeroMutex- GI.Attributes.set o attrs- return o---noMutex :: Maybe Mutex-noMutex = Nothing---type instance AttributeList Mutex = MutexAttributeList-type MutexAttributeList = ('[ ] :: [(Symbol, *)])---- method Mutex::clear--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mutex_clear" g_mutex_clear :: - Ptr Mutex -> -- _obj : TInterface "GLib" "Mutex"- IO ()---mutexClear ::- (MonadIO m) =>- Mutex -- _obj- -> m () -- result-mutexClear _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_mutex_clear _obj'- touchManagedPtr _obj- return ()--data MutexClearMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MutexClearMethodInfo Mutex signature where- overloadedMethod _ = mutexClear---- method Mutex::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mutex_init" g_mutex_init :: - Ptr Mutex -> -- _obj : TInterface "GLib" "Mutex"- IO ()---mutexInit ::- (MonadIO m) =>- Mutex -- _obj- -> m () -- result-mutexInit _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_mutex_init _obj'- touchManagedPtr _obj- return ()--data MutexInitMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MutexInitMethodInfo Mutex signature where- overloadedMethod _ = mutexInit---- method Mutex::lock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mutex_lock" g_mutex_lock :: - Ptr Mutex -> -- _obj : TInterface "GLib" "Mutex"- IO ()---mutexLock ::- (MonadIO m) =>- Mutex -- _obj- -> m () -- result-mutexLock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_mutex_lock _obj'- touchManagedPtr _obj- return ()--data MutexLockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MutexLockMethodInfo Mutex signature where- overloadedMethod _ = mutexLock---- method Mutex::trylock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "g_mutex_trylock" g_mutex_trylock :: - Ptr Mutex -> -- _obj : TInterface "GLib" "Mutex"- IO CInt---mutexTrylock ::- (MonadIO m) =>- Mutex -- _obj- -> m Bool -- result-mutexTrylock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- result <- g_mutex_trylock _obj'- let result' = (/= 0) result- touchManagedPtr _obj- return result'--data MutexTrylockMethodInfo-instance (signature ~ (m Bool), MonadIO m) => MethodInfo MutexTrylockMethodInfo Mutex signature where- overloadedMethod _ = mutexTrylock---- method Mutex::unlock--- method type : OrdinaryMethod--- Args : [Arg {argCName = "_obj", argType = TInterface "GLib" "Mutex", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "g_mutex_unlock" g_mutex_unlock :: - Ptr Mutex -> -- _obj : TInterface "GLib" "Mutex"- IO ()---mutexUnlock ::- (MonadIO m) =>- Mutex -- _obj- -> m () -- result-mutexUnlock _obj = liftIO $ do- let _obj' = unsafeManagedPtrGetPtr _obj- g_mutex_unlock _obj'- touchManagedPtr _obj- return ()--data MutexUnlockMethodInfo-instance (signature ~ (m ()), MonadIO m) => MethodInfo MutexUnlockMethodInfo Mutex signature where- overloadedMethod _ = mutexUnlock--type family ResolveMutexMethod (t :: Symbol) (o :: *) :: * where- ResolveMutexMethod "clear" o = MutexClearMethodInfo- ResolveMutexMethod "init" o = MutexInitMethodInfo- ResolveMutexMethod "lock" o = MutexLockMethodInfo- ResolveMutexMethod "trylock" o = MutexTrylockMethodInfo- ResolveMutexMethod "unlock" o = MutexUnlockMethodInfo- ResolveMutexMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveMutexMethod t Mutex, MethodInfo info Mutex p) => IsLabelProxy t (Mutex -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveMutexMethod t Mutex, MethodInfo info Mutex p) => IsLabel t (Mutex -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Unions/Mutex.hs-boot
@@ -1,16 +0,0 @@-module GI.GLib.Unions.Mutex where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype Mutex = Mutex (ForeignPtr Mutex)-instance WrappedPtr Mutex where-data MutexClearMethodInfo-data MutexInitMethodInfo-data MutexLockMethodInfo-data MutexTrylockMethodInfo-data MutexUnlockMethodInfo
− GI/GLib/Unions/TokenValue.hs
@@ -1,471 +0,0 @@---{- |-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.GLib.Unions.TokenValue- ( ---- * Exported types- TokenValue(..) ,- newZeroTokenValue ,- noTokenValue ,--- -- * Properties--- ** VBinary- tokenValueReadVBinary ,- tokenValueVBinary ,- tokenValueWriteVBinary ,----- ** VChar- tokenValueReadVChar ,- tokenValueVChar ,- tokenValueWriteVChar ,----- ** VComment- tokenValueClearVComment ,- tokenValueReadVComment ,- tokenValueVComment ,- tokenValueWriteVComment ,----- ** VError- tokenValueReadVError ,- tokenValueVError ,- tokenValueWriteVError ,----- ** VFloat- tokenValueReadVFloat ,- tokenValueVFloat ,- tokenValueWriteVFloat ,----- ** VHex- tokenValueReadVHex ,- tokenValueVHex ,- tokenValueWriteVHex ,----- ** VIdentifier- tokenValueClearVIdentifier ,- tokenValueReadVIdentifier ,- tokenValueVIdentifier ,- tokenValueWriteVIdentifier ,----- ** VInt- tokenValueReadVInt ,- tokenValueVInt ,- tokenValueWriteVInt ,----- ** VInt64- tokenValueReadVInt64 ,- tokenValueVInt64 ,- tokenValueWriteVInt64 ,----- ** VOctal- tokenValueReadVOctal ,- tokenValueVOctal ,- tokenValueWriteVOctal ,----- ** VString- tokenValueClearVString ,- tokenValueReadVString ,- tokenValueVString ,- tokenValueWriteVString ,----- ** VSymbol- tokenValueClearVSymbol ,- tokenValueReadVSymbol ,- tokenValueVSymbol ,- tokenValueWriteVSymbol ,----- ) where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--import GI.GLib.Types-import GI.GLib.Callbacks--newtype TokenValue = TokenValue (ForeignPtr TokenValue)-instance WrappedPtr TokenValue where- wrappedPtrCalloc = callocBytes 8- wrappedPtrCopy = copyPtr 8- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `TokenValue` struct initialized to zero.-newZeroTokenValue :: MonadIO m => m TokenValue-newZeroTokenValue = liftIO $ wrappedPtrCalloc >>= wrapPtr TokenValue--instance tag ~ 'AttrSet => Constructible TokenValue tag where- new _ attrs = do- o <- newZeroTokenValue- GI.Attributes.set o attrs- return o---noTokenValue :: Maybe TokenValue-noTokenValue = Nothing--tokenValueReadVSymbol :: MonadIO m => TokenValue -> m (Ptr ())-tokenValueReadVSymbol s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())- return val--tokenValueWriteVSymbol :: MonadIO m => TokenValue -> Ptr () -> m ()-tokenValueWriteVSymbol s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr ())--tokenValueClearVSymbol :: MonadIO m => TokenValue -> m ()-tokenValueClearVSymbol s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: Ptr ())--data TokenValueVSymbolFieldInfo-instance AttrInfo TokenValueVSymbolFieldInfo where- type AttrAllowedOps TokenValueVSymbolFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint TokenValueVSymbolFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint TokenValueVSymbolFieldInfo = (~) TokenValue- type AttrGetType TokenValueVSymbolFieldInfo = Ptr ()- type AttrLabel TokenValueVSymbolFieldInfo = "v_symbol"- attrGet _ = tokenValueReadVSymbol- attrSet _ = tokenValueWriteVSymbol- attrConstruct = undefined- attrClear _ = tokenValueClearVSymbol--tokenValueVSymbol :: AttrLabelProxy "vSymbol"-tokenValueVSymbol = AttrLabelProxy---tokenValueReadVIdentifier :: MonadIO m => TokenValue -> m (Maybe T.Text)-tokenValueReadVIdentifier s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--tokenValueWriteVIdentifier :: MonadIO m => TokenValue -> CString -> m ()-tokenValueWriteVIdentifier s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--tokenValueClearVIdentifier :: MonadIO m => TokenValue -> m ()-tokenValueClearVIdentifier s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: CString)--data TokenValueVIdentifierFieldInfo-instance AttrInfo TokenValueVIdentifierFieldInfo where- type AttrAllowedOps TokenValueVIdentifierFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint TokenValueVIdentifierFieldInfo = (~) CString- type AttrBaseTypeConstraint TokenValueVIdentifierFieldInfo = (~) TokenValue- type AttrGetType TokenValueVIdentifierFieldInfo = Maybe T.Text- type AttrLabel TokenValueVIdentifierFieldInfo = "v_identifier"- attrGet _ = tokenValueReadVIdentifier- attrSet _ = tokenValueWriteVIdentifier- attrConstruct = undefined- attrClear _ = tokenValueClearVIdentifier--tokenValueVIdentifier :: AttrLabelProxy "vIdentifier"-tokenValueVIdentifier = AttrLabelProxy---tokenValueReadVBinary :: MonadIO m => TokenValue -> m CULong-tokenValueReadVBinary s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CULong- return val--tokenValueWriteVBinary :: MonadIO m => TokenValue -> CULong -> m ()-tokenValueWriteVBinary s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CULong)--data TokenValueVBinaryFieldInfo-instance AttrInfo TokenValueVBinaryFieldInfo where- type AttrAllowedOps TokenValueVBinaryFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVBinaryFieldInfo = (~) CULong- type AttrBaseTypeConstraint TokenValueVBinaryFieldInfo = (~) TokenValue- type AttrGetType TokenValueVBinaryFieldInfo = CULong- type AttrLabel TokenValueVBinaryFieldInfo = "v_binary"- attrGet _ = tokenValueReadVBinary- attrSet _ = tokenValueWriteVBinary- attrConstruct = undefined- attrClear _ = undefined--tokenValueVBinary :: AttrLabelProxy "vBinary"-tokenValueVBinary = AttrLabelProxy---tokenValueReadVOctal :: MonadIO m => TokenValue -> m CULong-tokenValueReadVOctal s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CULong- return val--tokenValueWriteVOctal :: MonadIO m => TokenValue -> CULong -> m ()-tokenValueWriteVOctal s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CULong)--data TokenValueVOctalFieldInfo-instance AttrInfo TokenValueVOctalFieldInfo where- type AttrAllowedOps TokenValueVOctalFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVOctalFieldInfo = (~) CULong- type AttrBaseTypeConstraint TokenValueVOctalFieldInfo = (~) TokenValue- type AttrGetType TokenValueVOctalFieldInfo = CULong- type AttrLabel TokenValueVOctalFieldInfo = "v_octal"- attrGet _ = tokenValueReadVOctal- attrSet _ = tokenValueWriteVOctal- attrConstruct = undefined- attrClear _ = undefined--tokenValueVOctal :: AttrLabelProxy "vOctal"-tokenValueVOctal = AttrLabelProxy---tokenValueReadVInt :: MonadIO m => TokenValue -> m CULong-tokenValueReadVInt s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CULong- return val--tokenValueWriteVInt :: MonadIO m => TokenValue -> CULong -> m ()-tokenValueWriteVInt s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CULong)--data TokenValueVIntFieldInfo-instance AttrInfo TokenValueVIntFieldInfo where- type AttrAllowedOps TokenValueVIntFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVIntFieldInfo = (~) CULong- type AttrBaseTypeConstraint TokenValueVIntFieldInfo = (~) TokenValue- type AttrGetType TokenValueVIntFieldInfo = CULong- type AttrLabel TokenValueVIntFieldInfo = "v_int"- attrGet _ = tokenValueReadVInt- attrSet _ = tokenValueWriteVInt- attrConstruct = undefined- attrClear _ = undefined--tokenValueVInt :: AttrLabelProxy "vInt"-tokenValueVInt = AttrLabelProxy---tokenValueReadVInt64 :: MonadIO m => TokenValue -> m Word64-tokenValueReadVInt64 s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word64- return val--tokenValueWriteVInt64 :: MonadIO m => TokenValue -> Word64 -> m ()-tokenValueWriteVInt64 s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word64)--data TokenValueVInt64FieldInfo-instance AttrInfo TokenValueVInt64FieldInfo where- type AttrAllowedOps TokenValueVInt64FieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVInt64FieldInfo = (~) Word64- type AttrBaseTypeConstraint TokenValueVInt64FieldInfo = (~) TokenValue- type AttrGetType TokenValueVInt64FieldInfo = Word64- type AttrLabel TokenValueVInt64FieldInfo = "v_int64"- attrGet _ = tokenValueReadVInt64- attrSet _ = tokenValueWriteVInt64- attrConstruct = undefined- attrClear _ = undefined--tokenValueVInt64 :: AttrLabelProxy "vInt64"-tokenValueVInt64 = AttrLabelProxy---tokenValueReadVFloat :: MonadIO m => TokenValue -> m Double-tokenValueReadVFloat s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CDouble- let val' = realToFrac val- return val'--tokenValueWriteVFloat :: MonadIO m => TokenValue -> Double -> m ()-tokenValueWriteVFloat s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 0) (val' :: CDouble)--data TokenValueVFloatFieldInfo-instance AttrInfo TokenValueVFloatFieldInfo where- type AttrAllowedOps TokenValueVFloatFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVFloatFieldInfo = (~) Double- type AttrBaseTypeConstraint TokenValueVFloatFieldInfo = (~) TokenValue- type AttrGetType TokenValueVFloatFieldInfo = Double- type AttrLabel TokenValueVFloatFieldInfo = "v_float"- attrGet _ = tokenValueReadVFloat- attrSet _ = tokenValueWriteVFloat- attrConstruct = undefined- attrClear _ = undefined--tokenValueVFloat :: AttrLabelProxy "vFloat"-tokenValueVFloat = AttrLabelProxy---tokenValueReadVHex :: MonadIO m => TokenValue -> m CULong-tokenValueReadVHex s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CULong- return val--tokenValueWriteVHex :: MonadIO m => TokenValue -> CULong -> m ()-tokenValueWriteVHex s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CULong)--data TokenValueVHexFieldInfo-instance AttrInfo TokenValueVHexFieldInfo where- type AttrAllowedOps TokenValueVHexFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVHexFieldInfo = (~) CULong- type AttrBaseTypeConstraint TokenValueVHexFieldInfo = (~) TokenValue- type AttrGetType TokenValueVHexFieldInfo = CULong- type AttrLabel TokenValueVHexFieldInfo = "v_hex"- attrGet _ = tokenValueReadVHex- attrSet _ = tokenValueWriteVHex- attrConstruct = undefined- attrClear _ = undefined--tokenValueVHex :: AttrLabelProxy "vHex"-tokenValueVHex = AttrLabelProxy---tokenValueReadVString :: MonadIO m => TokenValue -> m (Maybe T.Text)-tokenValueReadVString s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--tokenValueWriteVString :: MonadIO m => TokenValue -> CString -> m ()-tokenValueWriteVString s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--tokenValueClearVString :: MonadIO m => TokenValue -> m ()-tokenValueClearVString s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: CString)--data TokenValueVStringFieldInfo-instance AttrInfo TokenValueVStringFieldInfo where- type AttrAllowedOps TokenValueVStringFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint TokenValueVStringFieldInfo = (~) CString- type AttrBaseTypeConstraint TokenValueVStringFieldInfo = (~) TokenValue- type AttrGetType TokenValueVStringFieldInfo = Maybe T.Text- type AttrLabel TokenValueVStringFieldInfo = "v_string"- attrGet _ = tokenValueReadVString- attrSet _ = tokenValueWriteVString- attrConstruct = undefined- attrClear _ = tokenValueClearVString--tokenValueVString :: AttrLabelProxy "vString"-tokenValueVString = AttrLabelProxy---tokenValueReadVComment :: MonadIO m => TokenValue -> m (Maybe T.Text)-tokenValueReadVComment s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--tokenValueWriteVComment :: MonadIO m => TokenValue -> CString -> m ()-tokenValueWriteVComment s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--tokenValueClearVComment :: MonadIO m => TokenValue -> m ()-tokenValueClearVComment s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (nullPtr :: CString)--data TokenValueVCommentFieldInfo-instance AttrInfo TokenValueVCommentFieldInfo where- type AttrAllowedOps TokenValueVCommentFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint TokenValueVCommentFieldInfo = (~) CString- type AttrBaseTypeConstraint TokenValueVCommentFieldInfo = (~) TokenValue- type AttrGetType TokenValueVCommentFieldInfo = Maybe T.Text- type AttrLabel TokenValueVCommentFieldInfo = "v_comment"- attrGet _ = tokenValueReadVComment- attrSet _ = tokenValueWriteVComment- attrConstruct = undefined- attrClear _ = tokenValueClearVComment--tokenValueVComment :: AttrLabelProxy "vComment"-tokenValueVComment = AttrLabelProxy---tokenValueReadVChar :: MonadIO m => TokenValue -> m Word8-tokenValueReadVChar s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word8- return val--tokenValueWriteVChar :: MonadIO m => TokenValue -> Word8 -> m ()-tokenValueWriteVChar s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word8)--data TokenValueVCharFieldInfo-instance AttrInfo TokenValueVCharFieldInfo where- type AttrAllowedOps TokenValueVCharFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVCharFieldInfo = (~) Word8- type AttrBaseTypeConstraint TokenValueVCharFieldInfo = (~) TokenValue- type AttrGetType TokenValueVCharFieldInfo = Word8- type AttrLabel TokenValueVCharFieldInfo = "v_char"- attrGet _ = tokenValueReadVChar- attrSet _ = tokenValueWriteVChar- attrConstruct = undefined- attrClear _ = undefined--tokenValueVChar :: AttrLabelProxy "vChar"-tokenValueVChar = AttrLabelProxy---tokenValueReadVError :: MonadIO m => TokenValue -> m Word32-tokenValueReadVError s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word32- return val--tokenValueWriteVError :: MonadIO m => TokenValue -> Word32 -> m ()-tokenValueWriteVError s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word32)--data TokenValueVErrorFieldInfo-instance AttrInfo TokenValueVErrorFieldInfo where- type AttrAllowedOps TokenValueVErrorFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint TokenValueVErrorFieldInfo = (~) Word32- type AttrBaseTypeConstraint TokenValueVErrorFieldInfo = (~) TokenValue- type AttrGetType TokenValueVErrorFieldInfo = Word32- type AttrLabel TokenValueVErrorFieldInfo = "v_error"- attrGet _ = tokenValueReadVError- attrSet _ = tokenValueWriteVError- attrConstruct = undefined- attrClear _ = undefined--tokenValueVError :: AttrLabelProxy "vError"-tokenValueVError = AttrLabelProxy----type instance AttributeList TokenValue = TokenValueAttributeList-type TokenValueAttributeList = ('[ '("vSymbol", TokenValueVSymbolFieldInfo), '("vIdentifier", TokenValueVIdentifierFieldInfo), '("vBinary", TokenValueVBinaryFieldInfo), '("vOctal", TokenValueVOctalFieldInfo), '("vInt", TokenValueVIntFieldInfo), '("vInt64", TokenValueVInt64FieldInfo), '("vFloat", TokenValueVFloatFieldInfo), '("vHex", TokenValueVHexFieldInfo), '("vString", TokenValueVStringFieldInfo), '("vComment", TokenValueVCommentFieldInfo), '("vChar", TokenValueVCharFieldInfo), '("vError", TokenValueVErrorFieldInfo)] :: [(Symbol, *)])--type family ResolveTokenValueMethod (t :: Symbol) (o :: *) :: * where- ResolveTokenValueMethod l o = MethodResolutionFailed l o--instance (info ~ ResolveTokenValueMethod t TokenValue, MethodInfo info TokenValue p) => IsLabelProxy t (TokenValue -> p) where- fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)--#if MIN_VERSION_base(4,9,0)-instance (info ~ ResolveTokenValueMethod t TokenValue, MethodInfo info TokenValue p) => IsLabel t (TokenValue -> p) where- fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)-#endif--
− GI/GLib/Unions/TokenValue.hs-boot
@@ -1,11 +0,0 @@-module GI.GLib.Unions.TokenValue where--import Data.GI.Base.ShortPrelude--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map--newtype TokenValue = TokenValue (ForeignPtr TokenValue)-instance WrappedPtr TokenValue where
+ GLib.overrides view
@@ -0,0 +1,31 @@+namespace GLib++# "terminator_pos" is not marked as out.+ignore IOChannel.read_line_string++# The test_data argument is not marked as a closure.+ignore test_add_data_func_full++# "items_read" and "items_written" are out parameters, but they are+# marked as in parameters the introspection data.+ignore utf16_to_ucs4+ignore utf16_to_utf8+ignore utf8_to_ucs4+ignore utf8_to_ucs4_fast+ignore utf8_to_utf16++# "result" parameter is an array, but it is not marked as such.+ignore unichar_fully_decompose++# The first argument is marked as g_unichar, but it is really an array+# of g_unichar.+ignore ucs4_to_utf16+ignore ucs4_to_utf8++# "line_number" is not marked as out.+ignore MarkupParseContext.get_position++# These require more complex logic.+ignore base64_decode_step+ignore base64_encode_step+ignore base64_encode_close
Setup.hs view
@@ -1,3 +1,12 @@-#!/usr/bin/env runhaskell-import Distribution.Simple-main = defaultMain+{-# LANGUAGE OverloadedStrings #-}++import Distribution.Simple (defaultMainWithHooks)+import Data.GI.CodeGen.CabalHooks (simpleHaskellGIHooks)++main = defaultMainWithHooks (simpleHaskellGIHooks name version verbose+ overridesFile outputDir)+ where name = "GLib"+ version = "2.0"+ verbose = False+ overridesFile = Just "GLib.overrides"+ outputDir = Nothing
gi-glib.cabal view
@@ -1,6 +1,5 @@--- Autogenerated, do not edit. name: gi-glib-version: 0.2.46.15+version: 2.0.1 synopsis: GLib bindings description: Bindings for GLib, autogenerated by haskell-gi. homepage: https://github.com/haskell-gi/haskell-gi@@ -9,95 +8,26 @@ author: Will Thompson, Iñaki García Etxebarria and Jonas Platte maintainer: Iñaki García Etxebarria (garetxe@gmail.com) category: Bindings-build-type: Simple-cabal-version: >=1.10+build-type: Custom+cabal-version: >= 1.24 +extra-source-files: GLib.overrides++custom-setup+ setup-depends: base >= 4.7,+ Cabal >= 1.24,+ haskell-gi >= 0.15+ library default-language: Haskell2010 default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts other-extensions: PatternSynonyms ViewPatterns ghc-options: -fno-warn-unused-imports -fno-warn-warnings-deprecations- exposed-modules: GI.GLib.Types- GI.GLib- GI.GLib.Callbacks- GI.GLib.Constants- GI.GLib.Enums- GI.GLib.Flags- GI.GLib.Functions- GI.GLib.Structs- GI.GLib.Structs.AsyncQueue- GI.GLib.Structs.BookmarkFile- GI.GLib.Structs.ByteArray- GI.GLib.Structs.Bytes- GI.GLib.Structs.Checksum- GI.GLib.Structs.Cond- GI.GLib.Structs.Data- GI.GLib.Structs.Date- GI.GLib.Structs.DateTime- GI.GLib.Structs.DebugKey- GI.GLib.Structs.Dir- GI.GLib.Structs.HashTableIter- GI.GLib.Structs.Hmac- GI.GLib.Structs.Hook- GI.GLib.Structs.HookList- GI.GLib.Structs.IConv- GI.GLib.Structs.IOChannel- GI.GLib.Structs.IOFuncs- GI.GLib.Structs.KeyFile- GI.GLib.Structs.MainContext- GI.GLib.Structs.MainLoop- GI.GLib.Structs.MappedFile- GI.GLib.Structs.MarkupParseContext- GI.GLib.Structs.MarkupParser- GI.GLib.Structs.MatchInfo- GI.GLib.Structs.MemVTable- GI.GLib.Structs.Node- GI.GLib.Structs.Once- GI.GLib.Structs.OptionContext- GI.GLib.Structs.OptionEntry- GI.GLib.Structs.OptionGroup- GI.GLib.Structs.PatternSpec- GI.GLib.Structs.PollFD- GI.GLib.Structs.PtrArray- GI.GLib.Structs.Queue- GI.GLib.Structs.RWLock- GI.GLib.Structs.Rand- GI.GLib.Structs.RecMutex- GI.GLib.Structs.Regex- GI.GLib.Structs.Scanner- GI.GLib.Structs.ScannerConfig- GI.GLib.Structs.Sequence- GI.GLib.Structs.SequenceIter- GI.GLib.Structs.Source- GI.GLib.Structs.SourceCallbackFuncs- GI.GLib.Structs.SourceFuncs- GI.GLib.Structs.StatBuf- GI.GLib.Structs.String- GI.GLib.Structs.StringChunk- GI.GLib.Structs.TestCase- GI.GLib.Structs.TestConfig- GI.GLib.Structs.TestLogBuffer- GI.GLib.Structs.TestLogMsg- GI.GLib.Structs.TestSuite- GI.GLib.Structs.Thread- GI.GLib.Structs.ThreadPool- GI.GLib.Structs.TimeVal- GI.GLib.Structs.TimeZone- GI.GLib.Structs.Timer- GI.GLib.Structs.TrashStack- GI.GLib.Structs.Tree- GI.GLib.Structs.VariantBuilder- GI.GLib.Structs.VariantDict- GI.GLib.Structs.VariantType- GI.GLib.Unions- GI.GLib.Unions.DoubleIEEE754- GI.GLib.Unions.FloatIEEE754- GI.GLib.Unions.Mutex- GI.GLib.Unions.TokenValue- pkgconfig-depends: glib-2.0 >= 2.46++ pkgconfig-depends: glib-2.0 build-depends: base >= 4.7 && <5, haskell-gi-base >= 0.15 && < 1, bytestring >= 0.10, containers >= 0.5, text >= 1.0,- transformers >= 0.3+ transformers >= 0.5