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/ggcur.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/ggcur.x')
-rw-r--r-- | sys/gio/ggcur.x | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sys/gio/ggcur.x b/sys/gio/ggcur.x new file mode 100644 index 00000000..40da0a0f --- /dev/null +++ b/sys/gio/ggcur.x @@ -0,0 +1,37 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <gki.h> +include <gio.h> + +# GGCUR -- Perform a graphics cursor read. The current graphics cursor is +# read and the cursor value is returned. On output, CN is the cursor number +# which was read, KEY is the key typed to terminate the cursor read, SX,SY +# are the NDC screen coordinates of the cursor, RASTER is the raster number +# or zero, and RX,RY are the raster-relative coordinates of the cursor. If +# the device does not support rasters or if the cursor is not in a rasters +# when read, RASTER is zero on output and RX,RY are the same as SX,SY. + +int procedure ggcur (gp, cn, key, sx, sy, raster, rx, ry) + +pointer gp #I graphics descriptor +int cn #O cursor which was read +int key #O key typed or EOF +real sx, sy #O screen position of cursor in NDC coordinates +int raster #O raster number +real rx, ry #O raster position of cursor in NDC coordinates + +int m_sx, m_sy +int m_rx, m_ry + +begin + call gflush (gp) + call gki_getcursor (GP_FD(gp), GP_CURSOR(gp), + 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 |