mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Remove specialised API from GtkConstraint
Thet widget-based API for constraint target and source properties is unused, and not really necessary.
This commit is contained in:
parent
68fed63eac
commit
c76c1a46e4
@ -386,25 +386,6 @@ gtk_constraint_new_constant (gpointer target,
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_constraint_get_target_widget:
|
|
||||||
* @constraint: a #GtkConstraint
|
|
||||||
*
|
|
||||||
* Retrieves the target widget for the @constraint.
|
|
||||||
*
|
|
||||||
* Returns: (transfer none) (nullable): a #GtkWidget
|
|
||||||
*/
|
|
||||||
GtkWidget *
|
|
||||||
gtk_constraint_get_target_widget (GtkConstraint *constraint)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GTK_IS_CONSTRAINT (constraint), NULL);
|
|
||||||
|
|
||||||
if (GTK_IS_WIDGET (constraint->target))
|
|
||||||
return GTK_WIDGET (constraint->target);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_constraint_get_target:
|
* gtk_constraint_get_target:
|
||||||
* @constraint: a #GtkConstraint
|
* @constraint: a #GtkConstraint
|
||||||
@ -440,25 +421,6 @@ gtk_constraint_get_target_attribute (GtkConstraint *constraint)
|
|||||||
return constraint->target_attribute;
|
return constraint->target_attribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_constraint_get_source_widget:
|
|
||||||
* @constraint: a #GtkConstraint
|
|
||||||
*
|
|
||||||
* Retrieves the source widget for the @constraint.
|
|
||||||
*
|
|
||||||
* Returns: (transfer none) (nullable): a #GtkWidget
|
|
||||||
*/
|
|
||||||
GtkWidget *
|
|
||||||
gtk_constraint_get_source_widget (GtkConstraint *constraint)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GTK_IS_CONSTRAINT (constraint), NULL);
|
|
||||||
|
|
||||||
if (GTK_IS_WIDGET (constraint->source))
|
|
||||||
return GTK_WIDGET (constraint->source);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_constraint_get_source:
|
* gtk_constraint_get_source:
|
||||||
* @constraint: a #GtkConstraint
|
* @constraint: a #GtkConstraint
|
||||||
|
@ -73,15 +73,11 @@ GtkConstraint * gtk_constraint_new_constant (gpointer
|
|||||||
double constant,
|
double constant,
|
||||||
int strength);
|
int strength);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
|
||||||
GtkWidget * gtk_constraint_get_target_widget (GtkConstraint *constraint);
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GtkConstraintTarget * gtk_constraint_get_target (GtkConstraint *constraint);
|
GtkConstraintTarget * gtk_constraint_get_target (GtkConstraint *constraint);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GtkConstraintAttribute gtk_constraint_get_target_attribute (GtkConstraint *constraint);
|
GtkConstraintAttribute gtk_constraint_get_target_attribute (GtkConstraint *constraint);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GtkWidget * gtk_constraint_get_source_widget (GtkConstraint *constraint);
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
|
||||||
GtkConstraintTarget * gtk_constraint_get_source (GtkConstraint *constraint);
|
GtkConstraintTarget * gtk_constraint_get_source (GtkConstraint *constraint);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GtkConstraintAttribute gtk_constraint_get_source_attribute (GtkConstraint *constraint);
|
GtkConstraintAttribute gtk_constraint_get_source_attribute (GtkConstraint *constraint);
|
||||||
|
Loading…
Reference in New Issue
Block a user