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

Function invert_tty_window

outdated/sys/mac/mactty.c:1201–1219  ·  view source on GitHub ↗

* Highlighting a specific part of the tty window */

Source from the content-addressed store, hash-verified

1199 * Highlighting a specific part of the tty window
1200 */
1201short
1202invert_tty_window(WindowPtr window, short from_x, short from_y, short to_x,
1203 short to_y)
1204{
1205 Rect r;
1206 RECORD_EXISTS(record);
1207
1208 if (from_x > to_x || from_y > to_y) {
1209 return general_failure;
1210 }
1211 pos_rect(record, &r, from_x, from_y, to_x, to_y);
1212 select_offscreen_port(record);
1213 InvertRect(&r);
1214 accumulate_rect(record, &r);
1215 if (DRAW_DIRECT) {
1216 update_tty(window);
1217 } else
1218 select_onscreen_window(record);
1219}
1220
1221static void
1222canonical_rect(Rect *r, short x1, short y1, short x2, short y2)

Callers

nothing calls this directly

Calls 5

pos_rectFunction · 0.85
select_offscreen_portFunction · 0.85
accumulate_rectFunction · 0.85
update_ttyFunction · 0.85
select_onscreen_windowFunction · 0.85

Tested by

no test coverage detected