(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: PREV, next: NEXT)


COPY_VIRTUAL_DISPLAY - Copy Virtual Display

Creates a copy from an existing virtual display.

Format:

    new_display_id = vms_smg.copy_virtual_display (current_display_id)
Returns:
new_display_id
Id of the newly created display.
Arguments:
current_display_id
Display identifier of the virtual display to be replicated.
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)
>>>

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

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

Screen layout

(picture VMS_SMG_006.JPG)

>>> # copy virtual display 1 to virtual display 2
>>> vtdpy2 = vms_smg.copy_virtual_display (vtdpy1)
>>>

>>> # paste virtual display 2
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy2, pasteboard_id, 6, 8, None)
>>>

Screen layout

(picture VMS_SMG_007.JPG)

>>> # try to copy a non-existing display
>>> vtdpy2 = vms_smg.copy_virtual_display (vtdpy1+99)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_smg.error: (1212956, '%SMG-F-INVDIS_ID, invalid display-id')
>>>

(go to: table of contents, index, list of vms_smg, prev: PREV, next: NEXT)

02-JUL-2000 ZE.