summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_animation_object_private.h
blob: 578e478537b2c8ca73f8dba2457204ceccedf0a4 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#define EFL_ANIMATION_OBJECT_PROTECTED

#include "evas_common_private.h"
#include <Ecore.h>

#define MY_CLASS EFL_ANIMATION_OBJECT_CLASS
#define MY_CLASS_NAME efl_class_name_get(MY_CLASS)

typedef struct _Target_State
{
   Evas_Coord x, y, w, h;
   int        r, g, b, a;

   Evas_Map  *map;
   Eina_Bool  enable_map : 1;
} Target_State;

typedef struct _Efl_Animation_Object_Data
{
   Ecore_Animator                  *animator;

   Ecore_Timer                     *start_delay_timer;
   double                           start_delay_time;

   struct {
        double begin;
        double current;
        double pause_begin;
     } time;

   Efl_Canvas_Object               *target;
   Target_State                    *target_state;

   double                           progress;

   double                           duration;
   double                           total_duration;
   double                           paused_time;

   Efl_Animation_Object_Repeat_Mode repeat_mode;
   int                              repeat_count;
   int                              remaining_repeat_count;

   Efl_Interpolator                *interpolator;

   Eina_Bool                        auto_del : 1;
   Eina_Bool                        is_started : 1;
   Eina_Bool                        is_cancelled : 1;
   Eina_Bool                        is_ended : 1;
   Eina_Bool                        is_paused : 1;
   Eina_Bool                        keep_final_state : 1;
   Eina_Bool                        is_direction_forward : 1;
   Eina_Bool                        is_direction_changed : 1;
} Efl_Animation_Object_Data;

#define EFL_ANIMATION_OBJECT_DATA_GET(o, pd) \
   Efl_Animation_Object_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_CLASS)