|
OpenVMS/Hanzi RTL Chinese Screen Management (SMG$)
Manual
SMG$SET_BROADCAST_TRAPPING
The Enable Broadcast Trapping routine enables the trapping of broadcast
messages.
Format
SMG$SET_BROADCAST_TRAPPING pasteboard-id [,AST-routine] [,AST-argument]
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 for which broadcast messages are to be
trapped. The pasteboard-id argument is the address of
an unsigned longword that contains the pasteboard identifier.
Pasteboard-id is returned by SMG$CREATE_PASTEBOARD.
AST-routine
OpenVMS usage |
ast_procedure |
type |
procedure value |
access |
read only |
mechanism |
by value |
The address of an AST routine to be called when a message is received
at the pasteboard. The AST-routine argument is the
address of the routine's procedure value.
When the AST-routine argument is either omitted or is
given a value of 0, the BROADCAST mode is set to synchronize. In this
mode, you must periodically call SMG$GET_BROADCAST_MESSAGE to see if
any broadcast messages have arrived.
The AST routine is called with five parameters:
AST-argument, R0, R1, PC, and PSL (on VAX systems) or
PS (on AXP systems).
AST-argument
OpenVMS usage |
user_arg |
type |
longword (unsigned) |
access |
read only |
mechanism |
by value |
A value to be passed to the AST routine. The
AST-argument is an unsigned longword that contains the
value to be passed to the AST routine.
Description
SMG$SET_BROADCAST_TRAPPING enables the trapping of broadcast messages
sent to the specified pasteboard (terminal). When you disable broadcast
trapping, any broadcast messages that have been queued to the terminal
are lost. If you enable broadcast trapping with
SMG$SET_BROADCAST_TRAPPING but do not disable it with
SMG$DISABLE_BROADCAST_TRAPPING before the image exits, any messages
that have been broadcast to the terminal are lost when the image exits.
The sysgen parameters DEFMBXBUFQUO and DEFMBXMXMSG are used when
creating the mailbox that receives broadcast messages.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_NOT_A_TRM
|
Informational message; the pasteboard is not a terminal.
|
SMG$_INVPAS_ID
|
Invalid
pasteboard-id.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
Any condition values returned by $DASSGN, $CANCEL, or LIB$ASN_WTH_MBX.
Example
For an example using SMG$SET_BROADCAST_TRAPPING, see the example for
the routine SMG$DISABLE_BROADCAST_TRAPPING.
SMG$SET_CURSOR_ABS
The Set Absolute Cursor Position routine moves the virtual cursor to
the specified position in a virtual display.
Format
SMG$SET_CURSOR_ABS display-id [,start-row] [,start-column]
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 to set the virtual cursor
position. 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.
start-row
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the row position to which the virtual cursor moves. The
start-row argument is the address of a signed longword
that contains the row number. If omitted, the cursor remains at the
current row.
start-column
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the column position to which the virtual cursor moves. The
start-column argument is the address of a signed
longword that contains the column number. If omitted, the virtual
cursor remains at the current column.
Description
SMG$SET_CURSOR_ABS moves the virtual cursor to the specified position
in the specified virtual display.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
SMG$_INVCOL
|
Invalid column.
|
SMG$_INVROW
|
Invalid row.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$SET_CURSOR_MODE
The Set the Cursor Mode routine turns the physical cursor on or off and
selects jump or smooth scrolling.
Format
SMG$SET_CURSOR_MODE pasteboard-id ,flags
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 |
Pasteboard identifier. The pasteboard-id argument is
the address of an unsigned longword that contains the pasteboard
identifier.
flags
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Optional bit mask that specifies scrolling and cursor attributes. The
flags argument is the address of an unsigned longword
that contains the flag. Flags accepts the following
values:
SMG$M_CURSOR_OFF
|
Clears physical cursor.
|
SMG$M_CURSOR_ON
|
Displays physical cursor.
|
SMG$M_SCROLL_JUMP
|
Jump scrolls.
|
SMG$M_SCROLL_SMOOTH
|
Smooth scrolls.
|
Description
SMG$SET_CURSOR_MODE turns the cursor on or off and selects jump or
smooth scrolling. If your terminal does not have these capabilities
defined, this routine has no effect.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$_INVPAS_ID
|
Invalid
pasteboard-id.
|
SMG$_INVARG
|
Invalid argument.
|
SMG$SET_CURSOR_REL
The Move Cursor Relative to Current Position routine moves the virtual
cursor the specified number of rows and columns from the current
virtual cursor position in a virtual display.
Format
SMG$SET_CURSOR_REL display-id [,delta-row] [,delta-column]
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 to move the virtual cursor. 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.
delta-row
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the number of rows to move the virtual cursor. The
delta-row argument is the address of a signed longword
that contains the number of rows to move. If omitted, the virtual
cursor remains at the current row position. If
delta-row is positive, the virtual cursor moves
downward the specified number of rows. If delta-row is
negative, the virtual cursor moves upward the specified number of rows.
delta-column
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the number of columns to move the cursor. The
delta-column argument is the address of a signed
longword that contains the number of columns to move. If omitted, the
virtual cursor remains at the current column position. If
delta-column is positive, the virtual cursor moves the
specified number of columns to the right. If
delta-column is negative, the virtual cursor moves the
specified number of columns to the left.
Description
SMG$SET_CURSOR_REL moves the virtual cursor the specified number of
rows and columns relative to the current virtual cursor position. If
the specified delta-row or
delta-column causes the cursor to move outside the
bounds of the virtual display, SMG$_INVROW or SMG$_INVCOL is returned.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
SMG$_INVARG
|
Invalid argument.
|
SMG$_INVCOL
|
An invalid value of
delta-column caused the cursor to move outside the
bounds of the virtual display.
|
SMG$_INVROW
|
An invalid value of
delta-row caused the cursor to move outside the bounds
of the virtual display.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$SET_DEFAULT_STATE
The Set Default State routine sets and/or returns the current default
state for a key table.
Format
SMG$SET_DEFAULT_STATE key-table-id [,new-state] [,old-state]
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 in which you are setting or inquiring about a
default state. The key-table-id argument is the
address of an unsigned longword that contains the key table identifier.
Key-table-id is returned by the SMG$CREATE_KEY_TABLE
routine.
new-state
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
Specifies the new default state for the entire key table. The
new-state argument is the address of a descriptor
pointing to the new state string. The specified state name is converted
to uppercase and stripped of trailing blanks before use.
old-state
OpenVMS usage |
char_string |
type |
character string |
access |
write only |
mechanism |
by descriptor |
Receives the existing default state name of the specified key
definition table. The old-state argument is the
address of a descriptor pointing to the string into which the old state
string is written.
Description
SMG$SET_DEFAULT_STATE sets and/or returns the default state name for an
entire key definition table. By changing the default state for an
entire key definition table, you can use the keypad keys for a new set
of functions. You can use the key definition table with the
SMG$READ_COMPOSED_LINE routine.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVKTB_ID
|
Invalid
key-table-id.
|
SMG$_INVSTANAM
|
Invalid state name.
|
LIB$_INVSTRDES
|
Invalid string descriptor.
|
SMG$SET_DISPLAY_SCROLL_REGION
The Create Display Scrolling Region routine creates a virtual scrolling
region in a virtual display.
Format
SMG$SET_DISPLAY_SCROLL_REGION display-id [,start-row] [,end-row]
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 scrolling takes place. 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.
start-row
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the first line of the virtual scrolling region. The
start-row argument is the address of a signed longword
that contains the starting line number. If omitted, the first line of
the display is used.
end-row
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the last line of the virtual scrolling region. The
end-row argument is the address of a signed longword
that contains the ending line number. If omitted, the last line of the
virtual display is used.
Description
SMG$SET_DISPLAY_SCROLL_REGION creates a virtual scrolling region in a
specified virtual display, using the specified starting and ending
lines. If the start-row and end-row
arguments are omitted, the entire display becomes a scrolling region.
This routine does not change the appearance of the pasteboard or the
virtual cursor position.
You can define part of all of a virtual display as scrolling using
SMG$SET_DISPLAY_SCROLL_REGION. Note the behavior of scrolling in the
Screen Management Facility, as follows: when you call SMG$PUT_LINE to
write to the bottom line of the scroll region, the display does not
scroll up immmediately. If the display scrolled up immmediately, it
never would be possible to use the bottom line of the scroll region.
Instead, the need for a scroll is "stored" until you issue
the next SMG$PUT_LINE call. (Note that the need for a scroll is only
stored until your next call to a whole-line write routine, such as
SMG$PUT_LINE, SMG$PUT_LINE_WIDE, and so on.)
If you call another routine after SMG$PUT_LINE, such as
SMG$SET_CURSOR_ABS or SMG$PUT_CHARS, the stored need for a scroll will
be discarded and text written to the bottom line of the scrolling
region will overwrite the existing line.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
SMG$_INVARG
|
End-row is less than or equal to
start-row.
|
SMG$_INVROW
|
Invalid row.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
|