scrollbar: Remove get_wheel_delta

Unused and undocumented.
This commit is contained in:
Timm Bäder 2018-05-16 14:08:19 +02:00
parent caaa3f8200
commit a0d0b52034
2 changed files with 0 additions and 43 deletions

View File

@ -323,43 +323,3 @@ gtk_scrollbar_get_adjustment (GtkScrollbar *self)
return gtk_range_get_adjustment (GTK_RANGE (priv->range));
}
double
gtk_scrollbar_get_wheel_delta (GtkScrollbar *self,
const GdkEventScroll *event)
{
GtkScrollbarPrivate *priv = gtk_scrollbar_get_instance_private (self);
GtkAdjustment *adjustment;
gdouble dx, dy;
gdouble delta = 0;
gdouble page_size;
gdouble scroll_unit;
GdkScrollDirection direction;
adjustment = gtk_scrollbar_get_adjustment (self);
page_size = gtk_adjustment_get_page_size (adjustment);
scroll_unit = pow (page_size, 2.0 / 3.0);
if (gdk_event_get_scroll_deltas ((GdkEvent *) event, &dx, &dy))
{
#ifdef GDK_WINDOWING_QUARTZ
scroll_unit = 1;
#endif
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
delta = - (dx ? dx : dy) * scroll_unit;
else
delta = dy * scroll_unit;
}
else if (gdk_event_get_scroll_direction ((GdkEvent *) event, &direction))
{
if (direction == GDK_SCROLL_UP ||
direction == GDK_SCROLL_LEFT)
delta = - scroll_unit;
else
delta = scroll_unit;
}
return delta;
}

View File

@ -73,9 +73,6 @@ void gtk_scrollbar_set_adjustment (GtkScrollbar *self,
GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
GtkAdjustment *gtk_scrollbar_get_adjustment (GtkScrollbar *self);
GDK_AVAILABLE_IN_ALL
double gtk_scrollbar_get_wheel_delta (GtkScrollbar *self,
const GdkEventScroll *event);
G_END_DECLS