[webkit-gtk] NPAPI Drawing
Christian Frost
cf at cfrost.dk
Wed Apr 17 00:00:56 PDT 2013
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?
--
Regards
Christian
More information about the webkit-gtk
mailing list