nsGUIEvent event(NS_XUL_CLOSE, win);
nsGUIEvent event(PR_TRUE, NS_XUL_CLOSE, win);
gint handle_delete_event(GtkWidget *w, GdkEventAny *e, nsWindow *win){  PRBool isEnabled;  // If this window is disabled, don't dispatch the delete event  win->IsEnabled(&isEnabled);  if (!isEnabled)    return TRUE;  NS_ADDREF(win);  // dispatch an "onclose" event. to delete immediately, call win->Destroy()  nsGUIEvent event(NS_XUL_CLOSE, win);  nsEventStatus status;    win->DispatchEvent(&event, status);  NS_RELEASE(win);  return TRUE;}