[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: XEmbed-aware NPAPI Plugins?
From:       "Maksim Orlovich" <mo85 () cornell ! edu>
Date:       2007-04-04 14:52:26
Message-ID: 11107.24.59.194.85.1175698346.squirrel () webmail ! cornell ! edu
[Download RAW message or body]


>> Not a new version of NPAPI.

Coincidentally, I had WIP versions with partial support of npruntime, but
they're rather useless since they make flash crash badly.. I'll probably
try again in KDE4 where I can implement everything, not just a subset of
functionality.

>>
>> Mozilla implements XEmbed for embedding plugins on X, which differs (in
>> good ways) from the classical Xt mainloop method (though it still
>> supports the old method). The API (from the plugin's perspective) is
>> here:
>>
>>    http://www.mozilla.org/projects/plugins/xembed-plugin-extension.html
>
> I see, thanks for clarifying.
>
> I think we already use XEmbed or something similar for plugins because we
> run
> them out of process as part of nspluginviewer, in which case it might not
> be
> very difficult to check if the plugin can do its side of XEmbed itself.

It would be very difficult. nspluginviewer has non-trivial communication
with the browser. When it comes to embedding the plugin inside
nspluginviewer, well... I can't speak for George, of course, but when I
looked at the spec and the examples before, I frankly found it very
problematic (and not much of a spec), and wasn't sure that implementing it
won't break tons of plugins... Besides the XEmbed flag, the ABI revision
also comes with a "tookit flag", which has only 2 specified values: Gtk
1.2 and Gtk 2.0. And, well, the examples they have encourage plugin
authors to check that:
    err = CallNPN_GetValueProc(gNetscapeFuncs.getvalue, NULL,
                               NPNVSupportsXEmbedBool,
                               (void *)&supportsXEmbed);

    if (err != NPERR_NO_ERROR || supportsXEmbed != PR_TRUE)
        return NPERR_INCOMPATIBLE_VERSION_ERROR;

    err = CallNPN_GetValueProc(gNetscapeFuncs.getvalue, NULL,
                               NPNVToolkit,
                               (void *)&toolkit);

    if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2)
        return NPERR_INCOMPATIBLE_VERSION_ERROR;

And, frankly, I am not sure I'm confident that lying here will be safe.
(Coincidentally, depending on which ABI version this is at, we might have
to provide fake versions of some gtk symbols to make Flash 7 not crash)

>
> However, you better wait for an answer of the developers with in-depth
> knowlegde of browser and/or plugin handling (please excuse the CC'ing
> guys)

Good job CCing the wrong people :p

-Maks


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic