summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_vg_animation_private.h
blob: 98304f39adcd99a0dbde3f12a1c2f50a9018aa11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef EFL_UI_VG_ANIMATION_PRIVATE_H
#define EFL_UI_VG_ANIMATION_PRIVATE_H

#include "Elementary.h"
#include "efl_ui_vg_animation.eo.h"

typedef struct _Efl_Ui_Vg_Animation_Data Efl_Ui_Vg_Animation_Data;

struct _Efl_Ui_Vg_Animation_Data
{
   Eo* vg;                            //Evas_Object_Vg
   Efl_Ui_Vg_Animation_State state;
   Elm_Transit *transit;
   Eina_Stringshare *file;
   double playback_speed;
   double progress;
   double frame_cnt;
   int repeat_times;
   double frame_duration;
   double min_progress;
   double max_progress;
   Eina_List *vp_list;

   Eina_Bool playing_reverse : 1;
   Eina_Bool autoplay : 1;
   Eina_Bool autoplay_pause: 1;
   Eina_Bool looping : 1;
   Eina_Bool playback_direction_changed : 1;
};

#define EFL_UI_VG_ANIMATION_DATA_GET(o, sd) \
  Efl_Ui_Vg_Animation_Data * sd = efl_data_scope_safe_get(o, EFL_UI_VG_ANIMATION_CLASS)

#define EFL_UI_VG_ANIMATION_DATA_GET_OR_RETURN(o, ptr)   \
  EFL_UI_VG_ANIMATION_DATA_GET(o, ptr);                  \
  if (EINA_UNLIKELY(!ptr))                              \
    {                                                   \
       ERR("No widget data for object %p (%s)",         \
           o, evas_object_type_get(o));                 \
       return;                                          \
    }

#endif