summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-08-02 12:08:02 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-08-02 12:08:02 +0000
commitff4aa9fb0b4e0954a4b01a59be8503bcfc7f7b7e (patch)
treec9f7b295767ff58cf3bd364c4cf7211dca5ae078
parenta7c89dd1eb4c3cf6ebedce193693fceadcdf5995 (diff)
parenta380dd40b6a014beef79ea4676e96853ec6a4a8a (diff)
downloadpango-ff4aa9fb0b4e0954a4b01a59be8503bcfc7f7b7e.tar.gz
Merge branch 'introspection-fixes' into 'master'
Various introspection fixes See merge request GNOME/pango!117
-rw-r--r--pango/break.c4
-rw-r--r--pango/fonts.c2
-rw-r--r--pango/modules.c14
-rw-r--r--pango/pango-attributes.c7
-rw-r--r--pango/pango-attributes.h3
-rw-r--r--pango/pango-break.h4
-rw-r--r--pango/pango-coverage-private.h4
-rw-r--r--pango/pango-coverage.c6
-rw-r--r--pango/pango-coverage.h5
-rw-r--r--pango/pango-engine.h7
-rw-r--r--pango/pango-script.c13
-rw-r--r--pango/pango-script.h5
12 files changed, 52 insertions, 22 deletions
diff --git a/pango/break.c b/pango/break.c
index 14986c78..9fa1c47b 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1745,9 +1745,9 @@ pango_find_paragraph_boundary (const gchar *text,
* @analysis: #PangoAnalysis structure from pango_itemize() for @text
* @offset: Byte offset of @text from the beginning of the
* paragraph, or -1 to ignore attributes from @analysis
- * @log_attrs: (array length=attrs_len): array with one #PangoLogAttr
+ * @log_attrs: (array length=log_attrs_len): array with one #PangoLogAttr
* per character in @text, plus one extra, to be filled in
- * @attrs_len: length of @log_attrs array
+ * @log_attrs_len: length of @log_attrs array
*
* Apply language-specific tailoring to the breaks in
* @log_attrs, which are assumed to have been produced
diff --git a/pango/fonts.c b/pango/fonts.c
index 2cfab161..2abe504e 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1851,7 +1851,7 @@ pango_font_get_font_map (PangoFont *font)
}
/**
- * pango_font_get_hb_font:
+ * pango_font_get_hb_font: (skip)
* @font: a #PangoFont
*
* Get a hb_font_t object backing this font.
diff --git a/pango/modules.c b/pango/modules.c
index 25481bbd..54f9db8f 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -37,14 +37,14 @@
#include "pango-modules.h"
/**
- * pango_find_map:
+ * pango_find_map: (skip)
* @language: the language tag for which to find the map
* @engine_type_id: the engine type for the map to find
* @render_type_id: the render type for the map to find
*
* Do not use. Does not do anything.
*
- * Return value: %NULL.
+ * Return value: (transfer none) (nullable): %NULL.
*
* Deprecated: 1.38
**/
@@ -63,7 +63,7 @@ pango_find_map (PangoLanguage *language G_GNUC_UNUSED,
*
* Do not use. Does not do anything.
*
- * Return value: %NULL.
+ * Return value: (transfer none) (nullable): %NULL.
*
* Deprecated: 1.38
**/
@@ -78,10 +78,10 @@ pango_map_get_engine (PangoMap *map G_GNUC_UNUSED,
* pango_map_get_engines: (skip)
* @map: a #PangoMap
* @script: a #PangoScript
- * @exact_engines: location to store list of engines that exactly
- * handle this script.
- * @fallback_engines: location to store list of engines that approximately
+ * @exact_engines: (nullable): location to store list of engines that exactly
* handle this script.
+ * @fallback_engines: (nullable): location to store list of engines that
+ * approximately handle this script.
*
* Do not use. Does not do anything.
*
@@ -101,7 +101,7 @@ pango_map_get_engines (PangoMap *map G_GNUC_UNUSED,
}
/**
- * pango_module_register:
+ * pango_module_register: (skip)
* @module: a #PangoIncludedModule
*
* Do not use. Does not do anything.
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 9acd6cf8..2f02e264 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1208,7 +1208,7 @@ pango_attr_allow_breaks_new (gboolean allow_breaks)
/**
* pango_attr_show_new:
- * @show: #PangoShowFlags to apply
+ * @flags: #PangoShowFlags to apply
*
* Create a new attribute that influences how invisible
* characters are rendered.
@@ -1835,6 +1835,11 @@ pango_attr_list_get_attributes (PangoAttrList *list)
return g_slist_copy_deep (list->attributes, (GCopyFunc)pango_attribute_copy, NULL);
}
+G_DEFINE_BOXED_TYPE (PangoAttrIterator,
+ pango_attr_iterator,
+ pango_attr_iterator_copy,
+ pango_attr_iterator_destroy)
+
/**
* pango_attr_list_get_iterator:
* @list: a #PangoAttrList
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index d46ce6f0..b9ab6459 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -588,6 +588,9 @@ PangoAttrList *pango_attr_list_filter (PangoAttrList *list,
PANGO_AVAILABLE_IN_1_44
GSList *pango_attr_list_get_attributes (PangoAttrList *list);
+PANGO_AVAILABLE_IN_1_44
+GType pango_attr_iterator_get_type (void) G_GNUC_CONST;
+
PANGO_AVAILABLE_IN_ALL
PangoAttrIterator *pango_attr_list_get_iterator (PangoAttrList *list);
diff --git a/pango/pango-break.h b/pango/pango-break.h
index 19698db1..9209ee15 100644
--- a/pango/pango-break.h
+++ b/pango/pango-break.h
@@ -138,8 +138,8 @@ void pango_tailor_break (const char *text,
int length,
PangoAnalysis *analysis,
int offset,
- PangoLogAttr *attrs,
- int attrs_len);
+ PangoLogAttr *log_attrs,
+ int log_attrs_len);
G_END_DECLS
diff --git a/pango/pango-coverage-private.h b/pango/pango-coverage-private.h
index 806a012b..af86ab00 100644
--- a/pango/pango-coverage-private.h
+++ b/pango/pango-coverage-private.h
@@ -56,10 +56,6 @@ struct _PangoCoverageClass
PangoCoverage * (* copy) (PangoCoverage *coverage);
};
-PANGO_AVAILABLE_IN_ALL
-GType pango_coverage_get_type (void) G_GNUC_CONST;
-
-
G_END_DECLS
#endif /* __PANGO_COVERAGE_PRIVATE_H__ */
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index e982bd3b..5358e4e7 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -149,11 +149,11 @@ pango_coverage_copy (PangoCoverage *coverage)
/**
* pango_coverage_ref:
- * @coverage: a #PangoCoverage
+ * @coverage: (not nullable): a #PangoCoverage
*
* Increase the reference count on the #PangoCoverage by one
*
- * Return value: @coverage
+ * Return value: (transfer full): @coverage
**/
PangoCoverage *
pango_coverage_ref (PangoCoverage *coverage)
@@ -163,7 +163,7 @@ pango_coverage_ref (PangoCoverage *coverage)
/**
* pango_coverage_unref:
- * @coverage: a #PangoCoverage
+ * @coverage: (transfer full) (not nullable): a #PangoCoverage
*
* Decrease the reference count on the #PangoCoverage by one.
* If the result is zero, free the coverage and all associated memory.
diff --git a/pango/pango-coverage.h b/pango/pango-coverage.h
index 9189af24..7467dbda 100644
--- a/pango/pango-coverage.h
+++ b/pango/pango-coverage.h
@@ -22,7 +22,7 @@
#ifndef __PANGO_COVERAGE_H__
#define __PANGO_COVERAGE_H__
-#include <glib.h>
+#include <glib-object.h>
#include <pango/pango-version-macros.h>
#include <hb.h>
@@ -63,6 +63,9 @@ typedef enum {
} PangoCoverageLevel;
PANGO_AVAILABLE_IN_ALL
+GType pango_coverage_get_type (void) G_GNUC_CONST;
+
+PANGO_AVAILABLE_IN_ALL
PangoCoverage * pango_coverage_new (void);
PANGO_AVAILABLE_IN_ALL
PangoCoverage * pango_coverage_ref (PangoCoverage *coverage);
diff --git a/pango/pango-engine.h b/pango/pango-engine.h
index f15747c6..25cfd6ba 100644
--- a/pango/pango-engine.h
+++ b/pango/pango-engine.h
@@ -287,6 +287,11 @@ struct _PangoEngineInfo
gint n_scripts;
};
+/* We should to ignore these unprefixed symbols when going through
+ * this header with the introspection scanner
+ */
+#ifndef __GI_SCANNER__
+
/**
* script_engine_list: (skip)
* @engines: location to store a pointer to an array of engines.
@@ -446,6 +451,8 @@ prefix ## _register_type (GTypeModule *module) \
#endif /* PANGO_DISABLE_DEPRECATED */
+#endif /* __GI_SCANNER__ */
+
G_END_DECLS
#endif /* __PANGO_ENGINE_H__ */
diff --git a/pango/pango-script.c b/pango/pango-script.c
index f7854239..fc95309f 100644
--- a/pango/pango-script.c
+++ b/pango/pango-script.c
@@ -96,6 +96,13 @@ pango_script_for_unichar (gunichar ch)
/**********************************************************************/
+static PangoScriptIter *pango_script_iter_copy (PangoScriptIter *iter);
+
+G_DEFINE_BOXED_TYPE (PangoScriptIter,
+ pango_script_iter,
+ pango_script_iter_copy,
+ pango_script_iter_free)
+
PangoScriptIter *
_pango_script_iter_init (PangoScriptIter *iter,
const char *text,
@@ -142,6 +149,12 @@ pango_script_iter_new (const char *text,
return _pango_script_iter_init (g_slice_new (PangoScriptIter), text, length);
}
+static PangoScriptIter *
+pango_script_iter_copy (PangoScriptIter *iter)
+{
+ return g_slice_dup (PangoScriptIter, iter);
+}
+
void
_pango_script_iter_fini (PangoScriptIter *iter)
{
diff --git a/pango/pango-script.h b/pango/pango-script.h
index a5c2b497..a7ec3246 100644
--- a/pango/pango-script.h
+++ b/pango/pango-script.h
@@ -22,7 +22,7 @@
#ifndef __PANGO_SCRIPT_H__
#define __PANGO_SCRIPT_H__
-#include <glib.h>
+#include <glib-object.h>
G_BEGIN_DECLS
@@ -309,6 +309,9 @@ typedef enum { /* ISO 15924 code */
PANGO_DEPRECATED_IN_1_44_FOR(g_unichar_get_script)
PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CONST;
+PANGO_AVAILABLE_IN_1_44
+GType pango_script_iter_get_type (void) G_GNUC_CONST;
+
PANGO_AVAILABLE_IN_1_4
PangoScriptIter *pango_script_iter_new (const char *text,
int length);