Re: libseed-list Exposing GObjects in a Webview JS context



Thanks Alan.

I've managed to get it working once I found out how to write to
console.log() in HTML. Now I need to find out if it is possible to stop
the echo of console.log() to terminal as it doesn't look too
professional!! 



On Fri, 2010-03-19 at 06:28 +0800, Alan Knowles wrote:
> this is feasible already  - WebView communicating with a outer app, using
> GTK->Webkit  execute_script()
> Webkit->Gtk  either by ::console_message or ::script_alert signals
> 
> The patch is quite nice (and is now in HEAD), and would be even better 
> if we could access it in Seed.
> Currently the exposed signal has this signature
> *window_object_cleared* (WebView 
> <http://devel.akbkhome.com/seed/WebKit.WebView.shtml> */self/*, WebFrame 
> <http://devel.akbkhome.com/seed/WebKit.WebFrame.shtml> */object/*, void* 
> <http://devel.akbkhome.com/seed/void*.shtml> */p0/*, void* 
> <http://devel.akbkhome.com/seed/void*.shtml> */p1/*) : none
> 
> So unfortunately we can not interact directly with the context in Seed. 
> That would need fixing at the GtkWebkit or Webkit source layer,
> 
> Regards
> Alan
> 
> 
> 
> Alan Forbes wrote:
> > Hi Tim
> >
> > I've not being able to try your example app due to laptop shutting down
> > with CPU overheat when compiling latest build of WebKit (I'm sure this
> > is a bug in Ubuntu ACPI?).
> >
> > Anyway, I was thinking, it is possible to have a standalone JavaScript
> > program that can use a WebView object as the UI front-end? 
> >
> > By this I mean rather than having GTK as the GUI, a WebView object is
> > used and communication i.e. user clicks on a HTML button is pressed and
> > the JavaScript file gets this via a signal attached to the WebView
> > object in order to do some action.   
> >
> > _______________________________________________
> > libseed-list mailing list
> > libseed-list gnome org
> > http://mail.gnome.org/mailman/listinfo/libseed-list
> >   




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]