{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- t'GI.Pango.Objects.Renderer.Renderer' is a base class for objects that are used to
-- render Pango objects such as t'GI.Pango.Structs.GlyphString.GlyphString' and
-- t'GI.Pango.Objects.Layout.Layout'.
-- 
-- /Since: 1.8/

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Pango.Objects.Renderer
    ( 

-- * Exported types
    Renderer(..)                            ,
    IsRenderer                              ,
    toRenderer                              ,
    noRenderer                              ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveRendererMethod                   ,
#endif


-- ** activate #method:activate#

#if defined(ENABLE_OVERLOADING)
    RendererActivateMethodInfo              ,
#endif
    rendererActivate                        ,


-- ** deactivate #method:deactivate#

#if defined(ENABLE_OVERLOADING)
    RendererDeactivateMethodInfo            ,
#endif
    rendererDeactivate                      ,


-- ** drawErrorUnderline #method:drawErrorUnderline#

#if defined(ENABLE_OVERLOADING)
    RendererDrawErrorUnderlineMethodInfo    ,
#endif
    rendererDrawErrorUnderline              ,


-- ** drawGlyph #method:drawGlyph#

#if defined(ENABLE_OVERLOADING)
    RendererDrawGlyphMethodInfo             ,
#endif
    rendererDrawGlyph                       ,


-- ** drawGlyphItem #method:drawGlyphItem#

#if defined(ENABLE_OVERLOADING)
    RendererDrawGlyphItemMethodInfo         ,
#endif
    rendererDrawGlyphItem                   ,


-- ** drawGlyphs #method:drawGlyphs#

#if defined(ENABLE_OVERLOADING)
    RendererDrawGlyphsMethodInfo            ,
#endif
    rendererDrawGlyphs                      ,


-- ** drawLayout #method:drawLayout#

#if defined(ENABLE_OVERLOADING)
    RendererDrawLayoutMethodInfo            ,
#endif
    rendererDrawLayout                      ,


-- ** drawLayoutLine #method:drawLayoutLine#

#if defined(ENABLE_OVERLOADING)
    RendererDrawLayoutLineMethodInfo        ,
#endif
    rendererDrawLayoutLine                  ,


-- ** drawRectangle #method:drawRectangle#

#if defined(ENABLE_OVERLOADING)
    RendererDrawRectangleMethodInfo         ,
#endif
    rendererDrawRectangle                   ,


-- ** drawTrapezoid #method:drawTrapezoid#

#if defined(ENABLE_OVERLOADING)
    RendererDrawTrapezoidMethodInfo         ,
#endif
    rendererDrawTrapezoid                   ,


-- ** getAlpha #method:getAlpha#

#if defined(ENABLE_OVERLOADING)
    RendererGetAlphaMethodInfo              ,
#endif
    rendererGetAlpha                        ,


-- ** getColor #method:getColor#

#if defined(ENABLE_OVERLOADING)
    RendererGetColorMethodInfo              ,
#endif
    rendererGetColor                        ,


-- ** getLayout #method:getLayout#

#if defined(ENABLE_OVERLOADING)
    RendererGetLayoutMethodInfo             ,
#endif
    rendererGetLayout                       ,


-- ** getLayoutLine #method:getLayoutLine#

#if defined(ENABLE_OVERLOADING)
    RendererGetLayoutLineMethodInfo         ,
#endif
    rendererGetLayoutLine                   ,


-- ** getMatrix #method:getMatrix#

#if defined(ENABLE_OVERLOADING)
    RendererGetMatrixMethodInfo             ,
#endif
    rendererGetMatrix                       ,


-- ** partChanged #method:partChanged#

#if defined(ENABLE_OVERLOADING)
    RendererPartChangedMethodInfo           ,
#endif
    rendererPartChanged                     ,


-- ** setAlpha #method:setAlpha#

#if defined(ENABLE_OVERLOADING)
    RendererSetAlphaMethodInfo              ,
#endif
    rendererSetAlpha                        ,


-- ** setColor #method:setColor#

#if defined(ENABLE_OVERLOADING)
    RendererSetColorMethodInfo              ,
#endif
    rendererSetColor                        ,


-- ** setMatrix #method:setMatrix#

#if defined(ENABLE_OVERLOADING)
    RendererSetMatrixMethodInfo             ,
#endif
    rendererSetMatrix                       ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Pango.Enums as Pango.Enums
import {-# SOURCE #-} qualified GI.Pango.Objects.Font as Pango.Font
import {-# SOURCE #-} qualified GI.Pango.Objects.Layout as Pango.Layout
import {-# SOURCE #-} qualified GI.Pango.Structs.Color as Pango.Color
import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphItem as Pango.GlyphItem
import {-# SOURCE #-} qualified GI.Pango.Structs.GlyphString as Pango.GlyphString
import {-# SOURCE #-} qualified GI.Pango.Structs.LayoutLine as Pango.LayoutLine
import {-# SOURCE #-} qualified GI.Pango.Structs.Matrix as Pango.Matrix

-- | Memory-managed wrapper type.
newtype Renderer = Renderer (ManagedPtr Renderer)
    deriving (Renderer -> Renderer -> Bool
(Renderer -> Renderer -> Bool)
-> (Renderer -> Renderer -> Bool) -> Eq Renderer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Renderer -> Renderer -> Bool
$c/= :: Renderer -> Renderer -> Bool
== :: Renderer -> Renderer -> Bool
$c== :: Renderer -> Renderer -> Bool
Eq)
foreign import ccall "pango_renderer_get_type"
    c_pango_renderer_get_type :: IO GType

instance GObject Renderer where
    gobjectType :: IO GType
gobjectType = IO GType
c_pango_renderer_get_type
    

-- | Convert 'Renderer' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Renderer where
    toGValue :: Renderer -> IO GValue
toGValue o :: Renderer
o = do
        GType
gtype <- IO GType
c_pango_renderer_get_type
        Renderer -> (Ptr Renderer -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Renderer
o (GType
-> (GValue -> Ptr Renderer -> IO ()) -> Ptr Renderer -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Renderer -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Renderer
fromGValue gv :: GValue
gv = do
        Ptr Renderer
ptr <- GValue -> IO (Ptr Renderer)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Renderer)
        (ManagedPtr Renderer -> Renderer) -> Ptr Renderer -> IO Renderer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Renderer -> Renderer
Renderer Ptr Renderer
ptr
        
    

-- | Type class for types which can be safely cast to `Renderer`, for instance with `toRenderer`.
class (GObject o, O.IsDescendantOf Renderer o) => IsRenderer o
instance (GObject o, O.IsDescendantOf Renderer o) => IsRenderer o

instance O.HasParentTypes Renderer
type instance O.ParentTypes Renderer = '[GObject.Object.Object]

-- | Cast to `Renderer`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toRenderer :: (MonadIO m, IsRenderer o) => o -> m Renderer
toRenderer :: o -> m Renderer
toRenderer = IO Renderer -> m Renderer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Renderer -> m Renderer)
-> (o -> IO Renderer) -> o -> m Renderer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Renderer -> Renderer) -> o -> IO Renderer
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Renderer -> Renderer
Renderer

-- | A convenience alias for `Nothing` :: `Maybe` `Renderer`.
noRenderer :: Maybe Renderer
noRenderer :: Maybe Renderer
noRenderer = Maybe Renderer
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveRendererMethod (t :: Symbol) (o :: *) :: * where
    ResolveRendererMethod "activate" o = RendererActivateMethodInfo
    ResolveRendererMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveRendererMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveRendererMethod "deactivate" o = RendererDeactivateMethodInfo
    ResolveRendererMethod "drawErrorUnderline" o = RendererDrawErrorUnderlineMethodInfo
    ResolveRendererMethod "drawGlyph" o = RendererDrawGlyphMethodInfo
    ResolveRendererMethod "drawGlyphItem" o = RendererDrawGlyphItemMethodInfo
    ResolveRendererMethod "drawGlyphs" o = RendererDrawGlyphsMethodInfo
    ResolveRendererMethod "drawLayout" o = RendererDrawLayoutMethodInfo
    ResolveRendererMethod "drawLayoutLine" o = RendererDrawLayoutLineMethodInfo
    ResolveRendererMethod "drawRectangle" o = RendererDrawRectangleMethodInfo
    ResolveRendererMethod "drawTrapezoid" o = RendererDrawTrapezoidMethodInfo
    ResolveRendererMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveRendererMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveRendererMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveRendererMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveRendererMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveRendererMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveRendererMethod "partChanged" o = RendererPartChangedMethodInfo
    ResolveRendererMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveRendererMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveRendererMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveRendererMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveRendererMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveRendererMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveRendererMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveRendererMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveRendererMethod "getAlpha" o = RendererGetAlphaMethodInfo
    ResolveRendererMethod "getColor" o = RendererGetColorMethodInfo
    ResolveRendererMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveRendererMethod "getLayout" o = RendererGetLayoutMethodInfo
    ResolveRendererMethod "getLayoutLine" o = RendererGetLayoutLineMethodInfo
    ResolveRendererMethod "getMatrix" o = RendererGetMatrixMethodInfo
    ResolveRendererMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveRendererMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveRendererMethod "setAlpha" o = RendererSetAlphaMethodInfo
    ResolveRendererMethod "setColor" o = RendererSetColorMethodInfo
    ResolveRendererMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveRendererMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveRendererMethod "setMatrix" o = RendererSetMatrixMethodInfo
    ResolveRendererMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveRendererMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveRendererMethod t Renderer, O.MethodInfo info Renderer p) => OL.IsLabel t (Renderer -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Renderer
type instance O.AttributeList Renderer = RendererAttributeList
type RendererAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Renderer = RendererSignalList
type RendererSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method Renderer::activate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_activate" pango_renderer_activate :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    IO ()

-- | Does initial setup before rendering operations on /@renderer@/.
-- 'GI.Pango.Objects.Renderer.rendererDeactivate' should be called when done drawing.
-- Calls such as 'GI.Pango.Objects.Renderer.rendererDrawLayout' automatically
-- activate the layout before drawing on it. Calls to
-- 'GI.Pango.Objects.Renderer.rendererActivate' and 'GI.Pango.Objects.Renderer.rendererDeactivate' can
-- be nested and the renderer will only be initialized and
-- deinitialized once.
-- 
-- /Since: 1.8/
rendererActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> m ()
rendererActivate :: a -> m ()
rendererActivate renderer :: a
renderer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Renderer -> IO ()
pango_renderer_activate Ptr Renderer
renderer'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererActivateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererActivateMethodInfo a signature where
    overloadedMethod = rendererActivate

#endif

-- method Renderer::deactivate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_deactivate" pango_renderer_deactivate :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    IO ()

-- | Cleans up after rendering operations on /@renderer@/. See
-- docs for 'GI.Pango.Objects.Renderer.rendererActivate'.
-- 
-- /Since: 1.8/
rendererDeactivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> m ()
rendererDeactivate :: a -> m ()
rendererDeactivate renderer :: a
renderer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Renderer -> IO ()
pango_renderer_deactivate Ptr Renderer
renderer'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDeactivateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDeactivateMethodInfo a signature where
    overloadedMethod = rendererDeactivate

#endif

-- method Renderer::draw_error_underline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X coordinate of underline, in Pango units in user coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y coordinate of underline, in Pango units in user coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "width of underline, in Pango units in user coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "height of underline, in Pango units in user coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_error_underline" pango_renderer_draw_error_underline :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | Draw a squiggly line that approximately covers the given rectangle
-- in the style of an underline used to indicate a spelling error.
-- (The width of the underline is rounded to an integer number
-- of up\/down segments and the resulting rectangle is centered
-- in the original rectangle)
-- 
-- This should be called while /@renderer@/ is already active.  Use
-- 'GI.Pango.Objects.Renderer.rendererActivate' to activate a renderer.
-- 
-- /Since: 1.8/
rendererDrawErrorUnderline ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Int32
    -- ^ /@x@/: X coordinate of underline, in Pango units in user coordinate system
    -> Int32
    -- ^ /@y@/: Y coordinate of underline, in Pango units in user coordinate system
    -> Int32
    -- ^ /@width@/: width of underline, in Pango units in user coordinate system
    -> Int32
    -- ^ /@height@/: height of underline, in Pango units in user coordinate system
    -> m ()
rendererDrawErrorUnderline :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
rendererDrawErrorUnderline renderer :: a
renderer x :: Int32
x y :: Int32
y width :: Int32
width height :: Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Renderer -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
pango_renderer_draw_error_underline Ptr Renderer
renderer' Int32
x Int32
y Int32
width Int32
height
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawErrorUnderlineMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawErrorUnderlineMethodInfo a signature where
    overloadedMethod = rendererDrawErrorUnderline

#endif

-- method Renderer::draw_glyph
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "font"
--           , argType = TInterface Name { namespace = "Pango" , name = "Font" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoFont" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "glyph"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the glyph index of a single glyph"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X coordinate of left edge of baseline of glyph"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y coordinate of left edge of baseline of glyph"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_glyph" pango_renderer_draw_glyph :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    Ptr Pango.Font.Font ->                  -- font : TInterface (Name {namespace = "Pango", name = "Font"})
    Word32 ->                               -- glyph : TBasicType TUInt32
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    IO ()

-- | Draws a single glyph with coordinates in device space.
-- 
-- /Since: 1.8/
rendererDrawGlyph ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a, Pango.Font.IsFont b) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> b
    -- ^ /@font@/: a t'GI.Pango.Objects.Font.Font'
    -> Word32
    -- ^ /@glyph@/: the glyph index of a single glyph
    -> Double
    -- ^ /@x@/: X coordinate of left edge of baseline of glyph
    -> Double
    -- ^ /@y@/: Y coordinate of left edge of baseline of glyph
    -> m ()
rendererDrawGlyph :: a -> b -> Word32 -> Double -> Double -> m ()
rendererDrawGlyph renderer :: a
renderer font :: b
font glyph :: Word32
glyph x :: Double
x y :: Double
y = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Font
font' <- b -> IO (Ptr Font)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
font
    let x' :: CDouble
x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
    let y' :: CDouble
y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
    Ptr Renderer -> Ptr Font -> Word32 -> CDouble -> CDouble -> IO ()
pango_renderer_draw_glyph Ptr Renderer
renderer' Ptr Font
font' Word32
glyph CDouble
x' CDouble
y'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
font
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawGlyphMethodInfo
instance (signature ~ (b -> Word32 -> Double -> Double -> m ()), MonadIO m, IsRenderer a, Pango.Font.IsFont b) => O.MethodInfo RendererDrawGlyphMethodInfo a signature where
    overloadedMethod = rendererDrawGlyph

#endif

-- method Renderer::draw_glyph_item
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the UTF-8 text that @glyph_item refers to, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "glyph_item"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "GlyphItem" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoGlyphItem" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X position of left edge of baseline, in user space coordinates\n  in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y position of left edge of baseline, in user space coordinates\n   in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_glyph_item" pango_renderer_draw_glyph_item :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CString ->                              -- text : TBasicType TUTF8
    Ptr Pango.GlyphItem.GlyphItem ->        -- glyph_item : TInterface (Name {namespace = "Pango", name = "GlyphItem"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO ()

-- | Draws the glyphs in /@glyphItem@/ with the specified t'GI.Pango.Objects.Renderer.Renderer',
-- embedding the text associated with the glyphs in the output if the
-- output format supports it (PDF for example).
-- 
-- Note that /@text@/ is the start of the text for layout, which is then
-- indexed by \<literal>/@glyphItem@/->item->offset\<\/literal>.
-- 
-- If /@text@/ is 'P.Nothing', this simply calls 'GI.Pango.Objects.Renderer.rendererDrawGlyphs'.
-- 
-- The default implementation of this method simply falls back to
-- 'GI.Pango.Objects.Renderer.rendererDrawGlyphs'.
-- 
-- /Since: 1.22/
rendererDrawGlyphItem ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Maybe (T.Text)
    -- ^ /@text@/: the UTF-8 text that /@glyphItem@/ refers to, or 'P.Nothing'
    -> Pango.GlyphItem.GlyphItem
    -- ^ /@glyphItem@/: a t'GI.Pango.Structs.GlyphItem.GlyphItem'
    -> Int32
    -- ^ /@x@/: X position of left edge of baseline, in user space coordinates
    --   in Pango units.
    -> Int32
    -- ^ /@y@/: Y position of left edge of baseline, in user space coordinates
    --    in Pango units.
    -> m ()
rendererDrawGlyphItem :: a -> Maybe Text -> GlyphItem -> Int32 -> Int32 -> m ()
rendererDrawGlyphItem renderer :: a
renderer text :: Maybe Text
text glyphItem :: GlyphItem
glyphItem x :: Int32
x y :: Int32
y = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr CChar
maybeText <- case Maybe Text
text of
        Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just jText :: Text
jText -> do
            Ptr CChar
jText' <- Text -> IO (Ptr CChar)
textToCString Text
jText
            Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jText'
    Ptr GlyphItem
glyphItem' <- GlyphItem -> IO (Ptr GlyphItem)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GlyphItem
glyphItem
    Ptr Renderer
-> Ptr CChar -> Ptr GlyphItem -> Int32 -> Int32 -> IO ()
pango_renderer_draw_glyph_item Ptr Renderer
renderer' Ptr CChar
maybeText Ptr GlyphItem
glyphItem' Int32
x Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    GlyphItem -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GlyphItem
glyphItem
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeText
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawGlyphItemMethodInfo
instance (signature ~ (Maybe (T.Text) -> Pango.GlyphItem.GlyphItem -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawGlyphItemMethodInfo a signature where
    overloadedMethod = rendererDrawGlyphItem

#endif

-- method Renderer::draw_glyphs
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "font"
--           , argType = TInterface Name { namespace = "Pango" , name = "Font" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoFont" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "glyphs"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "GlyphString" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoGlyphString"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X position of left edge of baseline, in user space coordinates\n  in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y position of left edge of baseline, in user space coordinates\n   in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_glyphs" pango_renderer_draw_glyphs :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    Ptr Pango.Font.Font ->                  -- font : TInterface (Name {namespace = "Pango", name = "Font"})
    Ptr Pango.GlyphString.GlyphString ->    -- glyphs : TInterface (Name {namespace = "Pango", name = "GlyphString"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO ()

-- | Draws the glyphs in /@glyphs@/ with the specified t'GI.Pango.Objects.Renderer.Renderer'.
-- 
-- /Since: 1.8/
rendererDrawGlyphs ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a, Pango.Font.IsFont b) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> b
    -- ^ /@font@/: a t'GI.Pango.Objects.Font.Font'
    -> Pango.GlyphString.GlyphString
    -- ^ /@glyphs@/: a t'GI.Pango.Structs.GlyphString.GlyphString'
    -> Int32
    -- ^ /@x@/: X position of left edge of baseline, in user space coordinates
    --   in Pango units.
    -> Int32
    -- ^ /@y@/: Y position of left edge of baseline, in user space coordinates
    --    in Pango units.
    -> m ()
rendererDrawGlyphs :: a -> b -> GlyphString -> Int32 -> Int32 -> m ()
rendererDrawGlyphs renderer :: a
renderer font :: b
font glyphs :: GlyphString
glyphs x :: Int32
x y :: Int32
y = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Font
font' <- b -> IO (Ptr Font)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
font
    Ptr GlyphString
glyphs' <- GlyphString -> IO (Ptr GlyphString)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GlyphString
glyphs
    Ptr Renderer
-> Ptr Font -> Ptr GlyphString -> Int32 -> Int32 -> IO ()
pango_renderer_draw_glyphs Ptr Renderer
renderer' Ptr Font
font' Ptr GlyphString
glyphs' Int32
x Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
font
    GlyphString -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GlyphString
glyphs
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawGlyphsMethodInfo
instance (signature ~ (b -> Pango.GlyphString.GlyphString -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a, Pango.Font.IsFont b) => O.MethodInfo RendererDrawGlyphsMethodInfo a signature where
    overloadedMethod = rendererDrawGlyphs

#endif

-- method Renderer::draw_layout
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "layout"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Layout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoLayout" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X position of left edge of baseline, in user space coordinates\n  in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y position of left edge of baseline, in user space coordinates\n   in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_layout" pango_renderer_draw_layout :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    Ptr Pango.Layout.Layout ->              -- layout : TInterface (Name {namespace = "Pango", name = "Layout"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO ()

-- | Draws /@layout@/ with the specified t'GI.Pango.Objects.Renderer.Renderer'.
-- 
-- /Since: 1.8/
rendererDrawLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a, Pango.Layout.IsLayout b) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> b
    -- ^ /@layout@/: a t'GI.Pango.Objects.Layout.Layout'
    -> Int32
    -- ^ /@x@/: X position of left edge of baseline, in user space coordinates
    --   in Pango units.
    -> Int32
    -- ^ /@y@/: Y position of left edge of baseline, in user space coordinates
    --    in Pango units.
    -> m ()
rendererDrawLayout :: a -> b -> Int32 -> Int32 -> m ()
rendererDrawLayout renderer :: a
renderer layout :: b
layout x :: Int32
x y :: Int32
y = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Layout
layout' <- b -> IO (Ptr Layout)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
layout
    Ptr Renderer -> Ptr Layout -> Int32 -> Int32 -> IO ()
pango_renderer_draw_layout Ptr Renderer
renderer' Ptr Layout
layout' Int32
x Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
layout
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawLayoutMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a, Pango.Layout.IsLayout b) => O.MethodInfo RendererDrawLayoutMethodInfo a signature where
    overloadedMethod = rendererDrawLayout

#endif

-- method Renderer::draw_layout_line
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "line"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "LayoutLine" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoLayoutLine" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X position of left edge of baseline, in user space coordinates\n  in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y position of left edge of baseline, in user space coordinates\n   in Pango units."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_layout_line" pango_renderer_draw_layout_line :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    Ptr Pango.LayoutLine.LayoutLine ->      -- line : TInterface (Name {namespace = "Pango", name = "LayoutLine"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO ()

-- | Draws /@line@/ with the specified t'GI.Pango.Objects.Renderer.Renderer'.
-- 
-- /Since: 1.8/
rendererDrawLayoutLine ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.LayoutLine.LayoutLine
    -- ^ /@line@/: a t'GI.Pango.Structs.LayoutLine.LayoutLine'
    -> Int32
    -- ^ /@x@/: X position of left edge of baseline, in user space coordinates
    --   in Pango units.
    -> Int32
    -- ^ /@y@/: Y position of left edge of baseline, in user space coordinates
    --    in Pango units.
    -> m ()
rendererDrawLayoutLine :: a -> LayoutLine -> Int32 -> Int32 -> m ()
rendererDrawLayoutLine renderer :: a
renderer line :: LayoutLine
line x :: Int32
x y :: Int32
y = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr LayoutLine
line' <- LayoutLine -> IO (Ptr LayoutLine)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr LayoutLine
line
    Ptr Renderer -> Ptr LayoutLine -> Int32 -> Int32 -> IO ()
pango_renderer_draw_layout_line Ptr Renderer
renderer' Ptr LayoutLine
line' Int32
x Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    LayoutLine -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr LayoutLine
line
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawLayoutLineMethodInfo
instance (signature ~ (Pango.LayoutLine.LayoutLine -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawLayoutLineMethodInfo a signature where
    overloadedMethod = rendererDrawLayoutLine

#endif

-- method Renderer::draw_rectangle
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "part"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "RenderPart" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "type of object this rectangle is part of"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "X position at which to draw rectangle, in user space coordinates in Pango units"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Y position at which to draw rectangle, in user space coordinates in Pango units"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "width of rectangle in Pango units in user space coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "height of rectangle in Pango units in user space coordinates"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_rectangle" pango_renderer_draw_rectangle :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CUInt ->                                -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | Draws an axis-aligned rectangle in user space coordinates with the
-- specified t'GI.Pango.Objects.Renderer.Renderer'.
-- 
-- This should be called while /@renderer@/ is already active.  Use
-- 'GI.Pango.Objects.Renderer.rendererActivate' to activate a renderer.
-- 
-- /Since: 1.8/
rendererDrawRectangle ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.Enums.RenderPart
    -- ^ /@part@/: type of object this rectangle is part of
    -> Int32
    -- ^ /@x@/: X position at which to draw rectangle, in user space coordinates in Pango units
    -> Int32
    -- ^ /@y@/: Y position at which to draw rectangle, in user space coordinates in Pango units
    -> Int32
    -- ^ /@width@/: width of rectangle in Pango units in user space coordinates
    -> Int32
    -- ^ /@height@/: height of rectangle in Pango units in user space coordinates
    -> m ()
rendererDrawRectangle :: a -> RenderPart -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
rendererDrawRectangle renderer :: a
renderer part :: RenderPart
part x :: Int32
x y :: Int32
y width :: Int32
width height :: Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    let part' :: CUInt
part' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RenderPart -> Int) -> RenderPart -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RenderPart -> Int
forall a. Enum a => a -> Int
fromEnum) RenderPart
part
    Ptr Renderer -> CUInt -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
pango_renderer_draw_rectangle Ptr Renderer
renderer' CUInt
part' Int32
x Int32
y Int32
width Int32
height
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawRectangleMethodInfo
instance (signature ~ (Pango.Enums.RenderPart -> Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawRectangleMethodInfo a signature where
    overloadedMethod = rendererDrawRectangle

#endif

-- method Renderer::draw_trapezoid
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "part"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "RenderPart" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "type of object this trapezoid is part of"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y1_"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate of top of trapezoid"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x11"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate of left end of top of trapezoid"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x21"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate of right end of top of trapezoid"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y2"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate of bottom of trapezoid"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x12"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X coordinate of left end of bottom of trapezoid"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x22"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X coordinate of right end of bottom of trapezoid"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_draw_trapezoid" pango_renderer_draw_trapezoid :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CUInt ->                                -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})
    CDouble ->                              -- y1_ : TBasicType TDouble
    CDouble ->                              -- x11 : TBasicType TDouble
    CDouble ->                              -- x21 : TBasicType TDouble
    CDouble ->                              -- y2 : TBasicType TDouble
    CDouble ->                              -- x12 : TBasicType TDouble
    CDouble ->                              -- x22 : TBasicType TDouble
    IO ()

-- | Draws a trapezoid with the parallel sides aligned with the X axis
-- using the given t'GI.Pango.Objects.Renderer.Renderer'; coordinates are in device space.
-- 
-- /Since: 1.8/
rendererDrawTrapezoid ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.Enums.RenderPart
    -- ^ /@part@/: type of object this trapezoid is part of
    -> Double
    -- ^ /@y1_@/: Y coordinate of top of trapezoid
    -> Double
    -- ^ /@x11@/: X coordinate of left end of top of trapezoid
    -> Double
    -- ^ /@x21@/: X coordinate of right end of top of trapezoid
    -> Double
    -- ^ /@y2@/: Y coordinate of bottom of trapezoid
    -> Double
    -- ^ /@x12@/: X coordinate of left end of bottom of trapezoid
    -> Double
    -- ^ /@x22@/: X coordinate of right end of bottom of trapezoid
    -> m ()
rendererDrawTrapezoid :: a
-> RenderPart
-> Double
-> Double
-> Double
-> Double
-> Double
-> Double
-> m ()
rendererDrawTrapezoid renderer :: a
renderer part :: RenderPart
part y1_ :: Double
y1_ x11 :: Double
x11 x21 :: Double
x21 y2 :: Double
y2 x12 :: Double
x12 x22 :: Double
x22 = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    let part' :: CUInt
part' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RenderPart -> Int) -> RenderPart -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RenderPart -> Int
forall a. Enum a => a -> Int
fromEnum) RenderPart
part
    let y1_' :: CDouble
y1_' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y1_
    let x11' :: CDouble
x11' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x11
    let x21' :: CDouble
x21' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x21
    let y2' :: CDouble
y2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y2
    let x12' :: CDouble
x12' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x12
    let x22' :: CDouble
x22' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x22
    Ptr Renderer
-> CUInt
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> CDouble
-> IO ()
pango_renderer_draw_trapezoid Ptr Renderer
renderer' CUInt
part' CDouble
y1_' CDouble
x11' CDouble
x21' CDouble
y2' CDouble
x12' CDouble
x22'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererDrawTrapezoidMethodInfo
instance (signature ~ (Pango.Enums.RenderPart -> Double -> Double -> Double -> Double -> Double -> Double -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererDrawTrapezoidMethodInfo a signature where
    overloadedMethod = rendererDrawTrapezoid

#endif

-- method Renderer::get_alpha
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "part"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "RenderPart" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the part to get the alpha for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt16)
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_get_alpha" pango_renderer_get_alpha :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CUInt ->                                -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})
    IO Word16

-- | Gets the current alpha for the specified part.
-- 
-- /Since: 1.38/
rendererGetAlpha ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.Enums.RenderPart
    -- ^ /@part@/: the part to get the alpha for
    -> m Word16
    -- ^ __Returns:__ the alpha for the specified part,
    --   or 0 if it hasn\'t been set and should be
    --   inherited from the environment.
rendererGetAlpha :: a -> RenderPart -> m Word16
rendererGetAlpha renderer :: a
renderer part :: RenderPart
part = IO Word16 -> m Word16
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    let part' :: CUInt
part' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RenderPart -> Int) -> RenderPart -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RenderPart -> Int
forall a. Enum a => a -> Int
fromEnum) RenderPart
part
    Word16
result <- Ptr Renderer -> CUInt -> IO Word16
pango_renderer_get_alpha Ptr Renderer
renderer' CUInt
part'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Word16 -> IO Word16
forall (m :: * -> *) a. Monad m => a -> m a
return Word16
result

#if defined(ENABLE_OVERLOADING)
data RendererGetAlphaMethodInfo
instance (signature ~ (Pango.Enums.RenderPart -> m Word16), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetAlphaMethodInfo a signature where
    overloadedMethod = rendererGetAlpha

#endif

-- method Renderer::get_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "part"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "RenderPart" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the part to get the color for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Pango" , name = "Color" })
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_get_color" pango_renderer_get_color :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CUInt ->                                -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})
    IO (Ptr Pango.Color.Color)

-- | Gets the current rendering color for the specified part.
-- 
-- /Since: 1.8/
rendererGetColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.Enums.RenderPart
    -- ^ /@part@/: the part to get the color for
    -> m (Maybe Pango.Color.Color)
    -- ^ __Returns:__ the color for the
    --   specified part, or 'P.Nothing' if it hasn\'t been set and should be
    --   inherited from the environment.
rendererGetColor :: a -> RenderPart -> m (Maybe Color)
rendererGetColor renderer :: a
renderer part :: RenderPart
part = IO (Maybe Color) -> m (Maybe Color)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Color) -> m (Maybe Color))
-> IO (Maybe Color) -> m (Maybe Color)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    let part' :: CUInt
part' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RenderPart -> Int) -> RenderPart -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RenderPart -> Int
forall a. Enum a => a -> Int
fromEnum) RenderPart
part
    Ptr Color
result <- Ptr Renderer -> CUInt -> IO (Ptr Color)
pango_renderer_get_color Ptr Renderer
renderer' CUInt
part'
    Maybe Color
maybeResult <- Ptr Color -> (Ptr Color -> IO Color) -> IO (Maybe Color)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Color
result ((Ptr Color -> IO Color) -> IO (Maybe Color))
-> (Ptr Color -> IO Color) -> IO (Maybe Color)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Color
result' -> do
        Color
result'' <- ((ManagedPtr Color -> Color) -> Ptr Color -> IO Color
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Color -> Color
Pango.Color.Color) Ptr Color
result'
        Color -> IO Color
forall (m :: * -> *) a. Monad m => a -> m a
return Color
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Maybe Color -> IO (Maybe Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Color
maybeResult

#if defined(ENABLE_OVERLOADING)
data RendererGetColorMethodInfo
instance (signature ~ (Pango.Enums.RenderPart -> m (Maybe Pango.Color.Color)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetColorMethodInfo a signature where
    overloadedMethod = rendererGetColor

#endif

-- method Renderer::get_layout
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Pango" , name = "Layout" })
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_get_layout" pango_renderer_get_layout :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    IO (Ptr Pango.Layout.Layout)

-- | Gets the layout currently being rendered using /@renderer@/.
-- Calling this function only makes sense from inside a subclass\'s
-- methods, like in its draw_shape() for example.
-- 
-- The returned layout should not be modified while still being
-- rendered.
-- 
-- /Since: 1.20/
rendererGetLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> m (Maybe Pango.Layout.Layout)
    -- ^ __Returns:__ the layout, or 'P.Nothing' if
    --  no layout is being rendered using /@renderer@/ at this time.
rendererGetLayout :: a -> m (Maybe Layout)
rendererGetLayout renderer :: a
renderer = IO (Maybe Layout) -> m (Maybe Layout)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Layout) -> m (Maybe Layout))
-> IO (Maybe Layout) -> m (Maybe Layout)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Layout
result <- Ptr Renderer -> IO (Ptr Layout)
pango_renderer_get_layout Ptr Renderer
renderer'
    Maybe Layout
maybeResult <- Ptr Layout -> (Ptr Layout -> IO Layout) -> IO (Maybe Layout)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Layout
result ((Ptr Layout -> IO Layout) -> IO (Maybe Layout))
-> (Ptr Layout -> IO Layout) -> IO (Maybe Layout)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Layout
result' -> do
        Layout
result'' <- ((ManagedPtr Layout -> Layout) -> Ptr Layout -> IO Layout
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Layout -> Layout
Pango.Layout.Layout) Ptr Layout
result'
        Layout -> IO Layout
forall (m :: * -> *) a. Monad m => a -> m a
return Layout
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Maybe Layout -> IO (Maybe Layout)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Layout
maybeResult

#if defined(ENABLE_OVERLOADING)
data RendererGetLayoutMethodInfo
instance (signature ~ (m (Maybe Pango.Layout.Layout)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetLayoutMethodInfo a signature where
    overloadedMethod = rendererGetLayout

#endif

-- method Renderer::get_layout_line
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Pango" , name = "LayoutLine" })
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_get_layout_line" pango_renderer_get_layout_line :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    IO (Ptr Pango.LayoutLine.LayoutLine)

-- | Gets the layout line currently being rendered using /@renderer@/.
-- Calling this function only makes sense from inside a subclass\'s
-- methods, like in its draw_shape() for example.
-- 
-- The returned layout line should not be modified while still being
-- rendered.
-- 
-- /Since: 1.20/
rendererGetLayoutLine ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> m (Maybe Pango.LayoutLine.LayoutLine)
    -- ^ __Returns:__ the layout line, or 'P.Nothing'
    --   if no layout line is being rendered using /@renderer@/ at this time.
rendererGetLayoutLine :: a -> m (Maybe LayoutLine)
rendererGetLayoutLine renderer :: a
renderer = IO (Maybe LayoutLine) -> m (Maybe LayoutLine)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe LayoutLine) -> m (Maybe LayoutLine))
-> IO (Maybe LayoutLine) -> m (Maybe LayoutLine)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr LayoutLine
result <- Ptr Renderer -> IO (Ptr LayoutLine)
pango_renderer_get_layout_line Ptr Renderer
renderer'
    Maybe LayoutLine
maybeResult <- Ptr LayoutLine
-> (Ptr LayoutLine -> IO LayoutLine) -> IO (Maybe LayoutLine)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr LayoutLine
result ((Ptr LayoutLine -> IO LayoutLine) -> IO (Maybe LayoutLine))
-> (Ptr LayoutLine -> IO LayoutLine) -> IO (Maybe LayoutLine)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr LayoutLine
result' -> do
        LayoutLine
result'' <- ((ManagedPtr LayoutLine -> LayoutLine)
-> Ptr LayoutLine -> IO LayoutLine
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr LayoutLine -> LayoutLine
Pango.LayoutLine.LayoutLine) Ptr LayoutLine
result'
        LayoutLine -> IO LayoutLine
forall (m :: * -> *) a. Monad m => a -> m a
return LayoutLine
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Maybe LayoutLine -> IO (Maybe LayoutLine)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe LayoutLine
maybeResult

#if defined(ENABLE_OVERLOADING)
data RendererGetLayoutLineMethodInfo
instance (signature ~ (m (Maybe Pango.LayoutLine.LayoutLine)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetLayoutLineMethodInfo a signature where
    overloadedMethod = rendererGetLayoutLine

#endif

-- method Renderer::get_matrix
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Pango" , name = "Matrix" })
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_get_matrix" pango_renderer_get_matrix :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    IO (Ptr Pango.Matrix.Matrix)

-- | Gets the transformation matrix that will be applied when
-- rendering. See 'GI.Pango.Objects.Renderer.rendererSetMatrix'.
-- 
-- /Since: 1.8/
rendererGetMatrix ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> m (Maybe Pango.Matrix.Matrix)
    -- ^ __Returns:__ the matrix, or 'P.Nothing' if no matrix has
    --  been set (which is the same as the identity matrix). The returned
    --  matrix is owned by Pango and must not be modified or freed.
rendererGetMatrix :: a -> m (Maybe Matrix)
rendererGetMatrix renderer :: a
renderer = IO (Maybe Matrix) -> m (Maybe Matrix)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Matrix) -> m (Maybe Matrix))
-> IO (Maybe Matrix) -> m (Maybe Matrix)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Matrix
result <- Ptr Renderer -> IO (Ptr Matrix)
pango_renderer_get_matrix Ptr Renderer
renderer'
    Maybe Matrix
maybeResult <- Ptr Matrix -> (Ptr Matrix -> IO Matrix) -> IO (Maybe Matrix)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Matrix
result ((Ptr Matrix -> IO Matrix) -> IO (Maybe Matrix))
-> (Ptr Matrix -> IO Matrix) -> IO (Maybe Matrix)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Matrix
result' -> do
        Matrix
result'' <- ((ManagedPtr Matrix -> Matrix) -> Ptr Matrix -> IO Matrix
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Matrix -> Matrix
Pango.Matrix.Matrix) Ptr Matrix
result'
        Matrix -> IO Matrix
forall (m :: * -> *) a. Monad m => a -> m a
return Matrix
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Maybe Matrix -> IO (Maybe Matrix)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Matrix
maybeResult

#if defined(ENABLE_OVERLOADING)
data RendererGetMatrixMethodInfo
instance (signature ~ (m (Maybe Pango.Matrix.Matrix)), MonadIO m, IsRenderer a) => O.MethodInfo RendererGetMatrixMethodInfo a signature where
    overloadedMethod = rendererGetMatrix

#endif

-- method Renderer::part_changed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "part"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "RenderPart" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the part for which rendering has changed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_part_changed" pango_renderer_part_changed :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CUInt ->                                -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})
    IO ()

-- | Informs Pango that the way that the rendering is done
-- for /@part@/ has changed in a way that would prevent multiple
-- pieces being joined together into one drawing call. For
-- instance, if a subclass of t'GI.Pango.Objects.Renderer.Renderer' was to add a stipple
-- option for drawing underlines, it needs to call
-- 
-- \<informalexample>\<programlisting>
-- pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);
-- \<\/programlisting>\<\/informalexample>
-- 
-- When the stipple changes or underlines with different stipples
-- might be joined together. Pango automatically calls this for
-- changes to colors. (See 'GI.Pango.Objects.Renderer.rendererSetColor')
-- 
-- /Since: 1.8/
rendererPartChanged ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.Enums.RenderPart
    -- ^ /@part@/: the part for which rendering has changed.
    -> m ()
rendererPartChanged :: a -> RenderPart -> m ()
rendererPartChanged renderer :: a
renderer part :: RenderPart
part = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    let part' :: CUInt
part' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RenderPart -> Int) -> RenderPart -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RenderPart -> Int
forall a. Enum a => a -> Int
fromEnum) RenderPart
part
    Ptr Renderer -> CUInt -> IO ()
pango_renderer_part_changed Ptr Renderer
renderer' CUInt
part'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererPartChangedMethodInfo
instance (signature ~ (Pango.Enums.RenderPart -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererPartChangedMethodInfo a signature where
    overloadedMethod = rendererPartChanged

#endif

-- method Renderer::set_alpha
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "part"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "RenderPart" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the part to set the alpha for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "alpha"
--           , argType = TBasicType TUInt16
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an alpha value between 1 and 65536, or 0 to unset the alpha"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_set_alpha" pango_renderer_set_alpha :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CUInt ->                                -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})
    Word16 ->                               -- alpha : TBasicType TUInt16
    IO ()

-- | Sets the alpha for part of the rendering.
-- Note that the alpha may only be used if a color is
-- specified for /@part@/ as well.
-- 
-- /Since: 1.38/
rendererSetAlpha ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.Enums.RenderPart
    -- ^ /@part@/: the part to set the alpha for
    -> Word16
    -- ^ /@alpha@/: an alpha value between 1 and 65536, or 0 to unset the alpha
    -> m ()
rendererSetAlpha :: a -> RenderPart -> Word16 -> m ()
rendererSetAlpha renderer :: a
renderer part :: RenderPart
part alpha :: Word16
alpha = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    let part' :: CUInt
part' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RenderPart -> Int) -> RenderPart -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RenderPart -> Int
forall a. Enum a => a -> Int
fromEnum) RenderPart
part
    Ptr Renderer -> CUInt -> Word16 -> IO ()
pango_renderer_set_alpha Ptr Renderer
renderer' CUInt
part' Word16
alpha
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererSetAlphaMethodInfo
instance (signature ~ (Pango.Enums.RenderPart -> Word16 -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererSetAlphaMethodInfo a signature where
    overloadedMethod = rendererSetAlpha

#endif

-- method Renderer::set_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "part"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "RenderPart" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the part to change the color of"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the new color or %NULL to unset the current color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_set_color" pango_renderer_set_color :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    CUInt ->                                -- part : TInterface (Name {namespace = "Pango", name = "RenderPart"})
    Ptr Pango.Color.Color ->                -- color : TInterface (Name {namespace = "Pango", name = "Color"})
    IO ()

-- | Sets the color for part of the rendering.
-- Also see 'GI.Pango.Objects.Renderer.rendererSetAlpha'.
-- 
-- /Since: 1.8/
rendererSetColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Pango.Enums.RenderPart
    -- ^ /@part@/: the part to change the color of
    -> Maybe (Pango.Color.Color)
    -- ^ /@color@/: the new color or 'P.Nothing' to unset the current color
    -> m ()
rendererSetColor :: a -> RenderPart -> Maybe Color -> m ()
rendererSetColor renderer :: a
renderer part :: RenderPart
part color :: Maybe Color
color = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    let part' :: CUInt
part' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (RenderPart -> Int) -> RenderPart -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. RenderPart -> Int
forall a. Enum a => a -> Int
fromEnum) RenderPart
part
    Ptr Color
maybeColor <- case Maybe Color
color of
        Nothing -> Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
forall a. Ptr a
nullPtr
        Just jColor :: Color
jColor -> do
            Ptr Color
jColor' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
jColor
            Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
jColor'
    Ptr Renderer -> CUInt -> Ptr Color -> IO ()
pango_renderer_set_color Ptr Renderer
renderer' CUInt
part' Ptr Color
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Maybe Color -> (Color -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Color
color Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererSetColorMethodInfo
instance (signature ~ (Pango.Enums.RenderPart -> Maybe (Pango.Color.Color) -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererSetColorMethodInfo a signature where
    overloadedMethod = rendererSetColor

#endif

-- method Renderer::set_matrix
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Renderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoRenderer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "matrix"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "Matrix" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #PangoMatrix, or %NULL to unset any existing matrix.\n (No matrix set is the same as setting the identity matrix.)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "pango_renderer_set_matrix" pango_renderer_set_matrix :: 
    Ptr Renderer ->                         -- renderer : TInterface (Name {namespace = "Pango", name = "Renderer"})
    Ptr Pango.Matrix.Matrix ->              -- matrix : TInterface (Name {namespace = "Pango", name = "Matrix"})
    IO ()

-- | Sets the transformation matrix that will be applied when rendering.
-- 
-- /Since: 1.8/
rendererSetMatrix ::
    (B.CallStack.HasCallStack, MonadIO m, IsRenderer a) =>
    a
    -- ^ /@renderer@/: a t'GI.Pango.Objects.Renderer.Renderer'
    -> Maybe (Pango.Matrix.Matrix)
    -- ^ /@matrix@/: a t'GI.Pango.Structs.Matrix.Matrix', or 'P.Nothing' to unset any existing matrix.
    --  (No matrix set is the same as setting the identity matrix.)
    -> m ()
rendererSetMatrix :: a -> Maybe Matrix -> m ()
rendererSetMatrix renderer :: a
renderer matrix :: Maybe Matrix
matrix = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Renderer
renderer' <- a -> IO (Ptr Renderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Matrix
maybeMatrix <- case Maybe Matrix
matrix of
        Nothing -> Ptr Matrix -> IO (Ptr Matrix)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Matrix
forall a. Ptr a
nullPtr
        Just jMatrix :: Matrix
jMatrix -> do
            Ptr Matrix
jMatrix' <- Matrix -> IO (Ptr Matrix)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Matrix
jMatrix
            Ptr Matrix -> IO (Ptr Matrix)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Matrix
jMatrix'
    Ptr Renderer -> Ptr Matrix -> IO ()
pango_renderer_set_matrix Ptr Renderer
renderer' Ptr Matrix
maybeMatrix
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Maybe Matrix -> (Matrix -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Matrix
matrix Matrix -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data RendererSetMatrixMethodInfo
instance (signature ~ (Maybe (Pango.Matrix.Matrix) -> m ()), MonadIO m, IsRenderer a) => O.MethodInfo RendererSetMatrixMethodInfo a signature where
    overloadedMethod = rendererSetMatrix

#endif