menu->QueryInterface(nsIMenuListener::GetIID(), (void**)&menuListener);
menu->QueryInterface(NS_GET_IID(nsIMenuListener), (void**)&menuListener);
void menu_unmap_handler(GtkWidget *w, gpointer p){  nsIMenuListener *menuListener = nsnull;  nsIMenu *menu = (nsIMenu *)p;  if (menu != nsnull) {    nsMenuEvent mevent;    mevent.message = NS_MENU_SELECTED;    mevent.eventStructType = NS_MENU_EVENT;    mevent.point.x = 0;    mevent.point.y = 0;    mevent.widget = nsnull;    mevent.time = PR_IntervalNow();    menu->QueryInterface(nsIMenuListener::GetIID(), (void**)&menuListener);    if(menuListener) {      menuListener->MenuDestruct(mevent);      NS_IF_RELEASE(menuListener);    }  }}