1 /* vim: set sw=4 ts=4 et: */
3 * This file is part of Live Wallpaper (livewp)
5 * Copyright (C) 2010 Vlad Vasiliev
6 * Copyright (C) 2010 Tanya Makova
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this software; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 /*******************************************************************************/
25 #include "livewp-multiactor.h"
27 MultiActor * multiactor_init(gchar * name, GSList * child, gint x, gint y, gint z, double scale, gboolean visible)
29 MultiActor *ma = NULL;
30 ma = g_new0(MultiActor, 1);
37 ma->visible = visible;
38 fprintf(stderr, "multiator init name=%s\n", ma->name);
42 void multiactor_set_visible(MultiActor *ma, gboolean visible)
44 GSList * tmp = ma->child;
47 if (visible == FALSE){
49 hildon_animation_actor_set_show(tmp->data, visible);
52 cur_visible = g_object_get_data(G_OBJECT(tmp->data), "visible");
53 if (cur_visible) hildon_animation_actor_set_show(tmp->data, visible);
55 tmp = g_slist_next(tmp);
57 ma->visible = visible;
59 void multiactor_set_scale(MultiActor *ma, double scale)
61 GSList * tmp = ma->child;
63 hildon_animation_actor_set_scale(tmp->data, scale, scale);
64 tmp = g_slist_next(tmp);
68 void multiactor_set_position(MultiActor *ma, gint dx, gint dy, gint dz)
70 GSList *tmp = ma->child;
73 x = g_object_get_data(G_OBJECT(tmp->data), "x");
74 y = g_object_get_data(G_OBJECT(tmp->data), "y");
75 z = g_object_get_data(G_OBJECT(tmp->data), "z");
76 actor_set_position_full(tmp->data, x + dx, y + dy, z + dz);
77 tmp = g_slist_next(tmp);