fixed time to change image, added icons to slideshow and flash, added change image...
[livewp] / applet / src / livewp-actor.h
1 /*vim: set sw=4 ts=4 et: */
2 /*
3  * This file is part of Live Wallpaper (livewp)
4  *
5  * Copyright (C) 2010 Vlad Vasiliev
6  * Copyright (C) 2010 Tanya Makova
7  *       for the code
8  *
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.
13  *
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.
18  *
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
22  * 02110-1301 USA
23 */
24 /*******************************************************************************/
25 #ifndef _livewp_actor_h
26 #define _livewp_actor_h 1
27
28 #include "livewp-common.h"
29 #include <sys/time.h>
30 #include "livewp-rules.h"
31 #include <sqlite3.h>
32
33 typedef struct _Actor Actor;
34 struct _Actor
35 {
36     GtkWidget * widget;
37     GtkWidget * image;
38     gchar  *name;
39     gchar *filename;
40     gint x;
41     gint y;
42     gint z;
43     gint width;
44     gint height;
45     gint scale;
46     gint opacity;
47     gboolean visible;
48     void (*func_change)(gpointer, gpointer);
49     time_t time_start_animation;
50     gint duration_animation;
51     void (*func_probability)(gpointer);
52     GPtrArray *child;
53
54 };
55
56 /*******************************************************************************/
57 Actor* init_object(AWallpaperPlugin *desktop_plugin,
58             gchar * name,
59             gchar * filename,
60             gint x,
61             gint y,
62             gint z,
63             gint width,
64             gint height,
65             gboolean visible,
66             gboolean load_image,
67             gint scale,
68             gint opacity,
69             void (*pfunc_change)(Actor*),
70             void (*pfunc_probability)(Actor*),
71             GPtrArray *child
72            );
73 void destroy_hildon_actor(Actor *actor);
74 void create_hildon_actor_text(Actor *actor, AWallpaperPlugin *desktop_plugin);
75 void create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
76 void change_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
77 void destroy_actor(Actor *actor);
78 void set_actor_position(Actor *actor, gint x, gint y, gint z, AWallpaperPlugin *desktop_plugin);
79 void set_actor_scale(Actor *actor, double scalex, double scaley);
80 void set_actor_opacity(Actor *actor, gint opacity);
81 void set_actor_rotation(Actor *actor, gint axis, double degrees, gint x, gint y, gint z);
82 void set_actor_visible(Actor *actor, gboolean visible);
83 void change_obj(Actor * actor, AWallpaperPlugin *desktop_plugin);
84 void change_tape(Actor * actor, AWallpaperPlugin *desktop_plugin);
85 void change_slideshow(Actor * actor, AWallpaperPlugin *desktop_plugin);
86 void change_billboard(Actor * actor, AWallpaperPlugin *desktop_plugin);
87 void change_moon(Actor * actor, AWallpaperPlugin *desktop_plugin);
88 void change_sun(Actor * actor, AWallpaperPlugin *desktop_plugin);
89 void change_tram(Actor * actor, AWallpaperPlugin *desktop_plugin);
90 void change_plane1(Actor *actor, AWallpaperPlugin *desktop_plugin);
91 void change_plane2(Actor *actor, AWallpaperPlugin *desktop_plugin);
92 void change_cloud(Actor *actor, AWallpaperPlugin *desktop_plugin);
93 void change_wind(Actor *actor, AWallpaperPlugin *desktop_plugin);
94 void change_window1(Actor * actor, AWallpaperPlugin *desktop_plugin);
95 void change_signal(Actor * actor, AWallpaperPlugin *desktop_plugin);
96 void change_layer(Actor * actor, AWallpaperPlugin *desktop_plugin);
97 void change_static_actor(Actor * actor, AWallpaperPlugin *desktop_plugin);
98 void change_static_actor_with_corner(Actor * actor, AWallpaperPlugin *desktop_plugin);
99 void create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
100 void change_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
101 void destroy_hildon_actor(Actor *actor);
102 #endif