Check char at current/given position in PDCurses/N

2020-02-06 03:12发布

Is there a way to check which char is at a given position in the console window? For example if I want to check if there's an asterisk (*) at position (10, 12), how do I do that? Or if I use move(10, 12);, how do I check which char is at the current cursor position? I'm using PDCurses.

1条回答
别忘想泡老子
2楼-- · 2020-02-06 03:43

The inch family of functions should do that:

chtype inch(void);
chtype winch(WINDOW *win);
chtype mvinch(int y, int x);
chtype mvwinch(WINDOW *win, int y, int x);
查看更多
登录 后发表回答