mozilla

Revision 90510 of NPSetWindowCallbackStruct

  • Revision slug: NPSetWindowCallbackStruct
  • Revision title: NPSetWindowCallbackStruct
  • Revision id: 90510
  • Created:
  • Creator: Pmash
  • Is current revision? No
  • Comment migration

Revision Content

{{wiki.template('Np-plugin-api')}}

Summary

Used only on Unix

Contains information about the plug-in's Unix window environment.

Syntax

typedef struct
{
    int32         type;
    Display*      display;
    Visual*       visual;
    Colormap      colormap;
    unsigned int  depth;
} NPSetWindowCallbackStruct;

Fields

The data structure has the following fields:

type
Always contains NP_SetWindow.
display
Standard X Toolkit attribute. Pointer to the Display structure that represents the browser-server connection.
visual
Standard X Toolkit attribute. X Visual used by the top-level shell window in the Netscape window hierarchy.
colormap
Standard X Toolkit attribute. Colormap for the plug-in window.
depth
tandard X Toolkit attribute. Depth of the plug-in window.

Description

Callback structures are used to pass platform-specific information. The NPSetWindowCallbackStruct object, allocated by the browser, contains information required for the ws_info field of an NPWindow.

The NPP_SetWindow function passes a pointer to this structure to the plug-in. The structure is valid for the lifetime of the NPWindow, that is, until NPP_SetWindow is called again or the instance is destroyed.

The type field of this structure always contains NP_SetWindow. The remaining fields are Standard X Toolkit attributes of the top-level shell window in the browser window hierarchy.

See Also

NPP_SetWindow, NPWindow, NPPrintCallbackStruct, NPAnyCallbackStruct

Revision Source

<p>
{{wiki.template('Np-plugin-api')}}
</p>
<h3 name="Summary">Summary</h3>
<div class="note">Used only on Unix</div>
<p>Contains information about the plug-in's Unix window environment.
</p>
<h3 name="Syntax">Syntax</h3>
<pre>typedef struct
{
    int32         type;
    Display*      display;
    Visual*       visual;
    Colormap      colormap;
    unsigned int  depth;
} NPSetWindowCallbackStruct;
</pre>
<h3 name="Fields">Fields</h3>
<p>The data structure has the following fields:
</p>
<dl><dt>type
</dt><dd>Always contains <a href="en/NP_SetWindow">NP_SetWindow</a>.
</dd></dl>
<dl><dt>display
</dt><dd>Standard X Toolkit attribute. Pointer to the Display structure that represents the browser-server connection.
</dd></dl>
<dl><dt>visual
</dt><dd>Standard X Toolkit attribute. X Visual used by the top-level shell window in the Netscape window hierarchy.
</dd></dl>
<dl><dt>colormap
</dt><dd>Standard X Toolkit attribute. Colormap for the plug-in window.
</dd></dl>
<dl><dt>depth
</dt><dd>tandard X Toolkit attribute. Depth of the plug-in window.
</dd></dl>
<h3 name="Description">Description</h3>
<p>Callback structures are used to pass platform-specific information. The <code>NPSetWindowCallbackStruct</code> object, allocated by the browser, contains information required for the <code>ws_info</code> field of an <a href="en/NPWindow">NPWindow</a>.
</p><p>The <a href="en/NPP_SetWindow">NPP_SetWindow</a> function passes a pointer to this structure to the plug-in. The structure is valid for the lifetime of the <a href="en/NPWindow">NPWindow</a>, that is, until <a href="en/NPP_SetWindow">NPP_SetWindow</a> is called again or the instance is destroyed.
</p><p>The type field of this structure always contains <a href="en/NP_SetWindow">NP_SetWindow</a>. The remaining fields are Standard X Toolkit attributes of the top-level shell window in the browser window hierarchy.
</p>
<h3 name="See_Also">See Also</h3>
<p><a href="en/NPP_SetWindow">NPP_SetWindow</a>, <a href="en/NPWindow">NPWindow</a>, <a href="en/NPPrintCallbackStruct">NPPrintCallbackStruct</a>, <a href="en/NPAnyCallbackStruct">NPAnyCallbackStruct</a>
</p>
Revert to this revision