Objects in HarfBuzz

Object types: Opaque struct types are used for what HarfBuzz loosely calls "objects." This doesn’t have much to do with the terminology from object-oriented programming (OOP), although some of the concepts are similar.

In HarfBuzz, all object types provide certain lifecycle-management APIs. Objects are reference-counted, and constructed with various create() methods, referenced via reference() and dereferenced using destroy().

For example, the hb_buffer_t object has hb_buffer_create() as its constructor, hb_buffer_reference() to reference, and hb_buffer_destroy() to dereference.

After construction, each object's properties are accessible only through the setter and getter functions described in the API Reference manual.

Note that many object types can be marked as read-only or immutable, facilitating their use in multi-threaded environments.

Key object types provided by HarfBuzz include: