+ /**
+ * GtkRange::value-changed:
+ * @range: the #GtkRange
+ *
+ * Emitted when the range value changes.
+ */
+ signals[VALUE_CHANGED] =
+ g_signal_new (I_("value_changed"),
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GtkRangeClass, value_changed),
+ NULL, NULL,
+ _gtk_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
+
+ signals[ADJUST_BOUNDS] =
+ g_signal_new (I_("adjust_bounds"),
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GtkRangeClass, adjust_bounds),
+ NULL, NULL,
+ _gtk_marshal_VOID__DOUBLE,
+ G_TYPE_NONE, 1,
+ G_TYPE_DOUBLE);
+
+ /**
+ * GtkRange::move-slider:
+ * @range: the #GtkRange
+ * @step: how to move the slider
+ *
+ * Virtual function that moves the slider. Used for keybindings.
+ */
+ signals[MOVE_SLIDER] =
+ g_signal_new (I_("move_slider"),
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (GtkRangeClass, move_slider),
+ NULL, NULL,
+ _gtk_marshal_VOID__ENUM,
+ G_TYPE_NONE, 1,
+ GTK_TYPE_SCROLL_TYPE);
+
+ /**
+ * GtkRange::change-value:
+ * @range: the range that received the signal
+ * @scroll: the type of scroll action that was performed
+ * @value: the new value resulting from the scroll action
+ * @returns: %TRUE to prevent other handlers from being invoked for the
+ * signal, %FALSE to propagate the signal further
+ *
+ * The ::change-value signal is emitted when a scroll action is
+ * performed on a range. It allows an application to determine the
+ * type of scroll event that occurred and the resultant new value.
+ * The application can handle the event itself and return %TRUE to
+ * prevent further processing. Or, by returning %FALSE, it can pass
+ * the event to other handlers until the default GTK+ handler is
+ * reached.
+ *
+ * The value parameter is unrounded. An application that overrides
+ * the ::change-value signal is responsible for clamping the value to
+ * the desired number of decimal digits; the default GTK+ handler
+ * clamps the value based on @range->round_digits.
+ *
+ * It is not possible to use delayed update policies in an overridden
+ * ::change-value handler.
+ *
+ * Since: 2.6
+ */
+ signals[CHANGE_VALUE] =
+ g_signal_new (I_("change_value"),
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GtkRangeClass, change_value),
+ _gtk_boolean_handled_accumulator, NULL,
+ _gtk_marshal_BOOLEAN__ENUM_DOUBLE,
+ G_TYPE_BOOLEAN, 2,
+ GTK_TYPE_SCROLL_TYPE,
+ G_TYPE_DOUBLE);
+
+ g_object_class_install_property (gobject_class,
+ PROP_UPDATE_POLICY,
+ g_param_spec_enum ("update-policy",
+ P_("Update policy"),
+ P_("How the range should be updated on the screen"),
+ GTK_TYPE_UPDATE_TYPE,
+ GTK_UPDATE_CONTINUOUS,
+ GTK_PARAM_READWRITE));
+
+ g_object_class_install_property (gobject_class,
+ PROP_ADJUSTMENT,
+ g_param_spec_object ("adjustment",
+ P_("Adjustment"),
+ P_("The GtkAdjustment that contains the current value of this range object"),
+ GTK_TYPE_ADJUSTMENT,
+ GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property (gobject_class,
+ PROP_INVERTED,
+ g_param_spec_boolean ("inverted",
+ P_("Inverted"),
+ P_("Invert direction slider moves to increase range value"),
+ FALSE,
+ GTK_PARAM_READWRITE));
+
+ g_object_class_install_property (gobject_class,
+ PROP_LOWER_STEPPER_SENSITIVITY,
+ g_param_spec_enum ("lower-stepper-sensitivity",
+ P_("Lower stepper sensitivity"),
+ P_("The sensitivity policy for the stepper that points to the adjustment's lower side"),
+ GTK_TYPE_SENSITIVITY_TYPE,
+ GTK_SENSITIVITY_AUTO,
+ GTK_PARAM_READWRITE));
+
+ g_object_class_install_property (gobject_class,
+ PROP_UPPER_STEPPER_SENSITIVITY,
+ g_param_spec_enum ("upper-stepper-sensitivity",
+ P_("Upper stepper sensitivity"),
+ P_("The sensitivity policy for the stepper that points to the adjustment's upper side"),
+ GTK_TYPE_SENSITIVITY_TYPE,
+ GTK_SENSITIVITY_AUTO,
+ GTK_PARAM_READWRITE));
+
+ /**
+ * GtkRange:show-fill-level:
+ *
+ * The show-fill-level property controls whether fill level indicator
+ * graphics are displayed on the trough. See
+ * gtk_range_set_show_fill_level().
+ *
+ * Since: 2.12
+ **/
+ g_object_class_install_property (gobject_class,
+ PROP_SHOW_FILL_LEVEL,
+ g_param_spec_boolean ("show-fill-level",
+ P_("Show Fill Level"),
+ P_("Whether to display a fill level indicator graphics on trough."),
+ FALSE,
+ GTK_PARAM_READWRITE));
+
+ /**
+ * GtkRange:restrict-to-fill-level:
+ *
+ * The restrict-to-fill-level property controls whether slider
+ * movement is restricted to an upper boundary set by the
+ * fill level. See gtk_range_set_restrict_to_fill_level().
+ *
+ * Since: 2.12
+ **/
+ g_object_class_install_property (gobject_class,
+ PROP_RESTRICT_TO_FILL_LEVEL,
+ g_param_spec_boolean ("restrict-to-fill-level",
+ P_("Restrict to Fill Level"),
+ P_("Whether to restrict the upper boundary to the fill level."),
+ TRUE,
+ GTK_PARAM_READWRITE));
+
+ /**
+ * GtkRange:fill-level:
+ *
+ * The fill level (e.g. prebuffering of a network stream).
+ * See gtk_range_set_fill_level().
+ *
+ * Since: 2.12
+ **/
+ g_object_class_install_property (gobject_class,
+ PROP_FILL_LEVEL,
+ g_param_spec_double ("fill-level",
+ P_("Fill Level"),
+ P_("The fill level."),
+ -G_MAXDOUBLE,
+ G_MAXDOUBLE,
+ G_MAXDOUBLE,
+ GTK_PARAM_READWRITE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("slider-width",
+ P_("Slider Width"),
+ P_("Width of scrollbar or scale thumb"),
+ 0,
+ G_MAXINT,
+ 14,
+ GTK_PARAM_READABLE));
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("trough-border",
+ P_("Trough Border"),
+ P_("Spacing between thumb/steppers and outer trough bevel"),
+ 0,
+ G_MAXINT,
+ 1,
+ GTK_PARAM_READABLE));
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("stepper-size",
+ P_("Stepper Size"),
+ P_("Length of step buttons at ends"),
+ 0,
+ G_MAXINT,
+ 14,
+ GTK_PARAM_READABLE));
+ /**
+ * GtkRange:stepper-spacing:
+ *
+ * The spacing between the stepper buttons and thumb. Note that
+ * setting this value to anything > 0 will automatically set the
+ * trough-under-steppers style property to %TRUE as well. Also,
+ * stepper-spacing won't have any effect if there are no steppers.
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("stepper-spacing",
+ P_("Stepper Spacing"),
+ P_("Spacing between step buttons and thumb"),
+ 0,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READABLE));
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("arrow-displacement-x",
+ P_("Arrow X Displacement"),
+ P_("How far in the x direction to move the arrow when the button is depressed"),
+ G_MININT,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READABLE));
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("arrow-displacement-y",
+ P_("Arrow Y Displacement"),
+ P_("How far in the y direction to move the arrow when the button is depressed"),
+ G_MININT,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("activate-slider",
+ P_("Draw slider ACTIVE during drag"),
+ P_("With this option set to TRUE, sliders will be drawn ACTIVE and with shadow IN while they are dragged"),
+ FALSE,
+ GTK_PARAM_READABLE));
+
+ /**
+ * GtkRange:trough-side-details:
+ *
+ * When %TRUE, the parts of the trough on the two sides of the
+ * slider are drawn with different details.
+ *
+ * Since: 2.10
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("trough-side-details",
+ P_("Trough Side Details"),
+ P_("When TRUE, the parts of the trough on the two sides of the slider are drawn with different details"),
+ FALSE,
+ GTK_PARAM_READABLE));
+
+ /**
+ * GtkRange:trough-under-steppers:
+ *
+ * Whether to draw the trough across the full length of the range or
+ * to exclude the steppers and their spacing. Note that setting the
+ * #GtkRange:stepper-spacing style property to any value > 0 will
+ * automatically enable trough-under-steppers too.
+ *
+ * Since: 2.10
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("trough-under-steppers",
+ P_("Trough Under Steppers"),
+ P_("Whether to draw trough for full length of range or exclude the steppers and spacing"),
+ TRUE,
+ GTK_PARAM_READABLE));
+
+ g_type_class_add_private (class, sizeof (GtkRangeLayout));