forked from AuroraMiddleware/gtk
Add gtk_constraint_layout_remove_constraint
Otherwise, you can't do many interesting things.
This commit is contained in:
parent
64afa765c8
commit
176d9c6baf
@ -1106,3 +1106,23 @@ gtk_constraint_layout_add_constraint (GtkConstraintLayout *manager,
|
||||
|
||||
g_hash_table_add (manager->constraints, constraint);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_constraint_layout_remove_constraint:
|
||||
* @manager: 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,
|
||||
GtkConstraint *constraint)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CONSTRAINT_LAYOUT (manager));
|
||||
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);
|
||||
}
|
||||
|
@ -41,6 +41,9 @@ GtkLayoutManager * gtk_constraint_layout_new (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_constraint_layout_add_constraint (GtkConstraintLayout *manager,
|
||||
GtkConstraint *constraint);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_constraint_layout_remove_constraint (GtkConstraintLayout *manager,
|
||||
GtkConstraint *constraint);
|
||||
|
||||
/**
|
||||
* GtkConstraintLayoutChild:
|
||||
|
Loading…
Reference in New Issue
Block a user