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
Родитель 9f9b12bd99
Коммит bf2ff6d569
2 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

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

Просмотреть файл

@ -1985,6 +1985,15 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
return NPERR_NO_ERROR; 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 #ifdef XP_MACOSX
case NPNVpluginDrawingModel: { case NPNVpluginDrawingModel: {
if (npp) { if (npp) {