12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091 |
- {
- File: HIToolbox/Controls.h
-
- Contains: Control Manager interfaces
-
- Version: HIToolbox-219.4.81~2
-
- Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://www.freepascal.org/bugs.html
-
- }
- { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
- {
- Modified for use with Free Pascal
- Version 200
- Please report any bugs to <[email protected]>
- }
- {$mode macpas}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$CALLING MWPASCAL}
- unit Controls;
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
- {$setc GAP_INTERFACES_VERSION := $0200}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$elsec}
- {$error Neither __ppc__ nor __i386__ is defined.}
- {$endc}
- {$setc TARGET_CPU_PPC_64 := FALSE}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- uses MacTypes,CFBase,Files,Events,CGImage,Quickdraw,Menus,TextEdit,Drag,Icons,Collections,MacErrors,Appearance;
- {$ALIGN MAC68K}
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Resource Types }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- kControlDefProcType = $43444546 (* 'CDEF' *);
- kControlTemplateResourceType = $434E544C (* 'CNTL' *);
- kControlColorTableResourceType = $63637462 (* 'cctb' *);
- kControlDefProcResourceType = $43444546 (* 'CDEF' *);
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Format of a ÔCNTLÕ resource }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlTemplate = record
- controlRect: Rect;
- controlValue: SInt16;
- controlVisible: Boolean;
- fill: SInt8;
- controlMaximum: SInt16;
- controlMinimum: SInt16;
- controlDefProcID: SInt16;
- controlReference: SInt32;
- controlTitle: Str255;
- end;
- ControlTemplatePtr = ^ControlTemplate;
- type
- ControlTemplateHandle = ^ControlTemplatePtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ ControlRef }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlRef = ^SInt32; { an opaque 32-bit type }
- ControlRefPtr = ^ControlRef; { when a var xx:ControlRef parameter can be nil, it is changed to xx: ControlRefPtr }
- { ControlHandle is obsolete. Use ControlRef.}
- type
- ControlHandle = ControlRef;
- type
- ControlPartCode = SInt16;
- ControlPartCodePtr = ^ControlPartCode; { when a var xx:ControlPartCode parameter can be nil, it is changed to xx: ControlPartCodePtr }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control ActionProcPtr }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlActionProcPtr = procedure( theControl: ControlRef; partCode: ControlPartCode );
- type
- ControlActionUPP = ControlActionProcPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control ActionProcPtr : Epilogue }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * NewControlActionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewControlActionUPP( userRoutine: ControlActionProcPtr ): ControlActionUPP; external name '_NewControlActionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DisposeControlActionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeControlActionUPP( userUPP: ControlActionUPP ); external name '_DisposeControlActionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * InvokeControlActionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure InvokeControlActionUPP( theControl: ControlRef; partCode: ControlPartCode; userUPP: ControlActionUPP ); external name '_InvokeControlActionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Color Table }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- cFrameColor = 0;
- cBodyColor = 1;
- cTextColor = 2;
- cThumbColor = 3;
- kNumberCtlCTabEntries = 4;
- type
- CtlCTabPtr = ^CtlCTab;
- CtlCTab = record
- ccSeed: SInt32;
- ccRider: SInt16;
- ctSize: SInt16;
- ctTable: array [0..3] of ColorSpec;
- end;
- type
- CCTabPtr = CtlCTabPtr;
- type
- CCTabHandle = ^CCTabPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Variants }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlVariant = SInt16;
- const
- kControlNoVariant = 0; { No variant}
- kControlUsesOwningWindowsFontVariant = 1 shl 3; { Control uses owning windows font to display text}
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Part Codes }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { Basic part codes }
- const
- kControlNoPart = kAppearancePartMetaNone;
- kControlIndicatorPart = kAppearancePartIndicator;
- kControlDisabledPart = kAppearancePartMetaDisabled;
- kControlInactivePart = kAppearancePartMetaInactive;
- { Use this constant in Get/SetControlData when the data referred to is not }
- { specific to a part, but rather the entire control, e.g. the list handle of a }
- { list box control. }
- const
- kControlEntireControl = kControlNoPart;
- { Meta-Parts }
- { If you haven't guessed from looking at other toolbox headers. We like the word }
- { 'meta'. It's cool. So here's one more for you. A meta-part is a part used in a call }
- { to the GetControlRegion API. These parts are parts that might be defined by a }
- { control, but should not be returned from calls like TestControl, et al. They define }
- { a region of a control, presently the structure and the content region. The content }
- { region is only defined by controls that can embed other controls. It is the area }
- { that embedded content can live. }
- { Along with these parts, you can also pass in normal part codes to get the regions }
- { of the parts. Not all controls fully support this at the time this was written. }
- const
- kControlStructureMetaPart = -1;
- kControlContentMetaPart = -2;
- kControlOpaqueMetaPart = -3; { Jaguar or later}
- kControlClickableMetaPart = -4; { Panther or later, only used for async window dragging. Default is structure region.}
- { focusing part codes }
- const
- kControlFocusNoPart = kControlNoPart; { tells control to clear its focus}
- kControlFocusNextPart = -1; { tells control to focus on the next part}
- kControlFocusPrevPart = -2; { tells control to focus on the previous part}
- type
- ControlFocusPart = ControlPartCode;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Collection Tags }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { These are standard tags that you will find in the initial data Collection that is passed in the }
- { 'param' parameter to the initCntl message, and in the kEventParamInitCollection parameter to the }
- { kEventControlInitialize event (Carbon only). }
- { All tags at ID zero in a control's Collection are reserved for Control Manager use. }
- { Custom control definitions should use other IDs. }
- { Most of these tags are interpreted when you call CreateCustomControl; the Control Manager will put }
- { the value in the right place before calling the control definition with the initialization message. }
- {
- * Discussion:
- * Control Collection Tags
- }
- const
- {
- * Rect - the bounding rectangle.
- }
- kControlCollectionTagBounds = $626F756E (* 'boun' *);
- {
- * SInt32 - the value
- }
- kControlCollectionTagValue = $76616C75 (* 'valu' *);
- {
- * SInt32 - the minimum
- }
- kControlCollectionTagMinimum = $6D696E20 (* 'min ' *);
- {
- * SInt32 - the maximum
- }
- kControlCollectionTagMaximum = $6D617820 (* 'max ' *);
- {
- * SInt32 - the view size
- }
- kControlCollectionTagViewSize = $76696577 (* 'view' *);
- {
- * Boolean - the visible state. Only interpreted on CarbonLib
- * versions up through 1.5.x and Mac OS X versions 10.0.x. Not
- * interpreted on CarbonLib 1.6 and later. Not interpreted on Mac OS
- * 10.1 and later. We recommend you do not use this tag at all.
- }
- kControlCollectionTagVisibility = $76697369 (* 'visi' *);
- {
- * SInt32 - the refCon
- }
- kControlCollectionTagRefCon = $72656663 (* 'refc' *);
- {
- * arbitrarily sized character array - the title
- }
- kControlCollectionTagTitle = $7469746C (* 'titl' *);
- {
- * bytes as received via CFStringCreateExternalRepresentation
- }
- kControlCollectionTagUnicodeTitle = $7574746C (* 'uttl' *);
- {
- * OSType - the ControlID signature
- }
- kControlCollectionTagIDSignature = $69647369 (* 'idsi' *);
- {
- * SInt32 - the ControlID id
- }
- kControlCollectionTagIDID = $69646964 (* 'idid' *);
- {
- * UInt32 - the command
- }
- kControlCollectionTagCommand = $636D6420 (* 'cmd ' *);
- {
- * SInt16 - the variant
- }
- kControlCollectionTagVarCode = $76617263 (* 'varc' *);
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Image Content }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- kControlContentTextOnly = 0;
- kControlNoContent = 0;
- kControlContentIconSuiteRes = 1;
- kControlContentCIconRes = 2;
- kControlContentPictRes = 3;
- kControlContentICONRes = 4;
- kControlContentIconSuiteHandle = 129;
- kControlContentCIconHandle = 130;
- kControlContentPictHandle = 131;
- kControlContentIconRef = 132;
- kControlContentICON = 133;
- kControlContentCGImageRef = 134;
- type
- ControlContentType = SInt16;
- type
- ControlButtonContentInfo = record
- contentType: ControlContentType;
- case SInt16 of
- 0: (
- resID: SInt16;
- );
- 1: (
- cIconHandle: CIconHandle_fix;
- );
- 2: (
- iconSuite: Handle;
- );
- 3: (
- iconRef: IconRef_fix;
- );
- 4: (
- picture: PicHandle;
- );
- 5: (
- ICONHandle: Handle;
- );
- 6: (
- imageRef: CGImageRef;
- );
- end;
- ControlButtonContentInfoPtr = ^ControlButtonContentInfo;
- type
- ControlImageContentInfo = ControlButtonContentInfo;
- type
- ControlImageContentInfoPtr = ControlButtonContentInfoPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Key Script Behavior }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- kControlKeyScriptBehaviorAllowAnyScript = $616E7920 (* 'any ' *); { leaves the current keyboard alone and allows user to change the keyboard.}
- kControlKeyScriptBehaviorPrefersRoman = $70726D6E (* 'prmn' *); { switches the keyboard to roman, but allows them to change it as desired.}
- kControlKeyScriptBehaviorRequiresRoman = $72726D6E (* 'rrmn' *); { switches the keyboard to roman and prevents the user from changing it.}
- type
- ControlKeyScriptBehavior = UInt32;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Font Style }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { SPECIAL FONT USAGE NOTES: You can specify the font to use for many control types.
- The constants below are meta-font numbers which you can use to set a particular
- control's font usage. There are essentially two modes you can use: 1) default,
- which is essentially the same as it always has been, i.e. it uses the system font, unless
- directed to use the window font via a control variant. 2) you can specify to use
- the big or small system font in a generic manner. The Big system font is the font
- used in menus, etc. Chicago has filled that role for some time now. Small system
- font is currently Geneva 10. The meta-font number implies the size and style.
- NOTE: Not all font attributes are used by all controls. Most, in fact, ignore
- the fore and back color (Static Text is the only one that does, for
- backwards compatibility). Also size, face, and addFontSize are ignored
- when using the meta-font numbering.
- }
- { Meta-font numbering - see note above }
- const
- kControlFontBigSystemFont = -1; { force to big system font}
- kControlFontSmallSystemFont = -2; { force to small system font}
- kControlFontSmallBoldSystemFont = -3; { force to small bold system font}
- kControlFontViewSystemFont = -4; { force to views system font (DataBrowser control only)}
- kControlFontMiniSystemFont = -5; { force to mini system font}
- { Add these masks together to set the flags field of a ControlFontStyleRec }
- { They specify which fields to apply to the text. It is important to make }
- { sure that you specify only the fields that you wish to set. }
- const
- kControlUseFontMask = $0001;
- kControlUseFaceMask = $0002;
- kControlUseSizeMask = $0004;
- kControlUseForeColorMask = $0008;
- kControlUseBackColorMask = $0010;
- kControlUseModeMask = $0020;
- kControlUseJustMask = $0040;
- kControlUseAllMask = $00FF;
- kControlAddFontSizeMask = $0100;
- { AddToMetaFont indicates that we want to start with a standard system }
- { font, but then we'd like to add the other attributes. Normally, the meta }
- { font ignores all other flags }
- const
- kControlAddToMetaFontMask = $0200; { Available in Appearance 1.1 or later}
- { UseThemeFontID indicates that the font field of the ControlFontStyleRec }
- { should be interpreted as a ThemeFontID (see Appearance.h). In all other }
- { ways, specifying a ThemeFontID is just like using one of the control }
- { meta-fonts IDs. kControlUseThemeFontIDMask and kControlUseFontMask are }
- { mutually exclusive; you can only specify one of them. If you specify }
- { both of them, the behavior is undefined. }
- const
- kControlUseThemeFontIDMask = $0080; { Available in Mac OS X or later}
- type
- ControlFontStyleRecPtr = ^ControlFontStyleRec;
- ControlFontStyleRec = record
- flags: SInt16;
- font: SInt16;
- size: SInt16;
- style: SInt16;
- mode: SInt16;
- just: SInt16;
- foreColor: RGBColor;
- backColor: RGBColor;
- end;
- ControlFontStylePtr = ^ControlFontStyleRec;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Click Activation Results }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { These are for use with GetControlClickActivation. The enumerated values should be pretty }
- { self-explanatory, but just in case: }
- { ¥ Activate/DoNotActivate indicates whether or not to change the owning window's z-ordering before }
- { processing the click. If activation is requested, you may also want to immediately redraw the }
- { newly exposed portion of the window. }
- { ¥ Ignore/Handle Click indicates whether or not to call an appropriate click handling API (like }
- { HandleControlClick) in respose to the event. }
- const
- kDoNotActivateAndIgnoreClick = 0; { probably never used. here for completeness.}
- kDoNotActivateAndHandleClick = 1; { let the control handle the click while the window is still in the background.}
- kActivateAndIgnoreClick = 2; { control doesn't want to respond directly to the click, but window should still be brought forward.}
- kActivateAndHandleClick = 3; { control wants to respond to the click, but only after the window has been activated.}
- type
- ClickActivationResult = UInt32;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Common data tags for Get/SetControlData }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * Discussion:
- * Get/SetControlData Common Tags
- }
- const
- kControlFontStyleTag = $666F6E74 (* 'font' *);
- kControlKeyFilterTag = $666C7472 (* 'fltr' *);
- {
- * Sent with a pointer to a ControlKind record to be filled in. Only
- * valid for GetControlData.
- }
- kControlKindTag = $6B696E64 (* 'kind' *);
- {
- * Sent with a pointer to a ControlSize. Only valid with explicitly
- * sizeable controls. Currently supported by the check box, combo
- * box, progress bar, indeterminate progress bar, radio button, round
- * button, scroll bar, slider and the tab. Check your return value!
- * As of 10.2.5, the push button and data browser accept this tag.
- * The data browser only changes the size of its scrollbars. As of
- * Mac OS X 10.3, chasing arrows, disclosure button, popup button,
- * scroll view, search field and little arrows control also accept
- * this tag. As of Mac OS X 10.4, if the font of the editable text
- * has not been overridden, the font size of the combo box and search
- * field will adjust to respect the size of the control. Still check
- * your return values!
- }
- kControlSizeTag = $73697A65 (* 'size' *);
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Feature Bits }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * Discussion:
- * Control Feature Bits - Returned by GetControlFeatures
- }
- const
- kControlSupportsGhosting = 1 shl 0;
- kControlSupportsEmbedding = 1 shl 1;
- kControlSupportsFocus = 1 shl 2;
- kControlWantsIdle = 1 shl 3;
- kControlWantsActivate = 1 shl 4;
- kControlHandlesTracking = 1 shl 5;
- kControlSupportsDataAccess = 1 shl 6;
- kControlHasSpecialBackground = 1 shl 7;
- kControlGetsFocusOnClick = 1 shl 8;
- kControlSupportsCalcBestRect = 1 shl 9;
- kControlSupportsLiveFeedback = 1 shl 10;
- kControlHasRadioBehavior = 1 shl 11; { Available in Appearance 1.0.1 or later}
- kControlSupportsDragAndDrop = 1 shl 12; { Available in Carbon}
- kControlAutoToggles = 1 shl 14; { Available in Appearance 1.1 or later}
- kControlSupportsGetRegion = 1 shl 17; { Available in Appearance 1.1 or later}
- kControlSupportsFlattening = 1 shl 19; { Available in Carbon}
- kControlSupportsSetCursor = 1 shl 20; { Available in Carbon}
- kControlSupportsContextualMenus = 1 shl 21; { Available in Carbon}
- kControlSupportsClickActivation = 1 shl 22; { Available in Carbon}
- kControlIdlesWithTimer = 1 shl 23; { Available in Carbon - this bit indicates that the control animates automatically}
- {
- * Reported by controls that expect clients to use an action proc
- * that increments its value when the up button is pressed and
- * decrement its value when the down button is pressed. (Most
- * controls, such as scroll bars and sliders, expect the opposite).
- * This allows the Control Manager to calculate the proper amount of
- * sleep time during a tracking loop. This is only respected in Mac
- * OS X 10.3 and later.
- }
- kControlInvertsUpDownValueMeaning = 1 shl 24;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Messages }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- drawCntl = 0;
- testCntl = 1;
- calcCRgns = 2;
- initCntl = 3; { Param is Collection, result is OSStatus}
- dispCntl = 4;
- posCntl = 5;
- thumbCntl = 6;
- dragCntl = 7;
- autoTrack = 8;
- calcCntlRgn = 10;
- calcThumbRgn = 11;
- drawThumbOutline = 12;
- kControlMsgDrawGhost = 13;
- kControlMsgCalcBestRect = 14; { Calculate best fitting rectangle for control}
- kControlMsgHandleTracking = 15;
- kControlMsgFocus = 16; { param indicates action.}
- kControlMsgKeyDown = 17;
- kControlMsgIdle = 18;
- kControlMsgGetFeatures = 19;
- kControlMsgSetData = 20;
- kControlMsgGetData = 21;
- kControlMsgActivate = 22;
- kControlMsgSetUpBackground = 23;
- kControlMsgCalcValueFromPos = 26;
- kControlMsgTestNewMsgSupport = 27; { See if this control supports new messaging}
- kControlMsgSubValueChanged = 25; { Available in Appearance 1.0.1 or later}
- kControlMsgSubControlAdded = 28; { Available in Appearance 1.0.1 or later}
- kControlMsgSubControlRemoved = 29; { Available in Appearance 1.0.1 or later}
- kControlMsgApplyTextColor = 30; { Available in Appearance 1.1 or later}
- kControlMsgGetRegion = 31; { Available in Appearance 1.1 or later}
- kControlMsgFlatten = 32; { Available in Carbon. Param is Collection.}
- kControlMsgSetCursor = 33; { Available in Carbon. Param is ControlSetCursorRec}
- kControlMsgDragEnter = 38; { Available in Carbon. Param is DragRef, result is boolean indicating acceptibility of drag.}
- kControlMsgDragLeave = 39; { Available in Carbon. As above.}
- kControlMsgDragWithin = 40; { Available in Carbon. As above.}
- kControlMsgDragReceive = 41; { Available in Carbon. Param is DragRef, result is OSStatus indicating success/failure.}
- kControlMsgDisplayDebugInfo = 46; { Available in Carbon on X.}
- kControlMsgContextualMenuClick = 47; { Available in Carbon. Param is ControlContextualMenuClickRec}
- kControlMsgGetClickActivation = 48; { Available in Carbon. Param is ControlClickActivationRec}
- type
- ControlDefProcMessage = SInt16;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Sizes }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * Discussion:
- * ControlSize values to be used in conjunction with SetControlData
- * and the kControlSizeTag.
- }
- const
- {
- * Use the control's default drawing variant. This does not apply to
- * Scroll Bars, for which Normal is Large.
- }
- kControlSizeNormal = 0;
- {
- * Use the control's small drawing variant. Currently supported by
- * the Check Box, Combo Box, Radio Button, Scroll Bar, Slider and Tab
- * controls.
- }
- kControlSizeSmall = 1;
- {
- * Use the control's large drawing variant. Currently supported by
- * the Indeterminate Progress Bar, Progress Bar and Round Button
- * controls.
- }
- kControlSizeLarge = 2;
- {
- * Use the control's miniature drawing variant. This does not apply
- * to many of the controls, since this is a brand new control size.
- }
- kControlSizeMini = 3;
- {
- * Control drawing variant determined by the control's bounds. This
- * ControlSize is currently only available with Scroll Bars and Popup
- * Buttons to support their legacy behavior of drawing differently
- * within different bounds. It is preferred to explicitly use one of
- * the available control sizes.
- }
- kControlSizeAuto = $FFFF;
- type
- ControlSize = UInt16;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Constants for drawCntl message (passed in param) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- kDrawControlEntireControl = 0;
- kDrawControlIndicatorOnly = 129;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Constants for dragCntl message (passed in param) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- kDragControlEntireControl = 0;
- kDragControlIndicator = 1;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Drag Constraint Structure for thumbCntl message (passed in param) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- IndicatorDragConstraint = record
- limitRect: Rect;
- slopRect: Rect;
- axis: DragConstraint;
- end;
- IndicatorDragConstraintPtr = ^IndicatorDragConstraint;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { CDEF should return as result of kControlMsgTestNewMsgSupport }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- kControlSupportsNewMessages = $206F6B20 (* ' ok ' *);
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when called with the kControlMsgHandleTracking }
- { message }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlTrackingRecPtr = ^ControlTrackingRec;
- ControlTrackingRec = record
- startPt: Point;
- modifiers: EventModifiers;
- action: ControlActionUPP;
- end;
- type
- ControlTrackingPtr = ControlTrackingRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when called with the kControlMsgKeyDown message }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlKeyDownRecPtr = ^ControlKeyDownRec;
- ControlKeyDownRec = record
- modifiers: EventModifiers;
- keyCode: SInt16;
- charCode: SInt16;
- end;
- type
- ControlKeyDownPtr = ControlKeyDownRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when called with the kControlMsgGetData or }
- { kControlMsgSetData message }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlDataAccessRecPtr = ^ControlDataAccessRec;
- ControlDataAccessRec = record
- tag: ResType;
- part: ResType;
- size: Size_fix;
- dataPtr: Ptr;
- end;
- type
- ControlDataAccessPtr = ControlDataAccessRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when called with the kControlCalcBestRect msg }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlCalcSizeRecPtr = ^ControlCalcSizeRec;
- ControlCalcSizeRec = record
- height: SInt16;
- width: SInt16;
- baseLine: SInt16;
- end;
- type
- ControlCalcSizePtr = ControlCalcSizeRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when called with the kControlMsgSetUpBackground }
- { message is sent }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlBackgroundRecPtr = ^ControlBackgroundRec;
- ControlBackgroundRec = record
- depth: SInt16;
- colorDevice: Boolean;
- end;
- type
- ControlBackgroundPtr = ControlBackgroundRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when called with the kControlMsgApplyTextColor }
- { message is sent }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlApplyTextColorRecPtr = ^ControlApplyTextColorRec;
- ControlApplyTextColorRec = record
- depth: SInt16;
- colorDevice: Boolean;
- active: Boolean;
- end;
- type
- ControlApplyTextColorPtr = ControlApplyTextColorRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when called with the kControlMsgGetRegion }
- { message is sent }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlGetRegionRecPtr = ^ControlGetRegionRec;
- ControlGetRegionRec = record
- region: RgnHandle;
- part: ControlPartCode;
- end;
- type
- ControlGetRegionPtr = ControlGetRegionRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when the kControlMsgSetCursor message is sent }
- { Only sent on Carbon }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlSetCursorRecPtr = ^ControlSetCursorRec;
- ControlSetCursorRec = record
- localPoint: Point;
- modifiers: EventModifiers;
- cursorWasSet: Boolean; { your CDEF must set this to true if you set the cursor, or false otherwise}
- end;
- type
- ControlSetCursorPtr = ControlSetCursorRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when the kControlMsgContextualMenuClick message }
- { is sent }
- { Only sent on Carbon }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlContextualMenuClickRecPtr = ^ControlContextualMenuClickRec;
- ControlContextualMenuClickRec = record
- localPoint: Point;
- menuDisplayed: Boolean; { your CDEF must set this to true if you displayed a menu, or false otherwise}
- end;
- type
- ControlContextualMenuClickPtr = ControlContextualMenuClickRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { This structure is passed into a CDEF when the kControlMsgGetClickActivation message }
- { is sent }
- { Only sent on Carbon }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlClickActivationRecPtr = ^ControlClickActivationRec;
- ControlClickActivationRec = record
- localPoint: Point;
- modifiers: EventModifiers;
- result: ClickActivationResult; { your CDEF must pass the desired result back}
- end;
- type
- ControlClickActivationPtr = ControlClickActivationRecPtr;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ ÔCDEFÕ entrypoint }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlDefProcPtr = function( varCode: SInt16; theControl: ControlRef; message: ControlDefProcMessage; param: SInt32 ): SInt32;
- type
- ControlDefUPP = ControlDefProcPtr;
- {
- * NewControlDefUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewControlDefUPP( userRoutine: ControlDefProcPtr ): ControlDefUPP; external name '_NewControlDefUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DisposeControlDefUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeControlDefUPP( userUPP: ControlDefUPP ); external name '_DisposeControlDefUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * InvokeControlDefUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function InvokeControlDefUPP( varCode: SInt16; theControl: ControlRef; message: ControlDefProcMessage; param: SInt32; userUPP: ControlDefUPP ): SInt32; external name '_InvokeControlDefUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { Control Key Filter }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { Certain controls can have a keyfilter attached to them. }
- { Definition of a key filter for intercepting and possibly changing keystrokes }
- { which are destined for a control. }
- { IMPORTANT! Because this filter provides WorldScript-encoded text in its parameters, }
- { it provides no meaningful information for key events generated when a Unicode }
- { keyboard layout or input method is active; these layouts and input methods generate }
- { Unicode text that often cannot be translated into any WorldScript encoding. On }
- { Mac OS X, you should avoid using this filter, or at most, use the filter as an }
- { indication that the text is changing but do not depend on the charCode parameter to }
- { the filter. Use a kEventTextInputUnicodeForKeyEvent Carbon event handler as a }
- { replacement for the ControlKeyFilter callback; on Mac OS X 10.4 and later, you can }
- { also use a kEventTextShouldChangeInRange or kEventTextDidChange event handler. }
- { Key Filter Result Codes }
- { The filter proc should return one of the two constants below. If }
- { kKeyFilterBlockKey is returned, the key is blocked and never makes it to the }
- { control. If kKeyFilterPassKey is returned, the control receives the keystroke. }
- const
- kControlKeyFilterBlockKey = 0;
- kControlKeyFilterPassKey = 1;
- type
- ControlKeyFilterResult = SInt16;
- type
- ControlKeyFilterProcPtr = function( theControl: ControlRef; var keyCode: SInt16; var charCode: SInt16; var modifiers: EventModifiers ): ControlKeyFilterResult;
- type
- ControlKeyFilterUPP = ControlKeyFilterProcPtr;
- {
- * NewControlKeyFilterUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewControlKeyFilterUPP( userRoutine: ControlKeyFilterProcPtr ): ControlKeyFilterUPP; external name '_NewControlKeyFilterUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DisposeControlKeyFilterUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeControlKeyFilterUPP( userUPP: ControlKeyFilterUPP ); external name '_DisposeControlKeyFilterUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * InvokeControlKeyFilterUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function InvokeControlKeyFilterUPP( theControl: ControlRef; var keyCode: SInt16; var charCode: SInt16; var modifiers: EventModifiers; userUPP: ControlKeyFilterUPP ): ControlKeyFilterResult; external name '_InvokeControlKeyFilterUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ DragGrayRgn Constatns }
- { For DragGrayRgnUPP used in TrackControl() }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- noConstraint = kNoConstraint;
- hAxisOnly = 1;
- vAxisOnly = 2;
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Creation/Deletion/Persistence }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { CreateCustomControl is only available as part of Carbon }
- const
- kControlDefProcPtr = 0; { raw proc-ptr based access}
- kControlDefObjectClass = 1; { event-based definition (Mac OS X only)}
- type
- ControlDefType = UInt32;
- type
- ControlDefSpecPtr = ^ControlDefSpec;
- ControlDefSpec = record
- defType: ControlDefType;
- case SInt16 of
- 0: (
- defProc: ControlDefUPP;
- );
- 1: (
- classRef: Ptr;
- );
- end;
- {
- * CreateCustomControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function CreateCustomControl( owningWindow: WindowRef; const (*var*) contBounds: Rect; const (*var*) def: ControlDefSpec; initData: Collection; var outControl: ControlRef ): OSStatus; external name '_CreateCustomControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * NewControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function NewControl( owningWindow: WindowRef; const (*var*) boundsRect: Rect; const (*var*) controlTitle: Str255; initiallyVisible: Boolean; initialValue: SInt16; minimumValue: SInt16; maximumValue: SInt16; procID: SInt16; controlReference: SInt32 ): ControlRef; external name '_NewControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetNewControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetNewControl( resourceID: SInt16; owningWindow: WindowRef ): ControlRef; external name '_GetNewControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DisposeControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure DisposeControl( theControl: ControlRef ); external name '_DisposeControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * KillControls()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure KillControls( theWindow: WindowRef ); external name '_KillControls';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * FlattenControl()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- {
- * UnflattenControl()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Definition Registration }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlCNTLToCollectionProcPtr = function( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection_: Collection ): OSStatus;
- type
- ControlCNTLToCollectionUPP = ControlCNTLToCollectionProcPtr;
- {
- * NewControlCNTLToCollectionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewControlCNTLToCollectionUPP( userRoutine: ControlCNTLToCollectionProcPtr ): ControlCNTLToCollectionUPP; external name '_NewControlCNTLToCollectionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DisposeControlCNTLToCollectionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeControlCNTLToCollectionUPP( userUPP: ControlCNTLToCollectionUPP ); external name '_DisposeControlCNTLToCollectionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * InvokeControlCNTLToCollectionUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function InvokeControlCNTLToCollectionUPP( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection_: Collection; userUPP: ControlCNTLToCollectionUPP ): OSStatus; external name '_InvokeControlCNTLToCollectionUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * RegisterControlDefinition()
- *
- * Summary:
- * Associates or dissociates a control definition with a virtual
- * CDEF resource ID.
- *
- * Discussion:
- * In GetNewControl or NewControl on Carbon, the Control Manager
- * needs to know how to map the procID to a ControlDefSpec. With
- * RegisterControlDefinition, your application can inform the
- * Control Manager which ControlDefSpec to call when it sees a
- * request to use a 'CDEF' of a particular resource ID. Since custom
- * control definitions receive their initialization data in a
- * Collection passed in the 'param' parameter, you must also provide
- * a procedure to convert the bounds, min, max, and other parameters
- * to NewControl into a Collection. If you don't provide a
- * conversion proc, your control will receive an empty collection
- * when it is sent the initialization message. If you want the
- * value, min, visibility, etc. to be given to the control, you must
- * add the appropriate tagged data to the collection. See the
- * Control Collection Tags above. If you want to unregister a
- * ControlDefSpec that you have already registered, call
- * RegisterControlDefinition with the same CDEF resource ID, but
- * pass NULL for the inControlDef parameter. In this situation,
- * inConversionProc is effectively ignored.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inCDEFResID:
- * The virtual CDEF resource ID to which you'd like to associate
- * or dissociate the control definition.
- *
- * inControlDef:
- * A pointer to a ControlDefSpec which represents the control
- * definition you want to register, or NULL if you are attempting
- * to unregister a control definition.
- *
- * inConversionProc:
- * The conversion proc which will translate the NewControl
- * parameters into a Collection.
- *
- * Result:
- * An OSStatus code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function RegisterControlDefinition( inCDEFResID: SInt16; const (*var*) inControlDef: ControlDefSpec; inConversionProc: ControlCNTLToCollectionUPP ): OSStatus; external name '_RegisterControlDefinition';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Visible State }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * HiliteControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HiliteControl( theControl: ControlRef; hiliteState: ControlPartCode ); external name '_HiliteControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * ShowControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure ShowControl( theControl: ControlRef ); external name '_ShowControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * HideControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HideControl( theControl: ControlRef ); external name '_HideControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { following state routines available only with Appearance 1.0 and later}
- {
- * IsControlActive()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function IsControlActive( inControl: ControlRef ): Boolean; external name '_IsControlActive';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * IsControlVisible()
- *
- * Summary:
- * Returns whether a control is visible.
- *
- * Discussion:
- * Note that IsControlVisible returns a control's effective
- * visibility, which is determined both by the control's own
- * visibility and the visibility of its parent controls. If a parent
- * control is invisible, then this control is considered to be
- * invisible also.
- *
- * Latent visibility can be determined with HIViewIsLatentlyVisible.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control whose visibility you wish to determine.
- *
- * Result:
- * A boolean value indicating whether the control is visible (true)
- * or hidden (false).
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function IsControlVisible( inControl: ControlRef ): Boolean; external name '_IsControlVisible';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * ActivateControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function ActivateControl( inControl: ControlRef ): OSErr; external name '_ActivateControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DeactivateControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function DeactivateControl( inControl: ControlRef ): OSErr; external name '_DeactivateControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlVisibility()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function SetControlVisibility( inControl: ControlRef; inIsVisible: Boolean; inDoDraw: Boolean ): OSErr; external name '_SetControlVisibility';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { following state routines available only on Mac OS X and later}
- {
- * IsControlEnabled()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
- * Non-Carbon CFM: not available
- }
- function IsControlEnabled( inControl: ControlRef ): Boolean; external name '_IsControlEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * EnableControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
- * Non-Carbon CFM: not available
- }
- function EnableControl( inControl: ControlRef ): OSStatus; external name '_EnableControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DisableControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
- * Non-Carbon CFM: not available
- }
- function DisableControl( inControl: ControlRef ): OSStatus; external name '_DisableControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Imaging }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * DrawControls()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure DrawControls( theWindow: WindowRef ); external name '_DrawControls';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * Draw1Control()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure Draw1Control( theControl: ControlRef ); external name '_Draw1Control';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- procedure DrawOneControl( theControl: ControlRef ); external name '_Draw1Control';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * UpdateControls()
- *
- * Summary:
- * Redraws the controls that intersect a specified region in a
- * window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window whose controls to redraw.
- *
- * inUpdateRegion:
- * The region (in local coordinates) describing which controls to
- * redraw. In Mac OS 10.1 and later, and in CarbonLib 1.5 and
- * later, you may pass NULL for this parameter to redraw the
- * controls intersecting the visible region of the window.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure UpdateControls( inWindow: WindowRef; inUpdateRegion: RgnHandle { can be NULL } ); external name '_UpdateControls';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { following imaging routines available only with Appearance 1.0 and later}
- {
- * GetBestControlRect()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetBestControlRect( inControl: ControlRef; var outRect: Rect; var outBaseLineOffset: SInt16 ): OSErr; external name '_GetBestControlRect';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlFontStyle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function SetControlFontStyle( inControl: ControlRef; const (*var*) inStyle: ControlFontStyleRec ): OSErr; external name '_SetControlFontStyle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DrawControlInCurrentPort()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- procedure DrawControlInCurrentPort( inControl: ControlRef ); external name '_DrawControlInCurrentPort';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetUpControlBackground()
- *
- * Summary:
- * Applies the proper background color for the given control to the
- * current port.
- *
- * Discussion:
- * An embedding-savvy control which erases before drawing must
- * ensure that its background color properly matches the body color
- * of any parent controls on top of which it draws. This routine
- * asks the Control Manager to determine and apply the proper
- * background color to the current port. If a ControlColorProc has
- * been provided for the given control, the proc will be called to
- * set up the background color. If no proc exists, or if the proc
- * returns a value other than noErr, the Control Manager ascends the
- * parent chain for the given control looking for a control which
- * has a special background (see the kControlHasSpecialBackground
- * feature bit). The first such parent is asked to set up the
- * background color (see the kControlMsgSetUpBackground message). If
- * no such parent exists, the Control Manager applies any ThemeBrush
- * which has been associated with the owning window (see
- * SetThemeWindowBackground). Available in Appearance 1.0 (Mac OS
- * 8), CarbonLib 1.0, Mac OS X, and later.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The ControlRef that wants to erase.
- *
- * inDepth:
- * A short integer indicating the color depth of the device onto
- * which drawing will take place.
- *
- * inIsColorDevice:
- * A Boolean indicating whether the draw device is a color device.
- *
- * Result:
- * An OSStatus code indicating success or failure. The most likely
- * error is a controlHandleInvalidErr, resulting from a bad
- * ControlRef. Any non-noErr result indicates that the color set up
- * failed, and that the caller should probably give up its attempt
- * to draw.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function SetUpControlBackground( inControl: ControlRef; inDepth: SInt16; inIsColorDevice: Boolean ): OSErr; external name '_SetUpControlBackground';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetUpControlTextColor()
- *
- * Summary:
- * Applies the proper text color for the given control to the
- * current port.
- *
- * Discussion:
- * An embedding-savvy control which draws text must ensure that its
- * text color properly contrasts the background on which it draws.
- * This routine asks the Control Manager to determine and apply the
- * proper text color to the current port. If a ControlColorProc has
- * been provided for the given control, the proc will be called to
- * set up the text color. If no proc exists, or if the proc returns
- * a value other than noErr, the Control Manager ascends the parent
- * chain for the given control looking for a control which has a
- * special background (see the kControlHasSpecialBackground feature
- * bit). The first such parent is asked to set up the text color
- * (see the kControlMsgApplyTextColor message). If no such parent
- * exists, the Control Manager chooses a text color which contrasts
- * any ThemeBrush which has been associated with the owning window
- * (see SetThemeWindowBackground). Available in Appearance 1.1 (Mac
- * OS 8.5), CarbonLib 1.0, Mac OS X, and later.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The ControlRef that wants to draw text.
- *
- * inDepth:
- * A short integer indicating the color depth of the device onto
- * which drawing will take place.
- *
- * inIsColorDevice:
- * A Boolean indicating whether the draw device is a color device.
- *
- * Result:
- * An OSStatus code indicating success or failure. The most likely
- * error is a controlHandleInvalidErr, resulting from a bad
- * ControlRef. Any non-noErr result indicates that the color set up
- * failed, and that the caller should probably give up its attempt
- * to draw.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function SetUpControlTextColor( inControl: ControlRef; inDepth: SInt16; inIsColorDevice: Boolean ): OSErr; external name '_SetUpControlTextColor';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * ControlColorProcPtr
- *
- * Discussion:
- * Callback allowing clients to specify/override the background
- * color and text color that a Control will use during drawing. Your
- * procedure should make the color changes to the current port. See
- * SetControlColorProc, SetUpControlBackground, and
- * SetUpControlTextColor for more information. Available on Mac OS
- * 8.5, CarbonLib 1.1, Mac OS X, and later.
- *
- * Parameters:
- *
- * inControl:
- * A reference to the Control for whom your proc is setting up
- * colors.
- *
- * inMessage:
- * A ControlDefProcMessage indicating what sort of color your
- * procedure should set up. It will be either
- * kControlMsgApplyTextColor or kControlMsgSetUpBackground.
- * kControlMsgApplyTextColor is a request to set up the
- * appropriate text color (by setting the current port's
- * foreground color, pen information, etc.).
- * kControlMsgSetUpBackground is a request to set up the
- * appropriate background color (the current port's background
- * color, pattern, etc.).
- *
- * inDrawDepth:
- * A short integer indicating the bit depth of the device into
- * which the Control is drawing. The bit depth is typically passed
- * in as a result of someone someone trying to draw properly
- * across multiple monitors with different bit depths. If your
- * procedure wants to handle proper color set up based on bit
- * depth, it should use this parameter to help decide what color
- * to apply.
- *
- * inDrawInColor:
- * A Boolean indicating whether or not the device that the Control
- * is drawing into is a color device. The value is typically
- * passed in as a result of someone trying to draw properly across
- * multiple monitors which may or may not be color devices. If
- * your procedure wants to handle proper color set up for both
- * color and grayscale devices, it should use this parameter to
- * help decide what color to apply.
- *
- * Result:
- * An OSStatus code indicating success or failure. Returning noErr
- * is an indication that your proc completely handled the color set
- * up. If you return any other value, the Control Manager will fall
- * back to the normal color set up mechanism.
- }
- type
- ControlColorProcPtr = function( inControl: ControlRef; inMessage: SInt16; inDrawDepth: SInt16; inDrawInColor: Boolean ): OSStatus;
- type
- ControlColorUPP = ControlColorProcPtr;
- {
- * NewControlColorUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewControlColorUPP( userRoutine: ControlColorProcPtr ): ControlColorUPP; external name '_NewControlColorUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DisposeControlColorUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeControlColorUPP( userUPP: ControlColorUPP ); external name '_DisposeControlColorUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * InvokeControlColorUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function InvokeControlColorUPP( inControl: ControlRef; inMessage: SInt16; inDrawDepth: SInt16; inDrawInColor: Boolean; userUPP: ControlColorUPP ): OSStatus; external name '_InvokeControlColorUPP';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlColorProc()
- *
- * Summary:
- * Associates a ControlColorUPP with a given Control, thereby
- * allowing you to bypass the embedding hierarchy-based color setup
- * of SetUpControlBackground/SetUpControlTextColor and replace it
- * with your own.
- *
- * Discussion:
- * Before an embedded Control can erase, it calls
- * SetUpControlBackground to have its background color set up by any
- * parent controls. Similarly, any Control which draws text calls
- * SetUpControlTextColor to have the appropriate text color set up.
- * This allows certain controls (such as Tabs and Placards) to offer
- * special backgrounds and text colors for any child controls. By
- * default, the SetUp routines only move up the Control Manager
- * embedding hierarchy looking for a parent which has a special
- * background. This is fine in a plain vanilla embedding case, but
- * many application frameworks find it troublesome; if there are
- * interesting views between two Controls in the embedding
- * hierarchy, the framework needs to be in charge of the background
- * and text colors, otherwise drawing defects will occur. You can
- * only associate a single color proc with a given ControlRef.
- * Available on Mac OS 8.5, CarbonLib 1.1, Mac OS X, and later.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The ControlRef with whom the color proc should be associated.
- *
- * inProc:
- * The color proc to associate with the ControlRef. If you pass
- * NULL, the ControlRef will be dissociated from any previously
- * installed color proc.
- *
- * Result:
- * An OSStatus code indicating success or failure. The most likely
- * error is a controlHandleInvalidErr resulting from a bad
- * ControlRef.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function SetControlColorProc( inControl: ControlRef; inProc: ControlColorUPP ): OSStatus; external name '_SetControlColorProc';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Mousing }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- NOTE ON CONTROL ACTION PROCS
- When using the TrackControl() call when tracking an indicator, the actionProc parameter
- (type ControlActionUPP) should be replaced by a parameter of type DragGrayRgnUPP
- (see Quickdraw.h).
- If, however, you are using the live feedback variants of scroll bars or sliders, you
- must pass a ControlActionUPP in when tracking the indicator as well. This functionality
- is available in Appearance 1.0 or later.
- }
- {
- * TrackControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function TrackControl( theControl: ControlRef; startPoint: Point; actionProc: ControlActionUPP { can be NULL } ): ControlPartCode; external name '_TrackControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DragControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure DragControl( theControl: ControlRef; startPoint: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: DragConstraint ); external name '_DragControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * TestControl()
- *
- * Summary:
- * Determines the control part that is at a given point.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * theControl:
- * The control to test.
- *
- * testPoint:
- * The location to test. For a non-compositing control, this
- * location should be in port-local coordinates; for a compositing
- * control, this location should be in view-local coordinates.
- *
- * Result:
- * The control part code that was at the specified location.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function TestControl( theControl: ControlRef; testPoint: Point ): ControlPartCode; external name '_TestControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * FindControl()
- *
- * Summary:
- * Finds the control in a window that is at a given point.
- *
- * Discussion:
- * FindControl does not work properly in compositing windows prior
- * to Mac OS X 10.4. In earlier releases of Mac OS X, it will return
- * the correct control, but the part code parameter will be invalid
- * (usually kControlNoPart).
- *
- * In Mac OS X 10.2 and later, we recommend using
- * HIViewGetViewForMouseEvent or HIViewGetSubviewHit instead of
- * FindControl.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * testPoint:
- * The point to test. The point should be given in port-local
- * coordinates for the specified window.
- *
- * theWindow:
- * The window whose controls to test.
- *
- * theControl:
- * On exit, contains the control that was at the specified
- * location.
- *
- * Result:
- * The control part code that was at the specified location.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function FindControl( testPoint: Point; theWindow: WindowRef; var theControl: ControlRef ): ControlPartCode; external name '_FindControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { The following mousing routines available only with Appearance 1.0 and later }
- { HandleControlClick is preferable to TrackControl when running under }
- { Appearance 1.0 as you can pass in modifiers, which some of the new controls }
- { use, such as edit text and list boxes. }
- { NOTE: Passing NULL for the outPart parameter of FindControlUnderMouse is only}
- { supported in systems later than 10.1.x }
- {
- * FindControlUnderMouse()
- *
- * Summary:
- * Finds the control in a window that is at a given point.
- *
- * Discussion:
- * FindControlUnderMouse does not work properly in compositing
- * windows prior to Mac OS X 10.4. In earlier releases of Mac OS X,
- * it will return the correct control, but the part code parameter
- * will be invalid (usually kControlNoPart).
- *
- * In Mac OS X 10.2 and later, we recommend using
- * HIViewGetViewForMouseEvent or HIViewGetSubviewHit instead of
- * FindControlUnderMouse.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWhere:
- * The point to test. The point should be given in port-local
- * coordinates for the specified window.
- *
- * inWindow:
- * The window whose controls to test.
- *
- * outPart:
- * On exit, contains the control part code that was at the
- * specified location. You may pass NULL for this parameter if you
- * don't need this information.
- *
- * Result:
- * The control that was at the specified location.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function FindControlUnderMouse( inWhere: Point; inWindow: WindowRef; outPart: ControlPartCodePtr { can be NULL } ): ControlRef; external name '_FindControlUnderMouse';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * HandleControlClick()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function HandleControlClick( inControl: ControlRef; inWhere: Point; inModifiers: EventModifiers; inAction: ControlActionUPP { can be NULL } ): ControlPartCode; external name '_HandleControlClick';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { Contextual Menu support in the Control Manager is only available on Carbon. }
- { If the control didn't display a contextual menu (possibly because the point }
- { was in a non-interesting part), the menuDisplayed output parameter will be }
- { false. If the control did display a menu, menuDisplayed will be true. }
- { This in on Carbon only }
- {
- * HandleControlContextualMenuClick()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function HandleControlContextualMenuClick( inControl: ControlRef; inWhere: Point; var menuDisplayed: Boolean ): OSStatus; external name '_HandleControlContextualMenuClick';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { Some complex controls (like Data Browser) require proper sequencing of }
- { window activation and click processing. In some cases, the control might }
- { want the window to be left inactive yet still handle the click, or vice- }
- { versa. The GetControlClickActivation routine lets a control client ask the }
- { control how it wishes to behave for a particular click. }
- { This in on Carbon only. }
- {
- * GetControlClickActivation()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function GetControlClickActivation( inControl: ControlRef; inWhere: Point; inModifiers: EventModifiers; var outResult: ClickActivationResult ): OSStatus; external name '_GetControlClickActivation';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Events (available only with Appearance 1.0 and later) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * HandleControlKey()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function HandleControlKey( inControl: ControlRef; inKeyCode: SInt16; inCharCode: SInt16; inModifiers: EventModifiers ): ControlPartCode; external name '_HandleControlKey';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Mouse Tracking (available with Carbon) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { The HandleControlSetCursor routine requests that a given control set the cursor to }
- { something appropriate based on the mouse location. }
- { If the control didn't want to set the cursor (because the point was in a }
- { non-interesting part), the cursorWasSet output parameter will be false. If the }
- { control did set the cursor, cursorWasSet will be true. }
- { Carbon only. }
- {
- * HandleControlSetCursor()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function HandleControlSetCursor( control: ControlRef; localPoint: Point; modifiers: EventModifiers; var cursorWasSet: Boolean ): OSStatus; external name '_HandleControlSetCursor';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Positioning }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * MoveControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure MoveControl( theControl: ControlRef; h: SInt16; v: SInt16 ); external name '_MoveControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SizeControl()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SizeControl( theControl: ControlRef; w: SInt16; h: SInt16 ); external name '_SizeControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Title }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * SetControlTitle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetControlTitle( theControl: ControlRef; const (*var*) title: Str255 ); external name '_SetControlTitle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlTitle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure GetControlTitle( theControl: ControlRef; var title: Str255 ); external name '_GetControlTitle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlTitleWithCFString()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: not available
- }
- function SetControlTitleWithCFString( inControl: ControlRef; inString: CFStringRef ): OSStatus; external name '_SetControlTitleWithCFString';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * CopyControlTitleAsCFString()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: not available
- }
- function CopyControlTitleAsCFString( inControl: ControlRef; var outString: CFStringRef ): OSStatus; external name '_CopyControlTitleAsCFString';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Value }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * GetControlValue()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetControlValue( theControl: ControlRef ): SInt16; external name '_GetControlValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlValue()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetControlValue( theControl: ControlRef; newValue: SInt16 ); external name '_SetControlValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlMinimum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetControlMinimum( theControl: ControlRef ): SInt16; external name '_GetControlMinimum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlMinimum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetControlMinimum( theControl: ControlRef; newMinimum: SInt16 ); external name '_SetControlMinimum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlMaximum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetControlMaximum( theControl: ControlRef ): SInt16; external name '_GetControlMaximum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlMaximum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetControlMaximum( theControl: ControlRef; newMaximum: SInt16 ); external name '_SetControlMaximum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { proportional scrolling/32-bit value support is new with Appearance 1.1}
- {
- * GetControlViewSize()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function GetControlViewSize( theControl: ControlRef ): SInt32; external name '_GetControlViewSize';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlViewSize()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- procedure SetControlViewSize( theControl: ControlRef; newViewSize: SInt32 ); external name '_SetControlViewSize';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControl32BitValue()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function GetControl32BitValue( theControl: ControlRef ): SInt32; external name '_GetControl32BitValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControl32BitValue()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- procedure SetControl32BitValue( theControl: ControlRef; newValue: SInt32 ); external name '_SetControl32BitValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControl32BitMaximum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function GetControl32BitMaximum( theControl: ControlRef ): SInt32; external name '_GetControl32BitMaximum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControl32BitMaximum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- procedure SetControl32BitMaximum( theControl: ControlRef; newMaximum: SInt32 ); external name '_SetControl32BitMaximum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControl32BitMinimum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function GetControl32BitMinimum( theControl: ControlRef ): SInt32; external name '_GetControl32BitMinimum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControl32BitMinimum()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- procedure SetControl32BitMinimum( theControl: ControlRef; newMinimum: SInt32 ); external name '_SetControl32BitMinimum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- IsValidControlHandle will tell you if the handle you pass in belongs to a control
- the Control Manager knows about. It does not sanity check the data in the control.
- }
- {
- * IsValidControlHandle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function IsValidControlHandle( theControl: ControlRef ): Boolean; external name '_IsValidControlHandle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control IDs }
- { Carbon only. }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * ControlID
- *
- * Summary:
- * A unique identifier for a control in a window.
- }
- type
- ControlIDPtr = ^ControlID;
- ControlID = record
- {
- * A four-character signature. When assigning a control ID to your
- * own controls, you should typically use your application signature
- * here, or some other signature with an uppercase character. Apple
- * reserves signatures that contain only lowercase characters.
- }
- signature: OSType;
- {
- * A integer identifying the control. This value should be unique for
- * a given control across all controls in the same window with the
- * same signature.
- }
- id: SInt32;
- end;
- {
- * SetControlID()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function SetControlID( inControl: ControlRef; const (*var*) inID: ControlID ): OSStatus; external name '_SetControlID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlID()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function GetControlID( inControl: ControlRef; var outID: ControlID ): OSStatus; external name '_GetControlID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlByID()
- *
- * Discussion:
- * Find a control in a window by its unique ID.
- *
- * HIView Notes: This call is replaced as of Mac OS X 10.3 by
- * HIViewFindByID. That call lets you start your search at any point
- * in the hierarchy, as the first parameter is a view and not a
- * window. Either will work, but the HIView API is preferred.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window to search.
- *
- * inID:
- * The ID to search for.
- *
- * outControl:
- * The control that was found, or NULL if no control in the window
- * had the ID specified.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function GetControlByID( inWindow: WindowRef; const (*var*) inID: ControlID; var outControl: ControlRef ): OSStatus; external name '_GetControlByID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Command IDs }
- { Carbon only. }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * SetControlCommandID()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: not available
- }
- function SetControlCommandID( inControl: ControlRef; inCommandID: UInt32 ): OSStatus; external name '_SetControlCommandID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlCommandID()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: not available
- }
- function GetControlCommandID( inControl: ControlRef; var outCommandID: UInt32 ): OSStatus; external name '_GetControlCommandID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Identification }
- { Carbon only. }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- type
- ControlKindPtr = ^ControlKind;
- ControlKind = record
- signature: OSType;
- kind: OSType;
- end;
- {
- * Discussion:
- * Control signature kind
- }
- const
- {
- * Signature of all system controls.
- }
- kControlKindSignatureApple = $6170706C (* 'appl' *);
- {
- * GetControlKind()
- *
- * Summary:
- * Returns the kind of the given control.
- *
- * Discussion:
- * GetControlKind allows you to query the kind of any control. This
- * function is only available in Mac OS X.
- *
- * HIView Note: With the advent of HIView, you can just as easily
- * use HIObjectCopyClassID to determine what kind of control you are
- * looking at. This is only truly deterministic for
- * HIToolbox-supplied controls as of Mac OS X 10.3 or later due to
- * the fact that the class IDs underwent naming changes before that
- * release.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The ControlRef to find the kind of.
- *
- * outControlKind:
- * On successful exit, this will contain the control signature and
- * kind. See ControlDefinitions.h for the kinds of each system
- * control.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.5 and later
- * Non-Carbon CFM: not available
- }
- function GetControlKind( inControl: ControlRef; var outControlKind: ControlKind ): OSStatus; external name '_GetControlKind';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Properties }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- kControlPropertyPersistent = $00000001; { whether this property gets saved when flattening the control}
- {
- * GetControlProperty()
- *
- * Discussion:
- * Obtains a piece of data that has been previously associated with
- * a control.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * control:
- * A ControlRef to the control whose associated data you wish to
- * obtain.
- *
- * propertyCreator:
- * An OSType signature, usually the signature of your application.
- * Do not use all lower case signatures, as these are reserved for
- * use by Apple.
- *
- * propertyTag:
- * An OSType signature, application-defined, identifying the
- * property.
- *
- * bufferSize:
- * A value specifying the size of the data to be retrieved. If the
- * size of the data is unknown, use the function
- * GetControlPropertySize to get the dataÕs size. If the size
- * specified in the bufferSize parameter does not match the actual
- * size of the property, GetControlProperty only retrieves data up
- * to the size specified or up to the actual size of the property,
- * whichever is smaller, and an error is returned.
- *
- * actualSize:
- * On input, a pointer to an unsigned 32-bit integer. On return,
- * this value is set to the actual size of the associated data.
- * You may pass null for the actualSize parameter if you are not
- * interested in this information.
- *
- * propertyBuffer:
- * On input, a pointer to a buffer. This buffer must be big enough
- * to fit bufferSize bytes of data. On return, this buffer
- * contains a copy of the data that is associated with the
- * specified control.
- *
- * Result:
- * A result code indicating success or failure. Most common return
- * values are: noErr, paramErr, controlHandleInvalidErr,
- * controlPropertyInvalid and controlPropertyNotFoundErr.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function GetControlProperty( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; bufferSize: UInt32; actualSize: UInt32Ptr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetControlProperty';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlPropertySize()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function GetControlPropertySize( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; var size: UInt32 ): OSStatus; external name '_GetControlPropertySize';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlProperty()
- *
- * Discussion:
- * Obtains a piece of data that has been previously associated with
- * a control.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * control:
- * A ControlRef to the control whose associated data you wish to
- * obtain.
- *
- * propertyCreator:
- * An OSType signature, usually the signature of your application.
- * Do not use all lower case signatures, as these are reserved for
- * use by Apple.
- *
- * propertyTag:
- * An OSType signature, application-defined, identifying the
- * property.
- *
- * propertySize:
- * A value specifying the size of the data.
- *
- * propertyData:
- * On input, a pointer to data of any type. Pass a pointer to a
- * buffer containing the data to be associated; this buffer should
- * be at least as large as the value specified in the propertySize
- * parameter.
- *
- * propertyBuffer:
- * On input, a pointer to a buffer. This buffer must be big enough
- * to fit bufferSize bytes of data. On return, this buffer
- * contains a copy of the data that is associated with the
- * specified control.
- *
- * Result:
- * A result code indicating success or failure. Most common return
- * values are: noErr, paramErr, controlHandleInvalidErr and
- * controlPropertyInvalid
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function SetControlProperty( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; propertySize: UInt32; propertyData: {const} UnivPtr ): OSStatus; external name '_SetControlProperty';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * RemoveControlProperty()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function RemoveControlProperty( control: ControlRef; propertyCreator: OSType; propertyTag: OSType ): OSStatus; external name '_RemoveControlProperty';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlPropertyAttributes()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function GetControlPropertyAttributes( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; var attributes: UInt32 ): OSStatus; external name '_GetControlPropertyAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * ChangeControlPropertyAttributes()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function ChangeControlPropertyAttributes( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; attributesToSet: UInt32; attributesToClear: UInt32 ): OSStatus; external name '_ChangeControlPropertyAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Regions (Appearance 1.1 or later) }
- { See the discussion on meta-parts in this header for more information }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * GetControlRegion()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 8.5 and later
- }
- function GetControlRegion( inControl: ControlRef; inPart: ControlPartCode; outRegion: RgnHandle ): OSStatus; external name '_GetControlRegion';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Variant }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * GetControlVariant()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetControlVariant( theControl: ControlRef ): ControlVariant; external name '_GetControlVariant';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Action }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * SetControlAction()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetControlAction( theControl: ControlRef; actionProc: ControlActionUPP ); external name '_SetControlAction';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlAction()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetControlAction( theControl: ControlRef ): ControlActionUPP; external name '_GetControlAction';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Accessors }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * SetControlReference()
- *
- * Summary:
- * This is somewhat of a legacy API. The Set/GetControlProperty API
- * is a better mechanism to associate data with a control.
- *
- * Discussion:
- * When you create a control, you specify an initial reference
- * value, either in the control resource or in the refCon parameter
- * of the function NewControl. You can use the function
- * GetControlReference to obtain the current value. You can use this
- * value for any purpose.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * theControl:
- * A ControlRef to the control whose reference value you wish to
- * change.
- *
- * data:
- * The new reference value for the control.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetControlReference( theControl: ControlRef; data: SInt32 ); external name '_SetControlReference';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlReference()
- *
- * Summary:
- * This is somewhat of a legacy API. The Set/GetControlProperty API
- * is a better mechanism to associate data with a control.
- *
- * Discussion:
- * When you create a control, you specify an initial reference
- * value, either in the control resource or in the refCon parameter
- * of the function NewControl. You can use this reference value for
- * any purpose, and you can use the function SetControlReference to
- * change this value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * theControl:
- * A ControlRef to the control whose reference value you wish to
- * retrieve.
- *
- * Result:
- * The current reference value for the specified control.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetControlReference( theControl: ControlRef ): SInt32; external name '_GetControlReference';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlColor()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Hierarchy (Appearance 1.0 and later only) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * SendControlMessage()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function SendControlMessage( inControl: ControlRef; inMessage: SInt16; inParam: UnivPtr ): SInt32; external name '_SendControlMessage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * DumpControlHierarchy()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function DumpControlHierarchy( inWindow: WindowRef; const (*var*) inDumpFile: FSSpec ): OSErr; external name '_DumpControlHierarchy';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * CreateRootControl()
- *
- * Discussion:
- * Creates a new 'root control' for a window. This root is actually
- * the content area of a window, and spans all of Quickdraw space.
- *
- *
- * HIView Notes: In a composited window, this routine will return
- * errRootAlreadyExists. Technically, you cannot create a root
- * control in such a window. Instead you would embed views into the
- * content view of the window. GetRootControl will return the
- * content view in that situation as well.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window for which to create a root control.
- *
- * outControl:
- * On exit, contains the window's root control. In Mac OS 10.1 and
- * CarbonLib 1.5 and later, this parameter may be NULL if you
- * don't need the ControlRef.
- *
- * Result:
- * A result code indicating success or failure. errRootAlreadyExists
- * is returned if the window already has a root control.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function CreateRootControl( inWindow: WindowRef; outControl: ControlRefPtr { can be NULL } ): OSErr; external name '_CreateRootControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetRootControl()
- *
- * Discussion:
- * Returns the 'root control' for a given window. If no root exists
- * for the window, errNoRootControl is returned. This root control
- * represents the content area of the window, and spans all of
- * Quickdraw space.
- *
- * HIView Notes: With the advent of HIView, this API and concept are
- * considered deprecated. The root of the window in a composited
- * window is actually the structure view, and all views (window
- * widgets, content view, etc.) are subviews of that top-level view.
- * It can be fetched with HIViewGetRoot. In a composited window,
- * calling GetRootControl will return the content view, not the true
- * root to maintain compatibility with past usage of GetRootControl.
- * We recommend using HIViewFindByID with the kHIViewWindowContentID
- * control ID to fetch the content view instead of using this call.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window to query.
- *
- * outControl:
- * The root control, on output.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetRootControl( inWindow: WindowRef; var outControl: ControlRef ): OSErr; external name '_GetRootControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * EmbedControl()
- *
- * Discussion:
- * Adds a subcontrol to the given parent.
- *
- * HIView Note: This is replaced by HIViewAddSubview in Mac OS X
- * 10.2 and beyond. You can call either function in a composited or
- * non-composited window, but the HIView variant is preferred.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The subcontrol being added.
- *
- * inContainer:
- * The control which will receive the new subcontrol.
- *
- * Result:
- * An operating system result code.
- * errNeedsCompositedWindow will be returned when you try to embed
- * into the content view in a non-compositing window; you can only
- * embed into the content view in compositing windows.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function EmbedControl( inControl: ControlRef; inContainer: ControlRef ): OSErr; external name '_EmbedControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * AutoEmbedControl()
- *
- * Discussion:
- * Based on the bounds of the given control, embed it in the window
- * specified. It basically finds the deepest parent the control
- * would fit into and embeds it there. This was invented primarily
- * for the Dialog Manager so that hierarchies could be generated
- * from the flattened DITL list.
- *
- * HIView Note: Do NOT call this API in a composited window, its
- * results will be unpredictable as the coordinate systems are very
- * different.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The subcontrol being added.
- *
- * inWindow:
- * The window which will receive the new subcontrol.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function AutoEmbedControl( inControl: ControlRef; inWindow: WindowRef ): OSErr; external name '_AutoEmbedControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetSuperControl()
- *
- * Discussion:
- * Returns the parent control of the given one.
- *
- * HIView Note: HIViewGetSuperview is the preferred API as of Mac OS
- * X 10.2. Either call will work in a composited or non- composited
- * window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control to query.
- *
- * outParent:
- * The parent control.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetSuperControl( inControl: ControlRef; var outParent: ControlRef ): OSErr; external name '_GetSuperControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * CountSubControls()
- *
- * Discussion:
- * Returns the number of children a given control has. This count
- * can then be used for calls to GetIndexedSubControl.
- *
- *
- * HIView Note: As of Mac OS X 10.2, the preferred way to walk the
- * control hierarchy is to use HIViewGetFirstSubView followed by
- * repeated calls to HIViewGetNextView until NULL is returned.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control to query.
- *
- * outNumChildren:
- * A pointer to a UInt16 to receive the number of children
- * controls.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function CountSubControls( inControl: ControlRef; var outNumChildren: UInt16 ): OSErr; external name '_CountSubControls';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetIndexedSubControl()
- *
- * Discussion:
- * Returns the child control at a given index in the list of
- * subcontrols for the specified parent.
- *
- * HIView Note: As of Mac OS X 10.2, the preferred way to walk the
- * control hierarchy is to use HIViewGetFirstSubView followed by
- * repeated calls to HIViewGetNextView until NULL is returned.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The parent control to query.
- *
- * inIndex:
- * The index of the subcontrol to fetch.
- *
- * outSubControl:
- * A pointer to a control reference to receive the subcontrol. If
- * the index is out of range, the contents of this parameter are
- * undefined after the call.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetIndexedSubControl( inControl: ControlRef; inIndex: UInt16; var outSubControl: ControlRef ): OSErr; external name '_GetIndexedSubControl';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlSupervisor()
- *
- * Discussion:
- * Allow one view to intercept clicks for another. When something
- * like FindControl or the like is called on the target, it will
- * instead return the supervisor. This is largely deprecated these
- * days.
- *
- * HIView Note: As of Mac OS X 10.2, you can intercept subview
- * clicks by overriding the kEventControlInterceptSubviewClick event
- * (see CarbonEvents.h).
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control to intercept clicks for.
- *
- * inBoss:
- * The new supervisor control (can be NULL).
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function SetControlSupervisor( inControl: ControlRef; inBoss: ControlRef { can be NULL } ): OSErr; external name '_SetControlSupervisor';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Keyboard Focus (available only with Appearance 1.0 and later) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * GetKeyboardFocus()
- *
- * Discussion:
- * Passes back the currently focused control within the given window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window to get the focus of.
- *
- * outControl:
- * On output, this will contain the ControlRef that is currently
- * focused in the given window. If there is no currently focused
- * control, outControl will contain NULL.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetKeyboardFocus( inWindow: WindowRef; var outControl: ControlRef ): OSErr; external name '_GetKeyboardFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetKeyboardFocus()
- *
- * Discussion:
- * Focuses the given part of the given control in a particular
- * window. If another control is currently focused in the window,
- * focus will be removed from the other control before focus is
- * given to the desired control. SetKeyboardFocus respects the full
- * keyboard navigation mode.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window which contains the control you want to focus. If the
- * window does not contain the control, an error will be returned.
- *
- * inControl:
- * The control you want to focus.
- *
- * inPart:
- * The part of the control you wish to focus. You may pass
- * kControlFocusNoPart to clear the focus in the given control.
- * You may pass kControlFocusNextPart or kControlFocusPrevPart to
- * move the focus within the given control.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function SetKeyboardFocus( inWindow: WindowRef; inControl: ControlRef; inPart: ControlFocusPart ): OSErr; external name '_SetKeyboardFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * AdvanceKeyboardFocus()
- *
- * Discussion:
- * Advances the focus to the next most appropriate control. Unless
- * overriden in some fashion (either by overriding certain carbon
- * events or using the HIViewSetNextFocus API), the Toolbox will use
- * a spacially determinant method of focusing, attempting to focus
- * left to right, top to bottom in a window, taking groups of
- * controls into account. AdvanceKeyboardFocus does not respect the
- * full keyboard navigation mode. It will only advance the focus
- * between traditionally focusable controls. If you want to advance
- * the focus in a way that respects the full keyboard navigation
- * mode, use the HIViewAdvanceFocus API. AdvanceKeyboardFocus does
- * not work for windows in compositing mode. For compositing
- * windows, you must call HIViewAdvanceFocus instead.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window to advance the focus in.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function AdvanceKeyboardFocus( inWindow: WindowRef ): OSErr; external name '_AdvanceKeyboardFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * ReverseKeyboardFocus()
- *
- * Discussion:
- * Reverses the focus to the next most appropriate control. Unless
- * overriden in some fashion (either by overriding certain carbon
- * events or using the HIViewSetNextFocus API), the Toolbox will use
- * a spacially determinant method of focusing, attempting to focus
- * left to right, top to bottom in a window, taking groups of
- * controls into account. ReverseKeyboardFocus does not respect the
- * full keyboard navigation mode. It will only reverse the focus
- * between traditionally focusable controls. If you want to reverse
- * the focus in a way that respects the full keyboard navigation
- * mode, use the HIViewAdvanceFocus API. ReverseKeyboardFocus does
- * not work for windows in compositing mode. For compositing
- * windows, you must call HIViewAdvanceFocus instead.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window to reverse the focus in.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function ReverseKeyboardFocus( inWindow: WindowRef ): OSErr; external name '_ReverseKeyboardFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * ClearKeyboardFocus()
- *
- * Discussion:
- * Clears focus from the currently focused control in a given
- * window. The window will be left such that no control is focused
- * within it.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window that you want to clear the focus in.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function ClearKeyboardFocus( inWindow: WindowRef ): OSErr; external name '_ClearKeyboardFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Data (available only with Appearance 1.0 and later) }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * GetControlFeatures()
- *
- * Discussion:
- * Returns the set of behaviors, etc. the given view supports. This
- * set of features is immutable before Mac OS X 10.3. As of that
- * release, the features can be changed with HIViewChangeFeatures.
- * That API is the recommended call on Mac OS X 10.3 and later.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control to query.
- *
- * outFeatures:
- * A pointer to a 32-bit feature bitfield.
- *
- * Result:
- * An operating system error code.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetControlFeatures( inControl: ControlRef; var outFeatures: UInt32 ): OSErr; external name '_GetControlFeatures';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlData()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function SetControlData( inControl: ControlRef; inPart: ControlPartCode; inTagName: ResType; inSize: Size; inData: {const} UnivPtr ): OSErr; external name '_SetControlData';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlData()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetControlData( inControl: ControlRef; inPart: ControlPartCode; inTagName: ResType; inBufferSize: Size; inBuffer: UnivPtr; outActualSize: SizePtr { can be NULL } ): OSErr; external name '_GetControlData';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlDataSize()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- function GetControlDataSize( inControl: ControlRef; inPart: ControlPartCode; inTagName: ResType; var outMaxSize: Size ): OSErr; external name '_GetControlDataSize';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ Control Drag & Drop }
- { Carbon only. }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * Discussion:
- * DragTrackingMessage values for use with
- * HandleControlDragTracking. These are deprecated in favor of the
- * drag Carbon Events introduced in Mac OS X 10.2 via HIView.
- }
- const
- {
- * The drag was previously outside the control and it just now
- * entered the control.
- }
- kDragTrackingEnterControl = 2;
- {
- * The drag was previously inside the control and it is still inside
- * the control.
- }
- kDragTrackingInControl = 3;
- {
- * The drag was previously inside the control and it just now left
- * the control.
- }
- kDragTrackingLeaveControl = 4;
- {
- * HandleControlDragTracking()
- *
- * Summary:
- * Tells a control to respond visually to a drag.
- *
- * Discussion:
- * Call HandleControlDragTracking when a drag is above a control in
- * your window and you want to give that control a chance to draw
- * appropriately in response to the drag. Note that in order for a
- * control to have any chance of responding to this API, you must
- * enable the control's drag and drop support with
- * SetControlDragTrackingEnabled.
- * <br>HIView Note: This should not be called in a composited window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control the drag is over. Most controls won't track drags
- * unless you enable drag tracking on it with
- * SetControlDragTrackingEnabled.
- *
- * inMessage:
- * A drag message indicating the state of the drag above the
- * control. The meaning of the value you pass in must be relative
- * to the control, not the whole window. For when the drag first
- * enters the control, you should pass kDragTrackingEnterControl.
- * While the drag stays within the control, pass
- * kDragTrackingInControl. When the drag leaves the control, pass
- * kDragTrackingLeaveControl.
- *
- * inDrag:
- * The drag reference that is over the control.
- *
- * outLikesDrag:
- * On output, this will be a boolean indicating whether the
- * control "likes" the drag. A control "likes" the drag if the
- * data in the drag ref can be accepted by the control. If the
- * control does not like the drag, don't bother calling
- * HandleControlDragReceive if the user drops the dragged object
- * onto the control.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function HandleControlDragTracking( inControl: ControlRef; inMessage: DragTrackingMessage; inDrag: DragReference; var outLikesDrag: Boolean ): OSStatus; external name '_HandleControlDragTracking';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * HandleControlDragReceive()
- *
- * Summary:
- * Tells a control to accept the data in drag reference.
- *
- * Discussion:
- * Call HandleControlDragReceive when the user dropped a drag on a
- * control in your window. This gives the control the opportunity to
- * pull any interesting data out of the drag and insert the data
- * into itself. Note that in order for a control to have any chance
- * of responding to this API, you must enable the control's drag and
- * drop support with SetControlDragTrackingEnabled.
- * <br>HIView Note: This should not be called in a composited window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control who should accept the data. Most controls won't
- * accept drags unless you enable drag tracking on it with
- * SetControlDragTrackingEnabled.
- *
- * inDrag:
- * The drag reference that was dropped on the control.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function HandleControlDragReceive( inControl: ControlRef; inDrag: DragReference ): OSStatus; external name '_HandleControlDragReceive';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlDragTrackingEnabled()
- *
- * Summary:
- * Tells a control that it should track and receive drags.
- *
- * Discussion:
- * Call SetControlDragTrackingEnabled to turn enable a control's
- * support for drag and drop. Controls won't track drags unless you
- * first turn on drag and drop support with this API. Some controls
- * don't support drag and drop at all; these controls won't track or
- * receive drags even if you call this API with true.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control whose drag tracking enabled state you'd like to set.
- *
- * inTracks:
- * A Boolean indicating whether you want this control to track and
- * receive drags.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function SetControlDragTrackingEnabled( inControl: ControlRef; inTracks: Boolean ): OSStatus; external name '_SetControlDragTrackingEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * IsControlDragTrackingEnabled()
- *
- * Summary:
- * Tells you whether a control's drag track and receive support is
- * enabled.
- *
- * Discussion:
- * Call IsControlDragTrackingEnabled to query a whether a control's
- * drag and drop support is enabled. Some controls don't support
- * drag and drop at all; these controls won't track or receive drags
- * even if you call this API and see a true output value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inControl:
- * The control whose drag tracking enabled state you'd like to
- * query.
- *
- * outTracks:
- * On output, this will contain a Boolean value whether the
- * control's drag and drop support is enabled.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function IsControlDragTrackingEnabled( inControl: ControlRef; var outTracks: Boolean ): OSStatus; external name '_IsControlDragTrackingEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetAutomaticControlDragTrackingEnabledForWindow()
- *
- * Summary:
- * Enables or disables the Control Manager's automatic drag tracking
- * for a given window.
- *
- * Discussion:
- * Call SetAutomaticControlDragTrackingEnabledForWindow to turn on
- * or off the Control Manager's automatic drag tracking support for
- * a given window. By default, your application code is responsible
- * for installing drag tracking and receive handlers on a given
- * window. The Control Manager, however, has support for
- * automatically tracking and receiving drags over controls. The
- * Control Manager will detect the control the drag is over and call
- * HandleControlDragTracking and HandleControlDragReceive
- * appropriately. By default, this automatic support is turned off.
- * You can turn on this support by calling
- * SetAutomaticControlDragTrackingEnabledForWindow with true. Note
- * that earlier versions of system software incorrectly enable this
- * support by default; do not rely on this buggy behavior. As of Mac
- * OS 10.1.3, Mac OS 9.2, and CarbonLib 1.4, the buggy behavior is
- * fixed, and you must call this routine with true to enable
- * automatic drag tracking.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window for which you'd like to enable or disable the
- * Control Manager's automatic drag tracking support.
- *
- * inTracks:
- * A Boolean value indicating whether you want to enable the
- * Control Manager's automatic drag tracking support.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function SetAutomaticControlDragTrackingEnabledForWindow( inWindow: WindowRef; inTracks: Boolean ): OSStatus; external name '_SetAutomaticControlDragTrackingEnabledForWindow';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * IsAutomaticControlDragTrackingEnabledForWindow()
- *
- * Summary:
- * Tells you whether the Control Manager's automatic drag tracking
- * is enabled for a given window.
- *
- * Discussion:
- * Call IsAutomaticControlDragTrackingEnabledForWindow to query the
- * enabled state of the Control Manager's automatic drag tracking
- * support for a given window. See the information on
- * SetAutomaticControlDragTrackingEnabledForWindow for more details.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window whose Control Manager automatic drag tracking enable
- * state you'd like to query.
- *
- * outTracks:
- * On output, this will contain a Boolean value whether the
- * Control Manager's automatic drag tracking is enabled.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in ControlsLib 9.0 and later
- }
- function IsAutomaticControlDragTrackingEnabledForWindow( inWindow: WindowRef; var outTracks: Boolean ): OSStatus; external name '_IsAutomaticControlDragTrackingEnabledForWindow';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ C Glue }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- {
- * dragcontrol()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * newcontrol()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * findcontrol()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * getcontroltitle()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * setcontroltitle()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * trackcontrol()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- {
- * testcontrol()
- *
- * Availability:
- * Mac OS X: not available
- * CarbonLib: not available
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- (*
- #if OLDROUTINENAMES
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- { ¥ OLDROUTINENAMES }
- {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
- const
- useWFont = kControlUsesOwningWindowsFontVariant;
- const
- inThumb = kControlIndicatorPart;
- kNoHiliteControlPart = kControlNoPart;
- kInIndicatorControlPart = kControlIndicatorPart;
- kReservedControlPart = kControlDisabledPart;
- kControlInactiveControlPart = kControlInactivePart;
- #define SetCTitle(theControl, title) SetControlTitle(theControl, title)
- #define GetCTitle(theControl, title) GetControlTitle(theControl, title)
- #define UpdtControl(theWindow, updateRgn) UpdateControls(theWindow, updateRgn)
- #define SetCtlValue(theControl, theValue) SetControlValue(theControl, theValue)
- #define GetCtlValue(theControl) GetControlValue(theControl)
- #define SetCtlMin(theControl, minValue) SetControlMinimum(theControl, minValue)
- #define GetCtlMin(theControl) GetControlMinimum(theControl)
- #define SetCtlMax(theControl, maxValue) SetControlMaximum(theControl, maxValue)
- #define GetCtlMax(theControl) GetControlMaximum(theControl)
- #define GetAuxCtl(theControl, acHndl) GetAuxiliaryControlRecord(theControl, acHndl)
- #define SetCRefCon(theControl, data) SetControlReference(theControl, data)
- #define GetCRefCon(theControl) GetControlReference(theControl)
- #define SetCtlAction(theControl, actionProc) SetControlAction(theControl, actionProc)
- #define GetCtlAction(theControl) GetControlAction(theControl)
- #define SetCtlColor(theControl, newColorTable) SetControlColor(theControl, newColorTable)
- #define GetCVariant(theControl) GetControlVariant(theControl)
- #define getctitle(theControl, title) getcontroltitle(theControl, title)
- #define setctitle(theControl, title) setcontroltitle(theControl, title)
- #endif { OLDROUTINENAMES }
- *)
- { Getters }
- {
- * GetControlBounds()
- *
- * Discussion:
- * Returns the bounds of a control, assumed to be in port
- * coordinates.
- *
- * HIView Notes: When called in a composited window, this routine
- * returns the view's frame, i.e. it is equivalent to calling
- * HIViewGetFrame.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * control:
- * The control to query
- *
- * bounds:
- * A pointer to a Quickdraw rectangle to be filled in by this call.
- *
- * Result:
- * A pointer to the rectangle passed in bounds.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- function GetControlBounds( control: ControlRef; var bounds: Rect ): RectPtr; external name '_GetControlBounds';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * IsControlHilited()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- function IsControlHilited( control: ControlRef ): Boolean; external name '_IsControlHilited';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlHilite()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- function GetControlHilite( control: ControlRef ): UInt16; external name '_GetControlHilite';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlOwner()
- *
- * Discussion:
- * Returns the window a control is bound to, or NULL if the control
- * is not currently attached to any window.
- *
- * HIView replacement: HIViewGetWindow (Mac OS X 10.3 or later).
- * Either call will work in a composited or non-composited view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * control:
- * The control to query
- *
- * Result:
- * A window reference, or NULL if the control is not attached to a
- * window
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- function GetControlOwner( control: ControlRef ): WindowRef; external name '_GetControlOwner';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlDataHandle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- function GetControlDataHandle( control: ControlRef ): Handle; external name '_GetControlDataHandle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlPopupMenuHandle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- function GetControlPopupMenuHandle( control: ControlRef ): MenuRef; external name '_GetControlPopupMenuHandle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- function GetControlPopupMenuRef( control: ControlRef ): MenuRef; external name '_GetControlPopupMenuHandle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * GetControlPopupMenuID()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- function GetControlPopupMenuID( control: ControlRef ): SInt16; external name '_GetControlPopupMenuID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- { Setters }
- {
- * SetControlDataHandle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- procedure SetControlDataHandle( control: ControlRef; dataHandle: Handle ); external name '_SetControlDataHandle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlBounds()
- *
- * Discussion:
- * Sets the bounds of a control, assumed to be in port coordinates.
- *
- *
- * HIView Notes: When called in a composited window, this routine
- * sets the view's frame, i.e. it is equivalent to calling
- * HIViewSetFrame. The view will be invalidated as necessary in a
- * composited window. HIViewSetFrame is the recommended call in that
- * environment.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * control:
- * The control to query
- *
- * bounds:
- * A pointer to a Quickdraw rectangle to be used by this call.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- procedure SetControlBounds( control: ControlRef; const (*var*) bounds: Rect ); external name '_SetControlBounds';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlPopupMenuHandle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- procedure SetControlPopupMenuHandle( control: ControlRef; popupMenu: MenuRef ); external name '_SetControlPopupMenuHandle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- procedure SetControlPopupMenuRef( control: ControlRef; popupMenu: MenuRef ); external name '_SetControlPopupMenuHandle';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {
- * SetControlPopupMenuID()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
- }
- procedure SetControlPopupMenuID( control: ControlRef; menuID: SInt16 ); external name '_SetControlPopupMenuID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
- {--------------------------------------------------------------------------------------}
- { ¥ DEPRECATED }
- { All functions below this point are either deprecated (they continue to function }
- { but are not the most modern nor most efficient solution to a problem), or they are }
- { completely unavailable on Mac OS X. }
- {--------------------------------------------------------------------------------------}
- {
- * IdleControls() *** DEPRECATED ***
- *
- * Deprecated:
- * Applications should remove calls to IdleControls. Custom control
- * definitions should use Carbon event loop timers instead.
- *
- * Summary:
- * Gives idle time to any controls that want the kControlMsgIdle
- * message.
- *
- * Discussion:
- * IdleControls gives idle processing time for controls that set the
- * kControlWantsIdle feature bit. IdleControls is deprecated on Mac
- * OS X. System-supplied controls do not respond to IdleControls
- * being called on Mac OS X.
- *
- * Custom controls should use repeating Carbon event loop timers to
- * perform tasks, such as animation, that previously used time given
- * with IdleControls(). See InstallEventLoopTimer() in
- * CarbonEventsCore.h for more information.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The WindowRef whose controls are offered idle time.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in AppearanceLib 1.0 and later
- }
- procedure IdleControls( inWindow: WindowRef ); external name '_IdleControls';
- (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
- end.
|