[webkit-gtk] NPAPI Drawing
Sergio Villar Senin
svillar at igalia.com
Wed Apr 17 07:14:07 PDT 2013
En 17/04/13 09:00, Christian Frost escribiu:
> Hi,
>
> I have created a NPAPI plugin and its correctly loaded in WebKit.
> However, I want to "paint" in it (or actually I want to make it
> invisible, e.g. setting alpha channel, such that the graphics behind
> can be shown) I have tried to use something like:
>
> NPError NPP_SetWindow(NPP npp, NPWindow* window)
> {
> if(npp == NULL)
> return NPERR_INVALID_INSTANCE_ERROR;
>
> PluginInstance * plugin = npp->pdata;
> Widget netscape_widget;
> if(window){
> plugin->window = (Window) window->window;
> plugin->x = window->x;
> plugin->y = window->y;
> plugin->width = window->width;
> plugin->height = window->height;
> plugin->display = ((NPSetWindowCallbackStruct
> *)window->ws_info)->display;
> netscape_widget = XtWindowToWidget(plugin->display, plugin->window);
> ......................
> .....................
>
> When the code reaches XtWindowToWidget it fails:
> "Error: Couldn't find per display information"
>
> Can anyone help me?
This is a list for WebKitGtk+ development, I'd suggest to check the docs
[1] or to ask in any Mozilla forum.
BR
[1] https://developer.mozilla.org/en-US/docs/Plugins
More information about the webkit-gtk
mailing list