Bug 386537. Provide a reliable way for plugins to detect whether windowless mode is available. patch by karlt, r+sr=jst, a=jonas

This commit is contained in:
roc+@cs.cmu.edu 2007-09-05 18:45:08 -07:00
parent 287e3b3a5d
commit 23aeeaf03a
2 changed files with 13 additions and 2 deletions

View File

@ -37,7 +37,7 @@
/*
* npapi.h $Revision: 3.46 $
* npapi.h $Revision: 3.47 $
* Netscape client plug-in API spec
*/
@ -436,7 +436,9 @@ typedef enum {
NPNVWindowNPObject = 15,
/* Get the NPObject wrapper for the plugins DOM element. */
NPNVPluginElementNPObject = 16
NPNVPluginElementNPObject = 16,
NPNVSupportsWindowless = 17
#ifdef XP_MACOSX
/* Used for negotiating drawing models */

View File

@ -1985,6 +1985,15 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
return NPERR_NO_ERROR;
}
case NPNVSupportsWindowless: {
#if defined(XP_WIN) || defined(XP_MACOSX) || (defined(MOZ_X11) && defined(MOZ_WIDGET_GTK2))
*(NPBool*)result = PR_TRUE;
#else
*(NPBool*)result = PR_FALSE;
#endif
return NPERR_NO_ERROR;
}
#ifdef XP_MACOSX
case NPNVpluginDrawingModel: {
if (npp) {