|
OpenVMS/Hangul RTL Korean Screen Management (SMG$)
Manual
SMG$NAME_TO_KEYCODE
The Translate a Key Name into a Key Code routine translates the key
name of a key on the keyboard into its associated key code.
Format
SMG$NAME_TO_KEYCODE key-name ,key-code
RETURNS
OpenVMS usage |
cond_value |
type |
longword (unsigned) |
access |
write only |
mechanism |
by value |
Arguments
key-name
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
String containing the name of the key to be translated into a key code.
The key-name argument is the address of a descriptor
pointing to the character string containing the key name. The
key-name argument is simply the name of the key (for
example, COMMA, PERIOD, KP4, and so forth).
key-code
OpenVMS usage |
word_unsigned |
type |
word (unsigned) |
access |
write only |
mechanism |
by reference |
Specifies the key code into which key-name is to be
translated. The key-code argument is the address of an
unsigned word that contains the key code.
Key-code is the same as the
word-terminator-code argument returned by
SMG$READ_COMPOSED_LINE, SMG$READ_KEYSTROKE, and SMG$READ_STRING.
Description
SMG$NAME_TO_KEYCODE translates the key name of a key on the keyboard
into its associated key code. This key code is the same code that is
returned by the SMG$READ_COMPOSED_LINE, SMG$READ_KEYSTROKE, and
SMG$READ_STRING routines in the word-terminator-code
argument. The form of the key code returned by this routine is
SMG$K_TRM_keyname. For example, if you supply the key name ENTER, the
key code returned by this routine is SMG$K_TRM_ENTER.
For more information on terminator codes, see Table 3-1 in
Chapter 3.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVKEYNAM
|
Invalid
key-name.
|
SMG$PASTE_VIRTUAL_DISPLAY
The Paste Virtual Display routine pastes a virtual display to a
pasteboard.
Format
SMG$PASTE_VIRTUAL_DISPLAY display-id ,pasteboard-id [,pasteboard-row]
[,pasteboard-column] [,top-display-id]
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 to be pasted. The
display-id argument is the address of an unsigned
longword that contains the display identifier.
Display-id is returned by SMG$CREATE_VIRTUAL_DISPLAY.
pasteboard-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the pasteboard to which the display is to be pasted. The
pasteboard-id argument is the address of an unsigned
longword that contains the pasteboard identifier.
pasteboard-row
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the row of the pasteboard that is to contain row 1 of the
specified virtual display. The pasteboard-row argument
is the address of a signed longword that contains the row number.
If pasteboard-row is omitted, the last row to which
the virtual display was pasted (on any pasteboard) is used. If
pasteboard-row is omitted and the virtual display was
not previously pasted, then row 1 is used.
pasteboard-column
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the column of the pasteboard that is to contain column 1 of
the specified virtual display. The pasteboard-column
argument is the address of a signed longword that contains the column
number.
If pasteboard-column is omitted, the last column to
which the virtual display was pasted (on any pasteboard) is used. If
pasteboard-column is omitted and the virtual display
was not previously pasted, then column 1 is used.
top-display-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Identifier of the virtual display under which to paste
display-id. The optional
top-display-id argument is the address of an unsigned
longword containing this identifier. Note that the virtual display
specified by top-display-id must already be pasted.
Description
SMG$PASTE_VIRTUAL_DISPLAY places a display on a pasteboard and makes
the display visible, unless the optional argument
top-display-id is specified. If
top-display-id is specified, SMG$PASTE_VIRTUAL_DISPLAY
pastes the virtual display being pasted under the virtual display
specified by top-display-id. In this case, the virtual
display specified by top-display-id must already be
pasted.
Do not use this routine if the virtual display is batched.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
SMG$_INVPAS_ID
|
Invalid
pasteboard-id.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$_ILLBATFNC
|
Display is being batched; illegal operation.
|
Example
|
0 | 1 | 2 | 3 | 4 | 5 | 6 |
1234567890123456789012345678901234567890123456789012345678901234567890
C* RPG program demonstrating SMG$PASTE_VIRTUAL_DISLAY.
C CREPAS EXTRN'SMG$CREATE_PASTEBOARD'
C CREDIS EXTRN'SMG$CREATE_VIRTUAL_DISPLAY'
C PUTCHA EXTRN'SMG$PUT_CHARS'
C PASDIS EXTRN'SMG$PASTE_VIRTUAL_DISPLAY'
C Z-ADD0 ZERO 90
C Z-ADD1 LINCOL 90
C Z-ADD2 LINE 90
C Z-ADD5 COLUMN 90
C MOVE 'Menu' OUT 4
C* Create the pasteboard.
C CALL CREPAS
C PARM PASTID 90 WL
C PARMV ZERO
C PARM HEIGHT 90 WL
C PARM WIDTH 90 WL
C* Create the virtual display.
C CALL CREDIS
C PARM HEIGHT RL
C PARM WIDTH RL
C PARM DISPID 90 WL
C* Output the 'Menu'.
C CALL PUTCHA
C PARM DISPID RL
C PARMD OUT
C PARM LINE RL
C PARM COLUMN RL
C* Paste the virtual display.
C CALL PASDIS
C PARM DISPID RL
C PARM PASTID RL
C PARM LINCOL RL
C PARM LINCOL RL
C SETON LR
The RPG II program above displays 'Menu' beginning at line 2 column 5.
|
This RPG II program calls several SMG$ routines. For another example of
how to call SMG$PASTE_VIRTUAL_DISPLAY, see the RPG II example in the
description of SMG$CREATE_PASTEBOARD.
SMG$POP_VIRTUAL_DISPLAY
The Delete a Series of Virtual Displays routine deletes a specified
virtual display and all displays that were pasted on the specified
pasteboard on top of the specified virtual display.
Format
SMG$POP_VIRTUAL_DISPLAY display-id ,pasteboard-id
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 lowest (first) virtual display to be deleted. The
display-id argument is the address of an unsigned
longword that contains the display identifier. All displays that are
higher in the pasting order (that is, all displays that were pasted
after the specified display) are deleted as well.
Display-id is returned by SMG$CREATE_VIRTUAL_DISPLAY.
pasteboard-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the pasteboard on which the display deletions take place. The
pasteboard-id argument is the address of an unsigned
longword that contains the pasteboard identifier.
Description
SMG$POP_VIRTUAL_DISPLAY deletes (not merely unpastes) one or more
displays from the specified pasteboard, starting with the display
specified and including all displays that are higher in the pasting
order (that is, all displays that were pasted on top of the specified
display).
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
SMG$_INVPAS_ID
|
Invalid
pasteboard-id.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$PUT_CHARS
The Write Characters to a Virtual Display routine writes characters in
a virtual display with the text you specify.
Format
SMG$PUT_CHARS display-id ,text [,start-row] [,start-column] [,flags]
[,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 display-id
argument is the address of an unsigned longword that contains the
display identifier.
Display-id is returned by SMG$CREATE_VIRTUAL_DISPLAY.
text
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
Characters to be written to the virtual display. The
text argument is the address of a descriptor pointing
to the character string.
start-row
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the row at which output begins. If start-row
is omitted, output begins on the current row. 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 |
Specifies the column at which output begins. If
start-column is omitted, output begins on the current
column. The start-column argument is the address of a
signed longword that contains the column number.
In the case that the start-column specifies the right
portion of a Korean character, the left portion of the character
becomes an undefined character.
flags
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Optional bit mask that specifies the action to take before the
specified text is output. The flags argument is the
address of an unsigned longword bit mask that contains the flag.
Flags accepts the following values:
0
|
Does not erase line (the default).
|
SMG$M_ERASE_TO_EOL
|
Erases the remaining part of the line.
|
SMG$M_ERASE_LINE
|
Erases the entire line.
|
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 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 text.
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_HANGUL
|
DEC Hangul
|
1One of DEC supplemental character set and Latin-1 character
set.
Description
SMG$PUT_CHARS writes text to the specified virtual display, possibly
overwriting any existing text. Use SMG$INSERT_CHARS to write new text
while preserving existing text.
By default, SMG$PUT_CHARS modifies only those character positions where
new text is written. However, you can erase the line before the new
text is written by specifying SMG$M_ERASE_LINE for the
flags argument, or you can erase the remainder of the
line after the text is written by specifying SMG$M_ERASE_TO_EOL for the
flags argument. The cursor remains at the character
position immediately following the last text written. Note that this
routine writes to a single line; excess characters at the end of the
line are discarded. However, if the display has the SMG$M_TRUNC_ICON
attribute, SMG$PUT_CHAR outputs the truncation icon when the line
overflows the display.
Original SMG routines support only ASCII(default) and DEC Special
Graphics, but Korean SMG will allow users to specify the
character-set which enables Korean language to
be used.
In case Korean language character set is used and the
start-column is on the right portion of a
Korean character, the previous position, the left portion of the
character will become undefined character. Also, if the operation
terminates on the left portion of a Korean character, the next
position, the right portion of the character will be undefined
character. Furthermore, if the discard begins on the right portion of a
Korean character, the left portion of the character will become
undefined character.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVCOL
|
Invalid column.
|
SMG$_INVROW
|
Invalid row.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
LIB$_INVSTRDES
|
Invalid string descriptor.
|
SMG$_WILUSERMS
|
Pasteboard is not a video terminal.
|
Examples
#1 |
C+
C This DEC Fortran example program demonstrates the use of
C SMG$PUT_CHARS.
C-
INTEGER SMG$CREATE_VIRTUAL_DISPLAY, SMG$CREATE_PASTEBOARD
INTEGER SMG$PASTE_VIRTUAL_DISPLAY, SMG$PUT_CHARS
INTEGER DISPLAY1, PASTE1, ROWS, COLUMNS, BORDER, STATUS
C+
C Create the virtual display. To give it a border, set BORDER = 1.
C No border would be BORDER = 0.
C-
ROWS = 7
COLUMNS = 50
BORDER = 1
STATUS = SMG$CREATE_VIRTUAL_DISPLAY
1 (ROWS, COLUMNS, DISPLAY1, BORDER)
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Create the pasteboard.
C-
STATUS = SMG$CREATE_PASTEBOARD (PASTE1)
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Put data in the virtual display.
C-
STATUS = SMG$PUT_CHARS ( DISPLAY1,
1 ' This virtual display has 7 rows and 50 columns.', 2, 1 )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
STATUS = SMG$PUT_CHARS ( DISPLAY1,
1 ' This is a bordered virtual display.', 4, 1 )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
STATUS = SMG$PUT_CHARS ( DISPLAY1,
1 ' SMG$PUT_CHARS puts data in this virtual display.', 6, 1 )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Paste the virtual display.
C-
STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY1, PASTE1, 4, 15 )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
END
|
The output generated by this FORTRAN program is shown in Figure SMG-33.
Figure SMG-33 Output of FORTRAN Program Calling
SMG$PUT_CHARS
|