Re: NPAPI Z-order

[email protected] Wed, 24 Apr 2013 02:01:01 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
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. A sample of my code:

    Display *disp = This->window->window;
    Drawable drawable = (Drawable)This->window->ws_info;

    if (!disp || ! drawable)
        return NPERR_GENERIC_ERROR;

    GC gc = DefaultGC(disp, DefaultScreen(disp));

Can anyone give me an example of how to make a transparent background/rectangle?

On Monday, April 22, 2013 4:09:12 PM UTC+2, [email protected] wrote:
> On Monday, April 22, 2013 3:58:28 PM UTC+2, Benjamin Smedberg wrote:
> 
> > On 4/22/2013 9:33 AM, [email protected] wrote:
> 
> > 
> 
> > > I have tried to make it windowless by having the following in my NPP_GetValue():
> 
> > 
> 
> > >
> 
> > 
> 
> > > ....
> 
> > 
> 
> > > case NPPVpluginWindowBool:
> 
> > 
> 
> > >      *((NPBool*)value) = false;
> 
> > 
> 
> > >      break;
> 
> > 
> 
> > You need to use NPN_SetValue for this. See 
> 
> > 
> 
> > http://mxr.mozilla.org/mozilla-central/source/dom/plugins/test/testplugin/nptest.cpp#974 
> 
> > 
> 
> > for sample code.
> 
> > 
> 
> > 
> 
> > 
> 
> > Note that "NPNV" are variables used with NPN_Get/Set (NPNV means NP 
> 
> > 
> 
> > Navigator Variable).
> 
> > 
> 
> > "NPPV" are variables used with NPP_Get/Set (NPPV means NP Plugin Variable).
> 
> > 
> 
> > 
> 
> > 
> 
> > --BDS
> 
> 
> 
> Oh, I see what you mean. Will just try that.