* display/select/update the window. * If f is true, this window should be "modal" - don't return * until presumed seen. */
| 1293 | * until presumed seen. |
| 1294 | */ |
| 1295 | void |
| 1296 | mac_display_nhwindow(winid win, BOOLEAN_P f) |
| 1297 | { |
| 1298 | NhWindow *aWin = &theWindows[win]; |
| 1299 | WindowPtr theWindow = aWin->its_window; |
| 1300 | |
| 1301 | if (win < 0 || win >= NUM_MACWINDOWS || !theWindow) { |
| 1302 | error("disp_win: Invalid window %d.", win); |
| 1303 | return; |
| 1304 | } |
| 1305 | |
| 1306 | if (theWindow == _mt_window) { |
| 1307 | tty_display_nhwindow(win, f); |
| 1308 | return; |
| 1309 | } |
| 1310 | |
| 1311 | if (f && inSelect == WIN_ERR && win == WIN_MESSAGE) { |
| 1312 | topl_set_resp((char *) 0, 0); |
| 1313 | if (aWin->windowTextLen > 0 |
| 1314 | && (*aWin->windowText)[aWin->windowTextLen - 1] == CHAR_CR) { |
| 1315 | --aWin->windowTextLen; |
| 1316 | --aWin->y_size; |
| 1317 | } |
| 1318 | putstr(win, flags.standout ? ATR_INVERSE : ATR_NONE, " --More--"); |
| 1319 | } |
| 1320 | |
| 1321 | if (!IsWindowVisible(theWindow)) { |
| 1322 | if (win != WIN_MESSAGE) |
| 1323 | adjust_window_pos(aWin, aWin->x_size + SBARWIDTH + 1, |
| 1324 | aWin->y_size * aWin->row_height); |
| 1325 | |
| 1326 | SelectWindow(theWindow); |
| 1327 | ShowWindow(theWindow); |
| 1328 | } |
| 1329 | |
| 1330 | if (f && inSelect == WIN_ERR) { |
| 1331 | int ch; |
| 1332 | |
| 1333 | DimMenuBar(); |
| 1334 | inSelect = win; |
| 1335 | do { |
| 1336 | ch = mac_nhgetch(); |
| 1337 | } while (!ClosingWindowChar(ch)); |
| 1338 | inSelect = WIN_ERR; |
| 1339 | UndimMenuBar(); |
| 1340 | |
| 1341 | if (win == WIN_MESSAGE) |
| 1342 | topl_set_resp("", '\0'); |
| 1343 | else |
| 1344 | HideWindow(theWindow); |
| 1345 | } |
| 1346 | } |
| 1347 | |
| 1348 | void |
| 1349 | mac_destroy_nhwindow(winid win) |
no test coverage detected