diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-05-28 01:23:41 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-05-28 01:23:41 +0000 |
commit | 2c10e7197f33eb1bf6d8771de13b241263dc041b (patch) | |
tree | e3b713a250de056d23ff2410bdcccb8ee8df623a /pango/pango-font.h | |
parent | 1a23b2c124df6830bc8a8027bd8b38ccc2c75531 (diff) | |
download | pango-2c10e7197f33eb1bf6d8771de13b241263dc041b.tar.gz |
s/pango_font_set_data/g_object_set_qdata/
Sat May 27 21:06:13 2000 Owen Taylor <otaylor@redhat.com>
* modules/thai/thai.c modules/basic/basic:
s/pango_font_set_data/g_object_set_qdata/
* pango/*.c: s/pango_font_[un]ref/g_object_un[ref]
* pango/pango-font.h fonts.c: GObject'ify PangoFont.
Diffstat (limited to 'pango/pango-font.h')
-rw-r--r-- | pango/pango-font.h | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/pango/pango-font.h b/pango/pango-font.h index 62d18e44..eefae335 100644 --- a/pango/pango-font.h +++ b/pango/pango-font.h @@ -29,8 +29,9 @@ extern "C" { #include <pango/pango-coverage.h> #include <pango/pango-types.h> +#include <glib-object.h> + typedef struct _PangoFontDescription PangoFontDescription; -typedef struct _PangoFontClass PangoFontClass; typedef struct _PangoFontMetrics PangoFontMetrics; typedef enum { @@ -92,18 +93,25 @@ char * pango_font_description_to_string (const PangoFontDescrip /* Logical fonts */ + +typedef struct _PangoFontClass PangoFontClass; + +#define PANGO_TYPE_FONT (pango_font_get_type ()) +#define PANGO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT, PangoFont)) +#define PANGO_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT, PangoFontClass)) +#define PANGO_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT)) +#define PANGO_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT)) +#define PANGO_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT, PangoFontClass)) + struct _PangoFont { - PangoFontClass *klass; - - /*< private >*/ - gint ref_count; - GData *data; + GObject parent_instance; }; struct _PangoFontClass { - void (*destroy) (PangoFont *font); + GObjectClass parent_class; + PangoFontDescription *(*describe) (PangoFont *font); PangoCoverage * (*get_coverage) (PangoFont *font, const char *lang); @@ -119,16 +127,7 @@ struct _PangoFontClass PangoFontMetrics *metrics); }; -void pango_font_init (PangoFont *font); -void pango_font_ref (PangoFont *font); -void pango_font_unref (PangoFont *font); -gpointer pango_font_get_data (PangoFont *font, - const gchar *key); -void pango_font_set_data (PangoFont *font, - const gchar *key, - gpointer data, - GDestroyNotify destroy_func); - +GType pango_font_get_type (void); PangoFontDescription *pango_font_describe (PangoFont *font); PangoCoverage * pango_font_get_coverage (PangoFont *font, @@ -144,10 +143,6 @@ void pango_font_get_glyph_extents (PangoFont *font, PangoRectangle *ink_rect, PangoRectangle *logical_rect); -/* - * Font Map - */ - #ifdef __cplusplus } #endif /* __cplusplus */ |