home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / fish / enhancements / general / keymenu / keymenu-handler.i < prev    next >
Text File  |  1991-03-10  |  4KB  |  81 lines

  1. remove_event        equ                 1
  2. pass_event_on       equ                 0
  3. req_setpointer      equ                 -1
  4. req_clearpointer    equ                 -2
  5. req_stopped         equ                 -3
  6. blank_pointer_size  equ                 16
  7. AbsExecBase         equ                 4
  8.  
  9.                     extern_lib Permit
  10.  
  11.                     bitdef  FLAG,AKey_down,0
  12.                     bitdef  FLAG,MActive,1
  13.                     bitdef  FLAG,Clear_rmbtrap,2
  14.                     bitdef  FLAG,Stop_requested,3
  15.                     bitdef  FLAG,Stopped,4
  16.                     bitdef  FLAG,Events_inserted,5
  17.                     bitdef  FLAG,Repeat_skipped,6
  18.                     bitdef  FLAG,Blank_pointer,7
  19.  
  20.                     bitnum  MENUSTATE,MENUSTATE
  21.                     bitnum  RMBTRAP,RMBTRAP
  22.                     bitnum  IECODE_UP_PREFIX,IECODE_UP_PREFIX
  23.                     bitnum  V_HIRES,V_HIRES
  24.                     bitnum  V_LACE,V_LACE
  25.                     bitnum  IEQUALIFIER_REPEAT,IEQUALIFIER_REPEAT
  26.  
  27. portname            macro   * name         
  28. %1                  dc.b    'KeyMenu V1.03',0
  29.                     endm
  30.  
  31.     structure Global_data,0
  32.         struct  gb_Port,MP_SIZE             ; msg port
  33.         aptr    gb_Segment                  ; handler segment
  34.         struct  gb_handler,IS_SIZE          ; area for input handler
  35.         aptr    gb_IBase                    ; Intuition Library base
  36.         aptr    gb_handtask                 ; handler task
  37.         aptr    gb_task                     ; keymenu task
  38.         ubyte   gb_PtrHeight                ; Save pointer info area
  39.         ubyte   gb_PtrWidth     
  40.         ubyte   gb_XOffset
  41.         ubyte   gb_YOffset
  42.         aptr    gb_Pointer
  43.         aptr    gb_blank_ptr                ; data for blanking pointer
  44.         aptr    gb_window                   ; current window
  45.         aptr    gb_menu                     ; First Menu
  46.         aptr    gb_currentmenu              ; current Menu
  47.         aptr    gb_currentitem              ; current MenuItem
  48.         aptr    gb_currentsubitem           ; current SubItem
  49.         struct  gb_ppos1,ie_SIZEOF          ; pointerpos event area
  50.         struct  gb_ppos2,ie_SIZEOF          ; pointerpos event area
  51.         struct  gb_rawm,ie_SIZEOF           ; rawmouse event area
  52.         word    gb_old_MouseX               ; mouse coordinates before
  53.                                             ; menu was activated
  54.         word    gb_old_MouseY
  55.         ubyte   gb_flags                    ; various status flags
  56.                                             ;  - AKey_down
  57.                                             ;  - MActive
  58.                                             ;  - Clear_rmbtrap
  59.                                             ;  - stop_requested
  60.                                             ;  - events inserted
  61.                                             ;  - repeat skipped
  62.                                             ;  - Blank pointer
  63.         ubyte   gb_AKey                     ; Menu activation key
  64.         ubyte   gb_DKey                     ; Menu deactivation key
  65.         ubyte   gb_SKey                     ; Menu select key
  66.         ubyte   gb_UpKey                    ; Up key
  67.         ubyte   gb_DownKey                  ; Down key
  68.         ubyte   gb_LeftKey                  ; Left key
  69.         ubyte   gb_RightKey                 ; Right key
  70.         ubyte   gb_Qual                     ; qualifier(s)
  71.         ubyte   gb_tasksignum               ; keymenu signal number
  72.         label   gb_size
  73.  
  74.     structure Item_def,0
  75.         aptr    im_NextItem
  76.         word    im_LeftEdge
  77.         word    im_TopEdge
  78.         word    im_Width
  79.         word    im_Height
  80.         label   im_size
  81.