70
edits
Stuartmorgan (talk | contribs) |
|||
| Line 15: | Line 15: | ||
* Contributors: | * Contributors: | ||
Browsers should include support for variables that allow the plugin to query for event and drawing model support via NPN_GetValue. Variables should be named based on the following examples: | Browsers should include support for variables that allow the plugin to query for event and drawing model support via NPN_GetValue. Variables for model support should be named based on the following examples: | ||
* Mac OS X Cocoa event model: NPNVsupportsCocoaBool | * Mac OS X Cocoa event model: NPNVsupportsCocoaBool | ||
* Mac OS X Core Graphics drawing model: NPNVsupportsCoreGraphicsBool | * Mac OS X Core Graphics drawing model: NPNVsupportsCoreGraphicsBool | ||
There will be platform-specific default event and drawing models, which may not have a named designation for legacy reasons. When there is no designation, plugins can assume support for the default model exists. | There will be platform-specific default event and drawing models, which may not have a named designation for legacy reasons. When there is no designation, plugins can assume support for the default model exists. If there is a designation, plugins should not assume support for any model, even the default model. | ||
Plugins may select their drawing and event models from those that the browser supports on a per-instance basis during NPP_New. Changing models outside of NPP_New is not allowed. Event and drawing models are selected by calling NPN_SetValue and setting the NPPVpluginEventModel and NPPVpluginDrawingModel variables to the desired values. | Plugins may select their drawing and event models from those that the browser supports on a per-instance basis during NPP_New. Changing models outside of NPP_New is not allowed. Event and drawing models are selected by calling NPN_SetValue and setting the NPPVpluginEventModel and NPPVpluginDrawingModel variables to the desired values, where the values are NPEventModel and NPDrawingModel enum values, respectively. | ||
An example of drawing model negotiation, in which the plugin requires the Core Graphics drawing model: | An example of drawing model negotiation, in which the plugin requires the Core Graphics drawing model: | ||
edits