home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource5 / 354_01 / cesmouse.doc < prev    next >
Encoding:
Text File  |  1991-08-22  |  54.3 KB  |  1,849 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                              CESMouse Tools Library
  24.  
  25.                                       With
  26.  
  27.                           Complete Joystick Functions
  28.  
  29.  
  30.  
  31.  
  32.                              Version 1.25 Shareware
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.           Copyright 1989, 1991. All Rights Reserved.
  57.  
  58.  
  59.  
  60.           John F. Jarrett
  61.  
  62.           Computer Engineering Services
  63.  
  64.           Post Office Box 1222
  65.  
  66.           Show Low, Arizona  85901
  67.  
  68.           (602) 367-8996
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.                                TABLE OF CONTENTS
  84.  
  85.  
  86.  
  87.  
  88.  
  89.           Program License ................................  1
  90.  
  91.  
  92.           Introduction ...................................  2
  93.  
  94.  
  95.           Installation ...................................  3
  96.  
  97.  
  98.           Compiling with Power C .........................  4
  99.  
  100.  
  101.           Compiling with Quick C and MS C 6.0 ............  5
  102.  
  103.  
  104.           Compiling with Turbo C .........................  7
  105.  
  106.  
  107.           Compiling With Quick Basic .....................  9
  108.  
  109.  
  110.           Mouse Functions ................................ 11
  111.  
  112.  
  113.           Example C Program For Mouse Functions .......... 20
  114.  
  115.  
  116.           Joysticks ...................................... 21
  117.  
  118.  
  119.           Joystick Functions ............................. 22
  120.  
  121.  
  122.           Example C Source for Joystick Functions ........ 24
  123.  
  124.  
  125.           Bug Report Form ................................ 25
  126.  
  127.  
  128.           Product Registration ........................... 26
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.                                 PROGRAM LICENSE
  165.  
  166.  
  167.  
  168.  
  169.          This manual,  as well as all  source code and object  code is
  170.  
  171.          copyrighted material and is registered with the United States
  172.  
  173.          Copyright Office, Copyright 1989, 1991.
  174.  
  175.  
  176.          You, the  original purchaser, do  not own this  software, but
  177.  
  178.          you have a non exclusive and non transferrable license to use
  179.  
  180.          this software  on one machine. This  software is just  like a
  181.  
  182.          book which cannot be read by another person at the same time.
  183.  
  184.  
  185.          Therefore, you may use this software  on only one machine, or
  186.  
  187.          one node of a network and make needed back up copies for your
  188.  
  189.          own  archival use.  Site licenses  and  network licenses  are
  190.  
  191.          available. Making copies  for another person is  not allowed,
  192.  
  193.          and is a violation of the United States Copyright Law.
  194.  
  195.  
  196.          You may combine the libraries, routines, functions and header
  197.  
  198.          files into  your own  executable computer  programs that  you
  199.  
  200.          write, as long as no source code of the functions within this
  201.  
  202.          library are released and your program is compiled and linked,
  203.  
  204.          without   paying  any   royalties   whatsoever  to   Computer
  205.  
  206.          Engineering Services.
  207.  
  208.  
  209.          Computer Engineering Services makes  no warranty expressed or
  210.  
  211.          implied of any kind as to the suitability, merchantability or
  212.  
  213.          applicability  of this  software  for  any purpose.  Computer
  214.  
  215.          Engineering Services is  not liable for any  damages incurred
  216.  
  217.          arrising out of the use or  inability to use this software by
  218.  
  219.          you, others or otherwise.  Computer Engineering Services only
  220.  
  221.          warrants  that the  magnetic  media  on which  this  software
  222.  
  223.          resides is free from defects  in material and workmanship for
  224.  
  225.          a  period  of ninety  days  IF  recorded and  distributed  by
  226.  
  227.          Computer Engineering Services.
  228.  
  229.  
  230.          Any reference  to Turbo C, Borland  C, Quick C,  MSC, MS-DOS,
  231.  
  232.          MicroSoft Mouse or Quick Basic,  Power C, PC-DOS, Kraft Mouse
  233.  
  234.          or Econo  Mouse, or others, are  for reference only,  and are
  235.  
  236.          U.S.   Registered  Trademarks   of;  Borland   International,
  237.  
  238.          Microsoft Corporation,  Mix Software,  International Business
  239.  
  240.          Machines, (IBM), and Kraft Systems Inc.
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                                        1
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.                                  INTRODUCTION
  267.  
  268.  
  269.  
  270.          Ever  since learning  to  write programs  for  a computer,  I
  271.  
  272.          learned the  value of  "tools" that  have assisted  me in  my
  273.  
  274.          endeavors. Often I  purchase "tools" to assist me,  such as a
  275.  
  276.          window tool kit,  communications tool kit, graphics  tool kit
  277.  
  278.          and the like. There are many programmers tool kits available.
  279.  
  280.  
  281.          My biggest problem has been coming up with the price for some
  282.  
  283.          of the tool  kits and then having to  purchase more functions
  284.  
  285.          and routines than I really want or need.
  286.  
  287.  
  288.          To this end, I have had to write many of my own tool kits, or
  289.  
  290.          canned functions that I can use in my day-to-day programming.
  291.  
  292.          Since I have yet to see a library of only mouse functions all
  293.  
  294.          by themselves,  I created just  that. The C.E.S.  Mouse Tools
  295.  
  296.          Library. This library has over fifty functions that deal only
  297.  
  298.          with  MicroSoft compatible  mice.  These  functions give  you
  299.  
  300.          almost complete control over mouse  motion and sensing in all
  301.  
  302.          of your programs.
  303.  
  304.  
  305.          Since  nearly all  mice  sold  for IBM  compatible  computers
  306.  
  307.          running  under  PC-DOS  or MS-DOS  are  compatible  with  the
  308.  
  309.          defacto MicroSoft Mouse  Driver, almost any mouse  driver and
  310.  
  311.          mouse will  function with these  routines. However  there are
  312.  
  313.          some functions that  will only work with  the MicroSoft Mouse
  314.  
  315.          Driver.
  316.  
  317.  
  318.          Since we  are dealing  with secondary  (mouse) input  for the
  319.  
  320.          computer, the joysticks have also  been a problem to program.
  321.  
  322.          BASIC has  joystick functions,  but not C  or Pascal.  I have
  323.  
  324.          thrown them  in for  C programmers,  because many  still play
  325.  
  326.          with joysticks.
  327.  
  328.  
  329.          The mouse and joystick routines are  written in C and are all
  330.  
  331.          debugged and ready  for you to use. All of  the functions are
  332.  
  333.          optimized for speed, not size. The functions are all designed
  334.  
  335.          to be almost fool-proof so that a newcomer as well as an "old
  336.  
  337.          timer" can easily  integrate these functions into  his or her
  338.  
  339.          program.
  340.  
  341.  
  342.          Presently,  the   library  is  compiled  for   the  following
  343.  
  344.          compilers:
  345.  
  346.  
  347.  
  348.          Borland Turbo C version 2.0, Turbo C++ and Borland C++
  349.  
  350.          Microsoft Quick C version 1.0
  351.  
  352.          MicroSoft C 6.0
  353.  
  354.          Mix Power C Version 2.0
  355.  
  356.  
  357.  
  358.          GOOD LUCK!
  359.  
  360.  
  361.  
  362.          John F. Jarrett
  363.  
  364.          Computer Engineering Services
  365.  
  366.  
  367.  
  368.                                        2
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.                                  INSTALLATION
  377.  
  378.  
  379.  
  380.  
  381.          Installation of the CES mouse  and joystick library functions
  382.  
  383.          is  straight   forward.  The  include  files,   cesjoy.h  and
  384.  
  385.          cesmouse.h should be copied into the "include" subdirectories
  386.  
  387.          of MicroSoft  Quick C,  c 6.0  and Borland  Turbo C,  and the
  388.  
  389.          library files,  mouseqcx.lib, mousemsx.lib  and mousetcx.lib,
  390.  
  391.          should be placed into the "lib" subdirectories of each, and x
  392.  
  393.          is the memory model of  the libraries. (The ShareWare version
  394.  
  395.          ONLY includes the medium memory model).
  396.  
  397.  
  398.          For Mix Power C, the include  and library files can be placed
  399.  
  400.          in the same Power C directory with all of the other files. It
  401.  
  402.          may also be a good idea, if  you have version 2.0 of Power C,
  403.  
  404.          to compile the include, (.h) files  into the .hhh header file
  405.  
  406.          using the fasthdr.exe utility supplied with version 2.0.
  407.  
  408.  
  409.          On the distribution disk you will  find in the root directory
  410.  
  411.          the  include   files,  cesjoy.h,   cesmouse.h,  cesmouse.bas,
  412.  
  413.          cesmouse.doc, (this file),  and a read.me file  that includes
  414.  
  415.          any  last  minute  changes  in  the  documentation  or  files
  416.  
  417.          included on the disk.
  418.  
  419.  
  420.          There  will be  directories for  each  make or  version of  a
  421.  
  422.          supported compiler. These directories are;
  423.  
  424.  
  425.  
  426.          POWER_C    includes libraries for version 2.0
  427.  
  428.          QUICK_C    includes libraries for version 1.0 only
  429.  
  430.          TURBO_C    includes libraries for version 2.0 only
  431.  
  432.          EXAMPLES   contains source code for examples and executables
  433.  
  434.          C_SOURCE   contains the C source code for the functions
  435.  
  436.  
  437.  
  438.          The C  source for the  examples can  also be found  under the
  439.  
  440.          SOURCE  subdirectory. The  manual  generally  only lists  the
  441.  
  442.          Turbo C source code. Each file in the library as well as each
  443.  
  444.          example is  written to  be as portable  as possible  for each
  445.  
  446.          compiler, but differences do exist.
  447.  
  448.  
  449.          The cesmouse.bas  file is an  example include file  for using
  450.  
  451.          some of the library functions with QuickBasic and it is not a
  452.  
  453.          supported feature of the CESMouse Tools Library.
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                                        3
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.                             COMPILING WITH POWER C
  478.  
  479.  
  480.  
  481.  
  482.          To compile  your programs  with the  CESmouse or  CESjoystick
  483.  
  484.          libraries with Mix Power C is easy.
  485.  
  486.  
  487.          Each of the library modules for  Power C follow the following
  488.  
  489.          format:
  490.  
  491.  
  492.  
  493.          mousepcX.lib (for mouse functions) or;
  494.  
  495.          joypcX.lib (for joystick functions)
  496.  
  497.  
  498.  
  499.          The "pc" included in the file name stands for Power C and the
  500.  
  501.          X stands for the memory model, small, medium or large.
  502.  
  503.  
  504.          The easiest way  to compile your programs with Power  C is to
  505.  
  506.          first compile your file;
  507.  
  508.  
  509.  
  510.          pc /ms mustest.c    to compile a small memory model program.
  511.  
  512.  
  513.          Next link your file with the appropriate library;
  514.  
  515.  
  516.          pcl mustest,,,mousepcs.lib;    "s" for small memory library.
  517.  
  518.  
  519.  
  520.          Your exucutable file  will be named mustest.exe.  You may use
  521.  
  522.          any of the compiler/linker options that you wish.
  523.  
  524.  
  525.          Should you  have the files  in other directories,  other than
  526.  
  527.          the  default Power  C directory,  make sure  you include  the
  528.  
  529.          proper DOS paths in the compiler and linker command line, ie;
  530.  
  531.  
  532.  
  533.          pc \c_work\mustest.c
  534.  
  535.          pcl \c_work\mustest ;\compinc\mouspc13.mix
  536.  
  537.  
  538.  
  539.          Lastly,  make sure  that  your  program source  includes  the
  540.  
  541.          proper header files and any dos path to them. As an example;
  542.  
  543.  
  544.  
  545.          #include <cesjoy.h>  (if in the  current Power  C directory),
  546.  
  547.          or;
  548.  
  549.  
  550.          #include  <\c_work\cesmouse.h> (if  the file  is  not in  the
  551.  
  552.          default Power C directory).
  553.  
  554.  
  555.  
  556.          These include files  contain the function prototypes  and any
  557.  
  558.          declarations for extern variables.
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.                                        4
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.                             COMPILING WITH QUICK C
  574.  
  575.  
  576.  
  577.  
  578.          To compile  your programs  with the  CESmouse or  CESjoystick
  579.  
  580.          libraries with Quick C is a little more time consuming.
  581.  
  582.  
  583.          Each of the library modules for  Quick C follow the following
  584.  
  585.          format:
  586.  
  587.  
  588.  
  589.          mouseqcX.lib (for mouse functions) or;
  590.  
  591.  
  592.          joyqcX.lib (for joystick functions)
  593.  
  594.  
  595.  
  596.          The "qc" included in the file name stands for Quick C and the
  597.  
  598.          X stands for  the memory model. At the present  time, the CES
  599.  
  600.          mouse  and joystick  libraries only  support  version 1.0  of
  601.  
  602.          Quick C. However, there should be little problem in using the
  603.  
  604.          compiled libraries  with the newer  versions of Quick  C. The
  605.  
  606.          CES mouse  and joystick libraries  support all of  the memory
  607.  
  608.          models supplied with Quick C version 1.0.
  609.  
  610.  
  611.          The easiest way to compile and  link your Quick C programs is
  612.  
  613.          as follows;
  614.  
  615.  
  616.  
  617.          qcl /As mustest.c  /link mouseqcs.lib; (and any  other needed
  618.  
  619.          libraries) This is a compiled small memory model executable.
  620.  
  621.  
  622.  
  623.          If you seperatly compile and link your file, you may now link
  624.  
  625.          the file using standard linker syntax.
  626.  
  627.  
  628.  
  629.          link mustest,,,mousqc1s.lib;
  630.  
  631.  
  632.  
  633.          Your exucutable file  will be named mustest.exe.  You may use
  634.  
  635.          any of the compiler/linker options that you wish.
  636.  
  637.  
  638.          Should you  have the files  in other directories,  other than
  639.  
  640.          the  default Quick  C directory,  make sure  you include  the
  641.  
  642.          proper DOS paths in the compiler and linker command line, ie;
  643.  
  644.  
  645.  
  646.          qcl /As /c \c_work\mustest.c    (/c = compile only)
  647.  
  648.          link  \c_work\mustest,,,\compinc\mousecs.lib;
  649.  
  650.  
  651.  
  652.          Lastly,  make sure  that  your  program source  includes  the
  653.  
  654.          proper header files and any dos path to them. As an example;
  655.  
  656.  
  657.  
  658.          #include <cesjoy.h> (if in the  current Quick C directory and
  659.  
  660.          PATH), or;
  661.  
  662.  
  663.  
  664.                                        5
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.          #include  "\c_work\cesmouse.h" (if  the file  is  not in  the
  673.  
  674.          default Quick  C directory.  Make sure that  LIB=  is  set in
  675.  
  676.          your autoexec.bat).
  677.  
  678.  
  679.          These include files  contain the function prototypes  and any
  680.  
  681.          declarations for external variables.
  682.  
  683.  
  684.          The  Quick  C and  MSC,  optimizing  compiler, use  the  same
  685.  
  686.          command  line syntax,  except that  the MSC  version uses  CL
  687.  
  688.          instead of the Quick C command line syntax of QCL.
  689.  
  690.  
  691.          The library names for MicroSoft C 6.0 are;
  692.  
  693.  
  694.          mousemsX.lib, where X  is the memory model and  the ms stands
  695.  
  696.          for MicroSoft. The tiny and small  libraries are the same, so
  697.  
  698.          use the small,  and the large and  huge are the same,  so use
  699.  
  700.          the large model when linking.
  701.  
  702.  
  703.          A Microsoft C example would be;
  704.  
  705.  
  706.          cl /AL /Ot mustest.c        (large model)
  707.  
  708.          link mustest.c,,,mouusemsl.lib
  709.  
  710.  
  711.          Remember to  use the /A option  to specify the  proper memory
  712.  
  713.          model, ie /As or /Al, etc.  Use the proper CES library memory
  714.  
  715.          model denoted by  the s through l  at the end of  the library
  716.  
  717.          name and lastly make sure you  have included in your setup of
  718.  
  719.          Quick C,  version 1.0, all of  the needed memory  models that
  720.  
  721.          you will use. Newer versions of Quick  C allow you to use all
  722.  
  723.          the memory models from the interactive environment.
  724.  
  725.  
  726.  
  727.          MAKING A QUICK LIBRARY OF THE CES FUNCTIONS
  728.  
  729.  
  730.  
  731.          If you  wish to  make a  Quick Library  of the  CES Mouse  or
  732.  
  733.          Joystick  functions, the  following  command  line syntax  is
  734.  
  735.          provided.
  736.  
  737.  
  738.  
  739.          link \lib\quicklib+mouseqcm.lib,mouseqcm.qlb /I /Q;
  740.  
  741.  
  742.          link \lib\quicklib+joyqcm.lib,joyqcm.qlb /I /Q;
  743.  
  744.  
  745.  
  746.          The /I option displays linker information as the linker links
  747.  
  748.          the library into a Quick Library, the /Q option.
  749.  
  750.  
  751.          By making a  Quick Library, you can use the  CES functions in
  752.  
  753.          the interactive environment, but the library is put in RAM at
  754.  
  755.          the time  you load qc,  so you have  less room in  memory for
  756.  
  757.          your compiled programs.
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.                                        6
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.                             COMPILING WITH TURBO C
  775.  
  776.  
  777.  
  778.  
  779.          To compile  your programs  with the  CESmouse or  CESjoystick
  780.  
  781.          libraries with Borlands Turbo C is easy.
  782.  
  783.  
  784.          Each of the library modules for  Turbo C follow the following
  785.  
  786.          format:
  787.  
  788.  
  789.  
  790.          mousetcX.lib   (for mouse functions) or;
  791.  
  792.  
  793.          joytcX.lib     (for joystick functions)
  794.  
  795.  
  796.  
  797.          The "tc" of  course stands for Turbo  C and the X  stands for
  798.  
  799.          the memory model being used which is either "s" for the small
  800.  
  801.          memory model, "m" for the medium memory model, and so on. All
  802.  
  803.          of the memory models are fully supported in the libraries.
  804.  
  805.  
  806.          The  easiest  way   to  compile  your  programs   within  the
  807.  
  808.          interactive environment  of Turbo  C for  all versions  is to
  809.  
  810.          create a  a project  file and include  it in  the interactive
  811.  
  812.          environment. An  example would be  for the  following project
  813.  
  814.          file, mustest.prj;
  815.  
  816.  
  817.  
  818.          mustest.c
  819.  
  820.          mousets.lib
  821.  
  822.  
  823.  
  824.          This project file will compile the source file, mustest.c and
  825.  
  826.          include the small  mouse library for version 2.0  of Turbo C.
  827.  
  828.          The executable file will be named mustest.exe.
  829.  
  830.  
  831.          Should you  have the files  in other directories,  other than
  832.  
  833.          the default  Turbo C directories,  make sure you  include the
  834.  
  835.          proper DOS paths in the project file, ie;
  836.  
  837.  
  838.  
  839.          \c_work\mustest.c
  840.  
  841.          \complibs\moustcs.lib
  842.  
  843.  
  844.  
  845.          Lastly,  make sure  that  your  program source  includes  the
  846.  
  847.          proper header files and any dos path to them. As an example;
  848.  
  849.  
  850.  
  851.          #include <cesjoy.h>  (if in the  current Turbo  C directory),
  852.  
  853.          or;
  854.  
  855.  
  856.          #include  "\c_work\cesmouse.h" (if  the file  is  not in  the
  857.  
  858.          default Turbo C directory).
  859.  
  860.  
  861.          The include  files contain  the function  prototypes and  any
  862.  
  863.          declarations for extern variables.
  864.  
  865.  
  866.  
  867.                                        7
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.          If you use the Turbo C command line compiler, you may compile
  876.  
  877.          your programs  with these libraries  in the  following manner
  878.  
  879.          which assumes that  all of the compiler libraries  are in the
  880.  
  881.          proper Turbo C subdirectories.
  882.  
  883.  
  884.  
  885.          tcc -ms mustest.c moust20s.lib
  886.  
  887.  
  888.  
  889.          Any of the  allowable compiler/linker options can  be used. A
  890.  
  891.          recommended set of options would be -G for size optimization,
  892.  
  893.          and of  course the -ms  tells the  compiler to use  the small
  894.  
  895.          memory model  and of course you  must use the  small library,
  896.  
  897.          mousetcs.lib.
  898.  
  899.  
  900.          The Turbo C++ compiler is identical to the Turbo C compiler
  901.  
  902.          and the libraries are fully functional with the new Turbo C++
  903.  
  904.          when compiling a standard C program.
  905.  
  906.  
  907.          The new Borland C++ compiler syntax is identical except that
  908.  
  909.          the command line compiler is bcc instead of tcc. All other
  910.  
  911.          options are the same and the libraries are fully functional
  912.  
  913.          as is with Borland C++.
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.                                        8
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.                           COMPILING WITH QUICK BASIC
  960.  
  961.  
  962.  
  963.  
  964.          To compile your programs with the CESmouse library with Quick
  965.  
  966.          Basic is as easy as compiling your C programs with Quick C.
  967.  
  968.  
  969.          The library  module is  the MicroSoft  Quick C  medium memory
  970.  
  971.          library and it has the following format;
  972.  
  973.  
  974.  
  975.          mouseqcm.lib
  976.  
  977.  
  978.  
  979.          The easiest way to compile and link your Quick Basic programs
  980.  
  981.          is separately  using the command  line syntax.  First compile
  982.  
  983.          your Quick  Basic program  using any of  the QB  command line
  984.  
  985.          options, such as;
  986.  
  987.  
  988.  
  989.          qb moustest.bas     (source is not included, example only)
  990.  
  991.  
  992.  
  993.          Next, you must link your  compiled file, now moustest.obj, as
  994.  
  995.          follows;
  996.  
  997.  
  998.  
  999.          link moustest,,,brun40.lib mouseqcm.lib
  1000.  
  1001.  
  1002.  
  1003.          The above  example will  create moustest.exe,  a stand  alone
  1004.  
  1005.          executable  program. If  you eliminate  brun40.lib, you  must
  1006.  
  1007.          have  brun40.exe on  the disk  or in  the path  when you  run
  1008.  
  1009.          moustest.exe. The .lib extensions can be omitted.
  1010.  
  1011.  
  1012.          One thing to remember is ALWAYS  put mousqbc4.lib LAST on the
  1013.  
  1014.          command line. Quick Basic must search BASIC libraries first.
  1015.  
  1016.  
  1017.          Should you have the files and libraries in other directories,
  1018.  
  1019.          other than the  default Quick Basic directory,  make sure you
  1020.  
  1021.          include  the proper  DOS  paths in  the  compiler and  linker
  1022.  
  1023.          command line, ie;
  1024.  
  1025.  
  1026.  
  1027.          qb \bas_work\moustest.bas
  1028.  
  1029.          link \bas_work\moustest,,,\baslibs\mouseqcm.lib
  1030.  
  1031.  
  1032.  
  1033.  
  1034.          Another alternative is to list  the needed directories in the
  1035.  
  1036.          Quick Basic  LIB environment variable.  See your  Quick Basic
  1037.  
  1038.          reference manual for instructions on setting this environment
  1039.  
  1040.          variable.
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.                                        9
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.          Lastly, make sure that your Basic programs include the header
  1057.  
  1058.          file, cesmouse.bas, and any paths to it. As an example;
  1059.  
  1060.  
  1061.  
  1062.          REM $INCLUDE 'cesmouse.bas'   or,
  1063.  
  1064.          ' $INCLUDE '\bas_work\cesmouse.bas'
  1065.  
  1066.  
  1067.  
  1068.          The metacommand $INCLUDE must be on a REMark line.
  1069.  
  1070.  
  1071.          Remember that the sample include  file, cesmouse.bas, is only
  1072.  
  1073.          an example for you to expand upon. Quick Basic useage of this
  1074.  
  1075.          C library is not supported.
  1076.  
  1077.  
  1078.  
  1079.  
  1080.          MAKING A QUICK BASIC LIBRARY OF THE CES MOUSE FUNCTIONS
  1081.  
  1082.  
  1083.  
  1084.          If  you  wish to  make  a  Quick  Library  of the  CES  Mouse
  1085.  
  1086.          functions, the following command line syntax is provided, (as
  1087.  
  1088.          well as a batch, (.BAT), file on the distribution disk);
  1089.  
  1090.  
  1091.  
  1092.          link /Q mouseqcm.lib,mousqbc4.qlb,,bqlb40.lib;
  1093.  
  1094.  
  1095.          Other link options,  such as /I, can be used.  (The /I option
  1096.  
  1097.          gives you information as you link the file).
  1098.  
  1099.  
  1100.          By  making  a  Quick  Library, you  can  use  the  CES  Mouse
  1101.  
  1102.          functions in the interactive environment,  but the library is
  1103.  
  1104.          put in  RAM at the  time you load  qb, by specifying  a quick
  1105.  
  1106.          library. You will have less room  in memory for your compiled
  1107.  
  1108.          programs.
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.                                       10
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.                                 MOUSE FUNCTIONS
  1144.  
  1145.  
  1146.  
  1147.          The mouse  function header  or include  file consists  of the
  1148.  
  1149.          following function definitions,  which can be seen  by typing
  1150.  
  1151.          from the command line;
  1152.  
  1153.  
  1154.          C>type cesmouse.h
  1155.  
  1156.  
  1157.  
  1158.          /*  Mouse functions header file  */
  1159.  
  1160.          /*  Copyright 1989, 1991, Computer Engineering Services */
  1161.  
  1162.  
  1163.          void showmouse(void);
  1164.  
  1165.          void hidemouse(void);
  1166.  
  1167.          void posmouse(int mouseX, int mouseY);
  1168.  
  1169.          void setmousetrack(int Xtrack, int Ytrack);
  1170.  
  1171.          void setmousespeed(int speed);
  1172.  
  1173.          void mousegraphcurs(int hspot, int vspot, int cursor);
  1174.  
  1175.          void mousetextcurs(int curstype, int scrnmask, int cursmask);
  1176.  
  1177.          void penemulON(void);
  1178.  
  1179.          void penemulOFF(void);
  1180.  
  1181.          void cagemouse(int ulX, int ulY, int lrX, int lrY);
  1182.  
  1183.          void cagehoriz(int lft, int rgt);
  1184.  
  1185.          void cagevert(int top, int bot);
  1186.  
  1187.          void mousewindoff(int ulX, int ulY, int lrX, int lrY);
  1188.  
  1189.          void savemousedrvr(int *mdrvrbuff);
  1190.  
  1191.          void restoremousedrvr(int *mdrvrbuff);
  1192.  
  1193.          void setcrtpage(int page);
  1194.  
  1195.          void assignmbtn(int btn, int key);
  1196.  
  1197.          void setlang(int lang);
  1198.  
  1199.          void enablemdrvr(void);
  1200.  
  1201.          void setallscales(int Xtrack, int Ytrack, int speed);
  1202.  
  1203.  
  1204.          int resetmouse(void);
  1205.  
  1206.          int mousedrvr(void);
  1207.  
  1208.          int buttons(void);
  1209.  
  1210.          int lftbutton(void);
  1211.  
  1212.          int ctrbutton(void);
  1213.  
  1214.          int rgtbutton(void);
  1215.  
  1216.          int mousecursX(void);
  1217.  
  1218.          int mousecursY(void);
  1219.  
  1220.          int sensemouse(int ulX, int ulY, int lrX, int lrY);
  1221.  
  1222.          int sensetop(int top);
  1223.  
  1224.          int sensebottom(int bottom);
  1225.  
  1226.          int senseleft(int left);
  1227.  
  1228.          int senseright(int right);
  1229.  
  1230.          int mousetrackX(void);
  1231.  
  1232.          int mousetrackY(void);
  1233.  
  1234.          int getmousespeed(void);
  1235.  
  1236.          int getmouseBPXinfo(int button);
  1237.  
  1238.          int getmouseBPYinfo(int button);
  1239.  
  1240.          int getmouseBRXinfo(int button);
  1241.  
  1242.          int getmouseBRYinfo(int button);
  1243.  
  1244.          int mouseXcnt(void);
  1245.  
  1246.          int mouseYcnt(void);
  1247.  
  1248.          int getmdrvrstorage(void);
  1249.  
  1250.  
  1251.  
  1252.                                       11
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.          int getcrtpage(void);
  1261.  
  1262.          int disablemdrvr(void);
  1263.  
  1264.          int getmversion(void);
  1265.  
  1266.          int getmtype(void);
  1267.  
  1268.          int getmirq(void);
  1269.  
  1270.          int mdrvrreset(void);
  1271.  
  1272.          int getlang(void);
  1273.  
  1274.  
  1275.          int lastMX, lastMY, Xcount, Ycount, btnrel, btnpress, mbtns;
  1276.  
  1277.  
  1278.  
  1279.          There are several global variables  defined in the cesmouse.h
  1280.  
  1281.          mouse header file so you need to ensure that your programs do
  1282.  
  1283.          not use those variable names, which are;
  1284.  
  1285.  
  1286.          lastMX
  1287.  
  1288.          lastMY
  1289.  
  1290.          Xcount
  1291.  
  1292.          Ycount
  1293.  
  1294.          btnrel
  1295.  
  1296.          btnpress
  1297.  
  1298.          mbtns
  1299.  
  1300.  
  1301.  
  1302.          All  of your  programs  that will  use  mouse functions  must
  1303.  
  1304.          include the cesmouse.h header of include file, such as;
  1305.  
  1306.  
  1307.          #include <cesmouse.h>
  1308.  
  1309.  
  1310.          and any path to the file such as;
  1311.  
  1312.  
  1313.          #include "\c_work\cesmouse.h"
  1314.  
  1315.  
  1316.          The example C  source code throughout this  chapter summarize
  1317.  
  1318.          all of the  functions, usage and global  variables. The first
  1319.  
  1320.          few functions are  the most commonly used and  right after is
  1321.  
  1322.          the first example C source code.
  1323.  
  1324.  
  1325.  
  1326.          void showmouse(void);
  1327.  
  1328.  
  1329.          This  function displays  the mouse  cursor  at the  positions
  1330.  
  1331.          specified  by posmouse().  If  posmouse()  is not  used,  the
  1332.  
  1333.          defaults are assumed and the mouse cursor is displayed in the
  1334.  
  1335.          center of your screen.
  1336.  
  1337.  
  1338.  
  1339.          void hidemouse(void);
  1340.  
  1341.  
  1342.          When this  function is called,  the mouse  cursor disappears.
  1343.  
  1344.          You can make it reappear by using showmouse().
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.                                       12
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.          void posmouse(int mouseX, int mouseY);
  1363.  
  1364.  
  1365.          The posmouse function  will position the mouse  cursor at the
  1366.  
  1367.          mouseX, or X coordinate and at the mouseY, or Y coordinate on
  1368.  
  1369.          your  screen. You  can move  the  mouse cursor  all over  the
  1370.  
  1371.          screen by using this function.
  1372.  
  1373.  
  1374.          If you  are programming an  application for an  eighty column
  1375.  
  1376.          text screen,  multiply the row and  column by eight,  (8), to
  1377.  
  1378.          get the  proper screen position.  The following  example will
  1379.  
  1380.          position  the text  mouse  cursor at  screen  position row  5
  1381.  
  1382.          column 39;
  1383.  
  1384.  
  1385.          posmouse((8 * 39), (8 * 5));
  1386.  
  1387.  
  1388.          In graphics mode,  simply specify the proper  coordinate. 0,0
  1389.  
  1390.          is always the upper left hand corner.
  1391.  
  1392.  
  1393.  
  1394.          void setmousetrack(int mouseX, int mouseY);
  1395.  
  1396.  
  1397.          This function sets the tracking ratio or scaling of the mouse
  1398.  
  1399.          in both the X and the Y axis.
  1400.  
  1401.  
  1402.  
  1403.          void setmousespeed(int speed);
  1404.  
  1405.  
  1406.          This function sets  the double speed threshold  of the mouse.
  1407.  
  1408.          By setting  this number  higher, the  mouse cursor  will move
  1409.  
  1410.          more quickly across the screen. The  useful range seems to be
  1411.  
  1412.          between 300 and 900.
  1413.  
  1414.  
  1415.  
  1416.          void setmousegraphcurs(int hspot, int vspot, int cursor);
  1417.  
  1418.  
  1419.          This function sets  the mouse graphics cursor  to a different
  1420.  
  1421.          shape. Int hspot  and int vspot is  the X and Y  hot spot, or
  1422.  
  1423.          the main focal  point of the cursor in pixels.  Int cursor is
  1424.  
  1425.          the defined  cursor. To define the  cursor, one must  keep in
  1426.  
  1427.          mind the cursor screen mask, or I  like to think of it as the
  1428.  
  1429.          "shadow" and the cursor mask,  which is actually the complete
  1430.  
  1431.          outline of the cursor. The following is given as an example;
  1432.  
  1433.  
  1434.          static int hand[] =
  1435.  
  1436.          {
  1437.  
  1438.          /* cursor screen mask */
  1439.  
  1440.  
  1441.             0xE1FF       /* 1110000111111111 */
  1442.  
  1443.             0xE1FF       /* 1110000111111111 */
  1444.  
  1445.             0xE1FF       /* 1110000111111111 */
  1446.  
  1447.             00E1FF       /* 1110000111111111 */
  1448.  
  1449.             0xE1FF       /* 1110000111111111 */
  1450.  
  1451.             0xE000       /* 1110000000000000 */
  1452.  
  1453.             0xE000       /* 1110000000000000 */
  1454.  
  1455.             0xE000       /* 1110000000000000 */
  1456.  
  1457.             0x0000       /* 0000000000000000 */
  1458.  
  1459.             0x0000       /* 0000000000000000 */
  1460.  
  1461.  
  1462.  
  1463.                                       13
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.             0x0000       /* 0000000000000000 */
  1472.  
  1473.             0x0000       /* 0000000000000000 */
  1474.  
  1475.             0x0000       /* 0000000000000000 */
  1476.  
  1477.             0x0000       /* 0000000000000000 */
  1478.  
  1479.             0x0000       /* 0000000000000000 */
  1480.  
  1481.             0x0000       /* 0000000000000000 */
  1482.  
  1483.  
  1484.             /* cursor mask */
  1485.  
  1486.  
  1487.             0x1E00       /* 0001111000000000 */
  1488.  
  1489.             0x1200       /* 0001001000000000 */
  1490.  
  1491.             0x1200       /* 0001001000000000 */
  1492.  
  1493.             0x1200       /* 0001001000000000 */
  1494.  
  1495.             0x1200       /* 0001001000000000 */
  1496.  
  1497.             0x13FF       /* 0001001111111111 */
  1498.  
  1499.             0x1249       /* 0001001001001001 */
  1500.  
  1501.             0x1249       /* 0001001001001001 */
  1502.  
  1503.             0x1249       /* 0001001001001001 */
  1504.  
  1505.             0xF249       /* 1111001001001001 */
  1506.  
  1507.             0x9001       /* 1001000000000001 */
  1508.  
  1509.             0x9001       /* 1001000000000001 */
  1510.  
  1511.             0x9001       /* 1001000000000001 */
  1512.  
  1513.             0x8001       /* 1000000000000001 */
  1514.  
  1515.             0x8001       /* 1000000000000001 */
  1516.  
  1517.             0x8001       /* 1000000000000001 */
  1518.  
  1519.             0xFFFF       /* 1111111111111111 */
  1520.  
  1521.          };
  1522.  
  1523.  
  1524.             /* set the hspot to 5 and the vspot top 0 */
  1525.  
  1526.             /* and set the cursor */
  1527.  
  1528.  
  1529.          mousegraphcurs(5,0,*hand);
  1530.  
  1531.  
  1532.          A bit complex, but  can be done if you can  convert binary to
  1533.  
  1534.          hexadecimal. A piece of graph paper is really handy.
  1535.  
  1536.  
  1537.  
  1538.          void setmousetextcurs(int curstype, int scrnmask, int
  1539.  
  1540.          cursmask);
  1541.  
  1542.  
  1543.          This function is used to set the mouse cursor in text mode as
  1544.  
  1545.          either a software  cursor, (int curstype =  0), or  as a hard
  1546.  
  1547.          ware cursor, (int  curstype = 1), as well  as the foreground,
  1548.  
  1549.          background colors, whether the cursor blinks or doesn't.
  1550.  
  1551.  
  1552.          The following sets the text cursor so that it will invert the
  1553.  
  1554.          forground and background colors;
  1555.  
  1556.  
  1557.          setmousetextcurs(0,0xFFFF,0x7700);
  1558.  
  1559.  
  1560.          The following turns OFF the hardware cursor;
  1561.  
  1562.  
  1563.          setmousetextcurs(1,16,0);
  1564.  
  1565.  
  1566.          Note the use of both decimal and hex which is OK.
  1567.  
  1568.  
  1569.          The full  use of  the hardware and  software text  cursors is
  1570.  
  1571.  
  1572.  
  1573.                                       14
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.          beyond the scope of this  library. For further information on
  1582.  
  1583.          both  graphics and  text cursors,  please  see the  Microsoft
  1584.  
  1585.          Mouse Programmers Reference.
  1586.  
  1587.  
  1588.          void penemulON(void);
  1589.  
  1590.          void penemulOFF(void);
  1591.  
  1592.  
  1593.          By default,  the mouse  emulates a lightpen  and can  be used
  1594.  
  1595.          with programs  that once upon a  time used light  pens. These
  1596.  
  1597.          functions can turn such emulation on or off.
  1598.  
  1599.  
  1600.  
  1601.          void cagemouse(int ulX, int ulY, int lrX, int lrY);
  1602.  
  1603.  
  1604.          This  function will  "cage the  mouse"  within the  specified
  1605.  
  1606.          screen coordinates  which make  sort of  a "window"  of mouse
  1607.  
  1608.          movement.  ulX and  ulY are  the upper  left X  and Y  screen
  1609.  
  1610.          coordinates  and lrX  and lrY  are the  lower right  X and  Y
  1611.  
  1612.          coordinates.
  1613.  
  1614.  
  1615.  
  1616.          void cagehoriz(int lft, int rgt);
  1617.  
  1618.          void cagevert(int top, int bot);
  1619.  
  1620.  
  1621.          These functions keep the mouse from going above, or below, or
  1622.  
  1623.          to the  left or  to the right  of the  specified coordinates.
  1624.  
  1625.          cagemouse uses  these routines  to cage  the mouse  within an
  1626.  
  1627.          entire "window".
  1628.  
  1629.  
  1630.  
  1631.          void mousewindoff(int ulX, int ulY, int lrX, int lrY);
  1632.  
  1633.  
  1634.          This function is similar to cagemouse, but when the limits of
  1635.  
  1636.          the  defined  "window  are exceeded,  the  mouse  turns  off.
  1637.  
  1638.          Showmouse must be called to make  the mouse reappear. Set the
  1639.  
  1640.          coordinates of where you want the mouse to appear first using
  1641.  
  1642.          posmouse.
  1643.  
  1644.  
  1645.  
  1646.          void savemousedrvr(int *mdrvrbuff);
  1647.  
  1648.          void restoremousedrvr(int *mdrvrbuff);
  1649.  
  1650.          int getmdrvrstorage(void);
  1651.  
  1652.  
  1653.          These functions are  used to save the  mouse driver variables
  1654.  
  1655.          and to  restore the mouse driver  variables. You can  get the
  1656.  
  1657.          size of  a buffer needed  by calling get  mdrvrstorage(); and
  1658.  
  1659.          then create a  buffer dimensioned to the needed  size and and
  1660.  
  1661.          then  call  the  above  functions  with  a  pointer  to  your
  1662.  
  1663.          dimensioned buffer. An example;
  1664.  
  1665.  
  1666.          int mousebuff[getmdrvrstorage()];
  1667.  
  1668.          savemousedrvr(*mousebuff);
  1669.  
  1670.          {
  1671.  
  1672.              other code
  1673.  
  1674.          {
  1675.  
  1676.          restoremousedrvr(*mousebuff);
  1677.  
  1678.  
  1679.  
  1680.  
  1681.                                       15
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.          void setcrtpage(int page);
  1690.  
  1691.          int getcrtpage(void);
  1692.  
  1693.  
  1694.          This function  sets the virtual  screen page number  that the
  1695.  
  1696.          mouse  is  functioning   on.  This  is  useful   in  graphics
  1697.  
  1698.          programming where numerous  pages can be stored  and used via
  1699.  
  1700.          hardware. The function getcrtpage  returns the current screen
  1701.  
  1702.          page.
  1703.  
  1704.  
  1705.  
  1706.          void assignmbtn(int btn, int key);
  1707.  
  1708.  
  1709.          This function will assign a  mouse button a specific keyboard
  1710.  
  1711.          key, such as 13, (a carriage return and line fees), when that
  1712.  
  1713.          specified button is pressed, or  combination of buttons. This
  1714.  
  1715.          function uses the  buttons() function and the  character must
  1716.  
  1717.          be specified in  ASCII. The character is  printed to standard
  1718.  
  1719.          out.
  1720.  
  1721.  
  1722.  
  1723.          void setlang(int lang);
  1724.  
  1725.  
  1726.          This function is only useful with the genuine Microsoft Mouse
  1727.  
  1728.          Driver and  sets the foreign  language useage of  that driver
  1729.  
  1730.          for its messages. The following is a summation;
  1731.  
  1732.  
  1733.          0 = English
  1734.  
  1735.          1 = French
  1736.  
  1737.          2 = Dutch
  1738.  
  1739.          3 = German
  1740.  
  1741.          4 = Swedish
  1742.  
  1743.          5 = Finnish
  1744.  
  1745.          6 = Spanish
  1746.  
  1747.          7 = Portuguese
  1748.  
  1749.          8 = Italian
  1750.  
  1751.  
  1752.  
  1753.          void enablemdrvr(void);
  1754.  
  1755.          int disablemdrvr(void);
  1756.  
  1757.  
  1758.          These  functions enable,  (enablemdrvr();)  the mouse  driver
  1759.  
  1760.          after a  call to disablemdrvr().  When you disable  the mouse
  1761.  
  1762.          driver,  the  mouse  will  not  work  at  all.  The  function
  1763.  
  1764.          disablemdrvr(); returns either a  1 for successful completion
  1765.  
  1766.          or  a  0 for  unsuccessful  completion  or disabling  of  the
  1767.  
  1768.          driver.
  1769.  
  1770.  
  1771.  
  1772.          void setallscales(int Xtrack, int Ytrack, int speed);
  1773.  
  1774.  
  1775.          This function sets all of the scales for the mouse within one
  1776.  
  1777.          function.  This   is  a  combination  of   setmousetrack  and
  1778.  
  1779.          setmousespeed.
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.                                       16
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.          int mousedrvr(void);
  1796.  
  1797.  
  1798.          This function  should be the  first mouse function  called in
  1799.  
  1800.          your program  to check and see  if the mouse driver  has been
  1801.  
  1802.          loaded.  If the  driver is  present in  memory, the  function
  1803.  
  1804.          returns an integer value of 1, or  true. If the driver is not
  1805.  
  1806.          present in memory, the integer value returned is 0, or false.
  1807.  
  1808.  
  1809.  
  1810.          int resetmouse(void);
  1811.  
  1812.  
  1813.          This function should be the  first, and almost last, function
  1814.  
  1815.          called  in your  program.  This function  resets  all of  the
  1816.  
  1817.          values of  the mouse  driver to their  default values  and it
  1818.  
  1819.          also returns  the number of  mouse buttons available  on your
  1820.  
  1821.          mouse. This  value is usually 2  or 3 as the  MicroSoft Mouse
  1822.  
  1823.          has  two buttons,  while the  Kraft Mouse,  and others,  have
  1824.  
  1825.          three buttons. This value is set in global variable mbtns.
  1826.  
  1827.  
  1828.          The standard defaults for most  mouse drivers are positioning
  1829.  
  1830.          the  cursor in  the  center of  the  screen  with a  standard
  1831.  
  1832.          reverse video software  cursor, and a slanted  graphics arrow
  1833.  
  1834.          cursor in graphics mode with light pen emulation on.
  1835.  
  1836.  
  1837.          This function is  equal to Mouse Function 0  in the MicroSoft
  1838.  
  1839.          Mouse Programmers Reference  Manual (as well as  others mouse
  1840.  
  1841.          programmers manuals). For other  default values, please refer
  1842.  
  1843.          to the MicroSoft Mouse Driver Programmers Reference Manual as
  1844.  
  1845.          well as other mouse driver manuals  as there are subtle, (yet
  1846.  
  1847.          usually negligible), differences.
  1848.  
  1849.  
  1850.  
  1851.          int buttons(void);
  1852.  
  1853.  
  1854.          This function returns an integer value  of between 0 and 7. A
  1855.  
  1856.          0 means that no button were  pushed. On a three button mouse,
  1857.  
  1858.          the  left button  will return  a  1. The  center button  will
  1859.  
  1860.          return a 4 and the right button  will return a 2. If you push
  1861.  
  1862.          a couple  buttons, the  values are  added. All  three buttons
  1863.  
  1864.          pushed will return 7.
  1865.  
  1866.  
  1867.  
  1868.          int lftbutton(void);
  1869.  
  1870.  
  1871.          This function will  return a 1 when the left  mouse button is
  1872.  
  1873.          pushed.
  1874.  
  1875.  
  1876.  
  1877.          int ctrbutton(void);
  1878.  
  1879.  
  1880.          This  function will  return a  1  when the  center button  is
  1881.  
  1882.          pushed.
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.                                       17
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.          int rgtbutton(void);
  1900.  
  1901.  
  1902.          This  function will  return  a 1  when  the  right button  is
  1903.  
  1904.          pushed.
  1905.  
  1906.  
  1907.  
  1908.          int mousecursX(void);
  1909.  
  1910.  
  1911.          This function  returns the X,  (horizontal), position  of the
  1912.  
  1913.          mouse cursor.  When in  eighty column  text mode,  divide the
  1914.  
  1915.          returned value  by 8  to get  the cursor  location. In  forty
  1916.  
  1917.          column mode, divide the number  by 16. Otherwise, in graphics
  1918.  
  1919.          mode,  the number  returned is  the position.  This value  is
  1920.  
  1921.          stored in the global variable lastMX.
  1922.  
  1923.  
  1924.  
  1925.          int mousecursY(void);
  1926.  
  1927.  
  1928.          This  function returns  the Y,  (vertical),  position of  the
  1929.  
  1930.          mouse  cursor.  All  of  the returns  are  the  same  as  for
  1931.  
  1932.          mousecursX(). This  value is  stored in  the global  variable
  1933.  
  1934.          lastMY.
  1935.  
  1936.  
  1937.  
  1938.          int sensemouse(int ulX, int ulY, int lrX, int lrY);
  1939.  
  1940.          int sensetop(int top);
  1941.  
  1942.          int sensebottom(int bottom);
  1943.  
  1944.          senseleft(int left);
  1945.  
  1946.          senseright(int right)
  1947.  
  1948.  
  1949.  
  1950.          These functions all return either a 0 for NOT being past that
  1951.  
  1952.          specified portion of  the screen and a 1 should  they be past
  1953.  
  1954.          the specified portions or coordinates of the screen.
  1955.  
  1956.  
  1957.          The function sensemouse sets up a window specified by ulX and
  1958.  
  1959.          ulY, the upper  left and right coordinates, and  lrX and lrY,
  1960.  
  1961.          the lower right X and Y coordinates.
  1962.  
  1963.  
  1964.          The other  return the same when  either top, bottom,  left or
  1965.  
  1966.          right are specified.
  1967.  
  1968.  
  1969.          int mousetrackX(void);
  1970.  
  1971.          int mousetrackY(void);
  1972.  
  1973.          int getmousespeed(void);
  1974.  
  1975.  
  1976.          These functions  return the tracking,  scaling or  the double
  1977.  
  1978.          speed threshold of the mouse as previously set.
  1979.  
  1980.  
  1981.  
  1982.          int getmouseBPXinfo(int button);
  1983.  
  1984.          int getmouseBPYinfo(int button);
  1985.  
  1986.  
  1987.          These functions  return the X or  Y coordinates of  the mouse
  1988.  
  1989.          when  the  mouse  button,  1, 4,  or  2  as  specified  under
  1990.  
  1991.          buttons();, has been  pushed. The number of  times the button
  1992.  
  1993.          has been pushed is stored in the variable btnpress.
  1994.  
  1995.  
  1996.  
  1997.                                       18
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.          int getmouseBRXinfo(int button);
  2006.  
  2007.          int getmouseBRYinfo(int button);
  2008.  
  2009.  
  2010.  
  2011.          These  functions   are  identical   to  getmouseBPXinfo   and
  2012.  
  2013.          getmouseBPYinfo except that the  button releases are returned
  2014.  
  2015.          in global variable btnrel.
  2016.  
  2017.  
  2018.  
  2019.          int mouseXcount(void);
  2020.  
  2021.          int mouseYcount(void);
  2022.  
  2023.  
  2024.          These functions return the accumulated mouse counts since the
  2025.  
  2026.          last time any of these  functions was called. Negative number
  2027.  
  2028.          indicate leftward movement for the Xcount and upward movement
  2029.  
  2030.          for the  Ycount. These  values are  stored in  the associated
  2031.  
  2032.          variables xcount and ycount.
  2033.  
  2034.  
  2035.          NOTE... The  following functions  are only  available on  the
  2036.  
  2037.          genuine Microsoft Mouse Driver.
  2038.  
  2039.  
  2040.  
  2041.          int getmversion(void);
  2042.  
  2043.  
  2044.          This function returns  the mouse driver version  number. 6.10
  2045.  
  2046.          will return as 60789 or similar.
  2047.  
  2048.  
  2049.  
  2050.          int getmtype(void);
  2051.  
  2052.  
  2053.          This function will return the mouse type as follows;
  2054.  
  2055.  
  2056.          1 indicates a bus mouse
  2057.  
  2058.          2 indicates a serial mouse
  2059.  
  2060.          3 indicates an InPort mouse
  2061.  
  2062.          4 indicates a PS-2 mouse
  2063.  
  2064.          5 indicates an HP mouse
  2065.  
  2066.  
  2067.  
  2068.          int getmirq(void);
  2069.  
  2070.  
  2071.          This function  returns the hardware  interrupt being  used by
  2072.  
  2073.          the mouse and mouse driver.
  2074.  
  2075.  
  2076.  
  2077.          int mdrvrreset(void);
  2078.  
  2079.  
  2080.          This  function  ONLY  resets  the mouse  driver.  A  1  being
  2081.  
  2082.          returned means success and a 0 means a failure to reset.
  2083.  
  2084.  
  2085.  
  2086.          int getlang(void);
  2087.  
  2088.  
  2089.          This function returns the language being used as described in
  2090.  
  2091.          the functionsetlang();
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.                                       19
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.                       EXAMPLE C SOURCE FOR  MOUSE LIBRARY
  2106.  
  2107.  
  2108.  
  2109.  
  2110.          #include <conio.h>
  2111.  
  2112.          #include <stdlib.h>
  2113.  
  2114.          #include <cesmouse.h>
  2115.  
  2116.  
  2117.          main()
  2118.  
  2119.          {
  2120.  
  2121.          int lft,ctr,rgt,mx,my,but;
  2122.  
  2123.  
  2124.              cprintf("PC Mouse Test\n");
  2125.  
  2126.              cprintf("Press Any Key to Exit\n\n");
  2127.  
  2128.  
  2129.                 /* Check for the Mouse Driver */
  2130.  
  2131.                 if (mousedrvr() == 0)
  2132.  
  2133.                   {
  2134.  
  2135.                    cprintf("Mouse Driver Not Installed\n\n");
  2136.  
  2137.                       exit(1);
  2138.  
  2139.                   }
  2140.  
  2141.  
  2142.                 /* Reset the mouse.. All registers to '0'  */
  2143.  
  2144.                 resetmouse();
  2145.  
  2146.  
  2147.                 /* Position the Mouse  X = 40, Y = 12 */
  2148.  
  2149.                 posmouse(320,96);
  2150.  
  2151.  
  2152.                 /* Show the Mouse */
  2153.  
  2154.                 showmouse();
  2155.  
  2156.  
  2157.                 /* Output Mouse Button Values */
  2158.  
  2159.                 for(;;)
  2160.  
  2161.                         {
  2162.  
  2163.                         lft = lftbutton();
  2164.  
  2165.                         ctr = ctrbutton();
  2166.  
  2167.                         rgt = rgtbutton();
  2168.  
  2169.                         mx = mousecursX();
  2170.  
  2171.                         my = mousecursY();
  2172.  
  2173.                         but = buttons();
  2174.  
  2175.  
  2176.                         if (kbhit()) break;
  2177.  
  2178.                         }
  2179.  
  2180.                 /* Hide the Mouse */
  2181.  
  2182.                 hidemouse();
  2183.  
  2184.  
  2185.                 /* Reset the Mouse */
  2186.  
  2187.                 resetmouse();
  2188.  
  2189.  
  2190.              exit(0);
  2191.  
  2192.          }
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.                                       20
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.                                    JOYSTICKS
  2211.  
  2212.  
  2213.  
  2214.  
  2215.          Joysticks are  still used by  game players and  writers. They
  2216.  
  2217.          are dependant  on the  timing of  a one  shot pulse  into the
  2218.  
  2219.          joystick which is triggered by one of the joystick functions.
  2220.  
  2221.          The time it takes for a specific  bit  to go, after firing of
  2222.  
  2223.          the one shot pulse from a logical 0 to a logical 1, back to a
  2224.  
  2225.          logical 0 gives us the  approximate position of the joystick.
  2226.  
  2227.          This is  all dependant upon  the resistance in  the joystick,
  2228.  
  2229.          ie, the X-Y axis variable resistors in the joystick.
  2230.  
  2231.  
  2232.          The function fires  the one shot and  continuously checks the
  2233.  
  2234.          appropriate bit for X or Y or  joystick 1 or joystick 2. When
  2235.  
  2236.          it returns to a logical 0,  the function is exited. The time,
  2237.  
  2238.          or number returned, is actually  the number of iterations, or
  2239.  
  2240.          loops that the function performed prior to the bit going to a
  2241.  
  2242.          0. This number gives a relative position of the joystick. All
  2243.  
  2244.          the way to the right on the X axis returns the X axis highest
  2245.  
  2246.          number, while all  the way down on  the Y axis returns  the Y
  2247.  
  2248.          axis highest number.
  2249.  
  2250.  
  2251.          For the functions that read the X and Y axis of the joystick,
  2252.  
  2253.          remember: the value  returned is only a  relative positioning
  2254.  
  2255.          of the joystick. In the lower  values, 4 to 10 being returned
  2256.  
  2257.          is common.  The highest  values are  very dependant  upon the
  2258.  
  2259.          type and speed of your computer as  well as the speed of your
  2260.  
  2261.          compiled  program,   which  is  compiler   dependant.  Values
  2262.  
  2263.          returned can  be from 150 to  over 500, again  depending upon
  2264.  
  2265.          all the variables.
  2266.  
  2267.  
  2268.          Using Power C and  a 12 Mhz 286 machine, the  high end was in
  2269.  
  2270.          the mid hundreds.  Using Turbo C, the  higher values returned
  2271.  
  2272.          were in the five hundreds, so compilers are different.
  2273.  
  2274.  
  2275.          The IBM  AT and  compatibles have  routines written  in their
  2276.  
  2277.          bios which  will read the  joystick ports connected  to their
  2278.  
  2279.          bus.  Since there  is no  way  of knowing  what machine  your
  2280.  
  2281.          finished programs may  be run on, the  functions will operate
  2282.  
  2283.          in  the same  fashion on  any machine,  returning a  RELATIVE
  2284.  
  2285.          POSITIONING of the joystick along its X or Y axis.
  2286.  
  2287.  
  2288.          One of the first things that should be done in a program that
  2289.  
  2290.          uses the joysticks  is to call the getjoyAX  and getjoyAY, as
  2291.  
  2292.          well as the other two 'get' functions if a second joystick is
  2293.  
  2294.          to be  used, and ask  the user  to "CENTER YOUR  JOYSTICK AND
  2295.  
  2296.          PRESS ENTER", or similar routine. By  doing this, you can get
  2297.  
  2298.          the returned  value of the  center position of  the joystick,
  2299.  
  2300.          center X and center Y, and assign  them to a variable so that
  2301.  
  2302.          twice center X is at the far right, and twice center Y is all
  2303.  
  2304.          the way down. All the way up, Y  should be around 0 to 10 and
  2305.  
  2306.          all the way to the left, X should also be around 0 to 10.
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.                                       21
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.                               JOYSTICK FUNCTIONS
  2323.  
  2324.  
  2325.  
  2326.  
  2327.          The joystick  header or include  file simply consists  of the
  2328.  
  2329.          following, as can be seen by typing from the command line;
  2330.  
  2331.  
  2332.          C>type cesjoy.h
  2333.  
  2334.  
  2335.  
  2336.          /*  Joystick routines header file */
  2337.  
  2338.          /*  Copyright 1989 Computer Engineering Services */
  2339.  
  2340.  
  2341.  
  2342.          int getjoyAX(void);
  2343.  
  2344.          int getjoyAY(void);
  2345.  
  2346.          int getjoyAB1(void);
  2347.  
  2348.          int getjoyAB2(void);
  2349.  
  2350.          int getjoyBX(void);
  2351.  
  2352.          int getjoyBY(void);
  2353.  
  2354.          int getjoyBB1(void);
  2355.  
  2356.          int getjoyBB2(void);
  2357.  
  2358.          int joyport(void);
  2359.  
  2360.  
  2361.  
  2362.          There  are  no  global  variables  defined  in  the  cesjoy.h
  2363.  
  2364.          joystick header file. All of  your programs that will include
  2365.  
  2366.          joystick functions must include cesjoy.h, such as;
  2367.  
  2368.  
  2369.  
  2370.          #include <cesjoy.h>
  2371.  
  2372.  
  2373.          and any path to the file such as;
  2374.  
  2375.  
  2376.  
  2377.          #include <\c_work\cesjoy.h>
  2378.  
  2379.  
  2380.          The example C source code included at the end of this chapter
  2381.  
  2382.          summarizes all of the functions and useage.
  2383.  
  2384.  
  2385.  
  2386.          int joyport(void);
  2387.  
  2388.  
  2389.          This  function  checks to  see  if  a  game port  adapter  is
  2390.  
  2391.          included in the system bus.  Simply, this function checks the
  2392.  
  2393.          the lower byte at  location 201 hex and checks to  see if the
  2394.  
  2395.          top four  bits, bit  4, 5,  6, and 7  are at  a logic  1, and
  2396.  
  2397.          checks the bottom  four bits, 0, 1,  2, and 3 to  see if they
  2398.  
  2399.          are at  a logic  zero. If  all of  these conditions  are met,
  2400.  
  2401.          there  is a  gane  port adapter  installed  in  any class  of
  2402.  
  2403.          machineand returns  true or  a 1.  If there  is no  game port
  2404.  
  2405.          installed or should you have  a faulty joystick connected, or
  2406.  
  2407.          if a button is pressed, it will return a 0.
  2408.  
  2409.  
  2410.          This  function only  returns an  integer, either  a 1,  true,
  2411.  
  2412.          should a game port be installed, or a 0, false, should a game
  2413.  
  2414.          port not be installed or if  a button is pressed or defective
  2415.  
  2416.  
  2417.  
  2418.                                       22
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.          joystick is installed.
  2427.  
  2428.  
  2429.  
  2430.          int getjoyAX(void);
  2431.  
  2432.  
  2433.          This function  returns the relative  position of  the primary
  2434.  
  2435.          joystick, (if  you are  using only one,  this is  the primary
  2436.  
  2437.          joystick), along  its X axis.  Returns a lower  integer value
  2438.  
  2439.          when moved to the right and a  higher value when moved to the
  2440.  
  2441.          left.
  2442.  
  2443.  
  2444.  
  2445.          int getjoyAY(void);
  2446.  
  2447.  
  2448.          This function  returns the relative  position of  the primary
  2449.  
  2450.          joystick along its Y axis. Returns a lower integer value when
  2451.  
  2452.          moved to the top and a higher value when moved to the bottom.
  2453.  
  2454.  
  2455.  
  2456.          int getjoyAB1(void);
  2457.  
  2458.  
  2459.          This function returns  a 1 or true, when the  first button on
  2460.  
  2461.          the primary joystick is depressed.  Otherwise it returns a 0,
  2462.  
  2463.          or false, when the function is called.
  2464.  
  2465.  
  2466.  
  2467.          int getjoyAB2(void);
  2468.  
  2469.  
  2470.          This function returns a 1 or  true, when the second button on
  2471.  
  2472.          the primary joystick is depressed.  Otherwise it returns a 0,
  2473.  
  2474.          or false, when the function is called.
  2475.  
  2476.  
  2477.  
  2478.          int getjoyBX(void);
  2479.  
  2480.  
  2481.          This function is identical to  getjoyAX above, except returns
  2482.  
  2483.          the X value of the secondary joystick.
  2484.  
  2485.  
  2486.  
  2487.          int getjoyBY(void);
  2488.  
  2489.  
  2490.          This function is identical to  getjoyAY above, except returns
  2491.  
  2492.          the Y value of the secondary joystick.
  2493.  
  2494.  
  2495.  
  2496.          int getjoyBB1(void);
  2497.  
  2498.  
  2499.          This function is identical to getjoyAB1 above, except returns
  2500.  
  2501.          a 1, or  true, if the first button on  the secondary joystick
  2502.  
  2503.          is depressed.
  2504.  
  2505.  
  2506.  
  2507.          int getjoyBB2(void);
  2508.  
  2509.  
  2510.          This function is identical to getjoyAB2 above, except returns
  2511.  
  2512.          a 1, or true, if the  second button on the secondary joystick
  2513.  
  2514.          is depressed.
  2515.  
  2516.  
  2517.  
  2518.                                       23
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.                    EXAMPLE C SOURCE WITH JOYSTICK FUNCTIONS
  2527.  
  2528.                             Written for Mix Power C
  2529.  
  2530.  
  2531.  
  2532.          #include <dos.h>
  2533.  
  2534.          #include <bios.h>
  2535.  
  2536.          #include <conio.h>
  2537.  
  2538.          #include <cesjoy.h>
  2539.  
  2540.  
  2541.          int x, y, b1, b2, xx, yy, b3, b4;
  2542.  
  2543.  
  2544.          main()
  2545.  
  2546.          {
  2547.  
  2548.              clrscrn();
  2549.  
  2550.  
  2551.              if (joyport() == 0)
  2552.  
  2553.              {
  2554.  
  2555.                  printf("There is NO game port installed\n");
  2556.  
  2557.                  exit();
  2558.  
  2559.              }
  2560.  
  2561.              poscurs(19,20);
  2562.  
  2563.                 cprintf("PC Joy Stick Test, Copyright 1989 C.E.S.");
  2564.  
  2565.              poscurs(20,28);
  2566.  
  2567.                 cprintf("Press any key to exit.");
  2568.  
  2569.  
  2570.                 for(;;)
  2571.  
  2572.                         {
  2573.  
  2574.                         x = getjoyAX();
  2575.  
  2576.                         y = getjoyAY();
  2577.  
  2578.                         b1 = getjoyAB1();
  2579.  
  2580.                         b2 = getjoyAB2();
  2581.  
  2582.                         xx = getjoyBX();
  2583.  
  2584.                         yy = getjoyBY();
  2585.  
  2586.                         b3 = getjoyBB1();
  2587.  
  2588.                         b4 = getjoyBB2();
  2589.  
  2590.  
  2591.                  poscurs(5,10);
  2592.  
  2593.                  cprintf("Joystick #1. X= %3d", x);
  2594.  
  2595.                  poscurs(6,10);
  2596.  
  2597.                  cprintf("Joystick #1. Y= %3d", y);
  2598.  
  2599.                  poscurs(8,10);
  2600.  
  2601.                  cprintf("Joystick #1, Button #1= %1d", b1);
  2602.  
  2603.                  poscurs(9,10);
  2604.  
  2605.                  cprintf("Joystick #1, Button #2= %1d", b2);
  2606.  
  2607.                  poscurs(11,10);
  2608.  
  2609.                  cprintf("Joystick #2. X= %3d", xx);
  2610.  
  2611.                  poscurs(12,10);
  2612.  
  2613.                  cprintf("Joystick #2. Y= %3d", yy);
  2614.  
  2615.                  poscurs(14,10);
  2616.  
  2617.                  cprintf("Joystick #2, Button #1= %1d", b3);
  2618.  
  2619.                  poscurs(15,10);
  2620.  
  2621.                  cprintf("Joystick #2, Button #2= %1d", b4);
  2622.  
  2623.                         if (kbhit()) break;
  2624.  
  2625.                         }
  2626.  
  2627.  
  2628.              clrscrn();
  2629.  
  2630.          }
  2631.  
  2632.  
  2633.  
  2634.                                       24
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.                                   BUG REPORT
  2643.  
  2644.  
  2645.  
  2646.  
  2647.          Please fill  out the  following form to  report and  bugs. If
  2648.  
  2649.          possible, also send a copy of your C source where the bug has
  2650.  
  2651.          occurred. I  do not think that  the library contains  any any
  2652.  
  2653.          bugs, which may  be a bold statement, but it  has undergone a
  2654.  
  2655.          lot of testing. Please mail the completed for to:
  2656.  
  2657.  
  2658.          Computer Engineering Services
  2659.  
  2660.          P.O. Box 1222
  2661.  
  2662.          Show Low, Arizona  85901-1222
  2663.  
  2664.  
  2665.          ------------------------------------------------------------
  2666.  
  2667.  
  2668.          Name ______________________________ Phone (___)_____________
  2669.  
  2670.  
  2671.          Address ___________________________ City ___________________
  2672.  
  2673.  
  2674.          State ___________ Zip __________ Library Version ___________
  2675.  
  2676.  
  2677.          Compiler _____________ Version ____________
  2678.  
  2679.  
  2680.          Describe the bug or malfunction:
  2681.  
  2682.  
  2683.          ____________________________________________________________
  2684.  
  2685.  
  2686.          ____________________________________________________________
  2687.  
  2688.  
  2689.          ____________________________________________________________
  2690.  
  2691.  
  2692.          ____________________________________________________________
  2693.  
  2694.  
  2695.          What compiler directives or options were used:
  2696.  
  2697.  
  2698.          ____________________________________________________________
  2699.  
  2700.  
  2701.          ____________________________________________________________
  2702.  
  2703.  
  2704.          What linker options were used:
  2705.  
  2706.  
  2707.          ____________________________________________________________
  2708.  
  2709.  
  2710.          ____________________________________________________________
  2711.  
  2712.  
  2713.          Is your C source code enclosed? ______
  2714.  
  2715.  
  2716.          Other comments: ____________________________________________
  2717.  
  2718.  
  2719.          ____________________________________________________________
  2720.  
  2721.  
  2722.          ____________________________________________________________
  2723.  
  2724.  
  2725.          ____________________________________________________________
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.                                       25
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.                           REGISTRATION AND ORDER FORM
  2740.  
  2741.  
  2742.  
  2743.          Name _______________________________ Phone (___)____________
  2744.  
  2745.  
  2746.          Address ____________________________ City __________________
  2747.  
  2748.  
  2749.          State _________ Zip ___________ Bus. Phone (___)____________
  2750.  
  2751.  
  2752.          SHIPPING ADDRESS ___________________________________________
  2753.  
  2754.  
  2755.          City _________________________ State _________ Zip _________
  2756.  
  2757.  
  2758.  
  2759.          ------------------------------------------------------------
  2760.  
  2761.  
  2762.                 CESMouse Tools Library With Joystick Functions
  2763.  
  2764.  
  2765.  
  2766.          __ Registration of Shareware Only Version ........... $10.00
  2767.  
  2768.  
  2769.          __ Registration and Upgrade to Professional Library . $22.50
  2770.  
  2771.  
  2772.          __ Professional Library Updates ..................... $ 7.50
  2773.  
  2774.             (Registered Professional Library Users Only)
  2775.  
  2776.  
  2777.          __ Three inch Diskette .............................. $ 1.50
  2778.  
  2779.             (Default is 5.25 inch 360 K media)
  2780.  
  2781.  
  2782.  
  2783.  
  2784.          TOTAL ............................................. ________
  2785.  
  2786.  
  2787.          __ Personal Check       __ Money Order   is enclosed.
  2788.  
  2789.  
  2790.              Please make checks payable to John F. Jarrett, C.E.S.
  2791.  
  2792.          ------------------------------------------------------------
  2793.  
  2794.                                   PLEASE NOTE
  2795.  
  2796.  
  2797.          Personal  Checks take  two  to three  weeks  to clear.  Money
  2798.  
  2799.          Orders/Cashiers Checks are shipped  immediately. Please allow
  2800.  
  2801.          two weeks for delivery for regular mail, which is included in
  2802.  
  2803.          the prices above. Should we be  out of stock of something, we
  2804.  
  2805.          will spend  29 cents and send  you a notice and  the expected
  2806.  
  2807.          shipping date!
  2808.  
  2809.  
  2810.          When you  upgrade to the Professional  Library, all of  the C
  2811.  
  2812.          source for  all of the functions  is included,  plus  you get
  2813.  
  2814.          all of the additional mouse  functions for complete mouse and
  2815.  
  2816.          mouse cursor control PLUS a printed manual.
  2817.  
  2818.  
  2819.          Updates  is a  service  that will  send  you  updates to  the
  2820.  
  2821.          library for one year. I.E. bug fixes, new routines, etc.
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.                                       26
  2830.  
  2831.  
  2832.  
  2833.