home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / text_autodocs / input.doc < prev    next >
Text File  |  1992-09-01  |  7KB  |  238 lines

  1. TABLE OF CONTENTS
  2.  
  3. input.device/IND_ADDHANDLER
  4. input.device/IND_REMHANDLER
  5. input.device/IND_SETMPORT
  6. input.device/IND_SETMTRIG
  7. input.device/IND_SETMTYPE
  8. input.device/IND_SETPERIOD
  9. input.device/IND_SETTHRESH
  10. input.device/IND_WRITEEVENT
  11. input.device/PeekQualifier
  12. input.device/IND_ADDHANDLER                       input.device/IND_ADDHANDLER
  13.  
  14.    NAME
  15.     IND_ADDHANDLER -- Add an input handler to the device
  16.  
  17.    FUNCTION
  18.     Add a function to the list of functions called to handle
  19.     input events generated by this device.  The function is called
  20.     as
  21.         newInputEvents = Handler(inputEvents, handlerData);
  22.         D0                 A0          A1
  23.  
  24.    IO REQUEST
  25.     io_Message    mn_ReplyPort set
  26.     io_Device    preset by OpenDevice
  27.     io_Unit        preset by OpenDevice
  28.     io_Command    IND_ADDHANDLER
  29.     io_Data        a pointer to an interrupt structure.
  30.         is_Data     the handlerData pointer described above
  31.         is_Code    the Handler function address
  32.  
  33.    NOTES
  34.     The interrupt structure is kept by the input device until a
  35.     RemHandler command is satisfied for it.
  36.  
  37. input.device/IND_REMHANDLER                       input.device/IND_REMHANDLER
  38.  
  39.    NAME
  40.     IND_REMHANDLER -- Remove an input handler from the device
  41.  
  42.    FUNCTION
  43.     Remove a function previously added to the list of handler
  44.     functions.
  45.  
  46.    IO REQUEST
  47.     io_Message    mn_ReplyPort set
  48.     io_Device    preset by OpenDevice
  49.     io_Unit        preset by OpenDevice
  50.     io_Command    IND_REMHANDLER
  51.     io_Data        a pointer to the interrupt structure.
  52.  
  53.    NOTES
  54.     This command is not immediate
  55.  
  56. input.device/IND_SETMPORT                           input.device/IND_SETMPORT
  57.  
  58.    NAME
  59.     IND_SETMPORT -- Set the current mouse port
  60.  
  61.    FUNCTION
  62.     This command sets the gameport port at which the mouse is
  63.     connected.
  64.  
  65.    IO REQUEST
  66.     io_Message    mn_ReplyPort set if quick I/O is not possible
  67.     io_Device    preset by the call to OpenDevice
  68.     io_Unit        preset by the call to OpenDevice
  69.     io_Command    IND_SETMPORT
  70.     io_Flags    IOB_QUICK set if quick I/O is possible
  71.     io_Length    1
  72.     io_Data        a pointer to a byte that is either 0 or 1,
  73.             indicating that mouse input should be obtained
  74.             from either the left or right controller port,
  75.             respectively.
  76.  
  77. input.device/IND_SETMTRIG                           input.device/IND_SETMTRIG
  78.  
  79.    NAME
  80.     IND_SETMTRIG -- Set the conditions for a mouse port report
  81.  
  82.    FUNCTION
  83.     This command sets what conditions must be met by a mouse
  84.     before a pending Read request will be satisfied.  The trigger
  85.     specification is that used by the gameport device.
  86.  
  87.    IO REQUEST
  88.     io_Message    mn_ReplyPort set if quick I/O is not possible
  89.     io_Device    preset by the call to OpenDevice
  90.     io_Unit        preset by the call to OpenDevice
  91.     io_Command    IND_SETMTRIG
  92.     io_Flags    IOB_QUICK set if quick I/O is possible
  93.     io_Length    sizeof(gameportTrigger)
  94.     io_Data        a structure of type GameportTrigger, which
  95.             has the following elements
  96.         gpt_Keys -
  97.             GPTB_DOWNKEYS set if button down transitions
  98.             trigger a report, and GPTB_UPKEYS set if button up
  99.             transitions trigger a report
  100.         gpt_Timeout    -
  101.             a time which, if exceeded, triggers a report;
  102.             measured in vertical blank units (60/sec)
  103.         gpt_XDelta    -
  104.             a distance in x which, if exceeded, triggers a
  105.             report
  106.         gpt_YDelta    -
  107.             a distance in x which, if exceeded, triggers a
  108.             report
  109.  
  110. input.device/IND_SETMTYPE                           input.device/IND_SETMTYPE
  111.  
  112.    NAME
  113.     IND_SETMTYPE -- Set the current mouse port controller type
  114.  
  115.    FUNCTION
  116.     This command sets the type of device at the mouse port, so
  117.     the signals at the port may be properly interpreted.
  118.  
  119.    IO REQUEST
  120.     io_Message    mn_ReplyPort set if quick I/O is not possible
  121.     io_Device    preset by the call to OpenDevice
  122.     io_Unit        preset by the call to OpenDevice
  123.     io_Command    IND_SETMTYPE
  124.     io_Flags    IOB_QUICK set if quick I/O is possible
  125.     io_Length    1
  126.     io_Data        the address of the byte variable describing
  127.             the controller type, as per the equates in
  128.             the gameport include file
  129.  
  130. input.device/IND_SETPERIOD                         input.device/IND_SETPERIOD
  131.  
  132.    NAME
  133.     IND_SETPERIOD -- Set the key repeat period
  134.  
  135.    FUNCTION
  136.     This command sets the period at which a repeating key repeats.
  137.  
  138.     This command always executes immediately.
  139.  
  140.    IO REQUEST - a timerequest
  141.     tr_node.io_Message    mn_ReplyPort set if quick I/O is not possible
  142.     tr_node.io_Device    preset by the call to OpenDevice
  143.     tr_node.io_Unit        preset by the call to OpenDevice
  144.     tr_node.io_Command    IND_SETPERIOD
  145.     tr_node.io_Flags    IOB_QUICK set if quick I/O is possible
  146.     tr_time.tv_secs        the repeat period seconds
  147.     tr_time.tv_micro    the repeat period microseconds
  148.  
  149. input.device/IND_SETTHRESH                         input.device/IND_SETTHRESH
  150.  
  151.    NAME
  152.     IND_SETTHRESH -- Set the key repeat threshold
  153.  
  154.    FUNCTION
  155.     This command sets the time that a key must be held down before
  156.     it can repeat.  The repeatability of a key may be restricted
  157.     (as, for example, are the shift keys).
  158.  
  159.     This command always executes immediately.
  160.  
  161.    IO REQUEST - a timerequest
  162.     tr_node.io_Message    mn_ReplyPort set if quick I/O is not possible
  163.     tr_node.io_Device    preset by the call to OpenDevice
  164.     tr_node.io_Unit        preset by the call to OpenDevice
  165.     tr_node.io_Command    IND_SETTHRESH
  166.     tr_node.io_Flags    IOB_QUICK set if quick I/O is possible
  167.     tr_time.tv_secs        the threshold seconds
  168.     tr_time.tv_micro    the threshold microseconds
  169.  
  170. input.device/IND_WRITEEVENT                       input.device/IND_WRITEEVENT
  171.  
  172.    NAME
  173.     IND_WRITEEVENT -- Propagate an input event to all handlers
  174.  
  175.    FUNCTION
  176.  
  177.    IO REQUEST
  178.     io_Message    mn_ReplyPort set if quick I/O is not possible
  179.     io_Device    preset by the call to OpenDevice
  180.     io_Unit        preset by the call to OpenDevice
  181.     io_Command    IND_WRITEEVENT
  182.     io_Flags    IOB_QUICK set if quick I/O is possible
  183.     io_Length    should be sizeof(struct InputEvent)
  184.     io_Data        a pointer to the struct InputEvent:
  185.         ie_NextEvent
  186.             will be ignored.
  187.         ie_Class
  188.         ie_SubClass
  189.         ie_Code 
  190.         ie_Qualifier 
  191.         ie_X, ie_Y
  192.             as desired
  193.         ie_TimeStamp 
  194.             will be set by this call (V36)
  195.  
  196.    NOTES
  197.     The contents of the input event are destroyed.
  198.  
  199.     This function was documented in V34 and earlier to allow
  200.     chaining of events via ie_NextEvent.  The implementation
  201.     never allowed that.  The documentation now reflects this.
  202.  
  203.     ie_TimeStamp is set only in V36 and later.  Software written
  204.     to run on earlier versions should set this field to the
  205.     current time.
  206.  
  207. input.device/PeekQualifier                         input.device/PeekQualifier
  208.  
  209.    NAME
  210.     PeekQualifier -- get the input device's current qualifiers (V36)
  211.  
  212.    SYNOPSIS
  213.     qualifier = PeekQualifier()
  214.     d0
  215.  
  216.     UWORD PeekQualifier( VOID );
  217.  
  218.    FUNCTION
  219.     This function takes a snapshot of what the input device thinks
  220.     the current qualifiers are.
  221.  
  222.    RESULTS
  223.     qualifier - a word with the following bits set according to
  224.         what the input device knows their state to be:
  225.         IEQUALIFIER_LSHIFT, IEQUALIFIER_RSHIFT,
  226.         IEQUALIFIER_CAPSLOCK, IEQUALIFIER_CONTROL, 
  227.         IEQUALIFIER_LALT, IEQUALIFIER_RALT,
  228.         IEQUALIFIER_LCOMMAND, IEQUALIFIER_RCOMMAND,
  229.         IEQUALIFIER_LEFTBUTTON, IEQUALIFIER_RBUTTON,
  230.         IEQUALIFIER_MIDBUTTON
  231.  
  232.    NOTE
  233.     This function is new for V36.
  234.  
  235.    SEE ALSO
  236.     devices/inputevent.h
  237.  
  238.