


      MMMMOOOOUUUUSSSSEEEE((((7777))))                     ((((RRRRiiiiddddggggeeee))))                     MMMMOOOOUUUUSSSSEEEE((((7777))))



      NNNNAAAAMMMMEEEE
           mouse - pointing device

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           ////ddddeeeevvvv////mmmmoooouuuusssseeee refers to the pointing or locator device
           associated with a Ridge display _d_i_s_p(7).  Each window in a
           multi-window environment has an event queue for locator
           device events (motion and/or button changes), which may be
           read via the mmmmoooouuuusssseeee device associated with that window.

           The input device data is encoded as a sequence of bytes that
           are placed into the mouse event queue for the currently
           selected active input window.  Each mouse event is
           translated into 5 bytes, which are queued according to the
           selected window's flag bits, as described below.  The entire
           event queue is flushed first if there is not enough room
           left for all 5 bytes, thus insuring that only the most
           recent events are queued.

           The first byte contains the state of the buttons.  Bit 0
           (least significant) is the right button, bit 1 is the middle
           button, and bit 2 (more significant) is the left button.
           The other bits are normally zero, but may contain more
           button bits if a nonstandard locator device is being used.
           A bit value of 1 indicates the corresponding button is
           depressed, and a bit value of 0 indicates the button is
           released.

           The second and third bytes contain the X coordinate in two's
           complement representation, high-order byte first.  The
           fourth and fifth bytes contain the Y coordinate in the same
           format.  The coordinate system used for the X,Y position
           depends on the mode of the currently selected window and the
           event mode bits in the _w_F_l_a_g_s word for the window.

           If the EMLocCoords bit is set, then display device
           coordinates are used and the location can be anywhere on the
           display surface.  The X coordinates range from 0 to 1023 and
           the Y coordinates range from 0 to 799, with the origin in
           the upper left corner of the Ridge monochrome display
           _d_i_s_p(7).

           If the EMLocCoords bit is not set, then only mouse positions
           within the currently active window are queued.  The
           coordinate system used in this case is translated relative
           to the location of the window on the display surface and may
           be scaled depending on the current mode of the window.

           If the window is emulating a Tektronix 4014 terminal, then
           the X coordinates range from 0 to 1024 and the Y coordinates
           range from 0 to 780, with the origin in the lower left
           corner of the window.  The display device coordinates of the



      Page 1                                                   (9010-E)






      MMMMOOOOUUUUSSSSEEEE((((7777))))                     ((((RRRRiiiiddddggggeeee))))                     MMMMOOOOUUUUSSSSEEEE((((7777))))



           mouse are appropriately scaled based on the size of the
           window.

           If the window is not in Tektronix 4014 mode, then display
           device coordinates are used, but are first translated
           relative to the origin of the window.  The X coordinates
           range from 0 to one less than the width of the window and
           the Y coordinates range from 0 to one less than the height
           of the window, with the origin in the upper left corner of
           the window.

           The mouse input for a window is accessed using the _o_p_e_n(2)
           system call, providing the name mmmmoooouuuusssseeee is appended to the
           window pathname.  For example, to open the mouse input
           associated with window wwwwiiiinnnnddddoooowwww2222 on display device number
           ``0'', the pathname would be ////ddddeeeevvvv////ddddiiiisssspppp0000////wwwwiiiinnnnddddoooowwww2222////mmmmoooouuuusssseeee.

           Alternatively, the special name ////ddddeeeevvvv////mmmmoooouuuusssseeee can be used by a
           process to specify the mouse input from the window which
           corresponds to its control terminal.  This special name is
           mapped by ROS to the actual pathname of the window, plus the
           string ////mmmmoooouuuusssseeee.  Thus, processes may easily refer to the
           mouse input from their control window without having to know
           the actual window pathname.

           A process uses the standard _r_e_a_d(2) system call to access
           the mouse input from the window associated with an open file
           descriptor.  Each read will return as many bytes from the
           event queue as are requested, although it is recommended
           that 5 bytes be read at a time to maintain synchronization
           with the queuing of the mouse event bytes.

           Normally, a process will block when it attempts to read from
           a window that has no mouse input queued for it, or if the
           window is not the active input window.  A non-blocking
           _r_e_a_d(2) may be used to determine if there is any mouse input
           queued for a particular window.  If the O_NDELAY bit is set
           either by _o_p_e_n(2) or _f_c_n_t_l(2) on a file descriptor bound to
           the mouse input for a window, then a read will return
           immediately with a value of 0 when there are no mouse input
           bytes queued for the window.

           Several of the bits in the _w_F_l_a_g_s word associated with each
           window provide control over the queueing of input events
           from the mouse.

           Mouse pointing device (locator) input is placed in the mouse
           event queue for the currently selected active input window
           according to the bits defined in the <<<<ssssyyyyssss////wwwwiiiinnnnccccttttrrrrllll....hhhh>>>> header
           file.  If the bits for the currently selected window do not
           allow queueing of a mouse event, then the window associated
           with the Window Manager process is tested according to its



      Page 2                                                   (9010-E)






      MMMMOOOOUUUUSSSSEEEE((((7777))))                     ((((RRRRiiiiddddggggeeee))))                     MMMMOOOOUUUUSSSSEEEE((((7777))))



           bits.  This allows a process in the currently selected
           window to filter some or all mouse events, passing unwanted
           events to the Window Manager, which may choose to handle the
           mouse event or have it discarded.

                EMQueueLoc
                     Bit that determines if mouse input is to be queued
                     for the window.  The initial value of this bit is
                     0, which causes all mouse events for the window to
                     be ignored.  If this bit is set to 1, then mouse
                     events which satisfy the conditions specified by
                     the other control bits will be queued.

                EMLocCoords
                     Bit that determines the allowable coordinates of
                     the mouse to be queued for the window.  The
                     initial value of this bit is 0, which allows only
                     mouse events whose coordinates are inside the
                     window's boundaries to be queued.  If this bit is
                     set to 1, then mouse events located anywhere on
                     the screen which satisfy the other conditions will
                     be queued.

                EMLocMotion
                     Bit that allows queueing of mouse events resulting
                     from motion or button changes.  The initial value
                     of this bit is 0, allowing mouse events to be
                     queued only while a button is being depressed or
                     released, thus ignoring events when no buttons are
                     depressed.  If this bit is set to 1, then mouse
                     events which satisfy the other conditions will be
                     queued, regardless of button state.

                EMButtonMask
                     Bit field that determines which button changes
                     will cause a mouse input event to be queued for
                     the window when EMLocMotion is 0.  The field is
                     composed of the logical OR of the following four
                     fields, and is initialized to the value 0.

                EMRightButton
                     Bit that corresponds to the right button on the
                     mouse.  A bit value of 1 indicates that a mouse
                     event is to be queued when either the right button
                     is depressed, or when the single event of the
                     right button being released occurs.  A bit value
                     of 0 indicates that right button changes are to be
                     ignored.

                EMMiddleButton
                     Bit that corresponds to the middle button on the
                     mouse.  A bit value of 1 indicates that a mouse



      Page 3                                                   (9010-E)






      MMMMOOOOUUUUSSSSEEEE((((7777))))                     ((((RRRRiiiiddddggggeeee))))                     MMMMOOOOUUUUSSSSEEEE((((7777))))



                     event is to be queued when either the middle
                     button is depressed, or when the single event of
                     the middle button being released occurs.  A bit
                     value of 0 indicates that middle button changes
                     are to be ignored.

                EMLeftButton
                     Bit that corresponds to the left button on the
                     mouse.  A bit value of 1 indicates that a mouse
                     event is to be queued when either the left button
                     is depressed, or when the single event of the left
                     button being released occurs.  A bit value of 0
                     indicates that left button changes are to be
                     ignored.

                EMOtherButtons
                     Bit that corresponds to all other buttons on a
                     nonstandard mouse or other pointing device.  A bit
                     value of 1 indicates that a mouse event is to be
                     queued when at least one of the other buttons is
                     depressed, or when the single event of one of the
                     other buttons being released occurs.  A bit value
                     of 0 indicates that all other button changes are
                     to be ignored.

                EMSigIOLoc
                     Bit that determines if mouse input events cause a
                     SIGIO _s_i_g_n_a_l(2) to be sent to the process or
                     process group waiting for mouse input from the
                     window.  The initial value of this bit is 0, which
                     causes no signals to be sent.  If this bit is set
                     to 1, then each mouse event (not each byte) for
                     the window generates a signal to the processes
                     associated by _f_c_n_t_l(2) with the window.

           The _w_F_l_a_g_s bits that control mouse input events may be
           accessed by making an _i_o_c_t_l(2) system call using a file
           descriptor associated with a window.

                #include <termio.h>

                ioctl (filedesc, command, arg)
                int *arg;

           The _c_o_m_m_a_n_d argument using this form is:

                MOUSEGET   Get the flag bits associated with the mouse
                           input into the integer pointed to by _a_r_g.
                           All other bits are cleared to zero.

                ioctl (filedesc, command, arg)
                int arg;



      Page 4                                                   (9010-E)






      MMMMOOOOUUUUSSSSEEEE((((7777))))                     ((((RRRRiiiiddddggggeeee))))                     MMMMOOOOUUUUSSSSEEEE((((7777))))



           The _c_o_m_m_a_n_d argument using this form is:

                MOUSESET   Set the flag bits associated with the mouse
                           input from _a_r_g.  All other bits are ignored.

      DDDDEEEEVVVVIIIICCCCEEEE CCCCOOOODDDDEEEE
                                        _b_l_o_c_k-_t_y_p_e _o_r_s_t_a_n_d_a_r_d
               _d_e_v_i_c_e _t_y_p_e      _m_a_j_o_r   _m_i_n_o_r       _c_h_a_r_a_c_t_e_r-_t_y_p_e _f_i_l_e _n_a_m_e

               mouse     1      3       block       /dev/mouse

      FFFFIIIILLLLEEEESSSS
           /dev/mouse

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           _R_i_d_g_e _M_u_l_t_i-_W_i_n_d_o_w _D_i_s_p_l_a_y _M_a_n_a_g_e_m_e_n_t _G_u_i_d_e
           windows(3X), wgraf(3X), disp(7)






































      Page 5                                                   (9010-E)



