Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The PangoAttrShape
structure is used to represent attributes which
impose shape restrictions.
Synopsis
- newtype AttrShape = AttrShape (ManagedPtr AttrShape)
- newZeroAttrShape :: MonadIO m => m AttrShape
- attrShapeNew :: (HasCallStack, MonadIO m) => Rectangle -> Rectangle -> m Attribute
- attrShapeNewWithData :: (HasCallStack, MonadIO m) => Rectangle -> Rectangle -> Ptr () -> Maybe AttrDataCopyFunc -> Maybe DestroyNotify -> m Attribute
- getAttrShapeAttr :: MonadIO m => AttrShape -> m Attribute
- clearAttrShapeCopyFunc :: MonadIO m => AttrShape -> m ()
- getAttrShapeCopyFunc :: MonadIO m => AttrShape -> m (Maybe AttrDataCopyFunc_WithClosures)
- setAttrShapeCopyFunc :: MonadIO m => AttrShape -> FunPtr C_AttrDataCopyFunc -> m ()
- clearAttrShapeData :: MonadIO m => AttrShape -> m ()
- getAttrShapeData :: MonadIO m => AttrShape -> m (Ptr ())
- setAttrShapeData :: MonadIO m => AttrShape -> Ptr () -> m ()
- clearAttrShapeDestroyFunc :: MonadIO m => AttrShape -> m ()
- getAttrShapeDestroyFunc :: MonadIO m => AttrShape -> m (Maybe DestroyNotify)
- setAttrShapeDestroyFunc :: MonadIO m => AttrShape -> FunPtr C_DestroyNotify -> m ()
- getAttrShapeInkRect :: MonadIO m => AttrShape -> m Rectangle
- getAttrShapeLogicalRect :: MonadIO m => AttrShape -> m Rectangle
Exported types
Memory-managed wrapper type.
Instances
Eq AttrShape Source # | |
BoxedPtr AttrShape Source # | |
Defined in GI.Pango.Structs.AttrShape boxedPtrCopy :: AttrShape -> IO AttrShape # boxedPtrFree :: AttrShape -> IO () # | |
CallocPtr AttrShape Source # | |
Defined in GI.Pango.Structs.AttrShape boxedPtrCalloc :: IO (Ptr AttrShape) # | |
ManagedPtrNewtype AttrShape Source # | |
Defined in GI.Pango.Structs.AttrShape | |
tag ~ 'AttrSet => Constructible AttrShape tag Source # | |
Defined in GI.Pango.Structs.AttrShape |
newZeroAttrShape :: MonadIO m => m AttrShape Source #
Construct a AttrShape
struct initialized to zero.
Methods
new
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> Rectangle |
|
-> m Attribute | Returns: the newly allocated
|
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
:: (HasCallStack, MonadIO m) | |
=> Rectangle |
|
-> Rectangle |
|
-> Ptr () |
|
-> Maybe AttrDataCopyFunc |
|
-> Maybe DestroyNotify |
|
-> m Attribute | Returns: the newly allocated
|
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