2 * Copyright © 2010-2011 Intel Corporation
3 * Copyright © 2008-2011 Kristian Høgsberg
4 * Copyright © 2013 TOYOTA MOTOR CORPORATION.
6 * Permission to use, copy, modify, distribute, and sell this software and
7 * its documentation for any purpose is hereby granted without fee, provided
8 * that the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of the copyright holders not be used in
11 * advertising or publicity pertaining to distribution of the software
12 * without specific, written prior permission. The copyright holders make
13 * no representations about the suitability of this software for any
14 * purpose. It is provided "as is" without express or implied warranty.
16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
18 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
20 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
21 * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
22 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 * @brief Window Animation (Weston(Wayland) PlugIn)
37 #include <sys/types.h>
41 #include <weston/compositor.h>
42 #include "ico_ivi_common.h"
43 #include "ico_ivi_shell.h"
44 #include "ico_window_mgr.h"
47 #define ANIMA_ZOOM 1 /* ZoomIn/ZoomOut */
48 #define ANIMA_FADE 2 /* FadeIn/FadeOut */
49 #define ANIMA_SLIDE_TORIGHT 3 /* SlideIn left to right/SlideOut right to left*/
50 #define ANIMA_SLIDE_TOLEFT 4 /* SlideIn right to left/SlideOut left to right*/
51 #define ANIMA_SLIDE_TOBOTTOM 5 /* SlideIn top to bottom/SlideOut bottom to top*/
52 #define ANIMA_SLIDE_TOTOP 6 /* SlideIn bottom to top/SlideOut top to bottom*/
54 /* Visible control at end of animation */
55 #define ANIMA_NOCONTROL_AT_END 0 /* no need surface show/hide at end of animation*/
56 #define ANIMA_SHOW_AT_END 1 /* surface show at end of animation */
57 #define ANIMA_HIDE_AT_END 2 /* surface hide at end of animation */
60 struct animation_data {
61 struct animation_data *next_free; /* free data list */
62 int x; /* original X coordinate */
63 int y; /* original Y coordinate */
64 int width; /* original width */
65 int height; /* original height */
66 char geometry_saved; /* need geometry restore at end */
67 char transform_set; /* need transform reset at end */
68 char res[2]; /* (unused) */
69 struct weston_transform transform; /* transform matrix */
70 void (*end_function)(struct weston_animation *animation);
71 /* animation end function */
74 /* static valiables */
75 static struct weston_compositor *weston_ec; /* Weston compositor */
76 static char *default_animation; /* default animation name */
77 static int animation_time; /* animation time(ms) */
78 static int animation_fpar; /* animation frame parcent(%) */
79 static struct animation_data *free_data; /* free data list */
83 static void animation_slide(struct weston_animation *animation,
84 struct weston_output *output, uint32_t msecs);
86 static void animation_fade(struct weston_animation *animation,
87 struct weston_output *output, uint32_t msecs);
88 /* fade animation end */
89 static void animation_fade_end(struct weston_animation *animation);
90 /* continue animation */
91 static int animation_cont(struct weston_animation *animation,
92 struct weston_output *output, uint32_t msecs);
93 /* terminate animation */
94 static void animation_end(struct uifw_win_surface *usurf, const int disp);
96 /*--------------------------------------------------------------------------*/
98 * @brief ico_window_animation: Animation addin entry
100 * @param[in] op animation operation
101 * @param[in] data data
103 * @retval ICO_WINDOW_MGR_ANIMATION_RET_ANIMA success
104 * @retval ICO_WINDOW_MGR_ANIMATION_RET_ANIMASHOW success(force visible)
105 * @retval ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA error(no animation)
107 /*--------------------------------------------------------------------------*/
109 ico_window_animation(const int op, void *data)
111 struct uifw_win_surface *usurf;
112 struct weston_output *output;
115 struct timeval nowtv;
119 if (op == ICO_WINDOW_MGR_ANIMATION_NAME) {
120 /* convert animation name to animation type value */
121 if (strcasecmp((char *)data, "fade") == 0) {
122 uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_FADE);
125 else if (strcasecmp((char *)data, "zoom") == 0) {
126 uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_ZOOM);
129 else if (strcasecmp((char *)data, "slide.toleft") == 0) {
130 uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TOLEFT);
131 return ANIMA_SLIDE_TOLEFT;
133 else if (strcasecmp((char *)data, "slide.toright") == 0) {
134 uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TORIGHT);
135 return ANIMA_SLIDE_TORIGHT;
137 else if (strcasecmp((char *)data, "slide.totop") == 0) {
138 uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TOTOP);
139 return ANIMA_SLIDE_TOTOP;
141 else if (strcasecmp((char *)data, "slide.tobottom") == 0) {
142 uifw_trace("ico_window_animation: Type %s(%d)", (char *)data, ANIMA_SLIDE_TOBOTTOM);
143 return ANIMA_SLIDE_TOBOTTOM;
145 uifw_warn("ico_window_animation: Unknown Type %s", (char *)data);
146 return ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA;
149 usurf = (struct uifw_win_surface *)data;
151 if (op == ICO_WINDOW_MGR_ANIMATION_DESTROY) {
152 if ((usurf->animation.state != ICO_WINDOW_MGR_ANIMATION_STATE_NONE) ||
153 (usurf->animation.animadata != NULL)) {
154 uifw_trace("ico_window_animation: Destroy %08x", (int)usurf);
155 animation_end(usurf, 0);
157 return ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA;
160 if (op == ICO_WINDOW_MGR_ANIMATION_OPCANCEL) {
161 /* cancel animation */
162 if ((usurf->animation.state != ICO_WINDOW_MGR_ANIMATION_STATE_NONE) &&
163 (usurf->animation.animation.frame != NULL)) {
164 uifw_trace("ico_window_animation: cancel %s.%08x",
165 usurf->uclient->appid, usurf->surfaceid);
166 (*usurf->animation.animation.frame)(&usurf->animation.animation, NULL, 0);
168 animation_end(usurf, 1);
169 ret = ICO_WINDOW_MGR_ANIMATION_RET_ANIMA;
172 /* setup animation */
173 if ((usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_NONE) ||
174 (usurf->animation.current > 95)) {
175 usurf->animation.animation.frame_counter = 1;
176 usurf->animation.current = 0;
177 if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_NONE) {
178 wl_list_init(&usurf->animation.animation.link);
179 output = container_of(weston_ec->output_list.next,
180 struct weston_output, link);
181 wl_list_insert(output->animation_list.prev,
182 &usurf->animation.animation.link);
185 else if (((usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) &&
186 (op == ICO_WINDOW_MGR_ANIMATION_OPHIDE)) ||
187 ((usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_HIDE) &&
188 (op == ICO_WINDOW_MGR_ANIMATION_OPSHOW))) {
189 /* change ...In(ex.FadeIn) to ...Out(FadeOut) or ...Out to ...In */
190 gettimeofday(&nowtv, NULL);
191 nowsec = (uint32_t)(((long long)nowtv.tv_sec) * 1000L +
192 ((long long)nowtv.tv_usec) / 1000L);
193 usurf->animation.current = 100 - usurf->animation.current;
194 if (op == ICO_WINDOW_MGR_ANIMATION_OPHIDE) {
195 time = usurf->animation.hide_time;
198 time = usurf->animation.show_time;
200 time = (time > 0) ? time : animation_time;
201 ret = ((usurf->animation.current) * time) / 100;
202 if (nowsec >= (uint32_t)ret) {
203 usurf->animation.starttime = nowsec - ret;
206 usurf->animation.starttime = ((long long)nowsec) + ((long long)0x100000000L)
209 usurf->animation.animation.frame_counter = 2;
212 /* set animation function */
213 if (op == ICO_WINDOW_MGR_ANIMATION_OPSHOW) {
214 usurf->animation.state = ICO_WINDOW_MGR_ANIMATION_STATE_SHOW;
215 name = usurf->animation.show_name;
216 usurf->animation.name = name;
217 uifw_trace("ico_window_animation: show(in) %s.%08x anima=%d",
218 usurf->uclient->appid, usurf->surfaceid, name);
219 ret = ICO_WINDOW_MGR_ANIMATION_RET_ANIMA;
221 else if (op == ICO_WINDOW_MGR_ANIMATION_OPHIDE) {
222 usurf->animation.state = ICO_WINDOW_MGR_ANIMATION_STATE_HIDE;
223 name = usurf->animation.hide_name;
224 usurf->animation.name = name;
225 uifw_trace("ico_window_animation: hide(out) %s.%08x anima=%d",
226 usurf->uclient->appid, usurf->surfaceid, name);
227 ret = ICO_WINDOW_MGR_ANIMATION_RET_ANIMASHOW;
229 else if (op == ICO_WINDOW_MGR_ANIMATION_OPMOVE) {
230 usurf->animation.state = ICO_WINDOW_MGR_ANIMATION_STATE_MOVE;
231 name = usurf->animation.move_name;
232 usurf->animation.name = name;
233 uifw_trace("ico_window_animation: move %s.%08x anima=%d",
234 usurf->uclient->appid, usurf->surfaceid, name);
235 ret = ICO_WINDOW_MGR_ANIMATION_RET_ANIMA;
238 usurf->animation.state = ICO_WINDOW_MGR_ANIMATION_STATE_RESIZE;
239 name = usurf->animation.resize_name;
240 usurf->animation.name = name;
241 uifw_trace("ico_window_animation: resize %s.%08x anima=%d",
242 usurf->uclient->appid, usurf->surfaceid, name);
243 ret = ICO_WINDOW_MGR_ANIMATION_RET_ANIMA;
245 if ((name == ANIMA_SLIDE_TOLEFT) || (name == ANIMA_SLIDE_TORIGHT) ||
246 (name == ANIMA_SLIDE_TOTOP) || (name == ANIMA_SLIDE_TOBOTTOM)) {
247 usurf->animation.animation.frame = animation_slide;
248 usurf->restrain_configure = 1;
249 (*usurf->animation.animation.frame)(&usurf->animation.animation, NULL, 1);
251 else if (name == ANIMA_FADE) {
252 usurf->animation.animation.frame = animation_fade;
253 (*usurf->animation.animation.frame)(&usurf->animation.animation, NULL, 1);
257 usurf->animation.animation.frame = NULL;
258 usurf->animation.state = ICO_WINDOW_MGR_ANIMATION_STATE_NONE;
259 usurf->restrain_configure = 0;
260 usurf->animation.name = 0;
261 wl_list_remove(&usurf->animation.animation.link);
262 ret = ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA;
264 usurf->animation.type = op;
266 if (ret == ICO_WINDOW_MGR_ANIMATION_RET_ANIMASHOW) {
267 usurf->animation.visible = ANIMA_HIDE_AT_END;
270 usurf->animation.visible = ANIMA_NOCONTROL_AT_END;
272 weston_compositor_schedule_repaint(weston_ec);
276 /*--------------------------------------------------------------------------*/
278 * @brief animation_cont: continue animation
280 * @param[in] animation weston animation table
281 * @param[in] output weston output table
282 * @param[in] msecs current time stamp
283 * @return time has come
284 * @retval =0 time has come
285 * @retval >0 time has not yet come(return value is current parcent)
287 /*--------------------------------------------------------------------------*/
289 animation_cont(struct weston_animation *animation, struct weston_output *output,
292 struct uifw_win_surface *usurf;
293 struct animation_data *animadata;
296 struct timeval nowtv;
299 gettimeofday(&nowtv, NULL);
300 nowsec = (uint32_t)(((long long)nowtv.tv_sec) * 1000L +
301 ((long long)nowtv.tv_usec) / 1000L);
303 usurf = container_of(animation, struct uifw_win_surface, animation.animation);
305 if (animation->frame_counter <= 1) {
306 /* first call, initialize */
307 animation->frame_counter = 1;
308 usurf->animation.starttime = nowsec;
309 usurf->animation.current = 1000;
310 if (! usurf->animation.animadata) {
312 usurf->animation.animadata = (void *)free_data;
313 free_data = free_data->next_free;
316 usurf->animation.animadata = (void *)malloc(sizeof(struct animation_data));
318 memset(usurf->animation.animadata, 0, sizeof(struct animation_data));
320 animadata = (struct animation_data *)usurf->animation.animadata;
321 animadata->x = usurf->x;
322 animadata->y = usurf->y;
323 animadata->width = usurf->width;
324 animadata->height = usurf->height;
325 animadata->geometry_saved = 1;
327 else if (! usurf->animation.animadata) {
328 animation_end(usurf, 0);
332 if (nowsec >= usurf->animation.starttime) {
333 nowsec = nowsec - usurf->animation.starttime; /* elapsed time(ms) */
336 nowsec = (uint32_t)(((long long)0x100000000L) +
337 ((long long)nowsec) - ((long long)usurf->animation.starttime));
339 switch (usurf->animation.state) {
340 case ICO_WINDOW_MGR_ANIMATION_STATE_SHOW:
341 time = usurf->animation.show_time;
343 case ICO_WINDOW_MGR_ANIMATION_STATE_HIDE:
344 time = usurf->animation.hide_time;
346 case ICO_WINDOW_MGR_ANIMATION_STATE_MOVE:
347 time = usurf->animation.move_time;
350 time = usurf->animation.resize_time;
353 time = (time > 0) ? time : animation_time;
354 if (((output == NULL) && (msecs == 0)) || (nowsec >= ((uint32_t)time))) {
358 par = (nowsec * 100 + time / 2) / time;
359 if (par < 2) par = 2;
362 (abs(usurf->animation.current - par) >= animation_fpar)) {
363 usurf->animation.current = par;
369 /*--------------------------------------------------------------------------*/
371 * @brief animation_end: terminate animation
373 * @param[in] usurf UIFW surface table
374 * @param[in] disp display control(1)/no display(0)
377 /*--------------------------------------------------------------------------*/
379 animation_end(struct uifw_win_surface *usurf, const int disp)
381 struct animation_data *animadata;
383 usurf->animation.state = ICO_WINDOW_MGR_ANIMATION_STATE_NONE;
384 animadata = (struct animation_data *)usurf->animation.animadata;
387 if (animadata->end_function) {
388 (*animadata->end_function)(&usurf->animation.animation);
390 if (animadata->geometry_saved > 1) {
391 usurf->x = animadata->x;
392 usurf->y = animadata->y;
393 usurf->width = animadata->width;
394 usurf->height = animadata->height;
395 animadata->geometry_saved = 0;
397 wl_list_remove(&usurf->animation.animation.link);
398 if (animadata->transform_set) {
399 wl_list_remove(&animadata->transform.link);
400 animadata->transform_set = 0;
402 weston_surface_geometry_dirty(usurf->surface);
405 if ((usurf->animation.visible == ANIMA_HIDE_AT_END) &&
406 (usurf->visible != 0)) {
407 ico_window_mgr_set_visible(usurf, 0);
408 weston_surface_damage(usurf->surface);
410 if ((usurf->animation.visible == ANIMA_SHOW_AT_END) &&
411 (usurf->visible == 0)) {
412 ico_window_mgr_set_visible(usurf, 1);
413 weston_surface_damage(usurf->surface);
415 usurf->restrain_configure = 0;
416 weston_surface_geometry_dirty(usurf->surface);
417 weston_compositor_schedule_repaint(weston_ec);
419 usurf->animation.visible = ANIMA_NOCONTROL_AT_END;
420 if (usurf->animation.next_name != ICO_WINDOW_MGR_ANIMATION_NONE) {
421 switch(usurf->animation.type) {
422 case ICO_WINDOW_MGR_ANIMATION_OPHIDE:
423 usurf->animation.hide_name = usurf->animation.next_name;
425 case ICO_WINDOW_MGR_ANIMATION_OPSHOW:
426 usurf->animation.show_name = usurf->animation.next_name;
428 case ICO_WINDOW_MGR_ANIMATION_OPMOVE:
429 usurf->animation.move_name = usurf->animation.next_name;
431 case ICO_WINDOW_MGR_ANIMATION_OPRESIZE:
432 usurf->animation.resize_name = usurf->animation.next_name;
437 usurf->animation.next_name = ICO_WINDOW_MGR_ANIMATION_NONE;
440 usurf->animation.animadata = NULL;
441 animadata->next_free = free_data;
442 free_data = animadata;
444 usurf->animation.type = ICO_WINDOW_MGR_ANIMATION_OPNONE;
447 /*--------------------------------------------------------------------------*/
449 * @brief animation_slide: slide animation
451 * @param[in] animation weston animation table
452 * @param[in] outout weston output table
453 * @param[in] mseces current time(unused)
456 /*--------------------------------------------------------------------------*/
458 animation_slide(struct weston_animation *animation,
459 struct weston_output *output, uint32_t msecs)
461 struct uifw_win_surface *usurf;
462 struct animation_data *animadata;
463 struct weston_surface *es;
469 usurf = container_of(animation, struct uifw_win_surface, animation.animation);
471 par = animation_cont(animation, output, msecs);
473 /* continue animation */
475 weston_compositor_schedule_repaint(weston_ec);
479 par = usurf->animation.current;
480 animadata = (struct animation_data *)usurf->animation.animadata;
482 uifw_trace("animation_slide: usurf=%08x count=%d %d%% name=%d state=%d",
483 (int)usurf, animation->frame_counter, par,
484 usurf->animation.name, usurf->animation.state);
490 switch (usurf->animation.name) {
491 case ANIMA_SLIDE_TORIGHT: /* slide in left to right */
492 if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
493 /* slide in left to right */
494 x = 0 - animadata->width +
495 ((animadata->x + animadata->width) * par / 100);
498 /* slide out right to left */
499 x = 0 - animadata->width +
500 ((animadata->x + animadata->width) * (100 - par) / 100);
503 case ANIMA_SLIDE_TOLEFT: /* slide in right to left */
504 dwidth = (container_of(weston_ec->output_list.next,
505 struct weston_output, link))->width;
506 if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
507 /* slide in right to left */
508 x = animadata->x + (dwidth - animadata->x) * (100 - par) / 100;
511 /* slide out left to right */
512 x = animadata->x + (dwidth - animadata->x) * par / 100;
515 case ANIMA_SLIDE_TOBOTTOM: /* slide in top to bottom */
516 if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
517 /* slide in top to bottom */
518 y = 0 - animadata->height +
519 ((animadata->y + animadata->height) * par / 100);
522 /* slide out bottom to top */
523 y = 0 - animadata->height +
524 ((animadata->y + animadata->height) * (100 - par) / 100);
527 default: /*ANIMA_SLIDE_TOTOP*/ /* slide in bottom to top */
528 dheight = (container_of(weston_ec->output_list.next,
529 struct weston_output, link))->height;
530 if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
531 /* slide in bottom to top */
532 y = animadata->y + (dheight - animadata->y) * (100 - par) / 100;
535 /* slide out top to bottom */
536 y = animadata->y + (dheight - animadata->y) * par / 100;
541 es->geometry.x = usurf->node_tbl->disp_x + x;
542 es->geometry.y = usurf->node_tbl->disp_y + y;
543 if ((es->output) && (es->buffer_ref.buffer) &&
544 (es->geometry.width > 0) && (es->geometry.height > 0)) {
545 weston_surface_geometry_dirty(es);
546 weston_surface_damage(es);
549 /* end of animation */
550 animadata->geometry_saved ++; /* restore geometry */
551 animation_end(usurf, 1);
552 uifw_trace("animation_slide: End of animation");
555 /* continue animation */
556 weston_compositor_schedule_repaint(weston_ec);
560 /*--------------------------------------------------------------------------*/
562 * @brief animation_fade: fade animation
564 * @param[in] animation weston animation table
565 * @param[in] outout weston output table
566 * @param[in] mseces current time(unused)
569 /*--------------------------------------------------------------------------*/
571 animation_fade(struct weston_animation *animation,
572 struct weston_output *output, uint32_t msecs)
574 struct uifw_win_surface *usurf;
575 struct animation_data *animadata;
576 struct weston_surface *es;
579 usurf = container_of(animation, struct uifw_win_surface, animation.animation);
581 par = animation_cont(animation, output, msecs);
583 /* continue animation */
585 weston_compositor_schedule_repaint(weston_ec);
590 animadata = (struct animation_data *)usurf->animation.animadata;
592 par = usurf->animation.current;
593 if (animation->frame_counter == 1) {
594 if (animadata->transform_set == 0) {
595 animadata->transform_set = 1;
596 weston_matrix_init(&animadata->transform.matrix);
597 wl_list_init(&animadata->transform.link);
598 wl_list_insert(&es->geometry.transformation_list,
599 &animadata->transform.link);
601 animadata->end_function = animation_fade_end;
604 uifw_trace("animation_fade: usurf=%08x count=%d %d%% name=%d state=%d",
605 (int)usurf, animation->frame_counter, par,
606 usurf->animation.name, usurf->animation.state);
608 if (usurf->animation.state == ICO_WINDOW_MGR_ANIMATION_STATE_SHOW) {
610 es->alpha = ((double)par) / ((double)100.0);
614 es->alpha = ((double)1.0) - (((double)par) / ((double)100.0));
616 if (es->alpha < 0.0) es->alpha = 0.0;
617 else if (es->alpha > 1.0) es->alpha = 1.0;
619 if ((es->output) && (es->buffer_ref.buffer) &&
620 (es->geometry.width > 0) && (es->geometry.height > 0)) {
621 weston_surface_damage(es);
624 /* end of animation */
625 animation_end(usurf, 1);
626 uifw_trace("animation_fade: End of animation");
629 /* continue animation */
630 weston_compositor_schedule_repaint(weston_ec);
634 /*--------------------------------------------------------------------------*/
636 * @brief animation_fade_end: fade animation end
638 * @param[in] animation weston animation table
641 /*--------------------------------------------------------------------------*/
643 animation_fade_end(struct weston_animation *animation)
645 struct uifw_win_surface *usurf;
646 struct weston_surface *es;
648 usurf = container_of(animation, struct uifw_win_surface, animation.animation);
652 if ((es->output) && (es->buffer_ref.buffer) &&
653 (es->geometry.width > 0) && (es->geometry.height > 0)) {
654 weston_surface_damage(es);
658 /*--------------------------------------------------------------------------*/
660 * @brief module_init: initialize ico_window_animation
661 * this function called from ico_pluign_loader
663 * @param[in] es weston compositor
664 * @param[in] argc number of arguments(unused)
665 * @param[in] argv argument list(unused)
670 /*--------------------------------------------------------------------------*/
672 module_init(struct weston_compositor *ec, int *argc, char *argv[])
675 struct animation_data *animadata;
677 uifw_info("ico_window_animation: Enter(module_init)");
679 /* allocate animation datas */
681 for (i = 0; i < 50; i++) {
682 animadata = (struct animation_data *)malloc(sizeof(struct animation_data));
684 uifw_error("ico_window_animation: No Memory(module_init)");
687 animadata->next_free = free_data;
688 free_data = animadata;
692 default_animation = (char *)ico_ivi_default_animation_name();
693 animation_time = ico_ivi_default_animation_time();
694 animation_fpar = ico_ivi_default_animation_fps();
696 animation_fpar = ((1000 * 100) / animation_fpar) / animation_time;
698 ico_window_mgr_set_hook_animation(ico_window_animation);
700 uifw_info("ico_window_animation: Leave(module_init)");