gi-pango-1.0.25: Pango bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Pango.Structs.AttrShape

Description

The PangoAttrShape structure is used to represent attributes which impose shape restrictions.

Synopsis

Exported types

newtype AttrShape Source #

Memory-managed wrapper type.

Instances

Instances details
Eq AttrShape Source # 
Instance details

Defined in GI.Pango.Structs.AttrShape

BoxedPtr AttrShape Source # 
Instance details

Defined in GI.Pango.Structs.AttrShape

CallocPtr AttrShape Source # 
Instance details

Defined in GI.Pango.Structs.AttrShape

ManagedPtrNewtype AttrShape Source # 
Instance details

Defined in GI.Pango.Structs.AttrShape

tag ~ 'AttrSet => Constructible AttrShape tag Source # 
Instance details

Defined in GI.Pango.Structs.AttrShape

Methods

new :: MonadIO m => (ManagedPtr AttrShape -> AttrShape) -> [AttrOp AttrShape tag] -> m AttrShape #

newZeroAttrShape :: MonadIO m => m AttrShape Source #

Construct a AttrShape struct initialized to zero.

Methods

new

attrShapeNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rectangle

inkRect: ink rectangle to assign to each character

-> Rectangle

logicalRect: logical rectangle to assign to each character

-> m Attribute

Returns: the newly allocated PangoAttribute, which should be freed with attributeDestroy

Create a new shape attribute.

A shape is used to impose a particular ink and logical rectangle on the result of shaping a particular glyph. This might be used, for instance, for embedding a picture or a widget inside a PangoLayout.

newWithData

attrShapeNewWithData Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rectangle

inkRect: ink rectangle to assign to each character

-> Rectangle

logicalRect: logical rectangle to assign to each character

-> Ptr ()

data: user data pointer

-> Maybe AttrDataCopyFunc

copyFunc: function to copy data when the attribute is copied. If Nothing, data is simply copied as a pointer

-> Maybe DestroyNotify

destroyFunc: function to free data when the attribute is freed

-> m Attribute

Returns: the newly allocated PangoAttribute, which should be freed with attributeDestroy

Creates a new shape attribute.

Like [funcpango.AttrShape.new], but a user data pointer is also provided; this pointer can be accessed when later rendering the glyph.

Since: 1.8

Properties

attr

the common portion of the attribute

getAttrShapeAttr :: MonadIO m => AttrShape -> m Attribute Source #

Get the value of the “attr” field. When overloading is enabled, this is equivalent to

get attrShape #attr

copyFunc

copy function for the user data

clearAttrShapeCopyFunc :: MonadIO m => AttrShape -> m () Source #

Set the value of the “copy_func” field to Nothing. When overloading is enabled, this is equivalent to

clear #copyFunc

getAttrShapeCopyFunc :: MonadIO m => AttrShape -> m (Maybe AttrDataCopyFunc_WithClosures) Source #

Get the value of the “copy_func” field. When overloading is enabled, this is equivalent to

get attrShape #copyFunc

setAttrShapeCopyFunc :: MonadIO m => AttrShape -> FunPtr C_AttrDataCopyFunc -> m () Source #

Set the value of the “copy_func” field. When overloading is enabled, this is equivalent to

set attrShape [ #copyFunc := value ]

data

user data set (see [funcpango.AttrShape.new_with_data])

clearAttrShapeData :: MonadIO m => AttrShape -> m () Source #

Set the value of the “data” field to Nothing. When overloading is enabled, this is equivalent to

clear #data

getAttrShapeData :: MonadIO m => AttrShape -> m (Ptr ()) Source #

Get the value of the “data” field. When overloading is enabled, this is equivalent to

get attrShape #data

setAttrShapeData :: MonadIO m => AttrShape -> Ptr () -> m () Source #

Set the value of the “data” field. When overloading is enabled, this is equivalent to

set attrShape [ #data := value ]

destroyFunc

destroy function for the user data

clearAttrShapeDestroyFunc :: MonadIO m => AttrShape -> m () Source #

Set the value of the “destroy_func” field to Nothing. When overloading is enabled, this is equivalent to

clear #destroyFunc

getAttrShapeDestroyFunc :: MonadIO m => AttrShape -> m (Maybe DestroyNotify) Source #

Get the value of the “destroy_func” field. When overloading is enabled, this is equivalent to

get attrShape #destroyFunc

setAttrShapeDestroyFunc :: MonadIO m => AttrShape -> FunPtr C_DestroyNotify -> m () Source #

Set the value of the “destroy_func” field. When overloading is enabled, this is equivalent to

set attrShape [ #destroyFunc := value ]

inkRect

the ink rectangle to restrict to

getAttrShapeInkRect :: MonadIO m => AttrShape -> m Rectangle Source #

Get the value of the “ink_rect” field. When overloading is enabled, this is equivalent to

get attrShape #inkRect

logicalRect

the logical rectangle to restrict to

getAttrShapeLogicalRect :: MonadIO m => AttrShape -> m Rectangle Source #

Get the value of the “logical_rect” field. When overloading is enabled, this is equivalent to

get attrShape #logicalRect