Re: NPAPI Z-order

Benjamin Smedberg <[email protected]> Wed, 24 Apr 2013 09:20:25 -0400
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
On 4/24/2013 5:01 AM, [email protected] wrote:
> I changed the code such that NPN_SetValue is called from the plugin indicating that it is windowless.
>
> Now I get a GraphicsExpose XEvent. I can draw a colored rectangle given the provided Display, but I can't make it transparent.
Do you mean "transparent" or "translucent"? If you really just want 
transparent areas, don't draw on those areas.

If what you really want is translucent areas, then you should probably 
read the code of our test plugin: 
http://mxr.mozilla.org/mozilla-central/source/dom/plugins/test/testplugin/nptest_gtk2.cpp

In particular take a look at "pluginDrawSolid" "pluginDrawWindow" and 
the GraphicsExpose case in pluginHandleEvent. It uses cairo to draw a 
translucent box.

--BDS