--- /dev/null
+<theme>
+ <name>Flash</name>
+ <exec_path>/opt/kmplayer/bin/knpplayer -m application/x-shockwave-flash -p /usr/lib/browser/plugins/libflashplayer.so</exec_path>
+ <category>Unknown</category>
+ <icon_on>/usr/share/livewp/theme/Conky/icon.png</icon_on>
+ <icon_off>/usr/share/livewp/theme/Conky/icond.png</icon_off>
+ <gtk_socket_id>-wid</gtk_socket_id>
+ <added_string>file:///home/user/flash_matrix.swf</added_string>
+</theme>
livewp-actor.c livewp-actor.h \
livewp-exthemes.c livewp-exthemes.h \
livewp-scene.c livewp-scene.h \
- livewp-conky.c livewp-conky.h
+ livewp-conky.c livewp-conky.h \
+ livewp-flash.c livewp-flash.h
gboolean running;
GSList *extheme_list;
GHashTable *hash_theme;
+ GtkWidget *video_socket;
};
struct _AWallpaperPlugin
priv->scene_func = (gpointer)&init_scene_External;
if (!strcmp(priv->theme, "Conky"))
priv->scene_func = (gpointer)&init_scene_Conky;
+ if (!strcmp(priv->theme, "Flash"))
+ priv->scene_func = (gpointer)&init_scene_Flash;
priv->hash_theme = store->data;
break;
}
void init_scene_External(AWallpaperPlugin *desktop_plugin);
void init_scene_theme(AWallpaperPlugin *desktop_plugin);
void init_scene_Conky(AWallpaperPlugin *desktop_plugin);
+void init_scene_Flash(AWallpaperPlugin *desktop_plugin);
gint read_config(Animation_WallpaperPrivate *priv);
void save_config(Animation_WallpaperPrivate *priv);
void fill_priv(Animation_WallpaperPrivate *priv);
--- /dev/null
+/*vim: set sw=4 ts=4 et: */
+/*
+ * This file is part of Live Wallpaper (livewp)
+ *
+ * Copyright (C) 2010 Vlad Vasiliev
+ * Copyright (C) 2010 Tanya Makova
+ * for the code
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+*/
+/*******************************************************************************/
+#include "livewp-flash.h"
+void
+init_scene_Flash(AWallpaperPlugin *desktop_plugin){
+ init_scene_External(desktop_plugin);
+}
+void
+flash_visible(AWallpaperPlugin *desktop_plugin){
+ fprintf(stderr,"Flash visible\n");
+}
--- /dev/null
+/*vim: set sw=4 ts=4 et: */
+/*
+ * This file is part of Live Wallpaper (livewp)
+ *
+ * Copyright (C) 2010 Vlad Vasiliev
+ * Copyright (C) 2010 Tanya Makova
+ * for the code
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+*/
+/*******************************************************************************/
+#include "livewp-common.h"
+void init_scene_Flash(AWallpaperPlugin *desktop_plugin);
+void init_scene_External(AWallpaperPlugin *desktop_plugin);
void run_long_timeout(AWallpaperPlugin *desktop_plugin);
gboolean long_timeout (AWallpaperPlugin *desktop_plugin);
void conky_visible(AWallpaperPlugin *desktop_plugin);
+void flash_visible(AWallpaperPlugin *desktop_plugin);
void
-set_live_bg (Display *display, Window xwindow, int mode)
-{
+set_live_bg (Display *display, Window xwindow, int mode){
Atom atom;
atom = XInternAtom (display, "_HILDON_LIVE_DESKTOP_BACKGROUND", False);
fprintf (stderr, "XID: 0x%x\n", (unsigned)xwindow);
conky_visible(priv->desktop_plugin);
return;
}
+ /* For Flash */
+ if (!strcmp(priv->theme,"Flash")&& priv->running){
+ flash_visible(priv->desktop_plugin);
+ return;
+ }
if (!priv->running){
if (priv->hash_theme && g_hash_table_lookup(priv->hash_theme, "exec_path")){
create_xwindow (Animation_WallpaperPrivate *priv){
GtkWidget *main_widget = NULL;
GtkWidget *label = NULL;
+
/* Create Main GUI */
main_widget = hildon_window_new ();
priv->window = main_widget;
gtk_window_set_title(GTK_WINDOW(main_widget), PACKAGE);
gtk_window_fullscreen(GTK_WINDOW(main_widget));
- label = gtk_label_new(_("Loading Livewallpaper scene ..."));
- gtk_container_add (GTK_CONTAINER (main_widget), label);
+
+ /* Check parametr 'gtk_socket_id'. It use in flash player for example */
+ if (g_hash_table_lookup(priv->hash_theme, "gtk_socket_id")){
+ priv->video_socket = gtk_socket_new ();
+ gtk_container_add (GTK_CONTAINER (priv->window), priv->video_socket);
+ }else{
+ label = gtk_label_new(_("Loading Livewallpaper scene ..."));
+ gtk_container_add (GTK_CONTAINER (main_widget), label);
+ }
+
gtk_widget_show_all(GTK_WIDGET(main_widget));
+
+ /* Set window to background mode */
if (priv->one_in_all_view)
set_live_bg(GDK_WINDOW_XDISPLAY (main_widget->window), GDK_WINDOW_XID (main_widget->window), -1);
else
*window_id = NULL,
*window_name = NULL,
*view = NULL,
+ *gtk_socket_id = NULL,
*strwin = NULL,
- *strview =NULL;
+ *strsocket = NULL,
+ *addedstring = NULL,
+ *straddedstring = NULL,
+ *strview = NULL;
gint i;
Window id_xwindow;
- fprintf(stderr,"init_scene_External1\n");
if (!desktop_plugin->priv->visible)
return;
- fprintf(stderr,"init_scene_External2\n");
exec_path = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "exec_path"));
window_id = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "window_id"));
view = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "view"));
window_name = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "window_name"));
+ gtk_socket_id = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "gtk_socket_id"));
+ addedstring = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "added_string"));
if (!exec_path)
return;
if (window_id){
strwin = g_strdup_printf(" %s %i", window_id, (gint)GDK_WINDOW_XID(desktop_plugin->priv->window->window));
}else
strwin = "";
+ if (gtk_socket_id){
+ strsocket = g_strdup_printf(" %s %i", gtk_socket_id, (int)gtk_socket_get_id (GTK_SOCKET (desktop_plugin->priv->video_socket)));
+ }else
+ strsocket = "";
if (view){
strview = g_strdup_printf(" %s %i", view, desktop_plugin->priv->view);
}else
strview = "";
- run_string = g_strdup_printf("%s%s%s", exec_path, strwin, strview);
+ if (addedstring){
+ straddedstring = g_strdup_printf(" %s", addedstring);
+ }else
+ straddedstring = "";
+
+ run_string = g_strdup_printf("%s%s%s%s%s", exec_path, strwin, strview, strsocket, straddedstring);
fprintf(stderr, "runs string = %s\n", run_string);
parsestring(run_string, child_argv);
id_xwindow = Window_With_Name(GDK_WINDOW_XDISPLAY (desktop_plugin->priv->window->window),
RootWindow( GDK_WINDOW_XDISPLAY (desktop_plugin->priv->window->window), XDefaultScreen( GDK_WINDOW_XDISPLAY (desktop_plugin->priv->window->window))),
window_name);
- //fprintf(stderr,"name %s %i %i\n", window_name, id_xwindow, i);
+ fprintf(stderr,"name %s %i %i\n", window_name, id_xwindow, i);
if (id_xwindow>0){
if (desktop_plugin->priv->one_in_all_view)
set_live_bg (GDK_WINDOW_XDISPLAY (desktop_plugin->priv->window->window),