Previous Topic Next topic Print topic


CBL_READ_SCR_CHATTRS

Reads a string of characters and their attributes from the screen.
Restriction: This routine is supported for native COBOL only.

Syntax:

call "CBL_READ_SCR_CHATTRS"  using    screen-position
                                      character-buffer
                                      attribute-buffer
                                      string-length
                            returning status-code

Parameters

screen-position
Group predefined as cblt-screen-position containing:
01 cblt-screen-position   typedef.
  03 cblte-scrp-row       cblt-x1-compx. 	*> pic x comp-x.
  03 cblte-scrp-col       cblt-x1-compx. 	*> pic x comp-x.
character-buffer
Call prototype (see Key): pic x (n).
Picture: pic x (n).
attribute-buffer
Call prototype (see Key): pic x (n).
Picture: pic x (n).
string-length
Call prototype (see Key): cblt-x2-compx.
Picture: pic x(2) comp-x.
status-code
See Library Routines - Key.

On Entry:

screen-position The screen position to start reading at. The top left corner is row 0, column 0. See Screen Routines.
string-length The length of the string to read.

On Exit:

character-buffer The characters read from the screen. This data item must be at least as long as specified by string-length; positions in it beyond that length are unchanged.
attribute-buffer The attributes read from the screen. This data item must be at least as long as specified by string-length; positions in it beyond that length are unchanged.

The attributes are as follows:

Windows platforms:

B"10000000" BACKGROUND HIGHLIGHT
B"01000000" BACKGROUND-COLOR (RED)
B"00100000" BACKGROUND-COLOR (GREEN)
B"00010000" BACKGROUND-COLOR (BLUE)
B"00001000" FOREGROUND HIGHLIGHT
B"00000100" FOREGROUND-COLOR (RED)
B"00000010" FOREGROUND-COLOR (GREEN)
B"00000001" FOREGROUND-COLOR (BLUE)

UNIX platforms:

B"10000000" Reserved
B"01000000" Reserved
B"00100000" Reserved
B"00010000" Reserved
B"00001000" BLANK
B"00000100" REVERSE-VIDEO
B"00000010" UNDERLINE
B"00000001" HIGHLIGHT
string-length If the end of the screen is reached, the length read (in cells, that is, character-attribute pairs) is returned in here.
Previous Topic Next topic Print topic