But the effort has born its fruits, and now we can run all of Gnash as a gtk widget inside a Sugar activity:
And this is the code:
from sugar.activity import activity
def __init__(self, handle, browser=None):
toolbox = activity.ActivityToolbox(self)
view = gnash.View()
For non-Sugar-enabled gtk people, you will be able to embed gnash doing something like this:
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
view = gnash_view_new ();
gtk_container_add (GTK_CONTAINER (window), view);
This is without using GtkPlug and, of course, running inside the same process. So by adding methods to the C widget we can control all of the Gnash engine and expose it trivially to python with pygtk. And through the use of Gnash extensions, we can extend the ActionScript class library with Sugar specifics so it integrates well with the rest of the environment.
This is still a proof of concept, but plan to start working right now in finding a way to integrate it in upstream Gnash.
Why gnash and not swfdec-gnome?
Please NO, the world needs less Flash. Flash deserves a horrible death.
> Why gnash and not swfdec-gnome?
Because: Rob Savoye got in touch with us about making gnash work as well as possible on Sugar and OLPC, and also because I was under the impression that swfdec was targeted to play video embedded in flash movies and not generic flash movies.
But anyway, I think that because Sugar Labs isn't Apple and cannot chose one project and put lots of money behind it, we need to track competing projects so we can benefit from the best of them without having to go through the pain of backing one and then having to drop support for it and switch to the other.
I think that we'll have to offer activity authors the possibility to use both gnash and swfdec, and both mozilla and webkit.
> Please NO, the world needs less Flash. Flash deserves a horrible death.
I don't really know what Flash deserves, but we have hundreds of thousands of kids wanting to use flash content, and people interested in bringing their educative content to Sugar if it doesn't involve rewriting in pygtk or pygame.
So we decided to bite the bullet and get to work on good flash support in Sugar. We still believe open standards should be the goal, so we are also going to be working on that. See the link below for a rationale:
Hello, there. Is it there any progress in Gtk implementation? I'll be wery appretiate if you share anything. Army of AS coders who likes Linux and wont to create standalone apps waiting for that! :)
> Hello, there. Is it there any progress in Gtk implementation? I'll be wery appretiate if you share anything. Army of AS coders who likes Linux and wont to create standalone apps waiting for that! :)
All the work is already upstreamed in Gnash. Right now there isn't a tremendous momentum for Flash in Sugar, but everybody is welcome to use the Gnash widget to make a framework for developing in SWF for the desktop.
I'm trying to do the opposite: insert an X window into my swf
like Xming X Server for Windows.
Post a Comment