AttributeProtocol
public protocol AttributeProtocol
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 [methodPango.Attribute.init]. By default, an attribute
will have an all-inclusive range of [0,G_MAXUINT].
The AttributeProtocol protocol exposes the methods and properties of an underlying PangoAttribute instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see Attribute.
Alternatively, use AttributeRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
PangoAttributeinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
attribute_ptrDefault implementationTyped pointer to the underlying
PangoAttributeinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
PangoAttributeinstance.Declaration
Swift
var attribute_ptr: UnsafeMutablePointer<PangoAttribute>! { get } -
Required Initialiser for types conforming to
AttributeProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
asColor()Extension methodReturns the attribute cast to
PangoAttrColor.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asColor() -> Pango.AttrColorRef! -
asFloat()Extension methodReturns the attribute cast to
PangoAttrFloat.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asFloat() -> Pango.AttrFloatRef! -
asFontDesc()Extension methodReturns the attribute cast to
PangoAttrFontDesc.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asFontDesc() -> Pango.AttrFontDescRef! -
asFontFeatures()Extension methodReturns the attribute cast to
PangoAttrFontFeatures.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asFontFeatures() -> Pango.AttrFontFeaturesRef! -
asInt()Extension methodReturns the attribute cast to
PangoAttrInt.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asInt() -> Pango.AttrIntRef! -
asLanguage()Extension methodReturns the attribute cast to
PangoAttrLanguage.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asLanguage() -> Pango.AttrLanguageRef! -
asShape()Extension methodReturns the attribute cast to
PangoAttrShape.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asShape() -> Pango.AttrShapeRef! -
asSize()Extension methodReturns the attribute cast to
PangoAttrSize.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asSize() -> Pango.AttrSizeRef! -
asString()Extension methodReturns the attribute cast to
PangoAttrString.This is mainly useful for language bindings.
Declaration
Swift
@inlinable func asString() -> Pango.AttrStringRef! -
copy()Extension methodMake a copy of an attribute.
Declaration
Swift
@inlinable func copy() -> Pango.AttributeRef! -
destroy()Extension methodDestroy a
PangoAttributeand free all associated memory.Declaration
Swift
@inlinable func destroy() -
equal(attr2:Extension method) Compare two attributes for equality.
This compares only the actual value of the two attributes and not the ranges that the attributes apply to.
Declaration
Swift
@inlinable func equal<AttributeT>(attr2: AttributeT) -> Bool where AttributeT : AttributeProtocol -
init_(klass:Extension method) Initializes
attr‘s klass toklass, it’s start_index toPANGO_ATTR_INDEX_FROM_TEXT_BEGINNINGand end_index toPANGO_ATTR_INDEX_TO_TEXT_ENDsuch that the attribute applies to the entire text by default.Declaration
Swift
@inlinable func init_<AttrClassT>(klass: AttrClassT) where AttrClassT : AttrClassProtocol -
klassExtension methodthe class structure holding information about the type of the attribute
Declaration
Swift
@inlinable var klass: AttrClassRef! { get set } -
startIndexExtension methodthe start index of the range (in bytes).
Declaration
Swift
@inlinable var startIndex: guint { get set } -
endIndexExtension methodend index of the range (in bytes). The character at this index is not included in the range.
Declaration
Swift
@inlinable var endIndex: guint { get set }
View on GitHub
Install in Dash
AttributeProtocol Protocol Reference