home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.1 / includes / intuition / gadgetclass.i < prev    next >
Encoding:
Text File  |  1992-09-11  |  7.0 KB  |  250 lines

  1.     IFND INTUITION_GADGETCLASS_I
  2. INTUITION_GADGETCLASS_I SET 1
  3. **
  4. ** $VER: gadgetclass.i 36.10 (08.11.91)
  5. ** Includes Release 38.56
  6. **
  7. ** Custom and 'boopsi' gadget class interface
  8. **
  9. **  (C) Copyright 1989-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND EXEC_TYPES_I
  14.     INCLUDE "exec/types.i"
  15.     ENDC
  16.  
  17.     IFND INTUITION_INTUITION_I
  18.     INCLUDE "intuition/intuition.i"
  19.     ENDC
  20.  
  21.     IFND UTILITY_TAGITEM_I
  22.     INCLUDE "utility/tagitem.i"
  23.     ENDC
  24.  
  25.  
  26. *
  27. * NOTE:  intuition/iobsolete.i is included at the END of this file!
  28. *
  29.  
  30. ; Gadget Class attributes
  31.  
  32. GA_Dummy        EQU    (TAG_USER+$30000)
  33. GA_Left            EQU    (GA_Dummy+$0001)
  34. GA_RelRight        EQU    (GA_Dummy+$0002)
  35. GA_Top            EQU    (GA_Dummy+$0003)
  36. GA_RelBottom        EQU    (GA_Dummy+$0004)
  37. GA_Width        EQU    (GA_Dummy+$0005)
  38. GA_RelWidth        EQU    (GA_Dummy+$0006)
  39. GA_Height        EQU    (GA_Dummy+$0007)
  40. GA_RelHeight        EQU    (GA_Dummy+$0008)
  41. GA_Text            EQU    (GA_Dummy+$0009)  ; ti_Data is (UBYTE *)
  42. GA_Image        EQU    (GA_Dummy+$000A)
  43. GA_Border        EQU    (GA_Dummy+$000B)
  44. GA_SelectRender        EQU    (GA_Dummy+$000C)
  45. GA_Highlight        EQU    (GA_Dummy+$000D)
  46. GA_Disabled        EQU    (GA_Dummy+$000E)
  47. GA_GZZGadget        EQU    (GA_Dummy+$000F)
  48. GA_ID            EQU    (GA_Dummy+$0010)
  49. GA_UserData        EQU    (GA_Dummy+$0011)
  50. GA_SpecialInfo        EQU    (GA_Dummy+$0012)
  51. GA_Selected        EQU    (GA_Dummy+$0013)
  52. GA_EndGadget        EQU    (GA_Dummy+$0014)
  53. GA_Immediate        EQU    (GA_Dummy+$0015)
  54. GA_RelVerify        EQU    (GA_Dummy+$0016)
  55. GA_FollowMouse        EQU    (GA_Dummy+$0017)
  56. GA_RightBorder        EQU    (GA_Dummy+$0018)
  57. GA_LeftBorder        EQU    (GA_Dummy+$0019)
  58. GA_TopBorder        EQU    (GA_Dummy+$001A)
  59. GA_BottomBorder        EQU    (GA_Dummy+$001B)
  60. GA_ToggleSelect        EQU    (GA_Dummy+$001C)
  61.  
  62. * internal use only, until further notice, please
  63. GA_SysGadget        EQU    (GA_Dummy+$001D)
  64. * bool, sets GTYP_SYSGADGET field in type
  65. GA_SysGType        EQU    (GA_Dummy+$001E)
  66. * e.g., GTYP_WUPFRONT, ...
  67.  
  68. GA_Previous        EQU    (GA_Dummy+$001F)
  69. * previous gadget (or (struct Gadget **)) in linked list
  70. * NOTE: This attribute CANNOT be used to link new gadgets
  71. * into the gadget list of an open window or requester.
  72. * You must use AddGList().
  73.  
  74. GA_Next            EQU    (GA_Dummy+$0020)
  75. * not implemented
  76.  
  77. GA_DrawInfo        EQU    (GA_Dummy+$0021)
  78. * some fancy gadgets need to see a DrawInfo
  79. * when created or for layout
  80.  
  81. * You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage
  82. GA_IntuiText        EQU    (GA_Dummy+$0022)
  83. * ti_Data is (struct IntuiText    *)
  84.  
  85. GA_LabelImage        EQU    (GA_Dummy+$0023)
  86. * ti_Data is an image (object), used in place of
  87. * GadgetText
  88.  
  89. GA_TabCycle        EQU    (GA_Dummy+$0024)
  90. * New for V37:
  91. * Boolean indicates that this gadget is to participate in
  92. * cycling activation with Tab or Shift-Tab.
  93.  
  94. * PROPGCLASS attributes
  95.  
  96. PGA_Dummy        EQU    (TAG_USER+$31000)
  97. PGA_Freedom        EQU    (PGA_Dummy+$0001)
  98. * either or both of FREEVERT and FREEHORIZ
  99. PGA_Borderless        EQU    (PGA_Dummy+$0002)
  100. PGA_HorizPot        EQU    (PGA_Dummy+$0003)
  101. PGA_HorizBody        EQU    (PGA_Dummy+$0004)
  102. PGA_VertPot        EQU    (PGA_Dummy+$0005)
  103. PGA_VertBody        EQU    (PGA_Dummy+$0006)
  104. PGA_Total        EQU    (PGA_Dummy+$0007)
  105. PGA_Visible        EQU    (PGA_Dummy+$0008)
  106. PGA_Top            EQU    (PGA_Dummy+$0009)
  107. ; New for V37:
  108. PGA_NewLook        EQU    (PGA_Dummy+$000A)
  109.  
  110. * STRGCLASS attributes
  111.  
  112. STRINGA_Dummy            EQU    (TAG_USER+$32000)
  113. STRINGA_MaxChars    EQU    (STRINGA_Dummy+$0001)
  114. STRINGA_Buffer        EQU    (STRINGA_Dummy+$0002)
  115. STRINGA_UndoBuffer    EQU    (STRINGA_Dummy+$0003)
  116. STRINGA_WorkBuffer    EQU    (STRINGA_Dummy+$0004)
  117. STRINGA_BufferPos    EQU    (STRINGA_Dummy+$0005)
  118. STRINGA_DispPos        EQU    (STRINGA_Dummy+$0006)
  119. STRINGA_AltKeyMap    EQU    (STRINGA_Dummy+$0007)
  120. STRINGA_Font        EQU    (STRINGA_Dummy+$0008)
  121. STRINGA_Pens        EQU    (STRINGA_Dummy+$0009)
  122. STRINGA_ActivePens    EQU    (STRINGA_Dummy+$000A)
  123. STRINGA_EditHook    EQU    (STRINGA_Dummy+$000B)
  124. STRINGA_EditModes    EQU    (STRINGA_Dummy+$000C)
  125.  
  126. * booleans
  127. STRINGA_ReplaceMode    EQU    (STRINGA_Dummy+$000D)
  128. STRINGA_FixedFieldMode    EQU    (STRINGA_Dummy+$000E)
  129. STRINGA_NoFilterMode    EQU    (STRINGA_Dummy+$000F)
  130.  
  131. STRINGA_Justification    EQU    (STRINGA_Dummy+$0010)
  132. * GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT
  133. STRINGA_LongVal        EQU    (STRINGA_Dummy+$0011)
  134. STRINGA_TextVal        EQU    (STRINGA_Dummy+$0012)
  135.  
  136. STRINGA_ExitHelp    EQU    (STRINGA_Dummy+$0013)
  137. * STRINGA_ExitHelp is new for V37, and ignored by V36.
  138. * Set this if you want the gadget to exit when Help is
  139. * pressed.  Look for a code of 0x5F, the rawkey code for Help
  140.  
  141. SG_DEFAULTMAXCHARS    EQU    (128)
  142.  
  143. * Gadget Layout related attributes
  144.  
  145. LAYOUTA_Dummy        EQU    (TAG_USER+$38000)
  146. LAYOUTA_LayoutObj    EQU    (LAYOUTA_Dummy+$0001)
  147. LAYOUTA_Spacing        EQU    (LAYOUTA_Dummy+$0002)
  148. LAYOUTA_Orientation    EQU    (LAYOUTA_Dummy+$0003)
  149.  
  150. * orientation values
  151. LORIENT_NONE        EQU    0
  152. LORIENT_HORIZ        EQU    1
  153. LORIENT_VERT        EQU    2
  154.  
  155. ; Custom gadget hook command ID's 
  156. ; (gadget class method/message ID's)
  157.  
  158. GM_HITTEST EQU        0    ; return GMR_GADGETHIT if you are clicked
  159.                 ; (whether or not you are disabled)
  160. GM_RENDER EQU        1    ; draw yourself, in the appropriate state
  161. GM_GOACTIVE EQU        2    ; you are now going to be fed input
  162. GM_HANDLEINPUT EQU    3    ; handle that input
  163. GM_GOINACTIVE EQU    4    ; whether or not by choice, you are done
  164.  
  165. ; Parameter "Messages" passed to gadget class methods
  166.  
  167. ; All parameter structure begin with a MethodID field
  168. ; This definition of an abstract generic "message" is
  169. ; equivalent to a better one in intuition/classusr.i, but
  170. ; it's left here for historic reasons
  171.  STRUCTURE MsgHeader,0
  172.     ULONG    MethodID
  173.     LABEL    methodid_SIZEOF
  174.  
  175. ; GM_HITTEST
  176.  STRUCTURE    gpHitTest,methodid_SIZEOF
  177.     APTR    gpht_GInfo
  178.     WORD    gpht_MouseX
  179.     WORD    gpht_MouseY
  180.  
  181. ; GM_HITTEST return value
  182. GMR_GADGETHIT    EQU $00000004    ; if no hit, return 0
  183.  
  184. ; GM_RENDER
  185.  STRUCTURE    gpRender,methodid_SIZEOF
  186.     APTR    gpr_GInfo    ; gadget context
  187.     APTR    gpr_RPort    ; all ready for use
  188.     LONG    gpr_Redraw    ; might be a "highlight pass"
  189.  
  190. ; values of gpr_Redraw
  191. GREDRAW_UPDATE    EQU 2    ; update for change in attributesvalues
  192. GREDRAW_REDRAW    EQU 1    ; redraw gadget
  193. GREDRAW_TOGGLE    EQU 0    ; toggle highlight, if applicable
  194.  
  195. ; GM_GOACTIVE, GM_HANDLEINPUT
  196.  STRUCTURE    gpInput,methodid_SIZEOF
  197.     APTR    gpi_GInfo
  198.     APTR    gpi_IEvent
  199.     APTR    gpi_Termination
  200.     WORD    gpi_MouseX
  201.     WORD    gpi_MouseY
  202.  
  203. ; GM_HANDLEINPUT and GM_GOACTIVE  return code flags
  204. ; return GMR_MEACTIVE (0) alone if you want more input.
  205. ; Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally
  206. ; GMR_VERIFY.
  207.  
  208. ; here are the original constant "equates"
  209. GMR_MEACTIVE    EQU $0000     ; (bugfix: was $0001 during beta)
  210. GMR_NOREUSE    EQU $0002
  211. GMR_REUSE    EQU $0004
  212. GMR_VERIFY    EQU $0008    ; you MUST set cgp_Termination
  213.  
  214. * New for V37:
  215. * You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE,
  216. * which instructs Intuition to activate the next or previous gadget
  217. * that has GFLG_TABCYCLE set.
  218. *
  219. GMR_NEXTACTIVE    EQU $0010
  220. GMR_PREVACTIVE    EQU $0020
  221.  
  222. ; here are standard bit/flag pairs
  223. GMRB_NOREUSE    EQU 1
  224. GMRB_REUSE    EQU 2
  225. GMRB_VERIFY    EQU 3
  226. GMRB_NEXTACTIVE    EQU 4
  227. GMRB_PREVACTIVE    EQU 5
  228.  
  229. GMRF_NOREUSE    EQU $0002
  230. GMRF_REUSE    EQU $0004
  231. GMRF_VERIFY    EQU $0008
  232. GMRF_NEXTACTIVE    EQU $0010
  233. GMRF_PREVACTIVE    EQU $0020
  234.  
  235. ; GM_GOINACTIVE
  236.  STRUCTURE    gpGoInactive,methodid_SIZEOF
  237.     APTR    gpgi_GInfo
  238.  
  239. * V37 field only!  DO NOT attempt to read under V36!
  240.     ULONG    gpgi_Abort    ; gpgi_Abort=1 if gadget was aborted
  241.                 ; by Intuition and 0 if gadget went
  242.                 ; inactive at its own request
  243.  
  244. * Include obsolete identifiers:
  245.     IFND    INTUITION_IOBSOLETE_I
  246.     INCLUDE "intuition/iobsolete.i"
  247.     ENDC
  248.  
  249.     ENDC
  250.