From 7cae64fccd23cdbe1c799abc849eb79ddf899ace Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 4 Sep 2024 15:32:46 +0200 Subject: [PATCH] clutter/pango: Mark helpers as private As they were public only for clutter to be able to use them from pango. So simplify that Part-of: --- clutter/clutter/clutter-main.h | 39 ------------------- clutter/clutter/clutter-paint-nodes.c | 1 + clutter/clutter/clutter-text.c | 1 + .../clutter/pango/cogl-pango-display-list.h | 2 +- clutter/clutter/pango/cogl-pango-private.h | 37 ++++++++++++++++++ 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/clutter/clutter/clutter-main.h b/clutter/clutter/clutter-main.h index 548fff8b7..03e6ae76f 100644 --- a/clutter/clutter/clutter-main.h +++ b/clutter/clutter/clutter-main.h @@ -27,9 +27,6 @@ #error "Only can be included directly." #endif -#include -#include - #include "clutter/clutter-actor.h" #include "clutter/clutter-stage.h" #include "cogl/cogl.h" @@ -160,40 +157,4 @@ void clutter_debug_set_max_render_time_constant (int max_rend CLUTTER_EXPORT ClutterTextDirection clutter_get_text_direction (void); -typedef void (* ClutterPipelineSetup) (CoglPipeline *pipeline, - gpointer user_data); - -/** - * clutter_ensure_glyph_cache_for_layout: - * @layout: A #PangoLayout - * - * This updates any internal glyph cache textures as necessary to be - * able to render the given @layout. - * - * This api should be used to avoid mid-scene modifications of - * glyph-cache textures which can lead to undefined rendering results. - */ -CLUTTER_EXPORT void -clutter_ensure_glyph_cache_for_layout (PangoLayout *layout); - -/** - * clutter_show_layout: (skip) - * @framebuffer: A #CoglFramebuffer to draw too. - * @layout: a #PangoLayout - * @x: X coordinate to render the layout at - * @y: Y coordinate to render the layout at - * @color: color to use when rendering the layout - * - * Draws a solidly coloured @layout on the given @framebuffer at (@x, - * @y) within the `framebuffer`'s current model-view coordinate space. - */ -CLUTTER_EXPORT void -clutter_show_layout (CoglFramebuffer *framebuffer, - PangoLayout *layout, - float x, - float y, - const CoglColor *color, - ClutterPipelineSetup pipeline_setup, - gpointer pipeline_setup_userdata); - G_END_DECLS diff --git a/clutter/clutter/clutter-paint-nodes.c b/clutter/clutter/clutter-paint-nodes.c index 92b012175..e4798b697 100644 --- a/clutter/clutter/clutter-paint-nodes.c +++ b/clutter/clutter/clutter-paint-nodes.c @@ -30,6 +30,7 @@ #include #include "cogl/cogl.h" +#include "clutter/pango/cogl-pango-private.h" #include "clutter/clutter-actor-private.h" #include "clutter/clutter-blur-private.h" #include "clutter/clutter-debug.h" diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c index 2a0dd3079..c15fdb082 100644 --- a/clutter/clutter/clutter-text.c +++ b/clutter/clutter/clutter-text.c @@ -46,6 +46,7 @@ #include "clutter/clutter-text.h" +#include "clutter/pango/cogl-pango-private.h" #include "clutter/clutter-text-accessible-private.h" #include "clutter/clutter-actor-private.h" #include "clutter/clutter-animatable.h" diff --git a/clutter/clutter/pango/cogl-pango-display-list.h b/clutter/clutter/pango/cogl-pango-display-list.h index 6fa2f131c..31b02f961 100644 --- a/clutter/clutter/pango/cogl-pango-display-list.h +++ b/clutter/clutter/pango/cogl-pango-display-list.h @@ -31,7 +31,7 @@ #include #include "clutter/pango/cogl-pango-pipeline-cache.h" -#include "clutter/clutter-main.h" +#include "clutter/pango/cogl-pango-private.h" G_BEGIN_DECLS diff --git a/clutter/clutter/pango/cogl-pango-private.h b/clutter/clutter/pango/cogl-pango-private.h index 6a2fae2b9..7118e4712 100644 --- a/clutter/clutter/pango/cogl-pango-private.h +++ b/clutter/clutter/pango/cogl-pango-private.h @@ -44,6 +44,43 @@ G_BEGIN_DECLS PangoRenderer * _cogl_pango_renderer_new (CoglContext *context); +/** + * clutter_ensure_glyph_cache_for_layout: + * @layout: A #PangoLayout + * + * This updates any internal glyph cache textures as necessary to be + * able to render the given @layout. + * + * This api should be used to avoid mid-scene modifications of + * glyph-cache textures which can lead to undefined rendering results. + */ +void +clutter_ensure_glyph_cache_for_layout (PangoLayout *layout); + + +typedef void (* ClutterPipelineSetup) (CoglPipeline *pipeline, + gpointer user_data); + +/** + * clutter_show_layout: (skip) + * @framebuffer: A #CoglFramebuffer to draw too. + * @layout: a #PangoLayout + * @x: X coordinate to render the layout at + * @y: Y coordinate to render the layout at + * @color: color to use when rendering the layout + * + * Draws a solidly coloured @layout on the given @framebuffer at (@x, + * @y) within the `framebuffer`'s current model-view coordinate space. + */ +void +clutter_show_layout (CoglFramebuffer *framebuffer, + PangoLayout *layout, + float x, + float y, + const CoglColor *color, + ClutterPipelineSetup pipeline_setup, + gpointer pipeline_setup_userdata); + G_DEFINE_AUTOPTR_CLEANUP_FUNC (PangoRenderer, g_object_unref) G_END_DECLS