home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / sys / h / tablet < prev    next >
Encoding:
Text File  |  1995-01-11  |  2.5 KB  |  84 lines

  1. /*
  2.  * $Header: /ax/networking:include/sys/tablet.h:networking  1.1  $
  3.  * $Source: /ax/networking:include/sys/tablet.h: $
  4.  *
  5.  * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
  6.  *
  7.  * $Desc$
  8.  * $Log:    tablet.h,v $
  9.  * Revision 1.1  95/01/11  10:19:56  kwelton
  10.  * Initial revision
  11.  * 
  12.  * Revision 1.3  88/06/17  20:21:41  beta
  13.  * Acorn Unix initial beta version
  14.  * 
  15.  */
  16. /* @(#)tablet.h    1.2 87/05/15 3.2/4.3NFSSRC */
  17. /*
  18.  * Copyright (c) 1985, 1986 Regents of the University of California.
  19.  * All rights reserved.  The Berkeley software License Agreement
  20.  * specifies the terms and conditions for redistribution.
  21.  *
  22.  *    @(#)tablet.h    7.1 (Berkeley) 6/4/86
  23.  */
  24.  
  25. #ifndef _TABLET_
  26. /*
  27.  * Tablet line discipline.
  28.  */
  29. #ifdef KERNEL
  30. #include "../h/ioctl.h"
  31. #else
  32. #include <sys/ioctl.h>
  33. #endif
  34.  
  35. /*
  36.  * Reads on the tablet return one of the following
  37.  * structures, depending on the underlying tablet type.
  38.  * The first two are defined such that a read of
  39.  * sizeof (gtcopos) on a non-gtco tablet will return
  40.  * meaningful info.  The in-proximity bit is simulated
  41.  * where the tablet does not directly provide the information.
  42.  */
  43. struct    tbpos {
  44.     int    xpos, ypos;    /* raw x-y coordinates */
  45.     short    status;        /* buttons/pen down */
  46. #define    TBINPROX    0100000        /* pen in proximity of tablet */
  47.     short    scount;        /* sample count */
  48. };
  49.  
  50. struct    gtcopos {
  51.     int    xpos, ypos;    /* raw x-y coordinates */
  52.     short    status;        /* as above */
  53.     short    scount;        /* sample count */
  54.     short    xtilt, ytilt;    /* raw tilt */
  55.     short    pressure;
  56.     short    pad;        /* pad to longword boundary */
  57. };
  58.  
  59. struct    polpos {
  60.     short    p_x, p_y, p_z;    /* raw 3-space coordinates */
  61.     short    p_azi, p_pit, p_rol;    /* azimuth, pitch, and roll */
  62.     short    p_stat;        /* status, as above */
  63.     char    p_key;        /* calculator input keyboard */
  64. };
  65.  
  66. #define BIOSMODE    _IOW(b, 1, int)        /* set mode bit(s) */
  67. #define BIOGMODE    _IOR(b, 2, int)        /* get mode bit(s) */
  68. #define    TBMODE        0xfff0        /* mode bits: */
  69. #define        TBPOINT        0x0010        /* single point */
  70. #define        TBRUN        0x0000        /* runs contin. */
  71. #define        TBSTOP        0x0020        /* shut-up */
  72. #define        TBGO        0x0000        /* ~TBSTOP */
  73. #define    TBTYPE        0x000f        /* tablet type: */
  74. #define        TBUNUSED    0x0000
  75. #define        TBHITACHI    0x0001        /* hitachi tablet */
  76. #define        TBTIGER        0x0002        /* hitachi tiger */
  77. #define        TBGTCO        0x0003        /* gtco */
  78. #define        TBPOL        0x0004        /* polhemus 3space */
  79. #define        TBHDG        0x0005        /* hdg-1111b, low res */
  80. #define        TBHDGHIRES    0x0006        /* hdg-1111b, high res */
  81. #define BIOSTYPE    _IOW(b, 3, int)        /* set tablet type */
  82. #define BIOGTYPE    _IOR(b, 4, int)        /* get tablet type*/
  83. #endif
  84.