mozilla

Revision 90627 of NPN_InvalidateRegion

  • Revision slug: NPN_InvalidateRegion
  • Revision title: NPN_InvalidateRegion
  • Revision id: 90627
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment clean up; 9 words added, 4 words removed

Revision Content

{{ Np-browser-api() }}

Summary

Invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in.

Syntax

#include <npapi.h>
 
void NPN_InvalidateRegion(NPP instance, 
                          NPRegion invalidRegion);

Parameters

The function has the following parameters:

instance
Pointer to the current plug-in instance.
invalidRegion
The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in.

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_InvalidateRegion() causes the NPP_HandleEvent() method to pass an update event or a paint message to the plug-in. If a plug-in calls this method, it receives a paint message later. The browser redraws invalid areas of the document and windowless plug-ins at regularly timed intervals. To force a paint message, the plug-in can call NPN_ForceRedraw() after calling this method.

See also

Revision Source

<p>{{ Np-browser-api() }}</p>
<h3 name="Summary">Summary</h3>
<p>Invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in.</p>
<h3 name="Syntax">Syntax</h3>
<pre>#include &lt;npapi.h&gt;
 
void NPN_InvalidateRegion(NPP instance, 
                          NPRegion invalidRegion);
</pre>
<h3 name="Parameters">Parameters</h3>
<p>The function has the following parameters:</p>
<dl> <dt><code>instance</code></dt> <dd>Pointer to the current plug-in instance.</dd>
</dl>
<dl> <dt><code>invalidRegion</code></dt> <dd>The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in.</dd>
</dl>
<h3 name="Description">Description</h3>
<p>Before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either <code><a href="/en/NPN_InvalidateRect" title="en/NPN_InvalidateRect">NPN_InvalidateRect()</a></code> or <code>NPN_InvalidateRegion()</code>.</p>
<p><code>NPN_InvalidateRegion()</code> causes the <code><a href="/en/NPP_HandleEvent" title="en/NPP_HandleEvent">NPP_HandleEvent()</a></code> method to pass an update event or a paint message to the plug-in. If a plug-in calls this method, it receives a paint message later. The browser redraws invalid areas of the document and windowless plug-ins at regularly timed intervals. To force a paint message, the plug-in can call <code><a href="/en/NPN_ForceRedraw" title="en/NPN_ForceRedraw">NPN_ForceRedraw()</a></code> after calling this method.</p>
<h3 name="See_Also">See also</h3>
<ul> <li><a href="/en/NPN_ForceRedraw" title="en/NPN_ForceRedraw">NPN_ForceRedraw()</a></li> <li><a href="/en/NPN_InvalidateRect" title="en/NPN_InvalidateRect">NPN_InvalidateRect()</a></li> <li><a href="/en/NPRegion" title="en/NPRegion">NPRegion</a></li> <li><a href="/en/NPP" title="en/NPP">NPP</a></li>
</ul>
Revert to this revision