Add a per-actor PangoContext
authorEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 23 Dec 2008 14:06:55 +0000 (14:06 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 23 Dec 2008 14:06:55 +0000 (14:06 +0000)
commit78628edf2f6f02db3d283169d93ae2d21e63a1ec
tree709175ce072007b3fc9222b05ee49d122caaf84c
parentb8b8b155c45e54e8c2bd4d7e161a28b55a5088e1
Add a per-actor PangoContext

Rendering text inside an actor is pretty much impossible without
using internal API to create the various pieces like the PangoContext
and the font map.

Each actor should have the ability to create a PangoContext, which
is the only object needed to generate layouts and change the various
Pango settings.

This commit adds a clutter_actor_get_pango_context() function that
creates a PangoContext inside the ClutterActor private data and allows
the creation of PangoLayouts when needed. If the actor already
has a PangoContext, the same instance is returned.

The PangoContext is created only on demand.
clutter/clutter-actor.c
clutter/clutter-actor.h