gi-pango-0.1.36.12: GI/Pango/Objects/Renderer.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Pango.Objects.Renderer
(
-- * Exported types
Renderer(..) ,
RendererK ,
toRenderer ,
noRenderer ,
-- * Methods
-- ** rendererActivate
rendererActivate ,
-- ** rendererDeactivate
rendererDeactivate ,
-- ** rendererDrawErrorUnderline
rendererDrawErrorUnderline ,
-- ** rendererDrawGlyph
rendererDrawGlyph ,
-- ** rendererDrawGlyphItem
rendererDrawGlyphItem ,
-- ** rendererDrawGlyphs
rendererDrawGlyphs ,
-- ** rendererDrawLayout
rendererDrawLayout ,
-- ** rendererDrawLayoutLine
rendererDrawLayoutLine ,
-- ** rendererDrawRectangle
rendererDrawRectangle ,
-- ** rendererDrawTrapezoid
rendererDrawTrapezoid ,
-- ** rendererGetColor
rendererGetColor ,
-- ** rendererGetLayout
rendererGetLayout ,
-- ** rendererGetLayoutLine
rendererGetLayoutLine ,
-- ** rendererGetMatrix
rendererGetMatrix ,
-- ** rendererPartChanged
rendererPartChanged ,
-- ** rendererSetColor
rendererSetColor ,
-- ** rendererSetMatrix
rendererSetMatrix ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Pango.Types
import GI.Pango.Callbacks
import qualified GI.GObject as GObject
newtype Renderer = Renderer (ForeignPtr Renderer)
foreign import ccall "pango_renderer_get_type"
c_pango_renderer_get_type :: IO GType
type instance ParentTypes Renderer = RendererParentTypes
type RendererParentTypes = '[GObject.Object]
instance GObject Renderer where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_pango_renderer_get_type
class GObject o => RendererK o
instance (GObject o, IsDescendantOf Renderer o) => RendererK o
toRenderer :: RendererK o => o -> IO Renderer
toRenderer = unsafeCastTo Renderer
noRenderer :: Maybe Renderer
noRenderer = Nothing
type instance AttributeList Renderer = RendererAttributeList
type RendererAttributeList = ('[ ] :: [(Symbol, *)])
type instance SignalList Renderer = RendererSignalList
type RendererSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method Renderer::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_activate" pango_renderer_activate ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
IO ()
rendererActivate ::
(MonadIO m, RendererK a) =>
a -> -- _obj
m ()
rendererActivate _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
pango_renderer_activate _obj'
touchManagedPtr _obj
return ()
-- method Renderer::deactivate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_deactivate" pango_renderer_deactivate ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
IO ()
rendererDeactivate ::
(MonadIO m, RendererK a) =>
a -> -- _obj
m ()
rendererDeactivate _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
pango_renderer_deactivate _obj'
touchManagedPtr _obj
return ()
-- method Renderer::draw_error_underline
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_error_underline" pango_renderer_draw_error_underline ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
Int32 -> -- x : TBasicType TInt32
Int32 -> -- y : TBasicType TInt32
Int32 -> -- width : TBasicType TInt32
Int32 -> -- height : TBasicType TInt32
IO ()
rendererDrawErrorUnderline ::
(MonadIO m, RendererK a) =>
a -> -- _obj
Int32 -> -- x
Int32 -> -- y
Int32 -> -- width
Int32 -> -- height
m ()
rendererDrawErrorUnderline _obj x y width height = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
pango_renderer_draw_error_underline _obj' x y width height
touchManagedPtr _obj
return ()
-- method Renderer::draw_glyph
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font", argType = TInterface "Pango" "Font", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "glyph", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font", argType = TInterface "Pango" "Font", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "glyph", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_glyph" pango_renderer_draw_glyph ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
Ptr Font -> -- font : TInterface "Pango" "Font"
Word32 -> -- glyph : TBasicType TUInt32
CDouble -> -- x : TBasicType TDouble
CDouble -> -- y : TBasicType TDouble
IO ()
rendererDrawGlyph ::
(MonadIO m, RendererK a, FontK b) =>
a -> -- _obj
b -> -- font
Word32 -> -- glyph
Double -> -- x
Double -> -- y
m ()
rendererDrawGlyph _obj font glyph x y = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let font' = unsafeManagedPtrCastPtr font
let x' = realToFrac x
let y' = realToFrac y
pango_renderer_draw_glyph _obj' font' glyph x' y'
touchManagedPtr _obj
touchManagedPtr font
return ()
-- method Renderer::draw_glyph_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "glyph_item", argType = TInterface "Pango" "GlyphItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "glyph_item", argType = TInterface "Pango" "GlyphItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_glyph_item" pango_renderer_draw_glyph_item ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
CString -> -- text : TBasicType TUTF8
Ptr GlyphItem -> -- glyph_item : TInterface "Pango" "GlyphItem"
Int32 -> -- x : TBasicType TInt32
Int32 -> -- y : TBasicType TInt32
IO ()
rendererDrawGlyphItem ::
(MonadIO m, RendererK a) =>
a -> -- _obj
Maybe (T.Text) -> -- text
GlyphItem -> -- glyph_item
Int32 -> -- x
Int32 -> -- y
m ()
rendererDrawGlyphItem _obj text glyph_item x y = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeText <- case text of
Nothing -> return nullPtr
Just jText -> do
jText' <- textToCString jText
return jText'
let glyph_item' = unsafeManagedPtrGetPtr glyph_item
pango_renderer_draw_glyph_item _obj' maybeText glyph_item' x y
touchManagedPtr _obj
touchManagedPtr glyph_item
freeMem maybeText
return ()
-- method Renderer::draw_glyphs
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font", argType = TInterface "Pango" "Font", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "glyphs", argType = TInterface "Pango" "GlyphString", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "font", argType = TInterface "Pango" "Font", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "glyphs", argType = TInterface "Pango" "GlyphString", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_glyphs" pango_renderer_draw_glyphs ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
Ptr Font -> -- font : TInterface "Pango" "Font"
Ptr GlyphString -> -- glyphs : TInterface "Pango" "GlyphString"
Int32 -> -- x : TBasicType TInt32
Int32 -> -- y : TBasicType TInt32
IO ()
rendererDrawGlyphs ::
(MonadIO m, RendererK a, FontK b) =>
a -> -- _obj
b -> -- font
GlyphString -> -- glyphs
Int32 -> -- x
Int32 -> -- y
m ()
rendererDrawGlyphs _obj font glyphs x y = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let font' = unsafeManagedPtrCastPtr font
let glyphs' = unsafeManagedPtrGetPtr glyphs
pango_renderer_draw_glyphs _obj' font' glyphs' x y
touchManagedPtr _obj
touchManagedPtr font
touchManagedPtr glyphs
return ()
-- method Renderer::draw_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "layout", argType = TInterface "Pango" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_layout" pango_renderer_draw_layout ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
Ptr Layout -> -- layout : TInterface "Pango" "Layout"
Int32 -> -- x : TBasicType TInt32
Int32 -> -- y : TBasicType TInt32
IO ()
rendererDrawLayout ::
(MonadIO m, RendererK a, LayoutK b) =>
a -> -- _obj
b -> -- layout
Int32 -> -- x
Int32 -> -- y
m ()
rendererDrawLayout _obj layout x y = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let layout' = unsafeManagedPtrCastPtr layout
pango_renderer_draw_layout _obj' layout' x y
touchManagedPtr _obj
touchManagedPtr layout
return ()
-- method Renderer::draw_layout_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line", argType = TInterface "Pango" "LayoutLine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "line", argType = TInterface "Pango" "LayoutLine", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_layout_line" pango_renderer_draw_layout_line ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
Ptr LayoutLine -> -- line : TInterface "Pango" "LayoutLine"
Int32 -> -- x : TBasicType TInt32
Int32 -> -- y : TBasicType TInt32
IO ()
rendererDrawLayoutLine ::
(MonadIO m, RendererK a) =>
a -> -- _obj
LayoutLine -> -- line
Int32 -> -- x
Int32 -> -- y
m ()
rendererDrawLayoutLine _obj line x y = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let line' = unsafeManagedPtrGetPtr line
pango_renderer_draw_layout_line _obj' line' x y
touchManagedPtr _obj
touchManagedPtr line
return ()
-- method Renderer::draw_rectangle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_rectangle" pango_renderer_draw_rectangle ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
CUInt -> -- part : TInterface "Pango" "RenderPart"
Int32 -> -- x : TBasicType TInt32
Int32 -> -- y : TBasicType TInt32
Int32 -> -- width : TBasicType TInt32
Int32 -> -- height : TBasicType TInt32
IO ()
rendererDrawRectangle ::
(MonadIO m, RendererK a) =>
a -> -- _obj
RenderPart -> -- part
Int32 -> -- x
Int32 -> -- y
Int32 -> -- width
Int32 -> -- height
m ()
rendererDrawRectangle _obj part x y width height = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let part' = (fromIntegral . fromEnum) part
pango_renderer_draw_rectangle _obj' part' x y width height
touchManagedPtr _obj
return ()
-- method Renderer::draw_trapezoid
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1_", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x11", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x21", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y2", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x12", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x22", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y1_", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x11", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x21", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y2", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x12", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x22", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_draw_trapezoid" pango_renderer_draw_trapezoid ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
CUInt -> -- part : TInterface "Pango" "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 ()
rendererDrawTrapezoid ::
(MonadIO m, RendererK a) =>
a -> -- _obj
RenderPart -> -- part
Double -> -- y1_
Double -> -- x11
Double -> -- x21
Double -> -- y2
Double -> -- x12
Double -> -- x22
m ()
rendererDrawTrapezoid _obj part y1_ x11 x21 y2 x12 x22 = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let part' = (fromIntegral . fromEnum) part
let y1_' = realToFrac y1_
let x11' = realToFrac x11
let x21' = realToFrac x21
let y2' = realToFrac y2
let x12' = realToFrac x12
let x22' = realToFrac x22
pango_renderer_draw_trapezoid _obj' part' y1_' x11' x21' y2' x12' x22'
touchManagedPtr _obj
return ()
-- method Renderer::get_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Color"
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_get_color" pango_renderer_get_color ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
CUInt -> -- part : TInterface "Pango" "RenderPart"
IO (Ptr Color)
rendererGetColor ::
(MonadIO m, RendererK a) =>
a -> -- _obj
RenderPart -> -- part
m Color
rendererGetColor _obj part = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let part' = (fromIntegral . fromEnum) part
result <- pango_renderer_get_color _obj' part'
checkUnexpectedReturnNULL "pango_renderer_get_color" result
result' <- (newBoxed Color) result
touchManagedPtr _obj
return result'
-- method Renderer::get_layout
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Layout"
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_get_layout" pango_renderer_get_layout ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
IO (Ptr Layout)
rendererGetLayout ::
(MonadIO m, RendererK a) =>
a -> -- _obj
m Layout
rendererGetLayout _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- pango_renderer_get_layout _obj'
checkUnexpectedReturnNULL "pango_renderer_get_layout" result
result' <- (newObject Layout) result
touchManagedPtr _obj
return result'
-- method Renderer::get_layout_line
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "LayoutLine"
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_get_layout_line" pango_renderer_get_layout_line ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
IO (Ptr LayoutLine)
rendererGetLayoutLine ::
(MonadIO m, RendererK a) =>
a -> -- _obj
m LayoutLine
rendererGetLayoutLine _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- pango_renderer_get_layout_line _obj'
checkUnexpectedReturnNULL "pango_renderer_get_layout_line" result
result' <- (newBoxed LayoutLine) result
touchManagedPtr _obj
return result'
-- method Renderer::get_matrix
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "Matrix"
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_get_matrix" pango_renderer_get_matrix ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
IO (Ptr Matrix)
rendererGetMatrix ::
(MonadIO m, RendererK a) =>
a -> -- _obj
m Matrix
rendererGetMatrix _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- pango_renderer_get_matrix _obj'
checkUnexpectedReturnNULL "pango_renderer_get_matrix" result
result' <- (newBoxed Matrix) result
touchManagedPtr _obj
return result'
-- method Renderer::part_changed
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_part_changed" pango_renderer_part_changed ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
CUInt -> -- part : TInterface "Pango" "RenderPart"
IO ()
rendererPartChanged ::
(MonadIO m, RendererK a) =>
a -> -- _obj
RenderPart -> -- part
m ()
rendererPartChanged _obj part = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let part' = (fromIntegral . fromEnum) part
pango_renderer_part_changed _obj' part'
touchManagedPtr _obj
return ()
-- method Renderer::set_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Pango" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "part", argType = TInterface "Pango" "RenderPart", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "color", argType = TInterface "Pango" "Color", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_set_color" pango_renderer_set_color ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
CUInt -> -- part : TInterface "Pango" "RenderPart"
Ptr Color -> -- color : TInterface "Pango" "Color"
IO ()
rendererSetColor ::
(MonadIO m, RendererK a) =>
a -> -- _obj
RenderPart -> -- part
Maybe (Color) -> -- color
m ()
rendererSetColor _obj part color = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let part' = (fromIntegral . fromEnum) part
maybeColor <- case color of
Nothing -> return nullPtr
Just jColor -> do
let jColor' = unsafeManagedPtrGetPtr jColor
return jColor'
pango_renderer_set_color _obj' part' maybeColor
touchManagedPtr _obj
whenJust color touchManagedPtr
return ()
-- method Renderer::set_matrix
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "matrix", argType = TInterface "Pango" "Matrix", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Pango" "Renderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "matrix", argType = TInterface "Pango" "Matrix", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "pango_renderer_set_matrix" pango_renderer_set_matrix ::
Ptr Renderer -> -- _obj : TInterface "Pango" "Renderer"
Ptr Matrix -> -- matrix : TInterface "Pango" "Matrix"
IO ()
rendererSetMatrix ::
(MonadIO m, RendererK a) =>
a -> -- _obj
Maybe (Matrix) -> -- matrix
m ()
rendererSetMatrix _obj matrix = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeMatrix <- case matrix of
Nothing -> return nullPtr
Just jMatrix -> do
let jMatrix' = unsafeManagedPtrGetPtr jMatrix
return jMatrix'
pango_renderer_set_matrix _obj' maybeMatrix
touchManagedPtr _obj
whenJust matrix touchManagedPtr
return ()