mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-17 07:30:09 +00:00
widgets: Remove (GtkTickCallback) casts
Instead, make the functions conform to the prototype, so that casting isn't needed.
This commit is contained in:
parent
6061f234a9
commit
73aa7bd2f5
@ -2733,7 +2733,7 @@ add_autoscroll (GtkFlowBox *box)
|
||||
return;
|
||||
|
||||
priv->autoscroll_id = gtk_widget_add_tick_callback (GTK_WIDGET (box),
|
||||
(GtkTickCallback)autoscroll_cb,
|
||||
autoscroll_cb,
|
||||
box,
|
||||
NULL);
|
||||
}
|
||||
|
@ -2877,7 +2877,7 @@ add_autoscroll (GtkRange *range)
|
||||
return;
|
||||
|
||||
priv->autoscroll_id = gtk_widget_add_tick_callback (GTK_WIDGET (range),
|
||||
(GtkTickCallback)autoscroll_cb,
|
||||
autoscroll_cb,
|
||||
range,
|
||||
NULL);
|
||||
}
|
||||
|
@ -547,10 +547,11 @@ gtk_revealer_animate_step (GtkRevealer *revealer,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_revealer_animate_cb (GtkRevealer *revealer,
|
||||
gtk_revealer_animate_cb (GtkWidget *widget,
|
||||
GdkFrameClock *frame_clock,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkRevealer *revealer = GTK_REVEALER (widget);
|
||||
GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer);
|
||||
gint64 now;
|
||||
|
||||
@ -589,7 +590,7 @@ gtk_revealer_start_animation (GtkRevealer *revealer,
|
||||
priv->end_time = priv->start_time + (priv->transition_duration * 1000);
|
||||
if (priv->tick_id == 0)
|
||||
priv->tick_id =
|
||||
gtk_widget_add_tick_callback (widget, (GtkTickCallback)gtk_revealer_animate_cb, revealer, NULL);
|
||||
gtk_widget_add_tick_callback (widget, gtk_revealer_animate_cb, revealer, NULL);
|
||||
gtk_revealer_animate_step (revealer, priv->start_time);
|
||||
}
|
||||
else
|
||||
|
@ -767,10 +767,11 @@ gtk_stack_set_transition_position (GtkStack *stack,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_stack_transition_cb (GtkStack *stack,
|
||||
gtk_stack_transition_cb (GtkWidget *widget,
|
||||
GdkFrameClock *frame_clock,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkStack *stack = GTK_STACK (widget);
|
||||
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
|
||||
gint64 now;
|
||||
gdouble t;
|
||||
@ -805,7 +806,7 @@ gtk_stack_schedule_ticks (GtkStack *stack)
|
||||
if (priv->tick_id == 0)
|
||||
{
|
||||
priv->tick_id =
|
||||
gtk_widget_add_tick_callback (GTK_WIDGET (stack), (GtkTickCallback)gtk_stack_transition_cb, stack, NULL);
|
||||
gtk_widget_add_tick_callback (GTK_WIDGET (stack), gtk_stack_transition_cb, stack, NULL);
|
||||
g_object_notify_by_pspec (G_OBJECT (stack), stack_props[PROP_TRANSITION_RUNNING]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user