cogl/pango: Make FontMap type private
It is an implementation detail, nothing really makes use of any of it specific APIs Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4004>
This commit is contained in:
parent
cdc43065e0
commit
b6b004b437
@ -13107,13 +13107,13 @@ clutter_actor_get_pango_context (ClutterActor *self)
|
||||
PangoContext *
|
||||
clutter_actor_create_pango_context (ClutterActor *self)
|
||||
{
|
||||
CoglPangoFontMap *font_map;
|
||||
PangoFontMap *font_map;
|
||||
ClutterContext *context = clutter_actor_get_context (self);
|
||||
PangoContext *pango_context;
|
||||
|
||||
font_map = clutter_context_get_pango_fontmap (context);
|
||||
|
||||
pango_context = pango_font_map_create_context (PANGO_FONT_MAP (font_map));
|
||||
pango_context = pango_font_map_create_context (font_map);
|
||||
update_pango_context (clutter_context_get_backend (context), pango_context);
|
||||
pango_context_set_language (pango_context, pango_language_get_default ());
|
||||
|
||||
|
@ -35,7 +35,7 @@ struct _ClutterContext
|
||||
* ordered from least recently added to most recently added */
|
||||
GList *event_filters;
|
||||
|
||||
CoglPangoFontMap *font_map;
|
||||
PangoFontMap *font_map;
|
||||
|
||||
GSList *current_event;
|
||||
|
||||
|
@ -304,10 +304,10 @@ clutter_context_get_backend (ClutterContext *context)
|
||||
return context->backend;
|
||||
}
|
||||
|
||||
CoglPangoFontMap *
|
||||
PangoFontMap *
|
||||
clutter_context_get_pango_fontmap (ClutterContext *context)
|
||||
{
|
||||
CoglPangoFontMap *font_map;
|
||||
PangoFontMap *font_map;
|
||||
gdouble resolution;
|
||||
ClutterBackend *backend;
|
||||
CoglContext *cogl_context;
|
||||
@ -317,7 +317,7 @@ clutter_context_get_pango_fontmap (ClutterContext *context)
|
||||
|
||||
backend = clutter_context_get_backend (context);
|
||||
cogl_context = clutter_backend_get_cogl_context (backend);
|
||||
font_map = COGL_PANGO_FONT_MAP (cogl_pango_font_map_new (cogl_context));
|
||||
font_map = cogl_pango_font_map_new (cogl_context);
|
||||
|
||||
resolution = clutter_backend_get_resolution (context->backend);
|
||||
pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (font_map),
|
||||
|
@ -56,7 +56,7 @@ ClutterBackend * clutter_context_get_backend (ClutterContext *context);
|
||||
/**
|
||||
* clutter_context_get_pango_fontmap: (skip)
|
||||
*/
|
||||
CoglPangoFontMap * clutter_context_get_pango_fontmap (ClutterContext *context);
|
||||
PangoFontMap * clutter_context_get_pango_fontmap (ClutterContext *context);
|
||||
|
||||
ClutterTextDirection clutter_context_get_text_direction (ClutterContext *context);
|
||||
|
||||
|
@ -75,7 +75,7 @@ cogl_pango_font_map_new (CoglContext *context)
|
||||
}
|
||||
|
||||
PangoRenderer *
|
||||
cogl_pango_font_map_get_renderer (CoglPangoFontMap *fm)
|
||||
cogl_pango_font_map_get_renderer (PangoFontMap *fm)
|
||||
{
|
||||
CoglPangoFontMapPriv *priv = g_object_get_qdata (G_OBJECT (fm),
|
||||
cogl_pango_font_map_get_priv_key ());
|
||||
|
@ -45,14 +45,14 @@ _cogl_pango_renderer_new (CoglContext *context);
|
||||
|
||||
/**
|
||||
* cogl_pango_font_map_get_renderer:
|
||||
* @font_map: a #CoglPangoFontMap
|
||||
* @font_map: a #PangoFontMap
|
||||
*
|
||||
* Retrieves the [class@CoglPango.Renderer] for the passed @font_map.
|
||||
*
|
||||
* Return value: (transfer none): a #PangoRenderer
|
||||
*/
|
||||
PangoRenderer *
|
||||
cogl_pango_font_map_get_renderer (CoglPangoFontMap *font_map);
|
||||
cogl_pango_font_map_get_renderer (PangoFontMap *font_map);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PangoRenderer, g_object_unref)
|
||||
|
||||
|
@ -248,15 +248,12 @@ static CoglPangoRenderer *
|
||||
cogl_pango_get_renderer_from_context (PangoContext *context)
|
||||
{
|
||||
PangoFontMap *font_map;
|
||||
CoglPangoFontMap *cogl_font_map;
|
||||
PangoRenderer *renderer;
|
||||
|
||||
font_map = pango_context_get_font_map (context);
|
||||
g_return_val_if_fail (COGL_PANGO_IS_FONT_MAP (font_map), NULL);
|
||||
g_return_val_if_fail (PANGO_IS_FONT_MAP (font_map), NULL);
|
||||
|
||||
cogl_font_map = COGL_PANGO_FONT_MAP (font_map);
|
||||
|
||||
renderer = cogl_pango_font_map_get_renderer (cogl_font_map);
|
||||
renderer = cogl_pango_font_map_get_renderer (font_map);
|
||||
|
||||
g_return_val_if_fail (COGL_PANGO_IS_RENDERER (renderer), NULL);
|
||||
|
||||
|
@ -42,16 +42,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* It's too difficult to actually subclass the pango cairo font
|
||||
* map. Instead we just make a fake set of macros that actually just
|
||||
* directly use the original type
|
||||
*/
|
||||
#define COGL_PANGO_TYPE_FONT_MAP PANGO_TYPE_CAIRO_FONT_MAP
|
||||
#define COGL_PANGO_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COGL_PANGO_TYPE_FONT_MAP, CoglPangoFontMap))
|
||||
#define COGL_PANGO_IS_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), COGL_PANGO_TYPE_FONT_MAP))
|
||||
|
||||
typedef PangoCairoFontMap CoglPangoFontMap;
|
||||
|
||||
typedef void (* CoglPangoPipelineSetup) (CoglPipeline *pipeline,
|
||||
gpointer user_data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user