1 #ifndef INTUITION_GADGETCLASS_H 2 #define INTUITION_GADGETCLASS_H 3 4 /* 5 intuition gadget class definitions (V50) 6 7 Copyright © 2002-2008 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef INTUITION_INTUITION_H 11 # include <intuition/intuition.h> 12 #endif 13 14 #ifndef UTILITY_TAGITEM_H 15 # include <utility/tagitem.h> 16 #endif 17 18 #pragma pack(2) 19 20 21 #define GA_Dummy (TAG_USER + 0x30000) 22 #define GA_Left (GA_Dummy + 1) 23 #define GA_RelRight (GA_Dummy + 2) 24 #define GA_Top (GA_Dummy + 3) 25 #define GA_RelBottom (GA_Dummy + 4) 26 #define GA_Width (GA_Dummy + 5) 27 #define GA_RelWidth (GA_Dummy + 6) 28 #define GA_Height (GA_Dummy + 7) 29 #define GA_RelHeight (GA_Dummy + 8) 30 #define GA_Text (GA_Dummy + 9) 31 #define GA_Image (GA_Dummy + 10) 32 #define GA_Border (GA_Dummy + 11) 33 #define GA_SelectRender (GA_Dummy + 12) 34 #define GA_Highlight (GA_Dummy + 13) 35 #define GA_Disabled (GA_Dummy + 14) 36 #define GA_GZZGadget (GA_Dummy + 15) 37 #define GA_ID (GA_Dummy + 16) 38 #define GA_UserData (GA_Dummy + 17) 39 #define GA_SpecialInfo (GA_Dummy + 18) 40 #define GA_Selected (GA_Dummy + 19) 41 #define GA_EndGadget (GA_Dummy + 20) 42 #define GA_Immediate (GA_Dummy + 21) 43 #define GA_RelVerify (GA_Dummy + 22) 44 #define GA_FollowMouse (GA_Dummy + 23) 45 #define GA_RightBorder (GA_Dummy + 24) 46 #define GA_LeftBorder (GA_Dummy + 25) 47 #define GA_TopBorder (GA_Dummy + 26) 48 #define GA_BottomBorder (GA_Dummy + 27) 49 #define GA_ToggleSelect (GA_Dummy + 28) 50 #define GA_SysGadget (GA_Dummy + 29) 51 #define GA_SysGType (GA_Dummy + 30) 52 #define GA_Previous (GA_Dummy + 31) 53 #define GA_Next (GA_Dummy + 32) 54 #define GA_DrawInfo (GA_Dummy + 33) 55 #define GA_IntuiText (GA_Dummy + 34) 56 #define GA_LabelImage (GA_Dummy + 35) 57 #define GA_TabCycle (GA_Dummy + 36) 58 #define GA_GadgetHelp (GA_Dummy + 37) 59 #define GA_Bounds (GA_Dummy + 38) 60 #define GA_RelSpecial (GA_Dummy + 39) 61 62 /*** V42 ***/ 63 64 #define GA_TextAttr (GA_Dummy + 40) 65 #define GA_ReadOnly (GA_Dummy + 41) 66 67 /*** V44 ***/ 68 69 #define GA_Underscore (GA_Dummy + 42) 70 #define GA_ActivateKey (GA_Dummy + 43) 71 #define GA_BackFill (GA_Dummy + 44) 72 #define GA_GadgetHelpText (GA_Dummy + 45) 73 #define GA_UserInput (GA_Dummy + 46) 74 75 /*** V50 ***/ 76 77 /* [I..] (LONG) Choose the placing of the label. GadgetClass does not support 78 this directly. Its subclasses have to take care of that. For possible 79 values see below. */ 80 #define GA_LabelPlace (GA_Dummy + 100) 81 82 #define GV_LabelPlace_In 1 83 #define GV_LabelPlace_Left 2 84 #define GV_LabelPlace_Right 3 85 #define GV_LabelPlace_Above 4 86 #define GV_LabelPlace_Below 5 87 88 89 #define PGA_Dummy (TAG_USER + 0x31000) 90 #define PGA_Freedom (PGA_Dummy + 1) 91 #define PGA_Borderless (PGA_Dummy + 2) 92 #define PGA_HorizPot (PGA_Dummy + 3) 93 #define PGA_HorizBody (PGA_Dummy + 4) 94 #define PGA_VertPot (PGA_Dummy + 5) 95 #define PGA_VertBody (PGA_Dummy + 6) 96 #define PGA_Total (PGA_Dummy + 7) 97 #define PGA_Visible (PGA_Dummy + 8) 98 #define PGA_Top (PGA_Dummy + 9) 99 #define PGA_NewLook (PGA_Dummy + 10) 100 101 /*** V50 ***/ 102 103 /* [I] (UWORD) If set to PG_BEHAVIOUR_NICE OM_NOTIFY messages are sent 104 also during OM_SET/OM_UPDATE, not just when user drags the knob, 105 which is the default behaviour (PG_BEHAVIOUR_COMPATIBLE) */ 106 #define PGA_NotifyBehaviour (PGA_Dummy + 30) 107 108 /* [I] (UWORD) If set to PG_BEHAVIOUR_NICE the gadget is re-rendered 109 during OM_SET/OM_UPDATE even when being a subclass of propgclass. 110 The default behaviour (PG_BEHAVIOUR_COMPATIBLE) is that subclasses 111 of propgclass don't render in OM_SET/OM_UPDATE */ 112 #define PGA_RenderBehaviour (PGA_Dummy + 31) 113 114 #define PG_BEHAVIOUR_COMPATIBLE 0 115 #define PG_BEHAVIOUR_NICE 1 116 117 118 #define STRINGA_Dummy (TAG_USER + 0x32000) 119 #define STRINGA_MaxChars (STRINGA_Dummy + 1) 120 #define STRINGA_Buffer (STRINGA_Dummy + 2) 121 #define STRINGA_UndoBuffer (STRINGA_Dummy + 3) 122 #define STRINGA_WorkBuffer (STRINGA_Dummy + 4) 123 #define STRINGA_BufferPos (STRINGA_Dummy + 5) 124 #define STRINGA_DispPos (STRINGA_Dummy + 6) 125 #define STRINGA_AltKeyMap (STRINGA_Dummy + 7) 126 #define STRINGA_Font (STRINGA_Dummy + 8) 127 #define STRINGA_Pens (STRINGA_Dummy + 9) 128 #define STRINGA_ActivePens (STRINGA_Dummy + 10) 129 #define STRINGA_EditHook (STRINGA_Dummy + 11) 130 #define STRINGA_EditModes (STRINGA_Dummy + 12) 131 132 #define STRINGA_ReplaceMode (STRINGA_Dummy + 13) 133 #define STRINGA_FixedFieldMode (STRINGA_Dummy + 14) 134 #define STRINGA_NoFilterMode (STRINGA_Dummy + 15) 135 136 #define STRINGA_Justification (STRINGA_Dummy + 16) 137 #define STRINGA_LongVal (STRINGA_Dummy + 17) 138 #define STRINGA_TextVal (STRINGA_Dummy + 18) 139 140 #define STRINGA_ExitHelp (STRINGA_Dummy + 19) 141 142 #define STRINGA_InvisibleTextOk (STRINGA_Dummy + 500) 143 144 #define SG_DEFAULTMAXCHARS (128) 145 146 147 #define LAYOUTA_Dummy (TAG_USER + 0x38000) 148 #define LAYOUTA_LayoutObj (LAYOUTA_Dummy + 1) 149 #define LAYOUTA_Spacing (LAYOUTA_Dummy + 2) 150 #define LAYOUTA_Orientation (LAYOUTA_Dummy + 3) 151 152 /*** V42 ***/ 153 154 #define LAYOUTA_ChildMaxWidth (LAYOUTA_Dummy + 4) 155 #define LAYOUTA_ChildMaxHeight (LAYOUTA_Dummy + 5) 156 157 158 #define LORIENT_NONE 0 159 #define LORIENT_HORIZ 1 160 #define LORIENT_VERT 2 161 162 163 #define GM_Dummy (-1) 164 #define GM_HITTEST (0) 165 #define GM_RENDER (1) 166 #define GM_GOACTIVE (2) 167 #define GM_HANDLEINPUT (3) 168 #define GM_GOINACTIVE (4) 169 #define GM_HELPTEST (5) 170 #define GM_LAYOUT (6) 171 #define GM_DOMAIN (7) 172 #define GM_KEYTEST (8) 173 #define GM_KEYGOACTIVE (9) 174 #define GM_KEYGOINACTIVE (10) 175 176 177 struct gpHitTest 178 { 179 ULONG MethodID; 180 struct GadgetInfo *gpht_GInfo; 181 182 struct 183 { 184 WORD X; 185 WORD Y; 186 } gpht_Mouse; 187 }; 188 189 190 #define GMR_GADGETHIT (0x00000004) 191 #define GMR_NOHELPHIT (0x00000000) 192 #define GMR_HELPHIT (0xFFFFFFFF) 193 #define GMR_HELPCODE (0x00010000) 194 195 196 struct gpRender 197 { 198 ULONG MethodID; 199 struct GadgetInfo *gpr_GInfo; 200 struct RastPort *gpr_RPort; 201 LONG gpr_Redraw; 202 }; 203 204 #define GREDRAW_UPDATE (2) 205 #define GREDRAW_REDRAW (1) 206 #define GREDRAW_TOGGLE (0) 207 208 209 struct gpInput 210 { 211 ULONG MethodID; 212 struct GadgetInfo *gpi_GInfo; 213 struct InputEvent *gpi_IEvent; 214 LONG *gpi_Termination; 215 216 struct 217 { 218 WORD X; 219 WORD Y; 220 } gpi_Mouse; 221 222 struct TabletData *gpi_TabletData; 223 }; 224 225 #define GMR_MEACTIVE (0) 226 #define GMR_NOREUSE (1<<1) 227 #define GMR_REUSE (1<<2) 228 #define GMR_VERIFY (1<<3) 229 230 #define GMR_NEXTACTIVE (1<<4) 231 #define GMR_PREVACTIVE (1<<5) 232 233 234 struct gpGoInactive 235 { 236 ULONG MethodID; 237 struct GadgetInfo *gpgi_GInfo; 238 239 ULONG gpgi_Abort; 240 }; 241 242 243 struct gpLayout 244 { 245 ULONG MethodID; 246 struct GadgetInfo *gpl_GInfo; 247 ULONG gpl_Initial; 248 }; 249 250 251 struct gpDomain 252 { 253 ULONG MethodID; 254 struct GadgetInfo *gpd_GInfo; 255 struct RastPort *gpd_RPort; 256 LONG gpd_Which; 257 struct IBox gpd_Domain; 258 struct TagItem *gpd_Attrs; 259 }; 260 261 #define GDOMAIN_MINIMUM (0) 262 #define GDOMAIN_NOMINAL (1) 263 #define GDOMAIN_MAXIMUM (2) 264 265 266 struct gpKeyTest 267 { 268 ULONG MethodID; 269 struct GadgetInfo *gpkt_GInfo; 270 struct IntuiMessage *gpkt_IMsg; 271 ULONG gpkt_VanillaKey; 272 }; 273 274 275 struct gpKeyInput 276 { 277 ULONG MethodID; 278 struct GadgetInfo *gpk_GInfo; 279 struct InputEvent *gpk_IEvent; 280 LONG *gpk_Termination; 281 }; 282 283 #define GMR_KEYACTIVE (1<<4) 284 #define GMR_KEYVERIFY (1<<5) 285 286 287 struct gpKeyGoInactive 288 { 289 ULONG MethodID; 290 struct GadgetInfo *gpki_GInfo; 291 ULONG gpki_Abort; 292 }; 293 294 295 #pragma pack() 296 297 #ifndef INTUITION_IOBSOLETE_H 298 # include <intuition/iobsolete.h> 299 #endif 300 301 #endif /* INTUITION_GADGETCLASS_H */