[pango/pango2: 45/301] Make PangoFontsetClass private
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 45/301] Make PangoFontsetClass private
- Date: Wed, 22 Jun 2022 15:53:33 +0000 (UTC)
commit 5846e991f0680313afda48d2fbf7f7421c335e66
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 12 14:52:15 2022 -0500
Make PangoFontsetClass private
pango/pango-context.c | 2 +-
pango/pango-fontset-private.h | 33 +++++++++++++++++++++++++
pango/pango-fontset-simple-private.h | 1 +
pango/pango-fontset.c | 5 ++--
pango/pango-fontset.h | 47 +-----------------------------------
pango/pangofc-fontmap.c | 1 +
6 files changed, 39 insertions(+), 50 deletions(-)
---
diff --git a/pango/pango-context.c b/pango/pango-context.c
index dbe98a349..aae16d880 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -30,7 +30,7 @@
#include "pango-font-private.h"
#include "pango-font-metrics-private.h"
#include "pango-item-private.h"
-#include "pango-fontset.h"
+#include "pango-fontset-private.h"
#include "pango-fontmap-private.h"
#include "pango-script-private.h"
#include "pango-emoji-private.h"
diff --git a/pango/pango-fontset-private.h b/pango/pango-fontset-private.h
new file mode 100644
index 000000000..b43196bcf
--- /dev/null
+++ b/pango/pango-fontset-private.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include "pango-fontset.h"
+
+G_BEGIN_DECLS
+
+#define PANGO_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONTSET,
PangoFontsetClass))
+#define PANGO_IS_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONTSET))
+#define PANGO_FONTSET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONTSET,
PangoFontsetClass))
+
+
+typedef struct _PangoFontsetClass PangoFontsetClass;
+
+struct _PangoFontset
+{
+ GObject parent_instance;
+};
+
+struct _PangoFontsetClass
+{
+ GObjectClass parent_class;
+
+ PangoFont * (*get_font) (PangoFontset *fontset,
+ guint wc);
+
+ PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
+ PangoLanguage * (*get_language) (PangoFontset *fontset);
+ void (*foreach) (PangoFontset *fontset,
+ PangoFontsetForeachFunc func,
+ gpointer data);
+};
+
+G_END_DECLS
diff --git a/pango/pango-fontset-simple-private.h b/pango/pango-fontset-simple-private.h
index 4e9ff826c..7652a4915 100644
--- a/pango/pango-fontset-simple-private.h
+++ b/pango/pango-fontset-simple-private.h
@@ -22,6 +22,7 @@
#ifndef __PANGO_FONTSET_SIMPLE_PRIVATE_H__
#define __PANGO_FONTSET_SIMPLE_PRIVATE_H__
+#include <pango/pango-fontset-private.h>
#include <pango/pango-fontset-simple.h>
G_BEGIN_DECLS
diff --git a/pango/pango-fontset.c b/pango/pango-fontset.c
index 7281d1496..e531692cd 100644
--- a/pango/pango-fontset.c
+++ b/pango/pango-fontset.c
@@ -25,14 +25,13 @@
* PangoFontset
*/
+#include "pango-fontset-private.h"
#include "pango-types.h"
#include "pango-font-metrics-private.h"
-#include "pango-fontset.h"
#include "pango-impl-utils.h"
static PangoFontMetrics *pango_fontset_real_get_metrics (PangoFontset *fontset);
-
G_DEFINE_ABSTRACT_TYPE (PangoFontset, pango_fontset, G_TYPE_OBJECT);
static void
@@ -76,7 +75,7 @@ pango_fontset_get_font (PangoFontset *fontset,
* Return value: a `PangoFontMetrics` object
*/
PangoFontMetrics *
-pango_fontset_get_metrics (PangoFontset *fontset)
+pango_fontset_get_metrics (PangoFontset *fontset)
{
g_return_val_if_fail (PANGO_IS_FONTSET (fontset), NULL);
diff --git a/pango/pango-fontset.h b/pango/pango-fontset.h
index 0a222153e..477fc41d1 100644
--- a/pango/pango-fontset.h
+++ b/pango/pango-fontset.h
@@ -24,6 +24,7 @@
#include <pango/pango-coverage.h>
#include <pango/pango-types.h>
+#include <pango/pango-font-metrics.h>
#include <glib-object.h>
@@ -36,16 +37,12 @@ G_BEGIN_DECLS
#define PANGO_TYPE_FONTSET (pango_fontset_get_type ())
#define PANGO_FONTSET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET,
PangoFontset))
#define PANGO_IS_FONTSET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET))
-#define PANGO_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONTSET,
PangoFontsetClass))
-#define PANGO_IS_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONTSET))
-#define PANGO_FONTSET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONTSET,
PangoFontsetClass))
PANGO_AVAILABLE_IN_ALL
GType pango_fontset_get_type (void) G_GNUC_CONST;
typedef struct _PangoFontset PangoFontset;
-typedef struct _PangoFontsetClass PangoFontsetClass;
/**
* PangoFontsetForeachFunc:
@@ -75,48 +72,6 @@ typedef gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset,
* component font for a particular Unicode character, and for finding a
* composite set of metrics for the entire fontset.
*/
-struct _PangoFontset
-{
- GObject parent_instance;
-};
-
-/**
- * PangoFontsetClass:
- * @parent_class: parent `GObjectClass`
- * @get_font: a function to get the font in the fontset that contains the
- * best glyph for the given Unicode character; see [method@Pango.Fontset.get_font]
- * @get_metrics: a function to get overall metric information for the fonts
- * in the fontset; see [method@Pango.Fontset.get_metrics]
- * @get_language: a function to get the language of the fontset.
- * @foreach: a function to loop over the fonts in the fontset. See
- * [method@Pango.Fontset.foreach]
- *
- * The `PangoFontsetClass` structure holds the virtual functions for
- * a particular `PangoFontset` implementation.
- */
-struct _PangoFontsetClass
-{
- GObjectClass parent_class;
-
- /*< public >*/
-
- PangoFont * (*get_font) (PangoFontset *fontset,
- guint wc);
-
- PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
- PangoLanguage * (*get_language) (PangoFontset *fontset);
- void (*foreach) (PangoFontset *fontset,
- PangoFontsetForeachFunc func,
- gpointer data);
-
- /*< private >*/
-
- /* Padding for future expansion */
- void (*_pango_reserved1) (void);
- void (*_pango_reserved2) (void);
- void (*_pango_reserved3) (void);
- void (*_pango_reserved4) (void);
-};
PANGO_AVAILABLE_IN_ALL
PangoFont * pango_fontset_get_font (PangoFontset *fontset,
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 084ad4d61..f2af7f457 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -42,6 +42,7 @@
#include "pango-font-face-private.h"
#include "pango-font-private.h"
#include "pango-font-family-private.h"
+#include "pango-fontset-private.h"
#include "pangofc-fontmap-private.h"
#include "pangofc-private.h"
#include "pango-impl-utils.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]