Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

NPN_InvalidateRect

« Gecko Plugin API Reference « Browser Side Plug-in API

Summary

Invalidates the specified portion of the plugin's drawing area, adding it to the region that needs to be redrawn when the plugin next repaints its contents.

Syntax

#include <npapi.h>
 
void NPN_InvalidateRect(NPP instance,
                        NPRect *invalidRect);

Parameters

The function has the following parameters:

instance
Pointer to the plug-in instance to invalidate a portion of.
invalidRect
The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in's content area.

Description

Before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either NPN_InvalidateRect() or NPN_InvalidateRegion().

NPN_InvalidateRect() causes the NPP_HandleEvent() method to pass an update event or a paint message to the plug-in. After calling this method, the plug-in receives a paint message asynchronously.

The browser redraws invalid areas of the document and any windowless plug-ins at regularly timed intervals. To immediately send a paint message, the plug-in can call NPN_ForceRedraw() after calling this method.

See also

Document Tags and Contributors

Tags: 
 Contributors to this page: teoli, Sheppy, Rickwookie, Pmash
 Last updated by: Sheppy,