* 02110-1301 USA
*/
/*******************************************************************************/
+#ifndef _weather_common_h
+#define _weather_common_h 1
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <gtk/gtk.h>
#include <hildon/hildon.h>
#include <locale.h>
-
+#include <libhildondesktop/libhildondesktop.h>
+#include <libosso.h>
#define GETTEXT_PACKAGE "livewp"
#include <glib/gi18n-lib.h>
-typedef struct {
- gchar * name;
- GSList * child;
- gint x;
- gint y;
- gint z;
- double scale;
- gboolean visible;
+#define THEME_PATH "/usr/share/livewp/theme"
+#define SHORT_TIMER 75 /* 100 milisecond */
+//#define LONG_TIMER 5*60*1000 /* 10 minutes */
+#define LONG_TIMER 20*1000 /* 10 minutes */
+enum { SHORT_TIMER_TYPE, LONG_TIMER_TYPE };
+#define SKY_LEVEL 0
+#define SUN_LEVEL 0
+#define TOWN_LEVEL 0
+#define TRAM_LEVEL 20
-} MultiActor;
+typedef struct _AWallpaperPlugin AWallpaperPlugin;
+typedef struct _AWallpaperPluginClass AWallpaperPluginClass;
typedef struct _Animation_WallpaperPrivate Animation_WallpaperPrivate;
+
struct _Animation_WallpaperPrivate
{
- gint timer;
- gchar *theme;
+ gint long_timer;
+ gint short_timer;
+ gchar *theme;
+ gboolean visible;
+ gboolean rich_animation;
+ GtkWidget *main_widget;
+ GtkWidget *right_corner;
+ AWallpaperPlugin *desktop_plugin;
+ DBusConnection *dbus_conn;
+ DBusConnection *dbus_conn_session;
+ osso_context_t *osso;
+};
+
+struct _AWallpaperPlugin
+{
+ HDHomePluginItem parent;
+ Animation_WallpaperPrivate *priv;
+};
+
+struct _AWallpaperPluginClass
+{
+ HDHomePluginItemClass parent_class;
+
};
+typedef struct {
+ GtkWidget * widget;
+ gchar *name;
+ gchar *filename;
+ gint x;
+ gint y;
+ gint z;
+ gint width;
+ gint height;
+ gint scale;
+ gint opacity;
+ gboolean visible;
+ void (*func_change)(gpointer, gpointer);
+ time_t time_start_animation;
+ gint duration_animation;
+ void (*func_probability)(gpointer);
+ GPtrArray *child;
+
+} Actor;
+#define LIVEWP_SIGNAL_INTERFACE "org.maemo.livewp"
+#define LIVEWP_SIGNAL_PATH "/org/maemo/livewp"
+#define LIVEWP_SIGNAL_RELOAD_CONFIG_INTERFACE "org.maemo.livewp.reload_config"
+#define LIVEWP_SIGNAL_RELOAD_CONFIG_PATH "/org/maemo/livewp/reload_config"
+#define LIVEWP_RELOAD_CONFIG "reload_config"
+#define LIVEWP_RELOAD_PLUGIN "reload_plugin"
+#endif