Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 712 -
------------------------------------------------------------------------------
1.19 Get attribute of character on VRAM. <Main>
------------------------------------------------------------------------------
[Name]
crt_gettextattr
[Syntax]
#include <crt.h>
unsigned int crt_gettextattr( unsigned int y, unsigned int x ) ;
[Arguments]
y Line position of the character to be got the
attribute.
x Column position of the character to be got the
attribute.
[Return]
Returns the attribute of the character at the specified position.
If incorrect position specification, returns -1.
[Description]
Gets the attribute of the character at the specified position.
Specify line and column position of the character to be got the
attribute in "y" and "x". (The top-left position of the screen is
(1st-column, 1st-line).)
The read attribute is returned as the return code of this function.
The attribute bits are same as the specification of "crt_settextattr"
fucntion. Refer the description of "crt_settextattr" functioin.
[Example]
The following program reads the attribute of the character at
(3rd-line, 30th-column) of the screen.
#include <stdio.h>
#include <crt.h>
void example( void )
{
unsigned int attr ;
attr = crt_gettextattr( 3, 30 ) ;
printf( "attribute is 0x%04X\n", attr ) ;
}