2.11 <PangoAttribute>

Structure: <PangoAttribute>

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 Pango.Attribute.init. By default, an attribute will have an all-inclusive range of [0,G_MAXUINT].

Fields

klass

the class structure holding information about the type of the attribute

start-index

the start index of the range (in bytes).

end-index

end index of the range (in bytes). The character at this index is not included in the range.

Procedures

Method: attribute:as-color self ⇒ %return
Method: as-color self ⇒ %return

Returns the attribute cast to <PangoAttrColor>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> such as foreground

%return

Returned: a <PangoAttrColor>, or #f.

The attribute as <PangoAttrColor>, or #f if it’s not a color attribute

Method: attribute:as-float self ⇒ %return
Method: as-float self ⇒ %return

Returns the attribute cast to <PangoAttrFloat>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> such as scale

%return

Returned: a <PangoAttrFloat>, or #f.

The attribute as <PangoAttrFloat>, or #f if it’s not a floating point attribute

Method: attribute:as-font-desc self ⇒ %return
Method: as-font-desc self ⇒ %return

Returns the attribute cast to <PangoAttrFontDesc>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> representing a font description

%return

Returned: a <PangoAttrFontDesc>, or #f.

The attribute as <PangoAttrFontDesc>, or #f if it’s not a font description attribute

Method: attribute:as-font-features self ⇒ %return
Method: as-font-features self ⇒ %return

Returns the attribute cast to <PangoAttrFontFeatures>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> representing font features

%return

Returned: a <PangoAttrFontFeatures>, or #f.

The attribute as <PangoAttrFontFeatures>, or #f if it’s not a font features attribute

Method: attribute:as-int self ⇒ %return
Method: as-int self ⇒ %return

Returns the attribute cast to <PangoAttrInt>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> such as weight

%return

Returned: a <PangoAttrInt>, or #f.

The attribute as <PangoAttrInt>, or #f if it’s not an integer attribute

Method: attribute:as-language self ⇒ %return
Method: as-language self ⇒ %return

Returns the attribute cast to <PangoAttrLanguage>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> representing a language

%return

Returned: a <PangoAttrLanguage>, or #f.

The attribute as <PangoAttrLanguage>, or #f if it’s not a language attribute

Method: attribute:as-size self ⇒ %return
Method: as-size self ⇒ %return

Returns the attribute cast to <PangoAttrSize>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> representing a size

%return

Returned: a <PangoAttrSize>, or #f.

The attribute as <PangoAttrSize>, or NULL if it’s not a size attribute

Method: attribute:as-string self ⇒ %return
Method: as-string self ⇒ %return

Returns the attribute cast to <PangoAttrString>.

This is mainly useful for language bindings.

self

Passed: a <PangoAttribute>.

A <PangoAttribute> such as family

%return

Returned: a <PangoAttrString>, or #f.

The attribute as <PangoAttrString>, or #f if it’s not a string attribute

Method: attribute:copy self ⇒ %return
Method: copy self ⇒ %return

Make a copy of an attribute.

self

Passed: a <PangoAttribute>.

a <PangoAttribute>

%return

Returned: a <PangoAttribute>.

the newly allocated <PangoAttribute>, which should be freed with attribute:destroy.

Method: attribute:destroy self
Method: destroy self

Destroy a <PangoAttribute> and free all associated memory.

self

Passed: a <PangoAttribute>.

a <PangoAttribute>.

Method: attribute:equal? self attr2 ⇒ %return
Method: equal? self attr2 ⇒ %return

Compare two attributes for equality.

This compares only the actual value of the two attributes and not the ranges that the attributes apply to.

self

Passed: a <PangoAttribute>.

a <PangoAttribute>

attr2

Passed: a <PangoAttribute>.

another <PangoAttribute>

%return

Returned: a boolean.

#t if the two attributes have the same value