rewrote actors objects
[livewp] / applet / src / livewp-common.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 Lesser General Public License
11  * as published by the Free Software Foundation; either version 2.1 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 #include <gtk/gtk.h>
26 #include <hildon/hildon.h>
27 #include <locale.h>
28 #include <libhildondesktop/libhildondesktop.h>
29
30 #define GETTEXT_PACKAGE "livewp"
31 #include <glib/gi18n-lib.h>
32
33 #define THEME_PATH "/usr/share/livewp/theme"
34 #define NAME_SIZE 256:
35
36 typedef struct {
37     gchar * name;
38     GSList * child;
39     gint x;
40     gint y;
41     gint z;
42     double scale;
43     gboolean visible;
44
45 } MultiActor;
46
47 typedef struct _AWallpaperPlugin AWallpaperPlugin;
48 typedef struct _AWallpaperPluginClass AWallpaperPluginClass;
49 typedef struct _Animation_WallpaperPrivate Animation_WallpaperPrivate;
50
51 struct _Animation_WallpaperPrivate
52 {
53     gint timer;
54     gchar *theme;
55     AWallpaperPlugin *desktop_plugin;
56 };
57
58 struct _AWallpaperPlugin
59 {
60     HDHomePluginItem hitem;
61     GObject *parent;
62     Animation_WallpaperPrivate *priv;
63 };
64
65 struct _AWallpaperPluginClass
66 {
67     HDHomePluginItemClass parent_class;
68
69 };
70
71 typedef struct {
72     GtkWidget * widget;
73     gchar  *name;
74     gchar *filename;
75     gint x;
76     gint y;
77     gint z;
78     gint width;
79     gint height;
80     gint scale;
81     gint opacity; 
82     gboolean visible;
83     void (*func_change)(gpointer, gpointer);
84     time_t time_start_animation;
85     gint duration_animation;
86     void (*func_probability)(gpointer);
87
88 } Actor;