Fix warnings from the introspection scanner

The name of the arguments of the functions must match the name of the
arguments in the documentation stanza.
This commit is contained in:
Emmanuele Bassi 2019-07-01 01:13:00 +01:00
parent 7990b24287
commit 2aabd64f1a
3 changed files with 28 additions and 29 deletions

View File

@ -25,7 +25,6 @@
G_BEGIN_DECLS
#define GTK_TYPE_CONSTRAINT_GUIDE (gtk_constraint_guide_get_type ())
/**

View File

@ -1061,7 +1061,7 @@ gtk_constraint_layout_new (void)
/**
* gtk_constraint_layout_add_constraint:
* @manager: a #GtkConstraintLayout
* @layout: a #GtkConstraintLayout
* @constraint: (transfer full): a #GtkConstraint
*
* Adds a #GtkConstraint to the layout manager.
@ -1070,65 +1070,65 @@ gtk_constraint_layout_new (void)
* properties of @constraint can be:
*
* - set to %NULL to indicate that the constraint refers to the
* widget using @manager
* - set to the #GtkWidget using @manager
* - set to a child of the #GtkWidget using @manager
* widget using @layout
* - set to the #GtkWidget using @layout
* - set to a child of the #GtkWidget using @layout
*
* The @manager acquires the ownership of @constraint after calling
* The @layout acquires the ownership of @constraint after calling
* this function.
*/
void
gtk_constraint_layout_add_constraint (GtkConstraintLayout *manager,
gtk_constraint_layout_add_constraint (GtkConstraintLayout *layout,
GtkConstraint *constraint)
{
g_return_if_fail (GTK_IS_CONSTRAINT_LAYOUT (manager));
g_return_if_fail (GTK_IS_CONSTRAINT_LAYOUT (layout));
g_return_if_fail (GTK_IS_CONSTRAINT (constraint));
g_return_if_fail (!gtk_constraint_is_attached (constraint));
layout_add_constraint (manager, constraint);
layout_add_constraint (layout, constraint);
g_hash_table_add (manager->constraints, constraint);
g_hash_table_add (layout->constraints, constraint);
gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (manager));
gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (layout));
}
/**
* gtk_constraint_layout_remove_constraint:
* @manager: a #GtkConstraintLayout
* @layout: a #GtkConstraintLayout
* @constraint: a #GtkConstraint
*
* Removes @constraint from the layout manager,
* so that it no longer influences the layout.
*/
void
gtk_constraint_layout_remove_constraint (GtkConstraintLayout *manager,
gtk_constraint_layout_remove_constraint (GtkConstraintLayout *layout,
GtkConstraint *constraint)
{
g_return_if_fail (GTK_IS_CONSTRAINT_LAYOUT (manager));
g_return_if_fail (GTK_IS_CONSTRAINT_LAYOUT (layout));
g_return_if_fail (GTK_IS_CONSTRAINT (constraint));
g_return_if_fail (gtk_constraint_is_attached (constraint));
gtk_constraint_detach (constraint);
g_hash_table_remove (manager->constraints, constraint);
g_hash_table_remove (layout->constraints, constraint);
gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (manager));
gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (layout));
}
/**
* gtk_constraint_layout_remove_all_constraints:
* @manager: a #GtkConstraintLayout
* @layout: a #GtkConstraintLayout
*
* Removes all constraints from the layout manager.
*/
void
gtk_constraint_layout_remove_all_constraints (GtkConstraintLayout *manager)
gtk_constraint_layout_remove_all_constraints (GtkConstraintLayout *layout)
{
GHashTableIter iter;
gpointer key;
g_return_if_fail (GTK_IS_CONSTRAINT_LAYOUT (manager));
g_return_if_fail (GTK_IS_CONSTRAINT_LAYOUT (layout));
g_hash_table_iter_init (&iter, manager->constraints);
g_hash_table_iter_init (&iter, layout->constraints);
while (g_hash_table_iter_next (&iter, &key, NULL))
{
GtkConstraint *constraint = key;
@ -1137,7 +1137,7 @@ gtk_constraint_layout_remove_all_constraints (GtkConstraintLayout *manager)
g_hash_table_iter_remove (&iter);
}
gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (manager));
gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (layout));
}
/**
@ -1149,7 +1149,7 @@ gtk_constraint_layout_remove_all_constraints (GtkConstraintLayout *manager)
* the source or target of constraints, like a widget,
* but it is not visible.
*
* The @manager acquires the ownership of @guide after calling
* The @layout acquires the ownership of @guide after calling
* this function.
*/
void

View File

@ -52,23 +52,23 @@ GDK_AVAILABLE_IN_ALL
GtkLayoutManager * gtk_constraint_layout_new (void);
GDK_AVAILABLE_IN_ALL
void gtk_constraint_layout_add_constraint (GtkConstraintLayout *manager,
void gtk_constraint_layout_add_constraint (GtkConstraintLayout *layout,
GtkConstraint *constraint);
GDK_AVAILABLE_IN_ALL
void gtk_constraint_layout_remove_constraint (GtkConstraintLayout *manager,
void gtk_constraint_layout_remove_constraint (GtkConstraintLayout *layout,
GtkConstraint *constraint);
GDK_AVAILABLE_IN_ALL
void gtk_constraint_layout_add_guide (GtkConstraintLayout *manager,
void gtk_constraint_layout_add_guide (GtkConstraintLayout *layout,
GtkConstraintGuide *guide);
GDK_AVAILABLE_IN_ALL
void gtk_constraint_layout_remove_guide (GtkConstraintLayout *manager,
void gtk_constraint_layout_remove_guide (GtkConstraintLayout *layout,
GtkConstraintGuide *guide);
GDK_AVAILABLE_IN_ALL
void gtk_constraint_layout_remove_all_constraints (GtkConstraintLayout *manager);
void gtk_constraint_layout_remove_all_constraints (GtkConstraintLayout *layout);
GDK_AVAILABLE_IN_ALL
GList * gtk_constraint_layout_add_constraints_from_description (GtkConstraintLayout *manager,
GList * gtk_constraint_layout_add_constraints_from_description (GtkConstraintLayout *layout,
const char * const lines[],
gsize n_lines,
int hspacing,
@ -77,7 +77,7 @@ GList * gtk_constraint_layout_add_constraints_from_description
const char *first_view,
...) G_GNUC_NULL_TERMINATED;
GDK_AVAILABLE_IN_ALL
GList * gtk_constraint_layout_add_constraints_from_descriptionv (GtkConstraintLayout *manager,
GList * gtk_constraint_layout_add_constraints_from_descriptionv (GtkConstraintLayout *layout,
const char * const lines[],
gsize n_lines,
int hspacing,