gi-pango 1.0.18 → 1.0.19
raw patch · 113 files changed
+65/−33733 lines, 113 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- GI/Pango.hs +0/−58
- GI/Pango/Callbacks.hs +0/−726
- GI/Pango/Constants.hs +0/−165
- GI/Pango/Enums.hs +0/−1975
- GI/Pango/Enums.hs-boot +0/−75
- GI/Pango/Flags.hs +0/−120
- GI/Pango/Flags.hs-boot +0/−28
- GI/Pango/Functions.hs +0/−2566
- GI/Pango/Objects.hs +0/−63
- GI/Pango/Objects/Context.hs +0/−1263
- GI/Pango/Objects/Context.hs-boot +0/−92
- GI/Pango/Objects/Engine.hs +0/−122
- GI/Pango/Objects/Engine.hs-boot +0/−29
- GI/Pango/Objects/EngineLang.hs +0/−127
- GI/Pango/Objects/EngineLang.hs-boot +0/−29
- GI/Pango/Objects/EngineShape.hs +0/−129
- GI/Pango/Objects/EngineShape.hs-boot +0/−29
- GI/Pango/Objects/Font.hs +0/−514
- GI/Pango/Objects/Font.hs-boot +0/−47
- GI/Pango/Objects/FontFace.hs +0/−331
- GI/Pango/Objects/FontFace.hs-boot +0/−41
- GI/Pango/Objects/FontFamily.hs +0/−334
- GI/Pango/Objects/FontFamily.hs-boot +0/−41
- GI/Pango/Objects/FontMap.hs +0/−525
- GI/Pango/Objects/FontMap.hs-boot +0/−50
- GI/Pango/Objects/Fontset.hs +0/−280
- GI/Pango/Objects/Fontset.hs-boot +0/−38
- GI/Pango/Objects/FontsetSimple.hs +0/−261
- GI/Pango/Objects/FontsetSimple.hs-boot +0/−35
- GI/Pango/Objects/Layout.hs +0/−3067
- GI/Pango/Objects/Layout.hs-boot +0/−197
- GI/Pango/Objects/Renderer.hs +0/−1232
- GI/Pango/Objects/Renderer.hs-boot +0/−86
- GI/Pango/Structs.hs +0/−115
- GI/Pango/Structs/Analysis.hs +0/−669
- GI/Pango/Structs/Analysis.hs-boot +0/−26
- GI/Pango/Structs/AttrClass.hs +0/−295
- GI/Pango/Structs/AttrClass.hs-boot +0/−26
- GI/Pango/Structs/AttrColor.hs +0/−180
- GI/Pango/Structs/AttrColor.hs-boot +0/−26
- GI/Pango/Structs/AttrFloat.hs +0/−193
- GI/Pango/Structs/AttrFloat.hs-boot +0/−26
- GI/Pango/Structs/AttrFontDesc.hs +0/−251
- GI/Pango/Structs/AttrFontDesc.hs-boot +0/−26
- GI/Pango/Structs/AttrFontFeatures.hs +0/−252
- GI/Pango/Structs/AttrFontFeatures.hs-boot +0/−26
- GI/Pango/Structs/AttrInt.hs +0/−191
- GI/Pango/Structs/AttrInt.hs-boot +0/−26
- GI/Pango/Structs/AttrIterator.hs +0/−354
- GI/Pango/Structs/AttrIterator.hs-boot +0/−41
- GI/Pango/Structs/AttrLanguage.hs +0/−249
- GI/Pango/Structs/AttrLanguage.hs-boot +0/−26
- GI/Pango/Structs/AttrList.hs +0/−543
- GI/Pango/Structs/AttrList.hs-boot +0/−50
- GI/Pango/Structs/AttrShape.hs +0/−484
- GI/Pango/Structs/AttrShape.hs-boot +0/−26
- GI/Pango/Structs/AttrSize.hs +0/−289
- GI/Pango/Structs/AttrSize.hs-boot +0/−26
- GI/Pango/Structs/AttrString.hs +0/−207
- GI/Pango/Structs/AttrString.hs-boot +0/−26
- GI/Pango/Structs/Attribute.hs +0/−420
- GI/Pango/Structs/Attribute.hs-boot +0/−35
- GI/Pango/Structs/Color.hs +0/−463
- GI/Pango/Structs/Color.hs-boot +0/−38
- GI/Pango/Structs/Coverage.hs +0/−322
- GI/Pango/Structs/Coverage.hs-boot +0/−41
- GI/Pango/Structs/EngineInfo.hs +0/−432
- GI/Pango/Structs/EngineInfo.hs-boot +0/−26
- GI/Pango/Structs/EngineScriptInfo.hs +0/−230
- GI/Pango/Structs/EngineScriptInfo.hs-boot +0/−26
- GI/Pango/Structs/FontDescription.hs +0/−1790
- GI/Pango/Structs/FontDescription.hs-boot +0/−122
- GI/Pango/Structs/FontMetrics.hs +0/−595
- GI/Pango/Structs/FontMetrics.hs-boot +0/−56
- GI/Pango/Structs/GlyphGeometry.hs +0/−257
- GI/Pango/Structs/GlyphGeometry.hs-boot +0/−26
- GI/Pango/Structs/GlyphInfo.hs +0/−236
- GI/Pango/Structs/GlyphInfo.hs-boot +0/−26
- GI/Pango/Structs/GlyphItem.hs +0/−611
- GI/Pango/Structs/GlyphItem.hs-boot +0/−44
- GI/Pango/Structs/GlyphItemIter.hs +0/−912
- GI/Pango/Structs/GlyphItemIter.hs-boot +0/−44
- GI/Pango/Structs/GlyphString.hs +0/−753
- GI/Pango/Structs/GlyphString.hs-boot +0/−53
- GI/Pango/Structs/GlyphVisAttr.hs +0/−152
- GI/Pango/Structs/GlyphVisAttr.hs-boot +0/−26
- GI/Pango/Structs/IncludedModule.hs +0/−307
- GI/Pango/Structs/IncludedModule.hs-boot +0/−26
- GI/Pango/Structs/Item.hs +0/−488
- GI/Pango/Structs/Item.hs-boot +0/−35
- GI/Pango/Structs/Language.hs +0/−432
- GI/Pango/Structs/Language.hs-boot +0/−38
- GI/Pango/Structs/LayoutIter.hs +0/−1054
- GI/Pango/Structs/LayoutIter.hs-boot +0/−86
- GI/Pango/Structs/LayoutLine.hs +0/−850
- GI/Pango/Structs/LayoutLine.hs-boot +0/−47
- GI/Pango/Structs/LogAttr.hs +0/−841
- GI/Pango/Structs/LogAttr.hs-boot +0/−26
- GI/Pango/Structs/Map.hs +0/−77
- GI/Pango/Structs/Map.hs-boot +0/−26
- GI/Pango/Structs/MapEntry.hs +0/−77
- GI/Pango/Structs/MapEntry.hs-boot +0/−26
- GI/Pango/Structs/Matrix.hs +0/−1062
- GI/Pango/Structs/Matrix.hs-boot +0/−59
- GI/Pango/Structs/Rectangle.hs +0/−313
- GI/Pango/Structs/Rectangle.hs-boot +0/−26
- GI/Pango/Structs/ScriptIter.hs +0/−237
- GI/Pango/Structs/ScriptIter.hs-boot +0/−35
- GI/Pango/Structs/TabArray.hs +0/−456
- GI/Pango/Structs/TabArray.hs-boot +0/−47
- README.md +1/−1
- gi-pango.cabal +60/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+### 1.0.19+++ List autogenerated modules in .cabal file+ ### 1.0.18 + Update to haskell-gi(-base) 0.22
− GI/Pango.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 (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango- ( module GI.Pango.Callbacks ,- module GI.Pango.Constants ,- module GI.Pango.Enums ,- module GI.Pango.Flags ,- module GI.Pango.Functions ,- module GI.Pango.Objects ,- module GI.Pango.Structs ,---- module Data.GI.Base ,--- ) where--import GI.Pango.Callbacks-import GI.Pango.Constants-import GI.Pango.Enums-import GI.Pango.Flags-import GI.Pango.Functions-import GI.Pango.Objects-import GI.Pango.Structs--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---import Data.GI.Base-
− GI/Pango/Callbacks.hs
@@ -1,726 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Callbacks- ( -- -- * Signals--- ** AttrClassDestroyFieldCallback #signal:AttrClassDestroyFieldCallback#-- AttrClassDestroyFieldCallback ,- C_AttrClassDestroyFieldCallback ,- dynamic_AttrClassDestroyFieldCallback ,- genClosure_AttrClassDestroyFieldCallback,- mk_AttrClassDestroyFieldCallback ,- noAttrClassDestroyFieldCallback ,- wrap_AttrClassDestroyFieldCallback ,----- ** AttrClassEqualFieldCallback #signal:AttrClassEqualFieldCallback#-- AttrClassEqualFieldCallback ,- C_AttrClassEqualFieldCallback ,- dynamic_AttrClassEqualFieldCallback ,- genClosure_AttrClassEqualFieldCallback ,- mk_AttrClassEqualFieldCallback ,- noAttrClassEqualFieldCallback ,- wrap_AttrClassEqualFieldCallback ,----- ** AttrDataCopyFunc #signal:AttrDataCopyFunc#-- AttrDataCopyFunc ,- AttrDataCopyFunc_WithClosures ,- C_AttrDataCopyFunc ,- drop_closures_AttrDataCopyFunc ,- dynamic_AttrDataCopyFunc ,- genClosure_AttrDataCopyFunc ,- mk_AttrDataCopyFunc ,- noAttrDataCopyFunc ,- noAttrDataCopyFunc_WithClosures ,- wrap_AttrDataCopyFunc ,----- ** AttrFilterFunc #signal:AttrFilterFunc#-- AttrFilterFunc ,- AttrFilterFunc_WithClosures ,- C_AttrFilterFunc ,- drop_closures_AttrFilterFunc ,- dynamic_AttrFilterFunc ,- genClosure_AttrFilterFunc ,- mk_AttrFilterFunc ,- noAttrFilterFunc ,- noAttrFilterFunc_WithClosures ,- wrap_AttrFilterFunc ,----- ** FontsetForeachFunc #signal:FontsetForeachFunc#-- C_FontsetForeachFunc ,- FontsetForeachFunc ,- FontsetForeachFunc_WithClosures ,- drop_closures_FontsetForeachFunc ,- dynamic_FontsetForeachFunc ,- genClosure_FontsetForeachFunc ,- mk_FontsetForeachFunc ,- noFontsetForeachFunc ,- noFontsetForeachFunc_WithClosures ,- wrap_FontsetForeachFunc ,----- ** IncludedModuleExitFieldCallback #signal:IncludedModuleExitFieldCallback#-- C_IncludedModuleExitFieldCallback ,- IncludedModuleExitFieldCallback ,- dynamic_IncludedModuleExitFieldCallback ,- genClosure_IncludedModuleExitFieldCallback,- mk_IncludedModuleExitFieldCallback ,- noIncludedModuleExitFieldCallback ,- wrap_IncludedModuleExitFieldCallback ,----- ** IncludedModuleInitFieldCallback #signal:IncludedModuleInitFieldCallback#-- C_IncludedModuleInitFieldCallback ,- IncludedModuleInitFieldCallback ,- dynamic_IncludedModuleInitFieldCallback ,- genClosure_IncludedModuleInitFieldCallback,- mk_IncludedModuleInitFieldCallback ,- noIncludedModuleInitFieldCallback ,- wrap_IncludedModuleInitFieldCallback ,----- ** IncludedModuleListFieldCallback #signal:IncludedModuleListFieldCallback#-- C_IncludedModuleListFieldCallback ,- IncludedModuleListFieldCallback ,- dynamic_IncludedModuleListFieldCallback ,- genClosure_IncludedModuleListFieldCallback,- mk_IncludedModuleListFieldCallback ,- noIncludedModuleListFieldCallback ,- wrap_IncludedModuleListFieldCallback ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.TypeModule as GObject.TypeModule-import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Objects.Fontset as Pango.Fontset-import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute-import {-# SOURCE #-} qualified GI.Pango.Structs.EngineInfo as Pango.EngineInfo---- callback IncludedModuleListFieldCallback--- -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "engines", argType = TInterface (Name {namespace = "Pango", name = "EngineInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_engines", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_IncludedModuleListFieldCallback =- Ptr Pango.EngineInfo.EngineInfo ->- Int32 ->- IO ()---- Args : [Arg {argCName = "engines", argType = TInterface (Name {namespace = "Pango", name = "EngineInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_engines", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_IncludedModuleListFieldCallback :: FunPtr C_IncludedModuleListFieldCallback -> C_IncludedModuleListFieldCallback---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_IncludedModuleListFieldCallback ::- (B.CallStack.HasCallStack, MonadIO m) =>- FunPtr C_IncludedModuleListFieldCallback- -> Pango.EngineInfo.EngineInfo- -> Int32- -> m ()-dynamic_IncludedModuleListFieldCallback __funPtr engines nEngines = liftIO $ do- engines' <- unsafeManagedPtrGetPtr engines- (__dynamic_C_IncludedModuleListFieldCallback __funPtr) engines' nEngines- touchManagedPtr engines- return ()---- | Generate a function pointer callable from C code, from a `C_IncludedModuleListFieldCallback`.-foreign import ccall "wrapper"- mk_IncludedModuleListFieldCallback :: C_IncludedModuleListFieldCallback -> IO (FunPtr C_IncludedModuleListFieldCallback)--{- |-/No description available in the introspection data./--}-type IncludedModuleListFieldCallback =- Pango.EngineInfo.EngineInfo- -> Int32- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `IncludedModuleListFieldCallback`@.-noIncludedModuleListFieldCallback :: Maybe IncludedModuleListFieldCallback-noIncludedModuleListFieldCallback = Nothing---- | Wrap the callback into a `GClosure`.-genClosure_IncludedModuleListFieldCallback :: MonadIO m => IncludedModuleListFieldCallback -> m (GClosure C_IncludedModuleListFieldCallback)-genClosure_IncludedModuleListFieldCallback cb = liftIO $ do- let cb' = wrap_IncludedModuleListFieldCallback Nothing cb- mk_IncludedModuleListFieldCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `IncludedModuleListFieldCallback` into a `C_IncludedModuleListFieldCallback`.-wrap_IncludedModuleListFieldCallback ::- Maybe (Ptr (FunPtr C_IncludedModuleListFieldCallback)) ->- IncludedModuleListFieldCallback ->- C_IncludedModuleListFieldCallback-wrap_IncludedModuleListFieldCallback funptrptr _cb engines nEngines = do- engines' <- (newPtr Pango.EngineInfo.EngineInfo) engines- _cb engines' nEngines- maybeReleaseFunPtr funptrptr----- callback IncludedModuleInitFieldCallback--- -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "module", argType = TInterface (Name {namespace = "GObject", name = "TypeModule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_IncludedModuleInitFieldCallback =- Ptr GObject.TypeModule.TypeModule ->- IO ()---- Args : [Arg {argCName = "module", argType = TInterface (Name {namespace = "GObject", name = "TypeModule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_IncludedModuleInitFieldCallback :: FunPtr C_IncludedModuleInitFieldCallback -> C_IncludedModuleInitFieldCallback---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_IncludedModuleInitFieldCallback ::- (B.CallStack.HasCallStack, MonadIO m, GObject.TypeModule.IsTypeModule a) =>- FunPtr C_IncludedModuleInitFieldCallback- -> a- -> m ()-dynamic_IncludedModuleInitFieldCallback __funPtr module_ = liftIO $ do- module_' <- unsafeManagedPtrCastPtr module_- (__dynamic_C_IncludedModuleInitFieldCallback __funPtr) module_'- touchManagedPtr module_- return ()---- | Generate a function pointer callable from C code, from a `C_IncludedModuleInitFieldCallback`.-foreign import ccall "wrapper"- mk_IncludedModuleInitFieldCallback :: C_IncludedModuleInitFieldCallback -> IO (FunPtr C_IncludedModuleInitFieldCallback)--{- |-/No description available in the introspection data./--}-type IncludedModuleInitFieldCallback =- GObject.TypeModule.TypeModule- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `IncludedModuleInitFieldCallback`@.-noIncludedModuleInitFieldCallback :: Maybe IncludedModuleInitFieldCallback-noIncludedModuleInitFieldCallback = Nothing---- | Wrap the callback into a `GClosure`.-genClosure_IncludedModuleInitFieldCallback :: MonadIO m => IncludedModuleInitFieldCallback -> m (GClosure C_IncludedModuleInitFieldCallback)-genClosure_IncludedModuleInitFieldCallback cb = liftIO $ do- let cb' = wrap_IncludedModuleInitFieldCallback Nothing cb- mk_IncludedModuleInitFieldCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `IncludedModuleInitFieldCallback` into a `C_IncludedModuleInitFieldCallback`.-wrap_IncludedModuleInitFieldCallback ::- Maybe (Ptr (FunPtr C_IncludedModuleInitFieldCallback)) ->- IncludedModuleInitFieldCallback ->- C_IncludedModuleInitFieldCallback-wrap_IncludedModuleInitFieldCallback funptrptr _cb module_ = do- module_' <- (newObject GObject.TypeModule.TypeModule) module_- _cb module_'- maybeReleaseFunPtr funptrptr----- callback IncludedModuleExitFieldCallback--- -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_IncludedModuleExitFieldCallback =- IO ()---- Args : []--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_IncludedModuleExitFieldCallback :: FunPtr C_IncludedModuleExitFieldCallback -> C_IncludedModuleExitFieldCallback---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_IncludedModuleExitFieldCallback ::- (B.CallStack.HasCallStack, MonadIO m) =>- FunPtr C_IncludedModuleExitFieldCallback- -> m ()-dynamic_IncludedModuleExitFieldCallback __funPtr = liftIO $ do- (__dynamic_C_IncludedModuleExitFieldCallback __funPtr)- return ()---- | Generate a function pointer callable from C code, from a `C_IncludedModuleExitFieldCallback`.-foreign import ccall "wrapper"- mk_IncludedModuleExitFieldCallback :: C_IncludedModuleExitFieldCallback -> IO (FunPtr C_IncludedModuleExitFieldCallback)--{- |-/No description available in the introspection data./--}-type IncludedModuleExitFieldCallback =- IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `IncludedModuleExitFieldCallback`@.-noIncludedModuleExitFieldCallback :: Maybe IncludedModuleExitFieldCallback-noIncludedModuleExitFieldCallback = Nothing---- | Wrap the callback into a `GClosure`.-genClosure_IncludedModuleExitFieldCallback :: MonadIO m => IncludedModuleExitFieldCallback -> m (GClosure C_IncludedModuleExitFieldCallback)-genClosure_IncludedModuleExitFieldCallback cb = liftIO $ do- let cb' = wrap_IncludedModuleExitFieldCallback Nothing cb- mk_IncludedModuleExitFieldCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `IncludedModuleExitFieldCallback` into a `C_IncludedModuleExitFieldCallback`.-wrap_IncludedModuleExitFieldCallback ::- Maybe (Ptr (FunPtr C_IncludedModuleExitFieldCallback)) ->- IncludedModuleExitFieldCallback ->- C_IncludedModuleExitFieldCallback-wrap_IncludedModuleExitFieldCallback funptrptr _cb = do- _cb - maybeReleaseFunPtr funptrptr----- callback FontsetForeachFunc--- -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "if %TRUE, stop iteration and return immediately.", sinceVersion = Nothing}, args = [Arg {argCName = "fontset", argType = TInterface (Name {namespace = "Pango", name = "Fontset"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a font from @fontset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by pango_fontset_foreach() when enumerating\nthe fonts in a fontset.", sinceVersion = Just "1.4"}}--- | Type for the callback on the (unwrapped) C side.-type C_FontsetForeachFunc =- Ptr Pango.Fontset.Fontset ->- Ptr Pango.Font.Font ->- Ptr () ->- IO CInt---- Args : [Arg {argCName = "fontset", argType = TInterface (Name {namespace = "Pango", name = "Fontset"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a font from @fontset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_FontsetForeachFunc :: FunPtr C_FontsetForeachFunc -> C_FontsetForeachFunc---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_FontsetForeachFunc ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Fontset.IsFontset a, Pango.Font.IsFont b) =>- FunPtr C_FontsetForeachFunc- -> a- {- ^ /@fontset@/: a 'GI.Pango.Objects.Fontset.Fontset' -}- -> b- {- ^ /@font@/: a font from /@fontset@/ -}- -> Ptr ()- {- ^ /@userData@/: callback data -}- -> m Bool- {- ^ __Returns:__ if 'True', stop iteration and return immediately. -}-dynamic_FontsetForeachFunc __funPtr fontset font userData = liftIO $ do- fontset' <- unsafeManagedPtrCastPtr fontset- font' <- unsafeManagedPtrCastPtr font- result <- (__dynamic_C_FontsetForeachFunc __funPtr) fontset' font' userData- let result' = (/= 0) result- touchManagedPtr fontset- touchManagedPtr font- return result'---- | Generate a function pointer callable from C code, from a `C_FontsetForeachFunc`.-foreign import ccall "wrapper"- mk_FontsetForeachFunc :: C_FontsetForeachFunc -> IO (FunPtr C_FontsetForeachFunc)--{- |-A callback function used by 'GI.Pango.Objects.Fontset.fontsetForeach' when enumerating-the fonts in a fontset.--/Since: 1.4/--}-type FontsetForeachFunc =- Pango.Fontset.Fontset- {- ^ /@fontset@/: a 'GI.Pango.Objects.Fontset.Fontset' -}- -> Pango.Font.Font- {- ^ /@font@/: a font from /@fontset@/ -}- -> IO Bool- {- ^ __Returns:__ if 'True', stop iteration and return immediately. -}---- | A convenience synonym for @`Nothing` :: `Maybe` `FontsetForeachFunc`@.-noFontsetForeachFunc :: Maybe FontsetForeachFunc-noFontsetForeachFunc = Nothing--{- |-A callback function used by 'GI.Pango.Objects.Fontset.fontsetForeach' when enumerating-the fonts in a fontset.--/Since: 1.4/--}-type FontsetForeachFunc_WithClosures =- Pango.Fontset.Fontset- {- ^ /@fontset@/: a 'GI.Pango.Objects.Fontset.Fontset' -}- -> Pango.Font.Font- {- ^ /@font@/: a font from /@fontset@/ -}- -> Ptr ()- {- ^ /@userData@/: callback data -}- -> IO Bool- {- ^ __Returns:__ if 'True', stop iteration and return immediately. -}---- | A convenience synonym for @`Nothing` :: `Maybe` `FontsetForeachFunc_WithClosures`@.-noFontsetForeachFunc_WithClosures :: Maybe FontsetForeachFunc_WithClosures-noFontsetForeachFunc_WithClosures = Nothing---- | A simple wrapper that ignores the closure arguments.-drop_closures_FontsetForeachFunc :: FontsetForeachFunc -> FontsetForeachFunc_WithClosures-drop_closures_FontsetForeachFunc _f fontset font _ = _f fontset font---- | Wrap the callback into a `GClosure`.-genClosure_FontsetForeachFunc :: MonadIO m => FontsetForeachFunc -> m (GClosure C_FontsetForeachFunc)-genClosure_FontsetForeachFunc cb = liftIO $ do- let cb' = drop_closures_FontsetForeachFunc cb- let cb'' = wrap_FontsetForeachFunc Nothing cb'- mk_FontsetForeachFunc cb'' >>= B.GClosure.newGClosure----- | Wrap a `FontsetForeachFunc` into a `C_FontsetForeachFunc`.-wrap_FontsetForeachFunc ::- Maybe (Ptr (FunPtr C_FontsetForeachFunc)) ->- FontsetForeachFunc_WithClosures ->- C_FontsetForeachFunc-wrap_FontsetForeachFunc funptrptr _cb fontset font userData = do- fontset' <- (newObject Pango.Fontset.Fontset) fontset- font' <- (newObject Pango.Font.Font) font- result <- _cb fontset' font' userData- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'----- callback AttrFilterFunc--- -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the attribute should be selected for\nfiltering, %FALSE otherwise.", sinceVersion = Nothing}, args = [Arg {argCName = "attribute", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Pango attribute", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to the function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Type of a function filtering a list of attributes.", sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_AttrFilterFunc =- Ptr Pango.Attribute.Attribute ->- Ptr () ->- IO CInt---- Args : [Arg {argCName = "attribute", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Pango attribute", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to the function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_AttrFilterFunc :: FunPtr C_AttrFilterFunc -> C_AttrFilterFunc---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_AttrFilterFunc ::- (B.CallStack.HasCallStack, MonadIO m) =>- FunPtr C_AttrFilterFunc- -> Pango.Attribute.Attribute- {- ^ /@attribute@/: a Pango attribute -}- -> Ptr ()- {- ^ /@userData@/: user data passed to the function -}- -> m Bool- {- ^ __Returns:__ 'True' if the attribute should be selected for-filtering, 'False' otherwise. -}-dynamic_AttrFilterFunc __funPtr attribute userData = liftIO $ do- attribute' <- unsafeManagedPtrGetPtr attribute- result <- (__dynamic_C_AttrFilterFunc __funPtr) attribute' userData- let result' = (/= 0) result- touchManagedPtr attribute- return result'---- | Generate a function pointer callable from C code, from a `C_AttrFilterFunc`.-foreign import ccall "wrapper"- mk_AttrFilterFunc :: C_AttrFilterFunc -> IO (FunPtr C_AttrFilterFunc)--{- |-Type of a function filtering a list of attributes.--}-type AttrFilterFunc =- Pango.Attribute.Attribute- {- ^ /@attribute@/: a Pango attribute -}- -> IO Bool- {- ^ __Returns:__ 'True' if the attribute should be selected for-filtering, 'False' otherwise. -}---- | A convenience synonym for @`Nothing` :: `Maybe` `AttrFilterFunc`@.-noAttrFilterFunc :: Maybe AttrFilterFunc-noAttrFilterFunc = Nothing--{- |-Type of a function filtering a list of attributes.--}-type AttrFilterFunc_WithClosures =- Pango.Attribute.Attribute- {- ^ /@attribute@/: a Pango attribute -}- -> Ptr ()- {- ^ /@userData@/: user data passed to the function -}- -> IO Bool- {- ^ __Returns:__ 'True' if the attribute should be selected for-filtering, 'False' otherwise. -}---- | A convenience synonym for @`Nothing` :: `Maybe` `AttrFilterFunc_WithClosures`@.-noAttrFilterFunc_WithClosures :: Maybe AttrFilterFunc_WithClosures-noAttrFilterFunc_WithClosures = Nothing---- | A simple wrapper that ignores the closure arguments.-drop_closures_AttrFilterFunc :: AttrFilterFunc -> AttrFilterFunc_WithClosures-drop_closures_AttrFilterFunc _f attribute _ = _f attribute---- | Wrap the callback into a `GClosure`.-genClosure_AttrFilterFunc :: MonadIO m => AttrFilterFunc -> m (GClosure C_AttrFilterFunc)-genClosure_AttrFilterFunc cb = liftIO $ do- let cb' = drop_closures_AttrFilterFunc cb- let cb'' = wrap_AttrFilterFunc Nothing cb'- mk_AttrFilterFunc cb'' >>= B.GClosure.newGClosure----- | Wrap a `AttrFilterFunc` into a `C_AttrFilterFunc`.-wrap_AttrFilterFunc ::- Maybe (Ptr (FunPtr C_AttrFilterFunc)) ->- AttrFilterFunc_WithClosures ->- C_AttrFilterFunc-wrap_AttrFilterFunc funptrptr _cb attribute userData = do- attribute' <- (newPtr Pango.Attribute.Attribute) attribute- result <- _cb attribute' userData- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'----- callback AttrDataCopyFunc--- -> Callable {returnType = Just (TBasicType TPtr), returnMayBeNull = True, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "new copy of @user_data.", sinceVersion = Nothing}, args = [Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data to copy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 0, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Type of a function that can duplicate user data for an attribute.", sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_AttrDataCopyFunc =- Ptr () ->- IO (Ptr ())---- Args : [Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data to copy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 0, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TPtr)--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_AttrDataCopyFunc :: FunPtr C_AttrDataCopyFunc -> C_AttrDataCopyFunc---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_AttrDataCopyFunc ::- (B.CallStack.HasCallStack, MonadIO m) =>- FunPtr C_AttrDataCopyFunc- -> Ptr ()- {- ^ /@userData@/: user data to copy -}- -> m (Ptr ())- {- ^ __Returns:__ new copy of /@userData@/. -}-dynamic_AttrDataCopyFunc __funPtr userData = liftIO $ do- result <- (__dynamic_C_AttrDataCopyFunc __funPtr) userData- return result---- | Generate a function pointer callable from C code, from a `C_AttrDataCopyFunc`.-foreign import ccall "wrapper"- mk_AttrDataCopyFunc :: C_AttrDataCopyFunc -> IO (FunPtr C_AttrDataCopyFunc)--{- |-Type of a function that can duplicate user data for an attribute.--}-type AttrDataCopyFunc =- IO (Ptr ())- {- ^ __Returns:__ new copy of /@userData@/. -}---- | A convenience synonym for @`Nothing` :: `Maybe` `AttrDataCopyFunc`@.-noAttrDataCopyFunc :: Maybe AttrDataCopyFunc-noAttrDataCopyFunc = Nothing--{- |-Type of a function that can duplicate user data for an attribute.--}-type AttrDataCopyFunc_WithClosures =- Ptr ()- {- ^ /@userData@/: user data to copy -}- -> IO (Ptr ())- {- ^ __Returns:__ new copy of /@userData@/. -}---- | A convenience synonym for @`Nothing` :: `Maybe` `AttrDataCopyFunc_WithClosures`@.-noAttrDataCopyFunc_WithClosures :: Maybe AttrDataCopyFunc_WithClosures-noAttrDataCopyFunc_WithClosures = Nothing---- | A simple wrapper that ignores the closure arguments.-drop_closures_AttrDataCopyFunc :: AttrDataCopyFunc -> AttrDataCopyFunc_WithClosures-drop_closures_AttrDataCopyFunc _f _ = _f ---- | Wrap the callback into a `GClosure`.-genClosure_AttrDataCopyFunc :: MonadIO m => AttrDataCopyFunc -> m (GClosure C_AttrDataCopyFunc)-genClosure_AttrDataCopyFunc cb = liftIO $ do- let cb' = drop_closures_AttrDataCopyFunc cb- let cb'' = wrap_AttrDataCopyFunc Nothing cb'- mk_AttrDataCopyFunc cb'' >>= B.GClosure.newGClosure----- | Wrap a `AttrDataCopyFunc` into a `C_AttrDataCopyFunc`.-wrap_AttrDataCopyFunc ::- Maybe (Ptr (FunPtr C_AttrDataCopyFunc)) ->- AttrDataCopyFunc_WithClosures ->- C_AttrDataCopyFunc-wrap_AttrDataCopyFunc funptrptr _cb userData = do- result <- _cb userData- maybeReleaseFunPtr funptrptr- return result----- callback AttrClassEqualFieldCallback--- -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "attr1", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr2", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_AttrClassEqualFieldCallback =- Ptr Pango.Attribute.Attribute ->- Ptr Pango.Attribute.Attribute ->- IO CInt---- Args : [Arg {argCName = "attr1", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr2", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_AttrClassEqualFieldCallback :: FunPtr C_AttrClassEqualFieldCallback -> C_AttrClassEqualFieldCallback---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_AttrClassEqualFieldCallback ::- (B.CallStack.HasCallStack, MonadIO m) =>- FunPtr C_AttrClassEqualFieldCallback- -> Pango.Attribute.Attribute- -> Pango.Attribute.Attribute- -> m Bool-dynamic_AttrClassEqualFieldCallback __funPtr attr1 attr2 = liftIO $ do- attr1' <- unsafeManagedPtrGetPtr attr1- attr2' <- unsafeManagedPtrGetPtr attr2- result <- (__dynamic_C_AttrClassEqualFieldCallback __funPtr) attr1' attr2'- let result' = (/= 0) result- touchManagedPtr attr1- touchManagedPtr attr2- return result'---- | Generate a function pointer callable from C code, from a `C_AttrClassEqualFieldCallback`.-foreign import ccall "wrapper"- mk_AttrClassEqualFieldCallback :: C_AttrClassEqualFieldCallback -> IO (FunPtr C_AttrClassEqualFieldCallback)--{- |-/No description available in the introspection data./--}-type AttrClassEqualFieldCallback =- Pango.Attribute.Attribute- -> Pango.Attribute.Attribute- -> IO Bool---- | A convenience synonym for @`Nothing` :: `Maybe` `AttrClassEqualFieldCallback`@.-noAttrClassEqualFieldCallback :: Maybe AttrClassEqualFieldCallback-noAttrClassEqualFieldCallback = Nothing---- | Wrap the callback into a `GClosure`.-genClosure_AttrClassEqualFieldCallback :: MonadIO m => AttrClassEqualFieldCallback -> m (GClosure C_AttrClassEqualFieldCallback)-genClosure_AttrClassEqualFieldCallback cb = liftIO $ do- let cb' = wrap_AttrClassEqualFieldCallback Nothing cb- mk_AttrClassEqualFieldCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `AttrClassEqualFieldCallback` into a `C_AttrClassEqualFieldCallback`.-wrap_AttrClassEqualFieldCallback ::- Maybe (Ptr (FunPtr C_AttrClassEqualFieldCallback)) ->- AttrClassEqualFieldCallback ->- C_AttrClassEqualFieldCallback-wrap_AttrClassEqualFieldCallback funptrptr _cb attr1 attr2 = do- attr1' <- (newPtr Pango.Attribute.Attribute) attr1- attr2' <- (newPtr Pango.Attribute.Attribute) attr2- result <- _cb attr1' attr2'- maybeReleaseFunPtr funptrptr- let result' = (fromIntegral . fromEnum) result- return result'----- callback AttrClassDestroyFieldCallback--- -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_AttrClassDestroyFieldCallback =- Ptr Pango.Attribute.Attribute ->- IO ()---- Args : [Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "dynamic" __dynamic_C_AttrClassDestroyFieldCallback :: FunPtr C_AttrClassDestroyFieldCallback -> C_AttrClassDestroyFieldCallback---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_AttrClassDestroyFieldCallback ::- (B.CallStack.HasCallStack, MonadIO m) =>- FunPtr C_AttrClassDestroyFieldCallback- -> Pango.Attribute.Attribute- -> m ()-dynamic_AttrClassDestroyFieldCallback __funPtr attr = liftIO $ do- attr' <- unsafeManagedPtrGetPtr attr- (__dynamic_C_AttrClassDestroyFieldCallback __funPtr) attr'- touchManagedPtr attr- return ()---- | Generate a function pointer callable from C code, from a `C_AttrClassDestroyFieldCallback`.-foreign import ccall "wrapper"- mk_AttrClassDestroyFieldCallback :: C_AttrClassDestroyFieldCallback -> IO (FunPtr C_AttrClassDestroyFieldCallback)--{- |-/No description available in the introspection data./--}-type AttrClassDestroyFieldCallback =- Pango.Attribute.Attribute- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `AttrClassDestroyFieldCallback`@.-noAttrClassDestroyFieldCallback :: Maybe AttrClassDestroyFieldCallback-noAttrClassDestroyFieldCallback = Nothing---- | Wrap the callback into a `GClosure`.-genClosure_AttrClassDestroyFieldCallback :: MonadIO m => AttrClassDestroyFieldCallback -> m (GClosure C_AttrClassDestroyFieldCallback)-genClosure_AttrClassDestroyFieldCallback cb = liftIO $ do- let cb' = wrap_AttrClassDestroyFieldCallback Nothing cb- mk_AttrClassDestroyFieldCallback cb' >>= B.GClosure.newGClosure----- | Wrap a `AttrClassDestroyFieldCallback` into a `C_AttrClassDestroyFieldCallback`.-wrap_AttrClassDestroyFieldCallback ::- Maybe (Ptr (FunPtr C_AttrClassDestroyFieldCallback)) ->- AttrClassDestroyFieldCallback ->- C_AttrClassDestroyFieldCallback-wrap_AttrClassDestroyFieldCallback funptrptr _cb attr = do- attr' <- (newPtr Pango.Attribute.Attribute) attr- _cb attr'- maybeReleaseFunPtr funptrptr---
− GI/Pango/Constants.hs
@@ -1,165 +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 (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Constants- ( - pattern VERSION_MIN_REQUIRED ,- pattern UNKNOWN_GLYPH_WIDTH ,- pattern UNKNOWN_GLYPH_HEIGHT ,- pattern SCALE ,- pattern RENDER_TYPE_NONE ,- pattern GLYPH_UNKNOWN_FLAG ,- pattern GLYPH_INVALID_INPUT ,- pattern GLYPH_EMPTY ,- pattern ENGINE_TYPE_SHAPE ,- pattern ENGINE_TYPE_LANG ,- pattern ATTR_INDEX_FROM_TEXT_BEGINNING ,- pattern ANALYSIS_FLAG_IS_ELLIPSIS ,- pattern ANALYSIS_FLAG_CENTERED_BASELINE ,-- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---{- |-A macro that should be defined by the user prior to including-the pango.h header.-The definition should be one of the predefined Pango version-macros: @/PANGO_VERSION_1_2/@, @/PANGO_VERSION_1_4/@,...--This macro defines the earliest version of Pango that the package is-required to be able to compile against.--If the compiler is configured to warn about the use of deprecated-functions, then using functions that were deprecated in version-'GI.Pango.Constants.VERSION_MIN_REQUIRED' or earlier will cause warnings (but-using functions deprecated in later releases will not).--/Since: 1.42/--}-pattern VERSION_MIN_REQUIRED = 2 :: Int32--{- |-/No description available in the introspection data./--}-pattern UNKNOWN_GLYPH_WIDTH = 10 :: Int32--{- |-/No description available in the introspection data./--}-pattern UNKNOWN_GLYPH_HEIGHT = 14 :: Int32--{- |-The 'GI.Pango.Constants.SCALE' macro represents the scale between dimensions used-for Pango distances and device units. (The definition of device-units is dependent on the output device; it will typically be pixels-for a screen, and points for a printer.) 'GI.Pango.Constants.SCALE' is currently-1024, but this may be changed in the future.--When setting font sizes, device units are always considered to be-points (as in \"12 point font\"), rather than pixels.--}-pattern SCALE = 1024 :: Int32--{-# DEPRECATED RENDER_TYPE_NONE ["(Since version 1.38)"] #-}-{- |-A string constant defining the render type-for engines that are not rendering-system specific.--}-pattern RENDER_TYPE_NONE = "PangoRenderNone" :: T.Text--{- |-The 'GI.Pango.Constants.GLYPH_UNKNOWN_FLAG' macro is a flag value that can be added to-a @/gunichar/@ value of a valid Unicode character, to produce a @/PangoGlyph/@-value, representing an unknown-character glyph for the respective @/gunichar/@.--}-pattern GLYPH_UNKNOWN_FLAG = 268435456 :: Word32--{- |-The 'GI.Pango.Constants.GLYPH_INVALID_INPUT' macro represents a @/PangoGlyph/@ value that has a-special meaning of invalid input. 'GI.Pango.Objects.Layout.Layout' produces one such glyph-per invalid input UTF-8 byte and such a glyph is rendered as a crossed-box.--Note that this value is defined such that it has the 'GI.Pango.Constants.GLYPH_UNKNOWN_FLAG'-on.--/Since: 1.20/--}-pattern GLYPH_INVALID_INPUT = 4294967295 :: Word32--{- |-The 'GI.Pango.Constants.GLYPH_EMPTY' macro represents a @/PangoGlyph/@ value that has a- special meaning, which is a zero-width empty glyph. This is useful for-example in shaper modules, to use as the glyph for various zero-width-Unicode characters (those passing 'GI.Pango.Functions.isZeroWidth').--}-pattern GLYPH_EMPTY = 268435455 :: Word32--{-# DEPRECATED ENGINE_TYPE_SHAPE ["(Since version 1.38)"] #-}-{- |-A string constant defining the engine type for shaping engines.-These engines derive from 'GI.Pango.Objects.EngineShape.EngineShape'.--}-pattern ENGINE_TYPE_SHAPE = "PangoEngineShape" :: T.Text--{-# DEPRECATED ENGINE_TYPE_LANG ["(Since version 1.38)"] #-}-{- |-A string constant defining the engine type for language engines.-These engines derive from 'GI.Pango.Objects.EngineLang.EngineLang'.--}-pattern ENGINE_TYPE_LANG = "PangoEngineLang" :: T.Text--{- |-This value can be used to set the start_index member of a 'GI.Pango.Structs.Attribute.Attribute'-such that the attribute covers from the beginning of the text.--/Since: 1.24/--}-pattern ATTR_INDEX_FROM_TEXT_BEGINNING = 0 :: Int32--{- |-This flag is used to mark runs that hold ellipsized text,-in an ellipsized layout.--/Since: 1.36.7/--}-pattern ANALYSIS_FLAG_IS_ELLIPSIS = 2 :: Int32--{- |-Whether the segment should be shifted to center around the baseline.-Used in vertical writing directions mostly.--/Since: 1.16/--}-pattern ANALYSIS_FLAG_CENTERED_BASELINE = 1 :: Int32--
− GI/Pango/Enums.hs
@@ -1,1975 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Enums- ( -- -- * Enumerations--- ** Alignment #enum:Alignment#-- Alignment(..) ,----- ** AttrType #enum:AttrType#-- AttrType(..) ,----- ** BidiType #enum:BidiType#-- BidiType(..) ,----- ** CoverageLevel #enum:CoverageLevel#-- CoverageLevel(..) ,----- ** Direction #enum:Direction#-- Direction(..) ,----- ** EllipsizeMode #enum:EllipsizeMode#-- EllipsizeMode(..) ,----- ** Gravity #enum:Gravity#-- Gravity(..) ,----- ** GravityHint #enum:GravityHint#-- GravityHint(..) ,----- ** RenderPart #enum:RenderPart#-- RenderPart(..) ,----- ** Script #enum:Script#-- Script(..) ,----- ** Stretch #enum:Stretch#-- Stretch(..) ,----- ** Style #enum:Style#-- Style(..) ,----- ** TabAlign #enum:TabAlign#-- TabAlign(..) ,----- ** Underline #enum:Underline#-- Underline(..) ,----- ** Variant #enum:Variant#-- Variant(..) ,----- ** Weight #enum:Weight#-- Weight(..) ,----- ** WrapMode #enum:WrapMode#-- WrapMode(..) ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- Enum WrapMode-{- |-A 'GI.Pango.Enums.WrapMode' describes how to wrap the lines of a 'GI.Pango.Objects.Layout.Layout' to the desired width.--}-data WrapMode = - WrapModeWord- {- ^- wrap lines at word boundaries.- -}- | WrapModeChar- {- ^- wrap lines at character boundaries.- -}- | WrapModeWordChar- {- ^- wrap lines at word boundaries, but fall back to character boundaries if there is not- enough space for a full word.- -}- | AnotherWrapMode Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum WrapMode where- fromEnum WrapModeWord = 0- fromEnum WrapModeChar = 1- fromEnum WrapModeWordChar = 2- fromEnum (AnotherWrapMode k) = k-- toEnum 0 = WrapModeWord- toEnum 1 = WrapModeChar- toEnum 2 = WrapModeWordChar- toEnum k = AnotherWrapMode k--instance P.Ord WrapMode where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_wrap_mode_get_type" c_pango_wrap_mode_get_type :: - IO GType--instance BoxedEnum WrapMode where- boxedEnumType _ = c_pango_wrap_mode_get_type---- Enum Weight-{- |-An enumeration specifying the weight (boldness) of a font. This is a numerical-value ranging from 100 to 1000, but there are some predefined values:--}-data Weight = - WeightThin- {- ^- the thin weight (= 100; Since: 1.24)- -}- | WeightUltralight- {- ^- the ultralight weight (= 200)- -}- | WeightLight- {- ^- the light weight (= 300)- -}- | WeightSemilight- {- ^- the semilight weight (= 350; Since: 1.36.7)- -}- | WeightBook- {- ^- the book weight (= 380; Since: 1.24)- -}- | WeightNormal- {- ^- the default weight (= 400)- -}- | WeightMedium- {- ^- the normal weight (= 500; Since: 1.24)- -}- | WeightSemibold- {- ^- the semibold weight (= 600)- -}- | WeightBold- {- ^- the bold weight (= 700)- -}- | WeightUltrabold- {- ^- the ultrabold weight (= 800)- -}- | WeightHeavy- {- ^- the heavy weight (= 900)- -}- | WeightUltraheavy- {- ^- the ultraheavy weight (= 1000; Since: 1.24)- -}- | AnotherWeight Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Weight where- fromEnum WeightThin = 100- fromEnum WeightUltralight = 200- fromEnum WeightLight = 300- fromEnum WeightSemilight = 350- fromEnum WeightBook = 380- fromEnum WeightNormal = 400- fromEnum WeightMedium = 500- fromEnum WeightSemibold = 600- fromEnum WeightBold = 700- fromEnum WeightUltrabold = 800- fromEnum WeightHeavy = 900- fromEnum WeightUltraheavy = 1000- fromEnum (AnotherWeight k) = k-- toEnum 100 = WeightThin- toEnum 200 = WeightUltralight- toEnum 300 = WeightLight- toEnum 350 = WeightSemilight- toEnum 380 = WeightBook- toEnum 400 = WeightNormal- toEnum 500 = WeightMedium- toEnum 600 = WeightSemibold- toEnum 700 = WeightBold- toEnum 800 = WeightUltrabold- toEnum 900 = WeightHeavy- toEnum 1000 = WeightUltraheavy- toEnum k = AnotherWeight k--instance P.Ord Weight where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_weight_get_type" c_pango_weight_get_type :: - IO GType--instance BoxedEnum Weight where- boxedEnumType _ = c_pango_weight_get_type---- Enum Variant-{- |-An enumeration specifying capitalization variant of the font.--}-data Variant = - VariantNormal- {- ^- A normal font.- -}- | VariantSmallCaps- {- ^- A font with the lower case characters- replaced by smaller variants of the capital characters.- -}- | AnotherVariant Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Variant where- fromEnum VariantNormal = 0- fromEnum VariantSmallCaps = 1- fromEnum (AnotherVariant k) = k-- toEnum 0 = VariantNormal- toEnum 1 = VariantSmallCaps- toEnum k = AnotherVariant k--instance P.Ord Variant where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_variant_get_type" c_pango_variant_get_type :: - IO GType--instance BoxedEnum Variant where- boxedEnumType _ = c_pango_variant_get_type---- Enum Underline-{- |-The 'GI.Pango.Enums.Underline' enumeration is used to specify-whether text should be underlined, and if so, the type-of underlining.--}-data Underline = - UnderlineNone- {- ^- no underline should be drawn- -}- | UnderlineSingle- {- ^- a single underline should be drawn- -}- | UnderlineDouble- {- ^- a double underline should be drawn- -}- | UnderlineLow- {- ^- a single underline should be drawn at a position- beneath the ink extents of the text being- underlined. This should be used only for underlining- single characters, such as for keyboard- accelerators. 'GI.Pango.Enums.UnderlineSingle' should- be used for extended portions of text.- -}- | UnderlineError- {- ^- a wavy underline should be drawn below.- This underline is typically used to indicate- an error such as a possilble mispelling; in some- cases a contrasting color may automatically- be used. This type of underlining is available since Pango 1.4.- -}- | AnotherUnderline Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Underline where- fromEnum UnderlineNone = 0- fromEnum UnderlineSingle = 1- fromEnum UnderlineDouble = 2- fromEnum UnderlineLow = 3- fromEnum UnderlineError = 4- fromEnum (AnotherUnderline k) = k-- toEnum 0 = UnderlineNone- toEnum 1 = UnderlineSingle- toEnum 2 = UnderlineDouble- toEnum 3 = UnderlineLow- toEnum 4 = UnderlineError- toEnum k = AnotherUnderline k--instance P.Ord Underline where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_underline_get_type" c_pango_underline_get_type :: - IO GType--instance BoxedEnum Underline where- boxedEnumType _ = c_pango_underline_get_type---- Enum TabAlign-{- |-A 'GI.Pango.Enums.TabAlign' specifies where a tab stop appears relative to the text.--}-data TabAlign = - TabAlignLeft- {- ^- the tab stop appears to the left of the text.- -}- | AnotherTabAlign Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum TabAlign where- fromEnum TabAlignLeft = 0- fromEnum (AnotherTabAlign k) = k-- toEnum 0 = TabAlignLeft- toEnum k = AnotherTabAlign k--instance P.Ord TabAlign where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_tab_align_get_type" c_pango_tab_align_get_type :: - IO GType--instance BoxedEnum TabAlign where- boxedEnumType _ = c_pango_tab_align_get_type---- Enum Style-{- |-An enumeration specifying the various slant styles possible for a font.--}-data Style = - StyleNormal- {- ^- the font is upright.- -}- | StyleOblique- {- ^- the font is slanted, but in a roman style.- -}- | StyleItalic- {- ^- the font is slanted in an italic style.- -}- | AnotherStyle Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Style where- fromEnum StyleNormal = 0- fromEnum StyleOblique = 1- fromEnum StyleItalic = 2- fromEnum (AnotherStyle k) = k-- toEnum 0 = StyleNormal- toEnum 1 = StyleOblique- toEnum 2 = StyleItalic- toEnum k = AnotherStyle k--instance P.Ord Style where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_style_get_type" c_pango_style_get_type :: - IO GType--instance BoxedEnum Style where- boxedEnumType _ = c_pango_style_get_type---- Enum Stretch-{- |-An enumeration specifying the width of the font relative to other designs-within a family.--}-data Stretch = - StretchUltraCondensed- {- ^- ultra condensed width- -}- | StretchExtraCondensed- {- ^- extra condensed width- -}- | StretchCondensed- {- ^- condensed width- -}- | StretchSemiCondensed- {- ^- semi condensed width- -}- | StretchNormal- {- ^- the normal width- -}- | StretchSemiExpanded- {- ^- semi expanded width- -}- | StretchExpanded- {- ^- expanded width- -}- | StretchExtraExpanded- {- ^- extra expanded width- -}- | StretchUltraExpanded- {- ^- ultra expanded width- -}- | AnotherStretch Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Stretch where- fromEnum StretchUltraCondensed = 0- fromEnum StretchExtraCondensed = 1- fromEnum StretchCondensed = 2- fromEnum StretchSemiCondensed = 3- fromEnum StretchNormal = 4- fromEnum StretchSemiExpanded = 5- fromEnum StretchExpanded = 6- fromEnum StretchExtraExpanded = 7- fromEnum StretchUltraExpanded = 8- fromEnum (AnotherStretch k) = k-- toEnum 0 = StretchUltraCondensed- toEnum 1 = StretchExtraCondensed- toEnum 2 = StretchCondensed- toEnum 3 = StretchSemiCondensed- toEnum 4 = StretchNormal- toEnum 5 = StretchSemiExpanded- toEnum 6 = StretchExpanded- toEnum 7 = StretchExtraExpanded- toEnum 8 = StretchUltraExpanded- toEnum k = AnotherStretch k--instance P.Ord Stretch where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_stretch_get_type" c_pango_stretch_get_type :: - IO GType--instance BoxedEnum Stretch where- boxedEnumType _ = c_pango_stretch_get_type---- Enum Script-{- |-The 'GI.Pango.Enums.Script' enumeration identifies different writing-systems. The values correspond to the names as defined in the-Unicode standard.-Note that new types may be added in the future. Applications should be ready-to handle unknown values. This enumeration is interchangeable with-'GI.GLib.Enums.UnicodeScript'. See \<ulink-url=\"http:\/\/www.unicode.org\/reports\/tr24\/\">Unicode Standard Annex-@/24/@: Script names\<\/ulink>.--}-data Script = - ScriptInvalidCode- {- ^- a value never returned from 'GI.Pango.Functions.scriptForUnichar'- -}- | ScriptCommon- {- ^- a character used by multiple different scripts- -}- | ScriptInherited- {- ^- a mark glyph that takes its script from the- base glyph to which it is attached- -}- | ScriptArabic- {- ^- Arabic- -}- | ScriptArmenian- {- ^- Armenian- -}- | ScriptBengali- {- ^- Bengali- -}- | ScriptBopomofo- {- ^- Bopomofo- -}- | ScriptCherokee- {- ^- Cherokee- -}- | ScriptCoptic- {- ^- Coptic- -}- | ScriptCyrillic- {- ^- Cyrillic- -}- | ScriptDeseret- {- ^- Deseret- -}- | ScriptDevanagari- {- ^- Devanagari- -}- | ScriptEthiopic- {- ^- Ethiopic- -}- | ScriptGeorgian- {- ^- Georgian- -}- | ScriptGothic- {- ^- Gothic- -}- | ScriptGreek- {- ^- Greek- -}- | ScriptGujarati- {- ^- Gujarati- -}- | ScriptGurmukhi- {- ^- Gurmukhi- -}- | ScriptHan- {- ^- Han- -}- | ScriptHangul- {- ^- Hangul- -}- | ScriptHebrew- {- ^- Hebrew- -}- | ScriptHiragana- {- ^- Hiragana- -}- | ScriptKannada- {- ^- Kannada- -}- | ScriptKatakana- {- ^- Katakana- -}- | ScriptKhmer- {- ^- Khmer- -}- | ScriptLao- {- ^- Lao- -}- | ScriptLatin- {- ^- Latin- -}- | ScriptMalayalam- {- ^- Malayalam- -}- | ScriptMongolian- {- ^- Mongolian- -}- | ScriptMyanmar- {- ^- Myanmar- -}- | ScriptOgham- {- ^- Ogham- -}- | ScriptOldItalic- {- ^- Old Italic- -}- | ScriptOriya- {- ^- Oriya- -}- | ScriptRunic- {- ^- Runic- -}- | ScriptSinhala- {- ^- Sinhala- -}- | ScriptSyriac- {- ^- Syriac- -}- | ScriptTamil- {- ^- Tamil- -}- | ScriptTelugu- {- ^- Telugu- -}- | ScriptThaana- {- ^- Thaana- -}- | ScriptThai- {- ^- Thai- -}- | ScriptTibetan- {- ^- Tibetan- -}- | ScriptCanadianAboriginal- {- ^- Canadian Aboriginal- -}- | ScriptYi- {- ^- Yi- -}- | ScriptTagalog- {- ^- Tagalog- -}- | ScriptHanunoo- {- ^- Hanunoo- -}- | ScriptBuhid- {- ^- Buhid- -}- | ScriptTagbanwa- {- ^- Tagbanwa- -}- | ScriptBraille- {- ^- Braille- -}- | ScriptCypriot- {- ^- Cypriot- -}- | ScriptLimbu- {- ^- Limbu- -}- | ScriptOsmanya- {- ^- Osmanya- -}- | ScriptShavian- {- ^- Shavian- -}- | ScriptLinearB- {- ^- Linear B- -}- | ScriptTaiLe- {- ^- Tai Le- -}- | ScriptUgaritic- {- ^- Ugaritic- -}- | ScriptNewTaiLue- {- ^- New Tai Lue. Since 1.10- -}- | ScriptBuginese- {- ^- Buginese. Since 1.10- -}- | ScriptGlagolitic- {- ^- Glagolitic. Since 1.10- -}- | ScriptTifinagh- {- ^- Tifinagh. Since 1.10- -}- | ScriptSylotiNagri- {- ^- Syloti Nagri. Since 1.10- -}- | ScriptOldPersian- {- ^- Old Persian. Since 1.10- -}- | ScriptKharoshthi- {- ^- Kharoshthi. Since 1.10- -}- | ScriptUnknown- {- ^- an unassigned code point. Since 1.14- -}- | ScriptBalinese- {- ^- Balinese. Since 1.14- -}- | ScriptCuneiform- {- ^- Cuneiform. Since 1.14- -}- | ScriptPhoenician- {- ^- Phoenician. Since 1.14- -}- | ScriptPhagsPa- {- ^- Phags-pa. Since 1.14- -}- | ScriptNko- {- ^- N\'Ko. Since 1.14- -}- | ScriptKayahLi- {- ^- Kayah Li. Since 1.20.1- -}- | ScriptLepcha- {- ^- Lepcha. Since 1.20.1- -}- | ScriptRejang- {- ^- Rejang. Since 1.20.1- -}- | ScriptSundanese- {- ^- Sundanese. Since 1.20.1- -}- | ScriptSaurashtra- {- ^- Saurashtra. Since 1.20.1- -}- | ScriptCham- {- ^- Cham. Since 1.20.1- -}- | ScriptOlChiki- {- ^- Ol Chiki. Since 1.20.1- -}- | ScriptVai- {- ^- Vai. Since 1.20.1- -}- | ScriptCarian- {- ^- Carian. Since 1.20.1- -}- | ScriptLycian- {- ^- Lycian. Since 1.20.1- -}- | ScriptLydian- {- ^- Lydian. Since 1.20.1- -}- | ScriptBatak- {- ^- Batak. Since 1.32- -}- | ScriptBrahmi- {- ^- Brahmi. Since 1.32- -}- | ScriptMandaic- {- ^- Mandaic. Since 1.32- -}- | ScriptChakma- {- ^- Chakma. Since: 1.32- -}- | ScriptMeroiticCursive- {- ^- Meroitic Cursive. Since: 1.32- -}- | ScriptMeroiticHieroglyphs- {- ^- Meroitic Hieroglyphs. Since: 1.32- -}- | ScriptMiao- {- ^- Miao. Since: 1.32- -}- | ScriptSharada- {- ^- Sharada. Since: 1.32- -}- | ScriptSoraSompeng- {- ^- Sora Sompeng. Since: 1.32- -}- | ScriptTakri- {- ^- Takri. Since: 1.32- -}- | ScriptBassaVah- {- ^- Bassa. Since: 1.40- -}- | ScriptCaucasianAlbanian- {- ^- Caucasian Albanian. Since: 1.40- -}- | ScriptDuployan- {- ^- Duployan. Since: 1.40- -}- | ScriptElbasan- {- ^- Elbasan. Since: 1.40- -}- | ScriptGrantha- {- ^- Grantha. Since: 1.40- -}- | ScriptKhojki- {- ^- Kjohki. Since: 1.40- -}- | ScriptKhudawadi- {- ^- Khudawadi, Sindhi. Since: 1.40- -}- | ScriptLinearA- {- ^- Linear A. Since: 1.40- -}- | ScriptMahajani- {- ^- Mahajani. Since: 1.40- -}- | ScriptManichaean- {- ^- Manichaean. Since: 1.40- -}- | ScriptMendeKikakui- {- ^- Mende Kikakui. Since: 1.40- -}- | ScriptModi- {- ^- Modi. Since: 1.40- -}- | ScriptMro- {- ^- Mro. Since: 1.40- -}- | ScriptNabataean- {- ^- Nabataean. Since: 1.40- -}- | ScriptOldNorthArabian- {- ^- Old North Arabian. Since: 1.40- -}- | ScriptOldPermic- {- ^- Old Permic. Since: 1.40- -}- | ScriptPahawhHmong- {- ^- Pahawh Hmong. Since: 1.40- -}- | ScriptPalmyrene- {- ^- Palmyrene. Since: 1.40- -}- | ScriptPauCinHau- {- ^- Pau Cin Hau. Since: 1.40- -}- | ScriptPsalterPahlavi- {- ^- Psalter Pahlavi. Since: 1.40- -}- | ScriptSiddham- {- ^- Siddham. Since: 1.40- -}- | ScriptTirhuta- {- ^- Tirhuta. Since: 1.40- -}- | ScriptWarangCiti- {- ^- Warang Citi. Since: 1.40- -}- | ScriptAhom- {- ^- Ahom. Since: 1.40- -}- | ScriptAnatolianHieroglyphs- {- ^- Anatolian Hieroglyphs. Since: 1.40- -}- | ScriptHatran- {- ^- Hatran. Since: 1.40- -}- | ScriptMultani- {- ^- Multani. Since: 1.40- -}- | ScriptOldHungarian- {- ^- Old Hungarian. Since: 1.40- -}- | ScriptSignwriting- {- ^- Signwriting. Since: 1.40- -}- | AnotherScript Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Script where- fromEnum ScriptInvalidCode = -1- fromEnum ScriptCommon = 0- fromEnum ScriptInherited = 1- fromEnum ScriptArabic = 2- fromEnum ScriptArmenian = 3- fromEnum ScriptBengali = 4- fromEnum ScriptBopomofo = 5- fromEnum ScriptCherokee = 6- fromEnum ScriptCoptic = 7- fromEnum ScriptCyrillic = 8- fromEnum ScriptDeseret = 9- fromEnum ScriptDevanagari = 10- fromEnum ScriptEthiopic = 11- fromEnum ScriptGeorgian = 12- fromEnum ScriptGothic = 13- fromEnum ScriptGreek = 14- fromEnum ScriptGujarati = 15- fromEnum ScriptGurmukhi = 16- fromEnum ScriptHan = 17- fromEnum ScriptHangul = 18- fromEnum ScriptHebrew = 19- fromEnum ScriptHiragana = 20- fromEnum ScriptKannada = 21- fromEnum ScriptKatakana = 22- fromEnum ScriptKhmer = 23- fromEnum ScriptLao = 24- fromEnum ScriptLatin = 25- fromEnum ScriptMalayalam = 26- fromEnum ScriptMongolian = 27- fromEnum ScriptMyanmar = 28- fromEnum ScriptOgham = 29- fromEnum ScriptOldItalic = 30- fromEnum ScriptOriya = 31- fromEnum ScriptRunic = 32- fromEnum ScriptSinhala = 33- fromEnum ScriptSyriac = 34- fromEnum ScriptTamil = 35- fromEnum ScriptTelugu = 36- fromEnum ScriptThaana = 37- fromEnum ScriptThai = 38- fromEnum ScriptTibetan = 39- fromEnum ScriptCanadianAboriginal = 40- fromEnum ScriptYi = 41- fromEnum ScriptTagalog = 42- fromEnum ScriptHanunoo = 43- fromEnum ScriptBuhid = 44- fromEnum ScriptTagbanwa = 45- fromEnum ScriptBraille = 46- fromEnum ScriptCypriot = 47- fromEnum ScriptLimbu = 48- fromEnum ScriptOsmanya = 49- fromEnum ScriptShavian = 50- fromEnum ScriptLinearB = 51- fromEnum ScriptTaiLe = 52- fromEnum ScriptUgaritic = 53- fromEnum ScriptNewTaiLue = 54- fromEnum ScriptBuginese = 55- fromEnum ScriptGlagolitic = 56- fromEnum ScriptTifinagh = 57- fromEnum ScriptSylotiNagri = 58- fromEnum ScriptOldPersian = 59- fromEnum ScriptKharoshthi = 60- fromEnum ScriptUnknown = 61- fromEnum ScriptBalinese = 62- fromEnum ScriptCuneiform = 63- fromEnum ScriptPhoenician = 64- fromEnum ScriptPhagsPa = 65- fromEnum ScriptNko = 66- fromEnum ScriptKayahLi = 67- fromEnum ScriptLepcha = 68- fromEnum ScriptRejang = 69- fromEnum ScriptSundanese = 70- fromEnum ScriptSaurashtra = 71- fromEnum ScriptCham = 72- fromEnum ScriptOlChiki = 73- fromEnum ScriptVai = 74- fromEnum ScriptCarian = 75- fromEnum ScriptLycian = 76- fromEnum ScriptLydian = 77- fromEnum ScriptBatak = 78- fromEnum ScriptBrahmi = 79- fromEnum ScriptMandaic = 80- fromEnum ScriptChakma = 81- fromEnum ScriptMeroiticCursive = 82- fromEnum ScriptMeroiticHieroglyphs = 83- fromEnum ScriptMiao = 84- fromEnum ScriptSharada = 85- fromEnum ScriptSoraSompeng = 86- fromEnum ScriptTakri = 87- fromEnum ScriptBassaVah = 88- fromEnum ScriptCaucasianAlbanian = 89- fromEnum ScriptDuployan = 90- fromEnum ScriptElbasan = 91- fromEnum ScriptGrantha = 92- fromEnum ScriptKhojki = 93- fromEnum ScriptKhudawadi = 94- fromEnum ScriptLinearA = 95- fromEnum ScriptMahajani = 96- fromEnum ScriptManichaean = 97- fromEnum ScriptMendeKikakui = 98- fromEnum ScriptModi = 99- fromEnum ScriptMro = 100- fromEnum ScriptNabataean = 101- fromEnum ScriptOldNorthArabian = 102- fromEnum ScriptOldPermic = 103- fromEnum ScriptPahawhHmong = 104- fromEnum ScriptPalmyrene = 105- fromEnum ScriptPauCinHau = 106- fromEnum ScriptPsalterPahlavi = 107- fromEnum ScriptSiddham = 108- fromEnum ScriptTirhuta = 109- fromEnum ScriptWarangCiti = 110- fromEnum ScriptAhom = 111- fromEnum ScriptAnatolianHieroglyphs = 112- fromEnum ScriptHatran = 113- fromEnum ScriptMultani = 114- fromEnum ScriptOldHungarian = 115- fromEnum ScriptSignwriting = 116- fromEnum (AnotherScript k) = k-- toEnum -1 = ScriptInvalidCode- toEnum 0 = ScriptCommon- toEnum 1 = ScriptInherited- toEnum 2 = ScriptArabic- toEnum 3 = ScriptArmenian- toEnum 4 = ScriptBengali- toEnum 5 = ScriptBopomofo- toEnum 6 = ScriptCherokee- toEnum 7 = ScriptCoptic- toEnum 8 = ScriptCyrillic- toEnum 9 = ScriptDeseret- toEnum 10 = ScriptDevanagari- toEnum 11 = ScriptEthiopic- toEnum 12 = ScriptGeorgian- toEnum 13 = ScriptGothic- toEnum 14 = ScriptGreek- toEnum 15 = ScriptGujarati- toEnum 16 = ScriptGurmukhi- toEnum 17 = ScriptHan- toEnum 18 = ScriptHangul- toEnum 19 = ScriptHebrew- toEnum 20 = ScriptHiragana- toEnum 21 = ScriptKannada- toEnum 22 = ScriptKatakana- toEnum 23 = ScriptKhmer- toEnum 24 = ScriptLao- toEnum 25 = ScriptLatin- toEnum 26 = ScriptMalayalam- toEnum 27 = ScriptMongolian- toEnum 28 = ScriptMyanmar- toEnum 29 = ScriptOgham- toEnum 30 = ScriptOldItalic- toEnum 31 = ScriptOriya- toEnum 32 = ScriptRunic- toEnum 33 = ScriptSinhala- toEnum 34 = ScriptSyriac- toEnum 35 = ScriptTamil- toEnum 36 = ScriptTelugu- toEnum 37 = ScriptThaana- toEnum 38 = ScriptThai- toEnum 39 = ScriptTibetan- toEnum 40 = ScriptCanadianAboriginal- toEnum 41 = ScriptYi- toEnum 42 = ScriptTagalog- toEnum 43 = ScriptHanunoo- toEnum 44 = ScriptBuhid- toEnum 45 = ScriptTagbanwa- toEnum 46 = ScriptBraille- toEnum 47 = ScriptCypriot- toEnum 48 = ScriptLimbu- toEnum 49 = ScriptOsmanya- toEnum 50 = ScriptShavian- toEnum 51 = ScriptLinearB- toEnum 52 = ScriptTaiLe- toEnum 53 = ScriptUgaritic- toEnum 54 = ScriptNewTaiLue- toEnum 55 = ScriptBuginese- toEnum 56 = ScriptGlagolitic- toEnum 57 = ScriptTifinagh- toEnum 58 = ScriptSylotiNagri- toEnum 59 = ScriptOldPersian- toEnum 60 = ScriptKharoshthi- toEnum 61 = ScriptUnknown- toEnum 62 = ScriptBalinese- toEnum 63 = ScriptCuneiform- toEnum 64 = ScriptPhoenician- toEnum 65 = ScriptPhagsPa- toEnum 66 = ScriptNko- toEnum 67 = ScriptKayahLi- toEnum 68 = ScriptLepcha- toEnum 69 = ScriptRejang- toEnum 70 = ScriptSundanese- toEnum 71 = ScriptSaurashtra- toEnum 72 = ScriptCham- toEnum 73 = ScriptOlChiki- toEnum 74 = ScriptVai- toEnum 75 = ScriptCarian- toEnum 76 = ScriptLycian- toEnum 77 = ScriptLydian- toEnum 78 = ScriptBatak- toEnum 79 = ScriptBrahmi- toEnum 80 = ScriptMandaic- toEnum 81 = ScriptChakma- toEnum 82 = ScriptMeroiticCursive- toEnum 83 = ScriptMeroiticHieroglyphs- toEnum 84 = ScriptMiao- toEnum 85 = ScriptSharada- toEnum 86 = ScriptSoraSompeng- toEnum 87 = ScriptTakri- toEnum 88 = ScriptBassaVah- toEnum 89 = ScriptCaucasianAlbanian- toEnum 90 = ScriptDuployan- toEnum 91 = ScriptElbasan- toEnum 92 = ScriptGrantha- toEnum 93 = ScriptKhojki- toEnum 94 = ScriptKhudawadi- toEnum 95 = ScriptLinearA- toEnum 96 = ScriptMahajani- toEnum 97 = ScriptManichaean- toEnum 98 = ScriptMendeKikakui- toEnum 99 = ScriptModi- toEnum 100 = ScriptMro- toEnum 101 = ScriptNabataean- toEnum 102 = ScriptOldNorthArabian- toEnum 103 = ScriptOldPermic- toEnum 104 = ScriptPahawhHmong- toEnum 105 = ScriptPalmyrene- toEnum 106 = ScriptPauCinHau- toEnum 107 = ScriptPsalterPahlavi- toEnum 108 = ScriptSiddham- toEnum 109 = ScriptTirhuta- toEnum 110 = ScriptWarangCiti- toEnum 111 = ScriptAhom- toEnum 112 = ScriptAnatolianHieroglyphs- toEnum 113 = ScriptHatran- toEnum 114 = ScriptMultani- toEnum 115 = ScriptOldHungarian- toEnum 116 = ScriptSignwriting- toEnum k = AnotherScript k--instance P.Ord Script where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_script_get_type" c_pango_script_get_type :: - IO GType--instance BoxedEnum Script where- boxedEnumType _ = c_pango_script_get_type---- Enum RenderPart-{- |-'GI.Pango.Enums.RenderPart' defines different items to render for such-purposes as setting colors.--/Since: 1.8/--}-data RenderPart = - RenderPartForeground- {- ^- the text itself- -}- | RenderPartBackground- {- ^- the area behind the text- -}- | RenderPartUnderline- {- ^- underlines- -}- | RenderPartStrikethrough- {- ^- strikethrough lines- -}- | AnotherRenderPart Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum RenderPart where- fromEnum RenderPartForeground = 0- fromEnum RenderPartBackground = 1- fromEnum RenderPartUnderline = 2- fromEnum RenderPartStrikethrough = 3- fromEnum (AnotherRenderPart k) = k-- toEnum 0 = RenderPartForeground- toEnum 1 = RenderPartBackground- toEnum 2 = RenderPartUnderline- toEnum 3 = RenderPartStrikethrough- toEnum k = AnotherRenderPart k--instance P.Ord RenderPart where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_render_part_get_type" c_pango_render_part_get_type :: - IO GType--instance BoxedEnum RenderPart where- boxedEnumType _ = c_pango_render_part_get_type---- Enum GravityHint-{- |-The 'GI.Pango.Enums.GravityHint' defines how horizontal scripts should behave in a-vertical context. That is, English excerpt in a vertical paragraph for-example.--See 'GI.Pango.Enums.Gravity'.--/Since: 1.16/--}-data GravityHint = - GravityHintNatural- {- ^- scripts will take their natural gravity based- on the base gravity and the script. This is the default.- -}- | GravityHintStrong- {- ^- always use the base gravity set, regardless of- the script.- -}- | GravityHintLine- {- ^- for scripts not in their natural direction (eg.- Latin in East gravity), choose per-script gravity such that every script- respects the line progression. This means, Latin and Arabic will take- opposite gravities and both flow top-to-bottom for example.- -}- | AnotherGravityHint Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum GravityHint where- fromEnum GravityHintNatural = 0- fromEnum GravityHintStrong = 1- fromEnum GravityHintLine = 2- fromEnum (AnotherGravityHint k) = k-- toEnum 0 = GravityHintNatural- toEnum 1 = GravityHintStrong- toEnum 2 = GravityHintLine- toEnum k = AnotherGravityHint k--instance P.Ord GravityHint where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_gravity_hint_get_type" c_pango_gravity_hint_get_type :: - IO GType--instance BoxedEnum GravityHint where- boxedEnumType _ = c_pango_gravity_hint_get_type---- Enum Gravity-{- |-The 'GI.Pango.Enums.Gravity' type represents the orientation of glyphs in a segment-of text. This is useful when rendering vertical text layouts. In-those situations, the layout is rotated using a non-identity PangoMatrix,-and then glyph orientation is controlled using 'GI.Pango.Enums.Gravity'.-Not every value in this enumeration makes sense for every usage of-'GI.Pango.Enums.Gravity'; for example, 'GI.Pango.Enums.GravityAuto' only can be passed to-'GI.Pango.Objects.Context.contextSetBaseGravity' and can only be returned by-'GI.Pango.Objects.Context.contextGetBaseGravity'.--See also: 'GI.Pango.Enums.GravityHint'--/Since: 1.16/--}-data Gravity = - GravitySouth- {- ^- Glyphs stand upright (default)- -}- | GravityEast- {- ^- Glyphs are rotated 90 degrees clockwise- -}- | GravityNorth- {- ^- Glyphs are upside-down- -}- | GravityWest- {- ^- Glyphs are rotated 90 degrees counter-clockwise- -}- | GravityAuto- {- ^- Gravity is resolved from the context matrix- -}- | AnotherGravity Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Gravity where- fromEnum GravitySouth = 0- fromEnum GravityEast = 1- fromEnum GravityNorth = 2- fromEnum GravityWest = 3- fromEnum GravityAuto = 4- fromEnum (AnotherGravity k) = k-- toEnum 0 = GravitySouth- toEnum 1 = GravityEast- toEnum 2 = GravityNorth- toEnum 3 = GravityWest- toEnum 4 = GravityAuto- toEnum k = AnotherGravity k--instance P.Ord Gravity where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_gravity_get_type" c_pango_gravity_get_type :: - IO GType--instance BoxedEnum Gravity where- boxedEnumType _ = c_pango_gravity_get_type---- Enum EllipsizeMode-{- |-The 'GI.Pango.Enums.EllipsizeMode' type describes what sort of (if any)-ellipsization should be applied to a line of text. In-the ellipsization process characters are removed from the-text in order to make it fit to a given width and replaced-with an ellipsis.--}-data EllipsizeMode = - EllipsizeModeNone- {- ^- No ellipsization- -}- | EllipsizeModeStart- {- ^- Omit characters at the start of the text- -}- | EllipsizeModeMiddle- {- ^- Omit characters in the middle of the text- -}- | EllipsizeModeEnd- {- ^- Omit characters at the end of the text- -}- | AnotherEllipsizeMode Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum EllipsizeMode where- fromEnum EllipsizeModeNone = 0- fromEnum EllipsizeModeStart = 1- fromEnum EllipsizeModeMiddle = 2- fromEnum EllipsizeModeEnd = 3- fromEnum (AnotherEllipsizeMode k) = k-- toEnum 0 = EllipsizeModeNone- toEnum 1 = EllipsizeModeStart- toEnum 2 = EllipsizeModeMiddle- toEnum 3 = EllipsizeModeEnd- toEnum k = AnotherEllipsizeMode k--instance P.Ord EllipsizeMode where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_ellipsize_mode_get_type" c_pango_ellipsize_mode_get_type :: - IO GType--instance BoxedEnum EllipsizeMode where- boxedEnumType _ = c_pango_ellipsize_mode_get_type---- Enum Direction-{- |-The 'GI.Pango.Enums.Direction' type represents a direction in the-Unicode bidirectional algorithm; not every value in this-enumeration makes sense for every usage of 'GI.Pango.Enums.Direction';-for example, the return value of 'GI.Pango.Functions.unicharDirection'-and 'GI.Pango.Functions.findBaseDir' cannot be 'GI.Pango.Enums.DirectionWeakLtr'-or 'GI.Pango.Enums.DirectionWeakRtl', since every character is either-neutral or has a strong direction; on the other hand-'GI.Pango.Enums.DirectionNeutral' doesn\'t make sense to pass-to 'GI.Pango.Functions.itemizeWithBaseDir'.--The 'GI.Pango.Enums.DirectionTtbLtr', 'GI.Pango.Enums.DirectionTtbRtl'-values come from an earlier interpretation of this-enumeration as the writing direction of a block of-text and are no longer used; See 'GI.Pango.Enums.Gravity' for how-vertical text is handled in Pango.--If you are interested in text direction, you should-really use fribidi directly. PangoDirection is only-retained because it is used in some public apis.--}-data Direction = - DirectionLtr- {- ^- A strong left-to-right direction- -}- | DirectionRtl- {- ^- A strong right-to-left direction- -}- | DirectionTtbLtr- {- ^- Deprecated value; treated the- same as 'GI.Pango.Enums.DirectionRtl'.- -}- | DirectionTtbRtl- {- ^- Deprecated value; treated the- same as 'GI.Pango.Enums.DirectionLtr'- -}- | DirectionWeakLtr- {- ^- A weak left-to-right direction- -}- | DirectionWeakRtl- {- ^- A weak right-to-left direction- -}- | DirectionNeutral- {- ^- No direction specified- -}- | AnotherDirection Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Direction where- fromEnum DirectionLtr = 0- fromEnum DirectionRtl = 1- fromEnum DirectionTtbLtr = 2- fromEnum DirectionTtbRtl = 3- fromEnum DirectionWeakLtr = 4- fromEnum DirectionWeakRtl = 5- fromEnum DirectionNeutral = 6- fromEnum (AnotherDirection k) = k-- toEnum 0 = DirectionLtr- toEnum 1 = DirectionRtl- toEnum 2 = DirectionTtbLtr- toEnum 3 = DirectionTtbRtl- toEnum 4 = DirectionWeakLtr- toEnum 5 = DirectionWeakRtl- toEnum 6 = DirectionNeutral- toEnum k = AnotherDirection k--instance P.Ord Direction where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_direction_get_type" c_pango_direction_get_type :: - IO GType--instance BoxedEnum Direction where- boxedEnumType _ = c_pango_direction_get_type---- Enum CoverageLevel-{- |-Used to indicate how well a font can represent a particular Unicode-character point for a particular script.--}-data CoverageLevel = - CoverageLevelNone- {- ^- The character is not representable with the font.- -}- | CoverageLevelFallback- {- ^- The character is represented in a way that may be- comprehensible but is not the correct graphical form.- For instance, a Hangul character represented as a- a sequence of Jamos, or a Latin transliteration of a Cyrillic word.- -}- | CoverageLevelApproximate- {- ^- The character is represented as basically the correct- graphical form, but with a stylistic variant inappropriate for- the current script.- -}- | CoverageLevelExact- {- ^- The character is represented as the correct graphical form.- -}- | AnotherCoverageLevel Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum CoverageLevel where- fromEnum CoverageLevelNone = 0- fromEnum CoverageLevelFallback = 1- fromEnum CoverageLevelApproximate = 2- fromEnum CoverageLevelExact = 3- fromEnum (AnotherCoverageLevel k) = k-- toEnum 0 = CoverageLevelNone- toEnum 1 = CoverageLevelFallback- toEnum 2 = CoverageLevelApproximate- toEnum 3 = CoverageLevelExact- toEnum k = AnotherCoverageLevel k--instance P.Ord CoverageLevel where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_coverage_level_get_type" c_pango_coverage_level_get_type :: - IO GType--instance BoxedEnum CoverageLevel where- boxedEnumType _ = c_pango_coverage_level_get_type---- Enum BidiType-{-# DEPRECATED BidiType ["(Since version 1.44)","Use fribidi for this information"] #-}-{- |-The 'GI.Pango.Enums.BidiType' type represents the bidirectional character-type of a Unicode character as specified by the-\<ulink url=\"http:\/\/www.unicode.org\/reports\/tr9\/\">Unicode bidirectional algorithm\<\/ulink>.--/Since: 1.22/--}-data BidiType = - BidiTypeL- {- ^- Left-to-Right- -}- | BidiTypeLre- {- ^- Left-to-Right Embedding- -}- | BidiTypeLro- {- ^- Left-to-Right Override- -}- | BidiTypeR- {- ^- Right-to-Left- -}- | BidiTypeAl- {- ^- Right-to-Left Arabic- -}- | BidiTypeRle- {- ^- Right-to-Left Embedding- -}- | BidiTypeRlo- {- ^- Right-to-Left Override- -}- | BidiTypePdf- {- ^- Pop Directional Format- -}- | BidiTypeEn- {- ^- European Number- -}- | BidiTypeEs- {- ^- European Number Separator- -}- | BidiTypeEt- {- ^- European Number Terminator- -}- | BidiTypeAn- {- ^- Arabic Number- -}- | BidiTypeCs- {- ^- Common Number Separator- -}- | BidiTypeNsm- {- ^- Nonspacing Mark- -}- | BidiTypeBn- {- ^- Boundary Neutral- -}- | BidiTypeB- {- ^- Paragraph Separator- -}- | BidiTypeS- {- ^- Segment Separator- -}- | BidiTypeWs- {- ^- Whitespace- -}- | BidiTypeOn- {- ^- Other Neutrals- -}- | AnotherBidiType Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum BidiType where- fromEnum BidiTypeL = 0- fromEnum BidiTypeLre = 1- fromEnum BidiTypeLro = 2- fromEnum BidiTypeR = 3- fromEnum BidiTypeAl = 4- fromEnum BidiTypeRle = 5- fromEnum BidiTypeRlo = 6- fromEnum BidiTypePdf = 7- fromEnum BidiTypeEn = 8- fromEnum BidiTypeEs = 9- fromEnum BidiTypeEt = 10- fromEnum BidiTypeAn = 11- fromEnum BidiTypeCs = 12- fromEnum BidiTypeNsm = 13- fromEnum BidiTypeBn = 14- fromEnum BidiTypeB = 15- fromEnum BidiTypeS = 16- fromEnum BidiTypeWs = 17- fromEnum BidiTypeOn = 18- fromEnum (AnotherBidiType k) = k-- toEnum 0 = BidiTypeL- toEnum 1 = BidiTypeLre- toEnum 2 = BidiTypeLro- toEnum 3 = BidiTypeR- toEnum 4 = BidiTypeAl- toEnum 5 = BidiTypeRle- toEnum 6 = BidiTypeRlo- toEnum 7 = BidiTypePdf- toEnum 8 = BidiTypeEn- toEnum 9 = BidiTypeEs- toEnum 10 = BidiTypeEt- toEnum 11 = BidiTypeAn- toEnum 12 = BidiTypeCs- toEnum 13 = BidiTypeNsm- toEnum 14 = BidiTypeBn- toEnum 15 = BidiTypeB- toEnum 16 = BidiTypeS- toEnum 17 = BidiTypeWs- toEnum 18 = BidiTypeOn- toEnum k = AnotherBidiType k--instance P.Ord BidiType where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_bidi_type_get_type" c_pango_bidi_type_get_type :: - IO GType--instance BoxedEnum BidiType where- boxedEnumType _ = c_pango_bidi_type_get_type---- Enum AttrType-{- |-The 'GI.Pango.Enums.AttrType'-distinguishes between different types of attributes. Along with the-predefined values, it is possible to allocate additional values-for custom attributes using 'GI.Pango.Functions.attrTypeRegister'. The predefined-values are given below. The type of structure used to store the-attribute is listed in parentheses after the description.--}-data AttrType = - AttrTypeInvalid- {- ^- does not happen- -}- | AttrTypeLanguage- {- ^- language ('GI.Pango.Structs.AttrLanguage.AttrLanguage')- -}- | AttrTypeFamily- {- ^- font family name list ('GI.Pango.Structs.AttrString.AttrString')- -}- | AttrTypeStyle- {- ^- font slant style ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeWeight- {- ^- font weight ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeVariant- {- ^- font variant (normal or small caps) ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeStretch- {- ^- font stretch ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeSize- {- ^- font size in points scaled by 'GI.Pango.Constants.SCALE' ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeFontDesc- {- ^- font description ('GI.Pango.Structs.AttrFontDesc.AttrFontDesc')- -}- | AttrTypeForeground- {- ^- foreground color ('GI.Pango.Structs.AttrColor.AttrColor')- -}- | AttrTypeBackground- {- ^- background color ('GI.Pango.Structs.AttrColor.AttrColor')- -}- | AttrTypeUnderline- {- ^- whether the text has an underline ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeStrikethrough- {- ^- whether the text is struck-through ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeRise- {- ^- baseline displacement ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeShape- {- ^- shape ('GI.Pango.Structs.AttrShape.AttrShape')- -}- | AttrTypeScale- {- ^- font size scale factor ('GI.Pango.Structs.AttrFloat.AttrFloat')- -}- | AttrTypeFallback- {- ^- whether fallback is enabled ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeLetterSpacing- {- ^- letter spacing ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeUnderlineColor- {- ^- underline color ('GI.Pango.Structs.AttrColor.AttrColor')- -}- | AttrTypeStrikethroughColor- {- ^- strikethrough color ('GI.Pango.Structs.AttrColor.AttrColor')- -}- | AttrTypeAbsoluteSize- {- ^- font size in pixels scaled by 'GI.Pango.Constants.SCALE' ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeGravity- {- ^- base text gravity ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeGravityHint- {- ^- gravity hint ('GI.Pango.Structs.AttrInt.AttrInt')- -}- | AttrTypeFontFeatures- {- ^- OpenType font features ('GI.Pango.Structs.AttrString.AttrString'). Since 1.38- -}- | AttrTypeForegroundAlpha- {- ^- foreground alpha ('GI.Pango.Structs.AttrInt.AttrInt'). Since 1.38- -}- | AttrTypeBackgroundAlpha- {- ^- background alpha ('GI.Pango.Structs.AttrInt.AttrInt'). Since 1.38- -}- | AnotherAttrType Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum AttrType where- fromEnum AttrTypeInvalid = 0- fromEnum AttrTypeLanguage = 1- fromEnum AttrTypeFamily = 2- fromEnum AttrTypeStyle = 3- fromEnum AttrTypeWeight = 4- fromEnum AttrTypeVariant = 5- fromEnum AttrTypeStretch = 6- fromEnum AttrTypeSize = 7- fromEnum AttrTypeFontDesc = 8- fromEnum AttrTypeForeground = 9- fromEnum AttrTypeBackground = 10- fromEnum AttrTypeUnderline = 11- fromEnum AttrTypeStrikethrough = 12- fromEnum AttrTypeRise = 13- fromEnum AttrTypeShape = 14- fromEnum AttrTypeScale = 15- fromEnum AttrTypeFallback = 16- fromEnum AttrTypeLetterSpacing = 17- fromEnum AttrTypeUnderlineColor = 18- fromEnum AttrTypeStrikethroughColor = 19- fromEnum AttrTypeAbsoluteSize = 20- fromEnum AttrTypeGravity = 21- fromEnum AttrTypeGravityHint = 22- fromEnum AttrTypeFontFeatures = 23- fromEnum AttrTypeForegroundAlpha = 24- fromEnum AttrTypeBackgroundAlpha = 25- fromEnum (AnotherAttrType k) = k-- toEnum 0 = AttrTypeInvalid- toEnum 1 = AttrTypeLanguage- toEnum 2 = AttrTypeFamily- toEnum 3 = AttrTypeStyle- toEnum 4 = AttrTypeWeight- toEnum 5 = AttrTypeVariant- toEnum 6 = AttrTypeStretch- toEnum 7 = AttrTypeSize- toEnum 8 = AttrTypeFontDesc- toEnum 9 = AttrTypeForeground- toEnum 10 = AttrTypeBackground- toEnum 11 = AttrTypeUnderline- toEnum 12 = AttrTypeStrikethrough- toEnum 13 = AttrTypeRise- toEnum 14 = AttrTypeShape- toEnum 15 = AttrTypeScale- toEnum 16 = AttrTypeFallback- toEnum 17 = AttrTypeLetterSpacing- toEnum 18 = AttrTypeUnderlineColor- toEnum 19 = AttrTypeStrikethroughColor- toEnum 20 = AttrTypeAbsoluteSize- toEnum 21 = AttrTypeGravity- toEnum 22 = AttrTypeGravityHint- toEnum 23 = AttrTypeFontFeatures- toEnum 24 = AttrTypeForegroundAlpha- toEnum 25 = AttrTypeBackgroundAlpha- toEnum k = AnotherAttrType k--instance P.Ord AttrType where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_attr_type_get_type" c_pango_attr_type_get_type :: - IO GType--instance BoxedEnum AttrType where- boxedEnumType _ = c_pango_attr_type_get_type---- Enum Alignment-{- |-A 'GI.Pango.Enums.Alignment' describes how to align the lines of a 'GI.Pango.Objects.Layout.Layout' within the-available space. If the 'GI.Pango.Objects.Layout.Layout' is set to justify-using 'GI.Pango.Objects.Layout.layoutSetJustify', this only has effect for partial lines.--}-data Alignment = - AlignmentLeft- {- ^- Put all available space on the right- -}- | AlignmentCenter- {- ^- Center the line within the available space- -}- | AlignmentRight- {- ^- Put all available space on the left- -}- | AnotherAlignment Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum Alignment where- fromEnum AlignmentLeft = 0- fromEnum AlignmentCenter = 1- fromEnum AlignmentRight = 2- fromEnum (AnotherAlignment k) = k-- toEnum 0 = AlignmentLeft- toEnum 1 = AlignmentCenter- toEnum 2 = AlignmentRight- toEnum k = AnotherAlignment k--instance P.Ord Alignment where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_alignment_get_type" c_pango_alignment_get_type :: - IO GType--instance BoxedEnum Alignment where- boxedEnumType _ = c_pango_alignment_get_type--
− GI/Pango/Enums.hs-boot
@@ -1,75 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Enums where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--data WrapMode-instance P.Enum WrapMode where-instance BoxedEnum WrapMode where-data Weight-instance P.Enum Weight where-instance BoxedEnum Weight where-data Variant-instance P.Enum Variant where-instance BoxedEnum Variant where-data Underline-instance P.Enum Underline where-instance BoxedEnum Underline where-data TabAlign-instance P.Enum TabAlign where-instance BoxedEnum TabAlign where-data Style-instance P.Enum Style where-instance BoxedEnum Style where-data Stretch-instance P.Enum Stretch where-instance BoxedEnum Stretch where-data Script-instance P.Enum Script where-instance BoxedEnum Script where-data RenderPart-instance P.Enum RenderPart where-instance BoxedEnum RenderPart where-data GravityHint-instance P.Enum GravityHint where-instance BoxedEnum GravityHint where-data Gravity-instance P.Enum Gravity where-instance BoxedEnum Gravity where-data EllipsizeMode-instance P.Enum EllipsizeMode where-instance BoxedEnum EllipsizeMode where-data Direction-instance P.Enum Direction where-instance BoxedEnum Direction where-data CoverageLevel-instance P.Enum CoverageLevel where-instance BoxedEnum CoverageLevel where-data BidiType-instance P.Enum BidiType where-instance BoxedEnum BidiType where-data AttrType-instance P.Enum AttrType where-instance BoxedEnum AttrType where-data Alignment-instance P.Enum Alignment where-instance BoxedEnum Alignment where
− GI/Pango/Flags.hs
@@ -1,120 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Flags- ( -- -- * Flags--- ** FontMask #flag:FontMask#-- FontMask(..) ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- Flags FontMask-{- |-The bits in a 'GI.Pango.Flags.FontMask' correspond to fields in a-'GI.Pango.Structs.FontDescription.FontDescription' that have been set.--}-data FontMask = - FontMaskFamily- {- ^- the font family is specified.- -}- | FontMaskStyle- {- ^- the font style is specified.- -}- | FontMaskVariant- {- ^- the font variant is specified.- -}- | FontMaskWeight- {- ^- the font weight is specified.- -}- | FontMaskStretch- {- ^- the font stretch is specified.- -}- | FontMaskSize- {- ^- the font size is specified.- -}- | FontMaskGravity- {- ^- the font gravity is specified (Since: 1.16.)- -}- | FontMaskVariations- {- ^- OpenType font variations are specified (Since: 1.42)- -}- | AnotherFontMask Int- -- ^ Catch-all for unknown values- deriving (Show, Eq)--instance P.Enum FontMask where- fromEnum FontMaskFamily = 1- fromEnum FontMaskStyle = 2- fromEnum FontMaskVariant = 4- fromEnum FontMaskWeight = 8- fromEnum FontMaskStretch = 16- fromEnum FontMaskSize = 32- fromEnum FontMaskGravity = 64- fromEnum FontMaskVariations = 128- fromEnum (AnotherFontMask k) = k-- toEnum 1 = FontMaskFamily- toEnum 2 = FontMaskStyle- toEnum 4 = FontMaskVariant- toEnum 8 = FontMaskWeight- toEnum 16 = FontMaskStretch- toEnum 32 = FontMaskSize- toEnum 64 = FontMaskGravity- toEnum 128 = FontMaskVariations- toEnum k = AnotherFontMask k--instance P.Ord FontMask where- compare a b = P.compare (P.fromEnum a) (P.fromEnum b)--foreign import ccall "pango_font_mask_get_type" c_pango_font_mask_get_type :: - IO GType--instance BoxedFlags FontMask where- boxedFlagsType _ = c_pango_font_mask_get_type--instance IsGFlag FontMask--
− GI/Pango/Flags.hs-boot
@@ -1,28 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Flags where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--data FontMask-instance P.Enum FontMask where-instance BoxedFlags FontMask where-instance IsGFlag FontMask
− GI/Pango/Functions.hs
@@ -1,2566 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Functions- ( -- -- * Methods--- ** attrBackgroundAlphaNew #method:attrBackgroundAlphaNew#-- attrBackgroundAlphaNew ,----- ** attrBackgroundNew #method:attrBackgroundNew#-- attrBackgroundNew ,----- ** attrFallbackNew #method:attrFallbackNew#-- attrFallbackNew ,----- ** attrFamilyNew #method:attrFamilyNew#-- attrFamilyNew ,----- ** attrForegroundAlphaNew #method:attrForegroundAlphaNew#-- attrForegroundAlphaNew ,----- ** attrForegroundNew #method:attrForegroundNew#-- attrForegroundNew ,----- ** attrGravityHintNew #method:attrGravityHintNew#-- attrGravityHintNew ,----- ** attrGravityNew #method:attrGravityNew#-- attrGravityNew ,----- ** attrLetterSpacingNew #method:attrLetterSpacingNew#-- attrLetterSpacingNew ,----- ** attrRiseNew #method:attrRiseNew#-- attrRiseNew ,----- ** attrScaleNew #method:attrScaleNew#-- attrScaleNew ,----- ** attrStretchNew #method:attrStretchNew#-- attrStretchNew ,----- ** attrStrikethroughColorNew #method:attrStrikethroughColorNew#-- attrStrikethroughColorNew ,----- ** attrStrikethroughNew #method:attrStrikethroughNew#-- attrStrikethroughNew ,----- ** attrStyleNew #method:attrStyleNew#-- attrStyleNew ,----- ** attrUnderlineColorNew #method:attrUnderlineColorNew#-- attrUnderlineColorNew ,----- ** attrUnderlineNew #method:attrUnderlineNew#-- attrUnderlineNew ,----- ** attrVariantNew #method:attrVariantNew#-- attrVariantNew ,----- ** attrWeightNew #method:attrWeightNew#-- attrWeightNew ,----- ** break #method:break#-- break ,----- ** configKeyGet #method:configKeyGet#-- configKeyGet ,----- ** configKeyGetSystem #method:configKeyGetSystem#-- configKeyGetSystem ,----- ** defaultBreak #method:defaultBreak#-- defaultBreak ,----- ** extentsToPixels #method:extentsToPixels#-- extentsToPixels ,----- ** findBaseDir #method:findBaseDir#-- findBaseDir ,----- ** findParagraphBoundary #method:findParagraphBoundary#-- findParagraphBoundary ,----- ** getLibSubdirectory #method:getLibSubdirectory#-- getLibSubdirectory ,----- ** getLogAttrs #method:getLogAttrs#-- getLogAttrs ,----- ** getMirrorChar #method:getMirrorChar#-- getMirrorChar ,----- ** getSysconfSubdirectory #method:getSysconfSubdirectory#-- getSysconfSubdirectory ,----- ** isZeroWidth #method:isZeroWidth#-- isZeroWidth ,----- ** itemize #method:itemize#-- itemize ,----- ** itemizeWithBaseDir #method:itemizeWithBaseDir#-- itemizeWithBaseDir ,----- ** log2visGetEmbeddingLevels #method:log2visGetEmbeddingLevels#-- log2visGetEmbeddingLevels ,----- ** lookupAliases #method:lookupAliases#-- lookupAliases ,----- ** markupParserFinish #method:markupParserFinish#-- markupParserFinish ,----- ** markupParserNew #method:markupParserNew#-- markupParserNew ,----- ** moduleRegister #method:moduleRegister#-- moduleRegister ,----- ** parseEnum #method:parseEnum#-- parseEnum ,----- ** parseMarkup #method:parseMarkup#-- parseMarkup ,----- ** quantizeLineGeometry #method:quantizeLineGeometry#-- quantizeLineGeometry ,----- ** readLine #method:readLine#-- readLine ,----- ** reorderItems #method:reorderItems#-- reorderItems ,----- ** scanInt #method:scanInt#-- scanInt ,----- ** scanString #method:scanString#-- scanString ,----- ** scanWord #method:scanWord#-- scanWord ,----- ** shape #method:shape#-- shape ,----- ** shapeFull #method:shapeFull#-- shapeFull ,----- ** skipSpace #method:skipSpace#-- skipSpace ,----- ** splitFileList #method:splitFileList#-- splitFileList ,----- ** trimString #method:trimString#-- trimString ,----- ** unicharDirection #method:unicharDirection#-- unicharDirection ,----- ** unitsFromDouble #method:unitsFromDouble#-- unitsFromDouble ,----- ** unitsToDouble #method:unitsToDouble#-- unitsToDouble ,----- ** version #method:version#-- version ,----- ** versionCheck #method:versionCheck#-- versionCheck ,----- ** versionString #method:versionString#-- versionString ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GLib.Structs.MarkupParseContext as GLib.MarkupParseContext-import qualified GI.GLib.Structs.String as GLib.String-import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums-import {-# SOURCE #-} qualified GI.Pango.Objects.Context as Pango.Context-import {-# SOURCE #-} qualified GI.Pango.Structs.Analysis as Pango.Analysis-import {-# SOURCE #-} qualified GI.Pango.Structs.AttrIterator as Pango.AttrIterator-import {-# SOURCE #-} qualified GI.Pango.Structs.AttrList as Pango.AttrList-import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute-import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphString as Pango.GlyphString-import {-# SOURCE #-} qualified GI.Pango.Structs.IncludedModule as Pango.IncludedModule-import {-# SOURCE #-} qualified GI.Pango.Structs.Item as Pango.Item-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language-import {-# SOURCE #-} qualified GI.Pango.Structs.LogAttr as Pango.LogAttr-import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle---- function pango_version_string--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_version_string" pango_version_string :: - IO CString--{- |-This is similar to the macro @/PANGO_VERSION_STRING/@ except that-it returns the version of Pango available at run-time, as opposed to-the version available at compile-time.--/Since: 1.16/--}-versionString ::- (B.CallStack.HasCallStack, MonadIO m) =>- m T.Text- {- ^ __Returns:__ A string containing the version of Pango library- available at run time.- The returned string is owned by Pango and should not be modified- or freed. -}-versionString = liftIO $ do- result <- pango_version_string- checkUnexpectedReturnNULL "versionString" result- result' <- cstringToText result- return result'----- function pango_version_check--- Args : [Arg {argCName = "required_major", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the required major version.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "required_minor", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the required minor version.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "required_micro", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the required major version.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_version_check" pango_version_check :: - Int32 -> -- required_major : TBasicType TInt- Int32 -> -- required_minor : TBasicType TInt- Int32 -> -- required_micro : TBasicType TInt- IO CString--{- |-Checks that the Pango library in use is compatible with the-given version. Generally you would pass in the constants-@/PANGO_VERSION_MAJOR/@, @/PANGO_VERSION_MINOR/@, @/PANGO_VERSION_MICRO/@-as the three arguments to this function; that produces-a check that the library in use at run-time is compatible with-the version of Pango the application or module was compiled against.--Compatibility is defined by two things: first the version-of the running library is newer than the version-/@requiredMajor@/.required_minor./@requiredMicro@/. Second-the running library must be binary compatible with the-version /@requiredMajor@/.required_minor./@requiredMicro@/-(same major version.)--For compile-time version checking use @/PANGO_VERSION_CHECK()/@.--/Since: 1.16/--}-versionCheck ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@requiredMajor@/: the required major version. -}- -> Int32- {- ^ /@requiredMinor@/: the required minor version. -}- -> Int32- {- ^ /@requiredMicro@/: the required major version. -}- -> m (Maybe T.Text)- {- ^ __Returns:__ 'Nothing' if the Pango library is compatible- with the given version, or a string describing the version- mismatch. The returned string is owned by Pango and should not- be modified or freed. -}-versionCheck requiredMajor requiredMinor requiredMicro = liftIO $ do- result <- pango_version_check requiredMajor requiredMinor requiredMicro- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- cstringToText result'- return result''- return maybeResult----- function pango_version--- Args : []--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_version" pango_version :: - IO Int32--{- |-This is similar to the macro @/PANGO_VERSION/@ except that-it returns the encoded version of Pango available at run-time,-as opposed to the version available at compile-time.--A version number can be encoded into an integer using-@/PANGO_VERSION_ENCODE()/@.--/Since: 1.16/--}-version ::- (B.CallStack.HasCallStack, MonadIO m) =>- m Int32- {- ^ __Returns:__ The encoded version of Pango library- available at run time. -}-version = liftIO $ do- result <- pango_version- return result----- function pango_units_to_double--- Args : [Arg {argCName = "i", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "value in Pango units", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "pango_units_to_double" pango_units_to_double :: - Int32 -> -- i : TBasicType TInt- IO CDouble--{- |-Converts a number in Pango units to floating-point: divides-it by 'GI.Pango.Constants.SCALE'.--/Since: 1.16/--}-unitsToDouble ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@i@/: value in Pango units -}- -> m Double- {- ^ __Returns:__ the double value. -}-unitsToDouble i = liftIO $ do- result <- pango_units_to_double i- let result' = realToFrac result- return result'----- function pango_units_from_double--- Args : [Arg {argCName = "d", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "double floating-point value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_units_from_double" pango_units_from_double :: - CDouble -> -- d : TBasicType TDouble- IO Int32--{- |-Converts a floating-point number to Pango units: multiplies-it by 'GI.Pango.Constants.SCALE' and rounds to nearest integer.--/Since: 1.16/--}-unitsFromDouble ::- (B.CallStack.HasCallStack, MonadIO m) =>- Double- {- ^ /@d@/: double floating-point value -}- -> m Int32- {- ^ __Returns:__ the value in Pango units. -}-unitsFromDouble d = liftIO $ do- let d' = realToFrac d- result <- pango_units_from_double d'- return result----- function pango_unichar_direction--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Unicode character", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Direction"}))--- throws : False--- Skip return : False--foreign import ccall "pango_unichar_direction" pango_unichar_direction :: - CInt -> -- ch : TBasicType TUniChar- IO CUInt--{- |-Determines the inherent direction of a character; either-'GI.Pango.Enums.DirectionLtr', 'GI.Pango.Enums.DirectionRtl', or-'GI.Pango.Enums.DirectionNeutral'.--This function is useful to categorize characters into left-to-right-letters, right-to-left letters, and everything else. If full-Unicode bidirectional type of a character is needed,-'GI.Pango.Functions.bidiTypeForUnichar' can be used instead.--}-unicharDirection ::- (B.CallStack.HasCallStack, MonadIO m) =>- Char- {- ^ /@ch@/: a Unicode character -}- -> m Pango.Enums.Direction- {- ^ __Returns:__ the direction of the character. -}-unicharDirection ch = liftIO $ do- let ch' = (fromIntegral . ord) ch- result <- pango_unichar_direction ch'- let result' = (toEnum . fromIntegral) result- return result'----- function pango_trim_string--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a string", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_trim_string" pango_trim_string :: - CString -> -- str : TBasicType TUTF8- IO CString--{-# DEPRECATED trimString ["(Since version 1.38)"] #-}-{- |-Trims leading and trailing whitespace from a string.--}-trimString ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@str@/: a string -}- -> m T.Text- {- ^ __Returns:__ A newly-allocated string that must be freed with 'GI.GLib.Functions.free' -}-trimString str = liftIO $ do- str' <- textToCString str- result <- pango_trim_string str'- checkUnexpectedReturnNULL "trimString" result- result' <- cstringToText result- freeMem result- freeMem str'- return result'----- function pango_split_file_list--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a %G_SEARCHPATH_SEPARATOR separated list of filenames", sinceVersion = Nothing}, 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 "pango_split_file_list" pango_split_file_list :: - CString -> -- str : TBasicType TUTF8- IO (Ptr CString)--{-# DEPRECATED splitFileList ["(Since version 1.38)"] #-}-{- |-Splits a 'GI.GLib.Constants.SEARCHPATH_SEPARATOR'-separated list of files, stripping-white space and substituting ~\/ with $HOME\/.--}-splitFileList ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@str@/: a 'GI.GLib.Constants.SEARCHPATH_SEPARATOR' separated list of filenames -}- -> m [T.Text]- {- ^ __Returns:__ a list of-strings to be freed with 'GI.GLib.Functions.strfreev' -}-splitFileList str = liftIO $ do- str' <- textToCString str- result <- pango_split_file_list str'- checkUnexpectedReturnNULL "splitFileList" result- result' <- unpackZeroTerminatedUTF8CArray result- mapZeroTerminatedCArray freeMem result- freeMem result- freeMem str'- return result'----- function pango_skip_space--- Args : [Arg {argCName = "pos", argType = TBasicType TUTF8, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out string position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_skip_space" pango_skip_space :: - Ptr CString -> -- pos : TBasicType TUTF8- IO CInt--{-# DEPRECATED skipSpace ["(Since version 1.38)"] #-}-{- |-Skips 0 or more characters of white space.--}-skipSpace ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@pos@/: in\/out string position -}- -> m ((Bool, T.Text))- {- ^ __Returns:__ 'False' if skipping the white space leaves-the position at a \'\\0\' character. -}-skipSpace pos = liftIO $ do- pos' <- textToCString pos- pos'' <- allocMem :: IO (Ptr CString)- poke pos'' pos'- result <- pango_skip_space pos''- let result' = (/= 0) result- pos''' <- peek pos''- pos'''' <- cstringToText pos'''- freeMem pos'''- freeMem pos''- return (result', pos'''')----- function pango_shape_full--- Args : [Arg {argCName = "item_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "valid UTF-8 text to shape.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "item_length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length (in bytes) of @item_text. -1 means nul-terminated text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "paragraph_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "text of the paragraph (see details). May be %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "paragraph_length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length (in bytes) of @paragraph_text. -1 means nul-terminated text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "analysis", argType = TInterface (Name {namespace = "Pango", name = "Analysis"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#PangoAnalysis structure from pango_itemize().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "glyph string in which to store results.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_shape_full" pango_shape_full :: - CString -> -- item_text : TBasicType TUTF8- Int32 -> -- item_length : TBasicType TInt- CString -> -- paragraph_text : TBasicType TUTF8- Int32 -> -- paragraph_length : TBasicType TInt- Ptr Pango.Analysis.Analysis -> -- analysis : TInterface (Name {namespace = "Pango", name = "Analysis"})- Ptr Pango.GlyphString.GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- IO ()--{- |-Given a segment of text and the corresponding-'GI.Pango.Structs.Analysis.Analysis' structure returned from 'GI.Pango.Functions.itemize',-convert the characters into glyphs. You may also pass-in only a substring of the item from 'GI.Pango.Functions.itemize'.--This is similar to 'GI.Pango.Functions.shape', except it also can optionally take-the full paragraph text as input, which will then be used to perform-certain cross-item shaping interactions. If you have access to the broader-text of which /@itemText@/ is part of, provide the broader text as-/@paragraphText@/. If /@paragraphText@/ is 'Nothing', item text is used instead.--/Since: 1.32/--}-shapeFull ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@itemText@/: valid UTF-8 text to shape. -}- -> Int32- {- ^ /@itemLength@/: the length (in bytes) of /@itemText@/. -1 means nul-terminated text. -}- -> Maybe (T.Text)- {- ^ /@paragraphText@/: text of the paragraph (see details). May be 'Nothing'. -}- -> Int32- {- ^ /@paragraphLength@/: the length (in bytes) of /@paragraphText@/. -1 means nul-terminated text. -}- -> Pango.Analysis.Analysis- {- ^ /@analysis@/: 'GI.Pango.Structs.Analysis.Analysis' structure from 'GI.Pango.Functions.itemize'. -}- -> Pango.GlyphString.GlyphString- {- ^ /@glyphs@/: glyph string in which to store results. -}- -> m ()-shapeFull itemText itemLength paragraphText paragraphLength analysis glyphs = liftIO $ do- itemText' <- textToCString itemText- maybeParagraphText <- case paragraphText of- Nothing -> return nullPtr- Just jParagraphText -> do- jParagraphText' <- textToCString jParagraphText- return jParagraphText'- analysis' <- unsafeManagedPtrGetPtr analysis- glyphs' <- unsafeManagedPtrGetPtr glyphs- pango_shape_full itemText' itemLength maybeParagraphText paragraphLength analysis' glyphs'- touchManagedPtr analysis- touchManagedPtr glyphs- freeMem itemText'- freeMem maybeParagraphText- return ()----- function pango_shape--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text to process", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length (in bytes) of @text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "analysis", argType = TInterface (Name {namespace = "Pango", name = "Analysis"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#PangoAnalysis structure from pango_itemize()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "glyph string in which to store results", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_shape" pango_shape :: - CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Ptr Pango.Analysis.Analysis -> -- analysis : TInterface (Name {namespace = "Pango", name = "Analysis"})- Ptr Pango.GlyphString.GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- IO ()--{- |-Given a segment of text and the corresponding-'GI.Pango.Structs.Analysis.Analysis' structure returned from 'GI.Pango.Functions.itemize',-convert the characters into glyphs. You may also pass-in only a substring of the item from 'GI.Pango.Functions.itemize'.--It is recommended that you use 'GI.Pango.Functions.shapeFull' instead, since-that API allows for shaping interaction happening across text item-boundaries.--}-shape ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@text@/: the text to process -}- -> Int32- {- ^ /@length@/: the length (in bytes) of /@text@/ -}- -> Pango.Analysis.Analysis- {- ^ /@analysis@/: 'GI.Pango.Structs.Analysis.Analysis' structure from 'GI.Pango.Functions.itemize' -}- -> Pango.GlyphString.GlyphString- {- ^ /@glyphs@/: glyph string in which to store results -}- -> m ()-shape text length_ analysis glyphs = liftIO $ do- text' <- textToCString text- analysis' <- unsafeManagedPtrGetPtr analysis- glyphs' <- unsafeManagedPtrGetPtr glyphs- pango_shape text' length_ analysis' glyphs'- touchManagedPtr analysis- touchManagedPtr glyphs- freeMem text'- return ()----- function pango_scan_word--- Args : [Arg {argCName = "pos", argType = TBasicType TUTF8, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out string position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "out", argType = TInterface (Name {namespace = "GLib", name = "String"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GString into which to write the result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_scan_word" pango_scan_word :: - Ptr CString -> -- pos : TBasicType TUTF8- Ptr GLib.String.String -> -- out : TInterface (Name {namespace = "GLib", name = "String"})- IO CInt--{-# DEPRECATED scanWord ["(Since version 1.38)"] #-}-{- |-Scans a word into a 'GI.GLib.Structs.String.String' buffer. A word consists-of [A-Za-z_] followed by zero or more [A-Za-z_0-9]-Leading white space is skipped.--}-scanWord ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@pos@/: in\/out string position -}- -> m ((Bool, T.Text, GLib.String.String))- {- ^ __Returns:__ 'False' if a parse error occurred. -}-scanWord pos = liftIO $ do- pos' <- textToCString pos- pos'' <- allocMem :: IO (Ptr CString)- poke pos'' pos'- out <- callocBoxedBytes 24 :: IO (Ptr GLib.String.String)- result <- pango_scan_word pos'' out- let result' = (/= 0) result- pos''' <- peek pos''- pos'''' <- cstringToText pos'''- freeMem pos'''- out' <- (wrapBoxed GLib.String.String) out- freeMem pos''- return (result', pos'''', out')----- function pango_scan_string--- Args : [Arg {argCName = "pos", argType = TBasicType TUTF8, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out string position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "out", argType = TInterface (Name {namespace = "GLib", name = "String"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GString into which to write the result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_scan_string" pango_scan_string :: - Ptr CString -> -- pos : TBasicType TUTF8- Ptr GLib.String.String -> -- out : TInterface (Name {namespace = "GLib", name = "String"})- IO CInt--{-# DEPRECATED scanString ["(Since version 1.38)"] #-}-{- |-Scans a string into a 'GI.GLib.Structs.String.String' buffer. The string may either-be a sequence of non-white-space characters, or a quoted-string with \'\"\'. Instead a quoted string, \'\\\"\' represents-a literal quote. Leading white space outside of quotes is skipped.--}-scanString ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@pos@/: in\/out string position -}- -> m ((Bool, T.Text, GLib.String.String))- {- ^ __Returns:__ 'False' if a parse error occurred. -}-scanString pos = liftIO $ do- pos' <- textToCString pos- pos'' <- allocMem :: IO (Ptr CString)- poke pos'' pos'- out <- callocBoxedBytes 24 :: IO (Ptr GLib.String.String)- result <- pango_scan_string pos'' out- let result' = (/= 0) result- pos''' <- peek pos''- pos'''' <- cstringToText pos'''- freeMem pos'''- out' <- (wrapBoxed GLib.String.String) out- freeMem pos''- return (result', pos'''', out')----- function pango_scan_int--- Args : [Arg {argCName = "pos", argType = TBasicType TUTF8, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out string position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "out", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an int into which to write the result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_scan_int" pango_scan_int :: - Ptr CString -> -- pos : TBasicType TUTF8- Ptr Int32 -> -- out : TBasicType TInt- IO CInt--{-# DEPRECATED scanInt ["(Since version 1.38)"] #-}-{- |-Scans an integer.-Leading white space is skipped.--}-scanInt ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@pos@/: in\/out string position -}- -> m ((Bool, T.Text, Int32))- {- ^ __Returns:__ 'False' if a parse error occurred. -}-scanInt pos = liftIO $ do- pos' <- textToCString pos- pos'' <- allocMem :: IO (Ptr CString)- poke pos'' pos'- out <- allocMem :: IO (Ptr Int32)- result <- pango_scan_int pos'' out- let result' = (/= 0) result- pos''' <- peek pos''- pos'''' <- cstringToText pos'''- freeMem pos'''- out' <- peek out- freeMem pos''- freeMem out- return (result', pos'''', out')----- function pango_reorder_items--- Args : [Arg {argCName = "logical_items", argType = TGList (TInterface (Name {namespace = "Pango", name = "Item"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GList of #PangoItem in logical order.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGList (TInterface (Name {namespace = "Pango", name = "Item"})))--- throws : False--- Skip return : False--foreign import ccall "pango_reorder_items" pango_reorder_items :: - Ptr (GList (Ptr Pango.Item.Item)) -> -- logical_items : TGList (TInterface (Name {namespace = "Pango", name = "Item"}))- IO (Ptr (GList (Ptr Pango.Item.Item)))--{- |-From a list of items in logical order and the associated-directional levels, produce a list in visual order.-The original list is unmodified.--}-reorderItems ::- (B.CallStack.HasCallStack, MonadIO m) =>- [Pango.Item.Item]- {- ^ /@logicalItems@/: a 'GI.GLib.Structs.List.List' of 'GI.Pango.Structs.Item.Item' in logical order. -}- -> m [Pango.Item.Item]- {- ^ __Returns:__ a 'GI.GLib.Structs.List.List'- of 'GI.Pango.Structs.Item.Item' structures in visual order.--(Please open a bug if you use this function.- It is not a particularly convenient interface, and the code- is duplicated elsewhere in Pango for that reason.) -}-reorderItems logicalItems = liftIO $ do- logicalItems' <- mapM unsafeManagedPtrGetPtr logicalItems- logicalItems'' <- packGList logicalItems'- result <- pango_reorder_items logicalItems''- result' <- unpackGList result- result'' <- mapM (wrapBoxed Pango.Item.Item) result'- g_list_free result- mapM_ touchManagedPtr logicalItems- g_list_free logicalItems''- return result''----- function pango_read_line--- Args : [Arg {argCName = "stream", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a stdio stream", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str", argType = TInterface (Name {namespace = "GLib", name = "String"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GString buffer into which to write the result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_read_line" pango_read_line :: - Ptr () -> -- stream : TBasicType TPtr- Ptr GLib.String.String -> -- str : TInterface (Name {namespace = "GLib", name = "String"})- IO Int32--{-# DEPRECATED readLine ["(Since version 1.38)"] #-}-{- |-Reads an entire line from a file into a buffer. Lines may-be delimited with \'\\n\', \'\\r\', \'\\n\\r\', or \'\\r\\n\'. The delimiter-is not written into the buffer. Text after a \'#\' character is treated as-a comment and skipped. \'\\\' can be used to escape a # character.-\'\\\' proceeding a line delimiter combines adjacent lines. A \'\\\' proceeding-any other character is ignored and written into the output buffer-unmodified.--}-readLine ::- (B.CallStack.HasCallStack, MonadIO m) =>- Ptr ()- {- ^ /@stream@/: a stdio stream -}- -> m ((Int32, GLib.String.String))- {- ^ __Returns:__ 0 if the stream was already at an @/EOF/@ character, otherwise- the number of lines read (this is useful for maintaining- a line number counter which doesn\'t combine lines with \'\\\') -}-readLine stream = liftIO $ do- str <- callocBoxedBytes 24 :: IO (Ptr GLib.String.String)- result <- pango_read_line stream str- str' <- (wrapBoxed GLib.String.String) str- return (result, str')----- function pango_quantize_line_geometry--- Args : [Arg {argCName = "thickness", argType = TBasicType TInt, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "pointer to the thickness of a line, in Pango units", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "position", argType = TBasicType TInt, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "corresponding position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_quantize_line_geometry" pango_quantize_line_geometry :: - Ptr Int32 -> -- thickness : TBasicType TInt- Ptr Int32 -> -- position : TBasicType TInt- IO ()--{- |-Quantizes the thickness and position of a line, typically an-underline or strikethrough, to whole device pixels, that is integer-multiples of 'GI.Pango.Constants.SCALE'. The purpose of this function is to avoid-such lines looking blurry.--Care is taken to make sure /@thickness@/ is at least one pixel when this-function returns, but returned /@position@/ may become zero as a result-of rounding.--/Since: 1.12/--}-quantizeLineGeometry ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@thickness@/: pointer to the thickness of a line, in Pango units -}- -> Int32- {- ^ /@position@/: corresponding position -}- -> m ((Int32, Int32))-quantizeLineGeometry thickness position = liftIO $ do- thickness' <- allocMem :: IO (Ptr Int32)- poke thickness' thickness- position' <- allocMem :: IO (Ptr Int32)- poke position' position- pango_quantize_line_geometry thickness' position'- thickness'' <- peek thickness'- position'' <- peek position'- freeMem thickness'- freeMem position'- return (thickness'', position'')----- function pango_parse_weight--- XXX Could not generate function pango_parse_weight--- Error was : Not implemented: "Don't know how to allocate \"weight\" of type TInterface (Name {namespace = \"Pango\", name = \"Weight\"})"---- function pango_parse_variant--- XXX Could not generate function pango_parse_variant--- Error was : Not implemented: "Don't know how to allocate \"variant\" of type TInterface (Name {namespace = \"Pango\", name = \"Variant\"})"---- function pango_parse_style--- XXX Could not generate function pango_parse_style--- Error was : Not implemented: "Don't know how to allocate \"style\" of type TInterface (Name {namespace = \"Pango\", name = \"Style\"})"---- function pango_parse_stretch--- XXX Could not generate function pango_parse_stretch--- Error was : Not implemented: "Don't know how to allocate \"stretch\" of type TInterface (Name {namespace = \"Pango\", name = \"Stretch\"})"---- function pango_parse_markup--- Args : [Arg {argCName = "markup_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "markup to parse (see <link linkend=\"PangoMarkupFormat\">markup format</link>)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of @markup_text, or -1 if nul-terminated", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "accel_marker", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "character that precedes an accelerator, or 0 for none", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr_list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "address of return location for a #PangoAttrList, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "address of return location for text with tags stripped, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "accel_char", argType = TBasicType TUniChar, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "address of return location for accelerator char, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "pango_parse_markup" pango_parse_markup :: - CString -> -- markup_text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- CInt -> -- accel_marker : TBasicType TUniChar- Ptr (Ptr Pango.AttrList.AttrList) -> -- attr_list : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr CString -> -- text : TBasicType TUTF8- Ptr CInt -> -- accel_char : TBasicType TUniChar- Ptr (Ptr GError) -> -- error- IO CInt--{- |-Parses marked-up text (see-\<link linkend=\"PangoMarkupFormat\">markup format\<\/link>) to create-a plain-text string and an attribute list.--If /@accelMarker@/ is nonzero, the given character will mark the-character following it as an accelerator. For example, /@accelMarker@/-might be an ampersand or underscore. All characters marked-as an accelerator will receive a 'GI.Pango.Enums.UnderlineLow' attribute,-and the first character so marked will be returned in /@accelChar@/.-Two /@accelMarker@/ characters following each other produce a single-literal /@accelMarker@/ character.--To parse a stream of pango markup incrementally, use 'GI.Pango.Functions.markupParserNew'.--If any error happens, none of the output arguments are touched except-for /@error@/.--}-parseMarkup ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@markupText@/: markup to parse (see \<link linkend=\"PangoMarkupFormat\">markup format\<\/link>) -}- -> Int32- {- ^ /@length@/: length of /@markupText@/, or -1 if nul-terminated -}- -> Char- {- ^ /@accelMarker@/: character that precedes an accelerator, or 0 for none -}- -> m ((Pango.AttrList.AttrList, T.Text, Char))- {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}-parseMarkup markupText length_ accelMarker = liftIO $ do- markupText' <- textToCString markupText- let accelMarker' = (fromIntegral . ord) accelMarker- attrList <- allocMem :: IO (Ptr (Ptr Pango.AttrList.AttrList))- text <- allocMem :: IO (Ptr CString)- accelChar <- allocMem :: IO (Ptr CInt)- onException (do- _ <- propagateGError $ pango_parse_markup markupText' length_ accelMarker' attrList text accelChar- attrList' <- peek attrList- attrList'' <- (wrapBoxed Pango.AttrList.AttrList) attrList'- text' <- peek text- text'' <- cstringToText text'- freeMem text'- accelChar' <- peek accelChar- let accelChar'' = (chr . fromIntegral) accelChar'- freeMem markupText'- freeMem attrList- freeMem text- freeMem accelChar- return (attrList'', text'', accelChar'')- ) (do- freeMem markupText'- freeMem attrList- freeMem text- freeMem accelChar- )----- function pango_parse_enum--- Args : [Arg {argCName = "type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "enum type to parse, eg. %PANGO_TYPE_ELLIPSIZE_MODE.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "string to parse. May be %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "integer to store the result in, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "warn", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if %TRUE, issue a g_warning() on bad input.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "possible_values", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "place to store list of possible values on failure, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_parse_enum" pango_parse_enum :: - CGType -> -- type : TBasicType TGType- CString -> -- str : TBasicType TUTF8- Ptr Int32 -> -- value : TBasicType TInt- CInt -> -- warn : TBasicType TBoolean- Ptr CString -> -- possible_values : TBasicType TUTF8- IO CInt--{-# DEPRECATED parseEnum ["(Since version 1.38)"] #-}-{- |-Parses an enum type and stores the result in /@value@/.--If /@str@/ does not match the nick name of any of the possible values for the-enum and is not an integer, 'False' is returned, a warning is issued-if /@warn@/ is 'True', and a-string representing the list of possible values is stored in-/@possibleValues@/. The list is slash-separated, eg.-\"none\/start\/middle\/end\". If failed and /@possibleValues@/ is not 'Nothing',-returned string should be freed using 'GI.GLib.Functions.free'.--/Since: 1.16/--}-parseEnum ::- (B.CallStack.HasCallStack, MonadIO m) =>- GType- {- ^ /@type@/: enum type to parse, eg. @/PANGO_TYPE_ELLIPSIZE_MODE/@. -}- -> Maybe (T.Text)- {- ^ /@str@/: string to parse. May be 'Nothing'. -}- -> Bool- {- ^ /@warn@/: if 'True', issue a @/g_warning()/@ on bad input. -}- -> m ((Bool, Int32, T.Text))- {- ^ __Returns:__ 'True' if /@str@/ was successfully parsed. -}-parseEnum type_ str warn = liftIO $ do- let type_' = gtypeToCGType type_- maybeStr <- case str of- Nothing -> return nullPtr- Just jStr -> do- jStr' <- textToCString jStr- return jStr'- value <- allocMem :: IO (Ptr Int32)- let warn' = (fromIntegral . fromEnum) warn- possibleValues <- allocMem :: IO (Ptr CString)- result <- pango_parse_enum type_' maybeStr value warn' possibleValues- let result' = (/= 0) result- value' <- peek value- possibleValues' <- peek possibleValues- possibleValues'' <- cstringToText possibleValues'- freeMem possibleValues'- freeMem maybeStr- freeMem value- freeMem possibleValues- return (result', value', possibleValues'')----- function pango_module_register--- Args : [Arg {argCName = "module", argType = TInterface (Name {namespace = "Pango", name = "IncludedModule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoIncludedModule", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_module_register" pango_module_register :: - Ptr Pango.IncludedModule.IncludedModule -> -- module : TInterface (Name {namespace = "Pango", name = "IncludedModule"})- IO ()--{-# DEPRECATED moduleRegister ["(Since version 1.38)"] #-}-{- |-Do not use. Does not do anything.--}-moduleRegister ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.IncludedModule.IncludedModule- {- ^ /@module@/: a 'GI.Pango.Structs.IncludedModule.IncludedModule' -}- -> m ()-moduleRegister module_ = liftIO $ do- module_' <- unsafeManagedPtrGetPtr module_- pango_module_register module_'- touchManagedPtr module_- return ()----- function pango_markup_parser_new--- Args : [Arg {argCName = "accel_marker", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "character that precedes an accelerator, or 0 for none", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "GLib", name = "MarkupParseContext"}))--- throws : False--- Skip return : False--foreign import ccall "pango_markup_parser_new" pango_markup_parser_new :: - CInt -> -- accel_marker : TBasicType TUniChar- IO (Ptr GLib.MarkupParseContext.MarkupParseContext)--{- |-Parses marked-up text (see-\<link linkend=\"PangoMarkupFormat\">markup format\<\/link>) to create-a plain-text string and an attribute list.--If /@accelMarker@/ is nonzero, the given character will mark the-character following it as an accelerator. For example, /@accelMarker@/-might be an ampersand or underscore. All characters marked-as an accelerator will receive a 'GI.Pango.Enums.UnderlineLow' attribute,-and the first character so marked will be returned in /@accelChar@/,-when calling @/finish()/@. Two /@accelMarker@/ characters following each-other produce a single literal /@accelMarker@/ character.--To feed markup to the parser, use 'GI.GLib.Structs.MarkupParseContext.markupParseContextParse'-on the returned 'GI.GLib.Structs.MarkupParseContext.MarkupParseContext'. When done with feeding markup-to the parser, use 'GI.Pango.Functions.markupParserFinish' to get the data out-of it, and then use 'GI.GLib.Structs.MarkupParseContext.markupParseContextFree' to free it.--This function is designed for applications that read pango markup-from streams. To simply parse a string containing pango markup,-the simpler 'GI.Pango.Functions.parseMarkup' API is recommended instead.--/Since: 1.31.0/--}-markupParserNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Char- {- ^ /@accelMarker@/: character that precedes an accelerator, or 0 for none -}- -> m GLib.MarkupParseContext.MarkupParseContext- {- ^ __Returns:__ a 'GI.GLib.Structs.MarkupParseContext.MarkupParseContext' that should be-destroyed with 'GI.GLib.Structs.MarkupParseContext.markupParseContextFree'. -}-markupParserNew accelMarker = liftIO $ do- let accelMarker' = (fromIntegral . ord) accelMarker- result <- pango_markup_parser_new accelMarker'- checkUnexpectedReturnNULL "markupParserNew" result- result' <- (newBoxed GLib.MarkupParseContext.MarkupParseContext) result- return result'----- function pango_markup_parser_finish--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "GLib", name = "MarkupParseContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A valid parse context that was returned from pango_markup_parser_new()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr_list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "address of return location for a #PangoAttrList, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "address of return location for text with tags stripped, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "accel_char", argType = TBasicType TUniChar, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "address of return location for accelerator char, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : True--- Skip return : False--foreign import ccall "pango_markup_parser_finish" pango_markup_parser_finish :: - Ptr GLib.MarkupParseContext.MarkupParseContext -> -- context : TInterface (Name {namespace = "GLib", name = "MarkupParseContext"})- Ptr (Ptr Pango.AttrList.AttrList) -> -- attr_list : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr CString -> -- text : TBasicType TUTF8- Ptr CInt -> -- accel_char : TBasicType TUniChar- Ptr (Ptr GError) -> -- error- IO CInt--{- |-After feeding a pango markup parser some data with 'GI.GLib.Structs.MarkupParseContext.markupParseContextParse',-use this function to get the list of pango attributes and text out of the-markup. This function will not free /@context@/, use 'GI.GLib.Structs.MarkupParseContext.markupParseContextFree'-to do so.--/Since: 1.31.0/--}-markupParserFinish ::- (B.CallStack.HasCallStack, MonadIO m) =>- GLib.MarkupParseContext.MarkupParseContext- {- ^ /@context@/: A valid parse context that was returned from 'GI.Pango.Functions.markupParserNew' -}- -> m ((Pango.AttrList.AttrList, T.Text, Char))- {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}-markupParserFinish context = liftIO $ do- context' <- unsafeManagedPtrGetPtr context- attrList <- allocMem :: IO (Ptr (Ptr Pango.AttrList.AttrList))- text <- allocMem :: IO (Ptr CString)- accelChar <- allocMem :: IO (Ptr CInt)- onException (do- _ <- propagateGError $ pango_markup_parser_finish context' attrList text accelChar- attrList' <- peek attrList- attrList'' <- (wrapBoxed Pango.AttrList.AttrList) attrList'- text' <- peek text- text'' <- cstringToText text'- freeMem text'- accelChar' <- peek accelChar- let accelChar'' = (chr . fromIntegral) accelChar'- touchManagedPtr context- freeMem attrList- freeMem text- freeMem accelChar- return (attrList'', text'', accelChar'')- ) (do- freeMem attrList- freeMem text- freeMem accelChar- )----- function pango_lookup_aliases--- Args : [Arg {argCName = "fontname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an ascii string", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "families", argType = TCArray False (-1) 2 (TBasicType TUTF8), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "will be set to an array of font family names.\n this array is owned by pango and should not be freed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "n_families", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "will be set to the length of the @families array.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_families", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "will be set to the length of the @families array.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_lookup_aliases" pango_lookup_aliases :: - CString -> -- fontname : TBasicType TUTF8- Ptr (Ptr CString) -> -- families : TCArray False (-1) 2 (TBasicType TUTF8)- Ptr Int32 -> -- n_families : TBasicType TInt- IO ()--{-# DEPRECATED lookupAliases ["(Since version 1.32)","This function is not thread-safe."] #-}-{- |-Look up all user defined aliases for the alias /@fontname@/.-The resulting font family names will be stored in /@families@/,-and the number of families in /@nFamilies@/.--}-lookupAliases ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@fontname@/: an ascii string -}- -> m ([T.Text])-lookupAliases fontname = liftIO $ do- fontname' <- textToCString fontname- families <- allocMem :: IO (Ptr (Ptr CString))- nFamilies <- allocMem :: IO (Ptr Int32)- pango_lookup_aliases fontname' families nFamilies- nFamilies' <- peek nFamilies- families' <- peek families- families'' <- (unpackUTF8CArrayWithLength nFamilies') families'- (mapCArrayWithLength nFamilies') freeMem families'- freeMem families'- freeMem fontname'- freeMem families- freeMem nFamilies- return families''----- function pango_log2vis_get_embedding_levels--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text to itemize.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of bytes (not characters) to process, or -1\n if @text is nul-terminated and the length should be calculated.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pbase_dir", argType = TInterface (Name {namespace = "Pango", name = "Direction"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "input base direction, and output resolved direction.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt8)--- throws : False--- Skip return : False--foreign import ccall "pango_log2vis_get_embedding_levels" pango_log2vis_get_embedding_levels :: - CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- CUInt -> -- pbase_dir : TInterface (Name {namespace = "Pango", name = "Direction"})- IO Word8--{- |-This will return the bidirectional embedding levels of the input paragraph-as defined by the Unicode Bidirectional Algorithm available at:-- http:\/\/www.unicode.org\/reports\/tr9\/--If the input base direction is a weak direction, the direction of the-characters in the text will determine the final resolved direction.--/Since: 1.4/--}-log2visGetEmbeddingLevels ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@text@/: the text to itemize. -}- -> Int32- {- ^ /@length@/: the number of bytes (not characters) to process, or -1- if /@text@/ is nul-terminated and the length should be calculated. -}- -> Pango.Enums.Direction- {- ^ /@pbaseDir@/: input base direction, and output resolved direction. -}- -> m Word8- {- ^ __Returns:__ a newly allocated array of embedding levels, one item per- character (not byte), that should be freed using g_free. -}-log2visGetEmbeddingLevels text length_ pbaseDir = liftIO $ do- text' <- textToCString text- let pbaseDir' = (fromIntegral . fromEnum) pbaseDir- result <- pango_log2vis_get_embedding_levels text' length_ pbaseDir'- freeMem text'- return result----- function pango_itemize_with_base_dir--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a structure holding information that affects\n the itemization process.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "base_dir", argType = TInterface (Name {namespace = "Pango", name = "Direction"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "base direction to use for bidirectional processing", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text to itemize.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "first byte in @text to process", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of bytes (not characters) to process\n after @start_index. This must be >= 0.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the set of attributes that apply to @text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cached_iter", argType = TInterface (Name {namespace = "Pango", name = "AttrIterator"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Cached attribute iterator, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGList (TInterface (Name {namespace = "Pango", name = "Item"})))--- throws : False--- Skip return : False--foreign import ccall "pango_itemize_with_base_dir" pango_itemize_with_base_dir :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- CUInt -> -- base_dir : TInterface (Name {namespace = "Pango", name = "Direction"})- CString -> -- text : TBasicType TUTF8- Int32 -> -- start_index : TBasicType TInt- Int32 -> -- length : TBasicType TInt- Ptr Pango.AttrList.AttrList -> -- attrs : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr Pango.AttrIterator.AttrIterator -> -- cached_iter : TInterface (Name {namespace = "Pango", name = "AttrIterator"})- IO (Ptr (GList (Ptr Pango.Item.Item)))--{- |-Like 'GI.Pango.Functions.itemize', but the base direction to use when-computing bidirectional levels (see pango_context_set_base_dir ()),-is specified explicitly rather than gotten from the 'GI.Pango.Objects.Context.Context'.--/Since: 1.4/--}-itemizeWithBaseDir ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a structure holding information that affects- the itemization process. -}- -> Pango.Enums.Direction- {- ^ /@baseDir@/: base direction to use for bidirectional processing -}- -> T.Text- {- ^ /@text@/: the text to itemize. -}- -> Int32- {- ^ /@startIndex@/: first byte in /@text@/ to process -}- -> Int32- {- ^ /@length@/: the number of bytes (not characters) to process- after /@startIndex@/. This must be >= 0. -}- -> Pango.AttrList.AttrList- {- ^ /@attrs@/: the set of attributes that apply to /@text@/. -}- -> Maybe (Pango.AttrIterator.AttrIterator)- {- ^ /@cachedIter@/: Cached attribute iterator, or 'Nothing' -}- -> m [Pango.Item.Item]- {- ^ __Returns:__ a 'GI.GLib.Structs.List.List' of- 'GI.Pango.Structs.Item.Item' structures. The items should be freed using- 'GI.Pango.Structs.Item.itemFree' probably in combination with- @/g_list_foreach()/@, and the list itself using @/g_list_free()/@. -}-itemizeWithBaseDir context baseDir text startIndex length_ attrs cachedIter = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- let baseDir' = (fromIntegral . fromEnum) baseDir- text' <- textToCString text- attrs' <- unsafeManagedPtrGetPtr attrs- maybeCachedIter <- case cachedIter of- Nothing -> return nullPtr- Just jCachedIter -> do- jCachedIter' <- unsafeManagedPtrGetPtr jCachedIter- return jCachedIter'- result <- pango_itemize_with_base_dir context' baseDir' text' startIndex length_ attrs' maybeCachedIter- result' <- unpackGList result- result'' <- mapM (wrapBoxed Pango.Item.Item) result'- g_list_free result- touchManagedPtr context- touchManagedPtr attrs- whenJust cachedIter touchManagedPtr- freeMem text'- return result''----- function pango_itemize--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a structure holding information that affects\n\t the itemization process.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text to itemize.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "first byte in @text to process", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of bytes (not characters) to process\n after @start_index.\n This must be >= 0.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the set of attributes that apply to @text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cached_iter", argType = TInterface (Name {namespace = "Pango", name = "AttrIterator"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Cached attribute iterator, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGList (TInterface (Name {namespace = "Pango", name = "Item"})))--- throws : False--- Skip return : False--foreign import ccall "pango_itemize" pango_itemize :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- CString -> -- text : TBasicType TUTF8- Int32 -> -- start_index : TBasicType TInt- Int32 -> -- length : TBasicType TInt- Ptr Pango.AttrList.AttrList -> -- attrs : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr Pango.AttrIterator.AttrIterator -> -- cached_iter : TInterface (Name {namespace = "Pango", name = "AttrIterator"})- IO (Ptr (GList (Ptr Pango.Item.Item)))--{- |-Breaks a piece of text into segments with consistent-directional level and shaping engine. Each byte of /@text@/ will-be contained in exactly one of the items in the returned list;-the generated list of items will be in logical order (the start-offsets of the items are ascending).--/@cachedIter@/ should be an iterator over /@attrs@/ currently positioned at a-range before or containing /@startIndex@/; /@cachedIter@/ will be advanced to-the range covering the position just after /@startIndex@/ + /@length@/.-(i.e. if itemizing in a loop, just keep passing in the same /@cachedIter@/).--}-itemize ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a structure holding information that affects- the itemization process. -}- -> T.Text- {- ^ /@text@/: the text to itemize. -}- -> Int32- {- ^ /@startIndex@/: first byte in /@text@/ to process -}- -> Int32- {- ^ /@length@/: the number of bytes (not characters) to process- after /@startIndex@/.- This must be >= 0. -}- -> Pango.AttrList.AttrList- {- ^ /@attrs@/: the set of attributes that apply to /@text@/. -}- -> Maybe (Pango.AttrIterator.AttrIterator)- {- ^ /@cachedIter@/: Cached attribute iterator, or 'Nothing' -}- -> m [Pango.Item.Item]- {- ^ __Returns:__ a 'GI.GLib.Structs.List.List' of 'GI.Pango.Structs.Item.Item'- structures. The items should be freed using 'GI.Pango.Structs.Item.itemFree'- probably in combination with @/g_list_foreach()/@, and the list itself- using @/g_list_free()/@. -}-itemize context text startIndex length_ attrs cachedIter = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- text' <- textToCString text- attrs' <- unsafeManagedPtrGetPtr attrs- maybeCachedIter <- case cachedIter of- Nothing -> return nullPtr- Just jCachedIter -> do- jCachedIter' <- unsafeManagedPtrGetPtr jCachedIter- return jCachedIter'- result <- pango_itemize context' text' startIndex length_ attrs' maybeCachedIter- result' <- unpackGList result- result'' <- mapM (wrapBoxed Pango.Item.Item) result'- g_list_free result- touchManagedPtr context- touchManagedPtr attrs- whenJust cachedIter touchManagedPtr- freeMem text'- return result''----- function pango_is_zero_width--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Unicode character", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_is_zero_width" pango_is_zero_width :: - CInt -> -- ch : TBasicType TUniChar- IO CInt--{- |-Checks /@ch@/ to see if it is a character that should not be-normally rendered on the screen. This includes all Unicode characters-with \"ZERO WIDTH\" in their name, as well as \<firstterm>bidi\<\/firstterm> formatting characters, and-a few other ones. This is totally different from 'GI.GLib.Functions.unicharIszerowidth'-and is at best misnamed.--/Since: 1.10/--}-isZeroWidth ::- (B.CallStack.HasCallStack, MonadIO m) =>- Char- {- ^ /@ch@/: a Unicode character -}- -> m Bool- {- ^ __Returns:__ 'True' if /@ch@/ is a zero-width character, 'False' otherwise -}-isZeroWidth ch = liftIO $ do- let ch' = (fromIntegral . ord) ch- result <- pango_is_zero_width ch'- let result' = (/= 0) result- return result'----- function pango_get_sysconf_subdirectory--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_get_sysconf_subdirectory" pango_get_sysconf_subdirectory :: - IO CString--{-# DEPRECATED getSysconfSubdirectory ["(Since version 1.38)"] #-}-{- |-Returns the name of the \"pango\" subdirectory of SYSCONFDIR-(which is set at compile time).--}-getSysconfSubdirectory ::- (B.CallStack.HasCallStack, MonadIO m) =>- m T.Text- {- ^ __Returns:__ the Pango sysconf directory. The returned string should-not be freed. -}-getSysconfSubdirectory = liftIO $ do- result <- pango_get_sysconf_subdirectory- checkUnexpectedReturnNULL "getSysconfSubdirectory" result- result' <- cstringToText result- return result'----- function pango_get_mirror_char--- Args : [Arg {argCName = "ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Unicode character", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mirrored_ch", argType = TBasicType TUniChar, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the mirrored character", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_get_mirror_char" pango_get_mirror_char :: - CInt -> -- ch : TBasicType TUniChar- CInt -> -- mirrored_ch : TBasicType TUniChar- IO CInt--{- |-If /@ch@/ has the Unicode mirrored property and there is another Unicode-character that typically has a glyph that is the mirror image of /@ch@/\'s-glyph, puts that character in the address pointed to by /@mirroredCh@/.--Use 'GI.GLib.Functions.unicharGetMirrorChar' instead; the docs for that function-provide full details.--}-getMirrorChar ::- (B.CallStack.HasCallStack, MonadIO m) =>- Char- {- ^ /@ch@/: a Unicode character -}- -> Char- {- ^ /@mirroredCh@/: location to store the mirrored character -}- -> m Bool- {- ^ __Returns:__ 'True' if /@ch@/ has a mirrored character and /@mirroredCh@/ is-filled in, 'False' otherwise -}-getMirrorChar ch mirroredCh = liftIO $ do- let ch' = (fromIntegral . ord) ch- let mirroredCh' = (fromIntegral . ord) mirroredCh- result <- pango_get_mirror_char ch' mirroredCh'- let result' = (/= 0) result- return result'----- function pango_get_log_attrs--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text to process", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length in bytes of @text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "level", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "embedding level, or -1 if unknown", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "language tag", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_attrs", argType = TCArray False (-1) 5 (TInterface (Name {namespace = "Pango", name = "LogAttr"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "array with one #PangoLogAttr\n per character in @text, plus one extra, to be filled in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of @log_attrs array", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "attrs_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of @log_attrs array", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_get_log_attrs" pango_get_log_attrs :: - CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Int32 -> -- level : TBasicType TInt- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- Ptr Pango.LogAttr.LogAttr -> -- log_attrs : TCArray False (-1) 5 (TInterface (Name {namespace = "Pango", name = "LogAttr"}))- Int32 -> -- attrs_len : TBasicType TInt- IO ()--{- |-Computes a 'GI.Pango.Structs.LogAttr.LogAttr' for each character in /@text@/. The /@logAttrs@/-array must have one 'GI.Pango.Structs.LogAttr.LogAttr' for each position in /@text@/; if-/@text@/ contains N characters, it has N+1 positions, including the-last position at the end of the text. /@text@/ should be an entire-paragraph; logical attributes can\'t be computed without context-(for example you need to see spaces on either side of a word to know-the word is a word).--}-getLogAttrs ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@text@/: text to process -}- -> Int32- {- ^ /@length@/: length in bytes of /@text@/ -}- -> Int32- {- ^ /@level@/: embedding level, or -1 if unknown -}- -> Pango.Language.Language- {- ^ /@language@/: language tag -}- -> [Pango.LogAttr.LogAttr]- {- ^ /@logAttrs@/: array with one 'GI.Pango.Structs.LogAttr.LogAttr'- per character in /@text@/, plus one extra, to be filled in -}- -> m ()-getLogAttrs text length_ level language logAttrs = liftIO $ do- let attrsLen = fromIntegral $ length logAttrs- text' <- textToCString text- language' <- unsafeManagedPtrGetPtr language- logAttrs' <- mapM unsafeManagedPtrGetPtr logAttrs- logAttrs'' <- packBlockArray 52 logAttrs'- pango_get_log_attrs text' length_ level language' logAttrs'' attrsLen- touchManagedPtr language- mapM_ touchManagedPtr logAttrs- freeMem text'- freeMem logAttrs''- return ()----- function pango_get_lib_subdirectory--- Args : []--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_get_lib_subdirectory" pango_get_lib_subdirectory :: - IO CString--{-# DEPRECATED getLibSubdirectory ["(Since version 1.38)"] #-}-{- |-Returns the name of the \"pango\" subdirectory of LIBDIR-(which is set at compile time).--}-getLibSubdirectory ::- (B.CallStack.HasCallStack, MonadIO m) =>- m T.Text- {- ^ __Returns:__ the Pango lib directory. The returned string should-not be freed. -}-getLibSubdirectory = liftIO $ do- result <- pango_get_lib_subdirectory- checkUnexpectedReturnNULL "getLibSubdirectory" result- result' <- cstringToText result- return result'----- function pango_find_paragraph_boundary--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "UTF-8 text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of @text in bytes, or -1 if nul-terminated", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "paragraph_delimiter_index", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "return location for index of\n delimiter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "next_paragraph_start", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "return location for start of next\n paragraph", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_find_paragraph_boundary" pango_find_paragraph_boundary :: - CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Ptr Int32 -> -- paragraph_delimiter_index : TBasicType TInt- Ptr Int32 -> -- next_paragraph_start : TBasicType TInt- IO ()--{- |-Locates a paragraph boundary in /@text@/. A boundary is caused by-delimiter characters, such as a newline, carriage return, carriage-return-newline pair, or Unicode paragraph separator character. The-index of the run of delimiters is returned in-/@paragraphDelimiterIndex@/. The index of the start of the paragraph-(index after all delimiters) is stored in /@nextParagraphStart@/.--If no delimiters are found, both /@paragraphDelimiterIndex@/ and-/@nextParagraphStart@/ are filled with the length of /@text@/ (an index one-off the end).--}-findParagraphBoundary ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@text@/: UTF-8 text -}- -> Int32- {- ^ /@length@/: length of /@text@/ in bytes, or -1 if nul-terminated -}- -> m ((Int32, Int32))-findParagraphBoundary text length_ = liftIO $ do- text' <- textToCString text- paragraphDelimiterIndex <- allocMem :: IO (Ptr Int32)- nextParagraphStart <- allocMem :: IO (Ptr Int32)- pango_find_paragraph_boundary text' length_ paragraphDelimiterIndex nextParagraphStart- paragraphDelimiterIndex' <- peek paragraphDelimiterIndex- nextParagraphStart' <- peek nextParagraphStart- freeMem text'- freeMem paragraphDelimiterIndex- freeMem nextParagraphStart- return (paragraphDelimiterIndex', nextParagraphStart')----- function pango_find_base_dir--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text to process", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of @text in bytes (may be -1 if @text is nul-terminated)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Direction"}))--- throws : False--- Skip return : False--foreign import ccall "pango_find_base_dir" pango_find_base_dir :: - CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- IO CUInt--{- |-Searches a string the first character that has a strong-direction, according to the Unicode bidirectional algorithm.--/Since: 1.4/--}-findBaseDir ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@text@/: the text to process -}- -> Int32- {- ^ /@length@/: length of /@text@/ in bytes (may be -1 if /@text@/ is nul-terminated) -}- -> m Pango.Enums.Direction- {- ^ __Returns:__ The direction corresponding to the first strong character.-If no such character is found, then 'GI.Pango.Enums.DirectionNeutral' is returned. -}-findBaseDir text length_ = liftIO $ do- text' <- textToCString text- result <- pango_find_base_dir text' length_- let result' = (toEnum . fromIntegral) result- freeMem text'- return result'----- function pango_extents_to_pixels--- Args : [Arg {argCName = "inclusive", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "rectangle to round to pixels inclusively, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "nearest", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "rectangle to round to nearest pixels, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_extents_to_pixels" pango_extents_to_pixels :: - Ptr Pango.Rectangle.Rectangle -> -- inclusive : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- nearest : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Converts extents from Pango units to device units, dividing by the-'GI.Pango.Constants.SCALE' factor and performing rounding.--The /@inclusive@/ rectangle is converted by flooring the x\/y coordinates and extending-width\/height, such that the final rectangle completely includes the original-rectangle.--The /@nearest@/ rectangle is converted by rounding the coordinates-of the rectangle to the nearest device unit (pixel).--The rule to which argument to use is: if you want the resulting device-space-rectangle to completely contain the original rectangle, pass it in as /@inclusive@/.-If you want two touching-but-not-overlapping rectangles stay-touching-but-not-overlapping after rounding to device units, pass them in-as /@nearest@/.--/Since: 1.16/--}-extentsToPixels ::- (B.CallStack.HasCallStack, MonadIO m) =>- Maybe (Pango.Rectangle.Rectangle)- {- ^ /@inclusive@/: rectangle to round to pixels inclusively, or 'Nothing'. -}- -> Maybe (Pango.Rectangle.Rectangle)- {- ^ /@nearest@/: rectangle to round to nearest pixels, or 'Nothing'. -}- -> m ()-extentsToPixels inclusive nearest = liftIO $ do- maybeInclusive <- case inclusive of- Nothing -> return nullPtr- Just jInclusive -> do- jInclusive' <- unsafeManagedPtrGetPtr jInclusive- return jInclusive'- maybeNearest <- case nearest of- Nothing -> return nullPtr- Just jNearest -> do- jNearest' <- unsafeManagedPtrGetPtr jNearest- return jNearest'- pango_extents_to_pixels maybeInclusive maybeNearest- whenJust inclusive touchManagedPtr- whenJust nearest touchManagedPtr- return ()----- function pango_default_break--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text to break", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of text in bytes (may be -1 if @text is nul-terminated)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "analysis", argType = TInterface (Name {namespace = "Pango", name = "Analysis"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #PangoAnalysis for the @text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs", argType = TInterface (Name {namespace = "Pango", name = "LogAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "logical attributes to fill in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "size of the array passed as @attrs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_default_break" pango_default_break :: - CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Ptr Pango.Analysis.Analysis -> -- analysis : TInterface (Name {namespace = "Pango", name = "Analysis"})- Ptr Pango.LogAttr.LogAttr -> -- attrs : TInterface (Name {namespace = "Pango", name = "LogAttr"})- Int32 -> -- attrs_len : TBasicType TInt- IO ()--{- |-This is the default break algorithm, used if no language-engine overrides it. Normally you should use 'GI.Pango.Functions.break'-instead. Unlike 'GI.Pango.Functions.break',-/@analysis@/ can be 'Nothing', but only do that if you know what-you\'re doing. If you need an analysis to pass to 'GI.Pango.Functions.break',-you need to 'GI.Pango.Functions.itemize'. In most cases however you should-simply use 'GI.Pango.Functions.getLogAttrs'.--}-defaultBreak ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@text@/: text to break -}- -> Int32- {- ^ /@length@/: length of text in bytes (may be -1 if /@text@/ is nul-terminated) -}- -> Maybe (Pango.Analysis.Analysis)- {- ^ /@analysis@/: a 'GI.Pango.Structs.Analysis.Analysis' for the /@text@/ -}- -> Pango.LogAttr.LogAttr- {- ^ /@attrs@/: logical attributes to fill in -}- -> Int32- {- ^ /@attrsLen@/: size of the array passed as /@attrs@/ -}- -> m ()-defaultBreak text length_ analysis attrs attrsLen = liftIO $ do- text' <- textToCString text- maybeAnalysis <- case analysis of- Nothing -> return nullPtr- Just jAnalysis -> do- jAnalysis' <- unsafeManagedPtrGetPtr jAnalysis- return jAnalysis'- attrs' <- unsafeManagedPtrGetPtr attrs- pango_default_break text' length_ maybeAnalysis attrs' attrsLen- whenJust analysis touchManagedPtr- touchManagedPtr attrs- freeMem text'- return ()----- function pango_config_key_get_system--- Args : [Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Key to look up, in the form \"SECTION/KEY\".", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_config_key_get_system" pango_config_key_get_system :: - CString -> -- key : TBasicType TUTF8- IO CString--{-# DEPRECATED configKeyGetSystem ["(Since version 1.38)"] #-}-{- |-Do not use. Does not do anything.--}-configKeyGetSystem ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@key@/: Key to look up, in the form \"SECTION\/KEY\". -}- -> m T.Text- {- ^ __Returns:__ 'Nothing' -}-configKeyGetSystem key = liftIO $ do- key' <- textToCString key- result <- pango_config_key_get_system key'- checkUnexpectedReturnNULL "configKeyGetSystem" result- result' <- cstringToText result- freeMem result- freeMem key'- return result'----- function pango_config_key_get--- Args : [Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Key to look up, in the form \"SECTION/KEY\".", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_config_key_get" pango_config_key_get :: - CString -> -- key : TBasicType TUTF8- IO CString--{-# DEPRECATED configKeyGet ["(Since version 1.38)"] #-}-{- |-Do not use. Does not do anything.--}-configKeyGet ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@key@/: Key to look up, in the form \"SECTION\/KEY\". -}- -> m T.Text- {- ^ __Returns:__ 'Nothing' -}-configKeyGet key = liftIO $ do- key' <- textToCString key- result <- pango_config_key_get key'- checkUnexpectedReturnNULL "configKeyGet" result- result' <- cstringToText result- freeMem result- freeMem key'- return result'----- function pango_break--- Args : [Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text to process", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of @text in bytes (may be -1 if @text is nul-terminated)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "analysis", argType = TInterface (Name {namespace = "Pango", name = "Analysis"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#PangoAnalysis structure from pango_itemize()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs", argType = TCArray False (-1) 4 (TInterface (Name {namespace = "Pango", name = "LogAttr"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an array to store character\n information in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "size of the array passed as @attrs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "attrs_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "size of the array passed as @attrs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_break" pango_break :: - CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Ptr Pango.Analysis.Analysis -> -- analysis : TInterface (Name {namespace = "Pango", name = "Analysis"})- Ptr Pango.LogAttr.LogAttr -> -- attrs : TCArray False (-1) 4 (TInterface (Name {namespace = "Pango", name = "LogAttr"}))- Int32 -> -- attrs_len : TBasicType TInt- IO ()--{- |-Determines possible line, word, and character breaks-for a string of Unicode text with a single analysis. For most-purposes you may want to use 'GI.Pango.Functions.getLogAttrs'.--}-break ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@text@/: the text to process -}- -> Int32- {- ^ /@length@/: length of /@text@/ in bytes (may be -1 if /@text@/ is nul-terminated) -}- -> Pango.Analysis.Analysis- {- ^ /@analysis@/: 'GI.Pango.Structs.Analysis.Analysis' structure from 'GI.Pango.Functions.itemize' -}- -> [Pango.LogAttr.LogAttr]- {- ^ /@attrs@/: an array to store character- information in -}- -> m ()-break text length_ analysis attrs = liftIO $ do- let attrsLen = fromIntegral $ length attrs- text' <- textToCString text- analysis' <- unsafeManagedPtrGetPtr analysis- attrs' <- mapM unsafeManagedPtrGetPtr attrs- attrs'' <- packBlockArray 52 attrs'- pango_break text' length_ analysis' attrs'' attrsLen- touchManagedPtr analysis- mapM_ touchManagedPtr attrs- freeMem text'- freeMem attrs''- return ()----- function pango_attr_weight_new--- Args : [Arg {argCName = "weight", argType = TInterface (Name {namespace = "Pango", name = "Weight"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the weight", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_weight_new" pango_attr_weight_new :: - CUInt -> -- weight : TInterface (Name {namespace = "Pango", name = "Weight"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font weight attribute.--}-attrWeightNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Enums.Weight- {- ^ /@weight@/: the weight -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrWeightNew weight = liftIO $ do- let weight' = (fromIntegral . fromEnum) weight- result <- pango_attr_weight_new weight'- checkUnexpectedReturnNULL "attrWeightNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_variant_new--- Args : [Arg {argCName = "variant", argType = TInterface (Name {namespace = "Pango", name = "Variant"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the variant", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_variant_new" pango_attr_variant_new :: - CUInt -> -- variant : TInterface (Name {namespace = "Pango", name = "Variant"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font variant attribute (normal or small caps)--}-attrVariantNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Enums.Variant- {- ^ /@variant@/: the variant -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrVariantNew variant = liftIO $ do- let variant' = (fromIntegral . fromEnum) variant- result <- pango_attr_variant_new variant'- checkUnexpectedReturnNULL "attrVariantNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_underline_new--- Args : [Arg {argCName = "underline", argType = TInterface (Name {namespace = "Pango", name = "Underline"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the underline style.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_underline_new" pango_attr_underline_new :: - CUInt -> -- underline : TInterface (Name {namespace = "Pango", name = "Underline"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new underline-style attribute.--}-attrUnderlineNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Enums.Underline- {- ^ /@underline@/: the underline style. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrUnderlineNew underline = liftIO $ do- let underline' = (fromIntegral . fromEnum) underline- result <- pango_attr_underline_new underline'- checkUnexpectedReturnNULL "attrUnderlineNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_underline_color_new--- Args : [Arg {argCName = "red", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the red value (ranging from 0 to 65535)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "green", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the green value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "blue", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the blue value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_underline_color_new" pango_attr_underline_color_new :: - Word16 -> -- red : TBasicType TUInt16- Word16 -> -- green : TBasicType TUInt16- Word16 -> -- blue : TBasicType TUInt16- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new underline color attribute. This attribute-modifies the color of underlines. If not set, underlines-will use the foreground color.--/Since: 1.8/--}-attrUnderlineColorNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Word16- {- ^ /@red@/: the red value (ranging from 0 to 65535) -}- -> Word16- {- ^ /@green@/: the green value -}- -> Word16- {- ^ /@blue@/: the blue value -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrUnderlineColorNew red green blue = liftIO $ do- result <- pango_attr_underline_color_new red green blue- checkUnexpectedReturnNULL "attrUnderlineColorNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_style_new--- Args : [Arg {argCName = "style", argType = TInterface (Name {namespace = "Pango", name = "Style"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the slant style", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_style_new" pango_attr_style_new :: - CUInt -> -- style : TInterface (Name {namespace = "Pango", name = "Style"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font slant style attribute.--}-attrStyleNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Enums.Style- {- ^ /@style@/: the slant style -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrStyleNew style = liftIO $ do- let style' = (fromIntegral . fromEnum) style- result <- pango_attr_style_new style'- checkUnexpectedReturnNULL "attrStyleNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_strikethrough_new--- Args : [Arg {argCName = "strikethrough", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if the text should be struck-through.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_strikethrough_new" pango_attr_strikethrough_new :: - CInt -> -- strikethrough : TBasicType TBoolean- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new strike-through attribute.--}-attrStrikethroughNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Bool- {- ^ /@strikethrough@/: 'True' if the text should be struck-through. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrStrikethroughNew strikethrough = liftIO $ do- let strikethrough' = (fromIntegral . fromEnum) strikethrough- result <- pango_attr_strikethrough_new strikethrough'- checkUnexpectedReturnNULL "attrStrikethroughNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_strikethrough_color_new--- Args : [Arg {argCName = "red", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the red value (ranging from 0 to 65535)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "green", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the green value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "blue", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the blue value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_strikethrough_color_new" pango_attr_strikethrough_color_new :: - Word16 -> -- red : TBasicType TUInt16- Word16 -> -- green : TBasicType TUInt16- Word16 -> -- blue : TBasicType TUInt16- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new strikethrough color attribute. This attribute-modifies the color of strikethrough lines. If not set, strikethrough-lines will use the foreground color.--/Since: 1.8/--}-attrStrikethroughColorNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Word16- {- ^ /@red@/: the red value (ranging from 0 to 65535) -}- -> Word16- {- ^ /@green@/: the green value -}- -> Word16- {- ^ /@blue@/: the blue value -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrStrikethroughColorNew red green blue = liftIO $ do- result <- pango_attr_strikethrough_color_new red green blue- checkUnexpectedReturnNULL "attrStrikethroughColorNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_stretch_new--- Args : [Arg {argCName = "stretch", argType = TInterface (Name {namespace = "Pango", name = "Stretch"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the stretch", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_stretch_new" pango_attr_stretch_new :: - CUInt -> -- stretch : TInterface (Name {namespace = "Pango", name = "Stretch"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font stretch attribute--}-attrStretchNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Enums.Stretch- {- ^ /@stretch@/: the stretch -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrStretchNew stretch = liftIO $ do- let stretch' = (fromIntegral . fromEnum) stretch- result <- pango_attr_stretch_new stretch'- checkUnexpectedReturnNULL "attrStretchNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_scale_new--- Args : [Arg {argCName = "scale_factor", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "factor to scale the font", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_scale_new" pango_attr_scale_new :: - CDouble -> -- scale_factor : TBasicType TDouble- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font size scale attribute. The base font for the-affected text will have its size multiplied by /@scaleFactor@/.--}-attrScaleNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Double- {- ^ /@scaleFactor@/: factor to scale the font -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrScaleNew scaleFactor = liftIO $ do- let scaleFactor' = realToFrac scaleFactor- result <- pango_attr_scale_new scaleFactor'- checkUnexpectedReturnNULL "attrScaleNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_rise_new--- Args : [Arg {argCName = "rise", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the amount that the text should be displaced vertically,\n in Pango units. Positive values displace the text upwards.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_rise_new" pango_attr_rise_new :: - Int32 -> -- rise : TBasicType TInt- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new baseline displacement attribute.--}-attrRiseNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@rise@/: the amount that the text should be displaced vertically,- in Pango units. Positive values displace the text upwards. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrRiseNew rise = liftIO $ do- result <- pango_attr_rise_new rise- checkUnexpectedReturnNULL "attrRiseNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_letter_spacing_new--- Args : [Arg {argCName = "letter_spacing", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "amount of extra space to add between graphemes\n of the text, in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_letter_spacing_new" pango_attr_letter_spacing_new :: - Int32 -> -- letter_spacing : TBasicType TInt- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new letter-spacing attribute.--/Since: 1.6/--}-attrLetterSpacingNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@letterSpacing@/: amount of extra space to add between graphemes- of the text, in Pango units. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrLetterSpacingNew letterSpacing = liftIO $ do- result <- pango_attr_letter_spacing_new letterSpacing- checkUnexpectedReturnNULL "attrLetterSpacingNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_gravity_new--- Args : [Arg {argCName = "gravity", argType = TInterface (Name {namespace = "Pango", name = "Gravity"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the gravity value; should not be %PANGO_GRAVITY_AUTO.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_gravity_new" pango_attr_gravity_new :: - CUInt -> -- gravity : TInterface (Name {namespace = "Pango", name = "Gravity"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new gravity attribute.--/Since: 1.16/--}-attrGravityNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Enums.Gravity- {- ^ /@gravity@/: the gravity value; should not be 'GI.Pango.Enums.GravityAuto'. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrGravityNew gravity = liftIO $ do- let gravity' = (fromIntegral . fromEnum) gravity- result <- pango_attr_gravity_new gravity'- checkUnexpectedReturnNULL "attrGravityNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_gravity_hint_new--- Args : [Arg {argCName = "hint", argType = TInterface (Name {namespace = "Pango", name = "GravityHint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the gravity hint value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_gravity_hint_new" pango_attr_gravity_hint_new :: - CUInt -> -- hint : TInterface (Name {namespace = "Pango", name = "GravityHint"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new gravity hint attribute.--/Since: 1.16/--}-attrGravityHintNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Enums.GravityHint- {- ^ /@hint@/: the gravity hint value. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrGravityHintNew hint = liftIO $ do- let hint' = (fromIntegral . fromEnum) hint- result <- pango_attr_gravity_hint_new hint'- checkUnexpectedReturnNULL "attrGravityHintNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_foreground_new--- Args : [Arg {argCName = "red", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the red value (ranging from 0 to 65535)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "green", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the green value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "blue", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the blue value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_foreground_new" pango_attr_foreground_new :: - Word16 -> -- red : TBasicType TUInt16- Word16 -> -- green : TBasicType TUInt16- Word16 -> -- blue : TBasicType TUInt16- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new foreground color attribute.--}-attrForegroundNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Word16- {- ^ /@red@/: the red value (ranging from 0 to 65535) -}- -> Word16- {- ^ /@green@/: the green value -}- -> Word16- {- ^ /@blue@/: the blue value -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrForegroundNew red green blue = liftIO $ do- result <- pango_attr_foreground_new red green blue- checkUnexpectedReturnNULL "attrForegroundNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_foreground_alpha_new--- Args : [Arg {argCName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the alpha value, between 1 and 65536", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_foreground_alpha_new" pango_attr_foreground_alpha_new :: - Word16 -> -- alpha : TBasicType TUInt16- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new foreground alpha attribute.--/Since: 1.38/--}-attrForegroundAlphaNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Word16- {- ^ /@alpha@/: the alpha value, between 1 and 65536 -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the new allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrForegroundAlphaNew alpha = liftIO $ do- result <- pango_attr_foreground_alpha_new alpha- checkUnexpectedReturnNULL "attrForegroundAlphaNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_family_new--- Args : [Arg {argCName = "family", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the family or comma separated list of families", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_family_new" pango_attr_family_new :: - CString -> -- family : TBasicType TUTF8- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font family attribute.--}-attrFamilyNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@family@/: the family or comma separated list of families -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrFamilyNew family = liftIO $ do- family' <- textToCString family- result <- pango_attr_family_new family'- checkUnexpectedReturnNULL "attrFamilyNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- freeMem family'- return result'----- function pango_attr_fallback_new--- Args : [Arg {argCName = "enable_fallback", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if we should fall back on other fonts\n for characters the active font is missing.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_fallback_new" pango_attr_fallback_new :: - CInt -> -- enable_fallback : TBasicType TBoolean- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font fallback attribute.--If fallback is disabled, characters will only be used from the-closest matching font on the system. No fallback will be done to-other fonts on the system that might contain the characters in the-text.--/Since: 1.4/--}-attrFallbackNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Bool- {- ^ /@enableFallback@/: 'True' if we should fall back on other fonts- for characters the active font is missing. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrFallbackNew enableFallback = liftIO $ do- let enableFallback' = (fromIntegral . fromEnum) enableFallback- result <- pango_attr_fallback_new enableFallback'- checkUnexpectedReturnNULL "attrFallbackNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_background_new--- Args : [Arg {argCName = "red", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the red value (ranging from 0 to 65535)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "green", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the green value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "blue", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the blue value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_background_new" pango_attr_background_new :: - Word16 -> -- red : TBasicType TUInt16- Word16 -> -- green : TBasicType TUInt16- Word16 -> -- blue : TBasicType TUInt16- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new background color attribute.--}-attrBackgroundNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Word16- {- ^ /@red@/: the red value (ranging from 0 to 65535) -}- -> Word16- {- ^ /@green@/: the green value -}- -> Word16- {- ^ /@blue@/: the blue value -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrBackgroundNew red green blue = liftIO $ do- result <- pango_attr_background_new red green blue- checkUnexpectedReturnNULL "attrBackgroundNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'----- function pango_attr_background_alpha_new--- Args : [Arg {argCName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the alpha value, between 1 and 65536", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_background_alpha_new" pango_attr_background_alpha_new :: - Word16 -> -- alpha : TBasicType TUInt16- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new background alpha attribute.--/Since: 1.38/--}-attrBackgroundAlphaNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Word16- {- ^ /@alpha@/: the alpha value, between 1 and 65536 -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the new allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrBackgroundAlphaNew alpha = liftIO $ do- result <- pango_attr_background_alpha_new alpha- checkUnexpectedReturnNULL "attrBackgroundAlphaNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'---
− GI/Pango/Objects.hs
@@ -1,63 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects- ( module GI.Pango.Objects.Context ,- module GI.Pango.Objects.Engine ,- module GI.Pango.Objects.EngineLang ,- module GI.Pango.Objects.EngineShape ,- module GI.Pango.Objects.Font ,- module GI.Pango.Objects.FontFace ,- module GI.Pango.Objects.FontFamily ,- module GI.Pango.Objects.FontMap ,- module GI.Pango.Objects.Fontset ,- module GI.Pango.Objects.FontsetSimple ,- module GI.Pango.Objects.Layout ,- module GI.Pango.Objects.Renderer ,--- ) where--import GI.Pango.Objects.Context-import GI.Pango.Objects.Engine-import GI.Pango.Objects.EngineLang-import GI.Pango.Objects.EngineShape-import GI.Pango.Objects.Font-import GI.Pango.Objects.FontFace-import GI.Pango.Objects.FontFamily-import GI.Pango.Objects.FontMap-import GI.Pango.Objects.Fontset-import GI.Pango.Objects.FontsetSimple-import GI.Pango.Objects.Layout-import GI.Pango.Objects.Renderer--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---
− GI/Pango/Objects/Context.hs
@@ -1,1263 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.Context.Context' structure stores global information-used to control the itemization process.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.Context- ( ---- * Exported types- Context(..) ,- IsContext ,- toContext ,- noContext ,--- -- * Methods--- ** changed #method:changed#--#if ENABLE_OVERLOADING- ContextChangedMethodInfo ,-#endif- contextChanged ,----- ** getBaseDir #method:getBaseDir#--#if ENABLE_OVERLOADING- ContextGetBaseDirMethodInfo ,-#endif- contextGetBaseDir ,----- ** getBaseGravity #method:getBaseGravity#--#if ENABLE_OVERLOADING- ContextGetBaseGravityMethodInfo ,-#endif- contextGetBaseGravity ,----- ** getFontDescription #method:getFontDescription#--#if ENABLE_OVERLOADING- ContextGetFontDescriptionMethodInfo ,-#endif- contextGetFontDescription ,----- ** getFontMap #method:getFontMap#--#if ENABLE_OVERLOADING- ContextGetFontMapMethodInfo ,-#endif- contextGetFontMap ,----- ** getGravity #method:getGravity#--#if ENABLE_OVERLOADING- ContextGetGravityMethodInfo ,-#endif- contextGetGravity ,----- ** getGravityHint #method:getGravityHint#--#if ENABLE_OVERLOADING- ContextGetGravityHintMethodInfo ,-#endif- contextGetGravityHint ,----- ** getLanguage #method:getLanguage#--#if ENABLE_OVERLOADING- ContextGetLanguageMethodInfo ,-#endif- contextGetLanguage ,----- ** getMatrix #method:getMatrix#--#if ENABLE_OVERLOADING- ContextGetMatrixMethodInfo ,-#endif- contextGetMatrix ,----- ** getMetrics #method:getMetrics#--#if ENABLE_OVERLOADING- ContextGetMetricsMethodInfo ,-#endif- contextGetMetrics ,----- ** getSerial #method:getSerial#--#if ENABLE_OVERLOADING- ContextGetSerialMethodInfo ,-#endif- contextGetSerial ,----- ** listFamilies #method:listFamilies#--#if ENABLE_OVERLOADING- ContextListFamiliesMethodInfo ,-#endif- contextListFamilies ,----- ** loadFont #method:loadFont#--#if ENABLE_OVERLOADING- ContextLoadFontMethodInfo ,-#endif- contextLoadFont ,----- ** loadFontset #method:loadFontset#--#if ENABLE_OVERLOADING- ContextLoadFontsetMethodInfo ,-#endif- contextLoadFontset ,----- ** new #method:new#-- contextNew ,----- ** setBaseDir #method:setBaseDir#--#if ENABLE_OVERLOADING- ContextSetBaseDirMethodInfo ,-#endif- contextSetBaseDir ,----- ** setBaseGravity #method:setBaseGravity#--#if ENABLE_OVERLOADING- ContextSetBaseGravityMethodInfo ,-#endif- contextSetBaseGravity ,----- ** setFontDescription #method:setFontDescription#--#if ENABLE_OVERLOADING- ContextSetFontDescriptionMethodInfo ,-#endif- contextSetFontDescription ,----- ** setFontMap #method:setFontMap#--#if ENABLE_OVERLOADING- ContextSetFontMapMethodInfo ,-#endif- contextSetFontMap ,----- ** setGravityHint #method:setGravityHint#--#if ENABLE_OVERLOADING- ContextSetGravityHintMethodInfo ,-#endif- contextSetGravityHint ,----- ** setLanguage #method:setLanguage#--#if ENABLE_OVERLOADING- ContextSetLanguageMethodInfo ,-#endif- contextSetLanguage ,----- ** setMatrix #method:setMatrix#--#if ENABLE_OVERLOADING- ContextSetMatrixMethodInfo ,-#endif- contextSetMatrix ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums-import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Objects.FontFamily as Pango.FontFamily-import {-# SOURCE #-} qualified GI.Pango.Objects.FontMap as Pango.FontMap-import {-# SOURCE #-} qualified GI.Pango.Objects.Fontset as Pango.Fontset-import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription-import {-# SOURCE #-} qualified GI.Pango.Structs.FontMetrics as Pango.FontMetrics-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language-import {-# SOURCE #-} qualified GI.Pango.Structs.Matrix as Pango.Matrix---- | Memory-managed wrapper type.-newtype Context = Context (ManagedPtr Context)-foreign import ccall "pango_context_get_type"- c_pango_context_get_type :: IO GType--instance GObject Context where- gobjectType = c_pango_context_get_type- ---- | Type class for types which can be safely cast to `Context`, for instance with `toContext`.-class (GObject o, O.IsDescendantOf Context o) => IsContext o-instance (GObject o, O.IsDescendantOf Context o) => IsContext o--instance O.HasParentTypes Context-type instance O.ParentTypes Context = '[GObject.Object.Object]---- | Cast to `Context`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toContext :: (MonadIO m, IsContext o) => o -> m Context-toContext = liftIO . unsafeCastTo Context---- | A convenience alias for `Nothing` :: `Maybe` `Context`.-noContext :: Maybe Context-noContext = Nothing--#if ENABLE_OVERLOADING-type family ResolveContextMethod (t :: Symbol) (o :: *) :: * where- ResolveContextMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveContextMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveContextMethod "changed" o = ContextChangedMethodInfo- ResolveContextMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveContextMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveContextMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveContextMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveContextMethod "listFamilies" o = ContextListFamiliesMethodInfo- ResolveContextMethod "loadFont" o = ContextLoadFontMethodInfo- ResolveContextMethod "loadFontset" o = ContextLoadFontsetMethodInfo- ResolveContextMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveContextMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveContextMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveContextMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveContextMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveContextMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveContextMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveContextMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveContextMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveContextMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveContextMethod "getBaseDir" o = ContextGetBaseDirMethodInfo- ResolveContextMethod "getBaseGravity" o = ContextGetBaseGravityMethodInfo- ResolveContextMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveContextMethod "getFontDescription" o = ContextGetFontDescriptionMethodInfo- ResolveContextMethod "getFontMap" o = ContextGetFontMapMethodInfo- ResolveContextMethod "getGravity" o = ContextGetGravityMethodInfo- ResolveContextMethod "getGravityHint" o = ContextGetGravityHintMethodInfo- ResolveContextMethod "getLanguage" o = ContextGetLanguageMethodInfo- ResolveContextMethod "getMatrix" o = ContextGetMatrixMethodInfo- ResolveContextMethod "getMetrics" o = ContextGetMetricsMethodInfo- ResolveContextMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveContextMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveContextMethod "getSerial" o = ContextGetSerialMethodInfo- ResolveContextMethod "setBaseDir" o = ContextSetBaseDirMethodInfo- ResolveContextMethod "setBaseGravity" o = ContextSetBaseGravityMethodInfo- ResolveContextMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveContextMethod "setFontDescription" o = ContextSetFontDescriptionMethodInfo- ResolveContextMethod "setFontMap" o = ContextSetFontMapMethodInfo- ResolveContextMethod "setGravityHint" o = ContextSetGravityHintMethodInfo- ResolveContextMethod "setLanguage" o = ContextSetLanguageMethodInfo- ResolveContextMethod "setMatrix" o = ContextSetMatrixMethodInfo- ResolveContextMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveContextMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveContextMethod t Context, O.MethodInfo info Context p) => OL.IsLabel t (Context -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Context-type instance O.AttributeList Context = ContextAttributeList-type ContextAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList Context = ContextSignalList-type ContextSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method Context::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Context"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_new" pango_context_new :: - IO (Ptr Context)--{- |-Creates a new 'GI.Pango.Objects.Context.Context' initialized to default values.--This function is not particularly useful as it should always-be followed by a 'GI.Pango.Objects.Context.contextSetFontMap' call, and the-function 'GI.Pango.Objects.FontMap.fontMapCreateContext' does these two steps-together and hence users are recommended to use that.--If you are using Pango as part of a higher-level system,-that system may have it\'s own way of create a 'GI.Pango.Objects.Context.Context'.-For instance, the GTK+ toolkit has, among others,-@/gdk_pango_context_get_for_screen()/@, and-@/gtk_widget_get_pango_context()/@. Use those instead.--}-contextNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m Context- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.Context.Context', which should- be freed with 'GI.GObject.Objects.Object.objectUnref'. -}-contextNew = liftIO $ do- result <- pango_context_new- checkUnexpectedReturnNULL "contextNew" result- result' <- (wrapObject Context) result- return result'--#if ENABLE_OVERLOADING-#endif---- method Context::changed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_changed" pango_context_changed :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO ()--{- |-Forces a change in the context, which will cause any 'GI.Pango.Objects.Layout.Layout'-using this context to re-layout.--This function is only useful when implementing a new backend-for Pango, something applications won\'t do. Backends should-call this function if they have attached extra data to the context-and such data is changed.--/Since: 1.32.4/--}-contextChanged ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m ()-contextChanged context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- pango_context_changed context'- touchManagedPtr context- return ()--#if ENABLE_OVERLOADING-data ContextChangedMethodInfo-instance (signature ~ (m ()), MonadIO m, IsContext a) => O.MethodInfo ContextChangedMethodInfo a signature where- overloadedMethod _ = contextChanged--#endif---- method Context::get_base_dir--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Direction"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_base_dir" pango_context_get_base_dir :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO CUInt--{- |-Retrieves the base direction for the context. See-'GI.Pango.Objects.Context.contextSetBaseDir'.--}-contextGetBaseDir ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Pango.Enums.Direction- {- ^ __Returns:__ the base direction for the context. -}-contextGetBaseDir context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_base_dir context'- let result' = (toEnum . fromIntegral) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-data ContextGetBaseDirMethodInfo-instance (signature ~ (m Pango.Enums.Direction), MonadIO m, IsContext a) => O.MethodInfo ContextGetBaseDirMethodInfo a signature where- overloadedMethod _ = contextGetBaseDir--#endif---- method Context::get_base_gravity--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Gravity"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_base_gravity" pango_context_get_base_gravity :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO CUInt--{- |-Retrieves the base gravity for the context. See-'GI.Pango.Objects.Context.contextSetBaseGravity'.--/Since: 1.16/--}-contextGetBaseGravity ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Pango.Enums.Gravity- {- ^ __Returns:__ the base gravity for the context. -}-contextGetBaseGravity context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_base_gravity context'- let result' = (toEnum . fromIntegral) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-data ContextGetBaseGravityMethodInfo-instance (signature ~ (m Pango.Enums.Gravity), MonadIO m, IsContext a) => O.MethodInfo ContextGetBaseGravityMethodInfo a signature where- overloadedMethod _ = contextGetBaseGravity--#endif---- method Context::get_font_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_font_description" pango_context_get_font_description :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO (Ptr Pango.FontDescription.FontDescription)--{- |-Retrieve the default font description for the context.--}-contextGetFontDescription ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Pango.FontDescription.FontDescription- {- ^ __Returns:__ a pointer to the context\'s default font- description. This value must not be modified or freed. -}-contextGetFontDescription context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_font_description context'- checkUnexpectedReturnNULL "contextGetFontDescription" result- result' <- (newBoxed Pango.FontDescription.FontDescription) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-data ContextGetFontDescriptionMethodInfo-instance (signature ~ (m Pango.FontDescription.FontDescription), MonadIO m, IsContext a) => O.MethodInfo ContextGetFontDescriptionMethodInfo a signature where- overloadedMethod _ = contextGetFontDescription--#endif---- method Context::get_font_map--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMap"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_font_map" pango_context_get_font_map :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO (Ptr Pango.FontMap.FontMap)--{- |-Gets the 'GI.Pango.Objects.FontMap.FontMap' used to look up fonts for this context.--/Since: 1.6/--}-contextGetFontMap ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Pango.FontMap.FontMap- {- ^ __Returns:__ the font map for the 'GI.Pango.Objects.Context.Context'.- This value is owned by Pango and should not be unreferenced. -}-contextGetFontMap context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_font_map context'- checkUnexpectedReturnNULL "contextGetFontMap" result- result' <- (newObject Pango.FontMap.FontMap) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-data ContextGetFontMapMethodInfo-instance (signature ~ (m Pango.FontMap.FontMap), MonadIO m, IsContext a) => O.MethodInfo ContextGetFontMapMethodInfo a signature where- overloadedMethod _ = contextGetFontMap--#endif---- method Context::get_gravity--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Gravity"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_gravity" pango_context_get_gravity :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO CUInt--{- |-Retrieves the gravity for the context. This is similar to-'GI.Pango.Objects.Context.contextGetBaseGravity', except for when the base gravity-is 'GI.Pango.Enums.GravityAuto' for which 'GI.Pango.Functions.gravityGetForMatrix' is used-to return the gravity from the current context matrix.--/Since: 1.16/--}-contextGetGravity ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Pango.Enums.Gravity- {- ^ __Returns:__ the resolved gravity for the context. -}-contextGetGravity context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_gravity context'- let result' = (toEnum . fromIntegral) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-data ContextGetGravityMethodInfo-instance (signature ~ (m Pango.Enums.Gravity), MonadIO m, IsContext a) => O.MethodInfo ContextGetGravityMethodInfo a signature where- overloadedMethod _ = contextGetGravity--#endif---- method Context::get_gravity_hint--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GravityHint"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_gravity_hint" pango_context_get_gravity_hint :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO CUInt--{- |-Retrieves the gravity hint for the context. See-'GI.Pango.Objects.Context.contextSetGravityHint' for details.--/Since: 1.16/--}-contextGetGravityHint ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Pango.Enums.GravityHint- {- ^ __Returns:__ the gravity hint for the context. -}-contextGetGravityHint context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_gravity_hint context'- let result' = (toEnum . fromIntegral) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-data ContextGetGravityHintMethodInfo-instance (signature ~ (m Pango.Enums.GravityHint), MonadIO m, IsContext a) => O.MethodInfo ContextGetGravityHintMethodInfo a signature where- overloadedMethod _ = contextGetGravityHint--#endif---- method Context::get_language--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Language"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_language" pango_context_get_language :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO (Ptr Pango.Language.Language)--{- |-Retrieves the global language tag for the context.--}-contextGetLanguage ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Pango.Language.Language- {- ^ __Returns:__ the global language tag. -}-contextGetLanguage context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_language context'- checkUnexpectedReturnNULL "contextGetLanguage" result- result' <- (wrapBoxed Pango.Language.Language) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-data ContextGetLanguageMethodInfo-instance (signature ~ (m Pango.Language.Language), MonadIO m, IsContext a) => O.MethodInfo ContextGetLanguageMethodInfo a signature where- overloadedMethod _ = contextGetLanguage--#endif---- method Context::get_matrix--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Matrix"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_matrix" pango_context_get_matrix :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO (Ptr Pango.Matrix.Matrix)--{- |-Gets the transformation matrix that will be applied when-rendering with this context. See 'GI.Pango.Objects.Context.contextSetMatrix'.--/Since: 1.6/--}-contextGetMatrix ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m (Maybe Pango.Matrix.Matrix)- {- ^ __Returns:__ the matrix, or 'Nothing' if no matrix has- been set (which is the same as the identity matrix). The returned- matrix is owned by Pango and must not be modified or freed. -}-contextGetMatrix context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_matrix context'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.Matrix.Matrix) result'- return result''- touchManagedPtr context- return maybeResult--#if ENABLE_OVERLOADING-data ContextGetMatrixMethodInfo-instance (signature ~ (m (Maybe Pango.Matrix.Matrix)), MonadIO m, IsContext a) => O.MethodInfo ContextGetMatrixMethodInfo a signature where- overloadedMethod _ = contextGetMatrix--#endif---- method Context::get_metrics--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription structure. %NULL means that the\n font description from the context will be used.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "language tag used to determine which script to get\n the metrics for. %NULL means that the language tag from the context\n will be used. If no language tag is set on the context, metrics\n for the default language (as determined by pango_language_get_default())\n will be returned.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMetrics"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_metrics" pango_context_get_metrics :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO (Ptr Pango.FontMetrics.FontMetrics)--{- |-Get overall metric information for a particular font-description. Since the metrics may be substantially different for-different scripts, a language tag can be provided to indicate that-the metrics should be retrieved that correspond to the script(s)-used by that language.--The 'GI.Pango.Structs.FontDescription.FontDescription' is interpreted in the same way as-by 'GI.Pango.Functions.itemize', and the family name may be a comma separated-list of figures. If characters from multiple of these families-would be used to render the string, then the returned fonts would-be a composite of the metrics for the fonts loaded for the-individual families.--}-contextGetMetrics ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Maybe (Pango.FontDescription.FontDescription)- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' structure. 'Nothing' means that the- font description from the context will be used. -}- -> Maybe (Pango.Language.Language)- {- ^ /@language@/: language tag used to determine which script to get- the metrics for. 'Nothing' means that the language tag from the context- will be used. If no language tag is set on the context, metrics- for the default language (as determined by 'GI.Pango.Functions.languageGetDefault')- will be returned. -}- -> m Pango.FontMetrics.FontMetrics- {- ^ __Returns:__ a 'GI.Pango.Structs.FontMetrics.FontMetrics' object. The caller must call 'GI.Pango.Structs.FontMetrics.fontMetricsUnref'- when finished using the object. -}-contextGetMetrics context desc language = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- maybeDesc <- case desc of- Nothing -> return nullPtr- Just jDesc -> do- jDesc' <- unsafeManagedPtrGetPtr jDesc- return jDesc'- maybeLanguage <- case language of- Nothing -> return nullPtr- Just jLanguage -> do- jLanguage' <- unsafeManagedPtrGetPtr jLanguage- return jLanguage'- result <- pango_context_get_metrics context' maybeDesc maybeLanguage- checkUnexpectedReturnNULL "contextGetMetrics" result- result' <- (wrapBoxed Pango.FontMetrics.FontMetrics) result- touchManagedPtr context- whenJust desc touchManagedPtr- whenJust language touchManagedPtr- return result'--#if ENABLE_OVERLOADING-data ContextGetMetricsMethodInfo-instance (signature ~ (Maybe (Pango.FontDescription.FontDescription) -> Maybe (Pango.Language.Language) -> m Pango.FontMetrics.FontMetrics), MonadIO m, IsContext a) => O.MethodInfo ContextGetMetricsMethodInfo a signature where- overloadedMethod _ = contextGetMetrics--#endif---- method Context::get_serial--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "pango_context_get_serial" pango_context_get_serial :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO Word32--{- |-Returns the current serial number of /@context@/. The serial number is-initialized to an small number larger than zero when a new context-is created and is increased whenever the context is changed using any-of the setter functions, or the 'GI.Pango.Objects.FontMap.FontMap' it uses to find fonts has-changed. The serial may wrap, but will never have the value 0. Since it-can wrap, never compare it with \"less than\", always use \"not equals\".--This can be used to automatically detect changes to a 'GI.Pango.Objects.Context.Context', and-is only useful when implementing objects that need update when their-'GI.Pango.Objects.Context.Context' changes, like 'GI.Pango.Objects.Layout.Layout'.--/Since: 1.32.4/--}-contextGetSerial ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Word32- {- ^ __Returns:__ The current serial number of /@context@/. -}-contextGetSerial context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_context_get_serial context'- touchManagedPtr context- return result--#if ENABLE_OVERLOADING-data ContextGetSerialMethodInfo-instance (signature ~ (m Word32), MonadIO m, IsContext a) => O.MethodInfo ContextGetSerialMethodInfo a signature where- overloadedMethod _ = contextGetSerial--#endif---- method Context::list_families--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "families", argType = TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "FontFamily"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store a pointer to\n an array of #PangoFontFamily *. This array should be freed\n with g_free().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferContainer},Arg {argCName = "n_families", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of elements in @descs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_families", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of elements in @descs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_list_families" pango_context_list_families :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr (Ptr (Ptr Pango.FontFamily.FontFamily)) -> -- families : TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "FontFamily"}))- Ptr Int32 -> -- n_families : TBasicType TInt- IO ()--{- |-List all families for a context.--}-contextListFamilies ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m ([Pango.FontFamily.FontFamily])-contextListFamilies context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- families <- allocMem :: IO (Ptr (Ptr (Ptr Pango.FontFamily.FontFamily)))- nFamilies <- allocMem :: IO (Ptr Int32)- pango_context_list_families context' families nFamilies- nFamilies' <- peek nFamilies- families' <- peek families- families'' <- (unpackPtrArrayWithLength nFamilies') families'- families''' <- mapM (newObject Pango.FontFamily.FontFamily) families''- freeMem families'- touchManagedPtr context- freeMem families- freeMem nFamilies- return families'''--#if ENABLE_OVERLOADING-data ContextListFamiliesMethodInfo-instance (signature ~ (m ([Pango.FontFamily.FontFamily])), MonadIO m, IsContext a) => O.MethodInfo ContextListFamiliesMethodInfo a signature where- overloadedMethod _ = contextListFamilies--#endif---- method Context::load_font--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription describing the font to load", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Font"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_load_font" pango_context_load_font :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO (Ptr Pango.Font.Font)--{- |-Loads the font in one of the fontmaps in the context-that is the closest match for /@desc@/.--}-contextLoadFont ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Pango.FontDescription.FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' describing the font to load -}- -> m (Maybe Pango.Font.Font)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.Font.Font'- that was loaded, or 'Nothing' if no font matched. -}-contextLoadFont context desc = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_context_load_font context' desc'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapObject Pango.Font.Font) result'- return result''- touchManagedPtr context- touchManagedPtr desc- return maybeResult--#if ENABLE_OVERLOADING-data ContextLoadFontMethodInfo-instance (signature ~ (Pango.FontDescription.FontDescription -> m (Maybe Pango.Font.Font)), MonadIO m, IsContext a) => O.MethodInfo ContextLoadFontMethodInfo a signature where- overloadedMethod _ = contextLoadFont--#endif---- method Context::load_fontset--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription describing the fonts to load", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLanguage the fonts will be used for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Fontset"}))--- throws : False--- Skip return : False--foreign import ccall "pango_context_load_fontset" pango_context_load_fontset :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO (Ptr Pango.Fontset.Fontset)--{- |-Load a set of fonts in the context that can be used to render-a font matching /@desc@/.--}-contextLoadFontset ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Pango.FontDescription.FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' describing the fonts to load -}- -> Pango.Language.Language- {- ^ /@language@/: a 'GI.Pango.Structs.Language.Language' the fonts will be used for -}- -> m (Maybe Pango.Fontset.Fontset)- {- ^ __Returns:__ the newly allocated- 'GI.Pango.Objects.Fontset.Fontset' loaded, or 'Nothing' if no font matched. -}-contextLoadFontset context desc language = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- desc' <- unsafeManagedPtrGetPtr desc- language' <- unsafeManagedPtrGetPtr language- result <- pango_context_load_fontset context' desc' language'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapObject Pango.Fontset.Fontset) result'- return result''- touchManagedPtr context- touchManagedPtr desc- touchManagedPtr language- return maybeResult--#if ENABLE_OVERLOADING-data ContextLoadFontsetMethodInfo-instance (signature ~ (Pango.FontDescription.FontDescription -> Pango.Language.Language -> m (Maybe Pango.Fontset.Fontset)), MonadIO m, IsContext a) => O.MethodInfo ContextLoadFontsetMethodInfo a signature where- overloadedMethod _ = contextLoadFontset--#endif---- method Context::set_base_dir--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "direction", argType = TInterface (Name {namespace = "Pango", name = "Direction"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new base direction", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_set_base_dir" pango_context_set_base_dir :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- CUInt -> -- direction : TInterface (Name {namespace = "Pango", name = "Direction"})- IO ()--{- |-Sets the base direction for the context.--The base direction is used in applying the Unicode bidirectional-algorithm; if the /@direction@/ is 'GI.Pango.Enums.DirectionLtr' or-'GI.Pango.Enums.DirectionRtl', then the value will be used as the paragraph-direction in the Unicode bidirectional algorithm. A value of-'GI.Pango.Enums.DirectionWeakLtr' or 'GI.Pango.Enums.DirectionWeakRtl' is used only-for paragraphs that do not contain any strong characters themselves.--}-contextSetBaseDir ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Pango.Enums.Direction- {- ^ /@direction@/: the new base direction -}- -> m ()-contextSetBaseDir context direction = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- let direction' = (fromIntegral . fromEnum) direction- pango_context_set_base_dir context' direction'- touchManagedPtr context- return ()--#if ENABLE_OVERLOADING-data ContextSetBaseDirMethodInfo-instance (signature ~ (Pango.Enums.Direction -> m ()), MonadIO m, IsContext a) => O.MethodInfo ContextSetBaseDirMethodInfo a signature where- overloadedMethod _ = contextSetBaseDir--#endif---- method Context::set_base_gravity--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "gravity", argType = TInterface (Name {namespace = "Pango", name = "Gravity"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new base gravity", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_set_base_gravity" pango_context_set_base_gravity :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- CUInt -> -- gravity : TInterface (Name {namespace = "Pango", name = "Gravity"})- IO ()--{- |-Sets the base gravity for the context.--The base gravity is used in laying vertical text out.--/Since: 1.16/--}-contextSetBaseGravity ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Pango.Enums.Gravity- {- ^ /@gravity@/: the new base gravity -}- -> m ()-contextSetBaseGravity context gravity = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- let gravity' = (fromIntegral . fromEnum) gravity- pango_context_set_base_gravity context' gravity'- touchManagedPtr context- return ()--#if ENABLE_OVERLOADING-data ContextSetBaseGravityMethodInfo-instance (signature ~ (Pango.Enums.Gravity -> m ()), MonadIO m, IsContext a) => O.MethodInfo ContextSetBaseGravityMethodInfo a signature where- overloadedMethod _ = contextSetBaseGravity--#endif---- method Context::set_font_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new pango font description", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_set_font_description" pango_context_set_font_description :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO ()--{- |-Set the default font description for the context--}-contextSetFontDescription ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Pango.FontDescription.FontDescription- {- ^ /@desc@/: the new pango font description -}- -> m ()-contextSetFontDescription context desc = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- desc' <- unsafeManagedPtrGetPtr desc- pango_context_set_font_description context' desc'- touchManagedPtr context- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data ContextSetFontDescriptionMethodInfo-instance (signature ~ (Pango.FontDescription.FontDescription -> m ()), MonadIO m, IsContext a) => O.MethodInfo ContextSetFontDescriptionMethodInfo a signature where- overloadedMethod _ = contextSetFontDescription--#endif---- method Context::set_font_map--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font_map", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #PangoFontMap to set.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_set_font_map" pango_context_set_font_map :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.FontMap.FontMap -> -- font_map : TInterface (Name {namespace = "Pango", name = "FontMap"})- IO ()--{- |-Sets the font map to be searched when fonts are looked-up in this context.-This is only for internal use by Pango backends, a 'GI.Pango.Objects.Context.Context' obtained-via one of the recommended methods should already have a suitable font map.--}-contextSetFontMap ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a, Pango.FontMap.IsFontMap b) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> b- {- ^ /@fontMap@/: the 'GI.Pango.Objects.FontMap.FontMap' to set. -}- -> m ()-contextSetFontMap context fontMap = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- fontMap' <- unsafeManagedPtrCastPtr fontMap- pango_context_set_font_map context' fontMap'- touchManagedPtr context- touchManagedPtr fontMap- return ()--#if ENABLE_OVERLOADING-data ContextSetFontMapMethodInfo-instance (signature ~ (b -> m ()), MonadIO m, IsContext a, Pango.FontMap.IsFontMap b) => O.MethodInfo ContextSetFontMapMethodInfo a signature where- overloadedMethod _ = contextSetFontMap--#endif---- method Context::set_gravity_hint--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hint", argType = TInterface (Name {namespace = "Pango", name = "GravityHint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new gravity hint", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_set_gravity_hint" pango_context_set_gravity_hint :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- CUInt -> -- hint : TInterface (Name {namespace = "Pango", name = "GravityHint"})- IO ()--{- |-Sets the gravity hint for the context.--The gravity hint is used in laying vertical text out, and is only relevant-if gravity of the context as returned by 'GI.Pango.Objects.Context.contextGetGravity'-is set 'GI.Pango.Enums.GravityEast' or 'GI.Pango.Enums.GravityWest'.--/Since: 1.16/--}-contextSetGravityHint ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Pango.Enums.GravityHint- {- ^ /@hint@/: the new gravity hint -}- -> m ()-contextSetGravityHint context hint = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- let hint' = (fromIntegral . fromEnum) hint- pango_context_set_gravity_hint context' hint'- touchManagedPtr context- return ()--#if ENABLE_OVERLOADING-data ContextSetGravityHintMethodInfo-instance (signature ~ (Pango.Enums.GravityHint -> m ()), MonadIO m, IsContext a) => O.MethodInfo ContextSetGravityHintMethodInfo a signature where- overloadedMethod _ = contextSetGravityHint--#endif---- method Context::set_language--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new language tag.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_set_language" pango_context_set_language :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO ()--{- |-Sets the global language tag for the context. The default language-for the locale of the running process can be found using-'GI.Pango.Functions.languageGetDefault'.--}-contextSetLanguage ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Pango.Language.Language- {- ^ /@language@/: the new language tag. -}- -> m ()-contextSetLanguage context language = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- language' <- unsafeManagedPtrGetPtr language- pango_context_set_language context' language'- touchManagedPtr context- touchManagedPtr language- return ()--#if ENABLE_OVERLOADING-data ContextSetLanguageMethodInfo-instance (signature ~ (Pango.Language.Language -> m ()), MonadIO m, IsContext a) => O.MethodInfo ContextSetLanguageMethodInfo a signature where- overloadedMethod _ = contextSetLanguage--#endif---- method Context::set_matrix--- method type : OrdinaryMethod--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, or %NULL to unset any existing\nmatrix. (No matrix set is the same as setting the identity matrix.)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_context_set_matrix" pango_context_set_matrix :: - Ptr Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.Matrix.Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- IO ()--{- |-Sets the transformation matrix that will be applied when rendering-with this context. Note that reported metrics are in the user space-coordinates before the application of the matrix, not device-space-coordinates after the application of the matrix. So, they don\'t scale-with the matrix, though they may change slightly for different-matrices, depending on how the text is fit to the pixel grid.--/Since: 1.6/--}-contextSetMatrix ::- (B.CallStack.HasCallStack, MonadIO m, IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> Maybe (Pango.Matrix.Matrix)- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', or 'Nothing' to unset any existing-matrix. (No matrix set is the same as setting the identity matrix.) -}- -> m ()-contextSetMatrix context matrix = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- maybeMatrix <- case matrix of- Nothing -> return nullPtr- Just jMatrix -> do- jMatrix' <- unsafeManagedPtrGetPtr jMatrix- return jMatrix'- pango_context_set_matrix context' maybeMatrix- touchManagedPtr context- whenJust matrix touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data ContextSetMatrixMethodInfo-instance (signature ~ (Maybe (Pango.Matrix.Matrix) -> m ()), MonadIO m, IsContext a) => O.MethodInfo ContextSetMatrixMethodInfo a signature where- overloadedMethod _ = contextSetMatrix--#endif--
− GI/Pango/Objects/Context.hs-boot
@@ -1,92 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.Context where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Context = Context (ManagedPtr Context)-instance GObject Context where-class (GObject o, O.IsDescendantOf Context o) => IsContext o-instance (GObject o, O.IsDescendantOf Context o) => IsContext o-instance O.HasParentTypes Context-#if ENABLE_OVERLOADING-data ContextChangedMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetBaseDirMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetBaseGravityMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetFontDescriptionMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetFontMapMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetGravityMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetGravityHintMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetLanguageMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetMatrixMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetMetricsMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextGetSerialMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextListFamiliesMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextLoadFontMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextLoadFontsetMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextSetBaseDirMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextSetBaseGravityMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextSetFontDescriptionMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextSetFontMapMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextSetGravityHintMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextSetLanguageMethodInfo-#endif-#if ENABLE_OVERLOADING-data ContextSetMatrixMethodInfo-#endif
− GI/Pango/Objects/Engine.hs
@@ -1,122 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--'GI.Pango.Objects.Engine.Engine' is the base class for all types of language and-script specific engines. It has no functionality by itself.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.Engine- ( ---- * Exported types- Engine(..) ,- IsEngine ,- toEngine ,- noEngine ,--- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object---- | Memory-managed wrapper type.-newtype Engine = Engine (ManagedPtr Engine)-foreign import ccall "pango_engine_get_type"- c_pango_engine_get_type :: IO GType--instance GObject Engine where- gobjectType = c_pango_engine_get_type- ---- | Type class for types which can be safely cast to `Engine`, for instance with `toEngine`.-class (GObject o, O.IsDescendantOf Engine o) => IsEngine o-instance (GObject o, O.IsDescendantOf Engine o) => IsEngine o--instance O.HasParentTypes Engine-type instance O.ParentTypes Engine = '[GObject.Object.Object]---- | Cast to `Engine`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toEngine :: (MonadIO m, IsEngine o) => o -> m Engine-toEngine = liftIO . unsafeCastTo Engine---- | A convenience alias for `Nothing` :: `Maybe` `Engine`.-noEngine :: Maybe Engine-noEngine = Nothing--#if ENABLE_OVERLOADING-type family ResolveEngineMethod (t :: Symbol) (o :: *) :: * where- ResolveEngineMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveEngineMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveEngineMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveEngineMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveEngineMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveEngineMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveEngineMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveEngineMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveEngineMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveEngineMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveEngineMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveEngineMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveEngineMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveEngineMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveEngineMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveEngineMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveEngineMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveEngineMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveEngineMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveEngineMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveEngineMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveEngineMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveEngineMethod t Engine, O.MethodInfo info Engine p) => OL.IsLabel t (Engine -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Engine-type instance O.AttributeList Engine = EngineAttributeList-type EngineAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList Engine = EngineSignalList-type EngineSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif--
− GI/Pango/Objects/Engine.hs-boot
@@ -1,29 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.Engine where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Engine = Engine (ManagedPtr Engine)-instance GObject Engine where-class (GObject o, O.IsDescendantOf Engine o) => IsEngine o-instance (GObject o, O.IsDescendantOf Engine o) => IsEngine o-instance O.HasParentTypes Engine
− GI/Pango/Objects/EngineLang.hs
@@ -1,127 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.EngineLang.EngineLang' class is implemented by engines that-customize the rendering-system independent part of the-Pango pipeline for a particular script or language. For-instance, a custom 'GI.Pango.Objects.EngineLang.EngineLang' could be provided for-Thai to implement the dictionary-based word boundary-lookups needed for that language.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.EngineLang- ( ---- * Exported types- EngineLang(..) ,- IsEngineLang ,- toEngineLang ,- noEngineLang ,--- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Objects.Engine as Pango.Engine---- | Memory-managed wrapper type.-newtype EngineLang = EngineLang (ManagedPtr EngineLang)-foreign import ccall "pango_engine_lang_get_type"- c_pango_engine_lang_get_type :: IO GType--instance GObject EngineLang where- gobjectType = c_pango_engine_lang_get_type- ---- | Type class for types which can be safely cast to `EngineLang`, for instance with `toEngineLang`.-class (GObject o, O.IsDescendantOf EngineLang o) => IsEngineLang o-instance (GObject o, O.IsDescendantOf EngineLang o) => IsEngineLang o--instance O.HasParentTypes EngineLang-type instance O.ParentTypes EngineLang = '[Pango.Engine.Engine, GObject.Object.Object]---- | Cast to `EngineLang`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toEngineLang :: (MonadIO m, IsEngineLang o) => o -> m EngineLang-toEngineLang = liftIO . unsafeCastTo EngineLang---- | A convenience alias for `Nothing` :: `Maybe` `EngineLang`.-noEngineLang :: Maybe EngineLang-noEngineLang = Nothing--#if ENABLE_OVERLOADING-type family ResolveEngineLangMethod (t :: Symbol) (o :: *) :: * where- ResolveEngineLangMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveEngineLangMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveEngineLangMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveEngineLangMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveEngineLangMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveEngineLangMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveEngineLangMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveEngineLangMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveEngineLangMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveEngineLangMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveEngineLangMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveEngineLangMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveEngineLangMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveEngineLangMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveEngineLangMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveEngineLangMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveEngineLangMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveEngineLangMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveEngineLangMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveEngineLangMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveEngineLangMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveEngineLangMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveEngineLangMethod t EngineLang, O.MethodInfo info EngineLang p) => OL.IsLabel t (EngineLang -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList EngineLang-type instance O.AttributeList EngineLang = EngineLangAttributeList-type EngineLangAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList EngineLang = EngineLangSignalList-type EngineLangSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif--
− GI/Pango/Objects/EngineLang.hs-boot
@@ -1,29 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.EngineLang where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype EngineLang = EngineLang (ManagedPtr EngineLang)-instance GObject EngineLang where-class (GObject o, O.IsDescendantOf EngineLang o) => IsEngineLang o-instance (GObject o, O.IsDescendantOf EngineLang o) => IsEngineLang o-instance O.HasParentTypes EngineLang
− GI/Pango/Objects/EngineShape.hs
@@ -1,129 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.EngineShape.EngineShape' class is implemented by engines that-customize the rendering-system dependent part of the-Pango pipeline for a particular script or language.-A 'GI.Pango.Objects.EngineShape.EngineShape' implementation is then specific to both-a particular rendering system or group of rendering systems-and to a particular script. For instance, there is one-'GI.Pango.Objects.EngineShape.EngineShape' implementation to handle shaping Arabic-for Fontconfig-based backends.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.EngineShape- ( ---- * Exported types- EngineShape(..) ,- IsEngineShape ,- toEngineShape ,- noEngineShape ,--- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Objects.Engine as Pango.Engine---- | Memory-managed wrapper type.-newtype EngineShape = EngineShape (ManagedPtr EngineShape)-foreign import ccall "pango_engine_shape_get_type"- c_pango_engine_shape_get_type :: IO GType--instance GObject EngineShape where- gobjectType = c_pango_engine_shape_get_type- ---- | Type class for types which can be safely cast to `EngineShape`, for instance with `toEngineShape`.-class (GObject o, O.IsDescendantOf EngineShape o) => IsEngineShape o-instance (GObject o, O.IsDescendantOf EngineShape o) => IsEngineShape o--instance O.HasParentTypes EngineShape-type instance O.ParentTypes EngineShape = '[Pango.Engine.Engine, GObject.Object.Object]---- | Cast to `EngineShape`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toEngineShape :: (MonadIO m, IsEngineShape o) => o -> m EngineShape-toEngineShape = liftIO . unsafeCastTo EngineShape---- | A convenience alias for `Nothing` :: `Maybe` `EngineShape`.-noEngineShape :: Maybe EngineShape-noEngineShape = Nothing--#if ENABLE_OVERLOADING-type family ResolveEngineShapeMethod (t :: Symbol) (o :: *) :: * where- ResolveEngineShapeMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveEngineShapeMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveEngineShapeMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveEngineShapeMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveEngineShapeMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveEngineShapeMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveEngineShapeMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveEngineShapeMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveEngineShapeMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveEngineShapeMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveEngineShapeMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveEngineShapeMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveEngineShapeMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveEngineShapeMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveEngineShapeMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveEngineShapeMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveEngineShapeMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveEngineShapeMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveEngineShapeMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveEngineShapeMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveEngineShapeMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveEngineShapeMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveEngineShapeMethod t EngineShape, O.MethodInfo info EngineShape p) => OL.IsLabel t (EngineShape -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList EngineShape-type instance O.AttributeList EngineShape = EngineShapeAttributeList-type EngineShapeAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList EngineShape = EngineShapeSignalList-type EngineShapeSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif--
− GI/Pango/Objects/EngineShape.hs-boot
@@ -1,29 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.EngineShape where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype EngineShape = EngineShape (ManagedPtr EngineShape)-instance GObject EngineShape where-class (GObject o, O.IsDescendantOf EngineShape o) => IsEngineShape o-instance (GObject o, O.IsDescendantOf EngineShape o) => IsEngineShape o-instance O.HasParentTypes EngineShape
− GI/Pango/Objects/Font.hs
@@ -1,514 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.Font.Font' structure is used to represent-a font in a rendering-system-independent matter.-To create an implementation of a 'GI.Pango.Objects.Font.Font',-the rendering-system specific code should allocate-a larger structure that contains a nested-'GI.Pango.Objects.Font.Font', fill in the \<structfield>klass\<\/structfield> member of-the nested 'GI.Pango.Objects.Font.Font' with a pointer to-a appropriate 'GI.Pango.Structs.FontClass.FontClass', then call-@/pango_font_init()/@ on the structure.--The 'GI.Pango.Objects.Font.Font' structure contains one member-which the implementation fills in.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.Font- ( ---- * Exported types- Font(..) ,- IsFont ,- toFont ,- noFont ,--- -- * Methods--- ** describe #method:describe#--#if ENABLE_OVERLOADING- FontDescribeMethodInfo ,-#endif- fontDescribe ,----- ** describeWithAbsoluteSize #method:describeWithAbsoluteSize#--#if ENABLE_OVERLOADING- FontDescribeWithAbsoluteSizeMethodInfo ,-#endif- fontDescribeWithAbsoluteSize ,----- ** descriptionsFree #method:descriptionsFree#-- fontDescriptionsFree ,----- ** findShaper #method:findShaper#--#if ENABLE_OVERLOADING- FontFindShaperMethodInfo ,-#endif- fontFindShaper ,----- ** getFontMap #method:getFontMap#--#if ENABLE_OVERLOADING- FontGetFontMapMethodInfo ,-#endif- fontGetFontMap ,----- ** getGlyphExtents #method:getGlyphExtents#--#if ENABLE_OVERLOADING- FontGetGlyphExtentsMethodInfo ,-#endif- fontGetGlyphExtents ,----- ** getMetrics #method:getMetrics#--#if ENABLE_OVERLOADING- FontGetMetricsMethodInfo ,-#endif- fontGetMetrics ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Objects.EngineShape as Pango.EngineShape-import {-# SOURCE #-} qualified GI.Pango.Objects.FontMap as Pango.FontMap-import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription-import {-# SOURCE #-} qualified GI.Pango.Structs.FontMetrics as Pango.FontMetrics-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language-import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle---- | Memory-managed wrapper type.-newtype Font = Font (ManagedPtr Font)-foreign import ccall "pango_font_get_type"- c_pango_font_get_type :: IO GType--instance GObject Font where- gobjectType = c_pango_font_get_type- ---- | Type class for types which can be safely cast to `Font`, for instance with `toFont`.-class (GObject o, O.IsDescendantOf Font o) => IsFont o-instance (GObject o, O.IsDescendantOf Font o) => IsFont o--instance O.HasParentTypes Font-type instance O.ParentTypes Font = '[GObject.Object.Object]---- | Cast to `Font`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toFont :: (MonadIO m, IsFont o) => o -> m Font-toFont = liftIO . unsafeCastTo Font---- | A convenience alias for `Nothing` :: `Maybe` `Font`.-noFont :: Maybe Font-noFont = Nothing--#if ENABLE_OVERLOADING-type family ResolveFontMethod (t :: Symbol) (o :: *) :: * where- ResolveFontMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontMethod "describe" o = FontDescribeMethodInfo- ResolveFontMethod "describeWithAbsoluteSize" o = FontDescribeWithAbsoluteSizeMethodInfo- ResolveFontMethod "findShaper" o = FontFindShaperMethodInfo- ResolveFontMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveFontMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveFontMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveFontMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveFontMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveFontMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveFontMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveFontMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveFontMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveFontMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveFontMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveFontMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveFontMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveFontMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveFontMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveFontMethod "getFontMap" o = FontGetFontMapMethodInfo- ResolveFontMethod "getGlyphExtents" o = FontGetGlyphExtentsMethodInfo- ResolveFontMethod "getMetrics" o = FontGetMetricsMethodInfo- ResolveFontMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveFontMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveFontMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontMethod t Font, O.MethodInfo info Font p) => OL.IsLabel t (Font -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Font-type instance O.AttributeList Font = FontAttributeList-type FontAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList Font = FontSignalList-type FontSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method Font::describe--- method type : OrdinaryMethod--- Args : [Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_describe" pango_font_describe :: - Ptr Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- IO (Ptr Pango.FontDescription.FontDescription)--{- |-Returns a description of the font, with font size set in points.-Use 'GI.Pango.Objects.Font.fontDescribeWithAbsoluteSize' if you want the font-size in device units.--}-fontDescribe ::- (B.CallStack.HasCallStack, MonadIO m, IsFont a) =>- a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> m Pango.FontDescription.FontDescription- {- ^ __Returns:__ a newly-allocated 'GI.Pango.Structs.FontDescription.FontDescription' object. -}-fontDescribe font = liftIO $ do- font' <- unsafeManagedPtrCastPtr font- result <- pango_font_describe font'- checkUnexpectedReturnNULL "fontDescribe" result- result' <- (wrapBoxed Pango.FontDescription.FontDescription) result- touchManagedPtr font- return result'--#if ENABLE_OVERLOADING-data FontDescribeMethodInfo-instance (signature ~ (m Pango.FontDescription.FontDescription), MonadIO m, IsFont a) => O.MethodInfo FontDescribeMethodInfo a signature where- overloadedMethod _ = fontDescribe--#endif---- method Font::describe_with_absolute_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_describe_with_absolute_size" pango_font_describe_with_absolute_size :: - Ptr Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- IO (Ptr Pango.FontDescription.FontDescription)--{- |-Returns a description of the font, with absolute font size set-(in device units). Use 'GI.Pango.Objects.Font.fontDescribe' if you want the font-size in points.--/Since: 1.14/--}-fontDescribeWithAbsoluteSize ::- (B.CallStack.HasCallStack, MonadIO m, IsFont a) =>- a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> m Pango.FontDescription.FontDescription- {- ^ __Returns:__ a newly-allocated 'GI.Pango.Structs.FontDescription.FontDescription' object. -}-fontDescribeWithAbsoluteSize font = liftIO $ do- font' <- unsafeManagedPtrCastPtr font- result <- pango_font_describe_with_absolute_size font'- checkUnexpectedReturnNULL "fontDescribeWithAbsoluteSize" result- result' <- (wrapBoxed Pango.FontDescription.FontDescription) result- touchManagedPtr font- return result'--#if ENABLE_OVERLOADING-data FontDescribeWithAbsoluteSizeMethodInfo-instance (signature ~ (m Pango.FontDescription.FontDescription), MonadIO m, IsFont a) => O.MethodInfo FontDescribeWithAbsoluteSizeMethodInfo a signature where- overloadedMethod _ = fontDescribeWithAbsoluteSize--#endif---- method Font::find_shaper--- method type : OrdinaryMethod--- Args : [Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the language tag", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ch", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Unicode character.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "EngineShape"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_find_shaper" pango_font_find_shaper :: - Ptr Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- Word32 -> -- ch : TBasicType TUInt32- IO (Ptr Pango.EngineShape.EngineShape)--{- |-Finds the best matching shaper for a font for a particular-language tag and character point.--}-fontFindShaper ::- (B.CallStack.HasCallStack, MonadIO m, IsFont a) =>- a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> Pango.Language.Language- {- ^ /@language@/: the language tag -}- -> Word32- {- ^ /@ch@/: a Unicode character. -}- -> m Pango.EngineShape.EngineShape- {- ^ __Returns:__ the best matching shaper. -}-fontFindShaper font language ch = liftIO $ do- font' <- unsafeManagedPtrCastPtr font- language' <- unsafeManagedPtrGetPtr language- result <- pango_font_find_shaper font' language' ch- checkUnexpectedReturnNULL "fontFindShaper" result- result' <- (newObject Pango.EngineShape.EngineShape) result- touchManagedPtr font- touchManagedPtr language- return result'--#if ENABLE_OVERLOADING-data FontFindShaperMethodInfo-instance (signature ~ (Pango.Language.Language -> Word32 -> m Pango.EngineShape.EngineShape), MonadIO m, IsFont a) => O.MethodInfo FontFindShaperMethodInfo a signature where- overloadedMethod _ = fontFindShaper--#endif---- method Font::get_font_map--- method type : OrdinaryMethod--- Args : [Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMap"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_get_font_map" pango_font_get_font_map :: - Ptr Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- IO (Ptr Pango.FontMap.FontMap)--{- |-Gets the font map for which the font was created.--Note that the font maintains a \<firstterm>weak\<\/firstterm> reference-to the font map, so if all references to font map are dropped, the font-map will be finalized even if there are fonts created with the font-map that are still alive. In that case this function will return 'Nothing'.-It is the responsibility of the user to ensure that the font map is kept-alive. In most uses this is not an issue as a 'GI.Pango.Objects.Context.Context' holds-a reference to the font map.--/Since: 1.10/--}-fontGetFontMap ::- (B.CallStack.HasCallStack, MonadIO m, IsFont a) =>- a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font', or 'Nothing' -}- -> m (Maybe Pango.FontMap.FontMap)- {- ^ __Returns:__ the 'GI.Pango.Objects.FontMap.FontMap' for the- font, or 'Nothing' if /@font@/ is 'Nothing'. -}-fontGetFontMap font = liftIO $ do- font' <- unsafeManagedPtrCastPtr font- result <- pango_font_get_font_map font'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newObject Pango.FontMap.FontMap) result'- return result''- touchManagedPtr font- return maybeResult--#if ENABLE_OVERLOADING-data FontGetFontMapMethodInfo-instance (signature ~ (m (Maybe Pango.FontMap.FontMap)), MonadIO m, IsFont a) => O.MethodInfo FontGetFontMapMethodInfo a signature where- overloadedMethod _ = fontGetFontMap--#endif---- method Font::get_glyph_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyph", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the glyph index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the extents of the glyph\n as drawn or %NULL to indicate that the result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the logical extents of\n the glyph or %NULL to indicate that the result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_get_glyph_extents" pango_font_get_glyph_extents :: - Ptr Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Word32 -> -- glyph : TBasicType TUInt32- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Gets the logical and ink extents of a glyph within a font. The-coordinate system for each rectangle has its origin at the-base line and horizontal origin of the character with increasing-coordinates extending to the right and down. The macros @/PANGO_ASCENT()/@,-@/PANGO_DESCENT()/@, @/PANGO_LBEARING()/@, and @/PANGO_RBEARING()/@ can be used to convert-from the extents rectangle to more traditional font metrics. The units-of the rectangles are in 1\/PANGO_SCALE of a device unit.--If /@font@/ is 'Nothing', this function gracefully sets some sane values in the-output variables and returns.--}-fontGetGlyphExtents ::- (B.CallStack.HasCallStack, MonadIO m, IsFont a) =>- a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> Word32- {- ^ /@glyph@/: the glyph index -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-fontGetGlyphExtents font glyph = liftIO $ do- font' <- unsafeManagedPtrCastPtr font- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_font_get_glyph_extents font' glyph inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr font- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data FontGetGlyphExtentsMethodInfo-instance (signature ~ (Word32 -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m, IsFont a) => O.MethodInfo FontGetGlyphExtentsMethodInfo a signature where- overloadedMethod _ = fontGetGlyphExtents--#endif---- method Font::get_metrics--- method type : OrdinaryMethod--- Args : [Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "language tag used to determine which script to get the metrics\n for, or %NULL to indicate to get the metrics for the entire font.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMetrics"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_get_metrics" pango_font_get_metrics :: - Ptr Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO (Ptr Pango.FontMetrics.FontMetrics)--{- |-Gets overall metric information for a font. Since the metrics may be-substantially different for different scripts, a language tag can-be provided to indicate that the metrics should be retrieved that-correspond to the script(s) used by that language.--If /@font@/ is 'Nothing', this function gracefully sets some sane values in the-output variables and returns.--}-fontGetMetrics ::- (B.CallStack.HasCallStack, MonadIO m, IsFont a) =>- a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> Maybe (Pango.Language.Language)- {- ^ /@language@/: language tag used to determine which script to get the metrics- for, or 'Nothing' to indicate to get the metrics for the entire font. -}- -> m Pango.FontMetrics.FontMetrics- {- ^ __Returns:__ a 'GI.Pango.Structs.FontMetrics.FontMetrics' object. The caller must call 'GI.Pango.Structs.FontMetrics.fontMetricsUnref'- when finished using the object. -}-fontGetMetrics font language = liftIO $ do- font' <- unsafeManagedPtrCastPtr font- maybeLanguage <- case language of- Nothing -> return nullPtr- Just jLanguage -> do- jLanguage' <- unsafeManagedPtrGetPtr jLanguage- return jLanguage'- result <- pango_font_get_metrics font' maybeLanguage- checkUnexpectedReturnNULL "fontGetMetrics" result- result' <- (wrapBoxed Pango.FontMetrics.FontMetrics) result- touchManagedPtr font- whenJust language touchManagedPtr- return result'--#if ENABLE_OVERLOADING-data FontGetMetricsMethodInfo-instance (signature ~ (Maybe (Pango.Language.Language) -> m Pango.FontMetrics.FontMetrics), MonadIO m, IsFont a) => O.MethodInfo FontGetMetricsMethodInfo a signature where- overloadedMethod _ = fontGetMetrics--#endif---- method Font::descriptions_free--- method type : MemberFunction--- Args : [Arg {argCName = "descs", argType = TCArray False (-1) 1 (TInterface (Name {namespace = "Pango", name = "FontDescription"})), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a pointer\nto an array of #PangoFontDescription, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "n_descs", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of font descriptions in @descs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : [Arg {argCName = "n_descs", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of font descriptions in @descs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_descriptions_free" pango_font_descriptions_free :: - Ptr (Ptr Pango.FontDescription.FontDescription) -> -- descs : TCArray False (-1) 1 (TInterface (Name {namespace = "Pango", name = "FontDescription"}))- Int32 -> -- n_descs : TBasicType TInt- IO ()--{- |-Frees an array of font descriptions.--}-fontDescriptionsFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- Maybe ([Pango.FontDescription.FontDescription])- {- ^ /@descs@/: a pointer-to an array of 'GI.Pango.Structs.FontDescription.FontDescription', may be 'Nothing' -}- -> m ()-fontDescriptionsFree descs = liftIO $ do- let nDescs = case descs of- Nothing -> 0- Just jDescs -> fromIntegral $ length jDescs- maybeDescs <- case descs of- Nothing -> return nullPtr- Just jDescs -> do- jDescs' <- mapM B.ManagedPtr.disownBoxed jDescs- jDescs'' <- packPtrArray jDescs'- return jDescs''- pango_font_descriptions_free maybeDescs nDescs- whenJust descs (mapM_ touchManagedPtr)- return ()--#if ENABLE_OVERLOADING-#endif--
− GI/Pango/Objects/Font.hs-boot
@@ -1,47 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.Font where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Font = Font (ManagedPtr Font)-instance GObject Font where-class (GObject o, O.IsDescendantOf Font o) => IsFont o-instance (GObject o, O.IsDescendantOf Font o) => IsFont o-instance O.HasParentTypes Font-#if ENABLE_OVERLOADING-data FontDescribeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescribeWithAbsoluteSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontFindShaperMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontGetFontMapMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontGetGlyphExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontGetMetricsMethodInfo-#endif
− GI/Pango/Objects/FontFace.hs
@@ -1,331 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.FontFace.FontFace' structure is used to represent a group of fonts with-the same family, slant, weight, width, but varying sizes.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.FontFace- ( ---- * Exported types- FontFace(..) ,- IsFontFace ,- toFontFace ,- noFontFace ,--- -- * Methods--- ** describe #method:describe#--#if ENABLE_OVERLOADING- FontFaceDescribeMethodInfo ,-#endif- fontFaceDescribe ,----- ** getFaceName #method:getFaceName#--#if ENABLE_OVERLOADING- FontFaceGetFaceNameMethodInfo ,-#endif- fontFaceGetFaceName ,----- ** isSynthesized #method:isSynthesized#--#if ENABLE_OVERLOADING- FontFaceIsSynthesizedMethodInfo ,-#endif- fontFaceIsSynthesized ,----- ** listSizes #method:listSizes#--#if ENABLE_OVERLOADING- FontFaceListSizesMethodInfo ,-#endif- fontFaceListSizes ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription---- | Memory-managed wrapper type.-newtype FontFace = FontFace (ManagedPtr FontFace)-foreign import ccall "pango_font_face_get_type"- c_pango_font_face_get_type :: IO GType--instance GObject FontFace where- gobjectType = c_pango_font_face_get_type- ---- | Type class for types which can be safely cast to `FontFace`, for instance with `toFontFace`.-class (GObject o, O.IsDescendantOf FontFace o) => IsFontFace o-instance (GObject o, O.IsDescendantOf FontFace o) => IsFontFace o--instance O.HasParentTypes FontFace-type instance O.ParentTypes FontFace = '[GObject.Object.Object]---- | Cast to `FontFace`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toFontFace :: (MonadIO m, IsFontFace o) => o -> m FontFace-toFontFace = liftIO . unsafeCastTo FontFace---- | A convenience alias for `Nothing` :: `Maybe` `FontFace`.-noFontFace :: Maybe FontFace-noFontFace = Nothing--#if ENABLE_OVERLOADING-type family ResolveFontFaceMethod (t :: Symbol) (o :: *) :: * where- ResolveFontFaceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontFaceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontFaceMethod "describe" o = FontFaceDescribeMethodInfo- ResolveFontFaceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveFontFaceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveFontFaceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveFontFaceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveFontFaceMethod "isSynthesized" o = FontFaceIsSynthesizedMethodInfo- ResolveFontFaceMethod "listSizes" o = FontFaceListSizesMethodInfo- ResolveFontFaceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveFontFaceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveFontFaceMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveFontFaceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveFontFaceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveFontFaceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveFontFaceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveFontFaceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveFontFaceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveFontFaceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveFontFaceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveFontFaceMethod "getFaceName" o = FontFaceGetFaceNameMethodInfo- ResolveFontFaceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontFaceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontFaceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveFontFaceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveFontFaceMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontFaceMethod t FontFace, O.MethodInfo info FontFace p) => OL.IsLabel t (FontFace -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList FontFace-type instance O.AttributeList FontFace = FontFaceAttributeList-type FontFaceAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList FontFace = FontFaceSignalList-type FontFaceSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method FontFace::describe--- method type : OrdinaryMethod--- Args : [Arg {argCName = "face", argType = TInterface (Name {namespace = "Pango", name = "FontFace"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFace", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_face_describe" pango_font_face_describe :: - Ptr FontFace -> -- face : TInterface (Name {namespace = "Pango", name = "FontFace"})- IO (Ptr Pango.FontDescription.FontDescription)--{- |-Returns the family, style, variant, weight and stretch of-a 'GI.Pango.Objects.FontFace.FontFace'. The size field of the resulting font description-will be unset.--}-fontFaceDescribe ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFace a) =>- a- {- ^ /@face@/: a 'GI.Pango.Objects.FontFace.FontFace' -}- -> m Pango.FontDescription.FontDescription- {- ^ __Returns:__ a newly-created 'GI.Pango.Structs.FontDescription.FontDescription' structure- holding the description of the face. Use 'GI.Pango.Structs.FontDescription.fontDescriptionFree'- to free the result. -}-fontFaceDescribe face = liftIO $ do- face' <- unsafeManagedPtrCastPtr face- result <- pango_font_face_describe face'- checkUnexpectedReturnNULL "fontFaceDescribe" result- result' <- (wrapBoxed Pango.FontDescription.FontDescription) result- touchManagedPtr face- return result'--#if ENABLE_OVERLOADING-data FontFaceDescribeMethodInfo-instance (signature ~ (m Pango.FontDescription.FontDescription), MonadIO m, IsFontFace a) => O.MethodInfo FontFaceDescribeMethodInfo a signature where- overloadedMethod _ = fontFaceDescribe--#endif---- method FontFace::get_face_name--- method type : OrdinaryMethod--- Args : [Arg {argCName = "face", argType = TInterface (Name {namespace = "Pango", name = "FontFace"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFace.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_font_face_get_face_name" pango_font_face_get_face_name :: - Ptr FontFace -> -- face : TInterface (Name {namespace = "Pango", name = "FontFace"})- IO CString--{- |-Gets a name representing the style of this face among the-different faces in the 'GI.Pango.Objects.FontFamily.FontFamily' for the face. This-name is unique among all faces in the family and is suitable-for displaying to users.--}-fontFaceGetFaceName ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFace a) =>- a- {- ^ /@face@/: a 'GI.Pango.Objects.FontFace.FontFace'. -}- -> m T.Text- {- ^ __Returns:__ the face name for the face. This string is- owned by the face object and must not be modified or freed. -}-fontFaceGetFaceName face = liftIO $ do- face' <- unsafeManagedPtrCastPtr face- result <- pango_font_face_get_face_name face'- checkUnexpectedReturnNULL "fontFaceGetFaceName" result- result' <- cstringToText result- touchManagedPtr face- return result'--#if ENABLE_OVERLOADING-data FontFaceGetFaceNameMethodInfo-instance (signature ~ (m T.Text), MonadIO m, IsFontFace a) => O.MethodInfo FontFaceGetFaceNameMethodInfo a signature where- overloadedMethod _ = fontFaceGetFaceName--#endif---- method FontFace::is_synthesized--- method type : OrdinaryMethod--- Args : [Arg {argCName = "face", argType = TInterface (Name {namespace = "Pango", name = "FontFace"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFace", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_font_face_is_synthesized" pango_font_face_is_synthesized :: - Ptr FontFace -> -- face : TInterface (Name {namespace = "Pango", name = "FontFace"})- IO CInt--{- |-Returns whether a 'GI.Pango.Objects.FontFace.FontFace' is synthesized by the underlying-font rendering engine from another face, perhaps by shearing, emboldening,-or lightening it.--/Since: 1.18/--}-fontFaceIsSynthesized ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFace a) =>- a- {- ^ /@face@/: a 'GI.Pango.Objects.FontFace.FontFace' -}- -> m Bool- {- ^ __Returns:__ whether /@face@/ is synthesized. -}-fontFaceIsSynthesized face = liftIO $ do- face' <- unsafeManagedPtrCastPtr face- result <- pango_font_face_is_synthesized face'- let result' = (/= 0) result- touchManagedPtr face- return result'--#if ENABLE_OVERLOADING-data FontFaceIsSynthesizedMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsFontFace a) => O.MethodInfo FontFaceIsSynthesizedMethodInfo a signature where- overloadedMethod _ = fontFaceIsSynthesized--#endif---- method FontFace::list_sizes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "face", argType = TInterface (Name {namespace = "Pango", name = "FontFace"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFace.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sizes", argType = TCArray False (-1) 2 (TBasicType TInt), direction = DirectionOut, mayBeNull = True, argDoc = Documentation {rawDocText = Just "\n location to store a pointer to an array of int. This array\n should be freed with g_free().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "n_sizes", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of elements in @sizes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_sizes", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of elements in @sizes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_face_list_sizes" pango_font_face_list_sizes :: - Ptr FontFace -> -- face : TInterface (Name {namespace = "Pango", name = "FontFace"})- Ptr (Ptr Int32) -> -- sizes : TCArray False (-1) 2 (TBasicType TInt)- Ptr Int32 -> -- n_sizes : TBasicType TInt- IO ()--{- |-List the available sizes for a font. This is only applicable to bitmap-fonts. For scalable fonts, stores 'Nothing' at the location pointed to by-/@sizes@/ and 0 at the location pointed to by /@nSizes@/. The sizes returned-are in Pango units and are sorted in ascending order.--/Since: 1.4/--}-fontFaceListSizes ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFace a) =>- a- {- ^ /@face@/: a 'GI.Pango.Objects.FontFace.FontFace'. -}- -> m ((Maybe [Int32]))-fontFaceListSizes face = liftIO $ do- face' <- unsafeManagedPtrCastPtr face- sizes <- allocMem :: IO (Ptr (Ptr Int32))- nSizes <- allocMem :: IO (Ptr Int32)- pango_font_face_list_sizes face' sizes nSizes- nSizes' <- peek nSizes- sizes' <- peek sizes- maybeSizes' <- convertIfNonNull sizes' $ \sizes'' -> do- sizes''' <- (unpackStorableArrayWithLength nSizes') sizes''- freeMem sizes''- return sizes'''- touchManagedPtr face- freeMem sizes- freeMem nSizes- return maybeSizes'--#if ENABLE_OVERLOADING-data FontFaceListSizesMethodInfo-instance (signature ~ (m ((Maybe [Int32]))), MonadIO m, IsFontFace a) => O.MethodInfo FontFaceListSizesMethodInfo a signature where- overloadedMethod _ = fontFaceListSizes--#endif--
− GI/Pango/Objects/FontFace.hs-boot
@@ -1,41 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.FontFace where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype FontFace = FontFace (ManagedPtr FontFace)-instance GObject FontFace where-class (GObject o, O.IsDescendantOf FontFace o) => IsFontFace o-instance (GObject o, O.IsDescendantOf FontFace o) => IsFontFace o-instance O.HasParentTypes FontFace-#if ENABLE_OVERLOADING-data FontFaceDescribeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontFaceGetFaceNameMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontFaceIsSynthesizedMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontFaceListSizesMethodInfo-#endif
− GI/Pango/Objects/FontFamily.hs
@@ -1,334 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.FontFamily.FontFamily' structure is used to represent a family of related-font faces. The faces in a family share a common design, but differ in-slant, weight, width and other aspects.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.FontFamily- ( ---- * Exported types- FontFamily(..) ,- IsFontFamily ,- toFontFamily ,- noFontFamily ,--- -- * Methods--- ** getName #method:getName#--#if ENABLE_OVERLOADING- FontFamilyGetNameMethodInfo ,-#endif- fontFamilyGetName ,----- ** isMonospace #method:isMonospace#--#if ENABLE_OVERLOADING- FontFamilyIsMonospaceMethodInfo ,-#endif- fontFamilyIsMonospace ,----- ** isVariable #method:isVariable#--#if ENABLE_OVERLOADING- FontFamilyIsVariableMethodInfo ,-#endif- fontFamilyIsVariable ,----- ** listFaces #method:listFaces#--#if ENABLE_OVERLOADING- FontFamilyListFacesMethodInfo ,-#endif- fontFamilyListFaces ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Objects.FontFace as Pango.FontFace---- | Memory-managed wrapper type.-newtype FontFamily = FontFamily (ManagedPtr FontFamily)-foreign import ccall "pango_font_family_get_type"- c_pango_font_family_get_type :: IO GType--instance GObject FontFamily where- gobjectType = c_pango_font_family_get_type- ---- | Type class for types which can be safely cast to `FontFamily`, for instance with `toFontFamily`.-class (GObject o, O.IsDescendantOf FontFamily o) => IsFontFamily o-instance (GObject o, O.IsDescendantOf FontFamily o) => IsFontFamily o--instance O.HasParentTypes FontFamily-type instance O.ParentTypes FontFamily = '[GObject.Object.Object]---- | Cast to `FontFamily`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toFontFamily :: (MonadIO m, IsFontFamily o) => o -> m FontFamily-toFontFamily = liftIO . unsafeCastTo FontFamily---- | A convenience alias for `Nothing` :: `Maybe` `FontFamily`.-noFontFamily :: Maybe FontFamily-noFontFamily = Nothing--#if ENABLE_OVERLOADING-type family ResolveFontFamilyMethod (t :: Symbol) (o :: *) :: * where- ResolveFontFamilyMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontFamilyMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontFamilyMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveFontFamilyMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveFontFamilyMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveFontFamilyMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveFontFamilyMethod "isMonospace" o = FontFamilyIsMonospaceMethodInfo- ResolveFontFamilyMethod "isVariable" o = FontFamilyIsVariableMethodInfo- ResolveFontFamilyMethod "listFaces" o = FontFamilyListFacesMethodInfo- ResolveFontFamilyMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveFontFamilyMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveFontFamilyMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveFontFamilyMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveFontFamilyMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveFontFamilyMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveFontFamilyMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveFontFamilyMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveFontFamilyMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveFontFamilyMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveFontFamilyMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveFontFamilyMethod "getName" o = FontFamilyGetNameMethodInfo- ResolveFontFamilyMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontFamilyMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontFamilyMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveFontFamilyMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveFontFamilyMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontFamilyMethod t FontFamily, O.MethodInfo info FontFamily p) => OL.IsLabel t (FontFamily -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList FontFamily-type instance O.AttributeList FontFamily = FontFamilyAttributeList-type FontFamilyAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList FontFamily = FontFamilySignalList-type FontFamilySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method FontFamily::get_name--- method type : OrdinaryMethod--- Args : [Arg {argCName = "family", argType = TInterface (Name {namespace = "Pango", name = "FontFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFamily", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_font_family_get_name" pango_font_family_get_name :: - Ptr FontFamily -> -- family : TInterface (Name {namespace = "Pango", name = "FontFamily"})- IO CString--{- |-Gets the name of the family. The name is unique among all-fonts for the font backend and can be used in a 'GI.Pango.Structs.FontDescription.FontDescription'-to specify that a face from this family is desired.--}-fontFamilyGetName ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFamily a) =>- a- {- ^ /@family@/: a 'GI.Pango.Objects.FontFamily.FontFamily' -}- -> m T.Text- {- ^ __Returns:__ the name of the family. This string is owned- by the family object and must not be modified or freed. -}-fontFamilyGetName family = liftIO $ do- family' <- unsafeManagedPtrCastPtr family- result <- pango_font_family_get_name family'- checkUnexpectedReturnNULL "fontFamilyGetName" result- result' <- cstringToText result- touchManagedPtr family- return result'--#if ENABLE_OVERLOADING-data FontFamilyGetNameMethodInfo-instance (signature ~ (m T.Text), MonadIO m, IsFontFamily a) => O.MethodInfo FontFamilyGetNameMethodInfo a signature where- overloadedMethod _ = fontFamilyGetName--#endif---- method FontFamily::is_monospace--- method type : OrdinaryMethod--- Args : [Arg {argCName = "family", argType = TInterface (Name {namespace = "Pango", name = "FontFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFamily", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_font_family_is_monospace" pango_font_family_is_monospace :: - Ptr FontFamily -> -- family : TInterface (Name {namespace = "Pango", name = "FontFamily"})- IO CInt--{- |-A monospace font is a font designed for text display where the the-characters form a regular grid. For Western languages this would-mean that the advance width of all characters are the same, but-this categorization also includes Asian fonts which include-double-width characters: characters that occupy two grid cells.-'GI.GLib.Functions.unicharIswide' returns a result that indicates whether a-character is typically double-width in a monospace font.--The best way to find out the grid-cell size is to call-'GI.Pango.Structs.FontMetrics.fontMetricsGetApproximateDigitWidth', since the results-of 'GI.Pango.Structs.FontMetrics.fontMetricsGetApproximateCharWidth' may be affected-by double-width characters.--/Since: 1.4/--}-fontFamilyIsMonospace ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFamily a) =>- a- {- ^ /@family@/: a 'GI.Pango.Objects.FontFamily.FontFamily' -}- -> m Bool- {- ^ __Returns:__ 'True' if the family is monospace. -}-fontFamilyIsMonospace family = liftIO $ do- family' <- unsafeManagedPtrCastPtr family- result <- pango_font_family_is_monospace family'- let result' = (/= 0) result- touchManagedPtr family- return result'--#if ENABLE_OVERLOADING-data FontFamilyIsMonospaceMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsFontFamily a) => O.MethodInfo FontFamilyIsMonospaceMethodInfo a signature where- overloadedMethod _ = fontFamilyIsMonospace--#endif---- method FontFamily::is_variable--- method type : OrdinaryMethod--- Args : [Arg {argCName = "family", argType = TInterface (Name {namespace = "Pango", name = "FontFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFamily", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_font_family_is_variable" pango_font_family_is_variable :: - Ptr FontFamily -> -- family : TInterface (Name {namespace = "Pango", name = "FontFamily"})- IO CInt--{- |-A variable font is a font which has axes that can be modified to-produce different faces.--/Since: 1.44/--}-fontFamilyIsVariable ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFamily a) =>- a- {- ^ /@family@/: a 'GI.Pango.Objects.FontFamily.FontFamily' -}- -> m Bool- {- ^ __Returns:__ 'True' if the family is variable -}-fontFamilyIsVariable family = liftIO $ do- family' <- unsafeManagedPtrCastPtr family- result <- pango_font_family_is_variable family'- let result' = (/= 0) result- touchManagedPtr family- return result'--#if ENABLE_OVERLOADING-data FontFamilyIsVariableMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsFontFamily a) => O.MethodInfo FontFamilyIsVariableMethodInfo a signature where- overloadedMethod _ = fontFamilyIsVariable--#endif---- method FontFamily::list_faces--- method type : OrdinaryMethod--- Args : [Arg {argCName = "family", argType = TInterface (Name {namespace = "Pango", name = "FontFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFamily", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "faces", argType = TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "FontFace"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to store an array of pointers to #PangoFontFace objects,\n or %NULL. This array should be freed with g_free() when it is no\n longer needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferContainer},Arg {argCName = "n_faces", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store number of elements in @faces.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_faces", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store number of elements in @faces.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_family_list_faces" pango_font_family_list_faces :: - Ptr FontFamily -> -- family : TInterface (Name {namespace = "Pango", name = "FontFamily"})- Ptr (Ptr (Ptr Pango.FontFace.FontFace)) -> -- faces : TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "FontFace"}))- Ptr Int32 -> -- n_faces : TBasicType TInt- IO ()--{- |-Lists the different font faces that make up /@family@/. The faces-in a family share a common design, but differ in slant, weight,-width and other aspects.--}-fontFamilyListFaces ::- (B.CallStack.HasCallStack, MonadIO m, IsFontFamily a) =>- a- {- ^ /@family@/: a 'GI.Pango.Objects.FontFamily.FontFamily' -}- -> m ([Pango.FontFace.FontFace])-fontFamilyListFaces family = liftIO $ do- family' <- unsafeManagedPtrCastPtr family- faces <- allocMem :: IO (Ptr (Ptr (Ptr Pango.FontFace.FontFace)))- nFaces <- allocMem :: IO (Ptr Int32)- pango_font_family_list_faces family' faces nFaces- nFaces' <- peek nFaces- faces' <- peek faces- faces'' <- (unpackPtrArrayWithLength nFaces') faces'- faces''' <- mapM (newObject Pango.FontFace.FontFace) faces''- freeMem faces'- touchManagedPtr family- freeMem faces- freeMem nFaces- return faces'''--#if ENABLE_OVERLOADING-data FontFamilyListFacesMethodInfo-instance (signature ~ (m ([Pango.FontFace.FontFace])), MonadIO m, IsFontFamily a) => O.MethodInfo FontFamilyListFacesMethodInfo a signature where- overloadedMethod _ = fontFamilyListFaces--#endif--
− GI/Pango/Objects/FontFamily.hs-boot
@@ -1,41 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.FontFamily where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype FontFamily = FontFamily (ManagedPtr FontFamily)-instance GObject FontFamily where-class (GObject o, O.IsDescendantOf FontFamily o) => IsFontFamily o-instance (GObject o, O.IsDescendantOf FontFamily o) => IsFontFamily o-instance O.HasParentTypes FontFamily-#if ENABLE_OVERLOADING-data FontFamilyGetNameMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontFamilyIsMonospaceMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontFamilyIsVariableMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontFamilyListFacesMethodInfo-#endif
− GI/Pango/Objects/FontMap.hs
@@ -1,525 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.FontMap.FontMap' represents the set of fonts available for a-particular rendering system. This is a virtual object with-implementations being specific to particular rendering systems. To-create an implementation of a 'GI.Pango.Objects.FontMap.FontMap', the rendering-system-specific code should allocate a larger structure that contains a nested-'GI.Pango.Objects.FontMap.FontMap', fill in the \<structfield>klass\<\/structfield> member of the nested 'GI.Pango.Objects.FontMap.FontMap' with a-pointer to a appropriate 'GI.Pango.Structs.FontMapClass.FontMapClass', then call-@/pango_font_map_init()/@ on the structure.--The 'GI.Pango.Objects.FontMap.FontMap' structure contains one member which the implementation-fills in.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.FontMap- ( ---- * Exported types- FontMap(..) ,- IsFontMap ,- toFontMap ,- noFontMap ,--- -- * Methods--- ** changed #method:changed#--#if ENABLE_OVERLOADING- FontMapChangedMethodInfo ,-#endif- fontMapChanged ,----- ** createContext #method:createContext#--#if ENABLE_OVERLOADING- FontMapCreateContextMethodInfo ,-#endif- fontMapCreateContext ,----- ** getSerial #method:getSerial#--#if ENABLE_OVERLOADING- FontMapGetSerialMethodInfo ,-#endif- fontMapGetSerial ,----- ** getShapeEngineType #method:getShapeEngineType#--#if ENABLE_OVERLOADING- FontMapGetShapeEngineTypeMethodInfo ,-#endif- fontMapGetShapeEngineType ,----- ** listFamilies #method:listFamilies#--#if ENABLE_OVERLOADING- FontMapListFamiliesMethodInfo ,-#endif- fontMapListFamilies ,----- ** loadFont #method:loadFont#--#if ENABLE_OVERLOADING- FontMapLoadFontMethodInfo ,-#endif- fontMapLoadFont ,----- ** loadFontset #method:loadFontset#--#if ENABLE_OVERLOADING- FontMapLoadFontsetMethodInfo ,-#endif- fontMapLoadFontset ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Objects.Context as Pango.Context-import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Objects.FontFamily as Pango.FontFamily-import {-# SOURCE #-} qualified GI.Pango.Objects.Fontset as Pango.Fontset-import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language---- | Memory-managed wrapper type.-newtype FontMap = FontMap (ManagedPtr FontMap)-foreign import ccall "pango_font_map_get_type"- c_pango_font_map_get_type :: IO GType--instance GObject FontMap where- gobjectType = c_pango_font_map_get_type- ---- | Type class for types which can be safely cast to `FontMap`, for instance with `toFontMap`.-class (GObject o, O.IsDescendantOf FontMap o) => IsFontMap o-instance (GObject o, O.IsDescendantOf FontMap o) => IsFontMap o--instance O.HasParentTypes FontMap-type instance O.ParentTypes FontMap = '[GObject.Object.Object]---- | Cast to `FontMap`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toFontMap :: (MonadIO m, IsFontMap o) => o -> m FontMap-toFontMap = liftIO . unsafeCastTo FontMap---- | A convenience alias for `Nothing` :: `Maybe` `FontMap`.-noFontMap :: Maybe FontMap-noFontMap = Nothing--#if ENABLE_OVERLOADING-type family ResolveFontMapMethod (t :: Symbol) (o :: *) :: * where- ResolveFontMapMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontMapMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontMapMethod "changed" o = FontMapChangedMethodInfo- ResolveFontMapMethod "createContext" o = FontMapCreateContextMethodInfo- ResolveFontMapMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveFontMapMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveFontMapMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveFontMapMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveFontMapMethod "listFamilies" o = FontMapListFamiliesMethodInfo- ResolveFontMapMethod "loadFont" o = FontMapLoadFontMethodInfo- ResolveFontMapMethod "loadFontset" o = FontMapLoadFontsetMethodInfo- ResolveFontMapMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveFontMapMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveFontMapMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveFontMapMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveFontMapMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveFontMapMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveFontMapMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveFontMapMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveFontMapMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveFontMapMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveFontMapMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveFontMapMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontMapMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontMapMethod "getSerial" o = FontMapGetSerialMethodInfo- ResolveFontMapMethod "getShapeEngineType" o = FontMapGetShapeEngineTypeMethodInfo- ResolveFontMapMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveFontMapMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveFontMapMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontMapMethod t FontMap, O.MethodInfo info FontMap p) => OL.IsLabel t (FontMap -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList FontMap-type instance O.AttributeList FontMap = FontMapAttributeList-type FontMapAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList FontMap = FontMapSignalList-type FontMapSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method FontMap::changed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_map_changed" pango_font_map_changed :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "Pango", name = "FontMap"})- IO ()--{- |-Forces a change in the context, which will cause any 'GI.Pango.Objects.Context.Context'-using this fontmap to change.--This function is only useful when implementing a new backend-for Pango, something applications won\'t do. Backends should-call this function if they have attached extra data to the context-and such data is changed.--/Since: 1.34/--}-fontMapChanged ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.Pango.Objects.FontMap.FontMap' -}- -> m ()-fontMapChanged fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- pango_font_map_changed fontmap'- touchManagedPtr fontmap- return ()--#if ENABLE_OVERLOADING-data FontMapChangedMethodInfo-instance (signature ~ (m ()), MonadIO m, IsFontMap a) => O.MethodInfo FontMapChangedMethodInfo a signature where- overloadedMethod _ = fontMapChanged--#endif---- method FontMap::create_context--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Context"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_map_create_context" pango_font_map_create_context :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "Pango", name = "FontMap"})- IO (Ptr Pango.Context.Context)--{- |-Creates a 'GI.Pango.Objects.Context.Context' connected to /@fontmap@/. This is equivalent-to 'GI.Pango.Objects.Context.contextNew' followed by 'GI.Pango.Objects.Context.contextSetFontMap'.--If you are using Pango as part of a higher-level system,-that system may have it\'s own way of create a 'GI.Pango.Objects.Context.Context'.-For instance, the GTK+ toolkit has, among others,-@/gdk_pango_context_get_for_screen()/@, and-@/gtk_widget_get_pango_context()/@. Use those instead.--/Since: 1.22/--}-fontMapCreateContext ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.Pango.Objects.FontMap.FontMap' -}- -> m Pango.Context.Context- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.Context.Context',- which should be freed with 'GI.GObject.Objects.Object.objectUnref'. -}-fontMapCreateContext fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- result <- pango_font_map_create_context fontmap'- checkUnexpectedReturnNULL "fontMapCreateContext" result- result' <- (wrapObject Pango.Context.Context) result- touchManagedPtr fontmap- return result'--#if ENABLE_OVERLOADING-data FontMapCreateContextMethodInfo-instance (signature ~ (m Pango.Context.Context), MonadIO m, IsFontMap a) => O.MethodInfo FontMapCreateContextMethodInfo a signature where- overloadedMethod _ = fontMapCreateContext--#endif---- method FontMap::get_serial--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_map_get_serial" pango_font_map_get_serial :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "Pango", name = "FontMap"})- IO Word32--{- |-Returns the current serial number of /@fontmap@/. The serial number is-initialized to an small number larger than zero when a new fontmap-is created and is increased whenever the fontmap is changed. It may-wrap, but will never have the value 0. Since it can wrap, never compare-it with \"less than\", always use \"not equals\".--The fontmap can only be changed using backend-specific API, like changing-fontmap resolution.--This can be used to automatically detect changes to a 'GI.Pango.Objects.FontMap.FontMap', like-in 'GI.Pango.Objects.Context.Context'.--/Since: 1.32.4/--}-fontMapGetSerial ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.Pango.Objects.FontMap.FontMap' -}- -> m Word32- {- ^ __Returns:__ The current serial number of /@fontmap@/. -}-fontMapGetSerial fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- result <- pango_font_map_get_serial fontmap'- touchManagedPtr fontmap- return result--#if ENABLE_OVERLOADING-data FontMapGetSerialMethodInfo-instance (signature ~ (m Word32), MonadIO m, IsFontMap a) => O.MethodInfo FontMapGetSerialMethodInfo a signature where- overloadedMethod _ = fontMapGetSerial--#endif---- method FontMap::get_shape_engine_type--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_font_map_get_shape_engine_type" pango_font_map_get_shape_engine_type :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "Pango", name = "FontMap"})- IO CString--{-# DEPRECATED fontMapGetShapeEngineType ["(Since version 1.38)"] #-}-{- |-Returns the render ID for shape engines for this fontmap.-See the \<structfield>render_type\<\/structfield> field of-'GI.Pango.Structs.EngineInfo.EngineInfo'.--/Since: 1.4/--}-fontMapGetShapeEngineType ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.Pango.Objects.FontMap.FontMap' -}- -> m T.Text- {- ^ __Returns:__ the ID string for shape engines for- this fontmap. Owned by Pango, should not be modified- or freed. -}-fontMapGetShapeEngineType fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- result <- pango_font_map_get_shape_engine_type fontmap'- checkUnexpectedReturnNULL "fontMapGetShapeEngineType" result- result' <- cstringToText result- touchManagedPtr fontmap- return result'--#if ENABLE_OVERLOADING-data FontMapGetShapeEngineTypeMethodInfo-instance (signature ~ (m T.Text), MonadIO m, IsFontMap a) => O.MethodInfo FontMapGetShapeEngineTypeMethodInfo a signature where- overloadedMethod _ = fontMapGetShapeEngineType--#endif---- method FontMap::list_families--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "families", argType = TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "FontFamily"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store a pointer to an array of #PangoFontFamily *.\n This array should be freed with g_free().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferContainer},Arg {argCName = "n_families", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of elements in @families", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_families", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of elements in @families", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_map_list_families" pango_font_map_list_families :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "Pango", name = "FontMap"})- Ptr (Ptr (Ptr Pango.FontFamily.FontFamily)) -> -- families : TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "FontFamily"}))- Ptr Int32 -> -- n_families : TBasicType TInt- IO ()--{- |-List all families for a fontmap.--}-fontMapListFamilies ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.Pango.Objects.FontMap.FontMap' -}- -> m ([Pango.FontFamily.FontFamily])-fontMapListFamilies fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- families <- allocMem :: IO (Ptr (Ptr (Ptr Pango.FontFamily.FontFamily)))- nFamilies <- allocMem :: IO (Ptr Int32)- pango_font_map_list_families fontmap' families nFamilies- nFamilies' <- peek nFamilies- families' <- peek families- families'' <- (unpackPtrArrayWithLength nFamilies') families'- families''' <- mapM (newObject Pango.FontFamily.FontFamily) families''- freeMem families'- touchManagedPtr fontmap- freeMem families- freeMem nFamilies- return families'''--#if ENABLE_OVERLOADING-data FontMapListFamiliesMethodInfo-instance (signature ~ (m ([Pango.FontFamily.FontFamily])), MonadIO m, IsFontMap a) => O.MethodInfo FontMapListFamiliesMethodInfo a signature where- overloadedMethod _ = fontMapListFamilies--#endif---- method FontMap::load_font--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #PangoContext the font will be used with", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription describing the font to load", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Font"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_map_load_font" pango_font_map_load_font :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "Pango", name = "FontMap"})- Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO (Ptr Pango.Font.Font)--{- |-Load the font in the fontmap that is the closest match for /@desc@/.--}-fontMapLoadFont ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a, Pango.Context.IsContext b) =>- a- {- ^ /@fontmap@/: a 'GI.Pango.Objects.FontMap.FontMap' -}- -> b- {- ^ /@context@/: the 'GI.Pango.Objects.Context.Context' the font will be used with -}- -> Pango.FontDescription.FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' describing the font to load -}- -> m (Maybe Pango.Font.Font)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.Font.Font'- loaded, or 'Nothing' if no font matched. -}-fontMapLoadFont fontmap context desc = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- context' <- unsafeManagedPtrCastPtr context- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_map_load_font fontmap' context' desc'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapObject Pango.Font.Font) result'- return result''- touchManagedPtr fontmap- touchManagedPtr context- touchManagedPtr desc- return maybeResult--#if ENABLE_OVERLOADING-data FontMapLoadFontMethodInfo-instance (signature ~ (b -> Pango.FontDescription.FontDescription -> m (Maybe Pango.Font.Font)), MonadIO m, IsFontMap a, Pango.Context.IsContext b) => O.MethodInfo FontMapLoadFontMethodInfo a signature where- overloadedMethod _ = fontMapLoadFont--#endif---- method FontMap::load_fontset--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "Pango", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #PangoContext the font will be used with", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription describing the font to load", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLanguage the fonts will be used for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Fontset"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_map_load_fontset" pango_font_map_load_fontset :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "Pango", name = "FontMap"})- Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO (Ptr Pango.Fontset.Fontset)--{- |-Load a set of fonts in the fontmap that can be used to render-a font matching /@desc@/.--}-fontMapLoadFontset ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a, Pango.Context.IsContext b) =>- a- {- ^ /@fontmap@/: a 'GI.Pango.Objects.FontMap.FontMap' -}- -> b- {- ^ /@context@/: the 'GI.Pango.Objects.Context.Context' the font will be used with -}- -> Pango.FontDescription.FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' describing the font to load -}- -> Pango.Language.Language- {- ^ /@language@/: a 'GI.Pango.Structs.Language.Language' the fonts will be used for -}- -> m (Maybe Pango.Fontset.Fontset)- {- ^ __Returns:__ the newly allocated- 'GI.Pango.Objects.Fontset.Fontset' loaded, or 'Nothing' if no font matched. -}-fontMapLoadFontset fontmap context desc language = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- context' <- unsafeManagedPtrCastPtr context- desc' <- unsafeManagedPtrGetPtr desc- language' <- unsafeManagedPtrGetPtr language- result <- pango_font_map_load_fontset fontmap' context' desc' language'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapObject Pango.Fontset.Fontset) result'- return result''- touchManagedPtr fontmap- touchManagedPtr context- touchManagedPtr desc- touchManagedPtr language- return maybeResult--#if ENABLE_OVERLOADING-data FontMapLoadFontsetMethodInfo-instance (signature ~ (b -> Pango.FontDescription.FontDescription -> Pango.Language.Language -> m (Maybe Pango.Fontset.Fontset)), MonadIO m, IsFontMap a, Pango.Context.IsContext b) => O.MethodInfo FontMapLoadFontsetMethodInfo a signature where- overloadedMethod _ = fontMapLoadFontset--#endif--
− GI/Pango/Objects/FontMap.hs-boot
@@ -1,50 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.FontMap where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype FontMap = FontMap (ManagedPtr FontMap)-instance GObject FontMap where-class (GObject o, O.IsDescendantOf FontMap o) => IsFontMap o-instance (GObject o, O.IsDescendantOf FontMap o) => IsFontMap o-instance O.HasParentTypes FontMap-#if ENABLE_OVERLOADING-data FontMapChangedMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapCreateContextMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapGetSerialMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapGetShapeEngineTypeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapListFamiliesMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapLoadFontMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapLoadFontsetMethodInfo-#endif
− GI/Pango/Objects/Fontset.hs
@@ -1,280 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A 'GI.Pango.Objects.Fontset.Fontset' represents a set of 'GI.Pango.Objects.Font.Font' to use-when rendering text. It is the result of resolving a-'GI.Pango.Structs.FontDescription.FontDescription' against a particular 'GI.Pango.Objects.Context.Context'.-It has operations for finding the component font for-a particular Unicode character, and for finding a composite-set of metrics for the entire fontset.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.Fontset- ( ---- * Exported types- Fontset(..) ,- IsFontset ,- toFontset ,- noFontset ,--- -- * Methods--- ** foreach #method:foreach#--#if ENABLE_OVERLOADING- FontsetForeachMethodInfo ,-#endif- fontsetForeach ,----- ** getFont #method:getFont#--#if ENABLE_OVERLOADING- FontsetGetFontMethodInfo ,-#endif- fontsetGetFont ,----- ** getMetrics #method:getMetrics#--#if ENABLE_OVERLOADING- FontsetGetMetricsMethodInfo ,-#endif- fontsetGetMetrics ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import qualified GI.Pango.Callbacks as Pango.Callbacks-import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Structs.FontMetrics as Pango.FontMetrics---- | Memory-managed wrapper type.-newtype Fontset = Fontset (ManagedPtr Fontset)-foreign import ccall "pango_fontset_get_type"- c_pango_fontset_get_type :: IO GType--instance GObject Fontset where- gobjectType = c_pango_fontset_get_type- ---- | Type class for types which can be safely cast to `Fontset`, for instance with `toFontset`.-class (GObject o, O.IsDescendantOf Fontset o) => IsFontset o-instance (GObject o, O.IsDescendantOf Fontset o) => IsFontset o--instance O.HasParentTypes Fontset-type instance O.ParentTypes Fontset = '[GObject.Object.Object]---- | Cast to `Fontset`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toFontset :: (MonadIO m, IsFontset o) => o -> m Fontset-toFontset = liftIO . unsafeCastTo Fontset---- | A convenience alias for `Nothing` :: `Maybe` `Fontset`.-noFontset :: Maybe Fontset-noFontset = Nothing--#if ENABLE_OVERLOADING-type family ResolveFontsetMethod (t :: Symbol) (o :: *) :: * where- ResolveFontsetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontsetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontsetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveFontsetMethod "foreach" o = FontsetForeachMethodInfo- ResolveFontsetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveFontsetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveFontsetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveFontsetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveFontsetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveFontsetMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveFontsetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveFontsetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveFontsetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveFontsetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveFontsetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveFontsetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveFontsetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveFontsetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveFontsetMethod "getFont" o = FontsetGetFontMethodInfo- ResolveFontsetMethod "getMetrics" o = FontsetGetMetricsMethodInfo- ResolveFontsetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontsetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontsetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveFontsetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveFontsetMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontsetMethod t Fontset, O.MethodInfo info Fontset p) => OL.IsLabel t (Fontset -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Fontset-type instance O.AttributeList Fontset = FontsetAttributeList-type FontsetAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList Fontset = FontsetSignalList-type FontsetSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method Fontset::foreach--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontset", argType = TInterface (Name {namespace = "Pango", name = "Fontset"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TInterface (Name {namespace = "Pango", name = "FontsetForeachFunc"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Callback function", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_fontset_foreach" pango_fontset_foreach :: - Ptr Fontset -> -- fontset : TInterface (Name {namespace = "Pango", name = "Fontset"})- FunPtr Pango.Callbacks.C_FontsetForeachFunc -> -- func : TInterface (Name {namespace = "Pango", name = "FontsetForeachFunc"})- Ptr () -> -- data : TBasicType TPtr- IO ()--{- |-Iterates through all the fonts in a fontset, calling /@func@/ for-each one. If /@func@/ returns 'True', that stops the iteration.--/Since: 1.4/--}-fontsetForeach ::- (B.CallStack.HasCallStack, MonadIO m, IsFontset a) =>- a- {- ^ /@fontset@/: a 'GI.Pango.Objects.Fontset.Fontset' -}- -> Pango.Callbacks.FontsetForeachFunc- {- ^ /@func@/: Callback function -}- -> m ()-fontsetForeach fontset func = liftIO $ do- fontset' <- unsafeManagedPtrCastPtr fontset- func' <- Pango.Callbacks.mk_FontsetForeachFunc (Pango.Callbacks.wrap_FontsetForeachFunc Nothing (Pango.Callbacks.drop_closures_FontsetForeachFunc func))- let data_ = nullPtr- pango_fontset_foreach fontset' func' data_- safeFreeFunPtr $ castFunPtrToPtr func'- touchManagedPtr fontset- return ()--#if ENABLE_OVERLOADING-data FontsetForeachMethodInfo-instance (signature ~ (Pango.Callbacks.FontsetForeachFunc -> m ()), MonadIO m, IsFontset a) => O.MethodInfo FontsetForeachMethodInfo a signature where- overloadedMethod _ = fontsetForeach--#endif---- method Fontset::get_font--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontset", argType = TInterface (Name {namespace = "Pango", name = "Fontset"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "wc", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Unicode character", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Font"}))--- throws : False--- Skip return : False--foreign import ccall "pango_fontset_get_font" pango_fontset_get_font :: - Ptr Fontset -> -- fontset : TInterface (Name {namespace = "Pango", name = "Fontset"})- Word32 -> -- wc : TBasicType TUInt- IO (Ptr Pango.Font.Font)--{- |-Returns the font in the fontset that contains the best glyph for the-Unicode character /@wc@/.--}-fontsetGetFont ::- (B.CallStack.HasCallStack, MonadIO m, IsFontset a) =>- a- {- ^ /@fontset@/: a 'GI.Pango.Objects.Fontset.Fontset' -}- -> Word32- {- ^ /@wc@/: a Unicode character -}- -> m Pango.Font.Font- {- ^ __Returns:__ a 'GI.Pango.Objects.Font.Font'. The caller must call- g_object_unref when finished with the font. -}-fontsetGetFont fontset wc = liftIO $ do- fontset' <- unsafeManagedPtrCastPtr fontset- result <- pango_fontset_get_font fontset' wc- checkUnexpectedReturnNULL "fontsetGetFont" result- result' <- (wrapObject Pango.Font.Font) result- touchManagedPtr fontset- return result'--#if ENABLE_OVERLOADING-data FontsetGetFontMethodInfo-instance (signature ~ (Word32 -> m Pango.Font.Font), MonadIO m, IsFontset a) => O.MethodInfo FontsetGetFontMethodInfo a signature where- overloadedMethod _ = fontsetGetFont--#endif---- method Fontset::get_metrics--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontset", argType = TInterface (Name {namespace = "Pango", name = "Fontset"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMetrics"}))--- throws : False--- Skip return : False--foreign import ccall "pango_fontset_get_metrics" pango_fontset_get_metrics :: - Ptr Fontset -> -- fontset : TInterface (Name {namespace = "Pango", name = "Fontset"})- IO (Ptr Pango.FontMetrics.FontMetrics)--{- |-Get overall metric information for the fonts in the fontset.--}-fontsetGetMetrics ::- (B.CallStack.HasCallStack, MonadIO m, IsFontset a) =>- a- {- ^ /@fontset@/: a 'GI.Pango.Objects.Fontset.Fontset' -}- -> m Pango.FontMetrics.FontMetrics- {- ^ __Returns:__ a 'GI.Pango.Structs.FontMetrics.FontMetrics' object. The caller must call 'GI.Pango.Structs.FontMetrics.fontMetricsUnref'- when finished using the object. -}-fontsetGetMetrics fontset = liftIO $ do- fontset' <- unsafeManagedPtrCastPtr fontset- result <- pango_fontset_get_metrics fontset'- checkUnexpectedReturnNULL "fontsetGetMetrics" result- result' <- (wrapBoxed Pango.FontMetrics.FontMetrics) result- touchManagedPtr fontset- return result'--#if ENABLE_OVERLOADING-data FontsetGetMetricsMethodInfo-instance (signature ~ (m Pango.FontMetrics.FontMetrics), MonadIO m, IsFontset a) => O.MethodInfo FontsetGetMetricsMethodInfo a signature where- overloadedMethod _ = fontsetGetMetrics--#endif--
− GI/Pango/Objects/Fontset.hs-boot
@@ -1,38 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.Fontset where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Fontset = Fontset (ManagedPtr Fontset)-instance GObject Fontset where-class (GObject o, O.IsDescendantOf Fontset o) => IsFontset o-instance (GObject o, O.IsDescendantOf Fontset o) => IsFontset o-instance O.HasParentTypes Fontset-#if ENABLE_OVERLOADING-data FontsetForeachMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontsetGetFontMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontsetGetMetricsMethodInfo-#endif
− GI/Pango/Objects/FontsetSimple.hs
@@ -1,261 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--'GI.Pango.Objects.FontsetSimple.FontsetSimple' is a implementation of the abstract-'GI.Pango.Objects.Fontset.Fontset' base class in terms of an array of fonts,-which the creator provides when constructing the-'GI.Pango.Objects.FontsetSimple.FontsetSimple'.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.FontsetSimple- ( ---- * Exported types- FontsetSimple(..) ,- IsFontsetSimple ,- toFontsetSimple ,- noFontsetSimple ,--- -- * Methods--- ** append #method:append#--#if ENABLE_OVERLOADING- FontsetSimpleAppendMethodInfo ,-#endif- fontsetSimpleAppend ,----- ** new #method:new#-- fontsetSimpleNew ,----- ** size #method:size#--#if ENABLE_OVERLOADING- FontsetSimpleSizeMethodInfo ,-#endif- fontsetSimpleSize ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Objects.Fontset as Pango.Fontset-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language---- | Memory-managed wrapper type.-newtype FontsetSimple = FontsetSimple (ManagedPtr FontsetSimple)-foreign import ccall "pango_fontset_simple_get_type"- c_pango_fontset_simple_get_type :: IO GType--instance GObject FontsetSimple where- gobjectType = c_pango_fontset_simple_get_type- ---- | Type class for types which can be safely cast to `FontsetSimple`, for instance with `toFontsetSimple`.-class (GObject o, O.IsDescendantOf FontsetSimple o) => IsFontsetSimple o-instance (GObject o, O.IsDescendantOf FontsetSimple o) => IsFontsetSimple o--instance O.HasParentTypes FontsetSimple-type instance O.ParentTypes FontsetSimple = '[Pango.Fontset.Fontset, GObject.Object.Object]---- | Cast to `FontsetSimple`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toFontsetSimple :: (MonadIO m, IsFontsetSimple o) => o -> m FontsetSimple-toFontsetSimple = liftIO . unsafeCastTo FontsetSimple---- | A convenience alias for `Nothing` :: `Maybe` `FontsetSimple`.-noFontsetSimple :: Maybe FontsetSimple-noFontsetSimple = Nothing--#if ENABLE_OVERLOADING-type family ResolveFontsetSimpleMethod (t :: Symbol) (o :: *) :: * where- ResolveFontsetSimpleMethod "append" o = FontsetSimpleAppendMethodInfo- ResolveFontsetSimpleMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontsetSimpleMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontsetSimpleMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveFontsetSimpleMethod "foreach" o = Pango.Fontset.FontsetForeachMethodInfo- ResolveFontsetSimpleMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveFontsetSimpleMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveFontsetSimpleMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveFontsetSimpleMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveFontsetSimpleMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveFontsetSimpleMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveFontsetSimpleMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveFontsetSimpleMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveFontsetSimpleMethod "size" o = FontsetSimpleSizeMethodInfo- ResolveFontsetSimpleMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveFontsetSimpleMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveFontsetSimpleMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveFontsetSimpleMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveFontsetSimpleMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveFontsetSimpleMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveFontsetSimpleMethod "getFont" o = Pango.Fontset.FontsetGetFontMethodInfo- ResolveFontsetSimpleMethod "getMetrics" o = Pango.Fontset.FontsetGetMetricsMethodInfo- ResolveFontsetSimpleMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontsetSimpleMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontsetSimpleMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveFontsetSimpleMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveFontsetSimpleMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontsetSimpleMethod t FontsetSimple, O.MethodInfo info FontsetSimple p) => OL.IsLabel t (FontsetSimple -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList FontsetSimple-type instance O.AttributeList FontsetSimple = FontsetSimpleAttributeList-type FontsetSimpleAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList FontsetSimple = FontsetSimpleSignalList-type FontsetSimpleSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method FontsetSimple::new--- method type : Constructor--- Args : [Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLanguage tag", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontsetSimple"}))--- throws : False--- Skip return : False--foreign import ccall "pango_fontset_simple_new" pango_fontset_simple_new :: - Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO (Ptr FontsetSimple)--{- |-Creates a new 'GI.Pango.Objects.FontsetSimple.FontsetSimple' for the given language.--}-fontsetSimpleNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Language.Language- {- ^ /@language@/: a 'GI.Pango.Structs.Language.Language' tag -}- -> m FontsetSimple- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.FontsetSimple.FontsetSimple', which should- be freed with 'GI.GObject.Objects.Object.objectUnref'. -}-fontsetSimpleNew language = liftIO $ do- language' <- unsafeManagedPtrGetPtr language- result <- pango_fontset_simple_new language'- checkUnexpectedReturnNULL "fontsetSimpleNew" result- result' <- (wrapObject FontsetSimple) result- touchManagedPtr language- return result'--#if ENABLE_OVERLOADING-#endif---- method FontsetSimple::append--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontset", argType = TInterface (Name {namespace = "Pango", name = "FontsetSimple"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontsetSimple.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_fontset_simple_append" pango_fontset_simple_append :: - Ptr FontsetSimple -> -- fontset : TInterface (Name {namespace = "Pango", name = "FontsetSimple"})- Ptr Pango.Font.Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- IO ()--{- |-Adds a font to the fontset.--}-fontsetSimpleAppend ::- (B.CallStack.HasCallStack, MonadIO m, IsFontsetSimple a, Pango.Font.IsFont b) =>- a- {- ^ /@fontset@/: a 'GI.Pango.Objects.FontsetSimple.FontsetSimple'. -}- -> b- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font'. -}- -> m ()-fontsetSimpleAppend fontset font = liftIO $ do- fontset' <- unsafeManagedPtrCastPtr fontset- font' <- unsafeManagedPtrCastPtr font- pango_fontset_simple_append fontset' font'- touchManagedPtr fontset- touchManagedPtr font- return ()--#if ENABLE_OVERLOADING-data FontsetSimpleAppendMethodInfo-instance (signature ~ (b -> m ()), MonadIO m, IsFontsetSimple a, Pango.Font.IsFont b) => O.MethodInfo FontsetSimpleAppendMethodInfo a signature where- overloadedMethod _ = fontsetSimpleAppend--#endif---- method FontsetSimple::size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontset", argType = TInterface (Name {namespace = "Pango", name = "FontsetSimple"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontsetSimple.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_fontset_simple_size" pango_fontset_simple_size :: - Ptr FontsetSimple -> -- fontset : TInterface (Name {namespace = "Pango", name = "FontsetSimple"})- IO Int32--{- |-Returns the number of fonts in the fontset.--}-fontsetSimpleSize ::- (B.CallStack.HasCallStack, MonadIO m, IsFontsetSimple a) =>- a- {- ^ /@fontset@/: a 'GI.Pango.Objects.FontsetSimple.FontsetSimple'. -}- -> m Int32- {- ^ __Returns:__ the size of /@fontset@/. -}-fontsetSimpleSize fontset = liftIO $ do- fontset' <- unsafeManagedPtrCastPtr fontset- result <- pango_fontset_simple_size fontset'- touchManagedPtr fontset- return result--#if ENABLE_OVERLOADING-data FontsetSimpleSizeMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsFontsetSimple a) => O.MethodInfo FontsetSimpleSizeMethodInfo a signature where- overloadedMethod _ = fontsetSimpleSize--#endif--
− GI/Pango/Objects/FontsetSimple.hs-boot
@@ -1,35 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.FontsetSimple where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype FontsetSimple = FontsetSimple (ManagedPtr FontsetSimple)-instance GObject FontsetSimple where-class (GObject o, O.IsDescendantOf FontsetSimple o) => IsFontsetSimple o-instance (GObject o, O.IsDescendantOf FontsetSimple o) => IsFontsetSimple o-instance O.HasParentTypes FontsetSimple-#if ENABLE_OVERLOADING-data FontsetSimpleAppendMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontsetSimpleSizeMethodInfo-#endif
− GI/Pango/Objects/Layout.hs
@@ -1,3067 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Objects.Layout.Layout' structure represents an entire paragraph-of text. It is initialized with a 'GI.Pango.Objects.Context.Context', UTF-8 string-and set of attributes for that string. Once that is done, the-set of formatted lines can be extracted from the object,-the layout can be rendered, and conversion between logical-character positions within the layout\'s text, and the physical-position of the resulting glyphs can be made.--There are also a number of parameters to adjust the formatting-of a 'GI.Pango.Objects.Layout.Layout', which are illustrated in \<xref linkend=\"parameters\"\/>.-It is possible, as well, to ignore the 2-D setup, and simply-treat the results of a 'GI.Pango.Objects.Layout.Layout' as a list of lines.--\<figure id=\"parameters\">-\<title>Adjustable parameters for a PangoLayout\<\/title>-\<graphic fileref=\"layout.gif\" format=\"GIF\">\<\/graphic>-\<\/figure>--The 'GI.Pango.Objects.Layout.Layout' structure is opaque, and has no user-visible-fields.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.Layout- ( -#if ENABLE_OVERLOADING- LayoutSetMarkupWithAccelMethodInfo ,-#endif---- * Exported types- Layout(..) ,- IsLayout ,- toLayout ,- noLayout ,--- -- * Methods--- ** contextChanged #method:contextChanged#--#if ENABLE_OVERLOADING- LayoutContextChangedMethodInfo ,-#endif- layoutContextChanged ,----- ** copy #method:copy#--#if ENABLE_OVERLOADING- LayoutCopyMethodInfo ,-#endif- layoutCopy ,----- ** getAlignment #method:getAlignment#--#if ENABLE_OVERLOADING- LayoutGetAlignmentMethodInfo ,-#endif- layoutGetAlignment ,----- ** getAttributes #method:getAttributes#--#if ENABLE_OVERLOADING- LayoutGetAttributesMethodInfo ,-#endif- layoutGetAttributes ,----- ** getAutoDir #method:getAutoDir#--#if ENABLE_OVERLOADING- LayoutGetAutoDirMethodInfo ,-#endif- layoutGetAutoDir ,----- ** getBaseline #method:getBaseline#--#if ENABLE_OVERLOADING- LayoutGetBaselineMethodInfo ,-#endif- layoutGetBaseline ,----- ** getCharacterCount #method:getCharacterCount#--#if ENABLE_OVERLOADING- LayoutGetCharacterCountMethodInfo ,-#endif- layoutGetCharacterCount ,----- ** getContext #method:getContext#--#if ENABLE_OVERLOADING- LayoutGetContextMethodInfo ,-#endif- layoutGetContext ,----- ** getCursorPos #method:getCursorPos#--#if ENABLE_OVERLOADING- LayoutGetCursorPosMethodInfo ,-#endif- layoutGetCursorPos ,----- ** getEllipsize #method:getEllipsize#--#if ENABLE_OVERLOADING- LayoutGetEllipsizeMethodInfo ,-#endif- layoutGetEllipsize ,----- ** getExtents #method:getExtents#--#if ENABLE_OVERLOADING- LayoutGetExtentsMethodInfo ,-#endif- layoutGetExtents ,----- ** getFontDescription #method:getFontDescription#--#if ENABLE_OVERLOADING- LayoutGetFontDescriptionMethodInfo ,-#endif- layoutGetFontDescription ,----- ** getHeight #method:getHeight#--#if ENABLE_OVERLOADING- LayoutGetHeightMethodInfo ,-#endif- layoutGetHeight ,----- ** getIndent #method:getIndent#--#if ENABLE_OVERLOADING- LayoutGetIndentMethodInfo ,-#endif- layoutGetIndent ,----- ** getIter #method:getIter#--#if ENABLE_OVERLOADING- LayoutGetIterMethodInfo ,-#endif- layoutGetIter ,----- ** getJustify #method:getJustify#--#if ENABLE_OVERLOADING- LayoutGetJustifyMethodInfo ,-#endif- layoutGetJustify ,----- ** getLine #method:getLine#--#if ENABLE_OVERLOADING- LayoutGetLineMethodInfo ,-#endif- layoutGetLine ,----- ** getLineCount #method:getLineCount#--#if ENABLE_OVERLOADING- LayoutGetLineCountMethodInfo ,-#endif- layoutGetLineCount ,----- ** getLineReadonly #method:getLineReadonly#--#if ENABLE_OVERLOADING- LayoutGetLineReadonlyMethodInfo ,-#endif- layoutGetLineReadonly ,----- ** getLines #method:getLines#--#if ENABLE_OVERLOADING- LayoutGetLinesMethodInfo ,-#endif- layoutGetLines ,----- ** getLinesReadonly #method:getLinesReadonly#--#if ENABLE_OVERLOADING- LayoutGetLinesReadonlyMethodInfo ,-#endif- layoutGetLinesReadonly ,----- ** getLogAttrs #method:getLogAttrs#--#if ENABLE_OVERLOADING- LayoutGetLogAttrsMethodInfo ,-#endif- layoutGetLogAttrs ,----- ** getLogAttrsReadonly #method:getLogAttrsReadonly#--#if ENABLE_OVERLOADING- LayoutGetLogAttrsReadonlyMethodInfo ,-#endif- layoutGetLogAttrsReadonly ,----- ** getPixelExtents #method:getPixelExtents#--#if ENABLE_OVERLOADING- LayoutGetPixelExtentsMethodInfo ,-#endif- layoutGetPixelExtents ,----- ** getPixelSize #method:getPixelSize#--#if ENABLE_OVERLOADING- LayoutGetPixelSizeMethodInfo ,-#endif- layoutGetPixelSize ,----- ** getSerial #method:getSerial#--#if ENABLE_OVERLOADING- LayoutGetSerialMethodInfo ,-#endif- layoutGetSerial ,----- ** getSingleParagraphMode #method:getSingleParagraphMode#--#if ENABLE_OVERLOADING- LayoutGetSingleParagraphModeMethodInfo ,-#endif- layoutGetSingleParagraphMode ,----- ** getSize #method:getSize#--#if ENABLE_OVERLOADING- LayoutGetSizeMethodInfo ,-#endif- layoutGetSize ,----- ** getSpacing #method:getSpacing#--#if ENABLE_OVERLOADING- LayoutGetSpacingMethodInfo ,-#endif- layoutGetSpacing ,----- ** getTabs #method:getTabs#--#if ENABLE_OVERLOADING- LayoutGetTabsMethodInfo ,-#endif- layoutGetTabs ,----- ** getText #method:getText#--#if ENABLE_OVERLOADING- LayoutGetTextMethodInfo ,-#endif- layoutGetText ,----- ** getUnknownGlyphsCount #method:getUnknownGlyphsCount#--#if ENABLE_OVERLOADING- LayoutGetUnknownGlyphsCountMethodInfo ,-#endif- layoutGetUnknownGlyphsCount ,----- ** getWidth #method:getWidth#--#if ENABLE_OVERLOADING- LayoutGetWidthMethodInfo ,-#endif- layoutGetWidth ,----- ** getWrap #method:getWrap#--#if ENABLE_OVERLOADING- LayoutGetWrapMethodInfo ,-#endif- layoutGetWrap ,----- ** indexToLineX #method:indexToLineX#--#if ENABLE_OVERLOADING- LayoutIndexToLineXMethodInfo ,-#endif- layoutIndexToLineX ,----- ** indexToPos #method:indexToPos#--#if ENABLE_OVERLOADING- LayoutIndexToPosMethodInfo ,-#endif- layoutIndexToPos ,----- ** isEllipsized #method:isEllipsized#--#if ENABLE_OVERLOADING- LayoutIsEllipsizedMethodInfo ,-#endif- layoutIsEllipsized ,----- ** isWrapped #method:isWrapped#--#if ENABLE_OVERLOADING- LayoutIsWrappedMethodInfo ,-#endif- layoutIsWrapped ,----- ** moveCursorVisually #method:moveCursorVisually#--#if ENABLE_OVERLOADING- LayoutMoveCursorVisuallyMethodInfo ,-#endif- layoutMoveCursorVisually ,----- ** new #method:new#-- layoutNew ,----- ** setAlignment #method:setAlignment#--#if ENABLE_OVERLOADING- LayoutSetAlignmentMethodInfo ,-#endif- layoutSetAlignment ,----- ** setAttributes #method:setAttributes#--#if ENABLE_OVERLOADING- LayoutSetAttributesMethodInfo ,-#endif- layoutSetAttributes ,----- ** setAutoDir #method:setAutoDir#--#if ENABLE_OVERLOADING- LayoutSetAutoDirMethodInfo ,-#endif- layoutSetAutoDir ,----- ** setEllipsize #method:setEllipsize#--#if ENABLE_OVERLOADING- LayoutSetEllipsizeMethodInfo ,-#endif- layoutSetEllipsize ,----- ** setFontDescription #method:setFontDescription#--#if ENABLE_OVERLOADING- LayoutSetFontDescriptionMethodInfo ,-#endif- layoutSetFontDescription ,----- ** setHeight #method:setHeight#--#if ENABLE_OVERLOADING- LayoutSetHeightMethodInfo ,-#endif- layoutSetHeight ,----- ** setIndent #method:setIndent#--#if ENABLE_OVERLOADING- LayoutSetIndentMethodInfo ,-#endif- layoutSetIndent ,----- ** setJustify #method:setJustify#--#if ENABLE_OVERLOADING- LayoutSetJustifyMethodInfo ,-#endif- layoutSetJustify ,----- ** setMarkup #method:setMarkup#--#if ENABLE_OVERLOADING- LayoutSetMarkupMethodInfo ,-#endif- layoutSetMarkup ,----- ** setSingleParagraphMode #method:setSingleParagraphMode#--#if ENABLE_OVERLOADING- LayoutSetSingleParagraphModeMethodInfo ,-#endif- layoutSetSingleParagraphMode ,----- ** setSpacing #method:setSpacing#--#if ENABLE_OVERLOADING- LayoutSetSpacingMethodInfo ,-#endif- layoutSetSpacing ,----- ** setTabs #method:setTabs#--#if ENABLE_OVERLOADING- LayoutSetTabsMethodInfo ,-#endif- layoutSetTabs ,----- ** setText #method:setText#--#if ENABLE_OVERLOADING- LayoutSetTextMethodInfo ,-#endif- layoutSetText ,----- ** setWidth #method:setWidth#--#if ENABLE_OVERLOADING- LayoutSetWidthMethodInfo ,-#endif- layoutSetWidth ,----- ** setWrap #method:setWrap#--#if ENABLE_OVERLOADING- LayoutSetWrapMethodInfo ,-#endif- layoutSetWrap ,----- ** xyToIndex #method:xyToIndex#--#if ENABLE_OVERLOADING- LayoutXyToIndexMethodInfo ,-#endif- layoutXyToIndex ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums-import {-# SOURCE #-} qualified GI.Pango.Objects.Context as Pango.Context-import {-# SOURCE #-} qualified GI.Pango.Structs.AttrList as Pango.AttrList-import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription-import {-# SOURCE #-} qualified GI.Pango.Structs.LayoutIter as Pango.LayoutIter-import {-# SOURCE #-} qualified GI.Pango.Structs.LayoutLine as Pango.LayoutLine-import {-# SOURCE #-} qualified GI.Pango.Structs.LogAttr as Pango.LogAttr-import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle-import {-# SOURCE #-} qualified GI.Pango.Structs.TabArray as Pango.TabArray---- | Memory-managed wrapper type.-newtype Layout = Layout (ManagedPtr Layout)-foreign import ccall "pango_layout_get_type"- c_pango_layout_get_type :: IO GType--instance GObject Layout where- gobjectType = c_pango_layout_get_type- ---- | Type class for types which can be safely cast to `Layout`, for instance with `toLayout`.-class (GObject o, O.IsDescendantOf Layout o) => IsLayout o-instance (GObject o, O.IsDescendantOf Layout o) => IsLayout o--instance O.HasParentTypes Layout-type instance O.ParentTypes Layout = '[GObject.Object.Object]---- | Cast to `Layout`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toLayout :: (MonadIO m, IsLayout o) => o -> m Layout-toLayout = liftIO . unsafeCastTo Layout---- | A convenience alias for `Nothing` :: `Maybe` `Layout`.-noLayout :: Maybe Layout-noLayout = Nothing--#if ENABLE_OVERLOADING-type family ResolveLayoutMethod (t :: Symbol) (o :: *) :: * where- ResolveLayoutMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveLayoutMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveLayoutMethod "contextChanged" o = LayoutContextChangedMethodInfo- ResolveLayoutMethod "copy" o = LayoutCopyMethodInfo- ResolveLayoutMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveLayoutMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveLayoutMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveLayoutMethod "indexToLineX" o = LayoutIndexToLineXMethodInfo- ResolveLayoutMethod "indexToPos" o = LayoutIndexToPosMethodInfo- ResolveLayoutMethod "isEllipsized" o = LayoutIsEllipsizedMethodInfo- ResolveLayoutMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveLayoutMethod "isWrapped" o = LayoutIsWrappedMethodInfo- ResolveLayoutMethod "moveCursorVisually" o = LayoutMoveCursorVisuallyMethodInfo- ResolveLayoutMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveLayoutMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveLayoutMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveLayoutMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveLayoutMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveLayoutMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveLayoutMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveLayoutMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveLayoutMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveLayoutMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveLayoutMethod "xyToIndex" o = LayoutXyToIndexMethodInfo- ResolveLayoutMethod "getAlignment" o = LayoutGetAlignmentMethodInfo- ResolveLayoutMethod "getAttributes" o = LayoutGetAttributesMethodInfo- ResolveLayoutMethod "getAutoDir" o = LayoutGetAutoDirMethodInfo- ResolveLayoutMethod "getBaseline" o = LayoutGetBaselineMethodInfo- ResolveLayoutMethod "getCharacterCount" o = LayoutGetCharacterCountMethodInfo- ResolveLayoutMethod "getContext" o = LayoutGetContextMethodInfo- ResolveLayoutMethod "getCursorPos" o = LayoutGetCursorPosMethodInfo- ResolveLayoutMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveLayoutMethod "getEllipsize" o = LayoutGetEllipsizeMethodInfo- ResolveLayoutMethod "getExtents" o = LayoutGetExtentsMethodInfo- ResolveLayoutMethod "getFontDescription" o = LayoutGetFontDescriptionMethodInfo- ResolveLayoutMethod "getHeight" o = LayoutGetHeightMethodInfo- ResolveLayoutMethod "getIndent" o = LayoutGetIndentMethodInfo- ResolveLayoutMethod "getIter" o = LayoutGetIterMethodInfo- ResolveLayoutMethod "getJustify" o = LayoutGetJustifyMethodInfo- ResolveLayoutMethod "getLine" o = LayoutGetLineMethodInfo- ResolveLayoutMethod "getLineCount" o = LayoutGetLineCountMethodInfo- ResolveLayoutMethod "getLineReadonly" o = LayoutGetLineReadonlyMethodInfo- ResolveLayoutMethod "getLines" o = LayoutGetLinesMethodInfo- ResolveLayoutMethod "getLinesReadonly" o = LayoutGetLinesReadonlyMethodInfo- ResolveLayoutMethod "getLogAttrs" o = LayoutGetLogAttrsMethodInfo- ResolveLayoutMethod "getLogAttrsReadonly" o = LayoutGetLogAttrsReadonlyMethodInfo- ResolveLayoutMethod "getPixelExtents" o = LayoutGetPixelExtentsMethodInfo- ResolveLayoutMethod "getPixelSize" o = LayoutGetPixelSizeMethodInfo- ResolveLayoutMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveLayoutMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveLayoutMethod "getSerial" o = LayoutGetSerialMethodInfo- ResolveLayoutMethod "getSingleParagraphMode" o = LayoutGetSingleParagraphModeMethodInfo- ResolveLayoutMethod "getSize" o = LayoutGetSizeMethodInfo- ResolveLayoutMethod "getSpacing" o = LayoutGetSpacingMethodInfo- ResolveLayoutMethod "getTabs" o = LayoutGetTabsMethodInfo- ResolveLayoutMethod "getText" o = LayoutGetTextMethodInfo- ResolveLayoutMethod "getUnknownGlyphsCount" o = LayoutGetUnknownGlyphsCountMethodInfo- ResolveLayoutMethod "getWidth" o = LayoutGetWidthMethodInfo- ResolveLayoutMethod "getWrap" o = LayoutGetWrapMethodInfo- ResolveLayoutMethod "setAlignment" o = LayoutSetAlignmentMethodInfo- ResolveLayoutMethod "setAttributes" o = LayoutSetAttributesMethodInfo- ResolveLayoutMethod "setAutoDir" o = LayoutSetAutoDirMethodInfo- ResolveLayoutMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveLayoutMethod "setEllipsize" o = LayoutSetEllipsizeMethodInfo- ResolveLayoutMethod "setFontDescription" o = LayoutSetFontDescriptionMethodInfo- ResolveLayoutMethod "setHeight" o = LayoutSetHeightMethodInfo- ResolveLayoutMethod "setIndent" o = LayoutSetIndentMethodInfo- ResolveLayoutMethod "setJustify" o = LayoutSetJustifyMethodInfo- ResolveLayoutMethod "setMarkup" o = LayoutSetMarkupMethodInfo- ResolveLayoutMethod "setMarkupWithAccel" o = LayoutSetMarkupWithAccelMethodInfo- ResolveLayoutMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveLayoutMethod "setSingleParagraphMode" o = LayoutSetSingleParagraphModeMethodInfo- ResolveLayoutMethod "setSpacing" o = LayoutSetSpacingMethodInfo- ResolveLayoutMethod "setTabs" o = LayoutSetTabsMethodInfo- ResolveLayoutMethod "setText" o = LayoutSetTextMethodInfo- ResolveLayoutMethod "setWidth" o = LayoutSetWidthMethodInfo- ResolveLayoutMethod "setWrap" o = LayoutSetWrapMethodInfo- ResolveLayoutMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveLayoutMethod t Layout, O.MethodInfo info Layout p) => OL.IsLabel t (Layout -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Layout-type instance O.AttributeList Layout = LayoutAttributeList-type LayoutAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList Layout = LayoutSignalList-type LayoutSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method Layout::new--- method type : Constructor--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Layout"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_new" pango_layout_new :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO (Ptr Layout)--{- |-Create a new 'GI.Pango.Objects.Layout.Layout' object with attributes initialized to-default values for a particular 'GI.Pango.Objects.Context.Context'.--}-layoutNew ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context' -}- -> m Layout- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.Layout.Layout', with a reference- count of one, which should be freed with- 'GI.GObject.Objects.Object.objectUnref'. -}-layoutNew context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_layout_new context'- checkUnexpectedReturnNULL "layoutNew" result- result' <- (wrapObject Layout) result- touchManagedPtr context- return result'--#if ENABLE_OVERLOADING-#endif---- method Layout::context_changed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_context_changed" pango_layout_context_changed :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO ()--{- |-Forces recomputation of any state in the 'GI.Pango.Objects.Layout.Layout' that-might depend on the layout\'s context. This function should-be called if you make changes to the context subsequent-to creating the layout.--}-layoutContextChanged ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m ()-layoutContextChanged layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- pango_layout_context_changed layout'- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutContextChangedMethodInfo-instance (signature ~ (m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutContextChangedMethodInfo a signature where- overloadedMethod _ = layoutContextChanged--#endif---- method Layout::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "src", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Layout"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_copy" pango_layout_copy :: - Ptr Layout -> -- src : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr Layout)--{- |-Does a deep copy-by-value of the /@src@/ layout. The attribute list,-tab array, and text from the original layout are all copied by-value.--}-layoutCopy ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@src@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Layout- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.Layout.Layout',- with a reference count of one, which should be freed- with 'GI.GObject.Objects.Object.objectUnref'. -}-layoutCopy src = liftIO $ do- src' <- unsafeManagedPtrCastPtr src- result <- pango_layout_copy src'- checkUnexpectedReturnNULL "layoutCopy" result- result' <- (wrapObject Layout) result- touchManagedPtr src- return result'--#if ENABLE_OVERLOADING-data LayoutCopyMethodInfo-instance (signature ~ (m Layout), MonadIO m, IsLayout a) => O.MethodInfo LayoutCopyMethodInfo a signature where- overloadedMethod _ = layoutCopy--#endif---- method Layout::get_alignment--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Alignment"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_alignment" pango_layout_get_alignment :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CUInt--{- |-Gets the alignment for the layout: how partial lines are-positioned within the horizontal space available.--}-layoutGetAlignment ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Pango.Enums.Alignment- {- ^ __Returns:__ the alignment. -}-layoutGetAlignment layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_alignment layout'- let result' = (toEnum . fromIntegral) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetAlignmentMethodInfo-instance (signature ~ (m Pango.Enums.Alignment), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetAlignmentMethodInfo a signature where- overloadedMethod _ = layoutGetAlignment--#endif---- method Layout::get_attributes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "AttrList"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_attributes" pango_layout_get_attributes :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr Pango.AttrList.AttrList)--{- |-Gets the attribute list for the layout, if any.--}-layoutGetAttributes ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Pango.AttrList.AttrList- {- ^ __Returns:__ a 'GI.Pango.Structs.AttrList.AttrList'. -}-layoutGetAttributes layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_attributes layout'- checkUnexpectedReturnNULL "layoutGetAttributes" result- result' <- (newBoxed Pango.AttrList.AttrList) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetAttributesMethodInfo-instance (signature ~ (m Pango.AttrList.AttrList), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetAttributesMethodInfo a signature where- overloadedMethod _ = layoutGetAttributes--#endif---- method Layout::get_auto_dir--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_auto_dir" pango_layout_get_auto_dir :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CInt--{- |-Gets whether to calculate the bidirectional base direction-for the layout according to the contents of the layout.-See 'GI.Pango.Objects.Layout.layoutSetAutoDir'.--/Since: 1.4/--}-layoutGetAutoDir ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Bool- {- ^ __Returns:__ 'True' if the bidirectional base direction- is computed from the layout\'s contents, 'False' otherwise. -}-layoutGetAutoDir layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_auto_dir layout'- let result' = (/= 0) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetAutoDirMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetAutoDirMethodInfo a signature where- overloadedMethod _ = layoutGetAutoDir--#endif---- method Layout::get_baseline--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_baseline" pango_layout_get_baseline :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Gets the Y position of baseline of the first line in /@layout@/.--/Since: 1.22/--}-layoutGetBaseline ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ baseline of first line, from top of /@layout@/. -}-layoutGetBaseline layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_baseline layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetBaselineMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetBaselineMethodInfo a signature where- overloadedMethod _ = layoutGetBaseline--#endif---- method Layout::get_character_count--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_character_count" pango_layout_get_character_count :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Returns the number of Unicode characters in the-the text of /@layout@/.--/Since: 1.30/--}-layoutGetCharacterCount ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ the number of Unicode characters- in the text of /@layout@/ -}-layoutGetCharacterCount layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_character_count layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetCharacterCountMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetCharacterCountMethodInfo a signature where- overloadedMethod _ = layoutGetCharacterCount--#endif---- method Layout::get_context--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Context"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_context" pango_layout_get_context :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr Pango.Context.Context)--{- |-Retrieves the 'GI.Pango.Objects.Context.Context' used for this layout.--}-layoutGetContext ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Pango.Context.Context- {- ^ __Returns:__ the 'GI.Pango.Objects.Context.Context' for the layout.-This does not have an additional refcount added, so if you want to-keep a copy of this around, you must reference it yourself. -}-layoutGetContext layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_context layout'- checkUnexpectedReturnNULL "layoutGetContext" result- result' <- (newObject Pango.Context.Context) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetContextMethodInfo-instance (signature ~ (m Pango.Context.Context), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetContextMethodInfo a signature where- overloadedMethod _ = layoutGetContext--#endif---- method Layout::get_cursor_pos--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the byte index of the cursor", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "strong_pos", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the strong cursor position\n (may be %NULL)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "weak_pos", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the weak cursor position (may be %NULL)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_cursor_pos" pango_layout_get_cursor_pos :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- index_ : TBasicType TInt- Ptr Pango.Rectangle.Rectangle -> -- strong_pos : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- weak_pos : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Given an index within a layout, determines the positions that of the-strong and weak cursors if the insertion point is at that-index. The position of each cursor is stored as a zero-width-rectangle. The strong cursor location is the location where-characters of the directionality equal to the base direction of the-layout are inserted. The weak cursor location is the location-where characters of the directionality opposite to the base-direction of the layout are inserted.--}-layoutGetCursorPos ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Int32- {- ^ /@index_@/: the byte index of the cursor -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutGetCursorPos layout index_ = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- strongPos <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- weakPos <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_get_cursor_pos layout' index_ strongPos weakPos- strongPos' <- (wrapPtr Pango.Rectangle.Rectangle) strongPos- weakPos' <- (wrapPtr Pango.Rectangle.Rectangle) weakPos- touchManagedPtr layout- return (strongPos', weakPos')--#if ENABLE_OVERLOADING-data LayoutGetCursorPosMethodInfo-instance (signature ~ (Int32 -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetCursorPosMethodInfo a signature where- overloadedMethod _ = layoutGetCursorPos--#endif---- method Layout::get_ellipsize--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "EllipsizeMode"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_ellipsize" pango_layout_get_ellipsize :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CUInt--{- |-Gets the type of ellipsization being performed for /@layout@/.-See 'GI.Pango.Objects.Layout.layoutSetEllipsize'--/Since: 1.6/--}-layoutGetEllipsize ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Pango.Enums.EllipsizeMode- {- ^ __Returns:__ the current ellipsization mode for /@layout@/.--Use 'GI.Pango.Objects.Layout.layoutIsEllipsized' to query whether any paragraphs-were actually ellipsized. -}-layoutGetEllipsize layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_ellipsize layout'- let result' = (toEnum . fromIntegral) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetEllipsizeMethodInfo-instance (signature ~ (m Pango.Enums.EllipsizeMode), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetEllipsizeMethodInfo a signature where- overloadedMethod _ = layoutGetEllipsize--#endif---- method Layout::get_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the extents of the\n layout as drawn or %NULL to indicate that the result is\n not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the logical\n extents of the layout or %NULL to indicate that the\n result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_extents" pango_layout_get_extents :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Computes the logical and ink extents of /@layout@/. Logical extents-are usually what you want for positioning things. Note that both extents-may have non-zero x and y. You may want to use those to offset where you-render the layout. Not doing that is a very typical bug that shows up as-right-to-left layouts not being correctly positioned in a layout with-a set width.--The extents are given in layout coordinates and in Pango units; layout-coordinates begin at the top left corner of the layout.--}-layoutGetExtents ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutGetExtents layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_get_extents layout' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr layout- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutGetExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetExtentsMethodInfo a signature where- overloadedMethod _ = layoutGetExtents--#endif---- method Layout::get_font_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_font_description" pango_layout_get_font_description :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr Pango.FontDescription.FontDescription)--{- |-Gets the font description for the layout, if any.--/Since: 1.8/--}-layoutGetFontDescription ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m (Maybe Pango.FontDescription.FontDescription)- {- ^ __Returns:__ a pointer to the layout\'s font- description, or 'Nothing' if the font description from the layout\'s- context is inherited. This value is owned by the layout and must- not be modified or freed. -}-layoutGetFontDescription layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_font_description layout'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.FontDescription.FontDescription) result'- return result''- touchManagedPtr layout- return maybeResult--#if ENABLE_OVERLOADING-data LayoutGetFontDescriptionMethodInfo-instance (signature ~ (m (Maybe Pango.FontDescription.FontDescription)), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetFontDescriptionMethodInfo a signature where- overloadedMethod _ = layoutGetFontDescription--#endif---- method Layout::get_height--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_height" pango_layout_get_height :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Gets the height of layout used for ellipsization. See-'GI.Pango.Objects.Layout.layoutSetHeight' for details.--/Since: 1.20/--}-layoutGetHeight ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ the height, in Pango units if positive, or-number of lines if negative. -}-layoutGetHeight layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_height layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetHeightMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetHeightMethodInfo a signature where- overloadedMethod _ = layoutGetHeight--#endif---- method Layout::get_indent--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_indent" pango_layout_get_indent :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Gets the paragraph indent width in Pango units. A negative value-indicates a hanging indentation.--}-layoutGetIndent ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ the indent in Pango units. -}-layoutGetIndent layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_indent layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetIndentMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetIndentMethodInfo a signature where- overloadedMethod _ = layoutGetIndent--#endif---- method Layout::get_iter--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutIter"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_iter" pango_layout_get_iter :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr Pango.LayoutIter.LayoutIter)--{- |-Returns an iterator to iterate over the visual extents of the layout.--}-layoutGetIter ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Pango.LayoutIter.LayoutIter- {- ^ __Returns:__ the new 'GI.Pango.Structs.LayoutIter.LayoutIter' that should be freed using- 'GI.Pango.Structs.LayoutIter.layoutIterFree'. -}-layoutGetIter layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_iter layout'- checkUnexpectedReturnNULL "layoutGetIter" result- result' <- (wrapBoxed Pango.LayoutIter.LayoutIter) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetIterMethodInfo-instance (signature ~ (m Pango.LayoutIter.LayoutIter), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetIterMethodInfo a signature where- overloadedMethod _ = layoutGetIter--#endif---- method Layout::get_justify--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_justify" pango_layout_get_justify :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CInt--{- |-Gets whether each complete line should be stretched to fill the entire-width of the layout.--}-layoutGetJustify ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Bool- {- ^ __Returns:__ the justify. -}-layoutGetJustify layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_justify layout'- let result' = (/= 0) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetJustifyMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetJustifyMethodInfo a signature where- overloadedMethod _ = layoutGetJustify--#endif---- method Layout::get_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the index of a line, which must be between 0 and\n <literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutLine"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_line" pango_layout_get_line :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- line : TBasicType TInt- IO (Ptr Pango.LayoutLine.LayoutLine)--{- |-Retrieves a particular line from a 'GI.Pango.Objects.Layout.Layout'.--Use the faster 'GI.Pango.Objects.Layout.layoutGetLineReadonly' if you do not plan-to modify the contents of the line (glyphs, glyph widths, etc.).--}-layoutGetLine ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Int32- {- ^ /@line@/: the index of a line, which must be between 0 and- \<literal>pango_layout_get_line_count(layout) - 1\<\/literal>, inclusive. -}- -> m (Maybe Pango.LayoutLine.LayoutLine)- {- ^ __Returns:__ the requested- 'GI.Pango.Structs.LayoutLine.LayoutLine', or 'Nothing' if the index is out of- range. This layout line can be ref\'ed and retained,- but will become invalid if changes are made to the- 'GI.Pango.Objects.Layout.Layout'. -}-layoutGetLine layout line = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_line layout' line- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.LayoutLine.LayoutLine) result'- return result''- touchManagedPtr layout- return maybeResult--#if ENABLE_OVERLOADING-data LayoutGetLineMethodInfo-instance (signature ~ (Int32 -> m (Maybe Pango.LayoutLine.LayoutLine)), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetLineMethodInfo a signature where- overloadedMethod _ = layoutGetLine--#endif---- method Layout::get_line_count--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_line_count" pango_layout_get_line_count :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Retrieves the count of lines for the /@layout@/.--}-layoutGetLineCount ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ the line count. -}-layoutGetLineCount layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_line_count layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetLineCountMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetLineCountMethodInfo a signature where- overloadedMethod _ = layoutGetLineCount--#endif---- method Layout::get_line_readonly--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the index of a line, which must be between 0 and\n <literal>pango_layout_get_line_count(layout) - 1</literal>, inclusive.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutLine"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_line_readonly" pango_layout_get_line_readonly :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- line : TBasicType TInt- IO (Ptr Pango.LayoutLine.LayoutLine)--{- |-Retrieves a particular line from a 'GI.Pango.Objects.Layout.Layout'.--This is a faster alternative to 'GI.Pango.Objects.Layout.layoutGetLine',-but the user is not expected-to modify the contents of the line (glyphs, glyph widths, etc.).--/Since: 1.16/--}-layoutGetLineReadonly ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Int32- {- ^ /@line@/: the index of a line, which must be between 0 and- \<literal>pango_layout_get_line_count(layout) - 1\<\/literal>, inclusive. -}- -> m (Maybe Pango.LayoutLine.LayoutLine)- {- ^ __Returns:__ the requested- 'GI.Pango.Structs.LayoutLine.LayoutLine', or 'Nothing' if the index is out of- range. This layout line can be ref\'ed and retained,- but will become invalid if changes are made to the- 'GI.Pango.Objects.Layout.Layout'. No changes should be made to the line. -}-layoutGetLineReadonly layout line = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_line_readonly layout' line- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.LayoutLine.LayoutLine) result'- return result''- touchManagedPtr layout- return maybeResult--#if ENABLE_OVERLOADING-data LayoutGetLineReadonlyMethodInfo-instance (signature ~ (Int32 -> m (Maybe Pango.LayoutLine.LayoutLine)), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetLineReadonlyMethodInfo a signature where- overloadedMethod _ = layoutGetLineReadonly--#endif---- method Layout::get_lines--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGSList (TInterface (Name {namespace = "Pango", name = "LayoutLine"})))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_lines" pango_layout_get_lines :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr (GSList (Ptr Pango.LayoutLine.LayoutLine)))--{- |-Returns the lines of the /@layout@/ as a list.--Use the faster 'GI.Pango.Objects.Layout.layoutGetLinesReadonly' if you do not plan-to modify the contents of the lines (glyphs, glyph widths, etc.).--}-layoutGetLines ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m [Pango.LayoutLine.LayoutLine]- {- ^ __Returns:__ a 'GI.GLib.Structs.SList.SList' containing-the lines in the layout. This points to internal data of the 'GI.Pango.Objects.Layout.Layout'-and must be used with care. It will become invalid on any change to the layout\'s-text or properties. -}-layoutGetLines layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_lines layout'- result' <- unpackGSList result- result'' <- mapM (newBoxed Pango.LayoutLine.LayoutLine) result'- touchManagedPtr layout- return result''--#if ENABLE_OVERLOADING-data LayoutGetLinesMethodInfo-instance (signature ~ (m [Pango.LayoutLine.LayoutLine]), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetLinesMethodInfo a signature where- overloadedMethod _ = layoutGetLines--#endif---- method Layout::get_lines_readonly--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGSList (TInterface (Name {namespace = "Pango", name = "LayoutLine"})))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_lines_readonly" pango_layout_get_lines_readonly :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr (GSList (Ptr Pango.LayoutLine.LayoutLine)))--{- |-Returns the lines of the /@layout@/ as a list.--This is a faster alternative to 'GI.Pango.Objects.Layout.layoutGetLines',-but the user is not expected-to modify the contents of the lines (glyphs, glyph widths, etc.).--/Since: 1.16/--}-layoutGetLinesReadonly ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m [Pango.LayoutLine.LayoutLine]- {- ^ __Returns:__ a 'GI.GLib.Structs.SList.SList' containing-the lines in the layout. This points to internal data of the 'GI.Pango.Objects.Layout.Layout' and-must be used with care. It will become invalid on any change to the layout\'s-text or properties. No changes should be made to the lines. -}-layoutGetLinesReadonly layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_lines_readonly layout'- result' <- unpackGSList result- result'' <- mapM (newBoxed Pango.LayoutLine.LayoutLine) result'- touchManagedPtr layout- return result''--#if ENABLE_OVERLOADING-data LayoutGetLinesReadonlyMethodInfo-instance (signature ~ (m [Pango.LayoutLine.LayoutLine]), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetLinesReadonlyMethodInfo a signature where- overloadedMethod _ = layoutGetLinesReadonly--#endif---- method Layout::get_log_attrs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs", argType = TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "LogAttr"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to store a pointer to an array of logical attributes\n This value must be freed with g_free().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferContainer},Arg {argCName = "n_attrs", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of the attributes in the\n array. (The stored value will be one more than the total number\n of characters in the layout, since there need to be attributes\n corresponding to both the position before the first character\n and the position after the last character.)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_attrs", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of the attributes in the\n array. (The stored value will be one more than the total number\n of characters in the layout, since there need to be attributes\n corresponding to both the position before the first character\n and the position after the last character.)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_log_attrs" pango_layout_get_log_attrs :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr (Ptr Pango.LogAttr.LogAttr) -> -- attrs : TCArray False (-1) 2 (TInterface (Name {namespace = "Pango", name = "LogAttr"}))- Ptr Int32 -> -- n_attrs : TBasicType TInt- IO ()--{- |-Retrieves an array of logical attributes for each character in-the /@layout@/.--}-layoutGetLogAttrs ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m ([Pango.LogAttr.LogAttr])-layoutGetLogAttrs layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- attrs <- allocMem :: IO (Ptr (Ptr Pango.LogAttr.LogAttr))- nAttrs <- allocMem :: IO (Ptr Int32)- pango_layout_get_log_attrs layout' attrs nAttrs- nAttrs' <- peek nAttrs- attrs' <- peek attrs- attrs'' <- (unpackBlockArrayWithLength 52 nAttrs') attrs'- attrs''' <- mapM (newPtr Pango.LogAttr.LogAttr) attrs''- freeMem attrs'- touchManagedPtr layout- freeMem attrs- freeMem nAttrs- return attrs'''--#if ENABLE_OVERLOADING-data LayoutGetLogAttrsMethodInfo-instance (signature ~ (m ([Pango.LogAttr.LogAttr])), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetLogAttrsMethodInfo a signature where- overloadedMethod _ = layoutGetLogAttrs--#endif---- method Layout::get_log_attrs_readonly--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_attrs", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of the attributes in\n the array", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_attrs", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the number of the attributes in\n the array", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Just (TCArray False (-1) 1 (TInterface (Name {namespace = "Pango", name = "LogAttr"})))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_log_attrs_readonly" pango_layout_get_log_attrs_readonly :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Int32 -> -- n_attrs : TBasicType TInt- IO (Ptr Pango.LogAttr.LogAttr)--{- |-Retrieves an array of logical attributes for each character in-the /@layout@/.--This is a faster alternative to 'GI.Pango.Objects.Layout.layoutGetLogAttrs'.-The returned array is part of /@layout@/ and must not be modified.-Modifying the layout will invalidate the returned array.--The number of attributes returned in /@nAttrs@/ will be one more-than the total number of characters in the layout, since there-need to be attributes corresponding to both the position before-the first character and the position after the last character.--/Since: 1.30/--}-layoutGetLogAttrsReadonly ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m [Pango.LogAttr.LogAttr]- {- ^ __Returns:__ an array of logical attributes -}-layoutGetLogAttrsReadonly layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- nAttrs <- allocMem :: IO (Ptr Int32)- result <- pango_layout_get_log_attrs_readonly layout' nAttrs- nAttrs' <- peek nAttrs- checkUnexpectedReturnNULL "layoutGetLogAttrsReadonly" result- result' <- (unpackBlockArrayWithLength 52 nAttrs') result- result'' <- mapM (newPtr Pango.LogAttr.LogAttr) result'- touchManagedPtr layout- freeMem nAttrs- return result''--#if ENABLE_OVERLOADING-data LayoutGetLogAttrsReadonlyMethodInfo-instance (signature ~ (m [Pango.LogAttr.LogAttr]), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetLogAttrsReadonlyMethodInfo a signature where- overloadedMethod _ = layoutGetLogAttrsReadonly--#endif---- method Layout::get_pixel_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the extents of the\n layout as drawn or %NULL to indicate that the result is\n not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the logical\n extents of the layout or %NULL to indicate that the\n result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_pixel_extents" pango_layout_get_pixel_extents :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Computes the logical and ink extents of /@layout@/ in device units.-This function just calls 'GI.Pango.Objects.Layout.layoutGetExtents' followed by-two 'GI.Pango.Functions.extentsToPixels' calls, rounding /@inkRect@/ and /@logicalRect@/-such that the rounded rectangles fully contain the unrounded one (that is,-passes them as first argument to 'GI.Pango.Functions.extentsToPixels').--}-layoutGetPixelExtents ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutGetPixelExtents layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_get_pixel_extents layout' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr layout- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutGetPixelExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetPixelExtentsMethodInfo a signature where- overloadedMethod _ = layoutGetPixelExtents--#endif---- method Layout::get_pixel_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the logical width, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the logical height, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_pixel_size" pango_layout_get_pixel_size :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Int32 -> -- width : TBasicType TInt- Ptr Int32 -> -- height : TBasicType TInt- IO ()--{- |-Determines the logical width and height of a 'GI.Pango.Objects.Layout.Layout'-in device units. ('GI.Pango.Objects.Layout.layoutGetSize' returns the width-and height scaled by 'GI.Pango.Constants.SCALE'.) This-is simply a convenience function around-'GI.Pango.Objects.Layout.layoutGetPixelExtents'.--}-layoutGetPixelSize ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m ((Int32, Int32))-layoutGetPixelSize layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- width <- allocMem :: IO (Ptr Int32)- height <- allocMem :: IO (Ptr Int32)- pango_layout_get_pixel_size layout' width height- width' <- peek width- height' <- peek height- touchManagedPtr layout- freeMem width- freeMem height- return (width', height')--#if ENABLE_OVERLOADING-data LayoutGetPixelSizeMethodInfo-instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetPixelSizeMethodInfo a signature where- overloadedMethod _ = layoutGetPixelSize--#endif---- method Layout::get_serial--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_serial" pango_layout_get_serial :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Word32--{- |-Returns the current serial number of /@layout@/. The serial number is-initialized to an small number larger than zero when a new layout-is created and is increased whenever the layout is changed using any-of the setter functions, or the 'GI.Pango.Objects.Context.Context' it uses has changed.-The serial may wrap, but will never have the value 0. Since it-can wrap, never compare it with \"less than\", always use \"not equals\".--This can be used to automatically detect changes to a 'GI.Pango.Objects.Layout.Layout', and-is useful for example to decide whether a layout needs redrawing.-To force the serial to be increased, use 'GI.Pango.Objects.Layout.layoutContextChanged'.--/Since: 1.32.4/--}-layoutGetSerial ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Word32- {- ^ __Returns:__ The current serial number of /@layout@/. -}-layoutGetSerial layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_serial layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetSerialMethodInfo-instance (signature ~ (m Word32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetSerialMethodInfo a signature where- overloadedMethod _ = layoutGetSerial--#endif---- method Layout::get_single_paragraph_mode--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_single_paragraph_mode" pango_layout_get_single_paragraph_mode :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CInt--{- |-Obtains the value set by 'GI.Pango.Objects.Layout.layoutSetSingleParagraphMode'.--}-layoutGetSingleParagraphMode ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Bool- {- ^ __Returns:__ 'True' if the layout does not break paragraphs at-paragraph separator characters, 'False' otherwise. -}-layoutGetSingleParagraphMode layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_single_paragraph_mode layout'- let result' = (/= 0) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetSingleParagraphModeMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetSingleParagraphModeMethodInfo a signature where- overloadedMethod _ = layoutGetSingleParagraphMode--#endif---- method Layout::get_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the logical width, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the logical height, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_size" pango_layout_get_size :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Int32 -> -- width : TBasicType TInt- Ptr Int32 -> -- height : TBasicType TInt- IO ()--{- |-Determines the logical width and height of a 'GI.Pango.Objects.Layout.Layout'-in Pango units (device units scaled by 'GI.Pango.Constants.SCALE'). This-is simply a convenience function around 'GI.Pango.Objects.Layout.layoutGetExtents'.--}-layoutGetSize ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m ((Int32, Int32))-layoutGetSize layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- width <- allocMem :: IO (Ptr Int32)- height <- allocMem :: IO (Ptr Int32)- pango_layout_get_size layout' width height- width' <- peek width- height' <- peek height- touchManagedPtr layout- freeMem width- freeMem height- return (width', height')--#if ENABLE_OVERLOADING-data LayoutGetSizeMethodInfo-instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetSizeMethodInfo a signature where- overloadedMethod _ = layoutGetSize--#endif---- method Layout::get_spacing--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_spacing" pango_layout_get_spacing :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Gets the amount of spacing between the lines of the layout.--}-layoutGetSpacing ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ the spacing in Pango units. -}-layoutGetSpacing layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_spacing layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetSpacingMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetSpacingMethodInfo a signature where- overloadedMethod _ = layoutGetSpacing--#endif---- method Layout::get_tabs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "TabArray"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_tabs" pango_layout_get_tabs :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO (Ptr Pango.TabArray.TabArray)--{- |-Gets the current 'GI.Pango.Structs.TabArray.TabArray' used by this layout. If no-'GI.Pango.Structs.TabArray.TabArray' has been set, then the default tabs are in use-and 'Nothing' is returned. Default tabs are every 8 spaces.-The return value should be freed with 'GI.Pango.Structs.TabArray.tabArrayFree'.--}-layoutGetTabs ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m (Maybe Pango.TabArray.TabArray)- {- ^ __Returns:__ a copy of the tabs for this layout, or-'Nothing'. -}-layoutGetTabs layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_tabs layout'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed Pango.TabArray.TabArray) result'- return result''- touchManagedPtr layout- return maybeResult--#if ENABLE_OVERLOADING-data LayoutGetTabsMethodInfo-instance (signature ~ (m (Maybe Pango.TabArray.TabArray)), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetTabsMethodInfo a signature where- overloadedMethod _ = layoutGetTabs--#endif---- method Layout::get_text--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_text" pango_layout_get_text :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CString--{- |-Gets the text in the layout. The returned text should not-be freed or modified.--}-layoutGetText ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m T.Text- {- ^ __Returns:__ the text in the /@layout@/. -}-layoutGetText layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_text layout'- checkUnexpectedReturnNULL "layoutGetText" result- result' <- cstringToText result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetTextMethodInfo-instance (signature ~ (m T.Text), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetTextMethodInfo a signature where- overloadedMethod _ = layoutGetText--#endif---- method Layout::get_unknown_glyphs_count--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_unknown_glyphs_count" pango_layout_get_unknown_glyphs_count :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Counts the number unknown glyphs in /@layout@/. That is, zero if-glyphs for all characters in the layout text were found, or more-than zero otherwise.--This function can be used to determine if there are any fonts-available to render all characters in a certain string, or when-used in combination with 'GI.Pango.Enums.AttrTypeFallback', to check if a-certain font supports all the characters in the string.--/Since: 1.16/--}-layoutGetUnknownGlyphsCount ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ The number of unknown glyphs in /@layout@/. -}-layoutGetUnknownGlyphsCount layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_unknown_glyphs_count layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetUnknownGlyphsCountMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetUnknownGlyphsCountMethodInfo a signature where- overloadedMethod _ = layoutGetUnknownGlyphsCount--#endif---- method Layout::get_width--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_width" pango_layout_get_width :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO Int32--{- |-Gets the width to which the lines of the 'GI.Pango.Objects.Layout.Layout' should wrap.--}-layoutGetWidth ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Int32- {- ^ __Returns:__ the width in Pango units, or -1 if no width set. -}-layoutGetWidth layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_width layout'- touchManagedPtr layout- return result--#if ENABLE_OVERLOADING-data LayoutGetWidthMethodInfo-instance (signature ~ (m Int32), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetWidthMethodInfo a signature where- overloadedMethod _ = layoutGetWidth--#endif---- method Layout::get_wrap--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "WrapMode"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_get_wrap" pango_layout_get_wrap :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CUInt--{- |-Gets the wrap mode for the layout.--Use 'GI.Pango.Objects.Layout.layoutIsWrapped' to query whether any paragraphs-were actually wrapped.--}-layoutGetWrap ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Pango.Enums.WrapMode- {- ^ __Returns:__ active wrap mode. -}-layoutGetWrap layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_get_wrap layout'- let result' = (toEnum . fromIntegral) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutGetWrapMethodInfo-instance (signature ~ (m Pango.Enums.WrapMode), MonadIO m, IsLayout a) => O.MethodInfo LayoutGetWrapMethodInfo a signature where- overloadedMethod _ = layoutGetWrap--#endif---- method Layout::index_to_line_x--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the byte index of a grapheme within the layout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "trailing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an integer indicating the edge of the grapheme to retrieve the\n position of. If > 0, the trailing edge of the grapheme, if 0,\n the leading of the grapheme.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store resulting line index. (which will\n between 0 and pango_layout_get_line_count(layout) - 1), or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "x_pos", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store resulting position within line\n (%PANGO_SCALE units per device unit), or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_index_to_line_x" pango_layout_index_to_line_x :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- index_ : TBasicType TInt- CInt -> -- trailing : TBasicType TBoolean- Ptr Int32 -> -- line : TBasicType TInt- Ptr Int32 -> -- x_pos : TBasicType TInt- IO ()--{- |-Converts from byte /@index_@/ within the /@layout@/ to line and X position.-(X position is measured from the left edge of the line)--}-layoutIndexToLineX ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Int32- {- ^ /@index_@/: the byte index of a grapheme within the layout. -}- -> Bool- {- ^ /@trailing@/: an integer indicating the edge of the grapheme to retrieve the- position of. If > 0, the trailing edge of the grapheme, if 0,- the leading of the grapheme. -}- -> m ((Int32, Int32))-layoutIndexToLineX layout index_ trailing = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let trailing' = (fromIntegral . fromEnum) trailing- line <- allocMem :: IO (Ptr Int32)- xPos <- allocMem :: IO (Ptr Int32)- pango_layout_index_to_line_x layout' index_ trailing' line xPos- line' <- peek line- xPos' <- peek xPos- touchManagedPtr layout- freeMem line- freeMem xPos- return (line', xPos')--#if ENABLE_OVERLOADING-data LayoutIndexToLineXMethodInfo-instance (signature ~ (Int32 -> Bool -> m ((Int32, Int32))), MonadIO m, IsLayout a) => O.MethodInfo LayoutIndexToLineXMethodInfo a signature where- overloadedMethod _ = layoutIndexToLineX--#endif---- method Layout::index_to_pos--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "byte index within @layout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle in which to store the position of the grapheme", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_index_to_pos" pango_layout_index_to_pos :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- index_ : TBasicType TInt- Ptr Pango.Rectangle.Rectangle -> -- pos : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Converts from an index within a 'GI.Pango.Objects.Layout.Layout' to the onscreen position-corresponding to the grapheme at that index, which is represented-as rectangle. Note that \<literal>pos->x\<\/literal> is always the leading-edge of the grapheme and \<literal>pos->x + pos->width\<\/literal> the trailing-edge of the grapheme. If the directionality of the grapheme is right-to-left,-then \<literal>pos->width\<\/literal> will be negative.--}-layoutIndexToPos ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Int32- {- ^ /@index_@/: byte index within /@layout@/ -}- -> m (Pango.Rectangle.Rectangle)-layoutIndexToPos layout index_ = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- pos <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_index_to_pos layout' index_ pos- pos' <- (wrapPtr Pango.Rectangle.Rectangle) pos- touchManagedPtr layout- return pos'--#if ENABLE_OVERLOADING-data LayoutIndexToPosMethodInfo-instance (signature ~ (Int32 -> m (Pango.Rectangle.Rectangle)), MonadIO m, IsLayout a) => O.MethodInfo LayoutIndexToPosMethodInfo a signature where- overloadedMethod _ = layoutIndexToPos--#endif---- method Layout::is_ellipsized--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_is_ellipsized" pango_layout_is_ellipsized :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CInt--{- |-Queries whether the layout had to ellipsize any paragraphs.--This returns 'True' if the ellipsization mode for /@layout@/-is not 'GI.Pango.Enums.EllipsizeModeNone', a positive width is set on /@layout@/,-and there are paragraphs exceeding that width that have to be-ellipsized.--/Since: 1.16/--}-layoutIsEllipsized ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Bool- {- ^ __Returns:__ 'True' if any paragraphs had to be ellipsized, 'False'-otherwise. -}-layoutIsEllipsized layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_is_ellipsized layout'- let result' = (/= 0) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutIsEllipsizedMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsLayout a) => O.MethodInfo LayoutIsEllipsizedMethodInfo a signature where- overloadedMethod _ = layoutIsEllipsized--#endif---- method Layout::is_wrapped--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_is_wrapped" pango_layout_is_wrapped :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO CInt--{- |-Queries whether the layout had to wrap any paragraphs.--This returns 'True' if a positive width is set on /@layout@/,-ellipsization mode of /@layout@/ is set to 'GI.Pango.Enums.EllipsizeModeNone',-and there are paragraphs exceeding the layout width that have-to be wrapped.--/Since: 1.16/--}-layoutIsWrapped ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> m Bool- {- ^ __Returns:__ 'True' if any paragraphs had to be wrapped, 'False'-otherwise. -}-layoutIsWrapped layout = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- result <- pango_layout_is_wrapped layout'- let result' = (/= 0) result- touchManagedPtr layout- return result'--#if ENABLE_OVERLOADING-data LayoutIsWrappedMethodInfo-instance (signature ~ (m Bool), MonadIO m, IsLayout a) => O.MethodInfo LayoutIsWrappedMethodInfo a signature where- overloadedMethod _ = layoutIsWrapped--#endif---- method Layout::move_cursor_visually--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "strong", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether the moving cursor is the strong cursor or the\n weak cursor. The strong cursor is the cursor corresponding\n to text insertion in the base direction for the layout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "old_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the byte index of the grapheme for the old index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "old_trailing", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if 0, the cursor was at the leading edge of the\n grapheme indicated by @old_index, if > 0, the cursor\n was at the trailing edge.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "direction", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "direction to move cursor. A negative\n value indicates motion to the left.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_index", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the new cursor byte index. A value of -1\n indicates that the cursor has been moved off the beginning\n of the layout. A value of %G_MAXINT indicates that\n the cursor has been moved off the end of the layout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "new_trailing", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of characters to move forward from the\n location returned for @new_index to get the position\n where the cursor should be displayed. This allows\n distinguishing the position at the beginning of one\n line from the position at the end of the preceding\n line. @new_index is always on the line where the\n cursor should be displayed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_move_cursor_visually" pango_layout_move_cursor_visually :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CInt -> -- strong : TBasicType TBoolean- Int32 -> -- old_index : TBasicType TInt- Int32 -> -- old_trailing : TBasicType TInt- Int32 -> -- direction : TBasicType TInt- Ptr Int32 -> -- new_index : TBasicType TInt- Ptr Int32 -> -- new_trailing : TBasicType TInt- IO ()--{- |-Computes a new cursor position from an old position and-a count of positions to move visually. If /@direction@/ is positive,-then the new strong cursor position will be one position-to the right of the old cursor position. If /@direction@/ is negative,-then the new strong cursor position will be one position-to the left of the old cursor position.--In the presence of bidirectional text, the correspondence-between logical and visual order will depend on the direction-of the current run, and there may be jumps when the cursor-is moved off of the end of a run.--Motion here is in cursor positions, not in characters, so a-single call to 'GI.Pango.Objects.Layout.layoutMoveCursorVisually' may move the-cursor over multiple characters when multiple characters combine-to form a single grapheme.--}-layoutMoveCursorVisually ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout'. -}- -> Bool- {- ^ /@strong@/: whether the moving cursor is the strong cursor or the- weak cursor. The strong cursor is the cursor corresponding- to text insertion in the base direction for the layout. -}- -> Int32- {- ^ /@oldIndex@/: the byte index of the grapheme for the old index -}- -> Int32- {- ^ /@oldTrailing@/: if 0, the cursor was at the leading edge of the- grapheme indicated by /@oldIndex@/, if > 0, the cursor- was at the trailing edge. -}- -> Int32- {- ^ /@direction@/: direction to move cursor. A negative- value indicates motion to the left. -}- -> m ((Int32, Int32))-layoutMoveCursorVisually layout strong oldIndex oldTrailing direction = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let strong' = (fromIntegral . fromEnum) strong- newIndex <- allocMem :: IO (Ptr Int32)- newTrailing <- allocMem :: IO (Ptr Int32)- pango_layout_move_cursor_visually layout' strong' oldIndex oldTrailing direction newIndex newTrailing- newIndex' <- peek newIndex- newTrailing' <- peek newTrailing- touchManagedPtr layout- freeMem newIndex- freeMem newTrailing- return (newIndex', newTrailing')--#if ENABLE_OVERLOADING-data LayoutMoveCursorVisuallyMethodInfo-instance (signature ~ (Bool -> Int32 -> Int32 -> Int32 -> m ((Int32, Int32))), MonadIO m, IsLayout a) => O.MethodInfo LayoutMoveCursorVisuallyMethodInfo a signature where- overloadedMethod _ = layoutMoveCursorVisually--#endif---- method Layout::set_alignment--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alignment", argType = TInterface (Name {namespace = "Pango", name = "Alignment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the alignment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_alignment" pango_layout_set_alignment :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CUInt -> -- alignment : TInterface (Name {namespace = "Pango", name = "Alignment"})- IO ()--{- |-Sets the alignment for the layout: how partial lines are-positioned within the horizontal space available.--}-layoutSetAlignment ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Pango.Enums.Alignment- {- ^ /@alignment@/: the alignment -}- -> m ()-layoutSetAlignment layout alignment = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let alignment' = (fromIntegral . fromEnum) alignment- pango_layout_set_alignment layout' alignment'- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetAlignmentMethodInfo-instance (signature ~ (Pango.Enums.Alignment -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetAlignmentMethodInfo a signature where- overloadedMethod _ = layoutSetAlignment--#endif---- method Layout::set_attributes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attrs", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #PangoAttrList, can be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_attributes" pango_layout_set_attributes :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Pango.AttrList.AttrList -> -- attrs : TInterface (Name {namespace = "Pango", name = "AttrList"})- IO ()--{- |-Sets the text attributes for a layout object.-References /@attrs@/, so the caller can unref its reference.--}-layoutSetAttributes ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Maybe (Pango.AttrList.AttrList)- {- ^ /@attrs@/: a 'GI.Pango.Structs.AttrList.AttrList', can be 'Nothing' -}- -> m ()-layoutSetAttributes layout attrs = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- maybeAttrs <- case attrs of- Nothing -> return nullPtr- Just jAttrs -> do- jAttrs' <- unsafeManagedPtrGetPtr jAttrs- return jAttrs'- pango_layout_set_attributes layout' maybeAttrs- touchManagedPtr layout- whenJust attrs touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data LayoutSetAttributesMethodInfo-instance (signature ~ (Maybe (Pango.AttrList.AttrList) -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetAttributesMethodInfo a signature where- overloadedMethod _ = layoutSetAttributes--#endif---- method Layout::set_auto_dir--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "auto_dir", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if %TRUE, compute the bidirectional base direction\n from the layout's contents.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_auto_dir" pango_layout_set_auto_dir :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CInt -> -- auto_dir : TBasicType TBoolean- IO ()--{- |-Sets whether to calculate the bidirectional base direction-for the layout according to the contents of the layout;-when this flag is on (the default), then paragraphs in- /@layout@/ that begin with strong right-to-left characters-(Arabic and Hebrew principally), will have right-to-left-layout, paragraphs with letters from other scripts will-have left-to-right layout. Paragraphs with only neutral-characters get their direction from the surrounding paragraphs.--When 'False', the choice between left-to-right and-right-to-left layout is done according to the base direction-of the layout\'s 'GI.Pango.Objects.Context.Context'. (See 'GI.Pango.Objects.Context.contextSetBaseDir').--When the auto-computed direction of a paragraph differs from the-base direction of the context, the interpretation of-'GI.Pango.Enums.AlignmentLeft' and 'GI.Pango.Enums.AlignmentRight' are swapped.--/Since: 1.4/--}-layoutSetAutoDir ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Bool- {- ^ /@autoDir@/: if 'True', compute the bidirectional base direction- from the layout\'s contents. -}- -> m ()-layoutSetAutoDir layout autoDir = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let autoDir' = (fromIntegral . fromEnum) autoDir- pango_layout_set_auto_dir layout' autoDir'- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetAutoDirMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetAutoDirMethodInfo a signature where- overloadedMethod _ = layoutSetAutoDir--#endif---- method Layout::set_ellipsize--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ellipsize", argType = TInterface (Name {namespace = "Pango", name = "EllipsizeMode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new ellipsization mode for @layout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_ellipsize" pango_layout_set_ellipsize :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CUInt -> -- ellipsize : TInterface (Name {namespace = "Pango", name = "EllipsizeMode"})- IO ()--{- |-Sets the type of ellipsization being performed for /@layout@/.-Depending on the ellipsization mode /@ellipsize@/ text is-removed from the start, middle, or end of text so they-fit within the width and height of layout set with-'GI.Pango.Objects.Layout.layoutSetWidth' and 'GI.Pango.Objects.Layout.layoutSetHeight'.--If the layout contains characters such as newlines that-force it to be layed out in multiple paragraphs, then whether-each paragraph is ellipsized separately or the entire layout-is ellipsized as a whole depends on the set height of the layout.-See 'GI.Pango.Objects.Layout.layoutSetHeight' for details.--/Since: 1.6/--}-layoutSetEllipsize ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Pango.Enums.EllipsizeMode- {- ^ /@ellipsize@/: the new ellipsization mode for /@layout@/ -}- -> m ()-layoutSetEllipsize layout ellipsize = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let ellipsize' = (fromIntegral . fromEnum) ellipsize- pango_layout_set_ellipsize layout' ellipsize'- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetEllipsizeMethodInfo-instance (signature ~ (Pango.Enums.EllipsizeMode -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetEllipsizeMethodInfo a signature where- overloadedMethod _ = layoutSetEllipsize--#endif---- method Layout::set_font_description--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the new #PangoFontDescription, or %NULL to unset the\n current font description", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_font_description" pango_layout_set_font_description :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO ()--{- |-Sets the default font description for the layout. If no font-description is set on the layout, the font description from-the layout\'s context is used.--}-layoutSetFontDescription ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Maybe (Pango.FontDescription.FontDescription)- {- ^ /@desc@/: the new 'GI.Pango.Structs.FontDescription.FontDescription', or 'Nothing' to unset the- current font description -}- -> m ()-layoutSetFontDescription layout desc = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- maybeDesc <- case desc of- Nothing -> return nullPtr- Just jDesc -> do- jDesc' <- unsafeManagedPtrGetPtr jDesc- return jDesc'- pango_layout_set_font_description layout' maybeDesc- touchManagedPtr layout- whenJust desc touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data LayoutSetFontDescriptionMethodInfo-instance (signature ~ (Maybe (Pango.FontDescription.FontDescription) -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetFontDescriptionMethodInfo a signature where- overloadedMethod _ = layoutSetFontDescription--#endif---- method Layout::set_height--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the desired height of the layout in Pango units if positive,\n or desired number of lines if negative.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_height" pango_layout_set_height :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- height : TBasicType TInt- IO ()--{- |-Sets the height to which the 'GI.Pango.Objects.Layout.Layout' should be ellipsized at. There-are two different behaviors, based on whether /@height@/ is positive or-negative.--If /@height@/ is positive, it will be the maximum height of the layout. Only-lines would be shown that would fit, and if there is any text omitted,-an ellipsis added. At least one line is included in each paragraph regardless-of how small the height value is. A value of zero will render exactly one-line for the entire layout.--If /@height@/ is negative, it will be the (negative of) maximum number of lines per-paragraph. That is, the total number of lines shown may well be more than-this value if the layout contains multiple paragraphs of text.-The default value of -1 means that first line of each paragraph is ellipsized.-This behvaior may be changed in the future to act per layout instead of per-paragraph. File a bug against pango at \<ulink-url=\"http:\/\/bugzilla.gnome.org\/\">http:\/\/bugzilla.gnome.org\/\<\/ulink> if your-code relies on this behavior.--Height setting only has effect if a positive width is set on-/@layout@/ and ellipsization mode of /@layout@/ is not 'GI.Pango.Enums.EllipsizeModeNone'.-The behavior is undefined if a height other than -1 is set and-ellipsization mode is set to 'GI.Pango.Enums.EllipsizeModeNone', and may change in the-future.--/Since: 1.20/--}-layoutSetHeight ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout'. -}- -> Int32- {- ^ /@height@/: the desired height of the layout in Pango units if positive,- or desired number of lines if negative. -}- -> m ()-layoutSetHeight layout height = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- pango_layout_set_height layout' height- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetHeightMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetHeightMethodInfo a signature where- overloadedMethod _ = layoutSetHeight--#endif---- method Layout::set_indent--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "indent", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the amount by which to indent.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_indent" pango_layout_set_indent :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- indent : TBasicType TInt- IO ()--{- |-Sets the width in Pango units to indent each paragraph. A negative value-of /@indent@/ will produce a hanging indentation. That is, the first line will-have the full width, and subsequent lines will be indented by the-absolute value of /@indent@/.--The indent setting is ignored if layout alignment is set to-'GI.Pango.Enums.AlignmentCenter'.--}-layoutSetIndent ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout'. -}- -> Int32- {- ^ /@indent@/: the amount by which to indent. -}- -> m ()-layoutSetIndent layout indent = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- pango_layout_set_indent layout' indent- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetIndentMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetIndentMethodInfo a signature where- overloadedMethod _ = layoutSetIndent--#endif---- method Layout::set_justify--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "justify", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether the lines in the layout should be justified.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_justify" pango_layout_set_justify :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CInt -> -- justify : TBasicType TBoolean- IO ()--{- |-Sets whether each complete line should be stretched to-fill the entire width of the layout. This stretching is typically-done by adding whitespace, but for some scripts (such as Arabic),-the justification may be done in more complex ways, like extending-the characters.--Note that this setting is not implemented and so is ignored in Pango-older than 1.18.--}-layoutSetJustify ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Bool- {- ^ /@justify@/: whether the lines in the layout should be justified. -}- -> m ()-layoutSetJustify layout justify = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let justify' = (fromIntegral . fromEnum) justify- pango_layout_set_justify layout' justify'- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetJustifyMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetJustifyMethodInfo a signature where- overloadedMethod _ = layoutSetJustify--#endif---- method Layout::set_markup--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "markup", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "marked-up text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "length of marked-up text in bytes, or -1 if @markup is\n null-terminated", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_markup" pango_layout_set_markup :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CString -> -- markup : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- IO ()--{- |-Same as 'GI.Pango.Objects.Layout.layoutSetMarkupWithAccel', but-the markup text isn\'t scanned for accelerators.--}-layoutSetMarkup ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> T.Text- {- ^ /@markup@/: marked-up text -}- -> Int32- {- ^ /@length@/: length of marked-up text in bytes, or -1 if /@markup@/ is- null-terminated -}- -> m ()-layoutSetMarkup layout markup length_ = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- markup' <- textToCString markup- pango_layout_set_markup layout' markup' length_- touchManagedPtr layout- freeMem markup'- return ()--#if ENABLE_OVERLOADING-data LayoutSetMarkupMethodInfo-instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetMarkupMethodInfo a signature where- overloadedMethod _ = layoutSetMarkup--#endif---- XXX Could not generate method Layout::set_markup_with_accel--- Error was : Not implemented: "Don't know how to allocate \"accel_char\" of type TBasicType TUniChar"-#if ENABLE_OVERLOADING--- XXX: Dummy instance, since code generation failed.--- Please file a bug at http://github.com/haskell-gi/haskell-gi.-data LayoutSetMarkupWithAccelMethodInfo-instance (p ~ (), o ~ O.MethodResolutionFailed "setMarkupWithAccel" Layout) => O.MethodInfo LayoutSetMarkupWithAccelMethodInfo o p where- overloadedMethod _ = undefined-#endif---- method Layout::set_single_paragraph_mode--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "setting", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "new setting", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_single_paragraph_mode" pango_layout_set_single_paragraph_mode :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CInt -> -- setting : TBasicType TBoolean- IO ()--{- |-If /@setting@/ is 'True', do not treat newlines and similar characters-as paragraph separators; instead, keep all text in a single paragraph,-and display a glyph for paragraph separator characters. Used when-you want to allow editing of newlines on a single text line.--}-layoutSetSingleParagraphMode ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Bool- {- ^ /@setting@/: new setting -}- -> m ()-layoutSetSingleParagraphMode layout setting = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let setting' = (fromIntegral . fromEnum) setting- pango_layout_set_single_paragraph_mode layout' setting'- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetSingleParagraphModeMethodInfo-instance (signature ~ (Bool -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetSingleParagraphModeMethodInfo a signature where- overloadedMethod _ = layoutSetSingleParagraphMode--#endif---- method Layout::set_spacing--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "spacing", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the amount of spacing", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_spacing" pango_layout_set_spacing :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- spacing : TBasicType TInt- IO ()--{- |-Sets the amount of spacing in Pango unit between the lines of the-layout.--}-layoutSetSpacing ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout'. -}- -> Int32- {- ^ /@spacing@/: the amount of spacing -}- -> m ()-layoutSetSpacing layout spacing = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- pango_layout_set_spacing layout' spacing- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetSpacingMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetSpacingMethodInfo a signature where- overloadedMethod _ = layoutSetSpacing--#endif---- method Layout::set_tabs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tabs", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #PangoTabArray, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_tabs" pango_layout_set_tabs :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Ptr Pango.TabArray.TabArray -> -- tabs : TInterface (Name {namespace = "Pango", name = "TabArray"})- IO ()--{- |-Sets the tabs to use for /@layout@/, overriding the default tabs-(by default, tabs are every 8 spaces). If /@tabs@/ is 'Nothing', the default-tabs are reinstated. /@tabs@/ is copied into the layout; you must-free your copy of /@tabs@/ yourself.--}-layoutSetTabs ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Maybe (Pango.TabArray.TabArray)- {- ^ /@tabs@/: a 'GI.Pango.Structs.TabArray.TabArray', or 'Nothing' -}- -> m ()-layoutSetTabs layout tabs = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- maybeTabs <- case tabs of- Nothing -> return nullPtr- Just jTabs -> do- jTabs' <- unsafeManagedPtrGetPtr jTabs- return jTabs'- pango_layout_set_tabs layout' maybeTabs- touchManagedPtr layout- whenJust tabs touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data LayoutSetTabsMethodInfo-instance (signature ~ (Maybe (Pango.TabArray.TabArray) -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetTabsMethodInfo a signature where- overloadedMethod _ = layoutSetTabs--#endif---- method Layout::set_text--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a valid UTF-8 string", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "maximum length of @text, in bytes. -1 indicates that\n the string is nul-terminated and the length should be\n calculated. The text will also be truncated on\n encountering a nul-termination even when @length is\n positive.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_text" pango_layout_set_text :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- IO ()--{- |-Sets the text of the layout.--Note that if you have used-'GI.Pango.Objects.Layout.layoutSetMarkup' or 'GI.Pango.Objects.Layout.layoutSetMarkupWithAccel' on-/@layout@/ before, you may want to call 'GI.Pango.Objects.Layout.layoutSetAttributes' to clear-the attributes set on the layout from the markup as this function does not-clear attributes.--}-layoutSetText ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> T.Text- {- ^ /@text@/: a valid UTF-8 string -}- -> Int32- {- ^ /@length@/: maximum length of /@text@/, in bytes. -1 indicates that- the string is nul-terminated and the length should be- calculated. The text will also be truncated on- encountering a nul-termination even when /@length@/ is- positive. -}- -> m ()-layoutSetText layout text length_ = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- text' <- textToCString text- pango_layout_set_text layout' text' length_- touchManagedPtr layout- freeMem text'- return ()--#if ENABLE_OVERLOADING-data LayoutSetTextMethodInfo-instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetTextMethodInfo a signature where- overloadedMethod _ = layoutSetText--#endif---- method Layout::set_width--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the desired width in Pango units, or -1 to indicate that no\n wrapping or ellipsization should be performed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_width" pango_layout_set_width :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- width : TBasicType TInt- IO ()--{- |-Sets the width to which the lines of the 'GI.Pango.Objects.Layout.Layout' should wrap or-ellipsized. The default value is -1: no width set.--}-layoutSetWidth ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout'. -}- -> Int32- {- ^ /@width@/: the desired width in Pango units, or -1 to indicate that no- wrapping or ellipsization should be performed. -}- -> m ()-layoutSetWidth layout width = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- pango_layout_set_width layout' width- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetWidthMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetWidthMethodInfo a signature where- overloadedMethod _ = layoutSetWidth--#endif---- method Layout::set_wrap--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "wrap", argType = TInterface (Name {namespace = "Pango", name = "WrapMode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the wrap mode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_set_wrap" pango_layout_set_wrap :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- CUInt -> -- wrap : TInterface (Name {namespace = "Pango", name = "WrapMode"})- IO ()--{- |-Sets the wrap mode; the wrap mode only has effect if a width-is set on the layout with 'GI.Pango.Objects.Layout.layoutSetWidth'.-To turn off wrapping, set the width to -1.--}-layoutSetWrap ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Pango.Enums.WrapMode- {- ^ /@wrap@/: the wrap mode -}- -> m ()-layoutSetWrap layout wrap = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- let wrap' = (fromIntegral . fromEnum) wrap- pango_layout_set_wrap layout' wrap'- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data LayoutSetWrapMethodInfo-instance (signature ~ (Pango.Enums.WrapMode -> m ()), MonadIO m, IsLayout a) => O.MethodInfo LayoutSetWrapMethodInfo a signature where- overloadedMethod _ = layoutSetWrap--#endif---- method Layout::xy_to_index--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the X offset (in Pango units)\n from the left edge of the layout.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the Y offset (in Pango units)\n from the top edge of the layout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store calculated byte index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "trailing", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store a integer indicating where\n in the grapheme the user clicked. It will either\n be zero, or the number of characters in the\n grapheme. 0 represents the leading edge of the grapheme.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_xy_to_index" pango_layout_xy_to_index :: - Ptr Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- x : TBasicType TInt- Int32 -> -- y : TBasicType TInt- Ptr Int32 -> -- index_ : TBasicType TInt- Ptr Int32 -> -- trailing : TBasicType TInt- IO CInt--{- |-Converts from X and Y position within a layout to the byte-index to the character at that logical position. If the-Y position is not inside the layout, the closest position is chosen-(the position will be clamped inside the layout). If the-X position is not within the layout, then the start or the-end of the line is chosen as described for 'GI.Pango.Structs.LayoutLine.layoutLineXToIndex'.-If either the X or Y positions were not inside the layout, then the-function returns 'False'; on an exact hit, it returns 'True'.--}-layoutXyToIndex ::- (B.CallStack.HasCallStack, MonadIO m, IsLayout a) =>- a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Int32- {- ^ /@x@/: the X offset (in Pango units)- from the left edge of the layout. -}- -> Int32- {- ^ /@y@/: the Y offset (in Pango units)- from the top edge of the layout -}- -> m ((Bool, Int32, Int32))- {- ^ __Returns:__ 'True' if the coordinates were inside text, 'False' otherwise. -}-layoutXyToIndex layout x y = liftIO $ do- layout' <- unsafeManagedPtrCastPtr layout- index_ <- allocMem :: IO (Ptr Int32)- trailing <- allocMem :: IO (Ptr Int32)- result <- pango_layout_xy_to_index layout' x y index_ trailing- let result' = (/= 0) result- index_' <- peek index_- trailing' <- peek trailing- touchManagedPtr layout- freeMem index_- freeMem trailing- return (result', index_', trailing')--#if ENABLE_OVERLOADING-data LayoutXyToIndexMethodInfo-instance (signature ~ (Int32 -> Int32 -> m ((Bool, Int32, Int32))), MonadIO m, IsLayout a) => O.MethodInfo LayoutXyToIndexMethodInfo a signature where- overloadedMethod _ = layoutXyToIndex--#endif--
− GI/Pango/Objects/Layout.hs-boot
@@ -1,197 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.Layout where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Layout = Layout (ManagedPtr Layout)-instance GObject Layout where-class (GObject o, O.IsDescendantOf Layout o) => IsLayout o-instance (GObject o, O.IsDescendantOf Layout o) => IsLayout o-instance O.HasParentTypes Layout-#if ENABLE_OVERLOADING-data LayoutContextChangedMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetAlignmentMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetAttributesMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetAutoDirMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetBaselineMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetCharacterCountMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetContextMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetCursorPosMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetEllipsizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetFontDescriptionMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetHeightMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetIndentMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetIterMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetJustifyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetLineMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetLineCountMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetLineReadonlyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetLinesMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetLinesReadonlyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetLogAttrsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetLogAttrsReadonlyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetPixelExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetPixelSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetSerialMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetSingleParagraphModeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetSpacingMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetTabsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetTextMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetUnknownGlyphsCountMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetWidthMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutGetWrapMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIndexToLineXMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIndexToPosMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIsEllipsizedMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIsWrappedMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutMoveCursorVisuallyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetAlignmentMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetAttributesMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetAutoDirMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetEllipsizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetFontDescriptionMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetHeightMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetIndentMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetJustifyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetMarkupMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetMarkupWithAccelMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetSingleParagraphModeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetSpacingMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetTabsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetTextMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetWidthMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutSetWrapMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutXyToIndexMethodInfo-#endif
− GI/Pango/Objects/Renderer.hs
@@ -1,1232 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--'GI.Pango.Objects.Renderer.Renderer' is a base class for objects that are used to-render Pango objects such as 'GI.Pango.Structs.GlyphString.GlyphString' and-'GI.Pango.Objects.Layout.Layout'.--/Since: 1.8/--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Objects.Renderer- ( ---- * Exported types- Renderer(..) ,- IsRenderer ,- toRenderer ,- noRenderer ,--- -- * Methods--- ** activate #method:activate#--#if ENABLE_OVERLOADING- RendererActivateMethodInfo ,-#endif- rendererActivate ,----- ** deactivate #method:deactivate#--#if ENABLE_OVERLOADING- RendererDeactivateMethodInfo ,-#endif- rendererDeactivate ,----- ** drawErrorUnderline #method:drawErrorUnderline#--#if ENABLE_OVERLOADING- RendererDrawErrorUnderlineMethodInfo ,-#endif- rendererDrawErrorUnderline ,----- ** drawGlyph #method:drawGlyph#--#if ENABLE_OVERLOADING- RendererDrawGlyphMethodInfo ,-#endif- rendererDrawGlyph ,----- ** drawGlyphItem #method:drawGlyphItem#--#if ENABLE_OVERLOADING- RendererDrawGlyphItemMethodInfo ,-#endif- rendererDrawGlyphItem ,----- ** drawGlyphs #method:drawGlyphs#--#if ENABLE_OVERLOADING- RendererDrawGlyphsMethodInfo ,-#endif- rendererDrawGlyphs ,----- ** drawLayout #method:drawLayout#--#if ENABLE_OVERLOADING- RendererDrawLayoutMethodInfo ,-#endif- rendererDrawLayout ,----- ** drawLayoutLine #method:drawLayoutLine#--#if ENABLE_OVERLOADING- RendererDrawLayoutLineMethodInfo ,-#endif- rendererDrawLayoutLine ,----- ** drawRectangle #method:drawRectangle#--#if ENABLE_OVERLOADING- RendererDrawRectangleMethodInfo ,-#endif- rendererDrawRectangle ,----- ** drawTrapezoid #method:drawTrapezoid#--#if ENABLE_OVERLOADING- RendererDrawTrapezoidMethodInfo ,-#endif- rendererDrawTrapezoid ,----- ** getAlpha #method:getAlpha#--#if ENABLE_OVERLOADING- RendererGetAlphaMethodInfo ,-#endif- rendererGetAlpha ,----- ** getColor #method:getColor#--#if ENABLE_OVERLOADING- RendererGetColorMethodInfo ,-#endif- rendererGetColor ,----- ** getLayout #method:getLayout#--#if ENABLE_OVERLOADING- RendererGetLayoutMethodInfo ,-#endif- rendererGetLayout ,----- ** getLayoutLine #method:getLayoutLine#--#if ENABLE_OVERLOADING- RendererGetLayoutLineMethodInfo ,-#endif- rendererGetLayoutLine ,----- ** getMatrix #method:getMatrix#--#if ENABLE_OVERLOADING- RendererGetMatrixMethodInfo ,-#endif- rendererGetMatrix ,----- ** partChanged #method:partChanged#--#if ENABLE_OVERLOADING- RendererPartChangedMethodInfo ,-#endif- rendererPartChanged ,----- ** setAlpha #method:setAlpha#--#if ENABLE_OVERLOADING- RendererSetAlphaMethodInfo ,-#endif- rendererSetAlpha ,----- ** setColor #method:setColor#--#if ENABLE_OVERLOADING- RendererSetColorMethodInfo ,-#endif- rendererSetColor ,----- ** setMatrix #method:setMatrix#--#if ENABLE_OVERLOADING- RendererSetMatrixMethodInfo ,-#endif- rendererSetMatrix ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GObject.Objects.Object as GObject.Object-import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums-import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Objects.Layout as Pango.Layout-import {-# SOURCE #-} qualified GI.Pango.Structs.Color as Pango.Color-import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphItem as Pango.GlyphItem-import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphString as Pango.GlyphString-import {-# SOURCE #-} qualified GI.Pango.Structs.LayoutLine as Pango.LayoutLine-import {-# SOURCE #-} qualified GI.Pango.Structs.Matrix as Pango.Matrix---- | Memory-managed wrapper type.-newtype Renderer = Renderer (ManagedPtr Renderer)-foreign import ccall "pango_renderer_get_type"- c_pango_renderer_get_type :: IO GType--instance GObject Renderer where- gobjectType = c_pango_renderer_get_type- ---- | Type class for types which can be safely cast to `Renderer`, for instance with `toRenderer`.-class (GObject o, O.IsDescendantOf Renderer o) => IsRenderer o-instance (GObject o, O.IsDescendantOf Renderer o) => IsRenderer o--instance O.HasParentTypes Renderer-type instance O.ParentTypes Renderer = '[GObject.Object.Object]---- | Cast to `Renderer`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.-toRenderer :: (MonadIO m, IsRenderer o) => o -> m Renderer-toRenderer = liftIO . unsafeCastTo Renderer---- | A convenience alias for `Nothing` :: `Maybe` `Renderer`.-noRenderer :: Maybe Renderer-noRenderer = Nothing--#if ENABLE_OVERLOADING-type family ResolveRendererMethod (t :: Symbol) (o :: *) :: * where- ResolveRendererMethod "activate" o = RendererActivateMethodInfo- ResolveRendererMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveRendererMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveRendererMethod "deactivate" o = RendererDeactivateMethodInfo- ResolveRendererMethod "drawErrorUnderline" o = RendererDrawErrorUnderlineMethodInfo- ResolveRendererMethod "drawGlyph" o = RendererDrawGlyphMethodInfo- ResolveRendererMethod "drawGlyphItem" o = RendererDrawGlyphItemMethodInfo- ResolveRendererMethod "drawGlyphs" o = RendererDrawGlyphsMethodInfo- ResolveRendererMethod "drawLayout" o = RendererDrawLayoutMethodInfo- ResolveRendererMethod "drawLayoutLine" o = RendererDrawLayoutLineMethodInfo- ResolveRendererMethod "drawRectangle" o = RendererDrawRectangleMethodInfo- ResolveRendererMethod "drawTrapezoid" o = RendererDrawTrapezoidMethodInfo- ResolveRendererMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo- ResolveRendererMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo- ResolveRendererMethod "getv" o = GObject.Object.ObjectGetvMethodInfo- ResolveRendererMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo- ResolveRendererMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo- ResolveRendererMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo- ResolveRendererMethod "partChanged" o = RendererPartChangedMethodInfo- ResolveRendererMethod "ref" o = GObject.Object.ObjectRefMethodInfo- ResolveRendererMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo- ResolveRendererMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo- ResolveRendererMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo- ResolveRendererMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo- ResolveRendererMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo- ResolveRendererMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo- ResolveRendererMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo- ResolveRendererMethod "getAlpha" o = RendererGetAlphaMethodInfo- ResolveRendererMethod "getColor" o = RendererGetColorMethodInfo- ResolveRendererMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo- ResolveRendererMethod "getLayout" o = RendererGetLayoutMethodInfo- ResolveRendererMethod "getLayoutLine" o = RendererGetLayoutLineMethodInfo- ResolveRendererMethod "getMatrix" o = RendererGetMatrixMethodInfo- ResolveRendererMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveRendererMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveRendererMethod "setAlpha" o = RendererSetAlphaMethodInfo- ResolveRendererMethod "setColor" o = RendererSetColorMethodInfo- ResolveRendererMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveRendererMethod "setMatrix" o = RendererSetMatrixMethodInfo- ResolveRendererMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveRendererMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveRendererMethod t Renderer, O.MethodInfo info Renderer p) => OL.IsLabel t (Renderer -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--#if ENABLE_OVERLOADING-instance O.HasAttributeList Renderer-type instance O.AttributeList Renderer = RendererAttributeList-type RendererAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type instance O.SignalList Renderer = RendererSignalList-type RendererSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif---- method Renderer::activate--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_activate" pango_renderer_activate :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- IO ()--{- |-Does initial setup before rendering operations on /@renderer@/.-'GI.Pango.Objects.Renderer.rendererDeactivate' should be called when done drawing.-Calls such as 'GI.Pango.Objects.Renderer.rendererDrawLayout' automatically-activate the layout before drawing on it. Calls to-'GI.Pango.Objects.Renderer.rendererActivate' and 'GI.Pango.Objects.Renderer.rendererDeactivate' can-be nested and the renderer will only be initialized and-deinitialized once.--/Since: 1.8/--}-rendererActivate ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> m ()-rendererActivate renderer = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- pango_renderer_activate renderer'- touchManagedPtr renderer- return ()--#if ENABLE_OVERLOADING-data RendererActivateMethodInfo-instance (signature ~ (m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererActivateMethodInfo a signature where- overloadedMethod _ = rendererActivate--#endif---- method Renderer::deactivate--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_deactivate" pango_renderer_deactivate :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- IO ()--{- |-Cleans up after rendering operations on /@renderer@/. See-docs for 'GI.Pango.Objects.Renderer.rendererActivate'.--/Since: 1.8/--}-rendererDeactivate ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> m ()-rendererDeactivate renderer = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- pango_renderer_deactivate renderer'- touchManagedPtr renderer- return ()--#if ENABLE_OVERLOADING-data RendererDeactivateMethodInfo-instance (signature ~ (m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDeactivateMethodInfo a signature where- overloadedMethod _ = rendererDeactivate--#endif---- method Renderer::draw_error_underline--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X coordinate of underline, in Pango units in user coordinate system", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y coordinate of underline, in Pango units in user coordinate system", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "width of underline, in Pango units in user coordinate system", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "height of underline, in Pango units in user coordinate system", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_error_underline" pango_renderer_draw_error_underline :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- Int32 -> -- x : TBasicType TInt- Int32 -> -- y : TBasicType TInt- Int32 -> -- width : TBasicType TInt- Int32 -> -- height : TBasicType TInt- IO ()--{- |-Draw a squiggly line that approximately covers the given rectangle-in the style of an underline used to indicate a spelling error.-(The width of the underline is rounded to an integer number-of up\/down segments and the resulting rectangle is centered-in the original rectangle)--This should be called while /@renderer@/ is already active. Use-'GI.Pango.Objects.Renderer.rendererActivate' to activate a renderer.--/Since: 1.8/--}-rendererDrawErrorUnderline ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Int32- {- ^ /@x@/: X coordinate of underline, in Pango units in user coordinate system -}- -> Int32- {- ^ /@y@/: Y coordinate of underline, in Pango units in user coordinate system -}- -> Int32- {- ^ /@width@/: width of underline, in Pango units in user coordinate system -}- -> Int32- {- ^ /@height@/: height of underline, in Pango units in user coordinate system -}- -> m ()-rendererDrawErrorUnderline renderer x y width height = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- pango_renderer_draw_error_underline renderer' x y width height- touchManagedPtr renderer- return ()--#if ENABLE_OVERLOADING-data RendererDrawErrorUnderlineMethodInfo-instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawErrorUnderlineMethodInfo a signature where- overloadedMethod _ = rendererDrawErrorUnderline--#endif---- method Renderer::draw_glyph--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyph", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the glyph index of a single glyph", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X coordinate of left edge of baseline of glyph", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y coordinate of left edge of baseline of glyph", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_glyph" pango_renderer_draw_glyph :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- Ptr Pango.Font.Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Word32 -> -- glyph : TBasicType TUInt32- CDouble -> -- x : TBasicType TDouble- CDouble -> -- y : TBasicType TDouble- IO ()--{- |-Draws a single glyph with coordinates in device space.--/Since: 1.8/--}-rendererDrawGlyph ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a, Pango.Font.IsFont b) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> b- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> Word32- {- ^ /@glyph@/: the glyph index of a single glyph -}- -> Double- {- ^ /@x@/: X coordinate of left edge of baseline of glyph -}- -> Double- {- ^ /@y@/: Y coordinate of left edge of baseline of glyph -}- -> m ()-rendererDrawGlyph renderer font glyph x y = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- font' <- unsafeManagedPtrCastPtr font- let x' = realToFrac x- let y' = realToFrac y- pango_renderer_draw_glyph renderer' font' glyph x' y'- touchManagedPtr renderer- touchManagedPtr font- return ()--#if ENABLE_OVERLOADING-data RendererDrawGlyphMethodInfo-instance (signature ~ (b -> Word32 -> Double -> Double -> m ()), MonadIO m, IsRenderer a, Pango.Font.IsFont b) => O.MethodInfo RendererDrawGlyphMethodInfo a signature where- overloadedMethod _ = rendererDrawGlyph--#endif---- method Renderer::draw_glyph_item--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the UTF-8 text that @glyph_item refers to, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyph_item", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItem", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_glyph_item" pango_renderer_draw_glyph_item :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CString -> -- text : TBasicType TUTF8- Ptr Pango.GlyphItem.GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- Int32 -> -- x : TBasicType TInt- Int32 -> -- y : TBasicType TInt- IO ()--{- |-Draws the glyphs in /@glyphItem@/ with the specified 'GI.Pango.Objects.Renderer.Renderer',-embedding the text associated with the glyphs in the output if the-output format supports it (PDF for example).--Note that /@text@/ is the start of the text for layout, which is then-indexed by \<literal>/@glyphItem@/->item->offset\<\/literal>.--If /@text@/ is 'Nothing', this simply calls 'GI.Pango.Objects.Renderer.rendererDrawGlyphs'.--The default implementation of this method simply falls back to-'GI.Pango.Objects.Renderer.rendererDrawGlyphs'.--/Since: 1.22/--}-rendererDrawGlyphItem ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Maybe (T.Text)- {- ^ /@text@/: the UTF-8 text that /@glyphItem@/ refers to, or 'Nothing' -}- -> Pango.GlyphItem.GlyphItem- {- ^ /@glyphItem@/: a 'GI.Pango.Structs.GlyphItem.GlyphItem' -}- -> Int32- {- ^ /@x@/: X position of left edge of baseline, in user space coordinates- in Pango units. -}- -> Int32- {- ^ /@y@/: Y position of left edge of baseline, in user space coordinates- in Pango units. -}- -> m ()-rendererDrawGlyphItem renderer text glyphItem x y = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- maybeText <- case text of- Nothing -> return nullPtr- Just jText -> do- jText' <- textToCString jText- return jText'- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- pango_renderer_draw_glyph_item renderer' maybeText glyphItem' x y- touchManagedPtr renderer- touchManagedPtr glyphItem- freeMem maybeText- return ()--#if ENABLE_OVERLOADING-data RendererDrawGlyphItemMethodInfo-instance (signature ~ (Maybe (T.Text) -> Pango.GlyphItem.GlyphItem -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawGlyphItemMethodInfo a signature where- overloadedMethod _ = rendererDrawGlyphItem--#endif---- method Renderer::draw_glyphs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_glyphs" pango_renderer_draw_glyphs :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- Ptr Pango.Font.Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Ptr Pango.GlyphString.GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- Int32 -> -- x : TBasicType TInt- Int32 -> -- y : TBasicType TInt- IO ()--{- |-Draws the glyphs in /@glyphs@/ with the specified 'GI.Pango.Objects.Renderer.Renderer'.--/Since: 1.8/--}-rendererDrawGlyphs ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a, Pango.Font.IsFont b) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> b- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> Pango.GlyphString.GlyphString- {- ^ /@glyphs@/: a 'GI.Pango.Structs.GlyphString.GlyphString' -}- -> Int32- {- ^ /@x@/: X position of left edge of baseline, in user space coordinates- in Pango units. -}- -> Int32- {- ^ /@y@/: Y position of left edge of baseline, in user space coordinates- in Pango units. -}- -> m ()-rendererDrawGlyphs renderer font glyphs x y = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- font' <- unsafeManagedPtrCastPtr font- glyphs' <- unsafeManagedPtrGetPtr glyphs- pango_renderer_draw_glyphs renderer' font' glyphs' x y- touchManagedPtr renderer- touchManagedPtr font- touchManagedPtr glyphs- return ()--#if ENABLE_OVERLOADING-data RendererDrawGlyphsMethodInfo-instance (signature ~ (b -> Pango.GlyphString.GlyphString -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a, Pango.Font.IsFont b) => O.MethodInfo RendererDrawGlyphsMethodInfo a signature where- overloadedMethod _ = rendererDrawGlyphs--#endif---- method Renderer::draw_layout--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "layout", argType = TInterface (Name {namespace = "Pango", name = "Layout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_layout" pango_renderer_draw_layout :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- Ptr Pango.Layout.Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- Int32 -> -- x : TBasicType TInt- Int32 -> -- y : TBasicType TInt- IO ()--{- |-Draws /@layout@/ with the specified 'GI.Pango.Objects.Renderer.Renderer'.--/Since: 1.8/--}-rendererDrawLayout ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a, Pango.Layout.IsLayout b) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> b- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout' -}- -> Int32- {- ^ /@x@/: X position of left edge of baseline, in user space coordinates- in Pango units. -}- -> Int32- {- ^ /@y@/: Y position of left edge of baseline, in user space coordinates- in Pango units. -}- -> m ()-rendererDrawLayout renderer layout x y = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- layout' <- unsafeManagedPtrCastPtr layout- pango_renderer_draw_layout renderer' layout' x y- touchManagedPtr renderer- touchManagedPtr layout- return ()--#if ENABLE_OVERLOADING-data RendererDrawLayoutMethodInfo-instance (signature ~ (b -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a, Pango.Layout.IsLayout b) => O.MethodInfo RendererDrawLayoutMethodInfo a signature where- overloadedMethod _ = rendererDrawLayout--#endif---- method Renderer::draw_layout_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y position of left edge of baseline, in user space coordinates\n in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_layout_line" pango_renderer_draw_layout_line :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- Ptr Pango.LayoutLine.LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- Int32 -> -- x : TBasicType TInt- Int32 -> -- y : TBasicType TInt- IO ()--{- |-Draws /@line@/ with the specified 'GI.Pango.Objects.Renderer.Renderer'.--/Since: 1.8/--}-rendererDrawLayoutLine ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.LayoutLine.LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> Int32- {- ^ /@x@/: X position of left edge of baseline, in user space coordinates- in Pango units. -}- -> Int32- {- ^ /@y@/: Y position of left edge of baseline, in user space coordinates- in Pango units. -}- -> m ()-rendererDrawLayoutLine renderer line x y = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- line' <- unsafeManagedPtrGetPtr line- pango_renderer_draw_layout_line renderer' line' x y- touchManagedPtr renderer- touchManagedPtr line- return ()--#if ENABLE_OVERLOADING-data RendererDrawLayoutLineMethodInfo-instance (signature ~ (Pango.LayoutLine.LayoutLine -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawLayoutLineMethodInfo a signature where- overloadedMethod _ = rendererDrawLayoutLine--#endif---- method Renderer::draw_rectangle--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "part", argType = TInterface (Name {namespace = "Pango", name = "RenderPart"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "type of object this rectangle is part of", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X position at which to draw rectangle, in user space coordinates in Pango units", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y position at which to draw rectangle, in user space coordinates in Pango units", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "width of rectangle in Pango units in user space coordinates", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "height of rectangle in Pango units in user space coordinates", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_rectangle" pango_renderer_draw_rectangle :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CUInt -> -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})- Int32 -> -- x : TBasicType TInt- Int32 -> -- y : TBasicType TInt- Int32 -> -- width : TBasicType TInt- Int32 -> -- height : TBasicType TInt- IO ()--{- |-Draws an axis-aligned rectangle in user space coordinates with the-specified 'GI.Pango.Objects.Renderer.Renderer'.--This should be called while /@renderer@/ is already active. Use-'GI.Pango.Objects.Renderer.rendererActivate' to activate a renderer.--/Since: 1.8/--}-rendererDrawRectangle ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.Enums.RenderPart- {- ^ /@part@/: type of object this rectangle is part of -}- -> Int32- {- ^ /@x@/: X position at which to draw rectangle, in user space coordinates in Pango units -}- -> Int32- {- ^ /@y@/: Y position at which to draw rectangle, in user space coordinates in Pango units -}- -> Int32- {- ^ /@width@/: width of rectangle in Pango units in user space coordinates -}- -> Int32- {- ^ /@height@/: height of rectangle in Pango units in user space coordinates -}- -> m ()-rendererDrawRectangle renderer part x y width height = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- let part' = (fromIntegral . fromEnum) part- pango_renderer_draw_rectangle renderer' part' x y width height- touchManagedPtr renderer- return ()--#if ENABLE_OVERLOADING-data RendererDrawRectangleMethodInfo-instance (signature ~ (Pango.Enums.RenderPart -> Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawRectangleMethodInfo a signature where- overloadedMethod _ = rendererDrawRectangle--#endif---- method Renderer::draw_trapezoid--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "part", argType = TInterface (Name {namespace = "Pango", name = "RenderPart"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "type of object this trapezoid is part of", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y1_", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y coordinate of top of trapezoid", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x11", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X coordinate of left end of top of trapezoid", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x21", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X coordinate of right end of top of trapezoid", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y2", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y coordinate of bottom of trapezoid", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x12", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X coordinate of left end of bottom of trapezoid", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x22", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X coordinate of right end of bottom of trapezoid", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_draw_trapezoid" pango_renderer_draw_trapezoid :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CUInt -> -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})- CDouble -> -- y1_ : TBasicType TDouble- CDouble -> -- x11 : TBasicType TDouble- CDouble -> -- x21 : TBasicType TDouble- CDouble -> -- y2 : TBasicType TDouble- CDouble -> -- x12 : TBasicType TDouble- CDouble -> -- x22 : TBasicType TDouble- IO ()--{- |-Draws a trapezoid with the parallel sides aligned with the X axis-using the given 'GI.Pango.Objects.Renderer.Renderer'; coordinates are in device space.--/Since: 1.8/--}-rendererDrawTrapezoid ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.Enums.RenderPart- {- ^ /@part@/: type of object this trapezoid is part of -}- -> Double- {- ^ /@y1_@/: Y coordinate of top of trapezoid -}- -> Double- {- ^ /@x11@/: X coordinate of left end of top of trapezoid -}- -> Double- {- ^ /@x21@/: X coordinate of right end of top of trapezoid -}- -> Double- {- ^ /@y2@/: Y coordinate of bottom of trapezoid -}- -> Double- {- ^ /@x12@/: X coordinate of left end of bottom of trapezoid -}- -> Double- {- ^ /@x22@/: X coordinate of right end of bottom of trapezoid -}- -> m ()-rendererDrawTrapezoid renderer part y1_ x11 x21 y2 x12 x22 = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- let part' = (fromIntegral . fromEnum) part- let y1_' = realToFrac y1_- let x11' = realToFrac x11- let x21' = realToFrac x21- let y2' = realToFrac y2- let x12' = realToFrac x12- let x22' = realToFrac x22- pango_renderer_draw_trapezoid renderer' part' y1_' x11' x21' y2' x12' x22'- touchManagedPtr renderer- return ()--#if ENABLE_OVERLOADING-data RendererDrawTrapezoidMethodInfo-instance (signature ~ (Pango.Enums.RenderPart -> Double -> Double -> Double -> Double -> Double -> Double -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawTrapezoidMethodInfo a signature where- overloadedMethod _ = rendererDrawTrapezoid--#endif---- method Renderer::get_alpha--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "part", argType = TInterface (Name {namespace = "Pango", name = "RenderPart"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the part to get the alpha for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt16)--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_get_alpha" pango_renderer_get_alpha :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CUInt -> -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})- IO Word16--{- |-Gets the current alpha for the specified part.--/Since: 1.38/--}-rendererGetAlpha ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.Enums.RenderPart- {- ^ /@part@/: the part to get the alpha for -}- -> m Word16- {- ^ __Returns:__ the alpha for the specified part,- or 0 if it hasn\'t been set and should be- inherited from the environment. -}-rendererGetAlpha renderer part = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- let part' = (fromIntegral . fromEnum) part- result <- pango_renderer_get_alpha renderer' part'- touchManagedPtr renderer- return result--#if ENABLE_OVERLOADING-data RendererGetAlphaMethodInfo-instance (signature ~ (Pango.Enums.RenderPart -> m Word16), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetAlphaMethodInfo a signature where- overloadedMethod _ = rendererGetAlpha--#endif---- method Renderer::get_color--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "part", argType = TInterface (Name {namespace = "Pango", name = "RenderPart"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the part to get the color for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Color"}))--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_get_color" pango_renderer_get_color :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CUInt -> -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})- IO (Ptr Pango.Color.Color)--{- |-Gets the current rendering color for the specified part.--/Since: 1.8/--}-rendererGetColor ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.Enums.RenderPart- {- ^ /@part@/: the part to get the color for -}- -> m (Maybe Pango.Color.Color)- {- ^ __Returns:__ the color for the- specified part, or 'Nothing' if it hasn\'t been set and should be- inherited from the environment. -}-rendererGetColor renderer part = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- let part' = (fromIntegral . fromEnum) part- result <- pango_renderer_get_color renderer' part'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.Color.Color) result'- return result''- touchManagedPtr renderer- return maybeResult--#if ENABLE_OVERLOADING-data RendererGetColorMethodInfo-instance (signature ~ (Pango.Enums.RenderPart -> m (Maybe Pango.Color.Color)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetColorMethodInfo a signature where- overloadedMethod _ = rendererGetColor--#endif---- method Renderer::get_layout--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Layout"}))--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_get_layout" pango_renderer_get_layout :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- IO (Ptr Pango.Layout.Layout)--{- |-Gets the layout currently being rendered using /@renderer@/.-Calling this function only makes sense from inside a subclass\'s-methods, like in its draw_shape\<!---->() for example.--The returned layout should not be modified while still being-rendered.--/Since: 1.20/--}-rendererGetLayout ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> m (Maybe Pango.Layout.Layout)- {- ^ __Returns:__ the layout, or 'Nothing' if- no layout is being rendered using /@renderer@/ at this time. -}-rendererGetLayout renderer = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- result <- pango_renderer_get_layout renderer'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newObject Pango.Layout.Layout) result'- return result''- touchManagedPtr renderer- return maybeResult--#if ENABLE_OVERLOADING-data RendererGetLayoutMethodInfo-instance (signature ~ (m (Maybe Pango.Layout.Layout)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetLayoutMethodInfo a signature where- overloadedMethod _ = rendererGetLayout--#endif---- method Renderer::get_layout_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutLine"}))--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_get_layout_line" pango_renderer_get_layout_line :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- IO (Ptr Pango.LayoutLine.LayoutLine)--{- |-Gets the layout line currently being rendered using /@renderer@/.-Calling this function only makes sense from inside a subclass\'s-methods, like in its draw_shape\<!---->() for example.--The returned layout line should not be modified while still being-rendered.--/Since: 1.20/--}-rendererGetLayoutLine ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> m (Maybe Pango.LayoutLine.LayoutLine)- {- ^ __Returns:__ the layout line, or 'Nothing'- if no layout line is being rendered using /@renderer@/ at this time. -}-rendererGetLayoutLine renderer = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- result <- pango_renderer_get_layout_line renderer'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.LayoutLine.LayoutLine) result'- return result''- touchManagedPtr renderer- return maybeResult--#if ENABLE_OVERLOADING-data RendererGetLayoutLineMethodInfo-instance (signature ~ (m (Maybe Pango.LayoutLine.LayoutLine)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetLayoutLineMethodInfo a signature where- overloadedMethod _ = rendererGetLayoutLine--#endif---- method Renderer::get_matrix--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Matrix"}))--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_get_matrix" pango_renderer_get_matrix :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- IO (Ptr Pango.Matrix.Matrix)--{- |-Gets the transformation matrix that will be applied when-rendering. See 'GI.Pango.Objects.Renderer.rendererSetMatrix'.--/Since: 1.8/--}-rendererGetMatrix ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> m (Maybe Pango.Matrix.Matrix)- {- ^ __Returns:__ the matrix, or 'Nothing' if no matrix has- been set (which is the same as the identity matrix). The returned- matrix is owned by Pango and must not be modified or freed. -}-rendererGetMatrix renderer = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- result <- pango_renderer_get_matrix renderer'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.Matrix.Matrix) result'- return result''- touchManagedPtr renderer- return maybeResult--#if ENABLE_OVERLOADING-data RendererGetMatrixMethodInfo-instance (signature ~ (m (Maybe Pango.Matrix.Matrix)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetMatrixMethodInfo a signature where- overloadedMethod _ = rendererGetMatrix--#endif---- method Renderer::part_changed--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "part", argType = TInterface (Name {namespace = "Pango", name = "RenderPart"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the part for which rendering has changed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_part_changed" pango_renderer_part_changed :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CUInt -> -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})- IO ()--{- |-Informs Pango that the way that the rendering is done-for /@part@/ has changed in a way that would prevent multiple-pieces being joined together into one drawing call. For-instance, if a subclass of 'GI.Pango.Objects.Renderer.Renderer' was to add a stipple-option for drawing underlines, it needs to call--\<informalexample>\<programlisting>-pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);-\<\/programlisting>\<\/informalexample>--When the stipple changes or underlines with different stipples-might be joined together. Pango automatically calls this for-changes to colors. (See 'GI.Pango.Objects.Renderer.rendererSetColor')--/Since: 1.8/--}-rendererPartChanged ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.Enums.RenderPart- {- ^ /@part@/: the part for which rendering has changed. -}- -> m ()-rendererPartChanged renderer part = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- let part' = (fromIntegral . fromEnum) part- pango_renderer_part_changed renderer' part'- touchManagedPtr renderer- return ()--#if ENABLE_OVERLOADING-data RendererPartChangedMethodInfo-instance (signature ~ (Pango.Enums.RenderPart -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererPartChangedMethodInfo a signature where- overloadedMethod _ = rendererPartChanged--#endif---- method Renderer::set_alpha--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "part", argType = TInterface (Name {namespace = "Pango", name = "RenderPart"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the part to set the alpha for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alpha", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an alpha value between 1 and 65536, or 0 to unset the alpha", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_set_alpha" pango_renderer_set_alpha :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CUInt -> -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})- Word16 -> -- alpha : TBasicType TUInt16- IO ()--{- |-Sets the alpha for part of the rendering.-Note that the alpha may only be used if a color is-specified for /@part@/ as well.--/Since: 1.38/--}-rendererSetAlpha ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.Enums.RenderPart- {- ^ /@part@/: the part to set the alpha for -}- -> Word16- {- ^ /@alpha@/: an alpha value between 1 and 65536, or 0 to unset the alpha -}- -> m ()-rendererSetAlpha renderer part alpha = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- let part' = (fromIntegral . fromEnum) part- pango_renderer_set_alpha renderer' part' alpha- touchManagedPtr renderer- return ()--#if ENABLE_OVERLOADING-data RendererSetAlphaMethodInfo-instance (signature ~ (Pango.Enums.RenderPart -> Word16 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererSetAlphaMethodInfo a signature where- overloadedMethod _ = rendererSetAlpha--#endif---- method Renderer::set_color--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "part", argType = TInterface (Name {namespace = "Pango", name = "RenderPart"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the part to change the color of", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "color", argType = TInterface (Name {namespace = "Pango", name = "Color"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the new color or %NULL to unset the current color", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_set_color" pango_renderer_set_color :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- CUInt -> -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})- Ptr Pango.Color.Color -> -- color : TInterface (Name {namespace = "Pango", name = "Color"})- IO ()--{- |-Sets the color for part of the rendering.-Also see 'GI.Pango.Objects.Renderer.rendererSetAlpha'.--/Since: 1.8/--}-rendererSetColor ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Pango.Enums.RenderPart- {- ^ /@part@/: the part to change the color of -}- -> Maybe (Pango.Color.Color)- {- ^ /@color@/: the new color or 'Nothing' to unset the current color -}- -> m ()-rendererSetColor renderer part color = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- let part' = (fromIntegral . fromEnum) part- maybeColor <- case color of- Nothing -> return nullPtr- Just jColor -> do- jColor' <- unsafeManagedPtrGetPtr jColor- return jColor'- pango_renderer_set_color renderer' part' maybeColor- touchManagedPtr renderer- whenJust color touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data RendererSetColorMethodInfo-instance (signature ~ (Pango.Enums.RenderPart -> Maybe (Pango.Color.Color) -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererSetColorMethodInfo a signature where- overloadedMethod _ = rendererSetColor--#endif---- method Renderer::set_matrix--- method type : OrdinaryMethod--- Args : [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Pango", name = "Renderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, or %NULL to unset any existing matrix.\n (No matrix set is the same as setting the identity matrix.)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_renderer_set_matrix" pango_renderer_set_matrix :: - Ptr Renderer -> -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})- Ptr Pango.Matrix.Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- IO ()--{- |-Sets the transformation matrix that will be applied when rendering.--/Since: 1.8/--}-rendererSetMatrix ::- (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>- a- {- ^ /@renderer@/: a 'GI.Pango.Objects.Renderer.Renderer' -}- -> Maybe (Pango.Matrix.Matrix)- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', or 'Nothing' to unset any existing matrix.- (No matrix set is the same as setting the identity matrix.) -}- -> m ()-rendererSetMatrix renderer matrix = liftIO $ do- renderer' <- unsafeManagedPtrCastPtr renderer- maybeMatrix <- case matrix of- Nothing -> return nullPtr- Just jMatrix -> do- jMatrix' <- unsafeManagedPtrGetPtr jMatrix- return jMatrix'- pango_renderer_set_matrix renderer' maybeMatrix- touchManagedPtr renderer- whenJust matrix touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data RendererSetMatrixMethodInfo-instance (signature ~ (Maybe (Pango.Matrix.Matrix) -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererSetMatrixMethodInfo a signature where- overloadedMethod _ = rendererSetMatrix--#endif--
− GI/Pango/Objects/Renderer.hs-boot
@@ -1,86 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Objects.Renderer where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Renderer = Renderer (ManagedPtr Renderer)-instance GObject Renderer where-class (GObject o, O.IsDescendantOf Renderer o) => IsRenderer o-instance (GObject o, O.IsDescendantOf Renderer o) => IsRenderer o-instance O.HasParentTypes Renderer-#if ENABLE_OVERLOADING-data RendererActivateMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDeactivateMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawErrorUnderlineMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawGlyphMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawGlyphItemMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawGlyphsMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawLayoutMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawLayoutLineMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawRectangleMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererDrawTrapezoidMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererGetAlphaMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererGetColorMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererGetLayoutMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererGetLayoutLineMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererGetMatrixMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererPartChangedMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererSetAlphaMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererSetColorMethodInfo-#endif-#if ENABLE_OVERLOADING-data RendererSetMatrixMethodInfo-#endif
− GI/Pango/Structs.hs
@@ -1,115 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs- ( module GI.Pango.Structs.Analysis ,- module GI.Pango.Structs.AttrClass ,- module GI.Pango.Structs.AttrColor ,- module GI.Pango.Structs.AttrFloat ,- module GI.Pango.Structs.AttrFontDesc ,- module GI.Pango.Structs.AttrFontFeatures,- module GI.Pango.Structs.AttrInt ,- module GI.Pango.Structs.AttrIterator ,- module GI.Pango.Structs.AttrLanguage ,- module GI.Pango.Structs.AttrList ,- module GI.Pango.Structs.AttrShape ,- module GI.Pango.Structs.AttrSize ,- module GI.Pango.Structs.AttrString ,- module GI.Pango.Structs.Attribute ,- module GI.Pango.Structs.Color ,- module GI.Pango.Structs.Coverage ,- module GI.Pango.Structs.EngineInfo ,- module GI.Pango.Structs.EngineScriptInfo,- module GI.Pango.Structs.FontDescription ,- module GI.Pango.Structs.FontMetrics ,- module GI.Pango.Structs.GlyphGeometry ,- module GI.Pango.Structs.GlyphInfo ,- module GI.Pango.Structs.GlyphItem ,- module GI.Pango.Structs.GlyphItemIter ,- module GI.Pango.Structs.GlyphString ,- module GI.Pango.Structs.GlyphVisAttr ,- module GI.Pango.Structs.IncludedModule ,- module GI.Pango.Structs.Item ,- module GI.Pango.Structs.Language ,- module GI.Pango.Structs.LayoutIter ,- module GI.Pango.Structs.LayoutLine ,- module GI.Pango.Structs.LogAttr ,- module GI.Pango.Structs.Map ,- module GI.Pango.Structs.MapEntry ,- module GI.Pango.Structs.Matrix ,- module GI.Pango.Structs.Rectangle ,- module GI.Pango.Structs.ScriptIter ,- module GI.Pango.Structs.TabArray ,--- ) where--import GI.Pango.Structs.Analysis-import GI.Pango.Structs.AttrClass-import GI.Pango.Structs.AttrColor-import GI.Pango.Structs.AttrFloat-import GI.Pango.Structs.AttrFontDesc-import GI.Pango.Structs.AttrFontFeatures-import GI.Pango.Structs.AttrInt-import GI.Pango.Structs.AttrIterator-import GI.Pango.Structs.AttrLanguage-import GI.Pango.Structs.AttrList-import GI.Pango.Structs.AttrShape-import GI.Pango.Structs.AttrSize-import GI.Pango.Structs.AttrString-import GI.Pango.Structs.Attribute-import GI.Pango.Structs.Color-import GI.Pango.Structs.Coverage-import GI.Pango.Structs.EngineInfo-import GI.Pango.Structs.EngineScriptInfo-import GI.Pango.Structs.FontDescription-import GI.Pango.Structs.FontMetrics-import GI.Pango.Structs.GlyphGeometry-import GI.Pango.Structs.GlyphInfo-import GI.Pango.Structs.GlyphItem-import GI.Pango.Structs.GlyphItemIter-import GI.Pango.Structs.GlyphString-import GI.Pango.Structs.GlyphVisAttr-import GI.Pango.Structs.IncludedModule-import GI.Pango.Structs.Item-import GI.Pango.Structs.Language-import GI.Pango.Structs.LayoutIter-import GI.Pango.Structs.LayoutLine-import GI.Pango.Structs.LogAttr-import GI.Pango.Structs.Map-import GI.Pango.Structs.MapEntry-import GI.Pango.Structs.Matrix-import GI.Pango.Structs.Rectangle-import GI.Pango.Structs.ScriptIter-import GI.Pango.Structs.TabArray--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL---
− GI/Pango/Structs/Analysis.hs
@@ -1,669 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.Analysis.Analysis' structure stores information about-the properties of a segment of text.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Analysis- ( ---- * Exported types- Analysis(..) ,- newZeroAnalysis ,- noAnalysis ,--- -- * Properties--- ** extraAttrs #attr:extraAttrs#-{- | extra attributes for this segment.--}-#if ENABLE_OVERLOADING- analysis_extraAttrs ,-#endif- clearAnalysisExtraAttrs ,- getAnalysisExtraAttrs ,- setAnalysisExtraAttrs ,----- ** flags #attr:flags#-{- | boolean flags for this segment (currently only one) (Since: 1.16).--}-#if ENABLE_OVERLOADING- analysis_flags ,-#endif- getAnalysisFlags ,- setAnalysisFlags ,----- ** font #attr:font#-{- | the font for this segment.--}-#if ENABLE_OVERLOADING- analysis_font ,-#endif- clearAnalysisFont ,- getAnalysisFont ,- setAnalysisFont ,----- ** gravity #attr:gravity#-{- | the glyph orientation for this segment (A 'GI.Pango.Enums.Gravity').--}-#if ENABLE_OVERLOADING- analysis_gravity ,-#endif- getAnalysisGravity ,- setAnalysisGravity ,----- ** langEngine #attr:langEngine#-{- | the engine for doing rendering-system-independent processing.--}-#if ENABLE_OVERLOADING- analysis_langEngine ,-#endif- clearAnalysisLangEngine ,- getAnalysisLangEngine ,- setAnalysisLangEngine ,----- ** language #attr:language#-{- | the detected language for this segment.--}-#if ENABLE_OVERLOADING- analysis_language ,-#endif- clearAnalysisLanguage ,- getAnalysisLanguage ,- setAnalysisLanguage ,----- ** level #attr:level#-{- | the bidirectional level for this segment.--}-#if ENABLE_OVERLOADING- analysis_level ,-#endif- getAnalysisLevel ,- setAnalysisLevel ,----- ** script #attr:script#-{- | the detected script for this segment (A 'GI.Pango.Enums.Script') (Since: 1.18).--}-#if ENABLE_OVERLOADING- analysis_script ,-#endif- getAnalysisScript ,- setAnalysisScript ,----- ** shapeEngine #attr:shapeEngine#-{- | the engine for doing rendering-system-dependent processing.--}-#if ENABLE_OVERLOADING- analysis_shapeEngine ,-#endif- clearAnalysisShapeEngine ,- getAnalysisShapeEngine ,- setAnalysisShapeEngine ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Objects.EngineLang as Pango.EngineLang-import {-# SOURCE #-} qualified GI.Pango.Objects.EngineShape as Pango.EngineShape-import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language---- | Memory-managed wrapper type.-newtype Analysis = Analysis (ManagedPtr Analysis)-instance WrappedPtr Analysis where- wrappedPtrCalloc = callocBytes 48- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 48 >=> wrapPtr Analysis)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Analysis` struct initialized to zero.-newZeroAnalysis :: MonadIO m => m Analysis-newZeroAnalysis = liftIO $ wrappedPtrCalloc >>= wrapPtr Analysis--instance tag ~ 'AttrSet => Constructible Analysis tag where- new _ attrs = do- o <- newZeroAnalysis- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `Analysis`.-noAnalysis :: Maybe Analysis-noAnalysis = Nothing--{- |-Get the value of the “@shape_engine@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #shapeEngine-@--}-getAnalysisShapeEngine :: MonadIO m => Analysis -> m (Maybe Pango.EngineShape.EngineShape)-getAnalysisShapeEngine s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr Pango.EngineShape.EngineShape)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newObject Pango.EngineShape.EngineShape) val'- return val''- return result--{- |-Set the value of the “@shape_engine@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #shapeEngine 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisShapeEngine :: MonadIO m => Analysis -> Ptr Pango.EngineShape.EngineShape -> m ()-setAnalysisShapeEngine s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr Pango.EngineShape.EngineShape)--{- |-Set the value of the “@shape_engine@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #shapeEngine-@--}-clearAnalysisShapeEngine :: MonadIO m => Analysis -> m ()-clearAnalysisShapeEngine s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (FP.nullPtr :: Ptr Pango.EngineShape.EngineShape)--#if ENABLE_OVERLOADING-data AnalysisShapeEngineFieldInfo-instance AttrInfo AnalysisShapeEngineFieldInfo where- type AttrAllowedOps AnalysisShapeEngineFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AnalysisShapeEngineFieldInfo = (~) (Ptr Pango.EngineShape.EngineShape)- type AttrBaseTypeConstraint AnalysisShapeEngineFieldInfo = (~) Analysis- type AttrGetType AnalysisShapeEngineFieldInfo = Maybe Pango.EngineShape.EngineShape- type AttrLabel AnalysisShapeEngineFieldInfo = "shape_engine"- type AttrOrigin AnalysisShapeEngineFieldInfo = Analysis- attrGet _ = getAnalysisShapeEngine- attrSet _ = setAnalysisShapeEngine- attrConstruct = undefined- attrClear _ = clearAnalysisShapeEngine--analysis_shapeEngine :: AttrLabelProxy "shapeEngine"-analysis_shapeEngine = AttrLabelProxy--#endif---{- |-Get the value of the “@lang_engine@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #langEngine-@--}-getAnalysisLangEngine :: MonadIO m => Analysis -> m (Maybe Pango.EngineLang.EngineLang)-getAnalysisLangEngine s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (Ptr Pango.EngineLang.EngineLang)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newObject Pango.EngineLang.EngineLang) val'- return val''- return result--{- |-Set the value of the “@lang_engine@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #langEngine 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisLangEngine :: MonadIO m => Analysis -> Ptr Pango.EngineLang.EngineLang -> m ()-setAnalysisLangEngine s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Ptr Pango.EngineLang.EngineLang)--{- |-Set the value of the “@lang_engine@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #langEngine-@--}-clearAnalysisLangEngine :: MonadIO m => Analysis -> m ()-clearAnalysisLangEngine s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (FP.nullPtr :: Ptr Pango.EngineLang.EngineLang)--#if ENABLE_OVERLOADING-data AnalysisLangEngineFieldInfo-instance AttrInfo AnalysisLangEngineFieldInfo where- type AttrAllowedOps AnalysisLangEngineFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AnalysisLangEngineFieldInfo = (~) (Ptr Pango.EngineLang.EngineLang)- type AttrBaseTypeConstraint AnalysisLangEngineFieldInfo = (~) Analysis- type AttrGetType AnalysisLangEngineFieldInfo = Maybe Pango.EngineLang.EngineLang- type AttrLabel AnalysisLangEngineFieldInfo = "lang_engine"- type AttrOrigin AnalysisLangEngineFieldInfo = Analysis- attrGet _ = getAnalysisLangEngine- attrSet _ = setAnalysisLangEngine- attrConstruct = undefined- attrClear _ = clearAnalysisLangEngine--analysis_langEngine :: AttrLabelProxy "langEngine"-analysis_langEngine = AttrLabelProxy--#endif---{- |-Get the value of the “@font@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #font-@--}-getAnalysisFont :: MonadIO m => Analysis -> m (Maybe Pango.Font.Font)-getAnalysisFont s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (Ptr Pango.Font.Font)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newObject Pango.Font.Font) val'- return val''- return result--{- |-Set the value of the “@font@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #font 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisFont :: MonadIO m => Analysis -> Ptr Pango.Font.Font -> m ()-setAnalysisFont s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Ptr Pango.Font.Font)--{- |-Set the value of the “@font@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #font-@--}-clearAnalysisFont :: MonadIO m => Analysis -> m ()-clearAnalysisFont s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullPtr :: Ptr Pango.Font.Font)--#if ENABLE_OVERLOADING-data AnalysisFontFieldInfo-instance AttrInfo AnalysisFontFieldInfo where- type AttrAllowedOps AnalysisFontFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AnalysisFontFieldInfo = (~) (Ptr Pango.Font.Font)- type AttrBaseTypeConstraint AnalysisFontFieldInfo = (~) Analysis- type AttrGetType AnalysisFontFieldInfo = Maybe Pango.Font.Font- type AttrLabel AnalysisFontFieldInfo = "font"- type AttrOrigin AnalysisFontFieldInfo = Analysis- attrGet _ = getAnalysisFont- attrSet _ = setAnalysisFont- attrConstruct = undefined- attrClear _ = clearAnalysisFont--analysis_font :: AttrLabelProxy "font"-analysis_font = AttrLabelProxy--#endif---{- |-Get the value of the “@level@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #level-@--}-getAnalysisLevel :: MonadIO m => Analysis -> m Word8-getAnalysisLevel s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO Word8- return val--{- |-Set the value of the “@level@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #level 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisLevel :: MonadIO m => Analysis -> Word8 -> m ()-setAnalysisLevel s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Word8)--#if ENABLE_OVERLOADING-data AnalysisLevelFieldInfo-instance AttrInfo AnalysisLevelFieldInfo where- type AttrAllowedOps AnalysisLevelFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AnalysisLevelFieldInfo = (~) Word8- type AttrBaseTypeConstraint AnalysisLevelFieldInfo = (~) Analysis- type AttrGetType AnalysisLevelFieldInfo = Word8- type AttrLabel AnalysisLevelFieldInfo = "level"- type AttrOrigin AnalysisLevelFieldInfo = Analysis- attrGet _ = getAnalysisLevel- attrSet _ = setAnalysisLevel- attrConstruct = undefined- attrClear _ = undefined--analysis_level :: AttrLabelProxy "level"-analysis_level = AttrLabelProxy--#endif---{- |-Get the value of the “@gravity@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #gravity-@--}-getAnalysisGravity :: MonadIO m => Analysis -> m Word8-getAnalysisGravity s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 25) :: IO Word8- return val--{- |-Set the value of the “@gravity@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #gravity 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisGravity :: MonadIO m => Analysis -> Word8 -> m ()-setAnalysisGravity s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 25) (val :: Word8)--#if ENABLE_OVERLOADING-data AnalysisGravityFieldInfo-instance AttrInfo AnalysisGravityFieldInfo where- type AttrAllowedOps AnalysisGravityFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AnalysisGravityFieldInfo = (~) Word8- type AttrBaseTypeConstraint AnalysisGravityFieldInfo = (~) Analysis- type AttrGetType AnalysisGravityFieldInfo = Word8- type AttrLabel AnalysisGravityFieldInfo = "gravity"- type AttrOrigin AnalysisGravityFieldInfo = Analysis- attrGet _ = getAnalysisGravity- attrSet _ = setAnalysisGravity- attrConstruct = undefined- attrClear _ = undefined--analysis_gravity :: AttrLabelProxy "gravity"-analysis_gravity = AttrLabelProxy--#endif---{- |-Get the value of the “@flags@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #flags-@--}-getAnalysisFlags :: MonadIO m => Analysis -> m Word8-getAnalysisFlags s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 26) :: IO Word8- return val--{- |-Set the value of the “@flags@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #flags 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisFlags :: MonadIO m => Analysis -> Word8 -> m ()-setAnalysisFlags s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 26) (val :: Word8)--#if ENABLE_OVERLOADING-data AnalysisFlagsFieldInfo-instance AttrInfo AnalysisFlagsFieldInfo where- type AttrAllowedOps AnalysisFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AnalysisFlagsFieldInfo = (~) Word8- type AttrBaseTypeConstraint AnalysisFlagsFieldInfo = (~) Analysis- type AttrGetType AnalysisFlagsFieldInfo = Word8- type AttrLabel AnalysisFlagsFieldInfo = "flags"- type AttrOrigin AnalysisFlagsFieldInfo = Analysis- attrGet _ = getAnalysisFlags- attrSet _ = setAnalysisFlags- attrConstruct = undefined- attrClear _ = undefined--analysis_flags :: AttrLabelProxy "flags"-analysis_flags = AttrLabelProxy--#endif---{- |-Get the value of the “@script@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #script-@--}-getAnalysisScript :: MonadIO m => Analysis -> m Word8-getAnalysisScript s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 27) :: IO Word8- return val--{- |-Set the value of the “@script@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #script 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisScript :: MonadIO m => Analysis -> Word8 -> m ()-setAnalysisScript s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 27) (val :: Word8)--#if ENABLE_OVERLOADING-data AnalysisScriptFieldInfo-instance AttrInfo AnalysisScriptFieldInfo where- type AttrAllowedOps AnalysisScriptFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AnalysisScriptFieldInfo = (~) Word8- type AttrBaseTypeConstraint AnalysisScriptFieldInfo = (~) Analysis- type AttrGetType AnalysisScriptFieldInfo = Word8- type AttrLabel AnalysisScriptFieldInfo = "script"- type AttrOrigin AnalysisScriptFieldInfo = Analysis- attrGet _ = getAnalysisScript- attrSet _ = setAnalysisScript- attrConstruct = undefined- attrClear _ = undefined--analysis_script :: AttrLabelProxy "script"-analysis_script = AttrLabelProxy--#endif---{- |-Get the value of the “@language@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #language-@--}-getAnalysisLanguage :: MonadIO m => Analysis -> m (Maybe Pango.Language.Language)-getAnalysisLanguage s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO (Ptr Pango.Language.Language)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newBoxed Pango.Language.Language) val'- return val''- return result--{- |-Set the value of the “@language@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #language 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisLanguage :: MonadIO m => Analysis -> Ptr Pango.Language.Language -> m ()-setAnalysisLanguage s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: Ptr Pango.Language.Language)--{- |-Set the value of the “@language@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #language-@--}-clearAnalysisLanguage :: MonadIO m => Analysis -> m ()-clearAnalysisLanguage s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (FP.nullPtr :: Ptr Pango.Language.Language)--#if ENABLE_OVERLOADING-data AnalysisLanguageFieldInfo-instance AttrInfo AnalysisLanguageFieldInfo where- type AttrAllowedOps AnalysisLanguageFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AnalysisLanguageFieldInfo = (~) (Ptr Pango.Language.Language)- type AttrBaseTypeConstraint AnalysisLanguageFieldInfo = (~) Analysis- type AttrGetType AnalysisLanguageFieldInfo = Maybe Pango.Language.Language- type AttrLabel AnalysisLanguageFieldInfo = "language"- type AttrOrigin AnalysisLanguageFieldInfo = Analysis- attrGet _ = getAnalysisLanguage- attrSet _ = setAnalysisLanguage- attrConstruct = undefined- attrClear _ = clearAnalysisLanguage--analysis_language :: AttrLabelProxy "language"-analysis_language = AttrLabelProxy--#endif---{- |-Get the value of the “@extra_attrs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' analysis #extraAttrs-@--}-getAnalysisExtraAttrs :: MonadIO m => Analysis -> m ([Ptr ()])-getAnalysisExtraAttrs s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 40) :: IO (Ptr (GSList (Ptr ())))- val' <- unpackGSList val- return val'--{- |-Set the value of the “@extra_attrs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' analysis [ #extraAttrs 'Data.GI.Base.Attributes.:=' value ]-@--}-setAnalysisExtraAttrs :: MonadIO m => Analysis -> Ptr (GSList (Ptr ())) -> m ()-setAnalysisExtraAttrs s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 40) (val :: Ptr (GSList (Ptr ())))--{- |-Set the value of the “@extra_attrs@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #extraAttrs-@--}-clearAnalysisExtraAttrs :: MonadIO m => Analysis -> m ()-clearAnalysisExtraAttrs s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 40) (FP.nullPtr :: Ptr (GSList (Ptr ())))--#if ENABLE_OVERLOADING-data AnalysisExtraAttrsFieldInfo-instance AttrInfo AnalysisExtraAttrsFieldInfo where- type AttrAllowedOps AnalysisExtraAttrsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AnalysisExtraAttrsFieldInfo = (~) (Ptr (GSList (Ptr ())))- type AttrBaseTypeConstraint AnalysisExtraAttrsFieldInfo = (~) Analysis- type AttrGetType AnalysisExtraAttrsFieldInfo = [Ptr ()]- type AttrLabel AnalysisExtraAttrsFieldInfo = "extra_attrs"- type AttrOrigin AnalysisExtraAttrsFieldInfo = Analysis- attrGet _ = getAnalysisExtraAttrs- attrSet _ = setAnalysisExtraAttrs- attrConstruct = undefined- attrClear _ = clearAnalysisExtraAttrs--analysis_extraAttrs :: AttrLabelProxy "extraAttrs"-analysis_extraAttrs = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList Analysis-type instance O.AttributeList Analysis = AnalysisAttributeList-type AnalysisAttributeList = ('[ '("shapeEngine", AnalysisShapeEngineFieldInfo), '("langEngine", AnalysisLangEngineFieldInfo), '("font", AnalysisFontFieldInfo), '("level", AnalysisLevelFieldInfo), '("gravity", AnalysisGravityFieldInfo), '("flags", AnalysisFlagsFieldInfo), '("script", AnalysisScriptFieldInfo), '("language", AnalysisLanguageFieldInfo), '("extraAttrs", AnalysisExtraAttrsFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveAnalysisMethod (t :: Symbol) (o :: *) :: * where- ResolveAnalysisMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAnalysisMethod t Analysis, O.MethodInfo info Analysis p) => OL.IsLabel t (Analysis -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Analysis.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Analysis where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Analysis = Analysis (ManagedPtr Analysis)-instance WrappedPtr Analysis where
− GI/Pango/Structs/AttrClass.hs
@@ -1,295 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrClass.AttrClass' structure stores the type and operations for-a particular type of attribute. The functions in this structure should-not be called directly. Instead, one should use the wrapper functions-provided for 'GI.Pango.Structs.Attribute.Attribute'.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrClass- ( ---- * Exported types- AttrClass(..) ,- newZeroAttrClass ,- noAttrClass ,--- -- * Properties--- ** destroy #attr:destroy#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- attrClass_destroy ,-#endif- clearAttrClassDestroy ,- getAttrClassDestroy ,- setAttrClassDestroy ,----- ** equal #attr:equal#-{- | /No description available in the introspection data./--}-#if ENABLE_OVERLOADING- attrClass_equal ,-#endif- clearAttrClassEqual ,- getAttrClassEqual ,- setAttrClassEqual ,----- ** type #attr:type#-{- | the type ID for this attribute--}-#if ENABLE_OVERLOADING- attrClass_type ,-#endif- getAttrClassType ,- setAttrClassType ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.Pango.Callbacks as Pango.Callbacks-import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums---- | Memory-managed wrapper type.-newtype AttrClass = AttrClass (ManagedPtr AttrClass)-instance WrappedPtr AttrClass where- wrappedPtrCalloc = callocBytes 32- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 32 >=> wrapPtr AttrClass)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrClass` struct initialized to zero.-newZeroAttrClass :: MonadIO m => m AttrClass-newZeroAttrClass = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrClass--instance tag ~ 'AttrSet => Constructible AttrClass tag where- new _ attrs = do- o <- newZeroAttrClass- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrClass`.-noAttrClass :: Maybe AttrClass-noAttrClass = Nothing--{- |-Get the value of the “@type@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrClass #type-@--}-getAttrClassType :: MonadIO m => AttrClass -> m Pango.Enums.AttrType-getAttrClassType s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CUInt- let val' = (toEnum . fromIntegral) val- return val'--{- |-Set the value of the “@type@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrClass [ #type 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrClassType :: MonadIO m => AttrClass -> Pango.Enums.AttrType -> m ()-setAttrClassType s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 0) (val' :: CUInt)--#if ENABLE_OVERLOADING-data AttrClassTypeFieldInfo-instance AttrInfo AttrClassTypeFieldInfo where- type AttrAllowedOps AttrClassTypeFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AttrClassTypeFieldInfo = (~) Pango.Enums.AttrType- type AttrBaseTypeConstraint AttrClassTypeFieldInfo = (~) AttrClass- type AttrGetType AttrClassTypeFieldInfo = Pango.Enums.AttrType- type AttrLabel AttrClassTypeFieldInfo = "type"- type AttrOrigin AttrClassTypeFieldInfo = AttrClass- attrGet _ = getAttrClassType- attrSet _ = setAttrClassType- attrConstruct = undefined- attrClear _ = undefined--attrClass_type :: AttrLabelProxy "type"-attrClass_type = AttrLabelProxy--#endif---{- |-Get the value of the “@destroy@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrClass #destroy-@--}-getAttrClassDestroy :: MonadIO m => AttrClass -> m (Maybe Pango.Callbacks.AttrClassDestroyFieldCallback)-getAttrClassDestroy s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)- result <- SP.convertFunPtrIfNonNull val $ \val' -> do- let val'' = Pango.Callbacks.dynamic_AttrClassDestroyFieldCallback val'- return val''- return result--{- |-Set the value of the “@destroy@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrClass [ #destroy 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrClassDestroy :: MonadIO m => AttrClass -> FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback -> m ()-setAttrClassDestroy s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)--{- |-Set the value of the “@destroy@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #destroy-@--}-clearAttrClassDestroy :: MonadIO m => AttrClass -> m ()-clearAttrClassDestroy s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)--#if ENABLE_OVERLOADING-data AttrClassDestroyFieldInfo-instance AttrInfo AttrClassDestroyFieldInfo where- type AttrAllowedOps AttrClassDestroyFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrClassDestroyFieldInfo = (~) (FunPtr Pango.Callbacks.C_AttrClassDestroyFieldCallback)- type AttrBaseTypeConstraint AttrClassDestroyFieldInfo = (~) AttrClass- type AttrGetType AttrClassDestroyFieldInfo = Maybe Pango.Callbacks.AttrClassDestroyFieldCallback- type AttrLabel AttrClassDestroyFieldInfo = "destroy"- type AttrOrigin AttrClassDestroyFieldInfo = AttrClass- attrGet _ = getAttrClassDestroy- attrSet _ = setAttrClassDestroy- attrConstruct = undefined- attrClear _ = clearAttrClassDestroy--attrClass_destroy :: AttrLabelProxy "destroy"-attrClass_destroy = AttrLabelProxy--#endif---{- |-Get the value of the “@equal@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrClass #equal-@--}-getAttrClassEqual :: MonadIO m => AttrClass -> m (Maybe Pango.Callbacks.AttrClassEqualFieldCallback)-getAttrClassEqual s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO (FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)- result <- SP.convertFunPtrIfNonNull val $ \val' -> do- let val'' = Pango.Callbacks.dynamic_AttrClassEqualFieldCallback val'- return val''- return result--{- |-Set the value of the “@equal@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrClass [ #equal 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrClassEqual :: MonadIO m => AttrClass -> FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback -> m ()-setAttrClassEqual s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)--{- |-Set the value of the “@equal@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #equal-@--}-clearAttrClassEqual :: MonadIO m => AttrClass -> m ()-clearAttrClassEqual s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)--#if ENABLE_OVERLOADING-data AttrClassEqualFieldInfo-instance AttrInfo AttrClassEqualFieldInfo where- type AttrAllowedOps AttrClassEqualFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrClassEqualFieldInfo = (~) (FunPtr Pango.Callbacks.C_AttrClassEqualFieldCallback)- type AttrBaseTypeConstraint AttrClassEqualFieldInfo = (~) AttrClass- type AttrGetType AttrClassEqualFieldInfo = Maybe Pango.Callbacks.AttrClassEqualFieldCallback- type AttrLabel AttrClassEqualFieldInfo = "equal"- type AttrOrigin AttrClassEqualFieldInfo = AttrClass- attrGet _ = getAttrClassEqual- attrSet _ = setAttrClassEqual- attrConstruct = undefined- attrClear _ = clearAttrClassEqual--attrClass_equal :: AttrLabelProxy "equal"-attrClass_equal = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrClass-type instance O.AttributeList AttrClass = AttrClassAttributeList-type AttrClassAttributeList = ('[ '("type", AttrClassTypeFieldInfo), '("destroy", AttrClassDestroyFieldInfo), '("equal", AttrClassEqualFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrClassMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrClassMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrClassMethod t AttrClass, O.MethodInfo info AttrClass p) => OL.IsLabel t (AttrClass -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrClass.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrClass where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrClass = AttrClass (ManagedPtr AttrClass)-instance WrappedPtr AttrClass where
− GI/Pango/Structs/AttrColor.hs
@@ -1,180 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrColor.AttrColor' structure is used to represent attributes that-are colors.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrColor- ( ---- * Exported types- AttrColor(..) ,- newZeroAttrColor ,- noAttrColor ,--- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrColor_attr ,-#endif- getAttrColorAttr ,----- ** color #attr:color#-{- | the 'GI.Pango.Structs.Color.Color' which is the value of the attribute--}-#if ENABLE_OVERLOADING- attrColor_color ,-#endif- getAttrColorColor ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute-import {-# SOURCE #-} qualified GI.Pango.Structs.Color as Pango.Color---- | Memory-managed wrapper type.-newtype AttrColor = AttrColor (ManagedPtr AttrColor)-instance WrappedPtr AttrColor where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrColor)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrColor` struct initialized to zero.-newZeroAttrColor :: MonadIO m => m AttrColor-newZeroAttrColor = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrColor--instance tag ~ 'AttrSet => Constructible AttrColor tag where- new _ attrs = do- o <- newZeroAttrColor- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrColor`.-noAttrColor :: Maybe AttrColor-noAttrColor = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrColor #attr-@--}-getAttrColorAttr :: MonadIO m => AttrColor -> m Pango.Attribute.Attribute-getAttrColorAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrColorAttrFieldInfo-instance AttrInfo AttrColorAttrFieldInfo where- type AttrAllowedOps AttrColorAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrColorAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrColorAttrFieldInfo = (~) AttrColor- type AttrGetType AttrColorAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrColorAttrFieldInfo = "attr"- type AttrOrigin AttrColorAttrFieldInfo = AttrColor- attrGet _ = getAttrColorAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrColor_attr :: AttrLabelProxy "attr"-attrColor_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@color@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrColor #color-@--}-getAttrColorColor :: MonadIO m => AttrColor -> m Pango.Color.Color-getAttrColorColor s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 16 :: (Ptr Pango.Color.Color)- val' <- (newBoxed Pango.Color.Color) val- return val'--#if ENABLE_OVERLOADING-data AttrColorColorFieldInfo-instance AttrInfo AttrColorColorFieldInfo where- type AttrAllowedOps AttrColorColorFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrColorColorFieldInfo = (~) (Ptr Pango.Color.Color)- type AttrBaseTypeConstraint AttrColorColorFieldInfo = (~) AttrColor- type AttrGetType AttrColorColorFieldInfo = Pango.Color.Color- type AttrLabel AttrColorColorFieldInfo = "color"- type AttrOrigin AttrColorColorFieldInfo = AttrColor- attrGet _ = getAttrColorColor- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrColor_color :: AttrLabelProxy "color"-attrColor_color = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrColor-type instance O.AttributeList AttrColor = AttrColorAttributeList-type AttrColorAttributeList = ('[ '("attr", AttrColorAttrFieldInfo), '("color", AttrColorColorFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrColorMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrColorMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrColorMethod t AttrColor, O.MethodInfo info AttrColor p) => OL.IsLabel t (AttrColor -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrColor.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrColor where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrColor = AttrColor (ManagedPtr AttrColor)-instance WrappedPtr AttrColor where
− GI/Pango/Structs/AttrFloat.hs
@@ -1,193 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrFloat.AttrFloat' structure is used to represent attributes with-a float or double value.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrFloat- ( ---- * Exported types- AttrFloat(..) ,- newZeroAttrFloat ,- noAttrFloat ,--- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrFloat_attr ,-#endif- getAttrFloatAttr ,----- ** value #attr:value#-{- | the value of the attribute--}-#if ENABLE_OVERLOADING- attrFloat_value ,-#endif- getAttrFloatValue ,- setAttrFloatValue ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute---- | Memory-managed wrapper type.-newtype AttrFloat = AttrFloat (ManagedPtr AttrFloat)-instance WrappedPtr AttrFloat where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrFloat)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrFloat` struct initialized to zero.-newZeroAttrFloat :: MonadIO m => m AttrFloat-newZeroAttrFloat = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrFloat--instance tag ~ 'AttrSet => Constructible AttrFloat tag where- new _ attrs = do- o <- newZeroAttrFloat- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrFloat`.-noAttrFloat :: Maybe AttrFloat-noAttrFloat = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrFloat #attr-@--}-getAttrFloatAttr :: MonadIO m => AttrFloat -> m Pango.Attribute.Attribute-getAttrFloatAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrFloatAttrFieldInfo-instance AttrInfo AttrFloatAttrFieldInfo where- type AttrAllowedOps AttrFloatAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrFloatAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrFloatAttrFieldInfo = (~) AttrFloat- type AttrGetType AttrFloatAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrFloatAttrFieldInfo = "attr"- type AttrOrigin AttrFloatAttrFieldInfo = AttrFloat- attrGet _ = getAttrFloatAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrFloat_attr :: AttrLabelProxy "attr"-attrFloat_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrFloat #value-@--}-getAttrFloatValue :: MonadIO m => AttrFloat -> m Double-getAttrFloatValue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CDouble- let val' = realToFrac val- return val'--{- |-Set the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrFloat [ #value 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrFloatValue :: MonadIO m => AttrFloat -> Double -> m ()-setAttrFloatValue s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 16) (val' :: CDouble)--#if ENABLE_OVERLOADING-data AttrFloatValueFieldInfo-instance AttrInfo AttrFloatValueFieldInfo where- type AttrAllowedOps AttrFloatValueFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AttrFloatValueFieldInfo = (~) Double- type AttrBaseTypeConstraint AttrFloatValueFieldInfo = (~) AttrFloat- type AttrGetType AttrFloatValueFieldInfo = Double- type AttrLabel AttrFloatValueFieldInfo = "value"- type AttrOrigin AttrFloatValueFieldInfo = AttrFloat- attrGet _ = getAttrFloatValue- attrSet _ = setAttrFloatValue- attrConstruct = undefined- attrClear _ = undefined--attrFloat_value :: AttrLabelProxy "value"-attrFloat_value = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrFloat-type instance O.AttributeList AttrFloat = AttrFloatAttributeList-type AttrFloatAttributeList = ('[ '("attr", AttrFloatAttrFieldInfo), '("value", AttrFloatValueFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrFloatMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrFloatMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrFloatMethod t AttrFloat, O.MethodInfo info AttrFloat p) => OL.IsLabel t (AttrFloat -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrFloat.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrFloat where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrFloat = AttrFloat (ManagedPtr AttrFloat)-instance WrappedPtr AttrFloat where
− GI/Pango/Structs/AttrFontDesc.hs
@@ -1,251 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrFontDesc.AttrFontDesc' structure is used to store an attribute that-sets all aspects of the font description at once.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrFontDesc- ( ---- * Exported types- AttrFontDesc(..) ,- newZeroAttrFontDesc ,- noAttrFontDesc ,--- -- * Methods--- ** new #method:new#-- attrFontDescNew ,----- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrFontDesc_attr ,-#endif- getAttrFontDescAttr ,----- ** desc #attr:desc#-{- | the font description which is the value of this attribute--}-#if ENABLE_OVERLOADING- attrFontDesc_desc ,-#endif- clearAttrFontDescDesc ,- getAttrFontDescDesc ,- setAttrFontDescDesc ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute-import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription---- | Memory-managed wrapper type.-newtype AttrFontDesc = AttrFontDesc (ManagedPtr AttrFontDesc)-instance WrappedPtr AttrFontDesc where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrFontDesc)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrFontDesc` struct initialized to zero.-newZeroAttrFontDesc :: MonadIO m => m AttrFontDesc-newZeroAttrFontDesc = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrFontDesc--instance tag ~ 'AttrSet => Constructible AttrFontDesc tag where- new _ attrs = do- o <- newZeroAttrFontDesc- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrFontDesc`.-noAttrFontDesc :: Maybe AttrFontDesc-noAttrFontDesc = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrFontDesc #attr-@--}-getAttrFontDescAttr :: MonadIO m => AttrFontDesc -> m Pango.Attribute.Attribute-getAttrFontDescAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrFontDescAttrFieldInfo-instance AttrInfo AttrFontDescAttrFieldInfo where- type AttrAllowedOps AttrFontDescAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrFontDescAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrFontDescAttrFieldInfo = (~) AttrFontDesc- type AttrGetType AttrFontDescAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrFontDescAttrFieldInfo = "attr"- type AttrOrigin AttrFontDescAttrFieldInfo = AttrFontDesc- attrGet _ = getAttrFontDescAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrFontDesc_attr :: AttrLabelProxy "attr"-attrFontDesc_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@desc@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrFontDesc #desc-@--}-getAttrFontDescDesc :: MonadIO m => AttrFontDesc -> m (Maybe Pango.FontDescription.FontDescription)-getAttrFontDescDesc s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (Ptr Pango.FontDescription.FontDescription)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newBoxed Pango.FontDescription.FontDescription) val'- return val''- return result--{- |-Set the value of the “@desc@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrFontDesc [ #desc 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrFontDescDesc :: MonadIO m => AttrFontDesc -> Ptr Pango.FontDescription.FontDescription -> m ()-setAttrFontDescDesc s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Ptr Pango.FontDescription.FontDescription)--{- |-Set the value of the “@desc@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #desc-@--}-clearAttrFontDescDesc :: MonadIO m => AttrFontDesc -> m ()-clearAttrFontDescDesc s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullPtr :: Ptr Pango.FontDescription.FontDescription)--#if ENABLE_OVERLOADING-data AttrFontDescDescFieldInfo-instance AttrInfo AttrFontDescDescFieldInfo where- type AttrAllowedOps AttrFontDescDescFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrFontDescDescFieldInfo = (~) (Ptr Pango.FontDescription.FontDescription)- type AttrBaseTypeConstraint AttrFontDescDescFieldInfo = (~) AttrFontDesc- type AttrGetType AttrFontDescDescFieldInfo = Maybe Pango.FontDescription.FontDescription- type AttrLabel AttrFontDescDescFieldInfo = "desc"- type AttrOrigin AttrFontDescDescFieldInfo = AttrFontDesc- attrGet _ = getAttrFontDescDesc- attrSet _ = setAttrFontDescDesc- attrConstruct = undefined- attrClear _ = clearAttrFontDescDesc--attrFontDesc_desc :: AttrLabelProxy "desc"-attrFontDesc_desc = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrFontDesc-type instance O.AttributeList AttrFontDesc = AttrFontDescAttributeList-type AttrFontDescAttributeList = ('[ '("attr", AttrFontDescAttrFieldInfo), '("desc", AttrFontDescDescFieldInfo)] :: [(Symbol, *)])-#endif---- method AttrFontDesc::new--- method type : MemberFunction--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the font description", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_font_desc_new" pango_attr_font_desc_new :: - Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font description attribute. This attribute-allows setting family, style, weight, variant, stretch,-and size simultaneously.--}-attrFontDescNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.FontDescription.FontDescription- {- ^ /@desc@/: the font description -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrFontDescNew desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_attr_font_desc_new desc'- checkUnexpectedReturnNULL "attrFontDescNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrFontDescMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrFontDescMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrFontDescMethod t AttrFontDesc, O.MethodInfo info AttrFontDesc p) => OL.IsLabel t (AttrFontDesc -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrFontDesc.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrFontDesc where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrFontDesc = AttrFontDesc (ManagedPtr AttrFontDesc)-instance WrappedPtr AttrFontDesc where
− GI/Pango/Structs/AttrFontFeatures.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 (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrFontFeatures.AttrFontFeatures' structure is used to represent OpenType-font features as an attribute.--/Since: 1.38/--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrFontFeatures- ( ---- * Exported types- AttrFontFeatures(..) ,- newZeroAttrFontFeatures ,- noAttrFontFeatures ,--- -- * Methods--- ** new #method:new#-- attrFontFeaturesNew ,----- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrFontFeatures_attr ,-#endif- getAttrFontFeaturesAttr ,----- ** features #attr:features#-{- | the featues, as a string in CSS syntax--}-#if ENABLE_OVERLOADING- attrFontFeatures_features ,-#endif- clearAttrFontFeaturesFeatures ,- getAttrFontFeaturesFeatures ,- setAttrFontFeaturesFeatures ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute---- | Memory-managed wrapper type.-newtype AttrFontFeatures = AttrFontFeatures (ManagedPtr AttrFontFeatures)-instance WrappedPtr AttrFontFeatures where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrFontFeatures)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrFontFeatures` struct initialized to zero.-newZeroAttrFontFeatures :: MonadIO m => m AttrFontFeatures-newZeroAttrFontFeatures = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrFontFeatures--instance tag ~ 'AttrSet => Constructible AttrFontFeatures tag where- new _ attrs = do- o <- newZeroAttrFontFeatures- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrFontFeatures`.-noAttrFontFeatures :: Maybe AttrFontFeatures-noAttrFontFeatures = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrFontFeatures #attr-@--}-getAttrFontFeaturesAttr :: MonadIO m => AttrFontFeatures -> m Pango.Attribute.Attribute-getAttrFontFeaturesAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrFontFeaturesAttrFieldInfo-instance AttrInfo AttrFontFeaturesAttrFieldInfo where- type AttrAllowedOps AttrFontFeaturesAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrFontFeaturesAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrFontFeaturesAttrFieldInfo = (~) AttrFontFeatures- type AttrGetType AttrFontFeaturesAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrFontFeaturesAttrFieldInfo = "attr"- type AttrOrigin AttrFontFeaturesAttrFieldInfo = AttrFontFeatures- attrGet _ = getAttrFontFeaturesAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrFontFeatures_attr :: AttrLabelProxy "attr"-attrFontFeatures_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@features@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrFontFeatures #features-@--}-getAttrFontFeaturesFeatures :: MonadIO m => AttrFontFeatures -> m (Maybe T.Text)-getAttrFontFeaturesFeatures s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CString- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--{- |-Set the value of the “@features@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrFontFeatures [ #features 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrFontFeaturesFeatures :: MonadIO m => AttrFontFeatures -> CString -> m ()-setAttrFontFeaturesFeatures s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: CString)--{- |-Set the value of the “@features@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #features-@--}-clearAttrFontFeaturesFeatures :: MonadIO m => AttrFontFeatures -> m ()-clearAttrFontFeaturesFeatures s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullPtr :: CString)--#if ENABLE_OVERLOADING-data AttrFontFeaturesFeaturesFieldInfo-instance AttrInfo AttrFontFeaturesFeaturesFieldInfo where- type AttrAllowedOps AttrFontFeaturesFeaturesFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrFontFeaturesFeaturesFieldInfo = (~) CString- type AttrBaseTypeConstraint AttrFontFeaturesFeaturesFieldInfo = (~) AttrFontFeatures- type AttrGetType AttrFontFeaturesFeaturesFieldInfo = Maybe T.Text- type AttrLabel AttrFontFeaturesFeaturesFieldInfo = "features"- type AttrOrigin AttrFontFeaturesFeaturesFieldInfo = AttrFontFeatures- attrGet _ = getAttrFontFeaturesFeatures- attrSet _ = setAttrFontFeaturesFeatures- attrConstruct = undefined- attrClear _ = clearAttrFontFeaturesFeatures--attrFontFeatures_features :: AttrLabelProxy "features"-attrFontFeatures_features = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrFontFeatures-type instance O.AttributeList AttrFontFeatures = AttrFontFeaturesAttributeList-type AttrFontFeaturesAttributeList = ('[ '("attr", AttrFontFeaturesAttrFieldInfo), '("features", AttrFontFeaturesFeaturesFieldInfo)] :: [(Symbol, *)])-#endif---- method AttrFontFeatures::new--- method type : MemberFunction--- Args : [Arg {argCName = "features", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a string with OpenType font features, in CSS syntax", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_font_features_new" pango_attr_font_features_new :: - CString -> -- features : TBasicType TUTF8- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font features tag attribute.--/Since: 1.38/--}-attrFontFeaturesNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@features@/: a string with OpenType font features, in CSS syntax -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrFontFeaturesNew features = liftIO $ do- features' <- textToCString features- result <- pango_attr_font_features_new features'- checkUnexpectedReturnNULL "attrFontFeaturesNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- freeMem features'- return result'--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrFontFeaturesMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrFontFeaturesMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrFontFeaturesMethod t AttrFontFeatures, O.MethodInfo info AttrFontFeatures p) => OL.IsLabel t (AttrFontFeatures -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrFontFeatures.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrFontFeatures where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrFontFeatures = AttrFontFeatures (ManagedPtr AttrFontFeatures)-instance WrappedPtr AttrFontFeatures where
− GI/Pango/Structs/AttrInt.hs
@@ -1,191 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrInt.AttrInt' structure is used to represent attributes with-an integer or enumeration value.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrInt- ( ---- * Exported types- AttrInt(..) ,- newZeroAttrInt ,- noAttrInt ,--- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrInt_attr ,-#endif- getAttrIntAttr ,----- ** value #attr:value#-{- | the value of the attribute--}-#if ENABLE_OVERLOADING- attrInt_value ,-#endif- getAttrIntValue ,- setAttrIntValue ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute---- | Memory-managed wrapper type.-newtype AttrInt = AttrInt (ManagedPtr AttrInt)-instance WrappedPtr AttrInt where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrInt)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrInt` struct initialized to zero.-newZeroAttrInt :: MonadIO m => m AttrInt-newZeroAttrInt = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrInt--instance tag ~ 'AttrSet => Constructible AttrInt tag where- new _ attrs = do- o <- newZeroAttrInt- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrInt`.-noAttrInt :: Maybe AttrInt-noAttrInt = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrInt #attr-@--}-getAttrIntAttr :: MonadIO m => AttrInt -> m Pango.Attribute.Attribute-getAttrIntAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrIntAttrFieldInfo-instance AttrInfo AttrIntAttrFieldInfo where- type AttrAllowedOps AttrIntAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrIntAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrIntAttrFieldInfo = (~) AttrInt- type AttrGetType AttrIntAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrIntAttrFieldInfo = "attr"- type AttrOrigin AttrIntAttrFieldInfo = AttrInt- attrGet _ = getAttrIntAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrInt_attr :: AttrLabelProxy "attr"-attrInt_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrInt #value-@--}-getAttrIntValue :: MonadIO m => AttrInt -> m Int32-getAttrIntValue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Int32- return val--{- |-Set the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrInt [ #value 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrIntValue :: MonadIO m => AttrInt -> Int32 -> m ()-setAttrIntValue s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Int32)--#if ENABLE_OVERLOADING-data AttrIntValueFieldInfo-instance AttrInfo AttrIntValueFieldInfo where- type AttrAllowedOps AttrIntValueFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AttrIntValueFieldInfo = (~) Int32- type AttrBaseTypeConstraint AttrIntValueFieldInfo = (~) AttrInt- type AttrGetType AttrIntValueFieldInfo = Int32- type AttrLabel AttrIntValueFieldInfo = "value"- type AttrOrigin AttrIntValueFieldInfo = AttrInt- attrGet _ = getAttrIntValue- attrSet _ = setAttrIntValue- attrConstruct = undefined- attrClear _ = undefined--attrInt_value :: AttrLabelProxy "value"-attrInt_value = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrInt-type instance O.AttributeList AttrInt = AttrIntAttributeList-type AttrIntAttributeList = ('[ '("attr", AttrIntAttrFieldInfo), '("value", AttrIntValueFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrIntMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrIntMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrIntMethod t AttrInt, O.MethodInfo info AttrInt p) => OL.IsLabel t (AttrInt -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrInt.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrInt where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrInt = AttrInt (ManagedPtr AttrInt)-instance WrappedPtr AttrInt where
− GI/Pango/Structs/AttrIterator.hs
@@ -1,354 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrIterator.AttrIterator' structure is used to represent an-iterator through a 'GI.Pango.Structs.AttrList.AttrList'. A new iterator is created-with @/pango_attr_list_get_iterator()/@. Once the iterator-is created, it can be advanced through the style changes-in the text using 'GI.Pango.Structs.AttrIterator.attrIteratorNext'. At each-style change, the range of the current style segment and the-attributes currently in effect can be queried.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrIterator- ( ---- * Exported types- AttrIterator(..) ,- noAttrIterator ,--- -- * Methods--- ** destroy #method:destroy#--#if ENABLE_OVERLOADING- AttrIteratorDestroyMethodInfo ,-#endif- attrIteratorDestroy ,----- ** getAttrs #method:getAttrs#--#if ENABLE_OVERLOADING- AttrIteratorGetAttrsMethodInfo ,-#endif- attrIteratorGetAttrs ,----- ** getFont #method:getFont#--#if ENABLE_OVERLOADING- AttrIteratorGetFontMethodInfo ,-#endif- attrIteratorGetFont ,----- ** next #method:next#--#if ENABLE_OVERLOADING- AttrIteratorNextMethodInfo ,-#endif- attrIteratorNext ,----- ** range #method:range#--#if ENABLE_OVERLOADING- AttrIteratorRangeMethodInfo ,-#endif- attrIteratorRange ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute-import {-# SOURCE #-} qualified GI.Pango.Structs.FontDescription as Pango.FontDescription-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language---- | Memory-managed wrapper type.-newtype AttrIterator = AttrIterator (ManagedPtr AttrIterator)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr AttrIterator where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing---- | A convenience alias for `Nothing` :: `Maybe` `AttrIterator`.-noAttrIterator :: Maybe AttrIterator-noAttrIterator = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrIterator-type instance O.AttributeList AttrIterator = AttrIteratorAttributeList-type AttrIteratorAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method AttrIterator::destroy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iterator", argType = TInterface (Name {namespace = "Pango", name = "AttrIterator"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrIterator.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_iterator_destroy" pango_attr_iterator_destroy :: - Ptr AttrIterator -> -- iterator : TInterface (Name {namespace = "Pango", name = "AttrIterator"})- IO ()--{- |-Destroy a 'GI.Pango.Structs.AttrIterator.AttrIterator' and free all associated memory.--}-attrIteratorDestroy ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrIterator- {- ^ /@iterator@/: a 'GI.Pango.Structs.AttrIterator.AttrIterator'. -}- -> m ()-attrIteratorDestroy iterator = liftIO $ do- iterator' <- unsafeManagedPtrGetPtr iterator- pango_attr_iterator_destroy iterator'- touchManagedPtr iterator- return ()--#if ENABLE_OVERLOADING-data AttrIteratorDestroyMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo AttrIteratorDestroyMethodInfo AttrIterator signature where- overloadedMethod _ = attrIteratorDestroy--#endif---- method AttrIterator::get_attrs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iterator", argType = TInterface (Name {namespace = "Pango", name = "AttrIterator"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrIterator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGSList (TInterface (Name {namespace = "Pango", name = "Attribute"})))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_iterator_get_attrs" pango_attr_iterator_get_attrs :: - Ptr AttrIterator -> -- iterator : TInterface (Name {namespace = "Pango", name = "AttrIterator"})- IO (Ptr (GSList (Ptr Pango.Attribute.Attribute)))--{- |-Gets a list of all attributes at the current position of the-iterator.--/Since: 1.2/--}-attrIteratorGetAttrs ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrIterator- {- ^ /@iterator@/: a 'GI.Pango.Structs.AttrIterator.AttrIterator' -}- -> m [Pango.Attribute.Attribute]- {- ^ __Returns:__ a list of- all attributes for the current range.- To free this value, call 'GI.Pango.Structs.Attribute.attributeDestroy' on- each value and @/g_slist_free()/@ on the list. -}-attrIteratorGetAttrs iterator = liftIO $ do- iterator' <- unsafeManagedPtrGetPtr iterator- result <- pango_attr_iterator_get_attrs iterator'- result' <- unpackGSList result- result'' <- mapM (wrapPtr Pango.Attribute.Attribute) result'- g_slist_free result- touchManagedPtr iterator- return result''--#if ENABLE_OVERLOADING-data AttrIteratorGetAttrsMethodInfo-instance (signature ~ (m [Pango.Attribute.Attribute]), MonadIO m) => O.MethodInfo AttrIteratorGetAttrsMethodInfo AttrIterator signature where- overloadedMethod _ = attrIteratorGetAttrs--#endif---- method AttrIterator::get_font--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iterator", argType = TInterface (Name {namespace = "Pango", name = "AttrIterator"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrIterator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription to fill in with the current values.\n The family name in this structure will be set using\n pango_font_description_set_family_static() using values from\n an attribute in the #PangoAttrList associated with the iterator,\n so if you plan to keep it around, you must call:\n <literal>pango_font_description_set_family (desc, pango_font_description_get_family (desc))</literal>.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "if non-%NULL, location to store language tag for item, or %NULL\n if none is found.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "extra_attrs", argType = TGSList (TInterface (Name {namespace = "Pango", name = "Attribute"})), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "if non-%NULL,\n location in which to store a list of non-font\n attributes at the the current position; only the highest priority\n value of each attribute will be added to this list. In order\n to free this value, you must call pango_attribute_destroy() on\n each member.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_iterator_get_font" pango_attr_iterator_get_font :: - Ptr AttrIterator -> -- iterator : TInterface (Name {namespace = "Pango", name = "AttrIterator"})- Ptr Pango.FontDescription.FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- Ptr (GSList (Ptr Pango.Attribute.Attribute)) -> -- extra_attrs : TGSList (TInterface (Name {namespace = "Pango", name = "Attribute"}))- IO ()--{- |-Get the font and other attributes at the current iterator position.--}-attrIteratorGetFont ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrIterator- {- ^ /@iterator@/: a 'GI.Pango.Structs.AttrIterator.AttrIterator' -}- -> Pango.FontDescription.FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' to fill in with the current values.- The family name in this structure will be set using- 'GI.Pango.Structs.FontDescription.fontDescriptionSetFamilyStatic' using values from- an attribute in the 'GI.Pango.Structs.AttrList.AttrList' associated with the iterator,- so if you plan to keep it around, you must call:- \<literal>pango_font_description_set_family (desc, pango_font_description_get_family (desc))\<\/literal>. -}- -> Maybe (Pango.Language.Language)- {- ^ /@language@/: if non-'Nothing', location to store language tag for item, or 'Nothing'- if none is found. -}- -> [Pango.Attribute.Attribute]- {- ^ /@extraAttrs@/: if non-'Nothing',- location in which to store a list of non-font- attributes at the the current position; only the highest priority- value of each attribute will be added to this list. In order- to free this value, you must call 'GI.Pango.Structs.Attribute.attributeDestroy' on- each member. -}- -> m ()-attrIteratorGetFont iterator desc language extraAttrs = liftIO $ do- iterator' <- unsafeManagedPtrGetPtr iterator- desc' <- unsafeManagedPtrGetPtr desc- maybeLanguage <- case language of- Nothing -> return nullPtr- Just jLanguage -> do- jLanguage' <- unsafeManagedPtrGetPtr jLanguage- return jLanguage'- extraAttrs' <- mapM unsafeManagedPtrGetPtr extraAttrs- extraAttrs'' <- packGSList extraAttrs'- pango_attr_iterator_get_font iterator' desc' maybeLanguage extraAttrs''- touchManagedPtr iterator- touchManagedPtr desc- whenJust language touchManagedPtr- mapM_ touchManagedPtr extraAttrs- return ()--#if ENABLE_OVERLOADING-data AttrIteratorGetFontMethodInfo-instance (signature ~ (Pango.FontDescription.FontDescription -> Maybe (Pango.Language.Language) -> [Pango.Attribute.Attribute] -> m ()), MonadIO m) => O.MethodInfo AttrIteratorGetFontMethodInfo AttrIterator signature where- overloadedMethod _ = attrIteratorGetFont--#endif---- method AttrIterator::next--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iterator", argType = TInterface (Name {namespace = "Pango", name = "AttrIterator"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrIterator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_attr_iterator_next" pango_attr_iterator_next :: - Ptr AttrIterator -> -- iterator : TInterface (Name {namespace = "Pango", name = "AttrIterator"})- IO CInt--{- |-Advance the iterator until the next change of style.--}-attrIteratorNext ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrIterator- {- ^ /@iterator@/: a 'GI.Pango.Structs.AttrIterator.AttrIterator' -}- -> m Bool- {- ^ __Returns:__ 'False' if the iterator is at the end of the list, otherwise 'True' -}-attrIteratorNext iterator = liftIO $ do- iterator' <- unsafeManagedPtrGetPtr iterator- result <- pango_attr_iterator_next iterator'- let result' = (/= 0) result- touchManagedPtr iterator- return result'--#if ENABLE_OVERLOADING-data AttrIteratorNextMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo AttrIteratorNextMethodInfo AttrIterator signature where- overloadedMethod _ = attrIteratorNext--#endif---- method AttrIterator::range--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iterator", argType = TInterface (Name {namespace = "Pango", name = "AttrIterator"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrIterator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the start of the range", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "end", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the end of the range", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_iterator_range" pango_attr_iterator_range :: - Ptr AttrIterator -> -- iterator : TInterface (Name {namespace = "Pango", name = "AttrIterator"})- Ptr Int32 -> -- start : TBasicType TInt- Ptr Int32 -> -- end : TBasicType TInt- IO ()--{- |-Get the range of the current segment. Note that the-stored return values are signed, not unsigned like-the values in 'GI.Pango.Structs.Attribute.Attribute'. To deal with this API-oversight, stored return values that wouldn\'t fit into-a signed integer are clamped to @/G_MAXINT/@.--}-attrIteratorRange ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrIterator- {- ^ /@iterator@/: a 'GI.Pango.Structs.AttrIterator.AttrIterator' -}- -> m ((Int32, Int32))-attrIteratorRange iterator = liftIO $ do- iterator' <- unsafeManagedPtrGetPtr iterator- start <- allocMem :: IO (Ptr Int32)- end <- allocMem :: IO (Ptr Int32)- pango_attr_iterator_range iterator' start end- start' <- peek start- end' <- peek end- touchManagedPtr iterator- freeMem start- freeMem end- return (start', end')--#if ENABLE_OVERLOADING-data AttrIteratorRangeMethodInfo-instance (signature ~ (m ((Int32, Int32))), MonadIO m) => O.MethodInfo AttrIteratorRangeMethodInfo AttrIterator signature where- overloadedMethod _ = attrIteratorRange--#endif--#if ENABLE_OVERLOADING-type family ResolveAttrIteratorMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrIteratorMethod "destroy" o = AttrIteratorDestroyMethodInfo- ResolveAttrIteratorMethod "next" o = AttrIteratorNextMethodInfo- ResolveAttrIteratorMethod "range" o = AttrIteratorRangeMethodInfo- ResolveAttrIteratorMethod "getAttrs" o = AttrIteratorGetAttrsMethodInfo- ResolveAttrIteratorMethod "getFont" o = AttrIteratorGetFontMethodInfo- ResolveAttrIteratorMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrIteratorMethod t AttrIterator, O.MethodInfo info AttrIterator p) => OL.IsLabel t (AttrIterator -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrIterator.hs-boot
@@ -1,41 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrIterator where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrIterator = AttrIterator (ManagedPtr AttrIterator)-instance WrappedPtr AttrIterator where-#if ENABLE_OVERLOADING-data AttrIteratorDestroyMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrIteratorGetAttrsMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrIteratorGetFontMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrIteratorNextMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrIteratorRangeMethodInfo-#endif
− GI/Pango/Structs/AttrLanguage.hs
@@ -1,249 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrLanguage.AttrLanguage' structure is used to represent attributes that-are languages.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrLanguage- ( ---- * Exported types- AttrLanguage(..) ,- newZeroAttrLanguage ,- noAttrLanguage ,--- -- * Methods--- ** new #method:new#-- attrLanguageNew ,----- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrLanguage_attr ,-#endif- getAttrLanguageAttr ,----- ** value #attr:value#-{- | the 'GI.Pango.Structs.Language.Language' which is the value of the attribute--}-#if ENABLE_OVERLOADING- attrLanguage_value ,-#endif- clearAttrLanguageValue ,- getAttrLanguageValue ,- setAttrLanguageValue ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute-import {-# SOURCE #-} qualified GI.Pango.Structs.Language as Pango.Language---- | Memory-managed wrapper type.-newtype AttrLanguage = AttrLanguage (ManagedPtr AttrLanguage)-instance WrappedPtr AttrLanguage where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrLanguage)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrLanguage` struct initialized to zero.-newZeroAttrLanguage :: MonadIO m => m AttrLanguage-newZeroAttrLanguage = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrLanguage--instance tag ~ 'AttrSet => Constructible AttrLanguage tag where- new _ attrs = do- o <- newZeroAttrLanguage- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrLanguage`.-noAttrLanguage :: Maybe AttrLanguage-noAttrLanguage = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrLanguage #attr-@--}-getAttrLanguageAttr :: MonadIO m => AttrLanguage -> m Pango.Attribute.Attribute-getAttrLanguageAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrLanguageAttrFieldInfo-instance AttrInfo AttrLanguageAttrFieldInfo where- type AttrAllowedOps AttrLanguageAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrLanguageAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrLanguageAttrFieldInfo = (~) AttrLanguage- type AttrGetType AttrLanguageAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrLanguageAttrFieldInfo = "attr"- type AttrOrigin AttrLanguageAttrFieldInfo = AttrLanguage- attrGet _ = getAttrLanguageAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrLanguage_attr :: AttrLabelProxy "attr"-attrLanguage_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrLanguage #value-@--}-getAttrLanguageValue :: MonadIO m => AttrLanguage -> m (Maybe Pango.Language.Language)-getAttrLanguageValue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (Ptr Pango.Language.Language)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newBoxed Pango.Language.Language) val'- return val''- return result--{- |-Set the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrLanguage [ #value 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrLanguageValue :: MonadIO m => AttrLanguage -> Ptr Pango.Language.Language -> m ()-setAttrLanguageValue s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Ptr Pango.Language.Language)--{- |-Set the value of the “@value@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #value-@--}-clearAttrLanguageValue :: MonadIO m => AttrLanguage -> m ()-clearAttrLanguageValue s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullPtr :: Ptr Pango.Language.Language)--#if ENABLE_OVERLOADING-data AttrLanguageValueFieldInfo-instance AttrInfo AttrLanguageValueFieldInfo where- type AttrAllowedOps AttrLanguageValueFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrLanguageValueFieldInfo = (~) (Ptr Pango.Language.Language)- type AttrBaseTypeConstraint AttrLanguageValueFieldInfo = (~) AttrLanguage- type AttrGetType AttrLanguageValueFieldInfo = Maybe Pango.Language.Language- type AttrLabel AttrLanguageValueFieldInfo = "value"- type AttrOrigin AttrLanguageValueFieldInfo = AttrLanguage- attrGet _ = getAttrLanguageValue- attrSet _ = setAttrLanguageValue- attrConstruct = undefined- attrClear _ = clearAttrLanguageValue--attrLanguage_value :: AttrLabelProxy "value"-attrLanguage_value = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrLanguage-type instance O.AttributeList AttrLanguage = AttrLanguageAttributeList-type AttrLanguageAttributeList = ('[ '("attr", AttrLanguageAttrFieldInfo), '("value", AttrLanguageValueFieldInfo)] :: [(Symbol, *)])-#endif---- method AttrLanguage::new--- method type : MemberFunction--- Args : [Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "language tag", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_language_new" pango_attr_language_new :: - Ptr Pango.Language.Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new language tag attribute.--}-attrLanguageNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Language.Language- {- ^ /@language@/: language tag -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrLanguageNew language = liftIO $ do- language' <- unsafeManagedPtrGetPtr language- result <- pango_attr_language_new language'- checkUnexpectedReturnNULL "attrLanguageNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- touchManagedPtr language- return result'--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrLanguageMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrLanguageMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrLanguageMethod t AttrLanguage, O.MethodInfo info AttrLanguage p) => OL.IsLabel t (AttrLanguage -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrLanguage.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrLanguage where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrLanguage = AttrLanguage (ManagedPtr AttrLanguage)-instance WrappedPtr AttrLanguage where
− GI/Pango/Structs/AttrList.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 (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrList.AttrList' structure represents a list of attributes-that apply to a section of text. The attributes are, in general,-allowed to overlap in an arbitrary fashion, however, if the-attributes are manipulated only through 'GI.Pango.Structs.AttrList.attrListChange',-the overlap between properties will meet stricter criteria.--Since the 'GI.Pango.Structs.AttrList.AttrList' structure is stored as a linear list,-it is not suitable for storing attributes for large amounts-of text. In general, you should not use a single 'GI.Pango.Structs.AttrList.AttrList'-for more than one paragraph of text.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrList- ( ---- * Exported types- AttrList(..) ,- noAttrList ,--- -- * Methods--- ** change #method:change#--#if ENABLE_OVERLOADING- AttrListChangeMethodInfo ,-#endif- attrListChange ,----- ** copy #method:copy#--#if ENABLE_OVERLOADING- AttrListCopyMethodInfo ,-#endif- attrListCopy ,----- ** filter #method:filter#--#if ENABLE_OVERLOADING- AttrListFilterMethodInfo ,-#endif- attrListFilter ,----- ** insert #method:insert#--#if ENABLE_OVERLOADING- AttrListInsertMethodInfo ,-#endif- attrListInsert ,----- ** insertBefore #method:insertBefore#--#if ENABLE_OVERLOADING- AttrListInsertBeforeMethodInfo ,-#endif- attrListInsertBefore ,----- ** new #method:new#-- attrListNew ,----- ** ref #method:ref#--#if ENABLE_OVERLOADING- AttrListRefMethodInfo ,-#endif- attrListRef ,----- ** splice #method:splice#--#if ENABLE_OVERLOADING- AttrListSpliceMethodInfo ,-#endif- attrListSplice ,----- ** unref #method:unref#--#if ENABLE_OVERLOADING- AttrListUnrefMethodInfo ,-#endif- attrListUnref ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.Pango.Callbacks as Pango.Callbacks-import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute---- | Memory-managed wrapper type.-newtype AttrList = AttrList (ManagedPtr AttrList)-foreign import ccall "pango_attr_list_get_type" c_pango_attr_list_get_type :: - IO GType--instance BoxedObject AttrList where- boxedType _ = c_pango_attr_list_get_type---- | A convenience alias for `Nothing` :: `Maybe` `AttrList`.-noAttrList :: Maybe AttrList-noAttrList = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrList-type instance O.AttributeList AttrList = AttrListAttributeList-type AttrListAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method AttrList::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "AttrList"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_new" pango_attr_list_new :: - IO (Ptr AttrList)--{- |-Create a new empty attribute list with a reference count of one.--}-attrListNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m AttrList- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.AttrList.AttrList',- which should be freed with 'GI.Pango.Structs.AttrList.attrListUnref'. -}-attrListNew = liftIO $ do- result <- pango_attr_list_new- checkUnexpectedReturnNULL "attrListNew" result- result' <- (wrapBoxed AttrList) result- return result'--#if ENABLE_OVERLOADING-#endif---- method AttrList::change--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute to insert. Ownership of this\n value is assumed by the list.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_change" pango_attr_list_change :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr Pango.Attribute.Attribute -> -- attr : TInterface (Name {namespace = "Pango", name = "Attribute"})- IO ()--{- |-Insert the given attribute into the 'GI.Pango.Structs.AttrList.AttrList'. It will-replace any attributes of the same type on that segment-and be merged with any adjoining attributes that are identical.--This function is slower than 'GI.Pango.Structs.AttrList.attrListInsert' for-creating a attribute list in order (potentially much slower-for large lists). However, 'GI.Pango.Structs.AttrList.attrListInsert' is not-suitable for continually changing a set of attributes-since it never removes or combines existing attributes.--}-attrListChange ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList' -}- -> Pango.Attribute.Attribute- {- ^ /@attr@/: the attribute to insert. Ownership of this- value is assumed by the list. -}- -> m ()-attrListChange list attr = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- attr' <- unsafeManagedPtrGetPtr attr- pango_attr_list_change list' attr'- touchManagedPtr list- touchManagedPtr attr- return ()--#if ENABLE_OVERLOADING-data AttrListChangeMethodInfo-instance (signature ~ (Pango.Attribute.Attribute -> m ()), MonadIO m) => O.MethodInfo AttrListChangeMethodInfo AttrList signature where- overloadedMethod _ = attrListChange--#endif---- method AttrList::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "AttrList"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_copy" pango_attr_list_copy :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- IO (Ptr AttrList)--{- |-Copy /@list@/ and return an identical new list.--}-attrListCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList', may be 'Nothing' -}- -> m (Maybe AttrList)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.AttrList.AttrList', with a- reference count of one, which should- be freed with 'GI.Pango.Structs.AttrList.attrListUnref'.- Returns 'Nothing' if /@list@/ was 'Nothing'. -}-attrListCopy list = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- result <- pango_attr_list_copy list'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed AttrList) result'- return result''- touchManagedPtr list- return maybeResult--#if ENABLE_OVERLOADING-data AttrListCopyMethodInfo-instance (signature ~ (m (Maybe AttrList)), MonadIO m) => O.MethodInfo AttrListCopyMethodInfo AttrList signature where- overloadedMethod _ = attrListCopy--#endif---- method AttrList::filter--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TInterface (Name {namespace = "Pango", name = "AttrFilterFunc"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "callback function; returns %TRUE\n if an attribute should be filtered out.", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Data to be passed to @func", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "AttrList"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_filter" pango_attr_list_filter :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- FunPtr Pango.Callbacks.C_AttrFilterFunc -> -- func : TInterface (Name {namespace = "Pango", name = "AttrFilterFunc"})- Ptr () -> -- data : TBasicType TPtr- IO (Ptr AttrList)--{- |-Given a 'GI.Pango.Structs.AttrList.AttrList' and callback function, removes any elements-of /@list@/ for which /@func@/ returns 'True' and inserts them into-a new list.--/Since: 1.2/--}-attrListFilter ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList' -}- -> Pango.Callbacks.AttrFilterFunc- {- ^ /@func@/: callback function; returns 'True'- if an attribute should be filtered out. -}- -> m (Maybe AttrList)- {- ^ __Returns:__ the new 'GI.Pango.Structs.AttrList.AttrList' or- 'Nothing' if no attributes of the given types were found. -}-attrListFilter list func = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- func' <- Pango.Callbacks.mk_AttrFilterFunc (Pango.Callbacks.wrap_AttrFilterFunc Nothing (Pango.Callbacks.drop_closures_AttrFilterFunc func))- let data_ = nullPtr- result <- pango_attr_list_filter list' func' data_- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed AttrList) result'- return result''- safeFreeFunPtr $ castFunPtrToPtr func'- touchManagedPtr list- return maybeResult--#if ENABLE_OVERLOADING-data AttrListFilterMethodInfo-instance (signature ~ (Pango.Callbacks.AttrFilterFunc -> m (Maybe AttrList)), MonadIO m) => O.MethodInfo AttrListFilterMethodInfo AttrList signature where- overloadedMethod _ = attrListFilter--#endif---- method AttrList::insert--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute to insert. Ownership of this\n value is assumed by the list.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_insert" pango_attr_list_insert :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr Pango.Attribute.Attribute -> -- attr : TInterface (Name {namespace = "Pango", name = "Attribute"})- IO ()--{- |-Insert the given attribute into the 'GI.Pango.Structs.AttrList.AttrList'. It will-be inserted after all other attributes with a matching-/@startIndex@/.--}-attrListInsert ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList' -}- -> Pango.Attribute.Attribute- {- ^ /@attr@/: the attribute to insert. Ownership of this- value is assumed by the list. -}- -> m ()-attrListInsert list attr = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- attr' <- unsafeManagedPtrGetPtr attr- pango_attr_list_insert list' attr'- touchManagedPtr list- touchManagedPtr attr- return ()--#if ENABLE_OVERLOADING-data AttrListInsertMethodInfo-instance (signature ~ (Pango.Attribute.Attribute -> m ()), MonadIO m) => O.MethodInfo AttrListInsertMethodInfo AttrList signature where- overloadedMethod _ = attrListInsert--#endif---- method AttrList::insert_before--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute to insert. Ownership of this\n value is assumed by the list.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_insert_before" pango_attr_list_insert_before :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr Pango.Attribute.Attribute -> -- attr : TInterface (Name {namespace = "Pango", name = "Attribute"})- IO ()--{- |-Insert the given attribute into the 'GI.Pango.Structs.AttrList.AttrList'. It will-be inserted before all other attributes with a matching-/@startIndex@/.--}-attrListInsertBefore ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList' -}- -> Pango.Attribute.Attribute- {- ^ /@attr@/: the attribute to insert. Ownership of this- value is assumed by the list. -}- -> m ()-attrListInsertBefore list attr = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- attr' <- unsafeManagedPtrGetPtr attr- pango_attr_list_insert_before list' attr'- touchManagedPtr list- touchManagedPtr attr- return ()--#if ENABLE_OVERLOADING-data AttrListInsertBeforeMethodInfo-instance (signature ~ (Pango.Attribute.Attribute -> m ()), MonadIO m) => O.MethodInfo AttrListInsertBeforeMethodInfo AttrList signature where- overloadedMethod _ = attrListInsertBefore--#endif---- method AttrList::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "AttrList"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_ref" pango_attr_list_ref :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- IO (Ptr AttrList)--{- |-Increase the reference count of the given attribute list by one.--/Since: 1.10/--}-attrListRef ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList', may be 'Nothing' -}- -> m AttrList- {- ^ __Returns:__ The attribute list passed in -}-attrListRef list = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- result <- pango_attr_list_ref list'- checkUnexpectedReturnNULL "attrListRef" result- result' <- (wrapBoxed AttrList) result- touchManagedPtr list- return result'--#if ENABLE_OVERLOADING-data AttrListRefMethodInfo-instance (signature ~ (m AttrList), MonadIO m) => O.MethodInfo AttrListRefMethodInfo AttrList signature where- overloadedMethod _ = attrListRef--#endif---- method AttrList::splice--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "other", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "another #PangoAttrList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pos", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the position in @list at which to insert @other", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length of the spliced segment. (Note that this\n must be specified since the attributes in @other\n may only be present at some subsection of this range)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_splice" pango_attr_list_splice :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- Ptr AttrList -> -- other : TInterface (Name {namespace = "Pango", name = "AttrList"})- Int32 -> -- pos : TBasicType TInt- Int32 -> -- len : TBasicType TInt- IO ()--{- |-This function opens up a hole in /@list@/, fills it in with attributes from-the left, and then merges /@other@/ on top of the hole.--This operation is equivalent to stretching every attribute-that applies at position /@pos@/ in /@list@/ by an amount /@len@/,-and then calling 'GI.Pango.Structs.AttrList.attrListChange' with a copy-of each attribute in /@other@/ in sequence (offset in position by /@pos@/).--This operation proves useful for, for instance, inserting-a pre-edit string in the middle of an edit buffer.--}-attrListSplice ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList' -}- -> AttrList- {- ^ /@other@/: another 'GI.Pango.Structs.AttrList.AttrList' -}- -> Int32- {- ^ /@pos@/: the position in /@list@/ at which to insert /@other@/ -}- -> Int32- {- ^ /@len@/: the length of the spliced segment. (Note that this- must be specified since the attributes in /@other@/- may only be present at some subsection of this range) -}- -> m ()-attrListSplice list other pos len = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- other' <- unsafeManagedPtrGetPtr other- pango_attr_list_splice list' other' pos len- touchManagedPtr list- touchManagedPtr other- return ()--#if ENABLE_OVERLOADING-data AttrListSpliceMethodInfo-instance (signature ~ (AttrList -> Int32 -> Int32 -> m ()), MonadIO m) => O.MethodInfo AttrListSpliceMethodInfo AttrList signature where- overloadedMethod _ = attrListSplice--#endif---- method AttrList::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attr_list_unref" pango_attr_list_unref :: - Ptr AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- IO ()--{- |-Decrease the reference count of the given attribute list by one.-If the result is zero, free the attribute list and the attributes-it contains.--}-attrListUnref ::- (B.CallStack.HasCallStack, MonadIO m) =>- AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList', may be 'Nothing' -}- -> m ()-attrListUnref list = liftIO $ do- list' <- unsafeManagedPtrGetPtr list- pango_attr_list_unref list'- touchManagedPtr list- return ()--#if ENABLE_OVERLOADING-data AttrListUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo AttrListUnrefMethodInfo AttrList signature where- overloadedMethod _ = attrListUnref--#endif--#if ENABLE_OVERLOADING-type family ResolveAttrListMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrListMethod "change" o = AttrListChangeMethodInfo- ResolveAttrListMethod "copy" o = AttrListCopyMethodInfo- ResolveAttrListMethod "filter" o = AttrListFilterMethodInfo- ResolveAttrListMethod "insert" o = AttrListInsertMethodInfo- ResolveAttrListMethod "insertBefore" o = AttrListInsertBeforeMethodInfo- ResolveAttrListMethod "ref" o = AttrListRefMethodInfo- ResolveAttrListMethod "splice" o = AttrListSpliceMethodInfo- ResolveAttrListMethod "unref" o = AttrListUnrefMethodInfo- ResolveAttrListMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrListMethod t AttrList, O.MethodInfo info AttrList p) => OL.IsLabel t (AttrList -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrList.hs-boot
@@ -1,50 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrList where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrList = AttrList (ManagedPtr AttrList)-instance BoxedObject AttrList where-#if ENABLE_OVERLOADING-data AttrListChangeMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrListCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrListFilterMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrListInsertMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrListInsertBeforeMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrListRefMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrListSpliceMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttrListUnrefMethodInfo-#endif
− GI/Pango/Structs/AttrShape.hs
@@ -1,484 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrShape.AttrShape' structure is used to represent attributes which-impose shape restrictions.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrShape- ( ---- * Exported types- AttrShape(..) ,- newZeroAttrShape ,- noAttrShape ,--- -- * Methods--- ** new #method:new#-- attrShapeNew ,----- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrShape_attr ,-#endif- getAttrShapeAttr ,----- ** copyFunc #attr:copyFunc#-{- | copy function for the user data--}-#if ENABLE_OVERLOADING- attrShape_copyFunc ,-#endif- clearAttrShapeCopyFunc ,- getAttrShapeCopyFunc ,- setAttrShapeCopyFunc ,----- ** data #attr:data#-{- | user data set (see @/pango_attr_shape_new_with_data()/@)--}-#if ENABLE_OVERLOADING- attrShape_data ,-#endif- clearAttrShapeData ,- getAttrShapeData ,- setAttrShapeData ,----- ** destroyFunc #attr:destroyFunc#-{- | destroy function for the user data--}-#if ENABLE_OVERLOADING- attrShape_destroyFunc ,-#endif- clearAttrShapeDestroyFunc ,- getAttrShapeDestroyFunc ,- setAttrShapeDestroyFunc ,----- ** inkRect #attr:inkRect#-{- | the ink rectangle to restrict to--}-#if ENABLE_OVERLOADING- attrShape_inkRect ,-#endif- getAttrShapeInkRect ,----- ** logicalRect #attr:logicalRect#-{- | the logical rectangle to restrict to--}-#if ENABLE_OVERLOADING- attrShape_logicalRect ,-#endif- getAttrShapeLogicalRect ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.GLib.Callbacks as GLib.Callbacks-import qualified GI.Pango.Callbacks as Pango.Callbacks-import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute-import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle---- | Memory-managed wrapper type.-newtype AttrShape = AttrShape (ManagedPtr AttrShape)-instance WrappedPtr AttrShape where- wrappedPtrCalloc = callocBytes 72- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 72 >=> wrapPtr AttrShape)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrShape` struct initialized to zero.-newZeroAttrShape :: MonadIO m => m AttrShape-newZeroAttrShape = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrShape--instance tag ~ 'AttrSet => Constructible AttrShape tag where- new _ attrs = do- o <- newZeroAttrShape- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrShape`.-noAttrShape :: Maybe AttrShape-noAttrShape = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrShape #attr-@--}-getAttrShapeAttr :: MonadIO m => AttrShape -> m Pango.Attribute.Attribute-getAttrShapeAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrShapeAttrFieldInfo-instance AttrInfo AttrShapeAttrFieldInfo where- type AttrAllowedOps AttrShapeAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrShapeAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrShapeAttrFieldInfo = (~) AttrShape- type AttrGetType AttrShapeAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrShapeAttrFieldInfo = "attr"- type AttrOrigin AttrShapeAttrFieldInfo = AttrShape- attrGet _ = getAttrShapeAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrShape_attr :: AttrLabelProxy "attr"-attrShape_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@ink_rect@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrShape #inkRect-@--}-getAttrShapeInkRect :: MonadIO m => AttrShape -> m Pango.Rectangle.Rectangle-getAttrShapeInkRect s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 16 :: (Ptr Pango.Rectangle.Rectangle)- val' <- (newPtr Pango.Rectangle.Rectangle) val- return val'--#if ENABLE_OVERLOADING-data AttrShapeInkRectFieldInfo-instance AttrInfo AttrShapeInkRectFieldInfo where- type AttrAllowedOps AttrShapeInkRectFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrShapeInkRectFieldInfo = (~) (Ptr Pango.Rectangle.Rectangle)- type AttrBaseTypeConstraint AttrShapeInkRectFieldInfo = (~) AttrShape- type AttrGetType AttrShapeInkRectFieldInfo = Pango.Rectangle.Rectangle- type AttrLabel AttrShapeInkRectFieldInfo = "ink_rect"- type AttrOrigin AttrShapeInkRectFieldInfo = AttrShape- attrGet _ = getAttrShapeInkRect- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrShape_inkRect :: AttrLabelProxy "inkRect"-attrShape_inkRect = AttrLabelProxy--#endif---{- |-Get the value of the “@logical_rect@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrShape #logicalRect-@--}-getAttrShapeLogicalRect :: MonadIO m => AttrShape -> m Pango.Rectangle.Rectangle-getAttrShapeLogicalRect s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 32 :: (Ptr Pango.Rectangle.Rectangle)- val' <- (newPtr Pango.Rectangle.Rectangle) val- return val'--#if ENABLE_OVERLOADING-data AttrShapeLogicalRectFieldInfo-instance AttrInfo AttrShapeLogicalRectFieldInfo where- type AttrAllowedOps AttrShapeLogicalRectFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrShapeLogicalRectFieldInfo = (~) (Ptr Pango.Rectangle.Rectangle)- type AttrBaseTypeConstraint AttrShapeLogicalRectFieldInfo = (~) AttrShape- type AttrGetType AttrShapeLogicalRectFieldInfo = Pango.Rectangle.Rectangle- type AttrLabel AttrShapeLogicalRectFieldInfo = "logical_rect"- type AttrOrigin AttrShapeLogicalRectFieldInfo = AttrShape- attrGet _ = getAttrShapeLogicalRect- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrShape_logicalRect :: AttrLabelProxy "logicalRect"-attrShape_logicalRect = AttrLabelProxy--#endif---{- |-Get the value of the “@data@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrShape #data-@--}-getAttrShapeData :: MonadIO m => AttrShape -> m (Ptr ())-getAttrShapeData s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 48) :: IO (Ptr ())- return val--{- |-Set the value of the “@data@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrShape [ #data 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrShapeData :: MonadIO m => AttrShape -> Ptr () -> m ()-setAttrShapeData s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (val :: Ptr ())--{- |-Set the value of the “@data@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #data-@--}-clearAttrShapeData :: MonadIO m => AttrShape -> m ()-clearAttrShapeData s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (FP.nullPtr :: Ptr ())--#if ENABLE_OVERLOADING-data AttrShapeDataFieldInfo-instance AttrInfo AttrShapeDataFieldInfo where- type AttrAllowedOps AttrShapeDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrShapeDataFieldInfo = (~) (Ptr ())- type AttrBaseTypeConstraint AttrShapeDataFieldInfo = (~) AttrShape- type AttrGetType AttrShapeDataFieldInfo = Ptr ()- type AttrLabel AttrShapeDataFieldInfo = "data"- type AttrOrigin AttrShapeDataFieldInfo = AttrShape- attrGet _ = getAttrShapeData- attrSet _ = setAttrShapeData- attrConstruct = undefined- attrClear _ = clearAttrShapeData--attrShape_data :: AttrLabelProxy "data"-attrShape_data = AttrLabelProxy--#endif---{- |-Get the value of the “@copy_func@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrShape #copyFunc-@--}-getAttrShapeCopyFunc :: MonadIO m => AttrShape -> m (Maybe Pango.Callbacks.AttrDataCopyFunc_WithClosures)-getAttrShapeCopyFunc s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 56) :: IO (FunPtr Pango.Callbacks.C_AttrDataCopyFunc)- result <- SP.convertFunPtrIfNonNull val $ \val' -> do- let val'' = Pango.Callbacks.dynamic_AttrDataCopyFunc val'- return val''- return result--{- |-Set the value of the “@copy_func@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrShape [ #copyFunc 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrShapeCopyFunc :: MonadIO m => AttrShape -> FunPtr Pango.Callbacks.C_AttrDataCopyFunc -> m ()-setAttrShapeCopyFunc s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 56) (val :: FunPtr Pango.Callbacks.C_AttrDataCopyFunc)--{- |-Set the value of the “@copy_func@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #copyFunc-@--}-clearAttrShapeCopyFunc :: MonadIO m => AttrShape -> m ()-clearAttrShapeCopyFunc s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 56) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_AttrDataCopyFunc)--#if ENABLE_OVERLOADING-data AttrShapeCopyFuncFieldInfo-instance AttrInfo AttrShapeCopyFuncFieldInfo where- type AttrAllowedOps AttrShapeCopyFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrShapeCopyFuncFieldInfo = (~) (FunPtr Pango.Callbacks.C_AttrDataCopyFunc)- type AttrBaseTypeConstraint AttrShapeCopyFuncFieldInfo = (~) AttrShape- type AttrGetType AttrShapeCopyFuncFieldInfo = Maybe Pango.Callbacks.AttrDataCopyFunc_WithClosures- type AttrLabel AttrShapeCopyFuncFieldInfo = "copy_func"- type AttrOrigin AttrShapeCopyFuncFieldInfo = AttrShape- attrGet _ = getAttrShapeCopyFunc- attrSet _ = setAttrShapeCopyFunc- attrConstruct = undefined- attrClear _ = clearAttrShapeCopyFunc--attrShape_copyFunc :: AttrLabelProxy "copyFunc"-attrShape_copyFunc = AttrLabelProxy--#endif---{- |-Get the value of the “@destroy_func@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrShape #destroyFunc-@--}-getAttrShapeDestroyFunc :: MonadIO m => AttrShape -> m (Maybe GLib.Callbacks.DestroyNotify)-getAttrShapeDestroyFunc s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 64) :: IO (FunPtr GLib.Callbacks.C_DestroyNotify)- result <- SP.convertFunPtrIfNonNull val $ \val' -> do- let val'' = GLib.Callbacks.dynamic_DestroyNotify val'- return val''- return result--{- |-Set the value of the “@destroy_func@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrShape [ #destroyFunc 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrShapeDestroyFunc :: MonadIO m => AttrShape -> FunPtr GLib.Callbacks.C_DestroyNotify -> m ()-setAttrShapeDestroyFunc s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 64) (val :: FunPtr GLib.Callbacks.C_DestroyNotify)--{- |-Set the value of the “@destroy_func@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #destroyFunc-@--}-clearAttrShapeDestroyFunc :: MonadIO m => AttrShape -> m ()-clearAttrShapeDestroyFunc s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 64) (FP.nullFunPtr :: FunPtr GLib.Callbacks.C_DestroyNotify)--#if ENABLE_OVERLOADING-data AttrShapeDestroyFuncFieldInfo-instance AttrInfo AttrShapeDestroyFuncFieldInfo where- type AttrAllowedOps AttrShapeDestroyFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrShapeDestroyFuncFieldInfo = (~) (FunPtr GLib.Callbacks.C_DestroyNotify)- type AttrBaseTypeConstraint AttrShapeDestroyFuncFieldInfo = (~) AttrShape- type AttrGetType AttrShapeDestroyFuncFieldInfo = Maybe GLib.Callbacks.DestroyNotify- type AttrLabel AttrShapeDestroyFuncFieldInfo = "destroy_func"- type AttrOrigin AttrShapeDestroyFuncFieldInfo = AttrShape- attrGet _ = getAttrShapeDestroyFunc- attrSet _ = setAttrShapeDestroyFunc- attrConstruct = undefined- attrClear _ = clearAttrShapeDestroyFunc--attrShape_destroyFunc :: AttrLabelProxy "destroyFunc"-attrShape_destroyFunc = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrShape-type instance O.AttributeList AttrShape = AttrShapeAttributeList-type AttrShapeAttributeList = ('[ '("attr", AttrShapeAttrFieldInfo), '("inkRect", AttrShapeInkRectFieldInfo), '("logicalRect", AttrShapeLogicalRectFieldInfo), '("data", AttrShapeDataFieldInfo), '("copyFunc", AttrShapeCopyFuncFieldInfo), '("destroyFunc", AttrShapeDestroyFuncFieldInfo)] :: [(Symbol, *)])-#endif---- method AttrShape::new--- method type : MemberFunction--- Args : [Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "ink rectangle to assign to each character", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "logical rectangle to assign to each character", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_shape_new" pango_attr_shape_new :: - Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new shape attribute. A shape is used to impose a-particular ink and logical rectangle on the result of shaping a-particular glyph. This might be used, for instance, for-embedding a picture or a widget inside a 'GI.Pango.Objects.Layout.Layout'.--}-attrShapeNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Pango.Rectangle.Rectangle- {- ^ /@inkRect@/: ink rectangle to assign to each character -}- -> Pango.Rectangle.Rectangle- {- ^ /@logicalRect@/: logical rectangle to assign to each character -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrShapeNew inkRect logicalRect = liftIO $ do- inkRect' <- unsafeManagedPtrGetPtr inkRect- logicalRect' <- unsafeManagedPtrGetPtr logicalRect- result <- pango_attr_shape_new inkRect' logicalRect'- checkUnexpectedReturnNULL "attrShapeNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- touchManagedPtr inkRect- touchManagedPtr logicalRect- return result'--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrShapeMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrShapeMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrShapeMethod t AttrShape, O.MethodInfo info AttrShape p) => OL.IsLabel t (AttrShape -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrShape.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrShape where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrShape = AttrShape (ManagedPtr AttrShape)-instance WrappedPtr AttrShape where
− GI/Pango/Structs/AttrSize.hs
@@ -1,289 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrSize.AttrSize' structure is used to represent attributes which-set font size.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrSize- ( ---- * Exported types- AttrSize(..) ,- newZeroAttrSize ,- noAttrSize ,--- -- * Methods--- ** new #method:new#-- attrSizeNew ,----- -- * Properties--- ** absolute #attr:absolute#-{- | whether the font size is in device units or points.-This field is only present for compatibility with Pango-1.8.0-('GI.Pango.Enums.AttrTypeAbsoluteSize' was added in 1.8.1); and always will-be 'False' for 'GI.Pango.Enums.AttrTypeSize' and 'True' for 'GI.Pango.Enums.AttrTypeAbsoluteSize'.--}-#if ENABLE_OVERLOADING- attrSize_absolute ,-#endif- getAttrSizeAbsolute ,- setAttrSizeAbsolute ,----- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrSize_attr ,-#endif- getAttrSizeAttr ,----- ** size #attr:size#-{- | size of font, in units of 1\/'GI.Pango.Constants.SCALE' of a point (for-'GI.Pango.Enums.AttrTypeSize') or of a device uni (for 'GI.Pango.Enums.AttrTypeAbsoluteSize')--}-#if ENABLE_OVERLOADING- attrSize_size ,-#endif- getAttrSizeSize ,- setAttrSizeSize ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute---- | Memory-managed wrapper type.-newtype AttrSize = AttrSize (ManagedPtr AttrSize)-instance WrappedPtr AttrSize where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrSize)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrSize` struct initialized to zero.-newZeroAttrSize :: MonadIO m => m AttrSize-newZeroAttrSize = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrSize--instance tag ~ 'AttrSet => Constructible AttrSize tag where- new _ attrs = do- o <- newZeroAttrSize- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrSize`.-noAttrSize :: Maybe AttrSize-noAttrSize = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrSize #attr-@--}-getAttrSizeAttr :: MonadIO m => AttrSize -> m Pango.Attribute.Attribute-getAttrSizeAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrSizeAttrFieldInfo-instance AttrInfo AttrSizeAttrFieldInfo where- type AttrAllowedOps AttrSizeAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrSizeAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrSizeAttrFieldInfo = (~) AttrSize- type AttrGetType AttrSizeAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrSizeAttrFieldInfo = "attr"- type AttrOrigin AttrSizeAttrFieldInfo = AttrSize- attrGet _ = getAttrSizeAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrSize_attr :: AttrLabelProxy "attr"-attrSize_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@size@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrSize #size-@--}-getAttrSizeSize :: MonadIO m => AttrSize -> m Int32-getAttrSizeSize s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Int32- return val--{- |-Set the value of the “@size@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrSize [ #size 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrSizeSize :: MonadIO m => AttrSize -> Int32 -> m ()-setAttrSizeSize s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Int32)--#if ENABLE_OVERLOADING-data AttrSizeSizeFieldInfo-instance AttrInfo AttrSizeSizeFieldInfo where- type AttrAllowedOps AttrSizeSizeFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AttrSizeSizeFieldInfo = (~) Int32- type AttrBaseTypeConstraint AttrSizeSizeFieldInfo = (~) AttrSize- type AttrGetType AttrSizeSizeFieldInfo = Int32- type AttrLabel AttrSizeSizeFieldInfo = "size"- type AttrOrigin AttrSizeSizeFieldInfo = AttrSize- attrGet _ = getAttrSizeSize- attrSet _ = setAttrSizeSize- attrConstruct = undefined- attrClear _ = undefined--attrSize_size :: AttrLabelProxy "size"-attrSize_size = AttrLabelProxy--#endif---{- |-Get the value of the “@absolute@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrSize #absolute-@--}-getAttrSizeAbsolute :: MonadIO m => AttrSize -> m Word32-getAttrSizeAbsolute s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 20) :: IO Word32- return val--{- |-Set the value of the “@absolute@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrSize [ #absolute 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrSizeAbsolute :: MonadIO m => AttrSize -> Word32 -> m ()-setAttrSizeAbsolute s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 20) (val :: Word32)--#if ENABLE_OVERLOADING-data AttrSizeAbsoluteFieldInfo-instance AttrInfo AttrSizeAbsoluteFieldInfo where- type AttrAllowedOps AttrSizeAbsoluteFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AttrSizeAbsoluteFieldInfo = (~) Word32- type AttrBaseTypeConstraint AttrSizeAbsoluteFieldInfo = (~) AttrSize- type AttrGetType AttrSizeAbsoluteFieldInfo = Word32- type AttrLabel AttrSizeAbsoluteFieldInfo = "absolute"- type AttrOrigin AttrSizeAbsoluteFieldInfo = AttrSize- attrGet _ = getAttrSizeAbsolute- attrSet _ = setAttrSizeAbsolute- attrConstruct = undefined- attrClear _ = undefined--attrSize_absolute :: AttrLabelProxy "absolute"-attrSize_absolute = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrSize-type instance O.AttributeList AttrSize = AttrSizeAttributeList-type AttrSizeAttributeList = ('[ '("attr", AttrSizeAttrFieldInfo), '("size", AttrSizeSizeFieldInfo), '("absolute", AttrSizeAbsoluteFieldInfo)] :: [(Symbol, *)])-#endif---- method AttrSize::new--- method type : MemberFunction--- Args : [Arg {argCName = "size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the font size, in %PANGO_SCALE<!-- -->ths of a point.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Attribute"}))--- throws : False--- Skip return : False--foreign import ccall "pango_attr_size_new" pango_attr_size_new :: - Int32 -> -- size : TBasicType TInt- IO (Ptr Pango.Attribute.Attribute)--{- |-Create a new font-size attribute in fractional points.--}-attrSizeNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@size@/: the font size, in 'GI.Pango.Constants.SCALE'\<!-- -->ths of a point. -}- -> m Pango.Attribute.Attribute- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Attribute.Attribute',- which should be freed with 'GI.Pango.Structs.Attribute.attributeDestroy'. -}-attrSizeNew size = liftIO $ do- result <- pango_attr_size_new size- checkUnexpectedReturnNULL "attrSizeNew" result- result' <- (wrapPtr Pango.Attribute.Attribute) result- return result'--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrSizeMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrSizeMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrSizeMethod t AttrSize, O.MethodInfo info AttrSize p) => OL.IsLabel t (AttrSize -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrSize.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrSize where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrSize = AttrSize (ManagedPtr AttrSize)-instance WrappedPtr AttrSize where
− GI/Pango/Structs/AttrString.hs
@@ -1,207 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.AttrString.AttrString' structure is used to represent attributes with-a string value.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.AttrString- ( ---- * Exported types- AttrString(..) ,- newZeroAttrString ,- noAttrString ,--- -- * Properties--- ** attr #attr:attr#-{- | the common portion of the attribute--}-#if ENABLE_OVERLOADING- attrString_attr ,-#endif- getAttrStringAttr ,----- ** value #attr:value#-{- | the string which is the value of the attribute--}-#if ENABLE_OVERLOADING- attrString_value ,-#endif- clearAttrStringValue ,- getAttrStringValue ,- setAttrStringValue ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Attribute as Pango.Attribute---- | Memory-managed wrapper type.-newtype AttrString = AttrString (ManagedPtr AttrString)-instance WrappedPtr AttrString where- wrappedPtrCalloc = callocBytes 24- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 24 >=> wrapPtr AttrString)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `AttrString` struct initialized to zero.-newZeroAttrString :: MonadIO m => m AttrString-newZeroAttrString = liftIO $ wrappedPtrCalloc >>= wrapPtr AttrString--instance tag ~ 'AttrSet => Constructible AttrString tag where- new _ attrs = do- o <- newZeroAttrString- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `AttrString`.-noAttrString :: Maybe AttrString-noAttrString = Nothing--{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrString #attr-@--}-getAttrStringAttr :: MonadIO m => AttrString -> m Pango.Attribute.Attribute-getAttrStringAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 0 :: (Ptr Pango.Attribute.Attribute)- val' <- (newPtr Pango.Attribute.Attribute) val- return val'--#if ENABLE_OVERLOADING-data AttrStringAttrFieldInfo-instance AttrInfo AttrStringAttrFieldInfo where- type AttrAllowedOps AttrStringAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint AttrStringAttrFieldInfo = (~) (Ptr Pango.Attribute.Attribute)- type AttrBaseTypeConstraint AttrStringAttrFieldInfo = (~) AttrString- type AttrGetType AttrStringAttrFieldInfo = Pango.Attribute.Attribute- type AttrLabel AttrStringAttrFieldInfo = "attr"- type AttrOrigin AttrStringAttrFieldInfo = AttrString- attrGet _ = getAttrStringAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--attrString_attr :: AttrLabelProxy "attr"-attrString_attr = AttrLabelProxy--#endif---{- |-Get the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attrString #value-@--}-getAttrStringValue :: MonadIO m => AttrString -> m (Maybe T.Text)-getAttrStringValue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CString- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--{- |-Set the value of the “@value@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attrString [ #value 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttrStringValue :: MonadIO m => AttrString -> CString -> m ()-setAttrStringValue s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: CString)--{- |-Set the value of the “@value@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #value-@--}-clearAttrStringValue :: MonadIO m => AttrString -> m ()-clearAttrStringValue s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullPtr :: CString)--#if ENABLE_OVERLOADING-data AttrStringValueFieldInfo-instance AttrInfo AttrStringValueFieldInfo where- type AttrAllowedOps AttrStringValueFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttrStringValueFieldInfo = (~) CString- type AttrBaseTypeConstraint AttrStringValueFieldInfo = (~) AttrString- type AttrGetType AttrStringValueFieldInfo = Maybe T.Text- type AttrLabel AttrStringValueFieldInfo = "value"- type AttrOrigin AttrStringValueFieldInfo = AttrString- attrGet _ = getAttrStringValue- attrSet _ = setAttrStringValue- attrConstruct = undefined- attrClear _ = clearAttrStringValue--attrString_value :: AttrLabelProxy "value"-attrString_value = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList AttrString-type instance O.AttributeList AttrString = AttrStringAttributeList-type AttrStringAttributeList = ('[ '("attr", AttrStringAttrFieldInfo), '("value", AttrStringValueFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveAttrStringMethod (t :: Symbol) (o :: *) :: * where- ResolveAttrStringMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttrStringMethod t AttrString, O.MethodInfo info AttrString p) => OL.IsLabel t (AttrString -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/AttrString.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.AttrString where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype AttrString = AttrString (ManagedPtr AttrString)-instance WrappedPtr AttrString where
− GI/Pango/Structs/Attribute.hs
@@ -1,420 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.Attribute.Attribute' structure represents the common portions of all-attributes. Particular types of attributes include this structure-as their initial portion. The common portion of the attribute holds-the range to which the value in the type-specific part of the attribute-applies and should be initialized using 'GI.Pango.Structs.Attribute.attributeInit'.-By default an attribute will have an all-inclusive range of [0,@/G_MAXUINT/@].--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Attribute- ( ---- * Exported types- Attribute(..) ,- noAttribute ,--- -- * Methods--- ** destroy #method:destroy#--#if ENABLE_OVERLOADING- AttributeDestroyMethodInfo ,-#endif- attributeDestroy ,----- ** equal #method:equal#--#if ENABLE_OVERLOADING- AttributeEqualMethodInfo ,-#endif- attributeEqual ,----- ** init #method:init#--#if ENABLE_OVERLOADING- AttributeInitMethodInfo ,-#endif- attributeInit ,----- -- * Properties--- ** endIndex #attr:endIndex#-{- | end index of the range (in bytes). The character at this index-is not included in the range.--}-#if ENABLE_OVERLOADING- attribute_endIndex ,-#endif- getAttributeEndIndex ,- setAttributeEndIndex ,----- ** klass #attr:klass#-{- | the class structure holding information about the type of the attribute--}-#if ENABLE_OVERLOADING- attribute_klass ,-#endif- clearAttributeKlass ,- getAttributeKlass ,- setAttributeKlass ,----- ** startIndex #attr:startIndex#-{- | the start index of the range (in bytes).--}-#if ENABLE_OVERLOADING- attribute_startIndex ,-#endif- getAttributeStartIndex ,- setAttributeStartIndex ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.AttrClass as Pango.AttrClass---- | Memory-managed wrapper type.-newtype Attribute = Attribute (ManagedPtr Attribute)-foreign import ccall "pango_attribute_copy" _Attribute_copy_pango_attribute_copy :: Ptr a -> IO (Ptr a)--foreign import ccall "&pango_attribute_destroy" _Attribute_free_pango_attribute_destroy :: FunPtr (Ptr a -> IO ())--instance WrappedPtr Attribute where- wrappedPtrCalloc = error "calloc not permitted for Attribute"- wrappedPtrCopy = \p -> withManagedPtr p (_Attribute_copy_pango_attribute_copy >=> wrapPtr Attribute)- wrappedPtrFree = Just _Attribute_free_pango_attribute_destroy---- | A convenience alias for `Nothing` :: `Maybe` `Attribute`.-noAttribute :: Maybe Attribute-noAttribute = Nothing--{- |-Get the value of the “@klass@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attribute #klass-@--}-getAttributeKlass :: MonadIO m => Attribute -> m (Maybe Pango.AttrClass.AttrClass)-getAttributeKlass s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr Pango.AttrClass.AttrClass)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newPtr Pango.AttrClass.AttrClass) val'- return val''- return result--{- |-Set the value of the “@klass@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attribute [ #klass 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttributeKlass :: MonadIO m => Attribute -> Ptr Pango.AttrClass.AttrClass -> m ()-setAttributeKlass s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr Pango.AttrClass.AttrClass)--{- |-Set the value of the “@klass@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #klass-@--}-clearAttributeKlass :: MonadIO m => Attribute -> m ()-clearAttributeKlass s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (FP.nullPtr :: Ptr Pango.AttrClass.AttrClass)--#if ENABLE_OVERLOADING-data AttributeKlassFieldInfo-instance AttrInfo AttributeKlassFieldInfo where- type AttrAllowedOps AttributeKlassFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint AttributeKlassFieldInfo = (~) (Ptr Pango.AttrClass.AttrClass)- type AttrBaseTypeConstraint AttributeKlassFieldInfo = (~) Attribute- type AttrGetType AttributeKlassFieldInfo = Maybe Pango.AttrClass.AttrClass- type AttrLabel AttributeKlassFieldInfo = "klass"- type AttrOrigin AttributeKlassFieldInfo = Attribute- attrGet _ = getAttributeKlass- attrSet _ = setAttributeKlass- attrConstruct = undefined- attrClear _ = clearAttributeKlass--attribute_klass :: AttrLabelProxy "klass"-attribute_klass = AttrLabelProxy--#endif---{- |-Get the value of the “@start_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attribute #startIndex-@--}-getAttributeStartIndex :: MonadIO m => Attribute -> m Word32-getAttributeStartIndex s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--{- |-Set the value of the “@start_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attribute [ #startIndex 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttributeStartIndex :: MonadIO m => Attribute -> Word32 -> m ()-setAttributeStartIndex s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--#if ENABLE_OVERLOADING-data AttributeStartIndexFieldInfo-instance AttrInfo AttributeStartIndexFieldInfo where- type AttrAllowedOps AttributeStartIndexFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AttributeStartIndexFieldInfo = (~) Word32- type AttrBaseTypeConstraint AttributeStartIndexFieldInfo = (~) Attribute- type AttrGetType AttributeStartIndexFieldInfo = Word32- type AttrLabel AttributeStartIndexFieldInfo = "start_index"- type AttrOrigin AttributeStartIndexFieldInfo = Attribute- attrGet _ = getAttributeStartIndex- attrSet _ = setAttributeStartIndex- attrConstruct = undefined- attrClear _ = undefined--attribute_startIndex :: AttrLabelProxy "startIndex"-attribute_startIndex = AttrLabelProxy--#endif---{- |-Get the value of the “@end_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' attribute #endIndex-@--}-getAttributeEndIndex :: MonadIO m => Attribute -> m Word32-getAttributeEndIndex s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Word32- return val--{- |-Set the value of the “@end_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' attribute [ #endIndex 'Data.GI.Base.Attributes.:=' value ]-@--}-setAttributeEndIndex :: MonadIO m => Attribute -> Word32 -> m ()-setAttributeEndIndex s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Word32)--#if ENABLE_OVERLOADING-data AttributeEndIndexFieldInfo-instance AttrInfo AttributeEndIndexFieldInfo where- type AttrAllowedOps AttributeEndIndexFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint AttributeEndIndexFieldInfo = (~) Word32- type AttrBaseTypeConstraint AttributeEndIndexFieldInfo = (~) Attribute- type AttrGetType AttributeEndIndexFieldInfo = Word32- type AttrLabel AttributeEndIndexFieldInfo = "end_index"- type AttrOrigin AttributeEndIndexFieldInfo = Attribute- attrGet _ = getAttributeEndIndex- attrSet _ = setAttributeEndIndex- attrConstruct = undefined- attrClear _ = undefined--attribute_endIndex :: AttrLabelProxy "endIndex"-attribute_endIndex = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList Attribute-type instance O.AttributeList Attribute = AttributeAttributeList-type AttributeAttributeList = ('[ '("klass", AttributeKlassFieldInfo), '("startIndex", AttributeStartIndexFieldInfo), '("endIndex", AttributeEndIndexFieldInfo)] :: [(Symbol, *)])-#endif---- method Attribute::destroy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttribute.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attribute_destroy" pango_attribute_destroy :: - Ptr Attribute -> -- attr : TInterface (Name {namespace = "Pango", name = "Attribute"})- IO ()--{- |-Destroy a 'GI.Pango.Structs.Attribute.Attribute' and free all associated memory.--}-attributeDestroy ::- (B.CallStack.HasCallStack, MonadIO m) =>- Attribute- {- ^ /@attr@/: a 'GI.Pango.Structs.Attribute.Attribute'. -}- -> m ()-attributeDestroy attr = liftIO $ do- attr' <- unsafeManagedPtrGetPtr attr- pango_attribute_destroy attr'- touchManagedPtr attr- return ()--#if ENABLE_OVERLOADING-data AttributeDestroyMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo AttributeDestroyMethodInfo Attribute signature where- overloadedMethod _ = attributeDestroy--#endif---- method Attribute::equal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "attr1", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttribute", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr2", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "another #PangoAttribute", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_attribute_equal" pango_attribute_equal :: - Ptr Attribute -> -- attr1 : TInterface (Name {namespace = "Pango", name = "Attribute"})- Ptr Attribute -> -- attr2 : TInterface (Name {namespace = "Pango", name = "Attribute"})- IO CInt--{- |-Compare two attributes for equality. This compares only the-actual value of the two attributes and not the ranges that the-attributes apply to.--}-attributeEqual ::- (B.CallStack.HasCallStack, MonadIO m) =>- Attribute- {- ^ /@attr1@/: a 'GI.Pango.Structs.Attribute.Attribute' -}- -> Attribute- {- ^ /@attr2@/: another 'GI.Pango.Structs.Attribute.Attribute' -}- -> m Bool- {- ^ __Returns:__ 'True' if the two attributes have the same value. -}-attributeEqual attr1 attr2 = liftIO $ do- attr1' <- unsafeManagedPtrGetPtr attr1- attr2' <- unsafeManagedPtrGetPtr attr2- result <- pango_attribute_equal attr1' attr2'- let result' = (/= 0) result- touchManagedPtr attr1- touchManagedPtr attr2- return result'--#if ENABLE_OVERLOADING-data AttributeEqualMethodInfo-instance (signature ~ (Attribute -> m Bool), MonadIO m) => O.MethodInfo AttributeEqualMethodInfo Attribute signature where- overloadedMethod _ = attributeEqual--#endif---- method Attribute::init--- method type : OrdinaryMethod--- Args : [Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "Attribute"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttribute", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "klass", argType = TInterface (Name {namespace = "Pango", name = "AttrClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrClass", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_attribute_init" pango_attribute_init :: - Ptr Attribute -> -- attr : TInterface (Name {namespace = "Pango", name = "Attribute"})- Ptr Pango.AttrClass.AttrClass -> -- klass : TInterface (Name {namespace = "Pango", name = "AttrClass"})- IO ()--{- |-Initializes /@attr@/\'s klass to /@klass@/,-it\'s start_index to 'GI.Pango.Constants.ATTR_INDEX_FROM_TEXT_BEGINNING'-and end_index to @/PANGO_ATTR_INDEX_TO_TEXT_END/@-such that the attribute applies-to the entire text by default.--/Since: 1.20/--}-attributeInit ::- (B.CallStack.HasCallStack, MonadIO m) =>- Attribute- {- ^ /@attr@/: a 'GI.Pango.Structs.Attribute.Attribute' -}- -> Pango.AttrClass.AttrClass- {- ^ /@klass@/: a 'GI.Pango.Structs.AttrClass.AttrClass' -}- -> m ()-attributeInit attr klass = liftIO $ do- attr' <- unsafeManagedPtrGetPtr attr- klass' <- unsafeManagedPtrGetPtr klass- pango_attribute_init attr' klass'- touchManagedPtr attr- touchManagedPtr klass- return ()--#if ENABLE_OVERLOADING-data AttributeInitMethodInfo-instance (signature ~ (Pango.AttrClass.AttrClass -> m ()), MonadIO m) => O.MethodInfo AttributeInitMethodInfo Attribute signature where- overloadedMethod _ = attributeInit--#endif--#if ENABLE_OVERLOADING-type family ResolveAttributeMethod (t :: Symbol) (o :: *) :: * where- ResolveAttributeMethod "destroy" o = AttributeDestroyMethodInfo- ResolveAttributeMethod "equal" o = AttributeEqualMethodInfo- ResolveAttributeMethod "init" o = AttributeInitMethodInfo- ResolveAttributeMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveAttributeMethod t Attribute, O.MethodInfo info Attribute p) => OL.IsLabel t (Attribute -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Attribute.hs-boot
@@ -1,35 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Attribute where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Attribute = Attribute (ManagedPtr Attribute)-instance WrappedPtr Attribute where-#if ENABLE_OVERLOADING-data AttributeDestroyMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttributeEqualMethodInfo-#endif-#if ENABLE_OVERLOADING-data AttributeInitMethodInfo-#endif
− GI/Pango/Structs/Color.hs
@@ -1,463 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.Color.Color' structure is used to-represent a color in an uncalibrated RGB color-space.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Color- ( ---- * Exported types- Color(..) ,- newZeroColor ,- noColor ,--- -- * Methods--- ** copy #method:copy#--#if ENABLE_OVERLOADING- ColorCopyMethodInfo ,-#endif- colorCopy ,----- ** free #method:free#--#if ENABLE_OVERLOADING- ColorFreeMethodInfo ,-#endif- colorFree ,----- ** parse #method:parse#--#if ENABLE_OVERLOADING- ColorParseMethodInfo ,-#endif- colorParse ,----- ** toString #method:toString#--#if ENABLE_OVERLOADING- ColorToStringMethodInfo ,-#endif- colorToString ,----- -- * Properties--- ** blue #attr:blue#-{- | value of blue component--}-#if ENABLE_OVERLOADING- color_blue ,-#endif- getColorBlue ,- setColorBlue ,----- ** green #attr:green#-{- | value of green component--}-#if ENABLE_OVERLOADING- color_green ,-#endif- getColorGreen ,- setColorGreen ,----- ** red #attr:red#-{- | value of red component--}-#if ENABLE_OVERLOADING- color_red ,-#endif- getColorRed ,- setColorRed ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype Color = Color (ManagedPtr Color)-foreign import ccall "pango_color_get_type" c_pango_color_get_type :: - IO GType--instance BoxedObject Color where- boxedType _ = c_pango_color_get_type---- | Construct a `Color` struct initialized to zero.-newZeroColor :: MonadIO m => m Color-newZeroColor = liftIO $ callocBoxedBytes 6 >>= wrapBoxed Color--instance tag ~ 'AttrSet => Constructible Color tag where- new _ attrs = do- o <- newZeroColor- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `Color`.-noColor :: Maybe Color-noColor = Nothing--{- |-Get the value of the “@red@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' color #red-@--}-getColorRed :: MonadIO m => Color -> m Word16-getColorRed s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word16- return val--{- |-Set the value of the “@red@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' color [ #red 'Data.GI.Base.Attributes.:=' value ]-@--}-setColorRed :: MonadIO m => Color -> Word16 -> m ()-setColorRed s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word16)--#if ENABLE_OVERLOADING-data ColorRedFieldInfo-instance AttrInfo ColorRedFieldInfo where- type AttrAllowedOps ColorRedFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ColorRedFieldInfo = (~) Word16- type AttrBaseTypeConstraint ColorRedFieldInfo = (~) Color- type AttrGetType ColorRedFieldInfo = Word16- type AttrLabel ColorRedFieldInfo = "red"- type AttrOrigin ColorRedFieldInfo = Color- attrGet _ = getColorRed- attrSet _ = setColorRed- attrConstruct = undefined- attrClear _ = undefined--color_red :: AttrLabelProxy "red"-color_red = AttrLabelProxy--#endif---{- |-Get the value of the “@green@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' color #green-@--}-getColorGreen :: MonadIO m => Color -> m Word16-getColorGreen s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 2) :: IO Word16- return val--{- |-Set the value of the “@green@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' color [ #green 'Data.GI.Base.Attributes.:=' value ]-@--}-setColorGreen :: MonadIO m => Color -> Word16 -> m ()-setColorGreen s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 2) (val :: Word16)--#if ENABLE_OVERLOADING-data ColorGreenFieldInfo-instance AttrInfo ColorGreenFieldInfo where- type AttrAllowedOps ColorGreenFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ColorGreenFieldInfo = (~) Word16- type AttrBaseTypeConstraint ColorGreenFieldInfo = (~) Color- type AttrGetType ColorGreenFieldInfo = Word16- type AttrLabel ColorGreenFieldInfo = "green"- type AttrOrigin ColorGreenFieldInfo = Color- attrGet _ = getColorGreen- attrSet _ = setColorGreen- attrConstruct = undefined- attrClear _ = undefined--color_green :: AttrLabelProxy "green"-color_green = AttrLabelProxy--#endif---{- |-Get the value of the “@blue@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' color #blue-@--}-getColorBlue :: MonadIO m => Color -> m Word16-getColorBlue s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Word16- return val--{- |-Set the value of the “@blue@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' color [ #blue 'Data.GI.Base.Attributes.:=' value ]-@--}-setColorBlue :: MonadIO m => Color -> Word16 -> m ()-setColorBlue s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Word16)--#if ENABLE_OVERLOADING-data ColorBlueFieldInfo-instance AttrInfo ColorBlueFieldInfo where- type AttrAllowedOps ColorBlueFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ColorBlueFieldInfo = (~) Word16- type AttrBaseTypeConstraint ColorBlueFieldInfo = (~) Color- type AttrGetType ColorBlueFieldInfo = Word16- type AttrLabel ColorBlueFieldInfo = "blue"- type AttrOrigin ColorBlueFieldInfo = Color- attrGet _ = getColorBlue- attrSet _ = setColorBlue- attrConstruct = undefined- attrClear _ = undefined--color_blue :: AttrLabelProxy "blue"-color_blue = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList Color-type instance O.AttributeList Color = ColorAttributeList-type ColorAttributeList = ('[ '("red", ColorRedFieldInfo), '("green", ColorGreenFieldInfo), '("blue", ColorBlueFieldInfo)] :: [(Symbol, *)])-#endif---- method Color::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "src", argType = TInterface (Name {namespace = "Pango", name = "Color"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "color to copy, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Color"}))--- throws : False--- Skip return : False--foreign import ccall "pango_color_copy" pango_color_copy :: - Ptr Color -> -- src : TInterface (Name {namespace = "Pango", name = "Color"})- IO (Ptr Color)--{- |-Creates a copy of /@src@/, which should be freed with-'GI.Pango.Structs.Color.colorFree'. Primarily used by language bindings,-not that useful otherwise (since colors can just be copied-by assignment in C).--}-colorCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- Color- {- ^ /@src@/: color to copy, may be 'Nothing' -}- -> m (Maybe Color)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Color.Color', which- should be freed with 'GI.Pango.Structs.Color.colorFree', or 'Nothing' if- /@src@/ was 'Nothing'. -}-colorCopy src = liftIO $ do- src' <- unsafeManagedPtrGetPtr src- result <- pango_color_copy src'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed Color) result'- return result''- touchManagedPtr src- return maybeResult--#if ENABLE_OVERLOADING-data ColorCopyMethodInfo-instance (signature ~ (m (Maybe Color)), MonadIO m) => O.MethodInfo ColorCopyMethodInfo Color signature where- overloadedMethod _ = colorCopy--#endif---- method Color::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "color", argType = TInterface (Name {namespace = "Pango", name = "Color"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an allocated #PangoColor, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_color_free" pango_color_free :: - Ptr Color -> -- color : TInterface (Name {namespace = "Pango", name = "Color"})- IO ()--{- |-Frees a color allocated by 'GI.Pango.Structs.Color.colorCopy'.--}-colorFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- Color- {- ^ /@color@/: an allocated 'GI.Pango.Structs.Color.Color', may be 'Nothing' -}- -> m ()-colorFree color = liftIO $ do- color' <- unsafeManagedPtrGetPtr color- pango_color_free color'- touchManagedPtr color- return ()--#if ENABLE_OVERLOADING-data ColorFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo ColorFreeMethodInfo Color signature where- overloadedMethod _ = colorFree--#endif---- method Color::parse--- method type : OrdinaryMethod--- Args : [Arg {argCName = "color", argType = TInterface (Name {namespace = "Pango", name = "Color"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoColor structure in which to store the\n result, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "spec", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a string specifying the new color", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_color_parse" pango_color_parse :: - Ptr Color -> -- color : TInterface (Name {namespace = "Pango", name = "Color"})- CString -> -- spec : TBasicType TUTF8- IO CInt--{- |-Fill in the fields of a color from a string specification. The-string can either one of a large set of standard names. (Taken-from the CSS \<ulink url=\"http:\/\/dev.w3.org\/csswg\/css-color\/@/named/@-colors\">specification\<\/ulink>), or it can be a hexadecimal-value in the-form \'#rgb\' \'#rrggbb\' \'#rrrgggbbb\' or \'#rrrrggggbbbb\' where-\'r\', \'g\' and \'b\' are hex digits of the red, green, and blue-components of the color, respectively. (White in the four-forms is \'#fff\' \'#ffffff\' \'#fffffffff\' and \'#ffffffffffff\')--}-colorParse ::- (B.CallStack.HasCallStack, MonadIO m) =>- Color- {- ^ /@color@/: a 'GI.Pango.Structs.Color.Color' structure in which to store the- result, or 'Nothing' -}- -> T.Text- {- ^ /@spec@/: a string specifying the new color -}- -> m Bool- {- ^ __Returns:__ 'True' if parsing of the specifier succeeded,- otherwise false. -}-colorParse color spec = liftIO $ do- color' <- unsafeManagedPtrGetPtr color- spec' <- textToCString spec- result <- pango_color_parse color' spec'- let result' = (/= 0) result- touchManagedPtr color- freeMem spec'- return result'--#if ENABLE_OVERLOADING-data ColorParseMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m) => O.MethodInfo ColorParseMethodInfo Color signature where- overloadedMethod _ = colorParse--#endif---- method Color::to_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "color", argType = TInterface (Name {namespace = "Pango", name = "Color"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoColor", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_color_to_string" pango_color_to_string :: - Ptr Color -> -- color : TInterface (Name {namespace = "Pango", name = "Color"})- IO CString--{- |-Returns a textual specification of /@color@/ in the hexadecimal form-\<literal>#rrrrggggbbbb\<\/literal>, where \<literal>r\<\/literal>,-\<literal>g\<\/literal> and \<literal>b\<\/literal> are hex digits representing-the red, green, and blue components respectively.--/Since: 1.16/--}-colorToString ::- (B.CallStack.HasCallStack, MonadIO m) =>- Color- {- ^ /@color@/: a 'GI.Pango.Structs.Color.Color' -}- -> m T.Text- {- ^ __Returns:__ a newly-allocated text string that must be freed with 'GI.GLib.Functions.free'. -}-colorToString color = liftIO $ do- color' <- unsafeManagedPtrGetPtr color- result <- pango_color_to_string color'- checkUnexpectedReturnNULL "colorToString" result- result' <- cstringToText result- freeMem result- touchManagedPtr color- return result'--#if ENABLE_OVERLOADING-data ColorToStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo ColorToStringMethodInfo Color signature where- overloadedMethod _ = colorToString--#endif--#if ENABLE_OVERLOADING-type family ResolveColorMethod (t :: Symbol) (o :: *) :: * where- ResolveColorMethod "copy" o = ColorCopyMethodInfo- ResolveColorMethod "free" o = ColorFreeMethodInfo- ResolveColorMethod "parse" o = ColorParseMethodInfo- ResolveColorMethod "toString" o = ColorToStringMethodInfo- ResolveColorMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveColorMethod t Color, O.MethodInfo info Color p) => OL.IsLabel t (Color -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Color.hs-boot
@@ -1,38 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Color where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Color = Color (ManagedPtr Color)-instance BoxedObject Color where-#if ENABLE_OVERLOADING-data ColorCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data ColorFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data ColorParseMethodInfo-#endif-#if ENABLE_OVERLOADING-data ColorToStringMethodInfo-#endif
− GI/Pango/Structs/Coverage.hs
@@ -1,322 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.Coverage.Coverage' structure represents a map from Unicode characters-to 'GI.Pango.Enums.CoverageLevel'. It is an opaque structure with no public fields.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Coverage- ( ---- * Exported types- Coverage(..) ,- noCoverage ,--- -- * Methods--- ** get #method:get#--#if ENABLE_OVERLOADING- CoverageGetMethodInfo ,-#endif- coverageGet ,----- ** max #method:max#--#if ENABLE_OVERLOADING- CoverageMaxMethodInfo ,-#endif- coverageMax ,----- ** set #method:set#--#if ENABLE_OVERLOADING- CoverageSetMethodInfo ,-#endif- coverageSet ,----- ** toBytes #method:toBytes#--#if ENABLE_OVERLOADING- CoverageToBytesMethodInfo ,-#endif- coverageToBytes ,----- ** unref #method:unref#--#if ENABLE_OVERLOADING- CoverageUnrefMethodInfo ,-#endif- coverageUnref ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums---- | Memory-managed wrapper type.-newtype Coverage = Coverage (ManagedPtr Coverage)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Coverage where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing---- | A convenience alias for `Nothing` :: `Maybe` `Coverage`.-noCoverage :: Maybe Coverage-noCoverage = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList Coverage-type instance O.AttributeList Coverage = CoverageAttributeList-type CoverageAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method Coverage::get--- method type : OrdinaryMethod--- Args : [Arg {argCName = "coverage", argType = TInterface (Name {namespace = "Pango", name = "Coverage"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCoverage", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the index to check", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "CoverageLevel"}))--- throws : False--- Skip return : False--foreign import ccall "pango_coverage_get" pango_coverage_get :: - Ptr Coverage -> -- coverage : TInterface (Name {namespace = "Pango", name = "Coverage"})- Int32 -> -- index_ : TBasicType TInt- IO CUInt--{- |-Determine whether a particular index is covered by /@coverage@/--}-coverageGet ::- (B.CallStack.HasCallStack, MonadIO m) =>- Coverage- {- ^ /@coverage@/: a 'GI.Pango.Structs.Coverage.Coverage' -}- -> Int32- {- ^ /@index_@/: the index to check -}- -> m Pango.Enums.CoverageLevel- {- ^ __Returns:__ the coverage level of /@coverage@/ for character /@index_@/. -}-coverageGet coverage index_ = liftIO $ do- coverage' <- unsafeManagedPtrGetPtr coverage- result <- pango_coverage_get coverage' index_- let result' = (toEnum . fromIntegral) result- touchManagedPtr coverage- return result'--#if ENABLE_OVERLOADING-data CoverageGetMethodInfo-instance (signature ~ (Int32 -> m Pango.Enums.CoverageLevel), MonadIO m) => O.MethodInfo CoverageGetMethodInfo Coverage signature where- overloadedMethod _ = coverageGet--#endif---- method Coverage::max--- method type : OrdinaryMethod--- Args : [Arg {argCName = "coverage", argType = TInterface (Name {namespace = "Pango", name = "Coverage"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCoverage", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "other", argType = TInterface (Name {namespace = "Pango", name = "Coverage"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "another #PangoCoverage", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_coverage_max" pango_coverage_max :: - Ptr Coverage -> -- coverage : TInterface (Name {namespace = "Pango", name = "Coverage"})- Ptr Coverage -> -- other : TInterface (Name {namespace = "Pango", name = "Coverage"})- IO ()--{- |-Set the coverage for each index in /@coverage@/ to be the max (better)-value of the current coverage for the index and the coverage for-the corresponding index in /@other@/.--}-coverageMax ::- (B.CallStack.HasCallStack, MonadIO m) =>- Coverage- {- ^ /@coverage@/: a 'GI.Pango.Structs.Coverage.Coverage' -}- -> Coverage- {- ^ /@other@/: another 'GI.Pango.Structs.Coverage.Coverage' -}- -> m ()-coverageMax coverage other = liftIO $ do- coverage' <- unsafeManagedPtrGetPtr coverage- other' <- unsafeManagedPtrGetPtr other- pango_coverage_max coverage' other'- touchManagedPtr coverage- touchManagedPtr other- return ()--#if ENABLE_OVERLOADING-data CoverageMaxMethodInfo-instance (signature ~ (Coverage -> m ()), MonadIO m) => O.MethodInfo CoverageMaxMethodInfo Coverage signature where- overloadedMethod _ = coverageMax--#endif---- method Coverage::set--- method type : OrdinaryMethod--- Args : [Arg {argCName = "coverage", argType = TInterface (Name {namespace = "Pango", name = "Coverage"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCoverage", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the index to modify", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "level", argType = TInterface (Name {namespace = "Pango", name = "CoverageLevel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new level for @index_", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_coverage_set" pango_coverage_set :: - Ptr Coverage -> -- coverage : TInterface (Name {namespace = "Pango", name = "Coverage"})- Int32 -> -- index_ : TBasicType TInt- CUInt -> -- level : TInterface (Name {namespace = "Pango", name = "CoverageLevel"})- IO ()--{- |-Modify a particular index within /@coverage@/--}-coverageSet ::- (B.CallStack.HasCallStack, MonadIO m) =>- Coverage- {- ^ /@coverage@/: a 'GI.Pango.Structs.Coverage.Coverage' -}- -> Int32- {- ^ /@index_@/: the index to modify -}- -> Pango.Enums.CoverageLevel- {- ^ /@level@/: the new level for /@index_@/ -}- -> m ()-coverageSet coverage index_ level = liftIO $ do- coverage' <- unsafeManagedPtrGetPtr coverage- let level' = (fromIntegral . fromEnum) level- pango_coverage_set coverage' index_ level'- touchManagedPtr coverage- return ()--#if ENABLE_OVERLOADING-data CoverageSetMethodInfo-instance (signature ~ (Int32 -> Pango.Enums.CoverageLevel -> m ()), MonadIO m) => O.MethodInfo CoverageSetMethodInfo Coverage signature where- overloadedMethod _ = coverageSet--#endif---- method Coverage::to_bytes--- method type : OrdinaryMethod--- Args : [Arg {argCName = "coverage", argType = TInterface (Name {namespace = "Pango", name = "Coverage"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCoverage", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "bytes", argType = TCArray False (-1) 2 (TBasicType TUInt8), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to store result (must be freed with g_free())", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "n_bytes", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store size of result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_bytes", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store size of result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_coverage_to_bytes" pango_coverage_to_bytes :: - Ptr Coverage -> -- coverage : TInterface (Name {namespace = "Pango", name = "Coverage"})- Ptr (Ptr Word8) -> -- bytes : TCArray False (-1) 2 (TBasicType TUInt8)- Ptr Int32 -> -- n_bytes : TBasicType TInt- IO ()--{- |-Convert a 'GI.Pango.Structs.Coverage.Coverage' structure into a flat binary format--}-coverageToBytes ::- (B.CallStack.HasCallStack, MonadIO m) =>- Coverage- {- ^ /@coverage@/: a 'GI.Pango.Structs.Coverage.Coverage' -}- -> m (ByteString)-coverageToBytes coverage = liftIO $ do- coverage' <- unsafeManagedPtrGetPtr coverage- bytes <- allocMem :: IO (Ptr (Ptr Word8))- nBytes <- allocMem :: IO (Ptr Int32)- pango_coverage_to_bytes coverage' bytes nBytes- nBytes' <- peek nBytes- bytes' <- peek bytes- bytes'' <- (unpackByteStringWithLength nBytes') bytes'- freeMem bytes'- touchManagedPtr coverage- freeMem bytes- freeMem nBytes- return bytes''--#if ENABLE_OVERLOADING-data CoverageToBytesMethodInfo-instance (signature ~ (m (ByteString)), MonadIO m) => O.MethodInfo CoverageToBytesMethodInfo Coverage signature where- overloadedMethod _ = coverageToBytes--#endif---- method Coverage::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "coverage", argType = TInterface (Name {namespace = "Pango", name = "Coverage"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCoverage", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_coverage_unref" pango_coverage_unref :: - Ptr Coverage -> -- coverage : TInterface (Name {namespace = "Pango", name = "Coverage"})- IO ()--{- |-Decrease the reference count on the 'GI.Pango.Structs.Coverage.Coverage' by one.-If the result is zero, free the coverage and all associated memory.--}-coverageUnref ::- (B.CallStack.HasCallStack, MonadIO m) =>- Coverage- {- ^ /@coverage@/: a 'GI.Pango.Structs.Coverage.Coverage' -}- -> m ()-coverageUnref coverage = liftIO $ do- coverage' <- unsafeManagedPtrGetPtr coverage- pango_coverage_unref coverage'- touchManagedPtr coverage- return ()--#if ENABLE_OVERLOADING-data CoverageUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo CoverageUnrefMethodInfo Coverage signature where- overloadedMethod _ = coverageUnref--#endif--#if ENABLE_OVERLOADING-type family ResolveCoverageMethod (t :: Symbol) (o :: *) :: * where- ResolveCoverageMethod "get" o = CoverageGetMethodInfo- ResolveCoverageMethod "max" o = CoverageMaxMethodInfo- ResolveCoverageMethod "set" o = CoverageSetMethodInfo- ResolveCoverageMethod "toBytes" o = CoverageToBytesMethodInfo- ResolveCoverageMethod "unref" o = CoverageUnrefMethodInfo- ResolveCoverageMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveCoverageMethod t Coverage, O.MethodInfo info Coverage p) => OL.IsLabel t (Coverage -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Coverage.hs-boot
@@ -1,41 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Coverage where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Coverage = Coverage (ManagedPtr Coverage)-instance WrappedPtr Coverage where-#if ENABLE_OVERLOADING-data CoverageGetMethodInfo-#endif-#if ENABLE_OVERLOADING-data CoverageMaxMethodInfo-#endif-#if ENABLE_OVERLOADING-data CoverageSetMethodInfo-#endif-#if ENABLE_OVERLOADING-data CoverageToBytesMethodInfo-#endif-#if ENABLE_OVERLOADING-data CoverageUnrefMethodInfo-#endif
− GI/Pango/Structs/EngineInfo.hs
@@ -1,432 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.EngineInfo.EngineInfo' structure contains information about a particular-engine. It contains the following fields:--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.EngineInfo- ( ---- * Exported types- EngineInfo(..) ,- newZeroEngineInfo ,- noEngineInfo ,--- -- * Properties--- ** engineType #attr:engineType#-{- | a string identifying the engine type.--}- clearEngineInfoEngineType ,-#if ENABLE_OVERLOADING- engineInfo_engineType ,-#endif- getEngineInfoEngineType ,- setEngineInfoEngineType ,----- ** id #attr:id#-{- | a unique string ID for the engine.--}- clearEngineInfoId ,-#if ENABLE_OVERLOADING- engineInfo_id ,-#endif- getEngineInfoId ,- setEngineInfoId ,----- ** nScripts #attr:nScripts#-{- | number of items in /@scripts@/.--}-#if ENABLE_OVERLOADING- engineInfo_nScripts ,-#endif- getEngineInfoNScripts ,- setEngineInfoNScripts ,----- ** renderType #attr:renderType#-{- | a string identifying the render type.--}- clearEngineInfoRenderType ,-#if ENABLE_OVERLOADING- engineInfo_renderType ,-#endif- getEngineInfoRenderType ,- setEngineInfoRenderType ,----- ** scripts #attr:scripts#-{- | array of scripts this engine supports.--}- clearEngineInfoScripts ,-#if ENABLE_OVERLOADING- engineInfo_scripts ,-#endif- getEngineInfoScripts ,- setEngineInfoScripts ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.EngineScriptInfo as Pango.EngineScriptInfo---- | Memory-managed wrapper type.-newtype EngineInfo = EngineInfo (ManagedPtr EngineInfo)-instance WrappedPtr EngineInfo where- wrappedPtrCalloc = callocBytes 40- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 40 >=> wrapPtr EngineInfo)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `EngineInfo` struct initialized to zero.-newZeroEngineInfo :: MonadIO m => m EngineInfo-newZeroEngineInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr EngineInfo--instance tag ~ 'AttrSet => Constructible EngineInfo tag where- new _ attrs = do- o <- newZeroEngineInfo- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `EngineInfo`.-noEngineInfo :: Maybe EngineInfo-noEngineInfo = Nothing--{- |-Get the value of the “@id@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' engineInfo #id-@--}-getEngineInfoId :: MonadIO m => EngineInfo -> m (Maybe T.Text)-getEngineInfoId s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CString- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--{- |-Set the value of the “@id@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' engineInfo [ #id 'Data.GI.Base.Attributes.:=' value ]-@--}-setEngineInfoId :: MonadIO m => EngineInfo -> CString -> m ()-setEngineInfoId s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: CString)--{- |-Set the value of the “@id@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #id-@--}-clearEngineInfoId :: MonadIO m => EngineInfo -> m ()-clearEngineInfoId s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (FP.nullPtr :: CString)--#if ENABLE_OVERLOADING-data EngineInfoIdFieldInfo-instance AttrInfo EngineInfoIdFieldInfo where- type AttrAllowedOps EngineInfoIdFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint EngineInfoIdFieldInfo = (~) CString- type AttrBaseTypeConstraint EngineInfoIdFieldInfo = (~) EngineInfo- type AttrGetType EngineInfoIdFieldInfo = Maybe T.Text- type AttrLabel EngineInfoIdFieldInfo = "id"- type AttrOrigin EngineInfoIdFieldInfo = EngineInfo- attrGet _ = getEngineInfoId- attrSet _ = setEngineInfoId- attrConstruct = undefined- attrClear _ = clearEngineInfoId--engineInfo_id :: AttrLabelProxy "id"-engineInfo_id = AttrLabelProxy--#endif---{- |-Get the value of the “@engine_type@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' engineInfo #engineType-@--}-getEngineInfoEngineType :: MonadIO m => EngineInfo -> m (Maybe T.Text)-getEngineInfoEngineType s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CString- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--{- |-Set the value of the “@engine_type@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' engineInfo [ #engineType 'Data.GI.Base.Attributes.:=' value ]-@--}-setEngineInfoEngineType :: MonadIO m => EngineInfo -> CString -> m ()-setEngineInfoEngineType s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: CString)--{- |-Set the value of the “@engine_type@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #engineType-@--}-clearEngineInfoEngineType :: MonadIO m => EngineInfo -> m ()-clearEngineInfoEngineType s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (FP.nullPtr :: CString)--#if ENABLE_OVERLOADING-data EngineInfoEngineTypeFieldInfo-instance AttrInfo EngineInfoEngineTypeFieldInfo where- type AttrAllowedOps EngineInfoEngineTypeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint EngineInfoEngineTypeFieldInfo = (~) CString- type AttrBaseTypeConstraint EngineInfoEngineTypeFieldInfo = (~) EngineInfo- type AttrGetType EngineInfoEngineTypeFieldInfo = Maybe T.Text- type AttrLabel EngineInfoEngineTypeFieldInfo = "engine_type"- type AttrOrigin EngineInfoEngineTypeFieldInfo = EngineInfo- attrGet _ = getEngineInfoEngineType- attrSet _ = setEngineInfoEngineType- attrConstruct = undefined- attrClear _ = clearEngineInfoEngineType--engineInfo_engineType :: AttrLabelProxy "engineType"-engineInfo_engineType = AttrLabelProxy--#endif---{- |-Get the value of the “@render_type@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' engineInfo #renderType-@--}-getEngineInfoRenderType :: MonadIO m => EngineInfo -> m (Maybe T.Text)-getEngineInfoRenderType s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CString- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--{- |-Set the value of the “@render_type@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' engineInfo [ #renderType 'Data.GI.Base.Attributes.:=' value ]-@--}-setEngineInfoRenderType :: MonadIO m => EngineInfo -> CString -> m ()-setEngineInfoRenderType s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: CString)--{- |-Set the value of the “@render_type@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #renderType-@--}-clearEngineInfoRenderType :: MonadIO m => EngineInfo -> m ()-clearEngineInfoRenderType s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullPtr :: CString)--#if ENABLE_OVERLOADING-data EngineInfoRenderTypeFieldInfo-instance AttrInfo EngineInfoRenderTypeFieldInfo where- type AttrAllowedOps EngineInfoRenderTypeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint EngineInfoRenderTypeFieldInfo = (~) CString- type AttrBaseTypeConstraint EngineInfoRenderTypeFieldInfo = (~) EngineInfo- type AttrGetType EngineInfoRenderTypeFieldInfo = Maybe T.Text- type AttrLabel EngineInfoRenderTypeFieldInfo = "render_type"- type AttrOrigin EngineInfoRenderTypeFieldInfo = EngineInfo- attrGet _ = getEngineInfoRenderType- attrSet _ = setEngineInfoRenderType- attrConstruct = undefined- attrClear _ = clearEngineInfoRenderType--engineInfo_renderType :: AttrLabelProxy "renderType"-engineInfo_renderType = AttrLabelProxy--#endif---{- |-Get the value of the “@scripts@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' engineInfo #scripts-@--}-getEngineInfoScripts :: MonadIO m => EngineInfo -> m (Maybe Pango.EngineScriptInfo.EngineScriptInfo)-getEngineInfoScripts s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO (Ptr Pango.EngineScriptInfo.EngineScriptInfo)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newPtr Pango.EngineScriptInfo.EngineScriptInfo) val'- return val''- return result--{- |-Set the value of the “@scripts@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' engineInfo [ #scripts 'Data.GI.Base.Attributes.:=' value ]-@--}-setEngineInfoScripts :: MonadIO m => EngineInfo -> Ptr Pango.EngineScriptInfo.EngineScriptInfo -> m ()-setEngineInfoScripts s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Ptr Pango.EngineScriptInfo.EngineScriptInfo)--{- |-Set the value of the “@scripts@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #scripts-@--}-clearEngineInfoScripts :: MonadIO m => EngineInfo -> m ()-clearEngineInfoScripts s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (FP.nullPtr :: Ptr Pango.EngineScriptInfo.EngineScriptInfo)--#if ENABLE_OVERLOADING-data EngineInfoScriptsFieldInfo-instance AttrInfo EngineInfoScriptsFieldInfo where- type AttrAllowedOps EngineInfoScriptsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint EngineInfoScriptsFieldInfo = (~) (Ptr Pango.EngineScriptInfo.EngineScriptInfo)- type AttrBaseTypeConstraint EngineInfoScriptsFieldInfo = (~) EngineInfo- type AttrGetType EngineInfoScriptsFieldInfo = Maybe Pango.EngineScriptInfo.EngineScriptInfo- type AttrLabel EngineInfoScriptsFieldInfo = "scripts"- type AttrOrigin EngineInfoScriptsFieldInfo = EngineInfo- attrGet _ = getEngineInfoScripts- attrSet _ = setEngineInfoScripts- attrConstruct = undefined- attrClear _ = clearEngineInfoScripts--engineInfo_scripts :: AttrLabelProxy "scripts"-engineInfo_scripts = AttrLabelProxy--#endif---{- |-Get the value of the “@n_scripts@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' engineInfo #nScripts-@--}-getEngineInfoNScripts :: MonadIO m => EngineInfo -> m Int32-getEngineInfoNScripts s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO Int32- return val--{- |-Set the value of the “@n_scripts@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' engineInfo [ #nScripts 'Data.GI.Base.Attributes.:=' value ]-@--}-setEngineInfoNScripts :: MonadIO m => EngineInfo -> Int32 -> m ()-setEngineInfoNScripts s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: Int32)--#if ENABLE_OVERLOADING-data EngineInfoNScriptsFieldInfo-instance AttrInfo EngineInfoNScriptsFieldInfo where- type AttrAllowedOps EngineInfoNScriptsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint EngineInfoNScriptsFieldInfo = (~) Int32- type AttrBaseTypeConstraint EngineInfoNScriptsFieldInfo = (~) EngineInfo- type AttrGetType EngineInfoNScriptsFieldInfo = Int32- type AttrLabel EngineInfoNScriptsFieldInfo = "n_scripts"- type AttrOrigin EngineInfoNScriptsFieldInfo = EngineInfo- attrGet _ = getEngineInfoNScripts- attrSet _ = setEngineInfoNScripts- attrConstruct = undefined- attrClear _ = undefined--engineInfo_nScripts :: AttrLabelProxy "nScripts"-engineInfo_nScripts = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList EngineInfo-type instance O.AttributeList EngineInfo = EngineInfoAttributeList-type EngineInfoAttributeList = ('[ '("id", EngineInfoIdFieldInfo), '("engineType", EngineInfoEngineTypeFieldInfo), '("renderType", EngineInfoRenderTypeFieldInfo), '("scripts", EngineInfoScriptsFieldInfo), '("nScripts", EngineInfoNScriptsFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveEngineInfoMethod (t :: Symbol) (o :: *) :: * where- ResolveEngineInfoMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveEngineInfoMethod t EngineInfo, O.MethodInfo info EngineInfo p) => OL.IsLabel t (EngineInfo -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/EngineInfo.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.EngineInfo where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype EngineInfo = EngineInfo (ManagedPtr EngineInfo)-instance WrappedPtr EngineInfo where
− GI/Pango/Structs/EngineScriptInfo.hs
@@ -1,230 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.EngineScriptInfo.EngineScriptInfo' structure contains-information about how the shaper covers a particular script.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.EngineScriptInfo- ( ---- * Exported types- EngineScriptInfo(..) ,- newZeroEngineScriptInfo ,- noEngineScriptInfo ,--- -- * Properties--- ** langs #attr:langs#-{- | a semicolon separated list of languages that this-engine handles for this script. This may be empty,-in which case the engine is saying that it is a-fallback choice for all languages for this range,-but should not be used if another engine-indicates that it is specific for the language for-a given code point. An entry in this list of \"*\"-indicates that this engine is specific to all-languages for this range.--}- clearEngineScriptInfoLangs ,-#if ENABLE_OVERLOADING- engineScriptInfo_langs ,-#endif- getEngineScriptInfoLangs ,- setEngineScriptInfoLangs ,----- ** script #attr:script#-{- | a 'GI.Pango.Enums.Script'. The value 'GI.Pango.Enums.ScriptCommon' has-the special meaning here of \"all scripts\"--}-#if ENABLE_OVERLOADING- engineScriptInfo_script ,-#endif- getEngineScriptInfoScript ,- setEngineScriptInfoScript ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums---- | Memory-managed wrapper type.-newtype EngineScriptInfo = EngineScriptInfo (ManagedPtr EngineScriptInfo)-instance WrappedPtr EngineScriptInfo where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 16 >=> wrapPtr EngineScriptInfo)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `EngineScriptInfo` struct initialized to zero.-newZeroEngineScriptInfo :: MonadIO m => m EngineScriptInfo-newZeroEngineScriptInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr EngineScriptInfo--instance tag ~ 'AttrSet => Constructible EngineScriptInfo tag where- new _ attrs = do- o <- newZeroEngineScriptInfo- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `EngineScriptInfo`.-noEngineScriptInfo :: Maybe EngineScriptInfo-noEngineScriptInfo = Nothing--{- |-Get the value of the “@script@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' engineScriptInfo #script-@--}-getEngineScriptInfoScript :: MonadIO m => EngineScriptInfo -> m Pango.Enums.Script-getEngineScriptInfoScript s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CInt- let val' = (toEnum . fromIntegral) val- return val'--{- |-Set the value of the “@script@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' engineScriptInfo [ #script 'Data.GI.Base.Attributes.:=' value ]-@--}-setEngineScriptInfoScript :: MonadIO m => EngineScriptInfo -> Pango.Enums.Script -> m ()-setEngineScriptInfoScript s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = (fromIntegral . fromEnum) val- poke (ptr `plusPtr` 0) (val' :: CInt)--#if ENABLE_OVERLOADING-data EngineScriptInfoScriptFieldInfo-instance AttrInfo EngineScriptInfoScriptFieldInfo where- type AttrAllowedOps EngineScriptInfoScriptFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint EngineScriptInfoScriptFieldInfo = (~) Pango.Enums.Script- type AttrBaseTypeConstraint EngineScriptInfoScriptFieldInfo = (~) EngineScriptInfo- type AttrGetType EngineScriptInfoScriptFieldInfo = Pango.Enums.Script- type AttrLabel EngineScriptInfoScriptFieldInfo = "script"- type AttrOrigin EngineScriptInfoScriptFieldInfo = EngineScriptInfo- attrGet _ = getEngineScriptInfoScript- attrSet _ = setEngineScriptInfoScript- attrConstruct = undefined- attrClear _ = undefined--engineScriptInfo_script :: AttrLabelProxy "script"-engineScriptInfo_script = AttrLabelProxy--#endif---{- |-Get the value of the “@langs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' engineScriptInfo #langs-@--}-getEngineScriptInfoLangs :: MonadIO m => EngineScriptInfo -> m (Maybe T.Text)-getEngineScriptInfoLangs s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CString- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--{- |-Set the value of the “@langs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' engineScriptInfo [ #langs 'Data.GI.Base.Attributes.:=' value ]-@--}-setEngineScriptInfoLangs :: MonadIO m => EngineScriptInfo -> CString -> m ()-setEngineScriptInfoLangs s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: CString)--{- |-Set the value of the “@langs@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #langs-@--}-clearEngineScriptInfoLangs :: MonadIO m => EngineScriptInfo -> m ()-clearEngineScriptInfoLangs s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (FP.nullPtr :: CString)--#if ENABLE_OVERLOADING-data EngineScriptInfoLangsFieldInfo-instance AttrInfo EngineScriptInfoLangsFieldInfo where- type AttrAllowedOps EngineScriptInfoLangsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint EngineScriptInfoLangsFieldInfo = (~) CString- type AttrBaseTypeConstraint EngineScriptInfoLangsFieldInfo = (~) EngineScriptInfo- type AttrGetType EngineScriptInfoLangsFieldInfo = Maybe T.Text- type AttrLabel EngineScriptInfoLangsFieldInfo = "langs"- type AttrOrigin EngineScriptInfoLangsFieldInfo = EngineScriptInfo- attrGet _ = getEngineScriptInfoLangs- attrSet _ = setEngineScriptInfoLangs- attrConstruct = undefined- attrClear _ = clearEngineScriptInfoLangs--engineScriptInfo_langs :: AttrLabelProxy "langs"-engineScriptInfo_langs = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList EngineScriptInfo-type instance O.AttributeList EngineScriptInfo = EngineScriptInfoAttributeList-type EngineScriptInfoAttributeList = ('[ '("script", EngineScriptInfoScriptFieldInfo), '("langs", EngineScriptInfoLangsFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveEngineScriptInfoMethod (t :: Symbol) (o :: *) :: * where- ResolveEngineScriptInfoMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveEngineScriptInfoMethod t EngineScriptInfo, O.MethodInfo info EngineScriptInfo p) => OL.IsLabel t (EngineScriptInfo -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/EngineScriptInfo.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.EngineScriptInfo where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype EngineScriptInfo = EngineScriptInfo (ManagedPtr EngineScriptInfo)-instance WrappedPtr EngineScriptInfo where
− GI/Pango/Structs/FontDescription.hs
@@ -1,1790 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.FontDescription.FontDescription' structure represents the description-of an ideal font. These structures are used both to list-what fonts are available on the system and also for specifying-the characteristics of a font to load.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.FontDescription- ( ---- * Exported types- FontDescription(..) ,- noFontDescription ,--- -- * Methods--- ** betterMatch #method:betterMatch#--#if ENABLE_OVERLOADING- FontDescriptionBetterMatchMethodInfo ,-#endif- fontDescriptionBetterMatch ,----- ** copy #method:copy#--#if ENABLE_OVERLOADING- FontDescriptionCopyMethodInfo ,-#endif- fontDescriptionCopy ,----- ** copyStatic #method:copyStatic#--#if ENABLE_OVERLOADING- FontDescriptionCopyStaticMethodInfo ,-#endif- fontDescriptionCopyStatic ,----- ** equal #method:equal#--#if ENABLE_OVERLOADING- FontDescriptionEqualMethodInfo ,-#endif- fontDescriptionEqual ,----- ** free #method:free#--#if ENABLE_OVERLOADING- FontDescriptionFreeMethodInfo ,-#endif- fontDescriptionFree ,----- ** fromString #method:fromString#-- fontDescriptionFromString ,----- ** getFamily #method:getFamily#--#if ENABLE_OVERLOADING- FontDescriptionGetFamilyMethodInfo ,-#endif- fontDescriptionGetFamily ,----- ** getGravity #method:getGravity#--#if ENABLE_OVERLOADING- FontDescriptionGetGravityMethodInfo ,-#endif- fontDescriptionGetGravity ,----- ** getSetFields #method:getSetFields#--#if ENABLE_OVERLOADING- FontDescriptionGetSetFieldsMethodInfo ,-#endif- fontDescriptionGetSetFields ,----- ** getSize #method:getSize#--#if ENABLE_OVERLOADING- FontDescriptionGetSizeMethodInfo ,-#endif- fontDescriptionGetSize ,----- ** getSizeIsAbsolute #method:getSizeIsAbsolute#--#if ENABLE_OVERLOADING- FontDescriptionGetSizeIsAbsoluteMethodInfo,-#endif- fontDescriptionGetSizeIsAbsolute ,----- ** getStretch #method:getStretch#--#if ENABLE_OVERLOADING- FontDescriptionGetStretchMethodInfo ,-#endif- fontDescriptionGetStretch ,----- ** getStyle #method:getStyle#--#if ENABLE_OVERLOADING- FontDescriptionGetStyleMethodInfo ,-#endif- fontDescriptionGetStyle ,----- ** getVariant #method:getVariant#--#if ENABLE_OVERLOADING- FontDescriptionGetVariantMethodInfo ,-#endif- fontDescriptionGetVariant ,----- ** getVariations #method:getVariations#--#if ENABLE_OVERLOADING- FontDescriptionGetVariationsMethodInfo ,-#endif- fontDescriptionGetVariations ,----- ** getWeight #method:getWeight#--#if ENABLE_OVERLOADING- FontDescriptionGetWeightMethodInfo ,-#endif- fontDescriptionGetWeight ,----- ** hash #method:hash#--#if ENABLE_OVERLOADING- FontDescriptionHashMethodInfo ,-#endif- fontDescriptionHash ,----- ** merge #method:merge#--#if ENABLE_OVERLOADING- FontDescriptionMergeMethodInfo ,-#endif- fontDescriptionMerge ,----- ** mergeStatic #method:mergeStatic#--#if ENABLE_OVERLOADING- FontDescriptionMergeStaticMethodInfo ,-#endif- fontDescriptionMergeStatic ,----- ** new #method:new#-- fontDescriptionNew ,----- ** setAbsoluteSize #method:setAbsoluteSize#--#if ENABLE_OVERLOADING- FontDescriptionSetAbsoluteSizeMethodInfo,-#endif- fontDescriptionSetAbsoluteSize ,----- ** setFamily #method:setFamily#--#if ENABLE_OVERLOADING- FontDescriptionSetFamilyMethodInfo ,-#endif- fontDescriptionSetFamily ,----- ** setFamilyStatic #method:setFamilyStatic#--#if ENABLE_OVERLOADING- FontDescriptionSetFamilyStaticMethodInfo,-#endif- fontDescriptionSetFamilyStatic ,----- ** setGravity #method:setGravity#--#if ENABLE_OVERLOADING- FontDescriptionSetGravityMethodInfo ,-#endif- fontDescriptionSetGravity ,----- ** setSize #method:setSize#--#if ENABLE_OVERLOADING- FontDescriptionSetSizeMethodInfo ,-#endif- fontDescriptionSetSize ,----- ** setStretch #method:setStretch#--#if ENABLE_OVERLOADING- FontDescriptionSetStretchMethodInfo ,-#endif- fontDescriptionSetStretch ,----- ** setStyle #method:setStyle#--#if ENABLE_OVERLOADING- FontDescriptionSetStyleMethodInfo ,-#endif- fontDescriptionSetStyle ,----- ** setVariant #method:setVariant#--#if ENABLE_OVERLOADING- FontDescriptionSetVariantMethodInfo ,-#endif- fontDescriptionSetVariant ,----- ** setVariations #method:setVariations#--#if ENABLE_OVERLOADING- FontDescriptionSetVariationsMethodInfo ,-#endif- fontDescriptionSetVariations ,----- ** setVariationsStatic #method:setVariationsStatic#--#if ENABLE_OVERLOADING- FontDescriptionSetVariationsStaticMethodInfo,-#endif- fontDescriptionSetVariationsStatic ,----- ** setWeight #method:setWeight#--#if ENABLE_OVERLOADING- FontDescriptionSetWeightMethodInfo ,-#endif- fontDescriptionSetWeight ,----- ** toFilename #method:toFilename#--#if ENABLE_OVERLOADING- FontDescriptionToFilenameMethodInfo ,-#endif- fontDescriptionToFilename ,----- ** toString #method:toString#--#if ENABLE_OVERLOADING- FontDescriptionToStringMethodInfo ,-#endif- fontDescriptionToString ,----- ** unsetFields #method:unsetFields#--#if ENABLE_OVERLOADING- FontDescriptionUnsetFieldsMethodInfo ,-#endif- fontDescriptionUnsetFields ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums-import {-# SOURCE #-} qualified GI.Pango.Flags as Pango.Flags---- | Memory-managed wrapper type.-newtype FontDescription = FontDescription (ManagedPtr FontDescription)-foreign import ccall "pango_font_description_get_type" c_pango_font_description_get_type :: - IO GType--instance BoxedObject FontDescription where- boxedType _ = c_pango_font_description_get_type---- | A convenience alias for `Nothing` :: `Maybe` `FontDescription`.-noFontDescription :: Maybe FontDescription-noFontDescription = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList FontDescription-type instance O.AttributeList FontDescription = FontDescriptionAttributeList-type FontDescriptionAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method FontDescription::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_new" pango_font_description_new :: - IO (Ptr FontDescription)--{- |-Creates a new font description structure with all fields unset.--}-fontDescriptionNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m FontDescription- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.FontDescription.FontDescription', which- should be freed using 'GI.Pango.Structs.FontDescription.fontDescriptionFree'. -}-fontDescriptionNew = liftIO $ do- result <- pango_font_description_new- checkUnexpectedReturnNULL "fontDescriptionNew" result- result' <- (wrapBoxed FontDescription) result- return result'--#if ENABLE_OVERLOADING-#endif---- method FontDescription::better_match--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "old_match", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_match", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_better_match" pango_font_description_better_match :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr FontDescription -> -- old_match : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr FontDescription -> -- new_match : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CInt--{- |-Determines if the style attributes of /@newMatch@/ are a closer match-for /@desc@/ than those of /@oldMatch@/ are, or if /@oldMatch@/ is 'Nothing',-determines if /@newMatch@/ is a match at all.-Approximate matching is done for-weight and style; other style attributes must match exactly.-Style attributes are all attributes other than family and size-related-attributes. Approximate matching for style considers PANGO_STYLE_OBLIQUE-and PANGO_STYLE_ITALIC as matches, but not as good a match as when the-styles are equal.--Note that /@oldMatch@/ must match /@desc@/.--}-fontDescriptionBetterMatch ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Maybe (FontDescription)- {- ^ /@oldMatch@/: a 'GI.Pango.Structs.FontDescription.FontDescription', or 'Nothing' -}- -> FontDescription- {- ^ /@newMatch@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Bool- {- ^ __Returns:__ 'True' if /@newMatch@/ is a better match -}-fontDescriptionBetterMatch desc oldMatch newMatch = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- maybeOldMatch <- case oldMatch of- Nothing -> return nullPtr- Just jOldMatch -> do- jOldMatch' <- unsafeManagedPtrGetPtr jOldMatch- return jOldMatch'- newMatch' <- unsafeManagedPtrGetPtr newMatch- result <- pango_font_description_better_match desc' maybeOldMatch newMatch'- let result' = (/= 0) result- touchManagedPtr desc- whenJust oldMatch touchManagedPtr- touchManagedPtr newMatch- return result'--#if ENABLE_OVERLOADING-data FontDescriptionBetterMatchMethodInfo-instance (signature ~ (Maybe (FontDescription) -> FontDescription -> m Bool), MonadIO m) => O.MethodInfo FontDescriptionBetterMatchMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionBetterMatch--#endif---- method FontDescription::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_copy" pango_font_description_copy :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO (Ptr FontDescription)--{- |-Make a copy of a 'GI.Pango.Structs.FontDescription.FontDescription'.--}-fontDescriptionCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription', may be 'Nothing' -}- -> m (Maybe FontDescription)- {- ^ __Returns:__ the newly allocated- 'GI.Pango.Structs.FontDescription.FontDescription', which should be freed with- 'GI.Pango.Structs.FontDescription.fontDescriptionFree', or 'Nothing' if /@desc@/ was- 'Nothing'. -}-fontDescriptionCopy desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_copy desc'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed FontDescription) result'- return result''- touchManagedPtr desc- return maybeResult--#if ENABLE_OVERLOADING-data FontDescriptionCopyMethodInfo-instance (signature ~ (m (Maybe FontDescription)), MonadIO m) => O.MethodInfo FontDescriptionCopyMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionCopy--#endif---- method FontDescription::copy_static--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_copy_static" pango_font_description_copy_static :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO (Ptr FontDescription)--{- |-Like 'GI.Pango.Structs.FontDescription.fontDescriptionCopy', but only a shallow copy is made-of the family name and other allocated fields. The result can only-be used until /@desc@/ is modified or freed. This is meant to be used-when the copy is only needed temporarily.--}-fontDescriptionCopyStatic ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription', may be 'Nothing' -}- -> m (Maybe FontDescription)- {- ^ __Returns:__ the newly allocated- 'GI.Pango.Structs.FontDescription.FontDescription', which should be freed with- 'GI.Pango.Structs.FontDescription.fontDescriptionFree', or 'Nothing' if /@desc@/ was- 'Nothing'. -}-fontDescriptionCopyStatic desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_copy_static desc'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed FontDescription) result'- return result''- touchManagedPtr desc- return maybeResult--#if ENABLE_OVERLOADING-data FontDescriptionCopyStaticMethodInfo-instance (signature ~ (m (Maybe FontDescription)), MonadIO m) => O.MethodInfo FontDescriptionCopyStaticMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionCopyStatic--#endif---- method FontDescription::equal--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc1", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc2", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "another #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_equal" pango_font_description_equal :: - Ptr FontDescription -> -- desc1 : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr FontDescription -> -- desc2 : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CInt--{- |-Compares two font descriptions for equality. Two font descriptions-are considered equal if the fonts they describe are provably identical.-This means that their masks do not have to match, as long as other fields-are all the same. (Two font descriptions may result in identical fonts-being loaded, but still compare 'False'.)--}-fontDescriptionEqual ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc1@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> FontDescription- {- ^ /@desc2@/: another 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Bool- {- ^ __Returns:__ 'True' if the two font descriptions are identical,- 'False' otherwise. -}-fontDescriptionEqual desc1 desc2 = liftIO $ do- desc1' <- unsafeManagedPtrGetPtr desc1- desc2' <- unsafeManagedPtrGetPtr desc2- result <- pango_font_description_equal desc1' desc2'- let result' = (/= 0) result- touchManagedPtr desc1- touchManagedPtr desc2- return result'--#if ENABLE_OVERLOADING-data FontDescriptionEqualMethodInfo-instance (signature ~ (FontDescription -> m Bool), MonadIO m) => O.MethodInfo FontDescriptionEqualMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionEqual--#endif---- method FontDescription::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_free" pango_font_description_free :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO ()--{- |-Frees a font description.--}-fontDescriptionFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription', may be 'Nothing' -}- -> m ()-fontDescriptionFree desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- pango_font_description_free desc'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo FontDescriptionFreeMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionFree--#endif---- method FontDescription::get_family--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_family" pango_font_description_get_family :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CString--{- |-Gets the family name field of a font description. See-'GI.Pango.Structs.FontDescription.fontDescriptionSetFamily'.--}-fontDescriptionGetFamily ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription'. -}- -> m (Maybe T.Text)- {- ^ __Returns:__ the family name field for the font- description, or 'Nothing' if not previously set. This- has the same life-time as the font description itself- and should not be freed. -}-fontDescriptionGetFamily desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_family desc'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- cstringToText result'- return result''- touchManagedPtr desc- return maybeResult--#if ENABLE_OVERLOADING-data FontDescriptionGetFamilyMethodInfo-instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.MethodInfo FontDescriptionGetFamilyMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetFamily--#endif---- method FontDescription::get_gravity--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Gravity"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_gravity" pango_font_description_get_gravity :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CUInt--{- |-Gets the gravity field of a font description. See-'GI.Pango.Structs.FontDescription.fontDescriptionSetGravity'.--/Since: 1.16/--}-fontDescriptionGetGravity ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Pango.Enums.Gravity- {- ^ __Returns:__ the gravity field for the font description. Use- 'GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields' to find out if- the field was explicitly set or not. -}-fontDescriptionGetGravity desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_gravity desc'- let result' = (toEnum . fromIntegral) result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionGetGravityMethodInfo-instance (signature ~ (m Pango.Enums.Gravity), MonadIO m) => O.MethodInfo FontDescriptionGetGravityMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetGravity--#endif---- method FontDescription::get_set_fields--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMask"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_set_fields" pango_font_description_get_set_fields :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CUInt--{- |-Determines which fields in a font description have been set.--}-fontDescriptionGetSetFields ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m [Pango.Flags.FontMask]- {- ^ __Returns:__ a bitmask with bits set corresponding to the- fields in /@desc@/ that have been set. -}-fontDescriptionGetSetFields desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_set_fields desc'- let result' = wordToGFlags result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionGetSetFieldsMethodInfo-instance (signature ~ (m [Pango.Flags.FontMask]), MonadIO m) => O.MethodInfo FontDescriptionGetSetFieldsMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetSetFields--#endif---- method FontDescription::get_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_size" pango_font_description_get_size :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO Int32--{- |-Gets the size field of a font description.-See 'GI.Pango.Structs.FontDescription.fontDescriptionSetSize'.--}-fontDescriptionGetSize ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Int32- {- ^ __Returns:__ the size field for the font description in points or device units.- You must call 'GI.Pango.Structs.FontDescription.fontDescriptionGetSizeIsAbsolute'- to find out which is the case. Returns 0 if the size field has not- previously been set or it has been set to 0 explicitly.- Use 'GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields' to- find out if the field was explicitly set or not. -}-fontDescriptionGetSize desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_size desc'- touchManagedPtr desc- return result--#if ENABLE_OVERLOADING-data FontDescriptionGetSizeMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontDescriptionGetSizeMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetSize--#endif---- method FontDescription::get_size_is_absolute--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_size_is_absolute" pango_font_description_get_size_is_absolute :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CInt--{- |-Determines whether the size of the font is in points (not absolute) or device units (absolute).-See 'GI.Pango.Structs.FontDescription.fontDescriptionSetSize' and 'GI.Pango.Structs.FontDescription.fontDescriptionSetAbsoluteSize'.--/Since: 1.8/--}-fontDescriptionGetSizeIsAbsolute ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Bool- {- ^ __Returns:__ whether the size for the font description is in- points or device units. Use 'GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields' to- find out if the size field of the font description was explicitly set or not. -}-fontDescriptionGetSizeIsAbsolute desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_size_is_absolute desc'- let result' = (/= 0) result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionGetSizeIsAbsoluteMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo FontDescriptionGetSizeIsAbsoluteMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetSizeIsAbsolute--#endif---- method FontDescription::get_stretch--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Stretch"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_stretch" pango_font_description_get_stretch :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CUInt--{- |-Gets the stretch field of a font description.-See 'GI.Pango.Structs.FontDescription.fontDescriptionSetStretch'.--}-fontDescriptionGetStretch ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription'. -}- -> m Pango.Enums.Stretch- {- ^ __Returns:__ the stretch field for the font description. Use- 'GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields' to find out if- the field was explicitly set or not. -}-fontDescriptionGetStretch desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_stretch desc'- let result' = (toEnum . fromIntegral) result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionGetStretchMethodInfo-instance (signature ~ (m Pango.Enums.Stretch), MonadIO m) => O.MethodInfo FontDescriptionGetStretchMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetStretch--#endif---- method FontDescription::get_style--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Style"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_style" pango_font_description_get_style :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CUInt--{- |-Gets the style field of a 'GI.Pango.Structs.FontDescription.FontDescription'. See-'GI.Pango.Structs.FontDescription.fontDescriptionSetStyle'.--}-fontDescriptionGetStyle ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Pango.Enums.Style- {- ^ __Returns:__ the style field for the font description.- Use 'GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields' to find out if- the field was explicitly set or not. -}-fontDescriptionGetStyle desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_style desc'- let result' = (toEnum . fromIntegral) result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionGetStyleMethodInfo-instance (signature ~ (m Pango.Enums.Style), MonadIO m) => O.MethodInfo FontDescriptionGetStyleMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetStyle--#endif---- method FontDescription::get_variant--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Variant"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_variant" pango_font_description_get_variant :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CUInt--{- |-Gets the variant field of a 'GI.Pango.Structs.FontDescription.FontDescription'. See-'GI.Pango.Structs.FontDescription.fontDescriptionSetVariant'.--}-fontDescriptionGetVariant ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription'. -}- -> m Pango.Enums.Variant- {- ^ __Returns:__ the variant field for the font description. Use- 'GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields' to find out if- the field was explicitly set or not. -}-fontDescriptionGetVariant desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_variant desc'- let result' = (toEnum . fromIntegral) result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionGetVariantMethodInfo-instance (signature ~ (m Pango.Enums.Variant), MonadIO m) => O.MethodInfo FontDescriptionGetVariantMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetVariant--#endif---- method FontDescription::get_variations--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_variations" pango_font_description_get_variations :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CString--{- |-Gets the variations field of a font description. See-'GI.Pango.Structs.FontDescription.fontDescriptionSetVariations'.--/Since: 1.42/--}-fontDescriptionGetVariations ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m (Maybe T.Text)- {- ^ __Returns:__ the varitions field for the font- description, or 'Nothing' if not previously set. This- has the same life-time as the font description itself- and should not be freed. -}-fontDescriptionGetVariations desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_variations desc'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- cstringToText result'- return result''- touchManagedPtr desc- return maybeResult--#if ENABLE_OVERLOADING-data FontDescriptionGetVariationsMethodInfo-instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.MethodInfo FontDescriptionGetVariationsMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetVariations--#endif---- method FontDescription::get_weight--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Weight"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_get_weight" pango_font_description_get_weight :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CUInt--{- |-Gets the weight field of a font description. See-'GI.Pango.Structs.FontDescription.fontDescriptionSetWeight'.--}-fontDescriptionGetWeight ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Pango.Enums.Weight- {- ^ __Returns:__ the weight field for the font description. Use- 'GI.Pango.Structs.FontDescription.fontDescriptionGetSetFields' to find out if- the field was explicitly set or not. -}-fontDescriptionGetWeight desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_get_weight desc'- let result' = (toEnum . fromIntegral) result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionGetWeightMethodInfo-instance (signature ~ (m Pango.Enums.Weight), MonadIO m) => O.MethodInfo FontDescriptionGetWeightMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionGetWeight--#endif---- method FontDescription::hash--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_hash" pango_font_description_hash :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO Word32--{- |-Computes a hash of a 'GI.Pango.Structs.FontDescription.FontDescription' structure suitable-to be used, for example, as an argument to @/g_hash_table_new()/@.-The hash value is independent of /@desc@/->mask.--}-fontDescriptionHash ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m Word32- {- ^ __Returns:__ the hash value. -}-fontDescriptionHash desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_hash desc'- touchManagedPtr desc- return result--#if ENABLE_OVERLOADING-data FontDescriptionHashMethodInfo-instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo FontDescriptionHashMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionHash--#endif---- method FontDescription::merge--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc_to_merge", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the #PangoFontDescription to merge from, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "replace_existing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if %TRUE, replace fields in @desc with the\n corresponding values from @desc_to_merge, even if they\n are already exist.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_merge" pango_font_description_merge :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr FontDescription -> -- desc_to_merge : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CInt -> -- replace_existing : TBasicType TBoolean- IO ()--{- |-Merges the fields that are set in /@descToMerge@/ into the fields in-/@desc@/. If /@replaceExisting@/ is 'False', only fields in /@desc@/ that-are not already set are affected. If 'True', then fields that are-already set will be replaced as well.--If /@descToMerge@/ is 'Nothing', this function performs nothing.--}-fontDescriptionMerge ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Maybe (FontDescription)- {- ^ /@descToMerge@/: the 'GI.Pango.Structs.FontDescription.FontDescription' to merge from, or 'Nothing' -}- -> Bool- {- ^ /@replaceExisting@/: if 'True', replace fields in /@desc@/ with the- corresponding values from /@descToMerge@/, even if they- are already exist. -}- -> m ()-fontDescriptionMerge desc descToMerge replaceExisting = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- maybeDescToMerge <- case descToMerge of- Nothing -> return nullPtr- Just jDescToMerge -> do- jDescToMerge' <- unsafeManagedPtrGetPtr jDescToMerge- return jDescToMerge'- let replaceExisting' = (fromIntegral . fromEnum) replaceExisting- pango_font_description_merge desc' maybeDescToMerge replaceExisting'- touchManagedPtr desc- whenJust descToMerge touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data FontDescriptionMergeMethodInfo-instance (signature ~ (Maybe (FontDescription) -> Bool -> m ()), MonadIO m) => O.MethodInfo FontDescriptionMergeMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionMerge--#endif---- method FontDescription::merge_static--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "desc_to_merge", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #PangoFontDescription to merge from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "replace_existing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if %TRUE, replace fields in @desc with the\n corresponding values from @desc_to_merge, even if they\n are already exist.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_merge_static" pango_font_description_merge_static :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Ptr FontDescription -> -- desc_to_merge : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CInt -> -- replace_existing : TBasicType TBoolean- IO ()--{- |-Like 'GI.Pango.Structs.FontDescription.fontDescriptionMerge', but only a shallow copy is made-of the family name and other allocated fields. /@desc@/ can only be-used until /@descToMerge@/ is modified or freed. This is meant-to be used when the merged font description is only needed temporarily.--}-fontDescriptionMergeStatic ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> FontDescription- {- ^ /@descToMerge@/: the 'GI.Pango.Structs.FontDescription.FontDescription' to merge from -}- -> Bool- {- ^ /@replaceExisting@/: if 'True', replace fields in /@desc@/ with the- corresponding values from /@descToMerge@/, even if they- are already exist. -}- -> m ()-fontDescriptionMergeStatic desc descToMerge replaceExisting = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- descToMerge' <- unsafeManagedPtrGetPtr descToMerge- let replaceExisting' = (fromIntegral . fromEnum) replaceExisting- pango_font_description_merge_static desc' descToMerge' replaceExisting'- touchManagedPtr desc- touchManagedPtr descToMerge- return ()--#if ENABLE_OVERLOADING-data FontDescriptionMergeStaticMethodInfo-instance (signature ~ (FontDescription -> Bool -> m ()), MonadIO m) => O.MethodInfo FontDescriptionMergeStaticMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionMergeStatic--#endif---- method FontDescription::set_absolute_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new size, in Pango units. There are %PANGO_SCALE Pango units in one\n device unit. For an output backend where a device unit is a pixel, a @size\n value of 10 * PANGO_SCALE gives a 10 pixel font.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_absolute_size" pango_font_description_set_absolute_size :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CDouble -> -- size : TBasicType TDouble- IO ()--{- |-Sets the size field of a font description, in device units. This is mutually-exclusive with 'GI.Pango.Structs.FontDescription.fontDescriptionSetSize' which sets the font size-in points.--/Since: 1.8/--}-fontDescriptionSetAbsoluteSize ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Double- {- ^ /@size@/: the new size, in Pango units. There are 'GI.Pango.Constants.SCALE' Pango units in one- device unit. For an output backend where a device unit is a pixel, a /@size@/- value of 10 * PANGO_SCALE gives a 10 pixel font. -}- -> m ()-fontDescriptionSetAbsoluteSize desc size = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- let size' = realToFrac size- pango_font_description_set_absolute_size desc' size'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetAbsoluteSizeMethodInfo-instance (signature ~ (Double -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetAbsoluteSizeMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetAbsoluteSize--#endif---- method FontDescription::set_family--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "family", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a string representing the family name.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_family" pango_font_description_set_family :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CString -> -- family : TBasicType TUTF8- IO ()--{- |-Sets the family name field of a font description. The family-name represents a family of related font styles, and will-resolve to a particular 'GI.Pango.Objects.FontFamily.FontFamily'. In some uses of-'GI.Pango.Structs.FontDescription.FontDescription', it is also possible to use a comma-separated list of family names for this field.--}-fontDescriptionSetFamily ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription'. -}- -> T.Text- {- ^ /@family@/: a string representing the family name. -}- -> m ()-fontDescriptionSetFamily desc family = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- family' <- textToCString family- pango_font_description_set_family desc' family'- touchManagedPtr desc- freeMem family'- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetFamilyMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetFamilyMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetFamily--#endif---- method FontDescription::set_family_static--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "family", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a string representing the family name.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_family_static" pango_font_description_set_family_static :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CString -> -- family : TBasicType TUTF8- IO ()--{- |-Like 'GI.Pango.Structs.FontDescription.fontDescriptionSetFamily', except that no-copy of /@family@/ is made. The caller must make sure that the-string passed in stays around until /@desc@/ has been freed-or the name is set again. This function can be used if-/@family@/ is a static string such as a C string literal, or-if /@desc@/ is only needed temporarily.--}-fontDescriptionSetFamilyStatic ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> T.Text- {- ^ /@family@/: a string representing the family name. -}- -> m ()-fontDescriptionSetFamilyStatic desc family = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- family' <- textToCString family- pango_font_description_set_family_static desc' family'- touchManagedPtr desc- freeMem family'- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetFamilyStaticMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetFamilyStaticMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetFamilyStatic--#endif---- method FontDescription::set_gravity--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "gravity", argType = TInterface (Name {namespace = "Pango", name = "Gravity"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the gravity for the font description.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_gravity" pango_font_description_set_gravity :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CUInt -> -- gravity : TInterface (Name {namespace = "Pango", name = "Gravity"})- IO ()--{- |-Sets the gravity field of a font description. The gravity field-specifies how the glyphs should be rotated. If /@gravity@/ is-'GI.Pango.Enums.GravityAuto', this actually unsets the gravity mask on-the font description.--This function is seldom useful to the user. Gravity should normally-be set on a 'GI.Pango.Objects.Context.Context'.--/Since: 1.16/--}-fontDescriptionSetGravity ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Pango.Enums.Gravity- {- ^ /@gravity@/: the gravity for the font description. -}- -> m ()-fontDescriptionSetGravity desc gravity = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- let gravity' = (fromIntegral . fromEnum) gravity- pango_font_description_set_gravity desc' gravity'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetGravityMethodInfo-instance (signature ~ (Pango.Enums.Gravity -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetGravityMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetGravity--#endif---- method FontDescription::set_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the size of the font in points, scaled by PANGO_SCALE. (That is,\n a @size value of 10 * PANGO_SCALE is a 10 point font. The conversion\n factor between points and device units depends on system configuration\n and the output device. For screen display, a logical DPI of 96 is\n common, in which case a 10 point font corresponds to a 10 * (96 / 72) = 13.3\n pixel font. Use pango_font_description_set_absolute_size() if you need\n a particular size in device units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_size" pango_font_description_set_size :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- Int32 -> -- size : TBasicType TInt- IO ()--{- |-Sets the size field of a font description in fractional points. This is mutually-exclusive with 'GI.Pango.Structs.FontDescription.fontDescriptionSetAbsoluteSize'.--}-fontDescriptionSetSize ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Int32- {- ^ /@size@/: the size of the font in points, scaled by PANGO_SCALE. (That is,- a /@size@/ value of 10 * PANGO_SCALE is a 10 point font. The conversion- factor between points and device units depends on system configuration- and the output device. For screen display, a logical DPI of 96 is- common, in which case a 10 point font corresponds to a 10 * (96 \/ 72) = 13.3- pixel font. Use 'GI.Pango.Structs.FontDescription.fontDescriptionSetAbsoluteSize' if you need- a particular size in device units. -}- -> m ()-fontDescriptionSetSize desc size = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- pango_font_description_set_size desc' size- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetSizeMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetSizeMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetSize--#endif---- method FontDescription::set_stretch--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "stretch", argType = TInterface (Name {namespace = "Pango", name = "Stretch"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the stretch for the font description", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_stretch" pango_font_description_set_stretch :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CUInt -> -- stretch : TInterface (Name {namespace = "Pango", name = "Stretch"})- IO ()--{- |-Sets the stretch field of a font description. The stretch field-specifies how narrow or wide the font should be.--}-fontDescriptionSetStretch ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Pango.Enums.Stretch- {- ^ /@stretch@/: the stretch for the font description -}- -> m ()-fontDescriptionSetStretch desc stretch = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- let stretch' = (fromIntegral . fromEnum) stretch- pango_font_description_set_stretch desc' stretch'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetStretchMethodInfo-instance (signature ~ (Pango.Enums.Stretch -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetStretchMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetStretch--#endif---- method FontDescription::set_style--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "style", argType = TInterface (Name {namespace = "Pango", name = "Style"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the style for the font description", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_style" pango_font_description_set_style :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CUInt -> -- style : TInterface (Name {namespace = "Pango", name = "Style"})- IO ()--{- |-Sets the style field of a 'GI.Pango.Structs.FontDescription.FontDescription'. The-'GI.Pango.Enums.Style' enumeration describes whether the font is slanted and-the manner in which it is slanted; it can be either-@/PANGO_STYLE_NORMAL/@, @/PANGO_STYLE_ITALIC/@, or @/PANGO_STYLE_OBLIQUE/@.-Most fonts will either have a italic style or an oblique-style, but not both, and font matching in Pango will-match italic specifications with oblique fonts and vice-versa-if an exact match is not found.--}-fontDescriptionSetStyle ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Pango.Enums.Style- {- ^ /@style@/: the style for the font description -}- -> m ()-fontDescriptionSetStyle desc style = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- let style' = (fromIntegral . fromEnum) style- pango_font_description_set_style desc' style'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetStyleMethodInfo-instance (signature ~ (Pango.Enums.Style -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetStyleMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetStyle--#endif---- method FontDescription::set_variant--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "variant", argType = TInterface (Name {namespace = "Pango", name = "Variant"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the variant type for the font description.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_variant" pango_font_description_set_variant :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CUInt -> -- variant : TInterface (Name {namespace = "Pango", name = "Variant"})- IO ()--{- |-Sets the variant field of a font description. The 'GI.Pango.Enums.Variant'-can either be 'GI.Pango.Enums.VariantNormal' or 'GI.Pango.Enums.VariantSmallCaps'.--}-fontDescriptionSetVariant ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Pango.Enums.Variant- {- ^ /@variant@/: the variant type for the font description. -}- -> m ()-fontDescriptionSetVariant desc variant = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- let variant' = (fromIntegral . fromEnum) variant- pango_font_description_set_variant desc' variant'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetVariantMethodInfo-instance (signature ~ (Pango.Enums.Variant -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetVariantMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetVariant--#endif---- method FontDescription::set_variations--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "settings", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_variations" pango_font_description_set_variations :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CString -> -- settings : TBasicType TUTF8- IO ()--{- |-Sets the variations field of a font description. OpenType-font variations allow to select a font instance by specifying-values for a number of axes, such as width or weight.--The format of the variations string is AXIS1=VALUE,AXIS2=VALUE...,-with each AXIS a 4 character tag that identifies a font axis,-and each VALUE a floating point number. Unknown axes are ignored,-and values are clamped to their allowed range.--Pango does not currently have a way to find supported axes of-a font. Both harfbuzz or freetype have API for this.--/Since: 1.42/--}-fontDescriptionSetVariations ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription'. -}- -> T.Text- -> m ()-fontDescriptionSetVariations desc settings = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- settings' <- textToCString settings- pango_font_description_set_variations desc' settings'- touchManagedPtr desc- freeMem settings'- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetVariationsMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetVariationsMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetVariations--#endif---- method FontDescription::set_variations_static--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "settings", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_variations_static" pango_font_description_set_variations_static :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CString -> -- settings : TBasicType TUTF8- IO ()--{- |-Like 'GI.Pango.Structs.FontDescription.fontDescriptionSetVariations', except that no-copy of /@variations@/ is made. The caller must make sure that the-string passed in stays around until /@desc@/ has been freed-or the name is set again. This function can be used if-/@variations@/ is a static string such as a C string literal, or-if /@desc@/ is only needed temporarily.--/Since: 1.42/--}-fontDescriptionSetVariationsStatic ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> T.Text- -> m ()-fontDescriptionSetVariationsStatic desc settings = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- settings' <- textToCString settings- pango_font_description_set_variations_static desc' settings'- touchManagedPtr desc- freeMem settings'- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetVariationsStaticMethodInfo-instance (signature ~ (T.Text -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetVariationsStaticMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetVariationsStatic--#endif---- method FontDescription::set_weight--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "weight", argType = TInterface (Name {namespace = "Pango", name = "Weight"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the weight for the font description.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_set_weight" pango_font_description_set_weight :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CUInt -> -- weight : TInterface (Name {namespace = "Pango", name = "Weight"})- IO ()--{- |-Sets the weight field of a font description. The weight field-specifies how bold or light the font should be. In addition-to the values of the 'GI.Pango.Enums.Weight' enumeration, other intermediate-numeric values are possible.--}-fontDescriptionSetWeight ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> Pango.Enums.Weight- {- ^ /@weight@/: the weight for the font description. -}- -> m ()-fontDescriptionSetWeight desc weight = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- let weight' = (fromIntegral . fromEnum) weight- pango_font_description_set_weight desc' weight'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionSetWeightMethodInfo-instance (signature ~ (Pango.Enums.Weight -> m ()), MonadIO m) => O.MethodInfo FontDescriptionSetWeightMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionSetWeight--#endif---- method FontDescription::to_filename--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_to_filename" pango_font_description_to_filename :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CString--{- |-Creates a filename representation of a font description. The-filename is identical to the result from calling-'GI.Pango.Structs.FontDescription.fontDescriptionToString', but with underscores instead of-characters that are untypical in filenames, and in lower case only.--}-fontDescriptionToFilename ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m T.Text- {- ^ __Returns:__ a new string that must be freed with 'GI.GLib.Functions.free'. -}-fontDescriptionToFilename desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_to_filename desc'- checkUnexpectedReturnNULL "fontDescriptionToFilename" result- result' <- cstringToText result- freeMem result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionToFilenameMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo FontDescriptionToFilenameMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionToFilename--#endif---- method FontDescription::to_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_to_string" pango_font_description_to_string :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- IO CString--{- |-Creates a string representation of a font description. See-'GI.Pango.Functions.fontDescriptionFromString' for a description of the-format of the string representation. The family list in the-string description will only have a terminating comma if the-last word of the list is a valid style option.--}-fontDescriptionToString ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> m T.Text- {- ^ __Returns:__ a new string that must be freed with 'GI.GLib.Functions.free'. -}-fontDescriptionToString desc = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- result <- pango_font_description_to_string desc'- checkUnexpectedReturnNULL "fontDescriptionToString" result- result' <- cstringToText result- freeMem result- touchManagedPtr desc- return result'--#if ENABLE_OVERLOADING-data FontDescriptionToStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo FontDescriptionToStringMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionToString--#endif---- method FontDescription::unset_fields--- method type : OrdinaryMethod--- Args : [Arg {argCName = "desc", argType = TInterface (Name {namespace = "Pango", name = "FontDescription"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontDescription", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "to_unset", argType = TInterface (Name {namespace = "Pango", name = "FontMask"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "bitmask of fields in the @desc to unset.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_unset_fields" pango_font_description_unset_fields :: - Ptr FontDescription -> -- desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})- CUInt -> -- to_unset : TInterface (Name {namespace = "Pango", name = "FontMask"})- IO ()--{- |-Unsets some of the fields in a 'GI.Pango.Structs.FontDescription.FontDescription'. The unset-fields will get back to their default values.--}-fontDescriptionUnsetFields ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontDescription- {- ^ /@desc@/: a 'GI.Pango.Structs.FontDescription.FontDescription' -}- -> [Pango.Flags.FontMask]- {- ^ /@toUnset@/: bitmask of fields in the /@desc@/ to unset. -}- -> m ()-fontDescriptionUnsetFields desc toUnset = liftIO $ do- desc' <- unsafeManagedPtrGetPtr desc- let toUnset' = gflagsToWord toUnset- pango_font_description_unset_fields desc' toUnset'- touchManagedPtr desc- return ()--#if ENABLE_OVERLOADING-data FontDescriptionUnsetFieldsMethodInfo-instance (signature ~ ([Pango.Flags.FontMask] -> m ()), MonadIO m) => O.MethodInfo FontDescriptionUnsetFieldsMethodInfo FontDescription signature where- overloadedMethod _ = fontDescriptionUnsetFields--#endif---- method FontDescription::from_string--- method type : MemberFunction--- Args : [Arg {argCName = "str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "string representation of a font description.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontDescription"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_description_from_string" pango_font_description_from_string :: - CString -> -- str : TBasicType TUTF8- IO (Ptr FontDescription)--{- |-Creates a new font description from a string representation in the-form \"[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]\", where FAMILY-LIST is a-comma separated list of families optionally terminated by a comma,-STYLE_OPTIONS is a whitespace separated list of words where each word-describes one of style, variant, weight, stretch, or gravity, and SIZE-is a decimal number (size in points) or optionally followed by the-unit modifier \"px\" for absolute size. Any one of the options may-be absent. If FAMILY-LIST is absent, then the family_name field of-the resulting font description will be initialized to 'Nothing'. If-STYLE-OPTIONS is missing, then all style options will be set to the-default values. If SIZE is missing, the size in the resulting font-description will be set to 0.--}-fontDescriptionFromString ::- (B.CallStack.HasCallStack, MonadIO m) =>- T.Text- {- ^ /@str@/: string representation of a font description. -}- -> m FontDescription- {- ^ __Returns:__ a new 'GI.Pango.Structs.FontDescription.FontDescription'. -}-fontDescriptionFromString str = liftIO $ do- str' <- textToCString str- result <- pango_font_description_from_string str'- checkUnexpectedReturnNULL "fontDescriptionFromString" result- result' <- (wrapBoxed FontDescription) result- freeMem str'- return result'--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type family ResolveFontDescriptionMethod (t :: Symbol) (o :: *) :: * where- ResolveFontDescriptionMethod "betterMatch" o = FontDescriptionBetterMatchMethodInfo- ResolveFontDescriptionMethod "copy" o = FontDescriptionCopyMethodInfo- ResolveFontDescriptionMethod "copyStatic" o = FontDescriptionCopyStaticMethodInfo- ResolveFontDescriptionMethod "equal" o = FontDescriptionEqualMethodInfo- ResolveFontDescriptionMethod "free" o = FontDescriptionFreeMethodInfo- ResolveFontDescriptionMethod "hash" o = FontDescriptionHashMethodInfo- ResolveFontDescriptionMethod "merge" o = FontDescriptionMergeMethodInfo- ResolveFontDescriptionMethod "mergeStatic" o = FontDescriptionMergeStaticMethodInfo- ResolveFontDescriptionMethod "toFilename" o = FontDescriptionToFilenameMethodInfo- ResolveFontDescriptionMethod "toString" o = FontDescriptionToStringMethodInfo- ResolveFontDescriptionMethod "unsetFields" o = FontDescriptionUnsetFieldsMethodInfo- ResolveFontDescriptionMethod "getFamily" o = FontDescriptionGetFamilyMethodInfo- ResolveFontDescriptionMethod "getGravity" o = FontDescriptionGetGravityMethodInfo- ResolveFontDescriptionMethod "getSetFields" o = FontDescriptionGetSetFieldsMethodInfo- ResolveFontDescriptionMethod "getSize" o = FontDescriptionGetSizeMethodInfo- ResolveFontDescriptionMethod "getSizeIsAbsolute" o = FontDescriptionGetSizeIsAbsoluteMethodInfo- ResolveFontDescriptionMethod "getStretch" o = FontDescriptionGetStretchMethodInfo- ResolveFontDescriptionMethod "getStyle" o = FontDescriptionGetStyleMethodInfo- ResolveFontDescriptionMethod "getVariant" o = FontDescriptionGetVariantMethodInfo- ResolveFontDescriptionMethod "getVariations" o = FontDescriptionGetVariationsMethodInfo- ResolveFontDescriptionMethod "getWeight" o = FontDescriptionGetWeightMethodInfo- ResolveFontDescriptionMethod "setAbsoluteSize" o = FontDescriptionSetAbsoluteSizeMethodInfo- ResolveFontDescriptionMethod "setFamily" o = FontDescriptionSetFamilyMethodInfo- ResolveFontDescriptionMethod "setFamilyStatic" o = FontDescriptionSetFamilyStaticMethodInfo- ResolveFontDescriptionMethod "setGravity" o = FontDescriptionSetGravityMethodInfo- ResolveFontDescriptionMethod "setSize" o = FontDescriptionSetSizeMethodInfo- ResolveFontDescriptionMethod "setStretch" o = FontDescriptionSetStretchMethodInfo- ResolveFontDescriptionMethod "setStyle" o = FontDescriptionSetStyleMethodInfo- ResolveFontDescriptionMethod "setVariant" o = FontDescriptionSetVariantMethodInfo- ResolveFontDescriptionMethod "setVariations" o = FontDescriptionSetVariationsMethodInfo- ResolveFontDescriptionMethod "setVariationsStatic" o = FontDescriptionSetVariationsStaticMethodInfo- ResolveFontDescriptionMethod "setWeight" o = FontDescriptionSetWeightMethodInfo- ResolveFontDescriptionMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontDescriptionMethod t FontDescription, O.MethodInfo info FontDescription p) => OL.IsLabel t (FontDescription -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/FontDescription.hs-boot
@@ -1,122 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.FontDescription where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype FontDescription = FontDescription (ManagedPtr FontDescription)-instance BoxedObject FontDescription where-#if ENABLE_OVERLOADING-data FontDescriptionBetterMatchMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionCopyStaticMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionEqualMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetFamilyMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetGravityMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetSetFieldsMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetSizeIsAbsoluteMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetStretchMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetStyleMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetVariantMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetVariationsMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionGetWeightMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionHashMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionMergeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionMergeStaticMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetAbsoluteSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetFamilyMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetFamilyStaticMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetGravityMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetStretchMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetStyleMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetVariantMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetVariationsMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetVariationsStaticMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionSetWeightMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionToFilenameMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionToStringMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontDescriptionUnsetFieldsMethodInfo-#endif
− GI/Pango/Structs/FontMetrics.hs
@@ -1,595 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A 'GI.Pango.Structs.FontMetrics.FontMetrics' structure holds the overall metric information-for a font (possibly restricted to a script). The fields of this-structure are private to implementations of a font backend. See-the documentation of the corresponding getters for documentation-of their meaning.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.FontMetrics- ( ---- * Exported types- FontMetrics(..) ,- newZeroFontMetrics ,- noFontMetrics ,--- -- * Methods--- ** getApproximateCharWidth #method:getApproximateCharWidth#--#if ENABLE_OVERLOADING- FontMetricsGetApproximateCharWidthMethodInfo,-#endif- fontMetricsGetApproximateCharWidth ,----- ** getApproximateDigitWidth #method:getApproximateDigitWidth#--#if ENABLE_OVERLOADING- FontMetricsGetApproximateDigitWidthMethodInfo,-#endif- fontMetricsGetApproximateDigitWidth ,----- ** getAscent #method:getAscent#--#if ENABLE_OVERLOADING- FontMetricsGetAscentMethodInfo ,-#endif- fontMetricsGetAscent ,----- ** getDescent #method:getDescent#--#if ENABLE_OVERLOADING- FontMetricsGetDescentMethodInfo ,-#endif- fontMetricsGetDescent ,----- ** getStrikethroughPosition #method:getStrikethroughPosition#--#if ENABLE_OVERLOADING- FontMetricsGetStrikethroughPositionMethodInfo,-#endif- fontMetricsGetStrikethroughPosition ,----- ** getStrikethroughThickness #method:getStrikethroughThickness#--#if ENABLE_OVERLOADING- FontMetricsGetStrikethroughThicknessMethodInfo,-#endif- fontMetricsGetStrikethroughThickness ,----- ** getUnderlinePosition #method:getUnderlinePosition#--#if ENABLE_OVERLOADING- FontMetricsGetUnderlinePositionMethodInfo,-#endif- fontMetricsGetUnderlinePosition ,----- ** getUnderlineThickness #method:getUnderlineThickness#--#if ENABLE_OVERLOADING- FontMetricsGetUnderlineThicknessMethodInfo,-#endif- fontMetricsGetUnderlineThickness ,----- ** new #method:new#-- fontMetricsNew ,----- ** ref #method:ref#--#if ENABLE_OVERLOADING- FontMetricsRefMethodInfo ,-#endif- fontMetricsRef ,----- ** unref #method:unref#--#if ENABLE_OVERLOADING- FontMetricsUnrefMethodInfo ,-#endif- fontMetricsUnref ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype FontMetrics = FontMetrics (ManagedPtr FontMetrics)-foreign import ccall "pango_font_metrics_get_type" c_pango_font_metrics_get_type :: - IO GType--instance BoxedObject FontMetrics where- boxedType _ = c_pango_font_metrics_get_type---- | Construct a `FontMetrics` struct initialized to zero.-newZeroFontMetrics :: MonadIO m => m FontMetrics-newZeroFontMetrics = liftIO $ callocBoxedBytes 36 >>= wrapBoxed FontMetrics--instance tag ~ 'AttrSet => Constructible FontMetrics tag where- new _ attrs = do- o <- newZeroFontMetrics- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `FontMetrics`.-noFontMetrics :: Maybe FontMetrics-noFontMetrics = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList FontMetrics-type instance O.AttributeList FontMetrics = FontMetricsAttributeList-type FontMetricsAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method FontMetrics::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMetrics"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_new" pango_font_metrics_new :: - IO (Ptr FontMetrics)--{- |-Creates a new 'GI.Pango.Structs.FontMetrics.FontMetrics' structure. This is only for-internal use by Pango backends and there is no public way-to set the fields of the structure.--}-fontMetricsNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m FontMetrics- {- ^ __Returns:__ a newly-created 'GI.Pango.Structs.FontMetrics.FontMetrics' structure- with a reference count of 1. -}-fontMetricsNew = liftIO $ do- result <- pango_font_metrics_new- checkUnexpectedReturnNULL "fontMetricsNew" result- result' <- (wrapBoxed FontMetrics) result- return result'--#if ENABLE_OVERLOADING-#endif---- method FontMetrics::get_approximate_char_width--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_approximate_char_width" pango_font_metrics_get_approximate_char_width :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the approximate character width for a font metrics structure.-This is merely a representative value useful, for example, for-determining the initial size for a window. Actual characters in-text will be wider and narrower than this.--}-fontMetricsGetApproximateCharWidth ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the character width, in Pango units. -}-fontMetricsGetApproximateCharWidth metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_approximate_char_width metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetApproximateCharWidthMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetApproximateCharWidthMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetApproximateCharWidth--#endif---- method FontMetrics::get_approximate_digit_width--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_approximate_digit_width" pango_font_metrics_get_approximate_digit_width :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the approximate digit width for a font metrics structure.-This is merely a representative value useful, for example, for-determining the initial size for a window. Actual digits in-text can be wider or narrower than this, though this value-is generally somewhat more accurate than the result of-'GI.Pango.Structs.FontMetrics.fontMetricsGetApproximateCharWidth' for digits.--}-fontMetricsGetApproximateDigitWidth ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the digit width, in Pango units. -}-fontMetricsGetApproximateDigitWidth metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_approximate_digit_width metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetApproximateDigitWidthMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetApproximateDigitWidthMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetApproximateDigitWidth--#endif---- method FontMetrics::get_ascent--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_ascent" pango_font_metrics_get_ascent :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the ascent from a font metrics structure. The ascent is-the distance from the baseline to the logical top of a line-of text. (The logical top may be above or below the top of the-actual drawn ink. It is necessary to lay out the text to figure-where the ink will be.)--}-fontMetricsGetAscent ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the ascent, in Pango units. -}-fontMetricsGetAscent metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_ascent metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetAscentMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetAscentMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetAscent--#endif---- method FontMetrics::get_descent--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_descent" pango_font_metrics_get_descent :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the descent from a font metrics structure. The descent is-the distance from the baseline to the logical bottom of a line-of text. (The logical bottom may be above or below the bottom of the-actual drawn ink. It is necessary to lay out the text to figure-where the ink will be.)--}-fontMetricsGetDescent ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the descent, in Pango units. -}-fontMetricsGetDescent metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_descent metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetDescentMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetDescentMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetDescent--#endif---- method FontMetrics::get_strikethrough_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_strikethrough_position" pango_font_metrics_get_strikethrough_position :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the suggested position to draw the strikethrough.-The value returned is the distance \<emphasis>above\<\/emphasis> the-baseline of the top of the strikethrough.--/Since: 1.6/--}-fontMetricsGetStrikethroughPosition ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the suggested strikethrough position, in Pango units. -}-fontMetricsGetStrikethroughPosition metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_strikethrough_position metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetStrikethroughPositionMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetStrikethroughPositionMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetStrikethroughPosition--#endif---- method FontMetrics::get_strikethrough_thickness--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_strikethrough_thickness" pango_font_metrics_get_strikethrough_thickness :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the suggested thickness to draw for the strikethrough.--/Since: 1.6/--}-fontMetricsGetStrikethroughThickness ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the suggested strikethrough thickness, in Pango units. -}-fontMetricsGetStrikethroughThickness metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_strikethrough_thickness metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetStrikethroughThicknessMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetStrikethroughThicknessMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetStrikethroughThickness--#endif---- method FontMetrics::get_underline_position--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_underline_position" pango_font_metrics_get_underline_position :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the suggested position to draw the underline.-The value returned is the distance \<emphasis>above\<\/emphasis> the-baseline of the top of the underline. Since most fonts have-underline positions beneath the baseline, this value is typically-negative.--/Since: 1.6/--}-fontMetricsGetUnderlinePosition ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the suggested underline position, in Pango units. -}-fontMetricsGetUnderlinePosition metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_underline_position metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetUnderlinePositionMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetUnderlinePositionMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetUnderlinePosition--#endif---- method FontMetrics::get_underline_thickness--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_get_underline_thickness" pango_font_metrics_get_underline_thickness :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO Int32--{- |-Gets the suggested thickness to draw for the underline.--/Since: 1.6/--}-fontMetricsGetUnderlineThickness ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure -}- -> m Int32- {- ^ __Returns:__ the suggested underline thickness, in Pango units. -}-fontMetricsGetUnderlineThickness metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_get_underline_thickness metrics'- touchManagedPtr metrics- return result--#if ENABLE_OVERLOADING-data FontMetricsGetUnderlineThicknessMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo FontMetricsGetUnderlineThicknessMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsGetUnderlineThickness--#endif---- method FontMetrics::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "FontMetrics"}))--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_ref" pango_font_metrics_ref :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO (Ptr FontMetrics)--{- |-Increase the reference count of a font metrics structure by one.--}-fontMetricsRef ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure, may be 'Nothing' -}- -> m (Maybe FontMetrics)- {- ^ __Returns:__ /@metrics@/ -}-fontMetricsRef metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- result <- pango_font_metrics_ref metrics'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed FontMetrics) result'- return result''- touchManagedPtr metrics- return maybeResult--#if ENABLE_OVERLOADING-data FontMetricsRefMethodInfo-instance (signature ~ (m (Maybe FontMetrics)), MonadIO m) => O.MethodInfo FontMetricsRefMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsRef--#endif---- method FontMetrics::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "metrics", argType = TInterface (Name {namespace = "Pango", name = "FontMetrics"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontMetrics structure, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_font_metrics_unref" pango_font_metrics_unref :: - Ptr FontMetrics -> -- metrics : TInterface (Name {namespace = "Pango", name = "FontMetrics"})- IO ()--{- |-Decrease the reference count of a font metrics structure by one. If-the result is zero, frees the structure and any associated-memory.--}-fontMetricsUnref ::- (B.CallStack.HasCallStack, MonadIO m) =>- FontMetrics- {- ^ /@metrics@/: a 'GI.Pango.Structs.FontMetrics.FontMetrics' structure, may be 'Nothing' -}- -> m ()-fontMetricsUnref metrics = liftIO $ do- metrics' <- unsafeManagedPtrGetPtr metrics- pango_font_metrics_unref metrics'- touchManagedPtr metrics- return ()--#if ENABLE_OVERLOADING-data FontMetricsUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo FontMetricsUnrefMethodInfo FontMetrics signature where- overloadedMethod _ = fontMetricsUnref--#endif--#if ENABLE_OVERLOADING-type family ResolveFontMetricsMethod (t :: Symbol) (o :: *) :: * where- ResolveFontMetricsMethod "ref" o = FontMetricsRefMethodInfo- ResolveFontMetricsMethod "unref" o = FontMetricsUnrefMethodInfo- ResolveFontMetricsMethod "getApproximateCharWidth" o = FontMetricsGetApproximateCharWidthMethodInfo- ResolveFontMetricsMethod "getApproximateDigitWidth" o = FontMetricsGetApproximateDigitWidthMethodInfo- ResolveFontMetricsMethod "getAscent" o = FontMetricsGetAscentMethodInfo- ResolveFontMetricsMethod "getDescent" o = FontMetricsGetDescentMethodInfo- ResolveFontMetricsMethod "getStrikethroughPosition" o = FontMetricsGetStrikethroughPositionMethodInfo- ResolveFontMetricsMethod "getStrikethroughThickness" o = FontMetricsGetStrikethroughThicknessMethodInfo- ResolveFontMetricsMethod "getUnderlinePosition" o = FontMetricsGetUnderlinePositionMethodInfo- ResolveFontMetricsMethod "getUnderlineThickness" o = FontMetricsGetUnderlineThicknessMethodInfo- ResolveFontMetricsMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveFontMetricsMethod t FontMetrics, O.MethodInfo info FontMetrics p) => OL.IsLabel t (FontMetrics -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/FontMetrics.hs-boot
@@ -1,56 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.FontMetrics where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype FontMetrics = FontMetrics (ManagedPtr FontMetrics)-instance BoxedObject FontMetrics where-#if ENABLE_OVERLOADING-data FontMetricsGetApproximateCharWidthMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsGetApproximateDigitWidthMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsGetAscentMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsGetDescentMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsGetStrikethroughPositionMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsGetStrikethroughThicknessMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsGetUnderlinePositionMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsGetUnderlineThicknessMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsRefMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMetricsUnrefMethodInfo-#endif
− GI/Pango/Structs/GlyphGeometry.hs
@@ -1,257 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.GlyphGeometry.GlyphGeometry' structure contains width and positioning-information for a single glyph.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.GlyphGeometry- ( ---- * Exported types- GlyphGeometry(..) ,- newZeroGlyphGeometry ,- noGlyphGeometry ,--- -- * Properties--- ** width #attr:width#-{- | the logical width to use for the the character.--}- getGlyphGeometryWidth ,-#if ENABLE_OVERLOADING- glyphGeometry_width ,-#endif- setGlyphGeometryWidth ,----- ** xOffset #attr:xOffset#-{- | horizontal offset from nominal character position.--}- getGlyphGeometryXOffset ,-#if ENABLE_OVERLOADING- glyphGeometry_xOffset ,-#endif- setGlyphGeometryXOffset ,----- ** yOffset #attr:yOffset#-{- | vertical offset from nominal character position.--}- getGlyphGeometryYOffset ,-#if ENABLE_OVERLOADING- glyphGeometry_yOffset ,-#endif- setGlyphGeometryYOffset ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype GlyphGeometry = GlyphGeometry (ManagedPtr GlyphGeometry)-instance WrappedPtr GlyphGeometry where- wrappedPtrCalloc = callocBytes 12- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 12 >=> wrapPtr GlyphGeometry)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `GlyphGeometry` struct initialized to zero.-newZeroGlyphGeometry :: MonadIO m => m GlyphGeometry-newZeroGlyphGeometry = liftIO $ wrappedPtrCalloc >>= wrapPtr GlyphGeometry--instance tag ~ 'AttrSet => Constructible GlyphGeometry tag where- new _ attrs = do- o <- newZeroGlyphGeometry- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `GlyphGeometry`.-noGlyphGeometry :: Maybe GlyphGeometry-noGlyphGeometry = Nothing--{- |-Get the value of the “@width@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphGeometry #width-@--}-getGlyphGeometryWidth :: MonadIO m => GlyphGeometry -> m Int32-getGlyphGeometryWidth s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Int32- return val--{- |-Set the value of the “@width@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphGeometry [ #width 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphGeometryWidth :: MonadIO m => GlyphGeometry -> Int32 -> m ()-setGlyphGeometryWidth s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphGeometryWidthFieldInfo-instance AttrInfo GlyphGeometryWidthFieldInfo where- type AttrAllowedOps GlyphGeometryWidthFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphGeometryWidthFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphGeometryWidthFieldInfo = (~) GlyphGeometry- type AttrGetType GlyphGeometryWidthFieldInfo = Int32- type AttrLabel GlyphGeometryWidthFieldInfo = "width"- type AttrOrigin GlyphGeometryWidthFieldInfo = GlyphGeometry- attrGet _ = getGlyphGeometryWidth- attrSet _ = setGlyphGeometryWidth- attrConstruct = undefined- attrClear _ = undefined--glyphGeometry_width :: AttrLabelProxy "width"-glyphGeometry_width = AttrLabelProxy--#endif---{- |-Get the value of the “@x_offset@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphGeometry #xOffset-@--}-getGlyphGeometryXOffset :: MonadIO m => GlyphGeometry -> m Int32-getGlyphGeometryXOffset s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Int32- return val--{- |-Set the value of the “@x_offset@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphGeometry [ #xOffset 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphGeometryXOffset :: MonadIO m => GlyphGeometry -> Int32 -> m ()-setGlyphGeometryXOffset s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphGeometryXOffsetFieldInfo-instance AttrInfo GlyphGeometryXOffsetFieldInfo where- type AttrAllowedOps GlyphGeometryXOffsetFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphGeometryXOffsetFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphGeometryXOffsetFieldInfo = (~) GlyphGeometry- type AttrGetType GlyphGeometryXOffsetFieldInfo = Int32- type AttrLabel GlyphGeometryXOffsetFieldInfo = "x_offset"- type AttrOrigin GlyphGeometryXOffsetFieldInfo = GlyphGeometry- attrGet _ = getGlyphGeometryXOffset- attrSet _ = setGlyphGeometryXOffset- attrConstruct = undefined- attrClear _ = undefined--glyphGeometry_xOffset :: AttrLabelProxy "xOffset"-glyphGeometry_xOffset = AttrLabelProxy--#endif---{- |-Get the value of the “@y_offset@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphGeometry #yOffset-@--}-getGlyphGeometryYOffset :: MonadIO m => GlyphGeometry -> m Int32-getGlyphGeometryYOffset s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Int32- return val--{- |-Set the value of the “@y_offset@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphGeometry [ #yOffset 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphGeometryYOffset :: MonadIO m => GlyphGeometry -> Int32 -> m ()-setGlyphGeometryYOffset s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphGeometryYOffsetFieldInfo-instance AttrInfo GlyphGeometryYOffsetFieldInfo where- type AttrAllowedOps GlyphGeometryYOffsetFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphGeometryYOffsetFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphGeometryYOffsetFieldInfo = (~) GlyphGeometry- type AttrGetType GlyphGeometryYOffsetFieldInfo = Int32- type AttrLabel GlyphGeometryYOffsetFieldInfo = "y_offset"- type AttrOrigin GlyphGeometryYOffsetFieldInfo = GlyphGeometry- attrGet _ = getGlyphGeometryYOffset- attrSet _ = setGlyphGeometryYOffset- attrConstruct = undefined- attrClear _ = undefined--glyphGeometry_yOffset :: AttrLabelProxy "yOffset"-glyphGeometry_yOffset = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList GlyphGeometry-type instance O.AttributeList GlyphGeometry = GlyphGeometryAttributeList-type GlyphGeometryAttributeList = ('[ '("width", GlyphGeometryWidthFieldInfo), '("xOffset", GlyphGeometryXOffsetFieldInfo), '("yOffset", GlyphGeometryYOffsetFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveGlyphGeometryMethod (t :: Symbol) (o :: *) :: * where- ResolveGlyphGeometryMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveGlyphGeometryMethod t GlyphGeometry, O.MethodInfo info GlyphGeometry p) => OL.IsLabel t (GlyphGeometry -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/GlyphGeometry.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.GlyphGeometry where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype GlyphGeometry = GlyphGeometry (ManagedPtr GlyphGeometry)-instance WrappedPtr GlyphGeometry where
− GI/Pango/Structs/GlyphInfo.hs
@@ -1,236 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.GlyphInfo.GlyphInfo' structure represents a single glyph together with-positioning information and visual attributes.-It contains the following fields.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.GlyphInfo- ( ---- * Exported types- GlyphInfo(..) ,- newZeroGlyphInfo ,- noGlyphInfo ,--- -- * Properties--- ** attr #attr:attr#-{- | the visual attributes of the glyph.--}- getGlyphInfoAttr ,-#if ENABLE_OVERLOADING- glyphInfo_attr ,-#endif----- ** geometry #attr:geometry#-{- | the positional information about the glyph.--}- getGlyphInfoGeometry ,-#if ENABLE_OVERLOADING- glyphInfo_geometry ,-#endif----- ** glyph #attr:glyph#-{- | the glyph itself.--}- getGlyphInfoGlyph ,-#if ENABLE_OVERLOADING- glyphInfo_glyph ,-#endif- setGlyphInfoGlyph ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphGeometry as Pango.GlyphGeometry-import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphVisAttr as Pango.GlyphVisAttr---- | Memory-managed wrapper type.-newtype GlyphInfo = GlyphInfo (ManagedPtr GlyphInfo)-instance WrappedPtr GlyphInfo where- wrappedPtrCalloc = callocBytes 20- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 20 >=> wrapPtr GlyphInfo)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `GlyphInfo` struct initialized to zero.-newZeroGlyphInfo :: MonadIO m => m GlyphInfo-newZeroGlyphInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr GlyphInfo--instance tag ~ 'AttrSet => Constructible GlyphInfo tag where- new _ attrs = do- o <- newZeroGlyphInfo- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `GlyphInfo`.-noGlyphInfo :: Maybe GlyphInfo-noGlyphInfo = Nothing--{- |-Get the value of the “@glyph@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphInfo #glyph-@--}-getGlyphInfoGlyph :: MonadIO m => GlyphInfo -> m Word32-getGlyphInfoGlyph s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word32- return val--{- |-Set the value of the “@glyph@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphInfo [ #glyph 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphInfoGlyph :: MonadIO m => GlyphInfo -> Word32 -> m ()-setGlyphInfoGlyph s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word32)--#if ENABLE_OVERLOADING-data GlyphInfoGlyphFieldInfo-instance AttrInfo GlyphInfoGlyphFieldInfo where- type AttrAllowedOps GlyphInfoGlyphFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphInfoGlyphFieldInfo = (~) Word32- type AttrBaseTypeConstraint GlyphInfoGlyphFieldInfo = (~) GlyphInfo- type AttrGetType GlyphInfoGlyphFieldInfo = Word32- type AttrLabel GlyphInfoGlyphFieldInfo = "glyph"- type AttrOrigin GlyphInfoGlyphFieldInfo = GlyphInfo- attrGet _ = getGlyphInfoGlyph- attrSet _ = setGlyphInfoGlyph- attrConstruct = undefined- attrClear _ = undefined--glyphInfo_glyph :: AttrLabelProxy "glyph"-glyphInfo_glyph = AttrLabelProxy--#endif---{- |-Get the value of the “@geometry@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphInfo #geometry-@--}-getGlyphInfoGeometry :: MonadIO m => GlyphInfo -> m Pango.GlyphGeometry.GlyphGeometry-getGlyphInfoGeometry s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 4 :: (Ptr Pango.GlyphGeometry.GlyphGeometry)- val' <- (newPtr Pango.GlyphGeometry.GlyphGeometry) val- return val'--#if ENABLE_OVERLOADING-data GlyphInfoGeometryFieldInfo-instance AttrInfo GlyphInfoGeometryFieldInfo where- type AttrAllowedOps GlyphInfoGeometryFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint GlyphInfoGeometryFieldInfo = (~) (Ptr Pango.GlyphGeometry.GlyphGeometry)- type AttrBaseTypeConstraint GlyphInfoGeometryFieldInfo = (~) GlyphInfo- type AttrGetType GlyphInfoGeometryFieldInfo = Pango.GlyphGeometry.GlyphGeometry- type AttrLabel GlyphInfoGeometryFieldInfo = "geometry"- type AttrOrigin GlyphInfoGeometryFieldInfo = GlyphInfo- attrGet _ = getGlyphInfoGeometry- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--glyphInfo_geometry :: AttrLabelProxy "geometry"-glyphInfo_geometry = AttrLabelProxy--#endif---{- |-Get the value of the “@attr@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphInfo #attr-@--}-getGlyphInfoAttr :: MonadIO m => GlyphInfo -> m Pango.GlyphVisAttr.GlyphVisAttr-getGlyphInfoAttr s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 16 :: (Ptr Pango.GlyphVisAttr.GlyphVisAttr)- val' <- (newPtr Pango.GlyphVisAttr.GlyphVisAttr) val- return val'--#if ENABLE_OVERLOADING-data GlyphInfoAttrFieldInfo-instance AttrInfo GlyphInfoAttrFieldInfo where- type AttrAllowedOps GlyphInfoAttrFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint GlyphInfoAttrFieldInfo = (~) (Ptr Pango.GlyphVisAttr.GlyphVisAttr)- type AttrBaseTypeConstraint GlyphInfoAttrFieldInfo = (~) GlyphInfo- type AttrGetType GlyphInfoAttrFieldInfo = Pango.GlyphVisAttr.GlyphVisAttr- type AttrLabel GlyphInfoAttrFieldInfo = "attr"- type AttrOrigin GlyphInfoAttrFieldInfo = GlyphInfo- attrGet _ = getGlyphInfoAttr- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--glyphInfo_attr :: AttrLabelProxy "attr"-glyphInfo_attr = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList GlyphInfo-type instance O.AttributeList GlyphInfo = GlyphInfoAttributeList-type GlyphInfoAttributeList = ('[ '("glyph", GlyphInfoGlyphFieldInfo), '("geometry", GlyphInfoGeometryFieldInfo), '("attr", GlyphInfoAttrFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveGlyphInfoMethod (t :: Symbol) (o :: *) :: * where- ResolveGlyphInfoMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveGlyphInfoMethod t GlyphInfo, O.MethodInfo info GlyphInfo p) => OL.IsLabel t (GlyphInfo -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/GlyphInfo.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.GlyphInfo where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype GlyphInfo = GlyphInfo (ManagedPtr GlyphInfo)-instance WrappedPtr GlyphInfo where
− GI/Pango/Structs/GlyphItem.hs
@@ -1,611 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A 'GI.Pango.Structs.GlyphItem.GlyphItem' is a pair of a 'GI.Pango.Structs.Item.Item' and the glyphs-resulting from shaping the text corresponding to an item.-As an example of the usage of 'GI.Pango.Structs.GlyphItem.GlyphItem', the results-of shaping text with 'GI.Pango.Objects.Layout.Layout' is a list of 'GI.Pango.Structs.LayoutLine.LayoutLine',-each of which contains a list of 'GI.Pango.Structs.GlyphItem.GlyphItem'.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.GlyphItem- ( ---- * Exported types- GlyphItem(..) ,- newZeroGlyphItem ,- noGlyphItem ,--- -- * Methods--- ** applyAttrs #method:applyAttrs#--#if ENABLE_OVERLOADING- GlyphItemApplyAttrsMethodInfo ,-#endif- glyphItemApplyAttrs ,----- ** copy #method:copy#--#if ENABLE_OVERLOADING- GlyphItemCopyMethodInfo ,-#endif- glyphItemCopy ,----- ** free #method:free#--#if ENABLE_OVERLOADING- GlyphItemFreeMethodInfo ,-#endif- glyphItemFree ,----- ** getLogicalWidths #method:getLogicalWidths#--#if ENABLE_OVERLOADING- GlyphItemGetLogicalWidthsMethodInfo ,-#endif- glyphItemGetLogicalWidths ,----- ** letterSpace #method:letterSpace#--#if ENABLE_OVERLOADING- GlyphItemLetterSpaceMethodInfo ,-#endif- glyphItemLetterSpace ,----- ** split #method:split#--#if ENABLE_OVERLOADING- GlyphItemSplitMethodInfo ,-#endif- glyphItemSplit ,----- -- * Properties--- ** glyphs #attr:glyphs#-{- | corresponding 'GI.Pango.Structs.GlyphString.GlyphString'.--}- clearGlyphItemGlyphs ,- getGlyphItemGlyphs ,-#if ENABLE_OVERLOADING- glyphItem_glyphs ,-#endif- setGlyphItemGlyphs ,----- ** item #attr:item#-{- | corresponding 'GI.Pango.Structs.Item.Item'.--}- clearGlyphItemItem ,- getGlyphItemItem ,-#if ENABLE_OVERLOADING- glyphItem_item ,-#endif- setGlyphItemItem ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.AttrList as Pango.AttrList-import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphString as Pango.GlyphString-import {-# SOURCE #-} qualified GI.Pango.Structs.Item as Pango.Item-import {-# SOURCE #-} qualified GI.Pango.Structs.LogAttr as Pango.LogAttr---- | Memory-managed wrapper type.-newtype GlyphItem = GlyphItem (ManagedPtr GlyphItem)-foreign import ccall "pango_glyph_item_get_type" c_pango_glyph_item_get_type :: - IO GType--instance BoxedObject GlyphItem where- boxedType _ = c_pango_glyph_item_get_type---- | Construct a `GlyphItem` struct initialized to zero.-newZeroGlyphItem :: MonadIO m => m GlyphItem-newZeroGlyphItem = liftIO $ callocBoxedBytes 16 >>= wrapBoxed GlyphItem--instance tag ~ 'AttrSet => Constructible GlyphItem tag where- new _ attrs = do- o <- newZeroGlyphItem- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `GlyphItem`.-noGlyphItem :: Maybe GlyphItem-noGlyphItem = Nothing--{- |-Get the value of the “@item@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItem #item-@--}-getGlyphItemItem :: MonadIO m => GlyphItem -> m (Maybe Pango.Item.Item)-getGlyphItemItem s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr Pango.Item.Item)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newBoxed Pango.Item.Item) val'- return val''- return result--{- |-Set the value of the “@item@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItem [ #item 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemItem :: MonadIO m => GlyphItem -> Ptr Pango.Item.Item -> m ()-setGlyphItemItem s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr Pango.Item.Item)--{- |-Set the value of the “@item@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #item-@--}-clearGlyphItemItem :: MonadIO m => GlyphItem -> m ()-clearGlyphItemItem s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (FP.nullPtr :: Ptr Pango.Item.Item)--#if ENABLE_OVERLOADING-data GlyphItemItemFieldInfo-instance AttrInfo GlyphItemItemFieldInfo where- type AttrAllowedOps GlyphItemItemFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint GlyphItemItemFieldInfo = (~) (Ptr Pango.Item.Item)- type AttrBaseTypeConstraint GlyphItemItemFieldInfo = (~) GlyphItem- type AttrGetType GlyphItemItemFieldInfo = Maybe Pango.Item.Item- type AttrLabel GlyphItemItemFieldInfo = "item"- type AttrOrigin GlyphItemItemFieldInfo = GlyphItem- attrGet _ = getGlyphItemItem- attrSet _ = setGlyphItemItem- attrConstruct = undefined- attrClear _ = clearGlyphItemItem--glyphItem_item :: AttrLabelProxy "item"-glyphItem_item = AttrLabelProxy--#endif---{- |-Get the value of the “@glyphs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItem #glyphs-@--}-getGlyphItemGlyphs :: MonadIO m => GlyphItem -> m (Maybe Pango.GlyphString.GlyphString)-getGlyphItemGlyphs s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (Ptr Pango.GlyphString.GlyphString)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newBoxed Pango.GlyphString.GlyphString) val'- return val''- return result--{- |-Set the value of the “@glyphs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItem [ #glyphs 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemGlyphs :: MonadIO m => GlyphItem -> Ptr Pango.GlyphString.GlyphString -> m ()-setGlyphItemGlyphs s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Ptr Pango.GlyphString.GlyphString)--{- |-Set the value of the “@glyphs@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #glyphs-@--}-clearGlyphItemGlyphs :: MonadIO m => GlyphItem -> m ()-clearGlyphItemGlyphs s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (FP.nullPtr :: Ptr Pango.GlyphString.GlyphString)--#if ENABLE_OVERLOADING-data GlyphItemGlyphsFieldInfo-instance AttrInfo GlyphItemGlyphsFieldInfo where- type AttrAllowedOps GlyphItemGlyphsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint GlyphItemGlyphsFieldInfo = (~) (Ptr Pango.GlyphString.GlyphString)- type AttrBaseTypeConstraint GlyphItemGlyphsFieldInfo = (~) GlyphItem- type AttrGetType GlyphItemGlyphsFieldInfo = Maybe Pango.GlyphString.GlyphString- type AttrLabel GlyphItemGlyphsFieldInfo = "glyphs"- type AttrOrigin GlyphItemGlyphsFieldInfo = GlyphItem- attrGet _ = getGlyphItemGlyphs- attrSet _ = setGlyphItemGlyphs- attrConstruct = undefined- attrClear _ = clearGlyphItemGlyphs--glyphItem_glyphs :: AttrLabelProxy "glyphs"-glyphItem_glyphs = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList GlyphItem-type instance O.AttributeList GlyphItem = GlyphItemAttributeList-type GlyphItemAttributeList = ('[ '("item", GlyphItemItemFieldInfo), '("glyphs", GlyphItemGlyphsFieldInfo)] :: [(Symbol, *)])-#endif---- method GlyphItem::apply_attrs--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyph_item", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a shaped item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text that @list applies to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "list", argType = TInterface (Name {namespace = "Pango", name = "AttrList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoAttrList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TGSList (TInterface (Name {namespace = "Pango", name = "GlyphItem"})))--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_apply_attrs" pango_glyph_item_apply_attrs :: - Ptr GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- CString -> -- text : TBasicType TUTF8- Ptr Pango.AttrList.AttrList -> -- list : TInterface (Name {namespace = "Pango", name = "AttrList"})- IO (Ptr (GSList (Ptr GlyphItem)))--{- |-Splits a shaped item (PangoGlyphItem) into multiple items based-on an attribute list. The idea is that if you have attributes-that don\'t affect shaping, such as color or underline, to avoid-affecting shaping, you filter them out ('GI.Pango.Structs.AttrList.attrListFilter'),-apply the shaping process and then reapply them to the result using-this function.--All attributes that start or end inside a cluster are applied-to that cluster; for instance, if half of a cluster is underlined-and the other-half strikethrough, then the cluster will end-up with both underline and strikethrough attributes. In these-cases, it may happen that item->extra_attrs for some of the-result items can have multiple attributes of the same type.--This function takes ownership of /@glyphItem@/; it will be reused-as one of the elements in the list.--/Since: 1.2/--}-glyphItemApplyAttrs ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItem- {- ^ /@glyphItem@/: a shaped item -}- -> T.Text- {- ^ /@text@/: text that /@list@/ applies to -}- -> Pango.AttrList.AttrList- {- ^ /@list@/: a 'GI.Pango.Structs.AttrList.AttrList' -}- -> m [GlyphItem]- {- ^ __Returns:__ a- list of glyph items resulting from splitting /@glyphItem@/. Free- the elements using 'GI.Pango.Structs.GlyphItem.glyphItemFree', the list using- @/g_slist_free()/@. -}-glyphItemApplyAttrs glyphItem text list = liftIO $ do- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- text' <- textToCString text- list' <- unsafeManagedPtrGetPtr list- result <- pango_glyph_item_apply_attrs glyphItem' text' list'- result' <- unpackGSList result- result'' <- mapM (wrapBoxed GlyphItem) result'- g_slist_free result- touchManagedPtr glyphItem- touchManagedPtr list- freeMem text'- return result''--#if ENABLE_OVERLOADING-data GlyphItemApplyAttrsMethodInfo-instance (signature ~ (T.Text -> Pango.AttrList.AttrList -> m [GlyphItem]), MonadIO m) => O.MethodInfo GlyphItemApplyAttrsMethodInfo GlyphItem signature where- overloadedMethod _ = glyphItemApplyAttrs--#endif---- method GlyphItem::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "orig", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItem, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GlyphItem"}))--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_copy" pango_glyph_item_copy :: - Ptr GlyphItem -> -- orig : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- IO (Ptr GlyphItem)--{- |-Make a deep copy of an existing 'GI.Pango.Structs.GlyphItem.GlyphItem' structure.--/Since: 1.20/--}-glyphItemCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItem- {- ^ /@orig@/: a 'GI.Pango.Structs.GlyphItem.GlyphItem', may be 'Nothing' -}- -> m (Maybe GlyphItem)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.GlyphItem.GlyphItem', which should- be freed with 'GI.Pango.Structs.GlyphItem.glyphItemFree', or 'Nothing'- if /@orig@/ was 'Nothing'. -}-glyphItemCopy orig = liftIO $ do- orig' <- unsafeManagedPtrGetPtr orig- result <- pango_glyph_item_copy orig'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed GlyphItem) result'- return result''- touchManagedPtr orig- return maybeResult--#if ENABLE_OVERLOADING-data GlyphItemCopyMethodInfo-instance (signature ~ (m (Maybe GlyphItem)), MonadIO m) => O.MethodInfo GlyphItemCopyMethodInfo GlyphItem signature where- overloadedMethod _ = glyphItemCopy--#endif---- method GlyphItem::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyph_item", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItem, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_free" pango_glyph_item_free :: - Ptr GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- IO ()--{- |-Frees a 'GI.Pango.Structs.GlyphItem.GlyphItem' and resources to which it points.--/Since: 1.6/--}-glyphItemFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItem- {- ^ /@glyphItem@/: a 'GI.Pango.Structs.GlyphItem.GlyphItem', may be 'Nothing' -}- -> m ()-glyphItemFree glyphItem = liftIO $ do- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- pango_glyph_item_free glyphItem'- touchManagedPtr glyphItem- return ()--#if ENABLE_OVERLOADING-data GlyphItemFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo GlyphItemFreeMethodInfo GlyphItem signature where- overloadedMethod _ = glyphItemFree--#endif---- method GlyphItem::get_logical_widths--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyph_item", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItem", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text that @glyph_item corresponds to\n (glyph_item->item->offset is an offset from the\n start of @text)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "logical_widths", argType = TCArray False (-1) (-1) (TBasicType TInt), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an array whose length is the number of\n characters in glyph_item (equal to\n glyph_item->item->num_chars) to be filled in with\n the resulting character widths.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_get_logical_widths" pango_glyph_item_get_logical_widths :: - Ptr GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- CString -> -- text : TBasicType TUTF8- Ptr Int32 -> -- logical_widths : TCArray False (-1) (-1) (TBasicType TInt)- IO ()--{- |-Given a 'GI.Pango.Structs.GlyphItem.GlyphItem' and the corresponding-text, determine the screen width corresponding to each character. When-multiple characters compose a single cluster, the width of the entire-cluster is divided equally among the characters.--See also 'GI.Pango.Structs.GlyphString.glyphStringGetLogicalWidths'.--/Since: 1.26/--}-glyphItemGetLogicalWidths ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItem- {- ^ /@glyphItem@/: a 'GI.Pango.Structs.GlyphItem.GlyphItem' -}- -> T.Text- {- ^ /@text@/: text that /@glyphItem@/ corresponds to- (glyph_item->item->offset is an offset from the- start of /@text@/) -}- -> [Int32]- {- ^ /@logicalWidths@/: an array whose length is the number of- characters in glyph_item (equal to- glyph_item->item->num_chars) to be filled in with- the resulting character widths. -}- -> m ()-glyphItemGetLogicalWidths glyphItem text logicalWidths = liftIO $ do- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- text' <- textToCString text- logicalWidths' <- packStorableArray logicalWidths- pango_glyph_item_get_logical_widths glyphItem' text' logicalWidths'- touchManagedPtr glyphItem- freeMem text'- freeMem logicalWidths'- return ()--#if ENABLE_OVERLOADING-data GlyphItemGetLogicalWidthsMethodInfo-instance (signature ~ (T.Text -> [Int32] -> m ()), MonadIO m) => O.MethodInfo GlyphItemGetLogicalWidthsMethodInfo GlyphItem signature where- overloadedMethod _ = glyphItemGetLogicalWidths--#endif---- method GlyphItem::letter_space--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyph_item", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItem", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text that @glyph_item corresponds to\n (glyph_item->item->offset is an offset from the\n start of @text)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "log_attrs", argType = TCArray False (-1) (-1) (TInterface (Name {namespace = "Pango", name = "LogAttr"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "logical attributes for the item\n (the first logical attribute refers to the position\n before the first character in the item)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "letter_spacing", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "amount of letter spacing to add\n in Pango units. May be negative, though too large\n negative values will give ugly results.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_letter_space" pango_glyph_item_letter_space :: - Ptr GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- CString -> -- text : TBasicType TUTF8- Ptr Pango.LogAttr.LogAttr -> -- log_attrs : TCArray False (-1) (-1) (TInterface (Name {namespace = "Pango", name = "LogAttr"}))- Int32 -> -- letter_spacing : TBasicType TInt- IO ()--{- |-Adds spacing between the graphemes of /@glyphItem@/ to-give the effect of typographic letter spacing.--/Since: 1.6/--}-glyphItemLetterSpace ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItem- {- ^ /@glyphItem@/: a 'GI.Pango.Structs.GlyphItem.GlyphItem' -}- -> T.Text- {- ^ /@text@/: text that /@glyphItem@/ corresponds to- (glyph_item->item->offset is an offset from the- start of /@text@/) -}- -> [Pango.LogAttr.LogAttr]- {- ^ /@logAttrs@/: logical attributes for the item- (the first logical attribute refers to the position- before the first character in the item) -}- -> Int32- {- ^ /@letterSpacing@/: amount of letter spacing to add- in Pango units. May be negative, though too large- negative values will give ugly results. -}- -> m ()-glyphItemLetterSpace glyphItem text logAttrs letterSpacing = liftIO $ do- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- text' <- textToCString text- logAttrs' <- mapM unsafeManagedPtrGetPtr logAttrs- logAttrs'' <- packBlockArray 52 logAttrs'- pango_glyph_item_letter_space glyphItem' text' logAttrs'' letterSpacing- touchManagedPtr glyphItem- mapM_ touchManagedPtr logAttrs- freeMem text'- freeMem logAttrs''- return ()--#if ENABLE_OVERLOADING-data GlyphItemLetterSpaceMethodInfo-instance (signature ~ (T.Text -> [Pango.LogAttr.LogAttr] -> Int32 -> m ()), MonadIO m) => O.MethodInfo GlyphItemLetterSpaceMethodInfo GlyphItem signature where- overloadedMethod _ = glyphItemLetterSpace--#endif---- method GlyphItem::split--- method type : OrdinaryMethod--- Args : [Arg {argCName = "orig", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoItem", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text to which positions in @orig apply", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "split_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "byte index of position to split item, relative to the start of the item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GlyphItem"}))--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_split" pango_glyph_item_split :: - Ptr GlyphItem -> -- orig : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- CString -> -- text : TBasicType TUTF8- Int32 -> -- split_index : TBasicType TInt- IO (Ptr GlyphItem)--{- |-Modifies /@orig@/ to cover only the text after /@splitIndex@/, and-returns a new item that covers the text before /@splitIndex@/ that-used to be in /@orig@/. You can think of /@splitIndex@/ as the length of-the returned item. /@splitIndex@/ may not be 0, and it may not be-greater than or equal to the length of /@orig@/ (that is, there must-be at least one byte assigned to each item, you can\'t create a-zero-length item).--This function is similar in function to 'GI.Pango.Structs.Item.itemSplit' (and uses-it internally.)--/Since: 1.2/--}-glyphItemSplit ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItem- {- ^ /@orig@/: a 'GI.Pango.Structs.Item.Item' -}- -> T.Text- {- ^ /@text@/: text to which positions in /@orig@/ apply -}- -> Int32- {- ^ /@splitIndex@/: byte index of position to split item, relative to the start of the item -}- -> m GlyphItem- {- ^ __Returns:__ the newly allocated item representing text before- /@splitIndex@/, which should be freed- with 'GI.Pango.Structs.GlyphItem.glyphItemFree'. -}-glyphItemSplit orig text splitIndex = liftIO $ do- orig' <- unsafeManagedPtrGetPtr orig- text' <- textToCString text- result <- pango_glyph_item_split orig' text' splitIndex- checkUnexpectedReturnNULL "glyphItemSplit" result- result' <- (wrapBoxed GlyphItem) result- touchManagedPtr orig- freeMem text'- return result'--#if ENABLE_OVERLOADING-data GlyphItemSplitMethodInfo-instance (signature ~ (T.Text -> Int32 -> m GlyphItem), MonadIO m) => O.MethodInfo GlyphItemSplitMethodInfo GlyphItem signature where- overloadedMethod _ = glyphItemSplit--#endif--#if ENABLE_OVERLOADING-type family ResolveGlyphItemMethod (t :: Symbol) (o :: *) :: * where- ResolveGlyphItemMethod "applyAttrs" o = GlyphItemApplyAttrsMethodInfo- ResolveGlyphItemMethod "copy" o = GlyphItemCopyMethodInfo- ResolveGlyphItemMethod "free" o = GlyphItemFreeMethodInfo- ResolveGlyphItemMethod "letterSpace" o = GlyphItemLetterSpaceMethodInfo- ResolveGlyphItemMethod "split" o = GlyphItemSplitMethodInfo- ResolveGlyphItemMethod "getLogicalWidths" o = GlyphItemGetLogicalWidthsMethodInfo- ResolveGlyphItemMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveGlyphItemMethod t GlyphItem, O.MethodInfo info GlyphItem p) => OL.IsLabel t (GlyphItem -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/GlyphItem.hs-boot
@@ -1,44 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.GlyphItem where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype GlyphItem = GlyphItem (ManagedPtr GlyphItem)-instance BoxedObject GlyphItem where-#if ENABLE_OVERLOADING-data GlyphItemApplyAttrsMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemGetLogicalWidthsMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemLetterSpaceMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemSplitMethodInfo-#endif
− GI/Pango/Structs/GlyphItemIter.hs
@@ -1,912 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' is an iterator over the clusters in a-'GI.Pango.Structs.GlyphItem.GlyphItem'. The \<firstterm>forward direction\<\/firstterm> of the-iterator is the logical direction of text. That is, with increasing-/@startIndex@/ and /@startChar@/ values. If /@glyphItem@/ is right-to-left-(that is, if \<literal>/@glyphItem@/->item->analysis.level\<\/literal> is odd),-then /@startGlyph@/ decreases as the iterator moves forward. Moreover,-in right-to-left cases, /@startGlyph@/ is greater than /@endGlyph@/.--An iterator should be initialized using either of-'GI.Pango.Structs.GlyphItemIter.glyphItemIterInitStart' and-'GI.Pango.Structs.GlyphItemIter.glyphItemIterInitEnd', for forward and backward iteration-respectively, and walked over using any desired mixture of-'GI.Pango.Structs.GlyphItemIter.glyphItemIterNextCluster' and-'GI.Pango.Structs.GlyphItemIter.glyphItemIterPrevCluster'. A common idiom for doing a-forward iteration over the clusters is:-\<programlisting>-PangoGlyphItemIter cluster_iter;-gboolean have_cluster;--for (have_cluster = pango_glyph_item_iter_init_start (&cluster_iter,- glyph_item, text);- have_cluster;- have_cluster = pango_glyph_item_iter_next_cluster (&cluster_iter))-{- ...-}-\<\/programlisting>--Note that /@text@/ is the start of the text for layout, which is then-indexed by \<literal>/@glyphItem@/->item->offset\<\/literal> to get to the-text of /@glyphItem@/. The /@startIndex@/ and /@endIndex@/ values can directly-index into /@text@/. The /@startGlyph@/, /@endGlyph@/, /@startChar@/, and /@endChar@/-values however are zero-based for the /@glyphItem@/. For each cluster, the-item pointed at by the start variables is included in the cluster while-the one pointed at by end variables is not.--None of the members of a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' should be modified manually.--/Since: 1.22/--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.GlyphItemIter- ( ---- * Exported types- GlyphItemIter(..) ,- newZeroGlyphItemIter ,- noGlyphItemIter ,--- -- * Methods--- ** copy #method:copy#--#if ENABLE_OVERLOADING- GlyphItemIterCopyMethodInfo ,-#endif- glyphItemIterCopy ,----- ** free #method:free#--#if ENABLE_OVERLOADING- GlyphItemIterFreeMethodInfo ,-#endif- glyphItemIterFree ,----- ** initEnd #method:initEnd#--#if ENABLE_OVERLOADING- GlyphItemIterInitEndMethodInfo ,-#endif- glyphItemIterInitEnd ,----- ** initStart #method:initStart#--#if ENABLE_OVERLOADING- GlyphItemIterInitStartMethodInfo ,-#endif- glyphItemIterInitStart ,----- ** nextCluster #method:nextCluster#--#if ENABLE_OVERLOADING- GlyphItemIterNextClusterMethodInfo ,-#endif- glyphItemIterNextCluster ,----- ** prevCluster #method:prevCluster#--#if ENABLE_OVERLOADING- GlyphItemIterPrevClusterMethodInfo ,-#endif- glyphItemIterPrevCluster ,----- -- * Properties--- ** endChar #attr:endChar#-{- | /No description available in the introspection data./--}- getGlyphItemIterEndChar ,-#if ENABLE_OVERLOADING- glyphItemIter_endChar ,-#endif- setGlyphItemIterEndChar ,----- ** endGlyph #attr:endGlyph#-{- | /No description available in the introspection data./--}- getGlyphItemIterEndGlyph ,-#if ENABLE_OVERLOADING- glyphItemIter_endGlyph ,-#endif- setGlyphItemIterEndGlyph ,----- ** endIndex #attr:endIndex#-{- | /No description available in the introspection data./--}- getGlyphItemIterEndIndex ,-#if ENABLE_OVERLOADING- glyphItemIter_endIndex ,-#endif- setGlyphItemIterEndIndex ,----- ** glyphItem #attr:glyphItem#-{- | /No description available in the introspection data./--}- clearGlyphItemIterGlyphItem ,- getGlyphItemIterGlyphItem ,-#if ENABLE_OVERLOADING- glyphItemIter_glyphItem ,-#endif- setGlyphItemIterGlyphItem ,----- ** startChar #attr:startChar#-{- | /No description available in the introspection data./--}- getGlyphItemIterStartChar ,-#if ENABLE_OVERLOADING- glyphItemIter_startChar ,-#endif- setGlyphItemIterStartChar ,----- ** startGlyph #attr:startGlyph#-{- | /No description available in the introspection data./--}- getGlyphItemIterStartGlyph ,-#if ENABLE_OVERLOADING- glyphItemIter_startGlyph ,-#endif- setGlyphItemIterStartGlyph ,----- ** startIndex #attr:startIndex#-{- | /No description available in the introspection data./--}- getGlyphItemIterStartIndex ,-#if ENABLE_OVERLOADING- glyphItemIter_startIndex ,-#endif- setGlyphItemIterStartIndex ,----- ** text #attr:text#-{- | /No description available in the introspection data./--}- clearGlyphItemIterText ,- getGlyphItemIterText ,-#if ENABLE_OVERLOADING- glyphItemIter_text ,-#endif- setGlyphItemIterText ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphItem as Pango.GlyphItem---- | Memory-managed wrapper type.-newtype GlyphItemIter = GlyphItemIter (ManagedPtr GlyphItemIter)-foreign import ccall "pango_glyph_item_iter_get_type" c_pango_glyph_item_iter_get_type :: - IO GType--instance BoxedObject GlyphItemIter where- boxedType _ = c_pango_glyph_item_iter_get_type---- | Construct a `GlyphItemIter` struct initialized to zero.-newZeroGlyphItemIter :: MonadIO m => m GlyphItemIter-newZeroGlyphItemIter = liftIO $ callocBoxedBytes 40 >>= wrapBoxed GlyphItemIter--instance tag ~ 'AttrSet => Constructible GlyphItemIter tag where- new _ attrs = do- o <- newZeroGlyphItemIter- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `GlyphItemIter`.-noGlyphItemIter :: Maybe GlyphItemIter-noGlyphItemIter = Nothing--{- |-Get the value of the “@glyph_item@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #glyphItem-@--}-getGlyphItemIterGlyphItem :: MonadIO m => GlyphItemIter -> m (Maybe Pango.GlyphItem.GlyphItem)-getGlyphItemIterGlyphItem s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr Pango.GlyphItem.GlyphItem)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newBoxed Pango.GlyphItem.GlyphItem) val'- return val''- return result--{- |-Set the value of the “@glyph_item@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #glyphItem 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterGlyphItem :: MonadIO m => GlyphItemIter -> Ptr Pango.GlyphItem.GlyphItem -> m ()-setGlyphItemIterGlyphItem s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr Pango.GlyphItem.GlyphItem)--{- |-Set the value of the “@glyph_item@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #glyphItem-@--}-clearGlyphItemIterGlyphItem :: MonadIO m => GlyphItemIter -> m ()-clearGlyphItemIterGlyphItem s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (FP.nullPtr :: Ptr Pango.GlyphItem.GlyphItem)--#if ENABLE_OVERLOADING-data GlyphItemIterGlyphItemFieldInfo-instance AttrInfo GlyphItemIterGlyphItemFieldInfo where- type AttrAllowedOps GlyphItemIterGlyphItemFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint GlyphItemIterGlyphItemFieldInfo = (~) (Ptr Pango.GlyphItem.GlyphItem)- type AttrBaseTypeConstraint GlyphItemIterGlyphItemFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterGlyphItemFieldInfo = Maybe Pango.GlyphItem.GlyphItem- type AttrLabel GlyphItemIterGlyphItemFieldInfo = "glyph_item"- type AttrOrigin GlyphItemIterGlyphItemFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterGlyphItem- attrSet _ = setGlyphItemIterGlyphItem- attrConstruct = undefined- attrClear _ = clearGlyphItemIterGlyphItem--glyphItemIter_glyphItem :: AttrLabelProxy "glyphItem"-glyphItemIter_glyphItem = AttrLabelProxy--#endif---{- |-Get the value of the “@text@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #text-@--}-getGlyphItemIterText :: MonadIO m => GlyphItemIter -> m (Maybe T.Text)-getGlyphItemIterText s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CString- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- cstringToText val'- return val''- return result--{- |-Set the value of the “@text@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #text 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterText :: MonadIO m => GlyphItemIter -> CString -> m ()-setGlyphItemIterText s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: CString)--{- |-Set the value of the “@text@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #text-@--}-clearGlyphItemIterText :: MonadIO m => GlyphItemIter -> m ()-clearGlyphItemIterText s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (FP.nullPtr :: CString)--#if ENABLE_OVERLOADING-data GlyphItemIterTextFieldInfo-instance AttrInfo GlyphItemIterTextFieldInfo where- type AttrAllowedOps GlyphItemIterTextFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint GlyphItemIterTextFieldInfo = (~) CString- type AttrBaseTypeConstraint GlyphItemIterTextFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterTextFieldInfo = Maybe T.Text- type AttrLabel GlyphItemIterTextFieldInfo = "text"- type AttrOrigin GlyphItemIterTextFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterText- attrSet _ = setGlyphItemIterText- attrConstruct = undefined- attrClear _ = clearGlyphItemIterText--glyphItemIter_text :: AttrLabelProxy "text"-glyphItemIter_text = AttrLabelProxy--#endif---{- |-Get the value of the “@start_glyph@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #startGlyph-@--}-getGlyphItemIterStartGlyph :: MonadIO m => GlyphItemIter -> m Int32-getGlyphItemIterStartGlyph s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Int32- return val--{- |-Set the value of the “@start_glyph@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #startGlyph 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterStartGlyph :: MonadIO m => GlyphItemIter -> Int32 -> m ()-setGlyphItemIterStartGlyph s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphItemIterStartGlyphFieldInfo-instance AttrInfo GlyphItemIterStartGlyphFieldInfo where- type AttrAllowedOps GlyphItemIterStartGlyphFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphItemIterStartGlyphFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphItemIterStartGlyphFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterStartGlyphFieldInfo = Int32- type AttrLabel GlyphItemIterStartGlyphFieldInfo = "start_glyph"- type AttrOrigin GlyphItemIterStartGlyphFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterStartGlyph- attrSet _ = setGlyphItemIterStartGlyph- attrConstruct = undefined- attrClear _ = undefined--glyphItemIter_startGlyph :: AttrLabelProxy "startGlyph"-glyphItemIter_startGlyph = AttrLabelProxy--#endif---{- |-Get the value of the “@start_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #startIndex-@--}-getGlyphItemIterStartIndex :: MonadIO m => GlyphItemIter -> m Int32-getGlyphItemIterStartIndex s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 20) :: IO Int32- return val--{- |-Set the value of the “@start_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #startIndex 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterStartIndex :: MonadIO m => GlyphItemIter -> Int32 -> m ()-setGlyphItemIterStartIndex s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 20) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphItemIterStartIndexFieldInfo-instance AttrInfo GlyphItemIterStartIndexFieldInfo where- type AttrAllowedOps GlyphItemIterStartIndexFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphItemIterStartIndexFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphItemIterStartIndexFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterStartIndexFieldInfo = Int32- type AttrLabel GlyphItemIterStartIndexFieldInfo = "start_index"- type AttrOrigin GlyphItemIterStartIndexFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterStartIndex- attrSet _ = setGlyphItemIterStartIndex- attrConstruct = undefined- attrClear _ = undefined--glyphItemIter_startIndex :: AttrLabelProxy "startIndex"-glyphItemIter_startIndex = AttrLabelProxy--#endif---{- |-Get the value of the “@start_char@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #startChar-@--}-getGlyphItemIterStartChar :: MonadIO m => GlyphItemIter -> m Int32-getGlyphItemIterStartChar s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO Int32- return val--{- |-Set the value of the “@start_char@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #startChar 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterStartChar :: MonadIO m => GlyphItemIter -> Int32 -> m ()-setGlyphItemIterStartChar s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphItemIterStartCharFieldInfo-instance AttrInfo GlyphItemIterStartCharFieldInfo where- type AttrAllowedOps GlyphItemIterStartCharFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphItemIterStartCharFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphItemIterStartCharFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterStartCharFieldInfo = Int32- type AttrLabel GlyphItemIterStartCharFieldInfo = "start_char"- type AttrOrigin GlyphItemIterStartCharFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterStartChar- attrSet _ = setGlyphItemIterStartChar- attrConstruct = undefined- attrClear _ = undefined--glyphItemIter_startChar :: AttrLabelProxy "startChar"-glyphItemIter_startChar = AttrLabelProxy--#endif---{- |-Get the value of the “@end_glyph@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #endGlyph-@--}-getGlyphItemIterEndGlyph :: MonadIO m => GlyphItemIter -> m Int32-getGlyphItemIterEndGlyph s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 28) :: IO Int32- return val--{- |-Set the value of the “@end_glyph@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #endGlyph 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterEndGlyph :: MonadIO m => GlyphItemIter -> Int32 -> m ()-setGlyphItemIterEndGlyph s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 28) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphItemIterEndGlyphFieldInfo-instance AttrInfo GlyphItemIterEndGlyphFieldInfo where- type AttrAllowedOps GlyphItemIterEndGlyphFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphItemIterEndGlyphFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphItemIterEndGlyphFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterEndGlyphFieldInfo = Int32- type AttrLabel GlyphItemIterEndGlyphFieldInfo = "end_glyph"- type AttrOrigin GlyphItemIterEndGlyphFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterEndGlyph- attrSet _ = setGlyphItemIterEndGlyph- attrConstruct = undefined- attrClear _ = undefined--glyphItemIter_endGlyph :: AttrLabelProxy "endGlyph"-glyphItemIter_endGlyph = AttrLabelProxy--#endif---{- |-Get the value of the “@end_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #endIndex-@--}-getGlyphItemIterEndIndex :: MonadIO m => GlyphItemIter -> m Int32-getGlyphItemIterEndIndex s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO Int32- return val--{- |-Set the value of the “@end_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #endIndex 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterEndIndex :: MonadIO m => GlyphItemIter -> Int32 -> m ()-setGlyphItemIterEndIndex s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphItemIterEndIndexFieldInfo-instance AttrInfo GlyphItemIterEndIndexFieldInfo where- type AttrAllowedOps GlyphItemIterEndIndexFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphItemIterEndIndexFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphItemIterEndIndexFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterEndIndexFieldInfo = Int32- type AttrLabel GlyphItemIterEndIndexFieldInfo = "end_index"- type AttrOrigin GlyphItemIterEndIndexFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterEndIndex- attrSet _ = setGlyphItemIterEndIndex- attrConstruct = undefined- attrClear _ = undefined--glyphItemIter_endIndex :: AttrLabelProxy "endIndex"-glyphItemIter_endIndex = AttrLabelProxy--#endif---{- |-Get the value of the “@end_char@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphItemIter #endChar-@--}-getGlyphItemIterEndChar :: MonadIO m => GlyphItemIter -> m Int32-getGlyphItemIterEndChar s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 36) :: IO Int32- return val--{- |-Set the value of the “@end_char@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphItemIter [ #endChar 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphItemIterEndChar :: MonadIO m => GlyphItemIter -> Int32 -> m ()-setGlyphItemIterEndChar s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 36) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphItemIterEndCharFieldInfo-instance AttrInfo GlyphItemIterEndCharFieldInfo where- type AttrAllowedOps GlyphItemIterEndCharFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphItemIterEndCharFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphItemIterEndCharFieldInfo = (~) GlyphItemIter- type AttrGetType GlyphItemIterEndCharFieldInfo = Int32- type AttrLabel GlyphItemIterEndCharFieldInfo = "end_char"- type AttrOrigin GlyphItemIterEndCharFieldInfo = GlyphItemIter- attrGet _ = getGlyphItemIterEndChar- attrSet _ = setGlyphItemIterEndChar- attrConstruct = undefined- attrClear _ = undefined--glyphItemIter_endChar :: AttrLabelProxy "endChar"-glyphItemIter_endChar = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList GlyphItemIter-type instance O.AttributeList GlyphItemIter = GlyphItemIterAttributeList-type GlyphItemIterAttributeList = ('[ '("glyphItem", GlyphItemIterGlyphItemFieldInfo), '("text", GlyphItemIterTextFieldInfo), '("startGlyph", GlyphItemIterStartGlyphFieldInfo), '("startIndex", GlyphItemIterStartIndexFieldInfo), '("startChar", GlyphItemIterStartCharFieldInfo), '("endGlyph", GlyphItemIterEndGlyphFieldInfo), '("endIndex", GlyphItemIterEndIndexFieldInfo), '("endChar", GlyphItemIterEndCharFieldInfo)] :: [(Symbol, *)])-#endif---- method GlyphItemIter::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "orig", argType = TInterface (Name {namespace = "Pango", name = "GlyphItemIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItemIter, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GlyphItemIter"}))--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_iter_copy" pango_glyph_item_iter_copy :: - Ptr GlyphItemIter -> -- orig : TInterface (Name {namespace = "Pango", name = "GlyphItemIter"})- IO (Ptr GlyphItemIter)--{- |-Make a shallow copy of an existing 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' structure.--/Since: 1.22/--}-glyphItemIterCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItemIter- {- ^ /@orig@/: a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter', may be 'Nothing' -}- -> m (Maybe GlyphItemIter)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter', which should- be freed with 'GI.Pango.Structs.GlyphItemIter.glyphItemIterFree', or 'Nothing'- if /@orig@/ was 'Nothing'. -}-glyphItemIterCopy orig = liftIO $ do- orig' <- unsafeManagedPtrGetPtr orig- result <- pango_glyph_item_iter_copy orig'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed GlyphItemIter) result'- return result''- touchManagedPtr orig- return maybeResult--#if ENABLE_OVERLOADING-data GlyphItemIterCopyMethodInfo-instance (signature ~ (m (Maybe GlyphItemIter)), MonadIO m) => O.MethodInfo GlyphItemIterCopyMethodInfo GlyphItemIter signature where- overloadedMethod _ = glyphItemIterCopy--#endif---- method GlyphItemIter::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "GlyphItemIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItemIter, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_iter_free" pango_glyph_item_iter_free :: - Ptr GlyphItemIter -> -- iter : TInterface (Name {namespace = "Pango", name = "GlyphItemIter"})- IO ()--{- |-Frees a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' created by 'GI.Pango.Structs.GlyphItemIter.glyphItemIterCopy'.--/Since: 1.22/--}-glyphItemIterFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItemIter- {- ^ /@iter@/: a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter', may be 'Nothing' -}- -> m ()-glyphItemIterFree iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- pango_glyph_item_iter_free iter'- touchManagedPtr iter- return ()--#if ENABLE_OVERLOADING-data GlyphItemIterFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo GlyphItemIterFreeMethodInfo GlyphItemIter signature where- overloadedMethod _ = glyphItemIterFree--#endif---- method GlyphItemIter::init_end--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "GlyphItemIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItemIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyph_item", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the glyph item to iterate over", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text corresponding to the glyph item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_iter_init_end" pango_glyph_item_iter_init_end :: - Ptr GlyphItemIter -> -- iter : TInterface (Name {namespace = "Pango", name = "GlyphItemIter"})- Ptr Pango.GlyphItem.GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- CString -> -- text : TBasicType TUTF8- IO CInt--{- |-Initializes a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' structure to point to the-last cluster in a glyph item.-See 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' for details of cluster orders.--/Since: 1.22/--}-glyphItemIterInitEnd ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItemIter- {- ^ /@iter@/: a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' -}- -> Pango.GlyphItem.GlyphItem- {- ^ /@glyphItem@/: the glyph item to iterate over -}- -> T.Text- {- ^ /@text@/: text corresponding to the glyph item -}- -> m Bool- {- ^ __Returns:__ 'False' if there are no clusters in the glyph item -}-glyphItemIterInitEnd iter glyphItem text = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- text' <- textToCString text- result <- pango_glyph_item_iter_init_end iter' glyphItem' text'- let result' = (/= 0) result- touchManagedPtr iter- touchManagedPtr glyphItem- freeMem text'- return result'--#if ENABLE_OVERLOADING-data GlyphItemIterInitEndMethodInfo-instance (signature ~ (Pango.GlyphItem.GlyphItem -> T.Text -> m Bool), MonadIO m) => O.MethodInfo GlyphItemIterInitEndMethodInfo GlyphItemIter signature where- overloadedMethod _ = glyphItemIterInitEnd--#endif---- method GlyphItemIter::init_start--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "GlyphItemIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItemIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "glyph_item", argType = TInterface (Name {namespace = "Pango", name = "GlyphItem"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the glyph item to iterate over", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "text corresponding to the glyph item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_iter_init_start" pango_glyph_item_iter_init_start :: - Ptr GlyphItemIter -> -- iter : TInterface (Name {namespace = "Pango", name = "GlyphItemIter"})- Ptr Pango.GlyphItem.GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- CString -> -- text : TBasicType TUTF8- IO CInt--{- |-Initializes a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' structure to point to the-first cluster in a glyph item.-See 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' for details of cluster orders.--/Since: 1.22/--}-glyphItemIterInitStart ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItemIter- {- ^ /@iter@/: a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' -}- -> Pango.GlyphItem.GlyphItem- {- ^ /@glyphItem@/: the glyph item to iterate over -}- -> T.Text- {- ^ /@text@/: text corresponding to the glyph item -}- -> m Bool- {- ^ __Returns:__ 'False' if there are no clusters in the glyph item -}-glyphItemIterInitStart iter glyphItem text = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- text' <- textToCString text- result <- pango_glyph_item_iter_init_start iter' glyphItem' text'- let result' = (/= 0) result- touchManagedPtr iter- touchManagedPtr glyphItem- freeMem text'- return result'--#if ENABLE_OVERLOADING-data GlyphItemIterInitStartMethodInfo-instance (signature ~ (Pango.GlyphItem.GlyphItem -> T.Text -> m Bool), MonadIO m) => O.MethodInfo GlyphItemIterInitStartMethodInfo GlyphItemIter signature where- overloadedMethod _ = glyphItemIterInitStart--#endif---- method GlyphItemIter::next_cluster--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "GlyphItemIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItemIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_iter_next_cluster" pango_glyph_item_iter_next_cluster :: - Ptr GlyphItemIter -> -- iter : TInterface (Name {namespace = "Pango", name = "GlyphItemIter"})- IO CInt--{- |-Advances the iterator to the next cluster in the glyph item.-See 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' for details of cluster orders.--/Since: 1.22/--}-glyphItemIterNextCluster ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItemIter- {- ^ /@iter@/: a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' -}- -> m Bool- {- ^ __Returns:__ 'True' if the iterator was advanced, 'False' if we were already on the- last cluster. -}-glyphItemIterNextCluster iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_glyph_item_iter_next_cluster iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data GlyphItemIterNextClusterMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo GlyphItemIterNextClusterMethodInfo GlyphItemIter signature where- overloadedMethod _ = glyphItemIterNextCluster--#endif---- method GlyphItemIter::prev_cluster--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "GlyphItemIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphItemIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_item_iter_prev_cluster" pango_glyph_item_iter_prev_cluster :: - Ptr GlyphItemIter -> -- iter : TInterface (Name {namespace = "Pango", name = "GlyphItemIter"})- IO CInt--{- |-Moves the iterator to the preceding cluster in the glyph item.-See 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' for details of cluster orders.--/Since: 1.22/--}-glyphItemIterPrevCluster ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphItemIter- {- ^ /@iter@/: a 'GI.Pango.Structs.GlyphItemIter.GlyphItemIter' -}- -> m Bool- {- ^ __Returns:__ 'True' if the iterator was moved, 'False' if we were already on the- first cluster. -}-glyphItemIterPrevCluster iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_glyph_item_iter_prev_cluster iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data GlyphItemIterPrevClusterMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo GlyphItemIterPrevClusterMethodInfo GlyphItemIter signature where- overloadedMethod _ = glyphItemIterPrevCluster--#endif--#if ENABLE_OVERLOADING-type family ResolveGlyphItemIterMethod (t :: Symbol) (o :: *) :: * where- ResolveGlyphItemIterMethod "copy" o = GlyphItemIterCopyMethodInfo- ResolveGlyphItemIterMethod "free" o = GlyphItemIterFreeMethodInfo- ResolveGlyphItemIterMethod "initEnd" o = GlyphItemIterInitEndMethodInfo- ResolveGlyphItemIterMethod "initStart" o = GlyphItemIterInitStartMethodInfo- ResolveGlyphItemIterMethod "nextCluster" o = GlyphItemIterNextClusterMethodInfo- ResolveGlyphItemIterMethod "prevCluster" o = GlyphItemIterPrevClusterMethodInfo- ResolveGlyphItemIterMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveGlyphItemIterMethod t GlyphItemIter, O.MethodInfo info GlyphItemIter p) => OL.IsLabel t (GlyphItemIter -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/GlyphItemIter.hs-boot
@@ -1,44 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.GlyphItemIter where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype GlyphItemIter = GlyphItemIter (ManagedPtr GlyphItemIter)-instance BoxedObject GlyphItemIter where-#if ENABLE_OVERLOADING-data GlyphItemIterCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemIterFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemIterInitEndMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemIterInitStartMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemIterNextClusterMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphItemIterPrevClusterMethodInfo-#endif
− GI/Pango/Structs/GlyphString.hs
@@ -1,753 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.GlyphString.GlyphString' structure is used to store strings-of glyphs with geometry and visual attribute information.-The storage for the glyph information is owned-by the structure which simplifies memory management.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.GlyphString- ( ---- * Exported types- GlyphString(..) ,- newZeroGlyphString ,- noGlyphString ,--- -- * Methods--- ** copy #method:copy#--#if ENABLE_OVERLOADING- GlyphStringCopyMethodInfo ,-#endif- glyphStringCopy ,----- ** extents #method:extents#--#if ENABLE_OVERLOADING- GlyphStringExtentsMethodInfo ,-#endif- glyphStringExtents ,----- ** extentsRange #method:extentsRange#--#if ENABLE_OVERLOADING- GlyphStringExtentsRangeMethodInfo ,-#endif- glyphStringExtentsRange ,----- ** free #method:free#--#if ENABLE_OVERLOADING- GlyphStringFreeMethodInfo ,-#endif- glyphStringFree ,----- ** getLogicalWidths #method:getLogicalWidths#--#if ENABLE_OVERLOADING- GlyphStringGetLogicalWidthsMethodInfo ,-#endif- glyphStringGetLogicalWidths ,----- ** getWidth #method:getWidth#--#if ENABLE_OVERLOADING- GlyphStringGetWidthMethodInfo ,-#endif- glyphStringGetWidth ,----- ** indexToX #method:indexToX#--#if ENABLE_OVERLOADING- GlyphStringIndexToXMethodInfo ,-#endif- glyphStringIndexToX ,----- ** new #method:new#-- glyphStringNew ,----- ** setSize #method:setSize#--#if ENABLE_OVERLOADING- GlyphStringSetSizeMethodInfo ,-#endif- glyphStringSetSize ,----- ** xToIndex #method:xToIndex#--#if ENABLE_OVERLOADING- GlyphStringXToIndexMethodInfo ,-#endif- glyphStringXToIndex ,----- -- * Properties--- ** logClusters #attr:logClusters#-{- | logical cluster info, indexed by the byte index- within the text corresponding to the glyph string.--}- getGlyphStringLogClusters ,-#if ENABLE_OVERLOADING- glyphString_logClusters ,-#endif- setGlyphStringLogClusters ,----- ** numGlyphs #attr:numGlyphs#-{- | number of the glyphs in this glyph string.--}- getGlyphStringNumGlyphs ,-#if ENABLE_OVERLOADING- glyphString_numGlyphs ,-#endif- setGlyphStringNumGlyphs ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font-import {-# SOURCE #-} qualified GI.Pango.Structs.Analysis as Pango.Analysis-import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle---- | Memory-managed wrapper type.-newtype GlyphString = GlyphString (ManagedPtr GlyphString)-foreign import ccall "pango_glyph_string_get_type" c_pango_glyph_string_get_type :: - IO GType--instance BoxedObject GlyphString where- boxedType _ = c_pango_glyph_string_get_type---- | Construct a `GlyphString` struct initialized to zero.-newZeroGlyphString :: MonadIO m => m GlyphString-newZeroGlyphString = liftIO $ callocBoxedBytes 32 >>= wrapBoxed GlyphString--instance tag ~ 'AttrSet => Constructible GlyphString tag where- new _ attrs = do- o <- newZeroGlyphString- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `GlyphString`.-noGlyphString :: Maybe GlyphString-noGlyphString = Nothing--{- |-Get the value of the “@num_glyphs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphString #numGlyphs-@--}-getGlyphStringNumGlyphs :: MonadIO m => GlyphString -> m Int32-getGlyphStringNumGlyphs s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Int32- return val--{- |-Set the value of the “@num_glyphs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphString [ #numGlyphs 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphStringNumGlyphs :: MonadIO m => GlyphString -> Int32 -> m ()-setGlyphStringNumGlyphs s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphStringNumGlyphsFieldInfo-instance AttrInfo GlyphStringNumGlyphsFieldInfo where- type AttrAllowedOps GlyphStringNumGlyphsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphStringNumGlyphsFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphStringNumGlyphsFieldInfo = (~) GlyphString- type AttrGetType GlyphStringNumGlyphsFieldInfo = Int32- type AttrLabel GlyphStringNumGlyphsFieldInfo = "num_glyphs"- type AttrOrigin GlyphStringNumGlyphsFieldInfo = GlyphString- attrGet _ = getGlyphStringNumGlyphs- attrSet _ = setGlyphStringNumGlyphs- attrConstruct = undefined- attrClear _ = undefined--glyphString_numGlyphs :: AttrLabelProxy "numGlyphs"-glyphString_numGlyphs = AttrLabelProxy--#endif----- XXX Skipped attribute for "GlyphString:glyphs" :: Not implemented: "Don't know how to unpack C array of type TCArray False (-1) 0 (TInterface (Name {namespace = \"Pango\", name = \"GlyphInfo\"}))"-{- |-Get the value of the “@log_clusters@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphString #logClusters-@--}-getGlyphStringLogClusters :: MonadIO m => GlyphString -> m Int32-getGlyphStringLogClusters s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Int32- return val--{- |-Set the value of the “@log_clusters@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphString [ #logClusters 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphStringLogClusters :: MonadIO m => GlyphString -> Int32 -> m ()-setGlyphStringLogClusters s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Int32)--#if ENABLE_OVERLOADING-data GlyphStringLogClustersFieldInfo-instance AttrInfo GlyphStringLogClustersFieldInfo where- type AttrAllowedOps GlyphStringLogClustersFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphStringLogClustersFieldInfo = (~) Int32- type AttrBaseTypeConstraint GlyphStringLogClustersFieldInfo = (~) GlyphString- type AttrGetType GlyphStringLogClustersFieldInfo = Int32- type AttrLabel GlyphStringLogClustersFieldInfo = "log_clusters"- type AttrOrigin GlyphStringLogClustersFieldInfo = GlyphString- attrGet _ = getGlyphStringLogClusters- attrSet _ = setGlyphStringLogClusters- attrConstruct = undefined- attrClear _ = undefined--glyphString_logClusters :: AttrLabelProxy "logClusters"-glyphString_logClusters = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList GlyphString-type instance O.AttributeList GlyphString = GlyphStringAttributeList-type GlyphStringAttributeList = ('[ '("numGlyphs", GlyphStringNumGlyphsFieldInfo), '("logClusters", GlyphStringLogClustersFieldInfo)] :: [(Symbol, *)])-#endif---- method GlyphString::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GlyphString"}))--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_new" pango_glyph_string_new :: - IO (Ptr GlyphString)--{- |-Create a new 'GI.Pango.Structs.GlyphString.GlyphString'.--}-glyphStringNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m GlyphString- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.GlyphString.GlyphString', which- should be freed with 'GI.Pango.Structs.GlyphString.glyphStringFree'. -}-glyphStringNew = liftIO $ do- result <- pango_glyph_string_new- checkUnexpectedReturnNULL "glyphStringNew" result- result' <- (wrapBoxed GlyphString) result- return result'--#if ENABLE_OVERLOADING-#endif---- method GlyphString::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "string", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GlyphString"}))--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_copy" pango_glyph_string_copy :: - Ptr GlyphString -> -- string : TInterface (Name {namespace = "Pango", name = "GlyphString"})- IO (Ptr GlyphString)--{- |-Copy a glyph string and associated storage.--}-glyphStringCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphString- {- ^ /@string@/: a 'GI.Pango.Structs.GlyphString.GlyphString', may be 'Nothing' -}- -> m (Maybe GlyphString)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.GlyphString.GlyphString',- which should be freed with 'GI.Pango.Structs.GlyphString.glyphStringFree',- or 'Nothing' if /@string@/ was 'Nothing'. -}-glyphStringCopy string = liftIO $ do- string' <- unsafeManagedPtrGetPtr string- result <- pango_glyph_string_copy string'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed GlyphString) result'- return result''- touchManagedPtr string- return maybeResult--#if ENABLE_OVERLOADING-data GlyphStringCopyMethodInfo-instance (signature ~ (m (Maybe GlyphString)), MonadIO m) => O.MethodInfo GlyphStringCopyMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringCopy--#endif---- method GlyphString::extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the extents of the glyph string\n as drawn or %NULL to indicate that the result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the logical extents of the\n glyph string or %NULL to indicate that the result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_extents" pango_glyph_string_extents :: - Ptr GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- Ptr Pango.Font.Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Compute the logical and ink extents of a glyph string. See the documentation-for 'GI.Pango.Objects.Font.fontGetGlyphExtents' for details about the interpretation-of the rectangles.--}-glyphStringExtents ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Font.IsFont a) =>- GlyphString- {- ^ /@glyphs@/: a 'GI.Pango.Structs.GlyphString.GlyphString' -}- -> a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-glyphStringExtents glyphs font = liftIO $ do- glyphs' <- unsafeManagedPtrGetPtr glyphs- font' <- unsafeManagedPtrCastPtr font- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_glyph_string_extents glyphs' font' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr glyphs- touchManagedPtr font- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data GlyphStringExtentsMethodInfo-instance (signature ~ (a -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m, Pango.Font.IsFont a) => O.MethodInfo GlyphStringExtentsMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringExtents--#endif---- method GlyphString::extents_range--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "start index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "end index (the range is the set of bytes with\n\t indices such that start <= index < end)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "font", argType = TInterface (Name {namespace = "Pango", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to\n store the extents of the glyph string range as drawn or\n %NULL to indicate that the result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to\n store the logical extents of the glyph string range or\n %NULL to indicate that the result is not needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_extents_range" pango_glyph_string_extents_range :: - Ptr GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- Int32 -> -- start : TBasicType TInt- Int32 -> -- end : TBasicType TInt- Ptr Pango.Font.Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Computes the extents of a sub-portion of a glyph string. The extents are-relative to the start of the glyph string range (the origin of their-coordinate system is at the start of the range, not at the start of the entire-glyph string).--}-glyphStringExtentsRange ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Font.IsFont a) =>- GlyphString- {- ^ /@glyphs@/: a 'GI.Pango.Structs.GlyphString.GlyphString' -}- -> Int32- {- ^ /@start@/: start index -}- -> Int32- {- ^ /@end@/: end index (the range is the set of bytes with- indices such that start \<= index \< end) -}- -> a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-glyphStringExtentsRange glyphs start end font = liftIO $ do- glyphs' <- unsafeManagedPtrGetPtr glyphs- font' <- unsafeManagedPtrCastPtr font- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_glyph_string_extents_range glyphs' start end font' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr glyphs- touchManagedPtr font- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data GlyphStringExtentsRangeMethodInfo-instance (signature ~ (Int32 -> Int32 -> a -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m, Pango.Font.IsFont a) => O.MethodInfo GlyphStringExtentsRangeMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringExtentsRange--#endif---- method GlyphString::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "string", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_free" pango_glyph_string_free :: - Ptr GlyphString -> -- string : TInterface (Name {namespace = "Pango", name = "GlyphString"})- IO ()--{- |-Free a glyph string and associated storage.--}-glyphStringFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphString- {- ^ /@string@/: a 'GI.Pango.Structs.GlyphString.GlyphString', may be 'Nothing' -}- -> m ()-glyphStringFree string = liftIO $ do- string' <- unsafeManagedPtrGetPtr string- pango_glyph_string_free string'- touchManagedPtr string- return ()--#if ENABLE_OVERLOADING-data GlyphStringFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo GlyphStringFreeMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringFree--#endif---- method GlyphString::get_logical_widths--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text corresponding to the glyphs", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length of @text, in bytes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "embedding_level", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the embedding level of the string", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "logical_widths", argType = TCArray False (-1) (-1) (TBasicType TInt), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an array whose length is the number of\n characters in text (equal to g_utf8_strlen (text,\n length) unless text has NUL bytes) to be filled in\n with the resulting character widths.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_get_logical_widths" pango_glyph_string_get_logical_widths :: - Ptr GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Int32 -> -- embedding_level : TBasicType TInt- Ptr Int32 -> -- logical_widths : TCArray False (-1) (-1) (TBasicType TInt)- IO ()--{- |-Given a 'GI.Pango.Structs.GlyphString.GlyphString' resulting from 'GI.Pango.Functions.shape' and the corresponding-text, determine the screen width corresponding to each character. When-multiple characters compose a single cluster, the width of the entire-cluster is divided equally among the characters.--See also 'GI.Pango.Structs.GlyphItem.glyphItemGetLogicalWidths'.--}-glyphStringGetLogicalWidths ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphString- {- ^ /@glyphs@/: a 'GI.Pango.Structs.GlyphString.GlyphString' -}- -> T.Text- {- ^ /@text@/: the text corresponding to the glyphs -}- -> Int32- {- ^ /@length@/: the length of /@text@/, in bytes -}- -> Int32- {- ^ /@embeddingLevel@/: the embedding level of the string -}- -> [Int32]- {- ^ /@logicalWidths@/: an array whose length is the number of- characters in text (equal to g_utf8_strlen (text,- length) unless text has NUL bytes) to be filled in- with the resulting character widths. -}- -> m ()-glyphStringGetLogicalWidths glyphs text length_ embeddingLevel logicalWidths = liftIO $ do- glyphs' <- unsafeManagedPtrGetPtr glyphs- text' <- textToCString text- logicalWidths' <- packStorableArray logicalWidths- pango_glyph_string_get_logical_widths glyphs' text' length_ embeddingLevel logicalWidths'- touchManagedPtr glyphs- freeMem text'- freeMem logicalWidths'- return ()--#if ENABLE_OVERLOADING-data GlyphStringGetLogicalWidthsMethodInfo-instance (signature ~ (T.Text -> Int32 -> Int32 -> [Int32] -> m ()), MonadIO m) => O.MethodInfo GlyphStringGetLogicalWidthsMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringGetLogicalWidths--#endif---- method GlyphString::get_width--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_get_width" pango_glyph_string_get_width :: - Ptr GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- IO Int32--{- |-Computes the logical width of the glyph string as can also be computed-using 'GI.Pango.Structs.GlyphString.glyphStringExtents'. However, since this only computes the-width, it\'s much faster. This is in fact only a convenience function that-computes the sum of geometry.width for each glyph in the /@glyphs@/.--/Since: 1.14/--}-glyphStringGetWidth ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphString- {- ^ /@glyphs@/: a 'GI.Pango.Structs.GlyphString.GlyphString' -}- -> m Int32- {- ^ __Returns:__ the logical width of the glyph string. -}-glyphStringGetWidth glyphs = liftIO $ do- glyphs' <- unsafeManagedPtrGetPtr glyphs- result <- pango_glyph_string_get_width glyphs'- touchManagedPtr glyphs- return result--#if ENABLE_OVERLOADING-data GlyphStringGetWidthMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo GlyphStringGetWidthMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringGetWidth--#endif---- method GlyphString::index_to_x--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the glyphs return from pango_shape()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text for the run", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of bytes (not characters) in @text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "analysis", argType = TInterface (Name {namespace = "Pango", name = "Analysis"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the analysis information return from pango_itemize()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the byte index within @text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "trailing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether we should compute the result for the beginning (%FALSE)\n or end (%TRUE) of the character.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x_pos", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_index_to_x" pango_glyph_string_index_to_x :: - Ptr GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Ptr Pango.Analysis.Analysis -> -- analysis : TInterface (Name {namespace = "Pango", name = "Analysis"})- Int32 -> -- index_ : TBasicType TInt- CInt -> -- trailing : TBasicType TBoolean- Ptr Int32 -> -- x_pos : TBasicType TInt- IO ()--{- |-Converts from character position to x position. (X position-is measured from the left edge of the run). Character positions-are computed by dividing up each cluster into equal portions.--}-glyphStringIndexToX ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphString- {- ^ /@glyphs@/: the glyphs return from 'GI.Pango.Functions.shape' -}- -> T.Text- {- ^ /@text@/: the text for the run -}- -> Int32- {- ^ /@length@/: the number of bytes (not characters) in /@text@/. -}- -> Pango.Analysis.Analysis- {- ^ /@analysis@/: the analysis information return from 'GI.Pango.Functions.itemize' -}- -> Int32- {- ^ /@index_@/: the byte index within /@text@/ -}- -> Bool- {- ^ /@trailing@/: whether we should compute the result for the beginning ('False')- or end ('True') of the character. -}- -> m (Int32)-glyphStringIndexToX glyphs text length_ analysis index_ trailing = liftIO $ do- glyphs' <- unsafeManagedPtrGetPtr glyphs- text' <- textToCString text- analysis' <- unsafeManagedPtrGetPtr analysis- let trailing' = (fromIntegral . fromEnum) trailing- xPos <- allocMem :: IO (Ptr Int32)- pango_glyph_string_index_to_x glyphs' text' length_ analysis' index_ trailing' xPos- xPos' <- peek xPos- touchManagedPtr glyphs- touchManagedPtr analysis- freeMem text'- freeMem xPos- return xPos'--#if ENABLE_OVERLOADING-data GlyphStringIndexToXMethodInfo-instance (signature ~ (T.Text -> Int32 -> Pango.Analysis.Analysis -> Int32 -> Bool -> m (Int32)), MonadIO m) => O.MethodInfo GlyphStringIndexToXMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringIndexToX--#endif---- method GlyphString::set_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "string", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoGlyphString.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_len", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new length of the string.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_set_size" pango_glyph_string_set_size :: - Ptr GlyphString -> -- string : TInterface (Name {namespace = "Pango", name = "GlyphString"})- Int32 -> -- new_len : TBasicType TInt- IO ()--{- |-Resize a glyph string to the given length.--}-glyphStringSetSize ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphString- {- ^ /@string@/: a 'GI.Pango.Structs.GlyphString.GlyphString'. -}- -> Int32- {- ^ /@newLen@/: the new length of the string. -}- -> m ()-glyphStringSetSize string newLen = liftIO $ do- string' <- unsafeManagedPtrGetPtr string- pango_glyph_string_set_size string' newLen- touchManagedPtr string- return ()--#if ENABLE_OVERLOADING-data GlyphStringSetSizeMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo GlyphStringSetSizeMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringSetSize--#endif---- method GlyphString::x_to_index--- method type : OrdinaryMethod--- Args : [Arg {argCName = "glyphs", argType = TInterface (Name {namespace = "Pango", name = "GlyphString"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the glyphs returned from pango_shape()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the text for the run", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of bytes (not characters) in text.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "analysis", argType = TInterface (Name {namespace = "Pango", name = "Analysis"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the analysis information return from pango_itemize()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x_pos", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the x offset (in Pango units)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store calculated byte index within @text", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "trailing", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store a boolean indicating\n whether the user clicked on the leading or trailing\n edge of the character.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_glyph_string_x_to_index" pango_glyph_string_x_to_index :: - Ptr GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- CString -> -- text : TBasicType TUTF8- Int32 -> -- length : TBasicType TInt- Ptr Pango.Analysis.Analysis -> -- analysis : TInterface (Name {namespace = "Pango", name = "Analysis"})- Int32 -> -- x_pos : TBasicType TInt- Ptr Int32 -> -- index_ : TBasicType TInt- Ptr Int32 -> -- trailing : TBasicType TInt- IO ()--{- |-Convert from x offset to character position. Character positions-are computed by dividing up each cluster into equal portions.-In scripts where positioning within a cluster is not allowed-(such as Thai), the returned value may not be a valid cursor-position; the caller must combine the result with the logical-attributes for the text to compute the valid cursor position.--}-glyphStringXToIndex ::- (B.CallStack.HasCallStack, MonadIO m) =>- GlyphString- {- ^ /@glyphs@/: the glyphs returned from 'GI.Pango.Functions.shape' -}- -> T.Text- {- ^ /@text@/: the text for the run -}- -> Int32- {- ^ /@length@/: the number of bytes (not characters) in text. -}- -> Pango.Analysis.Analysis- {- ^ /@analysis@/: the analysis information return from 'GI.Pango.Functions.itemize' -}- -> Int32- {- ^ /@xPos@/: the x offset (in Pango units) -}- -> m ((Int32, Int32))-glyphStringXToIndex glyphs text length_ analysis xPos = liftIO $ do- glyphs' <- unsafeManagedPtrGetPtr glyphs- text' <- textToCString text- analysis' <- unsafeManagedPtrGetPtr analysis- index_ <- allocMem :: IO (Ptr Int32)- trailing <- allocMem :: IO (Ptr Int32)- pango_glyph_string_x_to_index glyphs' text' length_ analysis' xPos index_ trailing- index_' <- peek index_- trailing' <- peek trailing- touchManagedPtr glyphs- touchManagedPtr analysis- freeMem text'- freeMem index_- freeMem trailing- return (index_', trailing')--#if ENABLE_OVERLOADING-data GlyphStringXToIndexMethodInfo-instance (signature ~ (T.Text -> Int32 -> Pango.Analysis.Analysis -> Int32 -> m ((Int32, Int32))), MonadIO m) => O.MethodInfo GlyphStringXToIndexMethodInfo GlyphString signature where- overloadedMethod _ = glyphStringXToIndex--#endif--#if ENABLE_OVERLOADING-type family ResolveGlyphStringMethod (t :: Symbol) (o :: *) :: * where- ResolveGlyphStringMethod "copy" o = GlyphStringCopyMethodInfo- ResolveGlyphStringMethod "extents" o = GlyphStringExtentsMethodInfo- ResolveGlyphStringMethod "extentsRange" o = GlyphStringExtentsRangeMethodInfo- ResolveGlyphStringMethod "free" o = GlyphStringFreeMethodInfo- ResolveGlyphStringMethod "indexToX" o = GlyphStringIndexToXMethodInfo- ResolveGlyphStringMethod "xToIndex" o = GlyphStringXToIndexMethodInfo- ResolveGlyphStringMethod "getLogicalWidths" o = GlyphStringGetLogicalWidthsMethodInfo- ResolveGlyphStringMethod "getWidth" o = GlyphStringGetWidthMethodInfo- ResolveGlyphStringMethod "setSize" o = GlyphStringSetSizeMethodInfo- ResolveGlyphStringMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveGlyphStringMethod t GlyphString, O.MethodInfo info GlyphString p) => OL.IsLabel t (GlyphString -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/GlyphString.hs-boot
@@ -1,53 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.GlyphString where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype GlyphString = GlyphString (ManagedPtr GlyphString)-instance BoxedObject GlyphString where-#if ENABLE_OVERLOADING-data GlyphStringCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringExtentsRangeMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringGetLogicalWidthsMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringGetWidthMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringIndexToXMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringSetSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data GlyphStringXToIndexMethodInfo-#endif
− GI/Pango/Structs/GlyphVisAttr.hs
@@ -1,152 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The PangoGlyphVisAttr is used to communicate information between-the shaping phase and the rendering phase. More attributes may be-added in the future.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.GlyphVisAttr- ( ---- * Exported types- GlyphVisAttr(..) ,- newZeroGlyphVisAttr ,- noGlyphVisAttr ,--- -- * Properties--- ** isClusterStart #attr:isClusterStart#-{- | set for the first logical glyph in each cluster. (Clusters-are stored in visual order, within the cluster, glyphs-are always ordered in logical order, since visual-order is meaningless; that is, in Arabic text, accent glyphs-follow the glyphs for the base character.)--}- getGlyphVisAttrIsClusterStart ,-#if ENABLE_OVERLOADING- glyphVisAttr_isClusterStart ,-#endif- setGlyphVisAttrIsClusterStart ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype GlyphVisAttr = GlyphVisAttr (ManagedPtr GlyphVisAttr)-instance WrappedPtr GlyphVisAttr where- wrappedPtrCalloc = callocBytes 4- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 4 >=> wrapPtr GlyphVisAttr)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `GlyphVisAttr` struct initialized to zero.-newZeroGlyphVisAttr :: MonadIO m => m GlyphVisAttr-newZeroGlyphVisAttr = liftIO $ wrappedPtrCalloc >>= wrapPtr GlyphVisAttr--instance tag ~ 'AttrSet => Constructible GlyphVisAttr tag where- new _ attrs = do- o <- newZeroGlyphVisAttr- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `GlyphVisAttr`.-noGlyphVisAttr :: Maybe GlyphVisAttr-noGlyphVisAttr = Nothing--{- |-Get the value of the “@is_cluster_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' glyphVisAttr #isClusterStart-@--}-getGlyphVisAttrIsClusterStart :: MonadIO m => GlyphVisAttr -> m Word32-getGlyphVisAttrIsClusterStart s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word32- return val--{- |-Set the value of the “@is_cluster_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' glyphVisAttr [ #isClusterStart 'Data.GI.Base.Attributes.:=' value ]-@--}-setGlyphVisAttrIsClusterStart :: MonadIO m => GlyphVisAttr -> Word32 -> m ()-setGlyphVisAttrIsClusterStart s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word32)--#if ENABLE_OVERLOADING-data GlyphVisAttrIsClusterStartFieldInfo-instance AttrInfo GlyphVisAttrIsClusterStartFieldInfo where- type AttrAllowedOps GlyphVisAttrIsClusterStartFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint GlyphVisAttrIsClusterStartFieldInfo = (~) Word32- type AttrBaseTypeConstraint GlyphVisAttrIsClusterStartFieldInfo = (~) GlyphVisAttr- type AttrGetType GlyphVisAttrIsClusterStartFieldInfo = Word32- type AttrLabel GlyphVisAttrIsClusterStartFieldInfo = "is_cluster_start"- type AttrOrigin GlyphVisAttrIsClusterStartFieldInfo = GlyphVisAttr- attrGet _ = getGlyphVisAttrIsClusterStart- attrSet _ = setGlyphVisAttrIsClusterStart- attrConstruct = undefined- attrClear _ = undefined--glyphVisAttr_isClusterStart :: AttrLabelProxy "isClusterStart"-glyphVisAttr_isClusterStart = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList GlyphVisAttr-type instance O.AttributeList GlyphVisAttr = GlyphVisAttrAttributeList-type GlyphVisAttrAttributeList = ('[ '("isClusterStart", GlyphVisAttrIsClusterStartFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveGlyphVisAttrMethod (t :: Symbol) (o :: *) :: * where- ResolveGlyphVisAttrMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveGlyphVisAttrMethod t GlyphVisAttr, O.MethodInfo info GlyphVisAttr p) => OL.IsLabel t (GlyphVisAttr -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/GlyphVisAttr.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.GlyphVisAttr where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype GlyphVisAttr = GlyphVisAttr (ManagedPtr GlyphVisAttr)-instance WrappedPtr GlyphVisAttr where
− GI/Pango/Structs/IncludedModule.hs
@@ -1,307 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.IncludedModule.IncludedModule' structure for a statically linked module-contains the functions that would otherwise be loaded from a dynamically-loaded module.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.IncludedModule- ( ---- * Exported types- IncludedModule(..) ,- newZeroIncludedModule ,- noIncludedModule ,--- -- * Properties--- ** exit #attr:exit#-{- | /No description available in the introspection data./--}- clearIncludedModuleExit ,- getIncludedModuleExit ,-#if ENABLE_OVERLOADING- includedModule_exit ,-#endif- setIncludedModuleExit ,----- ** init #attr:init#-{- | /No description available in the introspection data./--}- clearIncludedModuleInit ,- getIncludedModuleInit ,-#if ENABLE_OVERLOADING- includedModule_init ,-#endif- setIncludedModuleInit ,----- ** list #attr:list#-{- | /No description available in the introspection data./--}- clearIncludedModuleList ,- getIncludedModuleList ,-#if ENABLE_OVERLOADING- includedModule_list ,-#endif- setIncludedModuleList ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import qualified GI.Pango.Callbacks as Pango.Callbacks---- | Memory-managed wrapper type.-newtype IncludedModule = IncludedModule (ManagedPtr IncludedModule)-instance WrappedPtr IncludedModule where- wrappedPtrCalloc = callocBytes 32- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 32 >=> wrapPtr IncludedModule)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `IncludedModule` struct initialized to zero.-newZeroIncludedModule :: MonadIO m => m IncludedModule-newZeroIncludedModule = liftIO $ wrappedPtrCalloc >>= wrapPtr IncludedModule--instance tag ~ 'AttrSet => Constructible IncludedModule tag where- new _ attrs = do- o <- newZeroIncludedModule- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `IncludedModule`.-noIncludedModule :: Maybe IncludedModule-noIncludedModule = Nothing--{- |-Get the value of the “@list@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' includedModule #list-@--}-getIncludedModuleList :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleListFieldCallback)-getIncludedModuleList s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)- result <- SP.convertFunPtrIfNonNull val $ \val' -> do- let val'' = Pango.Callbacks.dynamic_IncludedModuleListFieldCallback val'- return val''- return result--{- |-Set the value of the “@list@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' includedModule [ #list 'Data.GI.Base.Attributes.:=' value ]-@--}-setIncludedModuleList :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback -> m ()-setIncludedModuleList s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)--{- |-Set the value of the “@list@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #list-@--}-clearIncludedModuleList :: MonadIO m => IncludedModule -> m ()-clearIncludedModuleList s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)--#if ENABLE_OVERLOADING-data IncludedModuleListFieldInfo-instance AttrInfo IncludedModuleListFieldInfo where- type AttrAllowedOps IncludedModuleListFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint IncludedModuleListFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleListFieldCallback)- type AttrBaseTypeConstraint IncludedModuleListFieldInfo = (~) IncludedModule- type AttrGetType IncludedModuleListFieldInfo = Maybe Pango.Callbacks.IncludedModuleListFieldCallback- type AttrLabel IncludedModuleListFieldInfo = "list"- type AttrOrigin IncludedModuleListFieldInfo = IncludedModule- attrGet _ = getIncludedModuleList- attrSet _ = setIncludedModuleList- attrConstruct = undefined- attrClear _ = clearIncludedModuleList--includedModule_list :: AttrLabelProxy "list"-includedModule_list = AttrLabelProxy--#endif---{- |-Get the value of the “@init@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' includedModule #init-@--}-getIncludedModuleInit :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleInitFieldCallback)-getIncludedModuleInit s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)- result <- SP.convertFunPtrIfNonNull val $ \val' -> do- let val'' = Pango.Callbacks.dynamic_IncludedModuleInitFieldCallback val'- return val''- return result--{- |-Set the value of the “@init@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' includedModule [ #init 'Data.GI.Base.Attributes.:=' value ]-@--}-setIncludedModuleInit :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback -> m ()-setIncludedModuleInit s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)--{- |-Set the value of the “@init@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #init-@--}-clearIncludedModuleInit :: MonadIO m => IncludedModule -> m ()-clearIncludedModuleInit s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)--#if ENABLE_OVERLOADING-data IncludedModuleInitFieldInfo-instance AttrInfo IncludedModuleInitFieldInfo where- type AttrAllowedOps IncludedModuleInitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint IncludedModuleInitFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleInitFieldCallback)- type AttrBaseTypeConstraint IncludedModuleInitFieldInfo = (~) IncludedModule- type AttrGetType IncludedModuleInitFieldInfo = Maybe Pango.Callbacks.IncludedModuleInitFieldCallback- type AttrLabel IncludedModuleInitFieldInfo = "init"- type AttrOrigin IncludedModuleInitFieldInfo = IncludedModule- attrGet _ = getIncludedModuleInit- attrSet _ = setIncludedModuleInit- attrConstruct = undefined- attrClear _ = clearIncludedModuleInit--includedModule_init :: AttrLabelProxy "init"-includedModule_init = AttrLabelProxy--#endif---{- |-Get the value of the “@exit@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' includedModule #exit-@--}-getIncludedModuleExit :: MonadIO m => IncludedModule -> m (Maybe Pango.Callbacks.IncludedModuleExitFieldCallback)-getIncludedModuleExit s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)- result <- SP.convertFunPtrIfNonNull val $ \val' -> do- let val'' = Pango.Callbacks.dynamic_IncludedModuleExitFieldCallback val'- return val''- return result--{- |-Set the value of the “@exit@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' includedModule [ #exit 'Data.GI.Base.Attributes.:=' value ]-@--}-setIncludedModuleExit :: MonadIO m => IncludedModule -> FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback -> m ()-setIncludedModuleExit s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)--{- |-Set the value of the “@exit@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #exit-@--}-clearIncludedModuleExit :: MonadIO m => IncludedModule -> m ()-clearIncludedModuleExit s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullFunPtr :: FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)--#if ENABLE_OVERLOADING-data IncludedModuleExitFieldInfo-instance AttrInfo IncludedModuleExitFieldInfo where- type AttrAllowedOps IncludedModuleExitFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint IncludedModuleExitFieldInfo = (~) (FunPtr Pango.Callbacks.C_IncludedModuleExitFieldCallback)- type AttrBaseTypeConstraint IncludedModuleExitFieldInfo = (~) IncludedModule- type AttrGetType IncludedModuleExitFieldInfo = Maybe Pango.Callbacks.IncludedModuleExitFieldCallback- type AttrLabel IncludedModuleExitFieldInfo = "exit"- type AttrOrigin IncludedModuleExitFieldInfo = IncludedModule- attrGet _ = getIncludedModuleExit- attrSet _ = setIncludedModuleExit- attrConstruct = undefined- attrClear _ = clearIncludedModuleExit--includedModule_exit :: AttrLabelProxy "exit"-includedModule_exit = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList IncludedModule-type instance O.AttributeList IncludedModule = IncludedModuleAttributeList-type IncludedModuleAttributeList = ('[ '("list", IncludedModuleListFieldInfo), '("init", IncludedModuleInitFieldInfo), '("exit", IncludedModuleExitFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveIncludedModuleMethod (t :: Symbol) (o :: *) :: * where- ResolveIncludedModuleMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveIncludedModuleMethod t IncludedModule, O.MethodInfo info IncludedModule p) => OL.IsLabel t (IncludedModule -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/IncludedModule.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.IncludedModule where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype IncludedModule = IncludedModule (ManagedPtr IncludedModule)-instance WrappedPtr IncludedModule where
− GI/Pango/Structs/Item.hs
@@ -1,488 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.Item.Item' structure stores information about a segment of text.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Item- ( ---- * Exported types- Item(..) ,- newZeroItem ,- noItem ,--- -- * Methods--- ** copy #method:copy#--#if ENABLE_OVERLOADING- ItemCopyMethodInfo ,-#endif- itemCopy ,----- ** free #method:free#--#if ENABLE_OVERLOADING- ItemFreeMethodInfo ,-#endif- itemFree ,----- ** new #method:new#-- itemNew ,----- ** split #method:split#--#if ENABLE_OVERLOADING- ItemSplitMethodInfo ,-#endif- itemSplit ,----- -- * Properties--- ** analysis #attr:analysis#-{- | analysis results for the item.--}- getItemAnalysis ,-#if ENABLE_OVERLOADING- item_analysis ,-#endif----- ** length #attr:length#-{- | length of this item in bytes.--}- getItemLength ,-#if ENABLE_OVERLOADING- item_length ,-#endif- setItemLength ,----- ** numChars #attr:numChars#-{- | number of Unicode characters in the item.--}- getItemNumChars ,-#if ENABLE_OVERLOADING- item_numChars ,-#endif- setItemNumChars ,----- ** offset #attr:offset#-{- | byte offset of the start of this item in text.--}- getItemOffset ,-#if ENABLE_OVERLOADING- item_offset ,-#endif- setItemOffset ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Analysis as Pango.Analysis---- | Memory-managed wrapper type.-newtype Item = Item (ManagedPtr Item)-foreign import ccall "pango_item_get_type" c_pango_item_get_type :: - IO GType--instance BoxedObject Item where- boxedType _ = c_pango_item_get_type---- | Construct a `Item` struct initialized to zero.-newZeroItem :: MonadIO m => m Item-newZeroItem = liftIO $ callocBoxedBytes 64 >>= wrapBoxed Item--instance tag ~ 'AttrSet => Constructible Item tag where- new _ attrs = do- o <- newZeroItem- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `Item`.-noItem :: Maybe Item-noItem = Nothing--{- |-Get the value of the “@offset@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' item #offset-@--}-getItemOffset :: MonadIO m => Item -> m Int32-getItemOffset s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Int32- return val--{- |-Set the value of the “@offset@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' item [ #offset 'Data.GI.Base.Attributes.:=' value ]-@--}-setItemOffset :: MonadIO m => Item -> Int32 -> m ()-setItemOffset s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Int32)--#if ENABLE_OVERLOADING-data ItemOffsetFieldInfo-instance AttrInfo ItemOffsetFieldInfo where- type AttrAllowedOps ItemOffsetFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ItemOffsetFieldInfo = (~) Int32- type AttrBaseTypeConstraint ItemOffsetFieldInfo = (~) Item- type AttrGetType ItemOffsetFieldInfo = Int32- type AttrLabel ItemOffsetFieldInfo = "offset"- type AttrOrigin ItemOffsetFieldInfo = Item- attrGet _ = getItemOffset- attrSet _ = setItemOffset- attrConstruct = undefined- attrClear _ = undefined--item_offset :: AttrLabelProxy "offset"-item_offset = AttrLabelProxy--#endif---{- |-Get the value of the “@length@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' item #length-@--}-getItemLength :: MonadIO m => Item -> m Int32-getItemLength s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Int32- return val--{- |-Set the value of the “@length@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' item [ #length 'Data.GI.Base.Attributes.:=' value ]-@--}-setItemLength :: MonadIO m => Item -> Int32 -> m ()-setItemLength s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Int32)--#if ENABLE_OVERLOADING-data ItemLengthFieldInfo-instance AttrInfo ItemLengthFieldInfo where- type AttrAllowedOps ItemLengthFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ItemLengthFieldInfo = (~) Int32- type AttrBaseTypeConstraint ItemLengthFieldInfo = (~) Item- type AttrGetType ItemLengthFieldInfo = Int32- type AttrLabel ItemLengthFieldInfo = "length"- type AttrOrigin ItemLengthFieldInfo = Item- attrGet _ = getItemLength- attrSet _ = setItemLength- attrConstruct = undefined- attrClear _ = undefined--item_length :: AttrLabelProxy "length"-item_length = AttrLabelProxy--#endif---{- |-Get the value of the “@num_chars@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' item #numChars-@--}-getItemNumChars :: MonadIO m => Item -> m Int32-getItemNumChars s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Int32- return val--{- |-Set the value of the “@num_chars@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' item [ #numChars 'Data.GI.Base.Attributes.:=' value ]-@--}-setItemNumChars :: MonadIO m => Item -> Int32 -> m ()-setItemNumChars s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Int32)--#if ENABLE_OVERLOADING-data ItemNumCharsFieldInfo-instance AttrInfo ItemNumCharsFieldInfo where- type AttrAllowedOps ItemNumCharsFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint ItemNumCharsFieldInfo = (~) Int32- type AttrBaseTypeConstraint ItemNumCharsFieldInfo = (~) Item- type AttrGetType ItemNumCharsFieldInfo = Int32- type AttrLabel ItemNumCharsFieldInfo = "num_chars"- type AttrOrigin ItemNumCharsFieldInfo = Item- attrGet _ = getItemNumChars- attrSet _ = setItemNumChars- attrConstruct = undefined- attrClear _ = undefined--item_numChars :: AttrLabelProxy "numChars"-item_numChars = AttrLabelProxy--#endif---{- |-Get the value of the “@analysis@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' item #analysis-@--}-getItemAnalysis :: MonadIO m => Item -> m Pango.Analysis.Analysis-getItemAnalysis s = liftIO $ withManagedPtr s $ \ptr -> do- let val = ptr `plusPtr` 16 :: (Ptr Pango.Analysis.Analysis)- val' <- (newPtr Pango.Analysis.Analysis) val- return val'--#if ENABLE_OVERLOADING-data ItemAnalysisFieldInfo-instance AttrInfo ItemAnalysisFieldInfo where- type AttrAllowedOps ItemAnalysisFieldInfo = '[ 'AttrGet]- type AttrSetTypeConstraint ItemAnalysisFieldInfo = (~) (Ptr Pango.Analysis.Analysis)- type AttrBaseTypeConstraint ItemAnalysisFieldInfo = (~) Item- type AttrGetType ItemAnalysisFieldInfo = Pango.Analysis.Analysis- type AttrLabel ItemAnalysisFieldInfo = "analysis"- type AttrOrigin ItemAnalysisFieldInfo = Item- attrGet _ = getItemAnalysis- attrSet _ = undefined- attrConstruct = undefined- attrClear _ = undefined--item_analysis :: AttrLabelProxy "analysis"-item_analysis = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList Item-type instance O.AttributeList Item = ItemAttributeList-type ItemAttributeList = ('[ '("offset", ItemOffsetFieldInfo), '("length", ItemLengthFieldInfo), '("numChars", ItemNumCharsFieldInfo), '("analysis", ItemAnalysisFieldInfo)] :: [(Symbol, *)])-#endif---- method Item::new--- method type : Constructor--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Item"}))--- throws : False--- Skip return : False--foreign import ccall "pango_item_new" pango_item_new :: - IO (Ptr Item)--{- |-Creates a new 'GI.Pango.Structs.Item.Item' structure initialized to default values.--}-itemNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m Item- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Item.Item', which should- be freed with 'GI.Pango.Structs.Item.itemFree'. -}-itemNew = liftIO $ do- result <- pango_item_new- checkUnexpectedReturnNULL "itemNew" result- result' <- (wrapBoxed Item) result- return result'--#if ENABLE_OVERLOADING-#endif---- method Item::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "item", argType = TInterface (Name {namespace = "Pango", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoItem, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Item"}))--- throws : False--- Skip return : False--foreign import ccall "pango_item_copy" pango_item_copy :: - Ptr Item -> -- item : TInterface (Name {namespace = "Pango", name = "Item"})- IO (Ptr Item)--{- |-Copy an existing 'GI.Pango.Structs.Item.Item' structure.--}-itemCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- Item- {- ^ /@item@/: a 'GI.Pango.Structs.Item.Item', may be 'Nothing' -}- -> m (Maybe Item)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Item.Item', which- should be freed with 'GI.Pango.Structs.Item.itemFree', or 'Nothing' if- /@item@/ was 'Nothing'. -}-itemCopy item = liftIO $ do- item' <- unsafeManagedPtrGetPtr item- result <- pango_item_copy item'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed Item) result'- return result''- touchManagedPtr item- return maybeResult--#if ENABLE_OVERLOADING-data ItemCopyMethodInfo-instance (signature ~ (m (Maybe Item)), MonadIO m) => O.MethodInfo ItemCopyMethodInfo Item signature where- overloadedMethod _ = itemCopy--#endif---- method Item::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "item", argType = TInterface (Name {namespace = "Pango", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoItem, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_item_free" pango_item_free :: - Ptr Item -> -- item : TInterface (Name {namespace = "Pango", name = "Item"})- IO ()--{- |-Free a 'GI.Pango.Structs.Item.Item' and all associated memory.--}-itemFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- Item- {- ^ /@item@/: a 'GI.Pango.Structs.Item.Item', may be 'Nothing' -}- -> m ()-itemFree item = liftIO $ do- item' <- unsafeManagedPtrGetPtr item- pango_item_free item'- touchManagedPtr item- return ()--#if ENABLE_OVERLOADING-data ItemFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo ItemFreeMethodInfo Item signature where- overloadedMethod _ = itemFree--#endif---- method Item::split--- method type : OrdinaryMethod--- Args : [Arg {argCName = "orig", argType = TInterface (Name {namespace = "Pango", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoItem", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "split_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "byte index of position to split item, relative to the start of the item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "split_offset", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of chars between start of @orig and @split_index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Item"}))--- throws : False--- Skip return : False--foreign import ccall "pango_item_split" pango_item_split :: - Ptr Item -> -- orig : TInterface (Name {namespace = "Pango", name = "Item"})- Int32 -> -- split_index : TBasicType TInt- Int32 -> -- split_offset : TBasicType TInt- IO (Ptr Item)--{- |-Modifies /@orig@/ to cover only the text after /@splitIndex@/, and-returns a new item that covers the text before /@splitIndex@/ that-used to be in /@orig@/. You can think of /@splitIndex@/ as the length of-the returned item. /@splitIndex@/ may not be 0, and it may not be-greater than or equal to the length of /@orig@/ (that is, there must-be at least one byte assigned to each item, you can\'t create a-zero-length item). /@splitOffset@/ is the length of the first item in-chars, and must be provided because the text used to generate the-item isn\'t available, so 'GI.Pango.Structs.Item.itemSplit' can\'t count the char-length of the split items itself.--}-itemSplit ::- (B.CallStack.HasCallStack, MonadIO m) =>- Item- {- ^ /@orig@/: a 'GI.Pango.Structs.Item.Item' -}- -> Int32- {- ^ /@splitIndex@/: byte index of position to split item, relative to the start of the item -}- -> Int32- {- ^ /@splitOffset@/: number of chars between start of /@orig@/ and /@splitIndex@/ -}- -> m Item- {- ^ __Returns:__ new item representing text before /@splitIndex@/, which- should be freed with 'GI.Pango.Structs.Item.itemFree'. -}-itemSplit orig splitIndex splitOffset = liftIO $ do- orig' <- unsafeManagedPtrGetPtr orig- result <- pango_item_split orig' splitIndex splitOffset- checkUnexpectedReturnNULL "itemSplit" result- result' <- (wrapBoxed Item) result- touchManagedPtr orig- return result'--#if ENABLE_OVERLOADING-data ItemSplitMethodInfo-instance (signature ~ (Int32 -> Int32 -> m Item), MonadIO m) => O.MethodInfo ItemSplitMethodInfo Item signature where- overloadedMethod _ = itemSplit--#endif--#if ENABLE_OVERLOADING-type family ResolveItemMethod (t :: Symbol) (o :: *) :: * where- ResolveItemMethod "copy" o = ItemCopyMethodInfo- ResolveItemMethod "free" o = ItemFreeMethodInfo- ResolveItemMethod "split" o = ItemSplitMethodInfo- ResolveItemMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveItemMethod t Item, O.MethodInfo info Item p) => OL.IsLabel t (Item -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Item.hs-boot
@@ -1,35 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Item where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Item = Item (ManagedPtr Item)-instance BoxedObject Item where-#if ENABLE_OVERLOADING-data ItemCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data ItemFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data ItemSplitMethodInfo-#endif
− GI/Pango/Structs/Language.hs
@@ -1,432 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.Language.Language' structure is used to-represent a language.--'GI.Pango.Structs.Language.Language' pointers can be efficiently-copied and compared with each other.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Language- ( ---- * Exported types- Language(..) ,- noLanguage ,--- -- * Methods--- ** fromString #method:fromString#-- languageFromString ,----- ** getDefault #method:getDefault#-- languageGetDefault ,----- ** getSampleString #method:getSampleString#--#if ENABLE_OVERLOADING- LanguageGetSampleStringMethodInfo ,-#endif- languageGetSampleString ,----- ** includesScript #method:includesScript#--#if ENABLE_OVERLOADING- LanguageIncludesScriptMethodInfo ,-#endif- languageIncludesScript ,----- ** matches #method:matches#--#if ENABLE_OVERLOADING- LanguageMatchesMethodInfo ,-#endif- languageMatches ,----- ** toString #method:toString#--#if ENABLE_OVERLOADING- LanguageToStringMethodInfo ,-#endif- languageToString ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums---- | Memory-managed wrapper type.-newtype Language = Language (ManagedPtr Language)-foreign import ccall "pango_language_get_type" c_pango_language_get_type :: - IO GType--instance BoxedObject Language where- boxedType _ = c_pango_language_get_type---- | A convenience alias for `Nothing` :: `Maybe` `Language`.-noLanguage :: Maybe Language-noLanguage = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList Language-type instance O.AttributeList Language = LanguageAttributeList-type LanguageAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method Language::get_sample_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLanguage, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_language_get_sample_string" pango_language_get_sample_string :: - Ptr Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO CString--{- |-Get a string that is representative of the characters needed to-render a particular language.--The sample text may be a pangram, but is not necessarily. It is chosen to-be demonstrative of normal text in the language, as well as exposing font-feature requirements unique to the language. It is suitable for use-as sample text in a font selection dialog.--If /@language@/ is 'Nothing', the default language as found by-'GI.Pango.Functions.languageGetDefault' is used.--If Pango does not have a sample string for /@language@/, the classic-\"The quick brown fox...\" is returned. This can be detected by-comparing the returned pointer value to that returned for (non-existent)-language code \"xx\". That is, compare to:-\<informalexample>\<programlisting>-pango_language_get_sample_string (pango_language_from_string (\"xx\"))-\<\/programlisting>\<\/informalexample>--}-languageGetSampleString ::- (B.CallStack.HasCallStack, MonadIO m) =>- Language- {- ^ /@language@/: a 'GI.Pango.Structs.Language.Language', or 'Nothing' -}- -> m T.Text- {- ^ __Returns:__ the sample string. This value is owned by Pango- and should not be freed. -}-languageGetSampleString language = liftIO $ do- language' <- unsafeManagedPtrGetPtr language- result <- pango_language_get_sample_string language'- checkUnexpectedReturnNULL "languageGetSampleString" result- result' <- cstringToText result- touchManagedPtr language- return result'--#if ENABLE_OVERLOADING-data LanguageGetSampleStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo LanguageGetSampleStringMethodInfo Language signature where- overloadedMethod _ = languageGetSampleString--#endif---- XXX Could not generate method Language::get_scripts--- Error was : Not implemented: "Don't know how to allocate \"num_scripts\" of type TBasicType TInt"--- method Language::includes_script--- method type : OrdinaryMethod--- Args : [Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLanguage, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "script", argType = TInterface (Name {namespace = "Pango", name = "Script"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoScript", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_language_includes_script" pango_language_includes_script :: - Ptr Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- CInt -> -- script : TInterface (Name {namespace = "Pango", name = "Script"})- IO CInt--{- |-Determines if /@script@/ is one of the scripts used to-write /@language@/. The returned value is conservative;-if nothing is known about the language tag /@language@/,-'True' will be returned, since, as far as Pango knows,-/@script@/ might be used to write /@language@/.--This routine is used in Pango\'s itemization process when-determining if a supplied language tag is relevant to-a particular section of text. It probably is not useful for-applications in most circumstances.--This function uses 'GI.Pango.Structs.Language.languageGetScripts' internally.--/Since: 1.4/--}-languageIncludesScript ::- (B.CallStack.HasCallStack, MonadIO m) =>- Language- {- ^ /@language@/: a 'GI.Pango.Structs.Language.Language', or 'Nothing' -}- -> Pango.Enums.Script- {- ^ /@script@/: a 'GI.Pango.Enums.Script' -}- -> m Bool- {- ^ __Returns:__ 'True' if /@script@/ is one of the scripts used-to write /@language@/ or if nothing is known about /@language@/-(including the case that /@language@/ is 'Nothing'),-'False' otherwise. -}-languageIncludesScript language script = liftIO $ do- language' <- unsafeManagedPtrGetPtr language- let script' = (fromIntegral . fromEnum) script- result <- pango_language_includes_script language' script'- let result' = (/= 0) result- touchManagedPtr language- return result'--#if ENABLE_OVERLOADING-data LanguageIncludesScriptMethodInfo-instance (signature ~ (Pango.Enums.Script -> m Bool), MonadIO m) => O.MethodInfo LanguageIncludesScriptMethodInfo Language signature where- overloadedMethod _ = languageIncludesScript--#endif---- method Language::matches--- method type : OrdinaryMethod--- Args : [Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a language tag (see pango_language_from_string()),\n %NULL is allowed and matches nothing but '*'", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "range_list", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a list of language ranges, separated by ';', ':',\n ',', or space characters.\n Each element must either be '*', or a RFC 3066 language range\n canonicalized as by pango_language_from_string()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_language_matches" pango_language_matches :: - Ptr Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- CString -> -- range_list : TBasicType TUTF8- IO CInt--{- |-Checks if a language tag matches one of the elements in a list of-language ranges. A language tag is considered to match a range-in the list if the range is \'*\', the range is exactly the tag,-or the range is a prefix of the tag, and the character after it-in the tag is \'-\'.--}-languageMatches ::- (B.CallStack.HasCallStack, MonadIO m) =>- Language- {- ^ /@language@/: a language tag (see 'GI.Pango.Functions.languageFromString'),- 'Nothing' is allowed and matches nothing but \'*\' -}- -> T.Text- {- ^ /@rangeList@/: a list of language ranges, separated by \';\', \':\',- \',\', or space characters.- Each element must either be \'*\', or a RFC 3066 language range- canonicalized as by 'GI.Pango.Functions.languageFromString' -}- -> m Bool- {- ^ __Returns:__ 'True' if a match was found. -}-languageMatches language rangeList = liftIO $ do- language' <- unsafeManagedPtrGetPtr language- rangeList' <- textToCString rangeList- result <- pango_language_matches language' rangeList'- let result' = (/= 0) result- touchManagedPtr language- freeMem rangeList'- return result'--#if ENABLE_OVERLOADING-data LanguageMatchesMethodInfo-instance (signature ~ (T.Text -> m Bool), MonadIO m) => O.MethodInfo LanguageMatchesMethodInfo Language signature where- overloadedMethod _ = languageMatches--#endif---- method Language::to_string--- method type : OrdinaryMethod--- Args : [Arg {argCName = "language", argType = TInterface (Name {namespace = "Pango", name = "Language"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a language tag.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TUTF8)--- throws : False--- Skip return : False--foreign import ccall "pango_language_to_string" pango_language_to_string :: - Ptr Language -> -- language : TInterface (Name {namespace = "Pango", name = "Language"})- IO CString--{- |-Gets the RFC-3066 format string representing the given language tag.--}-languageToString ::- (B.CallStack.HasCallStack, MonadIO m) =>- Language- {- ^ /@language@/: a language tag. -}- -> m T.Text- {- ^ __Returns:__ a string representing the language tag. This is owned by- Pango and should not be freed. -}-languageToString language = liftIO $ do- language' <- unsafeManagedPtrGetPtr language- result <- pango_language_to_string language'- checkUnexpectedReturnNULL "languageToString" result- result' <- cstringToText result- touchManagedPtr language- return result'--#if ENABLE_OVERLOADING-data LanguageToStringMethodInfo-instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo LanguageToStringMethodInfo Language signature where- overloadedMethod _ = languageToString--#endif---- method Language::from_string--- method type : MemberFunction--- Args : [Arg {argCName = "language", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a string representing a language tag, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Language"}))--- throws : False--- Skip return : False--foreign import ccall "pango_language_from_string" pango_language_from_string :: - CString -> -- language : TBasicType TUTF8- IO (Ptr Language)--{- |-Take a RFC-3066 format language tag as a string and convert it to a-'GI.Pango.Structs.Language.Language' pointer that can be efficiently copied (copy the-pointer) and compared with other language tags (compare the-pointer.)--This function first canonicalizes the string by converting it to-lowercase, mapping \'_\' to \'-\', and stripping all characters other-than letters and \'-\'.--Use 'GI.Pango.Functions.languageGetDefault' if you want to get the 'GI.Pango.Structs.Language.Language' for-the current locale of the process.--}-languageFromString ::- (B.CallStack.HasCallStack, MonadIO m) =>- Maybe (T.Text)- {- ^ /@language@/: a string representing a language tag, or 'Nothing' -}- -> m (Maybe Language)- {- ^ __Returns:__ an opaque pointer to a- 'GI.Pango.Structs.Language.Language' structure, or 'Nothing' if /@language@/ was- 'Nothing'. The returned pointer will be valid forever- after, and should not be freed. -}-languageFromString language = liftIO $ do- maybeLanguage <- case language of- Nothing -> return nullPtr- Just jLanguage -> do- jLanguage' <- textToCString jLanguage- return jLanguage'- result <- pango_language_from_string maybeLanguage- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Language) result'- return result''- freeMem maybeLanguage- return maybeResult--#if ENABLE_OVERLOADING-#endif---- method Language::get_default--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Language"}))--- throws : False--- Skip return : False--foreign import ccall "pango_language_get_default" pango_language_get_default :: - IO (Ptr Language)--{- |-Returns the 'GI.Pango.Structs.Language.Language' for the current locale of the process.-Note that this can change over the life of an application.--On Unix systems, this is the return value is derived from-\<literal>setlocale(LC_CTYPE, NULL)\<\/literal>, and the user can-affect this through the environment variables LC_ALL, LC_CTYPE or-LANG (checked in that order). The locale string typically is in-the form lang_COUNTRY, where lang is an ISO-639 language code, and-COUNTRY is an ISO-3166 country code. For instance, sv_FI for-Swedish as written in Finland or pt_BR for Portuguese as written in-Brazil.--On Windows, the C library does not use any such environment-variables, and setting them won\'t affect the behavior of functions-like @/ctime()/@. The user sets the locale through the Regional Options-in the Control Panel. The C library (in the @/setlocale()/@ function)-does not use country and language codes, but country and language-names spelled out in English.-However, this function does check the above environment-variables, and does return a Unix-style locale string based on-either said environment variables or the thread\'s current locale.--Your application should call \<literal>setlocale(LC_ALL, \"\");\<\/literal>-for the user settings to take effect. Gtk+ does this in its initialization-functions automatically (by calling @/gtk_set_locale()/@).-See \<literal>man setlocale\<\/literal> for more details.--/Since: 1.16/--}-languageGetDefault ::- (B.CallStack.HasCallStack, MonadIO m) =>- m Language- {- ^ __Returns:__ the default language as a- 'GI.Pango.Structs.Language.Language', must not be freed. -}-languageGetDefault = liftIO $ do- result <- pango_language_get_default- checkUnexpectedReturnNULL "languageGetDefault" result- result' <- (newBoxed Language) result- return result'--#if ENABLE_OVERLOADING-#endif--#if ENABLE_OVERLOADING-type family ResolveLanguageMethod (t :: Symbol) (o :: *) :: * where- ResolveLanguageMethod "includesScript" o = LanguageIncludesScriptMethodInfo- ResolveLanguageMethod "matches" o = LanguageMatchesMethodInfo- ResolveLanguageMethod "toString" o = LanguageToStringMethodInfo- ResolveLanguageMethod "getSampleString" o = LanguageGetSampleStringMethodInfo- ResolveLanguageMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveLanguageMethod t Language, O.MethodInfo info Language p) => OL.IsLabel t (Language -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Language.hs-boot
@@ -1,38 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Language where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Language = Language (ManagedPtr Language)-instance BoxedObject Language where-#if ENABLE_OVERLOADING-data LanguageGetSampleStringMethodInfo-#endif-#if ENABLE_OVERLOADING-data LanguageIncludesScriptMethodInfo-#endif-#if ENABLE_OVERLOADING-data LanguageMatchesMethodInfo-#endif-#if ENABLE_OVERLOADING-data LanguageToStringMethodInfo-#endif
− GI/Pango/Structs/LayoutIter.hs
@@ -1,1054 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A 'GI.Pango.Structs.LayoutIter.LayoutIter' structure can be used to-iterate over the visual extents of a 'GI.Pango.Objects.Layout.Layout'.--The 'GI.Pango.Structs.LayoutIter.LayoutIter' structure is opaque, and-has no user-visible fields.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.LayoutIter- ( ---- * Exported types- LayoutIter(..) ,- noLayoutIter ,--- -- * Methods--- ** atLastLine #method:atLastLine#--#if ENABLE_OVERLOADING- LayoutIterAtLastLineMethodInfo ,-#endif- layoutIterAtLastLine ,----- ** copy #method:copy#--#if ENABLE_OVERLOADING- LayoutIterCopyMethodInfo ,-#endif- layoutIterCopy ,----- ** free #method:free#--#if ENABLE_OVERLOADING- LayoutIterFreeMethodInfo ,-#endif- layoutIterFree ,----- ** getBaseline #method:getBaseline#--#if ENABLE_OVERLOADING- LayoutIterGetBaselineMethodInfo ,-#endif- layoutIterGetBaseline ,----- ** getCharExtents #method:getCharExtents#--#if ENABLE_OVERLOADING- LayoutIterGetCharExtentsMethodInfo ,-#endif- layoutIterGetCharExtents ,----- ** getClusterExtents #method:getClusterExtents#--#if ENABLE_OVERLOADING- LayoutIterGetClusterExtentsMethodInfo ,-#endif- layoutIterGetClusterExtents ,----- ** getIndex #method:getIndex#--#if ENABLE_OVERLOADING- LayoutIterGetIndexMethodInfo ,-#endif- layoutIterGetIndex ,----- ** getLayout #method:getLayout#--#if ENABLE_OVERLOADING- LayoutIterGetLayoutMethodInfo ,-#endif- layoutIterGetLayout ,----- ** getLayoutExtents #method:getLayoutExtents#--#if ENABLE_OVERLOADING- LayoutIterGetLayoutExtentsMethodInfo ,-#endif- layoutIterGetLayoutExtents ,----- ** getLine #method:getLine#--#if ENABLE_OVERLOADING- LayoutIterGetLineMethodInfo ,-#endif- layoutIterGetLine ,----- ** getLineExtents #method:getLineExtents#--#if ENABLE_OVERLOADING- LayoutIterGetLineExtentsMethodInfo ,-#endif- layoutIterGetLineExtents ,----- ** getLineReadonly #method:getLineReadonly#--#if ENABLE_OVERLOADING- LayoutIterGetLineReadonlyMethodInfo ,-#endif- layoutIterGetLineReadonly ,----- ** getLineYrange #method:getLineYrange#--#if ENABLE_OVERLOADING- LayoutIterGetLineYrangeMethodInfo ,-#endif- layoutIterGetLineYrange ,----- ** getRun #method:getRun#--#if ENABLE_OVERLOADING- LayoutIterGetRunMethodInfo ,-#endif- layoutIterGetRun ,----- ** getRunExtents #method:getRunExtents#--#if ENABLE_OVERLOADING- LayoutIterGetRunExtentsMethodInfo ,-#endif- layoutIterGetRunExtents ,----- ** getRunReadonly #method:getRunReadonly#--#if ENABLE_OVERLOADING- LayoutIterGetRunReadonlyMethodInfo ,-#endif- layoutIterGetRunReadonly ,----- ** nextChar #method:nextChar#--#if ENABLE_OVERLOADING- LayoutIterNextCharMethodInfo ,-#endif- layoutIterNextChar ,----- ** nextCluster #method:nextCluster#--#if ENABLE_OVERLOADING- LayoutIterNextClusterMethodInfo ,-#endif- layoutIterNextCluster ,----- ** nextLine #method:nextLine#--#if ENABLE_OVERLOADING- LayoutIterNextLineMethodInfo ,-#endif- layoutIterNextLine ,----- ** nextRun #method:nextRun#--#if ENABLE_OVERLOADING- LayoutIterNextRunMethodInfo ,-#endif- layoutIterNextRun ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Objects.Layout as Pango.Layout-import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphItem as Pango.GlyphItem-import {-# SOURCE #-} qualified GI.Pango.Structs.LayoutLine as Pango.LayoutLine-import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle---- | Memory-managed wrapper type.-newtype LayoutIter = LayoutIter (ManagedPtr LayoutIter)-foreign import ccall "pango_layout_iter_get_type" c_pango_layout_iter_get_type :: - IO GType--instance BoxedObject LayoutIter where- boxedType _ = c_pango_layout_iter_get_type---- | A convenience alias for `Nothing` :: `Maybe` `LayoutIter`.-noLayoutIter :: Maybe LayoutIter-noLayoutIter = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList LayoutIter-type instance O.AttributeList LayoutIter = LayoutIterAttributeList-type LayoutIterAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method LayoutIter::at_last_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_at_last_line" pango_layout_iter_at_last_line :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO CInt--{- |-Determines whether /@iter@/ is on the last line of the layout.--}-layoutIterAtLastLine ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Bool- {- ^ __Returns:__ 'True' if /@iter@/ is on the last line. -}-layoutIterAtLastLine iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_at_last_line iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterAtLastLineMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo LayoutIterAtLastLineMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterAtLastLine--#endif---- method LayoutIter::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutIter"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_copy" pango_layout_iter_copy :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO (Ptr LayoutIter)--{- |-Copies a 'GI.Pango.Structs.LayoutIter.LayoutIter'.--/Since: 1.20/--}-layoutIterCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter', may be 'Nothing' -}- -> m (Maybe LayoutIter)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.LayoutIter.LayoutIter',- which should be freed with 'GI.Pango.Structs.LayoutIter.layoutIterFree',- or 'Nothing' if /@iter@/ was 'Nothing'. -}-layoutIterCopy iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_copy iter'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed LayoutIter) result'- return result''- touchManagedPtr iter- return maybeResult--#if ENABLE_OVERLOADING-data LayoutIterCopyMethodInfo-instance (signature ~ (m (Maybe LayoutIter)), MonadIO m) => O.MethodInfo LayoutIterCopyMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterCopy--#endif---- method LayoutIter::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_free" pango_layout_iter_free :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO ()--{- |-Frees an iterator that\'s no longer in use.--}-layoutIterFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter', may be 'Nothing' -}- -> m ()-layoutIterFree iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- pango_layout_iter_free iter'- touchManagedPtr iter- return ()--#if ENABLE_OVERLOADING-data LayoutIterFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo LayoutIterFreeMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterFree--#endif---- method LayoutIter::get_baseline--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_baseline" pango_layout_iter_get_baseline :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO Int32--{- |-Gets the Y position of the current line\'s baseline, in layout-coordinates (origin at top left of the entire layout).--}-layoutIterGetBaseline ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Int32- {- ^ __Returns:__ baseline of current line. -}-layoutIterGetBaseline iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_get_baseline iter'- touchManagedPtr iter- return result--#if ENABLE_OVERLOADING-data LayoutIterGetBaselineMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo LayoutIterGetBaselineMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetBaseline--#endif---- method LayoutIter::get_char_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with\n logical extents", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_char_extents" pango_layout_iter_get_char_extents :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Gets the extents of the current character, in layout coordinates-(origin is the top left of the entire layout). Only logical extents-can sensibly be obtained for characters; ink extents make sense only-down to the level of clusters.--}-layoutIterGetCharExtents ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m (Pango.Rectangle.Rectangle)-layoutIterGetCharExtents iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_iter_get_char_extents iter' logicalRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr iter- return logicalRect'--#if ENABLE_OVERLOADING-data LayoutIterGetCharExtentsMethodInfo-instance (signature ~ (m (Pango.Rectangle.Rectangle)), MonadIO m) => O.MethodInfo LayoutIterGetCharExtentsMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetCharExtents--#endif---- method LayoutIter::get_cluster_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with ink extents, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with logical extents, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_cluster_extents" pango_layout_iter_get_cluster_extents :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Gets the extents of the current cluster, in layout coordinates-(origin is the top left of the entire layout).--}-layoutIterGetClusterExtents ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutIterGetClusterExtents iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_iter_get_cluster_extents iter' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr iter- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutIterGetClusterExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m) => O.MethodInfo LayoutIterGetClusterExtentsMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetClusterExtents--#endif---- method LayoutIter::get_index--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_index" pango_layout_iter_get_index :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO Int32--{- |-Gets the current byte index. Note that iterating forward by char-moves in visual order, not logical order, so indexes may not be-sequential. Also, the index may be equal to the length of the text-in the layout, if on the 'Nothing' run (see 'GI.Pango.Structs.LayoutIter.layoutIterGetRun').--}-layoutIterGetIndex ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Int32- {- ^ __Returns:__ current byte index. -}-layoutIterGetIndex iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_get_index iter'- touchManagedPtr iter- return result--#if ENABLE_OVERLOADING-data LayoutIterGetIndexMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo LayoutIterGetIndexMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetIndex--#endif---- method LayoutIter::get_layout--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Layout"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_layout" pango_layout_iter_get_layout :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO (Ptr Pango.Layout.Layout)--{- |-Gets the layout associated with a 'GI.Pango.Structs.LayoutIter.LayoutIter'.--/Since: 1.20/--}-layoutIterGetLayout ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Pango.Layout.Layout- {- ^ __Returns:__ the layout associated with /@iter@/. -}-layoutIterGetLayout iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_get_layout iter'- checkUnexpectedReturnNULL "layoutIterGetLayout" result- result' <- (newObject Pango.Layout.Layout) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterGetLayoutMethodInfo-instance (signature ~ (m Pango.Layout.Layout), MonadIO m) => O.MethodInfo LayoutIterGetLayoutMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetLayout--#endif---- method LayoutIter::get_layout_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with ink extents,\n or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with logical\n extents, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_layout_extents" pango_layout_iter_get_layout_extents :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Obtains the extents of the 'GI.Pango.Objects.Layout.Layout' being iterated-over. /@inkRect@/ or /@logicalRect@/ can be 'Nothing' if you-aren\'t interested in them.--}-layoutIterGetLayoutExtents ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutIterGetLayoutExtents iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_iter_get_layout_extents iter' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr iter- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutIterGetLayoutExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m) => O.MethodInfo LayoutIterGetLayoutExtentsMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetLayoutExtents--#endif---- method LayoutIter::get_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutLine"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_line" pango_layout_iter_get_line :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO (Ptr Pango.LayoutLine.LayoutLine)--{- |-Gets the current line.--Use the faster 'GI.Pango.Structs.LayoutIter.layoutIterGetLineReadonly' if you do not plan-to modify the contents of the line (glyphs, glyph widths, etc.).--}-layoutIterGetLine ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Pango.LayoutLine.LayoutLine- {- ^ __Returns:__ the current line. -}-layoutIterGetLine iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_get_line iter'- checkUnexpectedReturnNULL "layoutIterGetLine" result- result' <- (newBoxed Pango.LayoutLine.LayoutLine) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterGetLineMethodInfo-instance (signature ~ (m Pango.LayoutLine.LayoutLine), MonadIO m) => O.MethodInfo LayoutIterGetLineMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetLine--#endif---- method LayoutIter::get_line_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with ink extents, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with logical extents, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_line_extents" pango_layout_iter_get_line_extents :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Obtains the extents of the current line. /@inkRect@/ or /@logicalRect@/-can be 'Nothing' if you aren\'t interested in them. Extents are in layout-coordinates (origin is the top-left corner of the entire-'GI.Pango.Objects.Layout.Layout'). Thus the extents returned by this function will be-the same width\/height but not at the same x\/y as the extents-returned from 'GI.Pango.Structs.LayoutLine.layoutLineGetExtents'.--}-layoutIterGetLineExtents ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutIterGetLineExtents iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_iter_get_line_extents iter' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr iter- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutIterGetLineExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m) => O.MethodInfo LayoutIterGetLineExtentsMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetLineExtents--#endif---- method LayoutIter::get_line_readonly--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutLine"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_line_readonly" pango_layout_iter_get_line_readonly :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO (Ptr Pango.LayoutLine.LayoutLine)--{- |-Gets the current line for read-only access.--This is a faster alternative to 'GI.Pango.Structs.LayoutIter.layoutIterGetLine',-but the user is not expected-to modify the contents of the line (glyphs, glyph widths, etc.).--/Since: 1.16/--}-layoutIterGetLineReadonly ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Pango.LayoutLine.LayoutLine- {- ^ __Returns:__ the current line, that should not be-modified. -}-layoutIterGetLineReadonly iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_get_line_readonly iter'- checkUnexpectedReturnNULL "layoutIterGetLineReadonly" result- result' <- (newBoxed Pango.LayoutLine.LayoutLine) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterGetLineReadonlyMethodInfo-instance (signature ~ (m Pango.LayoutLine.LayoutLine), MonadIO m) => O.MethodInfo LayoutIterGetLineReadonlyMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetLineReadonly--#endif---- method LayoutIter::get_line_yrange--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y0_", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "start of line, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "y1_", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "end of line, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_line_yrange" pango_layout_iter_get_line_yrange :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- Ptr Int32 -> -- y0_ : TBasicType TInt- Ptr Int32 -> -- y1_ : TBasicType TInt- IO ()--{- |-Divides the vertical space in the 'GI.Pango.Objects.Layout.Layout' being iterated over-between the lines in the layout, and returns the space belonging to-the current line. A line\'s range includes the line\'s logical-extents, plus half of the spacing above and below the line, if-'GI.Pango.Objects.Layout.layoutSetSpacing' has been called to set layout spacing.-The Y positions are in layout coordinates (origin at top left of the-entire layout).--}-layoutIterGetLineYrange ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m ((Int32, Int32))-layoutIterGetLineYrange iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- y0_ <- allocMem :: IO (Ptr Int32)- y1_ <- allocMem :: IO (Ptr Int32)- pango_layout_iter_get_line_yrange iter' y0_ y1_- y0_' <- peek y0_- y1_' <- peek y1_- touchManagedPtr iter- freeMem y0_- freeMem y1_- return (y0_', y1_')--#if ENABLE_OVERLOADING-data LayoutIterGetLineYrangeMethodInfo-instance (signature ~ (m ((Int32, Int32))), MonadIO m) => O.MethodInfo LayoutIterGetLineYrangeMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetLineYrange--#endif---- method LayoutIter::get_run--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GlyphItem"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_run" pango_layout_iter_get_run :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO (Ptr Pango.GlyphItem.GlyphItem)--{- |-Gets the current run. When iterating by run, at the end of each-line, there\'s a position with a 'Nothing' run, so this function can return-'Nothing'. The 'Nothing' run at the end of each line ensures that all lines have-at least one run, even lines consisting of only a newline.--Use the faster 'GI.Pango.Structs.LayoutIter.layoutIterGetRunReadonly' if you do not plan-to modify the contents of the run (glyphs, glyph widths, etc.).--}-layoutIterGetRun ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m (Maybe Pango.GlyphItem.GlyphItem)- {- ^ __Returns:__ the current run. -}-layoutIterGetRun iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_get_run iter'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.GlyphItem.GlyphItem) result'- return result''- touchManagedPtr iter- return maybeResult--#if ENABLE_OVERLOADING-data LayoutIterGetRunMethodInfo-instance (signature ~ (m (Maybe Pango.GlyphItem.GlyphItem)), MonadIO m) => O.MethodInfo LayoutIterGetRunMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetRun--#endif---- method LayoutIter::get_run_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with ink extents, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle to fill with logical extents, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_run_extents" pango_layout_iter_get_run_extents :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Gets the extents of the current run in layout coordinates-(origin is the top left of the entire layout).--}-layoutIterGetRunExtents ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutIterGetRunExtents iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_iter_get_run_extents iter' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr iter- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutIterGetRunExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m) => O.MethodInfo LayoutIterGetRunExtentsMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetRunExtents--#endif---- method LayoutIter::get_run_readonly--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "GlyphItem"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_get_run_readonly" pango_layout_iter_get_run_readonly :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO (Ptr Pango.GlyphItem.GlyphItem)--{- |-Gets the current run. When iterating by run, at the end of each-line, there\'s a position with a 'Nothing' run, so this function can return-'Nothing'. The 'Nothing' run at the end of each line ensures that all lines have-at least one run, even lines consisting of only a newline.--This is a faster alternative to 'GI.Pango.Structs.LayoutIter.layoutIterGetRun',-but the user is not expected-to modify the contents of the run (glyphs, glyph widths, etc.).--/Since: 1.16/--}-layoutIterGetRunReadonly ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m (Maybe Pango.GlyphItem.GlyphItem)- {- ^ __Returns:__ the current run, that-should not be modified. -}-layoutIterGetRunReadonly iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_get_run_readonly iter'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Pango.GlyphItem.GlyphItem) result'- return result''- touchManagedPtr iter- return maybeResult--#if ENABLE_OVERLOADING-data LayoutIterGetRunReadonlyMethodInfo-instance (signature ~ (m (Maybe Pango.GlyphItem.GlyphItem)), MonadIO m) => O.MethodInfo LayoutIterGetRunReadonlyMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterGetRunReadonly--#endif---- method LayoutIter::next_char--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_next_char" pango_layout_iter_next_char :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO CInt--{- |-Moves /@iter@/ forward to the next character in visual order. If /@iter@/ was already at-the end of the layout, returns 'False'.--}-layoutIterNextChar ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Bool- {- ^ __Returns:__ whether motion was possible. -}-layoutIterNextChar iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_next_char iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterNextCharMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo LayoutIterNextCharMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterNextChar--#endif---- method LayoutIter::next_cluster--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_next_cluster" pango_layout_iter_next_cluster :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO CInt--{- |-Moves /@iter@/ forward to the next cluster in visual order. If /@iter@/-was already at the end of the layout, returns 'False'.--}-layoutIterNextCluster ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Bool- {- ^ __Returns:__ whether motion was possible. -}-layoutIterNextCluster iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_next_cluster iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterNextClusterMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo LayoutIterNextClusterMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterNextCluster--#endif---- method LayoutIter::next_line--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_next_line" pango_layout_iter_next_line :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO CInt--{- |-Moves /@iter@/ forward to the start of the next line. If /@iter@/ is-already on the last line, returns 'False'.--}-layoutIterNextLine ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Bool- {- ^ __Returns:__ whether motion was possible. -}-layoutIterNextLine iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_next_line iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterNextLineMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo LayoutIterNextLineMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterNextLine--#endif---- method LayoutIter::next_run--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "LayoutIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_iter_next_run" pango_layout_iter_next_run :: - Ptr LayoutIter -> -- iter : TInterface (Name {namespace = "Pango", name = "LayoutIter"})- IO CInt--{- |-Moves /@iter@/ forward to the next run in visual order. If /@iter@/ was-already at the end of the layout, returns 'False'.--}-layoutIterNextRun ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutIter- {- ^ /@iter@/: a 'GI.Pango.Structs.LayoutIter.LayoutIter' -}- -> m Bool- {- ^ __Returns:__ whether motion was possible. -}-layoutIterNextRun iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_layout_iter_next_run iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data LayoutIterNextRunMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo LayoutIterNextRunMethodInfo LayoutIter signature where- overloadedMethod _ = layoutIterNextRun--#endif--#if ENABLE_OVERLOADING-type family ResolveLayoutIterMethod (t :: Symbol) (o :: *) :: * where- ResolveLayoutIterMethod "atLastLine" o = LayoutIterAtLastLineMethodInfo- ResolveLayoutIterMethod "copy" o = LayoutIterCopyMethodInfo- ResolveLayoutIterMethod "free" o = LayoutIterFreeMethodInfo- ResolveLayoutIterMethod "nextChar" o = LayoutIterNextCharMethodInfo- ResolveLayoutIterMethod "nextCluster" o = LayoutIterNextClusterMethodInfo- ResolveLayoutIterMethod "nextLine" o = LayoutIterNextLineMethodInfo- ResolveLayoutIterMethod "nextRun" o = LayoutIterNextRunMethodInfo- ResolveLayoutIterMethod "getBaseline" o = LayoutIterGetBaselineMethodInfo- ResolveLayoutIterMethod "getCharExtents" o = LayoutIterGetCharExtentsMethodInfo- ResolveLayoutIterMethod "getClusterExtents" o = LayoutIterGetClusterExtentsMethodInfo- ResolveLayoutIterMethod "getIndex" o = LayoutIterGetIndexMethodInfo- ResolveLayoutIterMethod "getLayout" o = LayoutIterGetLayoutMethodInfo- ResolveLayoutIterMethod "getLayoutExtents" o = LayoutIterGetLayoutExtentsMethodInfo- ResolveLayoutIterMethod "getLine" o = LayoutIterGetLineMethodInfo- ResolveLayoutIterMethod "getLineExtents" o = LayoutIterGetLineExtentsMethodInfo- ResolveLayoutIterMethod "getLineReadonly" o = LayoutIterGetLineReadonlyMethodInfo- ResolveLayoutIterMethod "getLineYrange" o = LayoutIterGetLineYrangeMethodInfo- ResolveLayoutIterMethod "getRun" o = LayoutIterGetRunMethodInfo- ResolveLayoutIterMethod "getRunExtents" o = LayoutIterGetRunExtentsMethodInfo- ResolveLayoutIterMethod "getRunReadonly" o = LayoutIterGetRunReadonlyMethodInfo- ResolveLayoutIterMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveLayoutIterMethod t LayoutIter, O.MethodInfo info LayoutIter p) => OL.IsLabel t (LayoutIter -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/LayoutIter.hs-boot
@@ -1,86 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.LayoutIter where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype LayoutIter = LayoutIter (ManagedPtr LayoutIter)-instance BoxedObject LayoutIter where-#if ENABLE_OVERLOADING-data LayoutIterAtLastLineMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetBaselineMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetCharExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetClusterExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetIndexMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetLayoutMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetLayoutExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetLineMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetLineExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetLineReadonlyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetLineYrangeMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetRunMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetRunExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterGetRunReadonlyMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterNextCharMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterNextClusterMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterNextLineMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutIterNextRunMethodInfo-#endif
− GI/Pango/Structs/LayoutLine.hs
@@ -1,850 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.LayoutLine.LayoutLine' structure represents one of the lines resulting-from laying out a paragraph via 'GI.Pango.Objects.Layout.Layout'. 'GI.Pango.Structs.LayoutLine.LayoutLine'-structures are obtained by calling 'GI.Pango.Objects.Layout.layoutGetLine' and-are only valid until the text, attributes, or settings of the-parent 'GI.Pango.Objects.Layout.Layout' are modified.--Routines for rendering PangoLayout objects are provided in-code specific to each rendering system.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.LayoutLine- ( ---- * Exported types- LayoutLine(..) ,- newZeroLayoutLine ,- noLayoutLine ,--- -- * Methods--- ** getExtents #method:getExtents#--#if ENABLE_OVERLOADING- LayoutLineGetExtentsMethodInfo ,-#endif- layoutLineGetExtents ,----- ** getPixelExtents #method:getPixelExtents#--#if ENABLE_OVERLOADING- LayoutLineGetPixelExtentsMethodInfo ,-#endif- layoutLineGetPixelExtents ,----- ** getXRanges #method:getXRanges#--#if ENABLE_OVERLOADING- LayoutLineGetXRangesMethodInfo ,-#endif- layoutLineGetXRanges ,----- ** indexToX #method:indexToX#--#if ENABLE_OVERLOADING- LayoutLineIndexToXMethodInfo ,-#endif- layoutLineIndexToX ,----- ** ref #method:ref#--#if ENABLE_OVERLOADING- LayoutLineRefMethodInfo ,-#endif- layoutLineRef ,----- ** unref #method:unref#--#if ENABLE_OVERLOADING- LayoutLineUnrefMethodInfo ,-#endif- layoutLineUnref ,----- ** xToIndex #method:xToIndex#--#if ENABLE_OVERLOADING- LayoutLineXToIndexMethodInfo ,-#endif- layoutLineXToIndex ,----- -- * Properties--- ** isParagraphStart #attr:isParagraphStart#-{- | @/TRUE/@ if this is the first line of the paragraph--}- getLayoutLineIsParagraphStart ,-#if ENABLE_OVERLOADING- layoutLine_isParagraphStart ,-#endif- setLayoutLineIsParagraphStart ,----- ** layout #attr:layout#-{- | the layout this line belongs to, might be 'Nothing'--}- clearLayoutLineLayout ,- getLayoutLineLayout ,-#if ENABLE_OVERLOADING- layoutLine_layout ,-#endif- setLayoutLineLayout ,----- ** length #attr:length#-{- | length of line in bytes--}- getLayoutLineLength ,-#if ENABLE_OVERLOADING- layoutLine_length ,-#endif- setLayoutLineLength ,----- ** resolvedDir #attr:resolvedDir#-{- | @/Resolved/@ PangoDirection of line--}- getLayoutLineResolvedDir ,-#if ENABLE_OVERLOADING- layoutLine_resolvedDir ,-#endif- setLayoutLineResolvedDir ,----- ** runs #attr:runs#-{- | list of runs in the- line, from left to right--}- clearLayoutLineRuns ,- getLayoutLineRuns ,-#if ENABLE_OVERLOADING- layoutLine_runs ,-#endif- setLayoutLineRuns ,----- ** startIndex #attr:startIndex#-{- | start of line as byte index into layout->text--}- getLayoutLineStartIndex ,-#if ENABLE_OVERLOADING- layoutLine_startIndex ,-#endif- setLayoutLineStartIndex ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Objects.Layout as Pango.Layout-import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphItem as Pango.GlyphItem-import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle---- | Memory-managed wrapper type.-newtype LayoutLine = LayoutLine (ManagedPtr LayoutLine)-foreign import ccall "pango_layout_line_get_type" c_pango_layout_line_get_type :: - IO GType--instance BoxedObject LayoutLine where- boxedType _ = c_pango_layout_line_get_type---- | Construct a `LayoutLine` struct initialized to zero.-newZeroLayoutLine :: MonadIO m => m LayoutLine-newZeroLayoutLine = liftIO $ callocBoxedBytes 32 >>= wrapBoxed LayoutLine--instance tag ~ 'AttrSet => Constructible LayoutLine tag where- new _ attrs = do- o <- newZeroLayoutLine- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `LayoutLine`.-noLayoutLine :: Maybe LayoutLine-noLayoutLine = Nothing--{- |-Get the value of the “@layout@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' layoutLine #layout-@--}-getLayoutLineLayout :: MonadIO m => LayoutLine -> m (Maybe Pango.Layout.Layout)-getLayoutLineLayout s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO (Ptr Pango.Layout.Layout)- result <- SP.convertIfNonNull val $ \val' -> do- val'' <- (newObject Pango.Layout.Layout) val'- return val''- return result--{- |-Set the value of the “@layout@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' layoutLine [ #layout 'Data.GI.Base.Attributes.:=' value ]-@--}-setLayoutLineLayout :: MonadIO m => LayoutLine -> Ptr Pango.Layout.Layout -> m ()-setLayoutLineLayout s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Ptr Pango.Layout.Layout)--{- |-Set the value of the “@layout@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #layout-@--}-clearLayoutLineLayout :: MonadIO m => LayoutLine -> m ()-clearLayoutLineLayout s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (FP.nullPtr :: Ptr Pango.Layout.Layout)--#if ENABLE_OVERLOADING-data LayoutLineLayoutFieldInfo-instance AttrInfo LayoutLineLayoutFieldInfo where- type AttrAllowedOps LayoutLineLayoutFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint LayoutLineLayoutFieldInfo = (~) (Ptr Pango.Layout.Layout)- type AttrBaseTypeConstraint LayoutLineLayoutFieldInfo = (~) LayoutLine- type AttrGetType LayoutLineLayoutFieldInfo = Maybe Pango.Layout.Layout- type AttrLabel LayoutLineLayoutFieldInfo = "layout"- type AttrOrigin LayoutLineLayoutFieldInfo = LayoutLine- attrGet _ = getLayoutLineLayout- attrSet _ = setLayoutLineLayout- attrConstruct = undefined- attrClear _ = clearLayoutLineLayout--layoutLine_layout :: AttrLabelProxy "layout"-layoutLine_layout = AttrLabelProxy--#endif---{- |-Get the value of the “@start_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' layoutLine #startIndex-@--}-getLayoutLineStartIndex :: MonadIO m => LayoutLine -> m Int32-getLayoutLineStartIndex s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Int32- return val--{- |-Set the value of the “@start_index@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' layoutLine [ #startIndex 'Data.GI.Base.Attributes.:=' value ]-@--}-setLayoutLineStartIndex :: MonadIO m => LayoutLine -> Int32 -> m ()-setLayoutLineStartIndex s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Int32)--#if ENABLE_OVERLOADING-data LayoutLineStartIndexFieldInfo-instance AttrInfo LayoutLineStartIndexFieldInfo where- type AttrAllowedOps LayoutLineStartIndexFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LayoutLineStartIndexFieldInfo = (~) Int32- type AttrBaseTypeConstraint LayoutLineStartIndexFieldInfo = (~) LayoutLine- type AttrGetType LayoutLineStartIndexFieldInfo = Int32- type AttrLabel LayoutLineStartIndexFieldInfo = "start_index"- type AttrOrigin LayoutLineStartIndexFieldInfo = LayoutLine- attrGet _ = getLayoutLineStartIndex- attrSet _ = setLayoutLineStartIndex- attrConstruct = undefined- attrClear _ = undefined--layoutLine_startIndex :: AttrLabelProxy "startIndex"-layoutLine_startIndex = AttrLabelProxy--#endif---{- |-Get the value of the “@length@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' layoutLine #length-@--}-getLayoutLineLength :: MonadIO m => LayoutLine -> m Int32-getLayoutLineLength s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Int32- return val--{- |-Set the value of the “@length@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' layoutLine [ #length 'Data.GI.Base.Attributes.:=' value ]-@--}-setLayoutLineLength :: MonadIO m => LayoutLine -> Int32 -> m ()-setLayoutLineLength s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Int32)--#if ENABLE_OVERLOADING-data LayoutLineLengthFieldInfo-instance AttrInfo LayoutLineLengthFieldInfo where- type AttrAllowedOps LayoutLineLengthFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LayoutLineLengthFieldInfo = (~) Int32- type AttrBaseTypeConstraint LayoutLineLengthFieldInfo = (~) LayoutLine- type AttrGetType LayoutLineLengthFieldInfo = Int32- type AttrLabel LayoutLineLengthFieldInfo = "length"- type AttrOrigin LayoutLineLengthFieldInfo = LayoutLine- attrGet _ = getLayoutLineLength- attrSet _ = setLayoutLineLength- attrConstruct = undefined- attrClear _ = undefined--layoutLine_length :: AttrLabelProxy "length"-layoutLine_length = AttrLabelProxy--#endif---{- |-Get the value of the “@runs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' layoutLine #runs-@--}-getLayoutLineRuns :: MonadIO m => LayoutLine -> m [Pango.GlyphItem.GlyphItem]-getLayoutLineRuns s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO (Ptr (GSList (Ptr Pango.GlyphItem.GlyphItem)))- val' <- unpackGSList val- val'' <- mapM (newBoxed Pango.GlyphItem.GlyphItem) val'- return val''--{- |-Set the value of the “@runs@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' layoutLine [ #runs 'Data.GI.Base.Attributes.:=' value ]-@--}-setLayoutLineRuns :: MonadIO m => LayoutLine -> Ptr (GSList (Ptr Pango.GlyphItem.GlyphItem)) -> m ()-setLayoutLineRuns s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Ptr (GSList (Ptr Pango.GlyphItem.GlyphItem)))--{- |-Set the value of the “@runs@” field to `Nothing`.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.clear' #runs-@--}-clearLayoutLineRuns :: MonadIO m => LayoutLine -> m ()-clearLayoutLineRuns s = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (FP.nullPtr :: Ptr (GSList (Ptr Pango.GlyphItem.GlyphItem)))--#if ENABLE_OVERLOADING-data LayoutLineRunsFieldInfo-instance AttrInfo LayoutLineRunsFieldInfo where- type AttrAllowedOps LayoutLineRunsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]- type AttrSetTypeConstraint LayoutLineRunsFieldInfo = (~) (Ptr (GSList (Ptr Pango.GlyphItem.GlyphItem)))- type AttrBaseTypeConstraint LayoutLineRunsFieldInfo = (~) LayoutLine- type AttrGetType LayoutLineRunsFieldInfo = [Pango.GlyphItem.GlyphItem]- type AttrLabel LayoutLineRunsFieldInfo = "runs"- type AttrOrigin LayoutLineRunsFieldInfo = LayoutLine- attrGet _ = getLayoutLineRuns- attrSet _ = setLayoutLineRuns- attrConstruct = undefined- attrClear _ = clearLayoutLineRuns--layoutLine_runs :: AttrLabelProxy "runs"-layoutLine_runs = AttrLabelProxy--#endif---{- |-Get the value of the “@is_paragraph_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' layoutLine #isParagraphStart-@--}-getLayoutLineIsParagraphStart :: MonadIO m => LayoutLine -> m Word32-getLayoutLineIsParagraphStart s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO Word32- return val--{- |-Set the value of the “@is_paragraph_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' layoutLine [ #isParagraphStart 'Data.GI.Base.Attributes.:=' value ]-@--}-setLayoutLineIsParagraphStart :: MonadIO m => LayoutLine -> Word32 -> m ()-setLayoutLineIsParagraphStart s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Word32)--#if ENABLE_OVERLOADING-data LayoutLineIsParagraphStartFieldInfo-instance AttrInfo LayoutLineIsParagraphStartFieldInfo where- type AttrAllowedOps LayoutLineIsParagraphStartFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LayoutLineIsParagraphStartFieldInfo = (~) Word32- type AttrBaseTypeConstraint LayoutLineIsParagraphStartFieldInfo = (~) LayoutLine- type AttrGetType LayoutLineIsParagraphStartFieldInfo = Word32- type AttrLabel LayoutLineIsParagraphStartFieldInfo = "is_paragraph_start"- type AttrOrigin LayoutLineIsParagraphStartFieldInfo = LayoutLine- attrGet _ = getLayoutLineIsParagraphStart- attrSet _ = setLayoutLineIsParagraphStart- attrConstruct = undefined- attrClear _ = undefined--layoutLine_isParagraphStart :: AttrLabelProxy "isParagraphStart"-layoutLine_isParagraphStart = AttrLabelProxy--#endif---{- |-Get the value of the “@resolved_dir@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' layoutLine #resolvedDir-@--}-getLayoutLineResolvedDir :: MonadIO m => LayoutLine -> m Word32-getLayoutLineResolvedDir s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 28) :: IO Word32- return val--{- |-Set the value of the “@resolved_dir@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' layoutLine [ #resolvedDir 'Data.GI.Base.Attributes.:=' value ]-@--}-setLayoutLineResolvedDir :: MonadIO m => LayoutLine -> Word32 -> m ()-setLayoutLineResolvedDir s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 28) (val :: Word32)--#if ENABLE_OVERLOADING-data LayoutLineResolvedDirFieldInfo-instance AttrInfo LayoutLineResolvedDirFieldInfo where- type AttrAllowedOps LayoutLineResolvedDirFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LayoutLineResolvedDirFieldInfo = (~) Word32- type AttrBaseTypeConstraint LayoutLineResolvedDirFieldInfo = (~) LayoutLine- type AttrGetType LayoutLineResolvedDirFieldInfo = Word32- type AttrLabel LayoutLineResolvedDirFieldInfo = "resolved_dir"- type AttrOrigin LayoutLineResolvedDirFieldInfo = LayoutLine- attrGet _ = getLayoutLineResolvedDir- attrSet _ = setLayoutLineResolvedDir- attrConstruct = undefined- attrClear _ = undefined--layoutLine_resolvedDir :: AttrLabelProxy "resolvedDir"-layoutLine_resolvedDir = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList LayoutLine-type instance O.AttributeList LayoutLine = LayoutLineAttributeList-type LayoutLineAttributeList = ('[ '("layout", LayoutLineLayoutFieldInfo), '("startIndex", LayoutLineStartIndexFieldInfo), '("length", LayoutLineLengthFieldInfo), '("runs", LayoutLineRunsFieldInfo), '("isParagraphStart", LayoutLineIsParagraphStartFieldInfo), '("resolvedDir", LayoutLineResolvedDirFieldInfo)] :: [(Symbol, *)])-#endif---- method LayoutLine::get_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the extents of\n the glyph string as drawn, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the logical\n extents of the glyph string, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_line_get_extents" pango_layout_line_get_extents :: - Ptr LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Computes the logical and ink extents of a layout line. See-'GI.Pango.Objects.Font.fontGetGlyphExtents' for details about the interpretation-of the rectangles.--}-layoutLineGetExtents ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutLineGetExtents line = liftIO $ do- line' <- unsafeManagedPtrGetPtr line- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_line_get_extents line' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr line- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutLineGetExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m) => O.MethodInfo LayoutLineGetExtentsMethodInfo LayoutLine signature where- overloadedMethod _ = layoutLineGetExtents--#endif---- method LayoutLine::get_pixel_extents--- method type : OrdinaryMethod--- Args : [Arg {argCName = "layout_line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ink_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the extents of\n the glyph string as drawn, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing},Arg {argCName = "logical_rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "rectangle used to store the logical\n extents of the glyph string, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_line_get_pixel_extents" pango_layout_line_get_pixel_extents :: - Ptr LayoutLine -> -- layout_line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- Ptr Pango.Rectangle.Rectangle -> -- ink_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- Ptr Pango.Rectangle.Rectangle -> -- logical_rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-Computes the logical and ink extents of /@layoutLine@/ in device units.-This function just calls 'GI.Pango.Structs.LayoutLine.layoutLineGetExtents' followed by-two 'GI.Pango.Functions.extentsToPixels' calls, rounding /@inkRect@/ and /@logicalRect@/-such that the rounded rectangles fully contain the unrounded one (that is,-passes them as first argument to 'GI.Pango.Functions.extentsToPixels').--}-layoutLineGetPixelExtents ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutLine- {- ^ /@layoutLine@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))-layoutLineGetPixelExtents layoutLine = liftIO $ do- layoutLine' <- unsafeManagedPtrGetPtr layoutLine- inkRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- logicalRect <- callocBytes 16 :: IO (Ptr Pango.Rectangle.Rectangle)- pango_layout_line_get_pixel_extents layoutLine' inkRect logicalRect- inkRect' <- (wrapPtr Pango.Rectangle.Rectangle) inkRect- logicalRect' <- (wrapPtr Pango.Rectangle.Rectangle) logicalRect- touchManagedPtr layoutLine- return (inkRect', logicalRect')--#if ENABLE_OVERLOADING-data LayoutLineGetPixelExtentsMethodInfo-instance (signature ~ (m ((Pango.Rectangle.Rectangle, Pango.Rectangle.Rectangle))), MonadIO m) => O.MethodInfo LayoutLineGetPixelExtentsMethodInfo LayoutLine signature where- overloadedMethod _ = layoutLineGetPixelExtents--#endif---- method LayoutLine::get_x_ranges--- method type : OrdinaryMethod--- Args : [Arg {argCName = "line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Start byte index of the logical range. If this value\n is less than the start index for the line, then\n the first range will extend all the way to the leading\n edge of the layout. Otherwise it will start at the\n leading edge of the first character.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "end_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Ending byte index of the logical range. If this value\n is greater than the end index for the line, then\n the last range will extend all the way to the trailing\n edge of the layout. Otherwise, it will end at the\n trailing edge of the last character.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ranges", argType = TCArray False (-1) 4 (TBasicType TInt), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to store a pointer to an array of ranges.\n The array will be of length <literal>2*n_ranges</literal>,\n with each range starting at <literal>(*ranges)[2*n]</literal>\n and of width <literal>(*ranges)[2*n + 1] - (*ranges)[2*n]</literal>.\n This array must be freed with g_free(). The coordinates are relative\n to the layout and are in Pango units.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "n_ranges", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The number of ranges stored in @ranges.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : [Arg {argCName = "n_ranges", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The number of ranges stored in @ranges.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_line_get_x_ranges" pango_layout_line_get_x_ranges :: - Ptr LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- Int32 -> -- start_index : TBasicType TInt- Int32 -> -- end_index : TBasicType TInt- Ptr (Ptr Int32) -> -- ranges : TCArray False (-1) 4 (TBasicType TInt)- Ptr Int32 -> -- n_ranges : TBasicType TInt- IO ()--{- |-Gets a list of visual ranges corresponding to a given logical range.-This list is not necessarily minimal - there may be consecutive-ranges which are adjacent. The ranges will be sorted from left to-right. The ranges are with respect to the left edge of the entire-layout, not with respect to the line.--}-layoutLineGetXRanges ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> Int32- {- ^ /@startIndex@/: Start byte index of the logical range. If this value- is less than the start index for the line, then- the first range will extend all the way to the leading- edge of the layout. Otherwise it will start at the- leading edge of the first character. -}- -> Int32- {- ^ /@endIndex@/: Ending byte index of the logical range. If this value- is greater than the end index for the line, then- the last range will extend all the way to the trailing- edge of the layout. Otherwise, it will end at the- trailing edge of the last character. -}- -> m ([Int32])-layoutLineGetXRanges line startIndex endIndex = liftIO $ do- line' <- unsafeManagedPtrGetPtr line- ranges <- allocMem :: IO (Ptr (Ptr Int32))- nRanges <- allocMem :: IO (Ptr Int32)- pango_layout_line_get_x_ranges line' startIndex endIndex ranges nRanges- nRanges' <- peek nRanges- ranges' <- peek ranges- ranges'' <- (unpackStorableArrayWithLength nRanges') ranges'- freeMem ranges'- touchManagedPtr line- freeMem ranges- freeMem nRanges- return ranges''--#if ENABLE_OVERLOADING-data LayoutLineGetXRangesMethodInfo-instance (signature ~ (Int32 -> Int32 -> m ([Int32])), MonadIO m) => O.MethodInfo LayoutLineGetXRangesMethodInfo LayoutLine signature where- overloadedMethod _ = layoutLineGetXRanges--#endif---- method LayoutLine::index_to_x--- method type : OrdinaryMethod--- Args : [Arg {argCName = "line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "byte offset of a grapheme within the layout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "trailing", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an integer indicating the edge of the grapheme to retrieve\n the position of. If > 0, the trailing edge of the grapheme,\n if 0, the leading of the grapheme.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x_pos", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the x_offset (in Pango unit)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_line_index_to_x" pango_layout_line_index_to_x :: - Ptr LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- Int32 -> -- index_ : TBasicType TInt- CInt -> -- trailing : TBasicType TBoolean- Ptr Int32 -> -- x_pos : TBasicType TInt- IO ()--{- |-Converts an index within a line to a X position.--}-layoutLineIndexToX ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> Int32- {- ^ /@index_@/: byte offset of a grapheme within the layout -}- -> Bool- {- ^ /@trailing@/: an integer indicating the edge of the grapheme to retrieve- the position of. If > 0, the trailing edge of the grapheme,- if 0, the leading of the grapheme. -}- -> m (Int32)-layoutLineIndexToX line index_ trailing = liftIO $ do- line' <- unsafeManagedPtrGetPtr line- let trailing' = (fromIntegral . fromEnum) trailing- xPos <- allocMem :: IO (Ptr Int32)- pango_layout_line_index_to_x line' index_ trailing' xPos- xPos' <- peek xPos- touchManagedPtr line- freeMem xPos- return xPos'--#if ENABLE_OVERLOADING-data LayoutLineIndexToXMethodInfo-instance (signature ~ (Int32 -> Bool -> m (Int32)), MonadIO m) => O.MethodInfo LayoutLineIndexToXMethodInfo LayoutLine signature where- overloadedMethod _ = layoutLineIndexToX--#endif---- method LayoutLine::ref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "LayoutLine"}))--- throws : False--- Skip return : False--foreign import ccall "pango_layout_line_ref" pango_layout_line_ref :: - Ptr LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- IO (Ptr LayoutLine)--{- |-Increase the reference count of a 'GI.Pango.Structs.LayoutLine.LayoutLine' by one.--/Since: 1.10/--}-layoutLineRef ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine', may be 'Nothing' -}- -> m LayoutLine- {- ^ __Returns:__ the line passed in. -}-layoutLineRef line = liftIO $ do- line' <- unsafeManagedPtrGetPtr line- result <- pango_layout_line_ref line'- checkUnexpectedReturnNULL "layoutLineRef" result- result' <- (wrapBoxed LayoutLine) result- touchManagedPtr line- return result'--#if ENABLE_OVERLOADING-data LayoutLineRefMethodInfo-instance (signature ~ (m LayoutLine), MonadIO m) => O.MethodInfo LayoutLineRefMethodInfo LayoutLine signature where- overloadedMethod _ = layoutLineRef--#endif---- method LayoutLine::unref--- method type : OrdinaryMethod--- Args : [Arg {argCName = "line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_layout_line_unref" pango_layout_line_unref :: - Ptr LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- IO ()--{- |-Decrease the reference count of a 'GI.Pango.Structs.LayoutLine.LayoutLine' by one.-If the result is zero, the line and all associated memory-will be freed.--}-layoutLineUnref ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> m ()-layoutLineUnref line = liftIO $ do- line' <- unsafeManagedPtrGetPtr line- pango_layout_line_unref line'- touchManagedPtr line- return ()--#if ENABLE_OVERLOADING-data LayoutLineUnrefMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo LayoutLineUnrefMethodInfo LayoutLine signature where- overloadedMethod _ = layoutLineUnref--#endif---- method LayoutLine::x_to_index--- method type : OrdinaryMethod--- Args : [Arg {argCName = "line", argType = TInterface (Name {namespace = "Pango", name = "LayoutLine"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoLayoutLine", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x_pos", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the X offset (in Pango units)\n from the left edge of the line.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index_", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store calculated byte index for\n the grapheme in which the user clicked.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "trailing", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store an integer indicating where\n in the grapheme the user clicked. It will either\n be zero, or the number of characters in the\n grapheme. 0 represents the leading edge of the grapheme.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_layout_line_x_to_index" pango_layout_line_x_to_index :: - Ptr LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- Int32 -> -- x_pos : TBasicType TInt- Ptr Int32 -> -- index_ : TBasicType TInt- Ptr Int32 -> -- trailing : TBasicType TInt- IO CInt--{- |-Converts from x offset to the byte index of the corresponding-character within the text of the layout. If /@xPos@/ is outside the line,-/@index_@/ and /@trailing@/ will point to the very first or very last position-in the line. This determination is based on the resolved direction-of the paragraph; for example, if the resolved direction is-right-to-left, then an X position to the right of the line (after it)-results in 0 being stored in /@index_@/ and /@trailing@/. An X position to the-left of the line results in /@index_@/ pointing to the (logical) last-grapheme in the line and /@trailing@/ being set to the number of characters-in that grapheme. The reverse is true for a left-to-right line.--}-layoutLineXToIndex ::- (B.CallStack.HasCallStack, MonadIO m) =>- LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> Int32- {- ^ /@xPos@/: the X offset (in Pango units)- from the left edge of the line. -}- -> m ((Bool, Int32, Int32))- {- ^ __Returns:__ 'False' if /@xPos@/ was outside the line, 'True' if inside -}-layoutLineXToIndex line xPos = liftIO $ do- line' <- unsafeManagedPtrGetPtr line- index_ <- allocMem :: IO (Ptr Int32)- trailing <- allocMem :: IO (Ptr Int32)- result <- pango_layout_line_x_to_index line' xPos index_ trailing- let result' = (/= 0) result- index_' <- peek index_- trailing' <- peek trailing- touchManagedPtr line- freeMem index_- freeMem trailing- return (result', index_', trailing')--#if ENABLE_OVERLOADING-data LayoutLineXToIndexMethodInfo-instance (signature ~ (Int32 -> m ((Bool, Int32, Int32))), MonadIO m) => O.MethodInfo LayoutLineXToIndexMethodInfo LayoutLine signature where- overloadedMethod _ = layoutLineXToIndex--#endif--#if ENABLE_OVERLOADING-type family ResolveLayoutLineMethod (t :: Symbol) (o :: *) :: * where- ResolveLayoutLineMethod "indexToX" o = LayoutLineIndexToXMethodInfo- ResolveLayoutLineMethod "ref" o = LayoutLineRefMethodInfo- ResolveLayoutLineMethod "unref" o = LayoutLineUnrefMethodInfo- ResolveLayoutLineMethod "xToIndex" o = LayoutLineXToIndexMethodInfo- ResolveLayoutLineMethod "getExtents" o = LayoutLineGetExtentsMethodInfo- ResolveLayoutLineMethod "getPixelExtents" o = LayoutLineGetPixelExtentsMethodInfo- ResolveLayoutLineMethod "getXRanges" o = LayoutLineGetXRangesMethodInfo- ResolveLayoutLineMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveLayoutLineMethod t LayoutLine, O.MethodInfo info LayoutLine p) => OL.IsLabel t (LayoutLine -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/LayoutLine.hs-boot
@@ -1,47 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.LayoutLine where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype LayoutLine = LayoutLine (ManagedPtr LayoutLine)-instance BoxedObject LayoutLine where-#if ENABLE_OVERLOADING-data LayoutLineGetExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutLineGetPixelExtentsMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutLineGetXRangesMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutLineIndexToXMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutLineRefMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutLineUnrefMethodInfo-#endif-#if ENABLE_OVERLOADING-data LayoutLineXToIndexMethodInfo-#endif
− GI/Pango/Structs/LogAttr.hs
@@ -1,841 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.LogAttr.LogAttr' structure stores information-about the attributes of a single character.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.LogAttr- ( ---- * Exported types- LogAttr(..) ,- newZeroLogAttr ,- noLogAttr ,--- -- * Properties--- ** backspaceDeletesCharacter #attr:backspaceDeletesCharacter#-{- | if set, backspace deletes one character-rather than the entire grapheme cluster. This-field is only meaningful on grapheme-boundaries (where /@isCursorPosition@/ is-set). In some languages, the full grapheme-(e.g. letter + diacritics) is considered a-unit, while in others, each decomposed-character in the grapheme is a unit. In the-default implementation of 'GI.Pango.Functions.break', this-bit is set on all grapheme boundaries except-those following Latin, Cyrillic or Greek base characters.--}- getLogAttrBackspaceDeletesCharacter ,-#if ENABLE_OVERLOADING- logAttr_backspaceDeletesCharacter ,-#endif- setLogAttrBackspaceDeletesCharacter ,----- ** isCharBreak #attr:isCharBreak#-{- | if set, can break here when doing character wrapping--}- getLogAttrIsCharBreak ,-#if ENABLE_OVERLOADING- logAttr_isCharBreak ,-#endif- setLogAttrIsCharBreak ,----- ** isCursorPosition #attr:isCursorPosition#-{- | if set, cursor can appear in front of character.-i.e. this is a grapheme boundary, or the first character-in the text.-This flag implements Unicode\'s-\<ulink url=\"http:\/\/www.unicode.org\/reports\/tr29\/\">Grapheme-Cluster Boundaries\<\/ulink> semantics.--}- getLogAttrIsCursorPosition ,-#if ENABLE_OVERLOADING- logAttr_isCursorPosition ,-#endif- setLogAttrIsCursorPosition ,----- ** isExpandableSpace #attr:isExpandableSpace#-{- | is a whitespace character that can possibly be-expanded for justification purposes. (Since: 1.18)--}- getLogAttrIsExpandableSpace ,-#if ENABLE_OVERLOADING- logAttr_isExpandableSpace ,-#endif- setLogAttrIsExpandableSpace ,----- ** isLineBreak #attr:isLineBreak#-{- | if set, can break line in front of character--}- getLogAttrIsLineBreak ,-#if ENABLE_OVERLOADING- logAttr_isLineBreak ,-#endif- setLogAttrIsLineBreak ,----- ** isMandatoryBreak #attr:isMandatoryBreak#-{- | if set, must break line in front of character--}- getLogAttrIsMandatoryBreak ,-#if ENABLE_OVERLOADING- logAttr_isMandatoryBreak ,-#endif- setLogAttrIsMandatoryBreak ,----- ** isSentenceBoundary #attr:isSentenceBoundary#-{- | is a sentence boundary.-There are two ways to divide sentences. The first assigns all-inter-sentence whitespace\/control\/format chars to some sentence,-so all chars are in some sentence; /@isSentenceBoundary@/ denotes-the boundaries there. The second way doesn\'t assign-between-sentence spaces, etc. to any sentence, so-/@isSentenceStart@/\//@isSentenceEnd@/ mark the boundaries of those sentences.--}- getLogAttrIsSentenceBoundary ,-#if ENABLE_OVERLOADING- logAttr_isSentenceBoundary ,-#endif- setLogAttrIsSentenceBoundary ,----- ** isSentenceEnd #attr:isSentenceEnd#-{- | is first char after a sentence.-Note that in degenerate cases, you could have both /@isSentenceStart@/-and /@isSentenceEnd@/ set for some character. (e.g. no space after a-period, so the next sentence starts right away)--}- getLogAttrIsSentenceEnd ,-#if ENABLE_OVERLOADING- logAttr_isSentenceEnd ,-#endif- setLogAttrIsSentenceEnd ,----- ** isSentenceStart #attr:isSentenceStart#-{- | is first character in a sentence--}- getLogAttrIsSentenceStart ,-#if ENABLE_OVERLOADING- logAttr_isSentenceStart ,-#endif- setLogAttrIsSentenceStart ,----- ** isWhite #attr:isWhite#-{- | is whitespace character--}- getLogAttrIsWhite ,-#if ENABLE_OVERLOADING- logAttr_isWhite ,-#endif- setLogAttrIsWhite ,----- ** isWordBoundary #attr:isWordBoundary#-{- | is a word boundary.-More specifically, means that this is not a position in the middle-of a word. For example, both sides of a punctuation mark are-considered word boundaries. This flag is particularly useful when-selecting text word-by-word.-This flag implements Unicode\'s-\<ulink url=\"http:\/\/www.unicode.org\/reports\/tr29\/\">Word-Boundaries\<\/ulink> semantics. (Since: 1.22)--}- getLogAttrIsWordBoundary ,-#if ENABLE_OVERLOADING- logAttr_isWordBoundary ,-#endif- setLogAttrIsWordBoundary ,----- ** isWordEnd #attr:isWordEnd#-{- | is first non-word char after a word-Note that in degenerate cases, you could have both /@isWordStart@/-and /@isWordEnd@/ set for some character.--}- getLogAttrIsWordEnd ,-#if ENABLE_OVERLOADING- logAttr_isWordEnd ,-#endif- setLogAttrIsWordEnd ,----- ** isWordStart #attr:isWordStart#-{- | is first character in a word--}- getLogAttrIsWordStart ,-#if ENABLE_OVERLOADING- logAttr_isWordStart ,-#endif- setLogAttrIsWordStart ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype LogAttr = LogAttr (ManagedPtr LogAttr)-instance WrappedPtr LogAttr where- wrappedPtrCalloc = callocBytes 52- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 52 >=> wrapPtr LogAttr)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `LogAttr` struct initialized to zero.-newZeroLogAttr :: MonadIO m => m LogAttr-newZeroLogAttr = liftIO $ wrappedPtrCalloc >>= wrapPtr LogAttr--instance tag ~ 'AttrSet => Constructible LogAttr tag where- new _ attrs = do- o <- newZeroLogAttr- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `LogAttr`.-noLogAttr :: Maybe LogAttr-noLogAttr = Nothing--{- |-Get the value of the “@is_line_break@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isLineBreak-@--}-getLogAttrIsLineBreak :: MonadIO m => LogAttr -> m Word32-getLogAttrIsLineBreak s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Word32- return val--{- |-Set the value of the “@is_line_break@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isLineBreak 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsLineBreak :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsLineBreak s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsLineBreakFieldInfo-instance AttrInfo LogAttrIsLineBreakFieldInfo where- type AttrAllowedOps LogAttrIsLineBreakFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsLineBreakFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsLineBreakFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsLineBreakFieldInfo = Word32- type AttrLabel LogAttrIsLineBreakFieldInfo = "is_line_break"- type AttrOrigin LogAttrIsLineBreakFieldInfo = LogAttr- attrGet _ = getLogAttrIsLineBreak- attrSet _ = setLogAttrIsLineBreak- attrConstruct = undefined- attrClear _ = undefined--logAttr_isLineBreak :: AttrLabelProxy "isLineBreak"-logAttr_isLineBreak = AttrLabelProxy--#endif---{- |-Get the value of the “@is_mandatory_break@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isMandatoryBreak-@--}-getLogAttrIsMandatoryBreak :: MonadIO m => LogAttr -> m Word32-getLogAttrIsMandatoryBreak s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Word32- return val--{- |-Set the value of the “@is_mandatory_break@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isMandatoryBreak 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsMandatoryBreak :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsMandatoryBreak s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsMandatoryBreakFieldInfo-instance AttrInfo LogAttrIsMandatoryBreakFieldInfo where- type AttrAllowedOps LogAttrIsMandatoryBreakFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsMandatoryBreakFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsMandatoryBreakFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsMandatoryBreakFieldInfo = Word32- type AttrLabel LogAttrIsMandatoryBreakFieldInfo = "is_mandatory_break"- type AttrOrigin LogAttrIsMandatoryBreakFieldInfo = LogAttr- attrGet _ = getLogAttrIsMandatoryBreak- attrSet _ = setLogAttrIsMandatoryBreak- attrConstruct = undefined- attrClear _ = undefined--logAttr_isMandatoryBreak :: AttrLabelProxy "isMandatoryBreak"-logAttr_isMandatoryBreak = AttrLabelProxy--#endif---{- |-Get the value of the “@is_char_break@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isCharBreak-@--}-getLogAttrIsCharBreak :: MonadIO m => LogAttr -> m Word32-getLogAttrIsCharBreak s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Word32- return val--{- |-Set the value of the “@is_char_break@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isCharBreak 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsCharBreak :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsCharBreak s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsCharBreakFieldInfo-instance AttrInfo LogAttrIsCharBreakFieldInfo where- type AttrAllowedOps LogAttrIsCharBreakFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsCharBreakFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsCharBreakFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsCharBreakFieldInfo = Word32- type AttrLabel LogAttrIsCharBreakFieldInfo = "is_char_break"- type AttrOrigin LogAttrIsCharBreakFieldInfo = LogAttr- attrGet _ = getLogAttrIsCharBreak- attrSet _ = setLogAttrIsCharBreak- attrConstruct = undefined- attrClear _ = undefined--logAttr_isCharBreak :: AttrLabelProxy "isCharBreak"-logAttr_isCharBreak = AttrLabelProxy--#endif---{- |-Get the value of the “@is_white@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isWhite-@--}-getLogAttrIsWhite :: MonadIO m => LogAttr -> m Word32-getLogAttrIsWhite s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Word32- return val--{- |-Set the value of the “@is_white@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isWhite 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsWhite :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsWhite s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsWhiteFieldInfo-instance AttrInfo LogAttrIsWhiteFieldInfo where- type AttrAllowedOps LogAttrIsWhiteFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsWhiteFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsWhiteFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsWhiteFieldInfo = Word32- type AttrLabel LogAttrIsWhiteFieldInfo = "is_white"- type AttrOrigin LogAttrIsWhiteFieldInfo = LogAttr- attrGet _ = getLogAttrIsWhite- attrSet _ = setLogAttrIsWhite- attrConstruct = undefined- attrClear _ = undefined--logAttr_isWhite :: AttrLabelProxy "isWhite"-logAttr_isWhite = AttrLabelProxy--#endif---{- |-Get the value of the “@is_cursor_position@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isCursorPosition-@--}-getLogAttrIsCursorPosition :: MonadIO m => LogAttr -> m Word32-getLogAttrIsCursorPosition s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO Word32- return val--{- |-Set the value of the “@is_cursor_position@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isCursorPosition 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsCursorPosition :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsCursorPosition s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 16) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsCursorPositionFieldInfo-instance AttrInfo LogAttrIsCursorPositionFieldInfo where- type AttrAllowedOps LogAttrIsCursorPositionFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsCursorPositionFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsCursorPositionFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsCursorPositionFieldInfo = Word32- type AttrLabel LogAttrIsCursorPositionFieldInfo = "is_cursor_position"- type AttrOrigin LogAttrIsCursorPositionFieldInfo = LogAttr- attrGet _ = getLogAttrIsCursorPosition- attrSet _ = setLogAttrIsCursorPosition- attrConstruct = undefined- attrClear _ = undefined--logAttr_isCursorPosition :: AttrLabelProxy "isCursorPosition"-logAttr_isCursorPosition = AttrLabelProxy--#endif---{- |-Get the value of the “@is_word_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isWordStart-@--}-getLogAttrIsWordStart :: MonadIO m => LogAttr -> m Word32-getLogAttrIsWordStart s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 20) :: IO Word32- return val--{- |-Set the value of the “@is_word_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isWordStart 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsWordStart :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsWordStart s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 20) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsWordStartFieldInfo-instance AttrInfo LogAttrIsWordStartFieldInfo where- type AttrAllowedOps LogAttrIsWordStartFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsWordStartFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsWordStartFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsWordStartFieldInfo = Word32- type AttrLabel LogAttrIsWordStartFieldInfo = "is_word_start"- type AttrOrigin LogAttrIsWordStartFieldInfo = LogAttr- attrGet _ = getLogAttrIsWordStart- attrSet _ = setLogAttrIsWordStart- attrConstruct = undefined- attrClear _ = undefined--logAttr_isWordStart :: AttrLabelProxy "isWordStart"-logAttr_isWordStart = AttrLabelProxy--#endif---{- |-Get the value of the “@is_word_end@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isWordEnd-@--}-getLogAttrIsWordEnd :: MonadIO m => LogAttr -> m Word32-getLogAttrIsWordEnd s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO Word32- return val--{- |-Set the value of the “@is_word_end@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isWordEnd 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsWordEnd :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsWordEnd s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 24) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsWordEndFieldInfo-instance AttrInfo LogAttrIsWordEndFieldInfo where- type AttrAllowedOps LogAttrIsWordEndFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsWordEndFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsWordEndFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsWordEndFieldInfo = Word32- type AttrLabel LogAttrIsWordEndFieldInfo = "is_word_end"- type AttrOrigin LogAttrIsWordEndFieldInfo = LogAttr- attrGet _ = getLogAttrIsWordEnd- attrSet _ = setLogAttrIsWordEnd- attrConstruct = undefined- attrClear _ = undefined--logAttr_isWordEnd :: AttrLabelProxy "isWordEnd"-logAttr_isWordEnd = AttrLabelProxy--#endif---{- |-Get the value of the “@is_sentence_boundary@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isSentenceBoundary-@--}-getLogAttrIsSentenceBoundary :: MonadIO m => LogAttr -> m Word32-getLogAttrIsSentenceBoundary s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 28) :: IO Word32- return val--{- |-Set the value of the “@is_sentence_boundary@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isSentenceBoundary 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsSentenceBoundary :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsSentenceBoundary s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 28) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsSentenceBoundaryFieldInfo-instance AttrInfo LogAttrIsSentenceBoundaryFieldInfo where- type AttrAllowedOps LogAttrIsSentenceBoundaryFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsSentenceBoundaryFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsSentenceBoundaryFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsSentenceBoundaryFieldInfo = Word32- type AttrLabel LogAttrIsSentenceBoundaryFieldInfo = "is_sentence_boundary"- type AttrOrigin LogAttrIsSentenceBoundaryFieldInfo = LogAttr- attrGet _ = getLogAttrIsSentenceBoundary- attrSet _ = setLogAttrIsSentenceBoundary- attrConstruct = undefined- attrClear _ = undefined--logAttr_isSentenceBoundary :: AttrLabelProxy "isSentenceBoundary"-logAttr_isSentenceBoundary = AttrLabelProxy--#endif---{- |-Get the value of the “@is_sentence_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isSentenceStart-@--}-getLogAttrIsSentenceStart :: MonadIO m => LogAttr -> m Word32-getLogAttrIsSentenceStart s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO Word32- return val--{- |-Set the value of the “@is_sentence_start@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isSentenceStart 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsSentenceStart :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsSentenceStart s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 32) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsSentenceStartFieldInfo-instance AttrInfo LogAttrIsSentenceStartFieldInfo where- type AttrAllowedOps LogAttrIsSentenceStartFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsSentenceStartFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsSentenceStartFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsSentenceStartFieldInfo = Word32- type AttrLabel LogAttrIsSentenceStartFieldInfo = "is_sentence_start"- type AttrOrigin LogAttrIsSentenceStartFieldInfo = LogAttr- attrGet _ = getLogAttrIsSentenceStart- attrSet _ = setLogAttrIsSentenceStart- attrConstruct = undefined- attrClear _ = undefined--logAttr_isSentenceStart :: AttrLabelProxy "isSentenceStart"-logAttr_isSentenceStart = AttrLabelProxy--#endif---{- |-Get the value of the “@is_sentence_end@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isSentenceEnd-@--}-getLogAttrIsSentenceEnd :: MonadIO m => LogAttr -> m Word32-getLogAttrIsSentenceEnd s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 36) :: IO Word32- return val--{- |-Set the value of the “@is_sentence_end@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isSentenceEnd 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsSentenceEnd :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsSentenceEnd s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 36) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsSentenceEndFieldInfo-instance AttrInfo LogAttrIsSentenceEndFieldInfo where- type AttrAllowedOps LogAttrIsSentenceEndFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsSentenceEndFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsSentenceEndFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsSentenceEndFieldInfo = Word32- type AttrLabel LogAttrIsSentenceEndFieldInfo = "is_sentence_end"- type AttrOrigin LogAttrIsSentenceEndFieldInfo = LogAttr- attrGet _ = getLogAttrIsSentenceEnd- attrSet _ = setLogAttrIsSentenceEnd- attrConstruct = undefined- attrClear _ = undefined--logAttr_isSentenceEnd :: AttrLabelProxy "isSentenceEnd"-logAttr_isSentenceEnd = AttrLabelProxy--#endif---{- |-Get the value of the “@backspace_deletes_character@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #backspaceDeletesCharacter-@--}-getLogAttrBackspaceDeletesCharacter :: MonadIO m => LogAttr -> m Word32-getLogAttrBackspaceDeletesCharacter s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 40) :: IO Word32- return val--{- |-Set the value of the “@backspace_deletes_character@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #backspaceDeletesCharacter 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrBackspaceDeletesCharacter :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrBackspaceDeletesCharacter s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 40) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrBackspaceDeletesCharacterFieldInfo-instance AttrInfo LogAttrBackspaceDeletesCharacterFieldInfo where- type AttrAllowedOps LogAttrBackspaceDeletesCharacterFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrBackspaceDeletesCharacterFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrBackspaceDeletesCharacterFieldInfo = (~) LogAttr- type AttrGetType LogAttrBackspaceDeletesCharacterFieldInfo = Word32- type AttrLabel LogAttrBackspaceDeletesCharacterFieldInfo = "backspace_deletes_character"- type AttrOrigin LogAttrBackspaceDeletesCharacterFieldInfo = LogAttr- attrGet _ = getLogAttrBackspaceDeletesCharacter- attrSet _ = setLogAttrBackspaceDeletesCharacter- attrConstruct = undefined- attrClear _ = undefined--logAttr_backspaceDeletesCharacter :: AttrLabelProxy "backspaceDeletesCharacter"-logAttr_backspaceDeletesCharacter = AttrLabelProxy--#endif---{- |-Get the value of the “@is_expandable_space@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isExpandableSpace-@--}-getLogAttrIsExpandableSpace :: MonadIO m => LogAttr -> m Word32-getLogAttrIsExpandableSpace s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 44) :: IO Word32- return val--{- |-Set the value of the “@is_expandable_space@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isExpandableSpace 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsExpandableSpace :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsExpandableSpace s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 44) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsExpandableSpaceFieldInfo-instance AttrInfo LogAttrIsExpandableSpaceFieldInfo where- type AttrAllowedOps LogAttrIsExpandableSpaceFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsExpandableSpaceFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsExpandableSpaceFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsExpandableSpaceFieldInfo = Word32- type AttrLabel LogAttrIsExpandableSpaceFieldInfo = "is_expandable_space"- type AttrOrigin LogAttrIsExpandableSpaceFieldInfo = LogAttr- attrGet _ = getLogAttrIsExpandableSpace- attrSet _ = setLogAttrIsExpandableSpace- attrConstruct = undefined- attrClear _ = undefined--logAttr_isExpandableSpace :: AttrLabelProxy "isExpandableSpace"-logAttr_isExpandableSpace = AttrLabelProxy--#endif---{- |-Get the value of the “@is_word_boundary@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' logAttr #isWordBoundary-@--}-getLogAttrIsWordBoundary :: MonadIO m => LogAttr -> m Word32-getLogAttrIsWordBoundary s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 48) :: IO Word32- return val--{- |-Set the value of the “@is_word_boundary@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' logAttr [ #isWordBoundary 'Data.GI.Base.Attributes.:=' value ]-@--}-setLogAttrIsWordBoundary :: MonadIO m => LogAttr -> Word32 -> m ()-setLogAttrIsWordBoundary s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 48) (val :: Word32)--#if ENABLE_OVERLOADING-data LogAttrIsWordBoundaryFieldInfo-instance AttrInfo LogAttrIsWordBoundaryFieldInfo where- type AttrAllowedOps LogAttrIsWordBoundaryFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint LogAttrIsWordBoundaryFieldInfo = (~) Word32- type AttrBaseTypeConstraint LogAttrIsWordBoundaryFieldInfo = (~) LogAttr- type AttrGetType LogAttrIsWordBoundaryFieldInfo = Word32- type AttrLabel LogAttrIsWordBoundaryFieldInfo = "is_word_boundary"- type AttrOrigin LogAttrIsWordBoundaryFieldInfo = LogAttr- attrGet _ = getLogAttrIsWordBoundary- attrSet _ = setLogAttrIsWordBoundary- attrConstruct = undefined- attrClear _ = undefined--logAttr_isWordBoundary :: AttrLabelProxy "isWordBoundary"-logAttr_isWordBoundary = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList LogAttr-type instance O.AttributeList LogAttr = LogAttrAttributeList-type LogAttrAttributeList = ('[ '("isLineBreak", LogAttrIsLineBreakFieldInfo), '("isMandatoryBreak", LogAttrIsMandatoryBreakFieldInfo), '("isCharBreak", LogAttrIsCharBreakFieldInfo), '("isWhite", LogAttrIsWhiteFieldInfo), '("isCursorPosition", LogAttrIsCursorPositionFieldInfo), '("isWordStart", LogAttrIsWordStartFieldInfo), '("isWordEnd", LogAttrIsWordEndFieldInfo), '("isSentenceBoundary", LogAttrIsSentenceBoundaryFieldInfo), '("isSentenceStart", LogAttrIsSentenceStartFieldInfo), '("isSentenceEnd", LogAttrIsSentenceEndFieldInfo), '("backspaceDeletesCharacter", LogAttrBackspaceDeletesCharacterFieldInfo), '("isExpandableSpace", LogAttrIsExpandableSpaceFieldInfo), '("isWordBoundary", LogAttrIsWordBoundaryFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveLogAttrMethod (t :: Symbol) (o :: *) :: * where- ResolveLogAttrMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveLogAttrMethod t LogAttr, O.MethodInfo info LogAttr p) => OL.IsLabel t (LogAttr -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/LogAttr.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.LogAttr where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype LogAttr = LogAttr (ManagedPtr LogAttr)-instance WrappedPtr LogAttr where
− GI/Pango/Structs/Map.hs
@@ -1,77 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--/No description available in the introspection data./--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Map- ( ---- * Exported types- Map(..) ,- noMap ,--- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype Map = Map (ManagedPtr Map)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr Map where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing---- | A convenience alias for `Nothing` :: `Maybe` `Map`.-noMap :: Maybe Map-noMap = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList Map-type instance O.AttributeList Map = MapAttributeList-type MapAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveMapMethod (t :: Symbol) (o :: *) :: * where- ResolveMapMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveMapMethod t Map, O.MethodInfo info Map p) => OL.IsLabel t (Map -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Map.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Map where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Map = Map (ManagedPtr Map)-instance WrappedPtr Map where
− GI/Pango/Structs/MapEntry.hs
@@ -1,77 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--/No description available in the introspection data./--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.MapEntry- ( ---- * Exported types- MapEntry(..) ,- noMapEntry ,--- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype MapEntry = MapEntry (ManagedPtr MapEntry)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr MapEntry where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing---- | A convenience alias for `Nothing` :: `Maybe` `MapEntry`.-noMapEntry :: Maybe MapEntry-noMapEntry = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList MapEntry-type instance O.AttributeList MapEntry = MapEntryAttributeList-type MapEntryAttributeList = ('[ ] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveMapEntryMethod (t :: Symbol) (o :: *) :: * where- ResolveMapEntryMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveMapEntryMethod t MapEntry, O.MethodInfo info MapEntry p) => OL.IsLabel t (MapEntry -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/MapEntry.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.MapEntry where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype MapEntry = MapEntry (ManagedPtr MapEntry)-instance WrappedPtr MapEntry where
− GI/Pango/Structs/Matrix.hs
@@ -1,1062 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A structure specifying a transformation between user-space-coordinates and device coordinates. The transformation-is given by--\<programlisting>-x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;-y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;-\<\/programlisting>--/Since: 1.6/--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Matrix- ( ---- * Exported types- Matrix(..) ,- newZeroMatrix ,- noMatrix ,--- -- * Methods--- ** concat #method:concat#--#if ENABLE_OVERLOADING- MatrixConcatMethodInfo ,-#endif- matrixConcat ,----- ** copy #method:copy#--#if ENABLE_OVERLOADING- MatrixCopyMethodInfo ,-#endif- matrixCopy ,----- ** free #method:free#--#if ENABLE_OVERLOADING- MatrixFreeMethodInfo ,-#endif- matrixFree ,----- ** getFontScaleFactor #method:getFontScaleFactor#--#if ENABLE_OVERLOADING- MatrixGetFontScaleFactorMethodInfo ,-#endif- matrixGetFontScaleFactor ,----- ** getFontScaleFactors #method:getFontScaleFactors#--#if ENABLE_OVERLOADING- MatrixGetFontScaleFactorsMethodInfo ,-#endif- matrixGetFontScaleFactors ,----- ** rotate #method:rotate#--#if ENABLE_OVERLOADING- MatrixRotateMethodInfo ,-#endif- matrixRotate ,----- ** scale #method:scale#--#if ENABLE_OVERLOADING- MatrixScaleMethodInfo ,-#endif- matrixScale ,----- ** transformDistance #method:transformDistance#--#if ENABLE_OVERLOADING- MatrixTransformDistanceMethodInfo ,-#endif- matrixTransformDistance ,----- ** transformPixelRectangle #method:transformPixelRectangle#--#if ENABLE_OVERLOADING- MatrixTransformPixelRectangleMethodInfo ,-#endif- matrixTransformPixelRectangle ,----- ** transformPoint #method:transformPoint#--#if ENABLE_OVERLOADING- MatrixTransformPointMethodInfo ,-#endif- matrixTransformPoint ,----- ** translate #method:translate#--#if ENABLE_OVERLOADING- MatrixTranslateMethodInfo ,-#endif- matrixTranslate ,----- -- * Properties--- ** x0 #attr:x0#-{- | x translation--}- getMatrixX0 ,-#if ENABLE_OVERLOADING- matrix_x0 ,-#endif- setMatrixX0 ,----- ** xx #attr:xx#-{- | 1st component of the transformation matrix--}- getMatrixXx ,-#if ENABLE_OVERLOADING- matrix_xx ,-#endif- setMatrixXx ,----- ** xy #attr:xy#-{- | 2nd component of the transformation matrix--}- getMatrixXy ,-#if ENABLE_OVERLOADING- matrix_xy ,-#endif- setMatrixXy ,----- ** y0 #attr:y0#-{- | y translation--}- getMatrixY0 ,-#if ENABLE_OVERLOADING- matrix_y0 ,-#endif- setMatrixY0 ,----- ** yx #attr:yx#-{- | 3rd component of the transformation matrix--}- getMatrixYx ,-#if ENABLE_OVERLOADING- matrix_yx ,-#endif- setMatrixYx ,----- ** yy #attr:yy#-{- | 4th component of the transformation matrix--}- getMatrixYy ,-#if ENABLE_OVERLOADING- matrix_yy ,-#endif- setMatrixYy ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Structs.Rectangle as Pango.Rectangle---- | Memory-managed wrapper type.-newtype Matrix = Matrix (ManagedPtr Matrix)-foreign import ccall "pango_matrix_get_type" c_pango_matrix_get_type :: - IO GType--instance BoxedObject Matrix where- boxedType _ = c_pango_matrix_get_type---- | Construct a `Matrix` struct initialized to zero.-newZeroMatrix :: MonadIO m => m Matrix-newZeroMatrix = liftIO $ callocBoxedBytes 48 >>= wrapBoxed Matrix--instance tag ~ 'AttrSet => Constructible Matrix tag where- new _ attrs = do- o <- newZeroMatrix- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `Matrix`.-noMatrix :: Maybe Matrix-noMatrix = Nothing--{- |-Get the value of the “@xx@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' matrix #xx-@--}-getMatrixXx :: MonadIO m => Matrix -> m Double-getMatrixXx s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO CDouble- let val' = realToFrac val- return val'--{- |-Set the value of the “@xx@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' matrix [ #xx 'Data.GI.Base.Attributes.:=' value ]-@--}-setMatrixXx :: MonadIO m => Matrix -> Double -> m ()-setMatrixXx s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 0) (val' :: CDouble)--#if ENABLE_OVERLOADING-data MatrixXxFieldInfo-instance AttrInfo MatrixXxFieldInfo where- type AttrAllowedOps MatrixXxFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint MatrixXxFieldInfo = (~) Double- type AttrBaseTypeConstraint MatrixXxFieldInfo = (~) Matrix- type AttrGetType MatrixXxFieldInfo = Double- type AttrLabel MatrixXxFieldInfo = "xx"- type AttrOrigin MatrixXxFieldInfo = Matrix- attrGet _ = getMatrixXx- attrSet _ = setMatrixXx- attrConstruct = undefined- attrClear _ = undefined--matrix_xx :: AttrLabelProxy "xx"-matrix_xx = AttrLabelProxy--#endif---{- |-Get the value of the “@xy@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' matrix #xy-@--}-getMatrixXy :: MonadIO m => Matrix -> m Double-getMatrixXy s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO CDouble- let val' = realToFrac val- return val'--{- |-Set the value of the “@xy@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' matrix [ #xy 'Data.GI.Base.Attributes.:=' value ]-@--}-setMatrixXy :: MonadIO m => Matrix -> Double -> m ()-setMatrixXy s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 8) (val' :: CDouble)--#if ENABLE_OVERLOADING-data MatrixXyFieldInfo-instance AttrInfo MatrixXyFieldInfo where- type AttrAllowedOps MatrixXyFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint MatrixXyFieldInfo = (~) Double- type AttrBaseTypeConstraint MatrixXyFieldInfo = (~) Matrix- type AttrGetType MatrixXyFieldInfo = Double- type AttrLabel MatrixXyFieldInfo = "xy"- type AttrOrigin MatrixXyFieldInfo = Matrix- attrGet _ = getMatrixXy- attrSet _ = setMatrixXy- attrConstruct = undefined- attrClear _ = undefined--matrix_xy :: AttrLabelProxy "xy"-matrix_xy = AttrLabelProxy--#endif---{- |-Get the value of the “@yx@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' matrix #yx-@--}-getMatrixYx :: MonadIO m => Matrix -> m Double-getMatrixYx s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 16) :: IO CDouble- let val' = realToFrac val- return val'--{- |-Set the value of the “@yx@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' matrix [ #yx 'Data.GI.Base.Attributes.:=' value ]-@--}-setMatrixYx :: MonadIO m => Matrix -> Double -> m ()-setMatrixYx s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 16) (val' :: CDouble)--#if ENABLE_OVERLOADING-data MatrixYxFieldInfo-instance AttrInfo MatrixYxFieldInfo where- type AttrAllowedOps MatrixYxFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint MatrixYxFieldInfo = (~) Double- type AttrBaseTypeConstraint MatrixYxFieldInfo = (~) Matrix- type AttrGetType MatrixYxFieldInfo = Double- type AttrLabel MatrixYxFieldInfo = "yx"- type AttrOrigin MatrixYxFieldInfo = Matrix- attrGet _ = getMatrixYx- attrSet _ = setMatrixYx- attrConstruct = undefined- attrClear _ = undefined--matrix_yx :: AttrLabelProxy "yx"-matrix_yx = AttrLabelProxy--#endif---{- |-Get the value of the “@yy@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' matrix #yy-@--}-getMatrixYy :: MonadIO m => Matrix -> m Double-getMatrixYy s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 24) :: IO CDouble- let val' = realToFrac val- return val'--{- |-Set the value of the “@yy@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' matrix [ #yy 'Data.GI.Base.Attributes.:=' value ]-@--}-setMatrixYy :: MonadIO m => Matrix -> Double -> m ()-setMatrixYy s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 24) (val' :: CDouble)--#if ENABLE_OVERLOADING-data MatrixYyFieldInfo-instance AttrInfo MatrixYyFieldInfo where- type AttrAllowedOps MatrixYyFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint MatrixYyFieldInfo = (~) Double- type AttrBaseTypeConstraint MatrixYyFieldInfo = (~) Matrix- type AttrGetType MatrixYyFieldInfo = Double- type AttrLabel MatrixYyFieldInfo = "yy"- type AttrOrigin MatrixYyFieldInfo = Matrix- attrGet _ = getMatrixYy- attrSet _ = setMatrixYy- attrConstruct = undefined- attrClear _ = undefined--matrix_yy :: AttrLabelProxy "yy"-matrix_yy = AttrLabelProxy--#endif---{- |-Get the value of the “@x0@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' matrix #x0-@--}-getMatrixX0 :: MonadIO m => Matrix -> m Double-getMatrixX0 s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 32) :: IO CDouble- let val' = realToFrac val- return val'--{- |-Set the value of the “@x0@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' matrix [ #x0 'Data.GI.Base.Attributes.:=' value ]-@--}-setMatrixX0 :: MonadIO m => Matrix -> Double -> m ()-setMatrixX0 s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 32) (val' :: CDouble)--#if ENABLE_OVERLOADING-data MatrixX0FieldInfo-instance AttrInfo MatrixX0FieldInfo where- type AttrAllowedOps MatrixX0FieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint MatrixX0FieldInfo = (~) Double- type AttrBaseTypeConstraint MatrixX0FieldInfo = (~) Matrix- type AttrGetType MatrixX0FieldInfo = Double- type AttrLabel MatrixX0FieldInfo = "x0"- type AttrOrigin MatrixX0FieldInfo = Matrix- attrGet _ = getMatrixX0- attrSet _ = setMatrixX0- attrConstruct = undefined- attrClear _ = undefined--matrix_x0 :: AttrLabelProxy "x0"-matrix_x0 = AttrLabelProxy--#endif---{- |-Get the value of the “@y0@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' matrix #y0-@--}-getMatrixY0 :: MonadIO m => Matrix -> m Double-getMatrixY0 s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 40) :: IO CDouble- let val' = realToFrac val- return val'--{- |-Set the value of the “@y0@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' matrix [ #y0 'Data.GI.Base.Attributes.:=' value ]-@--}-setMatrixY0 :: MonadIO m => Matrix -> Double -> m ()-setMatrixY0 s val = liftIO $ withManagedPtr s $ \ptr -> do- let val' = realToFrac val- poke (ptr `plusPtr` 40) (val' :: CDouble)--#if ENABLE_OVERLOADING-data MatrixY0FieldInfo-instance AttrInfo MatrixY0FieldInfo where- type AttrAllowedOps MatrixY0FieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint MatrixY0FieldInfo = (~) Double- type AttrBaseTypeConstraint MatrixY0FieldInfo = (~) Matrix- type AttrGetType MatrixY0FieldInfo = Double- type AttrLabel MatrixY0FieldInfo = "y0"- type AttrOrigin MatrixY0FieldInfo = Matrix- attrGet _ = getMatrixY0- attrSet _ = setMatrixY0- attrConstruct = undefined- attrClear _ = undefined--matrix_y0 :: AttrLabelProxy "y0"-matrix_y0 = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList Matrix-type instance O.AttributeList Matrix = MatrixAttributeList-type MatrixAttributeList = ('[ '("xx", MatrixXxFieldInfo), '("xy", MatrixXyFieldInfo), '("yx", MatrixYxFieldInfo), '("yy", MatrixYyFieldInfo), '("x0", MatrixX0FieldInfo), '("y0", MatrixY0FieldInfo)] :: [(Symbol, *)])-#endif---- method Matrix::concat--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_concat" pango_matrix_concat :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- Ptr Matrix -> -- new_matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- IO ()--{- |-Changes the transformation represented by /@matrix@/ to be the-transformation given by first applying transformation-given by /@newMatrix@/ then applying the original transformation.--/Since: 1.6/--}-matrixConcat ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix' -}- -> Matrix- {- ^ /@newMatrix@/: a 'GI.Pango.Structs.Matrix.Matrix' -}- -> m ()-matrixConcat matrix newMatrix = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- newMatrix' <- unsafeManagedPtrGetPtr newMatrix- pango_matrix_concat matrix' newMatrix'- touchManagedPtr matrix- touchManagedPtr newMatrix- return ()--#if ENABLE_OVERLOADING-data MatrixConcatMethodInfo-instance (signature ~ (Matrix -> m ()), MonadIO m) => O.MethodInfo MatrixConcatMethodInfo Matrix signature where- overloadedMethod _ = matrixConcat--#endif---- method Matrix::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "Matrix"}))--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_copy" pango_matrix_copy :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- IO (Ptr Matrix)--{- |-Copies a 'GI.Pango.Structs.Matrix.Matrix'.--/Since: 1.6/--}-matrixCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', may be 'Nothing' -}- -> m (Maybe Matrix)- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.Matrix.Matrix', which- should be freed with 'GI.Pango.Structs.Matrix.matrixFree', or 'Nothing' if- /@matrix@/ was 'Nothing'. -}-matrixCopy matrix = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- result <- pango_matrix_copy matrix'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed Matrix) result'- return result''- touchManagedPtr matrix- return maybeResult--#if ENABLE_OVERLOADING-data MatrixCopyMethodInfo-instance (signature ~ (m (Maybe Matrix)), MonadIO m) => O.MethodInfo MatrixCopyMethodInfo Matrix signature where- overloadedMethod _ = matrixCopy--#endif---- method Matrix::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_free" pango_matrix_free :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- IO ()--{- |-Free a 'GI.Pango.Structs.Matrix.Matrix' created with 'GI.Pango.Structs.Matrix.matrixCopy'.--/Since: 1.6/--}-matrixFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', may be 'Nothing' -}- -> m ()-matrixFree matrix = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- pango_matrix_free matrix'- touchManagedPtr matrix- return ()--#if ENABLE_OVERLOADING-data MatrixFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo MatrixFreeMethodInfo Matrix signature where- overloadedMethod _ = matrixFree--#endif---- method Matrix::get_font_scale_factor--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, may be %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TDouble)--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_get_font_scale_factor" pango_matrix_get_font_scale_factor :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- IO CDouble--{- |-Returns the scale factor of a matrix on the height of the font.-That is, the scale factor in the direction perpendicular to the-vector that the X coordinate is mapped to. If the scale in the X-coordinate is needed as well, use 'GI.Pango.Structs.Matrix.matrixGetFontScaleFactors'.--/Since: 1.12/--}-matrixGetFontScaleFactor ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', may be 'Nothing' -}- -> m Double- {- ^ __Returns:__ the scale factor of /@matrix@/ on the height of the font,-or 1.0 if /@matrix@/ is 'Nothing'. -}-matrixGetFontScaleFactor matrix = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- result <- pango_matrix_get_font_scale_factor matrix'- let result' = realToFrac result- touchManagedPtr matrix- return result'--#if ENABLE_OVERLOADING-data MatrixGetFontScaleFactorMethodInfo-instance (signature ~ (m Double), MonadIO m) => O.MethodInfo MatrixGetFontScaleFactorMethodInfo Matrix signature where- overloadedMethod _ = matrixGetFontScaleFactor--#endif---- method Matrix::get_font_scale_factors--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "xscale", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "output scale factor in the x direction, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "yscale", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "output scale factor perpendicular to the x direction, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_get_font_scale_factors" pango_matrix_get_font_scale_factors :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- Ptr CDouble -> -- xscale : TBasicType TDouble- Ptr CDouble -> -- yscale : TBasicType TDouble- IO ()--{- |-Calculates the scale factor of a matrix on the width and height of the font.-That is, /@xscale@/ is the scale factor in the direction of the X coordinate,-and /@yscale@/ is the scale factor in the direction perpendicular to the-vector that the X coordinate is mapped to.--Note that output numbers will always be non-negative.--/Since: 1.38/--}-matrixGetFontScaleFactors ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', or 'Nothing' -}- -> m ((Double, Double))-matrixGetFontScaleFactors matrix = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- xscale <- allocMem :: IO (Ptr CDouble)- yscale <- allocMem :: IO (Ptr CDouble)- pango_matrix_get_font_scale_factors matrix' xscale yscale- xscale' <- peek xscale- let xscale'' = realToFrac xscale'- yscale' <- peek yscale- let yscale'' = realToFrac yscale'- touchManagedPtr matrix- freeMem xscale- freeMem yscale- return (xscale'', yscale'')--#if ENABLE_OVERLOADING-data MatrixGetFontScaleFactorsMethodInfo-instance (signature ~ (m ((Double, Double))), MonadIO m) => O.MethodInfo MatrixGetFontScaleFactorsMethodInfo Matrix signature where- overloadedMethod _ = matrixGetFontScaleFactors--#endif---- method Matrix::rotate--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "degrees", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "degrees to rotate counter-clockwise", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_rotate" pango_matrix_rotate :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- CDouble -> -- degrees : TBasicType TDouble- IO ()--{- |-Changes the transformation represented by /@matrix@/ to be the-transformation given by first rotating by /@degrees@/ degrees-counter-clockwise then applying the original transformation.--/Since: 1.6/--}-matrixRotate ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix' -}- -> Double- {- ^ /@degrees@/: degrees to rotate counter-clockwise -}- -> m ()-matrixRotate matrix degrees = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- let degrees' = realToFrac degrees- pango_matrix_rotate matrix' degrees'- touchManagedPtr matrix- return ()--#if ENABLE_OVERLOADING-data MatrixRotateMethodInfo-instance (signature ~ (Double -> m ()), MonadIO m) => O.MethodInfo MatrixRotateMethodInfo Matrix signature where- overloadedMethod _ = matrixRotate--#endif---- method Matrix::scale--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "scale_x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "amount to scale by in X direction", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "scale_y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "amount to scale by in Y direction", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_scale" pango_matrix_scale :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- CDouble -> -- scale_x : TBasicType TDouble- CDouble -> -- scale_y : TBasicType TDouble- IO ()--{- |-Changes the transformation represented by /@matrix@/ to be the-transformation given by first scaling by /@sx@/ in the X direction-and /@sy@/ in the Y direction then applying the original-transformation.--/Since: 1.6/--}-matrixScale ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix' -}- -> Double- {- ^ /@scaleX@/: amount to scale by in X direction -}- -> Double- {- ^ /@scaleY@/: amount to scale by in Y direction -}- -> m ()-matrixScale matrix scaleX scaleY = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- let scaleX' = realToFrac scaleX- let scaleY' = realToFrac scaleY- pango_matrix_scale matrix' scaleX' scaleY'- touchManagedPtr matrix- return ()--#if ENABLE_OVERLOADING-data MatrixScaleMethodInfo-instance (signature ~ (Double -> Double -> m ()), MonadIO m) => O.MethodInfo MatrixScaleMethodInfo Matrix signature where- overloadedMethod _ = matrixScale--#endif---- method Matrix::transform_distance--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dx", argType = TBasicType TDouble, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out X component of a distance vector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "dy", argType = TBasicType TDouble, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out Y component of a distance vector", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_transform_distance" pango_matrix_transform_distance :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- Ptr CDouble -> -- dx : TBasicType TDouble- Ptr CDouble -> -- dy : TBasicType TDouble- IO ()--{- |-Transforms the distance vector (/@dx@/,/@dy@/) by /@matrix@/. This is-similar to 'GI.Pango.Structs.Matrix.matrixTransformPoint' except that the translation-components of the transformation are ignored. The calculation of-the returned vector is as follows:--\<programlisting>-dx2 = dx1 * xx + dy1 * xy;-dy2 = dx1 * yx + dy1 * yy;-\<\/programlisting>--Affine transformations are position invariant, so the same vector-always transforms to the same vector. If (/@x1@/,/@y1@/) transforms-to (/@x2@/,/@y2@/) then (/@x1@/+/@dx1@/,/@y1@/+/@dy1@/) will transform to-(/@x1@/+/@dx2@/,/@y1@/+/@dy2@/) for all values of /@x1@/ and /@x2@/.--/Since: 1.16/--}-matrixTransformDistance ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', or 'Nothing' -}- -> Double- {- ^ /@dx@/: in\/out X component of a distance vector -}- -> Double- {- ^ /@dy@/: in\/out Y component of a distance vector -}- -> m ((Double, Double))-matrixTransformDistance matrix dx dy = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- let dx' = realToFrac dx- dx'' <- allocMem :: IO (Ptr CDouble)- poke dx'' dx'- let dy' = realToFrac dy- dy'' <- allocMem :: IO (Ptr CDouble)- poke dy'' dy'- pango_matrix_transform_distance matrix' dx'' dy''- dx''' <- peek dx''- let dx'''' = realToFrac dx'''- dy''' <- peek dy''- let dy'''' = realToFrac dy'''- touchManagedPtr matrix- freeMem dx''- freeMem dy''- return (dx'''', dy'''')--#if ENABLE_OVERLOADING-data MatrixTransformDistanceMethodInfo-instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m) => O.MethodInfo MatrixTransformDistanceMethodInfo Matrix signature where- overloadedMethod _ = matrixTransformDistance--#endif---- method Matrix::transform_pixel_rectangle--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "rect", argType = TInterface (Name {namespace = "Pango", name = "Rectangle"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "in/out bounding box in device units, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_transform_pixel_rectangle" pango_matrix_transform_pixel_rectangle :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- Ptr Pango.Rectangle.Rectangle -> -- rect : TInterface (Name {namespace = "Pango", name = "Rectangle"})- IO ()--{- |-First transforms the /@rect@/ using /@matrix@/, then calculates the bounding box-of the transformed rectangle. The rectangle should be in device units-(pixels).--This function is useful for example when you want to draw a rotated-/@pangoLayout@/ to an image buffer, and want to know how large the image-should be and how much you should shift the layout when rendering.--For better accuracy, you should use 'GI.Pango.Structs.Matrix.matrixTransformRectangle' on-original rectangle in Pango units and convert to pixels afterward-using 'GI.Pango.Functions.extentsToPixels'\'s first argument.--/Since: 1.16/--}-matrixTransformPixelRectangle ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', or 'Nothing' -}- -> Maybe (Pango.Rectangle.Rectangle)- {- ^ /@rect@/: in\/out bounding box in device units, or 'Nothing' -}- -> m ()-matrixTransformPixelRectangle matrix rect = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- maybeRect <- case rect of- Nothing -> return nullPtr- Just jRect -> do- jRect' <- unsafeManagedPtrGetPtr jRect- return jRect'- pango_matrix_transform_pixel_rectangle matrix' maybeRect- touchManagedPtr matrix- whenJust rect touchManagedPtr- return ()--#if ENABLE_OVERLOADING-data MatrixTransformPixelRectangleMethodInfo-instance (signature ~ (Maybe (Pango.Rectangle.Rectangle) -> m ()), MonadIO m) => O.MethodInfo MatrixTransformPixelRectangleMethodInfo Matrix signature where- overloadedMethod _ = matrixTransformPixelRectangle--#endif---- method Matrix::transform_point--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TDouble, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out X position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "y", argType = TBasicType TDouble, direction = DirectionInout, mayBeNull = False, argDoc = Documentation {rawDocText = Just "in/out Y position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_transform_point" pango_matrix_transform_point :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- Ptr CDouble -> -- x : TBasicType TDouble- Ptr CDouble -> -- y : TBasicType TDouble- IO ()--{- |-Transforms the point (/@x@/, /@y@/) by /@matrix@/.--/Since: 1.16/--}-matrixTransformPoint ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix', or 'Nothing' -}- -> Double- {- ^ /@x@/: in\/out X position -}- -> Double- {- ^ /@y@/: in\/out Y position -}- -> m ((Double, Double))-matrixTransformPoint matrix x y = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- let x' = realToFrac x- x'' <- allocMem :: IO (Ptr CDouble)- poke x'' x'- let y' = realToFrac y- y'' <- allocMem :: IO (Ptr CDouble)- poke y'' y'- pango_matrix_transform_point matrix' x'' y''- x''' <- peek x''- let x'''' = realToFrac x'''- y''' <- peek y''- let y'''' = realToFrac y'''- touchManagedPtr matrix- freeMem x''- freeMem y''- return (x'''', y'''')--#if ENABLE_OVERLOADING-data MatrixTransformPointMethodInfo-instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m) => O.MethodInfo MatrixTransformPointMethodInfo Matrix signature where- overloadedMethod _ = matrixTransformPoint--#endif---- XXX Could not generate method Matrix::transform_rectangle--- Error was : Not implemented: "Nullable inout structs not supported"--- method Matrix::translate--- method type : OrdinaryMethod--- Args : [Arg {argCName = "matrix", argType = TInterface (Name {namespace = "Pango", name = "Matrix"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoMatrix", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tx", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "amount to translate in the X direction", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ty", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "amount to translate in the Y direction", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_matrix_translate" pango_matrix_translate :: - Ptr Matrix -> -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})- CDouble -> -- tx : TBasicType TDouble- CDouble -> -- ty : TBasicType TDouble- IO ()--{- |-Changes the transformation represented by /@matrix@/ to be the-transformation given by first translating by (/@tx@/, /@ty@/)-then applying the original transformation.--/Since: 1.6/--}-matrixTranslate ::- (B.CallStack.HasCallStack, MonadIO m) =>- Matrix- {- ^ /@matrix@/: a 'GI.Pango.Structs.Matrix.Matrix' -}- -> Double- {- ^ /@tx@/: amount to translate in the X direction -}- -> Double- {- ^ /@ty@/: amount to translate in the Y direction -}- -> m ()-matrixTranslate matrix tx ty = liftIO $ do- matrix' <- unsafeManagedPtrGetPtr matrix- let tx' = realToFrac tx- let ty' = realToFrac ty- pango_matrix_translate matrix' tx' ty'- touchManagedPtr matrix- return ()--#if ENABLE_OVERLOADING-data MatrixTranslateMethodInfo-instance (signature ~ (Double -> Double -> m ()), MonadIO m) => O.MethodInfo MatrixTranslateMethodInfo Matrix signature where- overloadedMethod _ = matrixTranslate--#endif--#if ENABLE_OVERLOADING-type family ResolveMatrixMethod (t :: Symbol) (o :: *) :: * where- ResolveMatrixMethod "concat" o = MatrixConcatMethodInfo- ResolveMatrixMethod "copy" o = MatrixCopyMethodInfo- ResolveMatrixMethod "free" o = MatrixFreeMethodInfo- ResolveMatrixMethod "rotate" o = MatrixRotateMethodInfo- ResolveMatrixMethod "scale" o = MatrixScaleMethodInfo- ResolveMatrixMethod "transformDistance" o = MatrixTransformDistanceMethodInfo- ResolveMatrixMethod "transformPixelRectangle" o = MatrixTransformPixelRectangleMethodInfo- ResolveMatrixMethod "transformPoint" o = MatrixTransformPointMethodInfo- ResolveMatrixMethod "translate" o = MatrixTranslateMethodInfo- ResolveMatrixMethod "getFontScaleFactor" o = MatrixGetFontScaleFactorMethodInfo- ResolveMatrixMethod "getFontScaleFactors" o = MatrixGetFontScaleFactorsMethodInfo- ResolveMatrixMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveMatrixMethod t Matrix, O.MethodInfo info Matrix p) => OL.IsLabel t (Matrix -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Matrix.hs-boot
@@ -1,59 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Matrix where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Matrix = Matrix (ManagedPtr Matrix)-instance BoxedObject Matrix where-#if ENABLE_OVERLOADING-data MatrixConcatMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixGetFontScaleFactorMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixGetFontScaleFactorsMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixRotateMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixScaleMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixTransformDistanceMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixTransformPixelRectangleMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixTransformPointMethodInfo-#endif-#if ENABLE_OVERLOADING-data MatrixTranslateMethodInfo-#endif
− GI/Pango/Structs/Rectangle.hs
@@ -1,313 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--The 'GI.Pango.Structs.Rectangle.Rectangle' structure represents a rectangle. It is frequently-used to represent the logical or ink extents of a single glyph or section-of text. (See, for instance, 'GI.Pango.Objects.Font.fontGetGlyphExtents')--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.Rectangle- ( ---- * Exported types- Rectangle(..) ,- newZeroRectangle ,- noRectangle ,--- -- * Properties--- ** height #attr:height#-{- | height of the rectangle.--}- getRectangleHeight ,-#if ENABLE_OVERLOADING- rectangle_height ,-#endif- setRectangleHeight ,----- ** width #attr:width#-{- | width of the rectangle.--}- getRectangleWidth ,-#if ENABLE_OVERLOADING- rectangle_width ,-#endif- setRectangleWidth ,----- ** x #attr:x#-{- | X coordinate of the left side of the rectangle.--}- getRectangleX ,-#if ENABLE_OVERLOADING- rectangle_x ,-#endif- setRectangleX ,----- ** y #attr:y#-{- | Y coordinate of the the top side of the rectangle.--}- getRectangleY ,-#if ENABLE_OVERLOADING- rectangle_y ,-#endif- setRectangleY ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL----- | Memory-managed wrapper type.-newtype Rectangle = Rectangle (ManagedPtr Rectangle)-instance WrappedPtr Rectangle where- wrappedPtrCalloc = callocBytes 16- wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 16 >=> wrapPtr Rectangle)- wrappedPtrFree = Just ptr_to_g_free---- | Construct a `Rectangle` struct initialized to zero.-newZeroRectangle :: MonadIO m => m Rectangle-newZeroRectangle = liftIO $ wrappedPtrCalloc >>= wrapPtr Rectangle--instance tag ~ 'AttrSet => Constructible Rectangle tag where- new _ attrs = do- o <- newZeroRectangle- GI.Attributes.set o attrs- return o----- | A convenience alias for `Nothing` :: `Maybe` `Rectangle`.-noRectangle :: Maybe Rectangle-noRectangle = Nothing--{- |-Get the value of the “@x@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' rectangle #x-@--}-getRectangleX :: MonadIO m => Rectangle -> m Int32-getRectangleX s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 0) :: IO Int32- return val--{- |-Set the value of the “@x@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' rectangle [ #x 'Data.GI.Base.Attributes.:=' value ]-@--}-setRectangleX :: MonadIO m => Rectangle -> Int32 -> m ()-setRectangleX s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 0) (val :: Int32)--#if ENABLE_OVERLOADING-data RectangleXFieldInfo-instance AttrInfo RectangleXFieldInfo where- type AttrAllowedOps RectangleXFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint RectangleXFieldInfo = (~) Int32- type AttrBaseTypeConstraint RectangleXFieldInfo = (~) Rectangle- type AttrGetType RectangleXFieldInfo = Int32- type AttrLabel RectangleXFieldInfo = "x"- type AttrOrigin RectangleXFieldInfo = Rectangle- attrGet _ = getRectangleX- attrSet _ = setRectangleX- attrConstruct = undefined- attrClear _ = undefined--rectangle_x :: AttrLabelProxy "x"-rectangle_x = AttrLabelProxy--#endif---{- |-Get the value of the “@y@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' rectangle #y-@--}-getRectangleY :: MonadIO m => Rectangle -> m Int32-getRectangleY s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 4) :: IO Int32- return val--{- |-Set the value of the “@y@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' rectangle [ #y 'Data.GI.Base.Attributes.:=' value ]-@--}-setRectangleY :: MonadIO m => Rectangle -> Int32 -> m ()-setRectangleY s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 4) (val :: Int32)--#if ENABLE_OVERLOADING-data RectangleYFieldInfo-instance AttrInfo RectangleYFieldInfo where- type AttrAllowedOps RectangleYFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint RectangleYFieldInfo = (~) Int32- type AttrBaseTypeConstraint RectangleYFieldInfo = (~) Rectangle- type AttrGetType RectangleYFieldInfo = Int32- type AttrLabel RectangleYFieldInfo = "y"- type AttrOrigin RectangleYFieldInfo = Rectangle- attrGet _ = getRectangleY- attrSet _ = setRectangleY- attrConstruct = undefined- attrClear _ = undefined--rectangle_y :: AttrLabelProxy "y"-rectangle_y = AttrLabelProxy--#endif---{- |-Get the value of the “@width@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' rectangle #width-@--}-getRectangleWidth :: MonadIO m => Rectangle -> m Int32-getRectangleWidth s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 8) :: IO Int32- return val--{- |-Set the value of the “@width@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' rectangle [ #width 'Data.GI.Base.Attributes.:=' value ]-@--}-setRectangleWidth :: MonadIO m => Rectangle -> Int32 -> m ()-setRectangleWidth s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 8) (val :: Int32)--#if ENABLE_OVERLOADING-data RectangleWidthFieldInfo-instance AttrInfo RectangleWidthFieldInfo where- type AttrAllowedOps RectangleWidthFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint RectangleWidthFieldInfo = (~) Int32- type AttrBaseTypeConstraint RectangleWidthFieldInfo = (~) Rectangle- type AttrGetType RectangleWidthFieldInfo = Int32- type AttrLabel RectangleWidthFieldInfo = "width"- type AttrOrigin RectangleWidthFieldInfo = Rectangle- attrGet _ = getRectangleWidth- attrSet _ = setRectangleWidth- attrConstruct = undefined- attrClear _ = undefined--rectangle_width :: AttrLabelProxy "width"-rectangle_width = AttrLabelProxy--#endif---{- |-Get the value of the “@height@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.get' rectangle #height-@--}-getRectangleHeight :: MonadIO m => Rectangle -> m Int32-getRectangleHeight s = liftIO $ withManagedPtr s $ \ptr -> do- val <- peek (ptr `plusPtr` 12) :: IO Int32- return val--{- |-Set the value of the “@height@” field.-When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to--@-'Data.GI.Base.Attributes.set' rectangle [ #height 'Data.GI.Base.Attributes.:=' value ]-@--}-setRectangleHeight :: MonadIO m => Rectangle -> Int32 -> m ()-setRectangleHeight s val = liftIO $ withManagedPtr s $ \ptr -> do- poke (ptr `plusPtr` 12) (val :: Int32)--#if ENABLE_OVERLOADING-data RectangleHeightFieldInfo-instance AttrInfo RectangleHeightFieldInfo where- type AttrAllowedOps RectangleHeightFieldInfo = '[ 'AttrSet, 'AttrGet]- type AttrSetTypeConstraint RectangleHeightFieldInfo = (~) Int32- type AttrBaseTypeConstraint RectangleHeightFieldInfo = (~) Rectangle- type AttrGetType RectangleHeightFieldInfo = Int32- type AttrLabel RectangleHeightFieldInfo = "height"- type AttrOrigin RectangleHeightFieldInfo = Rectangle- attrGet _ = getRectangleHeight- attrSet _ = setRectangleHeight- attrConstruct = undefined- attrClear _ = undefined--rectangle_height :: AttrLabelProxy "height"-rectangle_height = AttrLabelProxy--#endif----#if ENABLE_OVERLOADING-instance O.HasAttributeList Rectangle-type instance O.AttributeList Rectangle = RectangleAttributeList-type RectangleAttributeList = ('[ '("x", RectangleXFieldInfo), '("y", RectangleYFieldInfo), '("width", RectangleWidthFieldInfo), '("height", RectangleHeightFieldInfo)] :: [(Symbol, *)])-#endif--#if ENABLE_OVERLOADING-type family ResolveRectangleMethod (t :: Symbol) (o :: *) :: * where- ResolveRectangleMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveRectangleMethod t Rectangle, O.MethodInfo info Rectangle p) => OL.IsLabel t (Rectangle -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/Rectangle.hs-boot
@@ -1,26 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.Rectangle where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype Rectangle = Rectangle (ManagedPtr Rectangle)-instance WrappedPtr Rectangle where
− GI/Pango/Structs/ScriptIter.hs
@@ -1,237 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A 'GI.Pango.Structs.ScriptIter.ScriptIter' is used to iterate through a string-and identify ranges in different scripts.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.ScriptIter- ( ---- * Exported types- ScriptIter(..) ,- noScriptIter ,--- -- * Methods--- ** free #method:free#--#if ENABLE_OVERLOADING- ScriptIterFreeMethodInfo ,-#endif- scriptIterFree ,----- ** getRange #method:getRange#--#if ENABLE_OVERLOADING- ScriptIterGetRangeMethodInfo ,-#endif- scriptIterGetRange ,----- ** next #method:next#--#if ENABLE_OVERLOADING- ScriptIterNextMethodInfo ,-#endif- scriptIterNext ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums---- | Memory-managed wrapper type.-newtype ScriptIter = ScriptIter (ManagedPtr ScriptIter)--- XXX Wrapping a foreign struct/union with no known destructor or size, leak?-instance WrappedPtr ScriptIter where- wrappedPtrCalloc = return nullPtr- wrappedPtrCopy = return- wrappedPtrFree = Nothing---- | A convenience alias for `Nothing` :: `Maybe` `ScriptIter`.-noScriptIter :: Maybe ScriptIter-noScriptIter = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList ScriptIter-type instance O.AttributeList ScriptIter = ScriptIterAttributeList-type ScriptIterAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method ScriptIter::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "ScriptIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoScriptIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_script_iter_free" pango_script_iter_free :: - Ptr ScriptIter -> -- iter : TInterface (Name {namespace = "Pango", name = "ScriptIter"})- IO ()--{- |-Frees a 'GI.Pango.Structs.ScriptIter.ScriptIter' created with @/pango_script_iter_new()/@.--/Since: 1.4/--}-scriptIterFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- ScriptIter- {- ^ /@iter@/: a 'GI.Pango.Structs.ScriptIter.ScriptIter' -}- -> m ()-scriptIterFree iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- pango_script_iter_free iter'- touchManagedPtr iter- return ()--#if ENABLE_OVERLOADING-data ScriptIterFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo ScriptIterFreeMethodInfo ScriptIter signature where- overloadedMethod _ = scriptIterFree--#endif---- method ScriptIter::get_range--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "ScriptIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoScriptIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "start", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store start position of the range, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "end", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store end position of the range, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "script", argType = TInterface (Name {namespace = "Pango", name = "Script"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store script for range, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_script_iter_get_range" pango_script_iter_get_range :: - Ptr ScriptIter -> -- iter : TInterface (Name {namespace = "Pango", name = "ScriptIter"})- Ptr CString -> -- start : TBasicType TUTF8- Ptr CString -> -- end : TBasicType TUTF8- Ptr CInt -> -- script : TInterface (Name {namespace = "Pango", name = "Script"})- IO ()--{- |-Gets information about the range to which /@iter@/ currently points.-The range is the set of locations p where *start \<= p \< *end.-(That is, it doesn\'t include the character stored at *end)--/Since: 1.4/--}-scriptIterGetRange ::- (B.CallStack.HasCallStack, MonadIO m) =>- ScriptIter- {- ^ /@iter@/: a 'GI.Pango.Structs.ScriptIter.ScriptIter' -}- -> m ((T.Text, T.Text, Pango.Enums.Script))-scriptIterGetRange iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- start <- allocMem :: IO (Ptr CString)- end <- allocMem :: IO (Ptr CString)- script <- allocMem :: IO (Ptr CInt)- pango_script_iter_get_range iter' start end script- start' <- peek start- start'' <- cstringToText start'- freeMem start'- end' <- peek end- end'' <- cstringToText end'- freeMem end'- script' <- peek script- let script'' = (toEnum . fromIntegral) script'- touchManagedPtr iter- freeMem start- freeMem end- freeMem script- return (start'', end'', script'')--#if ENABLE_OVERLOADING-data ScriptIterGetRangeMethodInfo-instance (signature ~ (m ((T.Text, T.Text, Pango.Enums.Script))), MonadIO m) => O.MethodInfo ScriptIterGetRangeMethodInfo ScriptIter signature where- overloadedMethod _ = scriptIterGetRange--#endif---- method ScriptIter::next--- method type : OrdinaryMethod--- Args : [Arg {argCName = "iter", argType = TInterface (Name {namespace = "Pango", name = "ScriptIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoScriptIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_script_iter_next" pango_script_iter_next :: - Ptr ScriptIter -> -- iter : TInterface (Name {namespace = "Pango", name = "ScriptIter"})- IO CInt--{- |-Advances a 'GI.Pango.Structs.ScriptIter.ScriptIter' to the next range. If /@iter@/-is already at the end, it is left unchanged and 'False'-is returned.--/Since: 1.4/--}-scriptIterNext ::- (B.CallStack.HasCallStack, MonadIO m) =>- ScriptIter- {- ^ /@iter@/: a 'GI.Pango.Structs.ScriptIter.ScriptIter' -}- -> m Bool- {- ^ __Returns:__ 'True' if /@iter@/ was successfully advanced. -}-scriptIterNext iter = liftIO $ do- iter' <- unsafeManagedPtrGetPtr iter- result <- pango_script_iter_next iter'- let result' = (/= 0) result- touchManagedPtr iter- return result'--#if ENABLE_OVERLOADING-data ScriptIterNextMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo ScriptIterNextMethodInfo ScriptIter signature where- overloadedMethod _ = scriptIterNext--#endif--#if ENABLE_OVERLOADING-type family ResolveScriptIterMethod (t :: Symbol) (o :: *) :: * where- ResolveScriptIterMethod "free" o = ScriptIterFreeMethodInfo- ResolveScriptIterMethod "next" o = ScriptIterNextMethodInfo- ResolveScriptIterMethod "getRange" o = ScriptIterGetRangeMethodInfo- ResolveScriptIterMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveScriptIterMethod t ScriptIter, O.MethodInfo info ScriptIter p) => OL.IsLabel t (ScriptIter -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/ScriptIter.hs-boot
@@ -1,35 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.ScriptIter where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype ScriptIter = ScriptIter (ManagedPtr ScriptIter)-instance WrappedPtr ScriptIter where-#if ENABLE_OVERLOADING-data ScriptIterFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data ScriptIterGetRangeMethodInfo-#endif-#if ENABLE_OVERLOADING-data ScriptIterNextMethodInfo-#endif
− GI/Pango/Structs/TabArray.hs
@@ -1,456 +0,0 @@---{- |-Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte-License : LGPL-2.1-Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)--A 'GI.Pango.Structs.TabArray.TabArray' struct contains an array-of tab stops. Each tab stop has an alignment and a position.--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.Pango.Structs.TabArray- ( ---- * Exported types- TabArray(..) ,- noTabArray ,--- -- * Methods--- ** copy #method:copy#--#if ENABLE_OVERLOADING- TabArrayCopyMethodInfo ,-#endif- tabArrayCopy ,----- ** free #method:free#--#if ENABLE_OVERLOADING- TabArrayFreeMethodInfo ,-#endif- tabArrayFree ,----- ** getPositionsInPixels #method:getPositionsInPixels#--#if ENABLE_OVERLOADING- TabArrayGetPositionsInPixelsMethodInfo ,-#endif- tabArrayGetPositionsInPixels ,----- ** getSize #method:getSize#--#if ENABLE_OVERLOADING- TabArrayGetSizeMethodInfo ,-#endif- tabArrayGetSize ,----- ** getTab #method:getTab#--#if ENABLE_OVERLOADING- TabArrayGetTabMethodInfo ,-#endif- tabArrayGetTab ,----- ** new #method:new#-- tabArrayNew ,----- ** resize #method:resize#--#if ENABLE_OVERLOADING- TabArrayResizeMethodInfo ,-#endif- tabArrayResize ,----- ** setTab #method:setTab#--#if ENABLE_OVERLOADING- TabArraySetTabMethodInfo ,-#endif- tabArraySetTab ,----- ) where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums---- | Memory-managed wrapper type.-newtype TabArray = TabArray (ManagedPtr TabArray)-foreign import ccall "pango_tab_array_get_type" c_pango_tab_array_get_type :: - IO GType--instance BoxedObject TabArray where- boxedType _ = c_pango_tab_array_get_type---- | A convenience alias for `Nothing` :: `Maybe` `TabArray`.-noTabArray :: Maybe TabArray-noTabArray = Nothing---#if ENABLE_OVERLOADING-instance O.HasAttributeList TabArray-type instance O.AttributeList TabArray = TabArrayAttributeList-type TabArrayAttributeList = ('[ ] :: [(Symbol, *)])-#endif---- method TabArray::new--- method type : Constructor--- Args : [Arg {argCName = "initial_size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Initial number of tab stops to allocate, can be 0", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "positions_in_pixels", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether positions are in pixel units", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "TabArray"}))--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_new" pango_tab_array_new :: - Int32 -> -- initial_size : TBasicType TInt- CInt -> -- positions_in_pixels : TBasicType TBoolean- IO (Ptr TabArray)--{- |-Creates an array of /@initialSize@/ tab stops. Tab stops are specified in-pixel units if /@positionsInPixels@/ is 'True', otherwise in Pango-units. All stops are initially at position 0.--}-tabArrayNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- Int32- {- ^ /@initialSize@/: Initial number of tab stops to allocate, can be 0 -}- -> Bool- {- ^ /@positionsInPixels@/: whether positions are in pixel units -}- -> m TabArray- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.TabArray.TabArray', which should- be freed with 'GI.Pango.Structs.TabArray.tabArrayFree'. -}-tabArrayNew initialSize positionsInPixels = liftIO $ do- let positionsInPixels' = (fromIntegral . fromEnum) positionsInPixels- result <- pango_tab_array_new initialSize positionsInPixels'- checkUnexpectedReturnNULL "tabArrayNew" result- result' <- (wrapBoxed TabArray) result- return result'--#if ENABLE_OVERLOADING-#endif---- method TabArray::copy--- method type : OrdinaryMethod--- Args : [Arg {argCName = "src", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#PangoTabArray to copy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "Pango", name = "TabArray"}))--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_copy" pango_tab_array_copy :: - Ptr TabArray -> -- src : TInterface (Name {namespace = "Pango", name = "TabArray"})- IO (Ptr TabArray)--{- |-Copies a 'GI.Pango.Structs.TabArray.TabArray'--}-tabArrayCopy ::- (B.CallStack.HasCallStack, MonadIO m) =>- TabArray- {- ^ /@src@/: 'GI.Pango.Structs.TabArray.TabArray' to copy -}- -> m TabArray- {- ^ __Returns:__ the newly allocated 'GI.Pango.Structs.TabArray.TabArray', which should- be freed with 'GI.Pango.Structs.TabArray.tabArrayFree'. -}-tabArrayCopy src = liftIO $ do- src' <- unsafeManagedPtrGetPtr src- result <- pango_tab_array_copy src'- checkUnexpectedReturnNULL "tabArrayCopy" result- result' <- (wrapBoxed TabArray) result- touchManagedPtr src- return result'--#if ENABLE_OVERLOADING-data TabArrayCopyMethodInfo-instance (signature ~ (m TabArray), MonadIO m) => O.MethodInfo TabArrayCopyMethodInfo TabArray signature where- overloadedMethod _ = tabArrayCopy--#endif---- method TabArray::free--- method type : OrdinaryMethod--- Args : [Arg {argCName = "tab_array", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoTabArray", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_free" pango_tab_array_free :: - Ptr TabArray -> -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})- IO ()--{- |-Frees a tab array and associated resources.--}-tabArrayFree ::- (B.CallStack.HasCallStack, MonadIO m) =>- TabArray- {- ^ /@tabArray@/: a 'GI.Pango.Structs.TabArray.TabArray' -}- -> m ()-tabArrayFree tabArray = liftIO $ do- tabArray' <- unsafeManagedPtrGetPtr tabArray- pango_tab_array_free tabArray'- touchManagedPtr tabArray- return ()--#if ENABLE_OVERLOADING-data TabArrayFreeMethodInfo-instance (signature ~ (m ()), MonadIO m) => O.MethodInfo TabArrayFreeMethodInfo TabArray signature where- overloadedMethod _ = tabArrayFree--#endif---- method TabArray::get_positions_in_pixels--- method type : OrdinaryMethod--- Args : [Arg {argCName = "tab_array", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoTabArray", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TBoolean)--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_get_positions_in_pixels" pango_tab_array_get_positions_in_pixels :: - Ptr TabArray -> -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})- IO CInt--{- |-Returns 'True' if the tab positions are in pixels, 'False' if they are-in Pango units.--}-tabArrayGetPositionsInPixels ::- (B.CallStack.HasCallStack, MonadIO m) =>- TabArray- {- ^ /@tabArray@/: a 'GI.Pango.Structs.TabArray.TabArray' -}- -> m Bool- {- ^ __Returns:__ whether positions are in pixels. -}-tabArrayGetPositionsInPixels tabArray = liftIO $ do- tabArray' <- unsafeManagedPtrGetPtr tabArray- result <- pango_tab_array_get_positions_in_pixels tabArray'- let result' = (/= 0) result- touchManagedPtr tabArray- return result'--#if ENABLE_OVERLOADING-data TabArrayGetPositionsInPixelsMethodInfo-instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo TabArrayGetPositionsInPixelsMethodInfo TabArray signature where- overloadedMethod _ = tabArrayGetPositionsInPixels--#endif---- method TabArray::get_size--- method type : OrdinaryMethod--- Args : [Arg {argCName = "tab_array", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoTabArray", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TBasicType TInt)--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_get_size" pango_tab_array_get_size :: - Ptr TabArray -> -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})- IO Int32--{- |-Gets the number of tab stops in /@tabArray@/.--}-tabArrayGetSize ::- (B.CallStack.HasCallStack, MonadIO m) =>- TabArray- {- ^ /@tabArray@/: a 'GI.Pango.Structs.TabArray.TabArray' -}- -> m Int32- {- ^ __Returns:__ the number of tab stops in the array. -}-tabArrayGetSize tabArray = liftIO $ do- tabArray' <- unsafeManagedPtrGetPtr tabArray- result <- pango_tab_array_get_size tabArray'- touchManagedPtr tabArray- return result--#if ENABLE_OVERLOADING-data TabArrayGetSizeMethodInfo-instance (signature ~ (m Int32), MonadIO m) => O.MethodInfo TabArrayGetSizeMethodInfo TabArray signature where- overloadedMethod _ = tabArrayGetSize--#endif---- method TabArray::get_tab--- method type : OrdinaryMethod--- Args : [Arg {argCName = "tab_array", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoTabArray", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tab_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "tab stop index", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alignment", argType = TInterface (Name {namespace = "Pango", name = "TabAlign"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store alignment, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "location", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store tab position, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_get_tab" pango_tab_array_get_tab :: - Ptr TabArray -> -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})- Int32 -> -- tab_index : TBasicType TInt- Ptr CUInt -> -- alignment : TInterface (Name {namespace = "Pango", name = "TabAlign"})- Ptr Int32 -> -- location : TBasicType TInt- IO ()--{- |-Gets the alignment and position of a tab stop.--}-tabArrayGetTab ::- (B.CallStack.HasCallStack, MonadIO m) =>- TabArray- {- ^ /@tabArray@/: a 'GI.Pango.Structs.TabArray.TabArray' -}- -> Int32- {- ^ /@tabIndex@/: tab stop index -}- -> m ((Pango.Enums.TabAlign, Int32))-tabArrayGetTab tabArray tabIndex = liftIO $ do- tabArray' <- unsafeManagedPtrGetPtr tabArray- alignment <- allocMem :: IO (Ptr CUInt)- location <- allocMem :: IO (Ptr Int32)- pango_tab_array_get_tab tabArray' tabIndex alignment location- alignment' <- peek alignment- let alignment'' = (toEnum . fromIntegral) alignment'- location' <- peek location- touchManagedPtr tabArray- freeMem alignment- freeMem location- return (alignment'', location')--#if ENABLE_OVERLOADING-data TabArrayGetTabMethodInfo-instance (signature ~ (Int32 -> m ((Pango.Enums.TabAlign, Int32))), MonadIO m) => O.MethodInfo TabArrayGetTabMethodInfo TabArray signature where- overloadedMethod _ = tabArrayGetTab--#endif---- XXX Could not generate method TabArray::get_tabs--- Error was : Bad introspection data: "`TCArray False (-1) (-1) (TBasicType TInt)' is an array type, but contains no length information,\nso it cannot be unpacked."--- method TabArray::resize--- method type : OrdinaryMethod--- Args : [Arg {argCName = "tab_array", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoTabArray", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "new_size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "new size of the array", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_resize" pango_tab_array_resize :: - Ptr TabArray -> -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})- Int32 -> -- new_size : TBasicType TInt- IO ()--{- |-Resizes a tab array. You must subsequently initialize any tabs that-were added as a result of growing the array.--}-tabArrayResize ::- (B.CallStack.HasCallStack, MonadIO m) =>- TabArray- {- ^ /@tabArray@/: a 'GI.Pango.Structs.TabArray.TabArray' -}- -> Int32- {- ^ /@newSize@/: new size of the array -}- -> m ()-tabArrayResize tabArray newSize = liftIO $ do- tabArray' <- unsafeManagedPtrGetPtr tabArray- pango_tab_array_resize tabArray' newSize- touchManagedPtr tabArray- return ()--#if ENABLE_OVERLOADING-data TabArrayResizeMethodInfo-instance (signature ~ (Int32 -> m ()), MonadIO m) => O.MethodInfo TabArrayResizeMethodInfo TabArray signature where- overloadedMethod _ = tabArrayResize--#endif---- method TabArray::set_tab--- method type : OrdinaryMethod--- Args : [Arg {argCName = "tab_array", argType = TInterface (Name {namespace = "Pango", name = "TabArray"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoTabArray", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tab_index", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the index of a tab stop", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alignment", argType = TInterface (Name {namespace = "Pango", name = "TabAlign"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "tab alignment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "location", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "tab location in Pango units", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_tab_array_set_tab" pango_tab_array_set_tab :: - Ptr TabArray -> -- tab_array : TInterface (Name {namespace = "Pango", name = "TabArray"})- Int32 -> -- tab_index : TBasicType TInt- CUInt -> -- alignment : TInterface (Name {namespace = "Pango", name = "TabAlign"})- Int32 -> -- location : TBasicType TInt- IO ()--{- |-Sets the alignment and location of a tab stop.-/@alignment@/ must always be @/PANGO_TAB_LEFT/@ in the current-implementation.--}-tabArraySetTab ::- (B.CallStack.HasCallStack, MonadIO m) =>- TabArray- {- ^ /@tabArray@/: a 'GI.Pango.Structs.TabArray.TabArray' -}- -> Int32- {- ^ /@tabIndex@/: the index of a tab stop -}- -> Pango.Enums.TabAlign- {- ^ /@alignment@/: tab alignment -}- -> Int32- {- ^ /@location@/: tab location in Pango units -}- -> m ()-tabArraySetTab tabArray tabIndex alignment location = liftIO $ do- tabArray' <- unsafeManagedPtrGetPtr tabArray- let alignment' = (fromIntegral . fromEnum) alignment- pango_tab_array_set_tab tabArray' tabIndex alignment' location- touchManagedPtr tabArray- return ()--#if ENABLE_OVERLOADING-data TabArraySetTabMethodInfo-instance (signature ~ (Int32 -> Pango.Enums.TabAlign -> Int32 -> m ()), MonadIO m) => O.MethodInfo TabArraySetTabMethodInfo TabArray signature where- overloadedMethod _ = tabArraySetTab--#endif--#if ENABLE_OVERLOADING-type family ResolveTabArrayMethod (t :: Symbol) (o :: *) :: * where- ResolveTabArrayMethod "copy" o = TabArrayCopyMethodInfo- ResolveTabArrayMethod "free" o = TabArrayFreeMethodInfo- ResolveTabArrayMethod "resize" o = TabArrayResizeMethodInfo- ResolveTabArrayMethod "getPositionsInPixels" o = TabArrayGetPositionsInPixelsMethodInfo- ResolveTabArrayMethod "getSize" o = TabArrayGetSizeMethodInfo- ResolveTabArrayMethod "getTab" o = TabArrayGetTabMethodInfo- ResolveTabArrayMethod "setTab" o = TabArraySetTabMethodInfo- ResolveTabArrayMethod l o = O.MethodResolutionFailed l o--instance (info ~ ResolveTabArrayMethod t TabArray, O.MethodInfo info TabArray p) => OL.IsLabel t (TabArray -> p) where-#if MIN_VERSION_base(4,10,0)- fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#else- fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)-#endif--#endif--
− GI/Pango/Structs/TabArray.hs-boot
@@ -1,47 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.Pango.Structs.TabArray where--import Data.GI.Base.ShortPrelude-import qualified Data.GI.Base.ShortPrelude as SP-import qualified Data.GI.Base.Overloading as O-import qualified Prelude as P--import qualified Data.GI.Base.Attributes as GI.Attributes-import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr-import qualified Data.GI.Base.GClosure as B.GClosure-import qualified Data.GI.Base.GError as B.GError-import qualified Data.GI.Base.GVariant as B.GVariant-import qualified Data.GI.Base.GValue as B.GValue-import qualified Data.GI.Base.GParamSpec as B.GParamSpec-import qualified Data.GI.Base.CallStack as B.CallStack-import qualified Data.GI.Base.Properties as B.Properties-import qualified Data.Text as T-import qualified Data.ByteString.Char8 as B-import qualified Data.Map as Map-import qualified Foreign.Ptr as FP-import qualified GHC.OverloadedLabels as OL--newtype TabArray = TabArray (ManagedPtr TabArray)-instance BoxedObject TabArray where-#if ENABLE_OVERLOADING-data TabArrayCopyMethodInfo-#endif-#if ENABLE_OVERLOADING-data TabArrayFreeMethodInfo-#endif-#if ENABLE_OVERLOADING-data TabArrayGetPositionsInPixelsMethodInfo-#endif-#if ENABLE_OVERLOADING-data TabArrayGetSizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data TabArrayGetTabMethodInfo-#endif-#if ENABLE_OVERLOADING-data TabArrayResizeMethodInfo-#endif-#if ENABLE_OVERLOADING-data TabArraySetTabMethodInfo-#endif
README.md view
@@ -1,6 +1,6 @@ # Documentation Autogenerated documentation for this package can be found at -[https://hackage.haskell.org/package/gi-pango-1.0.18/docs/GI-Pango.html](https://hackage.haskell.org/package/gi-pango-1.0.18/docs/GI-Pango.html)+[https://hackage.haskell.org/package/gi-pango-1.0.19/docs/GI-Pango.html](https://hackage.haskell.org/package/gi-pango-1.0.19/docs/GI-Pango.html) For general documentation on using [haskell-gi](https://github.com/haskell-gi/haskell-gi) based bindings, see [the project page](https://github.com/haskell-gi/haskell-gi) or [the Wiki](https://github.com/haskell-gi/haskell-gi/wiki).
gi-pango.cabal view
@@ -1,5 +1,5 @@ name: gi-pango-version: 1.0.18+version: 1.0.19 synopsis: Pango bindings description: Bindings for Pango, autogenerated by haskell-gi. homepage: https://github.com/haskell-gi/haskell-gi@@ -42,6 +42,65 @@ build-depends: haskell-gi-overloading == 0.0 exposed-modules: GI.Pango,+ GI.Pango.Callbacks,+ GI.Pango.Constants,+ GI.Pango.Enums,+ GI.Pango.Flags,+ GI.Pango.Functions,+ GI.Pango.Objects,+ GI.Pango.Objects.Context,+ GI.Pango.Objects.Engine,+ GI.Pango.Objects.EngineLang,+ GI.Pango.Objects.EngineShape,+ GI.Pango.Objects.Font,+ GI.Pango.Objects.FontFace,+ GI.Pango.Objects.FontFamily,+ GI.Pango.Objects.FontMap,+ GI.Pango.Objects.Fontset,+ GI.Pango.Objects.FontsetSimple,+ GI.Pango.Objects.Layout,+ GI.Pango.Objects.Renderer,+ GI.Pango.Structs,+ GI.Pango.Structs.Analysis,+ GI.Pango.Structs.AttrClass,+ GI.Pango.Structs.AttrColor,+ GI.Pango.Structs.AttrFloat,+ GI.Pango.Structs.AttrFontDesc,+ GI.Pango.Structs.AttrFontFeatures,+ GI.Pango.Structs.AttrInt,+ GI.Pango.Structs.AttrIterator,+ GI.Pango.Structs.AttrLanguage,+ GI.Pango.Structs.AttrList,+ GI.Pango.Structs.AttrShape,+ GI.Pango.Structs.AttrSize,+ GI.Pango.Structs.AttrString,+ GI.Pango.Structs.Attribute,+ GI.Pango.Structs.Color,+ GI.Pango.Structs.Coverage,+ GI.Pango.Structs.EngineInfo,+ GI.Pango.Structs.EngineScriptInfo,+ GI.Pango.Structs.FontDescription,+ GI.Pango.Structs.FontMetrics,+ GI.Pango.Structs.GlyphGeometry,+ GI.Pango.Structs.GlyphInfo,+ GI.Pango.Structs.GlyphItem,+ GI.Pango.Structs.GlyphItemIter,+ GI.Pango.Structs.GlyphString,+ GI.Pango.Structs.GlyphVisAttr,+ GI.Pango.Structs.IncludedModule,+ GI.Pango.Structs.Item,+ GI.Pango.Structs.Language,+ GI.Pango.Structs.LayoutIter,+ GI.Pango.Structs.LayoutLine,+ GI.Pango.Structs.LogAttr,+ GI.Pango.Structs.Map,+ GI.Pango.Structs.MapEntry,+ GI.Pango.Structs.Matrix,+ GI.Pango.Structs.Rectangle,+ GI.Pango.Structs.ScriptIter,+ GI.Pango.Structs.TabArray++ autogen-modules: GI.Pango, GI.Pango.Callbacks, GI.Pango.Constants, GI.Pango.Enums,