There are two ways to make the physical cursor disappear from the screen. One way is to move the cursor off the screen and the other is to make the cursor invisible at a location on the screen.
You can hide the cursor so that it doesn't show on the screen by moving it just below the last row of the screen. Do this by calling:
|
The function vs_rowq() returns the number of rows on the current video display. Row vs_rowq() is the row just beneath the last row on the video display (since numbering starts at 0). By moving the physical cursor to a row that is not able to be displayed, you effectively hide the cursor.
You can also hide the cursor at its current location by calling the hide cursor function, csr_hide():
|
Function csr_hide() stores the location of the cursor internally, in static variables. If the cursor is already hidden, csr_hide() will not store the cursor location.
To restore the cursor to the screen at the location saved by csr_hide(), use the show cursor function:
|
csr_show() will not attempt to show the cursor unless the cursor has been previously hidden with a call to csr_hide().
You can determine if the physical cursor is visible by calling the is physical cursor visible function:
|
The function returns a non-zero value if the physical cursor is visible and 0 if the physical cursor is hidden.