C Language Development Kit/Functions/Cursor
From OptiWiki
< C Language Development Kit | Functions(Redirected from C Language Development Kit/Functions/cursor)
| Description | This function controls the appearance of the cursor and how text is wrapped
at the end of the line. On top of that, it controls the visibility of the indicators on the PHL1300. | ||||||||||||||
| Syntax | void cursor(int mode); | ||||||||||||||
| Arguments | mode can have one of the following values:
int mode
| ||||||||||||||
| Returns | None | ||||||||||||||
| Remarks | On the PHL the cursor can be off, a fixed underscore or a blinking underscore.
the cursor can be off, a fixed underscore or a blinking 'block'. Constants cannot be 'or'red, so when you want to switch the cursor ON, and enable the AUTOWRAP option, you have to make two calls to cursor(). | ||||||||||||||
| Example | #include "lib.h" #include <stdio.h> void main( void ) { int c; cursor( ON ); printf("\fCursor example"); while( 1 ) { if( ( c = getchar()) != EOF ) { switch( c ) { #if PHL_TERMINAL|OPH case F1_KEY: cursor( OFF ); break; case F2_KEY: cursor( ON ); break; case F3_KEY: cursor( BLINKING ); break; #else case ENT_KEY: cursor( OFF ); break; case UP_KEY: cursor( ON ); break; case DOWN_KEY: cursor( BLINKING ); break; #endif default: gotoxy( 0, 1); printsymbol( c ); break; } } idle(); } } |
