コード例 #1
0
ファイル: gtkcssanimation.c プロジェクト: 3v1n0/gtk
const char *
_gtk_css_animation_get_name (GtkCssAnimation *animation)
{
  g_return_val_if_fail (GTK_IS_CSS_ANIMATION (animation), NULL);

  return animation->name;
}
コード例 #2
0
ファイル: gtkcsscomputedvalues.c プロジェクト: soreau/gtk
static GtkStyleAnimation *
gtk_css_computed_values_find_animation (GtkCssComputedValues *values,
                                        const char           *name)
{
    GSList *list;

    for (list = values->animations; list; list = list->next)
    {
        if (!GTK_IS_CSS_ANIMATION (list->data))
            continue;

        if (g_str_equal (_gtk_css_animation_get_name (list->data), name))
            return list->data;
    }

    return NULL;
}
コード例 #3
0
ファイル: gtkcssanimatedstyle.c プロジェクト: GYGit/gtk
static GtkStyleAnimation *
gtk_css_animated_style_find_animation (GSList     *animations,
                                       const char *name)
{
  GSList *list;

  for (list = animations; list; list = list->next)
    {
      if (!GTK_IS_CSS_ANIMATION (list->data))
        continue;

      if (g_str_equal (_gtk_css_animation_get_name (list->data), name))
        return list->data;
    }

  return NULL;
}
コード例 #4
0
ファイル: gtkcssanimation.c プロジェクト: 3v1n0/gtk
GtkStyleAnimation *
_gtk_css_animation_copy (GtkCssAnimation *animation,
                         gint64           at_time_us,
                         GtkCssPlayState  play_state)
{
  g_return_val_if_fail (GTK_IS_CSS_ANIMATION (animation), NULL);

  if (animation->play_state == play_state)
    return g_object_ref (animation);

  return _gtk_css_animation_new (animation->name,
                                 animation->keyframes,
                                 at_time_us,
                                 - gtk_css_animation_get_elapsed (animation, at_time_us),
                                 animation->duration,
                                 animation->ease,
                                 animation->direction,
                                 play_state,
                                 animation->fill_mode,
                                 animation->iteration_count);
}