(LOGO.JPG) Python for OpenVMS

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


LIST_PASTEBOARD_ORDER - Return Pasting Information

Return the Pasteboard identifier of the pasteboard to which the specified virtual display is pasted. Also, the pasteboard row 1 and column 1 (origins) of the virtual display are returned.

Format:

    status, context, pasteboard_id, \
    pasteboard_row, pasteboard_column = \
        vms_smg.list_pasteboard_order (display_id, context)
Returns:
status
Condition code as returned from SMG$LIST_PASTEBOARD_ORDER. Either SS$_NORMAL or SMG$_NOTPASTED are returned here - all other codes produce a Python exception. The OpenVMS V6.1 documentation says "SMG$_NOPASTED", which is wrong.
context
Search context - see the OpenVMS documentation for details.
pasteboard_id
The identifier of the pasteboard on which the virtual display is pasted.
pasteboard_row
Row of the pasteboard that contains row 1 of the specified virtual display.
pasteboard_column
Column of the pasteboard that contains column 1 of the specified virtual display.
Arguments:
display_id
Identifier of the virtual display that is pasted.
context
Search context - see the OpenVMS documentation for details.
Examples:
>>> import vms_smg
>>> import vms_smgdef
>>> import vms_sys

>>> # 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
>>> status = vms_smg.put_chars (vtdpy1, 'V1', 0, 0)
>>>

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

>>> # write to virtual display 2
>>> status = vms_smg.put_chars (vtdpy2, 'V2', 0, 0)
>>>

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

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

Screen layout, file: VMS_SMG_003.JPG

(picture VMS_SMG_003.JPG)

>>> # check virtual display 1
>>> status, context, pb_id_ret,         \
... pasteboard_row, pasteboard_column = \
...     vms_smg.list_pasteboard_order (vtdpy1, 0)
>>>
>>> print vms_sys.getmsg (status)[0]
%SYSTEM-S-NORMAL, normal successful completion
>>> print context, pb_id_ret, pasteboard_id
2965328 1 1
>>> print pasteboard_row, pasteboard_column
3 5
>>>

>>> # check if virtual display is pasted on another pasteboard
>>> #   (the updated context is used)
>>> status, context, pb_id_ret,         \
... pasteboard_row, pasteboard_column = \
...     vms_smg.list_pasteboard_order (vtdpy1, context)
>>>
>>> print vms_sys.getmsg (status)[0]
%SMG-F-NOTPASTED, given display is not pasted to given pasteboard
>>> print context, pb_id_ret, pasteboard_id
0 -1 1
>>> print pasteboard_row, pasteboard_column
0 0
>>>

----------------------------------------

>>> # unpaste virtual display 2
>>> status = vms_smg.unpaste_virtual_display \
...          (vtdpy2, pasteboard_id)
>>>

>>> # check virtual display 2
>>> status, context, pb_id_ret, \
... pasteboard_row, pasteboard_column = \
...     vms_smg.list_pasteboard_order (vtdpy2, 0)
>>>
>>> print vms_sys.getmsg (status)[0]
%SMG-F-NOTPASTED, given display is not pasted to given pasteboard
>>> print context, pb_id_ret, pasteboard_id
0 -1 1
>>> print pasteboard_row, pasteboard_column
0 0
>>>

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

10-SEP-2000 ZE.