nsEventStatus PR_CALLBACK HandleEventApp(nsGUIEvent *aEvent) { nsEventStatus result = nsEventStatus_eIgnore; switch(aEvent->message) { case NS_SIZE: { struct WindowData *wd = gTheViewer->FindWindowData(aEvent->widget); nsSizeEvent* sizeEvent = (nsSizeEvent*)aEvent; if (wd->mViewer) { wd->mViewer->Layout(wd, sizeEvent->windowSize->width, sizeEvent->windowSize->height); } } return nsEventStatus_eConsumeNoDefault;  case NS_DESTROY: { struct WindowData *wd = gTheViewer->FindWindowData(aEvent->widget); gTheViewer->Destroy(wd);  if (gWindows->Count() == 0) { gTheViewer->Stop();  } } return nsEventStatus_eConsumeDoDefault;   default: break; } return(gTheViewer->DispatchMenuItem(aEvent));
void OnLinkClickEvent::HandleEventApp() { mHandler->HandleLinkClickEvent(*mURLSpec, *mTargetSpec, mPostData);
nsEventStatus PR_CALLBACK HandleEventApp(nsGUIEvent *aEvent){     nsEventStatus result = nsEventStatus_eIgnore;    switch(aEvent->message) {      case NS_SIZE:        {          struct WindowData *wd = gTheViewer->FindWindowData(aEvent->widget);          nsSizeEvent* sizeEvent = (nsSizeEvent*)aEvent;            if (wd->mViewer) {            wd->mViewer->Layout(wd, sizeEvent->windowSize->width,                                sizeEvent->windowSize->height);          }        }        return nsEventStatus_eConsumeNoDefault;      case NS_DESTROY:        {          struct WindowData *wd = gTheViewer->FindWindowData(aEvent->widget);          gTheViewer->Destroy(wd);          if (gWindows->Count() == 0) {            gTheViewer->Stop();               }        }        return nsEventStatus_eConsumeDoDefault;       default:        break;    }    return(gTheViewer->DispatchMenuItem(aEvent));}