Bug #539622.
#
# Checks for GLib
#
-GLIB_REQUIRED_VERSION=2.17.3
+GLIB_REQUIRED_VERSION=2.26.0
GLIB_MODULES="glib-2.0 >= $GLIB_REQUIRED_VERSION gobject-2.0 gmodule-no-export-2.0"
PKG_CHECK_MODULES(GLIB, $GLIB_MODULES, :,
int size;
};
-GType
-pango_font_description_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoFontDescription"),
- (GBoxedCopyFunc)pango_font_description_copy,
- (GBoxedFreeFunc)pango_font_description_free);
-
- return our_type;
-}
-
+G_DEFINE_BOXED_TYPE (PangoFontDescription, pango_font_description,
+ pango_font_description_copy,
+ pango_font_description_free);
static const PangoFontDescription pfd_defaults = {
NULL, /* family_name */
return NULL;
}
-GType
-pango_font_metrics_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoFontMetrics"),
- (GBoxedCopyFunc)pango_font_metrics_ref,
- (GBoxedFreeFunc)pango_font_metrics_unref);
-
- return our_type;
-}
-
+G_DEFINE_BOXED_TYPE (PangoFontMetrics, pango_font_metrics,
+ pango_font_metrics_ref,
+ pango_font_metrics_unref);
/**
* pango_font_metrics_new:
string->num_glyphs = new_len;
}
-GType
-pango_glyph_string_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoGlyphString"),
- (GBoxedCopyFunc)pango_glyph_string_copy,
- (GBoxedFreeFunc)pango_glyph_string_free);
-
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoGlyphString, pango_glyph_string,
+ pango_glyph_string_copy,
+ pango_glyph_string_free);
/**
* pango_glyph_string_copy:
* Attribute List
*/
-GType
-pango_attr_list_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoAttrList"),
- (GBoxedCopyFunc) pango_attr_list_copy,
- (GBoxedFreeFunc) pango_attr_list_unref);
-
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoAttrList, pango_attr_list,
+ pango_attr_list_copy,
+ pango_attr_list_unref);
/**
* pango_attr_list_new:
#include "pango-attributes.h"
#include "pango-impl-utils.h"
-GType
-pango_color_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoColor"),
- (GBoxedCopyFunc) pango_color_copy,
- (GBoxedFreeFunc) pango_color_free);
-
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoColor, pango_color,
+ pango_color_copy,
+ pango_color_free);
/**
* pango_color_copy:
g_slice_free (PangoGlyphItem, glyph_item);
}
-GType
-pango_glyph_item_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoGlyphItem"),
- (GBoxedCopyFunc) pango_glyph_item_copy,
- (GBoxedFreeFunc) pango_glyph_item_free);
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoGlyphItem, pango_glyph_item,
+ pango_glyph_item_copy,
+ pango_glyph_item_free);
/**
g_slice_free (PangoGlyphItemIter, iter);
}
-GType
-pango_glyph_item_iter_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoGlyphItemIter"),
- (GBoxedCopyFunc) pango_glyph_item_iter_copy,
- (GBoxedFreeFunc) pango_glyph_item_iter_free);
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoGlyphItemIter, pango_glyph_item_iter,
+ pango_glyph_item_iter_copy,
+ pango_glyph_item_iter_free)
/**
* pango_glyph_item_iter_next_cluster:
g_slice_free (PangoItem, item);
}
-GType
-pango_item_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoItem"),
- (GBoxedCopyFunc) pango_item_copy,
- (GBoxedFreeFunc) pango_item_free);
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoItem, pango_item,
+ pango_item_copy,
+ pango_item_free);
/**
* pango_item_split:
return; /* nothing */
}
-GType
-pango_language_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoLanguage"),
- (GBoxedCopyFunc)pango_language_copy,
- (GBoxedFreeFunc)pango_language_free);
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoLanguage, pango_language,
+ pango_language_copy,
+ pango_language_free);
/**
* _pango_get_lc_ctype:
}
}
-GType
-pango_layout_line_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoLayoutLine"),
- (GBoxedCopyFunc) pango_layout_line_ref,
- (GBoxedFreeFunc) pango_layout_line_unref);
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoLayoutLine, pango_layout_line,
+ pango_layout_line_ref,
+ pango_layout_line_unref);
/**
* pango_layout_line_x_to_index:
return new;
}
-GType
-pango_layout_iter_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoLayoutIter"),
- (GBoxedCopyFunc) pango_layout_iter_copy,
- (GBoxedFreeFunc) pango_layout_iter_free);
-
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoLayoutIter, pango_layout_iter,
+ pango_layout_iter_copy,
+ pango_layout_iter_free);
/**
* pango_layout_get_iter:
#include "pango-matrix.h"
#include "pango-impl-utils.h"
-GType
-pango_matrix_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoMatrix"),
- (GBoxedCopyFunc) pango_matrix_copy,
- (GBoxedFreeFunc) pango_matrix_free);
-
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoMatrix, pango_matrix,
+ pango_matrix_copy,
+ pango_matrix_free);
/**
* pango_matrix_copy:
return array;
}
-GType
-pango_tab_array_get_type (void)
-{
- static GType our_type = 0;
-
- if (G_UNLIKELY (our_type == 0))
- our_type = g_boxed_type_register_static (I_("PangoTabArray"),
- (GBoxedCopyFunc)pango_tab_array_copy,
- (GBoxedFreeFunc)pango_tab_array_free);
- return our_type;
-}
+G_DEFINE_BOXED_TYPE (PangoTabArray, pango_tab_array,
+ pango_tab_array_copy,
+ pango_tab_array_free);
/**
* pango_tab_array_copy: