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 |
GI.Pango.Structs.Attribute
Description
The PangoAttribute
structure represents the common portions of all
attributes.
Particular types of attributes include this structure as their initial
portion. The common portion of the attribute holds the range to which
the value in the type-specific part of the attribute applies and should
be initialized using attributeInit
. By default, an attribute
will have an all-inclusive range of [0,G_MAXUINT
].
Synopsis
- newtype Attribute = Attribute (ManagedPtr Attribute)
- attributeAsColor :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrColor)
- attributeAsFloat :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrFloat)
- attributeAsFontDesc :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrFontDesc)
- attributeAsFontFeatures :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrFontFeatures)
- attributeAsInt :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrInt)
- attributeAsLanguage :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrLanguage)
- attributeAsShape :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrShape)
- attributeAsSize :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrSize)
- attributeAsString :: (HasCallStack, MonadIO m) => Attribute -> m (Maybe AttrString)
- attributeCopy :: (HasCallStack, MonadIO m) => Attribute -> m Attribute
- attributeDestroy :: (HasCallStack, MonadIO m) => Attribute -> m ()
- attributeEqual :: (HasCallStack, MonadIO m) => Attribute -> Attribute -> m Bool
- attributeInit :: (HasCallStack, MonadIO m) => Attribute -> AttrClass -> m ()
- getAttributeEndIndex :: MonadIO m => Attribute -> m Word32
- setAttributeEndIndex :: MonadIO m => Attribute -> Word32 -> m ()
- clearAttributeKlass :: MonadIO m => Attribute -> m ()
- getAttributeKlass :: MonadIO m => Attribute -> m (Maybe AttrClass)
- setAttributeKlass :: MonadIO m => Attribute -> Ptr AttrClass -> m ()
- getAttributeStartIndex :: MonadIO m => Attribute -> m Word32
- setAttributeStartIndex :: MonadIO m => Attribute -> Word32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Attribute Source # | |
GBoxed Attribute Source # | |
Defined in GI.Pango.Structs.Attribute | |
ManagedPtrNewtype Attribute Source # | |
Defined in GI.Pango.Structs.Attribute Methods toManagedPtr :: Attribute -> ManagedPtr Attribute | |
TypedObject Attribute Source # | |
Defined in GI.Pango.Structs.Attribute | |
HasParentTypes Attribute Source # | |
Defined in GI.Pango.Structs.Attribute | |
IsGValue (Maybe Attribute) Source # | Convert |
Defined in GI.Pango.Structs.Attribute Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Attribute -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Attribute) | |
type ParentTypes Attribute Source # | |
Defined in GI.Pango.Structs.Attribute |
Methods
Click to display all available methods, including inherited ones
Methods
asColor, asFloat, asFontDesc, asFontFeatures, asInt, asLanguage, asShape, asSize, asString, copy, destroy, equal, init.
Getters
None.
Setters
None.
asColor
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrColor) | Returns: The attribute as |
Returns the attribute cast to PangoAttrColor
.
This is mainly useful for language bindings.
Since: 1.50
asFloat
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrFloat) | Returns: The attribute as |
Returns the attribute cast to PangoAttrFloat
.
This is mainly useful for language bindings.
Since: 1.50
asFontDesc
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrFontDesc) | Returns: The attribute as |
Returns the attribute cast to PangoAttrFontDesc
.
This is mainly useful for language bindings.
Since: 1.50
asFontFeatures
attributeAsFontFeatures Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrFontFeatures) | Returns: The attribute as |
Returns the attribute cast to PangoAttrFontFeatures
.
This is mainly useful for language bindings.
Since: 1.50
asInt
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrInt) | Returns: The attribute as |
Returns the attribute cast to PangoAttrInt
.
This is mainly useful for language bindings.
Since: 1.50
asLanguage
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrLanguage) | Returns: The attribute as |
Returns the attribute cast to PangoAttrLanguage
.
This is mainly useful for language bindings.
Since: 1.50
asShape
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrShape) | Returns: The attribute as |
Returns the attribute cast to PangoAttrShape
.
This is mainly useful for language bindings.
Since: 1.50
asSize
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrSize) | Returns: The attribute as |
Returns the attribute cast to PangoAttrSize
.
This is mainly useful for language bindings.
Since: 1.50
asString
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m (Maybe AttrString) | Returns: The attribute as |
Returns the attribute cast to PangoAttrString
.
This is mainly useful for language bindings.
Since: 1.50
copy
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m Attribute | Returns: the newly allocated
|
Make a copy of an attribute.
destroy
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> m () |
Destroy a PangoAttribute
and free all associated memory.
equal
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> Attribute |
|
-> m Bool | Returns: |
Compare two attributes for equality.
This compares only the actual value of the two attributes and not the ranges that the attributes apply to.
init
Arguments
:: (HasCallStack, MonadIO m) | |
=> Attribute |
|
-> AttrClass |
|
-> m () |
Initializes attr
's klass to klass
, it's start_index to
ATTR_INDEX_FROM_TEXT_BEGINNING
and end_index to
ATTR_INDEX_TO_TEXT_END
such that the attribute applies
to the entire text by default.
Since: 1.20
Properties
endIndex
end index of the range (in bytes). The character at this index is not included in the range.
getAttributeEndIndex :: MonadIO m => Attribute -> m Word32 Source #
Get the value of the “end_index
” field.
When overloading is enabled, this is equivalent to
get
attribute #endIndex
setAttributeEndIndex :: MonadIO m => Attribute -> Word32 -> m () Source #
Set the value of the “end_index
” field.
When overloading is enabled, this is equivalent to
set
attribute [ #endIndex:=
value ]
klass
the class structure holding information about the type of the attribute
clearAttributeKlass :: MonadIO m => Attribute -> m () Source #
Set the value of the “klass
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#klass
getAttributeKlass :: MonadIO m => Attribute -> m (Maybe AttrClass) Source #
Get the value of the “klass
” field.
When overloading is enabled, this is equivalent to
get
attribute #klass
setAttributeKlass :: MonadIO m => Attribute -> Ptr AttrClass -> m () Source #
Set the value of the “klass
” field.
When overloading is enabled, this is equivalent to
set
attribute [ #klass:=
value ]
startIndex
the start index of the range (in bytes).
getAttributeStartIndex :: MonadIO m => Attribute -> m Word32 Source #
Get the value of the “start_index
” field.
When overloading is enabled, this is equivalent to
get
attribute #startIndex
setAttributeStartIndex :: MonadIO m => Attribute -> Word32 -> m () Source #
Set the value of the “start_index
” field.
When overloading is enabled, this is equivalent to
set
attribute [ #startIndex:=
value ]