(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: GET_CHAR_AT_PHYSICAL_CURSOR, next: GET_KEYBOARD_ATTRIBUTES)


VMS_SMG_GET_DISPLAY_ATTR - Return Character at Cursor

Returns the attributes associated with a virtual display.

Format:

    height, width, display_attributes, video_attributes, \
    character_set, flags = vms_smg.get_display_attr (display_id)
Returns:
height
The number of rows in the display.
width
The number of columns in the display.
display_attributes
The current default display attributes. Bit masks like SMG_M_BORDER are in module 'vms_smgdef'.
video_attributes
The current default video attributes. Bit masks like SMG_M_BLINK are in module 'vms_smgdef'.
character_set
The default character set for all text in this virtual display. Valid values SMG_C_ASCII and SMG_C_SPEC_GRAPHICS are in module 'vms_smgdef'.
flags
Bit mask specifying attributes of the specified display. Bit masks like SMG_M_VIEWPORT are in module 'vms_smgdef'.
Arguments:
display_id
The virtual display from which to request the information.
Examples:
>>> import vms_smg
>>> import vms_smgdef

>>> # create a new DECwindows terminal using SMG
>>> status, pasteboard_id, number_of_pasteboard_rows, \
... number_of_pasteboard_columns, type_of_terminal,   \
... device_name = vms_smg.create_pasteboard           \
...   (None, vms_smgdef.SMG_M_WORKSTATION)
>>>

>>> # create virtual display 1
>>> status, vtdpy1 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

>>> # paste virtual display 1
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy1, pasteboard_id, 3, 5, None)
>>>

>>> # write to virtual display 1
>>> status = vms_smg.put_chars (vtdpy1, 'V1', 0, 0)
>>> status = vms_smg.put_chars (vtdpy1, 'TXT', 2, 2)
>>>

Screen layout, file: VMS_SMG_006.JPG

(picture VMS_SMG_006.JPG)

>>> # request information
>>> height, width, display_attributes, video_attributes, \
...     character_set, flags = vms_smg.get_display_attr (vtdpy1)
>>>
>>> print height, width
5 10
>>> print display_attributes, vms_smgdef.SMG_M_BORDER
1 1
>>> print video_attributes
0
>>> print character_set, vms_smgdef.SMG_C_ASCII
1 1
>>> print flags
0
>>>

(go to: table of contents, index, list of vms_smg, prev: GET_CHAR_AT_PHYSICAL_CURSOR, next: GET_KEYBOARD_ATTRIBUTES)

10-SEP-2000 ZE.