pango r2798 - in trunk: . pango
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2798 - in trunk: . pango
- Date: Tue, 20 Jan 2009 22:38:14 +0000 (UTC)
Author: johan
Date: Tue Jan 20 22:38:14 2009
New Revision: 2798
URL: http://svn.gnome.org/viewvc/pango?rev=2798&view=rev
Log:
2009-01-20 Johan Dahlin <jdahlin async com br>
Bug 567934 â Add introspection support inside pango
* configure.in:
* pango/Makefile.am:
* pango/pango-attributes.c:
* pango/pango-layout.c:
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/pango/ (props changed)
trunk/pango/Makefile.am
trunk/pango/pango-attributes.c
trunk/pango/pango-layout.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Tue Jan 20 22:38:14 2009
@@ -44,7 +44,9 @@
AC_CONFIG_SRCDIR([ChangeLog])
-AM_INIT_AUTOMAKE(1.9 gnits dist-bzip2 no-dist-gzip)
+dnl -Wno-portability tells automake to stop complaining about the
+dnl usage of GNU Make specific features.
+AM_INIT_AUTOMAKE(1.9 gnits dist-bzip2 no-dist-gzip -Wno-portability)
AM_CONFIG_HEADER([config.h])
@@ -463,6 +465,31 @@
PKG_CHECK_MODULES(LIBTHAI, libthai >= $LIBTHAI_REQUIRED_VERSION, have_libthai=true, AC_MSG_RESULT([no]))
#
+# Checks for GObject Introspection
+#
+have_introspection=false
+PKG_CHECK_MODULES(INTROSPECTION, gobject-introspection-1.0 >= 0.6.2, have_introspection=true, have_introspection=false)
+AM_CONDITIONAL(HAVE_INTROSPECTION, $have_introspection)
+
+G_IR_SCANNER=
+G_IR_COMPILER=
+G_IR_GENERATE=
+GIRDIR=
+TYPELIBDIR=
+if test $have_introspection; then
+ G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+ G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+ G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+ GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+fi
+AC_SUBST(G_IR_SCANNER)
+AC_SUBST(G_IR_COMPILER)
+AC_SUBST(G_IR_GENERATE)
+AC_SUBST(GIRDIR)
+AC_SUBST(TYPELIBDIR)
+
+#
# Modules to build
#
arabic_modules="arabic-fc,arabic-lang"
Modified: trunk/pango/Makefile.am
==============================================================================
--- trunk/pango/Makefile.am (original)
+++ trunk/pango/Makefile.am Tue Jan 20 22:38:14 2009
@@ -8,6 +8,9 @@
OPENTYPE_SUBDIR=opentype
endif
+EXTRA_DIST =
+BUILT_GIRSOURCES =
+
FRIBIDI_SUBDIR=mini-fribidi
SUBDIRS = $(OPENTYPE_SUBDIR) $(FRIBIDI_SUBDIR)
@@ -40,6 +43,7 @@
# ------------------- libpango -------------------
lib_LTLIBRARIES = libpango-1.0.la
+BUILT_GIRSOURCES += Pango-1.0.gir
libpango_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpango_1_0_la_LIBADD = \
@@ -155,15 +159,39 @@
pango-features.h:
cd $(top_builddir) && ./config.status pango/pango-features.h
+Pango-1.0.gir: $(libpango_1_0_la_SOURCES)
+Pango-1.0.gir: $(pango_headers)
+Pango-1.0.gir: libpango-1.0.la
+Pango-1.0.gir: $(G_IR_SCANNER)
+ $(G_IR_SCANNER) -v --namespace Pango --nsversion=1.0 \
+ --add-include-path=$(srcdir) --add-include-path=. \
+ --include=GObject-2.0 \
+ --include=cairo-1.0 \
+ --library=pango-1.0 \
+ --libtool="$(LIBTOOL)" \
+ --output $@ \
+ --pkg gobject-2.0 \
+ --pkg cairo \
+ --pkg freetype2 \
+ -I$(top_srcdir) \
+ $(PANGO_CFLAGS) \
+ $(libpango_1_0_la_SOURCES) \
+ $(pango_headers) \
+ pango-enum-types.h
+
# ------------------- libpangox -------------------
if HAVE_X
-pangoinclude_HEADERS += pangox.h
+pangoinclude_HEADERS += $(pangox_headers)
lib_LTLIBRARIES += libpangox-1.0.la
aliasdir = $(sysconfdir)/pango
alias_DATA = pangox.aliases
+BUILT_GIRSOURCES += PangoX-1.0.gir
endif
+pangox_headers = pangox.h
+pangox_public_sources = pangox.c
+
libpangox_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangox_1_0_la_LIBADD = \
libpango-$(PANGO_API_VERSION).la \
@@ -174,23 +202,54 @@
libpangox_1_0_la_DEPENDENCIES = \
libpango-$(PANGO_API_VERSION).la \
$(INCLUDED_X_MODULES)
-libpangox_1_0_la_SOURCES = \
- modules.h \
- module-defs-x.c \
- pangox.c \
- pangox-private.h \
- pangox-fontcache.c \
+libpangox_1_0_la_SOURCES = \
+ $(pangox_public_sources) \
+ modules.h \
+ module-defs-x.c \
+ pangox-private.h \
+ pangox-fontcache.c \
pangox-fontmap.c
+PangoX-1.0.gir: $(libpangox_1_0_la_SOURCES)
+PangoX-1.0.gir: $(pangox_headers)
+PangoX-1.0.gir: libpangox-1.0.la
+PangoX-1.0.gir: Pango-1.0.gir $(G_IR_SCANNER)
+ $(G_IR_SCANNER) -v --namespace PangoX --nsversion=1.0 \
+ --add-include-path=$(srcdir) --add-include-path=. \
+ --include=GObject-2.0 \
+ --include=xlib-2.0 \
+ --include=Pango-1.0 \
+ --library=pangox-1.0 \
+ --libtool="$(LIBTOOL)" \
+ --output $@ \
+ --pkg gobject-2.0 \
+ --pkg freetype2 \
+ --pkg pangox \
+ -I$(top_srcdir) \
+ $(pangox_public_sources) \
+ $(pangox_headers)
# ------------------- libpangoft2 -------------------
if HAVE_FREETYPE
-pangoinclude_HEADERS += pangofc-font.h pangofc-fontmap.h
-pangoinclude_HEADERS += pangoft2.h pango-ot.h pangofc-decoder.h
+pangoinclude_HEADERS += $(pangoft2_headers)
lib_LTLIBRARIES += libpangoft2-1.0.la
+BUILT_GIRSOURCES += PangoFT2-1.0.gir
endif
+pangoft2_headers = \
+ pango-ot.h \
+ pangofc-font.h \
+ pangofc-fontmap.h \
+ pangofc-decoder.h \
+ pangoft2.h
+
+pangoft2_public_sources = \
+ pangofc-font.c \
+ pangofc-fontmap.c \
+ pangofc-decoder.c \
+ pangoft2.c
+
libpangoft2_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangoft2_1_0_la_LIBADD = \
opentype/libharfbuzz-1.la \
@@ -204,14 +263,11 @@
libpango-$(PANGO_API_VERSION).la \
$(INCLUDED_FC_MODULES)
libpangoft2_1_0_la_SOURCES = \
+ $(pangoft2_public_sources) \
modules.h \
module-defs-fc.c \
- pangofc-font.c \
- pangofc-fontmap.c \
- pangofc-decoder.c \
pangofc-private.h \
pangoft2.h \
- pangoft2.c \
pangoft2-private.h \
pangoft2-fontmap.c \
pangoft2-render.c \
@@ -229,14 +285,36 @@
pangoft2-win32-res.o: pangoft2.rc
$(WINDRES) $< $@
+PangoFT2-1.0.gir: $(pangoft2_headers)
+PangoFT2-1.0.gir: $(libpangoft2_1_0_la_SOURCES)
+PangoFT2-1.0.gir: libpangoft2-1.0.la
+PangoFT2-1.0.gir: Pango-1.0.gir $(G_IR_SCANNER)
+ $(G_IR_SCANNER) -v --namespace PangoFT2 --nsversion=1.0 \
+ --add-include-path=$(srcdir) --add-include-path=. \
+ --include=GObject-2.0 \
+ --include=Pango-1.0 \
+ --include=freetype2-2.0 \
+ --include=fontconfig-2.0 \
+ --library=pangoft2-1.0 \
+ --libtool="$(LIBTOOL)" \
+ --output $@ \
+ --pkg gobject-2.0 \
+ --pkg freetype2 \
+ --pkg pangoft2 \
+ -I$(top_srcdir) \
+ $(pangoft2_headers) \
+ $(pangoft2_public_sources)
# ------------------- libpangoxft -------------------
if HAVE_XFT
-pangoinclude_HEADERS += pangoxft.h pangoxft-render.h pango-ot.h
+pangoinclude_HEADERS += $(pangoxft_headers)
lib_LTLIBRARIES += libpangoxft-1.0.la
+BUILT_GIRSOURCES += PangoXft-1.0.gir
endif
+pangoxft_headers = pangoxft.h pangoxft-render.h pango-ot.h
+
libpangoxft_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangoxft_1_0_la_LIBADD = \
libpangoft2-$(PANGO_API_VERSION).la \
@@ -256,13 +334,36 @@
pangoxft-render.c
+PangoXft-1.0.gir: $(pangoxft_headers)
+PangoXft-1.0.gir: $(libpangoxft_1_0_la_SOURCES)
+PangoXft-1.0.gir: libpangoxft-1.0.la
+PangoXft-1.0.gir: Pango-1.0.gir PangoFT2-1.0.gir $(G_IR_SCANNER)
+ $(G_IR_SCANNER) -v --namespace PangoXft --nsversion=1.0 \
+ --add-include-path=$(srcdir) --add-include-path=. \
+ --include=GObject-2.0 \
+ --include=xft-2.0 \
+ --include=xlib-2.0 \
+ --include=PangoFT2-1.0 \
+ --library=pangoxft-1.0 \
+ --libtool="$(LIBTOOL)" \
+ --output $@ \
+ --pkg gobject-2.0 \
+ --pkg freetype2 \
+ -I$(top_srcdir) \
+ $(PANGO_CFLAGS) \
+ $(pangoxft_headers) \
+ $(libpangoxft_1_0_la_SOURCES)
+
# ------------------- libpangocairo -------------------
if HAVE_CAIRO
-pangoinclude_HEADERS += pangocairo.h
+pangoinclude_HEADERS += $(pangocairo_headers)
lib_LTLIBRARIES += libpangocairo-1.0.la
+BUILT_GIRSOURCES += PangoCairo-1.0.gir
endif
+pangocairo_headers = pangocairo.h
+
libpangocairo_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangocairo_1_0_la_LIBADD = \
libpango-$(PANGO_API_VERSION).la \
@@ -319,6 +420,25 @@
libpangocairo_1_0_la_LIBADD += $(INCLUDED_ATSUI_MODULES)
endif
+PangoCairo-1.0.gir: $(libpangocairo_1_0_la_SOURCES)
+PangoCairo-1.0.gir: $(pangocairo_headers)
+PangoCairo-1.0.gir: libpangocairo-1.0.la
+PangoCairo-1.0.gir: Pango-1.0.gir $(G_IR_SCANNER)
+ $(G_IR_SCANNER) -v --namespace PangoCairo --nsversion=1.0 \
+ --add-include-path=$(srcdir) --add-include-path=. \
+ --include=GObject-2.0 \
+ --include=cairo-1.0 \
+ --include=Pango-1.0 \
+ --library=pangocairo-1.0 \
+ --libtool="$(LIBTOOL)" \
+ --output $@ \
+ --pkg gobject-2.0 \
+ --pkg cairo \
+ -I$(top_srcdir) \
+ $(PANGO_CFLAGS) \
+ $(libpangocairo_1_0_la_SOURCES) \
+ $(pangocairo_headers)
+
# ------------------- libpangowin32 -------------------
if HAVE_WIN32
@@ -416,6 +536,23 @@
lib -machine:$(LIB_EXE_MACHINE_FLAG) -name:libpangocairo-$(PANGO_API_VERSION)-$(PANGO_CURRENT_MINUS_AGE).dll -def:$(srcdir)/pangocairo.def -out:$@
+# ------------------- introspection -------------------
+
+if HAVE_INTROSPECTION
+
+girdir = $(GIRDIR)
+dist_gir_DATA = $(BUILT_GIRSOURCES)
+
+EXTRA_DIST += $(BUILT_GIRSOURCES)
+
+typelibsdir = $(TYPELIBDIR)
+typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+
+%.typelib: %.gir $(G_IR_COMPILER)
+ LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) --includedir=$(srcdir) --includedir=. $(G_IR_COMPILER_OPTS) $< -o $(builddir)/$(@F)
+
+endif # HAVE_INTROSPECTION
+
# ------------------- pango-querymodules -------------------
bin_PROGRAMS = pango-querymodules
@@ -441,7 +578,7 @@
endif
pango_querymodules_LDADD += libpango-$(PANGO_API_VERSION).la $(GLIB_LIBS)
-EXTRA_DIST = \
+EXTRA_DIST += \
pango-enum-types.h \
module-defs.h \
module-defs-fc.c.win32 \
Modified: trunk/pango/pango-attributes.c
==============================================================================
--- trunk/pango/pango-attributes.c (original)
+++ trunk/pango/pango-attributes.c Tue Jan 20 22:38:14 2009
@@ -1793,7 +1793,8 @@
* <literal>pango_font_description_set_family (desc, pango_font_description_get_family (desc))</literal>.
* @language: if non-%NULL, location to store language tag for item, or %NULL
* if none is found.
- * @extra_attrs: if non-%NULL, location in which to store a list of non-font
+ * @extra_attrs: (element type Pango.Attribute): (transfer full): if non-%NULL,
+ * location in which to store a list of non-font
* attributes at the the current position; only the highest priority
* value of each attribute will be added to this list. In order
* to free this value, you must call pango_attribute_destroy() on
@@ -2013,7 +2014,8 @@
* Gets a list of all attributes at the current position of the
* iterator.
*
- * Return value: a list of all attributes for the current range.
+ * Return value: (element-type Pango.Attribute): (transfer full): a list of
+ * all attributes for the current range.
* To free this value, call pango_attribute_destroy() on
* each value and g_slist_free() on the list.
*
Modified: trunk/pango/pango-layout.c
==============================================================================
--- trunk/pango/pango-layout.c (original)
+++ trunk/pango/pango-layout.c Tue Jan 20 22:38:14 2009
@@ -1315,9 +1315,9 @@
* Use the faster pango_layout_get_lines_readonly() if you do not plan
* to modify the contents of the lines (glyphs, glyph widths, etc.).
*
- * Return value: a #GSList containing the lines in the layout. This
- * points to internal data of the #PangoLayout and must be used with
- * care. It will become invalid on any change to the layout's
+ * Return value: (element-type Pango.LayoutLine): (transfer none): a #GSList containing
+ * the lines in the layout. This points to internal data of the #PangoLayout
+ * and must be used with care. It will become invalid on any change to the layout's
* text or properties.
**/
GSList *
@@ -1350,9 +1350,9 @@
* but the user is not expected
* to modify the contents of the lines (glyphs, glyph widths, etc.).
*
- * Return value: a #GSList containing the lines in the layout. This
- * points to internal data of the #PangoLayout and must be used with
- * care. It will become invalid on any change to the layout's
+ * Return value: (element-type Pango.LayoutLine): (transfer none): a #GSList containing
+ * the lines in the layout. This points to internal data of the #PangoLayout and
+ * must be used with care. It will become invalid on any change to the layout's
* text or properties. No changes should be made to the lines.
*
* Since: 1.16
@@ -4188,7 +4188,8 @@
* the last range will extend all the way to the trailing
* edge of the layout. Otherwise, it will end at the
* trailing edge of the last character.
- * @ranges: location to store a pointer to an array of ranges.
+ * @ranges: (out): (array length=n_ranges): (transfer=full):
+ * location to store a pointer to an array of ranges.
* The array will be of length <literal>2*n_ranges</literal>,
* with each range starting at <literal>(*ranges)[2*n]</literal>
* and of width <literal>(*ranges)[2*n + 1] - (*ranges)[2*n]</literal>.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]