diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/gio/cursor/gtrrcur.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/cursor/gtrrcur.x')
-rw-r--r-- | sys/gio/cursor/gtrrcur.x | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/gio/cursor/gtrrcur.x b/sys/gio/cursor/gtrrcur.x new file mode 100644 index 00000000..495117a3 --- /dev/null +++ b/sys/gio/cursor/gtrrcur.x @@ -0,0 +1,32 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <gki.h> + +# GTR_READCURSOR -- Read the graphics cursor position in NDC coordinates. +# By the time we are called the plot has already been drawn and the +# workstation closed, hence we must reopen the workstation to read the +# cursor (the graphics terminal will not be in graphics mode otherwise). + +int procedure gtr_readcursor (fd, key, sx, sy, raster, rx, ry) + +int fd #I graphics stream +int key #O keystroke value +real sx, sy #O NDC screen coords of cursor +int raster #O raster number +real rx, ry #O NDC raster coords of cursor + +int cn +int m_sx, m_sy +int m_rx, m_ry + +begin + call gki_getcursor (fd, 0, + cn, key, m_sx, m_sy, raster, m_rx, m_ry) + + sx = real(m_sx) / GKI_MAXNDC + sy = real(m_sy) / GKI_MAXNDC + rx = real(m_rx) / GKI_MAXNDC + ry = real(m_ry) / GKI_MAXNDC + + return (key) +end |