package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.pango/Ocgtk_pango/Pango/Wrappers/Attr_iterator/index.html

Module Wrappers.Attr_iterator

type t = [ `attr_iterator ] Gobject.obj

A `PangoAttrIterator` is used to iterate through a `PangoAttrList`.

A new iterator is created with method@Pango.AttrList.get_iterator. Once the iterator is created, it can be advanced through the style changes in the text using method@Pango.AttrIterator.next. At each style change, the range of the current style segment and the attributes currently in effect can be queried.

val range : t -> int * int

Get the range of the current segment.

Note that the stored return values are signed, not unsigned like the values in `PangoAttribute`. To deal with this API oversight, stored return values that wouldn't fit into a signed integer are clamped to %G_MAXINT.

val next : t -> bool

Advance the iterator until the next change of style.

val get_attrs : t -> [ `attribute ] Gobject.obj list

Gets a list of all attributes at the current position of the iterator.

val get : t -> Pango_enums.attrtype -> [ `attribute ] Gobject.obj option

Find the current attribute of a particular type at the iterator location.

When multiple attributes of the same type overlap, the attribute whose range starts closest to the current location is used.

val destroy : t -> unit

Destroy a `PangoAttrIterator` and free all associated memory.

val get_type : unit -> Gobject.Type.t