Widget form;
NPP_SetWindow(NPP instance, NPWindow* window){	PluginInstance* This;	if (instance == NULL)		return NPERR_INVALID_INSTANCE_ERROR;	if (window == NULL)		return NPERR_NO_ERROR;	This = (PluginInstance*) instance->pdata;	/*	 * PLUGIN DEVELOPERS:	 *	Before setting window to point to the	 *	new window, you may wish to compare the new window	 *	info to the previous window (if any) to note window	 *	size changes, etc.	 */	if (This->window == (Window) window->window) {		/* This could be the plugin changing size (or) just an		 * extra SetWindow().		 */#ifdef TEXT_PLUGIN		if (This->x != window->x || This->width != window->width ||			This->y != window->y || This->height != window->height) {			This->x = window->x;			This->y = window->y;			This->width = window->width;			This->height = window->height;			XtVaSetValues(This->form, XmNx, This->x, XmNy, This->y,						XmNheight, This->height, XmNwidth, This->width, 0);		}#endif /* TEXT_PLUGIN */	}	else {		This->x = window->x;		This->y = window->y;		This->width = window->width;		This->height = window->height;		This->window = (Window) window->window;		This->display = ((NPSetWindowCallbackStruct *)window->ws_info)->display;#ifdef TEXT_PLUGIN		{			Widget netscape_widget;			Widget form;			Arg av[20];			int ac;			netscape_widget = XtWindowToWidget(This->display, This->window);			ac = 0;			XtSetArg(av[ac], XmNx, 0); ac++;			XtSetArg(av[ac], XmNy, 0); ac++;			XtSetArg(av[ac], XmNwidth, This->width); ac++;			XtSetArg(av[ac], XmNheight, This->height); ac++;			XtSetArg(av[ac], XmNborderWidth, 0); ac++;			This->form = XmCreateForm(netscape_widget, "pluginForm",					av, ac);			ac = 0;			XtSetArg(av[ac], XmNleftAttachment, XmATTACH_FORM); ac++;			XtSetArg(av[ac], XmNrightAttachment, XmATTACH_FORM); ac++;			XtSetArg(av[ac], XmNtopAttachment, XmATTACH_FORM); ac++;			XtSetArg(av[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;			XtSetArg (av[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;			This->text = XmCreateScrolledText (This->form, "pluginText",											   av, ac);			XtManageChild(This->text);			XtManageChild(This->form);		}#endif /* TEXT_PLUGIN */	}	return NPERR_NO_ERROR;}