0

How to get the sign on X, Y in console.

Example mvprintw(1,2,"H"). and SOME_FUNCTION_I_AM_LOOKING_FOR(1,2) -> return "h".

Domiik
  • 233
  • 1
  • 5
  • 14

1 Answers1

1

chtype mvinch(int y, int x) comes to mind.

From man 3NCURSES inch:

SYNOPSIS

   #include <curses.h>

   chtype inch(void);
   chtype winch(WINDOW *win);
   chtype mvinch(int y, int x);
   chtype mvwinch(WINDOW *win, int y, int x);

DESCRIPTION

These routines return the character, of type chtype, at the current position in the named window. If any attributes are set for that position, their values are OR’ed into the value returned. Constants defined in can be used with the & (logical AND) opera‐ tor to extract the character or attributes alone.

Attributes

The following bit-masks may be AND-ed with characters returned by winch.

   A_CHARTEXT     Bit-mask to extract character
   A_ATTRIBUTES   Bit-mask to extract attributes
   A_COLOR        Bit-mask to extract color-pair field information
jho
  • 2,243
  • 1
  • 15
  • 10