2
File: HIToolbox/HIView.h
4
Contains: HIView routines
6
Version: HIToolbox-219.4.81~2
8
Copyright: � 2001-2005 by Apple Computer, Inc., all rights reserved.
10
Bugs?: For bug reports, consult the following page on
13
http://www.freepascal.org/bugs.html
16
{ File: HIView.p(.pas) }
18
{ Contains: CodeWarrior Pascal( GPC) translation of Apple's Mac OS X 10.3 HIView.h }
19
{ Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
20
{ (GPCPInterfaces). For the 10.2 available APIs, the CodeWarrior Pascal translation }
21
{ is linkable with Mac OS X 10.2.x or higher CFM CarbonLib and the GPC translation is }
22
{ linkable with Mac OS X 10.2.x or higher Mach-O Carbon.framework. For the 10.3 }
23
{ available APIs, the CodeWarrior Pascal translation is only selectively linkable with }
24
{ Mac OS X 10.3.x or higher CFM CarbonLib and the GPC translation is linkable with Mac }
25
{ OS X 10.3.x or higher Mach-O Carbon.framework. }
29
{ Pascal Translation: Gale Paeper, <gpaeper@empirenet.com>, 2004 }
31
{ Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
32
{ translation as you deem fit. }
34
{ Bugs?: This is an AS IS translation with no express guarentees of any kind. }
35
{ If you do find a bug, please help out the Macintosh Pascal programming community by }
36
{ reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
37
{ or a posting to the MacPascal mailing list. }
39
Change History (most recent first ):
41
<4> 4/8/04 GRP Completed new additions from HIView.h, version HIToolbox-145.33~1.
42
<3> ?/?/04 PNL Added most new additions from HIView.h, version HIToolbox-145.33~1.
43
<2> 10/02/04 GRP Added support for GPC as well as CodeWarrior Pascal.
44
<1> 9/8/03 GRP First Pascal translation of HIView.h, version HIToolbox-123.6~10.
46
{ Translation assisted by: }
47
{This file was processed by Dan's Source Converter}
48
{version 1.3 (this version modified by Ingemar Ragnemalm)}
49
{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
51
Modified for use with Free Pascal
53
Please report any bugs to <gpc@microbizz.nl>
64
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
65
{$setc GAP_INTERFACES_VERSION := $0200}
67
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
68
{$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
71
{$ifc defined CPUPOWERPC and defined CPUI386}
72
{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
74
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
75
{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
78
{$ifc not defined __ppc__ and defined CPUPOWERPC}
83
{$ifc not defined __i386__ and defined CPUI386}
89
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
90
{$error Conflicting definitions for __ppc__ and __i386__}
93
{$ifc defined __ppc__ and __ppc__}
94
{$setc TARGET_CPU_PPC := TRUE}
95
{$setc TARGET_CPU_X86 := FALSE}
96
{$elifc defined __i386__ and __i386__}
97
{$setc TARGET_CPU_PPC := FALSE}
98
{$setc TARGET_CPU_X86 := TRUE}
100
{$error Neither __ppc__ nor __i386__ is defined.}
102
{$setc TARGET_CPU_PPC_64 := FALSE}
104
{$ifc defined FPC_BIG_ENDIAN}
105
{$setc TARGET_RT_BIG_ENDIAN := TRUE}
106
{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
107
{$elifc defined FPC_LITTLE_ENDIAN}
108
{$setc TARGET_RT_BIG_ENDIAN := FALSE}
109
{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
111
{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
113
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
114
{$setc CALL_NOT_IN_CARBON := FALSE}
115
{$setc OLDROUTINENAMES := FALSE}
116
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
117
{$setc OPAQUE_UPP_TYPES := TRUE}
118
{$setc OTCARBONAPPLICATION := TRUE}
119
{$setc OTKERNEL := FALSE}
120
{$setc PM_USE_SESSION_APIS := TRUE}
121
{$setc TARGET_API_MAC_CARBON := TRUE}
122
{$setc TARGET_API_MAC_OS8 := FALSE}
123
{$setc TARGET_API_MAC_OSX := TRUE}
124
{$setc TARGET_CARBON := TRUE}
125
{$setc TARGET_CPU_68K := FALSE}
126
{$setc TARGET_CPU_MIPS := FALSE}
127
{$setc TARGET_CPU_SPARC := FALSE}
128
{$setc TARGET_OS_MAC := TRUE}
129
{$setc TARGET_OS_UNIX := FALSE}
130
{$setc TARGET_OS_WIN32 := FALSE}
131
{$setc TARGET_RT_MAC_68881 := FALSE}
132
{$setc TARGET_RT_MAC_CFM := FALSE}
133
{$setc TARGET_RT_MAC_MACHO := TRUE}
134
{$setc TYPED_FUNCTION_POINTERS := TRUE}
135
{$setc TYPE_BOOL := FALSE}
136
{$setc TYPE_EXTENDED := FALSE}
137
{$setc TYPE_LONGLONG := TRUE}
138
uses MacTypes,CFArray,CFBase,CGContext,CGImage,CarbonEventsCore,Drag,Events,Quickdraw,Menus,Appearance,Controls,CarbonEvents,HIGeometry,Icons,HIShape;
144
HIViewRef = ControlRef;
146
HIViewID = ControlID;
148
* kHIViewWindowContentID
151
* The standard view ID for the content view of a window.
153
* Mac OS X threading:
157
* Mac OS X: in version 10.2 and later in Carbon.framework
158
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
159
* Non-Carbon CFM: not available
161
{GRP translation note: kHIViewWindowContentID is really a C language external constant exported from
162
CarbonLib (Carbon.framework). Treating it as an externally declared variable works as long as it
163
used as a READ ONLY variable. CodeWarrior Pascal has no capability for enforcing READ ONLY usage
164
so it is up to the programmer to obey the READ ONLY rule. GPC does enforce READ ONLY usage with the
167
{WARNING: The CFM CarbonLib export for kHIViewWindowContentID is broken. For CFM CodeWarrior Pascal,
168
some workarounds are:
170
1. Use CFBundle loading and CFBundleGetDataPointerForName to obtain the correct data.
172
2. For composting windows, the correct data can be obtained with code similar to:
174
ignoreResult := GetRootControl( theWind, theContentRoot );
175
ignoreResult := GetControlID( theContentRoot, theContentControlID );
177
The correct data for kHIViewWindowContentID is in theContentControlID.
179
var kHIViewWindowContentID: HIViewID; external name '_kHIViewWindowContentID'; (* attribute const *)
180
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
182
* kHIViewWindowGrowBoxID
185
* The standard view ID for the grow box view of a window. Not all
186
* windows have grow boxes, so be aware that you might not find this
187
* view if you look for it.
189
* Mac OS X threading:
193
* Mac OS X: in version 10.2 and later in Carbon.framework
194
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
195
* Non-Carbon CFM: not available
197
{GRP translation note: kHIViewWindowGrowBoxID is really a C language external constant exported from
198
CarbonLib (Carbon.framework). Treating it as an externally declared variable works as long as it
199
used as a READ ONLY variable. CodeWarrior Pascal has no capability for enforcing READ ONLY usage
200
so it is up to the programmer to obey the READ ONLY rule. GPC does enforce READ ONLY usage with the
202
var kHIViewWindowGrowBoxID: HIViewID; external name '_kHIViewWindowGrowBoxID'; (* attribute const *)
203
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
211
* Indicates we wish to order a view above another view.
213
kHIViewZOrderAbove = 1;
216
* Indicates we wish to order a view below another view.
218
kHIViewZOrderBelow = 2;
221
HIViewZOrderOp = UInt32;
227
* Describes the offsets from the structure to the content area of a
228
* view; for example, the top metric is the difference between the
229
* vertical coordinate of the top edge of the view�s structure
230
* region and the vertical coordinate of the top edge of the view�s
231
* content region. This structure is returned by a view in response
232
* to a kEventControlGetFrameMetrics event.
235
HIViewFrameMetrics = record
237
* Height of the top of the structure area.
242
* Width of the left of the structure area.
247
* Height of the bottom of the structure area.
252
* Width of the right of the structure area.
256
{==============================================================================}
258
{==============================================================================}
262
* View attributes are generally determined by clients of the view;
263
* the view itself should observe the attributes and behave
271
* When set, the control will send the command it generates to the
272
* user focus and propagate as it would naturally from there. The
273
* default is to send the command to itself and then to its parent
276
kHIViewAttributeSendCommandToUserFocus = 1 shl 0;
279
* Indicates that a text editing control should behave appropriately
280
* for editing fields in a dialog; specifically, the control should
281
* ignore the Return, Enter, Escape, and Tab keys, and allow them to
282
* be processed by other participants in the event flow. Available on
283
* Mac OS X 10.3 and later.
285
kHIViewAttributeIsFieldEditor = 1 shl 1;
288
* Legacy synonym for kHIViewAttributeSendCommandToUserFocus. Please
291
kHIViewSendCommandToUserFocus = kHIViewAttributeSendCommandToUserFocus;
298
* View feature flags are generally determined by the view itself,
299
* and are not typically changed by clients of the view.
303
* This view supports using the ghosting protocol when live tracking
306
kHIViewFeatureSupportsGhosting = 1 shl 0;
309
* This view allows subviews to be embedded within it.
311
kHIViewFeatureAllowsSubviews = 1 shl 1;
314
* If this view is clicked, the keyboard focus should be set to this
315
* view automatically. This is primarily used for edit text controls.
317
kHIViewFeatureGetsFocusOnClick = 1 shl 8;
320
* This view supports the live feedback protocol. Necessary to
321
* implement live scroll bar tracking. Clients of a view should never
324
kHIViewFeatureSupportsLiveFeedback = 1 shl 10;
327
* This view can be put into a radio group. Radio buttons and bevel
328
* buttons report this behavior.
330
kHIViewFeatureSupportsRadioBehavior = 1 shl 11;
333
* This view supports the auto-toggle protocol and should at the very
334
* least auto- toggle from off to on and back. The view can support a
335
* carbon event for more advanced auto-toggling of its value. The tab
336
* view supports this, for example, so that when a tab is clicked its
337
* value changes automatically.
339
kHIViewFeatureAutoToggles = 1 shl 14;
342
* This is merely informational. Turning it off would not necessarily
343
* disable any timer a view might be using, but it could obey this
344
* bit if it so desired.
346
kHIViewFeatureIdlesWithTimer = 1 shl 23;
349
* This tells the control manager that the up button part increases
350
* the value of the control instead of decreasing it. For example,
351
* the Little Arrows (Spinner) control increase its value when the up
352
* button is pressed. Scroll bars, on the other hand, decrease the
353
* value when their up buttons are pressed.
355
kHIViewFeatureInvertsUpDownValueMeaning = 1 shl 24;
358
* This is an optimization for determining a view's opaque region.
359
* When set, the view system just uses the view's structure region,
360
* and can usually avoid having to call the view at all.
362
kHIViewFeatureIsOpaque = 1 shl 25;
365
* This is an optimization for determining what gets invalidated when
366
* views are dirtied. For example, on a metal window, the content
367
* view is actually fully transparent, so invalidating it doesn't
368
* really help things. By telling the control manager that the view
369
* is transparent and does not do any drawing, we can avoid trying to
370
* invalidate it and instead invalidate views behind it.
372
kHIViewFeatureDoesNotDraw = 1 shl 27;
375
* Indicates to the Control Manager that this view doesn't use the
376
* special part codes for indicator, inactive, and disabled.
377
* Available in Mac OS X 10.3 and later.
379
kHIViewFeatureDoesNotUseSpecialParts = 1 shl 28;
382
* This is an optimization for determining the clickable region of a
383
* window (used for metal windows, for example, when doing async
384
* window dragging). The presence of this bit tells us not to bother
385
* asking the control for the clickable region. A view like the
386
* visual separator would set this bit. It's typically used in
387
* conjunction with the kHIViewFeatureDoesNotDraw bit.
389
kHIViewFeatureIgnoresClicks = 1 shl 29;
393
* HIView valid feature sets
396
* These are sets of features that are available on the version of
397
* Mac OS X corresponding to that named in the constant.
400
kHIViewValidFeaturesForPanther = $3B804D03;
404
* HIView feature synonyms
407
* Legacy synonyms for HIView feature bit names. Please use the
411
kHIViewSupportsGhosting = kHIViewFeatureSupportsGhosting;
412
kHIViewAllowsSubviews = kHIViewFeatureAllowsSubviews;
413
kHIViewGetsFocusOnClick = kHIViewFeatureGetsFocusOnClick;
414
kHIViewSupportsLiveFeedback = kHIViewFeatureSupportsLiveFeedback;
415
kHIViewSupportsRadioBehavior = kHIViewFeatureSupportsRadioBehavior;
416
kHIViewAutoToggles = kHIViewFeatureAutoToggles;
417
kHIViewIdlesWithTimer = kHIViewFeatureIdlesWithTimer;
418
kHIViewInvertsUpDownValueMeaning = kHIViewFeatureInvertsUpDownValueMeaning;
419
kHIViewIsOpaque = kHIViewFeatureIsOpaque;
420
kHIViewDoesNotDraw = kHIViewFeatureDoesNotDraw;
421
kHIViewDoesNotUseSpecialParts = kHIViewFeatureDoesNotUseSpecialParts;
422
kHIViewIgnoresClicks = kHIViewFeatureIgnoresClicks;
426
HIViewFeatures = UInt64;
427
{==============================================================================}
429
{==============================================================================}
431
HIViewPartCode = ControlPartCode;
432
HIViewPartCodePtr = ^HIViewPartCode;
440
kHIViewIndicatorPart = 129;
441
kHIViewDisabledPart = 254;
442
kHIViewInactivePart = 255;
445
* Use this constant when not referring to a specific part, but
446
* rather the entire view.
448
kHIViewEntireView = kHIViewNoPart;
455
* A meta-part is a part used in a call to the HIViewCopyShape API.
456
* These parts are parts that might be defined by a view. They
457
* define a region of a view. Along with these parts, you can also
458
* pass in normal part codes to get the regions of those parts. Not
459
* all views fully support this feature.
463
* The structure region is the total area over which the view draws.
465
kHIViewStructureMetaPart = -1;
468
* The content region is only defined by views that can embed other
469
* views. It is the area that embedded content can live.
471
kHIViewContentMetaPart = -2;
474
* Mac OS X 10.2 or later
476
kHIViewOpaqueMetaPart = -3;
479
* Mac OS X 10.3 or later, only used for async window dragging.
480
* Default is structure region.
482
kHIViewClickableMetaPart = -4;
491
* Tells view to clear its focus
493
kHIViewFocusNoPart = kHIViewNoPart;
496
* Tells view to focus on the next part
498
kHIViewFocusNextPart = -1;
501
* Tells view to focus on the previous part
503
kHIViewFocusPrevPart = -2;
505
{==============================================================================}
507
{==============================================================================}
509
HIViewImageContentType = ControlContentType;
511
HIViewImageContentInfo = ControlImageContentInfo;
513
HIViewContentType = SInt16;
521
* The view has no content besides text.
523
kHIViewContentTextOnly = 0;
526
* The view has no content.
528
kHIViewContentNone = 0;
531
* The view's content is an IconSuiteRef.
533
kHIViewContentIconSuiteRef = 129;
536
* The view's content is an IconRef.
538
kHIViewContentIconRef = 132;
541
* The view's content is a CGImageRef.
543
kHIViewContentCGImageRef = 134;
550
HIViewContentInfo = record
552
* The type of content referenced in the content union.
554
contentType: HIViewContentType;
557
iconSuite: IconSuiteRef;
560
iconRef: IconRef_GAP_Private_field_type_fix;
563
imageRef: CGImageRef;
567
HIViewContentInfoPtr = ^HIViewContentInfo;
568
{==============================================================================}
570
{==============================================================================}
574
* View/Control Error Codes
578
* This value will be returned from an HIView API or a Control
579
* Manager API when an action that is only supported on a compositing
580
* window is attempted on a non-compositing window. This doesn't
581
* necessarily mean that the API is only callable for compositing
582
* windows; sometimes the legality of the action is based on other
583
* parameters of the API. See HIViewAddSubview for one particular use
584
* of this error code.
586
errNeedsCompositedWindow = -30598;
588
{==============================================================================}
590
{ Setting Initial Bounds }
591
{ When creating a view using HIObjectCreate, you can set the initial bounds }
592
{ automatically by passing in an initialization event into HIObjectCreate }
593
{ with a kEventParamBounds parameter as typeHIRect or typeQDRectangle. }
594
{==============================================================================}
595
{ The HIObject class ID for the HIView class. }
596
{$ifc USE_CFSTR_CONSTANT_MACROS}
597
{$definec kHIViewClassID CFSTRP('com.apple.hiview')}
599
{==============================================================================}
601
{==============================================================================}
606
* Returns the root view for a window.
608
* Mac OS X threading:
614
* The window to get the root for.
617
* The root view for the window, or NULL if an invalid window is
621
* Mac OS X: in version 10.2 and later in Carbon.framework
622
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
623
* Non-Carbon CFM: not available
625
function HIViewGetRoot( inWindow: WindowRef ): HIViewRef; external name '_HIViewGetRoot';
626
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
633
* Adds a subview to the given parent. The new subview is added to
634
* the front of the list of subviews (i.e., it is made topmost).
636
* The subview being added is not retained by the new parent view.
637
* Do not release the view after adding it, or it will cease to
638
* exist. All views in a window will be released automatically when
639
* the window is destroyed.
641
* Mac OS X threading:
647
* The view which will receive the new subview.
650
* The subview being added.
653
* An operating system result code.
654
* errNeedsCompositedWindow will be returned when you try to embed
655
* into the content view in a non-compositing window; you can only
656
* embed into the content view in compositing windows.
659
* Mac OS X: in version 10.2 and later in Carbon.framework
660
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
661
* Non-Carbon CFM: not available
663
function HIViewAddSubview( inParent: HIViewRef; inNewChild: HIViewRef ): OSStatus; external name '_HIViewAddSubview';
664
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
668
* HIViewRemoveFromSuperview()
671
* Removes a view from its parent.
672
* The subview being removed from the parent is not released and
675
* Mac OS X threading:
681
* The view to remove.
684
* An operating system result code.
687
* Mac OS X: in version 10.2 and later in Carbon.framework
688
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
689
* Non-Carbon CFM: not available
691
function HIViewRemoveFromSuperview( inView: HIViewRef ): OSStatus; external name '_HIViewRemoveFromSuperview';
692
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
696
* HIViewGetSuperview()
699
* Returns a view's parent view.
701
* Mac OS X threading:
707
* The view whose parent you are interested in getting.
710
* An HIView reference, or NULL if this view has no parent or is
714
* Mac OS X: in version 10.2 and later in Carbon.framework
715
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
716
* Non-Carbon CFM: not available
718
function HIViewGetSuperview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetSuperview';
719
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
723
* HIViewGetFirstSubview()
726
* Returns the first subview of a container. The first subview is
727
* the topmost subview in z-order.
729
* Mac OS X threading:
735
* The view whose subview you are fetching.
738
* An HIView reference, or NULL if this view has no subviews or is
742
* Mac OS X: in version 10.2 and later in Carbon.framework
743
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
744
* Non-Carbon CFM: not available
746
function HIViewGetFirstSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetFirstSubview';
747
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
751
* HIViewGetLastSubview()
754
* Returns the last subview of a container. The last subview is the
755
* bottommost subview in z-order.
757
* Mac OS X threading:
763
* The view whose subview you are fetching.
766
* An HIView reference, or NULL if this view has no subviews or is
770
* Mac OS X: in version 10.2 and later in Carbon.framework
771
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
772
* Non-Carbon CFM: not available
774
function HIViewGetLastSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetLastSubview';
775
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
779
* HIViewGetNextView()
782
* Returns the next view after the one given, in z-order.
784
* Mac OS X threading:
790
* The view to use as reference.
793
* An HIView reference, or NULL if this view has no view behind it
797
* Mac OS X: in version 10.2 and later in Carbon.framework
798
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
799
* Non-Carbon CFM: not available
801
function HIViewGetNextView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetNextView';
802
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
806
* HIViewGetPreviousView()
809
* Returns the previous view before the one given, in z-order.
811
* Mac OS X threading:
817
* The view to use as reference.
820
* An HIView reference, or NULL if this view has no view in front of
824
* Mac OS X: in version 10.2 and later in Carbon.framework
825
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
826
* Non-Carbon CFM: not available
828
function HIViewGetPreviousView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetPreviousView';
829
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
833
* HIViewCountSubviews()
836
* Counts the number of subviews embedded in a view.
838
* Mac OS X threading:
844
* The view for which to count subviews.
849
* The number of subviews of the specified view.
852
* Mac OS X: in version 10.4 and later in Carbon.framework
853
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
854
* Non-Carbon CFM: not available
856
function HIViewCountSubviews( inView: HIViewRef ): CFIndex; external name '_HIViewCountSubviews';
857
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
861
* HIViewGetIndexedSubview()
864
* Get the Nth subview of a view.
867
* Instead of calling HIViewGetIndexedSubview repeatedly, it may be
868
* more efficient to iterate through the subviews of a view with
869
* calls HIViewGetFirstSubview and HIViewGetNextView.
871
* Mac OS X threading:
877
* The view whose indexed sub-view is being requested.
880
* The index of the subview to get.
883
* An HIViewRef to be filled with the indexed subview.
886
* A result code indicating success or failure.
889
* Mac OS X: in version 10.4 and later in Carbon.framework
890
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
891
* Non-Carbon CFM: not available
893
function HIViewGetIndexedSubview( inView: HIViewRef; inSubviewIndex: CFIndex; var outSubview: HIViewRef ): OSStatus; external name '_HIViewGetIndexedSubview';
894
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
901
* Allows you to change the front-to-back ordering of sibling views.
903
* Mac OS X threading:
909
* The view whose Z-order you wish to change.
912
* Indicates to order inView above or below inOther.
915
* Another optional view to use as a reference. You can pass NULL
916
* to mean an absolute position. For example, passing
917
* kHIViewZOrderAbove and NULL will move a view to the front of
918
* all of its siblings. Likewise, passing kHIViewZOrderBelow and
919
* NULL will move it to the back.
922
* An operating system result code.
925
* Mac OS X: in version 10.2 and later in Carbon.framework
926
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
927
* Non-Carbon CFM: not available
929
function HIViewSetZOrder( inView: HIViewRef; inOp: HIViewZOrderOp; inOther: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetZOrder';
930
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
933
{==============================================================================}
935
{==============================================================================}
943
* The signature of the view. Apple reserves all signatures made up
944
* of only lowercase characters.
949
* The kind of the view. Apple reserves all kinds made up of only
950
* lowercase characters.
956
* View signature kind
961
* The signature of all HIToolbox views.
963
kHIViewKindSignatureApple = $6170706C (* 'appl' *);
969
* Hides or shows a view. Marks the area the view will occupy or
970
* used to occupy as needing to be redrawn later.
972
* Mac OS X threading:
978
* The view to hide or show.
981
* A boolean value which indicates whether you wish to hide the
982
* view (false) or show the view (true).
985
* An operating system result code.
988
* Mac OS X: in version 10.2 and later in Carbon.framework
989
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
990
* Non-Carbon CFM: not available
992
function HIViewSetVisible( inView: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIViewSetVisible';
993
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1000
* Returns whether a view is visible.
1003
* Note that HIViewIsVisible returns a view's effective visibility,
1004
* which is determined both by the view's own visibility and the
1005
* visibility of its parent views. If a parent view is invisible,
1006
* then this view is considered to be invisible also.
1008
* Latent visibility can be determined with HIViewIsLatentlyVisible.
1010
* Mac OS X threading:
1016
* The view whose visibility you wish to determine.
1019
* A boolean value indicating whether the view is visible (true) or
1023
* Mac OS X: in version 10.2 and later in Carbon.framework
1024
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1025
* Non-Carbon CFM: not available
1027
function HIViewIsVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsVisible';
1028
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1032
* HIViewIsLatentlyVisible()
1035
* Returns whether or not a view is latently visible.
1038
* The view's visibility is also affected by the visibility of its
1039
* parents; if any parent view is invisible, this view is considered
1040
* invisible as well. HIViewIsLatentlyVisible returns whether a view
1041
* is latently visible, even if its parents are invisible.
1043
* Mac OS X threading:
1049
* The view whose latent visibility is to be checked.
1052
* True if the view is latently visible, otherwise false.
1055
* Mac OS X: in version 10.4 and later in Carbon.framework
1056
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1057
* Non-Carbon CFM: not available
1059
function HIViewIsLatentlyVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsLatentlyVisible';
1060
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1067
* Changes the highlighting of a view.
1069
* Mac OS X threading:
1075
* The view on which to set the highlight.
1078
* An HIViewPartCode indicating the part of the view to highlight.
1081
* A result code indicating success or failure.
1084
* Mac OS X: in version 10.4 and later in Carbon.framework
1085
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1086
* Non-Carbon CFM: not available
1088
function HIViewSetHilite( inView: HIViewRef; inHilitePart: HIViewPartCode ): OSStatus; external name '_HIViewSetHilite';
1089
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1096
* Returns whether or not a view is active.
1099
* The view's active state is also affected by the active state of
1100
* its parents; if any parent view is inactive, this view is
1101
* considered inactive as well. HIViewIsActive can optionally check
1102
* to see if a view is latently active, even if its parents are
1105
* Mac OS X threading:
1111
* The view whose active state is to be checked.
1113
* outIsLatentActive:
1114
* A pointer to a Boolean to be filled in with the latent active
1115
* state of the view. The Boolean is set to true if the view is
1116
* latently active, otherwise false. Can be NULL.
1119
* True if the view is active, otherwise false.
1122
* Mac OS X: in version 10.4 and later in Carbon.framework
1123
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1124
* Non-Carbon CFM: not available
1126
function HIViewIsActive( inView: HIViewRef; outIsLatentActive: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsActive';
1127
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1131
* HIViewSetActivated()
1134
* Sets whether or not a view is active or inactive. If any children
1135
* of the view have a latent active state, they will be adjusted
1138
* Mac OS X threading:
1144
* The view to activate or deactivate.
1147
* True if setting the view to active, false if setting the view
1151
* A result code indicating success or failure.
1154
* Mac OS X: in version 10.4 and later in Carbon.framework
1155
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1156
* Non-Carbon CFM: not available
1158
function HIViewSetActivated( inView: HIViewRef; inSetActivated: Boolean ): OSStatus; external name '_HIViewSetActivated';
1159
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1166
* Tests whether or not a view is enabled.
1169
* The view's enabled state is also affected by the enabled state of
1170
* its parents; if any parent view is disabled, this view is
1171
* considered disabled as well. HIViewIsEnabled can optionally check
1172
* to see if a view is latently enabled, even if its parents are
1175
* Mac OS X threading:
1183
* outIsLatentEnabled:
1184
* A pointer to a Boolean to be filled in with the latent enabled
1185
* state of the view. The Boolean is set to true if the view is
1186
* latently enabled, otherwise false. Can be NULL.
1189
* True if the view is enabled, otherwise false.
1192
* Mac OS X: in version 10.4 and later in Carbon.framework
1193
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1194
* Non-Carbon CFM: not available
1196
function HIViewIsEnabled( inView: HIViewRef; outIsLatentEnabled: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsEnabled';
1197
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1201
* HIViewSetEnabled()
1204
* Sets whether or not a view (and any subviews) are enabled or
1207
* Mac OS X threading:
1213
* The view to enable or disable.
1216
* True if setting the view to enabled, false if setting the view
1220
* A result code indicating success or failure.
1223
* Mac OS X: in version 10.4 and later in Carbon.framework
1224
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1225
* Non-Carbon CFM: not available
1227
function HIViewSetEnabled( inView: HIViewRef; inSetEnabled: Boolean ): OSStatus; external name '_HIViewSetEnabled';
1228
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1232
* HIViewIsCompositingEnabled()
1235
* Returns whether a view is being used in a compositing hierarchy.
1238
* A view that supports both compositing mode and non-compositing
1239
* mode can use this routine to determine which mode it is currently
1240
* running in. Looking for a window's kWindowCompositingAttribute is
1241
* not sufficient, since some windows with that attribute have some
1242
* of its views in non-compositing mode and vice-versa.
1244
* Mac OS X threading:
1250
* The view whose compositing state you wish to determine.
1253
* A boolean value indicating whether the view is in compositing
1254
* mode (true) or non-compositing mode (false).
1257
* Mac OS X: in version 10.4 and later in Carbon.framework
1258
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1259
* Non-Carbon CFM: not available
1261
function HIViewIsCompositingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsCompositingEnabled';
1262
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1269
* Sets the text of a view to the specified string.
1272
* The "text" of the view is the text that will be displayed when
1273
* drawing the view. This API first attempts to set the view's text
1274
* (generally successful on views that handle the
1275
* kControlEditTextCFStringTag SetControlData tag). If the attempt
1276
* is unsuccessful, the view's title is set instead.
1278
* Mac OS X threading:
1284
* The view whose text is being set.
1287
* The text to set for the view. The string is copied by the view,
1288
* and may be released by the caller afterwards.
1291
* A result code indicating success or failure.
1294
* Mac OS X: in version 10.4 and later in Carbon.framework
1295
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1296
* Non-Carbon CFM: not available
1298
function HIViewSetText( inView: HIViewRef; inText: CFStringRef ): OSStatus; external name '_HIViewSetText';
1299
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1306
* Makes a copy of the view's text as a CFString.
1309
* The "text" of the view is the text that will be displayed when
1310
* drawing the view. This API first attempts to get the view's text
1311
* (generally successful on views that handle the
1312
* kControlEditTextCFStringTag GetControlData tag). If the attempt
1313
* is unsuccessful, the view's title is copied instead.
1315
* Mac OS X threading:
1321
* The view for which to get the text.
1324
* A CFStringRef containing a copy of the view's text. The caller of
1325
* HIViewCopyText is responsible for releasing the returned text.
1328
* Mac OS X: in version 10.4 and later in Carbon.framework
1329
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1330
* Non-Carbon CFM: not available
1332
function HIViewCopyText( inView: HIViewRef ): CFStringRef; external name '_HIViewCopyText';
1333
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1340
* Gets a view's value.
1342
* Mac OS X threading:
1348
* The view for which to get the value.
1354
* Mac OS X: in version 10.4 and later in Carbon.framework
1355
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1356
* Non-Carbon CFM: not available
1358
function HIViewGetValue( inView: HIViewRef ): SInt32; external name '_HIViewGetValue';
1359
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1366
* Sets a view's value.
1368
* Mac OS X threading:
1374
* The view whose value is to be set.
1380
* A result code indicating success or failure.
1383
* Mac OS X: in version 10.4 and later in Carbon.framework
1384
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1385
* Non-Carbon CFM: not available
1387
function HIViewSetValue( inView: HIViewRef; inValue: SInt32 ): OSStatus; external name '_HIViewSetValue';
1388
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1392
* HIViewGetMinimum()
1395
* Gets a view's minimum value.
1397
* Mac OS X threading:
1403
* The view for which to get the minimum value.
1406
* The view's minimum value.
1409
* Mac OS X: in version 10.4 and later in Carbon.framework
1410
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1411
* Non-Carbon CFM: not available
1413
function HIViewGetMinimum( inView: HIViewRef ): SInt32; external name '_HIViewGetMinimum';
1414
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1418
* HIViewSetMinimum()
1421
* Sets a view's minimum value.
1423
* Mac OS X threading:
1429
* The view whose minimum value is to be set.
1432
* The new minimum value.
1435
* A result code indicating success or failure.
1438
* Mac OS X: in version 10.4 and later in Carbon.framework
1439
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1440
* Non-Carbon CFM: not available
1442
function HIViewSetMinimum( inView: HIViewRef; inMinimum: SInt32 ): OSStatus; external name '_HIViewSetMinimum';
1443
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1447
* HIViewGetMaximum()
1450
* Gets a view's maximum value.
1452
* Mac OS X threading:
1458
* The view for which to get the maximum value.
1461
* The view's maximum value.
1464
* Mac OS X: in version 10.4 and later in Carbon.framework
1465
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1466
* Non-Carbon CFM: not available
1468
function HIViewGetMaximum( inView: HIViewRef ): SInt32; external name '_HIViewGetMaximum';
1469
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1473
* HIViewSetMaximum()
1476
* Sets a view's maximum value.
1478
* Mac OS X threading:
1484
* The view whose maximum value is to be set.
1487
* The new maximum value.
1490
* A result code indicating success or failure.
1493
* Mac OS X: in version 10.4 and later in Carbon.framework
1494
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1495
* Non-Carbon CFM: not available
1497
function HIViewSetMaximum( inView: HIViewRef; inMaximum: SInt32 ): OSStatus; external name '_HIViewSetMaximum';
1498
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1502
* HIViewGetViewSize()
1505
* Gets a view's view size.
1508
* The view size is the size of the content to which a view's
1509
* display is proportioned. Most commonly used to set the
1510
* proportional size of a scroll bar's thumb indicator.
1512
* Mac OS X threading:
1518
* The view for which to get the view size.
1524
* Mac OS X: in version 10.4 and later in Carbon.framework
1525
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1526
* Non-Carbon CFM: not available
1528
function HIViewGetViewSize( inView: HIViewRef ): SInt32; external name '_HIViewGetViewSize';
1529
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1533
* HIViewSetViewSize()
1536
* Sets a view's view size.
1539
* The view size is the size of the content to which a view's
1540
* display is proportioned. Most commonly used to set the
1541
* proportional size of a scroll bar's thumb indicator.
1543
* Mac OS X threading:
1549
* The view whose view size is to be set.
1552
* The new view size.
1555
* A result code indicating success or failure.
1558
* Mac OS X: in version 10.4 and later in Carbon.framework
1559
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1560
* Non-Carbon CFM: not available
1562
function HIViewSetViewSize( inView: HIViewRef; inViewSize: SInt32 ): OSStatus; external name '_HIViewSetViewSize';
1563
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1570
* HIViewIsValid tests to see if the passed in view is a view that
1571
* HIToolbox knows about. It does not sanity check the data in the
1574
* Mac OS X threading:
1580
* The view to test for validity.
1583
* True if the view is a valid view, otherwise, false.
1586
* Mac OS X: in version 10.4 and later in Carbon.framework
1587
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1588
* Non-Carbon CFM: not available
1590
function HIViewIsValid( inView: HIViewRef ): Boolean; external name '_HIViewIsValid';
1591
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1598
* Sets the HIViewID of a view.
1600
* Mac OS X threading:
1606
* The view for which to set the ID.
1609
* The ID to set on the view.
1612
* A result code indicating success or failure.
1615
* Mac OS X: in version 10.4 and later in Carbon.framework
1616
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1617
* Non-Carbon CFM: not available
1619
function HIViewSetID( inView: HIViewRef; inID: HIViewID ): OSStatus; external name '_HIViewSetID';
1620
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1627
* Gets the HIViewID of a view.
1629
* Mac OS X threading:
1635
* The view for which to get the ID.
1638
* A pointer to an HIViewID to be filled with the view's ID.
1641
* A result code indicating success or failure.
1644
* Mac OS X: in version 10.4 and later in Carbon.framework
1645
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1646
* Non-Carbon CFM: not available
1648
function HIViewGetID( inView: HIViewRef; var outID: HIViewID ): OSStatus; external name '_HIViewGetID';
1649
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1653
* HIViewSetCommandID()
1656
* Sets the command ID of a view.
1658
* Mac OS X threading:
1664
* The view for which to set the command ID.
1667
* The command ID to set on the view.
1670
* A result code indicating success or failure.
1673
* Mac OS X: in version 10.4 and later in Carbon.framework
1674
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1675
* Non-Carbon CFM: not available
1677
function HIViewSetCommandID( inView: HIViewRef; inCommandID: UInt32 ): OSStatus; external name '_HIViewSetCommandID';
1678
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1682
* HIViewGetCommandID()
1685
* Gets the command ID of a view.
1687
* Mac OS X threading:
1693
* The view for which to get the command ID.
1696
* A pointer to a UInt32 to fill with the view's command id.
1699
* A result code indicating success or failure.
1702
* Mac OS X: in version 10.4 and later in Carbon.framework
1703
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1704
* Non-Carbon CFM: not available
1706
function HIViewGetCommandID( inView: HIViewRef; var outCommandID: UInt32 ): OSStatus; external name '_HIViewGetCommandID';
1707
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1714
* Returns the kind of the given view.
1716
* Mac OS X threading:
1722
* The view whose kind to get.
1725
* On successful exit, this will contain the view signature and
1726
* kind. See ControlDefinitions.h or HIView.h for the kinds of
1730
* Mac OS X: in version 10.4 and later in Carbon.framework
1731
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1732
* Non-Carbon CFM: not available
1734
function HIViewGetKind( inView: HIViewRef; var outViewKind: HIViewKind ): OSStatus; external name '_HIViewGetKind';
1735
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1738
{==============================================================================}
1740
{==============================================================================}
1745
* Returns the local bounds of a view. The local bounds are the
1746
* coordinate system that is completely view-relative. A view's top
1747
* left coordinate starts out at 0, 0. Most operations are done in
1748
* these local coordinates. Moving a view is done via the frame
1751
* Mac OS X threading:
1757
* The view whose bounds you wish to determine.
1760
* The local bounds of the view.
1763
* An operating system result code.
1766
* Mac OS X: in version 10.2 and later in Carbon.framework
1767
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1768
* Non-Carbon CFM: not available
1770
function HIViewGetBounds( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetBounds';
1771
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1778
* Returns the frame of a view. The frame is the bounds of a view
1779
* relative to its parent's local coordinate system.
1781
* Mac OS X threading:
1787
* The view whose frame you wish to determine.
1790
* The frame of the view.
1793
* An operating system result code.
1796
* Mac OS X: in version 10.2 and later in Carbon.framework
1797
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1798
* Non-Carbon CFM: not available
1800
function HIViewGetFrame( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetFrame';
1801
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1808
* Sets the frame of a view. This effectively moves the view within
1809
* its parent. It also marks the view (and anything that was exposed
1810
* behind it) to be redrawn.
1812
* Mac OS X threading:
1818
* The view whose frame you wish to change.
1821
* The new frame of the view.
1824
* An operating system result code.
1827
* Mac OS X: in version 10.2 and later in Carbon.framework
1828
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1829
* Non-Carbon CFM: not available
1831
function HIViewSetFrame( inView: HIViewRef; const (*var*) inRect: HIRect ): OSStatus; external name '_HIViewSetFrame';
1832
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1839
* Moves a view by a certain distance, relative to its current
1840
* location. This affects a view's frame, but not its bounds.
1842
* Mac OS X threading:
1848
* The view you wish to move.
1851
* The horizontal distance to move the view. Negative values move
1852
* the view to the left, positive values to the right.
1855
* The vertical distance to move the view. Negative values move
1856
* the view upward, positive values downward.
1859
* An operating system result code.
1862
* Mac OS X: in version 10.2 and later in Carbon.framework
1863
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1864
* Non-Carbon CFM: not available
1866
function HIViewMoveBy( inView: HIViewRef; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIViewMoveBy';
1867
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1871
* HIViewPlaceInSuperviewAt()
1874
* Places a view at an absolute location within its parent. This
1875
* affects the view's frame, but not its bounds.
1877
* Mac OS X threading:
1883
* The view you wish to position.
1886
* The absolute horizontal coordinate at which to position the
1890
* The absolute vertical coordinate at which to position the view.
1893
* An operating system result code.
1896
* Mac OS X: in version 10.2 and later in Carbon.framework
1897
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1898
* Non-Carbon CFM: not available
1900
function HIViewPlaceInSuperviewAt( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewPlaceInSuperviewAt';
1901
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1905
* HIViewReshapeStructure()
1908
* This is for use by custom views. If a view decides that its
1909
* structure will change shape, it should call this. This tells the
1910
* Toolbox to recalc things and invalidate as appropriate. You might
1911
* use this when gaining/losing a focus ring, for example.
1913
* Mac OS X threading:
1919
* The view to reshape and invalidate.
1922
* An operating system result code.
1925
* Mac OS X: in version 10.2 and later in Carbon.framework
1926
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1927
* Non-Carbon CFM: not available
1929
function HIViewReshapeStructure( inView: HIViewRef ): OSStatus; external name '_HIViewReshapeStructure';
1930
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1934
* HIViewRegionChanged()
1937
* Allows a view to tell the view system that a region of itself has
1938
* changed. The view system might choose to react in some way. For
1939
* example, if a view's clickable region has changed, this can be
1940
* called to tell the Toolbox to resync the region it uses for async
1941
* window dragging, if enabled. Likewise, if a view's opaque region
1942
* changes, we can adjust the window's opaque shape as well. When
1943
* views are moved, resizes, this stuff is taken care of for you. So
1944
* this only need be called when there's a change in your view that
1945
* occurs outside of those times.
1947
* Mac OS X threading:
1953
* The view to deal with.
1956
* The region that was changed. This can only be the structure
1957
* opaque, and clickable regions at present.
1960
* An operating system status code.
1963
* Mac OS X: in version 10.3 and later in Carbon.framework
1964
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
1965
* Non-Carbon CFM: not available
1967
function HIViewRegionChanged( inView: HIViewRef; inRegionCode: HIViewPartCode ): OSStatus; external name '_HIViewRegionChanged';
1968
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
1975
* Copies the shape of a part of a view. See the discussion on
1976
* meta-parts in this header for more information
1978
* Mac OS X threading:
1984
* The view for which to copy the shape.
1987
* The part of the view whose shape is to be copied.
1990
* On exit, contains a newly created shape. The caller of
1991
* HIViewCopyShape is responsible for releasing the copied shape.
1994
* A result code indicating success or failure.
1997
* Mac OS X: in version 10.4 and later in Carbon.framework
1998
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1999
* Non-Carbon CFM: not available
2001
function HIViewCopyShape( inView: HIViewRef; inPart: HIViewPartCode; var outShape: HIShapeRef ): OSStatus; external name '_HIViewCopyShape';
2002
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2006
* HIViewGetOptimalBounds()
2009
* Obtain a view's optimal size and/or text placement.
2011
* Mac OS X threading:
2017
* The view to examine.
2020
* A pointer to an HIRect to be filled with the view's optimal
2021
* bounds. Can be NULL.
2023
* outBaseLineOffset:
2024
* A pointer to a float to be filled with the view's optimal text
2025
* placement. Can be NULL.
2028
* A result code indicating success or failure.
2031
* Mac OS X: in version 10.4 and later in Carbon.framework
2032
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2033
* Non-Carbon CFM: not available
2035
function HIViewGetOptimalBounds( inView: HIViewRef; outBounds: HIRectPtr { can be NULL }; outBaseLineOffset: Float32Ptr { can be NULL } ): OSStatus; external name '_HIViewGetOptimalBounds';
2036
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2039
{==============================================================================}
2040
{ HIT TESTING/EVENT HANDLING }
2041
{==============================================================================}
2043
* HIViewGetViewForMouseEvent()
2046
* Returns the appropriate view to handle a mouse event. This is a
2047
* little higher-level than HIViewGetSubviewHit. This routine will
2048
* find the deepest view that should handle the mouse event, but
2049
* along the way, it sends Carbon Events to each view asking it to
2050
* return the appropriate subview. This allows parent views to catch
2051
* clicks on their subviews. This is the recommended function to use
2052
* before processing mouse events. Using one of the more primitive
2053
* functions may result in an undefined behavior. In general we
2054
* recommend the use of the Standard Window Handler instead of
2055
* calling this function yourself.
2057
* Mac OS X threading:
2063
* The view to start from. You should pass the window's root view.
2066
* The mouse event in question.
2069
* The view that the mouse event should be sent to.
2072
* An operating system result code.
2075
* Mac OS X: in version 10.2 and later in Carbon.framework
2076
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2077
* Non-Carbon CFM: not available
2079
function HIViewGetViewForMouseEvent( inView: HIViewRef; inEvent: EventRef; var outView: HIViewRef ): OSStatus; external name '_HIViewGetViewForMouseEvent';
2080
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2087
* After a successful call to HIViewGetViewForMouseEvent for a mouse
2088
* down event, you should call this function to have the view handle
2089
* the click. In general we recommend the use of the Standard Window
2090
* Handler instead of calling this function yourself.
2092
* Mac OS X threading:
2098
* The view to handle the event.
2101
* The mouse event to handle.
2104
* An operating system result code.
2107
* Mac OS X: in version 10.2 and later in Carbon.framework
2108
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2109
* Non-Carbon CFM: not available
2111
function HIViewClick( inView: HIViewRef; inEvent: EventRef ): OSStatus; external name '_HIViewClick';
2112
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2116
* HIViewSimulateClick()
2119
* This function is used to simulate a mouse click on a given view.
2120
* It sends a kEventControlSimulateHit event to the specified view,
2121
* and also sends kEventControlHit and (if the Hit event is not
2122
* handled) kEventCommandProcess events.
2124
* Note that not all windows will respond to the events that are
2125
* sent by this API. A fully Carbon-event-based window most likely
2126
* will respond exactly as if the user had really clicked in the
2127
* view. A window that is handled using classic EventRecord-based
2128
* APIs (WaitNextEvent or ModalDialog) will typically not respond at
2129
* all; to simulate a click in such a window, you may need to post a
2130
* mouse-down/mouse-up pair, or use a Dialog Manager event filter
2131
* proc to simulate a hit in a dialog item.
2133
* Mac OS X threading:
2139
* The view to test the part hit.
2142
* The part the view should consider to be clicked.
2145
* The modifiers the view can consider for its click action.
2148
* The part that was hit, can be kControlNoPart if no action
2149
* occurred. May be NULL if you don't need the part code returned.
2152
* An operating system result code.
2155
* Mac OS X: in version 10.2 and later in Carbon.framework
2156
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2157
* Non-Carbon CFM: not available
2159
function HIViewSimulateClick( inView: HIViewRef; inPartToClick: HIViewPartCode; inModifiers: UInt32; outPartClicked: HIViewPartCodePtr { can be NULL } ): OSStatus; external name '_HIViewSimulateClick';
2160
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2164
* HIViewGetPartHit()
2167
* Given a view, and a view-relative point, this function returns
2168
* the part code hit as determined by the view.
2170
* Mac OS X threading:
2176
* The view to test the part hit.
2179
* The view-relative point to use.
2182
* The part hit by inPoint.
2185
* An operating system result code.
2188
* Mac OS X: in version 10.2 and later in Carbon.framework
2189
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2190
* Non-Carbon CFM: not available
2192
function HIViewGetPartHit( inView: HIViewRef; const (*var*) inPoint: HIPoint; var outPart: HIViewPartCode ): OSStatus; external name '_HIViewGetPartHit';
2193
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2197
* HIViewGetSubviewHit()
2200
* Returns the child of the given view hit by the point passed in.
2201
* This is more primitive than using HIViewGetViewForMouseEvent, and
2202
* should be used only in non-event-handling cases.
2204
* Mac OS X threading:
2210
* The view you wish to start from.
2213
* The mouse coordinate to use. This is passed in the local
2214
* coordinate system of inView.
2217
* Pass true to find the deepest child hit, false to go only one
2218
* level deep (just check direct children of inView).
2221
* The view hit by inPoint, or NULL if no subview was hit.
2224
* An operating system result code.
2227
* Mac OS X: in version 10.2 and later in Carbon.framework
2228
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2229
* Non-Carbon CFM: not available
2231
function HIViewGetSubviewHit( inView: HIViewRef; const (*var*) inPoint: HIPoint; inDeep: Boolean; var outView: HIViewRef ): OSStatus; external name '_HIViewGetSubviewHit';
2232
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2235
{==============================================================================}
2236
{ HIView-based tracking areas }
2237
{==============================================================================}
2239
HIViewTrackingAreaRef = ^SInt32; { an opaque 32-bit type }
2241
kEventParamHIViewTrackingArea = $63747261 (* 'ctra' *); { typeHIViewTrackingAreaRef}
2242
typeHIViewTrackingAreaRef = $63747261 (* 'ctra' *);
2245
* kEventClassControl / kEventControlTrackingAreaEntered
2248
* The mouse has entered a tracking area owned by your control.
2251
* If you have installed a mouse tracking area in your view, you
2252
* will receive this event when the mouse enters that area. The
2253
* tracking area reference is sent with the event.
2255
* Mac OS X threading:
2260
* --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
2261
* The tracking area that was entered.
2263
* --> kEventParamKeyModifiers (in, typeUInt32)
2264
* The keyboard modifiers that were in effect when the mouse
2267
* --> kEventParamMouseLocation (in, typeHIPoint)
2268
* The location of the mouse in view coordinates.
2271
* Mac OS X: in version 10.4 and later in Carbon.framework
2272
* CarbonLib: not available
2275
kEventControlTrackingAreaEntered = 23;
2278
* kEventClassControl / kEventControlTrackingAreaExited
2281
* The mouse has exited a tracking area owned by your control.
2284
* If you have installed a mouse tracking area in your view, you
2285
* will receive this event when the mouse leaves that area. The
2286
* tracking area reference is sent with the event.
2288
* Mac OS X threading:
2293
* --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
2294
* The tracking area that was entered.
2296
* --> kEventParamKeyModifiers (in, typeUInt32)
2297
* The keyboard modifiers that were in effect when the mouse
2300
* --> kEventParamMouseLocation (in, typeHIPoint)
2301
* The location of the mouse in view coordinates. This point
2302
* may or may not lie on the boundary of the mouse region. It
2303
* is merely where the mouse was relative to the view when the
2304
* exit event was generated.
2307
* Mac OS X: in version 10.4 and later in Carbon.framework
2308
* CarbonLib: not available
2311
kEventControlTrackingAreaExited = 24;
2315
HIViewTrackingAreaID = UInt64;
2317
* HIViewNewTrackingArea()
2320
* Creates a new tracking area for a view.
2322
* Mac OS X threading:
2328
* The view to create a tracking area for.
2331
* The shape to use. Pass NULL to indicate the entire structure
2332
* region of the view is to be used.
2335
* An identifier for this tracking area. This value is completely
2336
* up to the view to define. Pass zero if you don't care.
2339
* A reference to the newly created tracking area. This references
2340
* is NOT refcounted.
2343
* An operating system status code.
2346
* Mac OS X: in version 10.4 and later in Carbon.framework
2347
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2348
* Non-Carbon CFM: not available
2350
function HIViewNewTrackingArea( inView: HIViewRef; inShape: HIShapeRef { can be NULL }; inID: HIViewTrackingAreaID; var outRef: HIViewTrackingAreaRef ): OSStatus; external name '_HIViewNewTrackingArea';
2351
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2355
* HIViewChangeTrackingArea()
2358
* Alters the shape of an existing tracking area.
2360
* Mac OS X threading:
2366
* The area to change.
2369
* The shape to use. Pass NULL to indicate the entire structure
2370
* region of the view is to be used.
2373
* An operating system status code.
2376
* Mac OS X: in version 10.4 and later in Carbon.framework
2377
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2378
* Non-Carbon CFM: not available
2380
function HIViewChangeTrackingArea( inArea: HIViewTrackingAreaRef; inShape: HIShapeRef ): OSStatus; external name '_HIViewChangeTrackingArea';
2381
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2385
* HIViewGetTrackingAreaID()
2388
* Retrieves the HIViewTrackingAreaID of an existing tracking area.
2389
* This value was set upon creation of the HIViewTrackingArea.
2391
* Mac OS X threading:
2397
* The area whose HIViewTrackingAreaID to retrieve.
2400
* The HIViewTrackingAreaID for this tracking area.
2403
* An operating system status code.
2406
* Mac OS X: in version 10.4 and later in Carbon.framework
2407
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2408
* Non-Carbon CFM: not available
2410
function HIViewGetTrackingAreaID( inArea: HIViewTrackingAreaRef; var outID: HIViewTrackingAreaID ): OSStatus; external name '_HIViewGetTrackingAreaID';
2411
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2415
* HIViewDisposeTrackingArea()
2418
* Disposes an existing tracking area. The reference is considered
2419
* to be invalid after calling this function.
2421
* Mac OS X threading:
2427
* The area to dispose.
2430
* An operating system status code.
2433
* Mac OS X: in version 10.4 and later in Carbon.framework
2434
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2435
* Non-Carbon CFM: not available
2437
function HIViewDisposeTrackingArea( inArea: HIViewTrackingAreaRef ): OSStatus; external name '_HIViewDisposeTrackingArea';
2438
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2441
{==============================================================================}
2443
{==============================================================================}
2445
* HIViewGetNeedsDisplay()
2448
* Returns true if the view passed in or any subview of it requires
2449
* redrawing (i.e. part of it has been invalidated).
2451
* Mac OS X threading:
2457
* The view to inspect.
2460
* A boolean result code.
2463
* Mac OS X: in version 10.2 and later in Carbon.framework
2464
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2465
* Non-Carbon CFM: not available
2467
function HIViewGetNeedsDisplay( inView: HIViewRef ): Boolean; external name '_HIViewGetNeedsDisplay';
2468
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2472
* HIViewSetNeedsDisplay()
2475
* Marks a view as needing to be completely redrawn, or completely
2476
* valid. If the view is not visible, or is obscured completely by
2477
* other views, no action is taken.
2479
* Mac OS X threading:
2485
* The view to mark dirty.
2488
* A boolean which indicates whether inView needs to be redrawn or
2492
* An operating system result code.
2495
* Mac OS X: in version 10.2 and later in Carbon.framework
2496
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2497
* Non-Carbon CFM: not available
2499
function HIViewSetNeedsDisplay( inView: HIViewRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplay';
2500
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2504
* HIViewSetNeedsDisplayInRect()
2507
* Marks a portion of a view as needing to be redrawn, or valid. If
2508
* the view is not visible, or is obscured completely by other
2509
* views, no action is taken. The rectangle passed is effectively
2510
* intersected with the view's visible region. It should be in
2511
* view-relative coordinates.
2513
* Mac OS X threading:
2519
* The view to mark dirty.
2522
* The rectangle encompassing the area to mark dirty or clean.
2525
* A boolean which indicates whether or not inRect should be added
2526
* to the invalid region or removed from it.
2529
* An operating system result code.
2532
* Mac OS X: in version 10.4 and later in Carbon.framework
2533
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2534
* Non-Carbon CFM: not available
2536
function HIViewSetNeedsDisplayInRect( inView: HIViewRef; const (*var*) inRect: HIRect; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInRect';
2537
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2541
* HIViewSetNeedsDisplayInShape()
2544
* Marks a portion of a view as needing to be redrawn, or valid. If
2545
* the view is not visible, or is obscured completely by other
2546
* views, no action is taken. The shape passed is effectively
2547
* intersected with the view's visible region. It should be in
2548
* view-relative coordinates.
2550
* Mac OS X threading:
2556
* The view to mark dirty.
2559
* The area to mark dirty or clean.
2562
* A boolean which indicates whether or not inArea should be added
2563
* to the invalid region or removed from it.
2566
* An operating system result code.
2569
* Mac OS X: in version 10.4 and later in Carbon.framework
2570
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2571
* Non-Carbon CFM: not available
2573
function HIViewSetNeedsDisplayInShape( inView: HIViewRef; inArea: HIShapeRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInShape';
2574
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2578
* HIViewSetNeedsDisplayInRegion()
2581
* Marks a portion of a view as needing to be redrawn, or valid. If
2582
* the view is not visible, or is obscured completely by other
2583
* views, no action is taken. The region passed is effectively
2584
* intersected with the view's visible region. It should be in
2585
* view-relative coordinates.
2587
* Mac OS X threading:
2593
* The view to mark dirty.
2596
* The region to mark dirty or clean.
2599
* A boolean which indicates whether or not inRgn should be added
2600
* to the invalid region or removed from it.
2603
* An operating system result code.
2606
* Mac OS X: in version 10.2 and later in Carbon.framework
2607
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2608
* Non-Carbon CFM: not available
2610
function HIViewSetNeedsDisplayInRegion( inView: HIViewRef; inRgn: RgnHandle; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInRegion';
2611
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2618
* Renders the invalid portions of a view (as marked with
2619
* HIViewSetNeedsDisplay[InRegion]) immediately. Normally, these
2620
* areas are redrawn at event loop time, but there might be
2621
* situations where you need an immediate draw. Use this sparingly,
2622
* as it does cause a fully composited draw for the area of the
2623
* view; that is, all other views that intersect the area of the
2624
* specified view will also be drawn. Calling this for several views
2625
* at a particular level of a hierarchy can be costly. We highly
2626
* recommend that you only pass the root view of a window to this
2627
* API. The behavior of this API when passed a non-root view was
2628
* poorly defined in Mac OS X 10.3 and has changed in Mac OS X 10.4.
2629
* In 10.3, calling this API on a non-root view would entirely
2630
* validate all of the views in the window that intersect the
2631
* specified view, including portions that did not intersect the
2632
* specified view and so were not actually drawn. In 10.4, calling
2633
* this API on a non-root view will only validate those portions of
2634
* each view that intersect the specified view.
2636
* Mac OS X threading:
2645
* An operating system result code.
2648
* Mac OS X: in version 10.3 and later in Carbon.framework
2649
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2650
* Non-Carbon CFM: not available
2652
function HIViewRender( inView: HIViewRef ): OSStatus; external name '_HIViewRender';
2653
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2657
* HIViewFlashDirtyArea()
2660
* Debugging aid. Flashes the region which would be redrawn at the
2661
* next draw time for an entire window.
2663
* Mac OS X threading:
2669
* The window to flash the dirty region for.
2672
* An operating system result code.
2675
* Mac OS X: in version 10.2 and later in Carbon.framework
2676
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2677
* Non-Carbon CFM: not available
2679
function HIViewFlashDirtyArea( inWindow: WindowRef ): OSStatus; external name '_HIViewFlashDirtyArea';
2680
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2684
* HIViewGetSizeConstraints()
2687
* Return the minimum and maximum size for a control. A control must
2688
* respond to this protocol to get meaningful results. These sizes
2689
* can be used to help autoposition subviews, for example.
2691
* Mac OS X threading:
2697
* The view to inspect.
2700
* The minimum size the view can be. May be NULL if you don't need
2704
* The maximum size the view can be. May be NULL if you don't need
2708
* An operating system result code.
2711
* Mac OS X: in version 10.2 and later in Carbon.framework
2712
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2713
* Non-Carbon CFM: not available
2715
function HIViewGetSizeConstraints( inView: HIViewRef; outMinSize: HISizePtr { can be NULL }; outMaxSize: HISizePtr { can be NULL } ): OSStatus; external name '_HIViewGetSizeConstraints';
2716
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2719
{==============================================================================}
2720
{ COORDINATE SYSTEM CONVERSION }
2721
{==============================================================================}
2723
* HIViewConvertPoint()
2726
* Converts a point from one view to another. Both views must have a
2727
* common ancestor, i.e. they must both be in the same window.
2729
* Mac OS X threading:
2735
* The point to convert.
2738
* The view whose coordinate system ioPoint is starting out in.
2739
* You can pass NULL to indicate that ioPoint is a window-relative
2743
* The view whose coordinate system ioPoint should end up in. You
2744
* can pass NULL to indicate that ioPoint is a window-relative
2748
* An operating system result code.
2751
* Mac OS X: in version 10.2 and later in Carbon.framework
2752
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2753
* Non-Carbon CFM: not available
2755
function HIViewConvertPoint( var ioPoint: HIPoint; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertPoint';
2756
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2760
* HIViewConvertRect()
2763
* Converts a rectangle from one view to another. Both views must
2764
* have a common ancestor, i.e. they must both be in the same window.
2766
* Mac OS X threading:
2772
* The rectangle to convert.
2775
* The view whose coordinate system ioRect is starting out in. You
2776
* can pass NULL to indicate that ioRect is a window-relative
2780
* The view whose coordinate system ioRect should end up in. You
2781
* can pass NULL to indicate that ioRect is a window-relative
2785
* An operating system result code.
2788
* Mac OS X: in version 10.2 and later in Carbon.framework
2789
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2790
* Non-Carbon CFM: not available
2792
function HIViewConvertRect( var ioRect: HIRect; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRect';
2793
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2797
* HIViewConvertRegion()
2800
* Converts a region from one view to another. Both views must have
2801
* a common ancestor, i.e. they must both be in the same window.
2803
* Mac OS X threading:
2809
* The region to convert.
2812
* The view whose coordinate system ioRgn is starting out in. You
2813
* can pass NULL to indicate that ioRgn is a window-relative
2817
* The view whose coordinate system ioRgn should end up in. You
2818
* can pass NULL to indicate that ioRgn is a window-relative
2822
* An operating system result code.
2825
* Mac OS X: in version 10.2 and later in Carbon.framework
2826
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2827
* Non-Carbon CFM: not available
2829
function HIViewConvertRegion( ioRgn: RgnHandle; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRegion';
2830
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2834
* HIViewSetDrawingEnabled()
2837
* Turns control drawing on or off. You can use this to ensure that
2838
* no drawing events are sent to the control. Even Draw1Control will
2839
* not draw! HIViewSetNeedsDisplay is also rendered useless when
2842
* Mac OS X threading:
2848
* The view to enable or disable drawing for.
2851
* A boolean value indicating whether drawing should be on (true)
2855
* An operating system result code.
2858
* Mac OS X: in version 10.2 and later in Carbon.framework
2859
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2860
* Non-Carbon CFM: not available
2862
function HIViewSetDrawingEnabled( inView: HIViewRef; inEnabled: Boolean ): OSStatus; external name '_HIViewSetDrawingEnabled';
2863
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2867
* HIViewIsDrawingEnabled()
2870
* Determines if drawing is currently enabled for a control.
2872
* Mac OS X threading:
2878
* The view to get the drawing state for.
2881
* A boolean value indicating whether drawing is on (true) or off
2885
* Mac OS X: in version 10.2 and later in Carbon.framework
2886
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2887
* Non-Carbon CFM: not available
2889
function HIViewIsDrawingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsDrawingEnabled';
2890
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2894
* HIViewScrollRect()
2897
* Scrolls a view's contents, or a portion thereof. A view's
2898
* contents are the pixels that it or any of its descendent views
2899
* has drawn into. This will actually blit the contents of the view
2900
* as appropriate to scroll, and then invalidate those portions
2901
* which need to be redrawn. Be warned that this is a raw bit
2902
* scroll. Anything that might overlap the target view will get
2905
* Mac OS X threading:
2911
* The view to scroll. The bits drawn by the view's descendent
2912
* views will also be scrolled.
2915
* The rect to scroll. Pass NULL to mean the entire view. The rect
2916
* passed cannot be bigger than the view's bounds. It must be in
2917
* the local coordinate system of the view.
2920
* The horizontal distance to scroll. Positive values shift to the
2921
* right, negative values shift to the left.
2924
* The vertical distance to scroll. Positive values shift
2925
* downward, negative values shift upward.
2928
* An operating system result code.
2931
* Mac OS X: in version 10.2 and later in Carbon.framework
2932
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2933
* Non-Carbon CFM: not available
2935
function HIViewScrollRect( inView: HIViewRef; {const} inRect: HIRectPtr { can be NULL }; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIViewScrollRect';
2936
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2940
* HIViewSetBoundsOrigin()
2943
* This API sets the origin of the view. This effectively also moves
2944
* all subcontrols of a view as well. This call will NOT invalidate
2945
* the view. This is because you might want to move the contents
2946
* with HIViewScrollRect instead of redrawing the complete content.
2948
* Mac OS X threading:
2954
* The view whose origin you wish to adjust.
2963
* An operating system result code.
2966
* Mac OS X: in version 10.2 and later in Carbon.framework
2967
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2968
* Non-Carbon CFM: not available
2970
function HIViewSetBoundsOrigin( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewSetBoundsOrigin';
2971
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2974
{==============================================================================}
2976
{==============================================================================}
2978
* HIViewAdvanceFocus()
2981
* Advances the focus to the next most appropriate view. Unless
2982
* overriden in some fashion (either by overriding certain carbon
2983
* events or using the HIViewSetNextFocus API), the Toolbox will use
2984
* a spacially determinant method of focusing, attempting to focus
2985
* left to right, top to bottom in a window, taking groups of
2986
* controls into account.
2988
* Mac OS X threading:
2994
* The subtree to manipulate. The focus will never leave
2995
* inRootToFocus. Typically you would pass the content of the
2996
* window, or the root. If focused on the toolbar, for example,
2997
* the focus is limited to the toolbar only. In this case, the
2998
* Toolbox passes the toolbar view in as the focus root for
3002
* The EventModifiers of the keyboard event that ultimately caused
3003
* the call to HIViewAdvanceFocus. These modifiers are used to
3004
* determine the focus direction as well as other alternate
3005
* focusing behaviors.
3008
* An operating system result code.
3011
* Mac OS X: in version 10.2 and later in Carbon.framework
3012
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3013
* Non-Carbon CFM: not available
3015
function HIViewAdvanceFocus( inRootForFocus: HIViewRef; inModifiers: EventModifiers ): OSStatus; external name '_HIViewAdvanceFocus';
3016
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3020
* HIViewGetFocusPart()
3023
* Returns the currently focused part of the given view.
3025
* Mac OS X threading:
3031
* The view to inquire about.
3034
* The part currently focused.
3037
* An operating system result code.
3040
* Mac OS X: in version 10.2 and later in Carbon.framework
3041
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3042
* Non-Carbon CFM: not available
3044
function HIViewGetFocusPart( inView: HIViewRef; var outFocusPart: HIViewPartCode ): OSStatus; external name '_HIViewGetFocusPart';
3045
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3049
* HIViewSubtreeContainsFocus()
3052
* Given a view, this function checks to see if it or any of its
3053
* children currently are the keyboard focus. If so, true is
3054
* returned as the function result.
3056
* Mac OS X threading:
3062
* The view to start searching at.
3068
* Mac OS X: in version 10.2 and later in Carbon.framework
3069
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3070
* Non-Carbon CFM: not available
3072
function HIViewSubtreeContainsFocus( inSubtreeStart: HIViewRef ): Boolean; external name '_HIViewSubtreeContainsFocus';
3073
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3077
* HIViewSetNextFocus()
3080
* This function hard-wires the next sibling view to shift focus to
3081
* whenever the keyboard focus is advanced.
3083
* Mac OS X threading:
3089
* The view to set the next focus view for. This parameter and the
3090
* inNextFocus parameter must both have the same parent view.
3093
* The view to set focus to next. This parameter and the inView
3094
* parameter must both have the same parent view. Pass NULL to
3095
* tell the view system to use the default rules.
3098
* An operating system result code.
3101
* Mac OS X: in version 10.2 and later in Carbon.framework
3102
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3103
* Non-Carbon CFM: not available
3105
function HIViewSetNextFocus( inView: HIViewRef; inNextFocus: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetNextFocus';
3106
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3110
* HIViewSetFirstSubViewFocus()
3113
* This function hard-wires the first subview to shift focus to
3114
* whenever the keyboard focus is advanced and the container view is
3117
* Mac OS X threading:
3126
* The first child which should receive focus. Pass NULL to tell
3127
* the view system to use the default rules.
3130
* An operating system result code.
3133
* Mac OS X: in version 10.2 and later in Carbon.framework
3134
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3135
* Non-Carbon CFM: not available
3137
function HIViewSetFirstSubViewFocus( inParent: HIViewRef; inSubView: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetFirstSubViewFocus';
3138
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3141
{==============================================================================}
3143
{ Mac OS X 10.3 provides a layout engine for HIViews that allows applications }
3144
{ to specify the layout relationships between multiple views. The layout }
3145
{ engine will automatically reposition and resize views that have layout }
3146
{ information when necessary. }
3147
{==============================================================================}
3151
* Since horizontal and vertical bindings are very similar in
3152
* application, except along different axes, the binding kinds have
3153
* been abstracted to minimum and maximum. Synonyms have been
3154
* provided for convenience. You are encouraged to use them.
3157
* HIBindingKind constants.
3161
* No binding is to occur.
3163
kHILayoutBindNone = 0;
3166
* Bind to the minimum of the axis.
3168
kHILayoutBindMin = 1;
3171
* Bind to the maximum of the axis.
3173
kHILayoutBindMax = 2;
3174
kHILayoutBindLeft = kHILayoutBindMin;
3175
kHILayoutBindRight = kHILayoutBindMax;
3178
* Synonyms for convenience and clarity.
3180
kHILayoutBindTop = kHILayoutBindMin;
3181
kHILayoutBindBottom = kHILayoutBindMax;
3184
HIBindingKind = UInt16;
3190
* A binding for a side of an HIView.
3193
* A side binding is entirely related to the change of the parent's
3194
* position or size (but only as the size affects the maximum edge
3195
* position). A side binding doesn't mean "move to where my
3196
* relative's side is" but rather "move as my relative's side has
3200
HISideBinding = record
3202
* An HIViewRef to the view to which this side is bound. Can be NULL,
3203
* indicating that the the side is bound to its parent view.
3205
toView: HIViewRef; { NULL means parent}
3208
* An HIBindingKind indicating the bind kind.
3210
kind: HIBindingKind;
3213
* Not currently used. Must be set to 0.
3218
const HISideBinding kHISideNoBinding = ( NULL, kHILayoutBindNone );
3225
* A set of Top, Left, Bottom, and Right bindings for an HIView.
3230
* The top side bindings.
3235
* The left side bindings.
3237
left: HISideBinding;
3240
* The bottom side bindings.
3242
bottom: HISideBinding;
3245
* The right side bindings.
3247
right: HISideBinding;
3250
const HIBinding kHINoBinding = ( kHISideNoBinding, kHISideNoBinding, kHISideNoBinding, kHISideNoBinding );
3255
* HIScaleKind constants.
3259
* The scale is determined from the axis size.
3261
kHILayoutScaleAbsolute = 0;
3265
HIScaleKind = UInt16;
3271
* A scale description for an axis of an HIView.
3274
HIAxisScale = record
3276
* An HIViewRef to the view to which this axis is scaled. Can be
3277
* NULL, indicating that the the axis is scaled relative to its
3280
toView: HIViewRef; { NULL means parent}
3283
* An HIScaleKind describing the type of scaling to be applied.
3284
* Currently, this field can't be anything other than
3290
* A float indicating how much to scale the HIView. 0 indicates no
3291
* scaling. A value of 1 indicates that the view is to always have
3292
* the same axial size.
3301
* A set of scaling descriptions for the axes of an HIView.
3306
* An HIAxisScale describing the horizontal scaling for an HIView.
3314
* Since horizontal and vertical positions are very similar in
3315
* application, except along different axes, the position kinds have
3316
* been abstracted to minimum and maximum. Synonyms have been
3317
* provided for convenience. You are encouraged to use them.
3320
* HIPositionKind constants.
3324
* No positioning is to occur.
3326
kHILayoutPositionNone = 0;
3329
* Centered positioning will occur. The view will be centered
3330
* relative to the specified view.
3332
kHILayoutPositionCenter = 1;
3335
* Minimum positioning will occur. The view will be left or top
3336
* aligned relative to the specified view.
3338
kHILayoutPositionMin = 2;
3341
* Maximum positioning will occur. The view will be right or bottom
3342
* aligned relative to the specified view.
3344
kHILayoutPositionMax = 3;
3347
* Synonyms for convenience and clarity.
3349
kHILayoutPositionLeft = kHILayoutPositionMin;
3350
kHILayoutPositionRight = kHILayoutPositionMax;
3351
kHILayoutPositionTop = kHILayoutPositionMin;
3352
kHILayoutPositionBottom = kHILayoutPositionMax;
3356
HIPositionKind = UInt16;
3362
* An axial position description for an HIView.
3365
HIAxisPosition = record
3367
* An HIViewRef to the view relative to which a view will be
3368
* positioned. Can be NULL, indicating that the the view is
3369
* positioned relative to its parent view.
3371
toView: HIViewRef; { NULL means parent}
3374
* An HIPositionKind indicating the kind of positioning to apply.
3376
kind: HIPositionKind;
3379
* After the position kind has been applied, the origin component
3380
* that corresponds to the positioning axis is offet by this value.
3381
* (ex: Left aligned + 10 ).
3390
* A positioning description for an HIView.
3393
HIPositioning = record
3395
* An HIAxisPosition describing the horizontal positioning for an
3406
* A layout description for an HIView.
3409
* The different layout transformations are applied sequentially to
3410
* the HIView. First, the bindings are applied. Note that the
3411
* bindings are applied recursively to a container's HIViews. This
3412
* requires care on your part, especially when applying
3413
* inter-relational bindings. Then the scaling (which could
3414
* potentially override some of the previously applied bindings).
3415
* Then the positioning (which could potentially override some of
3416
* the previously applied bindings).
3419
HILayoutInfo = record
3421
* The version of the structure. The current version is
3422
* kHILayoutInfoVersionZero.
3427
* An HIBinding structure describing the kinds of bindings to apply
3428
* to the sides of an HIView.
3433
* An HIScaling structure describing the axial scaling to apply to an
3439
* An HIPositioning structure positioning to apply to an HIView.
3441
position: HIPositioning;
3444
kHILayoutInfoVersionZero = 0;
3448
const HILayoutInfo kHILayoutInfoNone = (
3449
kHILayoutInfoVersionZero,
3451
( ( NULL, 0.0 ), ( NULL, 0.0 ) ),
3452
( ( NULL, kHILayoutPositionNone ), ( NULL, kHILayoutPositionNone ) ) );
3456
* HIViewGetLayoutInfo()
3459
* Get the layout info of an HIView.
3461
* Mac OS X threading:
3467
* The HIView whose layout info is to be retreived.
3470
* A pointer to an HILayoutInfo record into which to copy the
3471
* layout info of the HIView. The version field of this record
3472
* must be valid or the call will fail.
3475
* An operating system status code.
3478
* Mac OS X: in version 10.3 and later in Carbon.framework
3479
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3480
* Non-Carbon CFM: not available
3482
function HIViewGetLayoutInfo( inView: HIViewRef; var outLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewGetLayoutInfo';
3483
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3487
* HIViewSetLayoutInfo()
3490
* Set the layout info of an HIView.
3492
* Mac OS X threading:
3498
* The HIView whose layout info is to be retreived.
3501
* A pointer to an HILayoutInfo record from which to copy the
3502
* layout info for the HIView.
3505
* An operating system status code.
3508
* Mac OS X: in version 10.3 and later in Carbon.framework
3509
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3510
* Non-Carbon CFM: not available
3512
function HIViewSetLayoutInfo( inView: HIViewRef; const (*var*) inLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewSetLayoutInfo';
3513
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3517
* HIViewSuspendLayout()
3520
* Suspends all layout handling for this layout and its children.
3522
* Mac OS X threading:
3528
* The HIView whose layout handling is to be suspended.
3531
* An operating system status code.
3534
* Mac OS X: in version 10.3 and later in Carbon.framework
3535
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3536
* Non-Carbon CFM: not available
3538
function HIViewSuspendLayout( inView: HIViewRef ): OSStatus; external name '_HIViewSuspendLayout';
3539
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3543
* HIViewResumeLayout()
3546
* Resumes all layout handling for this layout and its children.
3548
* Mac OS X threading:
3554
* The HIView whose layout handling is to be resumed.
3557
* An operating system status code.
3560
* Mac OS X: in version 10.3 and later in Carbon.framework
3561
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3562
* Non-Carbon CFM: not available
3564
function HIViewResumeLayout( inView: HIViewRef ): OSStatus; external name '_HIViewResumeLayout';
3565
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3569
* HIViewIsLayoutActive()
3572
* Tests the view to determine if layout is active or suspended.
3573
* Note that this test does not determine whether or not the view
3574
* has a valid layout, only whether or not the layout engine is
3575
* active for the view.
3578
* The view's layout active state is also affected by the layout
3579
* active state of its parents; if any parent view has inactive
3580
* layout, this view is considered to have inactive layout as well.
3581
* See HIViewIsLayoutLatentlyActive if latent layout active state is
3584
* Mac OS X threading:
3590
* The HIView whose layout handling is to be tested.
3593
* True if the view would respond to any linked relative's changes,
3597
* Mac OS X: in version 10.3 and later in Carbon.framework
3598
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3599
* Non-Carbon CFM: not available
3601
function HIViewIsLayoutActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutActive';
3602
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3606
* HIViewIsLayoutLatentlyActive()
3609
* The view's layout active state is also affected by the layout
3610
* active state of its parents; if any parent view has inactive
3611
* layout, this view is considered to have inactive layout as well.
3612
* HIViewIsLayoutLatentlyActive returns whether a view's layout is
3613
* latently active, even if one of its parent's layouts is not.
3615
* Mac OS X threading:
3621
* The HIView whose latent layout handling is to be tested.
3624
* True if the view would latently respond to any linked relative's
3625
* changes, otherwise false.
3628
* Mac OS X: in version 10.4 and later in Carbon.framework
3629
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
3630
* Non-Carbon CFM: not available
3632
function HIViewIsLayoutLatentlyActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutLatentlyActive';
3633
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3637
* HIViewApplyLayout()
3640
* Applies the current layout into to the specified view. Side
3641
* bindings have no effect, but positioning and scaling will occur,
3644
* Mac OS X threading:
3650
* The HIView whose layout info is to be applied.
3653
* An operating system status code.
3656
* Mac OS X: in version 10.3 and later in Carbon.framework
3657
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3658
* Non-Carbon CFM: not available
3660
function HIViewApplyLayout( inView: HIViewRef ): OSStatus; external name '_HIViewApplyLayout';
3661
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3664
{==============================================================================}
3666
{==============================================================================}
3671
* Returns a reference to the window a given view is bound to. If
3672
* the view reference passed is invalid, or the view is not embedded
3673
* into any window, NULL is returned.
3675
* Mac OS X threading:
3681
* The view to query.
3684
* A window reference.
3687
* Mac OS X: in version 10.3 and later in Carbon.framework
3688
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3689
* Non-Carbon CFM: not available
3691
function HIViewGetWindow( inView: HIViewRef ): WindowRef; external name '_HIViewGetWindow';
3692
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3699
* Allows you to find a particular view by its ID. Currently, this
3700
* call uses the ControlID type as its IDs.
3702
* Mac OS X threading:
3708
* The view to start searching at.
3711
* The ID of the view you are looking for.
3714
* Receives the control if found.
3717
* An operating system result code.
3720
* Mac OS X: in version 10.2 and later in Carbon.framework
3721
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3722
* Non-Carbon CFM: not available
3724
function HIViewFindByID( inStartView: HIViewRef; inID: HIViewID; var outControl: HIViewRef ): OSStatus; external name '_HIViewFindByID';
3725
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3729
* HIViewGetAttributes()
3732
* Allows you to get the attributes of a view.
3734
* Mac OS X threading:
3740
* The view to inspect.
3743
* The attributes of the view.
3746
* An operating system result code.
3749
* Mac OS X: in version 10.2 and later in Carbon.framework
3750
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3751
* Non-Carbon CFM: not available
3753
function HIViewGetAttributes( inView: HIViewRef; var outAttrs: OptionBits ): OSStatus; external name '_HIViewGetAttributes';
3754
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3758
* HIViewChangeAttributes()
3761
* Allows you to change the attributes of a view. You can
3762
* simultaneously set and clear attributes.
3764
* Mac OS X threading:
3770
* The view to muck with.
3773
* The attributes you wish to set.
3776
* The attributes you wish to clear.
3779
* An operating system result code.
3782
* Mac OS X: in version 10.2 and later in Carbon.framework
3783
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3784
* Non-Carbon CFM: not available
3786
function HIViewChangeAttributes( inView: HIViewRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIViewChangeAttributes';
3787
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3791
* HIViewCreateOffscreenImage()
3794
* Creates an CGImageRef for the view passed in. The view and any
3795
* children it has are rendered in the resultant image.
3797
* Mac OS X threading:
3803
* The view you wish to create an image of.
3806
* Options. Currently you must pass 0.
3809
* The frame of the view within the resultant image. It is in the
3810
* coordinate system of the image, where 0,0 is the top left
3811
* corner of the image. This is so you can know exactly where the
3812
* control lives in the image when the control draws outside its
3813
* bounds for things such as shadows.
3816
* The image of the view, including anything that would be drawn
3817
* outside the view's frame.
3820
* An operating system status code.
3823
* Mac OS X: in version 10.2 and later in Carbon.framework
3824
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3825
* Non-Carbon CFM: not available
3827
function HIViewCreateOffscreenImage( inView: HIViewRef; inOptions: OptionBits; outFrame: HIRectPtr { can be NULL }; var outImage: CGImageRef ): OSStatus; external name '_HIViewCreateOffscreenImage';
3828
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3832
* HIViewDrawCGImage()
3835
* Draws an image in the right direction for an HIView. This is
3836
* functionally the same as CGContextDrawImage, but it flips the
3837
* context appropriately so that the image is drawn correctly.
3838
* Because HIViews have their origin at the top, left, you are
3839
* really drawing upside-down, so if you were to use the CG image
3840
* drawing, you'd see what I mean! This call attempts to insulate
3841
* you from that fact.
3843
* Mac OS X threading:
3849
* The context to draw in.
3852
* The bounds to draw the image into.
3855
* The image to draw.
3858
* An operating system status code.
3861
* Mac OS X: in version 10.2 and later in Carbon.framework
3862
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
3863
* Non-Carbon CFM: not available
3865
function HIViewDrawCGImage( inContext: CGContextRef; const (*var*) inBounds: HIRect; inImage: CGImageRef ): OSStatus; external name '_HIViewDrawCGImage';
3866
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3870
* HIViewGetFeatures()
3873
* Returns the features for the current view. This only returns
3874
* feature bits for the HIView space. Older Control Manager features
3875
* such as kControlSupportsDataAccess are not returned.
3877
* Mac OS X threading:
3886
* On output, the features for the view.
3889
* An operating system status code.
3892
* Mac OS X: in version 10.3 and later in Carbon.framework
3893
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3894
* Non-Carbon CFM: not available
3896
function HIViewGetFeatures( inView: HIViewRef; var outFeatures: HIViewFeatures ): OSStatus; external name '_HIViewGetFeatures';
3897
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3901
* HIViewChangeFeatures()
3904
* Allows you to change a view's features on the fly. Typically,
3905
* this is up to the view itself to control. For example, it might
3906
* decide that under some situations it is opaque and other others
3907
* it is transparent. In general entities outside of the view itself
3908
* should not call this function. The only exception might be UI
3909
* building tools, where it would want to make sure a view always
3910
* responds to clicks, for example, so it could override mouse
3911
* tracking to drag items around.
3913
* Mac OS X threading:
3919
* The view to change
3922
* The features to enable
3924
* inFeaturesToClear:
3925
* The features to disable
3928
* An operating system status code.
3931
* Mac OS X: in version 10.3 and later in Carbon.framework
3932
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3933
* Non-Carbon CFM: not available
3935
function HIViewChangeFeatures( inView: HIViewRef; inFeaturesToSet: HIViewFeatures; inFeaturesToClear: HIViewFeatures ): OSStatus; external name '_HIViewChangeFeatures';
3936
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3941
* Constants for use with the HICreateTransformedCGImage API.
3945
* No visual transform should be applied.
3947
kHITransformNone = $00;
3950
* The image should be transformed to use a disabled appearance. This
3951
* transform should not be combined with any other transform.
3953
kHITransformDisabled = $01;
3956
* The image should be transformed to use a selected appearance. This
3957
* transform should not be combined with any other transform.
3959
kHITransformSelected = $4000;
3962
* HICreateTransformedCGImage()
3965
* Creates a new CGImage with a standard selected or disabled
3968
* Mac OS X threading:
3974
* The original image.
3977
* The transform to apply to the image.
3980
* The new image. This image should be released by the caller.
3983
* Mac OS X: in version 10.4 and later in Carbon.framework
3984
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
3985
* Non-Carbon CFM: not available
3987
function HICreateTransformedCGImage( inImage: CGImageRef; inTransform: OptionBits; var outImage: CGImageRef ): OSStatus; external name '_HICreateTransformedCGImage';
3988
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3992
* HIViewGetEventTarget()
3995
* Returns the EventTargetRef for the specified view. Once you
3996
* obtain this reference, you can send events to the target and
3997
* install event handler on it.
3999
* Mac OS X threading:
4005
* The view to return the target for.
4008
* An EventTargetRef.
4011
* Mac OS X: in version 10.4 and later in Carbon.framework
4012
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
4013
* Non-Carbon CFM: not available
4015
function HIViewGetEventTarget( inView: HIViewRef ): EventTargetRef; external name '_HIViewGetEventTarget';
4016
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
4019
{==============================================================================}
4021
{ The grow box view is a new view starting in Mac OS 10.2. It can be used in }
4022
{ both the new compositing mode, as well as the traditional control manager }
4023
{ mode. Like all new HIFoo views, this view is created invisibly. You must }
4024
{ show the view after creation if you want to, like, see it and stuff. }
4025
{==============================================================================}
4026
{ The HIObject class ID for the HIGrowBoxView class. }
4027
{$ifc USE_CFSTR_CONSTANT_MACROS}
4028
{$definec kHIGrowBoxViewClassID CFSTRP('com.apple.higrowboxview')}
4032
kControlKindHIGrowBoxView = $67726F77 (* 'grow' *);
4034
{ Currently there is no direct creation API for the grow box, so you must use }
4035
{ HIObjectCreate if you wish to create one directly. Normally, a window will }
4036
{ create one for you, so you should generally never need to do this. }
4038
* HIGrowBoxViewSetTransparent()
4041
* Sets a grow box view as transparent, meaning it will draw the
4042
* grow box lines over any content below it. When not transparent,
4043
* it's an opaque white square with the grow lines.
4045
* Mac OS X threading:
4051
* The grow box view reference.
4054
* Pass true to make the grow view use its transparent look, false
4055
* to give it the opaque look.
4058
* An operating system result code.
4061
* Mac OS X: in version 10.2 and later in Carbon.framework
4062
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4063
* Non-Carbon CFM: not available
4065
function HIGrowBoxViewSetTransparent( inGrowBoxView: HIViewRef; inTransparent: Boolean ): OSStatus; external name '_HIGrowBoxViewSetTransparent';
4066
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4070
* HIGrowBoxViewIsTransparent()
4073
* Returns true if a grow box view is set to be transparent.
4075
* Mac OS X threading:
4081
* The grow box view reference.
4087
* Mac OS X: in version 10.2 and later in Carbon.framework
4088
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4089
* Non-Carbon CFM: not available
4091
function HIGrowBoxViewIsTransparent( inGrowBoxView: HIViewRef ): Boolean; external name '_HIGrowBoxViewIsTransparent';
4092
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4095
{==============================================================================}
4097
{ The scroll view is a new view starting in Mac OS 10.2. It can be used in }
4098
{ the new compositing mode ONLY due to the nature of how it works. Like all }
4099
{ new HIFoo views, this view is created invisibly. You must show the view }
4100
{ after creation if you want to, like, see it and stuff. }
4101
{ The HIScrollView will set the frame of the contained view when its bounds }
4102
{ change, so it is not necessary to set up the layout of the embedded view. }
4103
{ Using an HIScrollView requires a few steps: }
4104
{ 1. Install your scrollable content view into the HIScrollView instance using }
4105
{ HIViewAddSubview. }
4106
{ 2. If the scrollable content view doesn't already handle the }
4107
{ kEventScrollableGetInfo and kEventScrollableScrollTo events, you must }
4108
{ install handlers on your scrollable content view and handle those events }
4109
{ manually. More details on those events can be found below. }
4110
{ 3. If the scrollable content view doesn't already send out the }
4111
{ kEventScrollableInfoChanged event to its parent view, you must send this }
4112
{ event to the HIScrollView instance whenever your scrollable content }
4113
{ view's size or origin changes. More details on this even can be found }
4115
{==============================================================================}
4116
{ The HIObject class ID for the HIScrollView class. }
4117
{$ifc USE_CFSTR_CONSTANT_MACROS}
4118
{$definec kHIScrollViewClassID CFSTRP('com.apple.HIScrollView')}
4122
kControlKindHIScrollView = $7363726C (* 'scrl' *);
4125
kEventClassScrollable quick reference:
4127
kEventScrollableGetInfo = 1,
4128
kEventScrollableInfoChanged = 2,
4129
%% kEventScrollableEmbedded = 3,
4130
%% kEventScrollableRemoved = 4,
4131
kEventScrollableScrollTo = 10
4134
kEventClassScrollable = $7363726C (* 'scrl' *);
4137
kEventParamImageSize = $696D737A (* 'imsz' *); { typeHISize}
4138
kEventParamViewSize = $7677737A (* 'vwsz' *); { typeHISize}
4139
kEventParamLineSize = $6C6E737A (* 'lnsz' *); { typeHISize}
4140
kEventParamOrigin = $6F72676E (* 'orgn' *); { typeHIPoint}
4143
* kEventClassScrollable / kEventScrollableGetInfo
4146
* Requests information from an HIScrollView�s scrollable view about
4147
* its size and origin.
4150
* This event is sent by an HIScrollView to its scrollable view to
4151
* determine the current size and origin of the scrollable view. A
4152
* scrollable view must implement this event in order to scroll
4153
* properly inside an HIScrollView.
4155
* Mac OS X threading:
4160
* <-- kEventParamImageSize (out, typeHISize)
4161
* On exit, contains the size of the entire scrollable view.
4163
* <-- kEventParamViewSize (out, typeHISize)
4164
* On exit, contains the amount of the scrollable view that is
4167
* <-- kEventParamLineSize (out, typeHISize)
4168
* On exit, contains the amount that should be scrolled in
4169
* response to a single click on a scrollbar arrow.
4171
* <-- kEventParamOrigin (out, typeHIPoint)
4172
* On exit, contains the scrollable view�s current origin (the
4173
* view-relative coordinate that is drawn at the top left
4174
* corner of its frame). These coordinates should always be
4175
* greater than or equal to zero. They should be less than or
4176
* equal to the view�s image size minus its view size.
4179
* Mac OS X: in version 10.2 and later in Carbon.framework
4180
* CarbonLib: not available
4183
kEventScrollableGetInfo = 1;
4186
* kEventClassScrollable / kEventScrollableInfoChanged
4189
* Notification that the size or origin of an HIScrollView�s
4190
* scrollable view has changed.
4193
* This event is not sent by HIScrollView itself; rather, it may be
4194
* sent to an instance of HIScrollView to notify the scroll view
4195
* that the size or origin of its scrollable view have changed. The
4196
* HIScrollView responds to this event by sending a
4197
* kEventScrollableGetInfo to its scrollable view. It then updates
4198
* the scroll bars appropriately to reflect the new reality of the
4199
* scrollable view. It does NOT move the origin of the scrollable
4200
* view at all. It is just a notification to allow the scroll view
4201
* to sync up with its scrollable view.
4203
* Mac OS X threading:
4207
* Mac OS X: in version 10.2 and later in Carbon.framework
4208
* CarbonLib: not available
4211
kEventScrollableInfoChanged = 2;
4214
* kEventClassScrollable / kEventScrollableScrollTo
4217
* Requests that an HIScrollView�s scrollable view should scroll to
4218
* a particular origin.
4221
* This event is sent by an HIScrollView to its scrollable view to
4222
* request that the scrollable view update its current origin and
4223
* redraw. Typically, a scrollable view will record its current
4224
* origin in its own instance data; it should update the origin in
4225
* response to this event. A scrollable view should also use either
4226
* HIViewScrollRect to scroll its content, or HIViewSetNeedsDisplay
4227
* to cause itself to redraw using the new origin point. A
4228
* scrollable view must implement this event in order to scroll
4229
* properly inside an HIScrollView.
4231
* Mac OS X threading:
4236
* --> kEventParamOrigin (in, typeHIPoint)
4237
* The new origin for the scrollable view. The origin
4238
* coordinates will vary from (0,0) to scrollable view�s image
4239
* size minus its view size.
4242
* Mac OS X: in version 10.2 and later in Carbon.framework
4243
* CarbonLib: not available
4246
kEventScrollableScrollTo = 10;
4251
* HIScrollView options
4255
* This indicates that a vertical scroll bar is desired.
4257
kHIScrollViewOptionsVertScroll = 1 shl 0;
4260
* This indicates that a horizontal scroll bar is desired.
4262
kHIScrollViewOptionsHorizScroll = 1 shl 1;
4265
* This indicates that space for a grow box should be taken into
4266
* account when laying out scroll bars. On Mac OS X 10.3 and earlier,
4267
* if both the horizontal and vertical scroll bars are requested,
4268
* this attribute is assumed. On Mac OS X 10.4 and later, this
4269
* attribute is *NOT* assumed; this allows the scroll view to support
4270
* auto-hiding of the two scroll bars independently on Mac OS X 10.4
4271
* and later. If you want to preserve space for the grow box on all
4272
* systems, specify this option bit.
4274
kHIScrollViewOptionsAllowGrow = 1 shl 2;
4275
kHIScrollViewValidOptions = kHIScrollViewOptionsVertScroll or kHIScrollViewOptionsHorizScroll or kHIScrollViewOptionsAllowGrow;
4279
* HIScrollViewAction
4282
* HIScrollView navigation actions. See HIScrollViewNavigate for
4286
HIScrollViewAction = UInt32;
4289
* The scroll view should move to the top of the content.
4291
kHIScrollViewScrollToTop = 1 shl 0;
4294
* The scroll view should move to the bottom of the content.
4296
kHIScrollViewScrollToBottom = 1 shl 1;
4299
* The scroll view should move to the left of the content.
4301
kHIScrollViewScrollToLeft = 1 shl 2;
4304
* The scroll view should move to the right of the content.
4306
kHIScrollViewScrollToRight = 1 shl 3;
4309
* The scroll view should page up.
4311
kHIScrollViewPageUp = 1 shl 4;
4314
* The scroll view should page down.
4316
kHIScrollViewPageDown = 1 shl 5;
4319
* The scroll view should page left.
4321
kHIScrollViewPageLeft = 1 shl 6;
4324
* The scroll view should page right.
4326
kHIScrollViewPageRight = 1 shl 7;
4329
* HIScrollViewCreate()
4332
* Creates a scroll view. This view has 3 parts, essentially. It can
4333
* have one or two scroll bars (horizontal/vertical), and a view to
4334
* be scrolled. The view to be scrolled is merely added via
4335
* HIViewAddSubview. The scroll view will automatically connect it
4336
* up appropriately. **** THIS MAY CHANGE
4338
* Mac OS X threading:
4344
* Options for our scroll view. You must specify either a
4345
* horizontal or a vertical scroll bar. If neither is passed, an
4346
* error is returned.
4349
* The new scroll view.
4352
* An operating system result code.
4355
* Mac OS X: in version 10.2 and later in Carbon.framework
4356
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4357
* Non-Carbon CFM: not available
4359
function HIScrollViewCreate( inOptions: OptionBits; var outView: HIViewRef ): OSStatus; external name '_HIScrollViewCreate';
4360
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4364
* HIScrollViewSetScrollBarAutoHide()
4367
* Sets a scroll view's scroll bars to auto-hide when the entire
4368
* scrollable view it is managing can be fully displayed in its
4369
* bounds. This is similar to the behavior you see in the Preview
4372
* Mac OS X threading:
4378
* The view to affect.
4381
* The new auto-hide setting (true == auto-hide).
4384
* An operating system result code.
4387
* Mac OS X: in version 10.2 and later in Carbon.framework
4388
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4389
* Non-Carbon CFM: not available
4391
function HIScrollViewSetScrollBarAutoHide( inView: HIViewRef; inAutoHide: Boolean ): OSStatus; external name '_HIScrollViewSetScrollBarAutoHide';
4392
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4396
* HIScrollViewGetScrollBarAutoHide()
4399
* Gets a scroll view's current scroll bar auto-hide setting.
4401
* Mac OS X threading:
4407
* The view to examine.
4413
* Mac OS X: in version 10.2 and later in Carbon.framework
4414
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4415
* Non-Carbon CFM: not available
4417
function HIScrollViewGetScrollBarAutoHide( inView: HIViewRef ): Boolean; external name '_HIScrollViewGetScrollBarAutoHide';
4418
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4422
* HIScrollViewNavigate()
4425
* Allows you to programmatically change what portion of a scroll
4426
* view's target you are seeing. For example, you can move to the
4427
* beginning or end of a document. You can also page up, down, left
4428
* and right. In general, you should not call this from embedded
4429
* content (i.e. the scrollable view inside the scroll view). For
4430
* those cases, you should instead position yourself appropriately
4431
* and tell the scroll view you changed via the
4432
* kEventScrollableInfoChanged carbon event. This routine merely is
4433
* a programmatic way to scroll as one would by hand using the
4436
* Mac OS X threading:
4442
* The scroll view to affect.
4445
* The action to take.
4448
* A operating system status code.
4451
* Mac OS X: in version 10.3 and later in Carbon.framework
4452
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
4453
* Non-Carbon CFM: not available
4455
function HIScrollViewNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): OSStatus; external name '_HIScrollViewNavigate';
4456
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4460
* HIScrollViewCanNavigate()
4463
* Allows you to tell whether it is currently possible to navigate
4464
* somehow in a scroll view. For example, if a scroll view is
4465
* already at the top of the scrollable content, it is not possible
4466
* to navigate upward, so home and page up actions would not be
4467
* possible. You might use this function to help you update the
4468
* state of menu items or the like.
4470
* Mac OS X threading:
4476
* The view to examine.
4479
* The action to test.
4485
* Mac OS X: in version 10.3 and later in Carbon.framework
4486
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
4487
* Non-Carbon CFM: not available
4489
function HIScrollViewCanNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): Boolean; external name '_HIScrollViewCanNavigate';
4490
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4493
{==============================================================================}
4495
{ The image view is a new view starting in Mac OS 10.2. It can only be used }
4496
{ in a compositing window. Like all new HIFoo views, this view is initially }
4497
{ invisible. You must show the view after creation. }
4498
{==============================================================================}
4499
{ The HIObject class ID for the HIImageView class. }
4500
{$ifc USE_CFSTR_CONSTANT_MACROS}
4501
{$definec kHIImageViewClassID CFSTRP('com.apple.HIImageView')}
4505
kControlKindHIImageView = $696D6167 (* 'imag' *);
4508
* HIImageViewCreate()
4511
* Creates an image view. The view responds to the scrollable
4512
* interface and can be used in a scrolling view. You can pass an
4513
* image initially, or set one later.
4515
* Mac OS X threading:
4521
* An initial image, or NULL. You can set the image later via
4525
* The new image view.
4528
* An operating system result code.
4531
* Mac OS X: in version 10.2 and later in Carbon.framework
4532
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4533
* Non-Carbon CFM: not available
4535
function HIImageViewCreate( inImage: CGImageRef { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_HIImageViewCreate';
4536
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4540
kHIImageViewImageTag = $696D6167 (* 'imag' *); { CGImageRef (THIS TAG IS GOING AWAY!!! USE THE APIS BELOW!)}
4543
* HIImageViewSetOpaque()
4546
* Allows you to set whether an image view should be treated as
4547
* opaque. If this is set to true, the image view can make certain
4548
* optimizations for compositing and scrolling. The alpha-related
4549
* image view APIs are rendered useless if opacity it set to true.
4550
* An image view, when created, is transparent by default.
4552
* NOTE: In Mac OS X 10.2, this control was documented as being
4553
* opaque by default, but the implementation did not enforce that.
4554
* So in Mac OS X 10.3 and beyond, the control is transparent by
4555
* default, and you can make it opaque by calling
4556
* HIImageViewSetOpaque.
4558
* Mac OS X threading:
4564
* The image view to affect.
4567
* The new opacity setting. Pass true to indicate you want the
4568
* image to be treated as opaque.
4571
* An operating system result code.
4574
* Mac OS X: in version 10.2 and later in Carbon.framework
4575
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4576
* Non-Carbon CFM: not available
4578
function HIImageViewSetOpaque( inView: HIViewRef; inOpaque: Boolean ): OSStatus; external name '_HIImageViewSetOpaque';
4579
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4583
* HIImageViewIsOpaque()
4586
* Allows you to determine whether an image view is opaque or not.
4588
* Mac OS X threading:
4594
* The image view to query.
4597
* A boolean result, where true indicates the image view is opaque.
4600
* Mac OS X: in version 10.2 and later in Carbon.framework
4601
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4602
* Non-Carbon CFM: not available
4604
function HIImageViewIsOpaque( inView: HIViewRef ): Boolean; external name '_HIImageViewIsOpaque';
4605
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4609
* HIImageViewSetAlpha()
4612
* Allows you to set the alpha for an image, making it more or less
4613
* transparent. An alpha of 1.0 is fully opaque, and 0.0 is fully
4614
* transparent. The default alpha for an image is 1.0.
4616
* Mac OS X threading:
4622
* The image view to affect.
4625
* The new alpha value.
4628
* An operating system result code.
4631
* Mac OS X: in version 10.2 and later in Carbon.framework
4632
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4633
* Non-Carbon CFM: not available
4635
function HIImageViewSetAlpha( inView: HIViewRef; inAlpha: Float32 ): OSStatus; external name '_HIImageViewSetAlpha';
4636
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4640
* HIImageViewGetAlpha()
4643
* Allows you to get the alpha for an image. An alpha of 1.0 is
4644
* fully opaque, and 0.0 is fully transparent.
4646
* Mac OS X threading:
4652
* The image view to query.
4655
* A floating point number representing the alpha from 0.0 through
4659
* Mac OS X: in version 10.2 and later in Carbon.framework
4660
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4661
* Non-Carbon CFM: not available
4663
function HIImageViewGetAlpha( inView: HIViewRef ): Float32; external name '_HIImageViewGetAlpha';
4664
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4668
* HIImageViewSetScaleToFit()
4671
* Normally an image view will clip to the view's bounds. Using this
4672
* API, you can instead tell the image view to size the image to fit
4673
* into the view bounds specified.
4675
* Mac OS X threading:
4681
* The image view to affect.
4684
* A boolean indicating whether the image should be scaled to fit
4685
* the view bounds (true) or merely clip to the view bounds
4689
* An operating system status code.
4692
* Mac OS X: in version 10.2 and later in Carbon.framework
4693
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4694
* Non-Carbon CFM: not available
4696
function HIImageViewSetScaleToFit( inView: HIViewRef; inScaleToFit: Boolean ): OSStatus; external name '_HIImageViewSetScaleToFit';
4697
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4701
* HIImageViewGetScaleToFit()
4704
* Returns whether or not an image view will scale the image it
4705
* displays to the view bounds or merely clip to the view bounds. A
4706
* true result means it scales.
4708
* Mac OS X threading:
4714
* The image view to query.
4720
* Mac OS X: in version 10.2 and later in Carbon.framework
4721
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4722
* Non-Carbon CFM: not available
4724
function HIImageViewGetScaleToFit( inView: HIViewRef ): Boolean; external name '_HIImageViewGetScaleToFit';
4725
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4729
* HIImageViewSetImage()
4732
* Sets the image to display in an image view. The image passed in
4733
* is retained by the view, so you may release the image after
4734
* calling this API if you no longer need to reference it.
4736
* Mac OS X threading:
4742
* The image view to affect.
4748
* An operating system status code.
4751
* Mac OS X: in version 10.2 and later in Carbon.framework
4752
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4753
* Non-Carbon CFM: not available
4755
function HIImageViewSetImage( inView: HIViewRef; inImage: CGImageRef { can be NULL } ): OSStatus; external name '_HIImageViewSetImage';
4756
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4760
* HIImageViewCopyImage()
4763
* Gets the image for an image view. If there is no image set on the
4764
* view, or the view ref is invalid, NULL is returned. The image is
4765
* retained, so you should take care to release it when you are
4768
* Mac OS X threading:
4774
* The image view to query.
4777
* A CoreGraphics (Quartz) image ref.
4780
* Mac OS X: in version 10.2 and later in Carbon.framework
4781
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4782
* Non-Carbon CFM: not available
4784
function HIImageViewCopyImage( inView: HIViewRef ): CGImageRef; external name '_HIImageViewCopyImage';
4785
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4788
{==============================================================================}
4790
{ The combo box is a new view starting in Mac OS 10.2. It can be used in }
4791
{ both the new compositing mode, as well as the traditional control manager }
4792
{ mode. Like all new HIFoo views, this view is created invisible. You must }
4793
{ show the view after creation if you want to, like, see it and stuff. }
4794
{==============================================================================}
4795
{ The HIObject class ID for the HIComboBox class. }
4796
{$ifc USE_CFSTR_CONSTANT_MACROS}
4797
{$definec kHIComboBoxClassID CFSTRP('com.apple.HIComboBox')}
4800
kEventClassHIComboBox quick reference:
4802
kEventComboBoxListItemSelected = 1
4805
kEventClassHIComboBox = $68696362 (* 'hicb' *);
4808
kEventParamComboBoxListSelectedItemIndex = $63626C69 (* 'cbli' *);
4811
* kEventClassHIComboBox / kEventComboBoxListItemSelected
4814
* Notification that an item in the ComboBox disclosure list has
4818
* This event is sent as a notification when an item in the ComboBox
4819
* disclosure list has been selected. This event is sent to all
4820
* handlers installed on the control. This does not imply that the
4821
* selection has been accepted; for that you will need to register
4822
* for the kEventClassTextField/kEventTextAccepted event; you can
4823
* register for that event in order to make live selections however.
4825
* Mac OS X threading:
4830
* --> kEventParamDirectObject (in, typeControlRef)
4831
* The ComboBox view that has sent the notification.
4833
* --> kEventParamComboBoxListSelectedItemIndex (in, typeCFIndex)
4834
* The index of the combo box list item that has been selected.
4837
* Mac OS X: in version 10.4 and later in Carbon.framework
4838
* CarbonLib: not available
4841
kEventComboBoxListItemSelected = 1;
4846
* ComboBox attributes
4850
* A constant with value zero; the lack of any attributes.
4852
kHIComboBoxNoAttributes = 0;
4855
* The control will attempt to auto complete the text the user is
4856
* typing with an item in the ComboBox list that is the closest
4857
* appropriate match.
4859
kHIComboBoxAutoCompletionAttribute = 1 shl 0;
4862
* The control will disclose the ComboBox list after the user enters
4865
kHIComboBoxAutoDisclosureAttribute = 1 shl 1;
4868
* The items in the ComboBox list will be automatically sorted in
4869
* alphabetical order.
4871
kHIComboBoxAutoSortAttribute = 1 shl 2;
4874
* The ComboBox list will be automatically sized to fit the Human
4875
* Interface Guidelines.
4877
kHIComboBoxAutoSizeListAttribute = 1 shl 3;
4880
* The minimum set of ComboBox attributes commonly used.
4882
kHIComboBoxStandardAttributes = kHIComboBoxAutoCompletionAttribute or kHIComboBoxAutoDisclosureAttribute or kHIComboBoxAutoSizeListAttribute;
4886
kControlKindHIComboBox = $63626278 (* 'cbbx' *);
4888
{ ComboBox Part codes}
4890
kHIComboBoxEditTextPart = 5;
4891
kHIComboBoxDisclosurePart = 28;
4894
The ComboBox view supports these tags previously defined for the EditUnicodeText control.
4895
These tags are available through Get/SetControlData with a ControlPartCode of kHIComboBoxEditTextPart:
4897
kControlFontStyleTag
4898
kControlEditTextFixedTextTag
4899
kControlEditTextTextTag
4900
kControlEditTextKeyFilterTag
4901
kControlEditTextValidationProcTag
4902
kControlEditUnicodeTextPostUpdateProcTag
4903
kControlEditTextSelectionTag
4904
kControlEditTextKeyScriptBehaviorTag
4905
kControlEditTextCharCount
4906
kControlEditTextCFStringTag
4911
* ComboBox ControlData tags available with Mac OS X 10.2 and later.
4915
* Extract the contents of the ComboBox list as a CFArray. The
4916
* CFArray will be retained: if you get the array, you own it and
4917
* will be required to release it; if you set it the toolbox makes a
4918
* copy of it and you are free to release your reference.
4920
kHIComboBoxListTag = $63626C73 (* 'cbls' *); { CFArrayRef; bumps the refCount on get/retains on set}
4923
* The width of the ComboBox list. This can be customized. This
4924
* disables the autosize attribute.
4926
kHIComboBoxListPixelWidthTag = $63626C77 (* 'cblw' *); { UInt32 }
4929
* The height of the ComboBox list. This can be customized. This
4930
* disables the autosize attribute.
4932
kHIComboBoxListPixelHeightTag = $63626C68 (* 'cblh' *); { UInt32}
4935
* The number of visible items in the list. This can be customized.
4936
* This disables the autosize attribute.
4938
kHIComboBoxNumVisibleItemsTag = $63626E69 (* 'cbni' *); { UInt32}
4941
* HIComboBoxCreate()
4944
* Creates a combo box control. The new control is initially
4947
* Mac OS X threading:
4953
* The bounding box of the control.
4956
* The default text in the editable portion of the control. Can be
4960
* The font style of the both editable text and the text in the
4961
* disclosure list. Can be NULL.
4964
* The default values available in the disclosure list. Can be
4968
* The default attributes of the combo box.
4971
* On exit, contains the new control.
4974
* Mac OS X: in version 10.2 and later in Carbon.framework
4975
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4976
* Non-Carbon CFM: not available
4978
function HIComboBoxCreate( const (*var*) boundsRect: HIRect; text: CFStringRef { can be NULL }; {const} style: ControlFontStyleRecPtr { can be NULL }; list: CFArrayRef { can be NULL }; inAttributes: OptionBits; var outComboBox: HIViewRef ): OSStatus; external name '_HIComboBoxCreate';
4979
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4983
* HIComboBoxGetItemCount()
4986
* Get the number of items in the combo box disclosure list.
4988
* Mac OS X threading:
4997
* The number of items in the combo box disclosure list.
5000
* Mac OS X: in version 10.2 and later in Carbon.framework
5001
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
5002
* Non-Carbon CFM: not available
5004
function HIComboBoxGetItemCount( inComboBox: HIViewRef ): ItemCount; external name '_HIComboBoxGetItemCount';
5005
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5009
* HIComboBoxInsertTextItemAtIndex()
5012
* Inserts a CFString in the disclosure list
5014
* Mac OS X threading:
5020
* The combo box whose disclosure list the text will be inserted
5024
* The index that the text should be inserted in. If the index
5025
* does not fall within the number of items in the combo box list,
5026
* it will be appended to the end of the list.
5029
* The text item to be inserted in the combo box disclosure list.
5032
* An operating system status code.
5035
* Mac OS X: in version 10.2 and later in Carbon.framework
5036
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
5037
* Non-Carbon CFM: not available
5039
function HIComboBoxInsertTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; inText: CFStringRef ): OSStatus; external name '_HIComboBoxInsertTextItemAtIndex';
5040
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5044
* HIComboBoxAppendTextItem()
5047
* Appends a text item to the combo box disclosure list.
5049
* Mac OS X threading:
5055
* The combo box whose disclosure list the text will be appended
5059
* The text item to be appended to the combo box disclosure list.
5062
* On exit, the index of the new item. Can be NULL if the caller
5063
* does not require this information.
5066
* An operating system status code.
5069
* Mac OS X: in version 10.2 and later in Carbon.framework
5070
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
5071
* Non-Carbon CFM: not available
5073
function HIComboBoxAppendTextItem( inComboBox: HIViewRef; inText: CFStringRef; outIndex: CFIndexPtr { can be NULL } ): OSStatus; external name '_HIComboBoxAppendTextItem';
5074
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5078
* HIComboBoxCopyTextItemAtIndex()
5081
* Copy the text from the combo box disclosure list
5083
* Mac OS X threading:
5089
* The combo box that contains the text item you would like to
5093
* The index of the text item. Will return paramErr if the index
5094
* is out of bounds of the combo box list.
5097
* A copy of the string at the given index. Remember this is now
5098
* your copy that you will need to release.
5101
* An operating system status code.
5104
* Mac OS X: in version 10.2 and later in Carbon.framework
5105
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
5106
* Non-Carbon CFM: not available
5108
function HIComboBoxCopyTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; var outString: CFStringRef ): OSStatus; external name '_HIComboBoxCopyTextItemAtIndex';
5109
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5113
* HIComboBoxRemoveItemAtIndex()
5116
* Remove an item from a combo box disclosure list.
5118
* Mac OS X threading:
5124
* The combo box that contains the disclosure list that you would
5125
* like to remove an item from.
5128
* The index of the item to remove.
5131
* An operating system status code.
5134
* Mac OS X: in version 10.2 and later in Carbon.framework
5135
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
5136
* Non-Carbon CFM: not available
5138
function HIComboBoxRemoveItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex ): OSStatus; external name '_HIComboBoxRemoveItemAtIndex';
5139
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5143
* HIComboBoxChangeAttributes()
5146
* Change the attributes of a combo box
5148
* Mac OS X threading:
5154
* The combo box whose attributes you would like to change.
5156
* inAttributesToSet:
5157
* The attributes to set.
5159
* inAttributesToClear:
5160
* The attributes to clear.
5163
* An operating system status code.
5166
* Mac OS X: in version 10.2 and later in Carbon.framework
5167
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
5168
* Non-Carbon CFM: not available
5170
function HIComboBoxChangeAttributes( inComboBox: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HIComboBoxChangeAttributes';
5171
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5175
* HIComboBoxGetAttributes()
5178
* Get the attributes of a combo box.
5180
* Mac OS X threading:
5186
* The combo box whose attributes you would like to obtain.
5189
* The attributes of the combo box.
5192
* An operating system status code.
5195
* Mac OS X: in version 10.2 and later in Carbon.framework
5196
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
5197
* Non-Carbon CFM: not available
5199
function HIComboBoxGetAttributes( inComboBox: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HIComboBoxGetAttributes';
5200
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5204
* HIComboBoxIsListVisible()
5207
* Returns whether the combo box list is currently disclosed.
5209
* Mac OS X threading:
5215
* The combo box whose list visibility you would like to obtain.
5218
* A boolean value indicating whether the combo box list is
5219
* disclosed (true) or hidden (false).
5222
* Mac OS X: in version 10.4 and later in Carbon.framework
5223
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5224
* Non-Carbon CFM: not available
5226
function HIComboBoxIsListVisible( inComboBox: HIViewRef ): Boolean; external name '_HIComboBoxIsListVisible';
5227
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5231
* HIComboBoxSetListVisible()
5234
* Hides or shows the combo box list.
5236
* Mac OS X threading:
5242
* The combo box whose list will be hidden or shown.
5245
* A boolean value indicating whether you wish to hide the list
5246
* (false) or show the list (true).
5249
* An operating system result code.
5252
* Mac OS X: in version 10.4 and later in Carbon.framework
5253
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5254
* Non-Carbon CFM: not available
5256
function HIComboBoxSetListVisible( inComboBox: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIComboBoxSetListVisible';
5257
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5260
{==============================================================================}
5262
{ HISearchField is a new view available in Mac OS X 10.3. }
5263
{ This view is designed to be used for applications that provide searching }
5264
{ functionality. Visually, it is a standard text field optionally adorned }
5265
{ with a search icon on the left and/or a cancel image on the right. }
5266
{ When the user has accepted the text by pressing the return or enter key }
5267
{ a Carbon Event of kEventClassTextField / kEventTextAccepted will be sent }
5268
{ to the control. This will be the indication that the search should begin. }
5269
{ This control will also respond to all the standard control tags that are }
5270
{ used by the EditUnicodeText control. }
5271
{==============================================================================}
5272
{ The HIObject class ID for the HISearchField class. }
5273
{$ifc USE_CFSTR_CONSTANT_MACROS}
5274
{$definec kHISearchFieldClassID CFSTRP('com.apple.HISearchField')}
5278
kControlKindHISearchField = $73726664 (* 'srfd' *);
5280
{ HISearchField part codes}
5282
kControlSearchFieldCancelPart = 30;
5283
kControlSearchFieldMenuPart = 31;
5286
The SearchField view supports those tags previously defined for the EditUnicodeText control.
5287
These tags are available through Get/SetControlData with ControlPartCode of kControlEditTextPart:
5289
kControlFontStyleTag
5290
kControlEditTextFixedTextTag
5291
kControlEditTextTextTag
5292
kControlEditTextKeyFilterTag
5293
kControlEditTextValidationProcTag
5294
kControlEditUnicodeTextPostUpdateProcTag
5295
kControlEditTextSelectionTag
5296
kControlEditTextKeyScriptBehaviorTag
5297
kControlEditTextCharCount
5298
kControlEditTextCFStringTag
5303
* HISearchField attributes
5307
* A constant with value zero; the lack of any attributes.
5309
kHISearchFieldNoAttributes = 0;
5312
* This view contains the cancel icon in the text field.
5314
kHISearchFieldAttributesCancel = 1 shl 0;
5317
* This view contains the search icon in the text field. If a menu is
5318
* associated with the search field, this attribute is implicitly set
5319
* and the search icon will display with a menu disclosure badge.
5320
* Available in Mac OS X 10.4 and later.
5322
kHISearchFieldAttributesSearchIcon = 1 shl 1;
5326
kEventClassSearchField = $73726664 (* 'srfd' *);
5329
* kEventClassSearchField / kEventSearchFieldCancelClicked
5332
* Notification that the cancel icon has been depressed.
5335
* This event is sent by the HISearchField view if the cancel icon
5336
* is enabled (attribute of kHISearchFieldAtttributesCancel), and
5337
* the cancel has been clicked.
5339
* Mac OS X threading:
5344
* --> kEventParamDirectObject (in, typeControlRef)
5345
* The HISearchField that has sent the notification.
5348
* Mac OS X: in version 10.3 and later in Carbon.framework
5349
* CarbonLib: not available
5352
kEventSearchFieldCancelClicked = 1;
5355
* kEventClassSearchField / kEventSearchFieldSearchClicked
5358
* Notification that the search icon has been depressed.
5361
* This event is sent by the HISearchField view if the search icon
5362
* is enabled (attribute of kHISearchFieldAttributesSearchIcon or a
5363
* menu is associated with the search field), and the search icon
5364
* has been clicked. If a menu is associated with the search field,
5365
* the search field will handle the display and tracking of the menu
5366
* by default. This event is sent to the search field only, it will
5369
* Mac OS X threading:
5374
* --> kEventParamDirectObject (in, typeControlRef)
5375
* The HISearchField that has sent the notification.
5378
* Mac OS X: in version 10.4 and later in Carbon.framework
5379
* CarbonLib: not available
5382
kEventSearchFieldSearchClicked = 2;
5385
* HISearchFieldCreate()
5388
* Creates a search field control. The new control is initially
5391
* Mac OS X threading:
5397
* The initial bounds of the view. If this parameter is NULL, the
5398
* view defaults to have empty bounds ( 0, 0, 0, 0 ).
5401
* The initial attributes of the search field. Indicates whether
5402
* the field should contain the cancel icon.
5405
* The menu to be associated with this search field. If
5406
* inSearchMenu is non-NULL, it will be retained by the search
5407
* field and the search icon will be enabled in the left side of
5408
* the text field. If this parameter is NULL, the view will not
5409
* display the search icon in the left portion of the text field.
5410
* You are expected to install handlers on this menu to handle the
5411
* visual appearance of the menu (for example, to draw check marks
5412
* or enable items when the menu receives the
5413
* kEventMenuEnableItems Carbon Event), and to keep track of what
5414
* action should be performed by associating HICommands with each
5415
* menu item and installing a handler for the (
5416
* kEventClassCommand, kEventCommandProcess ) Carbon Event.
5418
* inDescriptiveText:
5419
* The text to be displayed in the text field when the field does
5420
* not have focus and contains no user entered text. This is meant
5421
* to be an indication of what the search criteria is. For
5422
* example, you may wish to identify to the user that the search
5423
* will cover the "Subject" or "Contents" of a selected range of
5424
* items. If inDescriptiveText is non-NULL it will be retained by
5428
* On exit, contains the new view.
5431
* An operating system status code.
5434
* Mac OS X: in version 10.3 and later in Carbon.framework
5435
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5436
* Non-Carbon CFM: not available
5438
function HISearchFieldCreate( {const} inBounds: HIRectPtr { can be NULL }; inAttributes: OptionBits; inSearchMenu: MenuRef { can be NULL }; inDescriptiveText: CFStringRef { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISearchFieldCreate';
5439
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5443
* HISearchFieldSetSearchMenu()
5446
* Set the search menu associated with the view.
5448
* Mac OS X threading:
5454
* The search field to associate the search menu with.
5457
* The menu to associate with the search field. If there is
5458
* already a menu associated with the search field, that menu will
5459
* be released. If inSearchMenu is non-NULL, it will be retained
5460
* by the search field and the search icon will be enabled in the
5461
* left side of the text field. You are expected to install
5462
* handlers on this menu to handle the visual appearance of the
5463
* menu (for example, to draw check marks or enable items when the
5464
* menu receives the kEventMenuEnableItems Carbon Event), and to
5465
* keep track of what action should be performed by associating
5466
* HICommands with each menu item and installing a handler for the
5467
* ( kEventClassCommand, kEventCommandProcess ) Carbon Event. If
5468
* inSearchMenu is NULL, the search icon will be removed from the
5469
* left side of the text field and no menu will be associated with
5473
* An operating system status code.
5476
* Mac OS X: in version 10.3 and later in Carbon.framework
5477
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5478
* Non-Carbon CFM: not available
5480
function HISearchFieldSetSearchMenu( inSearchField: HIViewRef; inSearchMenu: MenuRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetSearchMenu';
5481
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5485
* HISearchFieldGetSearchMenu()
5488
* Get the menu that is associated with the search field
5490
* Mac OS X threading:
5496
* The search field you wish to retrieve the search menu from.
5499
* On exit, will contain the menu that is associated with search
5500
* field. The menu will _not_ be retained on output and this
5501
* parameter cannot be NULL.
5504
* An operating system status code.
5507
* Mac OS X: in version 10.3 and later in Carbon.framework
5508
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5509
* Non-Carbon CFM: not available
5511
function HISearchFieldGetSearchMenu( inSearchField: HIViewRef; var outSearchMenu: MenuRef ): OSStatus; external name '_HISearchFieldGetSearchMenu';
5512
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5516
* HISearchFieldChangeAttributes()
5519
* Set the attributes for the given search field.
5521
* Mac OS X threading:
5527
* The search field to change the attributes of.
5529
* inAttributesToSet:
5530
* The attributes to set.
5532
* inAttributesToClear:
5533
* The attributes to clear.
5536
* An operating system status code.
5539
* Mac OS X: in version 10.3 and later in Carbon.framework
5540
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5541
* Non-Carbon CFM: not available
5543
function HISearchFieldChangeAttributes( inSearchField: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISearchFieldChangeAttributes';
5544
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5548
* HISearchFieldGetAttributes()
5551
* Returns the attributes of the search field.
5553
* Mac OS X threading:
5559
* The search field to get the attributes of.
5562
* On exit, will contain the attributes of the search field. This
5563
* parameter cannot be NULL.
5566
* An operating system status code.
5569
* Mac OS X: in version 10.3 and later in Carbon.framework
5570
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5571
* Non-Carbon CFM: not available
5573
function HISearchFieldGetAttributes( inSearchField: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HISearchFieldGetAttributes';
5574
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5578
* HISearchFieldSetDescriptiveText()
5581
* Set the description of the search action of the search field.
5583
* Mac OS X threading:
5589
* The search field to change the description of.
5592
* The new description for the search field. If the search field
5593
* contains a description, it will be released. If inDescription
5594
* is non-NULL, it will be retained by the search field. If it is
5595
* NULL, no description will be associated with the search field.
5598
* An operating system status code.
5601
* Mac OS X: in version 10.3 and later in Carbon.framework
5602
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5603
* Non-Carbon CFM: not available
5605
function HISearchFieldSetDescriptiveText( inSearchField: HIViewRef; inDescription: CFStringRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetDescriptiveText';
5606
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5610
* HISearchFieldCopyDescriptiveText()
5613
* Get the description that is associated with the search field.
5615
* Mac OS X threading:
5621
* The search field you wish to retrieve the description from.
5624
* On exit, will contain the description that is associated with
5625
* the search field. This parameter cannot be NULL. If there is no
5626
* description associated with the search field, outDescription
5627
* will be set to NULL. If there is a description, a CFStringRef
5628
* will be created that contains the contents of the description.
5629
* You posess ownership of this string and will need to release it
5630
* when you no longer need it.
5633
* An operating system status code.
5636
* Mac OS X: in version 10.3 and later in Carbon.framework
5637
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5638
* Non-Carbon CFM: not available
5640
function HISearchFieldCopyDescriptiveText( inSearchField: HIViewRef; var outDescription: CFStringRef ): OSStatus; external name '_HISearchFieldCopyDescriptiveText';
5641
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5644
{==============================================================================}
5645
{ Text field events }
5646
{ A text field is the part of some controls that you can enter text into. }
5647
{ A text field is common to the EditText, EditUnicodeText, ComboBox, }
5648
{ HISearchField, and HITextView views. The kEventClassTextField event allows }
5649
{ you to receive notifications when the text has been accepted by the user. }
5650
{ For example, you can install a handler for a }
5651
{ kEventClassTextField / kEventTextAccepted event on a HISearchField view to }
5652
{ receive a notification that the user has initiated a search by hitting the }
5653
{ return or enter key. You can also filter the text that will replace a }
5654
{ selection before the change has been made to either accept or reject the }
5656
{==============================================================================}
5658
kEventClassTextField quick reference:
5660
kEventTextAccepted = 1,
5661
kEventTextShouldChangeInRange = 2,
5662
kEventTextDidChange = 3
5665
kEventClassTextField = $74786664 (* 'txfd' *);
5668
kEventParamTextSelection = $7478736C (* 'txsl' *); { typeCFRange}
5669
kEventParamCandidateText = $74737478 (* 'tstx' *); { typeCFStringRef}
5670
kEventParamReplacementText = $74727478 (* 'trtx' *); { typeCFStringRef}
5671
kEventParamUnconfirmedRange = $74756E72 (* 'tunr' *); { typeCFRange}
5672
kEventParamUnconfirmedText = $7478756E (* 'txun' *); { typeCFStringRef}
5675
* kEventClassTextField / kEventTextAccepted
5678
* Notification that the text in a control's editable text field has
5682
* This event is sent as a notification when the text contained in a
5683
* control's editable text field has been accepted by the user. Text
5684
* is accepted when the user presses return or enter on the keyboard
5685
* for the EditUnicodeText, HIComboBox, and HISearchField controls,
5686
* or when the text has changed in the field and the field loses
5687
* focus for the EditUnicodeText, HIComboBox, HISearchField and
5688
* HITextView controls.
5690
* This event is sent to the control containing the text field only,
5691
* it will not propagate. It is sent to all handlers installed on
5692
* the control containing the text field.
5694
* Mac OS X threading:
5699
* --> kEventParamDirectObject (in, typeControlRef)
5700
* The editable text field that has sent the notification.
5703
* Mac OS X: in version 10.3 and later in Carbon.framework
5704
* CarbonLib: not available
5707
kEventTextAccepted = 1;
5710
* kEventClassTextField / kEventTextShouldChangeInRange
5713
* Returns whether the text should be changed in editable text
5717
* There are several editable text field views, such as the
5718
* HIComboBox, HISearchField, HITextView, and EditUnicodeText
5719
* controls. There are times when you may require fine-grained
5720
* control over what text is inserted into the text field and either
5721
* accept the changes, reject them or modify what is to be entered.
5722
* This event is sent whenever the text is about to be modified in a
5723
* text field, either by user input or in other scenarios such as a
5724
* paste from the clipboard, spell-checking word correction, or Mac
5725
* OS X Service operation. You can change what text is inserted by
5726
* providing a replacement string as a parameter to this event. This
5727
* event is only sent for Unicode text controls; it is not sent for
5728
* the classic non-Unicode EditText control.
5730
* This event is not sent prior to programmatic modification of the
5731
* text field contents using SetControlData.
5733
* This event is not sent while an active inline editing session is
5734
* in progress. Once the inline text has been confirmed, this event
5735
* will be sent prior to the confirmed text being inserted into the
5736
* text field. If you need control over keystrokes during an inline
5737
* editing session, you can use the kEventTextInputFilterText event.
5740
* This event is sent to the control containing the text field only;
5741
* it will not propagate.
5743
* Mac OS X threading:
5748
* --> kEventParamTextSelection (in, typeCFRange)
5749
* The range of the selection that is about to be changed. The
5750
* units of the selection are in the same units that are
5751
* returned in a EditTextSelectionRec, when called with
5752
* GetControlData using kControlEditTextSelectionTag.
5754
* --> kEventParamCandidateText (in, typeCFStringRef)
5755
* The text that is going to replace the selection. Note that
5756
* this string was originally created with
5757
* CFStringCreateWithCharactersNoCopy, and the original text
5758
* has a limited lifespan. If for some reason you need to
5759
* retain the text past the end of your event handler, you
5760
* should extract the characters from the string with
5761
* CFStringGetCharacters, and then store those characters or
5762
* create a new CFString from them.
5764
* <-- kEventParamReplacementText (out, typeCFStringRef)
5765
* On output, can contain optional replacement text.
5768
* If noErr is returned from your handler and the
5769
* kEventParamReplacementText parameter is added to the event, then
5770
* the contents of that parameter, rather than the candidate text,
5771
* will be added to the text field.
5773
* If noErr is returned from your handler and the
5774
* kEventParamReplacementText parameter is _not_ added to the event,
5775
* then the candidate text will be filtered out and no text will be
5776
* entered in the text field. The current selection will be deleted,
5779
* If userCanceledErr is returned from your handler, then no text
5780
* will be entered in the text field and the current selection will
5781
* remain unchanged. Effectively, the editing operation will be
5784
* If eventNotHandledErr is returned from your handler, the contents
5785
* of the kEventParamReplacementText parameter are ignored, and the
5786
* candidate text will replace the selection.
5788
* Any other return value will result in the default behavior, as if
5789
* eventNotHandledErr had been returned.
5792
* Mac OS X: in version 10.4 and later in Carbon.framework
5793
* CarbonLib: not available
5796
kEventTextShouldChangeInRange = 2;
5799
* kEventClassTextField / kEventTextDidChange
5802
* Indicates that the contents of an editable text field have
5806
* This event is sent by all of the Unicode-based editable text
5807
* views: HIComboBox, HISearchField, HITextView and EditUnicodeText.
5808
* This event is not sent for the classic non-Unicode EditText
5811
* Note that this event is sent after inline editing operations,
5812
* such as pressing a dead key, or using a input method that creates
5813
* an inline editing hole. Most clients of this event should ignore
5814
* the event during inline editing, and only respond to changes to
5815
* the text after inline editing completes. A client can check for
5816
* the presence of the kEventParamUnconfirmedRange parameter to
5817
* determine whether inline editing is currently active; if this
5818
* parameter is present, the client may wish to ignore the event.
5821
* This event is not sent after programmatic modification of the
5822
* text field contents using SetControlData.
5824
* This event is sent only to the control containing the text field;
5825
* it will not propagate. It is sent to all handlers registered for
5828
* Mac OS X threading:
5833
* --> kEventParamUnconfirmedRange (in, typeCFRange)
5834
* If the text field currently has an open inline hole, this
5835
* parameter contains the range of text inside the hole. This
5836
* parameter is optional and is only present during inline
5839
* --> kEventParamUnconfirmedText (in, typeCFStringRef)
5840
* If the text field currently has an open inline hole, this
5841
* parameter contains the non-confirmed text currently being
5842
* edited inside the hole. This parameter is optional and is
5843
* only present during inline editing. Note that this string
5844
* was originally created with
5845
* CFStringCreateWithCharactersNoCopy, and the original text
5846
* has a limited lifespan. If for some reason you need to
5847
* retain the text past the end of your event handler, you
5848
* should extract the characters from the string with
5849
* CFStringGetCharacters, and then store those characters or
5850
* create a new CFString from them.
5853
* Mac OS X: in version 10.4 and later in Carbon.framework
5854
* CarbonLib: not available
5857
kEventTextDidChange = 3;
5859
{==============================================================================}
5861
{ HIMenuView and HIStandardMenuView are new views available in Mac OS X 10.3. }
5862
{ HIMenuView is intended for use as a base class for custom menu item views; }
5863
{ it does not draw or handle events itself, but provides useful functionality }
5864
{ that all menu views need to implement. HIStandardMenuView is the standard }
5865
{ HIView used by the Menu Manager to draw menu item content, beginning with }
5866
{ Mac OS X 10.3. It can also be subclassed by custom menu item views. }
5867
{ Both of these views are meant to be used only in compositing windows. }
5868
{ Because HIMenuView and HIStandardMenuView are not typically created }
5869
{ directly by applications, no API is provided to create instances of these }
5870
{ views. If you need to create an instance of either view, you can use }
5872
{==============================================================================}
5873
{ the HIObject class ID for the HIMenuView class}
5874
{$ifc USE_CFSTR_CONSTANT_MACROS}
5875
{$definec kHIMenuViewClassID CFSTRP('com.apple.HIMenuView')}
5877
{ the HIObject class ID for the standard menu HIView class}
5878
{$ifc USE_CFSTR_CONSTANT_MACROS}
5879
{$definec kHIStandardMenuViewClassID CFSTRP('com.apple.HIStandardMenuView')}
5881
{ Control Kinds (only used in Mac OS X 10.4 and later)}
5883
kControlKindHIMenuView = $6D656E75 (* 'menu' *);
5884
kControlKindHIStandardMenuView = $736D6E75 (* 'smnu' *);
5887
The kEventHIObjectInitialize event for HIMenuView and HIStandardMenuView is expected to contain
5888
the following parameters. Be sure to include these parameters in the init event if you create an
5889
instance of these views with HIObjectCreate.
5891
--> kEventParamMenuRef (in, typeMenuRef)
5892
The menu that the view should draw.
5895
* kHIViewMenuContentID
5898
* The HIViewID for the menu content view. The Menu Manager assigns
5899
* this view ID to all menu content views.
5901
* Mac OS X threading:
5905
* Mac OS X: in version 10.4 and later in Carbon.framework
5906
* CarbonLib: not available
5907
* Non-Carbon CFM: not available
5909
var kHIViewMenuContentID: HIViewID; external name '_kHIViewMenuContentID'; (* attribute const *)
5910
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5912
* HIMenuViewGetMenu()
5915
* Returns the MenuRef that is associated with an HIView that is a
5916
* subclass of HIMenuView.
5919
* An HIMenuView subclass might use this API to determine the menu
5920
* that it should draw.
5922
* Mac OS X threading:
5928
* The view whose menu to return.
5931
* The MenuRef associated with the HIView, or NULL if an HIView is
5932
* passed that is not a subclass of HIMenuView.
5935
* Mac OS X: in version 10.3 and later in Carbon.framework
5936
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5937
* Non-Carbon CFM: not available
5939
function HIMenuViewGetMenu( inView: HIViewRef ): MenuRef; external name '_HIMenuViewGetMenu';
5940
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5944
* HIMenuGetContentView()
5947
* Returns the HIViewRef that will be used to draw menu content for
5948
* this menu, if any.
5951
* If the content view has not yet been created, the Menu Manager
5952
* will create the content view using the view class ID and
5953
* initialization event associated with the menu. Note that the menu
5954
* content view is not the same as the window content view; the menu
5955
* content view is embedded inside the window content view. If the
5956
* menu uses an MDEF instead of an HIView to draw its content, noErr
5957
* is returned but the output HIViewRef is set to NULL.
5959
* Mac OS X threading:
5968
* The type of menu for which the menu content view should be
5969
* returned. The same MenuRef may have multiple content views,
5970
* depending on the menu type being displayed.
5973
* On exit, contains the view. May be set to NULL if the menu does
5974
* not use an HIView to draw its content. The caller should not
5975
* release this view.
5978
* Mac OS X: in version 10.3 and later in Carbon.framework
5979
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5980
* Non-Carbon CFM: not available
5982
function HIMenuGetContentView( inMenu: MenuRef; inMenuType: ThemeMenuType; var outView: HIViewRef ): OSStatus; external name '_HIMenuGetContentView';
5983
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5986
{==============================================================================}
5988
{ HISegmentedView is a new view available in Mac OS X 10.3. }
5989
{ Examples of the segmented view are the Finder's icon/column/list view }
5990
{ switcher, and the back/forward buttons in Open panels. }
5991
{ The segmented view operates as a group of buttons, each of which can be }
5992
{ configured with different behaviors and content. }
5993
{ Accessibility Notes: Those of you who wish to customize the accessibility }
5994
{ information provided for individual segments of the segmented view -- by }
5995
{ handling various kEventClassAccessibility Carbon Events, by calling }
5996
{ HIObjectSetAuxiliaryAccessibilityAttribute, etc. -- need to know how to }
5997
{ interpret and/or build AXUIElementRefs that represent individual segments. }
5998
{ The AXUIElement representing an individual segment will/must be constructed }
5999
{ using the segmented view's HIViewRef and the UInt64 identifier of the }
6000
{ one-based index of the segment the element refers to. As usual, a UInt64 }
6001
{ identifier of zero represents the segmented view as a whole. You must }
6002
{ neither interpret nor create segmented view elements whose identifiers are }
6003
{ greater than the count of segments in the segmented view. }
6004
{==============================================================================}
6005
{ The HIObject class ID for the HISegmentedView class. }
6006
{$ifc USE_CFSTR_CONSTANT_MACROS}
6007
{$definec kHISegmentedViewClassID CFSTRP('com.apple.HISegmentedView')}
6011
kHISegmentedViewKind = $73676D74 (* 'sgmt' *);
6014
* HISegmentedViewCreate()
6017
* Creates a segmented view. This is the type of view you would use
6018
* to implement the icon/column/list view switcher as seen in the
6019
* Finder. After creating a segmented view, you need to set the
6020
* number of segments via HISegmentedViewSetSegmentCount. Each
6021
* segment can be configured independently with via the other
6022
* HISegmentedView APIs. Changing the number of segments and
6023
* configuring each segment will change the appearance of the
6024
* segmented view. After you configure the view, you may want to
6025
* call GetBestControlRect on the view and resize it so the content
6026
* will fit optimally. The value of the whole segmented view
6027
* corresponds to the index of the currently selected segment with
6028
* the radio behavior. If you set the value of the whole segmented
6029
* view to n via SetControl32BitValue, every radio-behavior segment
6030
* will have its value set to zero except for the segment at index
6031
* n; if segment n also has the radio behavior, it will have its
6032
* value set to one. When a radio-behavior segment is clicked, the
6033
* value of the whole segmented view will be set to the segment's
6034
* index. The segmented view works in both compositing and
6035
* non-compositing modes.
6037
* Mac OS X threading:
6043
* The bounds of the view to be created. Can be NULL, in which
6044
* case the view is created with CGRectZero bounds.
6047
* A valid pointer to an HIViewRef. On successful completion of
6048
* this routine, the destination HIViewRef will be filled with the
6049
* HIViewRef of the newly created view.
6052
* Mac OS X: in version 10.3 and later in Carbon.framework
6053
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6054
* Non-Carbon CFM: not available
6056
function HISegmentedViewCreate( {const} inBounds: HIRectPtr { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISegmentedViewCreate';
6057
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6061
* HISegmentedViewSetSegmentCount()
6064
* Sets the number of segments for the segmented view. Any previous
6065
* segments beyond the new count will have their content released.
6066
* All new segments beyond the previous count be initialized with
6067
* the most basic settings possible: Momentary, no attributes, zero
6068
* value, enabled, no command, no label, no content, and
6069
* auto-calculated content width. You should configure any new
6070
* segments to match your needs.
6072
* Mac OS X threading:
6078
* The segmented view for which the content is to be set.
6081
* A positive integer indicating how many segments the view is to
6085
* Mac OS X: in version 10.3 and later in Carbon.framework
6086
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6087
* Non-Carbon CFM: not available
6089
function HISegmentedViewSetSegmentCount( inSegmentedView: HIViewRef; inSegmentCount: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCount';
6090
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6094
* HISegmentedViewGetSegmentCount()
6097
* Get the number of segments in the segmented view.
6099
* Mac OS X threading:
6105
* The segmented view for which the content is to be set.
6108
* A UInt32 indicating the number of segments in the segmented view.
6111
* Mac OS X: in version 10.3 and later in Carbon.framework
6112
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6113
* Non-Carbon CFM: not available
6115
function HISegmentedViewGetSegmentCount( inSegmentedView: HIViewRef ): UInt32; external name '_HISegmentedViewGetSegmentCount';
6116
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6121
* HISegmentBehavior constants
6125
* Pops back up after being pressed, just like a push button.
6127
kHISegmentBehaviorMomentary = 1;
6130
* Stays pressed until another segment with the radio behavior is
6131
* pressed. This makes the segment behave like a radio button. After
6132
* this segment is clicked, the segmented view's value will be
6133
* changed to this segment's one-based index.
6135
kHISegmentBehaviorRadio = 2;
6138
* Like a check box. When clicked, it toggles back and forth between
6139
* checked and unchecked states.
6141
kHISegmentBehaviorToggles = 3;
6144
* After being pressed, this type of segment stays pressed until you
6145
* programatically unpress it.
6147
kHISegmentBehaviorSticky = 4;
6151
HISegmentBehavior = UInt32;
6153
* HISegmentedViewSetSegmentBehavior()
6156
* Changes the behavior of an individual segment of a segmented
6157
* view. By default, a segment has the kHISegmentBehaviorMomentary
6160
* Mac OS X threading:
6166
* The segmented view which owns the segment whose behavior you
6169
* inSegmentIndexOneBased:
6170
* The one-based index of the segment whose behavior you want to
6171
* change. This must be a non-zero value that is no higher than
6172
* the segmented view's current segment count.
6175
* A HISegmentBehavior describing the behavior you wish the
6179
* Mac OS X: in version 10.3 and later in Carbon.framework
6180
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6181
* Non-Carbon CFM: not available
6183
function HISegmentedViewSetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inBehavior: HISegmentBehavior ): OSStatus; external name '_HISegmentedViewSetSegmentBehavior';
6184
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6188
* HISegmentedViewGetSegmentBehavior()
6191
* Returns the behavior of an individual segment of a segmented view.
6193
* Mac OS X threading:
6199
* The segmented view which owns the segment being queried.
6201
* inSegmentIndexOneBased:
6202
* The one-based index of the segment whose behavior you desire.
6203
* This must be a non-zero value that is no higher than the
6204
* segmented view's current segment count.
6207
* A HISegmentBehavior describing the behavior of the given segment.
6208
* If you pass an illegal segment index, the result is undefined.
6211
* Mac OS X: in version 10.3 and later in Carbon.framework
6212
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6213
* Non-Carbon CFM: not available
6215
function HISegmentedViewGetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HISegmentBehavior; external name '_HISegmentedViewGetSegmentBehavior';
6216
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6221
* HISegmentedView segment attributes
6224
* These attribute bits are for use with
6225
* HISegmentedViewChangeSegmentAttributes and
6226
* HISegmentedViewGetSegmentAttributes.
6230
* Pass this to indicate no attributes at all.
6232
kHISegmentNoAttributes = 0;
6235
* If this attribute bit is set, the command that gets sent out when
6236
* the segment is clicked will be directed at the user focus instead
6237
* of up the segmented view's containment hierarchy.
6239
kHISegmentSendCmdToUserFocus = 1 shl 0;
6242
* HISegmentedViewChangeSegmentAttributes()
6245
* Changes the attributes of an individual segment of a segmented
6246
* view. By default, a segment has no attribute bits set.
6248
* Mac OS X threading:
6254
* The segmented view which owns the segment whose attributes you
6257
* inSegmentIndexOneBased:
6258
* The one-based index of the segment whose attributes you want to
6259
* change. This must be a non-zero value that is no higher than
6260
* the segmented view's current segment count.
6262
* inAttributesToSet:
6263
* The attribute bits you wish to set/enable for the segment.
6265
* inAttributesToClear:
6266
* The attribute bits you wish to clear/disable for the segment.
6269
* Mac OS X: in version 10.3 and later in Carbon.framework
6270
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6271
* Non-Carbon CFM: not available
6273
function HISegmentedViewChangeSegmentAttributes( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISegmentedViewChangeSegmentAttributes';
6274
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6278
* HISegmentedViewGetSegmentAttributes()
6281
* Returns the attributes of an individual segment of a segmented
6284
* Mac OS X threading:
6290
* The segmented view which owns the segment being queried.
6292
* inSegmentIndexOneBased:
6293
* The one-based index of the segment whose attributes you desire.
6294
* This must be a non-zero value that is no higher than the
6295
* segmented view's current segment count.
6298
* The attribute bits that are set/enabled for the given segment. If
6299
* you pass an illegal segment index, the result is undefined.
6302
* Mac OS X: in version 10.3 and later in Carbon.framework
6303
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6304
* Non-Carbon CFM: not available
6306
function HISegmentedViewGetSegmentAttributes( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): OptionBits; external name '_HISegmentedViewGetSegmentAttributes';
6307
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6311
* HISegmentedViewSetSegmentValue()
6314
* Change the value of an individual segment of a segmented view.
6315
* This is only meaningful for segments with the sticky, toggles, or
6316
* radio behaviors. If you set the value of momentary segments to
6317
* something other than zero, the behavior is undefined.
6319
* Mac OS X threading:
6325
* The segmented view which owns the segment whose value you want
6328
* inSegmentIndexOneBased:
6329
* The one-based index of the segment whose value you want to
6330
* change. This must be a non-zero value that is no higher than
6331
* the segmented view's current segment count.
6334
* The value you wish the segment to have. Zero means
6335
* unpressed/unselected and one means pressed/selected. Other
6336
* values will result in undefined behavior.
6339
* Mac OS X: in version 10.3 and later in Carbon.framework
6340
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6341
* Non-Carbon CFM: not available
6343
function HISegmentedViewSetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inValue: SInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentValue';
6344
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6348
* HISegmentedViewGetSegmentValue()
6351
* Determine the value of an individual segment of a segmented view.
6352
* This is only meaningful for segments with the sticky, toggles, or
6353
* radio behaviors. The value of a momentary segment is undefined.
6355
* Mac OS X threading:
6361
* The segmented view which owns the segment being queried.
6363
* inSegmentIndexOneBased:
6364
* The one-based index of the segment whose value you desire. This
6365
* must be a non-zero value that is no higher than the segmented
6366
* view's current segment count.
6369
* A SInt32 indicating the value of the given segment. If you pass
6370
* an illegal segment index, the result is undefined.
6373
* Mac OS X: in version 10.3 and later in Carbon.framework
6374
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6375
* Non-Carbon CFM: not available
6377
function HISegmentedViewGetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): SInt32; external name '_HISegmentedViewGetSegmentValue';
6378
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6382
* HISegmentedViewSetSegmentEnabled()
6385
* Enable or disable an individual segment of a segmented view.
6387
* Mac OS X threading:
6393
* The segmented view which owns the segment to enable or disable.
6395
* inSegmentIndexOneBased:
6396
* The one-based index of the segment to disable or enable. This
6397
* must be a non-zero value that is no higher than the segmented
6398
* view's current segment count.
6401
* A Boolean indicating whether the segment is to become enabled
6405
* Mac OS X: in version 10.3 and later in Carbon.framework
6406
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6407
* Non-Carbon CFM: not available
6409
function HISegmentedViewSetSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inEnabled: Boolean ): OSStatus; external name '_HISegmentedViewSetSegmentEnabled';
6410
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6414
* HISegmentedViewIsSegmentEnabled()
6417
* Test an individual segment of a segmented view to see if it is
6418
* enabled or disabled.
6420
* Mac OS X threading:
6426
* The segmented view which owns the segment being queried.
6428
* inSegmentIndexOneBased:
6429
* The one-based index of the segment to test. This must be a
6430
* non-zero value that is no higher than the segmented view's
6431
* current segment count.
6434
* True if the segment is enabled or false if the segment is
6435
* disabled. If you pass an illegal segment index, the result is
6439
* Mac OS X: in version 10.3 and later in Carbon.framework
6440
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6441
* Non-Carbon CFM: not available
6443
function HISegmentedViewIsSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): Boolean; external name '_HISegmentedViewIsSegmentEnabled';
6444
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6448
* HISegmentedViewSetSegmentCommand()
6451
* Set the command ID for the given segment. By default, the command
6452
* is zero. If you set any non-zero command ID, the segmented view
6453
* will send an HICommand whenever the segment is clicked. By
6454
* default, the command is sent to the segmented view and up the
6455
* containment hierarchy. You can request that the command start at
6456
* the user focus instead by turning on the
6457
* kHISegmentSendCmdToUserFocus attribute for the segment.
6459
* Mac OS X threading:
6465
* The segmented view which owns the segment whose command you
6468
* inSegmentIndexOneBased:
6469
* The one-based index of the segment whose command you wish to
6470
* set. This must be a non-zero value that is no higher than the
6471
* segmented view's current segment count.
6474
* The command ID you wish to associate with the segment. A value
6475
* of zero signifies "no command".
6478
* Mac OS X: in version 10.3 and later in Carbon.framework
6479
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6480
* Non-Carbon CFM: not available
6482
function HISegmentedViewSetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inCommand: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCommand';
6483
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6487
* HISegmentedViewGetSegmentCommand()
6490
* Get the command ID associated with the given segment.
6492
* Mac OS X threading:
6498
* The segmented view which owns the segment being queried.
6500
* inSegmentIndexOneBased:
6501
* The one-based index of the segment to query. This must be a
6502
* non-zero value that is no higher than the segmented view's
6503
* current segment count.
6506
* Returns the command ID associated with the segment. If you pass
6507
* an illegal segment index, the result is undefined.
6510
* Mac OS X: in version 10.3 and later in Carbon.framework
6511
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6512
* Non-Carbon CFM: not available
6514
function HISegmentedViewGetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): UInt32; external name '_HISegmentedViewGetSegmentCommand';
6515
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6519
* HISegmentedViewSetSegmentLabel()
6522
* Set the label string for the given segment. By default, a segment
6523
* has no label string.
6525
* Mac OS X threading:
6531
* The segmented view which owns the segment whose label you wish
6534
* inSegmentIndexOneBased:
6535
* The one-based index of the segment whose label you wish to set.
6536
* This must be a non-zero value that is no higher than the
6537
* segmented view's current segment count.
6540
* A CFStringRef with the text of the label. The segmented view
6541
* will copy the string passed in. You may pass NULL or an empty
6542
* CFStringRef if you wish to eliminate the label from the segment.
6545
* Mac OS X: in version 10.3 and later in Carbon.framework
6546
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6547
* Non-Carbon CFM: not available
6549
function HISegmentedViewSetSegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewSetSegmentLabel';
6550
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6554
* HISegmentedViewCopySegmentLabel()
6557
* Get the label associated with the given segment.
6559
* Mac OS X threading:
6565
* The segmented view which owns the segment being queried.
6567
* inSegmentIndexOneBased:
6568
* The one-based index of the segment to query. This must be a
6569
* non-zero value that is no higher than the segmented view's
6570
* current segment count.
6573
* On exit, outLabel will be a copy of the label associated with
6574
* the segment; you must release this string. If there is no label
6575
* associated with the segment, outLabel will be set to NULL.
6578
* Mac OS X: in version 10.3 and later in Carbon.framework
6579
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6580
* Non-Carbon CFM: not available
6582
function HISegmentedViewCopySegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var outLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewCopySegmentLabel';
6583
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6587
* HISegmentedViewSetSegmentContentWidth()
6590
* Sets whether you want the segment to automatically calculate its
6591
* own width or whether you want to determine the segment's width
6592
* manually. The content width is the horizontal area taken up by a
6593
* segment's label and/or image.
6595
* Mac OS X threading:
6601
* The segmented view which owns the segment whose content width
6604
* inSegmentIndexOneBased:
6605
* The one-based index of the segment whose content width you wish
6606
* to set. This must be a non-zero value that is no higher than
6607
* the segmented view's current segment count.
6609
* inAutoCalculateWidth:
6610
* A Boolean indicating whether you want the segment to calculate
6611
* its own width. If you pass true, the inWidth parameter is
6615
* If you passed false in inAutoCalculateWidth, this parameter
6616
* specifies the width you want to manually associate with the
6617
* segment. If you pass a negative width, the behavior is
6621
* Mac OS X: in version 10.3 and later in Carbon.framework
6622
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6623
* Non-Carbon CFM: not available
6625
function HISegmentedViewSetSegmentContentWidth( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inAutoCalculateWidth: Boolean; inWidth: Float32 ): OSStatus; external name '_HISegmentedViewSetSegmentContentWidth';
6626
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6630
* HISegmentedViewGetSegmentContentWidth()
6633
* Get the content width of the given segment. This also optionall
6634
* passes back a Boolean indicating whether the width was
6635
* automatically calculated. The content width is the horizontal
6636
* area taken up by a segment's label and/or image.
6638
* Mac OS X threading:
6644
* The segmented view which owns the segment being queried.
6646
* inSegmentIndexOneBased:
6647
* The one-based index of the segment to query. This must be a
6648
* non-zero value that is no higher than the segmented view's
6649
* current segment count.
6651
* outAutoCalculated:
6652
* On exit, this is a Boolean indicating whether the width was
6653
* automatically calculated. You may pass NULL if you don't need
6657
* Returns the width of the content for the given segment. If you
6658
* pass an illegal segment index, the result is undefined.
6661
* Mac OS X: in version 10.3 and later in Carbon.framework
6662
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6663
* Non-Carbon CFM: not available
6665
function HISegmentedViewGetSegmentContentWidth( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; outAutoCalculated: BooleanPtr { can be NULL } ): Float32; external name '_HISegmentedViewGetSegmentContentWidth';
6666
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6670
* HISegmentedViewSetSegmentImage()
6673
* Sets or clears the image associated with a given segment.
6675
* Mac OS X threading:
6681
* The segmented view which owns the segment whose image you wish
6684
* inSegmentIndexOneBased:
6685
* The one-based index of the segment whose image you wish to set.
6686
* This must be a non-zero value that is no higher than the
6687
* segmented view's current segment count.
6690
* An HIViewImageContentInfo structure with the image information
6691
* for the given segment. Segments only support three types of
6692
* image content: kControlNoContent (no image),
6693
* kControlContentIconRef, and kControlContentCGImageRef.
6696
* Mac OS X: in version 10.3 and later in Carbon.framework
6697
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6698
* Non-Carbon CFM: not available
6700
function HISegmentedViewSetSegmentImage( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; const (*var*) inImage: HIViewImageContentInfo ): OSStatus; external name '_HISegmentedViewSetSegmentImage';
6701
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6705
* HISegmentedViewGetSegmentImageContentType()
6708
* Get the type of image content drawn by the given segment. You
6709
* will need to call this before calling
6710
* HISegmentedViewCopySegmentImage so you know what type of image
6711
* content to request from the latter API.
6713
* Mac OS X threading:
6719
* The segmented view which owns the segment being queried.
6721
* inSegmentIndexOneBased:
6722
* The one-based index of the segment to query. This must be a
6723
* non-zero value that is no higher than the segmented view's
6724
* current segment count.
6727
* Returns the image content type of the image drawn by the given
6728
* segment. If you pass an illegal segment index, the result is
6732
* Mac OS X: in version 10.3 and later in Carbon.framework
6733
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6734
* Non-Carbon CFM: not available
6736
function HISegmentedViewGetSegmentImageContentType( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HIViewImageContentType; external name '_HISegmentedViewGetSegmentImageContentType';
6737
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6741
* HISegmentedViewCopySegmentImage()
6744
* Gives you a copy of the image (if any) drawn by the given
6745
* segment. You are responsible for releasing any image passed back
6746
* by this function. You request the image by asking for a
6747
* particular type of image. If the segment isn't using the
6748
* requested type of image, an error will be returned. If you wish
6749
* to know the actual type of image displayed by the segment, you
6750
* can call HISegmentedViewGetSegmentImageContentType.
6752
* Mac OS X threading:
6758
* The segmented view which owns the segment being queried.
6760
* inSegmentIndexOneBased:
6761
* The one-based index of the segment to query. This must be a
6762
* non-zero value that is no higher than the segmented view's
6763
* current segment count.
6766
* On entry, you must fill out the contentType field of this
6767
* structure with the type of image you desire. On exit, if that
6768
* type of image is used by the segment, the appropriate field of
6769
* the union will be filled in with a copy of the image. You are
6770
* responsible for releasing the image.
6773
* Mac OS X: in version 10.3 and later in Carbon.framework
6774
* CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6775
* Non-Carbon CFM: not available
6777
function HISegmentedViewCopySegmentImage( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var ioImage: HIViewImageContentInfo ): OSStatus; external name '_HISegmentedViewCopySegmentImage';
6778
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6781
{==============================================================================}
6782
{ Clock view events }
6783
{==============================================================================}
6785
kEventClassClockView = $636C6F63 (* 'cloc' *);
6788
* kEventClassClockView / kEventClockDateOrTimeChanged
6791
* Allows clients to determine when the user has changed the date or
6792
* time in the clock control.
6795
* This event is sent by the clock control when the user has changed
6796
* the date or time. Clients could register for this notification in
6797
* order to update some state based on the date or time in the
6798
* clock, for instance. This event is sent to the view only, it will
6799
* not propagate. It is sent to all handlers installed on the
6802
* Mac OS X threading:
6807
* --> kEventParamDirectObject (in, typeControlRef)
6808
* The view whose date has changed.
6811
* Mac OS X: in version 10.4 and later in Carbon.framework
6812
* CarbonLib: not available
6815
kEventClockDateOrTimeChanged = 1;