Home > Enterprise >  What does the z component of ncurses mouse events represent?
What does the z component of ncurses mouse events represent?

Time:01-28

From ncurses.h

typedef struct
{
    short id;       /* ID to distinguish multiple devices */
    int x, y, z;    /* event coordinates (character-cell) */
    mmask_t bstate; /* button state bits */
}
MEVENT;

What does the z coordinate represent?

CodePudding user response:

From the curs_mouse man page:

The z member in the event structure is not presently used. It is intended for use with touch screens (which may be pressure- sensitive) or with 3D-mice/trackballs/power gloves.

Also, if you search lib_mouse.c in the ncurses source code for ->z and .z, you will find that it is only ever set to zero.

  •  Tags:  
  • Related