summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c
blob: 04aba9206fb13bb08749c4a4a5471da609eeb2ce (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

EAPI void
elm_animation_view_auto_play_set(Efl_Ui_Vg_Animation *obj, Eina_Bool auto_play)
{
   efl_ui_vg_animation_autoplay_set(obj, auto_play);
}

EAPI Eina_Bool
elm_animation_view_auto_play_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_autoplay_get(obj);
}

EAPI void
elm_animation_view_auto_repeat_set(Efl_Ui_Vg_Animation *obj, Eina_Bool autorepeat)
{
   efl_ui_vg_animation_autorepeat_set(obj, autorepeat);
}

EAPI Eina_Bool
elm_animation_view_auto_repeat_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_autorepeat_get(obj);
}

EAPI Eina_Bool
elm_animation_view_speed_set(Efl_Ui_Vg_Animation *obj, double speed)
{
   if (!obj) return EINA_FALSE;
   efl_player_playback_speed_set(obj, speed);
   return EINA_TRUE;
}

EAPI double
elm_animation_view_speed_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_player_playback_speed_get(obj);
}

EAPI double
elm_animation_view_duration_time_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_playable_length_get(obj);
}

EAPI void
elm_animation_view_progress_set(Efl_Ui_Vg_Animation *obj, double progress)
{
   efl_player_playback_progress_set(obj, progress);
}

EAPI double
elm_animation_view_progress_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_player_playback_progress_get(obj);
}

EAPI void
elm_animation_view_frame_set(Efl_Ui_Vg_Animation *obj, int frame_num)
{
   efl_ui_vg_animation_frame_set(obj, frame_num);
}

EAPI int
elm_animation_view_frame_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_frame_get(obj);
}

EAPI Eina_Bool
elm_animation_view_play(Efl_Ui_Vg_Animation *obj)
{
   double speed = efl_player_playback_speed_get(obj);
   efl_player_playback_speed_set(obj, speed < 0 ? speed * -1 : speed);
   return efl_player_playing_set(obj, EINA_TRUE);
}

EAPI Eina_Bool
elm_animation_view_play_back(Efl_Ui_Vg_Animation *obj)
{
   double speed = efl_player_playback_speed_get(obj);
   efl_player_playback_speed_set(obj, speed > 0 ? speed * -1 : speed);
   return efl_player_playing_set(obj, EINA_TRUE);
}

EAPI Eina_Bool
elm_animation_view_pause(Efl_Ui_Vg_Animation *obj)
{
   return efl_player_paused_set(obj, EINA_TRUE);
}

EAPI Eina_Bool
elm_animation_view_resume(Efl_Ui_Vg_Animation *obj)
{
   return efl_player_paused_set(obj, EINA_FALSE);
}

EAPI Eina_Bool
elm_animation_view_stop(Efl_Ui_Vg_Animation *obj)
{
   return efl_player_playing_set(obj, EINA_FALSE);
}

EAPI Eina_Size2D
elm_animation_view_default_size_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_default_view_size_get(obj);
}

EAPI Eina_Bool
elm_animation_view_is_playing_back(Efl_Ui_Vg_Animation *obj)
{
   return (efl_ui_vg_animation_state_get(obj) == EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS);
}

EAPI int
elm_animation_view_frame_count_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_frame_count_get(obj);
}

EAPI void
elm_animation_view_min_progress_set(Efl_Ui_Vg_Animation *obj, double min_progress)
{
   efl_ui_vg_animation_min_progress_set(obj, min_progress);
}

EAPI double
elm_animation_view_min_progress_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_min_progress_get(obj);
}

EAPI void
elm_animation_view_max_progress_set(Efl_Ui_Vg_Animation *obj, double max_progress)
{
   efl_ui_vg_animation_max_progress_set(obj, max_progress);
}

EAPI double
elm_animation_view_max_progress_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_max_progress_get(obj);
}

EAPI void
elm_animation_view_min_frame_set(Efl_Ui_Vg_Animation *obj, int min_frame)
{
   efl_ui_vg_animation_min_frame_set(obj, min_frame);
}

EAPI int
elm_animation_view_min_frame_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_min_frame_get(obj);
}

EAPI void
elm_animation_view_max_frame_set(Efl_Ui_Vg_Animation *obj, int max_frame)
{
   efl_ui_vg_animation_max_frame_set(obj, max_frame);
}

EAPI int
elm_animation_view_max_frame_get(const Efl_Ui_Vg_Animation *obj)
{
   return efl_ui_vg_animation_max_frame_get(obj);
}

static Eina_Bool
_efl_ui_vg_animation_legacy_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
#define EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_vg_animation_legacy_efl_object_constructor),
      EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
   );
   opsp = &ops;

   return efl_class_functions_set(klass, opsp, ropsp);
}

static const Efl_Class_Description _efl_ui_vg_animation_legacy_class_desc = {
   EO_VERSION,
   "Efl.Ui.VG_Animation_Legacy",
   EFL_CLASS_TYPE_REGULAR,
   0,
   _efl_ui_vg_animation_legacy_class_initializer,
   _efl_ui_vg_animation_legacy_class_constructor,
   NULL
};

EFL_DEFINE_CLASS(efl_ui_vg_animation_legacy_class_get, &_efl_ui_vg_animation_legacy_class_desc, EFL_UI_VG_ANIMATION_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);