[comp.os.vms] Questions on VMS Workstation Software: In UIS, how do you...?

nagy%warner.hepnet@LBL.ARPA (Frank J. Nagy/VAX Guru) (09/28/87)

    What we want to do is to be able to use the mouse in the VT220
    window.  We want to write applications to use (primarily) SMG
    and run on both real VTxxx terminals and VT220-emulator windows
    on the VAXStation - we know that works.  What we want is to be
    able to use the mouse with the VT220 window on the VAXStation to
    control the text cursor.  On a real VTxxx terminal, the user will
    move the text cursor to a field with the arrow keys and then hit
    the carriage return or some other key (application-specific probably)
    to select that field and cause some action which is dependent upon
    the field selected.
 
    On the VAXStation, we want to allow the user to use the mouse to
    do the field selection, but we would rather NOT have to provide
    a complete UIS implementation of the application in parallel with
    the SMG implementation.  We would be willing to supply some UIS
    code in parallel to the SMG code; this UIS code would accept mouse
    events and report them to the application to simulate the actions
    normally taken via SMG and the keyboard.
 
    Any ideas, suggestions, helpful hints?  Any DEC developers listening
    out there?
 
    We believe one way to do this with our extra UIS code could be done
    if we had the window id of the VT220 emulator window.  Can UIS window
    ids be passed between processes (i.e., process #1 create a window
    and pass its id to process #2 in some manner and have process #2
    call UIS routines with that window id)?  This question arises from
    observing the existance of a UIS$EMULATOR process from SHOW SYSTEM
    on our VAXStations.  We believe this process creates and manages
    the VT emulator windows and so has the necessary window ids.
 

= Frank J. Nagy   "VAX Guru"
= Fermilab Research Division EED/Controls
= HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY)
= BitNet: NAGY@FNAL
= USnail: Fermilab POB 500 MS/220 Batavia, IL 60510

mic@ut-ngp.UUCP (Mic (just take out the c's and sound it out) Kaczmarczik) (09/29/87)

In article <870928060020.040@Lbl.Arpa> nagy%warner.hepnet@LBL.ARPA (Frank J. Nagy/VAX Guru) writes:
>
>    On the VAXStation, we want to allow the user to use the mouse to
>    do the field selection, 
>    [...discussion removed for brevity's sake...]
>    We believe one way to do this with our extra UIS code could be done
>    if we had the window id of the VT220 emulator window.

At the Spring DECUS in Nashville, I asked a DEC UIS developer about
this very question.  He said that 1) there isn't, nor will there ever
be a documented mechanism to get the ``wdid'' (window id) for a UIS
terminal emulator.  I can understand this, because publishing the
window identifier would force future implementations of the UIS
terminal emulator to do the same thing, which might have a negative
impact on some other aspect of the emulator. Using the wdid is also
somewhat of a kludge, albeit a nice one from some perspectives.

He also mentioned that 2) an undocumented feature of UIS 3.2 (I think
it's 3.2, but he might have been speaking of a pre-pre-release 3.3) is
that mouse clicks in a terminal emulator window can be reported via
escape sequences.  If you wanted to ``see'' mouse clicks in the
keyboard input stream, you would define the system-wide logical name
UIS$VT_ENABLE_LOCATOR to TRUE.  After that, whenever you clicked the
mouse in a VT window, the emulator would insert an escape sequence
into the keyboard input stream, indicating where you clicked, what
button you used, whether the shift key was down, and so on.  I have no
idea of the format of the escape sequences, or even if they're really
implemented under UIS 3.2; we're still running 3.1. 

This technique of reporting mouse activity is not restricted to UIS
terminal emulators; he hinted that future DEC terminals might have a
mouse attached to them, and would report mouse clicks in the same way.
In fact, I'm planning on modifying my Amiga's VT100 emulator to send
those escape sequences (once I figure them out), and teaching GNU
Emacs and TPU how to parse them. 

Disclaimer: It's been a few months since I went to DECUS, so I may not
remember everything perfectly clearly.  The developer may have been
overly tired.  Stuff happens.  Buy low, sell high. :-)

>= Frank J. Nagy   "VAX Guru"
>= Fermilab Research Division EED/Controls
>= HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY)
>= BitNet: NAGY@FNAL
>= USnail: Fermilab POB 500 MS/220 Batavia, IL 60510

Mic Kaczmarczik			don't push me 'cause I'm standing in line.
UT Austin Computation Center	here -- calm down -- have a sip of wine.
mic@ngp.utexas.edu		it's like a party sometimes it makes me wonder
ccep001@utadnx.bitnet		how I keep myself so slender


-- 
Mic Kaczmarczik			don't push me 'cause I'm standing in line.
UT Austin Computation Center	here -- calm down -- have a sip of wine.
mic@ngp.utexas.edu		it's like a party sometimes it makes me wonder
ccep001@utadnx.bitnet		how I keep myself30 (give255