summaryrefslogtreecommitdiff
path: root/gtk/gtkconstraint.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-07-01 01:02:56 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2019-07-01 01:02:56 +0100
commit68fed63eaca9c9b2cb7dc916a6a9df6337990fce (patch)
treec7db8b6b543ca76422f75811bdd58a438c4ea48b /gtk/gtkconstraint.c
parent46403bac122b30ef193d94d2ac80e5d907677c64 (diff)
downloadgtk+-68fed63eaca9c9b2cb7dc916a6a9df6337990fce.tar.gz
Add missing documentation for GtkConstraint
Diffstat (limited to 'gtk/gtkconstraint.c')
-rw-r--r--gtk/gtkconstraint.c73
1 files changed, 72 insertions, 1 deletions
diff --git a/gtk/gtkconstraint.c b/gtk/gtkconstraint.c
index 2ac4d5b05d..48a97eb00e 100644
--- a/gtk/gtkconstraint.c
+++ b/gtk/gtkconstraint.c
@@ -211,7 +211,7 @@ gtk_constraint_class_init (GtkConstraintClass *klass)
/**
* GtkConstraint:relation:
*
- * The relation order between the terms of the constraint.
+ * The order relation between the terms of the constraint.
*/
obj_props[PROP_RELATION] =
g_param_spec_enum ("relation",
@@ -405,6 +405,17 @@ gtk_constraint_get_target_widget (GtkConstraint *constraint)
return NULL;
}
+/**
+ * gtk_constraint_get_target:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the #GtkConstraintTarget used as the target for @constraint.
+ *
+ * If the #GtkConstraint:target property is set to %NULL, the @constraint
+ * will use the #GtkConstraintLayout's widget.
+ *
+ * Returns: (transfer none) (nullable): a #GtkConstraintTarget
+ */
GtkConstraintTarget *
gtk_constraint_get_target (GtkConstraint *constraint)
{
@@ -413,6 +424,14 @@ gtk_constraint_get_target (GtkConstraint *constraint)
return constraint->target;
}
+/**
+ * gtk_constraint_get_target_attribute:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the attribute of the target to be set by the @constraint.
+ *
+ * Returns: the target's attribute
+ */
GtkConstraintAttribute
gtk_constraint_get_target_attribute (GtkConstraint *constraint)
{
@@ -440,6 +459,17 @@ gtk_constraint_get_source_widget (GtkConstraint *constraint)
return NULL;
}
+/**
+ * gtk_constraint_get_source:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the #GtkConstraintTarget used as the source for @constraint.
+ *
+ * If the #GtkConstraint:source property is set to %NULL, the @constraint
+ * will use the #GtkConstraintLayout's widget.
+ *
+ * Returns: (transfer none) (nullable): a #GtkConstraintTarget
+ */
GtkConstraintTarget *
gtk_constraint_get_source (GtkConstraint *constraint)
{
@@ -448,6 +478,14 @@ gtk_constraint_get_source (GtkConstraint *constraint)
return constraint->source;
}
+/**
+ * gtk_constraint_get_source_attribute:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the attribute of the source to be read by the @constraint.
+ *
+ * Returns: the target's attribute
+ */
GtkConstraintAttribute
gtk_constraint_get_source_attribute (GtkConstraint *constraint)
{
@@ -456,6 +494,14 @@ gtk_constraint_get_source_attribute (GtkConstraint *constraint)
return constraint->source_attribute;
}
+/**
+ * gtk_constraint_get_relation:
+ * @constraint: a #GtkConstraint
+ *
+ * The order relation between the terms of the @constraint.
+ *
+ * Returns: a #GtkConstraintRelation value
+ */
GtkConstraintRelation
gtk_constraint_get_relation (GtkConstraint *constraint)
{
@@ -464,6 +510,15 @@ gtk_constraint_get_relation (GtkConstraint *constraint)
return constraint->relation;
}
+/**
+ * gtk_constraint_get_multiplier:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the multiplication factor applied to the source
+ * attribute's value.
+ *
+ * Returns: a multiplication factor
+ */
double
gtk_constraint_get_multiplier (GtkConstraint *constraint)
{
@@ -472,6 +527,14 @@ gtk_constraint_get_multiplier (GtkConstraint *constraint)
return constraint->multiplier;
}
+/**
+ * gtk_constraint_get_constant:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the constant factor added to the source attributes' value.
+ *
+ * Returns: a constant factor
+ */
double
gtk_constraint_get_constant (GtkConstraint *constraint)
{
@@ -480,6 +543,14 @@ gtk_constraint_get_constant (GtkConstraint *constraint)
return constraint->constant;
}
+/**
+ * gtk_constraint_get_strength:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the strength of the constraint.
+ *
+ * Returns: the strength of the constraint
+ */
int
gtk_constraint_get_strength (GtkConstraint *constraint)
{