Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nteodosio/pango
  • gnome-team/pango
2 results
Show changes
Commits on Source (10)
Showing
with 172 additions and 101 deletions
Overview of changes in 1.50.9, 16-09-2022
=========================================
- Avoid some unnecessary strdups
- Fix line height computations with a non-trivial CTM
Overview of changes in 1.50.9, 09-08-2022
=========================================
- Apply show flags to line separators
......
project('pango', 'c', 'cpp',
version: '1.50.9',
version: '1.50.10',
license: 'LGPLv2.1+',
default_options: [
'buildtype=debugoptimized',
......@@ -623,7 +623,7 @@ summary('Linker', cc.get_linker_id(), section: 'Toolchain')
summary('Debugging', get_option('debug'), section: 'Build')
summary('Optimization', get_option('optimization'), section: 'Build')
summary('Introspection', get_option('introspection').enabled(), section: 'Build')
summary('Introspection', gir.found(), section: 'Build')
summary('Documentation', get_option('gtk_doc'), section: 'Build')
summary('Install tests', get_option('install-tests'), section: 'Build')
......
......@@ -1296,17 +1296,10 @@ variant_supported (PangoItem *item,
static PangoVariant
get_font_variant (PangoItem *item)
{
PangoFontDescription *desc;
PangoVariant variant = PANGO_VARIANT_NORMAL;
if (item->analysis.font)
{
desc = pango_font_describe (item->analysis.font);
variant = pango_font_description_get_variant (desc);
pango_font_description_free (desc);
}
return pango_font_get_variant (item->analysis.font);
return variant;
return PANGO_VARIANT_NORMAL;
}
static PangoTextTransform
......
......@@ -48,6 +48,7 @@ typedef struct {
void (* get_matrix) (PangoFont *font,
PangoMatrix *matrix);
int (* get_absolute_size) (PangoFont *font);
PangoVariant (* get_variant) (PangoFont *font);
} PangoFontClassPrivate;
gboolean pango_font_is_hinted (PangoFont *font);
......@@ -56,6 +57,7 @@ void pango_font_get_scale_factors (PangoFont *font,
double *y_scale);
void pango_font_get_matrix (PangoFont *font,
PangoMatrix *matrix);
static inline int pango_font_get_absolute_size (PangoFont *font)
{
GTypeClass *klass = (GTypeClass *) PANGO_FONT_GET_CLASS (font);
......@@ -63,6 +65,26 @@ static inline int pango_font_get_absolute_size (PangoFont *font)
return priv->get_absolute_size (font);
}
static inline PangoVariant
pango_font_get_variant (PangoFont *font)
{
GTypeClass *klass = (GTypeClass *) PANGO_FONT_GET_CLASS (font);
PangoFontClassPrivate *priv = g_type_class_get_private (klass, PANGO_TYPE_FONT);
if (priv->get_variant)
return priv->get_variant (font);
else
{
PangoFontDescription *desc;
PangoVariant variant;
desc = pango_font_describe (font);
variant = pango_font_description_get_variant (desc);
pango_font_description_free (desc);
return variant;
}
}
G_END_DECLS
#endif /* __PANGO_FONT_PRIVATE_H__ */
......@@ -5695,21 +5695,26 @@ pango_layout_run_get_extents_and_height (PangoLayoutRun *run,
if (pango_analysis_get_size_font (&run->item->analysis))
{
PangoFontMetrics *height_metrics;
double xscale, yscale;
height_metrics = pango_font_get_metrics (pango_analysis_get_size_font (&run->item->analysis),
run->item->analysis.language);
*height = pango_font_metrics_get_height (height_metrics);
pango_font_get_scale_factors (pango_analysis_get_size_font (&run->item->analysis), &xscale, &yscale);
*height = pango_font_metrics_get_height (height_metrics) * MAX (xscale, yscale);
pango_font_metrics_unref (height_metrics);
}
else
{
double xscale, yscale;
if (!metrics)
metrics = pango_font_get_metrics (run->item->analysis.font,
run->item->analysis.language);
*height = pango_font_metrics_get_height (metrics);
pango_font_get_scale_factors (run->item->analysis.font, &xscale, &yscale);
*height = pango_font_metrics_get_height (metrics) * MAX (xscale, yscale);
}
}
......
......@@ -24,6 +24,7 @@
#include "pango-font-private.h"
#include "pangofc-font-private.h"
#include "pangofc-fontmap.h"
#include "pangofc-fontmap-private.h"
#include "pangofc-private.h"
#include "pango-layout.h"
#include "pango-impl-utils.h"
......@@ -78,6 +79,7 @@ static void _pango_fc_font_get_scale_factors (PangoFont *fon
static void pango_fc_font_get_matrix (PangoFont *font,
PangoMatrix *matrix);
static int pango_fc_font_get_absolute_size (PangoFont *font);
static PangoVariant pango_fc_font_get_variant (PangoFont *font);
#define PANGO_FC_FONT_LOCK_FACE(font) (PANGO_FC_FONT_GET_CLASS (font)->lock_face (font))
#define PANGO_FC_FONT_UNLOCK_FACE(font) (PANGO_FC_FONT_GET_CLASS (font)->unlock_face (font))
......@@ -114,6 +116,7 @@ pango_fc_font_class_init (PangoFcFontClass *class)
pclass->get_scale_factors = _pango_fc_font_get_scale_factors;
pclass->get_matrix = pango_fc_font_get_matrix;
pclass->get_absolute_size = pango_fc_font_get_absolute_size;
pclass->get_variant = pango_fc_font_get_variant;
/**
* PangoFcFont:pattern:
......@@ -172,8 +175,8 @@ pango_fc_font_finalize (GObject *object)
g_object_unref (fontmap);
}
FcPatternDestroy (fcfont->font_pattern);
pango_font_description_free (fcfont->description);
FcPatternDestroy (fcfont->font_pattern);
if (priv->decoder)
_pango_fc_font_set_decoder (fcfont, NULL);
......@@ -209,9 +212,9 @@ pattern_is_transformed (FcPattern *pattern)
static void
pango_fc_font_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
PangoFcFont *fcfont = PANGO_FC_FONT (object);
......@@ -219,25 +222,25 @@ pango_fc_font_set_property (GObject *object,
{
case PROP_PATTERN:
{
FcPattern *pattern = g_value_get_pointer (value);
FcPattern *pattern = g_value_get_pointer (value);
g_return_if_fail (pattern != NULL);
g_return_if_fail (fcfont->font_pattern == NULL);
g_return_if_fail (pattern != NULL);
g_return_if_fail (fcfont->font_pattern == NULL);
FcPatternReference (pattern);
fcfont->font_pattern = pattern;
fcfont->description = pango_fc_font_description_from_pattern (pattern, TRUE);
fcfont->is_hinted = pattern_is_hinted (pattern);
fcfont->is_transformed = pattern_is_transformed (pattern);
FcPatternReference (pattern);
fcfont->font_pattern = pattern;
fcfont->description = font_description_from_pattern (pattern, TRUE, TRUE);
fcfont->is_hinted = pattern_is_hinted (pattern);
fcfont->is_transformed = pattern_is_transformed (pattern);
}
goto set_decoder;
case PROP_FONTMAP:
{
PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (g_value_get_object (value));
PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (g_value_get_object (value));
g_return_if_fail (fcfont->fontmap == NULL);
g_weak_ref_set ((GWeakRef *) &fcfont->fontmap, fcfontmap);
g_return_if_fail (fcfont->fontmap == NULL);
g_weak_ref_set ((GWeakRef *) &fcfont->fontmap, fcfontmap);
}
goto set_decoder;
......@@ -314,6 +317,13 @@ pango_fc_font_get_absolute_size (PangoFont *font)
return 0;
}
static PangoVariant
pango_fc_font_get_variant (PangoFont *font)
{
PangoFcFont *fcfont = (PangoFcFont *)font;
return pango_font_description_get_variant (fcfont->description);
}
static PangoCoverage *
pango_fc_font_get_coverage (PangoFont *font,
PangoLanguage *language G_GNUC_UNUSED)
......
......@@ -191,6 +191,9 @@ struct _PangoFcFontMapClass
void (*_pango_reserved4) (void);
};
PangoFontDescription *font_description_from_pattern (FcPattern *pattern,
gboolean include_size,
gboolean shallow);
G_END_DECLS
......
......@@ -2773,6 +2773,14 @@ pango_fc_convert_width_to_pango (int fc_stretch)
*/
PangoFontDescription *
pango_fc_font_description_from_pattern (FcPattern *pattern, gboolean include_size)
{
return font_description_from_pattern (pattern, include_size, FALSE);
}
PangoFontDescription *
font_description_from_pattern (FcPattern *pattern,
gboolean include_size,
gboolean shallow)
{
PangoFontDescription *desc;
PangoStyle style;
......@@ -2782,8 +2790,7 @@ pango_fc_font_description_from_pattern (FcPattern *pattern, gboolean include_siz
PangoGravity gravity;
PangoVariant variant;
gboolean all_caps;
FcChar8 *s;
const char *s;
int i;
double d;
FcResult res;
......@@ -2793,7 +2800,10 @@ pango_fc_font_description_from_pattern (FcPattern *pattern, gboolean include_siz
res = FcPatternGetString (pattern, FC_FAMILY, 0, (FcChar8 **) &s);
g_assert (res == FcResultMatch);
pango_font_description_set_family (desc, (gchar *)s);
if (shallow)
pango_font_description_set_family_static (desc, s);
else
pango_font_description_set_family (desc, s);
if (FcPatternGetInteger (pattern, FC_SLANT, 0, &i) == FcResultMatch)
style = pango_fc_convert_slant_to_pango (i);
......@@ -2821,8 +2831,6 @@ pango_fc_font_description_from_pattern (FcPattern *pattern, gboolean include_siz
for (int i = 0; i < 32; i++)
{
const char *s;
if (FcPatternGetString (pattern, FC_FONT_FEATURES, i, (FcChar8 **)&s) == FcResultMatch)
{
if (strcmp (s, "smcp=1") == 0)
......@@ -2907,7 +2915,12 @@ pango_fc_font_description_from_pattern (FcPattern *pattern, gboolean include_siz
if (include_size && FcPatternGetString (pattern, FC_FONT_VARIATIONS, 0, (FcChar8 **)&s) == FcResultMatch)
{
if (s && *s)
pango_font_description_set_variations (desc, (char *)s);
{
if (shallow)
pango_font_description_set_variations_static (desc, s);
else
pango_font_description_set_variations (desc, s);
}
}
return desc;
......
......@@ -622,18 +622,12 @@
<div class="docblock">
<h6>Class members</h6>
<table class="members">
<dl class="members">
{% for field in class.class_fields %}
<tr>
<td style="vertical-align:top"><code>{{ field.name }}</code></td>
<td style="vertical-align:top"><pre><code>{{ field.type_cname }}</code></pre></td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="vertical-align:top">{{ field.description }}</td>
</td>
<dt><code>{{ field.name }}: {{ field.type_cname }}</code></dt>
<dd>{{ field.description }}</dd>
{% endfor %}
</table>
</dd>
</div>
{% endif %}
</div>
......
......@@ -113,7 +113,7 @@
<table>
{% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ arg.direction_note }}</td></tr>{% endif %}
{% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code> by the class method</td></tr>{% endif %}
{% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be <code>NULL</code>-terminated.</td></tr>{% endif %}
{% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} elements.</td></tr>{% endif %}
......@@ -127,8 +127,14 @@
{% if class_method.throws %}
<dt class="arg-name"><code>error</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<code>GError **</code></p>
<p>The return location for a <code>GError*</code>, or <code>NULL</code>.</p>
<p><em>Type:</em>&nbsp;<a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p>
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr>
<tr><td>The argument will left initialized to <code>NULL</code> by the class method if there are no errors.</td></tr>
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr>
</table>
</dd>
{% endif %}
</dl>
......
......@@ -115,7 +115,7 @@
<table>
{% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ arg.direction_note }}</td></tr>{% endif %}
{% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code> by the constructor.</td></tr>{% endif %}
{% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be <code>NULL</code>-terminated.</td></tr>{% endif %}
{% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} elements.</td></tr>{% endif %}
......@@ -129,8 +129,14 @@
{% if type_func.throws %}
<dt class="arg-name"><code>error</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<code>GError **</code></p>
<p>The return location for a <code>GError*</code>, or <code>NULL</code>.</p>
<p><em>Type:</em>&nbsp;<a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p>
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr>
<tr><td>The argument will left initialized to <code>NULL</code> by the constructor if there are no errors.</td></tr>
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr>
</table>
</dd>
{% endif %}
</dl>
......
......@@ -126,7 +126,7 @@
<table>
{% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ arg.direction_note }}</td></tr>{% endif %}
{% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code> by the function.</td></tr>{% endif %}
{% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be <code>NULL</code>-terminated.</td></tr>{% endif %}
{% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} elements.</td></tr>{% endif %}
......@@ -140,8 +140,14 @@
{% if func.throws %}
<dt class="arg-name"><code>error</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<code>GError **</code></p>
<p>The return location for a <code>GError*</code>, or <code>NULL</code>.</p>
<p><em>Type:</em>&nbsp;<a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p>
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr>
<tr><td>The argument will left initialized to <code>NULL</code> by the function if there are no errors.</td></tr>
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr>
</table>
</dd>
{% endif %}
</dl>
......
......@@ -121,7 +121,7 @@
<table>
{% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ arg.direction_note }}</td></tr>{% endif %}
{% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code> by the method.</td></tr>{% endif %}
{% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be <code>NULL</code>-terminated.</td></tr>{% endif %}
{% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} elements.</td></tr>{% endif %}
......@@ -135,8 +135,14 @@
{% if method.throws %}
<dt class="arg-name"><code>error</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<code>GError **</code></p>
<p>The return location for a <code>GError*</code>, or <code>NULL</code>.</p>
<p><em>Type:</em>&nbsp;<a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p>
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr>
<tr><td>The argument will left initialized to <code>NULL</code> by the method if there are no errors.</td></tr>
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr>
</table>
</dd>
{% endif %}
</dl>
......
......@@ -122,7 +122,7 @@
<table>
{% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ arg.direction_note }}</td></tr>{% endif %}
{% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code> by the signal handler.</td></tr>{% endif %}
{% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be <code>NULL</code>-terminated.</td></tr>{% endif %}
{% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} elements.</td></tr>{% endif %}
......@@ -137,10 +137,16 @@
<dt class="arg-name"><code>error</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<code>GError **</code></p>
<p>The return location for a <code>GError*</code>, or <code>NULL</code>.</p>
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr>
<tr><td>The argument will left initialized to <code>NULL</code> by the signal handler if there are no errors.</td></tr>
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr>
</table>
</dd>
{% endif %}
</table>
</dl>
</div>
</div>
{% endif %}
......
......@@ -102,14 +102,12 @@
</h6>
<div class="docblock">
<table>
<dl>
{% for field in struct.fields %}
<tr>
<td><code>{{ field.name }}</code></td>
<td>{{ field.description }}</td>
</tr>
<dt><code>{{ field.name }}</code></dt>
<dd>{{ field.description }}</dd>
{% endfor %}
</table>
</dl>
</div>
</div>
{% endif %}
......
......@@ -24,6 +24,8 @@
--sidebar-selected-bg: var(--primary);
--sidebar-hover-bg: rgba(127, 127, 127, 0.2);
--sidebar-text-color: #fafafa;
--sidebar-search-bg: rgba(127, 127, 127, 0.25);
--sidebar-search-focus-bg: rgba(127, 127, 127, 0.3);
--sidebar-padding: 1.5em;
/* boxes, e.g. code blocks */
......@@ -106,28 +108,6 @@
background: var(--primary);
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(128, 128, 128, 0.6);
}
::-webkit-scrollbar-thumb:hover {
background: rgba(128, 128, 128, 1);
}
::-webkit-scrollbar-track {
background: rgba(128, 128, 128, 0.15);
}
* {
scrollbar-width: initial;
}
body {
font: 16px/1.5 var(--body-font-family);
font-weight: var(--body-font-weight);
......@@ -401,7 +381,6 @@ footer {
* SIDEBAR
*********************************/
.sidebar {
scrollbar-width: thin;
background: var(--sidebar-bg);
border-right: 1px solid var(--sidebar-bg);
min-width: 35ch;
......@@ -412,6 +391,7 @@ footer {
z-index: 2;
height: 100vh;
overflow-y: auto;
color-scheme: dark;
}
.sidebar a,
......@@ -492,15 +472,21 @@ footer {
}
.sidebar .search input[type="text"] {
border-color: transparent;
border: none;
width: 100%;
border: 1px solid #ccc;
border-radius: 50px;
padding: 6px 12px;
padding: 8px 14px;
display: inline-block;
font-size: 14px;
box-shadow: inset 0 1px 3px #ddd;
transition: border .3s linear;
outline: transparent;
background: var(--sidebar-search-bg);
color: var(--sidebar-text-color);
transition: background-color 150ms ease;
}
.sidebar .search input[type="text"]:hover,
.sidebar .search input[type="text"]:focus {
background: var(--sidebar-search-focus-bg);
}
.toc {
......
......@@ -112,7 +112,7 @@
<table>
{% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ arg.direction_note }}</td></tr>{% endif %}
{% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code> by the function.</td></tr>{% endif %}
{% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be <code>NULL</code>-terminated.</td></tr>{% endif %}
{% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} elements.</td></tr>{% endif %}
......@@ -126,11 +126,17 @@
{% if type_func.throws %}
<dt class="arg-name"><code>error</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<code>GError **</code></p>
<p>The return location for a <code>GError*</code>, or <code>NULL</code>.</p>
</tr>
<p><em>Type:</em>&nbsp;<a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p>
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr>
<tr><td>The argument will left initialized to <code>NULL</code> by the function if there are no errors.</td></tr>
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr>
</table>
</dd>
{% endif %}
</table>
</dl>
</div>
</div>
{% endif %}
......
......@@ -112,7 +112,7 @@
<table>
{% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ arg.direction_note }}</td></tr>{% endif %}
{% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code>.</td></tr>{% endif %}
{% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be set to <code>NULL</code> by the virtual function.</td></tr>{% endif %}
{% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
{% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be <code>NULL</code>-terminated.</td></tr>{% endif %}
{% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} elements.</td></tr>{% endif %}
......@@ -126,8 +126,14 @@
{% if vfunc.throws %}
<dt class="arg-name"><code>error</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<code>GError **</code></p>
<p>The return location for a <code>GError*</code>, or <code>NULL</code>.</p>
<p><em>Type:</em>&nbsp;<a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p>
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr>
<tr><td>The argument will left initialized to <code>NULL</code> by the virtual function if there are no errors.</td></tr>
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr>
</table>
</dd>
{% endif %}
</dl>
......