[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

OpenVMS/Hanzi RTL Chinese Screen Management (SMG$) Manual


Previous Contents


SMG$GET_VIEWPORT_CHAR

The Get Characteristics of Display Viewport routine returns the characteristics of the specified viewport.

Format

SMG$GET_VIEWPORT_CHAR display-id [,viewport-row-start] [,viewport-column-start] [,viewport-number-rows] [,viewport-number-columns]


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

display-id


OpenVMS usage identifier
type longword (unsigned)
access read only
mechanism by reference

Identifier of the virtual display associated with the viewport. The display-id argument is the address of an unsigned longword containing this identifier.

viewport-row-start


OpenVMS usage longword_signed
type longword (signed)
access write only
mechanism by reference

Optional argument that receives the starting row number of the viewport. The viewport-row-start argument is the address of a signed longword that receives this row number.

viewport-column-start


OpenVMS usage longword_signed
type longword (signed)
access write only
mechanism by reference

Optional argument that receives the starting column number of the specified viewport. The viewport-column-start argument is the address of a signed longword that receives this column number.

viewport-number-rows


OpenVMS usage longword_signed
type longword (signed)
access write only
mechanism by reference

Optional argument that receives the number of rows in the specified viewport. The viewport-number-rows argument is the address of a signed longword that receives this number.

viewport-number-columns


OpenVMS usage longword_signed
type longword (signed)
access write only
mechanism by reference

Optional argument that receives the number of columns in the specified viewport. The viewport-number-columns argument is the address of a signed longword that receives this number.

Description

SMG$GET_VIEWPORT_CHAR returns the requested characteristics of the specified viewport.

Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_INVDIS_ID Invalid display-id.
SMG$_NO_WINASSOC No viewport associated with the virtual display.
SMG$_WRONUMARG Wrong number of arguments.

Example


C+
C This DEC Fortran example demonstrates the use of SMG$GET_VIEWPORT_CHAR.
C The viewport created will start at row 3, column 4. It will consist of
C 7 rows and 29 columns. Note the parameters used in the SMG$CREATE_VIEWPORT
C routine. I request 26 rows and 55 columns, but my viewport is truncated
C to fit.
C-
        IMPLICIT INTEGER (A-Z)
        INCLUDE '($SMGDEF)'

C Create the virtual display. Give it a border.

        ROWS = 4
        COLUMNS = 34

        STATUS = SMG$CREATE_VIRTUAL_DISPLAY
     1         ( ROWS, COLUMNS, DISPLAY1,SMG$M_BORDER )
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%val(STATUS))

C Create the pasteboard.

        STATUS = SMG$CREATE_PASTEBOARD (PASTE1)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%val(STATUS))

C Put data in the virtual display.

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1           'This is row number 1 of 4, you see', 1, 1 )
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1           'This is row number 2 of 4, you see', 2, 1 )
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1           'This is row number 3 of 4, you see', 3, 1 )
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1           'This is row number 4 of 4, you see', 4, 1 )
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

C Paste the virtual display.

        STATUS = SMG$COPY_VIRTUAL_DISPLAY(DISPLAY1,DISPLAY2)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$LABEL_BORDER (DISPLAY1, 'Full Display',,,SMG$M_BOLD)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$LABEL_BORDER (DISPLAY2,'Viewport',,,SMG$M_BOLD)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY1, PASTE1, 2, 2 )
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$CREATE_VIEWPORT ( DISPLAY2, 1, 5, 26, 55 )
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY2, PASTE1, 8, 2 )
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        CALL SMG$SET_PHYSICAL_CURSOR(PASTE1, 16, 1)
        TYPE *, ' '
        TYPE *, LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$GET_VIEWPORT_CHAR ( DISPLAY2, A, B, C, D )
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        TYPE *, ' '
        WRITE(5,7) A,B
7       FORMAT(1X,'Row start = ',I2,8X,'Column start = ',I2)
        TYPE *, ' '
        WRITE(5,8) C,D
8       FORMAT(1X,'Number of rows =',I2,4X,'Number of columns =',I3)

        END

      

The output for this program is shown in Figure SMG-26.

Figure SMG-26 Output Generated by SMG$GET_VIEWPORT_CHAR



SMG$HOME_CURSOR

The Home Cursor routine moves the virtual cursor to the specified corner of a virtual display.

Format

SMG$HOME_CURSOR display-id [,position-code]


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

display-id


OpenVMS usage identifier
type longword (unsigned)
access read only
mechanism by reference

Specifies the virtual display in which the virtual cursor is moved. The display-id argument is the address of a longword that contains the display identifier. Display-id is returned by SMG$CREATE_VIRTUAL_DISPLAY.

position-code


OpenVMS usage longword_unsigned
type longword (unsigned)
access read only
mechanism by reference

Specifies the point to which the virtual cursor moves. The position-code argument is the address of a longword that contains the position code.

Valid codes for position-code are as follows:

Code Meaning
SMG$C_UPPER_LEFT Row 1, column 1 (the upper left-hand corner). This is the default if position-code is not specified.
SMG$C_LOWER_LEFT Row n, column 1 (where n is the number of rows in the display). That is, the lower left-hand corner. It is useful to specify this position when accepting input for an upward-scrolling virtual display.
SMG$C_UPPER_RIGHT Row 1, column m (where m is the number of columns in the display). That is, the upper right-hand corner.
SMG$C_LOWER_RIGHT Row n, column m (where n is the number of rows and m is the number of columns in the display). That is, the lower right-hand corner.

Description

SMG$HOME_CURSOR moves the virtual cursor to a corner of the specified virtual display, according to the code specified in the position-code argument. You do not need to know the dimensions of the virtual display, or the virtual cursor location. If you omit the position-code argument, SMG$HOME_CURSOR moves the virtual display cursor to the upper left-hand corner of the virtual display.

Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_INVDIS_ID Invalid display-id.
SMG$_WRONUMARG Wrong number of arguments.
SMG$_INVARG Invalid argument.

SMG$INIT_TERM_TABLE

The Initialize Terminal Table routine initializes the TERMTABLE database for the terminal named, so that subsequent calls to SMG$GET_TERM_DATA can extract information and command strings for that terminal.

Format

SMG$INIT_TERM_TABLE terminal-name, termtable-address


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

terminal-name


OpenVMS usage device_name
type character string
access read only
mechanism by descriptor

Specifies the name of the terminal. The terminal-name argument is the address of a descriptor pointing to the terminal name. The name must be an entry in TERMTABLE.EXE.

termtable-address


OpenVMS usage address
type longword (unsigned)
access write only
mechanism by reference

Address of the entry for a particular type of terminal in TERMTABLE.EXE. The termtable-address argument is the address of an unsigned longword that contains the address of the terminal capabilities table.

You use this address when calling the SMG$GET_TERM_DATA procedure for the specified type of terminal. Termtable-address is also returned by SMG$INIT_TERM_TABLE_BY_TYPE.


Description

SMG$INIT_TERM_TABLE initializes the TERMTABLE database for the terminal named, so that subsequent calls to SMG$GET_TERM_DATA can extract information and command strings for that terminal. This routine should be used only when you perform direct (non-SMG$) I/O to terminals.

SMG$INIT_TERM_TABLE first searches for TERMTABLE.EXE in the area logically named TERM$TABLOC. If TERMTABLE.EXE is not found there, the routine searches the global section SMG$TERMTABLE.


Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_PRISECMAP Successful completion. The definition was found in a private TERMTABLE.
SMG$_GBLSECMAP Successful completion. The definition was found in the global TERMTABLE.
SMG$_UNDTERNOP Undefined terminal. No definition was found for the terminal and no private TERMTABLE was found.
SMG$_UNDTERNOS Undefined terminal. No definition was found for the terminal and no system TERMTABLE was found.
SMG$_UNDTERNAM Undefined terminal name.

SMG$INIT_TERM_TABLE_BY_TYPE

The Initialize TERMTABLE by OpenVMS Terminal Type routine initializes the TERMTABLE database for the terminal named, so that subsequent calls to SMG$GET_TERM_DATA can extract information and command strings for that terminal.

Format

SMG$INIT_TERM_TABLE_BY_TYPE terminal-type ,termtable-address [,terminal-name]


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

terminal-type


OpenVMS usage byte_signed
type byte (signed)
access read only
mechanism by reference

The device type of the terminal, as designated by a OpenVMS symbolic terminal type or by another value returned by the $GETDVI system service. The terminal-type argument is the address of a signed byte that contains the terminal type.

termtable-address


OpenVMS usage address
type longword (unsigned)
access write only
mechanism by reference

Address of the entry for a particular type of terminal in TERMTABLE.EXE. The termtable-address argument is the address of an unsigned longword into which is written the address of a terminal entry.

You use this address when calling the SMG$GET_TERM_DATA procedure for the specified type of terminal.

terminal-name


OpenVMS usage device_name
type character string
access write only
mechanism by descriptor

A string into which is written the terminal name associated with the device type. The terminal-name argument is the address of a descriptor pointing to the string into which the terminal name is written.

Description

SMG$INIT_TERM_TABLE_BY_TYPE initializes the TERMTABLE database for the terminal type specified, so that subsequent calls to SMG$GET_TERM_DATA can extract information and command strings for that type of terminal. This routine should be used only when you perform direct (non-SMG$) I/O to terminals.

SMG$INIT_TERM_TABLE_BY_TYPE first searches for TERMTABLE.EXE in the area logically named TERM$TABLOC. If TERMTABLE.EXE is not found there, the routine searches the global section SMG$TERMTABLE.


Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_PRISECMAP Successful completion. The definition was found in a private TERMTABLE.
SMG$_GBLSECMAP Successful completion. The definition was found in the global TERMTABLE.
SMG$_UNDTERNOP Undefined terminal. No definition was found for the terminal and no private TERMTABLE was found.
SMG$_UNDTERNOS Undefined terminal. No definition was found for the terminal and no system TERMTABLE was found.
SMG$_UNDTERNAM Undefined terminal name.

SMG$INSERT_CHARS

The Insert Characters routine inserts characters into a virtual display.

Format

SMG$INSERT_CHARS display-id ,character-string ,start-row ,start-column [,rendition-set] [,rendition-complement] [,character-set]


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

display-id


OpenVMS usage identifier
type longword (unsigned)
access read only
mechanism by reference

Specifies the virtual display affected. The pasteboard-id argument is the address of an unsigned longword that contains the pasteboard identifier. Display-id is returned by SMG$CREATE_VIRTUAL_DISPLAY.

character-string


OpenVMS usage char_string
type character string
access read only
mechanism by descriptor

The character string to be inserted. The character-string argument is the address of a descriptor that points to the string to be inserted.

start-row


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

The row position at which to begin the insertion. The start-row argument is the address of a signed longword that contains the row number.

start-column


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

The column position at which to begin the insertion. The start-column argument is the address of a signed longword that contains the column number.

rendition-set


OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by reference

Attribute specifier. The optional rendition-set argument is the address of a longword bit mask in which each attribute set causes the corresponding attribute to be set in the display. The following attributes can be specified using the rendition-set argument:
SMG$M_BLINK Displays blinking characters.
SMG$M_BOLD Displays characters in higher-than-normal intensity.
SMG$M_REVERSE Displays characters in reverse video, that is, using the opposite of the default rendition of the virtual display.
SMG$M_UNDERLINE Displays underlined characters.
SMG$M_INVISIBLE Specifies invisible characters; that is, the characters exist in the virtual display but do not appear on the pasteboard.
SMG$M_USER1 through
SMG$M_USER8
Displays user-defined attributes.

The display-id argument must be specified when you use the rendition-set argument.

rendition-complement


OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by reference

Attribute complement specifier. The optional rendition-complement argument is the address of a longword bit mask in which each attribute set causes the corresponding attribute to be complemented in the display. All of the attributes that can be specified with the rendition-set argument can be complemented with the rendition-complement argument. The display-id argument must be specified when you use the rendition-complement argument.

The optional arguments rendition-set and rendition-complement let the user control the attributes of the virtual display. The rendition-set argument sets certain virtual display attributes, while rendition-complement complements these attributes. If the same bit is specified in both the rendition-set and rendition-complement parameters, rendition-set is evaluated first, followed by rendition-complement. By using these two parameters together, the user can control each virtual display attribute in a single procedure call. On a single-attribute basis, the user can cause the following transformations:

Set Complement Action
0 0 Attribute set to default
1 0 Attribute on
0 1 Attribute set to complement of default setting
1 1 Attribute off

character-set


OpenVMS usage longword_unsigned
type longword (unsigned)
access read only
mechanism by reference

Specifies the character set of the string in the character-string. The character-set argument is the address of an unsigned longword that contains the character set code. If this argument is omitted, the default character set will be the character set set up by SMG$CREATE_VIRTUAL_DISPLAY or by SMG$CHANGE_VIRTUAL_DISPLAY.
Value Character Set
SMG$C_ASCII ASCII
SMG$C_SPEC_GRAPHICS DEC Special Graphics
SMG$C_HANZI DEC Hanzi

1One of DEC supplemental character set and Latin-1 character set.


Description

SMG$INSERT_CHARS inserts the specified character string at the start-row and start-column positions specified. Characters to the right of the insertion are shifted to the right. Note that any characters which do not fit on the current line are discarded. The virtual cursor remains at the character position following the last character inserted.


Previous Next Contents