- static GtkType scrollbar_type = 0;
-
- if (!scrollbar_type)
- {
- GtkTypeInfo scrollbar_info =
- {
- "GtkScrollbar",
- sizeof (GtkScrollbar),
- sizeof (GtkScrollbarClass),
- (GtkClassInitFunc) gtk_scrollbar_class_init,
- (GtkObjectInitFunc) gtk_scrollbar_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- scrollbar_type = gtk_type_unique (GTK_TYPE_RANGE, &scrollbar_info);
- }
-
- return scrollbar_type;
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
+
+ widget_class->style_updated = gtk_scrollbar_style_updated;
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("min-slider-length",
+ P_("Minimum Slider Length"),
+ P_("Minimum length of scrollbar slider"),
+ 0,
+ G_MAXINT,
+ 21,
+ GTK_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("fixed-slider-length",
+ P_("Fixed slider size"),
+ P_("Don't change slider size, just lock it to the minimum length"),
+ FALSE,
+ GTK_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("has-backward-stepper",
+ P_("Backward stepper"),
+ P_("Display the standard backward arrow button"),
+ TRUE,
+ GTK_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("has-forward-stepper",
+ P_("Forward stepper"),
+ P_("Display the standard forward arrow button"),
+ TRUE,
+ GTK_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("has-secondary-backward-stepper",
+ P_("Secondary backward stepper"),
+ P_("Display a second backward arrow button on the opposite end of the scrollbar"),
+ FALSE,
+ GTK_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("has-secondary-forward-stepper",
+ P_("Secondary forward stepper"),
+ P_("Display a second forward arrow button on the opposite end of the scrollbar"),
+ FALSE,
+ GTK_PARAM_READABLE));
+
+ gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_SCROLL_BAR);