home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / oberon / system / amigainputevent.mod < prev    next >
Text File  |  1994-01-04  |  6KB  |  150 lines

  1. MODULE AmigaInputEvent;
  2.  
  3. IMPORT e := AmigaExec, t := AmigaTimer;
  4.  
  5. CONST
  6.   null           * = 00H; (* A NOP input event                              *)
  7.   rawkey         * = 01H; (* A raw keycode from the keyboard device         *)
  8.   rawmouse       * = 02H; (* The raw mouse report from the game port        *
  9.                            * device                                         *)
  10.   event          * = 03H; (* A private console event                        *)
  11.   pointerpos     * = 04H; (* A Pointer Position report                      *)
  12.   timer          * = 06H; (* A timer event                                  *)
  13.   gadgetdown     * = 07H; (* select button pressed down over a Gadget       *
  14.                            * (address in ie_EventAddress)                   *)
  15.   gadgetup       * = 08H; (* select button released over the same Gadget    *
  16.                            * (address in ie_EventAddress)                   *)
  17.   requester      * = 09H; (* some Requester activity has taken place.  See  *
  18.                            * Codes REQCLEAR and REQSET                      *)
  19.   menulist       * = 0AH; (* this is a Menu Number transmission (Menu       *
  20.                            * number is in ie_Code)                          *)
  21.   closewindow    * = 0BH; (* User has selected the active Window's Close    *
  22.                            * Gadget                                         *)
  23.   sizewindow     * = 0CH; (* this Window has a new size                     *)
  24.   refreshwindow  * = 0DH; (* the Window pointed to by ie_EventAddress needs *
  25.                            * to be refreshed                                *)
  26.   newprefs       * = 0EH; (* new preferences are available                  *)
  27.   diskremoved    * = 0FH; (* the disk has been removed                      *)
  28.   diskinserted   * = 10H; (* the disk has been inserted                     *)
  29.   activewindow   * = 11H; (* the window is about to be been made active     *)
  30.   inactivewindow * = 12H; (* the window is about to be made inactive        *)
  31.   newpointerpos  * = 13H; (* extended-function pointer position report      *
  32.                            * (V36)                                          *)
  33.   menuhelp       * = 14H; (* Help key report during Menu session (V36)      *)
  34.   changewindow   * = 15H; (* the Window has been modified with move, size,  *
  35.                            * zoom, or change (V36)                          *)
  36.  
  37.   classMax       * = 15H; (* the last class                                 *)
  38.  
  39.  
  40. (*  --- InputEvent.subClass --- *)
  41. (*  newpointerpos *)
  42. (*      like pointerpos *)
  43.   compatible   * = 00H;
  44. (*      InputEvent.eventAddress points to struct IEPointerPixel *)
  45.   pixel        * = 01H;
  46. (*      InputEvent.eventAddress points to struct IEPointerTablet *)
  47.   tablet       * = 02H;
  48.  
  49. CONST
  50.  
  51. (*  --- InputEvent.ie_Code --- *)
  52. (*  IECLASS_RAWKEY *)
  53.   upPrefix             * = 080H;
  54.   keyCodeFirst         * = 000H;
  55.   keyCodeLast          * = 077H;
  56.   commCodeFirst        * = 078H;
  57.   commCodeLast         * = 07FH;
  58.  
  59. (*  IECLASS_ANSI *)
  60.   c0First              * = 000H;
  61.   c0Last               * = 01FH;
  62.   asciiFirst           * = 020H;
  63.   asciiLast            * = 07EH;
  64.   asciiDel             * = 07FH;
  65.   c1First              * = 080H;
  66.   c1Last               * = 09FH;
  67.   latin1First          * = 0A0H;
  68.   latin1Last           * = 0FFH;
  69.  
  70. (*  IECLASS_RAWMOUSE *)
  71.   lButton              * = 068H;  (* also uses IECODE_UP_PREFIX *)
  72.   rButton              * = 069H;
  73.   mButton              * = 06AH;
  74.   noButton             * = 0FFH;
  75.  
  76. (*  IECLASS_EVENT (V36) *)
  77.   newActive            * = 001H;  (* new active input window *)
  78.   newSize              * = 002H;  (* resize of window *)
  79.   refresh              * = 003H;  (* refresh of window *)
  80.  
  81. (*  IECLASS_REQUESTER *)
  82. (*      broadcast when the first Requester (not subsequent ones) opens up in *)
  83. (*      the Window *)
  84.   reqSet               * = 001H;
  85. (*      broadcast when the last Requester clears out of the Window *)
  86.   reqClear             * = 000H;
  87.  
  88.  
  89.  
  90. (*  --- InputEvent.qualifier --- *)
  91.  
  92.   lShift         * = 0;
  93.   rShift         * = 1;
  94.   capsLock       * = 2;
  95.   control        * = 3;
  96.   lAlt           * = 4;
  97.   rAlt           * = 5;
  98.   lCommand       * = 6;
  99.   rCommand       * = 7;
  100.   numericPad     * = 8;
  101.   repeat         * = 9;
  102.   interrupt      * = 10;
  103.   multiBroadCast * = 11;
  104.   midButton      * = 12;
  105.   rightButton    * = 13;
  106.   leftButton     * = 14;
  107.   relativeMouse  * = 15;
  108.  
  109. TYPE
  110.  
  111. (*----- InputEvent -------------------------------------------------*)
  112.  
  113.   InputEventPtr * = POINTER TO InputEvent;
  114.   InputEvent * = RECORD
  115.     nextEvent * : InputEventPtr;   (* the chronologically next event *)
  116.     class * : SHORTINT;            (* the input event class *)
  117.     subClass * : SHORTINT;         (* optional subclass of the class *)
  118.     code * : INTEGER;              (* the input event code *)
  119.     qualifier * : INTEGER;             (* qualifiers in effect for the event*)
  120.     x*: INTEGER;                   (* the pointer position for the event*)
  121.     y*: INTEGER;
  122.     timeStamp * : t.TimeVal;       (* the system tick at the event *)
  123.   END;
  124.   InputEventAdrPtr * = POINTER TO InputEventAdr;
  125.   InputEventAdr * = RECORD
  126.     nextEvent * : InputEventAdrPtr;(* the chronologically next event *)
  127.     class * : SHORTINT;            (* the input event class *)
  128.     subClass * : SHORTINT;         (* optional subclass of the class *)
  129.     code * : INTEGER;              (* the input event code *)
  130.     qualifier * : INTEGER;             (* qualifiers in effect for the event*)
  131.     addr *: LONGINT;                (* the event address *)
  132.     timeStamp * : t.TimeVal;       (* the system tick at the event *)
  133.   END;
  134.   InputEventPrevPtr * = POINTER TO InputEventPrev;
  135.   InputEventPrev * = RECORD
  136.     nextEvent * : InputEventPrevPtr;(* the chronologically next event *)
  137.     class * : SHORTINT;            (* the input event class *)
  138.     subClass * : SHORTINT;         (* optional subclass of the class *)
  139.     code * : INTEGER;              (* the input event code *)
  140.     qualifier * : INTEGER;             (* qualifiers in effect for the event*)
  141.     prev1DownCode * : SHORTINT;    (* previous down keys for dead *)
  142.     prev1DownQual * : SHORTINT;    (*   key translation: the ie_Code *)
  143.     prev2DownCode * : SHORTINT;    (*   & low byte of ie_Qualifier for *)
  144.     prev2DownQual * : SHORTINT;    (*   last & second last down keys *)
  145.     timeStamp * : t.TimeVal;       (* the system tick at the event *)
  146.   END;
  147.  
  148. END AmigaInputEvent.
  149.  
  150.