-#endif
-#ifdef HAVE_NS
- if (FRAME_NS_P (f))
- return ns_popup_dialog (position, header, contents);
-#endif
- /* Display a menu with these alternatives
- in the middle of frame F. */
- {
- Lisp_Object x, y, frame, newpos, prompt;
- int x_coord, y_coord;
-
- prompt = Fcar (contents);
- if (FRAME_WINDOW_P (f))
- {
- x_coord = FRAME_PIXEL_WIDTH (f);
- y_coord = FRAME_PIXEL_HEIGHT (f);
- }
- else
- {
- x_coord = FRAME_COLS (f);
- /* Center the title at frame middle. (TTY menus have their
- upper-left corner at the given position.) */
- if (STRINGP (prompt))
- x_coord -= SCHARS (prompt);
- y_coord = FRAME_LINES (f);
- }
- XSETFRAME (frame, f);
- XSETINT (x, x_coord / 2);
- XSETINT (y, y_coord / 2);
- newpos = list2 (list2 (x, y), frame);
-
- return Fx_popup_menu (newpos, list2 (prompt, contents));
- }