MCPcopy Create free account
hub / github.com/NetHack/NetHack / update_tty

Function update_tty

outdated/sys/mac/mactty.c:713–745  ·  view source on GitHub ↗

* Update the screen to match the current bitmap, after adding stuff * with add_tty_char etc. */

Source from the content-addressed store, hash-verified

711 * with add_tty_char etc.
712 */
713short
714update_tty(WindowPtr window)
715{
716 Rect r;
717 RECORD_EXISTS(record);
718
719#if CLIP_RECT_ONLY
720 if (record->invalid_rect.right <= record->invalid_rect.left
721 || record->invalid_rect.bottom <= record->invalid_rect.top) {
722 return noErr;
723 }
724 r = record->invalid_rect;
725#else
726 if (EmptyRgn(record->invalid_part)) {
727 return noErr;
728 }
729 r = (*(record->invalid_part))->rgnBBox;
730#endif
731 select_onscreen_window(record);
732 copy_bits(record, &r, srcCopy, (RgnHandle) 0);
733#if CLIP_RECT_ONLY
734 empty_rect(&(record->invalid_rect));
735#else
736 SetEmptyRgn(record->invalid_part);
737#endif
738 if (record->curs_state) {
739 pos_rect(record, &r, record->x_curs, record->y_curs, record->x_curs,
740 record->y_curs);
741 InvertRect(&r);
742 }
743
744 return noErr;
745}
746
747/*
748 * Low level add to screen

Callers 13

backspFunction · 0.85
setttyFunction · 0.85
term_flushFunction · 0.85
set_tty_attribFunction · 0.85
scroll_ttyFunction · 0.85
clear_ttyFunction · 0.85
blink_cursorFunction · 0.85
image_ttyFunction · 0.85
clear_tty_windowFunction · 0.85
mangle_tty_rows_columnsFunction · 0.85
frame_tty_windowFunction · 0.85
invert_tty_windowFunction · 0.85

Calls 4

select_onscreen_windowFunction · 0.85
copy_bitsFunction · 0.85
empty_rectFunction · 0.85
pos_rectFunction · 0.85

Tested by

no test coverage detected