home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / visionix / vmoui.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-12-12  |  10.4 KB  |  454 lines

  1. Unit VMouI;
  2.  
  3. Interface
  4.  
  5. Const
  6.  
  7.   { MouRegister constants }
  8.  
  9.   MR_MOUGETNUMBUTTONS     = $00000001;
  10.   MR_MOUGETNUMMICKEYS     = $00000002;
  11.   MR_MOUGETDEVSTATUS      = $00000004;
  12.   MR_MOUGETNUMQUEEL       = $00000008;
  13.   MR_MOUREADEVENTQUE      = $00000010;
  14.   MR_MOUGETSCALEFACT      = $00000020;
  15.   MR_MOUGETEVENTMASK      = $00000040;
  16.   MR_MOUSETSCALEFACT      = $00000080;
  17.   MR_MOUSETEVENTMASK      = $00000100;
  18.   MR_MOUOPEN              = $00000800;
  19.   MR_MOUCLOSE             = $00001000;
  20.   MR_MOUGETPTRSHAPE       = $00002000;
  21.   MR_MOUSETPTRSHAPE       = $00004000;
  22.   MR_MOUDRAWPTR           = $00008000;
  23.   MR_MOUREMOVEPTR         = $00010000;
  24.   MR_MOUGETPTRPOS         = $00020000;
  25.   MR_MOUSETPTRPOS         = $00040000;
  26.   MR_MOUINITREAL          = $00080000;
  27.   MR_MOUSETDEVSTATUS      = $00100000;
  28.  
  29.   { mouse button constants }
  30.  
  31.   MHK_BUTTON1             = $0001;
  32.   MHK_BUTTON2             = $0002;
  33.   MHK_BUTTON3             = $0004;
  34.  
  35.   { MouGet/SetDevStatus constants }
  36.  
  37.   MOUSE_QUEUEBUSY         = $0001;
  38.   MOUSE_BLOCKREAD         = $0002;
  39.   MOUSE_FLUSH             = $0004;
  40.   MOUSE_UNSUPPORTED_MODE  = $0008;
  41.   MOUSE_DISABLED          = $0100;
  42.   MOUSE_MICKEYS           = $0200;
  43.  
  44.   { MouReadEventQue constants }
  45.  
  46.   MOU_NOWAIT              = $0000;
  47.   MOU_WAIT                = $0001;
  48.  
  49.   { Mouse que event types }
  50.  
  51.   MOUSE_MOTION                = $0001;
  52.   MOUSE_MOTION_WITH_BN1_DOWN  = $0002;
  53.   MOUSE_BN1_DOWN              = $0004;
  54.   MOUSE_MOTION_WITH_BN2_DOWN  = $0008;
  55.   MOUSE_BN2_DOWN              = $0010;
  56.   MOUSE_MOTION_WITH_BN3_DOWN  = $0020;
  57.   MOUSE_BN3_DOWN              = $0040;
  58.  
  59.   { MouSetDevStatus constants }
  60.  
  61.   MOU_NODRAW      = $0001;
  62.   MOU_DRAW        = $0000;
  63.   MOU_MICKEYS     = $0002;
  64.   MOU_PELS        = $0000;
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. Type
  73.  
  74.   PWORD = ^WORD;
  75.  
  76.   TMH = WORD;
  77.  
  78.   TMouQueInfo = RECORD
  79.  
  80.     Events     : WORD;
  81.     MaxEvents  : WORD;
  82.  
  83.   END;
  84.  
  85.   PMouQueInfo = ^TMouQueInfo;
  86.  
  87.  
  88.   TPtrLoc = RECORD
  89.  
  90.     Row    : WORD;
  91.     Col    : WORD;
  92.  
  93.   END;
  94.  
  95.   PPtrLoc = ^TPtrLoc;
  96.  
  97.  
  98.   TPtrShape = RECORD
  99.  
  100.     CB     : WORD;
  101.     Col    : WORD;
  102.     Row    : WORD;
  103.     HotCol : WORD;
  104.     HotRow : WORD;
  105.  
  106.   END;
  107.  
  108.   PPtrShape = ^TPtrShape;
  109.  
  110.  
  111.   TScaleFact = RECORD
  112.  
  113.     RowScale : WORD;
  114.     ColScale : WORD;
  115.  
  116.   END;
  117.  
  118.   PScaleFact = ^TScaleFact;
  119.  
  120.  
  121.   TMouEventInfo = RECORD
  122.  
  123.     FS     : WORD;
  124.     Time   : LONGINT;
  125.     Row    : WORD;
  126.     Col    : WORD;
  127.  
  128.   END;
  129.  
  130.   PMouEventInfo = ^TMouEventInfo;
  131.  
  132.   TNoPtrRect = RECORD
  133.  
  134.     TopRow       : WORD;
  135.     TopCol       : WORD;
  136.     BottomRow    : WORD;
  137.     BottomCol    : WORD;
  138.  
  139.   END;
  140.  
  141.   PNoPtrRect = ^TNoPtrRect;
  142.  
  143.  
  144.   TThreshold = RECORD
  145.  
  146.     Length       : WORD;
  147.     Level1       : WORD;
  148.     Level1Mult   : WORD;
  149.     Level2       : WORD;
  150.     Level2Mult   : WORD;
  151.  
  152.   END;
  153.  
  154.   PThreshold = ^TThreshold;
  155.  
  156. Function  MouClose(               MouHandle      : TMH          ) : WORD;
  157.  
  158. Function  MouDeRegister                                           : WORD;
  159.  
  160. Function  MouDrawPtr(             MouHandle      : TMH          ) : WORD;
  161.  
  162. Function  MouFlushQue(            MouHandle      : TMH          ) : WORD;
  163.  
  164. Function  MouGetDevStatus(    Var Status         : WORD;
  165.                                   MouHandle      : TMH          ) : WORD;
  166.  
  167. Function  MouGetEventMask(    Var EventMask      : WORD;
  168.                                   MouHandle      : TMH          ) : WORD;
  169.  
  170. Function  MouGetNumButtons(   Var NumButtons     : WORD;
  171.                                   MouHandle      : TMH          ) : WORD;
  172.  
  173. Function  MouGetNumMickeys(   Var Mickeys        : WORD;
  174.                                   MouHandle      : TMH          ) : WORD;
  175.  
  176.  
  177. Function  MouGetNumQueEl(         MouQueInfo     : PMouQueInfo;
  178.                                   MouHandle      : TMH          ) : WORD;
  179.  
  180.  
  181. Function  MouGetPtrPos(           PtrLoc         : PPtrLoc;
  182.                                   MouHandle      : TMH          ) : WORD;
  183.  
  184.  
  185. Function  MouGetPtrShape(         Buff           : POINTER;
  186.                                   PtrShape       : PPtrShape;
  187.                                   MouHandle      : TMH          ) : WORD;
  188.  
  189.  
  190.  
  191. Function  MouGetScaleFact(        ScaleFact      : PScaleFact;
  192.                                   MouHandle      : TMH          ) : WORD;
  193.  
  194.  
  195. Function  MouGetThreshold(        Threshold      : PThreshold;
  196.                                   MouHandle      : TMH          ) : WORD;
  197.  
  198. Function  MouInitReal(            DriverName     : PCHAR        ) : WORD;
  199.  
  200.  
  201. Function  MouOpen(                DriverName     : PCHAR;
  202.                               Var MouHandle      : TMH          ) : WORD;
  203.  
  204.  
  205. Function  MouReadEventQue(        MouseEvent     : PMouEventInfo;
  206.                               Var WaitFlag       : WORD;
  207.                                   MouHandle      : TMH          ) : WORD;
  208.  
  209. Function  MouRegister(            ModuleName     : PCHAR;
  210.                                   EntryName      : WORD;
  211.                                   FuncFlags      : LONGINT      ) : WORD;
  212.  
  213. Function  MouRemovePtr(           NoPtrRect      : PNoPtrRect;
  214.                                   MouHandle      : TMH          ) : WORD;
  215.  
  216. Function  MouSetDevStatus(        Status         : PWORD;
  217.                                   MouHandle      : TMH          ) : WORD;
  218.  
  219. Function  MouSetEventMask(        Events         : PWORD;
  220.                                   MouHandle      : TMH          ) : WORD;
  221.  
  222.  
  223. Function  MouSetPtrPos(           PtrLoc         : PPtrLoc;
  224.                                   MouHandle      : TMH          ) : WORD;
  225.  
  226.  
  227.  
  228. Function  MouSetPtrShape(         Buff           : POINTER;
  229.                                   PtrShape       : PPtrShape;
  230.                                   MouHandle      : TMH          ) : WORD;
  231.  
  232.  
  233. Function  MouSetScaleFact(        ScaleFact      : PScaleFact;
  234.                                   MouHandle      : TMH          ) : WORD;
  235.  
  236. Function  MouSetThreshold(        Threshold      : PThreshold;
  237.                                   MouHandle      : TMH          ) : WORD;
  238.  
  239. Function  MouSync(                Waitflag       : WORD         ) : WORD;
  240.  
  241.  
  242.  
  243.  
  244. Implementation
  245.  
  246. Function  MouClose(               MouHandle      : TMH          ) : WORD;
  247.  
  248.   External 'MOUCALLS' Index 9;
  249.  
  250.  
  251.  
  252. Function  MouDeRegister                                           : WORD;
  253.  
  254.   External 'MOUCALLS' Index 14;
  255.  
  256.  
  257.  
  258.  
  259. Function  MouDrawPtr(             MouHandle      : TMH          ) : WORD;
  260.  
  261.   External 'MOUCALLS' Index 26;
  262.  
  263.  
  264.  
  265.  
  266. Function  MouFlushQue(            MouHandle      : TMH          ) : WORD;
  267.  
  268.   External 'MOUCALLS' Index 7;
  269.  
  270.  
  271.  
  272.  
  273. Function  MouGetDevStatus(    Var Status         : WORD;
  274.                                   MouHandle      : TMH          ) : WORD;
  275.  
  276.   External 'MOUCALLS' Index 22;
  277.  
  278.  
  279.  
  280.  
  281. Function  MouGetEventMask(    Var EventMask      : WORD;
  282.                                   MouHandle      : TMH          ) : WORD;
  283.  
  284.   External 'MOUCALLS' Index 15;
  285.  
  286.  
  287.  
  288.  
  289. Function  MouGetNumButtons(   Var NumButtons     : WORD;
  290.                                   MouHandle      : TMH          ) : WORD;
  291.  
  292.   External 'MOUCALLS' Index 8;
  293.  
  294.  
  295.  
  296.  
  297. Function  MouGetNumMickeys(   Var Mickeys        : WORD;
  298.                                   MouHandle      : TMH          ) : WORD;
  299.  
  300.   External 'MOUCALLS' Index 3;
  301.  
  302.  
  303.  
  304.  
  305. Function  MouGetNumQueEl(         MouQueInfo     : PMouQueInfo;
  306.                                   MouHandle      : TMH          ) : WORD;
  307.  
  308.   External 'MOUCALLS' Index 13;
  309.  
  310.  
  311.  
  312.  
  313.  
  314. Function  MouGetPtrPos(           PtrLoc         : PPtrLoc;
  315.                                   MouHandle      : TMH          ) : WORD;
  316.  
  317.   External 'MOUCALLS' Index 19;
  318.  
  319.  
  320.  
  321.  
  322.  
  323. Function  MouGetPtrShape(         Buff           : POINTER;
  324.                                   PtrShape       : PPtrShape;
  325.                                   MouHandle      : TMH          ) : WORD;
  326.  
  327.   External 'MOUCALLS' Index 1;
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. Function  MouGetScaleFact(        ScaleFact      : PScaleFact;
  335.                                   MouHandle      : TMH          ) : WORD;
  336.  
  337.   External 'MOUCALLS' Index 6;
  338.  
  339.  
  340. Function  MouGetThreshold(        Threshold      : PThreshold;
  341.                                   MouHandle      : TMH          ) : WORD;
  342.  
  343.   External 'MOUCALLS' Index 29;
  344.  
  345.  
  346.  
  347. Function  MouInitReal(            DriverName     : PCHAR        ) : WORD;
  348.  
  349.   External 'MOUCALLS' Index 27;
  350.  
  351.  
  352.  
  353.  
  354.  
  355. Function  MouOpen(                DriverName     : PCHAR;
  356.                               Var MouHandle      : TMH          ) : WORD;
  357.  
  358.   External 'MOUCALLS' Index 17;
  359.  
  360.  
  361.  
  362.  
  363.  
  364. Function  MouReadEventQue(        MouseEvent     : PMouEventInfo;
  365.                               Var WaitFlag       : WORD;
  366.                                   MouHandle      : TMH          ) : WORD;
  367.  
  368.   External 'MOUCALLS' Index 20;
  369.  
  370.  
  371.  
  372.  
  373. Function  MouRegister(            ModuleName     : PCHAR;
  374.                                   EntryName      : WORD;
  375.                                   FuncFlags      : LONGINT      ) : WORD;
  376.  
  377.   External 'MOUCALLS' Index 24;
  378.  
  379.  
  380.  
  381.  
  382. Function  MouRemovePtr(           NoPtrRect      : PNoPtrRect;
  383.                                   MouHandle      : TMH          ) : WORD;
  384.  
  385.  
  386.   External 'MOUCALLS' Index 18;
  387.  
  388.  
  389.  
  390. Function  MouSetDevStatus(        Status         : PWORD;
  391.                                   MouHandle      : TMH          ) : WORD;
  392.  
  393.   External 'MOUCALLS' Index 25;
  394.  
  395.  
  396.  
  397.  
  398. Function  MouSetEventMask(        Events         : PWORD;
  399.                                   MouHandle      : TMH          ) : WORD;
  400.  
  401.   External 'MOUCALLS' Index 16;
  402.  
  403.  
  404.  
  405.  
  406.  
  407. Function  MouSetPtrPos(           PtrLoc         : PPtrLoc;
  408.                                   MouHandle      : TMH          ) : WORD;
  409.  
  410.   External 'MOUCALLS' Index 21;
  411.  
  412.  
  413.  
  414.  
  415.  
  416. Function  MouSetPtrShape(         Buff           : POINTER;
  417.                                   PtrShape       : PPtrShape;
  418.                                   MouHandle      : TMH          ) : WORD;
  419.  
  420.   External 'MOUCALLS' Index 2;
  421.  
  422.  
  423.  
  424.  
  425.  
  426. Function  MouSetScaleFact(        ScaleFact      : PScaleFact;
  427.                                   MouHandle      : TMH          ) : WORD;
  428.  
  429.   External 'MOUCALLS' Index 11;
  430.  
  431.  
  432.  
  433.  
  434. Function  MouSetThreshold(        Threshold      : PThreshold;
  435.                                   MouHandle      : TMH          ) : WORD;
  436.  
  437.   External 'MOUCALLS' Index 30;
  438.  
  439.  
  440. Function  MouSync(                Waitflag       : WORD         ) : WORD;
  441.  
  442.   External 'MOUCALLS' Index 23;
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451. BEGIN
  452.  
  453.  
  454. END.