Home > front end >  find out if cursor had been set in ncurses.h
find out if cursor had been set in ncurses.h

Time:06-18

I'm creating a wrapper for menu.h and want to ensure that when a menu is displayed, the cursor is turned off, however I don't want to just do a

curs_set(0);

and potentially screw up some other ui that depends on a certain cursor setting...

TLDR: is there any way to find out the current setting of curs_set?

CodePudding user response:

It's in the manual page:

The curs_set routine sets the cursor state to invisible, normal, or very visible for visibility equal to 0, 1, or 2 respectively. If the terminal supports the visibility requested, the previous cursor state is returned; otherwise, ERR is returned.

  • Related