fixed structure of code
[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 #include <libhildondesktop/libhildondesktop.h>
30
31 G_BEGIN_DECLS
32
33 typedef struct _AWallpaperPlugin AWallpaperPlugin;
34 typedef struct _AWallpaperPluginClass AWallpaperPluginClass;
35
36 #define Animation_Wallpaper_TYPE_HOME_PLUGIN (animation_wallpaper_home_plugin_get_type ())
37
38 #define Animation_Wallpaper_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
39                         Animation_Wallpaper_TYPE_HOME_PLUGIN, AWallpaperHomePlugin))
40
41 #define Animation_Wallpaper_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
42                         Animation_Wallpaper_TYPE_HOME_PLUGIN, AWallpaperHomePluginClass))
43
44 #define Animation_Wallpaper_IS_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
45                         Animation_Wallpaper_TYPE_HOME_PLUGIN))
46
47 #define Animation_Wallpaper_IS_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
48                         Animation_Wallpaper_TYPE_HOME_PLUGIN))
49
50 #define Animation_Wallpaper_HOME_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
51                         Animation_Wallpaper_TYPE_HOME_PLUGIN, AWallpaperHomePluginClass))
52
53 typedef struct _Animation_WallpaperPrivate Animation_WallpaperPrivate;
54
55 struct _AWallpaperPlugin
56 {
57     HDHomePluginItem hitem;
58     GObject *parent;
59     gint timer;
60     Animation_WallpaperPrivate *priv;
61 };
62
63 struct _AWallpaperPluginClass
64 {
65     HDHomePluginItemClass parent_class;
66
67 };
68
69 typedef struct {
70     GtkWidget * window;
71     GSList * static_actors;
72     GSList * dynamic_actors;
73     gint daytime;
74 } Scene;
75
76 typedef struct {
77     GtkWidget * widget;
78     gchar * name;
79     GtkWidget * image;
80     gint x;
81     gint y;
82     gint z;
83     double scale;
84     gboolean visible;
85
86 } Actor;
87
88 GType animation_wallpaper_home_plugin_get_type(void);
89
90 G_END_DECLS
91
92 struct _Animation_WallpaperPrivate
93 {
94       gpointer data;
95 };
96 void live_wallpaper_settings(GtkWidget *widget, gpointer user_data);
97 MultiActor *multiactor_init(gchar * name, GSList * child, gint x, gint y, gint z, double scale, gboolean visible);
98 void multiactor_set_visible(MultiActor *ma, gboolean visible);
99 void multiactor_set_scale(MultiActor *ma, double scale);
100 void multiactor_set_position(MultiActor *ma, gint dx, gint dy, gint dz);
101 void actor_set_position_full(GtkWidget *actor, gint x, gint y, gint z);
102
103
104 #endif