diff options
Diffstat (limited to 'gtk/gtkadjustment.c')
-rw-r--r-- | gtk/gtkadjustment.c | 181 |
1 files changed, 91 insertions, 90 deletions
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c index 10f43c1b0d..1bf72bcfab 100644 --- a/gtk/gtkadjustment.c +++ b/gtk/gtkadjustment.c @@ -19,7 +19,7 @@ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #include "config.h" @@ -47,7 +47,7 @@ * The owner of the #GtkAdjustment typically calls the * gtk_adjustment_value_changed() and gtk_adjustment_changed() functions * after changing the value and its bounds. This results in the emission of the - * #GtkAdjustment::value_changed or #GtkAdjustment::changed signal respectively. + * #GtkAdjustment::value-changed or #GtkAdjustment::changed signal respectively. */ @@ -135,9 +135,9 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) /** * GtkAdjustment:value: - * + * * The value of the adjustment. - * + * * Since: 2.4 */ g_object_class_install_property (gobject_class, @@ -145,16 +145,16 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) g_param_spec_double ("value", P_("Value"), P_("The value of the adjustment"), - -G_MAXDOUBLE, - G_MAXDOUBLE, - 0.0, + -G_MAXDOUBLE, + G_MAXDOUBLE, + 0.0, GTK_PARAM_READWRITE)); - + /** * GtkAdjustment:lower: - * + * * The minimum value of the adjustment. - * + * * Since: 2.4 */ g_object_class_install_property (gobject_class, @@ -162,17 +162,17 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) g_param_spec_double ("lower", P_("Minimum Value"), P_("The minimum value of the adjustment"), - -G_MAXDOUBLE, - G_MAXDOUBLE, + -G_MAXDOUBLE, + G_MAXDOUBLE, 0.0, GTK_PARAM_READWRITE)); - + /** * GtkAdjustment:upper: - * - * The maximum value of the adjustment. - * Note that values will be restricted by - * `upper - page-size` if the page-size + * + * The maximum value of the adjustment. + * Note that values will be restricted by + * `upper - page-size` if the page-size * property is nonzero. * * Since: 2.4 @@ -182,16 +182,16 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) g_param_spec_double ("upper", P_("Maximum Value"), P_("The maximum value of the adjustment"), - -G_MAXDOUBLE, - G_MAXDOUBLE, - 0.0, + -G_MAXDOUBLE, + G_MAXDOUBLE, + 0.0, GTK_PARAM_READWRITE)); - + /** * GtkAdjustment:step-increment: - * + * * The step increment of the adjustment. - * + * * Since: 2.4 */ g_object_class_install_property (gobject_class, @@ -199,16 +199,16 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) g_param_spec_double ("step-increment", P_("Step Increment"), P_("The step increment of the adjustment"), - -G_MAXDOUBLE, - G_MAXDOUBLE, - 0.0, + -G_MAXDOUBLE, + G_MAXDOUBLE, + 0.0, GTK_PARAM_READWRITE)); - + /** * GtkAdjustment:page-increment: - * + * * The page increment of the adjustment. - * + * * Since: 2.4 */ g_object_class_install_property (gobject_class, @@ -216,19 +216,19 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) g_param_spec_double ("page-increment", P_("Page Increment"), P_("The page increment of the adjustment"), - -G_MAXDOUBLE, - G_MAXDOUBLE, - 0.0, + -G_MAXDOUBLE, + G_MAXDOUBLE, + 0.0, GTK_PARAM_READWRITE)); - + /** * GtkAdjustment:page-size: - * - * The page size of the adjustment. + * + * The page size of the adjustment. * Note that the page-size is irrelevant and should be set to zero - * if the adjustment is used for a simple scalar value, e.g. in a + * if the adjustment is used for a simple scalar value, e.g. in a * #GtkSpinButton. - * + * * Since: 2.4 */ g_object_class_install_property (gobject_class, @@ -236,14 +236,14 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) g_param_spec_double ("page-size", P_("Page Size"), P_("The page size of the adjustment"), - -G_MAXDOUBLE, - G_MAXDOUBLE, - 0.0, + -G_MAXDOUBLE, + G_MAXDOUBLE, + 0.0, GTK_PARAM_READWRITE)); /** * GtkAdjustment::changed: - * @adjustment: the object which received the signal. + * @adjustment: the object which received the signal * * Emitted when one or more of the #GtkAdjustment properties have been * changed, other than the #GtkAdjustment:value property. @@ -259,7 +259,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class) /** * GtkAdjustment::value-changed: - * @adjustment: the object which received the signal. + * @adjustment: the object which received the signal * * Emitted when the #GtkAdjustment:value property has been changed. */ @@ -383,16 +383,16 @@ gtk_adjustment_dispatch_properties_changed (GObject *object, /** * gtk_adjustment_new: - * @value: the initial value. - * @lower: the minimum value. - * @upper: the maximum value. - * @step_increment: the step increment. - * @page_increment: the page increment. - * @page_size: the page size. + * @value: the initial value + * @lower: the minimum value + * @upper: the maximum value + * @step_increment: the step increment + * @page_increment: the page increment + * @page_size: the page size * * Creates a new #GtkAdjustment. * - * Returns: a new #GtkAdjustment. + * Returns: a new #GtkAdjustment */ GtkAdjustment * gtk_adjustment_new (gdouble value, @@ -416,10 +416,10 @@ gtk_adjustment_new (gdouble value, * gtk_adjustment_get_value: * @adjustment: a #GtkAdjustment * - * Gets the current value of the adjustment. See - * gtk_adjustment_set_value (). + * Gets the current value of the adjustment. + * See gtk_adjustment_set_value(). * - * Returns: The current value of the adjustment. + * Returns: The current value of the adjustment **/ gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment) @@ -451,7 +451,7 @@ adjustment_set_value (GtkAdjustment *adjustment, } } -static void gtk_adjustment_on_frame_clock_update (GdkFrameClock *clock, +static void gtk_adjustment_on_frame_clock_update (GdkFrameClock *clock, GtkAdjustment *adjustment); static void @@ -492,7 +492,7 @@ ease_out_cubic (gdouble t) } static void -gtk_adjustment_on_frame_clock_update (GdkFrameClock *clock, +gtk_adjustment_on_frame_clock_update (GdkFrameClock *clock, GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = adjustment->priv; @@ -548,15 +548,15 @@ gtk_adjustment_set_value_internal (GtkAdjustment *adjustment, /** * gtk_adjustment_set_value: - * @adjustment: a #GtkAdjustment. - * @value: the new value. + * @adjustment: a #GtkAdjustment + * @value: the new value * * Sets the #GtkAdjustment value. The value is clamped to lie between * #GtkAdjustment:lower and #GtkAdjustment:upper. * - * Note that for adjustments which are used in a #GtkScrollbar, the effective - * range of allowed values goes from #GtkAdjustment:lower to - * #GtkAdjustment:upper - #GtkAdjustment:page_size. + * Note that for adjustments which are used in a #GtkScrollbar, the + * effective range of allowed values goes from #GtkAdjustment:lower to + * #GtkAdjustment:upper - #GtkAdjustment:page-size. */ void gtk_adjustment_set_value (GtkAdjustment *adjustment, @@ -582,7 +582,7 @@ gtk_adjustment_animate_to_value (GtkAdjustment *adjustment, * * Retrieves the minimum value of the adjustment. * - * Returns: The current minimum value of the adjustment. + * Returns: The current minimum value of the adjustment * * Since: 2.14 **/ @@ -602,12 +602,12 @@ gtk_adjustment_get_lower (GtkAdjustment *adjustment) * Sets the minimum value of the adjustment. * * When setting multiple adjustment properties via their individual - * setters, multiple #GtkAdjustment::changed signals will be emitted. However, since - * the emission of the #GtkAdjustment::changed signal is tied to the emission of the - * #GObject::notify signals of the changed properties, it’s possible - * to compress the #GtkAdjustment::changed signals into one by calling - * g_object_freeze_notify() and g_object_thaw_notify() around the - * calls to the individual setters. + * setters, multiple #GtkAdjustment::changed signals will be emitted. + * However, since the emission of the #GtkAdjustment::changed signal + * is tied to the emission of the #GObject::notify signals of the changed + * properties, it’s possible to compress the #GtkAdjustment::changed + * signals into one by calling g_object_freeze_notify() and + * g_object_thaw_notify() around the calls to the individual setters. * * Alternatively, using a single g_object_set() for all the properties * to change, or using gtk_adjustment_configure() has the same effect @@ -631,7 +631,7 @@ gtk_adjustment_set_lower (GtkAdjustment *adjustment, * * Retrieves the maximum value of the adjustment. * - * Returns: The current maximum value of the adjustment. + * Returns: The current maximum value of the adjustment * * Since: 2.14 **/ @@ -650,13 +650,12 @@ gtk_adjustment_get_upper (GtkAdjustment *adjustment) * * Sets the maximum value of the adjustment. * - * Note that values will be restricted by - * `upper - page-size` if the page-size - * property is nonzero. + * Note that values will be restricted by `upper - page-size` + * if the page-size property is nonzero. * * See gtk_adjustment_set_lower() about how to compress multiple - * emissions of the #GtkAdjustment::changed signal when setting multiple adjustment - * properties. + * emissions of the #GtkAdjustment::changed signal when setting + * multiple adjustment properties. * * Since: 2.14 **/ @@ -696,8 +695,8 @@ gtk_adjustment_get_step_increment (GtkAdjustment *adjustment) * Sets the step increment of the adjustment. * * See gtk_adjustment_set_lower() about how to compress multiple - * emissions of the #GtkAdjustment::changed signal when setting multiple adjustment - * properties. + * emissions of the #GtkAdjustment::changed signal when setting + * multiple adjustment properties. * * Since: 2.14 **/ @@ -717,7 +716,7 @@ gtk_adjustment_set_step_increment (GtkAdjustment *adjustment, * * Retrieves the page increment of the adjustment. * - * Returns: The current page increment of the adjustment. + * Returns: The current page increment of the adjustment * * Since: 2.14 **/ @@ -737,8 +736,8 @@ gtk_adjustment_get_page_increment (GtkAdjustment *adjustment) * Sets the page increment of the adjustment. * * See gtk_adjustment_set_lower() about how to compress multiple - * emissions of the #GtkAdjustment::changed signal when setting multiple adjustment - * properties. + * emissions of the #GtkAdjustment::changed signal when setting + * multiple adjustment properties. * * Since: 2.14 **/ @@ -758,7 +757,7 @@ gtk_adjustment_set_page_increment (GtkAdjustment *adjustment, * * Retrieves the page size of the adjustment. * - * Returns: The current page size of the adjustment. + * Returns: The current page size of the adjustment * * Since: 2.14 **/ @@ -778,8 +777,8 @@ gtk_adjustment_get_page_size (GtkAdjustment *adjustment) * Sets the page size of the adjustment. * * See gtk_adjustment_set_lower() about how to compress multiple - * emissions of the GtkAdjustment::changed signal when setting multiple adjustment - * properties. + * emissions of the GtkAdjustment::changed signal when setting + * multiple adjustment properties. * * Since: 2.14 **/ @@ -805,9 +804,10 @@ gtk_adjustment_set_page_size (GtkAdjustment *adjustment, * * Sets all properties of the adjustment at once. * - * Use this function to avoid multiple emissions of the #GtkAdjustment::changed - * signal. See gtk_adjustment_set_lower() for an alternative way - * of compressing multiple emissions of #GtkAdjustment::changed into one. + * Use this function to avoid multiple emissions of the + * #GtkAdjustment::changed signal. See gtk_adjustment_set_lower() + * for an alternative way of compressing multiple emissions of + * #GtkAdjustment::changed into one. * * Since: 2.14 **/ @@ -882,7 +882,7 @@ gtk_adjustment_changed (GtkAdjustment *adjustment) * gtk_adjustment_value_changed: * @adjustment: a #GtkAdjustment * - * Emits a #GtkAdjustment::value_changed signal from the #GtkAdjustment. + * Emits a #GtkAdjustment::value-changed signal from the #GtkAdjustment. * This is typically called by the owner of the #GtkAdjustment after it has * changed the #GtkAdjustment:value property. */ @@ -897,16 +897,17 @@ gtk_adjustment_value_changed (GtkAdjustment *adjustment) /** * gtk_adjustment_clamp_page: - * @adjustment: a #GtkAdjustment. - * @lower: the lower value. - * @upper: the upper value. + * @adjustment: a #GtkAdjustment + * @lower: the lower value + * @upper: the upper value * * Updates the #GtkAdjustment:value property to ensure that the range * between @lower and @upper is in the current page (i.e. between - * #GtkAdjustment:value and #GtkAdjustment:value + #GtkAdjustment:page_size). + * #GtkAdjustment:value and #GtkAdjustment:value + #GtkAdjustment:page-size). * If the range is larger than the page size, then only the start of it will * be in the current page. - * A #GtkAdjustment::changed signal will be emitted if the value is changed. + * + * A #GtkAdjustment::value-changed signal will be emitted if the value is changed. */ void gtk_adjustment_clamp_page (GtkAdjustment *adjustment, @@ -1010,7 +1011,7 @@ gtk_adjustment_enable_animation (GtkAdjustment *adjustment, g_object_ref (priv->clock); } - priv->duration = duration; + priv->duration = duration; } guint |