diff options
Diffstat (limited to 'gtk/gtkadjustment.c')
-rw-r--r-- | gtk/gtkadjustment.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c index 47d422bc5d..eceebdfa61 100644 --- a/gtk/gtkadjustment.c +++ b/gtk/gtkadjustment.c @@ -117,3 +117,15 @@ gtk_adjustment_new (gfloat value, return GTK_OBJECT (adjustment); } + +void +gtk_adjustment_set_value (GtkAdjustment *adjustment, + gfloat value) +{ + g_return_if_fail (adjustment != NULL); + g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); + + adjustment->value = CLAMP (value, adjustment->lower, adjustment->upper); + + gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "value_changed"); +} |