Pointer to the window into which the instance draws. The window structure contains a window handle and values for top left corner, width, height, and clipping rectangle (see note on Unix below).
If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes.
The browser calls NPP_SetWindow after creating the instance to allow drawing to begin. Subsequent calls to NPP_SetWindow indicate changes in size or position; these calls pass the same NPWindow object each time, but with different values. If the window handle is set to null, the window is destroyed. In this case, the plug-in must not perform any additional graphics operations on the window and should free any associated resources.
The data structure passed in NPP_SetWindow is an NPWindow object, which contains the coordinates of the instance's area and various platform-specific data. This window is valid for the life of the instance, or until NPP_SetWindow is called again with a different value.
For windowed plug-ins on Windows and Unix, the window parameter contains a handle to a subwindow of the browser window hierarchy. On Mac OS, this field points to an NP_Port structure. For windowless plug-ins, it is a platform-specific handle to a drawable.