Re: gtk-np

From: Tomeu Vizoso <tomeu_at_tomeuvizoso.net>
Date: Thu Nov 30 2006 - 18:35:42 CET

On Thu, 2006-11-30 at 10:57 -0500, Dominic Lachowicz wrote:
> Hi Tomeu,
>
> > 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:
>
> Rather than depending on a direct mapping between a "FooWidget" and
> its GObject type registration function "foo_widget_get_type()", I'd
> recommend specifying the type registration function.
>
> But I would also be a little concerned that the "library" and "class"
> params live in the same namespace as the GObject's params.
>
> http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#h-13.3

True, this is the latest plan:

<object
        type="gtkwidget/*"
        module="gtk-x11-2.0"
        widget="GtkToggleButton"
        gettype="gtk_toggle_button_get_type">

        <param name="active" value="true" />
        <param name="label" value="hallo" />
        <param name="xalign" value="1" />
        <param name="yalign" value="1" />
</object>

The gettype attribute would be optional, only necessary when we cannot
infer the registration function from the class name (in this example it
wouldn't be necessary).

> > 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.
>
> Martin has already done this. Thanks, Martin!
>
> > 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 think that we can, since AbiWidget already takes care of this for
> you. There is one easy way to find out - remove the 4 lines of code
> from the plugin and see what (if anything) breaks.

Yes, works fine!

Thanks,

Tomeu
Received on Thu Nov 30 18:36:43 2006

This archive was generated by hypermail 2.1.8 : Thu Nov 30 2006 - 18:36:43 CET