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.