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



Forwarding to list.

Début du message réexpédié :

De : Alexandre Mazari <scaroo gmail com>
Date : 19 mars 2010 01:49:42 HNEC
À : Alan Forbes <alfraealba googlemail com>
Objet : Rép : libseed-list Exposing GObjects in a Webview JS context

You might be interested in SeedKit : http://gitorious.org/seedkithttp://gitorious.org/seedkit

Using the previously mentioned patch, SeedKit offers a runtime environment for hybrid web-ui/gobject applications.
All it needs is the path to an html file (defaulting to ui.html in CWD). This file can include js files calling into Seed-provided symbols.
You can pass --inspector to be able to inspect dom elements dynamically and --script=file.js for a custom initialization _javascript_ file.
Some samples (Notifications, GIO, DBus...)are provided in the examples dir.

The project is still in its infancy and suffers from serious issues. Notably the dbus binding is not in a working state, seems like the js context is cleared after imports or something.

TODO (for now)
- define a system-wide css file for common theming.
- add a developer mode, with reloading button
- fix DBus
- add samples of web-services integration ( Evolution Contacts on a google map ?)
- a runtime for widget ?
- see what s come next :)

Any code, help or idea appreciated. Contributions welcomed.

Happy coding,

Alexandre Mazari






Le 19 mars 10 à 01:09, Alan Forbes a écrit :

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



_______________________________________________
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]