Document that G_SOURCE_CONTINUE and G_SOURCE_REMOVE are the preferred
return values from a tick callback.
ref_tick_callback_info (info);
if (!info->destroyed)
{
- if (!info->callback (widget,
- frame_clock,
- info->user_data))
+ if (info->callback (widget,
+ frame_clock,
+ info->user_data) == G_SOURCE_REMOVE)
{
destroy_tick_callback_info (widget, info, l);
}
*
* Callback type for adding a function to update animations. See gtk_widget_add_tick_callback().
*
- * Returns: %TRUE if the tick callback should continue to be called,
- * %FALSE if the tick callback should be removed.
+ * Returns: %G_SOURCE_CONTINUE if the tick callback should continue to be called,
+ * %G_SOURCE_REMOVE if the tick callback should be removed.
*/
typedef gboolean (*GtkTickCallback) (GtkWidget *widget,
GdkFrameClock *frame_clock,
scaled_time = (frame_time - start_frame_time) / (CYCLE_TIME * 1000000);
on_frame (scaled_time - floor (scaled_time));
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static gboolean