(go to: table of contents, index, list of vms_smg, prev: CHANGE_VIRTUAL_DISPLAY, next: NEXT)
Format:
CHECK_FOR_OCCLUSION - Check for Occlusion
Checks whether a virtual display is covered (occluded) by another virtual
display.
03-JUL-2000 ZE.
status, occlusion_state = \
vms_smg.check_for_occlusion (display_id, pasteboard_id)
Returns:
Arguments:
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
>>> 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
>>> vms_smg.put_chars (vtdpy2, 'V2', 0, 0)
>>>
>>> # paste virtual display 1
>>> status = vms_smg.paste_virtual_display \
... (vtdpy1, pasteboard_id, 3, 5, None)
>>>
>>> # check if display 1 is occluded
>>> status, occlusion_state = \
... vms_smg.check_for_occlusion (vtdpy1, pasteboard_id)
>>>
>>> print vms_sys.getmsg (status)[0]
%SYSTEM-S-NORMAL, normal successful completion
>>> print occlusion_state
0
>>>
>>> # paste virtual display 2
>>> status = vms_smg.paste_virtual_display \
... (vtdpy2, pasteboard_id, 5, 7, None)
>>>
>>> # again, check if display 1 is occluded
>>> status, occlusion_state = \
... vms_smg.check_for_occlusion (vtdpy1, pasteboard_id)
>>>
>>> print vms_sys.getmsg (status)[0]
%SYSTEM-S-NORMAL, normal successful completion
>>> print occlusion_state
1
>>>
>>> # unpaste display 1
>>> status = vms_smg.unpaste_virtual_display (vtdpy1, pasteboard_id)
>>>
>>> # again, check if display 1 is occluded
>>> status, occlusion_state = \
... vms_smg.check_for_occlusion (vtdpy1, pasteboard_id)
>>>
>>> print vms_sys.getmsg (status)[0]
%SMG-F-NOTPASTED, given display is not pasted to given pasteboard
>>> print occlusion_state
0
>>>
>>> # bad pasteboard ID
>>> status, occlusion_state = \
... vms_smg.check_for_occlusion (vtdpy1, pasteboard_id+99)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_smg.error: (1212964, '%SMG-F-INVPAS_ID, invalid pasteboard-id')
>>>
(go to: table of contents,
index,
list of vms_smg,
prev: CHANGE_VIRTUAL_DISPLAY,
next: NEXT)