summaryrefslogtreecommitdiff
path: root/pango/pangoxft-render.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-08-30 16:31:18 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-08-30 16:36:30 +0100
commit0bd0be4a563cbc227ef3b1cd4c7a53927816c474 (patch)
tree4cba249b7f25deee2690620f543a51e6c10c6109 /pango/pangoxft-render.c
parent7e7f76622ffe25edf3a8d4988b2e9d04654093bd (diff)
downloadpango-0bd0be4a563cbc227ef3b1cd4c7a53927816c474.tar.gz
Drop deprecated instance private data API
GLib 2.58 deprecated g_type_class_add_private(), at long last. Use the G_ADD_PRIVATE macro, and the generated instance private data getter function.
Diffstat (limited to 'pango/pangoxft-render.c')
-rw-r--r--pango/pangoxft-render.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/pango/pangoxft-render.c b/pango/pangoxft-render.c
index 9b3c936f..3e730c63 100644
--- a/pango/pangoxft-render.c
+++ b/pango/pangoxft-render.c
@@ -83,14 +83,12 @@ static void pango_xft_renderer_end (PangoRenderer *renderer);
static void flush_trapezoids (PangoXftRenderer *xftrenderer);
static void flush_glyphs (PangoXftRenderer *xftrenderer);
-G_DEFINE_TYPE (PangoXftRenderer, pango_xft_renderer, PANGO_TYPE_RENDERER)
+G_DEFINE_TYPE_WITH_PRIVATE (PangoXftRenderer, pango_xft_renderer, PANGO_TYPE_RENDERER)
static void
pango_xft_renderer_init (PangoXftRenderer *xftrenderer)
{
- xftrenderer->priv = G_TYPE_INSTANCE_GET_PRIVATE (xftrenderer,
- PANGO_TYPE_XFT_RENDERER,
- PangoXftRendererPrivate);
+ xftrenderer->priv = pango_xft_renderer_get_instance_private (xftrenderer);
xftrenderer->priv->alpha = 0xffff;
}
@@ -122,8 +120,6 @@ pango_xft_renderer_class_init (PangoXftRendererClass *klass)
"The screen being rendered to",
0, G_MAXINT, 0,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
-
- g_type_class_add_private (object_class, sizeof (PangoXftRendererPrivate));
}
static void