[pango/pango2: 49/201] Make PangoFontMapClass private
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 49/201] Make PangoFontMapClass private
- Date: Sat, 11 Jun 2022 02:22:27 +0000 (UTC)
commit 0618400fc9fe21a2522928b3719c9109379e6b59
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 12 13:58:32 2022 -0500
Make PangoFontMapClass private
pango/fonts.c | 2 +-
pango/pango-fontmap-private.h | 38 ++++++++++++++++++++++
pango/pango-fontmap.h | 70 ++---------------------------------------
pango/pangofc-fontmap-private.h | 5 ++-
pango/pangofc-fontmap.h | 2 --
5 files changed, 45 insertions(+), 72 deletions(-)
---
diff --git a/pango/fonts.c b/pango/fonts.c
index 7e85ecef..bb5b3626 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -29,7 +29,7 @@
#include "pango-types.h"
#include "pango-font-private.h"
#include "pango-font-metrics-private.h"
-#include "pango-fontmap.h"
+#include "pango-fontmap-private.h"
#include "pango-impl-utils.h"
diff --git a/pango/pango-fontmap-private.h b/pango/pango-fontmap-private.h
index 8d87f0fa..34e997e3 100644
--- a/pango/pango-fontmap-private.h
+++ b/pango/pango-fontmap-private.h
@@ -28,6 +28,44 @@
G_BEGIN_DECLS
+#define PANGO_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP,
PangoFontMapClass))
+#define PANGO_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP))
+#define PANGO_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP,
PangoFontMapClass))
+
+typedef struct _PangoFontMapClass PangoFontMapClass;
+
+struct _PangoFontMap
+{
+ GObject parent_instance;
+};
+
+struct _PangoFontMapClass
+{
+ GObjectClass parent_class;
+
+ /*< public >*/
+
+ PangoFont * (*load_font) (PangoFontMap *fontmap,
+ PangoContext *context,
+ const PangoFontDescription *desc);
+ void (*list_families) (PangoFontMap *fontmap,
+ PangoFontFamily ***families,
+ int *n_families);
+ PangoFontset *(*load_fontset) (PangoFontMap *fontmap,
+ PangoContext *context,
+ const PangoFontDescription *desc,
+ PangoLanguage *language);
+
+ guint (*get_serial) (PangoFontMap *fontmap);
+ void (*changed) (PangoFontMap *fontmap);
+
+ PangoFontFamily * (*get_family) (PangoFontMap *fontmap,
+ const char *name);
+
+ PangoFontFace * (*get_face) (PangoFontMap *fontmap,
+ PangoFont *font);
+};
+
G_END_DECLS
#endif /* __PANGO_FONTMAP_PRIVATE_H__ */
diff --git a/pango/pango-fontmap.h b/pango/pango-fontmap.h
index 1f42da0f..0c0cb817 100644
--- a/pango/pango-fontmap.h
+++ b/pango/pango-fontmap.h
@@ -29,74 +29,10 @@
G_BEGIN_DECLS
#define PANGO_TYPE_FONT_MAP (pango_font_map_get_type ())
-#define PANGO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_MAP,
PangoFontMap))
-#define PANGO_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_MAP))
-#define PANGO_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP,
PangoFontMapClass))
-#define PANGO_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP))
-#define PANGO_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP,
PangoFontMapClass))
-
-typedef struct _PangoFontMapClass PangoFontMapClass;
-
-/**
- * PangoFontMap:
- *
- * A `PangoFontMap` represents the set of fonts available for a
- * particular rendering system.
- *
- * This is a virtual object with implementations being specific to
- * particular rendering systems.
- */
-struct _PangoFontMap
-{
- GObject parent_instance;
-};
-
-/**
- * PangoFontMapClass:
- * @parent_class: parent `GObjectClass`
- * @load_font: a function to load a font with a given description. See
- * pango_font_map_load_font().
- * @list_families: A function to list available font families. See
- * pango_font_map_list_families().
- * @load_fontset: a function to load a fontset with a given given description
- * suitable for a particular language. See pango_font_map_load_fontset().
- * can handle fonts of this fonts loaded with this fontmap.
- * @get_serial: a function to get the serial number of the fontmap.
- * See pango_font_map_get_serial().
- * @changed: See pango_font_map_changed()
- *
- * The `PangoFontMapClass` structure holds the virtual functions for
- * a particular `PangoFontMap` implementation.
- */
-struct _PangoFontMapClass
-{
- GObjectClass parent_class;
-
- /*< public >*/
-
- PangoFont * (*load_font) (PangoFontMap *fontmap,
- PangoContext *context,
- const PangoFontDescription *desc);
- void (*list_families) (PangoFontMap *fontmap,
- PangoFontFamily ***families,
- int *n_families);
- PangoFontset *(*load_fontset) (PangoFontMap *fontmap,
- PangoContext *context,
- const PangoFontDescription *desc,
- PangoLanguage *language);
-
- guint (*get_serial) (PangoFontMap *fontmap);
- void (*changed) (PangoFontMap *fontmap);
-
- PangoFontFamily * (*get_family) (PangoFontMap *fontmap,
- const char *name);
-
- PangoFontFace * (*get_face) (PangoFontMap *fontmap,
- PangoFont *font);
-};
PANGO_AVAILABLE_IN_ALL
-GType pango_font_map_get_type (void) G_GNUC_CONST;
+PANGO_DECLARE_INTERNAL_TYPE (PangoFontMap, pango_font_map, PANGO, FONT_MAP, GObject)
+
PANGO_AVAILABLE_IN_1_22
PangoContext * pango_font_map_create_context (PangoFontMap *fontmap);
PANGO_AVAILABLE_IN_ALL
@@ -122,8 +58,6 @@ PangoFontFamily *pango_font_map_get_family (PangoFontMap *fontma
const char *name);
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoFontMap, g_object_unref)
-
G_END_DECLS
#endif /* __PANGO_FONTMAP_H__ */
diff --git a/pango/pangofc-fontmap-private.h b/pango/pangofc-fontmap-private.h
index 68daea6c..7d176beb 100644
--- a/pango/pangofc-fontmap-private.h
+++ b/pango/pangofc-fontmap-private.h
@@ -25,13 +25,16 @@
#include <pango/pangofc-fontmap.h>
#include <pango/pangofc-decoder.h>
#include <pango/pangofc-font-private.h>
-#include <pango/pango-fontmap.h>
+#include <pango/pango-fontmap-private.h>
#include <pango/pango-fontset.h>
#include <fontconfig/fontconfig.h>
G_BEGIN_DECLS
+typedef struct _PangoFcFontMapClass PangoFcFontMapClass;
+typedef struct _PangoFcFontMapPrivate PangoFcFontMapPrivate;
+
/**
* PangoFcFontsetKey:
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h
index d66e38cc..8d925b82 100644
--- a/pango/pangofc-fontmap.h
+++ b/pango/pangofc-fontmap.h
@@ -41,8 +41,6 @@ G_BEGIN_DECLS
#define PANGO_FC_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FC_TYPE_FONT_MAP))
typedef struct _PangoFcFontMap PangoFcFontMap;
-typedef struct _PangoFcFontMapClass PangoFcFontMapClass;
-typedef struct _PangoFcFontMapPrivate PangoFcFontMapPrivate;
PANGO_AVAILABLE_IN_ALL
GType pango_fc_font_map_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]