gi-pangocairo 1.0.19 → 1.0.20
raw patch · 11 files changed
+13/−1832 lines, 11 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- GI/PangoCairo.hs +0/−50
- GI/PangoCairo/Callbacks.hs +0/−145
- GI/PangoCairo/Functions.hs +0/−844
- GI/PangoCairo/Interfaces.hs +0/−43
- GI/PangoCairo/Interfaces/Font.hs +0/−188
- GI/PangoCairo/Interfaces/Font.hs-boot +0/−32
- GI/PangoCairo/Interfaces/FontMap.hs +0/−487
- GI/PangoCairo/Interfaces/FontMap.hs-boot +0/−41
- README.md +1/−1
- gi-pangocairo.cabal +8/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+### 1.0.20+++ List autogenerated modules in .cabal file+ ### 1.0.19 + Update to haskell-gi(-base) 0.22
− GI/PangoCairo.hs
@@ -1,50 +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.PangoCairo- ( module GI.PangoCairo.Callbacks ,- module GI.PangoCairo.Functions ,- module GI.PangoCairo.Interfaces ,---- module Data.GI.Base ,--- ) where--import GI.PangoCairo.Callbacks-import GI.PangoCairo.Functions-import GI.PangoCairo.Interfaces--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/PangoCairo/Callbacks.hs
@@ -1,145 +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.PangoCairo.Callbacks- ( -- -- * Signals--- ** ShapeRendererFunc #signal:ShapeRendererFunc#-- C_ShapeRendererFunc ,- ShapeRendererFunc ,- dynamic_ShapeRendererFunc ,- genClosure_ShapeRendererFunc ,- mk_ShapeRendererFunc ,- noShapeRendererFunc ,- wrap_ShapeRendererFunc ,----- ) 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.Cairo.Structs.Context as Cairo.Context-import qualified GI.Pango.Structs.AttrShape as Pango.AttrShape---- callback ShapeRendererFunc--- -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context with current point set to where the shape should\nbe rendered", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "AttrShape"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the %PANGO_ATTR_SHAPE to render", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "do_path", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether only the shape path should be appended to current\npath of @cr and no filling/stroking done. This will be set\nto %TRUE when called from pango_cairo_layout_path() and\npango_cairo_layout_line_path() rendering functions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to pango_cairo_context_set_shape_renderer()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Function type for rendering attributes of type %PANGO_ATTR_SHAPE\nwith Pango's Cairo renderer.", sinceVersion = Nothing}}--- | Type for the callback on the (unwrapped) C side.-type C_ShapeRendererFunc =- Ptr Cairo.Context.Context ->- Ptr Pango.AttrShape.AttrShape ->- CInt ->- Ptr () ->- IO ()---- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context with current point set to where the shape should\nbe rendered", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attr", argType = TInterface (Name {namespace = "Pango", name = "AttrShape"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the %PANGO_ATTR_SHAPE to render", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "do_path", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether only the shape path should be appended to current\npath of @cr and no filling/stroking done. This will be set\nto %TRUE when called from pango_cairo_layout_path() and\npango_cairo_layout_line_path() rendering functions.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to pango_cairo_context_set_shape_renderer()", 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_ShapeRendererFunc :: FunPtr C_ShapeRendererFunc -> C_ShapeRendererFunc---- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.-dynamic_ShapeRendererFunc ::- (B.CallStack.HasCallStack, MonadIO m) =>- FunPtr C_ShapeRendererFunc- -> Cairo.Context.Context- {- ^ /@cr@/: a Cairo context with current point set to where the shape should-be rendered -}- -> Pango.AttrShape.AttrShape- {- ^ /@attr@/: the 'GI.Pango.Enums.AttrTypeShape' to render -}- -> Bool- {- ^ /@doPath@/: whether only the shape path should be appended to current-path of /@cr@/ and no filling\/stroking done. This will be set-to 'True' when called from 'GI.PangoCairo.Functions.layoutPath' and-'GI.PangoCairo.Functions.layoutLinePath' rendering functions. -}- -> Ptr ()- {- ^ /@data@/: user data passed to 'GI.PangoCairo.Functions.contextSetShapeRenderer' -}- -> m ()-dynamic_ShapeRendererFunc __funPtr cr attr doPath data_ = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- attr' <- unsafeManagedPtrGetPtr attr- let doPath' = (fromIntegral . fromEnum) doPath- (__dynamic_C_ShapeRendererFunc __funPtr) cr' attr' doPath' data_- touchManagedPtr cr- touchManagedPtr attr- return ()---- | Generate a function pointer callable from C code, from a `C_ShapeRendererFunc`.-foreign import ccall "wrapper"- mk_ShapeRendererFunc :: C_ShapeRendererFunc -> IO (FunPtr C_ShapeRendererFunc)--{- |-Function type for rendering attributes of type 'GI.Pango.Enums.AttrTypeShape'-with Pango\'s Cairo renderer.--}-type ShapeRendererFunc =- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context with current point set to where the shape should-be rendered -}- -> Pango.AttrShape.AttrShape- {- ^ /@attr@/: the 'GI.Pango.Enums.AttrTypeShape' to render -}- -> Bool- {- ^ /@doPath@/: whether only the shape path should be appended to current-path of /@cr@/ and no filling\/stroking done. This will be set-to 'True' when called from 'GI.PangoCairo.Functions.layoutPath' and-'GI.PangoCairo.Functions.layoutLinePath' rendering functions. -}- -> Ptr ()- {- ^ /@data@/: user data passed to 'GI.PangoCairo.Functions.contextSetShapeRenderer' -}- -> IO ()---- | A convenience synonym for @`Nothing` :: `Maybe` `ShapeRendererFunc`@.-noShapeRendererFunc :: Maybe ShapeRendererFunc-noShapeRendererFunc = Nothing---- | Wrap the callback into a `GClosure`.-genClosure_ShapeRendererFunc :: MonadIO m => ShapeRendererFunc -> m (GClosure C_ShapeRendererFunc)-genClosure_ShapeRendererFunc cb = liftIO $ do- let cb' = wrap_ShapeRendererFunc Nothing cb- mk_ShapeRendererFunc cb' >>= B.GClosure.newGClosure----- | Wrap a `ShapeRendererFunc` into a `C_ShapeRendererFunc`.-wrap_ShapeRendererFunc ::- Maybe (Ptr (FunPtr C_ShapeRendererFunc)) ->- ShapeRendererFunc ->- C_ShapeRendererFunc-wrap_ShapeRendererFunc funptrptr _cb cr attr doPath data_ = do- B.ManagedPtr.withTransient Cairo.Context.Context cr $ \cr' -> do- attr' <- (newPtr Pango.AttrShape.AttrShape) attr- let doPath' = (/= 0) doPath- _cb cr' attr' doPath' data_- maybeReleaseFunPtr funptrptr---
− GI/PangoCairo/Functions.hs
@@ -1,844 +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.PangoCairo.Functions- ( -- -- * Methods--- ** contextGetFontOptions #method:contextGetFontOptions#-- contextGetFontOptions ,----- ** contextGetResolution #method:contextGetResolution#-- contextGetResolution ,----- ** contextSetFontOptions #method:contextSetFontOptions#-- contextSetFontOptions ,----- ** contextSetResolution #method:contextSetResolution#-- contextSetResolution ,----- ** contextSetShapeRenderer #method:contextSetShapeRenderer#-- contextSetShapeRenderer ,----- ** createContext #method:createContext#-- createContext ,----- ** createLayout #method:createLayout#-- createLayout ,----- ** errorUnderlinePath #method:errorUnderlinePath#-- errorUnderlinePath ,----- ** glyphStringPath #method:glyphStringPath#-- glyphStringPath ,----- ** layoutLinePath #method:layoutLinePath#-- layoutLinePath ,----- ** layoutPath #method:layoutPath#-- layoutPath ,----- ** showErrorUnderline #method:showErrorUnderline#-- showErrorUnderline ,----- ** showGlyphItem #method:showGlyphItem#-- showGlyphItem ,----- ** showGlyphString #method:showGlyphString#-- showGlyphString ,----- ** showLayout #method:showLayout#-- showLayout ,----- ** showLayoutLine #method:showLayoutLine#-- showLayoutLine ,----- ** updateContext #method:updateContext#-- updateContext ,----- ** updateLayout #method:updateLayout#-- updateLayout ,----- ) 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.Cairo.Structs.Context as Cairo.Context-import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions-import qualified GI.GLib.Callbacks as GLib.Callbacks-import qualified GI.Pango.Objects.Context as Pango.Context-import qualified GI.Pango.Objects.Font as Pango.Font-import qualified GI.Pango.Objects.Layout as Pango.Layout-import qualified GI.Pango.Structs.GlyphItem as Pango.GlyphItem-import qualified GI.Pango.Structs.GlyphString as Pango.GlyphString-import qualified GI.Pango.Structs.LayoutLine as Pango.LayoutLine-import qualified GI.PangoCairo.Callbacks as PangoCairo.Callbacks---- function pango_cairo_update_layout--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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, from pango_cairo_create_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_cairo_update_layout" pango_cairo_update_layout :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.Layout.Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO ()--{- |-Updates the private 'GI.Pango.Objects.Context.Context' of a 'GI.Pango.Objects.Layout.Layout' created with-'GI.PangoCairo.Functions.createLayout' to match the current transformation-and target surface of a Cairo context.--/Since: 1.10/--}-updateLayout ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Layout.IsLayout a) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> a- {- ^ /@layout@/: a 'GI.Pango.Objects.Layout.Layout', from 'GI.PangoCairo.Functions.createLayout' -}- -> m ()-updateLayout cr layout = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- layout' <- unsafeManagedPtrCastPtr layout- pango_cairo_update_layout cr' layout'- touchManagedPtr cr- touchManagedPtr layout- return ()----- function pango_cairo_update_context--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 "a #PangoContext, from a pangocairo font map", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_update_context" pango_cairo_update_context :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO ()--{- |-Updates a 'GI.Pango.Objects.Context.Context' previously created for use with Cairo to-match the current transformation and target surface of a Cairo-context. If any layouts have been created for the context,-it\'s necessary to call 'GI.Pango.Objects.Layout.layoutContextChanged' on those-layouts.--/Since: 1.10/--}-updateContext ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context', from a pangocairo font map -}- -> m ()-updateContext cr context = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- context' <- unsafeManagedPtrCastPtr context- pango_cairo_update_context cr' context'- touchManagedPtr cr- touchManagedPtr context- return ()----- function pango_cairo_show_layout_line--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_show_layout_line" pango_cairo_show_layout_line :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.LayoutLine.LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- IO ()--{- |-Draws a 'GI.Pango.Structs.LayoutLine.LayoutLine' in the specified cairo context.-The origin of the glyphs (the left edge of the line) will-be drawn at the current point of the cairo context.--/Since: 1.10/--}-showLayoutLine ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> Pango.LayoutLine.LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> m ()-showLayoutLine cr line = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- line' <- unsafeManagedPtrGetPtr line- pango_cairo_show_layout_line cr' line'- touchManagedPtr cr- touchManagedPtr line- return ()----- function pango_cairo_show_layout--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 Pango 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_cairo_show_layout" pango_cairo_show_layout :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.Layout.Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO ()--{- |-Draws a 'GI.Pango.Objects.Layout.Layout' in the specified cairo context.-The top-left corner of the 'GI.Pango.Objects.Layout.Layout' will be drawn-at the current point of the cairo context.--/Since: 1.10/--}-showLayout ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Layout.IsLayout a) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> a- {- ^ /@layout@/: a Pango layout -}- -> m ()-showLayout cr layout = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- layout' <- unsafeManagedPtrCastPtr layout- pango_cairo_show_layout cr' layout'- touchManagedPtr cr- touchManagedPtr layout- return ()----- function pango_cairo_show_glyph_string--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 from a #PangoCairoFontMap", 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}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_show_glyph_string" pango_cairo_show_glyph_string :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.Font.Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Ptr Pango.GlyphString.GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- IO ()--{- |-Draws the glyphs in /@glyphs@/ in the specified cairo context.-The origin of the glyphs (the left edge of the baseline) will-be drawn at the current point of the cairo context.--/Since: 1.10/--}-showGlyphString ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Font.IsFont a) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' from a 'GI.PangoCairo.Interfaces.FontMap.FontMap' -}- -> Pango.GlyphString.GlyphString- {- ^ /@glyphs@/: a 'GI.Pango.Structs.GlyphString.GlyphString' -}- -> m ()-showGlyphString cr font glyphs = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- font' <- unsafeManagedPtrCastPtr font- glyphs' <- unsafeManagedPtrGetPtr glyphs- pango_cairo_show_glyph_string cr' font' glyphs'- touchManagedPtr cr- touchManagedPtr font- touchManagedPtr glyphs- return ()----- function pango_cairo_show_glyph_item--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 UTF-8 text that @glyph_item refers to", 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}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_show_glyph_item" pango_cairo_show_glyph_item :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- CString -> -- text : TBasicType TUTF8- Ptr Pango.GlyphItem.GlyphItem -> -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})- IO ()--{- |-Draws the glyphs in /@glyphItem@/ in the specified cairo context,-embedding the text associated with the glyphs in the output if the-output format supports it (PDF for example), otherwise it acts-similar to 'GI.PangoCairo.Functions.showGlyphString'.--The origin of the glyphs (the left edge of the baseline) will-be drawn at the current point of the cairo context.--Note that /@text@/ is the start of the text for layout, which is then-indexed by \<literal>/@glyphItem@/->item->offset\<\/literal>.--/Since: 1.22/--}-showGlyphItem ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> T.Text- {- ^ /@text@/: the UTF-8 text that /@glyphItem@/ refers to -}- -> Pango.GlyphItem.GlyphItem- {- ^ /@glyphItem@/: a 'GI.Pango.Structs.GlyphItem.GlyphItem' -}- -> m ()-showGlyphItem cr text glyphItem = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- text' <- textToCString text- glyphItem' <- unsafeManagedPtrGetPtr glyphItem- pango_cairo_show_glyph_item cr' text' glyphItem'- touchManagedPtr cr- touchManagedPtr glyphItem- freeMem text'- return ()----- function pango_cairo_show_error_underline--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 "The X coordinate of one corner of the rectangle", 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 "The Y coordinate of one corner of the rectangle", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Non-negative width of the rectangle", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Non-negative height of the rectangle", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_show_error_underline" pango_cairo_show_error_underline :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- CDouble -> -- x : TBasicType TDouble- CDouble -> -- y : TBasicType TDouble- CDouble -> -- width : TBasicType TDouble- CDouble -> -- height : TBasicType TDouble- IO ()--{- |-Draw a squiggly line in the specified cairo context 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)--/Since: 1.14/--}-showErrorUnderline ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> Double- {- ^ /@x@/: The X coordinate of one corner of the rectangle -}- -> Double- {- ^ /@y@/: The Y coordinate of one corner of the rectangle -}- -> Double- {- ^ /@width@/: Non-negative width of the rectangle -}- -> Double- {- ^ /@height@/: Non-negative height of the rectangle -}- -> m ()-showErrorUnderline cr x y width height = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- let x' = realToFrac x- let y' = realToFrac y- let width' = realToFrac width- let height' = realToFrac height- pango_cairo_show_error_underline cr' x' y' width' height'- touchManagedPtr cr- return ()----- function pango_cairo_layout_path--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 Pango 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_cairo_layout_path" pango_cairo_layout_path :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.Layout.Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})- IO ()--{- |-Adds the text in a 'GI.Pango.Objects.Layout.Layout' to the current path in the-specified cairo context. The top-left corner of the 'GI.Pango.Objects.Layout.Layout'-will be at the current point of the cairo context.--/Since: 1.10/--}-layoutPath ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Layout.IsLayout a) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> a- {- ^ /@layout@/: a Pango layout -}- -> m ()-layoutPath cr layout = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- layout' <- unsafeManagedPtrCastPtr layout- pango_cairo_layout_path cr' layout'- touchManagedPtr cr- touchManagedPtr layout- return ()----- function pango_cairo_layout_line_path--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_layout_line_path" pango_cairo_layout_line_path :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.LayoutLine.LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})- IO ()--{- |-Adds the text in 'GI.Pango.Structs.LayoutLine.LayoutLine' to the current path in the-specified cairo context. The origin of the glyphs (the left edge-of the line) will be at the current point of the cairo context.--/Since: 1.10/--}-layoutLinePath ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> Pango.LayoutLine.LayoutLine- {- ^ /@line@/: a 'GI.Pango.Structs.LayoutLine.LayoutLine' -}- -> m ()-layoutLinePath cr line = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- line' <- unsafeManagedPtrGetPtr line- pango_cairo_layout_line_path cr' line'- touchManagedPtr cr- touchManagedPtr line- return ()----- function pango_cairo_glyph_string_path--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 from a #PangoCairoFontMap", 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}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_glyph_string_path" pango_cairo_glyph_string_path :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- Ptr Pango.Font.Font -> -- font : TInterface (Name {namespace = "Pango", name = "Font"})- Ptr Pango.GlyphString.GlyphString -> -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})- IO ()--{- |-Adds the glyphs in /@glyphs@/ to the current path in the specified-cairo context. The origin of the glyphs (the left edge of the baseline)-will be at the current point of the cairo context.--/Since: 1.10/--}-glyphStringPath ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Font.IsFont a) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' from a 'GI.PangoCairo.Interfaces.FontMap.FontMap' -}- -> Pango.GlyphString.GlyphString- {- ^ /@glyphs@/: a 'GI.Pango.Structs.GlyphString.GlyphString' -}- -> m ()-glyphStringPath cr font glyphs = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- font' <- unsafeManagedPtrCastPtr font- glyphs' <- unsafeManagedPtrGetPtr glyphs- pango_cairo_glyph_string_path cr' font' glyphs'- touchManagedPtr cr- touchManagedPtr font- touchManagedPtr glyphs- return ()----- function pango_cairo_error_underline_path--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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 "The X coordinate of one corner of the rectangle", 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 "The Y coordinate of one corner of the rectangle", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Non-negative width of the rectangle", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Non-negative height of the rectangle", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_error_underline_path" pango_cairo_error_underline_path :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- CDouble -> -- x : TBasicType TDouble- CDouble -> -- y : TBasicType TDouble- CDouble -> -- width : TBasicType TDouble- CDouble -> -- height : TBasicType TDouble- IO ()--{- |-Add a squiggly line to the current path in the specified cairo context 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)--/Since: 1.14/--}-errorUnderlinePath ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> Double- {- ^ /@x@/: The X coordinate of one corner of the rectangle -}- -> Double- {- ^ /@y@/: The Y coordinate of one corner of the rectangle -}- -> Double- {- ^ /@width@/: Non-negative width of the rectangle -}- -> Double- {- ^ /@height@/: Non-negative height of the rectangle -}- -> m ()-errorUnderlinePath cr x y width height = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- let x' = realToFrac x- let y' = realToFrac y- let width' = realToFrac width- let height' = realToFrac height- pango_cairo_error_underline_path cr' x' y' width' height'- touchManagedPtr cr- return ()----- function pango_cairo_create_layout--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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_cairo_create_layout" pango_cairo_create_layout :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- IO (Ptr Pango.Layout.Layout)--{- |-Creates a layout object set up to match the current transformation-and target surface of the Cairo context. This layout can then be-used for text measurement with functions like-'GI.Pango.Objects.Layout.layoutGetSize' or drawing with functions like-'GI.PangoCairo.Functions.showLayout'. If you change the transformation-or target surface for /@cr@/, you need to call 'GI.PangoCairo.Functions.updateLayout'--This function is the most convenient way to use Cairo with Pango,-however it is slightly inefficient since it creates a separate-'GI.Pango.Objects.Context.Context' object for each layout. This might matter in an-application that was laying out large amounts of text.--/Since: 1.10/--}-createLayout ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> m Pango.Layout.Layout- {- ^ __Returns:__ the newly created 'GI.Pango.Objects.Layout.Layout'. Free with- 'GI.GObject.Objects.Object.objectUnref'. -}-createLayout cr = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- result <- pango_cairo_create_layout cr'- checkUnexpectedReturnNULL "createLayout" result- result' <- (wrapObject Pango.Layout.Layout) result- touchManagedPtr cr- return result'----- function pango_cairo_create_context--- Args : [Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a Cairo context", 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_cairo_create_context" pango_cairo_create_context :: - Ptr Cairo.Context.Context -> -- cr : TInterface (Name {namespace = "cairo", name = "Context"})- IO (Ptr Pango.Context.Context)--{- |-Creates a context object set up to match the current transformation-and target surface of the Cairo context. This context can then be-used to create a layout using 'GI.Pango.Objects.Layout.layoutNew'.--This function is a convenience function that creates a context using-the default font map, then updates it to /@cr@/. If you just need to-create a layout for use with /@cr@/ and do not need to access 'GI.Pango.Objects.Context.Context'-directly, you can use 'GI.PangoCairo.Functions.createLayout' instead.--/Since: 1.22/--}-createContext ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Context.Context- {- ^ /@cr@/: a Cairo context -}- -> m Pango.Context.Context- {- ^ __Returns:__ the newly created 'GI.Pango.Objects.Context.Context'. Free with- 'GI.GObject.Objects.Object.objectUnref'. -}-createContext cr = liftIO $ do- cr' <- unsafeManagedPtrGetPtr cr- result <- pango_cairo_create_context cr'- checkUnexpectedReturnNULL "createContext" result- result' <- (wrapObject Pango.Context.Context) result- touchManagedPtr cr- return result'----- function pango_cairo_context_set_shape_renderer--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext, from a pangocairo font map", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "func", argType = TInterface (Name {namespace = "PangoCairo", name = "ShapeRendererFunc"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Callback function for rendering attributes of\n type %PANGO_ATTR_SHAPE, or %NULL to disable shape rendering.", sinceVersion = Nothing}, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "User data that will be passed to @func.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dnotify", argType = TInterface (Name {namespace = "GLib", name = "DestroyNotify"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Callback that will be called when the\n context is freed to release @data, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_context_set_shape_renderer" pango_cairo_context_set_shape_renderer :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- FunPtr PangoCairo.Callbacks.C_ShapeRendererFunc -> -- func : TInterface (Name {namespace = "PangoCairo", name = "ShapeRendererFunc"})- Ptr () -> -- data : TBasicType TPtr- FunPtr GLib.Callbacks.C_DestroyNotify -> -- dnotify : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})- IO ()--{- |-Sets callback function for context to use for rendering attributes-of type 'GI.Pango.Enums.AttrTypeShape'. See 'GI.PangoCairo.Callbacks.ShapeRendererFunc' for-details.--/Since: 1.18/--}-contextSetShapeRenderer ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context', from a pangocairo font map -}- -> Maybe (PangoCairo.Callbacks.ShapeRendererFunc)- {- ^ /@func@/: Callback function for rendering attributes of- type 'GI.Pango.Enums.AttrTypeShape', or 'Nothing' to disable shape rendering. -}- -> m ()-contextSetShapeRenderer context func = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- maybeFunc <- case func of- Nothing -> return (castPtrToFunPtr nullPtr)- Just jFunc -> do- jFunc' <- PangoCairo.Callbacks.mk_ShapeRendererFunc (PangoCairo.Callbacks.wrap_ShapeRendererFunc Nothing jFunc)- return jFunc'- let data_ = castFunPtrToPtr maybeFunc- let dnotify = safeFreeFunPtrPtr- pango_cairo_context_set_shape_renderer context' maybeFunc data_ dnotify- touchManagedPtr context- return ()----- function pango_cairo_context_set_resolution--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext, from a pangocairo font map", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dpi", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the resolution in \"dots per inch\". (Physical inches aren't actually\n involved; the terminology is conventional.) A 0 or negative value\n means to use the resolution from the font map.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_context_set_resolution" pango_cairo_context_set_resolution :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- CDouble -> -- dpi : TBasicType TDouble- IO ()--{- |-Sets the resolution for the context. This is a scale factor between-points specified in a 'GI.Pango.Structs.FontDescription.FontDescription' and Cairo units. The-default value is 96, meaning that a 10 point font will be 13-units high. (10 * 96. \/ 72. = 13.3).--/Since: 1.10/--}-contextSetResolution ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context', from a pangocairo font map -}- -> Double- {- ^ /@dpi@/: the resolution in \"dots per inch\". (Physical inches aren\'t actually- involved; the terminology is conventional.) A 0 or negative value- means to use the resolution from the font map. -}- -> m ()-contextSetResolution context dpi = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- let dpi' = realToFrac dpi- pango_cairo_context_set_resolution context' dpi'- touchManagedPtr context- return ()----- function pango_cairo_context_set_font_options--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext, from a pangocairo font map", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "cairo", name = "FontOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #cairo_font_options_t, or %NULL to unset\n any previously set options. A copy is made.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_context_set_font_options" pango_cairo_context_set_font_options :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- Ptr Cairo.FontOptions.FontOptions -> -- options : TInterface (Name {namespace = "cairo", name = "FontOptions"})- IO ()--{- |-Sets the font options used when rendering text with this context.-These options override any options that 'GI.PangoCairo.Functions.updateContext'-derives from the target surface.--/Since: 1.10/--}-contextSetFontOptions ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context', from a pangocairo font map -}- -> Maybe (Cairo.FontOptions.FontOptions)- {- ^ /@options@/: a 'GI.Cairo.Structs.FontOptions.FontOptions', or 'Nothing' to unset- any previously set options. A copy is made. -}- -> m ()-contextSetFontOptions context options = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- maybeOptions <- case options of- Nothing -> return nullPtr- Just jOptions -> do- jOptions' <- unsafeManagedPtrGetPtr jOptions- return jOptions'- pango_cairo_context_set_font_options context' maybeOptions- touchManagedPtr context- whenJust options touchManagedPtr- return ()----- function pango_cairo_context_get_resolution--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext, from a pangocairo font map", 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_cairo_context_get_resolution" pango_cairo_context_get_resolution :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO CDouble--{- |-Gets the resolution for the context. See 'GI.PangoCairo.Functions.contextSetResolution'--/Since: 1.10/--}-contextGetResolution ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context', from a pangocairo font map -}- -> m Double- {- ^ __Returns:__ the resolution in \"dots per inch\". A negative value will- be returned if no resolution has previously been set. -}-contextGetResolution context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_cairo_context_get_resolution context'- let result' = realToFrac result- touchManagedPtr context- return result'----- function pango_cairo_context_get_font_options--- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Pango", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoContext, from a pangocairo font map", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "cairo", name = "FontOptions"}))--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_context_get_font_options" pango_cairo_context_get_font_options :: - Ptr Pango.Context.Context -> -- context : TInterface (Name {namespace = "Pango", name = "Context"})- IO (Ptr Cairo.FontOptions.FontOptions)--{- |-Retrieves any font rendering options previously set with-'GI.PangoCairo.Functions.contextSetFontOptions'. This function does not report options-that are derived from the target surface by 'GI.PangoCairo.Functions.updateContext'--/Since: 1.10/--}-contextGetFontOptions ::- (B.CallStack.HasCallStack, MonadIO m, Pango.Context.IsContext a) =>- a- {- ^ /@context@/: a 'GI.Pango.Objects.Context.Context', from a pangocairo font map -}- -> m (Maybe Cairo.FontOptions.FontOptions)- {- ^ __Returns:__ the font options previously set on the- context, or 'Nothing' if no options have been set. This value is- owned by the context and must not be modified or freed. -}-contextGetFontOptions context = liftIO $ do- context' <- unsafeManagedPtrCastPtr context- result <- pango_cairo_context_get_font_options context'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (newBoxed Cairo.FontOptions.FontOptions) result'- return result''- touchManagedPtr context- return maybeResult---
− GI/PangoCairo/Interfaces.hs
@@ -1,43 +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.PangoCairo.Interfaces- ( module GI.PangoCairo.Interfaces.Font ,- module GI.PangoCairo.Interfaces.FontMap ,--- ) where--import GI.PangoCairo.Interfaces.Font-import GI.PangoCairo.Interfaces.FontMap--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/PangoCairo/Interfaces/Font.hs
@@ -1,188 +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.PangoCairo.Interfaces.Font.Font' is an interface exported by fonts for-use with Cairo. The actual type of the font will depend-on the particular font technology Cairo was compiled to use.--/Since: 1.18/--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.PangoCairo.Interfaces.Font- ( ---- * Exported types- Font(..) ,- noFont ,- IsFont ,- toFont ,--- -- * Methods--- ** getScaledFont #method:getScaledFont#--#if ENABLE_OVERLOADING- FontGetScaledFontMethodInfo ,-#endif- fontGetScaledFont ,----- ) 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.Cairo.Structs.ScaledFont as Cairo.ScaledFont-import qualified GI.GObject.Objects.Object as GObject.Object-import qualified GI.Pango.Objects.Font as Pango.Font---- interface Font --- | Memory-managed wrapper type.-newtype Font = Font (ManagedPtr Font)--- | A convenience alias for `Nothing` :: `Maybe` `Font`.-noFont :: Maybe Font-noFont = Nothing--#if ENABLE_OVERLOADING-type instance O.SignalList Font = FontSignalList-type FontSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif--foreign import ccall "pango_cairo_font_get_type"- c_pango_cairo_font_get_type :: IO GType--instance GObject Font where- gobjectType = c_pango_cairo_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 = '[Pango.Font.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--#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 family ResolveFontMethod (t :: Symbol) (o :: *) :: * where- ResolveFontMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontMethod "describe" o = Pango.Font.FontDescribeMethodInfo- ResolveFontMethod "describeWithAbsoluteSize" o = Pango.Font.FontDescribeWithAbsoluteSizeMethodInfo- ResolveFontMethod "findShaper" o = Pango.Font.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 = Pango.Font.FontGetFontMapMethodInfo- ResolveFontMethod "getGlyphExtents" o = Pango.Font.FontGetGlyphExtentsMethodInfo- ResolveFontMethod "getMetrics" o = Pango.Font.FontGetMetricsMethodInfo- ResolveFontMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontMethod "getScaledFont" o = FontGetScaledFontMethodInfo- 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---- method Font::get_scaled_font--- method type : OrdinaryMethod--- Args : [Arg {argCName = "font", argType = TInterface (Name {namespace = "PangoCairo", name = "Font"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFont from a #PangoCairoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "cairo", name = "ScaledFont"}))--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_font_get_scaled_font" pango_cairo_font_get_scaled_font :: - Ptr Font -> -- font : TInterface (Name {namespace = "PangoCairo", name = "Font"})- IO (Ptr Cairo.ScaledFont.ScaledFont)--{- |-Gets the 'GI.Cairo.Structs.ScaledFont.ScaledFont' used by /@font@/.-The scaled font can be referenced and kept using-@/cairo_scaled_font_reference()/@.--/Since: 1.18/--}-fontGetScaledFont ::- (B.CallStack.HasCallStack, MonadIO m, IsFont a) =>- a- {- ^ /@font@/: a 'GI.Pango.Objects.Font.Font' from a 'GI.PangoCairo.Interfaces.FontMap.FontMap' -}- -> m (Maybe Cairo.ScaledFont.ScaledFont)- {- ^ __Returns:__ the 'GI.Cairo.Structs.ScaledFont.ScaledFont' used by /@font@/,- or 'Nothing' if /@font@/ is 'Nothing'. -}-fontGetScaledFont font = liftIO $ do- font' <- unsafeManagedPtrCastPtr font- result <- pango_cairo_font_get_scaled_font font'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapBoxed Cairo.ScaledFont.ScaledFont) result'- return result''- touchManagedPtr font- return maybeResult--#if ENABLE_OVERLOADING-data FontGetScaledFontMethodInfo-instance (signature ~ (m (Maybe Cairo.ScaledFont.ScaledFont)), MonadIO m, IsFont a) => O.MethodInfo FontGetScaledFontMethodInfo a signature where- overloadedMethod _ = fontGetScaledFont--#endif--
− GI/PangoCairo/Interfaces/Font.hs-boot
@@ -1,32 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.PangoCairo.Interfaces.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 FontGetScaledFontMethodInfo-#endif
− GI/PangoCairo/Interfaces/FontMap.hs
@@ -1,487 +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.PangoCairo.Interfaces.FontMap.FontMap' is an interface exported by font maps for-use with Cairo. The actual type of the font map will depend-on the particular font technology Cairo was compiled to use.--/Since: 1.10/--}--#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))--module GI.PangoCairo.Interfaces.FontMap- ( ---- * Exported types- FontMap(..) ,- noFontMap ,- IsFontMap ,- toFontMap ,--- -- * Methods--- ** getDefault #method:getDefault#-- fontMapGetDefault ,----- ** getFontType #method:getFontType#--#if ENABLE_OVERLOADING- FontMapGetFontTypeMethodInfo ,-#endif- fontMapGetFontType ,----- ** getResolution #method:getResolution#--#if ENABLE_OVERLOADING- FontMapGetResolutionMethodInfo ,-#endif- fontMapGetResolution ,----- ** new #method:new#-- fontMapNew ,----- ** newForFontType #method:newForFontType#-- fontMapNewForFontType ,----- ** setDefault #method:setDefault#--#if ENABLE_OVERLOADING- FontMapSetDefaultMethodInfo ,-#endif- fontMapSetDefault ,----- ** setResolution #method:setResolution#--#if ENABLE_OVERLOADING- FontMapSetResolutionMethodInfo ,-#endif- fontMapSetResolution ,----- ) 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.Cairo.Enums as Cairo.Enums-import qualified GI.GObject.Objects.Object as GObject.Object-import qualified GI.Pango.Objects.FontMap as Pango.FontMap---- interface FontMap --- | Memory-managed wrapper type.-newtype FontMap = FontMap (ManagedPtr FontMap)--- | A convenience alias for `Nothing` :: `Maybe` `FontMap`.-noFontMap :: Maybe FontMap-noFontMap = Nothing--#if ENABLE_OVERLOADING-type instance O.SignalList FontMap = FontMapSignalList-type FontMapSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])--#endif--foreign import ccall "pango_cairo_font_map_get_type"- c_pango_cairo_font_map_get_type :: IO GType--instance GObject FontMap where- gobjectType = c_pango_cairo_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 = '[Pango.FontMap.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--#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 family ResolveFontMapMethod (t :: Symbol) (o :: *) :: * where- ResolveFontMapMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo- ResolveFontMapMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo- ResolveFontMapMethod "changed" o = Pango.FontMap.FontMapChangedMethodInfo- ResolveFontMapMethod "createContext" o = Pango.FontMap.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 = Pango.FontMap.FontMapListFamiliesMethodInfo- ResolveFontMapMethod "loadFont" o = Pango.FontMap.FontMapLoadFontMethodInfo- ResolveFontMapMethod "loadFontset" o = Pango.FontMap.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 "getFontType" o = FontMapGetFontTypeMethodInfo- ResolveFontMapMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo- ResolveFontMapMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo- ResolveFontMapMethod "getResolution" o = FontMapGetResolutionMethodInfo- ResolveFontMapMethod "getSerial" o = Pango.FontMap.FontMapGetSerialMethodInfo- ResolveFontMapMethod "getShapeEngineType" o = Pango.FontMap.FontMapGetShapeEngineTypeMethodInfo- ResolveFontMapMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo- ResolveFontMapMethod "setDefault" o = FontMapSetDefaultMethodInfo- ResolveFontMapMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo- ResolveFontMapMethod "setResolution" o = FontMapSetResolutionMethodInfo- 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---- method FontMap::get_font_type--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "PangoCairo", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCairoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "cairo", name = "FontType"}))--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_font_map_get_font_type" pango_cairo_font_map_get_font_type :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "PangoCairo", name = "FontMap"})- IO CUInt--{- |-Gets the type of Cairo font backend that /@fontmap@/ uses.--/Since: 1.18/--}-fontMapGetFontType ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.PangoCairo.Interfaces.FontMap.FontMap' -}- -> m Cairo.Enums.FontType- {- ^ __Returns:__ the 'GI.Cairo.Enums.FontType' cairo font backend type -}-fontMapGetFontType fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- result <- pango_cairo_font_map_get_font_type fontmap'- let result' = (toEnum . fromIntegral) result- touchManagedPtr fontmap- return result'--#if ENABLE_OVERLOADING-data FontMapGetFontTypeMethodInfo-instance (signature ~ (m Cairo.Enums.FontType), MonadIO m, IsFontMap a) => O.MethodInfo FontMapGetFontTypeMethodInfo a signature where- overloadedMethod _ = fontMapGetFontType--#endif---- method FontMap::get_resolution--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "PangoCairo", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCairoFontMap", 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_cairo_font_map_get_resolution" pango_cairo_font_map_get_resolution :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "PangoCairo", name = "FontMap"})- IO CDouble--{- |-Gets the resolution for the fontmap. See 'GI.PangoCairo.Interfaces.FontMap.fontMapSetResolution'--/Since: 1.10/--}-fontMapGetResolution ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.PangoCairo.Interfaces.FontMap.FontMap' -}- -> m Double- {- ^ __Returns:__ the resolution in \"dots per inch\" -}-fontMapGetResolution fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- result <- pango_cairo_font_map_get_resolution fontmap'- let result' = realToFrac result- touchManagedPtr fontmap- return result'--#if ENABLE_OVERLOADING-data FontMapGetResolutionMethodInfo-instance (signature ~ (m Double), MonadIO m, IsFontMap a) => O.MethodInfo FontMapGetResolutionMethodInfo a signature where- overloadedMethod _ = fontMapGetResolution--#endif---- method FontMap::set_default--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "PangoCairo", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The new default font map, 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_cairo_font_map_set_default" pango_cairo_font_map_set_default :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "PangoCairo", name = "FontMap"})- IO ()--{- |-Sets a default 'GI.PangoCairo.Interfaces.FontMap.FontMap' to use with Cairo.--This can be used to change the Cairo font backend that the-default fontmap uses for example. The old default font map-is unreffed and the new font map referenced.--Note that since Pango 1.32.6, the default fontmap is per-thread.-This function only changes the default fontmap for-the current thread. Default fontmaps of exisiting threads-are not changed. Default fontmaps of any new threads will-still be created using 'GI.PangoCairo.Functions.fontMapNew'.--A value of 'Nothing' for /@fontmap@/ will cause the current default-font map to be released and a new default font-map to be created on demand, using 'GI.PangoCairo.Functions.fontMapNew'.--/Since: 1.22/--}-fontMapSetDefault ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: The new default font map, or 'Nothing' -}- -> m ()-fontMapSetDefault fontmap = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- pango_cairo_font_map_set_default fontmap'- touchManagedPtr fontmap- return ()--#if ENABLE_OVERLOADING-data FontMapSetDefaultMethodInfo-instance (signature ~ (m ()), MonadIO m, IsFontMap a) => O.MethodInfo FontMapSetDefaultMethodInfo a signature where- overloadedMethod _ = fontMapSetDefault--#endif---- method FontMap::set_resolution--- method type : OrdinaryMethod--- Args : [Arg {argCName = "fontmap", argType = TInterface (Name {namespace = "PangoCairo", name = "FontMap"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoCairoFontMap", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dpi", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the resolution in \"dots per inch\". (Physical inches aren't actually\n involved; the terminology is conventional.)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Nothing--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_font_map_set_resolution" pango_cairo_font_map_set_resolution :: - Ptr FontMap -> -- fontmap : TInterface (Name {namespace = "PangoCairo", name = "FontMap"})- CDouble -> -- dpi : TBasicType TDouble- IO ()--{- |-Sets the resolution for the fontmap. This is a scale factor between-points specified in a 'GI.Pango.Structs.FontDescription.FontDescription' and Cairo units. The-default value is 96, meaning that a 10 point font will be 13-units high. (10 * 96. \/ 72. = 13.3).--/Since: 1.10/--}-fontMapSetResolution ::- (B.CallStack.HasCallStack, MonadIO m, IsFontMap a) =>- a- {- ^ /@fontmap@/: a 'GI.PangoCairo.Interfaces.FontMap.FontMap' -}- -> Double- {- ^ /@dpi@/: the resolution in \"dots per inch\". (Physical inches aren\'t actually- involved; the terminology is conventional.) -}- -> m ()-fontMapSetResolution fontmap dpi = liftIO $ do- fontmap' <- unsafeManagedPtrCastPtr fontmap- let dpi' = realToFrac dpi- pango_cairo_font_map_set_resolution fontmap' dpi'- touchManagedPtr fontmap- return ()--#if ENABLE_OVERLOADING-data FontMapSetResolutionMethodInfo-instance (signature ~ (Double -> m ()), MonadIO m, IsFontMap a) => O.MethodInfo FontMapSetResolutionMethodInfo a signature where- overloadedMethod _ = fontMapSetResolution--#endif---- method FontMap::get_default--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "PangoCairo", name = "FontMap"}))--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_font_map_get_default" pango_cairo_font_map_get_default :: - IO (Ptr FontMap)--{- |-Gets a default 'GI.PangoCairo.Interfaces.FontMap.FontMap' to use with Cairo.--Note that the type of the returned object will depend-on the particular font backend Cairo was compiled to use;-You generally should only use the 'GI.Pango.Objects.FontMap.FontMap' and-'GI.PangoCairo.Interfaces.FontMap.FontMap' interfaces on the returned object.--The default Cairo fontmap can be changed by using-'GI.PangoCairo.Interfaces.FontMap.fontMapSetDefault'. This can be used to-change the Cairo font backend that the default fontmap-uses for example.--Note that since Pango 1.32.6, the default fontmap is per-thread.-Each thread gets its own default fontmap. In this way,-PangoCairo can be used safely from multiple threads.--/Since: 1.10/--}-fontMapGetDefault ::- (B.CallStack.HasCallStack, MonadIO m) =>- m FontMap- {- ^ __Returns:__ the default PangoCairo fontmap- for the current thread. This object is owned by Pango and must not be freed. -}-fontMapGetDefault = liftIO $ do- result <- pango_cairo_font_map_get_default- checkUnexpectedReturnNULL "fontMapGetDefault" result- result' <- (newObject FontMap) result- return result'--#if ENABLE_OVERLOADING-#endif---- method FontMap::new--- method type : MemberFunction--- Args : []--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "PangoCairo", name = "FontMap"}))--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_font_map_new" pango_cairo_font_map_new :: - IO (Ptr FontMap)--{- |-Creates a new 'GI.PangoCairo.Interfaces.FontMap.FontMap' object; a fontmap is used-to cache information about available fonts, and holds-certain global parameters such as the resolution.-In most cases, you can use 'GI.PangoCairo.Functions.fontMapGetDefault'-instead.--Note that the type of the returned object will depend-on the particular font backend Cairo was compiled to use;-You generally should only use the 'GI.Pango.Objects.FontMap.FontMap' and-'GI.PangoCairo.Interfaces.FontMap.FontMap' interfaces on the returned object.--You can override the type of backend returned by using an-environment variable @/PANGOCAIRO_BACKEND/@. Supported types,-based on your build, are fc (fontconfig), win32, and coretext.-If requested type is not available, NULL is returned. Ie.-this is only useful for testing, when at least two backends-are compiled in.--/Since: 1.10/--}-fontMapNew ::- (B.CallStack.HasCallStack, MonadIO m) =>- m FontMap- {- ^ __Returns:__ the newly allocated 'GI.Pango.Objects.FontMap.FontMap',- which should be freed with 'GI.GObject.Objects.Object.objectUnref'. -}-fontMapNew = liftIO $ do- result <- pango_cairo_font_map_new- checkUnexpectedReturnNULL "fontMapNew" result- result' <- (wrapObject FontMap) result- return result'--#if ENABLE_OVERLOADING-#endif---- method FontMap::new_for_font_type--- method type : MemberFunction--- Args : [Arg {argCName = "fonttype", argType = TInterface (Name {namespace = "cairo", name = "FontType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "desired #cairo_font_type_t", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]--- Lengths : []--- returnType : Just (TInterface (Name {namespace = "PangoCairo", name = "FontMap"}))--- throws : False--- Skip return : False--foreign import ccall "pango_cairo_font_map_new_for_font_type" pango_cairo_font_map_new_for_font_type :: - CUInt -> -- fonttype : TInterface (Name {namespace = "cairo", name = "FontType"})- IO (Ptr FontMap)--{- |-Creates a new 'GI.PangoCairo.Interfaces.FontMap.FontMap' object of the type suitable-to be used with cairo font backend of type /@fonttype@/.--In most cases one should simply use /@pangoCairoFontMapNew@/(),-or in fact in most of those cases, just use-/@pangoCairoFontMapGetDefault@/().--/Since: 1.18/--}-fontMapNewForFontType ::- (B.CallStack.HasCallStack, MonadIO m) =>- Cairo.Enums.FontType- {- ^ /@fonttype@/: desired 'GI.Cairo.Enums.FontType' -}- -> m (Maybe FontMap)- {- ^ __Returns:__ the newly allocated- 'GI.Pango.Objects.FontMap.FontMap' of suitable type which should be freed- with 'GI.GObject.Objects.Object.objectUnref', or 'Nothing' if the requested- cairo font backend is not supported \/ compiled in. -}-fontMapNewForFontType fonttype = liftIO $ do- let fonttype' = (fromIntegral . fromEnum) fonttype- result <- pango_cairo_font_map_new_for_font_type fonttype'- maybeResult <- convertIfNonNull result $ \result' -> do- result'' <- (wrapObject FontMap) result'- return result''- return maybeResult--#if ENABLE_OVERLOADING-#endif--
− GI/PangoCairo/Interfaces/FontMap.hs-boot
@@ -1,41 +0,0 @@-#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \- && !defined(__HADDOCK_VERSION__))-module GI.PangoCairo.Interfaces.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 FontMapGetFontTypeMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapGetResolutionMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapSetDefaultMethodInfo-#endif-#if ENABLE_OVERLOADING-data FontMapSetResolutionMethodInfo-#endif
README.md view
@@ -1,6 +1,6 @@ # Documentation Autogenerated documentation for this package can be found at -[https://hackage.haskell.org/package/gi-pangocairo-1.0.19/docs/GI-PangoCairo.html](https://hackage.haskell.org/package/gi-pangocairo-1.0.19/docs/GI-PangoCairo.html)+[https://hackage.haskell.org/package/gi-pangocairo-1.0.20/docs/GI-PangoCairo.html](https://hackage.haskell.org/package/gi-pangocairo-1.0.20/docs/GI-PangoCairo.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-pangocairo.cabal view
@@ -1,5 +1,5 @@ name: gi-pangocairo-version: 1.0.19+version: 1.0.20 synopsis: PangoCairo bindings description: Bindings for PangoCairo, autogenerated by haskell-gi. homepage: https://github.com/haskell-gi/haskell-gi@@ -44,6 +44,13 @@ build-depends: haskell-gi-overloading == 0.0 exposed-modules: GI.PangoCairo,+ GI.PangoCairo.Callbacks,+ GI.PangoCairo.Functions,+ GI.PangoCairo.Interfaces,+ GI.PangoCairo.Interfaces.Font,+ GI.PangoCairo.Interfaces.FontMap++ autogen-modules: GI.PangoCairo, GI.PangoCairo.Callbacks, GI.PangoCairo.Functions, GI.PangoCairo.Interfaces,