12
edits
Kevindecker (talk | contribs) (Added clarification for software painting) |
|||
Line 45: | Line 45: | ||
NPPVpluginCoreAnimationLayer = 1003 | NPPVpluginCoreAnimationLayer = 1003 | ||
NPPVariable. The value should be treated as a CALayer * pointer, which the plug-in should fill in with a | NPPVariable. The value should be treated as a CALayer * pointer, which the plug-in should fill in with a layer. The plug-in should retain a reference to the layer. For example: | ||
NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) | NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) | ||
Line 54: | Line 54: | ||
case NPPVpluginCoreAnimationLayer: | case NPPVpluginCoreAnimationLayer: | ||
if (!obj->layer) { | if (!obj->layer) { | ||
obj->layer = | obj->layer = getLayer(); | ||
[obj->layer retain]; // should be balanced by a -release in NPP_Destroy | |||
} | } | ||
*((CALayer **)value) = obj->layer; | |||
*((CALayer **)value) = | |||
return NPERR_NO_ERROR; | return NPERR_NO_ERROR; | ||
edits