done different long timer timeout depend on rich_animation
[livewp] / applet / src / livewp-home-widget.h
1 /*
2  * This file is part of Live Wallpaper (livewp)
3  * 
4  * Copyright (C) 2010 Vlad Vasiliev
5  * Copyright (C) 2010 Tanya Makova
6  *       for the code
7  * 
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  * 
13  * This software is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  * 
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this software; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22 */
23 /*******************************************************************************/
24 #ifndef Animation_Wallpaper_PLUGIN_H
25 #define Animation_Wallpaper_PLUGIN_H
26
27 #include <glib-object.h>
28
29 G_BEGIN_DECLS
30
31
32 #define Animation_Wallpaper_TYPE_HOME_PLUGIN (animation_wallpaper_plugin_get_type ())
33
34 #define Animation_Wallpaper_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
35                         Animation_Wallpaper_TYPE_HOME_PLUGIN, AWallpaperPlugin))
36
37 #define Animation_Wallpaper_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
38                         Animation_Wallpaper_TYPE_HOME_PLUGIN, AWallpaperPluginClass))
39
40 #define Animation_Wallpaper_IS_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
41                         Animation_Wallpaper_TYPE_HOME_PLUGIN))
42
43 #define Animation_Wallpaper_IS_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
44                         Animation_Wallpaper_TYPE_HOME_PLUGIN))
45
46 #define Animation_Wallpaper_HOME_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
47                         Animation_Wallpaper_TYPE_HOME_PLUGIN, AWallpaperPluginClass))
48
49
50 typedef struct {
51     gchar *name;
52     GSList * actors;
53     gint daytime;
54     gint timer_type;
55     gint wind_orientation; // +/- 1
56     double wind_angle; // [-1 .. 1]
57     guint seed; /* init value for random  */
58 } Scene;
59 /*
60 typedef struct {
61     time_t timestart;
62     gint timeall;
63     gint count;
64     GtkWidget *actor;
65     void (*func_change)(GtkWidget *, double);
66     gint (*func_time)(gint);
67 } Animation;
68 */
69
70 GType animation_wallpaper_plugin_get_type(void);
71
72 G_END_DECLS
73
74 void lw_settings(gpointer user_data, gpointer data);
75 void actor_set_position_full(GtkWidget *actor, gint x, gint y, gint z);
76 gint read_config(Animation_WallpaperPrivate *priv);
77 void save_config(Animation_WallpaperPrivate *priv);
78 static gboolean long_timeout(AWallpaperPlugin *desktop_plugin);
79 void run_long_timeout(AWallpaperPlugin *desktop_plugin);
80 static void init_scene(AWallpaperPlugin *desktop_plugin);
81 static void init_scene1(AWallpaperPlugin *desktop_plugin);
82 static void init_scene2(AWallpaperPlugin *desktop_plugin);
83 void create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
84 void get_sun_screen_pos(double alt, double azm, gint * x, gint * y);
85 void show_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv);
86 #endif