Re: gtk-np

From: Robert Staudinger <robert.staudinger_at_gmail.com>
Date: Fri Dec 01 2006 - 14:12:10 CET

On 11/29/06, Tomeu Vizoso <tomeu@tomeuvizoso.net> wrote:
>
> Hi all, here are some questions for Rob, but perhaps someone else have
> an interesting idea.
>
> 1. As we want to be able to load dynamically a widget from any lib, I
> think we cannot encode the lib where it resides in the mime type, as the
> mime types will be requested by the browser before we know which lib and
> widget the object tag wants.
>
> So what I propose is to register only the mime type "embed/gobject" (or
> whatever, haven't thought about it) and encode the lib and class as
> parameters. For example:
>
> <object type="embed/gobject" style="height:100px; width:100px">
> <param name="library" value="gtk-x11-2.0" />
> <param name="class" value="GtkToggleButton" />
> <param name="label" value="hallohallo" />
> <param name="active" value="true" />
> </object>
>
> What do you think? That would do it?

I have imported the former "gtk-np" as "gobject-npapi" (npapi stands
for Netscape Plugin API) in gnome cvs.

As Dom suggests, it may be preferrable to use a separate namespace,
like "gonpapi" for gobject-npapi. It would then looks somwhat like

<object type="embed/x-gobject"
    style="height:100px; width:100px"
    gonpapi:library="abiword-2.5"
    gonpapi:class="AbiWidget"
>
<param ...

Or maybe library and class could go into a single attribute, like
    gonpapi:class="abiword-2.5/AbiWidget"

We need to try if and how namespace attributes are passed to the
plugin and if there's any difference using plain html vs. <xmlns ...
defined namespaces in xhtml.

> 2. I have talked with Dom and he said that he also thinks that the
> map-to-screen thing could go to "realize", thus eliminating one
> dependence point on abiword.
>
> 3. The other point where the plugin depends on libabiword is
> instantiating the abiword app:
>
> XAP_Args XArgs = XAP_Args(PACKAGE);
> _abiword_app = new AP_UnixApp(&XArgs, PACKAGE);
> AP_Args Args = AP_Args(&XArgs, PACKAGE, _abiword_app);
> Args.parsePoptOpts();
>
> I have seen code in abiwidget that already does this. Do you think we
> also can get rid of this?

I have added libabiword.[cpp h] to abiword, they are installed when
libabiword is built. The pyabiword binding is using that already, it's
as easy as calling libabiword_init(argc, argv) /
libabiword_shutdown().

Best,
Rob
Received on Fri Dec 1 14:13:42 2006

This archive was generated by hypermail 2.1.8 : Fri Dec 01 2006 - 14:13:42 CET