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

Function scroll_tty

outdated/sys/mac/mactty.c:1007–1034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1005 */
1006
1007short
1008scroll_tty(WindowPtr window, short delta_x, short delta_y)
1009{
1010 RgnHandle rgn;
1011 short s_err;
1012 RECORD_EXISTS(record);
1013
1014 s_err = update_tty(window);
1015
1016 rgn = NewRgn();
1017
1018 select_offscreen_port(record);
1019 ScrollRect(&(record->its_bits.bounds), -delta_x * record->char_width,
1020 -delta_y * record->row_height, rgn);
1021 EraseRgn(rgn);
1022 SetEmptyRgn(rgn);
1023
1024 select_onscreen_window(record);
1025 ScrollRect(&(record->its_bits.bounds), -delta_x * record->char_width,
1026 -delta_y * record->row_height, rgn);
1027 EraseRgn(rgn);
1028 DisposeRgn(rgn);
1029
1030 record->y_curs -= delta_y;
1031 record->x_curs -= delta_x;
1032
1033 return noErr;
1034}
1035
1036/*
1037 * Clear the screen. Immediate.

Callers 2

do_add_cursorFunction · 0.85
do_controlFunction · 0.85

Calls 3

update_ttyFunction · 0.85
select_offscreen_portFunction · 0.85
select_onscreen_windowFunction · 0.85

Tested by

no test coverage detected