From kfm-devel Wed Apr 04 15:27:01 2007 From: Mike Melanson Date: Wed, 04 Apr 2007 15:27:01 +0000 To: kfm-devel Subject: Re: XEmbed-aware NPAPI Plugins? Message-Id: <4613C3C5.2010201 () multimedia ! cx> X-MARC-Message: https://marc.info/?l=kfm-devel&m=117570025805593 Maksim Orlovich wrote: >>> 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) How about Flash Player 9 (latest version)? Querying for a specific toolkit somewhat undermines the goal of XEmbed. I thought XEmbed was supposed to allow, for example, putting GTK apps inside KDE apps, which is the goal here. There are no public versions of the Adobe Flash Player for Linux that presently support XEmbed right now. But the stuff I'm working on right now does not query for underlying toolkit support. -- -Mike Melanson