intuition.pas 184 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2014 by Free Pascal development team
  4. intuition.library functions
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. unit Intuition;
  12. {$define INTUI_V36_NAMES_ONLY}
  13. interface
  14. uses
  15. Exec, Utility, AGraphics, InputEvent, Timer, Layers, Keymap;
  16. type
  17. { IntuiText is a series of strings that start with a screen location
  18. (always relative to the upper-left corner of something) and then the
  19. text of the string. The text is null-terminated.}
  20. PIntuiText = ^TIntuiText;
  21. TIntuiText = record
  22. FrontPen,
  23. BackPen: Byte; // the pen numbers for the rendering
  24. DrawMode: Byte; // the mode for rendering the text
  25. LeftEdge: SmallInt; // relative start location for the text
  26. TopEdge: SmallInt; // relative start location for the text
  27. ITextFont: PTextAttr; // if nil, you accept the default
  28. IText: PChar; // pointer to null-terminated text
  29. NextText: PIntuiText; // continuation to TxWrite another text
  30. end;
  31. PStringExtend = ^TStringExtend;
  32. TStringExtend = record
  33. // display specifications
  34. Font: PTextFont; // must be an open Font (not TextAttr)
  35. Pens: array[0..1] of Byte; // color of text/background
  36. ActivePens: array[0..1] of Byte; // colors when gadget is active
  37. // edit specifications
  38. InitialModes: LongWord; // initial mode flags, below
  39. EditHook: PHook; // IF non-nil, must supply WorkBuffer
  40. WorkBuffer: STRPTR; // must be as large as StringInfo.Buffer
  41. Reserved: array[0..3] of LongWord; // set to 0
  42. end;
  43. { Data type Border, used for drawing a series of lines which is intended for use as a border drawing, but which may, in fact, be used to render any
  44. arbitrary vector shape. The routine DrawBorder sets up the RastPort with the appropriate variables, then does a Move to the first coordinate, then does Draws
  45. to the subsequent coordinates. After all the Draws are done, if NextBorder is non-zero we call DrawBorder recursively}
  46. type
  47. PBorder = ^TBorder;
  48. TBorder = record
  49. LeftEdge,
  50. TopEdge: SmallInt; // initial offsets from the origin
  51. FrontPen,
  52. BackPen: Byte; // pens numbers for rendering
  53. DrawMode: Byte; // mode for rendering
  54. Count: ShortInt; // number of XY pairs
  55. XY: PSmallInt; // vector coordinate pairs rel to LeftTop
  56. NextBorder: PBorder; // pointer to any other Border too
  57. end;
  58. type
  59. PMenuItem = ^TMenuItem;
  60. TMenuItem = record
  61. NextItem: PMenuItem; // pointer to next in chained list
  62. LeftEdge,
  63. TopEdge: SmallInt; // position of the select box
  64. Width,
  65. Height: SmallInt; // dimensions of the select box
  66. Flags: Word; // see the defines below
  67. MutualExclude: LongInt; // set bits mean this item excludes that
  68. ItemFill: APTR; // points to Image, IntuiText, or nil
  69. SelectFill: APTR; // points to Image, IntuiText, or nil when this item is pointed to by the cursor and the items highlight mode HIGHIMAGE is selected, this alternate image will be displayed
  70. Command: Char; // only if appliprog sets the COMMSEQ flag
  71. SubItem: PMenuItem; // if non-nil, DrawMenu shows "->"
  72. NextSelect: Word; // The NextSelect field represents the menu number of next selected item (when user has drag-selected several items)
  73. end;
  74. const
  75. // Flags set by the Application
  76. CHECKIT = 1 shl 0; // whether to check this item if selected
  77. ITEMTEXT = 1 shl 1; // set if textual, clear if graphical item
  78. COMMSEQ = 1 shl 2; // set if there's an command sequence
  79. MENUTOGGLE = 1 shl 3; // set to toggle the check of a menu item
  80. ITEMENABLED = 1 shl 4; // set if this item is enabled
  81. // these are the SPECIAL HIGHLIGHT FLAG state meanings
  82. HIGHIMAGE = $0000; // use the user's "select image"
  83. HIGHCOMP = 1 shl 6; // highlight by complementing the selectbox
  84. HIGHBOX = 1 shl 7; // highlight by "boxing" the selectbox
  85. HIGHFLAGS = $00C0; // see definitions below for these bits
  86. HIGHNONE = $00C0; // don't highlight
  87. // Flags set by both Application and intuition
  88. Checked = 1 shl 8; // if CHECKIT, then set this when selected
  89. // Flags set by Intuition (Read Only)
  90. ISDRAWN = 1 shl 12; // this item's subs are currently drawn
  91. HIGHITEM = 1 shl 13; // this item is currently highlighted
  92. MENUTOGGLED = 1 shl 14; // this item was already toggled
  93. NOMENU = $001F;
  94. NOITEM = $003F;
  95. NOSUB = $001F;
  96. MENUNULL = $FFFF;
  97. { these defines are for the COMMSEQ and CHECKIT menu stuff. If CHECKIT,
  98. I'll use a generic Width (for all resolutions) for the CheckMark.
  99. If COMMSEQ, likewise I'll use this generic stuff}
  100. CHECKWIDTH = 19;
  101. LOWCHECKWIDTH = 13;
  102. COMMWIDTH = 27;
  103. LOWCOMMWIDTH = 16;
  104. type
  105. PMenu = ^TMenu;
  106. TMenu = record
  107. NextMenu: PMenu; // same level
  108. LeftEdge,
  109. TopEdge: SmallInt; // position of the select box
  110. Width,
  111. Height: SmallInt; // dimensions of the select box
  112. Flags: Word; // see flag definitions below (MENUENABLED, MIDRAWN)
  113. MenuName: PChar; // text for this Menu Header
  114. FirstItem: PMenuItem; // pointer to first in chain
  115. JazzX, // these mysteriously-named variables are for internal use only
  116. JazzY,
  117. BeatX,
  118. BeatY: SmallInt;
  119. end;
  120. const
  121. // FLAGS SET BY BOTH THE APPLIPROG AND INTUITION
  122. MENUENABLED = 1 shl 0; // whether or not this menu is enabled
  123. // FLAGS SET BY INTUITION }
  124. MIDRAWN = 1 shl 8; // this menu's items are currently drawn
  125. type
  126. PGadget = ^TGadget;
  127. TGadget = record
  128. NextGadget: PGadget; // next gadget in the list
  129. LeftEdge,
  130. TopEdge: SmallInt; // "hit box" of gadget
  131. Width,
  132. Height: SmallInt; // "hit box" of gadget
  133. Flags: Word; // see below for list of defines GFLG_*
  134. Activation: Word; // see below for list of defines GACT_*
  135. GadgetType: Word; // see below for defines GTYP_*
  136. GadgetRender: APTR; // appliprog can specify that the Gadget be rendered as either as Border
  137. // or an Image. This variable points to which (or equals nil if there's nothing to be rendered about this Gadget)
  138. SelectRender: APTR; // appliprog can specify "highlighted" imagery rather than algorithmic this can point to either Border or Image data
  139. GadgetText: PIntuiText; // text for this gadget
  140. MutualExclude: IPTR; // obsolete
  141. SpecialInfo: APTR; // pointer to a structure of special data required by Proportional, String and LongInt Gadgets
  142. GadgetID: Word; // user-definable ID field
  143. UserData: APTR; // ptr to general purpose User data (ignored by In)
  144. end;
  145. PExtGadget = ^TExtGadget;
  146. TExtGadget = record
  147. // The first fields match struct Gadget exactly
  148. NextGadget: PExtGadget; // Matches struct Gadget
  149. LeftEdge, TopEdge, // Matches struct Gadget
  150. Width, Height: SmallInt; // Matches struct Gadget
  151. Flags, // Matches struct Gadget
  152. Activation, // Matches struct Gadget
  153. GadgetType: Word; // Matches struct Gadget
  154. GadgetRender, // Matches struct Gadget
  155. SelectRender: APTR; // Matches struct Gadget
  156. GadgetText: PIntuiText; // Matches struct Gadget
  157. MutualExclude: IPTR; // Matches struct Gadget
  158. SpecialInfo: APTR; // Matches struct Gadget
  159. GadgetID: Word; // Matches struct Gadget
  160. UserData: APTR; // Matches struct Gadget
  161. // These fields only exist if GFLG_EXTENDED is set
  162. MoreFlags: LongWord; // see GMORE_* flags below
  163. BoundsLeftEdge, // Bounding extent for gadget, valid
  164. BoundsTopEdge, // only if GMORE_BOUNDS is set. The
  165. BoundsWidth, // GFLG_RELxxx flags affect these
  166. BoundsHeight: SmallInt; // coordinates as well.
  167. end;
  168. const
  169. // Gadget.Flags values
  170. // combinations in these bits describe the highlight technique to be used
  171. GFLG_GADGHCOMP = $0000; // Complement the select box
  172. GFLG_GADGHBOX = 1 shl 0; // Draw a box around the image
  173. GFLG_GADGHIMAGE = 1 shl 1; // Blast in this alternate image
  174. GFLG_GADGHNONE = $0003; // don't highlight
  175. GFLG_GADGHIGHBITS = $0003;
  176. GFLG_GADGIMAGE = 1 shl 2; // set IF GadgetRender AND SelectRender point to an Image structure, clear if they point to Border structures
  177. { combinations in these next two bits specify to which corner the gadget's Left & Top coordinates are relative. If relative to Top/Left,
  178. these are "normal" coordinates (everything is relative to something in this universe).
  179. Gadget positions and dimensions are relative to the window or requester which contains the gadget}
  180. GFLG_RELBOTTOM = 1 shl 3; // vert. pos. is relative to bottom edge
  181. GFLG_RELRIGHT = 1 shl 4; // horiz. pos. is relative to right edge
  182. GFLG_RELWIDTH = 1 shl 5; // width is relative to req/window
  183. GFLG_RELHEIGHT = 1 shl 6; // height is relative to req/window
  184. GFLG_SELECTED = 1 shl 7; // you may initialize AND look at this
  185. GFLG_DISABLED = 1 shl 8; // the GFLG_DISABLED flag is initialized by you and later set by Intuition according to your calls to On/OffGadget(). It specifies whether or not this Gadget is currently disabled from being selected
  186. GFLG_TABCYCLE = 1 shl 9; // (string OR custom) gadget participates in cycling activation with Tab or Shift-Tab
  187. GFLG_STRINGEXTEND = 1 shl 10; // this String Gadget has StringExtend
  188. GFLG_IMAGEDISABLE = 1 shl 11; // Gadget's image knows how to do disabled rendering
  189. GFLG_LABELITEXT = $0000; // GadgetText points to IntuiText
  190. GFLG_LABELSTRING = 1 shl 12; // GadgetText points to (PChar)
  191. GFLG_LABELIMAGE = 1 shl 13; // GadgetText points to Image (object)
  192. GFLG_LABELMASK = $3000;
  193. GFLG_RELSPECIAL = 1 shl 14; // custom gadget has special relativity. Gadget box values are absolutes, but can be changed via the GM_LAYOUT method.
  194. GFLG_EXTENDED = 1 shl 15; // Gadget is extended
  195. {GFLG_RELSPECIAL allows custom gadget implementors to
  196. make gadgets whose position and size depend in an arbitrary way
  197. on their window's dimensions. The GM_LAYOUT method will be invoked
  198. for such a gadget (or any other GREL_xxx gadget) at suitable times,
  199. such as when the window opens or the window's size changes.
  200. GFLG_STRINGEXTEND. We discovered that V34 doesn't properly
  201. ignore the value we had chosen for the Gadget->Activation flag
  202. GACT_STRINGEXTEND. NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  203. The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  204. safe under V34, and equivalent to GACT_STRINGEXTEND under V37.
  205. (Note that the two flags are not numerically equal)
  206. GFLG_IMAGEDISABLE. This flag is automatically set if
  207. the custom image of this gadget knows how to do disabled rendering
  208. (more specifically, if its IA_SupportsDisable attribute is TRUE).
  209. Intuition uses this to defer the ghosting to the image-class,
  210. instead of doing it itself (the old compatible way).
  211. Do not set this flag yourself - Intuition will do it for you.
  212. GFLG_EXTENDED. If set, this bit means that the Gadget is actually
  213. a struct ExtGadget, with new fields and flags. All V39 boopsi
  214. gadgets are ExtGadgets. Never ever attempt to read the extended
  215. fields of a gadget if this flag is not set.
  216. GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive
  217. reports on mouse movements while this gadget is active.
  218. You probably want to set the GACT_IMMEDIATE flag when using
  219. GACT_FOLLOWMOUSE, since that's the only reasonable way you have of
  220. learning why Intuition is suddenly sending you a stream of mouse
  221. movement events. If you don't set GACT_RELVERIFY, you'll get at
  222. least one Mouse Position event.
  223. }
  224. // Gadget.Activation flag values
  225. GACT_RELVERIFY = 1 shl 0; // Set if you want to verify that the pointer was still over the gadget when the select button was released. Will cause an IDCMP_GADGETUP message to be sent if so.
  226. GACT_IMMEDIATE = 1 shl 1; // when set, informs the caller that the gadget was activated when it was activated. This flag works in conjunction with the GACT_RELVERIFY flag
  227. GACT_ENDGADGET = 1 shl 2; // when set, tells the system that this gadget, when selected, causes the Requester to be ended. Requesters that are ended are erased and unlinked from the system.
  228. GACT_FOLLOWMOUSE = 1 shl 3;
  229. // if any of the BORDER flags are set in a Gadget that's included in the Gadget list when a Window is opened, the corresponding Border will be adjusted to make room for the Gadget
  230. GACT_RIGHTBORDER = 1 shl 4;
  231. GACT_LEFTBORDER = 1 shl 5;
  232. GACT_TOPBORDER = 1 shl 6;
  233. GACT_BOTTOMBORDER = 1 shl 7;
  234. GACT_TOGGLESELECT = 1 shl 8; // this bit for toggle-select mode
  235. // should properly be in StringInfo, but aren't
  236. GACT_STRINGLEFT = $0000; // NOTE WELL: that this has value zero
  237. GACT_STRINGCENTER = 1 shl 9;
  238. GACT_STRINGRIGHT = 1 shl 10;
  239. GACT_LONGINT = 1 shl 11; // this String Gadget is for Long Ints
  240. GACT_ALTKEYMAP = 1 shl 12; // this String has an alternate keymap
  241. GACT_STRINGEXTEND = 1 shl 13; // this String Gadget has StringExtend NOTE: NEVER SET GACT_STRINGEXTEND IF YOU ARE RUNNING ON LESS THAN V36! SEE GFLG_STRINGEXTEND (ABOVE) INSTEAD
  242. GACT_BOOLEXTEND = 1 shl 13; // this Boolean Gadget has a BoolInfo
  243. GACT_ACTIVEGADGET = 1 shl 14; // this gadget is "active". This flag is maintained by Intuition, and you cannot count on its value persisting
  244. // while you do something on your program's task. It can only be trusted by people implementing custom gadgets
  245. GACT_BORDERSNIFF = 1 shl 15; // neither set nor rely on this bit
  246. // GADGET TYPES
  247. {These are the Gadget type definitions for the variable GadgetType
  248. gadget number type MUST start from one. NO TYPES OF ZERO ALLOWED.
  249. first comes the mask for Gadget flags reserved for Gadget typing}
  250. GTYP_GADGETTYPE = $FC00; // all Gadget Global type flags (padded)
  251. GTYP_SYSTYPEMASK = $00F0;
  252. // system gadgets
  253. GTYP_SIZING = $0010;
  254. GTYP_WDRAGGING = $0020;
  255. GTYP_SDRAGGING = $0030;
  256. GTYP_WDEPTH = $0040;
  257. GTYP_SDEPTH = $0050;
  258. GTYP_WZOOM = $0060;
  259. GTYP_SUNUSED = $0070;
  260. GTYP_CLOSE = $0080;
  261. // application gadgets
  262. GTYP_REQGADGET = 1 shl 12; // 1 = this is a Requester Gadget
  263. GTYP_GZZGADGET = 1 shl 13; // 1 = for WFLG_GIMMEZEROZERO borders
  264. GTYP_SCRGADGET = 1 shl 14; // 1 = ScreenGadget, 0 = WindowGadget
  265. GTYP_SYSGADGET = 1 shl 15; // 1 = Allocated by the system, 0 = by app.
  266. GTYP_BOOLGADGET = $0001;
  267. GTYP_GADGET0002 = $0002;
  268. GTYP_PROPGADGET = $0003;
  269. GTYP_STRGADGET = $0004;
  270. GTYP_CUSTOMGADGET = $0005;
  271. GTYP_GTYPEMASK = $0007; //mask you can apply to tell what class of gadget this is. The possible classes follow.
  272. { Gadgets which have the GFLG_EXTENDED flag set are
  273. * actually ExtGadgets, which have more flags. The GMORE_xxx
  274. * identifiers describe those flags. For GMORE_SCROLLRASTER, see
  275. * important information in the ScrollWindowRaster() autodoc.
  276. * NB: GMORE_SCROLLRASTER must be set before the gadget is
  277. * added to a window.
  278. }
  279. GMORE_BOUNDS = 1 shl 0; // ExtGadget has valid Bounds
  280. GMORE_GADGETHELP = 1 shl 1; // This gadget responds to gadget help
  281. GMORE_SCROLLRASTER = 1 shl 2; // This (custom) gadget uses ScrollRaster
  282. GMORE_BOOPSIGADGET = 1 shl 3; // some internal boopsi classes changes the gadget type during execution (ie propgclass), so GTYP_CUSTOMGADGET doesn´t work (dariusb)
  283. type
  284. // Bool Gadget This is the special data needed by an Extended Boolean Gadget Typically this structure will be pointed to by the Gadget field SpecialInfo
  285. PBoolInfo = ^TBoolInfo;
  286. TBoolInfo = record
  287. Flags: Word; // defined below (BOOLMASK)
  288. Mask: PWord; // bit mask for highlighting and selecting mask must follow the same rules as an Image
  289. // plane. It's width and height are determined by the width and height of the gadget's select box. (i.e. Gadget.Width and .Height).
  290. Reserved: LongWord; // set to 0
  291. end;
  292. const
  293. // set BoolInfo.Flags to this flag bit. in the future, additional bits might mean more stuff hanging off of BoolInfo.Reserved.
  294. BOOLMASK = 1 shl 0; // extension is for masked gadget
  295. type
  296. // Proportional Gadget this is the special data required by the proportional Gadget typically, this data will be pointed to by the Gadget variable SpecialInfo
  297. PPropInfo = ^TPropInfo;
  298. TPropInfo = record
  299. Flags: Word; // general purpose flag bits (see defines below)
  300. { You initialize the Pot variables before the Gadget is added to
  301. the system. Then you can look here for the current settings
  302. any time, even while User is playing with this Gadget. To
  303. adjust these after the Gadget is added to the System, use
  304. ModifyProp(); The Pots are the actual proportional settings,
  305. where a value of zero means zero and a value of MAXPOT means
  306. that the Gadget is set to its maximum setting.}
  307. HorizPot: Word; // 16-bit FixedPoint horizontal quantity percentage
  308. VertPot: Word; // 16-bit FixedPoint vertical quantity percentage
  309. { the 16-bit FixedPoint Body variables describe what percentage of
  310. the entire body of stuff referred to by this Gadget is actually
  311. shown at one time. This is used with the AUTOKNOB routines,
  312. to adjust the size of the AUTOKNOB according to how much of
  313. the data can be seen. This is also used to decide how far
  314. to advance the Pots when User hits the Container of the Gadget.
  315. For instance, if you were controlling the display of a 5-line
  316. Window of text with this Gadget, and there was a total of 15
  317. lines that could be displayed, you would set the VertBody value to
  318. (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  319. Therefore, the AUTOKNOB would fill 1/3 of the container, and
  320. if User hits the Cotainer outside of the knob, the pot would
  321. advance 1/3 (plus or minus) If there's no body to show, or
  322. the total amount of displayable info is less than the display area,
  323. set the Body variables to the MAX. To adjust these after the
  324. Gadget is added to the System, use ModifyProp();}
  325. HorizBody: Word; // horizontal Body
  326. VertBody: Word; // vertical Body
  327. // these are the variables that Intuition sets and maintains
  328. CWidth: Word; // Container width (with any relativity absoluted)
  329. CHeight: Word; // Container height (with any relativity absoluted)
  330. HPotRes,
  331. VPotRes: Word; // pot increments
  332. LeftBorder: Word; // Container borders
  333. TopBorder: Word; // Container borders
  334. end;
  335. const
  336. // Flags BITS
  337. AUTOKNOB = 1 shl 0; // this flag sez: gimme that old auto-knob NOTE: if you do not use an AUTOKNOB for a proportional gadget,
  338. // you are currently limited to using a single Image of your own design: Intuition won't handle a linked list
  339. // of images as a proportional gadget knob.
  340. FREEHORIZ = 1 shl 1; // IF set, the knob can move horizontally
  341. FREEVERT = 1 shl 2; // IF set, the knob can move vertically
  342. PROPBORDERLESS = 1 shl 3; // IF set, no border will be rendered
  343. KNOBHIT = 1 shl 8; // set when this Knob is hit
  344. PROPNEWLOOK = 1 shl 4; // set this IF you want to get the new look
  345. KNOBHMIN = 6; // minimum horizontal size of the Knob
  346. KNOBVMIN = 4; // minimum vertical size of the Knob
  347. MAXBODY = $FFFF; // maximum body value
  348. MAXPOT = $FFFF; // maximum pot value
  349. type
  350. // StringInfo this is the special data required by the string Gadget typically, this data will be pointed to by the Gadget variable SpecialInfo
  351. PStringInfo = ^TStringInfo;
  352. TStringInfo = record
  353. // you initialize these variables, and then Intuition maintains them
  354. Buffer: PChar; // the buffer containing the start and final string
  355. UndoBuffer: PChar; // optional buffer for undoing current entry
  356. BufferPos: SmallInt; // character position in Buffer
  357. MaxChars: SmallInt; // max number of chars in Buffer (including #0)
  358. DispPos: SmallInt; // Buffer position of first displayed character
  359. // Intuition initializes and maintains these variables for you
  360. UndoPos: SmallInt; // character position in the undo buffer
  361. NumChars: SmallInt; // number of characters currently in Buffer
  362. DispCount: SmallInt; // number of whole characters visible in Container
  363. CLeft,
  364. CTop: SmallInt; // topleft offset of the container
  365. { you can initialize this variable before the gadget is submitted to
  366. Intuition, and then examine it later to discover what LongInt
  367. the user has entered (if the user never plays with the gadget,
  368. the value will be unchanged from your initial setting)}
  369. Extension: PStringExtend;
  370. _LongInt: LongInt;
  371. { If you want this Gadget to use your own Console keymapping, you
  372. set the ALTKEYMAP bit in the Activation flags of the Gadget, and then
  373. set this variable to point to your keymap. If you don't set the
  374. ALTKEYMAP, you'll get the standard ASCII keymapping.}
  375. AltKeyMap: PKeymap;
  376. end;
  377. type
  378. PImage = ^TImage;
  379. PWindow = ^TWindow;
  380. PScreen = ^TScreen;
  381. // Requesters The following struct is used for standard intuition requesters (not to be mixed up with asl or easy requesters). See intuition.library/Request() for more information.
  382. PRequester = ^TRequester;
  383. TRequester = record
  384. // the ClipRect and BitMap and used for rendering the requester
  385. OlderRequest: PRequester;
  386. LeftEdge,
  387. TopEdge: SmallInt; // dimensions of the entire box
  388. Width,
  389. Height: SmallInt; // dimensions of the entire box
  390. RelLeft,
  391. RelTop: SmallInt; // for Pointer relativity offsets
  392. ReqGadget: PGadget; // First gadget of the requester
  393. ReqBorder: PBorder; // First border of the requester
  394. ReqText: PIntuiText; // First intuitext of the requester
  395. Flags: Word; // see definitions below
  396. BackFill: Byte; // pen number for back-plane fill before draws
  397. ReqLayer: PLayer; // Layer in place of clip rect
  398. ReqPad1: array [0..31] of Byte; // Private
  399. { If the BitMap plane pointers are non-zero, this tells the system
  400. that the image comes pre-drawn (if the appliprog wants to define
  401. it's own box, in any shape or size it wants!); this is OK by
  402. Intuition as long as there's a good correspondence between
  403. the image and the specified Gadgets}
  404. ImageBMap: PBitMap; // you may use this to fill the requester with your own image
  405. RWindow: PWindow; // window, which the requester belongs to
  406. ReqImage: PImage; // corresponds to USEREQIMAGE (see below)
  407. ReqPad2: array[0..31] of ShortInt; // PRIVATE
  408. end;
  409. { The Timage.PlanePick and PlaneOnOff variables work much the same way as the equivalent GELS Bob variables. It's a space-saving
  410. mechanism for image data. Rather than defining the image data for every plane of the RastPort, you need define data only
  411. for the planes that are not entirely zero or one. As you define your Imagery, you will often find that most of the planes
  412. ARE just as color selectors. For instance, if you're designing a two-color Gadget to use colors two and three, and the Gadget
  413. will reside in a five-plane display, bit plane zero of your imagery would be all ones, bit plane one would have data that
  414. describes the imagery, and bit planes two through four would be all zeroes. Using these flags allows you to avoid wasting all
  415. that memory in this way: first, you specify which planes you want your data to appear in using the PlanePick variable. For
  416. each bit set in the variable, the next "plane" of your image data is blitted to the display. For each bit clear in this
  417. variable, the corresponding bit in PlaneOnOff is examined. If that bit is clear, a "plane" of zeroes will be used.
  418. If the bit is set, ones will go out instead. So, for our example:
  419. Gadget.PlanePick = $02;
  420. Gadget.PlaneOnOff = $01;
  421. Note that this also allows for generic Gadgets, like the System Gadgets, which will work in any number of bit planes.
  422. Note also that if you want an Image that is only a filled rectangle, you can get this by setting PlanePick to zero
  423. (pick no planes of data) and set PlaneOnOff to describe the pen color of the rectangle.}
  424. // This is a brief image structure for very simple transfers of image data to a RastPort
  425. TImage = record
  426. LeftEdge: SmallInt; // starting offset relative to some origin
  427. TopEdge: SmallInt; // starting offsets relative to some origin
  428. Width: SmallInt; // pixel size (though data is Word-aligned)
  429. Height: SmallInt;
  430. Depth: SmallInt; // pixel sizes
  431. ImageData: PWord; // pointer to the actual Word-aligned bits
  432. PlanePick,
  433. PlaneOnOff: Byte;
  434. NextImage: PImage; // if not nil, Intuition presumes that it points to another Image structure with another Image to be rendered
  435. end;
  436. { If your window sets WA_TabletMessages to TRUE, then it will receive extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData
  437. field points at a TabletData structure. This structure contains additional information about the input event.}
  438. PTabletData = ^TTabletData;
  439. TTabletData = record
  440. td_XFraction, // Sub-pixel position of tablet, in screen coordinates, scaled to fill a Word fraction:
  441. td_YFraction: Word;
  442. td_TabletX,
  443. td_TabletY: LongWord; // Current tablet coordinates along each axis
  444. td_RangeX,
  445. td_RangeY: LongWord; // Tablet range along each axis. For example, if td_TabletX can take values 0-999, td_RangeX should be 1000.
  446. td_TagList: PTagItem; // Pointer to tag-list of additional tablet attributes. TABLETA_*
  447. end;
  448. { If a tablet driver supplies a hook for ient_CallBack, it will be invoked in the standard hook manner. A0 will point to the Hook
  449. itself, A2 will point to the InputEvent that was sent, and A1 will point to a TabletHookData structure. The InputEvent's
  450. ie_EventAddress field points at the IENewTablet structure that the driver supplied.
  451. Based on the thd_Screen, thd_Width, and thd_Height fields, the driver should scale the ient_TabletX and ient_TabletY fields and store the
  452. result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and ient_ScaledYFraction.
  453. The tablet hook must currently return NULL. This is the only acceptable return-value.}
  454. PTabletHookData = ^TTabletHookData;
  455. TTabletHookData = record
  456. thd_Screen: PScreen; // Pointer to the active screen: Note: if there are no open screens, thd_Screen will be nil.
  457. thd_Width, // thd_Width and thd_Height will then describe an NTSC 64$400 screen. Please scale accordingly.
  458. thd_Height: LongWord; // The width and height (measured in pixels of the active screen)that your are to scale to:
  459. thd_ScreenChanged: LongInt; // Non-zero if the screen or something about the screen changed since the last time you were invoked:
  460. end;
  461. PIntuiMessage = ^TIntuiMessage;
  462. TIntuiMessage = record
  463. ExecMessage: TMessage;
  464. IClass: LongWord; // the Class bits correspond directly with the IDCMP Flags, except for the special bit LONELYMESSAGE (defined below)
  465. Code: Word; // the Code field is for special values like MENU number
  466. Qualifier: Word; // the Qualifier field is a copy of the current InputEvent's Qualifier
  467. IAddress: APTR; // IAddress contains particular addresses for Intuition functions, like the pointer to the Gadget or the Screen
  468. MouseX, // when getting mouse movement reports, any event you get will have the the mouse coordinates in these variables.
  469. MouseY: SmallInt; // the coordinates are relative to the upper-left corner of your Window (GIMMEZEROZERO notwithstanding)
  470. Seconds, // the time values are copies of the current system clock time.
  471. Micros: LongWord; // Micros are in units of microseconds, Seconds in seconds.
  472. IDCMPWindow: PWindow; // the IDCMPWindow variable will always have the Pointer of the Window of this IDCMP
  473. SpecialLink: PIntuiMessage; // system-use variable
  474. end;
  475. { All IntuiMessages are now slightly extended. The ExtIntuiMessage
  476. structure has an additional field for tablet data, which is usually
  477. nil. If a tablet driver which is sending IESUBCLASS_NEWTABLET
  478. events is installed in the system, windows with the WA_TabletMessages
  479. property set will find that eim_TabletData points to the TabletData
  480. structure. Applications must first check that this field is non-NULL;
  481. it will be nil for certain kinds of message, including mouse activity
  482. generated from other than the tablet (i.e. the keyboard equivalents
  483. or the mouse itself).
  484. NOTE: This structure is subject to grow in the future. Making
  485. assumptions about its size is A BAD IDEA.}
  486. PExtIntuiMessage = ^TExtIntuiMessage;
  487. TExtIntuiMessage = record
  488. eim_IntuiMessage: TIntuiMessage;
  489. eim_TabletData: PTabletData;
  490. end;
  491. // A data structure common in Intuition processing
  492. PIBox = ^TIBox;
  493. TIBox = record
  494. Left,
  495. Top,
  496. Width,
  497. Height: SmallInt;
  498. end;
  499. // Window
  500. TWindow = record
  501. NextWindow: PWindow; // for the linked list in a screen
  502. LeftEdge,
  503. TopEdge: SmallInt; // screen dimensions of window
  504. Width,
  505. Height: SmallInt; // screen dimensions of window
  506. {$ifdef AROS_BINCOMPAT}
  507. MouseY,
  508. MouseX: SmallInt; // relative to upper-left of window
  509. {$else}
  510. MouseX,
  511. MouseY: SmallInt; // relative to upper-left of window
  512. {$endif}
  513. MinWidth,
  514. MinHeight: SmallInt; // minimum sizes
  515. MaxWidth,
  516. MaxHeight: Word; // maximum sizes
  517. Flags: LongWord; // see below for defines
  518. MenuStrip: PMenu; // the strip of Menu headers
  519. Title: PChar; // the title text for this window
  520. FirstRequest: PRequester; // all active Requesters
  521. DMRequest: PRequester; // double-click Requester
  522. ReqCount: SmallInt; // count of reqs blocking Window
  523. WScreen: PScreen; // this Window's Screen
  524. RPort: PRastPort; { this Window's very own RastPort }
  525. { the border variables describe the window border. If you specify
  526. GIMMEZEROZERO when you open the window, then the upper-left of the
  527. ClipRect for this window will be upper-left of the BitMap (with correct
  528. offsets when in SuperBitMap mode; you MUST select GIMMEZEROZERO when
  529. using SuperBitMap). If you don't specify ZeroZero, then you save
  530. memory (no allocation of RastPort, Layer, ClipRect and associated
  531. Bitmaps), but you also must offset all your writes by BorderTop,
  532. BorderLeft and do your own mini-clipping to prevent writing over the
  533. system gadgets}
  534. BorderLeft,
  535. BorderTop,
  536. BorderRight,
  537. BorderBottom: ShortInt;
  538. BorderRPort: PRastPort;
  539. { You supply a linked-list of Gadgets for your Window.
  540. This list DOES NOT include system gadgets. You get the standard
  541. window system gadgets by setting flag-bits in the variable Flags (see
  542. the bit definitions below)}
  543. FirstGadget: PGadget;
  544. Parent,
  545. Descendant: PWindow; // these are for opening/closing the windows
  546. // sprite data iformation for your own Pointer set these AFTER you Open the Window by calling SetPointer()
  547. _Pointer: PWord; // sprite data
  548. PtrHeight: ShortInt; // sprite height (not including sprite padding)
  549. PtrWidth: ShortInt; // sprite width (must be less than or equal to 16)
  550. XOffset,
  551. YOffset: ShortInt; // sprite offsets
  552. // the IDCMP Flags and User's and Intuition's Message Ports
  553. IDCMPFlags: LongWord; // User-selected flags
  554. UserPort,
  555. WindowPort: PMsgPort;
  556. MessageKey: PIntuiMessage;
  557. DetailPen,
  558. BlockPen: Byte; // for bar/border/gadget rendering
  559. CheckMark: PImage; // the CheckMark is a pointer to the imagery that will be used when rendering MenuItems of this Window that want to be checkmarked if this is equal to NULL, you'll get the default imagery
  560. ScreenTitle: PChar; // if non-nil, Screen title when Window is active
  561. { These variables have the mouse coordinates relative to the
  562. inner-Window of GIMMEZEROZERO Windows. This is compared with the
  563. MouseX and MouseY variables, which contain the mouse coordinates
  564. relative to the upper-left corner of the Window, GIMMEZEROZERO
  565. notwithstanding}
  566. GZZMouseX: SmallInt;
  567. GZZMouseY: SmallInt;
  568. GZZWidth: SmallInt; // these variables contain the width and height of the inner-Window of GIMMEZEROZERO Windows
  569. GZZHeight: SmallInt;
  570. ExtData: PByte;
  571. UserData: PSmallInt; // general-purpose pointer to User data extension
  572. WLayer: PLayer;
  573. IFont: PTextFont;
  574. MoreFlags: LongWord;
  575. RelLeftEdge: SmallInt; // relative coordinates of the window to its parent window. If it is
  576. RelTopEdge: SmallInt; // a window on the screen then these are the same as LeftEdge and TopEdge.
  577. FirstChild: PWindow; // pointer to first child
  578. PrevChild: PWindow; // if window is a child of a window
  579. NextChild: PWindow; // then they are concatenated here.
  580. Parent2: PWindow; // parent of this window
  581. // Data beyond this point are Intuition Private. DO NOT USE
  582. end;
  583. TScreen = record
  584. NextScreen: PScreen; // linked list of screens
  585. FirstWindow: PWindow; // linked list Screen's Windows
  586. LeftEdge,
  587. TopEdge: SmallInt; // parameters of the screen
  588. Width,
  589. Height: SmallInt; // parameters of the screen
  590. {$ifdef AROS_BINCOMPAT}
  591. MouseY,
  592. MouseX: SmallInt; // position relative to upper-left
  593. {$else}
  594. MouseX,
  595. MouseY: SmallInt; // position relative to upper-left
  596. {$endif}
  597. Flags: Word; // see definitions below
  598. Title: PChar; // null-terminated Title text
  599. DefaultTitle: PChar; // for Windows without ScreenTitle
  600. // Bar sizes for this Screen and all Window's in this Screen
  601. BarHeight,
  602. BarVBorder,
  603. BarHBorder,
  604. MenuVBorder,
  605. MenuHBorder: ShortInt;
  606. WBorTop,
  607. WBorLeft,
  608. WBorRight,
  609. WBorBottom: ShortInt;
  610. Font: PTextAttr; // this screen's default font
  611. // the display data structures for this Screen (note the prefix S)
  612. ViewPort: TViewPort; // describing the Screen's display
  613. RastPort: TRastPort; // describing Screen rendering
  614. BitMap: TBitMap; // extra copy of RastPort BitMap obsolete
  615. LayerInfo: TLayer_Info; // each screen gets a LayerInfo
  616. // You supply a linked-list of Gadgets for your Screen. This list DOES NOT include system Gadgets. You get the standard system Screen Gadgets by default
  617. FirstGadget: PGadget;
  618. DetailPen,
  619. BlockPen: Byte; // for bar/border/gadget rendering
  620. // the following variable(s) are maintained by Intuition to support the DisplayBeep() color flashing technique
  621. SaveColor0: Word;
  622. BarLayer: PLayer; // This layer is for the Screen and Menu bars
  623. ExtData: Pointer;
  624. UserData: Pointer;
  625. { general-purpose pointer to User data extension
  626. **** Data below this point are SYSTEM PRIVATE ****}
  627. end;
  628. const
  629. // IDCMP Classes
  630. // Please refer to the Autodoc for OpenWindow() and to the Rom Kernel Manual for full details on the IDCMP classes.
  631. IDCMP_SIZEVERIFY = 1 shl 0;
  632. IDCMP_NEWSIZE = 1 shl 1;
  633. IDCMP_REFRESHWINDOW = 1 shl 2;
  634. IDCMP_MOUSEBUTTONS = 1 shl 3;
  635. IDCMP_MOUSEMOVE = 1 shl 4;
  636. IDCMP_GADGETDOWN = 1 shl 5;
  637. IDCMP_GADGETUP = 1 shl 6;
  638. IDCMP_REQSET = 1 shl 7;
  639. IDCMP_MENUPICK = 1 shl 8;
  640. IDCMP_CLOSEWINDOW = 1 shl 9;
  641. IDCMP_RAWKEY = 1 shl 10;
  642. IDCMP_REQVERIFY = 1 shl 11;
  643. IDCMP_REQCLEAR = 1 shl 12;
  644. IDCMP_MENUVERIFY = 1 shl 13;
  645. IDCMP_NEWPREFS = 1 shl 14;
  646. IDCMP_DISKINSERTED = 1 shl 15;
  647. IDCMP_DISKREMOVED = 1 shl 16;
  648. IDCMP_WBENCHMESSAGE = 1 shl 17; // System use only
  649. IDCMP_ACTIVEWINDOW = 1 shl 18;
  650. IDCMP_INACTIVEWINDOW = 1 shl 19;
  651. IDCMP_DELTAMOVE = 1 shl 20;
  652. IDCMP_VANILLAKEY = 1 shl 21;
  653. IDCMP_INTUITICKS = 1 shl 22;
  654. IDCMP_IDCMPUPDATE = 1 shl 23; // for notifications from "boopsi" gadgets
  655. IDCMP_MENUHELP = 1 shl 24; // for getting help key report during menu session
  656. IDCMP_CHANGEWINDOW = 1 shl 25; // for notification of any move/size/zoom/change window
  657. IDCMP_GADGETHELP = 1 shl 26;
  658. IDCMP_LONELYMESSAGE = 1 shl 31; { the IDCMP Flags do not use this special bit, which is cleared when
  659. Intuition sends its special message to the Task, and set when Intuition
  660. gets its Message back from the Task. Therefore, I can check here to
  661. find out fast whether or not this Message is available for me to send }
  662. // IDCMP Codes
  663. // This group of codes is for the IDCMP_CHANGEWINDOW message
  664. CWCODE_MOVESIZE = 0; // Window was moved and/or sized
  665. CWCODE_DEPTH = 1; // Window was depth-arranged
  666. // This group of codes is for the IDCMP_MENUVERIFY function
  667. MENUHOT = 1; // IntuiWants verification OR MENUCANCEL
  668. MENUCANCEL = 2; // HOT Reply of this cancels Menu operation
  669. MENUWAITING = 3; // Intuition simply wants a ReplyMsg() ASAP
  670. // These are internal tokens to represent state of verification attempts shown here as a clue.
  671. OKOK = 1; // guy didn't care
  672. OKABORT = 4; // window rendered question moot
  673. OKCANCEL = 2; // window sent cancel reply
  674. // This group of codes is for the IDCMP_WBENCHMESSAGE messages
  675. WBENCHOPEN = 1;
  676. WBENCHCLOSE = 2;
  677. type
  678. PNewWindow = ^TNewWindow;
  679. TNewWindow = record
  680. LeftEdge,
  681. TopEdge: SmallInt; // screen dimensions of window
  682. Width,
  683. Height: SmallInt; // screen dimensions of window
  684. DetailPen,
  685. BlockPen: Byte; // for bar/border/gadget rendering
  686. IDCMPFlags: LongWord; // User-selected IDCMP flags
  687. Flags: LongWord; // see Window struct for defines
  688. FirstGadget: PGadget; { You supply a linked-list of Gadgets for your Window.
  689. This list DOES NOT include system Gadgets. You get the standard
  690. system Window Gadgets by setting flag-bits in the variable Flags (see
  691. the bit definitions under the Window structure definition)}
  692. CheckMark: PImage; { the CheckMark is a pointer to the imagery that will be used when
  693. rendering MenuItems of this Window that want to be checkmarked
  694. if this is equal to NULL, you'll get the default imagery}
  695. Title: PChar; // the title text for this window
  696. Screen: PScreen; { the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  697. want this Window to open in it. If so, you pass the Pointer of the
  698. Custom Screen structure in this variable. Otherwise, this variable
  699. is ignored and doesn't have to be initialized.}
  700. BitMap: PBitMap; { SUPER_BITMAP Window? If so, put the Pointer of your BitMap structure
  701. in this variable. If not, this variable is ignored and doesn't have
  702. to be initialized}
  703. { the values describe the minimum and maximum sizes of your Windows.
  704. these matter only if you've chosen the WINDOWSIZING Gadget option,
  705. which means that you want to let the User to change the size of
  706. this Window. You describe the minimum and maximum sizes that the
  707. Window can grow by setting these variables. You can initialize
  708. any one these to zero, which will mean that you want to duplicate
  709. the setting for that dimension (if MinWidth == 0, MinWidth will be
  710. set to the opening Width of the Window).
  711. You can change these settings later using SetWindowLimits().
  712. If you haven't asked for a SIZING Gadget, you don't have to
  713. initialize any of these variables.}
  714. MinWidth,
  715. MinHeight: SmallInt; // minimums
  716. MaxWidth,
  717. MaxHeight: Word; // maximums
  718. WType: Word; { the type variable describes the Screen in which you want this Window to
  719. open. The type value can either be CUSTOMSCREEN or one of the
  720. system standard Screen Types such as WBENCHSCREEN. See the
  721. type definitions under the Screen structure}
  722. end;
  723. { The following structure is the future NewWindow. Compatibility
  724. issues require that the size of NewWindow not change.
  725. Data in the common part (NewWindow) indicates the the extension
  726. fields are being used.
  727. NOTE WELL: This structure may be subject to future extension.
  728. Writing code depending on its size is not allowed.
  729. }
  730. PExtNewWindow = ^TExtNewWindow;
  731. TExtNewWindow = record
  732. LeftEdge,
  733. TopEdge: SmallInt;
  734. Width,
  735. Height: SmallInt;
  736. DetailPen,
  737. BlockPen: Byte;
  738. IDCMPFlags: LongWord;
  739. Flags: LongWord;
  740. FirstGadget: PGadget;
  741. CheckMark: PImage;
  742. Title: PChar;
  743. WScreen: PScreen;
  744. WBitMap: PBitMap;
  745. MinWidth,
  746. MinHeight: SmallInt;
  747. MaxWidth,
  748. MaxHeight: Word;
  749. { the type variable describes the Screen in which you want this Window to
  750. open. The type value can either be CUSTOMSCREEN or one of the
  751. system standard Screen Types such as WBENCHSCREEN. See the
  752. type definitions under the Screen structure.
  753. A new possible value for this field is PUBLICSCREEN, which
  754. defines the window as a 'visitor' window. See below for
  755. additional information provided.}
  756. WType: Word;
  757. { if the NewWindow Flag value WFLG_NW_EXTENDED is set, then
  758. this field is assumed to point to an array ( or chain of arrays)
  759. of TagItem structures. See also ExtNewScreen for another
  760. use of TagItems to pass optional data.
  761. see below for tag values and the corresponding data.}
  762. Extension: PTagItem;
  763. end;
  764. const
  765. TAG_DONE = 0; { terminates array of TagItems. ti_Data unused }
  766. TAG_END = TAG_DONE;
  767. { The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  768. They are values in a TagItem array passed as extension/replacement
  769. values for the data in NewWindow. OpenWindowTagList() can actually
  770. work well with a nil NewWindow pointer. }
  771. WA_Dummy = TAG_USER + 99; { $80000063 }
  772. // these tags simply override NewWindow parameters
  773. WA_Left = WA_Dummy + 1;
  774. WA_Top = WA_Dummy + 2;
  775. WA_Width = WA_Dummy + 3;
  776. WA_Height = WA_Dummy + 4;
  777. WA_DetailPen = WA_Dummy + 5;
  778. WA_BlockPen = WA_Dummy + 6;
  779. WA_IDCMP = WA_Dummy + 7;
  780. WA_Flags = WA_Dummy + 8; // "bulk" initialization of NewWindow.Flags
  781. WA_Gadgets = WA_Dummy + 9;
  782. WA_Checkmark = WA_Dummy + 10;
  783. WA_Title = WA_Dummy + 11; // means you don't have to call SetWindowTitles after you open your window
  784. WA_ScreenTitle = WA_Dummy + 12;
  785. WA_CustomScreen = WA_Dummy + 13;
  786. WA_SuperBitMap = WA_Dummy + 14;
  787. // also implies WFLG_SUPER_BITMAP property
  788. WA_MinWidth = WA_Dummy + 15;
  789. WA_MinHeight = WA_Dummy + 16;
  790. WA_MaxWidth = WA_Dummy + 17;
  791. WA_MaxHeight = WA_Dummy + 18;
  792. WA_InnerWidth = WA_Dummy + 19;
  793. WA_InnerHeight = WA_Dummy + 20; { You can specify the dimensions of the interior region of your window, independent of what the border widths will be. You probably want
  794. to also specify WA_AutoAdjust to allow Intuition to move your window or even shrink it so that it is completely on screen.}
  795. WA_PubScreenName = WA_Dummy + 21; // declares that you want the window to open as a visitor on the public screen whose name is pointed to by (PChar) ti_Data}
  796. WA_PubScreen = WA_Dummy + 22; { open as a visitor window on the public screen whose Pointer is in (PScreen) ti_Data. To ensure that this screen remains open, you
  797. should either be the screen's owner, have a window open on the screen, or use LockPubScreen().}
  798. WA_PubScreenFallBack = WA_Dummy + 23; { A Boolean, specifies whether a visitor window should "fall back" to the default public screen
  799. (or Workbench) if the named public screen isn't available}
  800. WA_WindowName = WA_Dummy + 24;
  801. WA_Colors = WA_Dummy + 25 unimplemented;
  802. { a ColorSpec array for colors to be set when this window is active. This is not implemented, and may not be, since the default
  803. values to restore would be hard to track. We'd like to at least support per-window colors for the mouse pointer sprite.}
  804. WA_Zoom = WA_Dummy + 26; { ti_Data points to an array of four Word's, the initial Left/Top/Width/Height values of the "alternate" zoom position/dimensions.
  805. It also specifies that you want a Zoom gadget for your window, whether or not you have a sizing gadget.}
  806. WA_MouseQueue = WA_Dummy + 27; // ti_Data contains initial value for the mouse message backlog limit for this window
  807. WA_BackFill = WA_Dummy + 28; // provides a "backfill hook" for your window's layer.
  808. WA_RptQueue = WA_Dummy + 29; // initial value of repeat key backlog limit
  809. WA_SizeGadget = WA_Dummy + 30; // These Boolean tag items are alternatives to the NewWindow.Flags boolean flags with similar names.
  810. WA_DragBar = WA_Dummy + 31;
  811. WA_DepthGadget = WA_Dummy + 32;
  812. WA_CloseGadget = WA_Dummy + 33;
  813. WA_Backdrop = WA_Dummy + 34;
  814. WA_ReportMouse = WA_Dummy + 35;
  815. WA_NoCareRefresh = WA_Dummy + 36;
  816. WA_Borderless = WA_Dummy + 37;
  817. WA_Activate = WA_Dummy + 38;
  818. WA_RMBTrap = WA_Dummy + 39;
  819. WA_WBenchWindow = WA_Dummy + 40; // PRIVATE!!
  820. WA_SimpleRefresh = WA_Dummy + 41; // only specify if True
  821. WA_SmartRefresh = WA_Dummy + 42; // only specify if True
  822. WA_SizeBRight = WA_Dummy + 43;
  823. WA_SizeBBottom = WA_Dummy + 44;
  824. WA_AutoAdjust = WA_Dummy + 45; // shift or squeeze the window's position and dimensions to fit it on screen.
  825. WA_GimmeZeroZero = WA_Dummy + 46; // equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO
  826. WA_MenuHelp = WA_Dummy + 47; // Enables IDCMP_MENUHELP: Pressing HELP during menus will return IDCMP_MENUHELP message.
  827. WA_NewLookMenus = WA_Dummy + 48; // Set to True if you want NewLook menus
  828. WA_AmigaKey = WA_Dummy + 49; // Pointer to image for Amiga-key equiv in menus
  829. WA_NotifyDepth = WA_Dummy + 50; // Requests IDCMP_CHANGEWINDOW message when window is depth arranged (imsg^.Code = CWCODE_DEPTH)
  830. // WA_Dummy + 51 is obsolete
  831. WA_Pointer = WA_Dummy + 52; { Allows you to specify a custom pointer for your window. ti_Data points to a pointer object you obtained via
  832. "pointerclass". NULL signifies the default pointer. This tag may be passed to OpenWindowTags() or SetWindowPointer().}
  833. WA_BusyPointer = WA_Dummy + 53; { ti_Data is boolean. Set to True to request the standard busy pointer. This tag may be passed to OpenWindowTags() or SetWindowPointer().}
  834. WA_PointerDelay = WA_Dummy + 54; { ti_Data is boolean. Set to True to request that the changing of the pointer be slightly delayed. The change
  835. will be called off if you call NewSetPointer() before the delay expires. This allows you to post a busy-pointer even if you think
  836. the busy-time may be very Word, without fear of a flashing pointer. This tag may be passed to OpenWindowTags() or SetWindowPointer().}
  837. WA_TabletMessages = WA_Dummy + 55; { ti_Data is a boolean. Set to True to request that tablet information be included in IntuiMessages sent to your window.
  838. Requires that something (i.e. a tablet driver) feed IESUBCLASS_NEWTABLET InputEvents into the system. For a pointer to the TabletData,
  839. examine the ExtIntuiMessage^.eim_TabletData field. It is UNSAFE to check this field when running on pre-V39 systems. It's always
  840. safe to check this field under V39 and up, though it may be nil.}
  841. WA_HelpGroup = WA_Dummy + 56; { When the active window has gadget help enabled, other windows of the same HelpGroup number will also get GadgetHelp. This allows GadgetHelp
  842. to work for multi-windowed applications. Use GetGroupID() to get an ID number. Pass this number as ti_Data to all your windows. See also the HelpControl() function.}
  843. WA_HelpGroupWindow = WA_Dummy + 57; { When the active window has gadget help enabled, other windows of the same HelpGroup will also get GadgetHelp. This allows GadgetHelp to work
  844. for multi-windowed applications. As an alternative to WA_HelpGroup, you can pass a pointer to any other window of the same group to join its help
  845. group. Defaults to NULL, which has no effect. See also the HelpControl() function.}
  846. WA_ToolBox = WA_Dummy + 58; // (LongBool) Make this window a Toolbox window
  847. // AROS specific tags
  848. WA_Priority = WA_Dummy + 100;
  849. WA_Parent = WA_Dummy + 101; // (PWindow) Make the window a child of the parent Window
  850. WA_InFrontOf = WA_Dummy + 102;
  851. WA_Behind = WA_Dummy + 103;
  852. WA_Visible = WA_Dummy + 104; // (LongBool) Make window visible. default True
  853. WA_Shape = WA_Dummy + 105; // (PRegion)
  854. WA_ShapeHook = WA_Dummy + 106; // (PHook)
  855. // --- Flags requested at OpenWindow() time by the application
  856. WFLG_SIZEGADGET = 1 shl 0; // include sizing system-gadget
  857. WFLG_DRAGBAR = 1 shl 1; // include dragging system-gadget
  858. WFLG_DEPTHGADGET = 1 shl 2; // include depth arrangement gadget
  859. WFLG_CLOSEGADGET = 1 shl 3; // include close-box system-gadget
  860. WFLG_SIZEBRIGHT = 1 shl 4; // size gadget uses right border
  861. WFLG_SIZEBBOTTOM = 1 shl 5; // size gadget uses bottom border
  862. // refresh modes combinations of the WFLG_REFRESHBITS select the refresh type
  863. WFLG_SMART_REFRESH = 0;
  864. WFLG_SIMPLE_REFRESH = 1 shl 6;
  865. WFLG_SUPER_BITMAP = 1 shl 7;
  866. WFLG_OTHER_REFRESH = (1 shl 6) or (1 shl 7);
  867. WFLG_REFRESHBITS = WFLG_OTHER_REFRESH;
  868. WFLG_BACKDROP = 1 shl 8; // this is a backdrop window
  869. WFLG_REPORTMOUSE = 1 shl 9; // to hear about every mouse move
  870. WFLG_GIMMEZEROZERO = 1 shl 10; // a GimmeZeroZero window
  871. WFLG_BORDERLESS = 1 shl 11; // to get a Window sans border
  872. WFLG_ACTIVATE = 1 shl 12; // when Window opens, it's Active
  873. // Private
  874. WFLG_WINDOWACTIVE = 1 shl 13; // this window is the active one
  875. WFLG_INREQUEST = 1 shl 14; // this window is in request mode
  876. WFLG_MENUSTATE = 1 shl 15; // Window is active with Menus on
  877. // Other User Flags
  878. WFLG_RMBTRAP = 1 shl 16; // Catch RMB events for your own
  879. WFLG_NOCAREREFRESH = 1 shl 17; // not to be bothered with REFRESH
  880. WFLG_NW_EXTENDED = 1 shl 18; // extension data provided see struct ExtNewWindow
  881. WFLG_NEWLOOKMENUS = 1 shl 21; // window has NewLook menus
  882. // These flags are set only by Intuition. YOU MAY NOT SET THEM YOURSELF!
  883. WFLG_WINDOWREFRESH = 1 shl 24; // Window is currently refreshing
  884. WFLG_WBENCHWINDOW = 1 shl 25; // WorkBench tool ONLY Window
  885. WFLG_WINDOWTICKED = 1 shl 26; // only one timer tick at a time
  886. WFLG_VISITOR = 1 shl 27; // visitor window
  887. WFLG_ZOOMED = 1 shl 28; // identifies "zoom state"
  888. WFLG_HASZOOM = 1 shl 29; // windowhas a zoom gadget
  889. WFLG_TOOLBOX = 1 shl 30;
  890. // Other Window Values
  891. DEFAULTMOUSEQUEUE = 5; // no more mouse messages
  892. // see struct IntuiMessage for the IDCMP Flag definitions
  893. // HelpControl() flags: HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more windows.
  894. HC_GADGETHELP = 1;
  895. const
  896. // Flags for TRequester.Flags
  897. // set by Application
  898. POINTREL = 1 shl 0; // if POINTREL set, TopLeft is relative to pointer to the coordinates of either the pointer or the window
  899. PREDRAWN = 1 shl 1; // If set, ImageBMap points to a custom bitmap
  900. NOISYREQ = 1 shl 2; // Requester doesn't filter input
  901. SIMPLEREQ = 1 shl 4; // If set, a SIMPLEREFRESH layer is used
  902. USEREQIMAGE = 1 shl 5; // render linked list ReqImage after BackFill but before gadgets and text
  903. NOREQBACKFILL = 1 shl 6; // don't bother filling requester with Requester.BackFill pen
  904. // Read only Flags set by Intuition
  905. REQOFFWINDOW = 1 shl 12; // part of one of the Gadgets was offwindow
  906. REQACTIVE = 1 shl 13; // this requester is active
  907. SYSREQUEST = 1 shl 14; // this requester caused by system
  908. DEFERREFRESH = 1 shl 15; // this Requester stops a Refresh broadcast
  909. { Intuition supports the IESUBCLASS_NEWTABLET subclass of the IECLASS_NEWPOINTERPOS event. The ie_EventAddress of such an event points to a TabletData structure (see below).
  910. The TabletData structure contains certain elements including a taglist.The taglist can be used for special tablet parameters. A tablet driver
  911. should include only those tag-items the tablet supports. An application can listen for any tag-items that interest it. Note: an application
  912. must set the WA_TabletMessages attribute to TRUE to receive this extended information in its IntuiMessages.
  913. The definitions given here MUST be followed. Pay careful attention
  914. to normalization and the interpretation of signs.
  915. Note: a stylus that supports tilt should use the TABLETA_AngleX
  916. and TABLETA_AngleY attributes. Tilting the stylus so the tip
  917. points towards increasing or decreasing X is actually a rotation
  918. around the Y-axis. Thus, if the stylus tip points towards
  919. positive X, then that tilt is represented as a negative
  920. TABLETA_AngleY. Likewise, if the stylus tip points towards
  921. positive Y, that tilt is represented by positive TABLETA_AngleX.}
  922. const
  923. TABLETA_Dummy = TAG_USER + $3A000;
  924. TABLETA_TabletZ = TABLETA_Dummy + $01; // the current value of the tablet in the Z direction. This unsigned value should typically be in the natural units of the
  925. // tablet. You should also provide TABLETA_RangeZ.
  926. TABLETA_RangeZ = TABLETA_Dummy + $02; // the maximum value of the tablet in the Z direction. Normally specified along with TABLETA_TabletZ, this allows the
  927. // application to scale the actual Z value across its range.
  928. TABLETA_AngleX = TABLETA_Dummy + $03; // the angle of rotation or tilt about the X-axis. This number should be normalized to fill a signed long LongInt. Positive
  929. // values imply a clockwise rotation about the X-axis when viewing from +X towards the origin.
  930. TABLETA_AngleY = TABLETA_Dummy + $04; // the angle of rotation or tilt about the Y-axis. This number should be normalized to fill a signed long LongInt. Positive
  931. // values imply a clockwise rotation about the Y-axis when viewing from +Y towards the origin.
  932. TABLETA_AngleZ = TABLETA_Dummy + $05; // the angle of rotation or tilt about the Z axis. This number should be normalized to fill a signed long LongInt. Positive
  933. // values imply a clockwise rotation about the Z-axis when viewing from +Z towards the origin.
  934. TABLETA_Pressure = TABLETA_Dummy + $06; { the pressure reading of the stylus. The pressure should be normalized to fill a signed long LongInt. Typical devices
  935. won't generate negative pressure, but the possibility is not precluded. The pressure threshold which is considered to cause a button-click is
  936. expected to be set in a Preferences program supplied by the tablet vendor. The tablet driver would send IECODE_LBUTTON-type events as
  937. the pressure crossed that threshold.}
  938. TABLETA_ButtonBits = TABLETA_Dummy + $07; // ti_Data is a long LongInt whose bits are to be interpreted at the state of the first 32 buttons of the tablet.
  939. TABLETA_InProximity = TABLETA_Dummy + $08; { ti_Data is a boolean. For tablets that support proximity, they should send the (TABLETA_InProximity,FALSE) tag item
  940. when the stylus is out of proximity. One possible use we can forsee is a mouse-blanking commodity which keys off this to blank the
  941. mouse. When this tag is absent, the stylus is assumed to be in proximity.}
  942. TABLETA_ResolutionX = TABLETA_Dummy + $09; // ti_Data is an unsigned long LongInt which is the x-axis resolution in dots per inch.
  943. TABLETA_ResolutionY = TABLETA_Dummy + $0A; // ti_Data is an unsigned long LongInt which is the y-axis resolution in dots per inch.
  944. type
  945. // this structure is used for remembering what memory has been allocated to date by a given routine,
  946. // so that a premature abort or systematic exit can deallocate memory cleanly, easily, and completely
  947. PRemember = ^TRemember;
  948. TRemember = record
  949. NextRemember: PRemember;
  950. RememberSize: LongWord;
  951. Memory: PByte;
  952. end;
  953. // How to tell Intuition about RGB values for a color table entry. }
  954. PColorSpec = ^TColorSpec;
  955. TColorSpec = record
  956. ColorIndex: SmallInt; // -1 terminates an array of ColorSpec
  957. Red: Word; // only the _bottom_ 4 bits recognized
  958. Green: Word; // only the _bottom_ 4 bits recognized
  959. Blue: Word; // only the _bottom_ 4 bits recognized
  960. end;
  961. // Easy Requester Specification see also autodocs for EasyRequest and BuildEasyRequest NOTE: This structure may grow in size in the future
  962. PEasyStruct = ^TEasyStruct;
  963. TEasyStruct = record
  964. es_StructSize: LongWord; // should be sizeof (TEasyStruct) Note that this size may change, if you update the includes! Do not use absolute values as the size of pointers may vary on different platforms!
  965. es_Flags: LongWord; // should be 0 for now
  966. es_Title: PChar; // title of requester window
  967. es_TextFormat: PChar; // 'printf' style formatting string
  968. es_GadgetFormat: PChar; // Text of the gadgets, separated by |'s
  969. end;
  970. const
  971. // These are the AlertNumber defines. if you are calling DisplayAlert() the AlertNumber you supply must have the ALERT_TYPE bits set to one of these patterns
  972. ALERT_TYPE = $80000000;
  973. RECOVERY_ALERT = $00000000; // the system can recover from this
  974. DEADEND_ALERT = $80000000; // no recovery possible, this is it
  975. { When you're defining IntuiText for the Positive and Negative Gadgets created by a call to AutoRequest(), these defines will get you
  976. reasonable-looking text. The only field without a define is the IText field; you decide what text goes with the Gadget}
  977. AUTOFRONTPEN = 0;
  978. AUTOBACKPEN = 1;
  979. AUTODRAWMODE = JAM2;
  980. AUTOLEFTEDGE = 6;
  981. AUTOTOPEDGE = 3;
  982. AUTOITEXTFONT = nil;
  983. AUTONEXTTEXT = nil;
  984. // RAWMOUSE Codes and Qualifiers (Console OR <IDCMP)
  985. SELECTDOWN = IECODE_LBUTTON;
  986. SELECTUP = IECODE_LBUTTON or IECODE_UP_PREFIX;
  987. MENUDOWN = IECODE_RBUTTON;
  988. MENUUP = IECODE_RBUTTON or IECODE_UP_PREFIX;
  989. MIDDLEDOWN = IECODE_MBUTTON;
  990. MIDDLEUP = IECODE_MBUTTON or IECODE_UP_PREFIX;
  991. ALTLEFT = IEQUALIFIER_LALT;
  992. ALTRIGHT = IEQUALIFIER_RALT;
  993. AMIGALEFT = IEQUALIFIER_LCOMMAND;
  994. AMIGARIGHT = IEQUALIFIER_RCOMMAND;
  995. AMIGAKEYS = AMIGALEFT or AMIGARIGHT;
  996. CURSORUP = $4C;
  997. CURSORDOWN = $4D;
  998. CURSORRIGHT = $4E;
  999. CURSORLEFT = $4F;
  1000. KEYCODE_Q = $10;
  1001. KEYCODE_Z = $31;
  1002. KEYCODE_X = $32;
  1003. KEYCODE_V = $34;
  1004. KEYCODE_B = $35;
  1005. KEYCODE_N = $36;
  1006. KEYCODE_M = $37;
  1007. KEYCODE_LESS = $38;
  1008. KEYCODE_GREATER = $39;
  1009. const
  1010. // these are the display modes for which we have corresponding parameter settings in the config arrays
  1011. HIRESPICK = $0000;
  1012. LOWRESPICK = $0001;
  1013. DMODECOUNT = $0002; // how many modes there are
  1014. // these are the system Gadget defines
  1015. HIRESGADGET = 0;
  1016. LOWRESGADGET = 1;
  1017. RESCOUNT = 2;
  1018. UPFRONTGADGET = 0;
  1019. DOWNBACKGADGET = 1;
  1020. SIZEGADGET = 2;
  1021. CLOSEGADGET = 3;
  1022. DRAGGADGET = 4;
  1023. SUPFRONTGADGET = 5;
  1024. SDOWNBACKGADGET = 6;
  1025. SDRAGGADGET = 7;
  1026. GADGETCOUNT = 8;
  1027. EVENTMAX = 10; // size of event array
  1028. type
  1029. // This is a packet of information for graphics rendering. It originates with a Screen, and is gotten using GetScreenDrawInfo( screen );
  1030. PDrawInfo = ^TDrawInfo;
  1031. TDrawInfo = record
  1032. dri_Version: Word; // will be DRI_VERSION
  1033. dri_NumPens: Word; // guaranteed to be >= numDrIPens
  1034. dri_Pens: PWord; // pointer to pen array
  1035. dri_Font: PTextFont; // screen default font
  1036. dri_Depth: Word; // (initial) depth of screen bitmap
  1037. dri_Resolution: record
  1038. x: Word; // from DisplayInfo database for initial display mode
  1039. y: Word;
  1040. end;
  1041. dri_Flags: LongWord; // defined below (DIRF_*)
  1042. dri_CheckMark: PImage; // pointer to scaled checkmark image Will be nil if DRI_VERSION < 2
  1043. dri_AmigaKey: PImage; // pointer to scaled Amiga-key image Will be NULL if DRI_VERSION < 2
  1044. // The following fields are compatible with AmigaOS4.
  1045. // Present if dri_version >= 3.
  1046. dri_Screen: PScreen;
  1047. dri_Prefs: APTR;
  1048. dri_Reserved: array[0..2] of IPTR;
  1049. end;
  1050. const
  1051. // If you find dri_Version >= DRI_VERSION, you know this structure has at least the fields defined in this version of the include file
  1052. DRI_VERSION = 3;
  1053. // dri_Flags
  1054. DRIF_NEWLOOK = 1 shl 0; // specified SA_Pens, full treatment
  1055. DRIF_DIRECTCOLOR = 1 shl 1;
  1056. // rendering pen number indexes into DrawInfo.dri_Pens[]
  1057. DETAILPEN = 0; // compatible Intuition rendering pens
  1058. BLOCKPEN = 1; // compatible Intuition rendering pens
  1059. TEXTPEN = 2; // text on background
  1060. SHINEPEN = 3; // bright edge on 3D objects
  1061. SHADOWPEN = 4; // dark edge on 3D objects
  1062. FILLPEN = 5; // active-window/selected-gadget fill
  1063. FILLTEXTPEN = 6; // text over FILLPEN
  1064. BACKGROUNDPEN = 7; // always color 0
  1065. HIGHLIGHTTEXTPEN = 8; // special color text, on background
  1066. // Only present if DRI_VERSION >= 2
  1067. BARDETAILPEN = 9; // text/detail in screen-bar/menus
  1068. BARBLOCKPEN = 10; // screen-bar/menus fill
  1069. BARTRIMPEN = 11; // trim under screen-bar
  1070. NUMDRIPENS = 12;
  1071. //It is sometimes useful to specify that a pen value is to be the complement of color zero to three. The "magic" numbers serve that purpose:
  1072. PEN_C3 = $FEFC; // Complement of color 3
  1073. PEN_C2 = $FEFD; // Complement of color 2
  1074. PEN_C1 = $FEFE; // Complement of color 1
  1075. PEN_C0 = $FEFF; // Complement of color 0
  1076. // values for ChangeDecoration ID param
  1077. DECORATION_SET = $8001;
  1078. DECORATION_DEFAULT = $8000;
  1079. // OpenScreen error codes, which are returned in the (optional) LongIng pointed to by ti_Data for the SA_ErrorCode tag item
  1080. OSERR_NOMONITOR = 1; // named monitor spec not available
  1081. OSERR_NOCHIPS = 2; // you need newer custom chips
  1082. OSERR_NOMEM = 3; // couldn't get normal memory
  1083. OSERR_NOCHIPMEM = 4; // couldn't get chipmem
  1084. OSERR_PUBNOTUNIQUE = 5; // public screen name already used
  1085. OSERR_UNKNOWNMODE = 6; // don't recognize mode asked for
  1086. OSERR_TOODEEP = 7;
  1087. OSERR_ATTACHFAIL = 8;
  1088. OSERR_NOTAVAILABLE = 9;
  1089. // The SCREENTYPE bits are reserved for describing various Screen types available under Intuition.
  1090. // The screen flags have the suffix "_f" added to avoid conflicts with routine names.
  1091. // Screen^.Flags and (Ext)NewScreen^.Type
  1092. WBENCHSCREEN_f = 1 shl 0; // Ta Da! The Workbench
  1093. PUBLICSCREEN_f = 1 shl 1;
  1094. CUSTOMSCREEN_f = $000F; // for that special look
  1095. SCREENTYPE_f = $000F; // all the screens types available
  1096. // Screen^.Flags
  1097. SHOWTITLE_f = 1 shl 4; // this gets set by a call to ShowTitle()
  1098. BEEPING_f = 1 shl 5; // set when Screen is beeping
  1099. CUSTOMBITMAP_f = 1 shl 6; // if you are supplying your own BitMap
  1100. SCREENBEHIND_f = 1 shl 7; // if you want your screen to open behind already open screens
  1101. SCREENQUIET_f = 1 shl 8; // if you do not want Intuition to render into your screen (gadgets, title)
  1102. SCREENHIRES = 1 shl 9; // do no use lowres gadgets (private)
  1103. PENSHARED = 1 shl 10; // Screen opener set (SA_SharePens,True)
  1104. NS_EXTENDED = 1 shl 12; // ExtNewScreen.Extension is valid
  1105. AUTOSCROLL = 1 shl 14; // screen is to autoscoll
  1106. STDSCREENHEIGHT = -1; // supply in NewScreen.Height
  1107. STDSCREENWIDTH = -1; // supply in NewScreen.Width
  1108. const
  1109. // Screen attribute tag ID's. These are used in the ti_Tag field of TagItem arrays passed to OpenScreenTagList() (or in the ExtNewScreen.Extension field).
  1110. SA_Dummy = TAG_USER + 32;
  1111. // these items specify items equivalent to fields in NewScreen
  1112. SA_Left = SA_Dummy + 1;
  1113. SA_Top = SA_Dummy + 2;
  1114. SA_Width = SA_Dummy + 3;
  1115. SA_Height = SA_Dummy + 4; // traditional screen positions and dimensions
  1116. SA_Depth = SA_Dummy + 5; // screen bitmap depth
  1117. SA_DetailPen = SA_Dummy + 6; //serves as default for windows, too
  1118. SA_BlockPen = SA_Dummy + 7;
  1119. SA_Title = SA_Dummy + 8; // default screen title
  1120. SA_Colors = SA_Dummy + 9; // ti_Data is an array of struct ColorSpec, terminated by ColorIndex = -1. Specifies initial screen palette colors.
  1121. SA_ErrorCode = SA_Dummy + 10; // ti_Data points to LONG error code (values below)
  1122. SA_Font = SA_Dummy + 11; // equiv. to NewScreen.Font
  1123. SA_SysFont = SA_Dummy + 12; // Selects one of the preferences system fonts: 0 - old DefaultFont, fixed-width 1 - WB Screen preferred font
  1124. SA_Type = SA_Dummy + 13; // equiv. to NewScreen.type
  1125. SA_BitMap = SA_Dummy + 14; // ti_Data is pointer to custom BitMap. This implies type of CUSTOMBITMAP
  1126. SA_PubName = SA_Dummy + 15; // presence of this tag means that the screen is to be a public screen. Please specify BEFORE the two tags below
  1127. SA_PubSig = SA_Dummy + 16;
  1128. SA_PubTask = SA_Dummy + 17; // Task ID and signal for being notified that the last window has closed on a public screen.
  1129. SA_DisplayID = SA_Dummy + 18; // ti_Data is new extended display ID
  1130. SA_DClip = SA_Dummy + 19; // ti_Data points to a rectangle which defines screen display clip region
  1131. SA_Overscan = SA_Dummy + 20; { was S_STDDCLIP. Set to one of the OSCAN_* specifiers below to get a system standard
  1132. overscan region for your display clip, screen dimensions (unless otherwise specified),
  1133. and automatically centered position (partial support only so far).
  1134. If you use this, you shouldn't specify SA_DClip. SA_Overscan is for "standard"
  1135. overscan dimensions, SA_DClip is for your custom numeric specifications.}
  1136. SA_ShowTitle = SA_Dummy + 22; // boolean equivalent to flag SHOWTITLE
  1137. SA_Behind = SA_Dummy + 23; // boolean equivalent to flag SCREENBEHIND
  1138. SA_Quiet = SA_Dummy + 24; // boolean equivalent to flag SCREENQUIET
  1139. SA_AutoScroll = SA_Dummy + 25; // boolean equivalent to flag AUTOSCROLL
  1140. SA_Pens = SA_Dummy + 26; // pointer to ~0 terminated UWORD array, as found in struct DrawInfo
  1141. SA_FullPalette = SA_Dummy + 27; // boolean: initialize color table to entire preferences palette, rather than compatible pens 0-3, 17-19, with remaining palette as returned by GetColorMap()
  1142. SA_ColorMapEntries = SA_Dummy + 28; {Allows you to override the number of entries in the ColorMap for your screen. Intuition
  1143. normally allocates (1 shl depth) or 32, whichever is more, but you may require even more if you
  1144. use certain graphics.library features (eg. palette-banking).}
  1145. SA_Parent = SA_Dummy + 29; // Pointer to a "parent" screen to attach this one to. Attached screens slide and depth-arrange together.
  1146. SA_Draggable = SA_Dummy + 30; // Boolean tag allowing non-draggable screens. Do not use without good reason! (Defaults to True).
  1147. SA_Exclusive = SA_Dummy + 31; { Boolean tag allowing screens that won't share the display. Use sparingly! Starting with 3.01,
  1148. attached screens may be SA_Exclusive. Setting SA_Exclusive for each screen will produce an
  1149. exclusive family. (Defaults to FALSE).}
  1150. SA_SharePens = SA_Dummy + 32; { For those pens in the screen's DrawInfo^.dri_Pens, Intuition obtains them in shared mode (see
  1151. graphics.library/ObtainPen()). For compatibility, Intuition obtains the other pens of a public
  1152. screen as PEN_EXCLUSIVE. Screens that wish to manage the pens themselves should generally set
  1153. this tag to True. This instructs Intuition to leave the other pens unallocated.}
  1154. SA_BackFill = SA_Dummy + 33; // provides a "backfill hook" for your screen's Layer_Info. See layers.library/InstallLayerInfoHook()
  1155. SA_Interleaved = SA_Dummy + 34; // Boolean tag requesting that the bitmap allocated for you be interleaved. (Defaults to False).
  1156. SA_Colors32 = SA_Dummy + 35; { Tag to set the screen's initial palette colors at 32 bits-per-gun. ti_Data is a pointer
  1157. to a table to be passed to the graphics.library/LoadRGB32() function. This format supports both runs of color
  1158. registers and sparse registers. See the autodoc for that function for full details. Any color set here has
  1159. precedence over the same register set by SA_Colors.}
  1160. SA_VideoControl = SA_Dummy + 36; // Pointer to a taglist that Intuition will pass to graphics.library/VideoControl(), upon opening the screen.
  1161. SA_FrontChild = SA_Dummy + 37; // Pointer to an already open screen that is to be the child of the screen being opened. The child screen will be moved to the front of its family.
  1162. SA_BackChild = SA_Dummy + 38; // Pointer to an already open screen that is to be the child of the screen being opened. The child screen will be moved to the back of its family.
  1163. SA_LikeWorkbench = SA_Dummy + 39; // 1 = request a screen which is just like the Workbench. This gives you the same screen mode, depth, size, colors, etc., as the Workbench screen.
  1164. SA_Reserved = SA_Dummy + 40; // Reserved for private Intuition use
  1165. SA_MinimizeISG = SA_Dummy + 41; { For compatibility, Intuition always ensures that the inter-screen gap is at least three non-interlaced lines. If your application
  1166. would look best with the smallest possible inter-screen gap, set ti_Data to True. If you use the new graphics VideoControl()
  1167. VC_NoColorPaletteLoad tag for your screen's ViewPort, you should also set this tag.}
  1168. SA_ID = SA_Dummy + 42;
  1169. // this is an obsolete tag included only for compatibility with V35 interim release for the A2024 and Viking monitors
  1170. NSTAG_EXT_VPMODE = TAG_USER + 1;
  1171. // SA_Overscan
  1172. OSCAN_TEXT = 1; // entirely visible
  1173. OSCAN_STANDARD = 2; // just past edges
  1174. OSCAN_MAX = 3; // as much as possible
  1175. OSCAN_VIDEO = 4; // even more than is possible
  1176. type
  1177. PNewScreen = ^TNewScreen;
  1178. TNewScreen = record
  1179. LeftEdge,
  1180. TopEdge,
  1181. Width,
  1182. Height,
  1183. Depth: SmallInt; // screen dimensions
  1184. DetailPen,
  1185. BlockPen: Byte; // for bar/border/gadget rendering
  1186. ViewModes: Word; // the Modes for the ViewPort (and View)
  1187. SType: Word; // the Screen type (see defines above) (Type in C-Include)
  1188. Font: PTextAttr; // this Screen's default text attributes
  1189. DefaultTitle: PChar; // the default title for this Screen
  1190. Gadgets: PGadget; // your own Gadgets for this Screen
  1191. { if you are opening a CUSTOMSCREEN and already have a BitMap
  1192. that you want used for your Screen, you set the flags CUSTOMBITMAP in
  1193. the type field and you set this variable to point to your BitMap
  1194. structure. The structure will be copied into your Screen structure,
  1195. after which you may discard your own BitMap if you want}
  1196. CustomBitMap: PBitMap;
  1197. end;
  1198. PExtNewScreen = ^TExtNewScreen;
  1199. TExtNewScreen = record
  1200. LeftEdge,
  1201. TopEdge,
  1202. Width,
  1203. Height,
  1204. Depth: SmallInt;
  1205. DetailPen,
  1206. BlockPen: Byte;
  1207. ViewModes: Word;
  1208. ens_Type: Word; { type in C-Includes }
  1209. Font: PTextAttr;
  1210. DefaultTitle: PChar;
  1211. Gadgets: PGadget;
  1212. CustomBitMap: PBitMap;
  1213. Extension: PTagItem; // ExtNewScreen specific extension SA_*
  1214. end;
  1215. // Public Shared Screen Node
  1216. { This is the representative of a public shared screen.
  1217. This is an internal data structure, but some functions may
  1218. present a copy of it to the calling application. In that case,
  1219. be aware that the screen pointer of the structure can NOT be
  1220. used safely, since there is no guarantee that the referenced
  1221. screen will remain open and a valid data structure.
  1222. Never change one of these.}
  1223. PPubScreenNode = ^TPubScreenNode;
  1224. TPubScreenNode = record
  1225. psn_Node: TNode; // ln_Name is screen name
  1226. psn_Screen: PScreen;
  1227. psn_Flags: Word; // below (PSNF_*)
  1228. psn_Size: SmallInt; // includes name buffer
  1229. psn_VisitorCount: SmallInt; // how many visitor windows
  1230. psn_SigTask: PTask; // who to signal when visitors gone
  1231. psn_SigBit: Byte; // which signal
  1232. end;
  1233. const
  1234. // psn_Flags
  1235. PSNF_PRIVATE = 1 shl 0;
  1236. // Maximum length of public screen names. The buffers containing these strings must have a length of MAXPUBSCREENNAME+1.
  1237. MAXPUBSCREENNAME = 139; // names no longer, please
  1238. // pub screen modes
  1239. SHANGHAI = 1 shl 0; // put workbench windows on pub screen
  1240. POPPUBSCREEN = 1 shl 1; // pop pub screen to front when visitor opens
  1241. {Intuition has new screen depth-arrangement and movement
  1242. functions called ScreenDepth() and ScreenPosition() respectively.
  1243. These functions permit the old behavior of ScreenToFront(),
  1244. ScreenToBack(), and MoveScreen(). ScreenDepth() also allows
  1245. independent depth control of attached screens. ScreenPosition()
  1246. optionally allows positioning screens even though they were opened
  1247. (SA_Draggable, False).
  1248. For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK,
  1249. and optionally also SDEPTH_INFAMILY.
  1250. NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  1251. SDEPTH_INFAMILY. Commodities, "input helper" programs,
  1252. or any other program that did not open a screen should never
  1253. use that flag. (Note that this is a style-behavior
  1254. requirement; there is no technical requirement that the
  1255. task calling this function need be the task which opened
  1256. the screen).}
  1257. SDEPTH_TOFRONT = 0; // Bring screen to front
  1258. SDEPTH_TOBACK = 1; // Send screen to back
  1259. SDEPTH_INFAMILY = 2; // Move an attached screen with respect to other screens of its family
  1260. { For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE, or SPOS_MAKEVISIBLE to describe the kind of screen positioning you
  1261. wish to perform. You may additionally set SPOS_FORCEDRAG along with any of the above. Set this if you wish to reposition an (SA_Draggable,False)
  1262. screen that you opened.
  1263. NOTE: ONLY THE OWNER OF THE SCREEN should ever specify SPOS_FORCEDRAG. Commodities, "input helper" programs, or any other program that did not
  1264. open a screen should never use that flag.
  1265. }
  1266. SPOS_RELATIVE = 0; // The x1 and y1 parameters to ScreenPosition() describe the offset in coordinates you wish to move the screen by. Coordinates are relative
  1267. SPOS_ABSOLUTE = 1 shl 0; // The x1 and y1 parameters to ScreenPosition() describe the absolute coordinates you wish to move the screen to. Coordinates are expressed as absolutes, not relatives.
  1268. SPOS_MAKEVISIBLE = 1 shl 1; // Coordinates describe a box on the screen you wish to be made visible by autoscrolling
  1269. // (x1,y1)-(x2,y2) describes a rectangle on the screen which you would like autoscrolled into view.
  1270. SPOS_FORCEDRAG = 1 shl 2; // Move non-draggable screen, You may additionally set SPOS_FORCEDRAG along with any of the above.
  1271. // Set this if you wish to reposition an (SA_Draggable, False) screen that you opened.
  1272. { Intuition supports double-buffering in screens, with friendly interaction with menus and certain gadgets.
  1273. For each buffer, you need to get one of these structures from the AllocScreenBuffer() call. Never allocate your own ScreenBuffer structures!
  1274. The sb_DBufInfo field is for your use. See the graphics.library AllocDBufInfo() autodoc for details.}
  1275. type
  1276. PScreenBuffer = ^TScreenBuffer;
  1277. TScreenBuffer = record
  1278. sb_BitMap: PBitMap; // BitMap of this buffer
  1279. sb_DBufInfo: PDBufInfo; // DBufInfo for this buffer
  1280. end;
  1281. const
  1282. // These are the flags that may be passed to AllocScreenBuffer().
  1283. SB_SCREEN_BITMAP = 1;
  1284. SB_COPY_BITMAP = 2;
  1285. const
  1286. // these are the definitions for the printer configurations
  1287. FILENAME_SIZE = 30; // Filename size
  1288. DEVNAME_SIZE = 16;
  1289. POINTERSIZE = (1 + 16 + 1) * 2; // Size of Pointer data buffer
  1290. { These defines are for the default font size. These actually describe the
  1291. height of the defaults fonts. The default font type is the topaz
  1292. font, which is a fixed width font that can be used in either
  1293. eighty-column or sixty-column mode. The Preferences structure reflects
  1294. which is currently selected by the value found in the variable FontSize,
  1295. which may have either of the values defined below. These values actually
  1296. are used to select the height of the default font. By changing the
  1297. height, the resolution of the font changes as well.}
  1298. TOPAZ_EIGHTY = 8;
  1299. TOPAZ_SIXTY = 9;
  1300. type
  1301. PPreferences = ^TPreferences;
  1302. TPreferences = record
  1303. FontHeight: ShortInt; // height for system default font
  1304. PrinterPort: Byte; // printer port connection constant describing what's hooked up to the port
  1305. BaudRate: Word; // baud rate for the serial port
  1306. // various timing rates
  1307. KeyRptSpeed: Ttimeval; // repeat speed for keyboard
  1308. KeyRptDelay: Ttimeval; // Delay before keys repeat
  1309. DoubleClick: Ttimeval; // Interval allowed between clicks
  1310. // Intuition Mouse-Pointer data
  1311. PointerMatrix: array[0..POINTERSIZE - 1] of Word; // Definition of pointer sprite
  1312. XOffset: ShortInt; // X-Offset for active 'bit'
  1313. YOffset: ShortInt; // Y-Offset for active 'bit'
  1314. color17: Word; //
  1315. color18: Word; // Colours for sprite pointer
  1316. color19: Word; //
  1317. PointerTicks: Word; // Sensitivity of the pointer
  1318. // Workbench Screen colors
  1319. color0: Word; //
  1320. color1: Word; // Standard default colours
  1321. color2: Word; // Used in the Workbench
  1322. color3: Word; //
  1323. // positioning data for the Intuition View
  1324. ViewXOffset: ShortInt; // Offset for top lefthand corner
  1325. ViewYOffset: ShortInt; // X and Y dimensions
  1326. ViewInitX,
  1327. ViewInitY: SmallInt; // View initial offset values
  1328. EnableCLI: WordBool; // CLI availability switch
  1329. // printer configurations
  1330. PrinterType: Word; // printer type
  1331. PrinterFilename: array[0..FILENAME_SIZE - 1] of char; // file for printer
  1332. // print format and quality configurations
  1333. PrintPitch: Word; // print pitch
  1334. PrintQuality: Word; // print quality
  1335. PrintSpacing: Word; // number of lines per inch
  1336. PrintLeftMargin: Word; // left margin in characters
  1337. PrintRightMargin: Word; // right margin in characters
  1338. PrintImage: Word; // positive or negative
  1339. PrintAspect: Word; // horizontal or vertical
  1340. PrintShade: Word; // b&w, half-tone, or color
  1341. PrintThreshold: SmallInt; // darkness ctrl for b/w dumps
  1342. // print paper descriptors
  1343. PaperSize: Word; // paper size
  1344. PaperLength: Word; // paper length in number of lines
  1345. PaperType: Word; // continuous or single sheet
  1346. // Serial device settings: These are six nibble-fields in three bytes (these look a little strange so the defaults will map out to zero)
  1347. SerRWBits: Byte; // upper nibble = (8-number of read bits), lower nibble = (8-number of write bits)
  1348. SerStopBuf: Byte; // upper nibble = (number of stop bits - 1), lower nibble = (table value for BufSize)
  1349. SerParShk: Byte; // upper nibble = (value for Parity setting), lower nibble = (value for Handshake mode)
  1350. LaceWB: Byte; // if workbench is to be interlaced
  1351. // temp file for printer
  1352. Pad: array[0..11] of Byte;
  1353. PrtDevName: array [0..DEVNAME_SIZE - 1] of char; // Device used by printer.device (leave out the ".device")
  1354. DefaultPrtUnit: Byte; // Default unit opened by printer.device
  1355. DefaultSerUnit: Byte; // Default serial unit
  1356. RowSizeChange: ShortInt; // Affect NormalDisplayRows/Columns
  1357. ColumnSizeChange: ShortInt;
  1358. PrintFlags: Word; // user preference flags
  1359. PrintMaxWidth: Word; // max width of printed picture in 10ths/inch
  1360. PrintMaxHeight: Word; // max height of printed picture in 10ths/inch
  1361. PrintDensity: Byte; // print density
  1362. PrintXOffset: Byte; // offset of printed picture in 10ths/inch
  1363. wb_Width: Word; // override default workbench width
  1364. wb_Height: Word; // override default workbench height
  1365. wb_Depth: Byte; // override default workbench depth
  1366. ext_size: Byte; // extension information -- do not touch!
  1367. // extension size in blocks of 64 bytes DO NOT TOUCH
  1368. end;
  1369. const
  1370. // Workbench Interlace (use one bit)
  1371. LACEWB = 1 shl 0;
  1372. LW_RESERVED = 1; // internal use only
  1373. SCREEN_DRAG = 1 shl 14;
  1374. MOUSE_ACCEL = 1 shl 15;
  1375. // PrinterPort
  1376. PARALLEL_PRINTER = $00;
  1377. SERIAL_PRINTER = $01;
  1378. // BaudRate
  1379. BAUD_110 = $00;
  1380. BAUD_300 = $01;
  1381. BAUD_1200 = $02;
  1382. BAUD_2400 = $03;
  1383. BAUD_4800 = $04;
  1384. BAUD_9600 = $05;
  1385. BAUD_19200 = $06;
  1386. BAUD_MIDI = $07;
  1387. // PaperType
  1388. FANFOLD_PT = $00;
  1389. Single_PT = $80;
  1390. // PrintPitch
  1391. PICA = $000;
  1392. ELITE = $400;
  1393. FINE = $800;
  1394. // PrintQuality
  1395. DRAFT = $000;
  1396. LETTER = $100;
  1397. // PrintSpacing
  1398. SIX_LPI = $000;
  1399. EIGHT_LPI = $200;
  1400. // Print Image
  1401. IMAGE_POSITIVE = $00;
  1402. IMAGE_NEGATIVE = $01;
  1403. // PrintAspect
  1404. ASPECT_HORIZ = $00;
  1405. ASPECT_VERT = $01;
  1406. // PrintShade
  1407. SHADE_BW = $00;
  1408. SHADE_GREYSCALE = $01;
  1409. SHADE_COLOR = $02;
  1410. // PaperSize
  1411. US_LETTER = $00;
  1412. US_LEGAL = $10;
  1413. N_TRACTOR = $20;
  1414. W_TRACTOR = $30;
  1415. CUSTOM_PAPER = $40;
  1416. // European sizes
  1417. EURO_A0 = $50; // European size A0: 841 x 1189
  1418. EURO_A1 = $60; // European size A1: 594 x 841
  1419. EURO_A2 = $70; // European size A2: 420 x 594
  1420. EURO_A3 = $80; // European size A3: 297 x 420
  1421. EURO_A4 = $90; // European size A4: 210 x 297
  1422. EURO_A5 = $A0; // European size A5: 148 x 210
  1423. EURO_A6 = $B0; // European size A6: 105 x 148
  1424. EURO_A7 = $C0; // European size A7: 74 x 105
  1425. EURO_A8 = $D0; // European size A8: 52 x 74
  1426. // PrinterType
  1427. CUSTOM_NAME = $00;
  1428. ALPHA_P_101 = $01;
  1429. BROTHER_15XL = $02;
  1430. CBM_MPS1000 = $03;
  1431. DIAB_630 = $04;
  1432. DIAB_ADV_D25 = $05;
  1433. DIAB_C_150 = $06;
  1434. EPSON = $07;
  1435. EPSON_JX_80 = $08;
  1436. OKIMATE_20 = $09;
  1437. QUME_LP_20 = $0A;
  1438. HP_LASERJET = $0B;
  1439. HP_LASERJET_PLUS = $0C;
  1440. // Serial Input Buffer Sizes
  1441. SBUF_512 = $00;
  1442. SBUF_1024 = $01;
  1443. SBUF_2048 = $02;
  1444. SBUF_4096 = $03;
  1445. SBUF_8000 = $04;
  1446. SBUF_16000 = $05;
  1447. // Serial Bit Masks
  1448. SREAD_BITS = $F0; // for SerRWBits
  1449. SWRITE_BITS = $0F;
  1450. SSTOP_BITS = $F0; // for SerStopBuf
  1451. SBUFSIZE_BITS = $0F;
  1452. SPARITY_BITS = $F0; // for SerParShk
  1453. SHSHAKE_BITS = $0F;
  1454. // Serial Parity (upper nibble, after being shifted by macro SPARNUM())
  1455. SPARITY_NONE = 0;
  1456. SPARITY_EVEN = 1;
  1457. SPARITY_ODD = 2;
  1458. SPARITY_MARK = 3;
  1459. SPARITY_SPACE = 4;
  1460. // Serial Handshake Mode (lower nibble, after masking using macro SHANKNUM())
  1461. SHSHAKE_XON = 0;
  1462. SHSHAKE_RTS = 1;
  1463. SHSHAKE_NONE = 2;
  1464. // new defines for PrintFlags
  1465. CORRECT_RED = $0001; // color correct red shades
  1466. CORRECT_GREEN = $0002; // color correct green shades
  1467. CORRECT_BLUE = $0004; // color correct blue shades
  1468. CENTER_IMAGE = $0008; // center image on paper
  1469. IGNORE_DIMENSIONS = $0000; // ignore max width/height settings
  1470. BOUNDED_DIMENSIONS = $0010; // use max width/height as boundaries
  1471. ABSOLUTE_DIMENSIONS = $0020; // use max width/height as absolutes
  1472. PIXEL_DIMENSIONS = $0040; // use max width/height as prt pixels
  1473. MULTIPLY_DIMENSIONS = $0080; // use max width/height as multipliers
  1474. INTEGER_SCALING = $0100; // force integer scaling
  1475. ORDERED_DITHERING = $0000; // ordered dithering
  1476. HALFTONE_DITHERING = $0200; // halftone dithering
  1477. FLOYD_DITHERING = $0400; // Floyd-Steinberg dithering
  1478. ANTI_ALIAS = $0800; // anti-alias image
  1479. GREY_SCALE2 = $1000; // for use with hi-res monitor
  1480. // masks used for checking bits
  1481. CORRECT_RGB_MASK = CORRECT_RED or CORRECT_GREEN or CORRECT_BLUE;
  1482. DIMENSIONS_MASK = BOUNDED_DIMENSIONS or ABSOLUTE_DIMENSIONS or PIXEL_DIMENSIONS or MULTIPLY_DIMENSIONS;
  1483. DITHERING_MASK = HALFTONE_DITHERING or FLOYD_DITHERING;
  1484. { Be sure to protect yourself against someone modifying these data as you look at them. This is done by calling:
  1485. lock = LockIBase(0), which returns an Integer. When done call UnlockIBase(lock) where lock is what LockIBase() returned.}
  1486. type
  1487. // IntuitionBase should never be directly modified by programs
  1488. PIntuitionBase = ^TIntuitionBase;
  1489. TIntuitionBase = record
  1490. LibNode: TLibrary;
  1491. ViewLord: TView;
  1492. ActiveWindow: PWindow;
  1493. ActiveScreen: PScreen;
  1494. FirstScreen: PScreen; { for linked list of all screens, the FirstScreen variable points to the frontmost Screen.
  1495. Screens are then maintained in a front to back order using Screen.NextScreen }
  1496. Flags: LongWord; // see definitions below
  1497. {$ifdef AROS_BINCOMPAT}
  1498. MouseY,
  1499. MouseX: SmallInt; // mouse position relative to View
  1500. {$else}
  1501. MouseX,
  1502. MouseY: SmallInt; // mouse position relative to View
  1503. {$endif}
  1504. Seconds: LongWord; // timestamp of most current input event
  1505. Micros: LongWord; // timestamp of most current input event
  1506. // I told you this was private. The data beyond this point has changed, is changing, and will continue to change.
  1507. end;
  1508. { Package of information passed to custom and 'boopsi'
  1509. gadget 'hook' functions. This structure is READ ONLY.}
  1510. type
  1511. PGadgetInfo = ^TGadgetInfo;
  1512. TGadgetInfo = record
  1513. gi_Screen: PScreen; // ScreenPtr
  1514. gi_Window: PWindow; // nil for screen gadgets
  1515. gi_Requester: PRequester; // nil IF not GTYP_REQGADGET
  1516. gi_RastPort: PRastPort; // rendering information: don't use these without cloning/locking. Official way is to call ObtainRPort()
  1517. gi_Layer: PLayer; // LayerPtr
  1518. { copy of dimensions of screen/window/g00/req(/group)
  1519. that gadget resides in. Left/Top of this box is
  1520. offset from window mouse coordinates to gadget coordinates
  1521. screen gadgets: 0,0 (from screen coords)
  1522. window gadgets (no g00): 0,0
  1523. GTYP_GZZGADGETs (borderlayer): 0,0
  1524. GZZ innerlayer gadget: borderleft, bordertop
  1525. Requester gadgets: reqleft, reqtop}
  1526. gi_Domain: TIBox;
  1527. gi_Pens: record
  1528. DetailPen: Byte;
  1529. BlockPen: Byte;
  1530. end;
  1531. gi_DrInfo: PDrawInfo; // the Detail and Block pens in gi_DrInfo^.dri_Pens[] are for the screen. Use the above for window-sensitive colors.
  1532. gi_Reserved: array[0..5] of LongWord; // reserved space: this structure is extensible anyway, but using these saves some recompilation
  1533. end;
  1534. { system private data structure for now
  1535. prop gadget extra info}
  1536. PPGX = ^TPGX;
  1537. TPGX = record
  1538. pgx_Container: TIBox;
  1539. pgx_NewKnob: TIBox;
  1540. end;
  1541. {** User visible handles on objects, classes, messages **}
  1542. type
  1543. Object_ = LongWord;
  1544. PObject_ = ^Object_;
  1545. PPObject_ = ^PObject_;
  1546. ClassID = STRPTR;
  1547. { you can use this type to point to a 'generic' message,
  1548. in the object-oriented programming parlance. Based on
  1549. the value of 'MethodID', you dispatch to processing
  1550. for the various message types. The meaningful parameter
  1551. packet structure definitions are defined below.}
  1552. PMsg = ^TMsg;
  1553. TMsg = record // record with stacked fields
  1554. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1555. MethodID: LongWord;
  1556. pad_align: record end; // properly pad previous field if applicable
  1557. {$POP}
  1558. end;
  1559. { Class id strings for Intuition classes.
  1560. There's no real reason to use the uppercase constants
  1561. over the lowercase strings, but this makes a good place
  1562. to list the names of the built-in classes.}
  1563. const
  1564. ROOTCLASS: ClassID = 'rootclass'; // classusr.h
  1565. IMAGECLASS: ClassID = 'imageclass'; // imageclass.h
  1566. FRAMEICLASS: ClassID = 'frameiclass';
  1567. SYSICLASS: ClassID = 'sysiclass';
  1568. FILLRECTCLASS: ClassID = 'fillrectclass';
  1569. GADGETCLASS: ClassID = 'gadgetclass'; // gadgetclass.h
  1570. PROPGCLASS: ClassID = 'propgclass';
  1571. STRGCLASS: ClassID = 'strgclass';
  1572. BUTTONGCLASS: ClassID = 'buttongclass';
  1573. FRBUTTONCLASS: ClassID = 'frbuttonclass';
  1574. GROUPGCLASS: ClassID = 'groupgclass';
  1575. ICCLASS: ClassID = 'icclass'; // icclass.h
  1576. MODELCLASS: ClassID = 'modelclass';
  1577. ITEXTICLASS: ClassID = 'itexticlass';
  1578. POINTERCLASS: ClassID = 'pointerclass'; // pointerclass.h
  1579. // public classes existing only in AROS but not AmigaOS
  1580. MENUBARLABELCLASS: PChar = 'menubarlabelclass';
  1581. WINDECORCLASS: PChar = 'windecorclass';
  1582. SCRDECORCLASS: PChar = 'scrdecorclass';
  1583. MENUDECORCLASS: PChar = 'menudecorclass';
  1584. { Dispatched method ID's
  1585. NOTE: Applications should use Intuition entry points, not direct
  1586. DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
  1587. SetGadgetAttrs, and GetAttr}
  1588. OM_Dummy = $100;
  1589. OM_NEW = OM_Dummy + 1; // 'object' parameter is 'true class'
  1590. OM_DISPOSE = OM_Dummy + 2; // delete self (no parameters)
  1591. OM_SET = OM_Dummy + 3; // set attributes (in tag list)
  1592. OM_GET = OM_Dummy + 4; // return single attribute value
  1593. OM_ADDTAIL = OM_Dummy + 5; // add self to a List (let root do it)
  1594. OM_REMOVE = OM_Dummy + 6; // remove self from list
  1595. OM_NOTIFY = OM_Dummy + 7; // send to self: notify dependents
  1596. OM_UPDATE = OM_Dummy + 8; // notification message from somebody
  1597. OM_ADDMEMBER = OM_Dummy + 9; // used by various classes with lists
  1598. OM_REMMEMBER = OM_Dummy + 10; // used by various classes with lists
  1599. // Parameter 'Messages' passed to methods
  1600. type
  1601. // OM_NEW and OM_SET
  1602. PopSet = ^TopSet;
  1603. TopSet = record // record with stacked fields
  1604. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1605. MethodID: LongWord;
  1606. ops_AttrList: PTagItem; // new attributes
  1607. ops_GInfo: PGadgetInfo; // always there for gadgets, when SetGadgetAttrs() is used, but will be nil for OM_NEW
  1608. pad_align: record end; // properly pad previous field if applicable
  1609. {$POP}
  1610. end;
  1611. // OM_GET
  1612. PopGet = ^TopGet;
  1613. TopGet = record // record with stacked fields
  1614. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1615. MethodID,
  1616. opg_AttrID: LongWord;
  1617. opg_Storage: Pointer; // may be other types, but 'int' types are all LongWord
  1618. pad_align: record end; // properly pad previous field if applicable
  1619. {$POP}
  1620. end;
  1621. // OM_ADDTAIL
  1622. PopAddTail = ^TopAddTail;
  1623. TopAddTail = record // record with stacked fields
  1624. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1625. MethodID: LongWord;
  1626. opat_List: PList;
  1627. pad_align: record end; // properly pad previous field if applicable
  1628. {$POP}
  1629. end;
  1630. // OM_ADDMEMBER, OM_REMMEMBER
  1631. PopMember = ^TopMember;
  1632. TopMember = record // record with stacked fields
  1633. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1634. MethodID: LongWord;
  1635. opam_Object: PObject_;
  1636. pad_align: record end; // properly pad previous field if applicable
  1637. {$POP}
  1638. end;
  1639. TopAddMember = TopMember;
  1640. PopAddMember = ^TopAddMember;
  1641. // OM_NOTIFY, and OM_UPDATE
  1642. PopUpdate = ^TopUpdate;
  1643. TopUpdate = record // record with stacked fields
  1644. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1645. MethodID: LongWord;
  1646. opu_AttrList: PTagItem; // new attributes
  1647. opu_GInfo: PGadgetInfo; // non-nil when SetGadgetAttrs OR notification resulting from gadget input occurs.
  1648. opu_Flags: LongWord; // defined below (OPUF_*)
  1649. pad_align: record end; // properly pad previous field if applicable
  1650. {$POP}
  1651. end;
  1652. { this flag means that the update message is being issued from
  1653. something like an active gadget, a la GACT_FOLLOWMOUSE. When
  1654. the gadget goes inactive, it will issue a final update
  1655. message with this bit cleared. Examples of use are for
  1656. GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes
  1657. for buttons.}
  1658. const
  1659. OPUF_INTERIM = 1; // opu_Flags
  1660. { This structure is READ-ONLY, and allocated only by Intuition }
  1661. type
  1662. PIClass = ^TIClass;
  1663. TIClass = record // also used as Class
  1664. cl_Dispatcher: THook;
  1665. cl_Reserved: LongWord; // must be 0
  1666. cl_Super: PIClass; // Super - Class
  1667. cl_ID: ClassID;
  1668. cl_InstOffset: Word; // where within an object is the instance data for this class?
  1669. cl_InstSize: Word;
  1670. cl_UserData: IPTR; // per-class data of your choice, application specific
  1671. cl_SubclassCount: LongWord; // # of direct suclasses
  1672. cl_ObjectCount: LongWord; // # of objects, made from this class must be 0, if the class is to be deleted
  1673. cl_Flags: LongWord; // Flags (CLF_INLIST)
  1674. cl_ObjectSize: LongWord; // cl_InstOffset + cl_InstSize + SizeOf(_Object)
  1675. cl_MemoryPool: APTR;
  1676. end;
  1677. const
  1678. CLF_INLIST = 1 shl 0; // class is in public class list (cl_Flags)
  1679. { We have this, the instance data of the root class, PRECEDING
  1680. the 'object'. This is so that Gadget objects are Gadget pointers,
  1681. and so on. If this structure grows, it will always have o_Class
  1682. at the end, so the macro OCLASS(o) will always have the same
  1683. offset back from the pointer returned from NewObject().}
  1684. type
  1685. P_Object = ^T_Object;
  1686. T_Object = record
  1687. o_Node: TMinNode;
  1688. o_Class: PIClass;
  1689. end;
  1690. { BOOPSI class libraries should use this structure as the base for their
  1691. library data. This allows developers to obtain the class pointer for
  1692. performing object-less inquiries. }
  1693. PClassLibrary = ^TClassLibrary;
  1694. TClassLibrary = record
  1695. cl_Lib: TLibrary; // Embedded library
  1696. cl_Pad: Word; // Align the structure
  1697. cl_Class: PIClass; // Class pointer
  1698. end;
  1699. { GadgetClass Attributes
  1700. Most subclasses of GadgetClass implement a subset of these attributes. Note
  1701. also that even if an attribute is signed as settable, some subclasses may
  1702. ignore this or even behave strange, if such an attribute is set, after they
  1703. were added to a window. Read the class documentation of the subclasses to
  1704. learn about such caveats.
  1705. Many of these attributes correspond directly to a field of the Gadget
  1706. structure or to one flag for this structure. }
  1707. const
  1708. GA_Dummy = (TAG_USER + $30000);
  1709. // Gadget placing (in pixels). Of course, all GA_Rel attributes are mutually
  1710. // exclusive with their non relative equivalents.
  1711. GA_Left = (GA_Dummy + $0001); // [ISG] (LONG) Left edge of gadget.
  1712. GA_RelRight = (GA_Dummy + $0002); // [ISG] (LONG) Left edge of gadget, depending on right window border: Left=Win^.Width-this-1
  1713. GA_Top = (GA_Dummy + $0003); // [ISG] (LONG) Top edge of gadget.
  1714. GA_RelBottom = (GA_Dummy + $0004); // [ISG] (LONG) Top edge of gadget, depending on bottom window border: Top=Win^.Height-this-1
  1715. GA_Width = (GA_Dummy + $0005); // [ISG] (LONG) Width of gadget.
  1716. GA_RelWidth = (GA_Dummy + $0006); // [ISG] (LONG) Width of gadget, depending on window width: Width=Win^.Width-this
  1717. GA_Height = (GA_Dummy + $0007); // [ISG] (LONG) Height of gadget.
  1718. GA_RelHeight = (GA_Dummy + $0008); // [ISG] (LONG) Height of gadget, depending on window height: Height=Win^.Height-this
  1719. // Gadget rendering
  1720. GA_Text = (GA_Dummy + $0009); // [IS.] (PChar) Label text. This is mutually exclusive with GA_IntuiText and GA_LabelImage.
  1721. // The next two attributes are mutually exclusive.
  1722. GA_Image = (GA_Dummy + $000A); // (PImage) Gadget imagry is an image
  1723. GA_Border = (GA_Dummy + $000B); // (PBorder) Gadget imagry is a border
  1724. GA_SelectRender = (GA_Dummy + $000C); { [IS.] (PImage) Gadgets' image in selected state. Note that if
  1725. this is nil and GA_Image is in fact an image object, GA_Image may be
  1726. tried to be drawn with IDS_SELECTED. So you do not need to fill this in,
  1727. if you wish to have a special selected image and GA_Image is an image
  1728. object that supports the selected state.}
  1729. GA_Highlight = (GA_Dummy + $000D); // [IS.] (LongWord) Takes GFLG_GADGH* flags as argument. Used to specify the highlighting technique.
  1730. GA_Disabled = (GA_Dummy + $000E); // [ISG] (LongBool) If this is set to true, the gadget is not selectable. Often this is visually represented by using a special disabled pattern.
  1731. // Additional information.
  1732. GA_GZZGadget = (GA_Dummy + $000F); // [IS.] (LongBool) The Gadget is a GimmeZeroZero gadget. Default = False
  1733. GA_ID = (GA_Dummy + $0010); // (LongInt) Gadget ID assigned by the application (prevent double numbers)
  1734. GA_UserData = (GA_Dummy + $0011); // [ISG] (IPTR) Fill with whatever you want to. This field is ignored by the system.
  1735. GA_SpecialInfo = (GA_Dummy + $0012); { [IS.] (APTR) Pointer to additional information, needed by some gadgets
  1736. (like string or integer gadgets). This field should generally only be set
  1737. by subclasses of GadgetClass. Applications should keep their hands off it.}
  1738. // Gadget activation.
  1739. GA_Selected = (GA_Dummy + $0013); // [ISG] (LongBool) Indicate whether the gadget is selected or not. Default = False
  1740. GA_EndGadget = (GA_Dummy + $0014); // [IS.] (LongBool) Only used for requester gadgets. This tells intuition that the requester is to be closed, when the gadget is released. Default = False
  1741. GA_Immediate = (GA_Dummy + $0015); // [IS.] (LongBool) If set the gadget responds immediatly, when the gadget is selected. Default = False
  1742. GA_RelVerify = (GA_Dummy + $0016); // [IS.] (LongBool) If set the gadget responds, when it is released from selected state. Default = False
  1743. GA_FollowMouse = (GA_Dummy + $0017); // [IS.] (LongBool) If this is set, the gadget receives information about the movement of the mouse as long as it is activated. Default = False
  1744. GA_RightBorder = (GA_Dummy + $0018); // [IS.] (LongBool) Indicate whether the gadget is in the right border or not. Default = False.
  1745. GA_LeftBorder = (GA_Dummy + $0019); // [IS.] (LongBool) Indicate whether the gadget is in the left border or not. Default = False.
  1746. GA_TopBorder = (GA_Dummy + $001A); // [IS.] (LongBool) Indicate whether the gadget is in the top border or not. Default = False.
  1747. GA_BottomBorder = (GA_Dummy + $001B); // [IS.] (LongBool) Indicate whether the gadget is in the bottom border or not. Default = False.
  1748. GA_ToggleSelect = (GA_Dummy + $001C); // [IS.] (LongBool) Indicate whether the gadget is toggle-selected or not. Default = False.
  1749. // The following two attributes are PRIVATE!
  1750. GA_SysGadget = (GA_Dummy + $001D); // [IS.] (LongBool) Set, if gadget is a system-gadget e.g. a standard window border gadget. Default = False.
  1751. GA_SysGType = (GA_Dummy + $001E); // [IS.] (LongWord) Reserved for system use to indicate the gadget type.
  1752. // Gadget linking.
  1753. GA_Previous = (GA_Dummy + $001F); { [I..] (PGadget) Pointer to previous gadget. This is used to link
  1754. the current gadget into a gadget list, before this list is used. It can
  1755. not be used to add a gadget to a list of an open window or requester!}
  1756. GA_Next = (GA_Dummy + $0020); // [I..] (PGadget) Next gadget in the linked list. Currently not implemented.
  1757. GA_DrawInfo = (GA_Dummy + $0021); { [I..] (PDrawInfo) Some gadgets need a DrawInfo structure
  1758. to be able to perform correct rendering. Read the documentation of the
  1759. subclasses to learn, which need this attribute. To be on the safe side,
  1760. you can always supply it.}
  1761. // You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage
  1762. GA_IntuiText = (GA_Dummy + $0022); // [IS.] (PIntuiText) Label is an IntuiText.
  1763. GA_LabelImage = (GA_Dummy + $0023); // [IS.] (PObject_) Label is an image object.
  1764. GA_TabCycle = (GA_Dummy + $0024); // [IS.] (LongBool) If set to true that gadget participates in TAB handling, i.e. if tab is pressed, the next gadget is activated.
  1765. GA_GadgetHelp = (GA_Dummy + $0025); // [..G] (LongBool) If this is set by the gadget, the sends GADGETHELP messages.
  1766. GA_Bounds = (GA_Dummy + $0026); // [IS.] (PIBox) Bounds to be copied into the ExtGadget structure.
  1767. GA_RelSpecial = (GA_Dummy + $0027); { [IS.] (Long) This attribute should only be set by subclasses of
  1768. GadgetClass. Applications should keep their hands away!
  1769. If set this means, that GM_LAYOUT is called, when the window it is in is
  1770. opened or its size changes. This allows gadgets to make their own size
  1771. dependent on the size of the window. }
  1772. GA_TextAttr = GA_Dummy + 40; // [IS.] (PTextAttr) Indicate the font to use for the gadget.
  1773. GA_ReadOnly = GA_Dummy + 41; // (LongBool) Indicate that the gadget is read-only (non-selectable). Default = False
  1774. GA_Underscore = GA_Dummy + 42; // (Char) Underscore/escape character for keyboard shortcuts. Defaults = '_'
  1775. GA_ActivateKey = GA_Dummy + 43; // (PChar) Set/Get the gadgets shortcut/activation key(s) Default = nil
  1776. GA_BackFill = GA_Dummy + 44; // (PHook) Backfill pattern hook. Defaults to nil.
  1777. GA_GadgetHelpText = GA_Dummy + 45; // (PChar) RESERVERD/PRIVATE DO NOT USE. Default = nil
  1778. GA_UserInput = GA_Dummy + 46; // (LongBool) Notification tag indicates this notification is from the activite gadget receiving user input - an attempt to make IDCMPUPDATE more efficient.
  1779. // Aros Specifics
  1780. GA_LabelPlace = GA_Dummy + 100; { [I..] (LongInt) Choose the placing of the label. GadgetClass does not support
  1781. this directly. Its subclasses have to take care of that. For possible values see GV_* .}
  1782. // Placetext values for GA_LabelPlace.
  1783. GV_LabelPlace_In = 1;
  1784. GV_LabelPlace_Left = 2;
  1785. GV_LabelPlace_Right = 3;
  1786. GV_LabelPlace_Above = 4;
  1787. GV_LabelPlace_Below = 5;
  1788. //*** PropGClass
  1789. // This class defines a standard proportional gadget.
  1790. PGA_Dummy = TAG_USER + $31000;
  1791. PGA_Freedom = PGA_Dummy + 1; // [IS.] (LongWord) Define in which the direction gadget should stretch. Possible values are FREEVERT and FREEHORIZ
  1792. PGA_Borderless = PGA_Dummy + 2; // [IS.] (LongBool) If set, no border will be rendered.
  1793. // The following four attributes should not be used with PGA_Total, PGA_Visible and PGA_Top.
  1794. PGA_HorizPot = PGA_Dummy + 3; // [ISG] (Word)
  1795. PGA_HorizBody = PGA_Dummy + 4; // [ISG] (Word)
  1796. PGA_VertPot = PGA_Dummy + 5; // [ISG] (Word)
  1797. PGA_VertBody = PGA_Dummy + 6; // [ISG] (Word)
  1798. // The following three attributes should not be used with the PGA_*Pot and PGA_*Body attributes.
  1799. PGA_Total = PGA_Dummy + 7; // [IS.] (Word) The total number of positions in the gadget.
  1800. PGA_Visible = PGA_Dummy + 8; // [IS.] (Word) The number of visible positions in the gadget.
  1801. PGA_Top = PGA_Dummy + 9; // [ISG] (Word) The first visible position.
  1802. PGA_NewLook = PGA_Dummy + 10; // [IS.] (LongBool) If set, this indicated that the new look should be used for rendering.
  1803. PGA_DisplayHook = PGA_Dummy + 11; // [I.G] (PHook) Use this Hook to render the Gadget visuals
  1804. PGA_NotifyBehaviour = PGA_Dummy + 30; { [I..] (Word) If set to PG_BEHAVIOUR_NICE OM_NOTIFY messages are sent
  1805. also during OM_SET/OM_UPDATE, not just when user drags the knob, which is the default behaviour (PG_BEHAVIOUR_COMPATIBLE)}
  1806. PGA_RenderBehaviour = PGA_Dummy + 31; { [I..] (Word) If set to PG_BEHAVIOUR_NICE the gadget is re-rendered
  1807. during OM_SET/OM_UPDATE even when being a subclass of propgclass.
  1808. The default behaviour (PG_BEHAVIOUR_COMPATIBLE) is that subclasses
  1809. of propgclass don't render in OM_SET/OM_UPDATE }
  1810. // Flags for PGA_*Behaviour
  1811. PG_BEHAVIOUR_COMPATIBLE = 0;
  1812. PG_BEHAVIOUR_NICE = 1;
  1813. // StrGClass StringGClass is just a normal "string" gadget.
  1814. STRINGA_Dummy = TAG_USER + $32000;
  1815. STRINGA_MaxChars = STRINGA_Dummy + 1; // [I..] (SmallInt) Maximum number of characters the string gadget accepts. Default SG_DEFAULTMAXCHARS.
  1816. STRINGA_Buffer = STRINGA_Dummy + 2; // [I..] (STRPTR) Buffer for storing the current string of the gadget.
  1817. STRINGA_UndoBuffer = STRINGA_Dummy + 3; // [I..] (STRPTR) Buffer for storing the old (undo) string of the gadget.
  1818. STRINGA_WorkBuffer = STRINGA_Dummy + 4; // [I..] (STRPTR) Buffer for the class to work with.
  1819. STRINGA_BufferPos = STRINGA_Dummy + 5; // [IS.] (SmallInt) Current position of cursor (relative to the beginning of the buffer).
  1820. STRINGA_DispPos = STRINGA_Dummy + 6; // [IS.] (SmallInt) FIXME
  1821. STRINGA_AltKeyMap = STRINGA_Dummy + 7; // [IS.] (PKeyMap) KeyMap to use
  1822. STRINGA_Font = STRINGA_Dummy + 8; // [IS.] (PTextFont) Font to use for displaying the string
  1823. STRINGA_Pens = STRINGA_Dummy + 9; // [IS.] (LongInt) The lower 16 bits specify the background-pen, the upper 16 bits the foreground-pen. The gadget is rendered, using these pens, if the gadget is inactive
  1824. STRINGA_ActivePens = STRINGA_Dummy + 10; // [IS.] (LongInt) Like STRINGA_Pens. These pens are used, if the gadget is active.
  1825. STRINGA_EditHook = STRINGA_Dummy + 11; // [I..] (PHook) FIXME
  1826. STRINGA_EditModes = STRINGA_Dummy + 12; // [IS.] (LongWord) FIXME
  1827. STRINGA_ReplaceMode = STRINGA_Dummy + 13; // [IS.] (BOOL) If this is TRUE, the current character is overwritten, if the use presses a key. Otherwise, the new character is inserted.
  1828. STRINGA_FixedFieldMode = STRINGA_Dummy + 14; // [IS.] (LongBool) FIXME
  1829. STRINGA_NoFilterMode = STRINGA_Dummy + 15; // [IS.] (LongBool) FIXME
  1830. STRINGA_Justification = STRINGA_Dummy + 16; // [IS.] (UWORD) Where should the text be justified? Use one of GACT_STRINGCENTER, GACT_STRINGLEFT and GACT_STRINGRIGHT
  1831. STRINGA_LongVal = STRINGA_Dummy + 17; // [ISG] (LONG) If this is set, the string gadget will only accept numeric values. Argument is the number, the string gadget is to be set to. When getting this attribute, this number is returned.
  1832. STRINGA_TextVal = STRINGA_Dummy + 18; // [ISG] (STRPTR) If this is set, the string gadget will accept strings. Argument is a string that is to be copied into the string gadget and its buffer.
  1833. STRINGA_ExitHelp = STRINGA_Dummy + 19; // [IS.] (BOOL) If this is set, pressing the "Help" key, while the gadget is active, will unselect the gadget.
  1834. SG_DEFAULTMAXCHARS = 128; // Default, if STRINGA_MaxChars is not set.
  1835. // Gadget Layout related attributes
  1836. LAYOUTA_Dummy = TAG_USER + $38000;
  1837. LAYOUTA_LayoutObj = LAYOUTA_Dummy + 1;
  1838. LAYOUTA_Spacing = LAYOUTA_Dummy + 2;
  1839. LAYOUTA_Orientation = LAYOUTA_Dummy + 3; // Orientation LORIENT_*
  1840. LAYOUTA_ChildMaxWidth = LAYOUTA_Dummy + 4; // (BOOL) Child objects are of equal width. Should default to True for gadgets with a horizontal orientation.
  1841. LAYOUTA_ChildMaxHeight = LAYOUTA_Dummy + 5; // (BOOL) Child objects are of equal height. Should default to True for gadgets with a vertical orientation.
  1842. // orientation values for LAYOUTA_Orientation
  1843. LORIENT_NONE = 0;
  1844. LORIENT_HORIZ = 1;
  1845. LORIENT_VERT = 2;
  1846. // Gadget Method ID's
  1847. GM_Dummy = -1; // not used for anything
  1848. GM_HITTEST = 0; // return GMR_GADGETHIT IF you are clicked on (whether or not you are disabled).
  1849. GM_RENDER = 1; // draw yourself, in the appropriate state
  1850. GM_GOACTIVE = 2; // you are now going to be fed input
  1851. GM_HANDLEINPUT = 3; // handle that input
  1852. GM_GOINACTIVE = 4; // whether or not by choice, you are done
  1853. GM_HELPTEST = 5; // Will you send gadget help if the mouse is at the specified coordinates? See below for possible GMR_ values. }
  1854. GM_LAYOUT = 6; // re-evaluate your size based on the GadgetInfo Domain. Do NOT re-render yourself yet, you will be called when it is time...
  1855. GM_DOMAIN = 7; // This method is invoked to learn about the sizing requirements of your class, before an object is created.
  1856. // Parameter "Messages" passed to gadget class methods
  1857. type
  1858. // GM_HITTEST
  1859. { This method is used to test, if a mouse-click hit the gadget. You return
  1860. GMR_GADGETHIT (see below), if you were hit and 0 otherwise. Note that you
  1861. have to test, if you were hit, no matter if you are disabled or not.}
  1862. PgpHitTest = ^TgpHitTest;
  1863. TgpHitTest = record // record with stacked fields
  1864. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1865. MethodID: LongWord; // GM_HITEST or GM_HELPTEST
  1866. gpht_GInfo: PGadgetInfo;
  1867. gpht_Mouse: record // These values are relative to the gadget select box for GM_HITTEST. For
  1868. x: SmallInt; // GM_HELPTEST they are relative to the bounding box (which is often
  1869. y: SmallInt; // equal to the select box).
  1870. pad_align: record end; // properly pad previous field if applicable
  1871. end;
  1872. pad_align: record end; // properly pad previous field if applicable
  1873. {$POP}
  1874. end;
  1875. const
  1876. GMR_GADGETHIT = $00000004; // GM_HITTEST hit
  1877. GMR_NOHELPHIT = $00000000; // GM_HELPTEST didn't hit
  1878. GMR_HELPHIT = $FFFFFFFF; // GM_HELPTEST hit, The gadget was hit. The lower word of the Code field of the IntuiMessage will be set to -1.
  1879. GMR_HELPCODE = $00010000; // GM_HELPTEST hit, return low Word as code. The gadget was hit. Pass the lower word, returned by this method to the application by using the Code field of the IntuiMessage.
  1880. type
  1881. // GM_RENDER This method is invoked to draw the gadget into a rastport.
  1882. PgpRender = ^TgpRender;
  1883. TgpRender = record // record with stacked fields
  1884. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1885. MethodID: LongWord; // GM_RENDER
  1886. gpr_GInfo: PGadgetInfo; // gadget context
  1887. gpr_RPort: PRastPort; // all ready for use
  1888. gpr_Redraw: LongInt; // might be a "highlight pass" (GREDRAW_*)
  1889. pad_align: record end; // properly pad previous field if applicable
  1890. {$POP}
  1891. end;
  1892. const
  1893. // gpr_Redraw. Not all of these values make sense for all gadgets.
  1894. GREDRAW_UPDATE = 2; // incremental update. Some data (e.g. the level of a slider) was updated. Just redraw the necessary parts.
  1895. GREDRAW_REDRAW = 1; // redraw the whole gadget
  1896. GREDRAW_TOGGLE = 0; // toggle highlight, IF applicable
  1897. type
  1898. // GM_GOACTIVE, GM_HANDLEINPUT
  1899. {GM_GOACTIVE tells the gadget that it has become active and will receive
  1900. input from now on from the method GM_HANDLEINPUT. This is stopped by using
  1901. GM_GOINACTIVE (see below).
  1902. GM_GOACTIVE and GM_HANDLEINPUT both use the same structure and return the
  1903. same values, as defined below.}
  1904. PgpInput = ^TgpInput;
  1905. TgpInput = record // record with stacked fields
  1906. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1907. MethodID: LongWord; // GM_GOACTIVE or GM_HANDLEINPUT
  1908. gpi_GInfo: PGadgetInfo; // gadget context
  1909. gpi_IEvent: PInputEvent; // Pointer to the InputEvent that caused the method to be invoked.
  1910. gpi_Termination: Pointer; { Pointer to a variable that is to be set by the gadget class, if
  1911. GMR_VERIFY is returned. The lower 16 bits of this value are returned
  1912. in the Code field of the IntuiMessage passed back to the application}
  1913. gpi_Mouse: record // This struct defines the current mouse position, relative to the gadgets' bounding box.
  1914. x: SmallInt;
  1915. y: SmallInt;
  1916. pad_align: record end; // properly pad previous field if applicable
  1917. end;
  1918. gpi_TabletData: PTabletData; { Pointer to TabletData structure or nil,
  1919. if this input event did not originate from a tablet that is capable of
  1920. sending IESUBCLASS_NEWTABLET events.}
  1921. pad_align: record end; // properly pad previous field if applicable
  1922. {$POP}
  1923. end;
  1924. const
  1925. // GM_HANDLEINPUT and GM_GOACTIVE return code flags. These are actually flags and may be or'ed.
  1926. GMR_MEACTIVE = 0; // Gadget is still alive.
  1927. GMR_NOREUSE = 1 shl 1; // Gadget has become inactive, but the input event may not be used again.
  1928. GMR_REUSE = 1 shl 2; // Gadget has become inactive, and the input event may be reused by intuition.
  1929. GMR_VERIFY = 1 shl 3; // Gadget was selected. Generate IDCMP_GADGETUP message. gpi_Termination must be set.
  1930. { If one of the following two flags is returned, the gadget has become
  1931. inactive, but the next or previous gadget, which has the GFLG_TABCYCLE flag
  1932. set is to be activated.}
  1933. GMR_NEXTACTIVE = 1 shl 4; // Activate next gadget.
  1934. GMR_PREVACTIVE = 1 shl 5; // Activate previous gadget.
  1935. type
  1936. // GM_GOINACTIVE see GM_GOACTIVE for explanation
  1937. PgpGoInactive = ^TgpGoInactive;
  1938. TgpGoInactive = record // record with stacked fields
  1939. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1940. MethodID: LongWord; // GM_GOINACTIVE
  1941. gpgi_GInfo: PGadgetInfo;
  1942. gpgi_Abort: LongWord; { Boolean field to indicate, who wanted the gadget to go inactive. If
  1943. this is 1 this method was sent, because intution wants the gadget to
  1944. go inactive, if it is 0, it was the gadget itself that wanted it.}
  1945. pad_align: record end; // properly pad previous field if applicable
  1946. {$POP}
  1947. end;
  1948. type
  1949. // GM_LAYOUT
  1950. { This method is called by intuition, if on of the GFLG_REL flags or one of
  1951. the GA_Rel attributes is set and the window size changes or you are added to
  1952. a window. In this method you should re-evaluate the size of yourself. You
  1953. are not allowed to do any rendering operation during this method!}
  1954. PgpLayout = ^TgpLayout;
  1955. TgpLayout = record // record with stacked fields
  1956. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1957. MethodID: LongWord; // GM_LAYOUT
  1958. gpl_GInfo: PGadgetInfo;
  1959. gpl_Initial: LongWord; {Boolean that indicated, if this method was invoked, when you are added
  1960. to a window (True) or if it is called, because the window was resized
  1961. (False).}
  1962. pad_align: record end; // properly pad previous field if applicable
  1963. {$POP}
  1964. end;
  1965. // GM_DOMAIN
  1966. { This method is invoked to learn about the sizing requirements of your class,
  1967. before an object is created. This is AROS specific.}
  1968. PgpDomain = ^TgpDomain;
  1969. TgpDomain = record // record with stacked fields
  1970. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  1971. MethodID: LongWord; // GM_DOMAIN
  1972. gpd_GInfo: PGadgetInfo;
  1973. gpd_RPort: PRastPort; // RastPort to calculate dimensions for.
  1974. gpd_Which: LONG; // what to calculate (GDOMAIN_*)
  1975. gpd_Domain: TIBox; // Resulting domain
  1976. gpd_Attrs: PTagItem; // Additional attributes. None defines yet
  1977. pad_align: record end; // properly pad previous field if applicable
  1978. {$POP}
  1979. end;
  1980. const
  1981. // gpd_Which
  1982. GDOMAIN_MINIMUM = 0; // Calculate minimum size.
  1983. GDOMAIN_NOMINAL = 1; // Calculate nominal size.
  1984. GDOMAIN_MAXIMUM = 2; // Calculate maximum size.
  1985. const
  1986. ICM_Dummy = $0401; // used for nothing
  1987. // no parameters for ICM_SETLOOP, ICM_CLEARLOOP, ICM_CHECKLOOP
  1988. ICM_SETLOOP = ICM_Dummy + 1; // set/increment loop counter
  1989. ICM_CLEARLOOP = ICM_Dummy + 2; // clear/decrement loop counter
  1990. ICM_CHECKLOOP = ICM_Dummy + 3; // set/increment loop
  1991. // interconnection attributes used by icclass, modelclass, and gadgetclass
  1992. ICA_Dummy = TAG_USER + $40000;
  1993. ICA_TARGET = ICA_Dummy + 1; // interconnection target
  1994. ICA_MAP = ICA_Dummy + 2; // interconnection map tagitem list
  1995. ICSPECIAL_CODE = ICA_Dummy + 3; // a "pseudo-attribute", see below.
  1996. { Normally, the value for ICA_TARGET is some object pointer,
  1997. but if you specify the special value ICTARGET_IDCMP, notification
  1998. will be send as an IDCMP_IDCMPUPDATE message to the appropriate window's
  1999. IDCMP port. See the definition of IDCMP_IDCMPUPDATE.
  2000. When you specify ICTARGET_IDCMP for ICA_TARGET, the map you
  2001. specify will be applied to derive the attribute list that is
  2002. sent with the IDCMP_IDCMPUPDATE message. If you specify a map list
  2003. which results in the attribute tag id ICSPECIAL_CODE, the
  2004. lower sixteen bits of the corresponding ti_Data value will
  2005. be copied into the Code field of the IDCMP_IDCMPUPDATE IntuiMessage.}
  2006. ICTARGET_IDCMP = not 0;
  2007. const
  2008. // if image.Depth is this, it's a new Image class object
  2009. CUSTOMIMAGEDEPTH = -1;
  2010. // Attributes for IMAGECLASS
  2011. IA_Dummy = TAG_USER + $20000;
  2012. IA_Left = IA_Dummy + $01;
  2013. IA_Top = IA_Dummy + $02;
  2014. IA_Width = IA_Dummy + $03;
  2015. IA_Height = IA_Dummy + $04;
  2016. IA_FGPen = IA_Dummy + $05; // IA_FGPen also means "PlanePick"
  2017. IA_BGPen = IA_Dummy + $06; // IA_BGPen also means "PlaneOnOff"
  2018. IA_Data = IA_Dummy + $07; // bitplanes, for classic image, other image classes may use it for other things
  2019. IA_LineWidth = IA_Dummy + $08;
  2020. IA_Pens = IA_Dummy + $0E; // pointer to UWord pens[], ala DrawInfo.Pens, MUST be terminated by (not 0). Some classes can choose to have this, or SYSIA_DrawInfo, or both.
  2021. IA_Resolution = IA_Dummy + $0F; // packed uwords for x/y resolution into a LongWord ala DrawInfo.Resolution
  2022. // see class documentation to learn which classes recognize these
  2023. IA_APattern = IA_Dummy + $10;
  2024. IA_APatSize = IA_Dummy + $11;
  2025. IA_Mode = IA_Dummy + $12;
  2026. IA_Font = IA_Dummy + $13;
  2027. IA_Outline = IA_Dummy + $14;
  2028. IA_Recessed = IA_Dummy + $15;
  2029. IA_DoubleEmboss = IA_Dummy + $16;
  2030. IA_EdgesOnly = IA_Dummy + $17; // to specify that the interior of a frame should not be cleared
  2031. // SYSICLASS attributes
  2032. SYSIA_Size = IA_Dummy + $0B; // see below SYSISIZE_*
  2033. SYSIA_Depth = IA_Dummy + $0C;
  2034. SYSIA_Which = IA_Dummy + $0D; // see below
  2035. SYSIA_UserBuffer = IA_Dummy + $20; // Only for system Images
  2036. SYSIA_DrawInfo = IA_Dummy + $18; // Must be specified
  2037. SYSIA_ReferenceFont = IA_Dummy + $19; // Font to use as reference for scaling certain sysiclass images
  2038. IA_SupportsDisable = IA_Dummy + $1a; // Tell intuition to use IDS_*DISABLED instead of own code
  2039. IA_FrameType = IA_Dummy + $1b; // Starting with V39, FrameIClass recognizes several standard types of frame. Use one of the FRAME_* specifiers below. Default = FRAME_DEFAULT.
  2040. // Private AROS sysiclass tags and defines
  2041. SYSIA_WithBorder = IA_FGPen; // default: True
  2042. SYSIA_Style = IA_BGPen; // default: SYSISTYLE_NORMAL
  2043. SYSISTYLE_NORMAL = 0;
  2044. SYSISTYLE_GADTOOLS = 1; // to get arrow images in gadtools look
  2045. // data values for SYSIA_Size
  2046. SYSISIZE_MEDRES = 0;
  2047. SYSISIZE_LOWRES = 1;
  2048. SYSISIZE_HIRES = 2;
  2049. // SYSIA_Which tag data values: Specifies which system gadget you want an image for. Some numbers correspond to internal Intuition
  2050. DEPTHIMAGE = $00; // Window depth gadget image
  2051. ZOOMIMAGE = $01; // Window zoom gadget image
  2052. SIZEIMAGE = $02; // Window sizing gadget image
  2053. CLOSEIMAGE = $03; // Window close gadget image
  2054. SDEPTHIMAGE = $05; // Screen depth gadget image
  2055. LEFTIMAGE = $0A; // Left-arrow gadget image
  2056. UPIMAGE = $0B; // Up-arrow gadget image
  2057. RIGHTIMAGE = $0C; // Right-arrow gadget image
  2058. DOWNIMAGE = $0D; // Down-arrow gadget image
  2059. CHECKIMAGE = $0E; // GadTools checkbox image
  2060. MXIMAGE = $0F; // GadTools mutual exclude "button" image
  2061. MENUCHECK = $10; // Menu checkmark image
  2062. AMIGAKEY = $11; // Menu Amiga-key image
  2063. // Data values for IA_FrameType (recognized by FrameIClass)
  2064. FRAME_DEFAULT = 0; // The standard V37-type frame, which has thin edges.
  2065. FRAME_BUTTON = 1; // Standard button gadget frames, having thicker sides and nicely edged corners.
  2066. FRAME_RIDGE = 2; // A ridge such as used by standard string gadgets. You can recess the ridge to get a groove image.
  2067. FRAME_ICONDROPBOX = 3; // A broad ridge which is the standard imagery for areas in AppWindows where icons may be dropped.
  2068. // image message id's
  2069. IM_DRAW = $202; // draw yourself, with "state"
  2070. IM_HITTEST = $203; // return True if click hits image
  2071. IM_ERASE = $204; // erase yourself
  2072. IM_MOVE = $205; // draw new and erase old, smoothly
  2073. IM_DRAWFRAME = $206; // draw with specified dimensions
  2074. IM_FRAMEBOX = $207; // get recommended frame around some box
  2075. IM_HITFRAME = $208; // hittest with dimensions
  2076. IM_ERASEFRAME = $209; // hittest with dimensions
  2077. // image draw states or styles, for IM_DRAW
  2078. IDS_NORMAL = 0;
  2079. IDS_SELECTED = 1; // for selected gadgets
  2080. IDS_DISABLED = 2; // for disabled gadgets
  2081. IDS_BUSY = 3; // for future functionality
  2082. IDS_INDETERMINATE = 4; // for future functionality
  2083. IDS_INACTIVENORMAL = 5; // normal, in inactive window border
  2084. IDS_INACTIVESELECTED = 6; // selected, in inactive border
  2085. IDS_INACTIVEDISABLED = 7; // disabled, in inactive border
  2086. IDS_SELECTEDDISABLED = 8; // disabled and selected
  2087. type
  2088. // IM_FRAMEBOX
  2089. PimpFrameBox = ^TimpFrameBox;
  2090. TimpFrameBox = record // record with stacked fields
  2091. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2092. MethodID: LongWord;
  2093. imp_ContentsBox: PIBox; // input: relative box of contents
  2094. imp_FrameBox: PIBox; // output: rel. box of encl frame
  2095. imp_DrInfo: PDrawInfo; // may be nil
  2096. imp_FrameFlags: LongWord;
  2097. pad_align: record end; // properly pad previous field if applicable
  2098. {$POP}
  2099. end;
  2100. const
  2101. FRAMEF_SPECIFY = 1 shl 0; // Make do with the dimensions of FrameBox provided.
  2102. type
  2103. PimpPos = ^TimpPos;
  2104. TimpPos = record // record with stacked fields
  2105. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2106. X: SmallInt;
  2107. Y: SmallInt;
  2108. pad_align: record end; // properly pad previous field if applicable
  2109. {$POP}
  2110. end;
  2111. PimpSize = ^TimpSize;
  2112. TimpSize = record // record with stacked fields
  2113. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2114. Width: SmallInt;
  2115. Height: SmallInt;
  2116. pad_align: record end; // properly pad previous field if applicable
  2117. {$POP}
  2118. end;
  2119. // IM_DRAW, IM_DRAWFRAME
  2120. PimpDraw = ^TimpDraw;
  2121. TimpDraw = record // record with stacked fields
  2122. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2123. MethodID: LongWord;
  2124. imp_RPort: PRastPort;
  2125. imp_Offset: TimpPos;
  2126. imp_State: LongWord;
  2127. imp_DrInfo: PDrawInfo; // May be nil
  2128. imp_Dimensions: TimpSize; // Only valid for IM_DRAWFRAME
  2129. pad_align: record end; // properly pad previous field if applicable
  2130. {$POP}
  2131. end;
  2132. // IM_ERASE, IM_ERASEFRAME NOTE: This is a subset of TimpDraw
  2133. PimpErase = ^TimpErase;
  2134. TimpErase = record // record with stacked fields
  2135. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2136. MethodID: LongWord;
  2137. imp_RPort: PRastPort;
  2138. imp_Offset: TimpPos;
  2139. imp_Dimensions: TimpSize; // // Only valid for IM_DRAWFRAME
  2140. pad_align: record end; // properly pad previous field if applicable
  2141. {$POP}
  2142. end;
  2143. // IM_HITTEST, IM_HITFRAME
  2144. PimpHitTest = ^TimpHitTest;
  2145. TimpHitTest = record // record with stacked fields
  2146. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2147. MethodID: LongWord;
  2148. imp_Point: TimpPos;
  2149. imp_Dimensions: TimpSize; // only valid for IM_HITFRAME
  2150. pad_align: record end; // properly pad previous field if applicable
  2151. {$POP}
  2152. end;
  2153. // 'boopsi' pointer class interface
  2154. const
  2155. // The following tags are recognized at NewObject() time by pointerclass
  2156. POINTERA_Dummy = TAG_USER + $39000;
  2157. POINTERA_BitMap = POINTERA_Dummy + $01; // (PBitmap) Pointer to bitmap to get pointer imagery from. Bitplane data need not be in chip RAM.
  2158. POINTERA_XOffset = POINTERA_Dummy + $02; // (LongInt) - X-offset of the pointer hotspot.
  2159. POINTERA_YOffset = POINTERA_Dummy + $03; // (LongInt) - Y-offset of the pointer hotspot.
  2160. POINTERA_WordWidth = POINTERA_Dummy + $04; // (LongWord) - designed width of the pointer in words
  2161. POINTERA_XResolution = POINTERA_Dummy + $05; // (LongWord) - one of the POINTERXRESN_ flags below
  2162. POINTERA_YResolution = POINTERA_Dummy + $06; // (LongWord) - one of the POINTERYRESN_ flags below
  2163. // These are the choices for the POINTERA_XResolution attribute which
  2164. // will determine what resolution pixels are used for this pointer.
  2165. POINTERXRESN_DEFAULT = 0; // (ECS-compatible pointer width) = 70 ns if SUPERHIRES-type mode, 140 ns if not
  2166. POINTERXRESN_140NS = 1; // (pointer always in 140 ns pixels) = 140 ns always
  2167. POINTERXRESN_70NS = 2; // (pointer always in 70 ns pixels) = 70 ns always
  2168. POINTERXRESN_35NS = 3; // (pointer always in 35 ns pixels) = 35 ns always
  2169. POINTERXRESN_SCREENRES = 4; // Same as pixel speed of screen
  2170. POINTERXRESN_LORES = 5; // (pointer always in lores-like pixels) = 140 ns in 15kHz modes, 70 ns in 31kHz modes
  2171. POINTERXRESN_HIRES = 6; // (pointer always in hires-like pixels) = 70 ns in 15kHz modes, 35 ns in 31kHz modes
  2172. { These are the choices for the POINTERA_YResolution attribute which
  2173. will determine what vertical resolution is used for this pointer.
  2174. POINTERYRESN_DEFAULT
  2175. = In 15 kHz modes, the pointer resolution will be the same
  2176. as a non-interlaced screen. In 31 kHz modes, the pointer
  2177. will be doubled vertically. This means there will be about
  2178. 200-256 pointer lines per screen.
  2179. POINTERYRESN_HIGH
  2180. POINTERYRESN_HIGHASPECT
  2181. = Where the hardware/software supports it, the pointer resolution
  2182. will be high. This means there will be about 400-480 pointer
  2183. lines per screen. POINTERYRESN_HIGHASPECT also means that
  2184. when the pointer comes out double-height due to hardware/software
  2185. restrictions, its width would be doubled as well, if possible
  2186. (to preserve aspect).
  2187. POINTERYRESN_SCREENRES
  2188. POINTERYRESN_SCREENRESASPECT
  2189. = Will attempt to match the vertical resolution of the pointer
  2190. to the screen's vertical resolution. POINTERYRESN_SCREENASPECT also
  2191. means that when the pointer comes out double-height due to
  2192. hardware/software restrictions, its width would be doubled as well,
  2193. if possible (to preserve aspect).}
  2194. POINTERYRESN_DEFAULT = 0;
  2195. POINTERYRESN_HIGH = 2;
  2196. POINTERYRESN_HIGHASPECT = 3;
  2197. POINTERYRESN_SCREENRES = 4;
  2198. POINTERYRESN_SCREENRESASPECT = 5;
  2199. type
  2200. PSGWork = ^TSGWork;
  2201. TSGWork = record
  2202. // set up when gadget is first activated }
  2203. Gadget: PGadget; // the contestant itself
  2204. StringInfo: PStringInfo; // easy access to sinfo
  2205. WorkBuffer: STRPTR; // intuition's planned result
  2206. PrevBuffer: STRPTR; // what was there before
  2207. Modes: LongWord; // current mode
  2208. // modified for each input event
  2209. IEvent: PInputEvent; // actual event: do not change
  2210. Code: Word; // character code, IF one Byte
  2211. BufferPos: SmallInt; // cursor position
  2212. NumChars: SmallInt;
  2213. Actions: LongWord; // what Intuition will do
  2214. LongInt_: LongInt; // temp storage for LongInt
  2215. GadgetInfo: PGadgetInfo;
  2216. EditOp: Word; // from constants below
  2217. end;
  2218. { TSGWork.EditOp - These values indicate what basic type of operation the global editing hook has performed on the string before your gadget's custom
  2219. editing hook gets called. You do not have to be concerned with the value your custom hook leaves in the EditOp field, only if you write a global editing hook.
  2220. For most of these general edit operations, you'll want to compare the BufferPos and NumChars of the StringInfo (before global editing) and SGWork (after global editing).}
  2221. const
  2222. EO_NOOP = $0001; // did nothing
  2223. EO_DELBACKWARD = $0002; // deleted some chars (maybe 0).
  2224. EO_DELFORWARD = $0003; // deleted some characters under and in front of the cursor
  2225. EO_MOVECURSOR = $0004; // moved the cursor
  2226. EO_ENTER = $0005; // "enter" or "return" key, terminate
  2227. EO_RESET = $0006; // current Intuition-style undo
  2228. EO_REPLACECHAR = $0007; // replaced one character and (maybe) advanced cursor
  2229. EO_INSERTCHAR = $0008; // inserted one char into string or added one at end
  2230. EO_BADFORMAT = $0009; // didn't like the text data, e.g., Bad LONGINT
  2231. EO_BIGCHANGE = $000A; // unused by Intuition complete or major change to the text, e.g. new string
  2232. EO_UNDO = $000B; // unused by Intuition some other style of undo
  2233. EO_CLEAR = $000C; // clear the string
  2234. EO_SPECIAL = $000D; // unused by Intuition some operation that doesn't fit into the categories here
  2235. // Mode Flags definitions (ONLY first group allowed as InitialModes)
  2236. SGM_REPLACE = 1 shl 0; // replace mode please initialize StringInfo with in-range value of BufferPos if you are using SGM_REPLACE mode.
  2237. SGM_FIXEDFIELD = 1 shl 1; // fixed length buffer always set SGM_REPLACE, too
  2238. SGM_NOFILTER = 1 shl 2; // don't filter control chars
  2239. SGM_EXITHELP = 1 shl 7; // exit with code = $5F IF HELP hit
  2240. // These Mode Flags are for internal use only
  2241. SGM_NOCHANGE = 1 shl 3; // no edit changes yet
  2242. SGM_NOWORKB = 1 shl 4; // Buffer = PrevBuffer
  2243. SGM_CONTROL = 1 shl 5; // control char escape mode
  2244. SGM_LONGINT = 1 shl 6; // an intuition LongInt gadget
  2245. // String Gadget Action Flags (put in SGWork.Actions by EditHook)
  2246. SGA_USE = $1; // use contents of SGWork
  2247. SGA_END = $2; // terminate gadget, code in Code field
  2248. SGA_BEEP = $4; // flash the screen for the user
  2249. SGA_REUSE = $8; // reuse input event
  2250. SGA_REDISPLAY = $10; // gadget visuals changed
  2251. SGA_NEXTACTIVE = $20; // Make next possible gadget active.
  2252. SGA_PREVACTIVE = $40; // Make previous possible gadget active.
  2253. // function id for only existing custom string gadget edit hook
  2254. SGH_KEY = 1; // process editing keystroke
  2255. SGH_CLICK = 2; // process mouse click cursor position
  2256. { Here's a brief summary of how the custom string gadget edit hook works:
  2257. You provide a hook in StringInfo.Extension.EditHook. The hook is called in the standard way with the 'object' a pointer to SGWork,
  2258. and the 'message' a pointer to a command block, starting either with (LongWord) SGH_KEY, SGH_CLICK, or something new.
  2259. You return 0 if you don't understand the command (SGH_KEY is required and assumed). Return non-zero if you implement the command.
  2260. SGH_KEY:
  2261. There are no parameters following the command LongWord. Intuition will put its idea of proper values in the SGWork
  2262. before calling you, and if you leave SGA_USE set in the SGWork.Actions field, Intuition will use the values
  2263. found in SGWork fields WorkBuffer, NumChars, BufferPos, and LongInt, copying the WorkBuffer back to the StringInfo
  2264. Buffer.
  2265. NOTE WELL: You may NOT change other SGWork fields.
  2266. If you clear SGA_USE, the string gadget will be unchanged.
  2267. If you set SGA_END, Intuition will terminate the activation of the string gadget. If you also set SGA_REUSE, Intuition
  2268. will reuse the input event after it deactivates your gadget. In this case, Intuition will put the value found in SGWork.Code
  2269. into the IntuiMessage.Code field of the IDCMP_GADGETUP message it sends to the application.
  2270. If you set SGA_BEEP, Intuition will call DisplayBeep(); use this if the user has typed in error, or buffer is full.
  2271. Set SGA_REDISPLAY if the changes to the gadget warrant a gadget redisplay. Note: cursor movement requires a redisplay.
  2272. Starting in V37, you may set SGA_PREVACTIVE or SGA_NEXTACTIVE when you set SGA_END. This tells Intuition that you want
  2273. the next or previous gadget with GFLG_TABCYCLE to be activated.
  2274. SGH_CLICK:
  2275. This hook command is called when Intuition wants to position the cursor in response to a mouse click in the string gadget.
  2276. Again, here are no parameters following the command LongWord. This time, Intuition has already calculated the mouse position
  2277. character cell and put it in SGWork.BufferPos. The previous BufferPos value remains in the SGWork.StringInfo.BufferPos.
  2278. Intuition will again use the SGWork fields listed above for SGH_KEY. One restriction is that you are NOT allowed to set
  2279. SGA_END or SGA_REUSE for this command. Intuition will not stand for a gadget which goes inactive when you click in it.
  2280. You should always leave the SGA_REDISPLAY flag set, since Intuition uses this processing when activating a string gadget.}
  2281. type
  2282. { NewDecorator structure used by ChangeDecoration the three Objects (nd_Window, nd_Screen and nd_Menu must be installed and point to decorator objects
  2283. the port is used for different issues and will be filled up with DecoratorMessages}
  2284. PNewDecorator = ^TNewDecorator;
  2285. TNewDecorator = record
  2286. nd_Node: TNode;
  2287. nd_Port: PMsgPort;
  2288. nd_cnt: Word;
  2289. nd_Pattern: STRPTR;
  2290. nd_IntPattern: STRPTR; // Private, transformated Pattern be dos/ParsePattern()
  2291. nd_Window: PObject_;
  2292. nd_Screen: PObject_;
  2293. nd_Menu: PObject_;
  2294. end;
  2295. PDecoratorMessage = ^TDecoratorMessage;
  2296. TDecoratorMessage = record
  2297. dm_Message: TMagicMessage;
  2298. dm_Class: LongWord;
  2299. dm_Code: LongWord;
  2300. dm_Flags: LongWord;
  2301. dm_Object: IPTR;
  2302. end;
  2303. PScreenNotifyMessage = ^TScreenNotifyMessage;
  2304. TScreenNotifyMessage = record
  2305. snm_Message: PMagicMessage;
  2306. snm_Class: LongWord; // Notification Class ID same as SNA_Notify
  2307. snm_Code: LongWord; // Code only supported for ScreenDepth() and will put the Flags in
  2308. snm_Object: IPTR; // Pointer to the Object that caused this message
  2309. snm_UserData: IPTR; // will be filled with SNA_UserData
  2310. end;
  2311. const
  2312. DECORATOR_VERSION = 0;
  2313. SCREENNOTIFY_VERSION = 0;
  2314. { there is only one Message in the initial decoration system it will be sent to the decorator port to signal that it´ll not be used any longer
  2315. and may be destroyed, in that case the dm_Object contains the NewDecorator struct Intuition does not touch anything, the decorator have to
  2316. destroy all objects as well as the NewDecorator struct.}
  2317. DM_CLASS_DESTROYDECORATOR = $8001;
  2318. // Tags for Screen notify message
  2319. SNA_PubName = TAG_USER + $01; // public screen name of nil for all screens
  2320. SNA_Notify = TAG_USER + $02; // Flags to look for see below
  2321. SNA_UserData = TAG_USER + $03; // this tag will be passed to the screennotify message
  2322. SNA_SigTask = TAG_USER + $04; // if port = nil, a sigbit will be set for this task
  2323. SNA_SigBit = TAG_USER + $05; // signal bit to set if port = nil
  2324. SNA_MsgPort = TAG_USER + $06; // if <> nil post mesage to this port
  2325. SNA_Priority = TAG_USER + $07;
  2326. SNA_Hook = TAG_USER + $08;
  2327. // SNA_Notify (all unassigned bits are reserved for system use)
  2328. SNOTIFY_AFTER_OPENSCREEN = 1 shl 0; // screen has been opened
  2329. SNOTIFY_BEFORE_CLOSESCREEN = 1 shl 1; // going to close screen
  2330. SNOTIFY_AFTER_OPENWB = 1 shl 2; // Workbench is open
  2331. SNOTIFY_BEFORE_CLOSEWB = 1 shl 3; // Workbench is going to be closed
  2332. SNOTIFY_AFTER_OPENWINDOW = 1 shl 4; // new window
  2333. SNOTIFY_BEFORE_CLOSEWINDOW = 1 shl 5; // window is going to be closed
  2334. SNOTIFY_PUBSCREENSTATE = 1 shl 6; // PubScreenState()
  2335. SNOTIFY_LOCKPUBSCREEN = 1 shl 7; // LockPubScreen()
  2336. SNOTIFY_SCREENDEPTH = 1 shl 8; // ScreenDepth()
  2337. SNOTIFY_AFTER_CLOSESCREEN = 1 shl 9; // notify after CloseScreen()
  2338. SNOTIFY_AFTER_CLOSEWINDOW = 1 shl 10; // dto. CloseWindow()
  2339. SNOTIFY_BEFORE_OPENSCREEN = 1 shl 11; // notify before OpenScreen()
  2340. SNOTIFY_BEFORE_OPENWINDOW = 1 shl 12; // dto. OpenWindow()
  2341. SNOTIFY_BEFORE_OPENWB = 1 shl 13; // like OPENSCREEN
  2342. SNOTIFY_AFTER_CLOSEWB = 1 shl 14; // like CLOSESCREEN
  2343. SNOTIFY_WAIT_REPLY = 1 shl 15; // wait for reply before taking action
  2344. SNOTIFY_UNLOCKPUBSCREEN = 1 shl 16; // UnlockPubScreen()
  2345. SNOTIFY_BEFORE_UPDATEINTUITION = 1 shl 17; // Intuition is going to be updated
  2346. SNOTIFY_AFTER_UPDATEINTUITION = 1 shl 18; // Intuition is updated
  2347. // Attributes for MENUDECORCLASS
  2348. MDA_Dummy = TAG_USER + $22000;
  2349. MDA_DrawInfo = MDA_Dummy + 1; // [I.G]
  2350. MDA_Screen = MDA_Dummy + 2; // [I.G]
  2351. MDA_TrueColorOnly = MDA_Dummy + 3; // [..G]
  2352. MDA_UserBuffer = MDA_Dummy + 4; // [I.G]
  2353. // Methods for MENUDECORCLASS
  2354. MDM_Dummy = MDA_Dummy + 500;
  2355. MDM_GETDEFSIZE_SYSIMAGE = MDM_Dummy + 1;
  2356. MDM_DRAW_SYSIMAGE = MDM_Dummy + 2;
  2357. MDM_GETMENUSPACES = MDM_Dummy + 3;
  2358. MDM_DRAWBACKGROUND = MDM_Dummy + 4;
  2359. MDM_INITMENU = MDM_Dummy + 5;
  2360. MDM_EXITMENU = MDM_Dummy + 6;
  2361. type
  2362. PmdpGetDefSizeSysImage = ^TmdpGetDefSizeSysImage;
  2363. TmdpGetDefSizeSysImage = record // record with stacked fields
  2364. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2365. MethodID: LongWord;
  2366. mdp_TrueColor: ShortInt;
  2367. mdp_Dri: PDrawInfo;
  2368. mdp_ReferenceFont: PTextFont; // In:
  2369. mdp_Which: LongWord; // In: One of CLOSEIMAGE, SIZEIMAGE, ...
  2370. mdp_SysiSize: LongWord; // In: lowres/medres/highres
  2371. mdp_Width: PLongWord; // Out
  2372. mdp_Height: PLongWord; // Out
  2373. mdp_Flags: LongWord;
  2374. pad_align: record end; // properly pad previous field if applicable
  2375. {$POP}
  2376. end;
  2377. PmdpDrawSysImage = ^TmdpDrawSysImage;
  2378. TmdpDrawSysImage = record // record with stacked fields
  2379. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2380. MethodID: LongWord;
  2381. mdp_TrueColor: ShortInt;
  2382. mdp_Dri: PDrawInfo;
  2383. mdp_RPort: PRastPort;
  2384. mdp_X: LongInt;
  2385. mdp_Y: LongInt;
  2386. mdp_Width: LongInt;
  2387. mdp_Height: LongInt;
  2388. mdp_Which: LongWord;
  2389. mdp_State: LongWord;
  2390. mdp_Flags: LongWord;
  2391. mdp_UserBuffer: IPTR;
  2392. pad_align: record end; // properly pad previous field if applicable
  2393. {$POP}
  2394. end;
  2395. PmdpGetMenuSpaces = ^TmdpGetMenuSpaces;
  2396. TmdpGetMenuSpaces = record // record with stacked fields
  2397. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2398. MethodID: LongWord;
  2399. mdp_TrueColor: ShortInt;
  2400. mdp_InnerLeft: LongInt; // Out
  2401. mdp_InnerTop: LongInt; // Out
  2402. mdp_InnerRight: LongInt;
  2403. mdp_InnerBottom: LongInt;
  2404. mdp_ItemInnerLeft: LongInt;
  2405. mdp_ItemInnerTop: LongInt;
  2406. mdp_ItemInnerRight: LongInt;
  2407. mdp_ItemInnerBottom: LongInt;
  2408. mdp_MinWidth: LongInt;
  2409. mdp_MinHeight: LongInt;
  2410. pad_align: record end; // properly pad previous field if applicable
  2411. {$POP}
  2412. end;
  2413. PmdpDrawBackground = ^TmdpDrawBackground;
  2414. TmdpDrawBackground = record // record with stacked fields
  2415. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2416. MethodID: LongWord;
  2417. mdp_TrueColor: ShortInt;
  2418. mdp_RPort: PRastPort;
  2419. mdp_X: LongInt;
  2420. mdp_Y: LongInt;
  2421. mdp_Width: LongInt;
  2422. mdp_Height: LongInt;
  2423. mdp_ItemLeft: LongInt;
  2424. mdp_ItemTop: LongInt;
  2425. mdp_ItemWidth: LongInt;
  2426. mdp_ItemHeight: LongInt;
  2427. mdp_Flags: Word;
  2428. mdp_UserBuffer: IPTR;
  2429. mdp_MenuDecorFlags: LongWord;
  2430. pad_align: record end; // properly pad previous field if applicable
  2431. {$POP}
  2432. end;
  2433. PmdpInitMenu = ^TmdpInitMenu;
  2434. TmdpInitMenu = record // record with stacked fields
  2435. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2436. MethodID: LongWord;
  2437. mdp_TrueColor: SmallInt;
  2438. mdp_RPort: PRastPort;
  2439. mdp_Screen: PScreen;
  2440. mdp_Left: LongWord;
  2441. mdp_Top: LongWord;
  2442. mdp_Width: LongWord;
  2443. mdp_Height: LongInt;
  2444. mdp_UserBuffer: IPTR;
  2445. mdp_ScreenUserBuffer: IPTR;
  2446. mdp_MenuDecorFlags: LongWord;
  2447. pad_align: record end; // properly pad previous field if applicable
  2448. {$POP}
  2449. end;
  2450. PmdpExitMenu = ^TmdpExitMenu;
  2451. TmdpExitMenu = record // record with stacked fields
  2452. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2453. MethodID: LongWord;
  2454. mdp_TrueColor: ShortInt;
  2455. mdp_UserBuffer: IPTR;
  2456. pad_align: record end; // properly pad previous field if applicable
  2457. {$POP}
  2458. end;
  2459. const
  2460. MDP_STATE_NORMAL = 0;
  2461. MDP_STATE_SELECTED = 1;
  2462. MDP_STATE_DISABLED = 2;
  2463. MDP_MDF_MENU = 1 shl 0;
  2464. MDP_MDF_ITEM = 1 shl 1;
  2465. MDP_MDF_SUBITEM = 1 shl 2;
  2466. MDP_MDF_MENUS_UNDERMOUSE = 1 shl 7;
  2467. // Length of array returned by MA_PixelFormats
  2468. MONITOR_MAXPIXELFORMATS = 14;
  2469. // Attributes
  2470. MA_Dummy = TAG_USER;
  2471. MA_MonitorName = MA_Dummy + 1; // [..G] STRPTR Monitor name
  2472. MA_Manufacturer = MA_Dummy + 2; // [..G] STRPTR Hardware manufacturer string
  2473. MA_ManufacturerID = MA_Dummy + 3; // [..G] LongWord
  2474. MA_ProductID = MA_Dummy + 4; // [..G] LongWord
  2475. MA_MemorySize = MA_Dummy + 5; // [..G] LongWord Video card memory size
  2476. MA_PixelFormats = MA_Dummy + 6; // [..G] PLongWord Pixelformat support flags
  2477. MA_TopLeftMonitor = MA_Dummy + 7; // [.SG] PObject_ Monitor placed in a position relative to the current one
  2478. MA_TopMiddleMonitor = MA_Dummy + 8; // [.SG] PObject_
  2479. MA_TopRightMonitor = MA_Dummy + 9; // [.SG] PObject_
  2480. MA_MiddleLeftMonitor = MA_Dummy + 10; // [.SG] PObject_
  2481. MA_MiddleRightMonitor = MA_Dummy + 11; // [.SG] PObject_
  2482. MA_BottomLeftMonitor = MA_Dummy + 12; // [.SG] PObject_
  2483. MA_BottomMiddleMonitor = MA_Dummy + 13; // [.SG] PObject_
  2484. MA_BottomRightMonitor = MA_Dummy + 14; // [.SG] PObject_
  2485. MA_GammaControl = MA_Dummy + 15; // [..G] LongBool Whether gamma control is supported
  2486. MA_PointerType = MA_Dummy + 16; // [..G] LongWord Supported pointer types
  2487. MA_DriverName = MA_Dummy + 17; // [..G] STRPTR Driver name
  2488. MA_MemoryClock = MA_Dummy + 18; // [..G] LongWord Video memory clock in Hz, 0 if unknown
  2489. //* Pointer type flags */
  2490. PointerType_3Plus1 = $0001; // color 0 transparent, 1-3 visible
  2491. PointerType_2Plus1 = $0002; // color 0 transparent, 2-3 visible, 1 undefined/clear/inverse
  2492. PointerType_ARGB = $0004; // Direct color alpha-blended bitmap pointer
  2493. // Methods
  2494. MM_GetRootBitMap = $401; // Reserved
  2495. MM_Query3DSupport = $402; // Ask for 3D acceleration support for given pixelformat
  2496. MM_GetDefaultGammaTables = $403; // Get default gamma correction table
  2497. MM_GetDefaultPixelFormat = $404; // Ask for preferred pixelformat for given depth (-1 = unsupported depth)
  2498. MM_GetPointerBounds = $405; // Ask for maximum supported mouse pointer size
  2499. MM_RunBlanker = $406; // Start screensaver for this monitor
  2500. MM_EnterPowerSaveMode = $407; // Start power saving mode
  2501. MM_ExitBlanker = $408; // Stop screensaver or power saving mode
  2502. // AROS-specific attributes
  2503. MA_AROS = TAG_USER + $00010000;
  2504. MA_Windowed = MA_AROS + 1; // [G..] BOOL A display is a window on hosted OS
  2505. // AROS-specific methods
  2506. MM_SetDefaultGammaTables = $1401; // Set default gamma correction table
  2507. type
  2508. PmsGetRootBitMap = ^TmsGetRootBitMap;
  2509. TmsGetRootBitMap = record // record with stacked fields
  2510. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2511. MethodID: LongWord;
  2512. PixelFormat: LongWord;
  2513. Store: ^PBitMap;
  2514. pad_align: record end; // properly pad previous field if applicable
  2515. {$POP}
  2516. end;
  2517. PmsQuery3DSupport = ^TmsQuery3DSupport;
  2518. TmsQuery3DSupport = record // record with stacked fields
  2519. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2520. MethodID: LongWord;
  2521. PixelFormat: LongWord;
  2522. Store: PLongWord;
  2523. pad_align: record end; // properly pad previous field if applicable
  2524. {$POP}
  2525. end;
  2526. const
  2527. MSQUERY3D_UNKNOWN = 0; // Unsupported pixelformat or other error
  2528. MSQUERY3D_NODRIVER = 1; // No 3D support available
  2529. MSQUERY3D_SWDRIVER = 2; // Software 3D support available
  2530. MSQUERY3D_HWDRIVER = 3; // Hardware accelerated 3D available
  2531. type
  2532. PmsGetDefaultGammaTables = ^TmsGetDefaultGammaTables;
  2533. TmsGetDefaultGammaTables = record // record with stacked fields
  2534. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2535. MethodID: LongWord;
  2536. Red: PByte; // Optional pointers to 256-byte arrays to fill in
  2537. Green: PByte;
  2538. Blue: PByte;
  2539. pad_align: record end; // properly pad previous field if applicable
  2540. {$POP}
  2541. end;
  2542. PmsGetDefaultPixelFormat = ^TmsGetDefaultPixelFormat;
  2543. TmsGetDefaultPixelFormat = record // record with stacked fields
  2544. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2545. MethodID: LongWord;
  2546. Depth: LongWord;
  2547. Store: PLongWord;
  2548. pad_align: record end; // properly pad previous field if applicable
  2549. {$POP}
  2550. end;
  2551. PmsGetPointerBounds = ^TmsGetPointerBounds;
  2552. TmsGetPointerBounds = record // record with stacked fields
  2553. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2554. MethodID: LongWord;
  2555. PointerType: LongWord;
  2556. Width: PLongWord;
  2557. Height: PLongWord;
  2558. pad_align: record end; // properly pad previous field if applicable
  2559. {$POP}
  2560. end;
  2561. PmsSetDefaultGammaTables = PmsGetDefaultGammaTables;
  2562. TmsSetDefaultGammaTables = TmsGetDefaultGammaTables;
  2563. const
  2564. // Attributes for SCRDECORCLASS
  2565. SDA_Dummy = TAG_USER + $22100;
  2566. SDA_DrawInfo = SDA_Dummy + 1; // [I.G]
  2567. SDA_Screen = SDA_Dummy + 2; // [I.G]
  2568. SDA_TrueColorOnly = SDA_Dummy + 3; // [..G]
  2569. SDA_UserBuffer = SDA_Dummy + 4; // [I.G]
  2570. // Methods for SCRDECORCLASS */
  2571. SDM_Dummy = SDA_Dummy + 500;
  2572. SDM_SETUP = SDM_Dummy + 1;
  2573. SDM_CLEANUP = SDM_Dummy + 2;
  2574. SDM_GETDEFSIZE_SYSIMAGE = SDM_Dummy + 3;
  2575. SDM_DRAW_SYSIMAGE = SDM_Dummy + 4;
  2576. SDM_DRAW_SCREENBAR = SDM_Dummy + 5;
  2577. SDM_LAYOUT_SCREENGADGETS = SDM_Dummy + 6;
  2578. SDM_INITSCREEN = SDM_Dummy + 7;
  2579. SDM_EXITSCREEN = SDM_Dummy + 8;
  2580. type
  2581. PsdpGetDefSizeSysImage = ^TsdpGetDefSizeSysImage;
  2582. TsdpGetDefSizeSysImage = record // record with stacked fields
  2583. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2584. MethodID: LongWord;
  2585. sdp_TrueColor: ShortInt;
  2586. sdp_Dri: PDrawInfo;
  2587. sdp_ReferenceFont: PTextFont; // In:
  2588. sdp_Which: LongWord; // In: SDEPTHIMAGE
  2589. sdp_SysiSize: LongWord; // In: lowres/medres/highres
  2590. sdp_Width: PLongWord; // Out
  2591. sdp_Height: PLongWord; // Out
  2592. sdp_Flags: LongWord;
  2593. sdp_UserBuffer: LongWord;
  2594. pad_align: record end; // properly pad previous field if applicable
  2595. {$POP}
  2596. end;
  2597. PsdpDrawSysImage = ^TsdpDrawSysImage;
  2598. TsdpDrawSysImage = record // record with stacked fields
  2599. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2600. MethodID: LongWord;
  2601. sdp_TrueColor: ShortInt;
  2602. sdp_Dri: PDrawInfo;
  2603. sdp_RPort: PRastPort;
  2604. sdp_X: LongInt;
  2605. sdp_Y: LongInt;
  2606. sdp_Width: LongInt;
  2607. sdp_Height: LongInt;
  2608. sdp_Which: LongWord;
  2609. sdp_State: LongWord;
  2610. sdp_Flags: LongWord;
  2611. sdp_UserBuffer: IPTR;
  2612. pad_align: record end; // properly pad previous field if applicable
  2613. {$POP}
  2614. end;
  2615. PsdpDrawScreenBar = ^TsdpDrawScreenBar;
  2616. TsdpDrawScreenBar = record // record with stacked fields
  2617. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2618. MethodID: LongWord;
  2619. sdp_TrueColor: ShortInt;
  2620. sdp_Dri: PDrawInfo;
  2621. sdp_Layer: PLayer;
  2622. sdp_RPort: PRastPort;
  2623. sdp_Screen: PScreen;
  2624. sdp_Flags: LongWord;
  2625. sdp_UserBuffer: IPTR;
  2626. pad_align: record end; // properly pad previous field if applicable
  2627. {$POP}
  2628. end;
  2629. PsdpLayoutScreenGadgets = ^TsdpLayoutScreenGadgets;
  2630. TsdpLayoutScreenGadgets = record // record with stacked fields
  2631. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2632. MethodID: LongWord;
  2633. sdp_TrueColor: ShortInt;
  2634. sdp_Dri: PDrawInfo;
  2635. sdp_Layer: PLayer;
  2636. sdp_Gadgets: PGadget;
  2637. sdp_Flags: LongWord;
  2638. sdp_UserBuffer: IPTR;
  2639. pad_align: record end; // properly pad previous field if applicable
  2640. {$POP}
  2641. end;
  2642. PsdpInitScreen = ^TsdpInitScreen;
  2643. TsdpInitScreen = record // record with stacked fields
  2644. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2645. MethodID: LongWord;
  2646. sdp_TrueColor: ShortInt;
  2647. sdp_Dri: PDrawInfo;
  2648. sdp_Screen: PScreen;
  2649. sdp_FontHeight: LongWord;
  2650. sdp_TitleHack: LongInt;
  2651. sdp_BarHeight: LongWord;
  2652. sdp_BarVBorder: LongWord;
  2653. sdp_BarHBorder: LongWord;
  2654. sdp_MenuVBorder: LongWord;
  2655. spd_MenuHBorder: LongWord;
  2656. sdp_WBorTop: ShortInt;
  2657. sdp_WBorLeft: ShortInt;
  2658. sdp_WBorRight: ShortInt;
  2659. sdp_WBorBottom: ShortInt;
  2660. sdp_UserBuffer: IPTR;
  2661. pad_align: record end; // properly pad previous field if applicable
  2662. {$POP}
  2663. end;
  2664. PsdpExitScreen = ^TsdpExitScreen;
  2665. TsdpExitScreen = record // record with stacked fields
  2666. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2667. MethodID: LongWord;
  2668. sdp_TrueColor: ShortInt;
  2669. sdp_UserBuffer: IPTR;
  2670. pad_align: record end; // properly pad previous field if applicable
  2671. {$POP}
  2672. end;
  2673. const
  2674. // ScrDecor LayoutScreenGadgets Flags
  2675. SDF_LSG_INITIAL = 1; // First time = During OpenScreen
  2676. SDF_LSG_SYSTEMGADGET = 2; // Is a system gadget (sdepth)
  2677. SDF_LSG_INGADLIST = 4; // Gadget is already in screen gadget list
  2678. SDF_LSG_MULTIPLE = 8; // There may be multiple gadgets (linked together through NextGadget. Follow it)
  2679. // Attributes for WINDECORCLASS
  2680. WDA_Dummy = TAG_USER + $22000;
  2681. WDA_DrawInfo = WDA_Dummy + 1; // [I.G]
  2682. WDA_Screen = WDA_Dummy + 2; // [I.G]
  2683. WDA_TrueColorOnly = WDA_Dummy + 3; // [..G]
  2684. WDA_UserBuffer = WDA_Dummy + 4; // [I.G]
  2685. // Methods for WINDECORCLASS
  2686. WDM_Dummy = WDA_Dummy + 500;
  2687. WDM_SETUP = WDM_Dummy + 1;
  2688. WDM_CLEANUP = WDM_Dummy + 2;
  2689. WDM_GETDEFSIZE_SYSIMAGE = WDM_Dummy + 3;
  2690. WDM_DRAW_SYSIMAGE = WDM_Dummy + 4;
  2691. WDM_DRAW_WINBORDER = WDM_Dummy + 5;
  2692. WDM_LAYOUT_BORDERGADGETS = WDM_Dummy + 6;
  2693. WDM_DRAW_BORDERPROPBACK = WDM_Dummy + 7;
  2694. WDM_DRAW_BORDERPROPKNOB = WDM_Dummy + 8;
  2695. WDM_INITWINDOW = WDM_Dummy + 9;
  2696. WDM_EXITWINDOW = WDM_Dummy + 10;
  2697. WDM_WINDOWSHAPE = WDM_Dummy + 11;
  2698. type
  2699. PwdpGetDefSizeSysImage = ^TwdpGetDefSizeSysImage;
  2700. TwdpGetDefSizeSysImage = record // record with stacked fields
  2701. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2702. MethodID: LongWord;
  2703. wdp_TrueColor: ShortInt;
  2704. wdp_Dri: PDrawInfo;
  2705. wdp_ReferenceFont: PTextFont; // In:
  2706. wdp_Which: LongWord; // In: One of CLOSEIMAGE, SIZEIMAGE, ...
  2707. wdp_SysiSize: LongWord; // In: lowres/medres/highres
  2708. wdp_Width: PLongWord; // Out
  2709. wdp_Height: PLongWord; // Out
  2710. wdp_Flags: LongWord;
  2711. wdp_UserBuffer: IPTR;
  2712. pad_align: record end; // properly pad previous field if applicable
  2713. {$POP}
  2714. end;
  2715. PwdpDrawSysImage = ^TwdpDrawSysImage;
  2716. TwdpDrawSysImage = record // record with stacked fields
  2717. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2718. MethodID: LongWord;
  2719. wdp_TrueColor: ShortInt;
  2720. wdp_Dri: PDrawInfo;
  2721. wdp_RPort: PRastPort;
  2722. wdp_X: LongInt;
  2723. wdp_Y: LongInt;
  2724. wdp_Width: LongInt;
  2725. wdp_Height: LongInt;
  2726. wdp_Which: LongWord;
  2727. wdp_State: LongWord;
  2728. wdp_Flags: LongWord;
  2729. wdp_UserBuffer: IPTR;
  2730. pad_align: record end; // properly pad previous field if applicable
  2731. {$POP}
  2732. end;
  2733. PwdpDrawWinBorder = ^TwdpDrawWinBorder;
  2734. TwdpDrawWinBorder = record // record with stacked fields
  2735. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2736. MethodID: LongWord;
  2737. wdp_TrueColor: ShortInt;
  2738. wdp_Dri: PDrawInfo;
  2739. wdp_Window: PWindow;
  2740. wdp_RPort: PRastPort;
  2741. wdp_Flags: LongWord;
  2742. wdp_UserBuffer: IPTR;
  2743. pad_align: record end; // properly pad previous field if applicable
  2744. {$POP}
  2745. end;
  2746. PwdpLayoutBorderGadgets = ^TwdpLayoutBorderGadgets;
  2747. TwdpLayoutBorderGadgets = record // record with stacked fields
  2748. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2749. MethodID: LongWord;
  2750. wdp_TrueColor: ShortInt;
  2751. wdp_Dri: PDrawInfo;
  2752. wdp_Window: PWindow;
  2753. wdp_Gadgets: PGadget;
  2754. wdp_Flags: LongWord;
  2755. wdp_ExtraButtons: LongWord;
  2756. wdp_UserBuffer: IPTR;
  2757. pad_align: record end; // properly pad previous field if applicable
  2758. {$POP}
  2759. end;
  2760. PwdpDrawBorderPropBack = ^TwdpDrawBorderPropBack;
  2761. TwdpDrawBorderPropBack = record // record with stacked fields
  2762. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2763. MethodID: LongWord;
  2764. wdp_TrueColor: ShortInt;
  2765. wdp_Dri: PDrawInfo;
  2766. wdp_Window: PWindow;
  2767. wdp_RPort: PRastPort;
  2768. wdp_Gadget: PGadget;
  2769. wdp_RenderRect: PRectangle;
  2770. wdp_PropRect: PRectangle;
  2771. wdp_KnobRect: Prectangle;
  2772. wdp_Flags: LongWord;
  2773. wdp_UserBuffer: IPTR;
  2774. pad_align: record end; // properly pad previous field if applicable
  2775. {$POP}
  2776. end;
  2777. PwdpDrawBorderPropKnob = ^TwdpDrawBorderPropKnob;
  2778. TwdpDrawBorderPropKnob = record // record with stacked fields
  2779. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2780. MethodID: LongWord;
  2781. wdp_TrueColor: ShortInt;
  2782. wdp_Dri: PDrawInfo;
  2783. wdp_Window: PWindow;
  2784. wdp_RPort: PRastPort;
  2785. wdp_Gadget: PGadget;
  2786. wdp_RenderRect: PRectangle;
  2787. wdp_PropRect: PRectangle;
  2788. wdp_Flags: LongWord;
  2789. wdp_UserBuffer: IPTR;
  2790. pad_align: record end; // properly pad previous field if applicable
  2791. {$POP}
  2792. end;
  2793. PwdpInitWindow = ^TwdpInitWindow;
  2794. TwdpInitWindow = record // record with stacked fields
  2795. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2796. MethodID: LongWord;
  2797. wdp_TrueColor: ShortInt;
  2798. wdp_UserBuffer: IPTR;
  2799. wdp_Screen: PScreen;
  2800. wdp_ScreenUserBuffer: IPTR;
  2801. pad_align: record end; // properly pad previous field if applicable
  2802. {$POP}
  2803. end;
  2804. PwdpExitWindow = ^TwdpExitWindow;
  2805. TwdpExitWindow = record // record with stacked fields
  2806. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2807. MethodID: LongWord;
  2808. wdp_TrueColor: ShortInt;
  2809. wdp_UserBuffer: IPTR;
  2810. pad_align: record end; // properly pad previous field if applicable
  2811. {$POP}
  2812. end;
  2813. PwdpWindowShape = ^TwdpWindowShape;
  2814. TwdpWindowShape = record // record with stacked fields
  2815. {$PUSH}{$IF DEFINED(CPU32)}{$CODEALIGN RECORDMIN=4}{$ELSEIF DEFINED(CPU64)}{$CODEALIGN RECORDMIN=8}{$ENDIF}
  2816. MethodID: LongWord;
  2817. wdp_TrueColor: ShortInt;
  2818. wdp_Window: PWindow;
  2819. wdp_Width: LongInt;
  2820. wdp_Height: LongInt;
  2821. wdp_UserBuffer: IPTR;
  2822. pad_align: record end; // properly pad previous field if applicable
  2823. {$POP}
  2824. end;
  2825. const
  2826. // WinDecor DrawWindowBorder Flags
  2827. WDF_DWB_TOP_ONLY = 1; // Draw top border only
  2828. // WinDecor DrawWinTitle Title Align
  2829. WD_DWTA_LEFT = 0;
  2830. WD_DWTA_RIGHT = 1;
  2831. WD_DWTA_CENTER = 2;
  2832. // WinDecor LayourBorderGadgets Flags
  2833. WDF_LBG_INITIAL = 1; // First time == During OpenWindow
  2834. WDF_LBG_SYSTEMGADGET = 2; // Is a system gadget (close/depth/zoom)
  2835. WDF_LBG_INGADLIST = 4; // Gadget is already in window gadget list
  2836. WDF_LBG_MULTIPLE = 8; // There may be multiple gadgets (linked together through NextGadget. Follow it)
  2837. // WinDecor DrawBorderPropKnob Flags
  2838. WDF_DBPK_HIT = 1; // Knob is hit / in use by user
  2839. // extensions:
  2840. const
  2841. // Sysiclass SYSIA_Which
  2842. ICONIFYIMAGE = $12;
  2843. LOCKIMAGE = $13;
  2844. MUIIMAGE = $14;
  2845. POPUPIMAGE = $15;
  2846. SNAPSHOTIMAGE = $16;
  2847. JUMPIMAGE = $17;
  2848. MENUTOGGLEIMAGE = $19;
  2849. SUBMENUIMAGE = $1A;
  2850. // Window attributes
  2851. WA_ExtraTitlebarGadgets = WA_Dummy + 151;
  2852. WA_ExtraGadgetsStartID = WA_Dummy + 152;
  2853. WA_ExtraGadget_Iconify = WA_Dummy + 153;
  2854. WA_ExtraGadget_Lock = WA_Dummy + 154;
  2855. WA_ExtraGadget_MUI = WA_Dummy + 155;
  2856. WA_ExtraGadget_PopUp = WA_Dummy + 156;
  2857. WA_ExtraGadget_Snapshot = WA_Dummy + 157;
  2858. WA_ExtraGadget_Jump = WA_Dummy + 158;
  2859. // WA_ExtraTitlebarGadgets
  2860. // Flags
  2861. ETG_ICONIFY = $01;
  2862. ETG_LOCK = $02;
  2863. ETG_MUI = $04;
  2864. ETG_POPUP = $08;
  2865. ETG_SNAPSHOT = $10;
  2866. ETG_JUMP = $20;
  2867. // Gadget ID offsets
  2868. ETD_Iconify = 0;
  2869. ETD_Lock = 1;
  2870. ETD_MUI = 2;
  2871. ETD_PopUp = 3;
  2872. ETD_Snapshot = 4;
  2873. ETD_Jump = 5;
  2874. // Gadget IDs
  2875. ETI_Dummy = $FFD0;
  2876. ETI_Iconify = ETI_Dummy + ETD_Iconify;
  2877. ETI_Lock = ETI_Dummy + ETD_Lock;
  2878. ETI_MUI = ETI_Dummy + ETD_MUI;
  2879. ETI_PopUp = ETI_Dummy + ETD_PopUp;
  2880. ETI_Snapshot = ETI_Dummy + ETD_Snapshot;
  2881. ETI_Jump = ETI_Dummy + ETD_Jump;
  2882. // Defines for WindowAction()
  2883. // Commands
  2884. WAC_BASE = $0001;
  2885. WAC_HIDEWINDOW = WAC_BASE + 0 unimplemented;
  2886. WAC_SHOWWINDOW = WAC_BASE + 1 unimplemented;
  2887. WAC_SENDIDCMPCLOSE = WAC_BASE + 2;
  2888. WAC_MOVEWINDOW = WAC_BASE + 3 unimplemented;
  2889. WAC_SIZEWINDOW = WAC_BASE + 4 unimplemented;
  2890. WAC_CHANGEWINDOWBOX = WAC_BASE + 5 unimplemented;
  2891. WAC_WINDOWTOFRONT = WAC_BASE + 6 unimplemented;
  2892. WAC_WINDOWTOBACK = WAC_BASE + 7 unimplemented;
  2893. WAC_ZIPWINDOW = WAC_BASE + 8 unimplemented;
  2894. WAC_MOVEWINDOWINFRONTOF = WAC_BASE + 9 unimplemented;
  2895. WAC_ACTIVATEWINDOW = WAC_BASE + 10 unimplemented;
  2896. // Tags
  2897. WAT_BASE = TAG_USER;
  2898. // WAC_MOVEWINDOW
  2899. WAT_MOVEWINDOWX = WAT_BASE + 1;
  2900. WAT_MOVEWINDOWY = WAT_BASE + 2;
  2901. // WAC_SIZEWINDOW
  2902. WAT_SIZEWINDOWX = WAT_BASE + 3;
  2903. WAT_SIZEWINDOWY = WAT_BASE + 4;
  2904. // WAC_CHANGEWINDOWBOX
  2905. WAT_WINDOWBOXLEFT = WAT_BASE + 5;
  2906. WAT_WINDOWBOXTOP = WAT_BASE + 6;
  2907. WAT_WINDOWBOXWIDTH = WAT_BASE + 7;
  2908. WAT_WINDOWBOXHEIGHT = WAT_BASE + 8;
  2909. // WAC_MOVEWINDOWINFRONTOF
  2910. WAT_MOVEWBEHINDWINDOW = WAT_BASE + 9;
  2911. {$ifndef INTUI_V36_NAMES_ONLY}
  2912. //* Gadget Type names: */
  2913. GTYPEMASK = GTYP_GTYPEMASK;
  2914. CUSTOMGADGET = GTYP_CUSTOMGADGET;
  2915. STRGADGET = GTYP_STRGADGET;
  2916. PROPGADGET = GTYP_PROPGADGET;
  2917. GADGET0002 = GTYP_GADGET0002;
  2918. BOOLGADGET = GTYP_BOOLGADGET;
  2919. IntuiCLOSE = GTYP_CLOSE;
  2920. //SDOWNBACK = GTYP_SDOWNBACK; // not in the official AROS includes
  2921. //WDOWNBACK = GTYP_WDOWNBACK;
  2922. //SUPFRONT = GTYP_SUPFRONT;
  2923. //WUPFRONT = GTYP_WUPFRONT;
  2924. SDRAGGING = GTYP_SDRAGGING;
  2925. WDRAGGING = GTYP_WDRAGGING;
  2926. SIZING = GTYP_SIZING;
  2927. REQGADGET = GTYP_REQGADGET;
  2928. GZZGADGET = GTYP_GZZGADGET;
  2929. SCRGADGET = GTYP_SCRGADGET;
  2930. SYSGADGET = GTYP_SYSGADGET;
  2931. GADGETTYPE = GTYP_GADGETTYPE;
  2932. // Gadget Flags names:
  2933. LABELIMAGE = GFLG_LABELIMAGE;
  2934. LABELSTRING = GFLG_LABELSTRING;
  2935. LABELITEXT = GFLG_LABELITEXT;
  2936. LABELMASK = GFLG_LABELMASK;
  2937. GADGDISABLED = GFLG_DISABLED;
  2938. SELECTED = GFLG_SELECTED;
  2939. GRELHEIGHT = GFLG_RELHEIGHT;
  2940. GRELWIDTH = GFLG_RELWIDTH;
  2941. GRELRIGHT = GFLG_RELRIGHT;
  2942. GRELBOTTOM = GFLG_RELBOTTOM;
  2943. GADGIMAGE = GFLG_GADGIMAGE;
  2944. GADGHNONE = GFLG_GADGHNONE;
  2945. GADGHIMAGE = GFLG_GADGHIMAGE;
  2946. GADGHBOX = GFLG_GADGHBOX;
  2947. GADGHCOMP = GFLG_GADGHCOMP;
  2948. GADGHIGHBITS = GFLG_GADGHIGHBITS;
  2949. // Gadget Activation flag names:
  2950. ACTIVEGADGET = GACT_ACTIVEGADGET;
  2951. STRINGEXTEND = GACT_STRINGEXTEND;
  2952. ALTKEYMAP = GACT_ALTKEYMAP;
  2953. IntuiLONGINT = GACT_LONGINT;
  2954. STRINGRIGHT = GACT_STRINGRIGHT;
  2955. STRINGCENTER = GACT_STRINGCENTER;
  2956. STRINGLEFT = GACT_STRINGLEFT;
  2957. BOOLEXTEND = GACT_BOOLEXTEND;
  2958. TOGGLESELECT = GACT_TOGGLESELECT;
  2959. BORDERSNIFF = GACT_BORDERSNIFF;
  2960. BOTTOMBORDER = GACT_BOTTOMBORDER;
  2961. TOPBORDER = GACT_TOPBORDER;
  2962. LEFTBORDER = GACT_LEFTBORDER;
  2963. RIGHTBORDER = GACT_RIGHTBORDER;
  2964. FOLLOWMOUSE = GACT_FOLLOWMOUSE;
  2965. ENDGADGET = GACT_ENDGADGET;
  2966. GADGIMMEDIATE = GACT_IMMEDIATE;
  2967. RELVERIFY = GACT_RELVERIFY;
  2968. // Window Flags names:
  2969. HASZOOM = WFLG_HASZOOM;
  2970. ZOOMED = WFLG_ZOOMED;
  2971. VISITOR = WFLG_VISITOR;
  2972. NW_EXTENDED = WFLG_NW_EXTENDED;
  2973. WINDOWTICKED = WFLG_WINDOWTICKED;
  2974. WBENCHWINDOW = WFLG_WBENCHWINDOW;
  2975. WINDOWREFRESH = WFLG_WINDOWREFRESH;
  2976. NOCAREREFRESH = WFLG_NOCAREREFRESH;
  2977. RMBTRAP = WFLG_RMBTRAP;
  2978. MENUSTATE = WFLG_MENUSTATE;
  2979. INREQUEST = WFLG_INREQUEST;
  2980. WINDOWACTIVE = WFLG_WINDOWACTIVE;
  2981. ACTIVATE = WFLG_ACTIVATE;
  2982. BORDERLESS = WFLG_BORDERLESS;
  2983. GIMMEZEROZERO = WFLG_GIMMEZEROZERO;
  2984. IntuiREPORTMOUSE = WFLG_REPORTMOUSE;
  2985. BACKDROP = WFLG_BACKDROP;
  2986. OTHER_REFRESH = WFLG_OTHER_REFRESH;
  2987. SUPER_BITMAP = WFLG_SUPER_BITMAP;
  2988. SIMPLE_REFRESH= WFLG_SIMPLE_REFRESH;
  2989. SMART_REFRESH = WFLG_SMART_REFRESH;
  2990. REFRESHBITS = WFLG_REFRESHBITS;
  2991. SIZEBBOTTOM = WFLG_SIZEBBOTTOM;
  2992. SIZEBRIGHT = WFLG_SIZEBRIGHT;
  2993. WINDOWCLOSE = WFLG_CLOSEGADGET;
  2994. WINDOWDEPTH = WFLG_DEPTHGADGET;
  2995. WINDOWDRAG = WFLG_DRAGBAR;
  2996. WINDOWSIZING = WFLG_SIZEGADGET;
  2997. // IDCMP class names:
  2998. LONELYMESSAGE = IDCMP_LONELYMESSAGE;
  2999. CHANGEWINDOW = IDCMP_CHANGEWINDOW;
  3000. MENUHELP = IDCMP_MENUHELP;
  3001. IDCMPUPDATE = IDCMP_IDCMPUPDATE;
  3002. INTUITICKS = IDCMP_INTUITICKS;
  3003. VANILLAKEY = IDCMP_VANILLAKEY;
  3004. DELTAMOVE = IDCMP_DELTAMOVE;
  3005. INACTIVEWINDOW = IDCMP_INACTIVEWINDOW;
  3006. ACTIVEWINDOW = IDCMP_ACTIVEWINDOW;
  3007. WBENCHMESSAGE = IDCMP_WBENCHMESSAGE;
  3008. DISKREMOVED = IDCMP_DISKREMOVED;
  3009. DISKINSERTED = IDCMP_DISKINSERTED;
  3010. NEWPREFS = IDCMP_NEWPREFS;
  3011. MENUVERIFY = IDCMP_MENUVERIFY;
  3012. REQCLEAR = IDCMP_REQCLEAR;
  3013. REQVERIFY = IDCMP_REQVERIFY;
  3014. RAWKEY = IDCMP_RAWKEY;
  3015. IntuiCLOSEWINDOW = IDCMP_CLOSEWINDOW;
  3016. MENUPICK = IDCMP_MENUPICK;
  3017. REQSET = IDCMP_REQSET;
  3018. GADGETUP = IDCMP_GADGETUP;
  3019. GADGETDOWN = IDCMP_GADGETDOWN;
  3020. MOUSEMOVE = IDCMP_MOUSEMOVE;
  3021. MOUSEBUTTONS = IDCMP_MOUSEBUTTONS;
  3022. REFRESHWINDOW = IDCMP_REFRESHWINDOW;
  3023. NEWSIZE = IDCMP_NEWSIZE;
  3024. SIZEVERIFY = IDCMP_SIZEVERIFY;
  3025. {$endif} // not INTUI_V36_NAMES_ONLY
  3026. // Tags for GetMonitorList
  3027. const
  3028. GMLA_Dummy = TAG_USER + $4000;
  3029. GMLA_DisplayID = GMLA_Dummy + 1;
  3030. var
  3031. IntuitionBase: PIntuitionBase;
  3032. function AddGadget(Window: PWindow; Gadget: PGadget; Position: LongWord): Word; syscall IntuitionBase 7;
  3033. function ClearDMRequest(Window: PWindow): LongBool; syscall IntuitionBase 8;
  3034. procedure ClearMenuStrip(Window: PWindow); syscall IntuitionBase 9;
  3035. procedure ClearPointer(Window: PWindow); syscall IntuitionBase 10;
  3036. function CloseScreen(Screen: PScreen): LongBool; syscall IntuitionBase 11;
  3037. procedure CloseWindow(Window: PWindow); syscall IntuitionBase 12;
  3038. function CloseWorkBench: LongInt; syscall IntuitionBase 13;
  3039. procedure CurrentTime(var Seconds: LongWord; var Micros: LongWord); syscall IntuitionBase 14;
  3040. function DisplayAlert(AlertNumber: LongWord; String_: PChar; Height: Word): LongBool; syscall IntuitionBase 15; deprecated;
  3041. procedure DisplayBeep(Screen: PScreen); syscall IntuitionBase 16;
  3042. function DoubleClick(SSeconds: LongWord; SMicros: LongWord; CSeconds: LongWord; CMicros: LongWord): LongBool; syscall IntuitionBase 17;
  3043. procedure DrawBorder(Rp: PRastPort; Border: PBorder; LeftOffset: LongInt; TopOffset: LongInt); syscall IntuitionBase 18;
  3044. procedure DrawImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt); syscall IntuitionBase 19;
  3045. procedure EndRequest(Requester: PRequester; Window: PWindow); syscall IntuitionBase 20;
  3046. function GetDefPrefs(Preferences: PPreferences; Size: SmallInt): PPreferences; syscall IntuitionBase 21;
  3047. function GetPrefs(Preferences: PPreferences; Size: SmallInt): PPreferences; syscall IntuitionBase 22;
  3048. procedure InitRequester(Requester: PRequester); syscall IntuitionBase 23; deprecated;
  3049. function ItemAddress(MenuStrip: PMenu; MenuNumber: Word): PMenuItem; syscall IntuitionBase 24;
  3050. function ModifyIDCMP(Window: PWindow; Flags: LongWord): LongBool; syscall IntuitionBase 25;
  3051. procedure ModifyProp(Gadget: PGadget; Window: PWindow; Requester: PRequester; Flags: LongWord; HorizPot: LongWord; VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord); syscall IntuitionBase 26;
  3052. procedure MoveScreen(Screen: PScreen; Dx: LongInt; Dy: LongInt); syscall IntuitionBase 27;
  3053. procedure MoveWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); syscall IntuitionBase 28;
  3054. procedure OffGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); syscall IntuitionBase 29;
  3055. procedure OffMenu(Window: PWindow; MenuNumber: Word); syscall IntuitionBase 30;
  3056. procedure OnGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); syscall IntuitionBase 31;
  3057. procedure OnMenu(Window: PWindow; MenuNumber: Word); syscall IntuitionBase 32;
  3058. function OpenScreen(NewScreen: PNewScreen): PScreen; syscall IntuitionBase 33;
  3059. function OpenWindow(NewWindow: PNewWindow): PWindow; syscall IntuitionBase 34;
  3060. function OpenWorkBench: IPTR; syscall IntuitionBase 35;
  3061. procedure PrintIText(Rp: PRastPort; IText: PIntuiText; Left: LongInt; Top: LongInt); syscall IntuitionBase 36;
  3062. procedure RefreshGadgets(Gadgets: PGadget; Window: PWindow; Requester: PRequester); syscall IntuitionBase 37;
  3063. function RemoveGadget(Window: PWindow; Gadget: PGadget): Word; syscall IntuitionBase 38;
  3064. procedure ReportMouse(Flag: LongInt; Window: PWindow); syscall IntuitionBase 39;
  3065. function Request(Requester: PRequester; Window: PWindow): LongBool; syscall IntuitionBase 40;
  3066. procedure ScreenToBack(Screen: PScreen); syscall IntuitionBase 41;
  3067. procedure ScreenToFront(Screen: PScreen); syscall IntuitionBase 42;
  3068. function SetDMRequest(Window: PWindow; Requester: PRequester): LongBool; syscall IntuitionBase 43;
  3069. function SetMenuStrip(Window: PWindow; Menu: PMenu): LongBool; syscall IntuitionBase 44;
  3070. procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; Width: LongInt; XOffset: LongInt; YOffset: LongInt); syscall IntuitionBase 45;
  3071. procedure SetWindowTitles(Window: PWindow; const WindowTitle: PChar; const ScreenTitle: PChar); syscall IntuitionBase 46;
  3072. procedure ShowTitle(Screen: PScreen; ShowIt: LongBool); syscall IntuitionBase 47;
  3073. procedure SizeWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); syscall IntuitionBase 48;
  3074. function ViewAddress: PView; syscall IntuitionBase 49;
  3075. function ViewPortAddress(Window: PWindow): PViewPort; syscall IntuitionBase 50;
  3076. procedure WindowToBack(Window: PWindow); syscall IntuitionBase 51;
  3077. procedure WindowToFront(Window: PWindow); syscall IntuitionBase 52;
  3078. function WindowLimits(Window: PWindow; WidthMin: SmallInt; HeightMin: SmallInt; WidthMax: Word; HeightMax: Word): LongBool; syscall IntuitionBase 53;
  3079. function SetPrefs(PrefBuffer: PPreferences; Size: LongInt; Inform: LongBool): PPreferences; syscall IntuitionBase 54;
  3080. function IntuiTextLength(iText: PIntuiText): LongInt; syscall IntuitionBase 55;
  3081. function WBenchToBack: LongBool; syscall IntuitionBase 56;
  3082. function WBenchToFront: LongBool; syscall IntuitionBase 57;
  3083. function AutoRequest(Window: PWindow; Body: PIntuiText; PosText: PIntuiText; NegText: PIntuiText; PFlag: LongWord; NFlag: LongWord; Width: LongWord; Height: LongWord): LongBool; syscall IntuitionBase 58;
  3084. procedure BeginRefresh(Window: PWindow); syscall IntuitionBase 59;
  3085. function BuildSysRequest(Window: PWindow; Body: PIntuiText; PosText: PIntuiText; NegText: PIntuiText; Flags: LongWord; Width: LongWord; Height: LongWord): PWindow; syscall IntuitionBase 60;
  3086. procedure EndRefresh(Window: PWindow; Complete: LongBool); syscall IntuitionBase 61;
  3087. procedure FreeSysRequest(Window: PWindow); syscall IntuitionBase 62;
  3088. function MakeScreen(Screen: PScreen): LongInt; syscall IntuitionBase 63;
  3089. function RemakeDisplay: LongInt; syscall IntuitionBase 64;
  3090. function RethinkDisplay: LongInt; syscall IntuitionBase 65;
  3091. function AllocRemember(var RememberKey: PRemember; Size: LongWord; Flags: LongWord): APTR; syscall IntuitionBase 66;
  3092. procedure AlohaWorkbench(MsgPort: PMsgPort); syscall IntuitionBase 67;
  3093. procedure FreeRemember(var RememberKey: PRemember; ReallyForget: LongInt); syscall IntuitionBase 68;
  3094. function LockIBase(LockNumber: LongWord): LongWord; syscall IntuitionBase 69;
  3095. procedure UnlockIBase(LockNumber: LongWord); syscall IntuitionBase 70;
  3096. function GetScreenData(Buffer: APTR; Size: LongWord; Type_: LongWord; Screen: PScreen): LongInt; syscall IntuitionBase 71;
  3097. procedure RefreshGList(Gadgets: PGadget; Window: PWindow; Requester: PRequester; NumGad: LongInt); syscall IntuitionBase 72;
  3098. function AddGList(Window: PWindow; Gadget: PGadget; Position: LongWord; NumGad: LongInt; Requester: PRequester): Word; syscall IntuitionBase 73;
  3099. function RemoveGList(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt): Word; syscall IntuitionBase 74;
  3100. procedure ActivateWindow(Window: PWindow); syscall IntuitionBase 75;
  3101. procedure RefreshWindowFrame(Window: PWindow); syscall IntuitionBase 76;
  3102. function ActivateGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester): LongBool; syscall IntuitionBase 77;
  3103. procedure NewModifyProp(Gadget: PGadget; Window: PWindow; Requester: PRequester; Flags: LongWord; HorizPot: LongWord; VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; NumGad: LongInt); syscall IntuitionBase 78;
  3104. function QueryOverscan(DisplayID: LongWord; Rect: PRectangle; OScanType: SmallInt): LongInt; syscall IntuitionBase 79;
  3105. procedure MoveWindowInFrontOf(Window: PWindow; BehindWindow: PWindow); syscall IntuitionBase 80;
  3106. procedure ChangeWindowBox(Window: PWindow; Left: LongInt; Top: LongInt; Width: LongInt; Height: LongInt); syscall IntuitionBase 81;
  3107. function SetEditHook(Hook: PHook): PHook; syscall IntuitionBase 82;
  3108. function SetMouseQueue(Window: PWindow; QueueLength: LongWord): LongInt; syscall IntuitionBase 83;
  3109. procedure ZipWindow(Window: PWindow); syscall IntuitionBase 84;
  3110. function LockPubScreen(const Name: STRPTR): PScreen; syscall IntuitionBase 85;
  3111. procedure UnlockPubScreen(Name: PChar; Screen: PScreen); syscall IntuitionBase 86;
  3112. function LockPubScreenList: PList; syscall IntuitionBase 87;
  3113. procedure UnlockPubScreenList; syscall IntuitionBase 88;
  3114. function NextPubScreen(Screen: PScreen; Namebuf: PChar): PChar; syscall IntuitionBase 89;
  3115. procedure SetDefaultPubScreen(Name: PChar); syscall IntuitionBase 90;
  3116. function SetPubScreenModes(Modes: Word): Word; syscall IntuitionBase 91;
  3117. function PubScreenStatus(Screen: PScreen; StatusFlags: Word): Word; syscall IntuitionBase 92;
  3118. function ObtainGIRPort(GInfo: PGadgetInfo): PRastPort; syscall IntuitionBase 93;
  3119. procedure ReleaseGIRPort(Rp: PRastPort); syscall IntuitionBase 94;
  3120. procedure GadgetMouse(Gadget: PGadget; GInfo: PGadgetInfo; var MousePoint: SmallInt); syscall IntuitionBase 95;
  3121. function SetIPrefs(Data: Pointer; Length: LongWord; Typ: LongWord): LongWord; syscall IntuitionBase 96;
  3122. function GetDefaultPubScreen(NameBuffer: PChar): PScreen; syscall IntuitionBase 97;
  3123. function EasyRequestArgs(Window: PWindow; EasyStruct: PEasyStruct; IDCMP_Ptr: PLongWord; Args: APTR): LongInt; syscall IntuitionBase 98;
  3124. function BuildEasyRequestArgs(Window: PWindow; EasyStruct: PEasyStruct; IDCMP: LongWord; Args: APTR): PWindow; syscall IntuitionBase 99;
  3125. function SysReqHandler(Window: PWindow; IDCMPFlagsPtr: PLongWord; WaitInput: LongBool): LongInt; syscall IntuitionBase 100;
  3126. function OpenWindowTagList(NewWindow: PNewWindow; TagList: PTagItem): PWindow; syscall IntuitionBase 101;
  3127. function OpenScreenTagList(NewScreen: PNewScreen; TagList: PTagItem): PScreen; syscall IntuitionBase 102;
  3128. procedure DrawImageState(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; state: LongWord; DrawInfo: PDrawInfo); syscall IntuitionBase 103;
  3129. function PointInImage(Point: LongWord; Image: PImage): LongBool; syscall IntuitionBase 104;
  3130. procedure EraseImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt); syscall IntuitionBase 105;
  3131. function NewObjectA(ClassPtr: PIClass; ClassID: PChar; TagList: PTagItem): APTR; syscall IntuitionBase 106;
  3132. procedure DisposeObject(Object_: APTR); syscall IntuitionBase 107;
  3133. function SetAttrsA(Object_: APTR; TagList: PTagItem): IPTR; syscall IntuitionBase 108;
  3134. function GetAttr(AttrID: LongWord; Object_: PObject_; StoragePtr: PIPTR): LongWord; overload syscall IntuitionBase 109;
  3135. function GetAttr(AttrID: LongWord; Object_: PObject_; var Storage: IPTR): LongWord; overload syscall IntuitionBase 109;
  3136. function SetGadgetAttrsA(Gadget: PGadget; Window: PWindow; Requester: PRequester; TagList: PTagItem): IPTR; syscall IntuitionBase 110;
  3137. function NextObject(ObjectPtrPtr: APTR): APTR; syscall IntuitionBase 111;
  3138. function FindClass(ClassID: ClassID): PIClass; syscall IntuitionBase 112;
  3139. function MakeClass(ClassID: ClassID; SuperClassID: ClassID; SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord): PIClass; syscall IntuitionBase 113;
  3140. procedure AddClass(ClassPtr: PIClass); syscall IntuitionBase 114;
  3141. function GetScreenDrawInfo(Screen: PScreen): PDrawInfo; syscall IntuitionBase 115;
  3142. procedure FreeScreenDrawInfo(Screen: PScreen; DrawInfo: PDrawInfo); syscall IntuitionBase 116;
  3143. function ResetMenuStrip(Window: PWindow; Menu: PMenu): LongBool; syscall IntuitionBase 117;
  3144. procedure RemoveClass(ClassPtr: PIClass); syscall IntuitionBase 118;
  3145. function FreeClass(IClass: PIClass): LongBool; syscall IntuitionBase 119;
  3146. function AllocScreenBuffer(Screen: PScreen; Bitmap: PBitMap; Flags: LongWord): PScreenBuffer; syscall IntuitionBase 128;
  3147. procedure FreeScreenBuffer(Screen: PScreen; ScreenBuffer: PScreenBuffer); syscall IntuitionBase 129;
  3148. function ChangeScreenBuffer(Screen: PScreen; ScreenBuffer: PScreenBuffer): LongWord; syscall IntuitionBase 130;
  3149. procedure ScreenDepth(Screen: PScreen; Flags: LongWord; Reserved: APTR); syscall IntuitionBase 131;
  3150. procedure ScreenPosition(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt); syscall IntuitionBase 132;
  3151. procedure ScrollWindowRaster(Win: PWindow; Dx: SmallInt; Dy: SmallInt; XMin: SmallInt; YMin: SmallInt; XMax: SmallInt; YMax: SmallInt); syscall IntuitionBase 133;
  3152. procedure LendMenus(FromWindow: PWindow; ToWindow: PWindow); syscall IntuitionBase 134;
  3153. function DoGadgetMethodA(Gad: PGadget; Win: PWindow; Req: PRequester; Msg: TMsg): IPTR; syscall IntuitionBase 135;
  3154. procedure SetWindowPointerA(Win: PWindow; Taglist: PTagItem); syscall IntuitionBase 136;
  3155. function TimedDisplayAlert(AlertNumber: LongWord; String_: PChar; Height: Word; Time: LongWord): LongBool; syscall IntuitionBase 137;
  3156. procedure HelpControl(Window: PWindow; Flags: LongWord); syscall IntuitionBase 138;
  3157. function IsWindowVisible(Window: PWindow): LongWord; syscall IntuitionBase 139;
  3158. procedure ShowWindow(Window: PWindow); syscall IntuitionBase 140;
  3159. procedure HideWindow(Window: PWindow); syscall IntuitionBase 141;
  3160. function ChangeWindowShape(Window: PWindow; NewShape: PRegion; CallBack: PHook): PRegion; syscall IntuitionBase 143; unimplemented;
  3161. procedure SetDefaultScreenFont(TextFont: PTextFont); syscall IntuitionBase 144;
  3162. function DoNotify(Cl: PIClass; O: PObject_; Ic: Pointer; Msg: TopUpdate): Pointer; syscall IntuitionBase 145;
  3163. procedure FreeICData(ICData: Pointer); syscall IntuitionBase 146;
  3164. function AllocIntuiMessage(Window: PWindow): PIntuiMessage; syscall IntuitionBase 148;
  3165. procedure FreeIntuiMessage(IMsg: PIntuiMessage); syscall IntuitionBase 149;
  3166. procedure SendIntuiMessage(Window: PWindow; IMsg: PIntuiMessage); syscall IntuitionBase 151;
  3167. function GetDrawInfoAttr(DrawInfo: PDrawInfo; AttrID: LongWord; ErrorPtr: PIPTR): IPTR; syscall IntuitionBase 156;
  3168. procedure WindowAction(Window: PWindow; Action: LongWord; Tags: PTagItem); syscall IntuitionBase 157;
  3169. procedure ScrollWindowRasterNoFill(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word); syscall IntuitionBase 159;
  3170. function SetPointerBounds(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem): LongWord; syscall IntuitionBase 160;
  3171. {$ifdef AROS_ABIv0}
  3172. procedure ChangeDecoration(ID: LongWord; Decor: PNewDecorator); syscall IntuitionBase 153;
  3173. function StartScreenNotifyTagList(Tags: PTagItem): IPTR; syscall IntuitionBase 161;
  3174. function EndScreenNotify(Notify: IPTR): LongBool; syscall IntuitionBase 162;
  3175. function GetMonitorList(Tags: PTagItem): PPObject_; syscall IntuitionBase 163;
  3176. procedure FreeMonitorList(Obj: PPObject_); syscall IntuitionBase 164;
  3177. {$endif}
  3178. {$ifdef AROS_ABIv1}
  3179. procedure ChangeDecoration(ID: LongWord; Decor: PNewDecorator); syscall IntuitionBase 152;
  3180. function StartScreenNotifyTagList(Tags: PTagItem): IPTR; syscall IntuitionBase 154;
  3181. function EndScreenNotify(Notify: IPTR): LongBool; syscall IntuitionBase 155;
  3182. procedure FreeMonitorList(Obj: PPObject_); syscall IntuitionBase 162;
  3183. function GetMonitorList(Tags: PTagItem): PPObject_; syscall IntuitionBase 161;
  3184. {$endif}
  3185. // VarArgs Versions
  3186. function SetAttrs(Obj: APTR; const Tags: array of PtrUInt): LongWord;
  3187. function NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR;
  3188. function BuildEasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP: LongWord; const Args: array of PtrUInt): PWindow;
  3189. function DoGadgetMethod(Gad: PGadget; Win: PWindow; Req: PRequester; const Args: array of PtrUInt): IPTR;
  3190. function EasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP_Ptr: PLongWord; const Args: array of PtrUInt): LongInt;
  3191. function OpenScreenTags(NewScreen: PNewScreen; const Tags: array of PtrUInt): PScreen;
  3192. function OpenWindowTags(NewWindow: PNewWindow; const Tags: array of PtrUInt): PWindow;
  3193. function SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of PtrUInt): IPTR;
  3194. procedure SetWindowPointer(Win: PWindow; const Tags: array of PtrUInt);
  3195. // Function wrapper
  3196. function SetSuperAttrsA(cl: PIClass; Obj: PObject_; TagList: PTagItem): IPTR;
  3197. function SetSuperAttrs(cl: PIClass; Obj: PObject_; const Tags: array of PtrUInt): IPTR;
  3198. function DoMethodA(Obj: PObject_; Message: APTR): IPTR;
  3199. function DoMethod(Obj: PObject_; const Args: array of PtrUInt): IPTR;
  3200. function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
  3201. function CoerceMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR;
  3202. function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR;
  3203. function DoSuperMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR;
  3204. function Has_Children(Win: PWindow): Boolean;
  3205. function Is_Children(Win: PWindow): Boolean;
  3206. { Intuition macros }
  3207. function INST_DATA(Cl: PIClass; O: P_Object): Pointer;
  3208. function SIZEOF_INSTANCE(Cl: PIClass): LongInt;
  3209. function BASEOBJECT(O: P_Object): Pointer;
  3210. function _OBJ(O: Pointer): P_Object; inline;
  3211. function __OBJECT(O: Pointer): P_Object; inline;
  3212. function OCLASS(O: Pointer): PIClass; inline;
  3213. function SHIFTITEM(N: SmallInt): Word;
  3214. function SHIFTMENU(N: SmallInt): Word;
  3215. function SHIFTSUB(N: SmallInt): Word;
  3216. function FULLMENUNUM(Menu, Item, Sub: SmallInt): Word;
  3217. function IM_BGPEN(Im: PImage): Byte;
  3218. function IM_BOX(Im: PImage): PIBox;
  3219. function IM_FGPEN(Im: PImage): Byte;
  3220. function GADGET_BOX(G: PGadget): PIBox;
  3221. function CUSTOM_HOOK(Gadget: PGadget): PHook;
  3222. function ITEMNUM(N: Word): Word;
  3223. function MENUNUM(N: Word): Word;
  3224. function SUBNUM(N: Word): Word;
  3225. function IAM_Resolution(x, y: Word): LongWord; // Pack two Words into one LongWord
  3226. function SRBNUM(x: Word): Word;
  3227. function SWBNUM(x: Word): Word;
  3228. function SSBNUM(x: Word): Word;
  3229. function SPARNUM(x: Word): Word;
  3230. function SHAKNUM(x: Word): Word;
  3231. implementation
  3232. function SetAttrs(Obj: APTR; const Tags: array of PtrUInt): LongWord; inline;
  3233. begin
  3234. SetAttrs := SetAttrsA(Obj, @Tags);
  3235. end;
  3236. function NewObject(ClassPtr: PIClass; ClassID: PChar; const Tags: array of PtrUInt): APTR; inline;
  3237. begin
  3238. NewObject := NewObjectA(ClassPtr, ClassID, @Tags);
  3239. end;
  3240. function BuildEasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP: LongWord; const Args: array of PtrUInt): PWindow; inline;
  3241. begin
  3242. BuildEasyRequest := BuildEasyRequestArgs(Window, EasyStruct, IDCMP, @Args);
  3243. end;
  3244. function DoGadgetMethod(Gad: PGadget; Win: PWindow; Req: PRequester; const Args: array of PtrUInt): IPTR; inline;
  3245. begin
  3246. {$ifdef i386}
  3247. DoGadgetMethod := DoGadgetMethodA(Gad, Win, Req, TMsg(@Args));
  3248. {$else}
  3249. {$warning fix me!}
  3250. {$endif}
  3251. end;
  3252. function EasyRequest(Window: PWindow; EasyStruct: PEasyStruct; IDCMP_Ptr: PLongWord; const Args: array of PtrUInt): LongInt; inline;
  3253. begin
  3254. EasyRequest := EasyRequestArgs(Window, EasyStruct, IDCMP_Ptr, @Args);
  3255. end;
  3256. function OpenScreenTags(NewScreen: PNewScreen; const Tags: array of PtrUInt): PScreen; inline;
  3257. begin
  3258. OpenScreenTags := OpenScreenTagList(NewScreen, @Tags);
  3259. end;
  3260. function OpenWindowTags(NewWindow: PNewWindow; const Tags: array of PtrUInt): PWindow; inline;
  3261. begin
  3262. OpenWindowTags := OpenWindowTagList(NewWindow, @Tags);
  3263. end;
  3264. function SetGadgetAttrs(Gadget: PGadget; Window: PWindow; Requester: PRequester; const Tags: array of PtrUInt): IPTR; inline;
  3265. begin
  3266. SetGadgetAttrs := SetGadgetAttrsA(Gadget, Window, Requester, @Tags);
  3267. end;
  3268. procedure SetWindowPointer(Win: PWindow; const Tags: array of PtrUInt); inline;
  3269. begin
  3270. SetWindowPointerA(Win, @Tags);
  3271. end;
  3272. // Functions wrapper
  3273. function DoMethodA(Obj: PObject_; Message: APTR): IPTR; inline;
  3274. begin
  3275. DoMethodA := 0;
  3276. if Obj = nil then
  3277. Exit;
  3278. DoMethodA := CALLHOOKPKT_(PHook(OCLASS(Obj)), Obj, Message);
  3279. end;
  3280. function DoMethod(Obj: PObject_; const Args: array of PtrUInt): IPTR; inline;
  3281. begin
  3282. DoMethod := 0;
  3283. if obj = nil then
  3284. Exit;
  3285. DoMethod := CALLHOOKPKT_(PHook(OCLASS(Obj)), Obj, @Args);
  3286. end;
  3287. function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR; inline;
  3288. begin
  3289. DoSuperMethodA := 0;
  3290. if (cl = nil) or (obj = nil) then
  3291. Exit;
  3292. DoSuperMethodA := CALLHOOKPKT_(PHook(cl^.cl_Super), Obj, Message);
  3293. end;
  3294. function DoSuperMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR; inline;
  3295. begin
  3296. DoSuperMethod := 0;
  3297. if (cl = nil) or (obj = nil) then
  3298. Exit;
  3299. DoSuperMethod := CALLHOOKPKT_(PHook(cl^.cl_Super), Obj, @Args);
  3300. end;
  3301. function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): IPTR; inline;
  3302. begin
  3303. CoerceMethodA := 0;
  3304. if (cl = nil) or (obj = nil) then
  3305. Exit;
  3306. CoerceMethodA := CALLHOOKPKT_(PHook(cl), Obj, Message);
  3307. end;
  3308. function CoerceMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): IPTR; inline;
  3309. begin
  3310. CoerceMethod := CoerceMethodA(cl, Obj, @Args);
  3311. end;
  3312. function SetSuperAttrs(cl: PIClass; Obj: PObject_; const Tags: array of PtrUInt): IPTR;
  3313. var
  3314. ops: TopSet;
  3315. begin
  3316. ops.MethodID := OM_SET;
  3317. ops.ops_AttrList := @Tags;
  3318. ops.ops_GInfo := nil;
  3319. SetSuperAttrs := DoSuperMethodA(cl, obj, @ops);
  3320. end;
  3321. function SetSuperAttrsA(cl: PIClass; Obj: PObject_; TagList: PTagItem): IPTR;
  3322. var
  3323. ops: TopSet;
  3324. begin
  3325. ops.MethodID := OM_SET;
  3326. ops.ops_AttrList := TagList;
  3327. ops.ops_GInfo := nil;
  3328. SetSuperAttrsA := DoSuperMethodA(cl, obj, @ops);
  3329. end;
  3330. function INST_DATA(Cl: PIClass; O: P_Object): Pointer; inline;
  3331. begin
  3332. INST_DATA := Pointer(PtrUInt(O) + Cl^.cl_InstOffset);
  3333. end;
  3334. function SIZEOF_INSTANCE(Cl: PIClass): LongInt; inline;
  3335. begin
  3336. SIZEOF_INSTANCE := Cl^.cl_InstOffset + Cl^.cl_InstSize + SizeOf(T_Object);
  3337. end;
  3338. function BASEOBJECT(O: P_Object): Pointer; inline;
  3339. begin
  3340. BASEOBJECT := Pointer(PtrUInt(O) + SizeOf(T_Object));
  3341. end;
  3342. function _OBJ(O: Pointer): P_Object; inline;
  3343. begin
  3344. _OBJ := P_Object(O);
  3345. end;
  3346. function __OBJECT(O: Pointer): P_Object; inline;
  3347. begin
  3348. __OBJECT := P_Object(PtrUInt(O) - SizeOf(T_Object))
  3349. end;
  3350. function OCLASS(O: Pointer): PIClass; inline;
  3351. begin
  3352. OCLASS := P_Object(PtrUInt(O) - SizeOf(T_Object))^.o_Class;
  3353. end;
  3354. function SHIFTITEM(N: SmallInt): Word;
  3355. begin
  3356. SHIFTITEM := (N and $3f) shl 5
  3357. end;
  3358. function SHIFTMENU(N: SmallInt): Word; inline;
  3359. begin
  3360. SHIFTMENU := N and $1f
  3361. end;
  3362. function SHIFTSUB(N: SmallInt): Word; inline;
  3363. begin
  3364. SHIFTSUB := (N and $1f) shl 11
  3365. end;
  3366. function FULLMENUNUM(Menu, Item, Sub: SmallInt): Word; inline;
  3367. begin
  3368. FULLMENUNUM := ((Sub and $1f) shl 11) or ((Item and $3f) shl 5) or (Menu and $1f);
  3369. end;
  3370. { The next functons _BGPEN AND _FGPEN aren't a full replacement of the
  3371. C macros because the C preprocessor makes it possible to set the
  3372. A/BPen values of the Image class objects as well. This can't work
  3373. in pascal, of course!
  3374. }
  3375. function IM_BGPEN(Im: PImage): Byte; inline;
  3376. begin
  3377. IM_BGPEN := Im^.PlaneOnOff;
  3378. end;
  3379. function IM_BOX(Im: PImage): PIBox; inline;
  3380. begin
  3381. IM_BOX := PIBox(@Im^.LeftEdge);
  3382. END;
  3383. function IM_FGPEN (Im: PImage): Byte; inline;
  3384. begin
  3385. IM_FGPEN := Im^.PlanePick;
  3386. end;
  3387. function GADGET_BOX(G: PGadget): PIBox; inline;
  3388. begin
  3389. GADGET_BOX := PIBox(@G^.LeftEdge);
  3390. end;
  3391. function CUSTOM_HOOK (Gadget: PGadget): PHook; inline;
  3392. begin
  3393. CUSTOM_HOOK := PHook(Gadget^.MutualExclude);
  3394. end;
  3395. function ITEMNUM(N: Word): Word; inline;
  3396. begin
  3397. ITEMNUM := (N shr 5) and $3F
  3398. end;
  3399. function MENUNUM(N: Word): Word; inline;
  3400. begin
  3401. MENUNUM := N and $1f
  3402. end;
  3403. function SUBNUM(N: Word): Word; inline;
  3404. begin
  3405. SUBNUM := (N shr 11) and $1f
  3406. end;
  3407. function IAM_Resolution(x, y: Word): LongWord; inline;
  3408. begin
  3409. IAM_Resolution := (x shl 16) or y;
  3410. end;
  3411. function SRBNUM(x: Word): Word; inline;
  3412. begin
  3413. SRBNUM := $08 - (x shr 4);
  3414. end;
  3415. function SWBNUM(x: Word): Word; inline;
  3416. begin
  3417. SWBNUM := $08 - (x and $0f);
  3418. end;
  3419. function SSBNUM(x: Word): Word; inline;
  3420. begin
  3421. SSBNUM := $01 + (x shr 4);
  3422. end;
  3423. function SPARNUM(x: Word): Word; inline;
  3424. begin
  3425. SPARNUM := x shr 4;
  3426. end;
  3427. function SHAKNUM(x: Word): Word; inline;
  3428. begin
  3429. SHAKNUM := x and $0f;
  3430. end;
  3431. function Has_Children(Win: PWindow): Boolean; inline;
  3432. begin
  3433. Has_Children := Assigned(Win^.FirstChild);
  3434. end;
  3435. function Is_Children(Win: PWindow): Boolean; inline;
  3436. begin
  3437. Is_Children := Assigned(Win^.Parent2);
  3438. end;
  3439. initialization
  3440. IntuitionBase := PIntuitionBase(OpenLibrary('intuition.library', 36));
  3441. finalization
  3442. CloseLibrary(PLibrary(IntuitionBase));
  3443. end.