/* Returns: TRUE if a source was found and removed.  */
gboolean g_source_remove_by_funcs_user_data(GSourceFuncs *funcs, gpointer user_data)
/* Returns: TRUE if a source was found and removed.  */
gboolean g_source_remove_by_funcs_user_data(GSourceFuncs *funcs, gpointer user_data)
{
  GSource *source;
  g_return_val_if_fail (funcs != NULL, FALSE);
  source = g_main_context_find_source_by_funcs_user_data (NULL, funcs, user_data);
  if (source)
    {
      g_source_destroy (source);
      return TRUE;
    }
  else
    return FALSE;
}