~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/univint/HIView.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
     File:       HIToolbox/HIView.h
3
 
 
4
 
     Contains:   HIView routines
5
 
 
6
 
     Version:    HIToolbox-219.4.81~2
7
 
 
8
 
     Copyright:  � 2001-2005 by Apple Computer, Inc., all rights reserved.
9
 
 
10
 
     Bugs?:      For bug reports, consult the following page on
11
 
                 the World Wide Web:
12
 
 
13
 
                     http://www.freepascal.org/bugs.html
14
 
 
15
 
}
16
 
{     File:       HIView.p(.pas)                                                                                                                                            }
17
 
{                                                                                                                                                                                                               }
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.                                        }
26
 
{                                                                                                                                                                                                               }
27
 
{     Version:    1.1                                                                                                                                                                   }
28
 
{                                                                                                                                                                                                               }
29
 
{         Pascal Translation:  Gale Paeper, <gpaeper@empirenet.com>, 2004                                                                       }
30
 
{                                                                                                                                                                                                               }
31
 
{     Copyright:  Subject to the constraints of Apple's original rights, you're free to use this                }
32
 
{                                 translation as you deem fit.                                                                                                                  }
33
 
{                                                                                                                                                                                                               }
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.                                                                                   }
38
 
{
39
 
      Change History (most recent first ):
40
 
 
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.
45
 
}
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 }
50
 
{
51
 
    Modified for use with Free Pascal
52
 
    Version 200
53
 
    Please report any bugs to <gpc@microbizz.nl>
54
 
}
55
 
 
56
 
{$mode macpas}
57
 
{$packenum 1}
58
 
{$macro on}
59
 
{$inline on}
60
 
{$CALLING MWPASCAL}
61
 
 
62
 
unit HIView;
63
 
interface
64
 
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
65
 
{$setc GAP_INTERFACES_VERSION := $0200}
66
 
 
67
 
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
68
 
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
69
 
{$endc}
70
 
 
71
 
{$ifc defined CPUPOWERPC and defined CPUI386}
72
 
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
73
 
{$endc}
74
 
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
75
 
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
76
 
{$endc}
77
 
 
78
 
{$ifc not defined __ppc__ and defined CPUPOWERPC}
79
 
        {$setc __ppc__ := 1}
80
 
{$elsec}
81
 
        {$setc __ppc__ := 0}
82
 
{$endc}
83
 
{$ifc not defined __i386__ and defined CPUI386}
84
 
        {$setc __i386__ := 1}
85
 
{$elsec}
86
 
        {$setc __i386__ := 0}
87
 
{$endc}
88
 
 
89
 
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
90
 
        {$error Conflicting definitions for __ppc__ and __i386__}
91
 
{$endc}
92
 
 
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}
99
 
{$elsec}
100
 
        {$error Neither __ppc__ nor __i386__ is defined.}
101
 
{$endc}
102
 
{$setc TARGET_CPU_PPC_64 := FALSE}
103
 
 
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}
110
 
{$elsec}
111
 
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
112
 
{$endc}
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;
139
 
 
140
 
 
141
 
{$ALIGN MAC68K}
142
 
 
143
 
type
144
 
        HIViewRef = ControlRef;
145
 
type
146
 
        HIViewID = ControlID;
147
 
{
148
 
 *  kHIViewWindowContentID
149
 
 *  
150
 
 *  Discussion:
151
 
 *    The standard view ID for the content view of a window.
152
 
 *  
153
 
 *  Mac OS X threading:
154
 
 *    Not thread safe
155
 
 *  
156
 
 *  Availability:
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
160
 
 }
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
165
 
 attribute (const).}
166
 
 
167
 
{WARNING: The CFM CarbonLib export for kHIViewWindowContentID is broken.  For CFM CodeWarrior Pascal,
168
 
 some workarounds are:
169
 
 
170
 
 1.  Use CFBundle loading and CFBundleGetDataPointerForName to obtain the correct data.
171
 
 
172
 
 2.  For composting windows, the correct data can be obtained with code similar to:
173
 
 
174
 
    ignoreResult := GetRootControl( theWind, theContentRoot );
175
 
    ignoreResult := GetControlID( theContentRoot, theContentControlID );
176
 
 
177
 
    The correct data for kHIViewWindowContentID is in theContentControlID.
178
 
 }
179
 
var kHIViewWindowContentID: HIViewID; external name '_kHIViewWindowContentID'; (* attribute const *)
180
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
181
 
{
182
 
 *  kHIViewWindowGrowBoxID
183
 
 *  
184
 
 *  Discussion:
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.
188
 
 *  
189
 
 *  Mac OS X threading:
190
 
 *    Not thread safe
191
 
 *  
192
 
 *  Availability:
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
196
 
 }
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
201
 
 attribute (const).}
202
 
var kHIViewWindowGrowBoxID: HIViewID; external name '_kHIViewWindowGrowBoxID'; (* attribute const *)
203
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
204
 
 
205
 
{
206
 
 *  Discussion:
207
 
 *    HIViewZOrderOp
208
 
 }
209
 
const
210
 
{
211
 
   * Indicates we wish to order a view above another view.
212
 
   }
213
 
        kHIViewZOrderAbove = 1;
214
 
 
215
 
  {
216
 
   * Indicates we wish to order a view below another view.
217
 
   }
218
 
        kHIViewZOrderBelow = 2;
219
 
 
220
 
type
221
 
        HIViewZOrderOp = UInt32;
222
 
 
223
 
{
224
 
 *  HIViewFrameMetrics
225
 
 *  
226
 
 *  Summary:
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.
233
 
 }
234
 
type
235
 
        HIViewFrameMetrics = record
236
 
{
237
 
   * Height of the top of the structure area.
238
 
   }
239
 
                top: Float32;
240
 
 
241
 
  {
242
 
   * Width of the left of the structure area.
243
 
   }
244
 
                left: Float32;
245
 
 
246
 
  {
247
 
   * Height of the bottom of the structure area.
248
 
   }
249
 
                bottom: Float32;
250
 
 
251
 
  {
252
 
   * Width of the right of the structure area.
253
 
   }
254
 
                right: Float32;
255
 
        end;
256
 
{==============================================================================}
257
 
{  ATTRIBUTES                                                                  }
258
 
{==============================================================================}
259
 
 
260
 
{
261
 
 *  Summary:
262
 
 *    View attributes are generally determined by clients of the view;
263
 
 *    the view itself should observe the attributes and behave
264
 
 *    accordingly.
265
 
 *  
266
 
 *  Discussion:
267
 
 *    View Attributes
268
 
 }
269
 
const
270
 
{
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
274
 
   * and so forth.
275
 
   }
276
 
        kHIViewAttributeSendCommandToUserFocus = 1 shl 0;
277
 
 
278
 
  {
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.
284
 
   }
285
 
        kHIViewAttributeIsFieldEditor = 1 shl 1;
286
 
 
287
 
  {
288
 
   * Legacy synonym for kHIViewAttributeSendCommandToUserFocus. Please
289
 
   * use it instead.
290
 
   }
291
 
        kHIViewSendCommandToUserFocus = kHIViewAttributeSendCommandToUserFocus;
292
 
 
293
 
 
294
 
{
295
 
 *  HIView features
296
 
 *  
297
 
 *  Summary:
298
 
 *    View feature flags are generally determined by the view itself,
299
 
 *    and are not typically changed by clients of the view.
300
 
 }
301
 
const
302
 
{
303
 
   * This view supports using the ghosting protocol when live tracking
304
 
   * is not enabled.
305
 
   }
306
 
        kHIViewFeatureSupportsGhosting = 1 shl 0;
307
 
 
308
 
  {
309
 
   * This view allows subviews to be embedded within it.
310
 
   }
311
 
        kHIViewFeatureAllowsSubviews = 1 shl 1;
312
 
 
313
 
  {
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.
316
 
   }
317
 
        kHIViewFeatureGetsFocusOnClick = 1 shl 8;
318
 
 
319
 
  {
320
 
   * This view supports the live feedback protocol. Necessary to
321
 
   * implement live scroll bar tracking. Clients of a view should never
322
 
   * disable this.
323
 
   }
324
 
        kHIViewFeatureSupportsLiveFeedback = 1 shl 10;
325
 
 
326
 
  {
327
 
   * This view can be put into a radio group. Radio buttons and bevel
328
 
   * buttons report this behavior.
329
 
   }
330
 
        kHIViewFeatureSupportsRadioBehavior = 1 shl 11;
331
 
 
332
 
  {
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.
338
 
   }
339
 
        kHIViewFeatureAutoToggles = 1 shl 14;
340
 
 
341
 
  {
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.
345
 
   }
346
 
        kHIViewFeatureIdlesWithTimer = 1 shl 23;
347
 
 
348
 
  {
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.
354
 
   }
355
 
        kHIViewFeatureInvertsUpDownValueMeaning = 1 shl 24;
356
 
 
357
 
  {
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.
361
 
   }
362
 
        kHIViewFeatureIsOpaque = 1 shl 25;
363
 
 
364
 
  {
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.
371
 
   }
372
 
        kHIViewFeatureDoesNotDraw = 1 shl 27;
373
 
 
374
 
  {
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.
378
 
   }
379
 
        kHIViewFeatureDoesNotUseSpecialParts = 1 shl 28;
380
 
 
381
 
  {
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.
388
 
   }
389
 
        kHIViewFeatureIgnoresClicks = 1 shl 29;
390
 
 
391
 
 
392
 
{
393
 
 *  HIView valid feature sets
394
 
 *  
395
 
 *  Summary:
396
 
 *    These are sets of features that are available on the version of
397
 
 *    Mac OS X corresponding to that named in the constant.
398
 
 }
399
 
const
400
 
        kHIViewValidFeaturesForPanther = $3B804D03;
401
 
 
402
 
 
403
 
{
404
 
 *  HIView feature synonyms
405
 
 *  
406
 
 *  Summary:
407
 
 *    Legacy synonyms for HIView feature bit names. Please use the
408
 
 *    newer names.
409
 
 }
410
 
const
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;
423
 
 
424
 
 
425
 
type
426
 
        HIViewFeatures = UInt64;
427
 
{==============================================================================}
428
 
{  VIEW PART CODES                                                             }
429
 
{==============================================================================}
430
 
type
431
 
        HIViewPartCode = ControlPartCode;
432
 
        HIViewPartCodePtr = ^HIViewPartCode;
433
 
 
434
 
{
435
 
 *  HIViewPartCodes
436
 
 *  
437
 
 }
438
 
const
439
 
        kHIViewNoPart = 0;
440
 
        kHIViewIndicatorPart = 129;
441
 
        kHIViewDisabledPart = 254;
442
 
        kHIViewInactivePart = 255;
443
 
 
444
 
  {
445
 
   * Use this constant when not referring to a specific part, but
446
 
   * rather the entire view.
447
 
   }
448
 
        kHIViewEntireView = kHIViewNoPart;
449
 
 
450
 
 
451
 
{
452
 
 *  HIView Meta-Parts
453
 
 *  
454
 
 *  Summary:
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.
460
 
 }
461
 
const
462
 
{
463
 
   * The structure region is the total area over which the view draws.
464
 
   }
465
 
        kHIViewStructureMetaPart = -1;
466
 
 
467
 
  {
468
 
   * The content region is only defined by views that can embed other
469
 
   * views. It is the area that embedded content can live.
470
 
   }
471
 
        kHIViewContentMetaPart = -2;
472
 
 
473
 
  {
474
 
   * Mac OS X 10.2 or later
475
 
   }
476
 
        kHIViewOpaqueMetaPart = -3;
477
 
 
478
 
  {
479
 
   * Mac OS X 10.3 or later, only used for async window dragging.
480
 
   * Default is structure region.
481
 
   }
482
 
        kHIViewClickableMetaPart = -4;
483
 
 
484
 
 
485
 
{
486
 
 *  HIView Focus Parts
487
 
 *  
488
 
 }
489
 
const
490
 
{
491
 
   * Tells view to clear its focus
492
 
   }
493
 
        kHIViewFocusNoPart = kHIViewNoPart;
494
 
 
495
 
  {
496
 
   * Tells view to focus on the next part
497
 
   }
498
 
        kHIViewFocusNextPart = -1;
499
 
 
500
 
  {
501
 
   * Tells view to focus on the previous part
502
 
   }
503
 
        kHIViewFocusPrevPart = -2;
504
 
 
505
 
{==============================================================================}
506
 
{  CONTENT                                                                     }
507
 
{==============================================================================}
508
 
type
509
 
        HIViewImageContentType = ControlContentType;
510
 
type
511
 
        HIViewImageContentInfo = ControlImageContentInfo;
512
 
type
513
 
        HIViewContentType = SInt16;
514
 
 
515
 
{
516
 
 *  HIViewContentTypes
517
 
 *  
518
 
 }
519
 
const
520
 
{
521
 
   * The view has no content besides text.
522
 
   }
523
 
        kHIViewContentTextOnly = 0;
524
 
 
525
 
  {
526
 
   * The view has no content.
527
 
   }
528
 
        kHIViewContentNone = 0;
529
 
 
530
 
  {
531
 
   * The view's content is an IconSuiteRef.
532
 
   }
533
 
        kHIViewContentIconSuiteRef = 129;
534
 
 
535
 
  {
536
 
   * The view's content is an IconRef.
537
 
   }
538
 
        kHIViewContentIconRef = 132;
539
 
 
540
 
  {
541
 
   * The view's content is a CGImageRef.
542
 
   }
543
 
        kHIViewContentCGImageRef = 134;
544
 
 
545
 
 
546
 
{
547
 
 *  HIViewContentInfo
548
 
 }
549
 
type
550
 
        HIViewContentInfo = record
551
 
{
552
 
   * The type of content referenced in the content union.
553
 
   }
554
 
                contentType: HIViewContentType;
555
 
                case SInt16 of
556
 
                0: (
557
 
                        iconSuite: IconSuiteRef;
558
 
                        );
559
 
                1: (
560
 
                        iconRef: IconRef_GAP_Private_field_type_fix;
561
 
                        );
562
 
                2: (
563
 
                        imageRef: CGImageRef;
564
 
                        );
565
 
        end;
566
 
type
567
 
        HIViewContentInfoPtr = ^HIViewContentInfo;
568
 
{==============================================================================}
569
 
{  ERROR CODES                                                                 }
570
 
{==============================================================================}
571
 
 
572
 
{
573
 
 *  Discussion:
574
 
 *    View/Control Error Codes
575
 
 }
576
 
const
577
 
{
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.
585
 
   }
586
 
        errNeedsCompositedWindow = -30598;
587
 
 
588
 
{==============================================================================}
589
 
{  HIOBJECT SUPPORT                                                            }
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')}
598
 
{$endc}
599
 
{==============================================================================}
600
 
{  EMBEDDING                                                                   }
601
 
{==============================================================================}
602
 
{
603
 
 *  HIViewGetRoot()
604
 
 *  
605
 
 *  Discussion:
606
 
 *    Returns the root view for a window.
607
 
 *  
608
 
 *  Mac OS X threading:
609
 
 *    Not thread safe
610
 
 *  
611
 
 *  Parameters:
612
 
 *    
613
 
 *    inWindow:
614
 
 *      The window to get the root for.
615
 
 *  
616
 
 *  Result:
617
 
 *    The root view for the window, or NULL if an invalid window is
618
 
 *    passed.
619
 
 *  
620
 
 *  Availability:
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
624
 
 }
625
 
function HIViewGetRoot( inWindow: WindowRef ): HIViewRef; external name '_HIViewGetRoot';
626
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
627
 
 
628
 
 
629
 
{
630
 
 *  HIViewAddSubview()
631
 
 *  
632
 
 *  Discussion:
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).
635
 
 *    
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.
640
 
 *  
641
 
 *  Mac OS X threading:
642
 
 *    Not thread safe
643
 
 *  
644
 
 *  Parameters:
645
 
 *    
646
 
 *    inParent:
647
 
 *      The view which will receive the new subview.
648
 
 *    
649
 
 *    inNewChild:
650
 
 *      The subview being added.
651
 
 *  
652
 
 *  Result:
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.
657
 
 *  
658
 
 *  Availability:
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
662
 
 }
663
 
function HIViewAddSubview( inParent: HIViewRef; inNewChild: HIViewRef ): OSStatus; external name '_HIViewAddSubview';
664
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
665
 
 
666
 
 
667
 
{
668
 
 *  HIViewRemoveFromSuperview()
669
 
 *  
670
 
 *  Discussion:
671
 
 *    Removes a view from its parent. 
672
 
 *    The subview being removed from the parent is not released and
673
 
 *    still exists.
674
 
 *  
675
 
 *  Mac OS X threading:
676
 
 *    Not thread safe
677
 
 *  
678
 
 *  Parameters:
679
 
 *    
680
 
 *    inView:
681
 
 *      The view to remove.
682
 
 *  
683
 
 *  Result:
684
 
 *    An operating system result code.
685
 
 *  
686
 
 *  Availability:
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
690
 
 }
691
 
function HIViewRemoveFromSuperview( inView: HIViewRef ): OSStatus; external name '_HIViewRemoveFromSuperview';
692
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
693
 
 
694
 
 
695
 
{
696
 
 *  HIViewGetSuperview()
697
 
 *  
698
 
 *  Discussion:
699
 
 *    Returns a view's parent view.
700
 
 *  
701
 
 *  Mac OS X threading:
702
 
 *    Not thread safe
703
 
 *  
704
 
 *  Parameters:
705
 
 *    
706
 
 *    inView:
707
 
 *      The view whose parent you are interested in getting.
708
 
 *  
709
 
 *  Result:
710
 
 *    An HIView reference, or NULL if this view has no parent or is
711
 
 *    invalid.
712
 
 *  
713
 
 *  Availability:
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
717
 
 }
718
 
function HIViewGetSuperview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetSuperview';
719
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
720
 
 
721
 
 
722
 
{
723
 
 *  HIViewGetFirstSubview()
724
 
 *  
725
 
 *  Discussion:
726
 
 *    Returns the first subview of a container. The first subview is
727
 
 *    the topmost subview in z-order.
728
 
 *  
729
 
 *  Mac OS X threading:
730
 
 *    Not thread safe
731
 
 *  
732
 
 *  Parameters:
733
 
 *    
734
 
 *    inView:
735
 
 *      The view whose subview you are fetching.
736
 
 *  
737
 
 *  Result:
738
 
 *    An HIView reference, or NULL if this view has no subviews or is
739
 
 *    invalid.
740
 
 *  
741
 
 *  Availability:
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
745
 
 }
746
 
function HIViewGetFirstSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetFirstSubview';
747
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
748
 
 
749
 
 
750
 
{
751
 
 *  HIViewGetLastSubview()
752
 
 *  
753
 
 *  Discussion:
754
 
 *    Returns the last subview of a container. The last subview is the
755
 
 *    bottommost subview in z-order.
756
 
 *  
757
 
 *  Mac OS X threading:
758
 
 *    Not thread safe
759
 
 *  
760
 
 *  Parameters:
761
 
 *    
762
 
 *    inView:
763
 
 *      The view whose subview you are fetching.
764
 
 *  
765
 
 *  Result:
766
 
 *    An HIView reference, or NULL if this view has no subviews or is
767
 
 *    invalid.
768
 
 *  
769
 
 *  Availability:
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
773
 
 }
774
 
function HIViewGetLastSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetLastSubview';
775
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
776
 
 
777
 
 
778
 
{
779
 
 *  HIViewGetNextView()
780
 
 *  
781
 
 *  Discussion:
782
 
 *    Returns the next view after the one given, in z-order.
783
 
 *  
784
 
 *  Mac OS X threading:
785
 
 *    Not thread safe
786
 
 *  
787
 
 *  Parameters:
788
 
 *    
789
 
 *    inView:
790
 
 *      The view to use as reference.
791
 
 *  
792
 
 *  Result:
793
 
 *    An HIView reference, or NULL if this view has no view behind it
794
 
 *    or is invalid.
795
 
 *  
796
 
 *  Availability:
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
800
 
 }
801
 
function HIViewGetNextView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetNextView';
802
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
803
 
 
804
 
 
805
 
{
806
 
 *  HIViewGetPreviousView()
807
 
 *  
808
 
 *  Discussion:
809
 
 *    Returns the previous view before the one given, in z-order.
810
 
 *  
811
 
 *  Mac OS X threading:
812
 
 *    Not thread safe
813
 
 *  
814
 
 *  Parameters:
815
 
 *    
816
 
 *    inView:
817
 
 *      The view to use as reference.
818
 
 *  
819
 
 *  Result:
820
 
 *    An HIView reference, or NULL if this view has no view in front of
821
 
 *    it or is invalid.
822
 
 *  
823
 
 *  Availability:
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
827
 
 }
828
 
function HIViewGetPreviousView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetPreviousView';
829
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
830
 
 
831
 
 
832
 
{
833
 
 *  HIViewCountSubviews()
834
 
 *  
835
 
 *  Summary:
836
 
 *    Counts the number of subviews embedded in a view.
837
 
 *  
838
 
 *  Mac OS X threading:
839
 
 *    Not thread safe
840
 
 *  
841
 
 *  Parameters:
842
 
 *    
843
 
 *    inView:
844
 
 *      The view for which to count subviews.
845
 
 *    
846
 
 *    outSubviewCount:
847
 
 *  
848
 
 *  Result:
849
 
 *    The number of subviews of the specified view.
850
 
 *  
851
 
 *  Availability:
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
855
 
 }
856
 
function HIViewCountSubviews( inView: HIViewRef ): CFIndex; external name '_HIViewCountSubviews';
857
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
858
 
 
859
 
 
860
 
{
861
 
 *  HIViewGetIndexedSubview()
862
 
 *  
863
 
 *  Summary:
864
 
 *    Get the Nth subview of a view.
865
 
 *  
866
 
 *  Discussion:
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.
870
 
 *  
871
 
 *  Mac OS X threading:
872
 
 *    Not thread safe
873
 
 *  
874
 
 *  Parameters:
875
 
 *    
876
 
 *    inView:
877
 
 *      The view whose indexed sub-view is being requested.
878
 
 *    
879
 
 *    inSubviewIndex:
880
 
 *      The index of the subview to get.
881
 
 *    
882
 
 *    outSubview:
883
 
 *      An HIViewRef to be filled with the indexed subview.
884
 
 *  
885
 
 *  Result:
886
 
 *    A result code indicating success or failure.
887
 
 *  
888
 
 *  Availability:
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
892
 
 }
893
 
function HIViewGetIndexedSubview( inView: HIViewRef; inSubviewIndex: CFIndex; var outSubview: HIViewRef ): OSStatus; external name '_HIViewGetIndexedSubview';
894
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
895
 
 
896
 
 
897
 
{
898
 
 *  HIViewSetZOrder()
899
 
 *  
900
 
 *  Discussion:
901
 
 *    Allows you to change the front-to-back ordering of sibling views.
902
 
 *  
903
 
 *  Mac OS X threading:
904
 
 *    Not thread safe
905
 
 *  
906
 
 *  Parameters:
907
 
 *    
908
 
 *    inView:
909
 
 *      The view whose Z-order you wish to change.
910
 
 *    
911
 
 *    inOp:
912
 
 *      Indicates to order inView above or below inOther.
913
 
 *    
914
 
 *    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.
920
 
 *  
921
 
 *  Result:
922
 
 *    An operating system result code.
923
 
 *  
924
 
 *  Availability:
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
928
 
 }
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 *)
931
 
 
932
 
 
933
 
{==============================================================================}
934
 
{  STATE and VALUES                                                            }
935
 
{==============================================================================}
936
 
 
937
 
{
938
 
 *  HIViewKind
939
 
 }
940
 
type
941
 
        HIViewKind = record
942
 
{
943
 
   * The signature of the view. Apple reserves all signatures made up
944
 
   * of only lowercase characters.
945
 
   }
946
 
                signature: OSType;
947
 
 
948
 
  {
949
 
   * The kind of the view. Apple reserves all kinds made up of only
950
 
   * lowercase characters.
951
 
   }
952
 
                kind: OSType;
953
 
        end;
954
 
 
955
 
{
956
 
 *  View signature kind
957
 
 *  
958
 
 }
959
 
const
960
 
{
961
 
   * The signature of all HIToolbox views.
962
 
   }
963
 
        kHIViewKindSignatureApple = $6170706C (* 'appl' *);
964
 
 
965
 
{
966
 
 *  HIViewSetVisible()
967
 
 *  
968
 
 *  Discussion:
969
 
 *    Hides or shows a view. Marks the area the view will occupy or
970
 
 *    used to occupy as needing to be redrawn later.
971
 
 *  
972
 
 *  Mac OS X threading:
973
 
 *    Not thread safe
974
 
 *  
975
 
 *  Parameters:
976
 
 *    
977
 
 *    inView:
978
 
 *      The view to hide or show.
979
 
 *    
980
 
 *    inVisible:
981
 
 *      A boolean value which indicates whether you wish to hide the
982
 
 *      view (false) or show the view (true).
983
 
 *  
984
 
 *  Result:
985
 
 *    An operating system result code.
986
 
 *  
987
 
 *  Availability:
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
991
 
 }
992
 
function HIViewSetVisible( inView: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIViewSetVisible';
993
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
994
 
 
995
 
 
996
 
{
997
 
 *  HIViewIsVisible()
998
 
 *  
999
 
 *  Summary:
1000
 
 *    Returns whether a view is visible.
1001
 
 *  
1002
 
 *  Discussion:
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. 
1007
 
 *    
1008
 
 *    Latent visibility can be determined with HIViewIsLatentlyVisible.
1009
 
 *  
1010
 
 *  Mac OS X threading:
1011
 
 *    Not thread safe
1012
 
 *  
1013
 
 *  Parameters:
1014
 
 *    
1015
 
 *    inView:
1016
 
 *      The view whose visibility you wish to determine.
1017
 
 *  
1018
 
 *  Result:
1019
 
 *    A boolean value indicating whether the view is visible (true) or
1020
 
 *    hidden (false).
1021
 
 *  
1022
 
 *  Availability:
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
1026
 
 }
1027
 
function HIViewIsVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsVisible';
1028
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1029
 
 
1030
 
 
1031
 
{
1032
 
 *  HIViewIsLatentlyVisible()
1033
 
 *  
1034
 
 *  Summary:
1035
 
 *    Returns whether or not a view is latently visible.
1036
 
 *  
1037
 
 *  Discussion:
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.
1042
 
 *  
1043
 
 *  Mac OS X threading:
1044
 
 *    Not thread safe
1045
 
 *  
1046
 
 *  Parameters:
1047
 
 *    
1048
 
 *    inView:
1049
 
 *      The view whose latent visibility is to be checked.
1050
 
 *  
1051
 
 *  Result:
1052
 
 *    True if the view is latently visible, otherwise false.
1053
 
 *  
1054
 
 *  Availability:
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
1058
 
 }
1059
 
function HIViewIsLatentlyVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsLatentlyVisible';
1060
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1061
 
 
1062
 
 
1063
 
{
1064
 
 *  HIViewSetHilite()
1065
 
 *  
1066
 
 *  Summary:
1067
 
 *    Changes the highlighting of a view.
1068
 
 *  
1069
 
 *  Mac OS X threading:
1070
 
 *    Not thread safe
1071
 
 *  
1072
 
 *  Parameters:
1073
 
 *    
1074
 
 *    inView:
1075
 
 *      The view on which to set the highlight.
1076
 
 *    
1077
 
 *    inHilitePart:
1078
 
 *      An HIViewPartCode indicating the part of the view to highlight.
1079
 
 *  
1080
 
 *  Result:
1081
 
 *    A result code indicating success or failure.
1082
 
 *  
1083
 
 *  Availability:
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
1087
 
 }
1088
 
function HIViewSetHilite( inView: HIViewRef; inHilitePart: HIViewPartCode ): OSStatus; external name '_HIViewSetHilite';
1089
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1090
 
 
1091
 
 
1092
 
{
1093
 
 *  HIViewIsActive()
1094
 
 *  
1095
 
 *  Summary:
1096
 
 *    Returns whether or not a view is active.
1097
 
 *  
1098
 
 *  Discussion:
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
1103
 
 *    inactive.
1104
 
 *  
1105
 
 *  Mac OS X threading:
1106
 
 *    Not thread safe
1107
 
 *  
1108
 
 *  Parameters:
1109
 
 *    
1110
 
 *    inView:
1111
 
 *      The view whose active state is to be checked.
1112
 
 *    
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.
1117
 
 *  
1118
 
 *  Result:
1119
 
 *    True if the view is active, otherwise false.
1120
 
 *  
1121
 
 *  Availability:
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
1125
 
 }
1126
 
function HIViewIsActive( inView: HIViewRef; outIsLatentActive: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsActive';
1127
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1128
 
 
1129
 
 
1130
 
{
1131
 
 *  HIViewSetActivated()
1132
 
 *  
1133
 
 *  Summary:
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
1136
 
 *    accordingly.
1137
 
 *  
1138
 
 *  Mac OS X threading:
1139
 
 *    Not thread safe
1140
 
 *  
1141
 
 *  Parameters:
1142
 
 *    
1143
 
 *    inView:
1144
 
 *      The view to activate or deactivate.
1145
 
 *    
1146
 
 *    inSetActivated:
1147
 
 *      True if setting the view to active, false if setting the view
1148
 
 *      to inactive.
1149
 
 *  
1150
 
 *  Result:
1151
 
 *    A result code indicating success or failure.
1152
 
 *  
1153
 
 *  Availability:
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
1157
 
 }
1158
 
function HIViewSetActivated( inView: HIViewRef; inSetActivated: Boolean ): OSStatus; external name '_HIViewSetActivated';
1159
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1160
 
 
1161
 
 
1162
 
{
1163
 
 *  HIViewIsEnabled()
1164
 
 *  
1165
 
 *  Summary:
1166
 
 *    Tests whether or not a view is enabled.
1167
 
 *  
1168
 
 *  Discussion:
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
1173
 
 *    disabled.
1174
 
 *  
1175
 
 *  Mac OS X threading:
1176
 
 *    Not thread safe
1177
 
 *  
1178
 
 *  Parameters:
1179
 
 *    
1180
 
 *    inView:
1181
 
 *      The view to test.
1182
 
 *    
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.
1187
 
 *  
1188
 
 *  Result:
1189
 
 *    True if the view is enabled, otherwise false.
1190
 
 *  
1191
 
 *  Availability:
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
1195
 
 }
1196
 
function HIViewIsEnabled( inView: HIViewRef; outIsLatentEnabled: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsEnabled';
1197
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1198
 
 
1199
 
 
1200
 
{
1201
 
 *  HIViewSetEnabled()
1202
 
 *  
1203
 
 *  Summary:
1204
 
 *    Sets whether or not a view (and any subviews) are enabled or
1205
 
 *    disabled.
1206
 
 *  
1207
 
 *  Mac OS X threading:
1208
 
 *    Not thread safe
1209
 
 *  
1210
 
 *  Parameters:
1211
 
 *    
1212
 
 *    inView:
1213
 
 *      The view to enable or disable.
1214
 
 *    
1215
 
 *    inSetEnabled:
1216
 
 *      True if setting the view to enabled, false if setting the view
1217
 
 *      to disabled.
1218
 
 *  
1219
 
 *  Result:
1220
 
 *    A result code indicating success or failure.
1221
 
 *  
1222
 
 *  Availability:
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
1226
 
 }
1227
 
function HIViewSetEnabled( inView: HIViewRef; inSetEnabled: Boolean ): OSStatus; external name '_HIViewSetEnabled';
1228
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1229
 
 
1230
 
 
1231
 
{
1232
 
 *  HIViewIsCompositingEnabled()
1233
 
 *  
1234
 
 *  Summary:
1235
 
 *    Returns whether a view is being used in a compositing hierarchy.
1236
 
 *  
1237
 
 *  Discussion:
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.
1243
 
 *  
1244
 
 *  Mac OS X threading:
1245
 
 *    Not thread safe
1246
 
 *  
1247
 
 *  Parameters:
1248
 
 *    
1249
 
 *    inView:
1250
 
 *      The view whose compositing state you wish to determine.
1251
 
 *  
1252
 
 *  Result:
1253
 
 *    A boolean value indicating whether the view is in compositing
1254
 
 *    mode (true) or non-compositing mode (false).
1255
 
 *  
1256
 
 *  Availability:
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
1260
 
 }
1261
 
function HIViewIsCompositingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsCompositingEnabled';
1262
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1263
 
 
1264
 
 
1265
 
{
1266
 
 *  HIViewSetText()
1267
 
 *  
1268
 
 *  Summary:
1269
 
 *    Sets the text of a view to the specified string.
1270
 
 *  
1271
 
 *  Discussion:
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.
1277
 
 *  
1278
 
 *  Mac OS X threading:
1279
 
 *    Not thread safe
1280
 
 *  
1281
 
 *  Parameters:
1282
 
 *    
1283
 
 *    inView:
1284
 
 *      The view whose text is being set.
1285
 
 *    
1286
 
 *    inText:
1287
 
 *      The text to set for the view. The string is copied by the view,
1288
 
 *      and may be released by the caller afterwards.
1289
 
 *  
1290
 
 *  Result:
1291
 
 *    A result code indicating success or failure.
1292
 
 *  
1293
 
 *  Availability:
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
1297
 
 }
1298
 
function HIViewSetText( inView: HIViewRef; inText: CFStringRef ): OSStatus; external name '_HIViewSetText';
1299
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1300
 
 
1301
 
 
1302
 
{
1303
 
 *  HIViewCopyText()
1304
 
 *  
1305
 
 *  Summary:
1306
 
 *    Makes a copy of the view's text as a CFString.
1307
 
 *  
1308
 
 *  Discussion:
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.
1314
 
 *  
1315
 
 *  Mac OS X threading:
1316
 
 *    Not thread safe
1317
 
 *  
1318
 
 *  Parameters:
1319
 
 *    
1320
 
 *    inView:
1321
 
 *      The view for which to get the text.
1322
 
 *  
1323
 
 *  Result:
1324
 
 *    A CFStringRef containing a copy of the view's text. The caller of
1325
 
 *    HIViewCopyText is responsible for releasing the returned text.
1326
 
 *  
1327
 
 *  Availability:
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
1331
 
 }
1332
 
function HIViewCopyText( inView: HIViewRef ): CFStringRef; external name '_HIViewCopyText';
1333
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1334
 
 
1335
 
 
1336
 
{
1337
 
 *  HIViewGetValue()
1338
 
 *  
1339
 
 *  Summary:
1340
 
 *    Gets a view's value.
1341
 
 *  
1342
 
 *  Mac OS X threading:
1343
 
 *    Not thread safe
1344
 
 *  
1345
 
 *  Parameters:
1346
 
 *    
1347
 
 *    inView:
1348
 
 *      The view for which to get the value.
1349
 
 *  
1350
 
 *  Result:
1351
 
 *    The view's value.
1352
 
 *  
1353
 
 *  Availability:
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
1357
 
 }
1358
 
function HIViewGetValue( inView: HIViewRef ): SInt32; external name '_HIViewGetValue';
1359
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1360
 
 
1361
 
 
1362
 
{
1363
 
 *  HIViewSetValue()
1364
 
 *  
1365
 
 *  Summary:
1366
 
 *    Sets a view's value.
1367
 
 *  
1368
 
 *  Mac OS X threading:
1369
 
 *    Not thread safe
1370
 
 *  
1371
 
 *  Parameters:
1372
 
 *    
1373
 
 *    inView:
1374
 
 *      The view whose value is to be set.
1375
 
 *    
1376
 
 *    inValue:
1377
 
 *      The new value.
1378
 
 *  
1379
 
 *  Result:
1380
 
 *    A result code indicating success or failure.
1381
 
 *  
1382
 
 *  Availability:
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
1386
 
 }
1387
 
function HIViewSetValue( inView: HIViewRef; inValue: SInt32 ): OSStatus; external name '_HIViewSetValue';
1388
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1389
 
 
1390
 
 
1391
 
{
1392
 
 *  HIViewGetMinimum()
1393
 
 *  
1394
 
 *  Summary:
1395
 
 *    Gets a view's minimum value.
1396
 
 *  
1397
 
 *  Mac OS X threading:
1398
 
 *    Not thread safe
1399
 
 *  
1400
 
 *  Parameters:
1401
 
 *    
1402
 
 *    inView:
1403
 
 *      The view for which to get the minimum value.
1404
 
 *  
1405
 
 *  Result:
1406
 
 *    The view's minimum value.
1407
 
 *  
1408
 
 *  Availability:
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
1412
 
 }
1413
 
function HIViewGetMinimum( inView: HIViewRef ): SInt32; external name '_HIViewGetMinimum';
1414
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1415
 
 
1416
 
 
1417
 
{
1418
 
 *  HIViewSetMinimum()
1419
 
 *  
1420
 
 *  Summary:
1421
 
 *    Sets a view's minimum value.
1422
 
 *  
1423
 
 *  Mac OS X threading:
1424
 
 *    Not thread safe
1425
 
 *  
1426
 
 *  Parameters:
1427
 
 *    
1428
 
 *    inView:
1429
 
 *      The view whose minimum value is to be set.
1430
 
 *    
1431
 
 *    inMinimum:
1432
 
 *      The new minimum value.
1433
 
 *  
1434
 
 *  Result:
1435
 
 *    A result code indicating success or failure.
1436
 
 *  
1437
 
 *  Availability:
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
1441
 
 }
1442
 
function HIViewSetMinimum( inView: HIViewRef; inMinimum: SInt32 ): OSStatus; external name '_HIViewSetMinimum';
1443
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1444
 
 
1445
 
 
1446
 
{
1447
 
 *  HIViewGetMaximum()
1448
 
 *  
1449
 
 *  Summary:
1450
 
 *    Gets a view's maximum value.
1451
 
 *  
1452
 
 *  Mac OS X threading:
1453
 
 *    Not thread safe
1454
 
 *  
1455
 
 *  Parameters:
1456
 
 *    
1457
 
 *    inView:
1458
 
 *      The view for which to get the maximum value.
1459
 
 *  
1460
 
 *  Result:
1461
 
 *    The view's maximum value.
1462
 
 *  
1463
 
 *  Availability:
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
1467
 
 }
1468
 
function HIViewGetMaximum( inView: HIViewRef ): SInt32; external name '_HIViewGetMaximum';
1469
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1470
 
 
1471
 
 
1472
 
{
1473
 
 *  HIViewSetMaximum()
1474
 
 *  
1475
 
 *  Summary:
1476
 
 *    Sets a view's maximum value.
1477
 
 *  
1478
 
 *  Mac OS X threading:
1479
 
 *    Not thread safe
1480
 
 *  
1481
 
 *  Parameters:
1482
 
 *    
1483
 
 *    inView:
1484
 
 *      The view whose maximum value is to be set.
1485
 
 *    
1486
 
 *    inMaximum:
1487
 
 *      The new maximum value.
1488
 
 *  
1489
 
 *  Result:
1490
 
 *    A result code indicating success or failure.
1491
 
 *  
1492
 
 *  Availability:
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
1496
 
 }
1497
 
function HIViewSetMaximum( inView: HIViewRef; inMaximum: SInt32 ): OSStatus; external name '_HIViewSetMaximum';
1498
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1499
 
 
1500
 
 
1501
 
{
1502
 
 *  HIViewGetViewSize()
1503
 
 *  
1504
 
 *  Summary:
1505
 
 *    Gets a view's view size.
1506
 
 *  
1507
 
 *  Discussion:
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.
1511
 
 *  
1512
 
 *  Mac OS X threading:
1513
 
 *    Not thread safe
1514
 
 *  
1515
 
 *  Parameters:
1516
 
 *    
1517
 
 *    inView:
1518
 
 *      The view for which to get the view size.
1519
 
 *  
1520
 
 *  Result:
1521
 
 *    The view size.
1522
 
 *  
1523
 
 *  Availability:
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
1527
 
 }
1528
 
function HIViewGetViewSize( inView: HIViewRef ): SInt32; external name '_HIViewGetViewSize';
1529
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1530
 
 
1531
 
 
1532
 
{
1533
 
 *  HIViewSetViewSize()
1534
 
 *  
1535
 
 *  Summary:
1536
 
 *    Sets a view's view size.
1537
 
 *  
1538
 
 *  Discussion:
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.
1542
 
 *  
1543
 
 *  Mac OS X threading:
1544
 
 *    Not thread safe
1545
 
 *  
1546
 
 *  Parameters:
1547
 
 *    
1548
 
 *    inView:
1549
 
 *      The view whose view size is to be set.
1550
 
 *    
1551
 
 *    inViewSize:
1552
 
 *      The new view size.
1553
 
 *  
1554
 
 *  Result:
1555
 
 *    A result code indicating success or failure.
1556
 
 *  
1557
 
 *  Availability:
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
1561
 
 }
1562
 
function HIViewSetViewSize( inView: HIViewRef; inViewSize: SInt32 ): OSStatus; external name '_HIViewSetViewSize';
1563
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1564
 
 
1565
 
 
1566
 
{
1567
 
 *  HIViewIsValid()
1568
 
 *  
1569
 
 *  Summary:
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
1572
 
 *    view.
1573
 
 *  
1574
 
 *  Mac OS X threading:
1575
 
 *    Not thread safe
1576
 
 *  
1577
 
 *  Parameters:
1578
 
 *    
1579
 
 *    inView:
1580
 
 *      The view to test for validity.
1581
 
 *  
1582
 
 *  Result:
1583
 
 *    True if the view is a valid view, otherwise, false.
1584
 
 *  
1585
 
 *  Availability:
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
1589
 
 }
1590
 
function HIViewIsValid( inView: HIViewRef ): Boolean; external name '_HIViewIsValid';
1591
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1592
 
 
1593
 
 
1594
 
{
1595
 
 *  HIViewSetID()
1596
 
 *  
1597
 
 *  Summary:
1598
 
 *    Sets the HIViewID of a view.
1599
 
 *  
1600
 
 *  Mac OS X threading:
1601
 
 *    Not thread safe
1602
 
 *  
1603
 
 *  Parameters:
1604
 
 *    
1605
 
 *    inView:
1606
 
 *      The view for which to set the ID.
1607
 
 *    
1608
 
 *    inID:
1609
 
 *      The ID to set on the view.
1610
 
 *  
1611
 
 *  Result:
1612
 
 *    A result code indicating success or failure.
1613
 
 *  
1614
 
 *  Availability:
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
1618
 
 }
1619
 
function HIViewSetID( inView: HIViewRef; inID: HIViewID ): OSStatus; external name '_HIViewSetID';
1620
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1621
 
 
1622
 
 
1623
 
{
1624
 
 *  HIViewGetID()
1625
 
 *  
1626
 
 *  Summary:
1627
 
 *    Gets the HIViewID of a view.
1628
 
 *  
1629
 
 *  Mac OS X threading:
1630
 
 *    Not thread safe
1631
 
 *  
1632
 
 *  Parameters:
1633
 
 *    
1634
 
 *    inView:
1635
 
 *      The view for which to get the ID.
1636
 
 *    
1637
 
 *    outID:
1638
 
 *      A pointer to an HIViewID to be filled with the view's ID.
1639
 
 *  
1640
 
 *  Result:
1641
 
 *    A result code indicating success or failure.
1642
 
 *  
1643
 
 *  Availability:
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
1647
 
 }
1648
 
function HIViewGetID( inView: HIViewRef; var outID: HIViewID ): OSStatus; external name '_HIViewGetID';
1649
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1650
 
 
1651
 
 
1652
 
{
1653
 
 *  HIViewSetCommandID()
1654
 
 *  
1655
 
 *  Summary:
1656
 
 *    Sets the command ID of a view.
1657
 
 *  
1658
 
 *  Mac OS X threading:
1659
 
 *    Not thread safe
1660
 
 *  
1661
 
 *  Parameters:
1662
 
 *    
1663
 
 *    inView:
1664
 
 *      The view for which to set the command ID.
1665
 
 *    
1666
 
 *    inCommandID:
1667
 
 *      The command ID to set on the view.
1668
 
 *  
1669
 
 *  Result:
1670
 
 *    A result code indicating success or failure.
1671
 
 *  
1672
 
 *  Availability:
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
1676
 
 }
1677
 
function HIViewSetCommandID( inView: HIViewRef; inCommandID: UInt32 ): OSStatus; external name '_HIViewSetCommandID';
1678
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1679
 
 
1680
 
 
1681
 
{
1682
 
 *  HIViewGetCommandID()
1683
 
 *  
1684
 
 *  Summary:
1685
 
 *    Gets the command ID of a view.
1686
 
 *  
1687
 
 *  Mac OS X threading:
1688
 
 *    Not thread safe
1689
 
 *  
1690
 
 *  Parameters:
1691
 
 *    
1692
 
 *    inView:
1693
 
 *      The view for which to get the command ID.
1694
 
 *    
1695
 
 *    outCommandID:
1696
 
 *      A pointer to a UInt32 to fill with the view's command id.
1697
 
 *  
1698
 
 *  Result:
1699
 
 *    A result code indicating success or failure.
1700
 
 *  
1701
 
 *  Availability:
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
1705
 
 }
1706
 
function HIViewGetCommandID( inView: HIViewRef; var outCommandID: UInt32 ): OSStatus; external name '_HIViewGetCommandID';
1707
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1708
 
 
1709
 
 
1710
 
{
1711
 
 *  HIViewGetKind()
1712
 
 *  
1713
 
 *  Summary:
1714
 
 *    Returns the kind of the given view.
1715
 
 *  
1716
 
 *  Mac OS X threading:
1717
 
 *    Not thread safe
1718
 
 *  
1719
 
 *  Parameters:
1720
 
 *    
1721
 
 *    inView:
1722
 
 *      The view whose kind to get.
1723
 
 *    
1724
 
 *    outViewKind:
1725
 
 *      On successful exit, this will contain the view signature and
1726
 
 *      kind. See ControlDefinitions.h or HIView.h for the kinds of
1727
 
 *      each system view.
1728
 
 *  
1729
 
 *  Availability:
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
1733
 
 }
1734
 
function HIViewGetKind( inView: HIViewRef; var outViewKind: HIViewKind ): OSStatus; external name '_HIViewGetKind';
1735
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1736
 
 
1737
 
 
1738
 
{==============================================================================}
1739
 
{  POSITIONING                                                                 }
1740
 
{==============================================================================}
1741
 
{
1742
 
 *  HIViewGetBounds()
1743
 
 *  
1744
 
 *  Discussion:
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
1749
 
 *    instead.
1750
 
 *  
1751
 
 *  Mac OS X threading:
1752
 
 *    Not thread safe
1753
 
 *  
1754
 
 *  Parameters:
1755
 
 *    
1756
 
 *    inView:
1757
 
 *      The view whose bounds you wish to determine.
1758
 
 *    
1759
 
 *    outRect:
1760
 
 *      The local bounds of the view.
1761
 
 *  
1762
 
 *  Result:
1763
 
 *    An operating system result code.
1764
 
 *  
1765
 
 *  Availability:
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
1769
 
 }
1770
 
function HIViewGetBounds( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetBounds';
1771
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1772
 
 
1773
 
 
1774
 
{
1775
 
 *  HIViewGetFrame()
1776
 
 *  
1777
 
 *  Discussion:
1778
 
 *    Returns the frame of a view. The frame is the bounds of a view
1779
 
 *    relative to its parent's local coordinate system.
1780
 
 *  
1781
 
 *  Mac OS X threading:
1782
 
 *    Not thread safe
1783
 
 *  
1784
 
 *  Parameters:
1785
 
 *    
1786
 
 *    inView:
1787
 
 *      The view whose frame you wish to determine.
1788
 
 *    
1789
 
 *    outRect:
1790
 
 *      The frame of the view.
1791
 
 *  
1792
 
 *  Result:
1793
 
 *    An operating system result code.
1794
 
 *  
1795
 
 *  Availability:
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
1799
 
 }
1800
 
function HIViewGetFrame( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetFrame';
1801
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1802
 
 
1803
 
 
1804
 
{
1805
 
 *  HIViewSetFrame()
1806
 
 *  
1807
 
 *  Discussion:
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.
1811
 
 *  
1812
 
 *  Mac OS X threading:
1813
 
 *    Not thread safe
1814
 
 *  
1815
 
 *  Parameters:
1816
 
 *    
1817
 
 *    inView:
1818
 
 *      The view whose frame you wish to change.
1819
 
 *    
1820
 
 *    inRect:
1821
 
 *      The new frame of the view.
1822
 
 *  
1823
 
 *  Result:
1824
 
 *    An operating system result code.
1825
 
 *  
1826
 
 *  Availability:
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
1830
 
 }
1831
 
function HIViewSetFrame( inView: HIViewRef; const (*var*) inRect: HIRect ): OSStatus; external name '_HIViewSetFrame';
1832
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1833
 
 
1834
 
 
1835
 
{
1836
 
 *  HIViewMoveBy()
1837
 
 *  
1838
 
 *  Discussion:
1839
 
 *    Moves a view by a certain distance, relative to its current
1840
 
 *    location. This affects a view's frame, but not its bounds.
1841
 
 *  
1842
 
 *  Mac OS X threading:
1843
 
 *    Not thread safe
1844
 
 *  
1845
 
 *  Parameters:
1846
 
 *    
1847
 
 *    inView:
1848
 
 *      The view you wish to move.
1849
 
 *    
1850
 
 *    inDX:
1851
 
 *      The horizontal distance to move the view. Negative values move
1852
 
 *      the view to the left, positive values to the right.
1853
 
 *    
1854
 
 *    inDY:
1855
 
 *      The vertical distance to move the view. Negative values move
1856
 
 *      the view upward, positive values downward.
1857
 
 *  
1858
 
 *  Result:
1859
 
 *    An operating system result code.
1860
 
 *  
1861
 
 *  Availability:
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
1865
 
 }
1866
 
function HIViewMoveBy( inView: HIViewRef; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIViewMoveBy';
1867
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1868
 
 
1869
 
 
1870
 
{
1871
 
 *  HIViewPlaceInSuperviewAt()
1872
 
 *  
1873
 
 *  Discussion:
1874
 
 *    Places a view at an absolute location within its parent. This
1875
 
 *    affects the view's frame, but not its bounds.
1876
 
 *  
1877
 
 *  Mac OS X threading:
1878
 
 *    Not thread safe
1879
 
 *  
1880
 
 *  Parameters:
1881
 
 *    
1882
 
 *    inView:
1883
 
 *      The view you wish to position.
1884
 
 *    
1885
 
 *    inX:
1886
 
 *      The absolute horizontal coordinate at which to position the
1887
 
 *      view.
1888
 
 *    
1889
 
 *    inY:
1890
 
 *      The absolute vertical coordinate at which to position the view.
1891
 
 *  
1892
 
 *  Result:
1893
 
 *    An operating system result code.
1894
 
 *  
1895
 
 *  Availability:
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
1899
 
 }
1900
 
function HIViewPlaceInSuperviewAt( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewPlaceInSuperviewAt';
1901
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1902
 
 
1903
 
 
1904
 
{
1905
 
 *  HIViewReshapeStructure()
1906
 
 *  
1907
 
 *  Discussion:
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.
1912
 
 *  
1913
 
 *  Mac OS X threading:
1914
 
 *    Not thread safe
1915
 
 *  
1916
 
 *  Parameters:
1917
 
 *    
1918
 
 *    inView:
1919
 
 *      The view to reshape and invalidate.
1920
 
 *  
1921
 
 *  Result:
1922
 
 *    An operating system result code.
1923
 
 *  
1924
 
 *  Availability:
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
1928
 
 }
1929
 
function HIViewReshapeStructure( inView: HIViewRef ): OSStatus; external name '_HIViewReshapeStructure';
1930
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
1931
 
 
1932
 
 
1933
 
{
1934
 
 *  HIViewRegionChanged()
1935
 
 *  
1936
 
 *  Discussion:
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.
1946
 
 *  
1947
 
 *  Mac OS X threading:
1948
 
 *    Not thread safe
1949
 
 *  
1950
 
 *  Parameters:
1951
 
 *    
1952
 
 *    inView:
1953
 
 *      The view to deal with.
1954
 
 *    
1955
 
 *    inRegionCode:
1956
 
 *      The region that was changed. This can only be the structure
1957
 
 *      opaque, and clickable regions at present.
1958
 
 *  
1959
 
 *  Result:
1960
 
 *    An operating system status code.
1961
 
 *  
1962
 
 *  Availability:
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
1966
 
 }
1967
 
function HIViewRegionChanged( inView: HIViewRef; inRegionCode: HIViewPartCode ): OSStatus; external name '_HIViewRegionChanged';
1968
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
1969
 
 
1970
 
 
1971
 
{
1972
 
 *  HIViewCopyShape()
1973
 
 *  
1974
 
 *  Summary:
1975
 
 *    Copies the shape of a part of a view. See the discussion on
1976
 
 *    meta-parts in this header for more information
1977
 
 *  
1978
 
 *  Mac OS X threading:
1979
 
 *    Not thread safe
1980
 
 *  
1981
 
 *  Parameters:
1982
 
 *    
1983
 
 *    inView:
1984
 
 *      The view for which to copy the shape.
1985
 
 *    
1986
 
 *    inPart:
1987
 
 *      The part of the view whose shape is to be copied.
1988
 
 *    
1989
 
 *    outShape:
1990
 
 *      On exit, contains a newly created shape. The caller of
1991
 
 *      HIViewCopyShape is responsible for releasing the copied shape.
1992
 
 *  
1993
 
 *  Result:
1994
 
 *    A result code indicating success or failure.
1995
 
 *  
1996
 
 *  Availability:
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
2000
 
 }
2001
 
function HIViewCopyShape( inView: HIViewRef; inPart: HIViewPartCode; var outShape: HIShapeRef ): OSStatus; external name '_HIViewCopyShape';
2002
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2003
 
 
2004
 
 
2005
 
{
2006
 
 *  HIViewGetOptimalBounds()
2007
 
 *  
2008
 
 *  Summary:
2009
 
 *    Obtain a view's optimal size and/or text placement.
2010
 
 *  
2011
 
 *  Mac OS X threading:
2012
 
 *    Not thread safe
2013
 
 *  
2014
 
 *  Parameters:
2015
 
 *    
2016
 
 *    inView:
2017
 
 *      The view to examine.
2018
 
 *    
2019
 
 *    outBounds:
2020
 
 *      A pointer to an HIRect to be filled with the view's optimal
2021
 
 *      bounds. Can be NULL.
2022
 
 *    
2023
 
 *    outBaseLineOffset:
2024
 
 *      A pointer to a float to be filled with the view's optimal text
2025
 
 *      placement. Can be NULL.
2026
 
 *  
2027
 
 *  Result:
2028
 
 *    A result code indicating success or failure.
2029
 
 *  
2030
 
 *  Availability:
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
2034
 
 }
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 *)
2037
 
 
2038
 
 
2039
 
{==============================================================================}
2040
 
{  HIT TESTING/EVENT HANDLING                                                  }
2041
 
{==============================================================================}
2042
 
{
2043
 
 *  HIViewGetViewForMouseEvent()
2044
 
 *  
2045
 
 *  Discussion:
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.
2056
 
 *  
2057
 
 *  Mac OS X threading:
2058
 
 *    Not thread safe
2059
 
 *  
2060
 
 *  Parameters:
2061
 
 *    
2062
 
 *    inView:
2063
 
 *      The view to start from. You should pass the window's root view.
2064
 
 *    
2065
 
 *    inEvent:
2066
 
 *      The mouse event in question.
2067
 
 *    
2068
 
 *    outView:
2069
 
 *      The view that the mouse event should be sent to.
2070
 
 *  
2071
 
 *  Result:
2072
 
 *    An operating system result code.
2073
 
 *  
2074
 
 *  Availability:
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
2078
 
 }
2079
 
function HIViewGetViewForMouseEvent( inView: HIViewRef; inEvent: EventRef; var outView: HIViewRef ): OSStatus; external name '_HIViewGetViewForMouseEvent';
2080
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2081
 
 
2082
 
 
2083
 
{
2084
 
 *  HIViewClick()
2085
 
 *  
2086
 
 *  Discussion:
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.
2091
 
 *  
2092
 
 *  Mac OS X threading:
2093
 
 *    Not thread safe
2094
 
 *  
2095
 
 *  Parameters:
2096
 
 *    
2097
 
 *    inView:
2098
 
 *      The view to handle the event.
2099
 
 *    
2100
 
 *    inEvent:
2101
 
 *      The mouse event to handle.
2102
 
 *  
2103
 
 *  Result:
2104
 
 *    An operating system result code.
2105
 
 *  
2106
 
 *  Availability:
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
2110
 
 }
2111
 
function HIViewClick( inView: HIViewRef; inEvent: EventRef ): OSStatus; external name '_HIViewClick';
2112
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2113
 
 
2114
 
 
2115
 
{
2116
 
 *  HIViewSimulateClick()
2117
 
 *  
2118
 
 *  Discussion:
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.
2123
 
 *    
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.
2132
 
 *  
2133
 
 *  Mac OS X threading:
2134
 
 *    Not thread safe
2135
 
 *  
2136
 
 *  Parameters:
2137
 
 *    
2138
 
 *    inView:
2139
 
 *      The view to test the part hit.
2140
 
 *    
2141
 
 *    inPartToClick:
2142
 
 *      The part the view should consider to be clicked.
2143
 
 *    
2144
 
 *    inModifiers:
2145
 
 *      The modifiers the view can consider for its click action.
2146
 
 *    
2147
 
 *    outPartClicked:
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.
2150
 
 *  
2151
 
 *  Result:
2152
 
 *    An operating system result code.
2153
 
 *  
2154
 
 *  Availability:
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
2158
 
 }
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 *)
2161
 
 
2162
 
 
2163
 
{
2164
 
 *  HIViewGetPartHit()
2165
 
 *  
2166
 
 *  Discussion:
2167
 
 *    Given a view, and a view-relative point, this function returns
2168
 
 *    the part code hit as determined by the view.
2169
 
 *  
2170
 
 *  Mac OS X threading:
2171
 
 *    Not thread safe
2172
 
 *  
2173
 
 *  Parameters:
2174
 
 *    
2175
 
 *    inView:
2176
 
 *      The view to test the part hit.
2177
 
 *    
2178
 
 *    inPoint:
2179
 
 *      The view-relative point to use.
2180
 
 *    
2181
 
 *    outPart:
2182
 
 *      The part hit by inPoint.
2183
 
 *  
2184
 
 *  Result:
2185
 
 *    An operating system result code.
2186
 
 *  
2187
 
 *  Availability:
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
2191
 
 }
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 *)
2194
 
 
2195
 
 
2196
 
{
2197
 
 *  HIViewGetSubviewHit()
2198
 
 *  
2199
 
 *  Discussion:
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.
2203
 
 *  
2204
 
 *  Mac OS X threading:
2205
 
 *    Not thread safe
2206
 
 *  
2207
 
 *  Parameters:
2208
 
 *    
2209
 
 *    inView:
2210
 
 *      The view you wish to start from.
2211
 
 *    
2212
 
 *    inPoint:
2213
 
 *      The mouse coordinate to use. This is passed in the local
2214
 
 *      coordinate system of inView.
2215
 
 *    
2216
 
 *    inDeep:
2217
 
 *      Pass true to find the deepest child hit, false to go only one
2218
 
 *      level deep (just check direct children of inView).
2219
 
 *    
2220
 
 *    outView:
2221
 
 *      The view hit by inPoint, or NULL if no subview was hit.
2222
 
 *  
2223
 
 *  Result:
2224
 
 *    An operating system result code.
2225
 
 *  
2226
 
 *  Availability:
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
2230
 
 }
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 *)
2233
 
 
2234
 
 
2235
 
{==============================================================================}
2236
 
{  HIView-based tracking areas                                                 }
2237
 
{==============================================================================}
2238
 
type
2239
 
        HIViewTrackingAreaRef = ^SInt32; { an opaque 32-bit type }
2240
 
const
2241
 
        kEventParamHIViewTrackingArea = $63747261 (* 'ctra' *); { typeHIViewTrackingAreaRef}
2242
 
        typeHIViewTrackingAreaRef = $63747261 (* 'ctra' *);
2243
 
 
2244
 
{
2245
 
 *  kEventClassControl / kEventControlTrackingAreaEntered
2246
 
 *  
2247
 
 *  Summary:
2248
 
 *    The mouse has entered a tracking area owned by your control.
2249
 
 *  
2250
 
 *  Discussion:
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.
2254
 
 *  
2255
 
 *  Mac OS X threading:
2256
 
 *    Not thread safe
2257
 
 *  
2258
 
 *  Parameters:
2259
 
 *    
2260
 
 *    --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
2261
 
 *          The tracking area that was entered.
2262
 
 *    
2263
 
 *    --> kEventParamKeyModifiers (in, typeUInt32)
2264
 
 *          The keyboard modifiers that were in effect when the mouse
2265
 
 *          entered.
2266
 
 *    
2267
 
 *    --> kEventParamMouseLocation (in, typeHIPoint)
2268
 
 *          The location of the mouse in view coordinates.
2269
 
 *  
2270
 
 *  Availability:
2271
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
2272
 
 *    CarbonLib:        not available
2273
 
 }
2274
 
const
2275
 
        kEventControlTrackingAreaEntered = 23;
2276
 
 
2277
 
{
2278
 
 *  kEventClassControl / kEventControlTrackingAreaExited
2279
 
 *  
2280
 
 *  Summary:
2281
 
 *    The mouse has exited a tracking area owned by your control.
2282
 
 *  
2283
 
 *  Discussion:
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.
2287
 
 *  
2288
 
 *  Mac OS X threading:
2289
 
 *    Not thread safe
2290
 
 *  
2291
 
 *  Parameters:
2292
 
 *    
2293
 
 *    --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
2294
 
 *          The tracking area that was entered.
2295
 
 *    
2296
 
 *    --> kEventParamKeyModifiers (in, typeUInt32)
2297
 
 *          The keyboard modifiers that were in effect when the mouse
2298
 
 *          left.
2299
 
 *    
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.
2305
 
 *  
2306
 
 *  Availability:
2307
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
2308
 
 *    CarbonLib:        not available
2309
 
 }
2310
 
const
2311
 
        kEventControlTrackingAreaExited = 24;
2312
 
 
2313
 
 
2314
 
type
2315
 
        HIViewTrackingAreaID = UInt64;
2316
 
{
2317
 
 *  HIViewNewTrackingArea()
2318
 
 *  
2319
 
 *  Summary:
2320
 
 *    Creates a new tracking area for a view.
2321
 
 *  
2322
 
 *  Mac OS X threading:
2323
 
 *    Not thread safe
2324
 
 *  
2325
 
 *  Parameters:
2326
 
 *    
2327
 
 *    inView:
2328
 
 *      The view to create a tracking area for.
2329
 
 *    
2330
 
 *    inShape:
2331
 
 *      The shape to use. Pass NULL to indicate the entire structure
2332
 
 *      region of the view is to be used.
2333
 
 *    
2334
 
 *    inID:
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.
2337
 
 *    
2338
 
 *    outRef:
2339
 
 *      A reference to the newly created tracking area. This references
2340
 
 *      is NOT refcounted.
2341
 
 *  
2342
 
 *  Result:
2343
 
 *    An operating system status code.
2344
 
 *  
2345
 
 *  Availability:
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
2349
 
 }
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 *)
2352
 
 
2353
 
 
2354
 
{
2355
 
 *  HIViewChangeTrackingArea()
2356
 
 *  
2357
 
 *  Summary:
2358
 
 *    Alters the shape of an existing tracking area.
2359
 
 *  
2360
 
 *  Mac OS X threading:
2361
 
 *    Not thread safe
2362
 
 *  
2363
 
 *  Parameters:
2364
 
 *    
2365
 
 *    inArea:
2366
 
 *      The area to change.
2367
 
 *    
2368
 
 *    inShape:
2369
 
 *      The shape to use. Pass NULL to indicate the entire structure
2370
 
 *      region of the view is to be used.
2371
 
 *  
2372
 
 *  Result:
2373
 
 *    An operating system status code.
2374
 
 *  
2375
 
 *  Availability:
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
2379
 
 }
2380
 
function HIViewChangeTrackingArea( inArea: HIViewTrackingAreaRef; inShape: HIShapeRef ): OSStatus; external name '_HIViewChangeTrackingArea';
2381
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2382
 
 
2383
 
 
2384
 
{
2385
 
 *  HIViewGetTrackingAreaID()
2386
 
 *  
2387
 
 *  Summary:
2388
 
 *    Retrieves the HIViewTrackingAreaID of an existing tracking area.
2389
 
 *    This value was set upon creation of the HIViewTrackingArea.
2390
 
 *  
2391
 
 *  Mac OS X threading:
2392
 
 *    Not thread safe
2393
 
 *  
2394
 
 *  Parameters:
2395
 
 *    
2396
 
 *    inArea:
2397
 
 *      The area whose HIViewTrackingAreaID to retrieve.
2398
 
 *    
2399
 
 *    outID:
2400
 
 *      The HIViewTrackingAreaID for this tracking area.
2401
 
 *  
2402
 
 *  Result:
2403
 
 *    An operating system status code.
2404
 
 *  
2405
 
 *  Availability:
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
2409
 
 }
2410
 
function HIViewGetTrackingAreaID( inArea: HIViewTrackingAreaRef; var outID: HIViewTrackingAreaID ): OSStatus; external name '_HIViewGetTrackingAreaID';
2411
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2412
 
 
2413
 
 
2414
 
{
2415
 
 *  HIViewDisposeTrackingArea()
2416
 
 *  
2417
 
 *  Summary:
2418
 
 *    Disposes an existing tracking area. The reference is considered
2419
 
 *    to be invalid after calling this function.
2420
 
 *  
2421
 
 *  Mac OS X threading:
2422
 
 *    Not thread safe
2423
 
 *  
2424
 
 *  Parameters:
2425
 
 *    
2426
 
 *    inArea:
2427
 
 *      The area to dispose.
2428
 
 *  
2429
 
 *  Result:
2430
 
 *    An operating system status code.
2431
 
 *  
2432
 
 *  Availability:
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
2436
 
 }
2437
 
function HIViewDisposeTrackingArea( inArea: HIViewTrackingAreaRef ): OSStatus; external name '_HIViewDisposeTrackingArea';
2438
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2439
 
 
2440
 
 
2441
 
{==============================================================================}
2442
 
{  DISPLAY                                                                     }
2443
 
{==============================================================================}
2444
 
{
2445
 
 *  HIViewGetNeedsDisplay()
2446
 
 *  
2447
 
 *  Discussion:
2448
 
 *    Returns true if the view passed in or any subview of it requires
2449
 
 *    redrawing (i.e. part of it has been invalidated).
2450
 
 *  
2451
 
 *  Mac OS X threading:
2452
 
 *    Not thread safe
2453
 
 *  
2454
 
 *  Parameters:
2455
 
 *    
2456
 
 *    inView:
2457
 
 *      The view to inspect.
2458
 
 *  
2459
 
 *  Result:
2460
 
 *    A boolean result code.
2461
 
 *  
2462
 
 *  Availability:
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
2466
 
 }
2467
 
function HIViewGetNeedsDisplay( inView: HIViewRef ): Boolean; external name '_HIViewGetNeedsDisplay';
2468
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2469
 
 
2470
 
 
2471
 
{
2472
 
 *  HIViewSetNeedsDisplay()
2473
 
 *  
2474
 
 *  Discussion:
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.
2478
 
 *  
2479
 
 *  Mac OS X threading:
2480
 
 *    Not thread safe
2481
 
 *  
2482
 
 *  Parameters:
2483
 
 *    
2484
 
 *    inView:
2485
 
 *      The view to mark dirty.
2486
 
 *    
2487
 
 *    inNeedsDisplay:
2488
 
 *      A boolean which indicates whether inView needs to be redrawn or
2489
 
 *      not.
2490
 
 *  
2491
 
 *  Result:
2492
 
 *    An operating system result code.
2493
 
 *  
2494
 
 *  Availability:
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
2498
 
 }
2499
 
function HIViewSetNeedsDisplay( inView: HIViewRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplay';
2500
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2501
 
 
2502
 
 
2503
 
{
2504
 
 *  HIViewSetNeedsDisplayInRect()
2505
 
 *  
2506
 
 *  Discussion:
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.
2512
 
 *  
2513
 
 *  Mac OS X threading:
2514
 
 *    Not thread safe
2515
 
 *  
2516
 
 *  Parameters:
2517
 
 *    
2518
 
 *    inView:
2519
 
 *      The view to mark dirty.
2520
 
 *    
2521
 
 *    inRect:
2522
 
 *      The rectangle encompassing the area to mark dirty or clean.
2523
 
 *    
2524
 
 *    inNeedsDisplay:
2525
 
 *      A boolean which indicates whether or not inRect should be added
2526
 
 *      to the invalid region or removed from it.
2527
 
 *  
2528
 
 *  Result:
2529
 
 *    An operating system result code.
2530
 
 *  
2531
 
 *  Availability:
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
2535
 
 }
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 *)
2538
 
 
2539
 
 
2540
 
{
2541
 
 *  HIViewSetNeedsDisplayInShape()
2542
 
 *  
2543
 
 *  Discussion:
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.
2549
 
 *  
2550
 
 *  Mac OS X threading:
2551
 
 *    Not thread safe
2552
 
 *  
2553
 
 *  Parameters:
2554
 
 *    
2555
 
 *    inView:
2556
 
 *      The view to mark dirty.
2557
 
 *    
2558
 
 *    inArea:
2559
 
 *      The area to mark dirty or clean.
2560
 
 *    
2561
 
 *    inNeedsDisplay:
2562
 
 *      A boolean which indicates whether or not inArea should be added
2563
 
 *      to the invalid region or removed from it.
2564
 
 *  
2565
 
 *  Result:
2566
 
 *    An operating system result code.
2567
 
 *  
2568
 
 *  Availability:
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
2572
 
 }
2573
 
function HIViewSetNeedsDisplayInShape( inView: HIViewRef; inArea: HIShapeRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInShape';
2574
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2575
 
 
2576
 
 
2577
 
{
2578
 
 *  HIViewSetNeedsDisplayInRegion()
2579
 
 *  
2580
 
 *  Discussion:
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.
2586
 
 *  
2587
 
 *  Mac OS X threading:
2588
 
 *    Not thread safe
2589
 
 *  
2590
 
 *  Parameters:
2591
 
 *    
2592
 
 *    inView:
2593
 
 *      The view to mark dirty.
2594
 
 *    
2595
 
 *    inRgn:
2596
 
 *      The region to mark dirty or clean.
2597
 
 *    
2598
 
 *    inNeedsDisplay:
2599
 
 *      A boolean which indicates whether or not inRgn should be added
2600
 
 *      to the invalid region or removed from it.
2601
 
 *  
2602
 
 *  Result:
2603
 
 *    An operating system result code.
2604
 
 *  
2605
 
 *  Availability:
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
2609
 
 }
2610
 
function HIViewSetNeedsDisplayInRegion( inView: HIViewRef; inRgn: RgnHandle; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInRegion';
2611
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2612
 
 
2613
 
 
2614
 
{
2615
 
 *  HIViewRender()
2616
 
 *  
2617
 
 *  Discussion:
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.
2635
 
 *  
2636
 
 *  Mac OS X threading:
2637
 
 *    Not thread safe
2638
 
 *  
2639
 
 *  Parameters:
2640
 
 *    
2641
 
 *    inView:
2642
 
 *      The view to draw.
2643
 
 *  
2644
 
 *  Result:
2645
 
 *    An operating system result code.
2646
 
 *  
2647
 
 *  Availability:
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
2651
 
 }
2652
 
function HIViewRender( inView: HIViewRef ): OSStatus; external name '_HIViewRender';
2653
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2654
 
 
2655
 
 
2656
 
{
2657
 
 *  HIViewFlashDirtyArea()
2658
 
 *  
2659
 
 *  Discussion:
2660
 
 *    Debugging aid. Flashes the region which would be redrawn at the
2661
 
 *    next draw time for an entire window.
2662
 
 *  
2663
 
 *  Mac OS X threading:
2664
 
 *    Not thread safe
2665
 
 *  
2666
 
 *  Parameters:
2667
 
 *    
2668
 
 *    inWindow:
2669
 
 *      The window to flash the dirty region for.
2670
 
 *  
2671
 
 *  Result:
2672
 
 *    An operating system result code.
2673
 
 *  
2674
 
 *  Availability:
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
2678
 
 }
2679
 
function HIViewFlashDirtyArea( inWindow: WindowRef ): OSStatus; external name '_HIViewFlashDirtyArea';
2680
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2681
 
 
2682
 
 
2683
 
{
2684
 
 *  HIViewGetSizeConstraints()
2685
 
 *  
2686
 
 *  Discussion:
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.
2690
 
 *  
2691
 
 *  Mac OS X threading:
2692
 
 *    Not thread safe
2693
 
 *  
2694
 
 *  Parameters:
2695
 
 *    
2696
 
 *    inView:
2697
 
 *      The view to inspect.
2698
 
 *    
2699
 
 *    outMinSize:
2700
 
 *      The minimum size the view can be. May be NULL if you don't need
2701
 
 *      this information.
2702
 
 *    
2703
 
 *    outMaxSize:
2704
 
 *      The maximum size the view can be. May be NULL if you don't need
2705
 
 *      this information.
2706
 
 *  
2707
 
 *  Result:
2708
 
 *    An operating system result code.
2709
 
 *  
2710
 
 *  Availability:
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
2714
 
 }
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 *)
2717
 
 
2718
 
 
2719
 
{==============================================================================}
2720
 
{  COORDINATE SYSTEM CONVERSION                                                }
2721
 
{==============================================================================}
2722
 
{
2723
 
 *  HIViewConvertPoint()
2724
 
 *  
2725
 
 *  Discussion:
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.
2728
 
 *  
2729
 
 *  Mac OS X threading:
2730
 
 *    Not thread safe
2731
 
 *  
2732
 
 *  Parameters:
2733
 
 *    
2734
 
 *    ioPoint:
2735
 
 *      The point to convert.
2736
 
 *    
2737
 
 *    inSourceView:
2738
 
 *      The view whose coordinate system ioPoint is starting out in.
2739
 
 *      You can pass NULL to indicate that ioPoint is a window-relative
2740
 
 *      point.
2741
 
 *    
2742
 
 *    inDestView:
2743
 
 *      The view whose coordinate system ioPoint should end up in. You
2744
 
 *      can pass NULL to indicate that ioPoint is a window-relative
2745
 
 *      point.
2746
 
 *  
2747
 
 *  Result:
2748
 
 *    An operating system result code.
2749
 
 *  
2750
 
 *  Availability:
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
2754
 
 }
2755
 
function HIViewConvertPoint( var ioPoint: HIPoint; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertPoint';
2756
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2757
 
 
2758
 
 
2759
 
{
2760
 
 *  HIViewConvertRect()
2761
 
 *  
2762
 
 *  Discussion:
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.
2765
 
 *  
2766
 
 *  Mac OS X threading:
2767
 
 *    Not thread safe
2768
 
 *  
2769
 
 *  Parameters:
2770
 
 *    
2771
 
 *    ioRect:
2772
 
 *      The rectangle to convert.
2773
 
 *    
2774
 
 *    inSourceView:
2775
 
 *      The view whose coordinate system ioRect is starting out in. You
2776
 
 *      can pass NULL to indicate that ioRect is a window-relative
2777
 
 *      rectangle.
2778
 
 *    
2779
 
 *    inDestView:
2780
 
 *      The view whose coordinate system ioRect should end up in. You
2781
 
 *      can pass NULL to indicate that ioRect is a window-relative
2782
 
 *      rectangle.
2783
 
 *  
2784
 
 *  Result:
2785
 
 *    An operating system result code.
2786
 
 *  
2787
 
 *  Availability:
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
2791
 
 }
2792
 
function HIViewConvertRect( var ioRect: HIRect; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRect';
2793
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2794
 
 
2795
 
 
2796
 
{
2797
 
 *  HIViewConvertRegion()
2798
 
 *  
2799
 
 *  Discussion:
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.
2802
 
 *  
2803
 
 *  Mac OS X threading:
2804
 
 *    Not thread safe
2805
 
 *  
2806
 
 *  Parameters:
2807
 
 *    
2808
 
 *    ioRgn:
2809
 
 *      The region to convert.
2810
 
 *    
2811
 
 *    inSourceView:
2812
 
 *      The view whose coordinate system ioRgn is starting out in. You
2813
 
 *      can pass NULL to indicate that ioRgn is a window-relative
2814
 
 *      region.
2815
 
 *    
2816
 
 *    inDestView:
2817
 
 *      The view whose coordinate system ioRgn should end up in. You
2818
 
 *      can pass NULL to indicate that ioRgn is a window-relative
2819
 
 *      region.
2820
 
 *  
2821
 
 *  Result:
2822
 
 *    An operating system result code.
2823
 
 *  
2824
 
 *  Availability:
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
2828
 
 }
2829
 
function HIViewConvertRegion( ioRgn: RgnHandle; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRegion';
2830
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2831
 
 
2832
 
 
2833
 
{
2834
 
 *  HIViewSetDrawingEnabled()
2835
 
 *  
2836
 
 *  Discussion:
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
2840
 
 *    drawing is off.
2841
 
 *  
2842
 
 *  Mac OS X threading:
2843
 
 *    Not thread safe
2844
 
 *  
2845
 
 *  Parameters:
2846
 
 *    
2847
 
 *    inView:
2848
 
 *      The view to enable or disable drawing for.
2849
 
 *    
2850
 
 *    inEnabled:
2851
 
 *      A boolean value indicating whether drawing should be on (true)
2852
 
 *      or off (false).
2853
 
 *  
2854
 
 *  Result:
2855
 
 *    An operating system result code.
2856
 
 *  
2857
 
 *  Availability:
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
2861
 
 }
2862
 
function HIViewSetDrawingEnabled( inView: HIViewRef; inEnabled: Boolean ): OSStatus; external name '_HIViewSetDrawingEnabled';
2863
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2864
 
 
2865
 
 
2866
 
{
2867
 
 *  HIViewIsDrawingEnabled()
2868
 
 *  
2869
 
 *  Discussion:
2870
 
 *    Determines if drawing is currently enabled for a control.
2871
 
 *  
2872
 
 *  Mac OS X threading:
2873
 
 *    Not thread safe
2874
 
 *  
2875
 
 *  Parameters:
2876
 
 *    
2877
 
 *    inView:
2878
 
 *      The view to get the drawing state for.
2879
 
 *  
2880
 
 *  Result:
2881
 
 *    A boolean value indicating whether drawing is on (true) or off
2882
 
 *    (false).
2883
 
 *  
2884
 
 *  Availability:
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
2888
 
 }
2889
 
function HIViewIsDrawingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsDrawingEnabled';
2890
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2891
 
 
2892
 
 
2893
 
{
2894
 
 *  HIViewScrollRect()
2895
 
 *  
2896
 
 *  Discussion:
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
2903
 
 *    thrashed as well.
2904
 
 *  
2905
 
 *  Mac OS X threading:
2906
 
 *    Not thread safe
2907
 
 *  
2908
 
 *  Parameters:
2909
 
 *    
2910
 
 *    inView:
2911
 
 *      The view to scroll. The bits drawn by the view's descendent
2912
 
 *      views will also be scrolled.
2913
 
 *    
2914
 
 *    inRect:
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.
2918
 
 *    
2919
 
 *    inDX:
2920
 
 *      The horizontal distance to scroll. Positive values shift to the
2921
 
 *      right, negative values shift to the left.
2922
 
 *    
2923
 
 *    inDY:
2924
 
 *      The vertical distance to scroll. Positive values shift
2925
 
 *      downward, negative values shift upward.
2926
 
 *  
2927
 
 *  Result:
2928
 
 *    An operating system result code.
2929
 
 *  
2930
 
 *  Availability:
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
2934
 
 }
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 *)
2937
 
 
2938
 
 
2939
 
{
2940
 
 *  HIViewSetBoundsOrigin()
2941
 
 *  
2942
 
 *  Discussion:
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.
2947
 
 *  
2948
 
 *  Mac OS X threading:
2949
 
 *    Not thread safe
2950
 
 *  
2951
 
 *  Parameters:
2952
 
 *    
2953
 
 *    inView:
2954
 
 *      The view whose origin you wish to adjust.
2955
 
 *    
2956
 
 *    inX:
2957
 
 *      The X coordinate.
2958
 
 *    
2959
 
 *    inY:
2960
 
 *      The Y coordinate.
2961
 
 *  
2962
 
 *  Result:
2963
 
 *    An operating system result code.
2964
 
 *  
2965
 
 *  Availability:
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
2969
 
 }
2970
 
function HIViewSetBoundsOrigin( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewSetBoundsOrigin';
2971
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2972
 
 
2973
 
 
2974
 
{==============================================================================}
2975
 
{  KEYBOARD FOCUS                                                              }
2976
 
{==============================================================================}
2977
 
{
2978
 
 *  HIViewAdvanceFocus()
2979
 
 *  
2980
 
 *  Discussion:
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.
2987
 
 *  
2988
 
 *  Mac OS X threading:
2989
 
 *    Not thread safe
2990
 
 *  
2991
 
 *  Parameters:
2992
 
 *    
2993
 
 *    inRootForFocus:
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
2999
 
 *      example.
3000
 
 *    
3001
 
 *    inModifiers:
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.
3006
 
 *  
3007
 
 *  Result:
3008
 
 *    An operating system result code.
3009
 
 *  
3010
 
 *  Availability:
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
3014
 
 }
3015
 
function HIViewAdvanceFocus( inRootForFocus: HIViewRef; inModifiers: EventModifiers ): OSStatus; external name '_HIViewAdvanceFocus';
3016
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3017
 
 
3018
 
 
3019
 
{
3020
 
 *  HIViewGetFocusPart()
3021
 
 *  
3022
 
 *  Discussion:
3023
 
 *    Returns the currently focused part of the given view.
3024
 
 *  
3025
 
 *  Mac OS X threading:
3026
 
 *    Not thread safe
3027
 
 *  
3028
 
 *  Parameters:
3029
 
 *    
3030
 
 *    inView:
3031
 
 *      The view to inquire about.
3032
 
 *    
3033
 
 *    outFocusPart:
3034
 
 *      The part currently focused.
3035
 
 *  
3036
 
 *  Result:
3037
 
 *    An operating system result code.
3038
 
 *  
3039
 
 *  Availability:
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
3043
 
 }
3044
 
function HIViewGetFocusPart( inView: HIViewRef; var outFocusPart: HIViewPartCode ): OSStatus; external name '_HIViewGetFocusPart';
3045
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3046
 
 
3047
 
 
3048
 
{
3049
 
 *  HIViewSubtreeContainsFocus()
3050
 
 *  
3051
 
 *  Discussion:
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.
3055
 
 *  
3056
 
 *  Mac OS X threading:
3057
 
 *    Not thread safe
3058
 
 *  
3059
 
 *  Parameters:
3060
 
 *    
3061
 
 *    inSubtreeStart:
3062
 
 *      The view to start searching at.
3063
 
 *  
3064
 
 *  Result:
3065
 
 *    A boolean result.
3066
 
 *  
3067
 
 *  Availability:
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
3071
 
 }
3072
 
function HIViewSubtreeContainsFocus( inSubtreeStart: HIViewRef ): Boolean; external name '_HIViewSubtreeContainsFocus';
3073
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3074
 
 
3075
 
 
3076
 
{
3077
 
 *  HIViewSetNextFocus()
3078
 
 *  
3079
 
 *  Discussion:
3080
 
 *    This function hard-wires the next sibling view to shift focus to
3081
 
 *    whenever the keyboard focus is advanced.
3082
 
 *  
3083
 
 *  Mac OS X threading:
3084
 
 *    Not thread safe
3085
 
 *  
3086
 
 *  Parameters:
3087
 
 *    
3088
 
 *    inView:
3089
 
 *      The view to set the next focus view for. This parameter and the
3090
 
 *      inNextFocus parameter must both have the same parent view.
3091
 
 *    
3092
 
 *    inNextFocus:
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.
3096
 
 *  
3097
 
 *  Result:
3098
 
 *    An operating system result code.
3099
 
 *  
3100
 
 *  Availability:
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
3104
 
 }
3105
 
function HIViewSetNextFocus( inView: HIViewRef; inNextFocus: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetNextFocus';
3106
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3107
 
 
3108
 
 
3109
 
{
3110
 
 *  HIViewSetFirstSubViewFocus()
3111
 
 *  
3112
 
 *  Discussion:
3113
 
 *    This function hard-wires the first subview to shift focus to
3114
 
 *    whenever the keyboard focus is advanced and the container view is
3115
 
 *    entered.
3116
 
 *  
3117
 
 *  Mac OS X threading:
3118
 
 *    Not thread safe
3119
 
 *  
3120
 
 *  Parameters:
3121
 
 *    
3122
 
 *    inParent:
3123
 
 *      The parent view.
3124
 
 *    
3125
 
 *    inSubView:
3126
 
 *      The first child which should receive focus. Pass NULL to tell
3127
 
 *      the view system to use the default rules.
3128
 
 *  
3129
 
 *  Result:
3130
 
 *    An operating system result code.
3131
 
 *  
3132
 
 *  Availability:
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
3136
 
 }
3137
 
function HIViewSetFirstSubViewFocus( inParent: HIViewRef; inSubView: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetFirstSubViewFocus';
3138
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3139
 
 
3140
 
 
3141
 
{==============================================================================}
3142
 
{  LAYOUT                                                                      }
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
 
{==============================================================================}
3148
 
 
3149
 
{
3150
 
 *  Summary:
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.
3155
 
 *  
3156
 
 *  Discussion:
3157
 
 *    HIBindingKind constants.
3158
 
 }
3159
 
const
3160
 
{
3161
 
   * No binding is to occur.
3162
 
   }
3163
 
        kHILayoutBindNone = 0;
3164
 
 
3165
 
  {
3166
 
   * Bind to the minimum of the axis.
3167
 
   }
3168
 
        kHILayoutBindMin = 1;
3169
 
 
3170
 
  {
3171
 
   * Bind to the maximum of the axis.
3172
 
   }
3173
 
        kHILayoutBindMax = 2;
3174
 
        kHILayoutBindLeft = kHILayoutBindMin;
3175
 
        kHILayoutBindRight = kHILayoutBindMax;
3176
 
 
3177
 
  {
3178
 
   * Synonyms for convenience and clarity.
3179
 
   }
3180
 
        kHILayoutBindTop = kHILayoutBindMin;
3181
 
        kHILayoutBindBottom = kHILayoutBindMax;
3182
 
 
3183
 
type
3184
 
        HIBindingKind = UInt16;
3185
 
 
3186
 
{
3187
 
 *  HISideBinding
3188
 
 *  
3189
 
 *  Summary:
3190
 
 *    A binding for a side of an HIView.
3191
 
 *  
3192
 
 *  Discussion:
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
3197
 
 *    moved".
3198
 
 }
3199
 
type
3200
 
        HISideBinding = record
3201
 
{
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.
3204
 
   }
3205
 
                toView: HIViewRef;                 { NULL means parent}
3206
 
 
3207
 
  {
3208
 
   * An HIBindingKind indicating the bind kind.
3209
 
   }
3210
 
                kind: HIBindingKind;
3211
 
 
3212
 
  {
3213
 
   * Not currently used. Must be set to 0.
3214
 
   }
3215
 
                offset: Float32;
3216
 
        end;
3217
 
{
3218
 
    const HISideBinding kHISideNoBinding = ( NULL, kHILayoutBindNone );
3219
 
}
3220
 
 
3221
 
{
3222
 
 *  HIBinding
3223
 
 *  
3224
 
 *  Summary:
3225
 
 *    A set of Top, Left, Bottom, and Right bindings for an HIView.
3226
 
 }
3227
 
type
3228
 
        HIBinding = record
3229
 
{
3230
 
   * The top side bindings.
3231
 
   }
3232
 
                top: HISideBinding;
3233
 
 
3234
 
  {
3235
 
   * The left side bindings.
3236
 
   }
3237
 
                left: HISideBinding;
3238
 
 
3239
 
  {
3240
 
   * The bottom side bindings.
3241
 
   }
3242
 
                bottom: HISideBinding;
3243
 
 
3244
 
  {
3245
 
   * The right side bindings.
3246
 
   }
3247
 
                right: HISideBinding;
3248
 
        end;
3249
 
{
3250
 
    const HIBinding kHINoBinding = ( kHISideNoBinding, kHISideNoBinding, kHISideNoBinding, kHISideNoBinding );
3251
 
}
3252
 
 
3253
 
{
3254
 
 *  Discussion:
3255
 
 *    HIScaleKind constants.
3256
 
 }
3257
 
const
3258
 
{
3259
 
   * The scale is determined from the axis size.
3260
 
   }
3261
 
        kHILayoutScaleAbsolute = 0;
3262
 
 
3263
 
 
3264
 
type
3265
 
        HIScaleKind = UInt16;
3266
 
 
3267
 
{
3268
 
 *  HIAxisScale
3269
 
 *  
3270
 
 *  Summary:
3271
 
 *    A scale description for an axis of an HIView.
3272
 
 }
3273
 
type
3274
 
        HIAxisScale = record
3275
 
{
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
3278
 
   * parent view.
3279
 
   }
3280
 
                toView: HIViewRef;                 { NULL means parent}
3281
 
 
3282
 
  {
3283
 
   * An HIScaleKind describing the type of scaling to be applied. 
3284
 
   * Currently, this field can't be anything other than
3285
 
   * kScalingAbsolute.
3286
 
   }
3287
 
                kind: HIScaleKind;
3288
 
 
3289
 
  {
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.
3293
 
   }
3294
 
                ratio: Float32;
3295
 
        end;
3296
 
 
3297
 
{
3298
 
 *  HIScaling
3299
 
 *  
3300
 
 *  Summary:
3301
 
 *    A set of scaling descriptions for the axes of an HIView.
3302
 
 }
3303
 
type
3304
 
        HIScaling = record
3305
 
{
3306
 
   * An HIAxisScale describing the horizontal scaling for an HIView.
3307
 
   }
3308
 
                x: HIAxisScale;
3309
 
                y: HIAxisScale;
3310
 
        end;
3311
 
 
3312
 
{
3313
 
 *  Summary:
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.
3318
 
 *  
3319
 
 *  Discussion:
3320
 
 *    HIPositionKind constants.
3321
 
 }
3322
 
const
3323
 
{
3324
 
   * No positioning is to occur.
3325
 
   }
3326
 
        kHILayoutPositionNone = 0;
3327
 
 
3328
 
  {
3329
 
   * Centered positioning will occur. The view will be centered
3330
 
   * relative to the specified view.
3331
 
   }
3332
 
        kHILayoutPositionCenter = 1;
3333
 
 
3334
 
  {
3335
 
   * Minimum positioning will occur. The view will be left or top
3336
 
   * aligned relative to the specified view.
3337
 
   }
3338
 
        kHILayoutPositionMin = 2;
3339
 
 
3340
 
  {
3341
 
   * Maximum positioning will occur. The view will be right or bottom
3342
 
   * aligned relative to the specified view.
3343
 
   }
3344
 
        kHILayoutPositionMax = 3;
3345
 
 
3346
 
  {
3347
 
   * Synonyms for convenience and clarity.
3348
 
   }
3349
 
        kHILayoutPositionLeft = kHILayoutPositionMin;
3350
 
        kHILayoutPositionRight = kHILayoutPositionMax;
3351
 
        kHILayoutPositionTop = kHILayoutPositionMin;
3352
 
        kHILayoutPositionBottom = kHILayoutPositionMax;
3353
 
 
3354
 
 
3355
 
type
3356
 
        HIPositionKind = UInt16;
3357
 
 
3358
 
{
3359
 
 *  HIAxisPosition
3360
 
 *  
3361
 
 *  Summary:
3362
 
 *    An axial position description for an HIView.
3363
 
 }
3364
 
type
3365
 
        HIAxisPosition = record
3366
 
{
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.
3370
 
   }
3371
 
                toView: HIViewRef;                 { NULL means parent}
3372
 
 
3373
 
  {
3374
 
   * An HIPositionKind indicating the kind of positioning to apply.
3375
 
   }
3376
 
                kind: HIPositionKind;
3377
 
 
3378
 
  {
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 ).
3382
 
   }
3383
 
                offset: Float32;
3384
 
        end;
3385
 
 
3386
 
{
3387
 
 *  HIPositioning
3388
 
 *  
3389
 
 *  Summary:
3390
 
 *    A positioning description for an HIView.
3391
 
 }
3392
 
type
3393
 
        HIPositioning = record
3394
 
{
3395
 
   * An HIAxisPosition describing the horizontal positioning for an
3396
 
   * HIView.
3397
 
   }
3398
 
                x: HIAxisPosition;
3399
 
                y: HIAxisPosition;
3400
 
        end;
3401
 
 
3402
 
{
3403
 
 *  HILayoutInfo
3404
 
 *  
3405
 
 *  Summary:
3406
 
 *    A layout description for an HIView.
3407
 
 *  
3408
 
 *  Discussion:
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).
3417
 
 }
3418
 
type
3419
 
        HILayoutInfo = record
3420
 
{
3421
 
   * The version of the structure. The current version is
3422
 
   * kHILayoutInfoVersionZero.
3423
 
   }
3424
 
                version: UInt32;
3425
 
 
3426
 
  {
3427
 
   * An HIBinding structure describing the kinds of bindings to apply
3428
 
   * to the sides of an HIView.
3429
 
   }
3430
 
                binding: HIBinding;
3431
 
 
3432
 
  {
3433
 
   * An HIScaling structure describing the axial scaling to apply to an
3434
 
   * HIView.
3435
 
   }
3436
 
                scale: HIScaling;
3437
 
 
3438
 
  {
3439
 
   * An HIPositioning structure positioning to apply to an HIView.
3440
 
   }
3441
 
                position: HIPositioning;
3442
 
        end;
3443
 
const
3444
 
        kHILayoutInfoVersionZero = 0;
3445
 
 
3446
 
{
3447
 
 
3448
 
const HILayoutInfo kHILayoutInfoNone = (
3449
 
    kHILayoutInfoVersionZero,
3450
 
    kHINoBinding,
3451
 
    ( ( NULL, 0.0 ), ( NULL, 0.0 ) ),
3452
 
    ( ( NULL, kHILayoutPositionNone ), ( NULL, kHILayoutPositionNone ) ) );
3453
 
 
3454
 
}
3455
 
{
3456
 
 *  HIViewGetLayoutInfo()
3457
 
 *  
3458
 
 *  Summary:
3459
 
 *    Get the layout info of an HIView.
3460
 
 *  
3461
 
 *  Mac OS X threading:
3462
 
 *    Not thread safe
3463
 
 *  
3464
 
 *  Parameters:
3465
 
 *    
3466
 
 *    inView:
3467
 
 *      The HIView whose layout info is to be retreived.
3468
 
 *    
3469
 
 *    outLayoutInfo:
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.
3473
 
 *  
3474
 
 *  Result:
3475
 
 *    An operating system status code.
3476
 
 *  
3477
 
 *  Availability:
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
3481
 
 }
3482
 
function HIViewGetLayoutInfo( inView: HIViewRef; var outLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewGetLayoutInfo';
3483
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3484
 
 
3485
 
 
3486
 
{
3487
 
 *  HIViewSetLayoutInfo()
3488
 
 *  
3489
 
 *  Summary:
3490
 
 *    Set the layout info of an HIView.
3491
 
 *  
3492
 
 *  Mac OS X threading:
3493
 
 *    Not thread safe
3494
 
 *  
3495
 
 *  Parameters:
3496
 
 *    
3497
 
 *    inView:
3498
 
 *      The HIView whose layout info is to be retreived.
3499
 
 *    
3500
 
 *    inLayoutInfo:
3501
 
 *      A pointer to an HILayoutInfo record from which to copy the
3502
 
 *      layout info for the HIView.
3503
 
 *  
3504
 
 *  Result:
3505
 
 *    An operating system status code.
3506
 
 *  
3507
 
 *  Availability:
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
3511
 
 }
3512
 
function HIViewSetLayoutInfo( inView: HIViewRef; const (*var*) inLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewSetLayoutInfo';
3513
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3514
 
 
3515
 
 
3516
 
{
3517
 
 *  HIViewSuspendLayout()
3518
 
 *  
3519
 
 *  Summary:
3520
 
 *    Suspends all layout handling for this layout and its children.
3521
 
 *  
3522
 
 *  Mac OS X threading:
3523
 
 *    Not thread safe
3524
 
 *  
3525
 
 *  Parameters:
3526
 
 *    
3527
 
 *    inView:
3528
 
 *      The HIView whose layout handling is to be suspended.
3529
 
 *  
3530
 
 *  Result:
3531
 
 *    An operating system status code.
3532
 
 *  
3533
 
 *  Availability:
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
3537
 
 }
3538
 
function HIViewSuspendLayout( inView: HIViewRef ): OSStatus; external name '_HIViewSuspendLayout';
3539
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3540
 
 
3541
 
 
3542
 
{
3543
 
 *  HIViewResumeLayout()
3544
 
 *  
3545
 
 *  Summary:
3546
 
 *    Resumes all layout handling for this layout and its children.
3547
 
 *  
3548
 
 *  Mac OS X threading:
3549
 
 *    Not thread safe
3550
 
 *  
3551
 
 *  Parameters:
3552
 
 *    
3553
 
 *    inView:
3554
 
 *      The HIView whose layout handling is to be resumed.
3555
 
 *  
3556
 
 *  Result:
3557
 
 *    An operating system status code.
3558
 
 *  
3559
 
 *  Availability:
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
3563
 
 }
3564
 
function HIViewResumeLayout( inView: HIViewRef ): OSStatus; external name '_HIViewResumeLayout';
3565
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3566
 
 
3567
 
 
3568
 
{
3569
 
 *  HIViewIsLayoutActive()
3570
 
 *  
3571
 
 *  Summary:
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.
3576
 
 *  
3577
 
 *  Discussion:
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
3582
 
 *    required.
3583
 
 *  
3584
 
 *  Mac OS X threading:
3585
 
 *    Not thread safe
3586
 
 *  
3587
 
 *  Parameters:
3588
 
 *    
3589
 
 *    inView:
3590
 
 *      The HIView whose layout handling is to be tested.
3591
 
 *  
3592
 
 *  Result:
3593
 
 *    True if the view would respond to any linked relative's changes,
3594
 
 *    otherwise false.
3595
 
 *  
3596
 
 *  Availability:
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
3600
 
 }
3601
 
function HIViewIsLayoutActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutActive';
3602
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3603
 
 
3604
 
 
3605
 
{
3606
 
 *  HIViewIsLayoutLatentlyActive()
3607
 
 *  
3608
 
 *  Summary:
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.
3614
 
 *  
3615
 
 *  Mac OS X threading:
3616
 
 *    Not thread safe
3617
 
 *  
3618
 
 *  Parameters:
3619
 
 *    
3620
 
 *    inView:
3621
 
 *      The HIView whose latent layout handling is to be tested.
3622
 
 *  
3623
 
 *  Result:
3624
 
 *    True if the view would latently respond to any linked relative's
3625
 
 *    changes, otherwise false.
3626
 
 *  
3627
 
 *  Availability:
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
3631
 
 }
3632
 
function HIViewIsLayoutLatentlyActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutLatentlyActive';
3633
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3634
 
 
3635
 
 
3636
 
{
3637
 
 *  HIViewApplyLayout()
3638
 
 *  
3639
 
 *  Summary:
3640
 
 *    Applies the current layout into to the specified view. Side
3641
 
 *    bindings have no effect, but positioning and scaling will occur,
3642
 
 *    in that order.
3643
 
 *  
3644
 
 *  Mac OS X threading:
3645
 
 *    Not thread safe
3646
 
 *  
3647
 
 *  Parameters:
3648
 
 *    
3649
 
 *    inView:
3650
 
 *      The HIView whose layout info is to be applied.
3651
 
 *  
3652
 
 *  Result:
3653
 
 *    An operating system status code.
3654
 
 *  
3655
 
 *  Availability:
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
3659
 
 }
3660
 
function HIViewApplyLayout( inView: HIViewRef ): OSStatus; external name '_HIViewApplyLayout';
3661
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3662
 
 
3663
 
 
3664
 
{==============================================================================}
3665
 
{  MISCELLANEOUS                                                               }
3666
 
{==============================================================================}
3667
 
{
3668
 
 *  HIViewGetWindow()
3669
 
 *  
3670
 
 *  Discussion:
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.
3674
 
 *  
3675
 
 *  Mac OS X threading:
3676
 
 *    Not thread safe
3677
 
 *  
3678
 
 *  Parameters:
3679
 
 *    
3680
 
 *    inView:
3681
 
 *      The view to query.
3682
 
 *  
3683
 
 *  Result:
3684
 
 *    A window reference.
3685
 
 *  
3686
 
 *  Availability:
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
3690
 
 }
3691
 
function HIViewGetWindow( inView: HIViewRef ): WindowRef; external name '_HIViewGetWindow';
3692
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3693
 
 
3694
 
 
3695
 
{
3696
 
 *  HIViewFindByID()
3697
 
 *  
3698
 
 *  Discussion:
3699
 
 *    Allows you to find a particular view by its ID. Currently, this
3700
 
 *    call uses the ControlID type as its IDs.
3701
 
 *  
3702
 
 *  Mac OS X threading:
3703
 
 *    Not thread safe
3704
 
 *  
3705
 
 *  Parameters:
3706
 
 *    
3707
 
 *    inStartView:
3708
 
 *      The view to start searching at.
3709
 
 *    
3710
 
 *    inID:
3711
 
 *      The ID of the view you are looking for.
3712
 
 *    
3713
 
 *    outControl:
3714
 
 *      Receives the control if found.
3715
 
 *  
3716
 
 *  Result:
3717
 
 *    An operating system result code.
3718
 
 *  
3719
 
 *  Availability:
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
3723
 
 }
3724
 
function HIViewFindByID( inStartView: HIViewRef; inID: HIViewID; var outControl: HIViewRef ): OSStatus; external name '_HIViewFindByID';
3725
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3726
 
 
3727
 
 
3728
 
{
3729
 
 *  HIViewGetAttributes()
3730
 
 *  
3731
 
 *  Discussion:
3732
 
 *    Allows you to get the attributes of a view.
3733
 
 *  
3734
 
 *  Mac OS X threading:
3735
 
 *    Not thread safe
3736
 
 *  
3737
 
 *  Parameters:
3738
 
 *    
3739
 
 *    inView:
3740
 
 *      The view to inspect.
3741
 
 *    
3742
 
 *    outAttrs:
3743
 
 *      The attributes of the view.
3744
 
 *  
3745
 
 *  Result:
3746
 
 *    An operating system result code.
3747
 
 *  
3748
 
 *  Availability:
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
3752
 
 }
3753
 
function HIViewGetAttributes( inView: HIViewRef; var outAttrs: OptionBits ): OSStatus; external name '_HIViewGetAttributes';
3754
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3755
 
 
3756
 
 
3757
 
{
3758
 
 *  HIViewChangeAttributes()
3759
 
 *  
3760
 
 *  Discussion:
3761
 
 *    Allows you to change the attributes of a view. You can
3762
 
 *    simultaneously set and clear attributes.
3763
 
 *  
3764
 
 *  Mac OS X threading:
3765
 
 *    Not thread safe
3766
 
 *  
3767
 
 *  Parameters:
3768
 
 *    
3769
 
 *    inView:
3770
 
 *      The view to muck with.
3771
 
 *    
3772
 
 *    inAttrsToSet:
3773
 
 *      The attributes you wish to set.
3774
 
 *    
3775
 
 *    inAttrsToClear:
3776
 
 *      The attributes you wish to clear.
3777
 
 *  
3778
 
 *  Result:
3779
 
 *    An operating system result code.
3780
 
 *  
3781
 
 *  Availability:
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
3785
 
 }
3786
 
function HIViewChangeAttributes( inView: HIViewRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIViewChangeAttributes';
3787
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
3788
 
 
3789
 
 
3790
 
{
3791
 
 *  HIViewCreateOffscreenImage()
3792
 
 *  
3793
 
 *  Discussion:
3794
 
 *    Creates an CGImageRef for the view passed in. The view and any
3795
 
 *    children it has are rendered in the resultant image.
3796
 
 *  
3797
 
 *  Mac OS X threading:
3798
 
 *    Not thread safe
3799
 
 *  
3800
 
 *  Parameters:
3801
 
 *    
3802
 
 *    inView:
3803
 
 *      The view you wish to create an image of.
3804
 
 *    
3805
 
 *    inOptions:
3806
 
 *      Options. Currently you must pass 0.
3807
 
 *    
3808
 
 *    outFrame:
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.
3814
 
 *    
3815
 
 *    outImage:
3816
 
 *      The image of the view, including anything that would be drawn
3817
 
 *      outside the view's frame.
3818
 
 *  
3819
 
 *  Result:
3820
 
 *    An operating system status code.
3821
 
 *  
3822
 
 *  Availability:
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
3826
 
 }
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 *)
3829
 
 
3830
 
 
3831
 
{
3832
 
 *  HIViewDrawCGImage()
3833
 
 *  
3834
 
 *  Discussion:
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.
3842
 
 *  
3843
 
 *  Mac OS X threading:
3844
 
 *    Not thread safe
3845
 
 *  
3846
 
 *  Parameters:
3847
 
 *    
3848
 
 *    inContext:
3849
 
 *      The context to draw in.
3850
 
 *    
3851
 
 *    inBounds:
3852
 
 *      The bounds to draw the image into.
3853
 
 *    
3854
 
 *    inImage:
3855
 
 *      The image to draw.
3856
 
 *  
3857
 
 *  Result:
3858
 
 *    An operating system status code.
3859
 
 *  
3860
 
 *  Availability:
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
3864
 
 }
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 *)
3867
 
 
3868
 
 
3869
 
{
3870
 
 *  HIViewGetFeatures()
3871
 
 *  
3872
 
 *  Discussion:
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.
3876
 
 *  
3877
 
 *  Mac OS X threading:
3878
 
 *    Not thread safe
3879
 
 *  
3880
 
 *  Parameters:
3881
 
 *    
3882
 
 *    inView:
3883
 
 *      The view to query
3884
 
 *    
3885
 
 *    outFeatures:
3886
 
 *      On output, the features for the view.
3887
 
 *  
3888
 
 *  Result:
3889
 
 *    An operating system status code.
3890
 
 *  
3891
 
 *  Availability:
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
3895
 
 }
3896
 
function HIViewGetFeatures( inView: HIViewRef; var outFeatures: HIViewFeatures ): OSStatus; external name '_HIViewGetFeatures';
3897
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3898
 
 
3899
 
 
3900
 
{
3901
 
 *  HIViewChangeFeatures()
3902
 
 *  
3903
 
 *  Discussion:
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.
3912
 
 *  
3913
 
 *  Mac OS X threading:
3914
 
 *    Not thread safe
3915
 
 *  
3916
 
 *  Parameters:
3917
 
 *    
3918
 
 *    inView:
3919
 
 *      The view to change
3920
 
 *    
3921
 
 *    inFeaturesToSet:
3922
 
 *      The features to enable
3923
 
 *    
3924
 
 *    inFeaturesToClear:
3925
 
 *      The features to disable
3926
 
 *  
3927
 
 *  Result:
3928
 
 *    An operating system status code.
3929
 
 *  
3930
 
 *  Availability:
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
3934
 
 }
3935
 
function HIViewChangeFeatures( inView: HIViewRef; inFeaturesToSet: HIViewFeatures; inFeaturesToClear: HIViewFeatures ): OSStatus; external name '_HIViewChangeFeatures';
3936
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3937
 
 
3938
 
 
3939
 
{
3940
 
 *  Summary:
3941
 
 *    Constants for use with the HICreateTransformedCGImage API.
3942
 
 }
3943
 
const
3944
 
{
3945
 
   * No visual transform should be applied.
3946
 
   }
3947
 
        kHITransformNone = $00;
3948
 
 
3949
 
  {
3950
 
   * The image should be transformed to use a disabled appearance. This
3951
 
   * transform should not be combined with any other transform.
3952
 
   }
3953
 
        kHITransformDisabled = $01;
3954
 
 
3955
 
  {
3956
 
   * The image should be transformed to use a selected appearance. This
3957
 
   * transform should not be combined with any other transform.
3958
 
   }
3959
 
        kHITransformSelected = $4000;
3960
 
 
3961
 
{
3962
 
 *  HICreateTransformedCGImage()
3963
 
 *  
3964
 
 *  Summary:
3965
 
 *    Creates a new CGImage with a standard selected or disabled
3966
 
 *    appearance.
3967
 
 *  
3968
 
 *  Mac OS X threading:
3969
 
 *    Not thread safe
3970
 
 *  
3971
 
 *  Parameters:
3972
 
 *    
3973
 
 *    inImage:
3974
 
 *      The original image.
3975
 
 *    
3976
 
 *    inTransform:
3977
 
 *      The transform to apply to the image.
3978
 
 *    
3979
 
 *    outImage:
3980
 
 *      The new image. This image should be released by the caller.
3981
 
 *  
3982
 
 *  Availability:
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
3986
 
 }
3987
 
function HICreateTransformedCGImage( inImage: CGImageRef; inTransform: OptionBits; var outImage: CGImageRef ): OSStatus; external name '_HICreateTransformedCGImage';
3988
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3989
 
 
3990
 
 
3991
 
{
3992
 
 *  HIViewGetEventTarget()
3993
 
 *  
3994
 
 *  Discussion:
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.
3998
 
 *  
3999
 
 *  Mac OS X threading:
4000
 
 *    Not thread safe
4001
 
 *  
4002
 
 *  Parameters:
4003
 
 *    
4004
 
 *    inView:
4005
 
 *      The view to return the target for.
4006
 
 *  
4007
 
 *  Result:
4008
 
 *    An EventTargetRef.
4009
 
 *  
4010
 
 *  Availability:
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
4014
 
 }
4015
 
function HIViewGetEventTarget( inView: HIViewRef ): EventTargetRef; external name '_HIViewGetEventTarget';
4016
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
4017
 
 
4018
 
 
4019
 
{==============================================================================}
4020
 
{ HIGrowBoxView                                                                }
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')}
4029
 
{$endc}
4030
 
{ Control Kind}
4031
 
const
4032
 
        kControlKindHIGrowBoxView = $67726F77 (* 'grow' *);
4033
 
 
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.           }
4037
 
{
4038
 
 *  HIGrowBoxViewSetTransparent()
4039
 
 *  
4040
 
 *  Discussion:
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.
4044
 
 *  
4045
 
 *  Mac OS X threading:
4046
 
 *    Not thread safe
4047
 
 *  
4048
 
 *  Parameters:
4049
 
 *    
4050
 
 *    inGrowBoxView:
4051
 
 *      The grow box view reference.
4052
 
 *    
4053
 
 *    inTransparent:
4054
 
 *      Pass true to make the grow view use its transparent look, false
4055
 
 *      to give it the opaque look.
4056
 
 *  
4057
 
 *  Result:
4058
 
 *    An operating system result code.
4059
 
 *  
4060
 
 *  Availability:
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
4064
 
 }
4065
 
function HIGrowBoxViewSetTransparent( inGrowBoxView: HIViewRef; inTransparent: Boolean ): OSStatus; external name '_HIGrowBoxViewSetTransparent';
4066
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4067
 
 
4068
 
 
4069
 
{
4070
 
 *  HIGrowBoxViewIsTransparent()
4071
 
 *  
4072
 
 *  Discussion:
4073
 
 *    Returns true if a grow box view is set to be transparent.
4074
 
 *  
4075
 
 *  Mac OS X threading:
4076
 
 *    Not thread safe
4077
 
 *  
4078
 
 *  Parameters:
4079
 
 *    
4080
 
 *    inGrowBoxView:
4081
 
 *      The grow box view reference.
4082
 
 *  
4083
 
 *  Result:
4084
 
 *    A boolean result.
4085
 
 *  
4086
 
 *  Availability:
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
4090
 
 }
4091
 
function HIGrowBoxViewIsTransparent( inGrowBoxView: HIViewRef ): Boolean; external name '_HIGrowBoxViewIsTransparent';
4092
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4093
 
 
4094
 
 
4095
 
{==============================================================================}
4096
 
{  HIScrollView                                                                }
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     }
4114
 
{    below.                                                                    }
4115
 
{==============================================================================}
4116
 
{ The HIObject class ID for the HIScrollView class. }
4117
 
{$ifc USE_CFSTR_CONSTANT_MACROS}
4118
 
{$definec kHIScrollViewClassID CFSTRP('com.apple.HIScrollView')}
4119
 
{$endc}
4120
 
{ Control Kind}
4121
 
const
4122
 
        kControlKindHIScrollView = $7363726C (* 'scrl' *);
4123
 
 
4124
 
{
4125
 
    kEventClassScrollable quick reference:
4126
 
    
4127
 
    kEventScrollableGetInfo         = 1,
4128
 
    kEventScrollableInfoChanged     = 2,
4129
 
%%  kEventScrollableEmbedded        = 3,
4130
 
%%  kEventScrollableRemoved         = 4,
4131
 
    kEventScrollableScrollTo        = 10
4132
 
}
4133
 
const
4134
 
        kEventClassScrollable = $7363726C (* 'scrl' *);
4135
 
 
4136
 
const
4137
 
        kEventParamImageSize = $696D737A (* 'imsz' *); { typeHISize}
4138
 
        kEventParamViewSize = $7677737A (* 'vwsz' *); { typeHISize}
4139
 
        kEventParamLineSize = $6C6E737A (* 'lnsz' *); { typeHISize}
4140
 
        kEventParamOrigin = $6F72676E (* 'orgn' *); { typeHIPoint}
4141
 
 
4142
 
{
4143
 
 *  kEventClassScrollable / kEventScrollableGetInfo
4144
 
 *  
4145
 
 *  Summary:
4146
 
 *    Requests information from an HIScrollView�s scrollable view about
4147
 
 *    its size and origin.
4148
 
 *  
4149
 
 *  Discussion:
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.
4154
 
 *  
4155
 
 *  Mac OS X threading:
4156
 
 *    Not thread safe
4157
 
 *  
4158
 
 *  Parameters:
4159
 
 *    
4160
 
 *    <-- kEventParamImageSize (out, typeHISize)
4161
 
 *          On exit, contains the size of the entire scrollable view.
4162
 
 *    
4163
 
 *    <-- kEventParamViewSize (out, typeHISize)
4164
 
 *          On exit, contains the amount of the scrollable view that is
4165
 
 *          visible.
4166
 
 *    
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.
4170
 
 *    
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.
4177
 
 *  
4178
 
 *  Availability:
4179
 
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
4180
 
 *    CarbonLib:        not available
4181
 
 }
4182
 
const
4183
 
        kEventScrollableGetInfo = 1;
4184
 
 
4185
 
{
4186
 
 *  kEventClassScrollable / kEventScrollableInfoChanged
4187
 
 *  
4188
 
 *  Summary:
4189
 
 *    Notification that the size or origin of an HIScrollView�s
4190
 
 *    scrollable view has changed.
4191
 
 *  
4192
 
 *  Discussion:
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.
4202
 
 *  
4203
 
 *  Mac OS X threading:
4204
 
 *    Not thread safe
4205
 
 *  
4206
 
 *  Availability:
4207
 
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
4208
 
 *    CarbonLib:        not available
4209
 
 }
4210
 
const
4211
 
        kEventScrollableInfoChanged = 2;
4212
 
 
4213
 
{
4214
 
 *  kEventClassScrollable / kEventScrollableScrollTo
4215
 
 *  
4216
 
 *  Summary:
4217
 
 *    Requests that an HIScrollView�s scrollable view should scroll to
4218
 
 *    a particular origin.
4219
 
 *  
4220
 
 *  Discussion:
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.
4230
 
 *  
4231
 
 *  Mac OS X threading:
4232
 
 *    Not thread safe
4233
 
 *  
4234
 
 *  Parameters:
4235
 
 *    
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.
4240
 
 *  
4241
 
 *  Availability:
4242
 
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
4243
 
 *    CarbonLib:        not available
4244
 
 }
4245
 
const
4246
 
        kEventScrollableScrollTo = 10;
4247
 
 
4248
 
 
4249
 
{
4250
 
 *  Summary:
4251
 
 *    HIScrollView options
4252
 
 }
4253
 
const
4254
 
{
4255
 
   * This indicates that a vertical scroll bar is desired.
4256
 
   }
4257
 
        kHIScrollViewOptionsVertScroll = 1 shl 0;
4258
 
 
4259
 
  {
4260
 
   * This indicates that a horizontal scroll bar is desired.
4261
 
   }
4262
 
        kHIScrollViewOptionsHorizScroll = 1 shl 1;
4263
 
 
4264
 
  {
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.
4273
 
   }
4274
 
        kHIScrollViewOptionsAllowGrow = 1 shl 2;
4275
 
        kHIScrollViewValidOptions = kHIScrollViewOptionsVertScroll or kHIScrollViewOptionsHorizScroll or kHIScrollViewOptionsAllowGrow;
4276
 
 
4277
 
 
4278
 
{
4279
 
 *  HIScrollViewAction
4280
 
 *  
4281
 
 *  Summary:
4282
 
 *    HIScrollView navigation actions. See HIScrollViewNavigate for
4283
 
 *    more information.
4284
 
 }
4285
 
type
4286
 
        HIScrollViewAction = UInt32;
4287
 
const
4288
 
{
4289
 
   * The scroll view should move to the top of the content.
4290
 
   }
4291
 
        kHIScrollViewScrollToTop = 1 shl 0;
4292
 
 
4293
 
  {
4294
 
   * The scroll view should move to the bottom of the content.
4295
 
   }
4296
 
        kHIScrollViewScrollToBottom = 1 shl 1;
4297
 
 
4298
 
  {
4299
 
   * The scroll view should move to the left of the content.
4300
 
   }
4301
 
        kHIScrollViewScrollToLeft = 1 shl 2;
4302
 
 
4303
 
  {
4304
 
   * The scroll view should move to the right of the content.
4305
 
   }
4306
 
        kHIScrollViewScrollToRight = 1 shl 3;
4307
 
 
4308
 
  {
4309
 
   * The scroll view should page up.
4310
 
   }
4311
 
        kHIScrollViewPageUp = 1 shl 4;
4312
 
 
4313
 
  {
4314
 
   * The scroll view should page down.
4315
 
   }
4316
 
        kHIScrollViewPageDown = 1 shl 5;
4317
 
 
4318
 
  {
4319
 
   * The scroll view should page left.
4320
 
   }
4321
 
        kHIScrollViewPageLeft = 1 shl 6;
4322
 
 
4323
 
  {
4324
 
   * The scroll view should page right.
4325
 
   }
4326
 
        kHIScrollViewPageRight = 1 shl 7;
4327
 
 
4328
 
{
4329
 
 *  HIScrollViewCreate()
4330
 
 *  
4331
 
 *  Discussion:
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
4337
 
 *  
4338
 
 *  Mac OS X threading:
4339
 
 *    Not thread safe
4340
 
 *  
4341
 
 *  Parameters:
4342
 
 *    
4343
 
 *    inOptions:
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.
4347
 
 *    
4348
 
 *    outView:
4349
 
 *      The new scroll view.
4350
 
 *  
4351
 
 *  Result:
4352
 
 *    An operating system result code.
4353
 
 *  
4354
 
 *  Availability:
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
4358
 
 }
4359
 
function HIScrollViewCreate( inOptions: OptionBits; var outView: HIViewRef ): OSStatus; external name '_HIScrollViewCreate';
4360
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4361
 
 
4362
 
 
4363
 
{
4364
 
 *  HIScrollViewSetScrollBarAutoHide()
4365
 
 *  
4366
 
 *  Discussion:
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
4370
 
 *    application.
4371
 
 *  
4372
 
 *  Mac OS X threading:
4373
 
 *    Not thread safe
4374
 
 *  
4375
 
 *  Parameters:
4376
 
 *    
4377
 
 *    inView:
4378
 
 *      The view to affect.
4379
 
 *    
4380
 
 *    inAutoHide:
4381
 
 *      The new auto-hide setting (true == auto-hide).
4382
 
 *  
4383
 
 *  Result:
4384
 
 *    An operating system result code.
4385
 
 *  
4386
 
 *  Availability:
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
4390
 
 }
4391
 
function HIScrollViewSetScrollBarAutoHide( inView: HIViewRef; inAutoHide: Boolean ): OSStatus; external name '_HIScrollViewSetScrollBarAutoHide';
4392
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4393
 
 
4394
 
 
4395
 
{
4396
 
 *  HIScrollViewGetScrollBarAutoHide()
4397
 
 *  
4398
 
 *  Discussion:
4399
 
 *    Gets a scroll view's current scroll bar auto-hide setting.
4400
 
 *  
4401
 
 *  Mac OS X threading:
4402
 
 *    Not thread safe
4403
 
 *  
4404
 
 *  Parameters:
4405
 
 *    
4406
 
 *    inView:
4407
 
 *      The view to examine.
4408
 
 *  
4409
 
 *  Result:
4410
 
 *    A boolean result.
4411
 
 *  
4412
 
 *  Availability:
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
4416
 
 }
4417
 
function HIScrollViewGetScrollBarAutoHide( inView: HIViewRef ): Boolean; external name '_HIScrollViewGetScrollBarAutoHide';
4418
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4419
 
 
4420
 
 
4421
 
{
4422
 
 *  HIScrollViewNavigate()
4423
 
 *  
4424
 
 *  Discussion:
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
4434
 
 *    scroll bars.
4435
 
 *  
4436
 
 *  Mac OS X threading:
4437
 
 *    Not thread safe
4438
 
 *  
4439
 
 *  Parameters:
4440
 
 *    
4441
 
 *    inView:
4442
 
 *      The scroll view to affect.
4443
 
 *    
4444
 
 *    inAction:
4445
 
 *      The action to take.
4446
 
 *  
4447
 
 *  Result:
4448
 
 *    A operating system status code.
4449
 
 *  
4450
 
 *  Availability:
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
4454
 
 }
4455
 
function HIScrollViewNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): OSStatus; external name '_HIScrollViewNavigate';
4456
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4457
 
 
4458
 
 
4459
 
{
4460
 
 *  HIScrollViewCanNavigate()
4461
 
 *  
4462
 
 *  Discussion:
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.
4469
 
 *  
4470
 
 *  Mac OS X threading:
4471
 
 *    Not thread safe
4472
 
 *  
4473
 
 *  Parameters:
4474
 
 *    
4475
 
 *    inView:
4476
 
 *      The view to examine.
4477
 
 *    
4478
 
 *    inAction:
4479
 
 *      The action to test.
4480
 
 *  
4481
 
 *  Result:
4482
 
 *    A boolean result.
4483
 
 *  
4484
 
 *  Availability:
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
4488
 
 }
4489
 
function HIScrollViewCanNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): Boolean; external name '_HIScrollViewCanNavigate';
4490
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4491
 
 
4492
 
 
4493
 
{==============================================================================}
4494
 
{  HIImageView                                                                 }
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')}
4502
 
{$endc}
4503
 
{ ControlKind}
4504
 
const
4505
 
        kControlKindHIImageView = $696D6167 (* 'imag' *);
4506
 
 
4507
 
{
4508
 
 *  HIImageViewCreate()
4509
 
 *  
4510
 
 *  Discussion:
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.
4514
 
 *  
4515
 
 *  Mac OS X threading:
4516
 
 *    Not thread safe
4517
 
 *  
4518
 
 *  Parameters:
4519
 
 *    
4520
 
 *    inImage:
4521
 
 *      An initial image, or NULL. You can set the image later via
4522
 
 *      SetControlData.
4523
 
 *    
4524
 
 *    outControl:
4525
 
 *      The new image view.
4526
 
 *  
4527
 
 *  Result:
4528
 
 *    An operating system result code.
4529
 
 *  
4530
 
 *  Availability:
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
4534
 
 }
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 *)
4537
 
 
4538
 
 
4539
 
const
4540
 
        kHIImageViewImageTag = $696D6167 (* 'imag' *); { CGImageRef (THIS TAG IS GOING AWAY!!! USE THE APIS BELOW!)}
4541
 
 
4542
 
{
4543
 
 *  HIImageViewSetOpaque()
4544
 
 *  
4545
 
 *  Discussion:
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.
4551
 
 *    
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.
4557
 
 *  
4558
 
 *  Mac OS X threading:
4559
 
 *    Not thread safe
4560
 
 *  
4561
 
 *  Parameters:
4562
 
 *    
4563
 
 *    inView:
4564
 
 *      The image view to affect.
4565
 
 *    
4566
 
 *    inOpaque:
4567
 
 *      The new opacity setting. Pass true to indicate you want the
4568
 
 *      image to be treated as opaque.
4569
 
 *  
4570
 
 *  Result:
4571
 
 *    An operating system result code.
4572
 
 *  
4573
 
 *  Availability:
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
4577
 
 }
4578
 
function HIImageViewSetOpaque( inView: HIViewRef; inOpaque: Boolean ): OSStatus; external name '_HIImageViewSetOpaque';
4579
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4580
 
 
4581
 
 
4582
 
{
4583
 
 *  HIImageViewIsOpaque()
4584
 
 *  
4585
 
 *  Discussion:
4586
 
 *    Allows you to determine whether an image view is opaque or not.
4587
 
 *  
4588
 
 *  Mac OS X threading:
4589
 
 *    Not thread safe
4590
 
 *  
4591
 
 *  Parameters:
4592
 
 *    
4593
 
 *    inView:
4594
 
 *      The image view to query.
4595
 
 *  
4596
 
 *  Result:
4597
 
 *    A boolean result, where true indicates the image view is opaque.
4598
 
 *  
4599
 
 *  Availability:
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
4603
 
 }
4604
 
function HIImageViewIsOpaque( inView: HIViewRef ): Boolean; external name '_HIImageViewIsOpaque';
4605
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4606
 
 
4607
 
 
4608
 
{
4609
 
 *  HIImageViewSetAlpha()
4610
 
 *  
4611
 
 *  Discussion:
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.
4615
 
 *  
4616
 
 *  Mac OS X threading:
4617
 
 *    Not thread safe
4618
 
 *  
4619
 
 *  Parameters:
4620
 
 *    
4621
 
 *    inView:
4622
 
 *      The image view to affect.
4623
 
 *    
4624
 
 *    inAlpha:
4625
 
 *      The new alpha value.
4626
 
 *  
4627
 
 *  Result:
4628
 
 *    An operating system result code.
4629
 
 *  
4630
 
 *  Availability:
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
4634
 
 }
4635
 
function HIImageViewSetAlpha( inView: HIViewRef; inAlpha: Float32 ): OSStatus; external name '_HIImageViewSetAlpha';
4636
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4637
 
 
4638
 
 
4639
 
{
4640
 
 *  HIImageViewGetAlpha()
4641
 
 *  
4642
 
 *  Discussion:
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.
4645
 
 *  
4646
 
 *  Mac OS X threading:
4647
 
 *    Not thread safe
4648
 
 *  
4649
 
 *  Parameters:
4650
 
 *    
4651
 
 *    inView:
4652
 
 *      The image view to query.
4653
 
 *  
4654
 
 *  Result:
4655
 
 *    A floating point number representing the alpha from 0.0 through
4656
 
 *    1.0.
4657
 
 *  
4658
 
 *  Availability:
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
4662
 
 }
4663
 
function HIImageViewGetAlpha( inView: HIViewRef ): Float32; external name '_HIImageViewGetAlpha';
4664
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4665
 
 
4666
 
 
4667
 
{
4668
 
 *  HIImageViewSetScaleToFit()
4669
 
 *  
4670
 
 *  Discussion:
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.
4674
 
 *  
4675
 
 *  Mac OS X threading:
4676
 
 *    Not thread safe
4677
 
 *  
4678
 
 *  Parameters:
4679
 
 *    
4680
 
 *    inView:
4681
 
 *      The image view to affect.
4682
 
 *    
4683
 
 *    inScaleToFit:
4684
 
 *      A boolean indicating whether the image should be scaled to fit
4685
 
 *      the view bounds (true) or merely clip to the view bounds
4686
 
 *      (false).
4687
 
 *  
4688
 
 *  Result:
4689
 
 *    An operating system status code.
4690
 
 *  
4691
 
 *  Availability:
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
4695
 
 }
4696
 
function HIImageViewSetScaleToFit( inView: HIViewRef; inScaleToFit: Boolean ): OSStatus; external name '_HIImageViewSetScaleToFit';
4697
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4698
 
 
4699
 
 
4700
 
{
4701
 
 *  HIImageViewGetScaleToFit()
4702
 
 *  
4703
 
 *  Discussion:
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.
4707
 
 *  
4708
 
 *  Mac OS X threading:
4709
 
 *    Not thread safe
4710
 
 *  
4711
 
 *  Parameters:
4712
 
 *    
4713
 
 *    inView:
4714
 
 *      The image view to query.
4715
 
 *  
4716
 
 *  Result:
4717
 
 *    A boolean result.
4718
 
 *  
4719
 
 *  Availability:
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
4723
 
 }
4724
 
function HIImageViewGetScaleToFit( inView: HIViewRef ): Boolean; external name '_HIImageViewGetScaleToFit';
4725
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4726
 
 
4727
 
 
4728
 
{
4729
 
 *  HIImageViewSetImage()
4730
 
 *  
4731
 
 *  Discussion:
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.
4735
 
 *  
4736
 
 *  Mac OS X threading:
4737
 
 *    Not thread safe
4738
 
 *  
4739
 
 *  Parameters:
4740
 
 *    
4741
 
 *    inView:
4742
 
 *      The image view to affect.
4743
 
 *    
4744
 
 *    inImage:
4745
 
 *      The image to set.
4746
 
 *  
4747
 
 *  Result:
4748
 
 *    An operating system status code.
4749
 
 *  
4750
 
 *  Availability:
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
4754
 
 }
4755
 
function HIImageViewSetImage( inView: HIViewRef; inImage: CGImageRef { can be NULL } ): OSStatus; external name '_HIImageViewSetImage';
4756
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4757
 
 
4758
 
 
4759
 
{
4760
 
 *  HIImageViewCopyImage()
4761
 
 *  
4762
 
 *  Discussion:
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
4766
 
 *    finished with it.
4767
 
 *  
4768
 
 *  Mac OS X threading:
4769
 
 *    Not thread safe
4770
 
 *  
4771
 
 *  Parameters:
4772
 
 *    
4773
 
 *    inView:
4774
 
 *      The image view to query.
4775
 
 *  
4776
 
 *  Result:
4777
 
 *    A CoreGraphics (Quartz) image ref.
4778
 
 *  
4779
 
 *  Availability:
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
4783
 
 }
4784
 
function HIImageViewCopyImage( inView: HIViewRef ): CGImageRef; external name '_HIImageViewCopyImage';
4785
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4786
 
 
4787
 
 
4788
 
{==============================================================================}
4789
 
{ HIComboBox                                                                   }
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')}
4798
 
{$endc}
4799
 
{
4800
 
    kEventClassHIComboBox quick reference:
4801
 
    
4802
 
    kEventComboBoxListItemSelected  = 1
4803
 
}
4804
 
const
4805
 
        kEventClassHIComboBox = $68696362 (* 'hicb' *);
4806
 
 
4807
 
const
4808
 
        kEventParamComboBoxListSelectedItemIndex = $63626C69 (* 'cbli' *);
4809
 
 
4810
 
{
4811
 
 *  kEventClassHIComboBox / kEventComboBoxListItemSelected
4812
 
 *  
4813
 
 *  Summary:
4814
 
 *    Notification that an item in the ComboBox disclosure list has
4815
 
 *    been selected.
4816
 
 *  
4817
 
 *  Discussion:
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.
4824
 
 *  
4825
 
 *  Mac OS X threading:
4826
 
 *    Not thread safe
4827
 
 *  
4828
 
 *  Parameters:
4829
 
 *    
4830
 
 *    --> kEventParamDirectObject (in, typeControlRef)
4831
 
 *          The ComboBox view that has sent the notification.
4832
 
 *    
4833
 
 *    --> kEventParamComboBoxListSelectedItemIndex (in, typeCFIndex)
4834
 
 *          The index of the combo box list item that has been selected.
4835
 
 *  
4836
 
 *  Availability:
4837
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
4838
 
 *    CarbonLib:        not available
4839
 
 }
4840
 
const
4841
 
        kEventComboBoxListItemSelected = 1;
4842
 
 
4843
 
 
4844
 
{
4845
 
 *  Summary:
4846
 
 *    ComboBox attributes
4847
 
 }
4848
 
const
4849
 
{
4850
 
   * A constant with value zero; the lack of any attributes.
4851
 
   }
4852
 
        kHIComboBoxNoAttributes = 0;
4853
 
 
4854
 
  {
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.
4858
 
   }
4859
 
        kHIComboBoxAutoCompletionAttribute = 1 shl 0;
4860
 
 
4861
 
  {
4862
 
   * The control will disclose the ComboBox list after the user enters
4863
 
   * text.
4864
 
   }
4865
 
        kHIComboBoxAutoDisclosureAttribute = 1 shl 1;
4866
 
 
4867
 
  {
4868
 
   * The items in the ComboBox list will be automatically sorted in
4869
 
   * alphabetical order.
4870
 
   }
4871
 
        kHIComboBoxAutoSortAttribute = 1 shl 2;
4872
 
 
4873
 
  {
4874
 
   * The ComboBox list will be automatically sized to fit the Human
4875
 
   * Interface Guidelines.
4876
 
   }
4877
 
        kHIComboBoxAutoSizeListAttribute = 1 shl 3;
4878
 
 
4879
 
  {
4880
 
   * The minimum set of ComboBox attributes commonly used.
4881
 
   }
4882
 
        kHIComboBoxStandardAttributes = kHIComboBoxAutoCompletionAttribute or kHIComboBoxAutoDisclosureAttribute or kHIComboBoxAutoSizeListAttribute;
4883
 
 
4884
 
{ ControlKind}
4885
 
const
4886
 
        kControlKindHIComboBox = $63626278 (* 'cbbx' *);
4887
 
 
4888
 
{ ComboBox Part codes}
4889
 
const
4890
 
        kHIComboBoxEditTextPart = 5;
4891
 
        kHIComboBoxDisclosurePart = 28;
4892
 
 
4893
 
{
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:
4896
 
    
4897
 
        kControlFontStyleTag
4898
 
        kControlEditTextFixedTextTag
4899
 
        kControlEditTextTextTag
4900
 
        kControlEditTextKeyFilterTag
4901
 
        kControlEditTextValidationProcTag
4902
 
        kControlEditUnicodeTextPostUpdateProcTag
4903
 
        kControlEditTextSelectionTag
4904
 
        kControlEditTextKeyScriptBehaviorTag
4905
 
        kControlEditTextCharCount
4906
 
        kControlEditTextCFStringTag
4907
 
}
4908
 
 
4909
 
{
4910
 
 *  Discussion:
4911
 
 *    ComboBox ControlData tags available with Mac OS X 10.2 and later.
4912
 
 }
4913
 
const
4914
 
{
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.
4919
 
   }
4920
 
        kHIComboBoxListTag = $63626C73 (* 'cbls' *); { CFArrayRef; bumps the refCount on get/retains on set}
4921
 
 
4922
 
  {
4923
 
   * The width of the ComboBox list. This can be customized. This
4924
 
   * disables the autosize attribute.
4925
 
   }
4926
 
        kHIComboBoxListPixelWidthTag = $63626C77 (* 'cblw' *); { UInt32 }
4927
 
 
4928
 
  {
4929
 
   * The height of the ComboBox list. This can be customized. This
4930
 
   * disables the autosize attribute.
4931
 
   }
4932
 
        kHIComboBoxListPixelHeightTag = $63626C68 (* 'cblh' *); { UInt32}
4933
 
 
4934
 
  {
4935
 
   * The number of visible items in the list. This can be customized.
4936
 
   * This disables the autosize attribute.
4937
 
   }
4938
 
        kHIComboBoxNumVisibleItemsTag = $63626E69 (* 'cbni' *); { UInt32}
4939
 
 
4940
 
{
4941
 
 *  HIComboBoxCreate()
4942
 
 *  
4943
 
 *  Summary:
4944
 
 *    Creates a combo box control. The new control is initially
4945
 
 *    invisible.
4946
 
 *  
4947
 
 *  Mac OS X threading:
4948
 
 *    Not thread safe
4949
 
 *  
4950
 
 *  Parameters:
4951
 
 *    
4952
 
 *    boundsRect:
4953
 
 *      The bounding box of the control.
4954
 
 *    
4955
 
 *    text:
4956
 
 *      The default text in the editable portion of the control. Can be
4957
 
 *      NULL.
4958
 
 *    
4959
 
 *    style:
4960
 
 *      The font style of the both editable text and the text in the
4961
 
 *      disclosure list. Can be NULL.
4962
 
 *    
4963
 
 *    list:
4964
 
 *      The default values available in the disclosure list. Can be
4965
 
 *      NULL.
4966
 
 *    
4967
 
 *    inAttributes:
4968
 
 *      The default attributes of the combo box.
4969
 
 *    
4970
 
 *    outComboBox:
4971
 
 *      On exit, contains the new control.
4972
 
 *  
4973
 
 *  Availability:
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
4977
 
 }
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 *)
4980
 
 
4981
 
 
4982
 
{
4983
 
 *  HIComboBoxGetItemCount()
4984
 
 *  
4985
 
 *  Summary:
4986
 
 *    Get the number of items in the combo box disclosure list.
4987
 
 *  
4988
 
 *  Mac OS X threading:
4989
 
 *    Not thread safe
4990
 
 *  
4991
 
 *  Parameters:
4992
 
 *    
4993
 
 *    inComboBox:
4994
 
 *      The combo box.
4995
 
 *  
4996
 
 *  Result:
4997
 
 *    The number of items in the combo box disclosure list.
4998
 
 *  
4999
 
 *  Availability:
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
5003
 
 }
5004
 
function HIComboBoxGetItemCount( inComboBox: HIViewRef ): ItemCount; external name '_HIComboBoxGetItemCount';
5005
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5006
 
 
5007
 
 
5008
 
{
5009
 
 *  HIComboBoxInsertTextItemAtIndex()
5010
 
 *  
5011
 
 *  Summary:
5012
 
 *    Inserts a CFString in the disclosure list
5013
 
 *  
5014
 
 *  Mac OS X threading:
5015
 
 *    Not thread safe
5016
 
 *  
5017
 
 *  Parameters:
5018
 
 *    
5019
 
 *    inComboBox:
5020
 
 *      The combo box whose disclosure list the text will be inserted
5021
 
 *      in.
5022
 
 *    
5023
 
 *    inIndex:
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.
5027
 
 *    
5028
 
 *    inText:
5029
 
 *      The text item to be inserted in the combo box disclosure list.
5030
 
 *  
5031
 
 *  Result:
5032
 
 *    An operating system status code.
5033
 
 *  
5034
 
 *  Availability:
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
5038
 
 }
5039
 
function HIComboBoxInsertTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; inText: CFStringRef ): OSStatus; external name '_HIComboBoxInsertTextItemAtIndex';
5040
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5041
 
 
5042
 
 
5043
 
{
5044
 
 *  HIComboBoxAppendTextItem()
5045
 
 *  
5046
 
 *  Summary:
5047
 
 *    Appends a text item to the combo box disclosure list.
5048
 
 *  
5049
 
 *  Mac OS X threading:
5050
 
 *    Not thread safe
5051
 
 *  
5052
 
 *  Parameters:
5053
 
 *    
5054
 
 *    inComboBox:
5055
 
 *      The combo box whose disclosure list the text will be appended
5056
 
 *      to.
5057
 
 *    
5058
 
 *    inText:
5059
 
 *      The text item to be appended to the combo box disclosure list.
5060
 
 *    
5061
 
 *    outIndex:
5062
 
 *      On exit, the index of the new item. Can be NULL if the caller
5063
 
 *      does not require this information.
5064
 
 *  
5065
 
 *  Result:
5066
 
 *    An operating system status code.
5067
 
 *  
5068
 
 *  Availability:
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
5072
 
 }
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 *)
5075
 
 
5076
 
 
5077
 
{
5078
 
 *  HIComboBoxCopyTextItemAtIndex()
5079
 
 *  
5080
 
 *  Summary:
5081
 
 *    Copy the text from the combo box disclosure list
5082
 
 *  
5083
 
 *  Mac OS X threading:
5084
 
 *    Not thread safe
5085
 
 *  
5086
 
 *  Parameters:
5087
 
 *    
5088
 
 *    inComboBox:
5089
 
 *      The combo box that contains the text item you would like to
5090
 
 *      copy.
5091
 
 *    
5092
 
 *    inIndex:
5093
 
 *      The index of the text item. Will return paramErr if the index
5094
 
 *      is out of bounds of the combo box list.
5095
 
 *    
5096
 
 *    outString:
5097
 
 *      A copy of the string at the given index. Remember this is now
5098
 
 *      your copy that you will need to release.
5099
 
 *  
5100
 
 *  Result:
5101
 
 *    An operating system status code.
5102
 
 *  
5103
 
 *  Availability:
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
5107
 
 }
5108
 
function HIComboBoxCopyTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; var outString: CFStringRef ): OSStatus; external name '_HIComboBoxCopyTextItemAtIndex';
5109
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5110
 
 
5111
 
 
5112
 
{
5113
 
 *  HIComboBoxRemoveItemAtIndex()
5114
 
 *  
5115
 
 *  Summary:
5116
 
 *    Remove an item from a combo box disclosure list.
5117
 
 *  
5118
 
 *  Mac OS X threading:
5119
 
 *    Not thread safe
5120
 
 *  
5121
 
 *  Parameters:
5122
 
 *    
5123
 
 *    inComboBox:
5124
 
 *      The combo box that contains the disclosure list that you would
5125
 
 *      like to remove an item from.
5126
 
 *    
5127
 
 *    inIndex:
5128
 
 *      The index of the item to remove.
5129
 
 *  
5130
 
 *  Result:
5131
 
 *    An operating system status code.
5132
 
 *  
5133
 
 *  Availability:
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
5137
 
 }
5138
 
function HIComboBoxRemoveItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex ): OSStatus; external name '_HIComboBoxRemoveItemAtIndex';
5139
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5140
 
 
5141
 
 
5142
 
{
5143
 
 *  HIComboBoxChangeAttributes()
5144
 
 *  
5145
 
 *  Summary:
5146
 
 *    Change the attributes of a combo box
5147
 
 *  
5148
 
 *  Mac OS X threading:
5149
 
 *    Not thread safe
5150
 
 *  
5151
 
 *  Parameters:
5152
 
 *    
5153
 
 *    inComboBox:
5154
 
 *      The combo box whose attributes you would like to change.
5155
 
 *    
5156
 
 *    inAttributesToSet:
5157
 
 *      The attributes to set.
5158
 
 *    
5159
 
 *    inAttributesToClear:
5160
 
 *      The attributes to clear.
5161
 
 *  
5162
 
 *  Result:
5163
 
 *    An operating system status code.
5164
 
 *  
5165
 
 *  Availability:
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
5169
 
 }
5170
 
function HIComboBoxChangeAttributes( inComboBox: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HIComboBoxChangeAttributes';
5171
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5172
 
 
5173
 
 
5174
 
{
5175
 
 *  HIComboBoxGetAttributes()
5176
 
 *  
5177
 
 *  Summary:
5178
 
 *    Get the attributes of a combo box.
5179
 
 *  
5180
 
 *  Mac OS X threading:
5181
 
 *    Not thread safe
5182
 
 *  
5183
 
 *  Parameters:
5184
 
 *    
5185
 
 *    inComboBox:
5186
 
 *      The combo box whose attributes you would like to obtain.
5187
 
 *    
5188
 
 *    outAttributes:
5189
 
 *      The attributes of the combo box.
5190
 
 *  
5191
 
 *  Result:
5192
 
 *    An operating system status code.
5193
 
 *  
5194
 
 *  Availability:
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
5198
 
 }
5199
 
function HIComboBoxGetAttributes( inComboBox: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HIComboBoxGetAttributes';
5200
 
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
5201
 
 
5202
 
 
5203
 
{
5204
 
 *  HIComboBoxIsListVisible()
5205
 
 *  
5206
 
 *  Summary:
5207
 
 *    Returns whether the combo box list is currently disclosed.
5208
 
 *  
5209
 
 *  Mac OS X threading:
5210
 
 *    Not thread safe
5211
 
 *  
5212
 
 *  Parameters:
5213
 
 *    
5214
 
 *    inComboBox:
5215
 
 *      The combo box whose list visibility you would like to obtain.
5216
 
 *  
5217
 
 *  Result:
5218
 
 *    A boolean value indicating whether the combo box list is
5219
 
 *    disclosed (true) or hidden (false).
5220
 
 *  
5221
 
 *  Availability:
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
5225
 
 }
5226
 
function HIComboBoxIsListVisible( inComboBox: HIViewRef ): Boolean; external name '_HIComboBoxIsListVisible';
5227
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5228
 
 
5229
 
 
5230
 
{
5231
 
 *  HIComboBoxSetListVisible()
5232
 
 *  
5233
 
 *  Summary:
5234
 
 *    Hides or shows the combo box list.
5235
 
 *  
5236
 
 *  Mac OS X threading:
5237
 
 *    Not thread safe
5238
 
 *  
5239
 
 *  Parameters:
5240
 
 *    
5241
 
 *    inComboBox:
5242
 
 *      The combo box whose list will be hidden or shown.
5243
 
 *    
5244
 
 *    inVisible:
5245
 
 *      A boolean value indicating whether you wish to hide the list
5246
 
 *      (false) or show the list (true).
5247
 
 *  
5248
 
 *  Result:
5249
 
 *    An operating system result code.
5250
 
 *  
5251
 
 *  Availability:
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
5255
 
 }
5256
 
function HIComboBoxSetListVisible( inComboBox: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIComboBoxSetListVisible';
5257
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5258
 
 
5259
 
 
5260
 
{==============================================================================}
5261
 
{  HISearchField                                                               }
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')}
5275
 
{$endc}
5276
 
{ ControlKind}
5277
 
const
5278
 
        kControlKindHISearchField = $73726664 (* 'srfd' *);
5279
 
 
5280
 
{ HISearchField part codes}
5281
 
const
5282
 
        kControlSearchFieldCancelPart = 30;
5283
 
        kControlSearchFieldMenuPart = 31;
5284
 
 
5285
 
{
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:
5288
 
        
5289
 
        kControlFontStyleTag
5290
 
        kControlEditTextFixedTextTag
5291
 
        kControlEditTextTextTag
5292
 
        kControlEditTextKeyFilterTag
5293
 
        kControlEditTextValidationProcTag
5294
 
        kControlEditUnicodeTextPostUpdateProcTag
5295
 
        kControlEditTextSelectionTag
5296
 
        kControlEditTextKeyScriptBehaviorTag
5297
 
        kControlEditTextCharCount
5298
 
        kControlEditTextCFStringTag
5299
 
}
5300
 
 
5301
 
{
5302
 
 *  Summary:
5303
 
 *    HISearchField attributes
5304
 
 }
5305
 
const
5306
 
{
5307
 
   * A constant with value zero; the lack of any attributes.
5308
 
   }
5309
 
        kHISearchFieldNoAttributes = 0;
5310
 
 
5311
 
  {
5312
 
   * This view contains the cancel icon in the text field.
5313
 
   }
5314
 
        kHISearchFieldAttributesCancel = 1 shl 0;
5315
 
 
5316
 
  {
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.
5321
 
   }
5322
 
        kHISearchFieldAttributesSearchIcon = 1 shl 1;
5323
 
 
5324
 
{ Event Classes}
5325
 
const
5326
 
        kEventClassSearchField = $73726664 (* 'srfd' *);
5327
 
 
5328
 
{
5329
 
 *  kEventClassSearchField / kEventSearchFieldCancelClicked
5330
 
 *  
5331
 
 *  Summary:
5332
 
 *    Notification that the cancel icon has been depressed.
5333
 
 *  
5334
 
 *  Discussion:
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.
5338
 
 *  
5339
 
 *  Mac OS X threading:
5340
 
 *    Not thread safe
5341
 
 *  
5342
 
 *  Parameters:
5343
 
 *    
5344
 
 *    --> kEventParamDirectObject (in, typeControlRef)
5345
 
 *          The HISearchField that has sent the notification.
5346
 
 *  
5347
 
 *  Availability:
5348
 
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
5349
 
 *    CarbonLib:        not available
5350
 
 }
5351
 
const
5352
 
        kEventSearchFieldCancelClicked = 1;
5353
 
 
5354
 
{
5355
 
 *  kEventClassSearchField / kEventSearchFieldSearchClicked
5356
 
 *  
5357
 
 *  Summary:
5358
 
 *    Notification that the search icon has been depressed.
5359
 
 *  
5360
 
 *  Discussion:
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
5367
 
 *    not propagate.
5368
 
 *  
5369
 
 *  Mac OS X threading:
5370
 
 *    Not thread safe
5371
 
 *  
5372
 
 *  Parameters:
5373
 
 *    
5374
 
 *    --> kEventParamDirectObject (in, typeControlRef)
5375
 
 *          The HISearchField that has sent the notification.
5376
 
 *  
5377
 
 *  Availability:
5378
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
5379
 
 *    CarbonLib:        not available
5380
 
 }
5381
 
const
5382
 
        kEventSearchFieldSearchClicked = 2;
5383
 
 
5384
 
{
5385
 
 *  HISearchFieldCreate()
5386
 
 *  
5387
 
 *  Summary:
5388
 
 *    Creates a search field control. The new control is initially
5389
 
 *    invisible.
5390
 
 *  
5391
 
 *  Mac OS X threading:
5392
 
 *    Not thread safe
5393
 
 *  
5394
 
 *  Parameters:
5395
 
 *    
5396
 
 *    inBounds:
5397
 
 *      The initial bounds of the view. If this parameter is NULL, the
5398
 
 *      view defaults to have empty bounds ( 0, 0, 0, 0 ).
5399
 
 *    
5400
 
 *    inAttributes:
5401
 
 *      The initial attributes of the search field. Indicates whether
5402
 
 *      the field should contain the cancel icon.
5403
 
 *    
5404
 
 *    inSearchMenu:
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.
5417
 
 *    
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
5425
 
 *      the search field.
5426
 
 *    
5427
 
 *    outRef:
5428
 
 *      On exit, contains the new view.
5429
 
 *  
5430
 
 *  Result:
5431
 
 *    An operating system status code.
5432
 
 *  
5433
 
 *  Availability:
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
5437
 
 }
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 *)
5440
 
 
5441
 
 
5442
 
{
5443
 
 *  HISearchFieldSetSearchMenu()
5444
 
 *  
5445
 
 *  Summary:
5446
 
 *    Set the search menu associated with the view.
5447
 
 *  
5448
 
 *  Mac OS X threading:
5449
 
 *    Not thread safe
5450
 
 *  
5451
 
 *  Parameters:
5452
 
 *    
5453
 
 *    inSearchField:
5454
 
 *      The search field to associate the search menu with.
5455
 
 *    
5456
 
 *    inSearchMenu:
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
5470
 
 *      this field.
5471
 
 *  
5472
 
 *  Result:
5473
 
 *    An operating system status code.
5474
 
 *  
5475
 
 *  Availability:
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
5479
 
 }
5480
 
function HISearchFieldSetSearchMenu( inSearchField: HIViewRef; inSearchMenu: MenuRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetSearchMenu';
5481
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5482
 
 
5483
 
 
5484
 
{
5485
 
 *  HISearchFieldGetSearchMenu()
5486
 
 *  
5487
 
 *  Summary:
5488
 
 *    Get the menu that is associated with the search field
5489
 
 *  
5490
 
 *  Mac OS X threading:
5491
 
 *    Not thread safe
5492
 
 *  
5493
 
 *  Parameters:
5494
 
 *    
5495
 
 *    inSearchField:
5496
 
 *      The search field you wish to retrieve the search menu from.
5497
 
 *    
5498
 
 *    outSearchMenu:
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.
5502
 
 *  
5503
 
 *  Result:
5504
 
 *    An operating system status code.
5505
 
 *  
5506
 
 *  Availability:
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
5510
 
 }
5511
 
function HISearchFieldGetSearchMenu( inSearchField: HIViewRef; var outSearchMenu: MenuRef ): OSStatus; external name '_HISearchFieldGetSearchMenu';
5512
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5513
 
 
5514
 
 
5515
 
{
5516
 
 *  HISearchFieldChangeAttributes()
5517
 
 *  
5518
 
 *  Summary:
5519
 
 *    Set the attributes for the given search field.
5520
 
 *  
5521
 
 *  Mac OS X threading:
5522
 
 *    Not thread safe
5523
 
 *  
5524
 
 *  Parameters:
5525
 
 *    
5526
 
 *    inSearchField:
5527
 
 *      The search field to change the attributes of.
5528
 
 *    
5529
 
 *    inAttributesToSet:
5530
 
 *      The attributes to set.
5531
 
 *    
5532
 
 *    inAttributesToClear:
5533
 
 *      The attributes to clear.
5534
 
 *  
5535
 
 *  Result:
5536
 
 *    An operating system status code.
5537
 
 *  
5538
 
 *  Availability:
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
5542
 
 }
5543
 
function HISearchFieldChangeAttributes( inSearchField: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISearchFieldChangeAttributes';
5544
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5545
 
 
5546
 
 
5547
 
{
5548
 
 *  HISearchFieldGetAttributes()
5549
 
 *  
5550
 
 *  Summary:
5551
 
 *    Returns the attributes of the search field.
5552
 
 *  
5553
 
 *  Mac OS X threading:
5554
 
 *    Not thread safe
5555
 
 *  
5556
 
 *  Parameters:
5557
 
 *    
5558
 
 *    inSearchField:
5559
 
 *      The search field to get the attributes of.
5560
 
 *    
5561
 
 *    outAttributes:
5562
 
 *      On exit, will contain the attributes of the search field. This
5563
 
 *      parameter cannot be NULL.
5564
 
 *  
5565
 
 *  Result:
5566
 
 *    An operating system status code.
5567
 
 *  
5568
 
 *  Availability:
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
5572
 
 }
5573
 
function HISearchFieldGetAttributes( inSearchField: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HISearchFieldGetAttributes';
5574
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5575
 
 
5576
 
 
5577
 
{
5578
 
 *  HISearchFieldSetDescriptiveText()
5579
 
 *  
5580
 
 *  Summary:
5581
 
 *    Set the description of the search action of the search field.
5582
 
 *  
5583
 
 *  Mac OS X threading:
5584
 
 *    Not thread safe
5585
 
 *  
5586
 
 *  Parameters:
5587
 
 *    
5588
 
 *    inSearchField:
5589
 
 *      The search field to change the description of.
5590
 
 *    
5591
 
 *    inDescription:
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.
5596
 
 *  
5597
 
 *  Result:
5598
 
 *    An operating system status code.
5599
 
 *  
5600
 
 *  Availability:
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
5604
 
 }
5605
 
function HISearchFieldSetDescriptiveText( inSearchField: HIViewRef; inDescription: CFStringRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetDescriptiveText';
5606
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5607
 
 
5608
 
 
5609
 
{
5610
 
 *  HISearchFieldCopyDescriptiveText()
5611
 
 *  
5612
 
 *  Summary:
5613
 
 *    Get the description that is associated with the search field.
5614
 
 *  
5615
 
 *  Mac OS X threading:
5616
 
 *    Not thread safe
5617
 
 *  
5618
 
 *  Parameters:
5619
 
 *    
5620
 
 *    inSearchField:
5621
 
 *      The search field you wish to retrieve the description from.
5622
 
 *    
5623
 
 *    outDescription:
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.
5631
 
 *  
5632
 
 *  Result:
5633
 
 *    An operating system status code.
5634
 
 *  
5635
 
 *  Availability:
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
5639
 
 }
5640
 
function HISearchFieldCopyDescriptiveText( inSearchField: HIViewRef; var outDescription: CFStringRef ): OSStatus; external name '_HISearchFieldCopyDescriptiveText';
5641
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5642
 
 
5643
 
 
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    }
5655
 
{  replacement.                                                                }
5656
 
{==============================================================================}
5657
 
{
5658
 
    kEventClassTextField quick reference:
5659
 
    
5660
 
    kEventTextAccepted              = 1,
5661
 
    kEventTextShouldChangeInRange   = 2,
5662
 
    kEventTextDidChange             = 3
5663
 
}
5664
 
const
5665
 
        kEventClassTextField = $74786664 (* 'txfd' *);
5666
 
 
5667
 
const
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}
5673
 
 
5674
 
{
5675
 
 *  kEventClassTextField / kEventTextAccepted
5676
 
 *  
5677
 
 *  Summary:
5678
 
 *    Notification that the text in a control's editable text field has
5679
 
 *    been accepted.
5680
 
 *  
5681
 
 *  Discussion:
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. 
5689
 
 *    
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.
5693
 
 *  
5694
 
 *  Mac OS X threading:
5695
 
 *    Not thread safe
5696
 
 *  
5697
 
 *  Parameters:
5698
 
 *    
5699
 
 *    --> kEventParamDirectObject (in, typeControlRef)
5700
 
 *          The editable text field that has sent the notification.
5701
 
 *  
5702
 
 *  Availability:
5703
 
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
5704
 
 *    CarbonLib:        not available
5705
 
 }
5706
 
const
5707
 
        kEventTextAccepted = 1;
5708
 
 
5709
 
{
5710
 
 *  kEventClassTextField / kEventTextShouldChangeInRange
5711
 
 *  
5712
 
 *  Summary:
5713
 
 *    Returns whether the text should be changed in editable text
5714
 
 *    fields.
5715
 
 *  
5716
 
 *  Discussion:
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. 
5729
 
 *    
5730
 
 *    This event is not sent prior to programmatic modification of the
5731
 
 *    text field contents using SetControlData. 
5732
 
 *    
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.
5738
 
 *    
5739
 
 *    
5740
 
 *    This event is sent to the control containing the text field only;
5741
 
 *    it will not propagate.
5742
 
 *  
5743
 
 *  Mac OS X threading:
5744
 
 *    Not thread safe
5745
 
 *  
5746
 
 *  Parameters:
5747
 
 *    
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.
5753
 
 *    
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.
5763
 
 *    
5764
 
 *    <-- kEventParamReplacementText (out, typeCFStringRef)
5765
 
 *          On output, can contain optional replacement text.
5766
 
 *  
5767
 
 *  Result:
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. 
5772
 
 *    
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,
5777
 
 *    however. 
5778
 
 *    
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
5782
 
 *    ignored. 
5783
 
 *    
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. 
5787
 
 *    
5788
 
 *    Any other return value will result in the default behavior, as if
5789
 
 *    eventNotHandledErr had been returned.
5790
 
 *  
5791
 
 *  Availability:
5792
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
5793
 
 *    CarbonLib:        not available
5794
 
 }
5795
 
const
5796
 
        kEventTextShouldChangeInRange = 2;
5797
 
 
5798
 
{
5799
 
 *  kEventClassTextField / kEventTextDidChange
5800
 
 *  
5801
 
 *  Summary:
5802
 
 *    Indicates that the contents of an editable text field have
5803
 
 *    changed.
5804
 
 *  
5805
 
 *  Discussion:
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
5809
 
 *    control. 
5810
 
 *    
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.
5819
 
 *    
5820
 
 *    
5821
 
 *    This event is not sent after programmatic modification of the
5822
 
 *    text field contents using SetControlData. 
5823
 
 *    
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
5826
 
 *    it.
5827
 
 *  
5828
 
 *  Mac OS X threading:
5829
 
 *    Not thread safe
5830
 
 *  
5831
 
 *  Parameters:
5832
 
 *    
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
5837
 
 *          editing.
5838
 
 *    
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.
5851
 
 *  
5852
 
 *  Availability:
5853
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
5854
 
 *    CarbonLib:        not available
5855
 
 }
5856
 
const
5857
 
        kEventTextDidChange = 3;
5858
 
 
5859
 
{==============================================================================}
5860
 
{  HIMenuView                                                                  }
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        }
5871
 
{  HIObjectCreate.                                                             }
5872
 
{==============================================================================}
5873
 
{ the HIObject class ID for the HIMenuView class}
5874
 
{$ifc USE_CFSTR_CONSTANT_MACROS}
5875
 
{$definec kHIMenuViewClassID CFSTRP('com.apple.HIMenuView')}
5876
 
{$endc}
5877
 
{ the HIObject class ID for the standard menu HIView class}
5878
 
{$ifc USE_CFSTR_CONSTANT_MACROS}
5879
 
{$definec kHIStandardMenuViewClassID CFSTRP('com.apple.HIStandardMenuView')}
5880
 
{$endc}
5881
 
{ Control Kinds (only used in Mac OS X 10.4 and later)}
5882
 
const
5883
 
        kControlKindHIMenuView = $6D656E75 (* 'menu' *);
5884
 
        kControlKindHIStandardMenuView = $736D6E75 (* 'smnu' *);
5885
 
 
5886
 
{
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.
5890
 
    
5891
 
    --> kEventParamMenuRef (in, typeMenuRef)
5892
 
            The menu that the view should draw.
5893
 
}
5894
 
{
5895
 
 *  kHIViewMenuContentID
5896
 
 *  
5897
 
 *  Summary:
5898
 
 *    The HIViewID for the menu content view. The Menu Manager assigns
5899
 
 *    this view ID to all menu content views.
5900
 
 *  
5901
 
 *  Mac OS X threading:
5902
 
 *    Not thread safe
5903
 
 *  
5904
 
 *  Availability:
5905
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
5906
 
 *    CarbonLib:        not available
5907
 
 *    Non-Carbon CFM:   not available
5908
 
 }
5909
 
var kHIViewMenuContentID: HIViewID; external name '_kHIViewMenuContentID'; (* attribute const *)
5910
 
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5911
 
{
5912
 
 *  HIMenuViewGetMenu()
5913
 
 *  
5914
 
 *  Summary:
5915
 
 *    Returns the MenuRef that is associated with an HIView that is a
5916
 
 *    subclass of HIMenuView.
5917
 
 *  
5918
 
 *  Discussion:
5919
 
 *    An HIMenuView subclass might use this API to determine the menu
5920
 
 *    that it should draw.
5921
 
 *  
5922
 
 *  Mac OS X threading:
5923
 
 *    Not thread safe
5924
 
 *  
5925
 
 *  Parameters:
5926
 
 *    
5927
 
 *    inView:
5928
 
 *      The view whose menu to return.
5929
 
 *  
5930
 
 *  Result:
5931
 
 *    The MenuRef associated with the HIView, or NULL if an HIView is
5932
 
 *    passed that is not a subclass of HIMenuView.
5933
 
 *  
5934
 
 *  Availability:
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
5938
 
 }
5939
 
function HIMenuViewGetMenu( inView: HIViewRef ): MenuRef; external name '_HIMenuViewGetMenu';
5940
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5941
 
 
5942
 
 
5943
 
{
5944
 
 *  HIMenuGetContentView()
5945
 
 *  
5946
 
 *  Summary:
5947
 
 *    Returns the HIViewRef that will be used to draw menu content for
5948
 
 *    this menu, if any.
5949
 
 *  
5950
 
 *  Discussion:
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.
5958
 
 *  
5959
 
 *  Mac OS X threading:
5960
 
 *    Not thread safe
5961
 
 *  
5962
 
 *  Parameters:
5963
 
 *    
5964
 
 *    inMenu:
5965
 
 *      The menu.
5966
 
 *    
5967
 
 *    inMenuType:
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.
5971
 
 *    
5972
 
 *    outView:
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.
5976
 
 *  
5977
 
 *  Availability:
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
5981
 
 }
5982
 
function HIMenuGetContentView( inMenu: MenuRef; inMenuType: ThemeMenuType; var outView: HIViewRef ): OSStatus; external name '_HIMenuGetContentView';
5983
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5984
 
 
5985
 
 
5986
 
{==============================================================================}
5987
 
{  HISegmentedView                                                             }
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')}
6008
 
{$endc}
6009
 
{ Control Kind}
6010
 
const
6011
 
        kHISegmentedViewKind = $73676D74 (* 'sgmt' *);
6012
 
 
6013
 
{
6014
 
 *  HISegmentedViewCreate()
6015
 
 *  
6016
 
 *  Summary:
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.
6036
 
 *  
6037
 
 *  Mac OS X threading:
6038
 
 *    Not thread safe
6039
 
 *  
6040
 
 *  Parameters:
6041
 
 *    
6042
 
 *    inBounds:
6043
 
 *      The bounds of the view to be created. Can be NULL, in which
6044
 
 *      case the view is created with CGRectZero bounds.
6045
 
 *    
6046
 
 *    outRef:
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.
6050
 
 *  
6051
 
 *  Availability:
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
6055
 
 }
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 *)
6058
 
 
6059
 
 
6060
 
{
6061
 
 *  HISegmentedViewSetSegmentCount()
6062
 
 *  
6063
 
 *  Summary:
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.
6071
 
 *  
6072
 
 *  Mac OS X threading:
6073
 
 *    Not thread safe
6074
 
 *  
6075
 
 *  Parameters:
6076
 
 *    
6077
 
 *    inSegmentedView:
6078
 
 *      The segmented view for which the content is to be set.
6079
 
 *    
6080
 
 *    inSegmentCount:
6081
 
 *      A positive integer indicating how many segments the view is to
6082
 
 *      have.
6083
 
 *  
6084
 
 *  Availability:
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
6088
 
 }
6089
 
function HISegmentedViewSetSegmentCount( inSegmentedView: HIViewRef; inSegmentCount: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCount';
6090
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6091
 
 
6092
 
 
6093
 
{
6094
 
 *  HISegmentedViewGetSegmentCount()
6095
 
 *  
6096
 
 *  Summary:
6097
 
 *    Get the number of segments in the segmented view.
6098
 
 *  
6099
 
 *  Mac OS X threading:
6100
 
 *    Not thread safe
6101
 
 *  
6102
 
 *  Parameters:
6103
 
 *    
6104
 
 *    inSegmentedView:
6105
 
 *      The segmented view for which the content is to be set.
6106
 
 *  
6107
 
 *  Result:
6108
 
 *    A UInt32 indicating the number of segments in the segmented view.
6109
 
 *  
6110
 
 *  Availability:
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
6114
 
 }
6115
 
function HISegmentedViewGetSegmentCount( inSegmentedView: HIViewRef ): UInt32; external name '_HISegmentedViewGetSegmentCount';
6116
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6117
 
 
6118
 
 
6119
 
{
6120
 
 *  Summary:
6121
 
 *    HISegmentBehavior constants
6122
 
 }
6123
 
const
6124
 
{
6125
 
   * Pops back up after being pressed, just like a push button.
6126
 
   }
6127
 
        kHISegmentBehaviorMomentary = 1;
6128
 
 
6129
 
  {
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.
6134
 
   }
6135
 
        kHISegmentBehaviorRadio = 2;
6136
 
 
6137
 
  {
6138
 
   * Like a check box. When clicked, it toggles back and forth between
6139
 
   * checked and unchecked states.
6140
 
   }
6141
 
        kHISegmentBehaviorToggles = 3;
6142
 
 
6143
 
  {
6144
 
   * After being pressed, this type of segment stays pressed until you
6145
 
   * programatically unpress it.
6146
 
   }
6147
 
        kHISegmentBehaviorSticky = 4;
6148
 
 
6149
 
 
6150
 
type
6151
 
        HISegmentBehavior = UInt32;
6152
 
{
6153
 
 *  HISegmentedViewSetSegmentBehavior()
6154
 
 *  
6155
 
 *  Summary:
6156
 
 *    Changes the behavior of an individual segment of a segmented
6157
 
 *    view. By default, a segment has the kHISegmentBehaviorMomentary
6158
 
 *    behavior.
6159
 
 *  
6160
 
 *  Mac OS X threading:
6161
 
 *    Not thread safe
6162
 
 *  
6163
 
 *  Parameters:
6164
 
 *    
6165
 
 *    inSegmentedView:
6166
 
 *      The segmented view which owns the segment whose behavior you
6167
 
 *      want to change.
6168
 
 *    
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.
6173
 
 *    
6174
 
 *    inBehavior:
6175
 
 *      A HISegmentBehavior describing the behavior you wish the
6176
 
 *      segment to have.
6177
 
 *  
6178
 
 *  Availability:
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
6182
 
 }
6183
 
function HISegmentedViewSetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inBehavior: HISegmentBehavior ): OSStatus; external name '_HISegmentedViewSetSegmentBehavior';
6184
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6185
 
 
6186
 
 
6187
 
{
6188
 
 *  HISegmentedViewGetSegmentBehavior()
6189
 
 *  
6190
 
 *  Summary:
6191
 
 *    Returns the behavior of an individual segment of a segmented view.
6192
 
 *  
6193
 
 *  Mac OS X threading:
6194
 
 *    Not thread safe
6195
 
 *  
6196
 
 *  Parameters:
6197
 
 *    
6198
 
 *    inSegmentedView:
6199
 
 *      The segmented view which owns the segment being queried.
6200
 
 *    
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.
6205
 
 *  
6206
 
 *  Result:
6207
 
 *    A HISegmentBehavior describing the behavior of the given segment.
6208
 
 *    If you pass an illegal segment index, the result is undefined.
6209
 
 *  
6210
 
 *  Availability:
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
6214
 
 }
6215
 
function HISegmentedViewGetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HISegmentBehavior; external name '_HISegmentedViewGetSegmentBehavior';
6216
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6217
 
 
6218
 
 
6219
 
{
6220
 
 *  Summary:
6221
 
 *    HISegmentedView segment attributes
6222
 
 *  
6223
 
 *  Discussion:
6224
 
 *    These attribute bits are for use with
6225
 
 *    HISegmentedViewChangeSegmentAttributes and
6226
 
 *    HISegmentedViewGetSegmentAttributes.
6227
 
 }
6228
 
const
6229
 
{
6230
 
   * Pass this to indicate no attributes at all.
6231
 
   }
6232
 
        kHISegmentNoAttributes = 0;
6233
 
 
6234
 
  {
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.
6238
 
   }
6239
 
        kHISegmentSendCmdToUserFocus = 1 shl 0;
6240
 
 
6241
 
{
6242
 
 *  HISegmentedViewChangeSegmentAttributes()
6243
 
 *  
6244
 
 *  Summary:
6245
 
 *    Changes the attributes of an individual segment of a segmented
6246
 
 *    view. By default, a segment has no attribute bits set.
6247
 
 *  
6248
 
 *  Mac OS X threading:
6249
 
 *    Not thread safe
6250
 
 *  
6251
 
 *  Parameters:
6252
 
 *    
6253
 
 *    inSegmentedView:
6254
 
 *      The segmented view which owns the segment whose attributes you
6255
 
 *      want to change.
6256
 
 *    
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.
6261
 
 *    
6262
 
 *    inAttributesToSet:
6263
 
 *      The attribute bits you wish to set/enable for the segment.
6264
 
 *    
6265
 
 *    inAttributesToClear:
6266
 
 *      The attribute bits you wish to clear/disable for the segment.
6267
 
 *  
6268
 
 *  Availability:
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
6272
 
 }
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 *)
6275
 
 
6276
 
 
6277
 
{
6278
 
 *  HISegmentedViewGetSegmentAttributes()
6279
 
 *  
6280
 
 *  Summary:
6281
 
 *    Returns the attributes of an individual segment of a segmented
6282
 
 *    view.
6283
 
 *  
6284
 
 *  Mac OS X threading:
6285
 
 *    Not thread safe
6286
 
 *  
6287
 
 *  Parameters:
6288
 
 *    
6289
 
 *    inSegmentedView:
6290
 
 *      The segmented view which owns the segment being queried.
6291
 
 *    
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.
6296
 
 *  
6297
 
 *  Result:
6298
 
 *    The attribute bits that are set/enabled for the given segment. If
6299
 
 *    you pass an illegal segment index, the result is undefined.
6300
 
 *  
6301
 
 *  Availability:
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
6305
 
 }
6306
 
function HISegmentedViewGetSegmentAttributes( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): OptionBits; external name '_HISegmentedViewGetSegmentAttributes';
6307
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6308
 
 
6309
 
 
6310
 
{
6311
 
 *  HISegmentedViewSetSegmentValue()
6312
 
 *  
6313
 
 *  Summary:
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.
6318
 
 *  
6319
 
 *  Mac OS X threading:
6320
 
 *    Not thread safe
6321
 
 *  
6322
 
 *  Parameters:
6323
 
 *    
6324
 
 *    inSegmentedView:
6325
 
 *      The segmented view which owns the segment whose value you want
6326
 
 *      to change.
6327
 
 *    
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.
6332
 
 *    
6333
 
 *    inValue:
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.
6337
 
 *  
6338
 
 *  Availability:
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
6342
 
 }
6343
 
function HISegmentedViewSetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inValue: SInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentValue';
6344
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6345
 
 
6346
 
 
6347
 
{
6348
 
 *  HISegmentedViewGetSegmentValue()
6349
 
 *  
6350
 
 *  Summary:
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.
6354
 
 *  
6355
 
 *  Mac OS X threading:
6356
 
 *    Not thread safe
6357
 
 *  
6358
 
 *  Parameters:
6359
 
 *    
6360
 
 *    inSegmentedView:
6361
 
 *      The segmented view which owns the segment being queried.
6362
 
 *    
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.
6367
 
 *  
6368
 
 *  Result:
6369
 
 *    A SInt32 indicating the value of the given segment. If you pass
6370
 
 *    an illegal segment index, the result is undefined.
6371
 
 *  
6372
 
 *  Availability:
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
6376
 
 }
6377
 
function HISegmentedViewGetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): SInt32; external name '_HISegmentedViewGetSegmentValue';
6378
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6379
 
 
6380
 
 
6381
 
{
6382
 
 *  HISegmentedViewSetSegmentEnabled()
6383
 
 *  
6384
 
 *  Summary:
6385
 
 *    Enable or disable an individual segment of a segmented view.
6386
 
 *  
6387
 
 *  Mac OS X threading:
6388
 
 *    Not thread safe
6389
 
 *  
6390
 
 *  Parameters:
6391
 
 *    
6392
 
 *    inSegmentedView:
6393
 
 *      The segmented view which owns the segment to enable or disable.
6394
 
 *    
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.
6399
 
 *    
6400
 
 *    inEnabled:
6401
 
 *      A Boolean indicating whether the segment is to become enabled
6402
 
 *      or disabled.
6403
 
 *  
6404
 
 *  Availability:
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
6408
 
 }
6409
 
function HISegmentedViewSetSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inEnabled: Boolean ): OSStatus; external name '_HISegmentedViewSetSegmentEnabled';
6410
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6411
 
 
6412
 
 
6413
 
{
6414
 
 *  HISegmentedViewIsSegmentEnabled()
6415
 
 *  
6416
 
 *  Summary:
6417
 
 *    Test an individual segment of a segmented view to see if it is
6418
 
 *    enabled or disabled.
6419
 
 *  
6420
 
 *  Mac OS X threading:
6421
 
 *    Not thread safe
6422
 
 *  
6423
 
 *  Parameters:
6424
 
 *    
6425
 
 *    inSegmentedView:
6426
 
 *      The segmented view which owns the segment being queried.
6427
 
 *    
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.
6432
 
 *  
6433
 
 *  Result:
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
6436
 
 *    undefined.
6437
 
 *  
6438
 
 *  Availability:
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
6442
 
 }
6443
 
function HISegmentedViewIsSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): Boolean; external name '_HISegmentedViewIsSegmentEnabled';
6444
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6445
 
 
6446
 
 
6447
 
{
6448
 
 *  HISegmentedViewSetSegmentCommand()
6449
 
 *  
6450
 
 *  Summary:
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.
6458
 
 *  
6459
 
 *  Mac OS X threading:
6460
 
 *    Not thread safe
6461
 
 *  
6462
 
 *  Parameters:
6463
 
 *    
6464
 
 *    inSegmentedView:
6465
 
 *      The segmented view which owns the segment whose command you
6466
 
 *      wish to set.
6467
 
 *    
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.
6472
 
 *    
6473
 
 *    inCommand:
6474
 
 *      The command ID you wish to associate with the segment. A value
6475
 
 *      of zero signifies "no command".
6476
 
 *  
6477
 
 *  Availability:
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
6481
 
 }
6482
 
function HISegmentedViewSetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inCommand: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCommand';
6483
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6484
 
 
6485
 
 
6486
 
{
6487
 
 *  HISegmentedViewGetSegmentCommand()
6488
 
 *  
6489
 
 *  Summary:
6490
 
 *    Get the command ID associated with the given segment.
6491
 
 *  
6492
 
 *  Mac OS X threading:
6493
 
 *    Not thread safe
6494
 
 *  
6495
 
 *  Parameters:
6496
 
 *    
6497
 
 *    inSegmentedView:
6498
 
 *      The segmented view which owns the segment being queried.
6499
 
 *    
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.
6504
 
 *  
6505
 
 *  Result:
6506
 
 *    Returns the command ID associated with the segment. If you pass
6507
 
 *    an illegal segment index, the result is undefined.
6508
 
 *  
6509
 
 *  Availability:
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
6513
 
 }
6514
 
function HISegmentedViewGetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): UInt32; external name '_HISegmentedViewGetSegmentCommand';
6515
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6516
 
 
6517
 
 
6518
 
{
6519
 
 *  HISegmentedViewSetSegmentLabel()
6520
 
 *  
6521
 
 *  Summary:
6522
 
 *    Set the label string for the given segment. By default, a segment
6523
 
 *    has no label string.
6524
 
 *  
6525
 
 *  Mac OS X threading:
6526
 
 *    Not thread safe
6527
 
 *  
6528
 
 *  Parameters:
6529
 
 *    
6530
 
 *    inSegmentedView:
6531
 
 *      The segmented view which owns the segment whose label you wish
6532
 
 *      to set.
6533
 
 *    
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.
6538
 
 *    
6539
 
 *    inLabel:
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.
6543
 
 *  
6544
 
 *  Availability:
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
6548
 
 }
6549
 
function HISegmentedViewSetSegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewSetSegmentLabel';
6550
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6551
 
 
6552
 
 
6553
 
{
6554
 
 *  HISegmentedViewCopySegmentLabel()
6555
 
 *  
6556
 
 *  Summary:
6557
 
 *    Get the label associated with the given segment.
6558
 
 *  
6559
 
 *  Mac OS X threading:
6560
 
 *    Not thread safe
6561
 
 *  
6562
 
 *  Parameters:
6563
 
 *    
6564
 
 *    inSegmentedView:
6565
 
 *      The segmented view which owns the segment being queried.
6566
 
 *    
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.
6571
 
 *    
6572
 
 *    outLabel:
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.
6576
 
 *  
6577
 
 *  Availability:
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
6581
 
 }
6582
 
function HISegmentedViewCopySegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var outLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewCopySegmentLabel';
6583
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6584
 
 
6585
 
 
6586
 
{
6587
 
 *  HISegmentedViewSetSegmentContentWidth()
6588
 
 *  
6589
 
 *  Summary:
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.
6594
 
 *  
6595
 
 *  Mac OS X threading:
6596
 
 *    Not thread safe
6597
 
 *  
6598
 
 *  Parameters:
6599
 
 *    
6600
 
 *    inSegmentedView:
6601
 
 *      The segmented view which owns the segment whose content width
6602
 
 *      you wish to set.
6603
 
 *    
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.
6608
 
 *    
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
6612
 
 *      ignored.
6613
 
 *    
6614
 
 *    inWidth:
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
6618
 
 *      undefined.
6619
 
 *  
6620
 
 *  Availability:
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
6624
 
 }
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 *)
6627
 
 
6628
 
 
6629
 
{
6630
 
 *  HISegmentedViewGetSegmentContentWidth()
6631
 
 *  
6632
 
 *  Summary:
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.
6637
 
 *  
6638
 
 *  Mac OS X threading:
6639
 
 *    Not thread safe
6640
 
 *  
6641
 
 *  Parameters:
6642
 
 *    
6643
 
 *    inSegmentedView:
6644
 
 *      The segmented view which owns the segment being queried.
6645
 
 *    
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.
6650
 
 *    
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
6654
 
 *      this information.
6655
 
 *  
6656
 
 *  Result:
6657
 
 *    Returns the width of the content for the given segment. If you
6658
 
 *    pass an illegal segment index, the result is undefined.
6659
 
 *  
6660
 
 *  Availability:
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
6664
 
 }
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 *)
6667
 
 
6668
 
 
6669
 
{
6670
 
 *  HISegmentedViewSetSegmentImage()
6671
 
 *  
6672
 
 *  Summary:
6673
 
 *    Sets or clears the image associated with a given segment.
6674
 
 *  
6675
 
 *  Mac OS X threading:
6676
 
 *    Not thread safe
6677
 
 *  
6678
 
 *  Parameters:
6679
 
 *    
6680
 
 *    inSegmentedView:
6681
 
 *      The segmented view which owns the segment whose image you wish
6682
 
 *      to set.
6683
 
 *    
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.
6688
 
 *    
6689
 
 *    inImage:
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.
6694
 
 *  
6695
 
 *  Availability:
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
6699
 
 }
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 *)
6702
 
 
6703
 
 
6704
 
{
6705
 
 *  HISegmentedViewGetSegmentImageContentType()
6706
 
 *  
6707
 
 *  Summary:
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.
6712
 
 *  
6713
 
 *  Mac OS X threading:
6714
 
 *    Not thread safe
6715
 
 *  
6716
 
 *  Parameters:
6717
 
 *    
6718
 
 *    inSegmentedView:
6719
 
 *      The segmented view which owns the segment being queried.
6720
 
 *    
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.
6725
 
 *  
6726
 
 *  Result:
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
6729
 
 *    undefined.
6730
 
 *  
6731
 
 *  Availability:
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
6735
 
 }
6736
 
function HISegmentedViewGetSegmentImageContentType( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HIViewImageContentType; external name '_HISegmentedViewGetSegmentImageContentType';
6737
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6738
 
 
6739
 
 
6740
 
{
6741
 
 *  HISegmentedViewCopySegmentImage()
6742
 
 *  
6743
 
 *  Summary:
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.
6751
 
 *  
6752
 
 *  Mac OS X threading:
6753
 
 *    Not thread safe
6754
 
 *  
6755
 
 *  Parameters:
6756
 
 *    
6757
 
 *    inSegmentedView:
6758
 
 *      The segmented view which owns the segment being queried.
6759
 
 *    
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.
6764
 
 *    
6765
 
 *    ioImage:
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.
6771
 
 *  
6772
 
 *  Availability:
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
6776
 
 }
6777
 
function HISegmentedViewCopySegmentImage( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var ioImage: HIViewImageContentInfo ): OSStatus; external name '_HISegmentedViewCopySegmentImage';
6778
 
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6779
 
 
6780
 
 
6781
 
{==============================================================================}
6782
 
{  Clock view events                                                           }
6783
 
{==============================================================================}
6784
 
const
6785
 
        kEventClassClockView = $636C6F63 (* 'cloc' *);
6786
 
 
6787
 
{
6788
 
 *  kEventClassClockView / kEventClockDateOrTimeChanged
6789
 
 *  
6790
 
 *  Summary:
6791
 
 *    Allows clients to determine when the user has changed the date or
6792
 
 *    time in the clock control.
6793
 
 *  
6794
 
 *  Discussion:
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
6800
 
 *    control.
6801
 
 *  
6802
 
 *  Mac OS X threading:
6803
 
 *    Not thread safe
6804
 
 *  
6805
 
 *  Parameters:
6806
 
 *    
6807
 
 *    --> kEventParamDirectObject (in, typeControlRef)
6808
 
 *          The view whose date has changed.
6809
 
 *  
6810
 
 *  Availability:
6811
 
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
6812
 
 *    CarbonLib:        not available
6813
 
 }
6814
 
const
6815
 
        kEventClockDateOrTimeChanged = 1;
6816
 
 
6817
 
 
6818
 
 
6819
 
 
6820
 
end.