-- | Copyright : Will Thompson and Iñaki García Etxebarria -- License : LGPL-2.1 -- Maintainer : Iñaki García Etxebarria #if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__)) #define ENABLE_OVERLOADING #endif module GI.CoglPango.Functions ( -- * Methods -- ** ensureGlyphCacheForLayout #method:ensureGlyphCacheForLayout# ensureGlyphCacheForLayout , -- ** fontMapClearGlyphCache #method:fontMapClearGlyphCache# fontMapClearGlyphCache , -- ** fontMapCreateContext #method:fontMapCreateContext# fontMapCreateContext , -- ** fontMapGetRenderer #method:fontMapGetRenderer# fontMapGetRenderer , -- ** fontMapGetUseMipmapping #method:fontMapGetUseMipmapping# fontMapGetUseMipmapping , -- ** fontMapNew #method:fontMapNew# fontMapNew , -- ** fontMapSetResolution #method:fontMapSetResolution# fontMapSetResolution , -- ** fontMapSetUseMipmapping #method:fontMapSetUseMipmapping# fontMapSetUseMipmapping , -- ** renderLayout #method:renderLayout# renderLayout , -- ** renderLayoutLine #method:renderLayoutLine# renderLayoutLine , -- ** renderLayoutSubpixel #method:renderLayoutSubpixel# renderLayoutSubpixel , ) 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.BasicTypes as B.Types import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GArray as B.GArray import qualified Data.GI.Base.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GHashTable as B.GHT import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.GI.Base.Signals as B.Signals import qualified Control.Monad.IO.Class as MIO import qualified Data.Coerce as Coerce import qualified Data.Text as T import qualified Data.Kind as DK 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 GHC.Records as R import qualified GI.Cogl.Structs.Color as Cogl.Color import qualified GI.Pango.Objects.Context as Pango.Context import qualified GI.Pango.Objects.FontMap as Pango.FontMap import qualified GI.Pango.Objects.Layout as Pango.Layout import qualified GI.Pango.Objects.Renderer as Pango.Renderer import qualified GI.Pango.Structs.LayoutLine as Pango.LayoutLine import qualified GI.PangoCairo.Interfaces.FontMap as PangoCairo.FontMap -- function render_layout_subpixel -- 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 "X coordinate (in Pango units) to render the layout at" -- , 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 (in Pango units) to render the layout at" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color" -- , argType = TInterface Name { namespace = "Cogl" , name = "Color" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "color to use when rendering the layout" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , 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 "cogl_pango_render_layout_subpixel" cogl_pango_render_layout_subpixel :: Ptr Pango.Layout.Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"}) Int32 -> -- x : TBasicType TInt Int32 -> -- y : TBasicType TInt Ptr Cogl.Color.Color -> -- color : TInterface (Name {namespace = "Cogl", name = "Color"}) Int32 -> -- flags : TBasicType TInt IO () {-# DEPRECATED renderLayoutSubpixel ["(Since version 1.16)","Use @/cogl_pango_show_layout()/@ instead"] #-} -- | Draws a solidly coloured /@layout@/ on the given /@framebuffer@/ at (/@x@/, -- /@y@/) within the /@framebuffer@/\'s current model-view coordinate -- space. -- -- /Since: 1.0/ renderLayoutSubpixel :: (B.CallStack.HasCallStack, MonadIO m, Pango.Layout.IsLayout a) => a -- ^ /@layout@/: a t'GI.Pango.Objects.Layout.Layout' -> Int32 -- ^ /@x@/: X coordinate (in Pango units) to render the layout at -> Int32 -- ^ /@y@/: Y coordinate (in Pango units) to render the layout at -> Cogl.Color.Color -- ^ /@color@/: color to use when rendering the layout -> Int32 -> m () renderLayoutSubpixel :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsLayout a) => a -> Int32 -> Int32 -> Color -> Int32 -> m () renderLayoutSubpixel a layout Int32 x Int32 y Color color Int32 flags = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Layout layout' <- a -> IO (Ptr Layout) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a layout Ptr Color color' <- Color -> IO (Ptr Color) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr Color color Ptr Layout -> Int32 -> Int32 -> Ptr Color -> Int32 -> IO () cogl_pango_render_layout_subpixel Ptr Layout layout' Int32 x Int32 y Ptr Color color' Int32 flags a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a layout Color -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr Color color () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- function render_layout_line -- 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" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "X coordinate to render the line at" -- , 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 to render the line at" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color" -- , argType = TInterface Name { namespace = "Cogl" , name = "Color" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "color to use when rendering the line" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "cogl_pango_render_layout_line" cogl_pango_render_layout_line :: Ptr Pango.LayoutLine.LayoutLine -> -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"}) Int32 -> -- x : TBasicType TInt Int32 -> -- y : TBasicType TInt Ptr Cogl.Color.Color -> -- color : TInterface (Name {namespace = "Cogl", name = "Color"}) IO () {-# DEPRECATED renderLayoutLine ["(Since version 1.16)","Use @/cogl_pango_show_layout()/@ instead"] #-} -- | Renders /@line@/ at the given coordinates using the given color. -- -- /Since: 1.0/ renderLayoutLine :: (B.CallStack.HasCallStack, MonadIO m) => Pango.LayoutLine.LayoutLine -- ^ /@line@/: a t'GI.Pango.Structs.LayoutLine.LayoutLine' -> Int32 -- ^ /@x@/: X coordinate to render the line at -> Int32 -- ^ /@y@/: Y coordinate to render the line at -> Cogl.Color.Color -- ^ /@color@/: color to use when rendering the line -> m () renderLayoutLine :: forall (m :: * -> *). (HasCallStack, MonadIO m) => LayoutLine -> Int32 -> Int32 -> Color -> m () renderLayoutLine LayoutLine line Int32 x Int32 y Color color = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr LayoutLine line' <- LayoutLine -> IO (Ptr LayoutLine) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr LayoutLine line Ptr Color color' <- Color -> IO (Ptr Color) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr Color color Ptr LayoutLine -> Int32 -> Int32 -> Ptr Color -> IO () cogl_pango_render_layout_line Ptr LayoutLine line' Int32 x Int32 y Ptr Color color' LayoutLine -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr LayoutLine line Color -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr Color color () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- function render_layout -- 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 "X coordinate to render the layout at" -- , 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 to render the layout at" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "color" -- , argType = TInterface Name { namespace = "Cogl" , name = "Color" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "color to use when rendering the layout" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , 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 "cogl_pango_render_layout" cogl_pango_render_layout :: Ptr Pango.Layout.Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"}) Int32 -> -- x : TBasicType TInt Int32 -> -- y : TBasicType TInt Ptr Cogl.Color.Color -> -- color : TInterface (Name {namespace = "Cogl", name = "Color"}) Int32 -> -- flags : TBasicType TInt IO () {-# DEPRECATED renderLayout ["(Since version 1.16)","Use @/cogl_pango_show_layout()/@ instead"] #-} -- | Draws a solidly coloured /@layout@/ on the given /@framebuffer@/ at (/@x@/, -- /@y@/) within the /@framebuffer@/\'s current model-view coordinate -- space. -- -- /Since: 1.0/ renderLayout :: (B.CallStack.HasCallStack, MonadIO m, Pango.Layout.IsLayout a) => a -- ^ /@layout@/: a t'GI.Pango.Objects.Layout.Layout' -> Int32 -- ^ /@x@/: X coordinate to render the layout at -> Int32 -- ^ /@y@/: Y coordinate to render the layout at -> Cogl.Color.Color -- ^ /@color@/: color to use when rendering the layout -> Int32 -> m () renderLayout :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsLayout a) => a -> Int32 -> Int32 -> Color -> Int32 -> m () renderLayout a layout Int32 x Int32 y Color color Int32 flags = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Layout layout' <- a -> IO (Ptr Layout) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a layout Ptr Color color' <- Color -> IO (Ptr Color) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr Color color Ptr Layout -> Int32 -> Int32 -> Ptr Color -> Int32 -> IO () cogl_pango_render_layout Ptr Layout layout' Int32 x Int32 y Ptr Color color' Int32 flags a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a layout Color -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr Color color () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- function font_map_set_use_mipmapping -- Args: [ Arg -- { argCName = "font_map" -- , argType = -- TInterface Name { namespace = "PangoCairo" , name = "FontMap" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #CoglPangoFontMap" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "%TRUE to enable the use of mipmapping" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "cogl_pango_font_map_set_use_mipmapping" cogl_pango_font_map_set_use_mipmapping :: Ptr PangoCairo.FontMap.FontMap -> -- font_map : TInterface (Name {namespace = "PangoCairo", name = "FontMap"}) Int32 -> -- value : TBasicType TInt IO () -- | Sets whether the renderer for the passed font map should use -- mipmapping when rendering a t'GI.Pango.Objects.Layout.Layout'. -- -- /Since: 1.0/ fontMapSetUseMipmapping :: (B.CallStack.HasCallStack, MonadIO m, PangoCairo.FontMap.IsFontMap a) => a -- ^ /@fontMap@/: a @/CoglPangoFontMap/@ -> Int32 -- ^ /@value@/: 'P.True' to enable the use of mipmapping -> m () fontMapSetUseMipmapping :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsFontMap a) => a -> Int32 -> m () fontMapSetUseMipmapping a fontMap Int32 value = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr FontMap fontMap' <- a -> IO (Ptr FontMap) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a fontMap Ptr FontMap -> Int32 -> IO () cogl_pango_font_map_set_use_mipmapping Ptr FontMap fontMap' Int32 value a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a fontMap () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- function font_map_set_resolution -- Args: [ Arg -- { argCName = "font_map" -- , argType = -- TInterface Name { namespace = "PangoCairo" , name = "FontMap" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #CoglPangoFontMap" -- , 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\n actually 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 "cogl_pango_font_map_set_resolution" cogl_pango_font_map_set_resolution :: Ptr PangoCairo.FontMap.FontMap -> -- font_map : 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 t'GI.Pango.Structs.FontDescription.FontDescription' and Cogl units. -- The default value is @/96/@, meaning that a 10 point font will be 13 -- units high. (10 * 96. \/ 72. = 13.3). -- -- /Since: 1.14/ fontMapSetResolution :: (B.CallStack.HasCallStack, MonadIO m, PangoCairo.FontMap.IsFontMap a) => a -- ^ /@fontMap@/: a @/CoglPangoFontMap/@ -> Double -- ^ /@dpi@/: The resolution in \"dots per inch\". (Physical inches aren\'t -- actually involved; the terminology is conventional.) -> m () fontMapSetResolution :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsFontMap a) => a -> Double -> m () fontMapSetResolution a fontMap Double dpi = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr FontMap fontMap' <- a -> IO (Ptr FontMap) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a fontMap let dpi' :: CDouble dpi' = Double -> CDouble forall a b. (Real a, Fractional b) => a -> b realToFrac Double dpi Ptr FontMap -> CDouble -> IO () cogl_pango_font_map_set_resolution Ptr FontMap fontMap' CDouble dpi' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a fontMap () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- function font_map_new -- Args: [] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Pango" , name = "FontMap" }) -- throws : False -- Skip return : False foreign import ccall "cogl_pango_font_map_new" cogl_pango_font_map_new :: IO (Ptr Pango.FontMap.FontMap) -- | Creates a new font map. -- -- /Since: 1.14/ fontMapNew :: (B.CallStack.HasCallStack, MonadIO m) => m Pango.FontMap.FontMap -- ^ __Returns:__ the newly created t'GI.Pango.Objects.FontMap.FontMap' fontMapNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m FontMap fontMapNew = IO FontMap -> m FontMap forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO FontMap -> m FontMap) -> IO FontMap -> m FontMap forall a b. (a -> b) -> a -> b $ do Ptr FontMap result <- IO (Ptr FontMap) cogl_pango_font_map_new Text -> Ptr FontMap -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "fontMapNew" Ptr FontMap result FontMap result' <- ((ManagedPtr FontMap -> FontMap) -> Ptr FontMap -> IO FontMap forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a wrapObject ManagedPtr FontMap -> FontMap Pango.FontMap.FontMap) Ptr FontMap result FontMap -> IO FontMap forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return FontMap result' -- function font_map_get_use_mipmapping -- Args: [ Arg -- { argCName = "font_map" -- , argType = -- TInterface Name { namespace = "PangoCairo" , name = "FontMap" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #CoglPangoFontMap" -- , 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 "cogl_pango_font_map_get_use_mipmapping" cogl_pango_font_map_get_use_mipmapping :: Ptr PangoCairo.FontMap.FontMap -> -- font_map : TInterface (Name {namespace = "PangoCairo", name = "FontMap"}) IO Int32 -- | Retrieves whether the t'GI.CoglPango.Objects.Renderer.Renderer' used by /@fontMap@/ will use -- mipmapping when rendering the glyphs. -- -- /Since: 1.0/ fontMapGetUseMipmapping :: (B.CallStack.HasCallStack, MonadIO m, PangoCairo.FontMap.IsFontMap a) => a -- ^ /@fontMap@/: a @/CoglPangoFontMap/@ -> m Int32 -- ^ __Returns:__ 'P.True' if mipmapping is used, 'P.False' otherwise. fontMapGetUseMipmapping :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsFontMap a) => a -> m Int32 fontMapGetUseMipmapping a fontMap = IO Int32 -> m Int32 forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Ptr FontMap fontMap' <- a -> IO (Ptr FontMap) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a fontMap Int32 result <- Ptr FontMap -> IO Int32 cogl_pango_font_map_get_use_mipmapping Ptr FontMap fontMap' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a fontMap Int32 -> IO Int32 forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function font_map_get_renderer -- Args: [ Arg -- { argCName = "font_map" -- , argType = -- TInterface Name { namespace = "PangoCairo" , name = "FontMap" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #CoglPangoFontMap" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Pango" , name = "Renderer" }) -- throws : False -- Skip return : False foreign import ccall "cogl_pango_font_map_get_renderer" cogl_pango_font_map_get_renderer :: Ptr PangoCairo.FontMap.FontMap -> -- font_map : TInterface (Name {namespace = "PangoCairo", name = "FontMap"}) IO (Ptr Pango.Renderer.Renderer) -- | Retrieves the t'GI.CoglPango.Objects.Renderer.Renderer' for the passed /@fontMap@/. -- -- /Since: 1.0/ fontMapGetRenderer :: (B.CallStack.HasCallStack, MonadIO m, PangoCairo.FontMap.IsFontMap a) => a -- ^ /@fontMap@/: a @/CoglPangoFontMap/@ -> m Pango.Renderer.Renderer -- ^ __Returns:__ a t'GI.Pango.Objects.Renderer.Renderer' fontMapGetRenderer :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsFontMap a) => a -> m Renderer fontMapGetRenderer a fontMap = IO Renderer -> m Renderer forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Renderer -> m Renderer) -> IO Renderer -> m Renderer forall a b. (a -> b) -> a -> b $ do Ptr FontMap fontMap' <- a -> IO (Ptr FontMap) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a fontMap Ptr Renderer result <- Ptr FontMap -> IO (Ptr Renderer) cogl_pango_font_map_get_renderer Ptr FontMap fontMap' Text -> Ptr Renderer -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "fontMapGetRenderer" Ptr Renderer result Renderer result' <- ((ManagedPtr Renderer -> Renderer) -> Ptr Renderer -> IO Renderer forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a newObject ManagedPtr Renderer -> Renderer Pango.Renderer.Renderer) Ptr Renderer result a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a fontMap Renderer -> IO Renderer forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Renderer result' -- function font_map_create_context -- Args: [ Arg -- { argCName = "font_map" -- , argType = -- TInterface Name { namespace = "PangoCairo" , name = "FontMap" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #CoglPangoFontMap" -- , 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 "cogl_pango_font_map_create_context" cogl_pango_font_map_create_context :: Ptr PangoCairo.FontMap.FontMap -> -- font_map : TInterface (Name {namespace = "PangoCairo", name = "FontMap"}) IO (Ptr Pango.Context.Context) -- | Create a t'GI.Pango.Objects.Context.Context' for the given /@fontMap@/. fontMapCreateContext :: (B.CallStack.HasCallStack, MonadIO m, PangoCairo.FontMap.IsFontMap a) => a -- ^ /@fontMap@/: a @/CoglPangoFontMap/@ -> m Pango.Context.Context -- ^ __Returns:__ the newly created context: free with 'GI.GObject.Objects.Object.objectUnref'. fontMapCreateContext :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsFontMap a) => a -> m Context fontMapCreateContext a fontMap = IO Context -> m Context forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Context -> m Context) -> IO Context -> m Context forall a b. (a -> b) -> a -> b $ do Ptr FontMap fontMap' <- a -> IO (Ptr FontMap) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a fontMap Ptr Context result <- Ptr FontMap -> IO (Ptr Context) cogl_pango_font_map_create_context Ptr FontMap fontMap' Text -> Ptr Context -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "fontMapCreateContext" Ptr Context result Context result' <- ((ManagedPtr Context -> Context) -> Ptr Context -> IO Context forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a wrapObject ManagedPtr Context -> Context Pango.Context.Context) Ptr Context result a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a fontMap Context -> IO Context forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return Context result' -- function font_map_clear_glyph_cache -- Args: [ Arg -- { argCName = "font_map" -- , argType = -- TInterface Name { namespace = "PangoCairo" , name = "FontMap" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #CoglPangoFontMap" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "cogl_pango_font_map_clear_glyph_cache" cogl_pango_font_map_clear_glyph_cache :: Ptr PangoCairo.FontMap.FontMap -> -- font_map : TInterface (Name {namespace = "PangoCairo", name = "FontMap"}) IO () -- | Clears the glyph cache for /@fontMap@/. -- -- /Since: 1.0/ fontMapClearGlyphCache :: (B.CallStack.HasCallStack, MonadIO m, PangoCairo.FontMap.IsFontMap a) => a -- ^ /@fontMap@/: a @/CoglPangoFontMap/@ -> m () fontMapClearGlyphCache :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsFontMap a) => a -> m () fontMapClearGlyphCache a fontMap = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr FontMap fontMap' <- a -> IO (Ptr FontMap) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a fontMap Ptr FontMap -> IO () cogl_pango_font_map_clear_glyph_cache Ptr FontMap fontMap' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a fontMap () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return () -- function ensure_glyph_cache_for_layout -- 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 "cogl_pango_ensure_glyph_cache_for_layout" cogl_pango_ensure_glyph_cache_for_layout :: Ptr Pango.Layout.Layout -> -- layout : TInterface (Name {namespace = "Pango", name = "Layout"}) IO () -- | This updates any internal glyph cache textures as necessary to be -- able to render the given /@layout@/. -- -- This api should be used to avoid mid-scene modifications of -- glyph-cache textures which can lead to undefined rendering results. -- -- /Since: 1.0/ ensureGlyphCacheForLayout :: (B.CallStack.HasCallStack, MonadIO m, Pango.Layout.IsLayout a) => a -- ^ /@layout@/: A t'GI.Pango.Objects.Layout.Layout' -> m () ensureGlyphCacheForLayout :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsLayout a) => a -> m () ensureGlyphCacheForLayout a layout = IO () -> m () forall a. IO a -> m a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Layout layout' <- a -> IO (Ptr Layout) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a layout Ptr Layout -> IO () cogl_pango_ensure_glyph_cache_for_layout Ptr Layout layout' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a layout () -> IO () forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return ()