|
OpenVMS/Hangul RTL Korean Screen Management (SMG$)
Manual
SMG$FLUSH_BUFFER
The Flush Buffer routine flushes all buffered output to the terminal.
Format
SMG$FLUSH_BUFFER pasteboard-id
RETURNS
OpenVMS usage |
cond_value |
type |
longword (unsigned) |
access |
write only |
mechanism |
by value |
Arguments
pasteboard-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the pasteboard to be flushed. The
pasteboard-id argument is the address of an unsigned
longword that contains the pasteboard identifier.
Pasteboard-id is returned by SMG$CREATE_PASTEBOARD.
Description
SMG$FLUSH_BUFFER causes all buffered output that is not already output
to be sent to the pasteboard immediately. The Screen Management
Facility outputs the text when the buffer is full; therefore, this
routine is only needed when a partial buffer must be output. The
calling program would normally call this routine just before performing
some CPU-intensive calculations, or whenever the pasteboard must be up
to date.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$_INVPAS_ID
|
Invalid
pasteboard-id.
|
SS$_xxxx
|
Any error from $QIOW.
|
SMG$GET_BROADCAST_MESSAGE
The Get Broadcast Message routine determines if a message has been
broadcast to the pasteboard and returns the message.
Format
SMG$GET_BROADCAST_MESSAGE pasteboard-id [,message] [,message-length]
[,message-type]
RETURNS
OpenVMS usage |
cond_value |
type |
longword (unsigned) |
access |
write only |
mechanism |
by value |
Arguments
pasteboard-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the pasteboard to be checked for the presence of a broadcast
message. The pasteboard-id argument is the address of
an unsigned longword that contains the pasteboard identifier.
Pasteboard-id is returned by SMG$CREATE_PASTEBOARD.
message
OpenVMS usage |
char_string |
type |
character string |
access |
write only |
mechanism |
by descriptor |
A string that receives the broadcast message, if such a message is
available. The message argument is the address of a
descriptor that points to the string into which the message text is
written. If this argument is omitted, the broadcast message is
discarded.
message-length
OpenVMS usage |
word_unsigned |
type |
word (unsigned) |
access |
write only |
mechanism |
by reference |
Receives the actual length of the broadcast message. The
message-length argument is the address of an unsigned
word into which is written the length of the message.
message-type
OpenVMS usage |
word_unsigned |
type |
word (unsigned) |
access |
write only |
mechanism |
by reference |
Receives the type of broadcast message. The
message-type argument is the address of an unsigned
word into which is written the type of message. Values for
message-type are defined by the $MSGDEF library
definition. If the value for message-type is not
MSG$_TRMBRDCST, the condition value returned is SMG$_NOBRDMSG.
Description
SMG$GET_BROADCAST_MESSAGE determines if any broadcast messages have
been sent to the specified pasteboard while broadcast trapping was
enabled and, if so, returns the message in the message
argument. You may call this routine repeatedly until all broadcast
messages have been returned. If there are no more broadcast messages
available, SMG$GET_BROADCAST_MESSAGE returns the success status
SMG$_NO_MORMSG.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_NO_MORMSG
|
Successful completion. No more messages to be returned.
|
SMG$_NONBRDMSG
|
Nonbroadcast message returned.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$_INVPAS_ID
|
Invalid
pasteboard-id.
|
Any condition values returned by LIB$SCOPY_DXDX.
SMG$GET_DISPLAY_ATTR
The Get Display Attributes routine receives the attributes associated
with a virtual display.
Format
SMG$GET_DISPLAY_ATTR display-id [,height] [,width]
[,display-attributes] [,video-attributes] [,character-set] [,flags]
RETURNS
OpenVMS usage |
cond_value |
type |
longword (unsigned) |
access |
write only |
mechanism |
by value |
Arguments
display-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
write only |
mechanism |
by reference |
Specifies the virtual display for which information is requested. 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.
height
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
write only |
mechanism |
by reference |
Receives the number of rows in the display. The optional
height argument is the address of a signed longword
into which the height is written.
width
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
write only |
mechanism |
by reference |
Receives the number of columns in the display. The optional
width argument is the address of a signed longword
into which is written the number of columns in the display.
display-attributes
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
write only |
mechanism |
by reference |
Receives the current default display attributes. The optional
display-attributes argument is the address of an
unsigned longword into which the current display attributes are written.
Valid values for display-attributes are as follows:
SMG$M_BORDER
|
Indicates a bordered display.
|
SMG$M_BLOCK_BORDER
|
Indicates a block bordered display.
|
SMG$M_DISPLAY_CONTROLS
|
Indicates that control characters such as carriage return and line feed
are displayed as graphic characters.
|
SMG$M_TRUNC_ICON
|
Indicates that an icon (generally a diamond shape) is displayed where
truncation of a line exceeding the width of the virtual display has
occurred.
|
video-attributes
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
write only |
mechanism |
by reference |
Receives the current default video attributes. The optional
video-attributes argument is the address of an
unsigned longword into which the current video attributes are written.
Valid video attributes are as follows:
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.
|
character-set
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
write only |
mechanism |
by reference |
Receives the default character set for all text in this virtual
display. The optional character-set argument is the
address of an unsigned longword that specifies the character set. If
the character set is undefined, receives SMG$C_UNKNOWN.
Value |
Character Set |
SMG$C_ASCII
|
ASCII
|
SMG$C_SPEC_GRAPHICS
|
DEC Special Graphics
|
SMG$C_HANGUL
|
DEC Hangul
|
SMG$C_UNKNOWN
|
Unknown character set
|
1One of DEC supplemental character set and Latin-1 character
set.
flags
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
write only |
mechanism |
by reference |
Optional bit mask specifying attributes of the specified display. The
flags argument is the address of an unsigned longword
containing the flag. Valid values for flags are as
follows:
SMG$M_SUBPROCESS
|
Display has a subprocess attached to it.
|
SMG$M_MENU
|
Display contains a menu.
|
SMG$M_VIEWPORT
|
Display contains a viewport.
|
Description
SMG$GET_DISPLAY_ATTR receives the attributes of a virtual display.
Original SMG routines support only ASCII(default) and DEC Special
Graphics, and SMG$GET_DISPLAY_ATTR returns either SMG$C_ASCII or
SMG$C_SPEC_GRAPHICS in the character-set argument. But
Korean SMG supports additional character set for the Korean
language, and SMG$GET_DISPLAY_ATTR returns some enhanced values in the
argument.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$GET_KEY_DEF
The Get Key Definition routine returns the key definition for a
specified key.
Format
SMG$GET_KEY_DEF key-table-id ,key-name [,if-state] [,attributes]
[,equivalence-string] [,state-string]
RETURNS
OpenVMS usage |
cond_value |
type |
longword (unsigned) |
access |
write only |
mechanism |
by value |
Arguments
key-table-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the key table from which you are extracting a definition. The
key-table-id argument is the address of an unsigned
longword that contains the key table identifier.
Key-table-id is returned by SMG$CREATE_KEY_TABLE.
key-name
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
Specifies the name of the key associated with the definition. The
key-name argument is the address of a descriptor
pointing to the key name.
Table 3-1 lists the valid key names.
if-state
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
Specifies the current state name in effect after the key is pressed.
The if-state argument is the address of a descriptor
pointing to the state name.
See SMG$ADD_KEY_DEF for more information.
attributes
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
write only |
mechanism |
by reference |
Receives the attributes bit mask for this key definition. The
attributes argument is the address of a longword into
which is written the bit mask describing the key's attributes.
Valid values are as follows:
SMG$M_KEY_NOECHO
|
If set, this bit specifies that
equiv_string is not to be echoed when this key is
pressed. If clear,
equiv_string is echoed. If SMG$M_KEY_TERMINATE is not
set, SMG$M_KEY_NOECHO is ignored.
|
SMG$M_KEY_TERMINATE
|
If set, this bit specifies that when this key is pressed (as qualified
by
if-state), the input line is complete and more
characters should not be accepted. If clear, more characters may be
accepted.
|
SMG$M_KEY_LOCK
|
If set, and if
state-string is specified, the state name specified by
state-string remains the current state until
explicitly changed by a subsequent keystroke whose definition includes a
state-string. If clear, the state name specified by
state-string remains in effect only for the next
defined key stroke.
|
SMG$M_KEY_PROTECTED
|
If set, this bit specifies that this key definition cannot be modified
or deleted. If clear, the key definition can be modified or deleted.
|
equivalence-string
OpenVMS usage |
char_string |
type |
character string |
access |
write only |
mechanism |
by descriptor |
Receives the equivalence string for this key definition. The
equivalence-string argument is the address of a
descriptor pointing to the string into which is written the equivalence
string.
state-string
OpenVMS usage |
char_string |
type |
character string |
access |
write only |
mechanism |
by descriptor |
Receives the new state name, if any, which is set by this key
definition. The state-string argument is the address
of a descriptor pointing to the string into which is written the new
state string.
Description
SMG$GET_KEY_DEF returns the key definition associated with a specified
key-name and if-state. This key
definition may be used in calls to SMG$READ_COMPOSED_LINE.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVKEYNAM
|
Invalid
key-name.
|
SMG$_INVKTB_ID
|
Invalid
key-table-id.
|
SMG$_KEYNOTDEF
|
Key not defined.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
Any condition values returned by LIB$SCOPY_DXDX.
SMG$GET_KEYBOARD_ATTRIBUTES
The Get Keyboard Attributes routine gets information about a virtual
keyboard and leaves it in a user-supplied area: the keyboard
information table (KIT).
Format
SMG$GET_KEYBOARD_ATTRIBUTES keyboard-id ,keyboard-info-table
,keyboard-info-table-size
RETURNS
OpenVMS usage |
cond_value |
type |
longword (unsigned) |
access |
write only |
mechanism |
by value |
Arguments
keyboard-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Keyboard identifier. The keyboard-id argument is the
address of an unsigned longword containing the identifier of the
virtual keyboard from which to read.
You create a virtual keyboard by calling the
SMG$CREATE_VIRTUAL_KEYBOARD routine.
keyboard-info-table
OpenVMS usage |
unspecified |
type |
unspecified |
access |
write only |
mechanism |
by reference, array reference |
Receives the keyboard attributes. The
keyboard-info-table argument is the address of a data
block into which the keyboard attributes are written.
The keyboard information table (KIT) is a byte block whose size and
field references are described in $SMGDEF. It is the caller's
responsibility to allocate the correct size block and to pass its
address to this routine.
The values in the keyboard-info-table can be accessed
through the following symbolic names:
SMG$L_DEV_CHAR
|
Device characteristics (longword).
|
SMG$L_DEV_DEPEND
|
Specific characteristics 1 (longword).
|
SMG$L_DEV_DEPEND2
|
Specific characteristics 2 (longword).
|
SMG$B_DEV_CLASS
|
Device class (byte) --- for example, DC$_TERM.
|
SMG$B_RECALL_NUM
|
Size of recall buffer (byte). *
|
SMG$B_DEVTYPE
|
Physical device type (byte) --- for example, TT$_VT100.
|
SMG$B_TYPEAHD_CHAR
|
First character in type-ahead buffer (byte). *
|
SMG$W_NUM_COLUMNS
|
Terminal width (word).
|
SMG$W_TYPEAHD_CNT
|
Number of characters in type-ahead buffer (word). *
|
Items marked with an asterisk (*) will be zero unless the device is a
terminal (DEVCLASS = DC$_TERM).
keyboard-info-table-size
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Size of the keyboard information table. The
keyboard-info-table-size argument is the address of an
unsigned longword containing the size of the KIT in bytes.
The size you specify must be exact. You can specify this size with the
symbolic constant SMG$C_KEYBOARD_INFO_BLOCK.
Description
SMG$GET_KEYBOARD_ATTRIBUTES retrieves information about a virtual
keyboard and leaves this information in the keyboard information table
(KIT). The KIT is a user-supplied area consisting of a byte block.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVARG
|
KIT is the wrong size.
|
SMG$_INVKBD_ID
|
Invalid
keyboard-id.
|
Example
|
10 !+
!This VAX BASIC program demonstrates the use of
!SMG$GET_KEYBOARD_ATTRIBUTES.
!-
OPTION TYPE = EXPLICIT
OPTION CONSTANT TYPE = INTEGER
%INCLUDE "$SMGDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET"
%INCLUDE "$SSDEF" %FROM %LIBRARY "SYS$LIBRARY:BASIC$STARLET"
EXTERNAL LONG FUNCTION LIB$SIGNAL( LONG BY VALUE), &
SMG$CREATE_VIRTUAL_KEYBOARD( LONG ), &
SMG$GET_KEYBOARD_ATTRIBUTES( LONG, ANY, LONG )
DECLARE SMG$ATTRIBUTE_INFO_BLOCK SMG_INFO
DECLARE LONG S, KEYBOARD_ID
S = SMG$CREATE_VIRTUAL_KEYBOARD( KEYBOARD_ID )
IF S <> SS$_NORMAL THEN CALL LIB$SIGNAL( S ) END IF
S = SMG$GET_KEYBOARD_ATTRIBUTES( KEYBOARD_ID, &
SMG_INFO, &
SMG$C_KEYBOARD_INFO_BLOCK )
IF S <> SS$_NORMAL THEN CALL LIB$SIGNAL( S ) END IF
PRINT SMG_INFO::SMG$L_DEV_CHAR ! Device characteristics
PRINT SMG_INFO::SMG$L_DEV_DEPEND ! Specific characteristics (1)
PRINT SMG_INFO::SMG$L_DEV_DEPEND2 ! Specific characteristics (2)
PRINT SMG_INFO::SMG$B_DEV_CLASS ! Device class ( DC$_TERM )
PRINT SMG_INFO::SMG$B_RECALL_NUM ! Size of SMG recall buffer
PRINT SMG_INFO::SMG$B_DEV_TYPE ! Device type ( DT$_VT100 )
PRINT SMG_INFO::SMG$B_TYPEAHD_CHAR ! First character in
! typeahead buffer
PRINT SMG_INFO::SMG$W_NUM_COLUMNS ! Terminal width
PRINT SMG_INFO::SMG$W_TYPEAHD_CNT ! Number of characters in
! typeahead buffer
END
|
|