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

Function curs_pos

outdated/sys/mac/mactty.c:662–683  ·  view source on GitHub ↗

* Invert the specified position */

Source from the content-addressed store, hash-verified

660 * Invert the specified position
661 */
662static void
663curs_pos(tty_record *record, short x_pos, short y_pos, short to_state)
664{
665 Rect r;
666
667 if (record->curs_state == to_state) {
668 return;
669 }
670 record->curs_state = to_state;
671 pos_rect(record, &r, x_pos, y_pos, x_pos, y_pos);
672
673 if (DRAW_DIRECT) {
674 void *old_port;
675
676 save_port(record, &old_port);
677 select_onscreen_window(record);
678 InvertRect(&r);
679 use_port(record, old_port);
680 } else {
681 accumulate_rect(record, &r);
682 }
683}
684
685/*
686 * Move the cursor (both as displayed and where drawing goes)

Callers 5

move_tty_cursorFunction · 0.85
add_tty_charFunction · 0.85
add_tty_stringFunction · 0.85
blink_cursorFunction · 0.85
mangle_tty_rows_columnsFunction · 0.85

Calls 5

pos_rectFunction · 0.85
save_portFunction · 0.85
select_onscreen_windowFunction · 0.85
use_portFunction · 0.85
accumulate_rectFunction · 0.85

Tested by

no test coverage detected