~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/extra/univint/CarbonEvents.pas

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
     File:       HIToolbox/CarbonEvents.h
 
3
 
 
4
     Contains:   Carbon Event Manager
 
5
 
 
6
     Version:    HIToolbox-219.4.81~2
 
7
 
 
8
     Copyright:  � 1999-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
{       Pascal Translation Updated:  Peter N Lewis, <peter@stairways.com.au>, August 2005 }
 
17
{
 
18
    Modified for use with Free Pascal
 
19
    Version 200
 
20
    Please report any bugs to <gpc@microbizz.nl>
 
21
}
 
22
 
 
23
{$mode macpas}
 
24
{$packenum 1}
 
25
{$macro on}
 
26
{$inline on}
 
27
{$CALLING MWPASCAL}
 
28
 
 
29
unit CarbonEvents;
 
30
interface
 
31
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
 
32
{$setc GAP_INTERFACES_VERSION := $0200}
 
33
 
 
34
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
 
35
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
 
36
{$endc}
 
37
 
 
38
{$ifc defined CPUPOWERPC and defined CPUI386}
 
39
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
 
40
{$endc}
 
41
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
 
42
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
 
43
{$endc}
 
44
 
 
45
{$ifc not defined __ppc__ and defined CPUPOWERPC}
 
46
        {$setc __ppc__ := 1}
 
47
{$elsec}
 
48
        {$setc __ppc__ := 0}
 
49
{$endc}
 
50
{$ifc not defined __i386__ and defined CPUI386}
 
51
        {$setc __i386__ := 1}
 
52
{$elsec}
 
53
        {$setc __i386__ := 0}
 
54
{$endc}
 
55
 
 
56
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
 
57
        {$error Conflicting definitions for __ppc__ and __i386__}
 
58
{$endc}
 
59
 
 
60
{$ifc defined __ppc__ and __ppc__}
 
61
        {$setc TARGET_CPU_PPC := TRUE}
 
62
        {$setc TARGET_CPU_X86 := FALSE}
 
63
{$elifc defined __i386__ and __i386__}
 
64
        {$setc TARGET_CPU_PPC := FALSE}
 
65
        {$setc TARGET_CPU_X86 := TRUE}
 
66
{$elsec}
 
67
        {$error Neither __ppc__ nor __i386__ is defined.}
 
68
{$endc}
 
69
{$setc TARGET_CPU_PPC_64 := FALSE}
 
70
 
 
71
{$ifc defined FPC_BIG_ENDIAN}
 
72
        {$setc TARGET_RT_BIG_ENDIAN := TRUE}
 
73
        {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 
74
{$elifc defined FPC_LITTLE_ENDIAN}
 
75
        {$setc TARGET_RT_BIG_ENDIAN := FALSE}
 
76
        {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 
77
{$elsec}
 
78
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 
79
{$endc}
 
80
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 
81
{$setc CALL_NOT_IN_CARBON := FALSE}
 
82
{$setc OLDROUTINENAMES := FALSE}
 
83
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 
84
{$setc OPAQUE_UPP_TYPES := TRUE}
 
85
{$setc OTCARBONAPPLICATION := TRUE}
 
86
{$setc OTKERNEL := FALSE}
 
87
{$setc PM_USE_SESSION_APIS := TRUE}
 
88
{$setc TARGET_API_MAC_CARBON := TRUE}
 
89
{$setc TARGET_API_MAC_OS8 := FALSE}
 
90
{$setc TARGET_API_MAC_OSX := TRUE}
 
91
{$setc TARGET_CARBON := TRUE}
 
92
{$setc TARGET_CPU_68K := FALSE}
 
93
{$setc TARGET_CPU_MIPS := FALSE}
 
94
{$setc TARGET_CPU_SPARC := FALSE}
 
95
{$setc TARGET_OS_MAC := TRUE}
 
96
{$setc TARGET_OS_UNIX := FALSE}
 
97
{$setc TARGET_OS_WIN32 := FALSE}
 
98
{$setc TARGET_RT_MAC_68881 := FALSE}
 
99
{$setc TARGET_RT_MAC_CFM := FALSE}
 
100
{$setc TARGET_RT_MAC_MACHO := TRUE}
 
101
{$setc TYPED_FUNCTION_POINTERS := TRUE}
 
102
{$setc TYPE_BOOL := FALSE}
 
103
{$setc TYPE_EXTENDED := FALSE}
 
104
{$setc TYPE_LONGLONG := TRUE}
 
105
uses MacTypes,CFBase,CGContext,Quickdraw,AXUIElement,Drag,CFArray,HIObjectCore,Events,Menus,Controls,CFString,AERegistry,AEDataModel,CarbonEventsCore,HIGeometry;
 
106
 
 
107
 
 
108
{$ALIGN MAC68K}
 
109
 
 
110
{--------------------------------------------------------------------------------------}
 
111
{ Parameter names and types                                                            }
 
112
{--------------------------------------------------------------------------------------}
 
113
 
 
114
const
 
115
{
 
116
   * This event parameter may be added to any event that is posted to
 
117
   * the main event queue. When the event is removed from the queue and
 
118
   * sent to the event dispatcher, the dispatcher will retrieve the
 
119
   * EventTargetRef contained in this parameter and send the event
 
120
   * directly to that event target. If this parameter is not available
 
121
   * in the event, the dispatcher will send the event to a suitable
 
122
   * target, or to the application target if no more specific target is
 
123
   * appropriate. Available in CarbonLib 1.3.1 and later, and Mac OS X.
 
124
   }
 
125
        kEventParamPostTarget = $70747267 (* 'ptrg' *); { typeEventTargetRef}
 
126
 
 
127
  {
 
128
   * Indicates an event parameter of type EventTargetRef.
 
129
   }
 
130
        typeEventTargetRef = $65747267 (* 'etrg' *); { EventTargetRef}
 
131
 
 
132
{ Generic toolbox parameters and types}
 
133
 
 
134
{
 
135
   *** NOTE ON AUTOMATIC TYPE CONVERSIONS
 
136
   Please keep in mind that some of these types can be automatically converted
 
137
   to other types just by asking for them as different types. The following
 
138
   type conversions are automatic:
 
139
        typeQDRectangle     <-->        typeHIRect
 
140
        typeQDPoint         <-->        typeHIPoint
 
141
   In addition, if a CFBoolean type is added to an event, a request to receive
 
142
   the data as typeBoolean (instead of typeCFType), will be automatically honored.
 
143
}
 
144
 
 
145
 
 
146
const
 
147
        kEventParamWindowRef = $77696E64 (* 'wind' *); { typeWindowRef}
 
148
        kEventParamGrafPort = $67726166 (* 'graf' *); { typeGrafPtr}
 
149
        kEventParamMenuRef = $6D656E75 (* 'menu' *); { typeMenuRef}
 
150
        kEventParamEventRef = $65766E74 (* 'evnt' *); { typeEventRef}
 
151
        kEventParamControlRef = $6374726C (* 'ctrl' *); { typeControlRef}
 
152
        kEventParamRgnHandle = $72676E68 (* 'rgnh' *); { typeQDRgnHandle}
 
153
        kEventParamEnabled = $656E6162 (* 'enab' *); { typeBoolean}
 
154
        kEventParamDimensions = $64696D73 (* 'dims' *); { typeQDPoint}
 
155
        kEventParamBounds = $626F756E (* 'boun' *); { typeQDRectangle}
 
156
        kEventParamAvailableBounds = $61766C62 (* 'avlb' *); { typeQDRectangle}
 
157
        kEventParamAEEventID = keyAEEventID; { typeType}
 
158
        kEventParamAEEventClass = keyAEEventClass; { typeType}
 
159
        kEventParamCGContextRef = $636E7478 (* 'cntx' *); { typeCGContextRef}
 
160
        kEventParamDeviceDepth = $64657664 (* 'devd' *); { typeShortInteger}
 
161
        kEventParamDeviceColor = $64657663 (* 'devc' *); { typeBoolean}
 
162
        kEventParamMutableArray = $6D617272 (* 'marr' *); { typeCFMutableArrayRef}
 
163
        kEventParamResult = $616E7372 (* 'ansr' *); { any type - depends on event like direct object}
 
164
        kEventParamMinimumSize = $6D6E737A (* 'mnsz' *); { typeHISize}
 
165
        kEventParamMaximumSize = $6D78737A (* 'mxsz' *); { typeHISize}
 
166
        kEventParamAttributes = $61747472 (* 'attr' *); { typeUInt32}
 
167
        kEventParamReason = $7768793F (* 'why?' *); { typeUInt32}
 
168
        kEventParamTransactionID = $74726E73 (* 'trns' *); { typeUInt32}
 
169
        kEventParamGDevice = $67646576 (* 'gdev' *); { typeGDHandle}
 
170
        kEventParamIndex = $696E6478 (* 'indx' *); { typeCFIndex}
 
171
        kEventParamUserData = $75737264 (* 'usrd' *); { typeVoidPtr}
 
172
        kEventParamShape = $73686170 (* 'shap' *); { typeHIShapeRef}
 
173
        typeWindowRef = $77696E64 (* 'wind' *); { WindowRef}
 
174
        typeGrafPtr = $67726166 (* 'graf' *); { CGrafPtr}
 
175
        typeGWorldPtr = $67776C64 (* 'gwld' *); { GWorldPtr}
 
176
        typeMenuRef = $6D656E75 (* 'menu' *); { MenuRef}
 
177
        typeControlRef = $6374726C (* 'ctrl' *); { ControlRef}
 
178
        typeCollection = $636C746E (* 'cltn' *); { Collection}
 
179
        typeQDRgnHandle = $72676E68 (* 'rgnh' *); { RgnHandle}
 
180
        typeOSStatus = $6F737374 (* 'osst' *); { OSStatus}
 
181
        typeCFIndex = $63666978 (* 'cfix' *); { CFIndex}
 
182
        typeCGContextRef = $636E7478 (* 'cntx' *); { CGContextRef}
 
183
        typeHIPoint = $68697074 (* 'hipt' *); { HIPoint}
 
184
        typeHISize = $6869737A (* 'hisz' *); { HISize}
 
185
        typeHIRect = $68697263 (* 'hirc' *); { HIRect}
 
186
        typeHIShapeRef = $73686170 (* 'shap' *); { HIShapeRef}
 
187
        typeVoidPtr = $766F6964 (* 'void' *); { void * (used for HIObject fun)}
 
188
        typeGDHandle = $67646576 (* 'gdev' *); { GDHandle}
 
189
 
 
190
{ Mouse event parameters and types}
 
191
 
 
192
const
 
193
        kEventParamMouseLocation = $6D6C6F63 (* 'mloc' *); { typeHIPoint}
 
194
        kEventParamWindowMouseLocation = $776D6F75 (* 'wmou' *); { typeHIPoint (Mac OS X 10.1 or later)}
 
195
        kEventParamMouseButton = $6D62746E (* 'mbtn' *); { typeMouseButton}
 
196
        kEventParamClickCount = $63636E74 (* 'ccnt' *); { typeUInt32}
 
197
        kEventParamMouseWheelAxis = $6D776178 (* 'mwax' *); { typeMouseWheelAxis}
 
198
        kEventParamMouseWheelDelta = $6D77646C (* 'mwdl' *); { typeSInt32}
 
199
        kEventParamMouseDelta = $6D647461 (* 'mdta' *); { typeHIPoint (10.2 or later) or typeQDPoint}
 
200
        kEventParamMouseChord = $63686F72 (* 'chor' *); { typeUInt32}
 
201
        kEventParamTabletEventType = $74626C74 (* 'tblt' *); { typeUInt32}
 
202
        kEventParamMouseTrackingRef = $6D747266 (* 'mtrf' *); { typeMouseTrackingRef}
 
203
        typeMouseButton = $6D62746E (* 'mbtn' *); { EventMouseButton}
 
204
        typeMouseWheelAxis = $6D776178 (* 'mwax' *); { EventMouseWheelAxis}
 
205
        typeMouseTrackingRef = $6D747266 (* 'mtrf' *); { MouseTrackingRef}
 
206
 
 
207
{ Keyboard event parameter and types}
 
208
 
 
209
const
 
210
        kEventParamKeyCode = $6B636F64 (* 'kcod' *); { typeUInt32}
 
211
        kEventParamKeyMacCharCodes = $6B636872 (* 'kchr' *); { typeChar}
 
212
        kEventParamKeyModifiers = $6B6D6F64 (* 'kmod' *); { typeUInt32}
 
213
        kEventParamKeyUnicodes = $6B756E69 (* 'kuni' *); { typeUnicodeText}
 
214
        kEventParamKeyboardType = $6B626474 (* 'kbdt' *); { typeUInt32}
 
215
        typeEventHotKeyID = $686B6964 (* 'hkid' *); { EventHotKeyID}
 
216
 
 
217
{ General TSM event parameters}
 
218
 
 
219
const
 
220
        kEventParamTSMSendRefCon = $74737263 (* 'tsrc' *); {    typeLongInteger}
 
221
        kEventParamTSMSendComponentInstance = $74736369 (* 'tsci' *); {    typeComponentInstance}
 
222
 
 
223
{ TextInput event parameters}
 
224
 
 
225
const
 
226
        kEventParamTextInputSendRefCon = kEventParamTSMSendRefCon; {    typeLongInteger}
 
227
        kEventParamTextInputSendComponentInstance = kEventParamTSMSendComponentInstance; {    typeComponentInstance}
 
228
        kEventParamTextInputSendSLRec = $7473736C (* 'tssl' *); {    typeIntlWritingCode}
 
229
        kEventParamTextInputReplySLRec = $7472736C (* 'trsl' *); {    typeIntlWritingCode}
 
230
        kEventParamTextInputSendText = $74737478 (* 'tstx' *); {    typeUnicodeText (if TSMDocument is Unicode), otherwise typeChar}
 
231
        kEventParamTextInputReplyText = $74727478 (* 'trtx' *); {    typeUnicodeText (if TSMDocument is Unicode), otherwise typeChar}
 
232
        kEventParamTextInputSendUpdateRng = $74737570 (* 'tsup' *); {    typeTextRangeArray}
 
233
        kEventParamTextInputSendHiliteRng = $74736869 (* 'tshi' *); {    typeTextRangeArray}
 
234
        kEventParamTextInputSendClauseRng = $7473636C (* 'tscl' *); {    typeOffsetArray}
 
235
        kEventParamTextInputSendPinRng = $7473706E (* 'tspn' *); {    typeTextRange}
 
236
        kEventParamTextInputSendFixLen = $74736678 (* 'tsfx' *); {    typeLongInteger}
 
237
        kEventParamTextInputSendLeadingEdge = $74736C65 (* 'tsle' *); {    typeBoolean}
 
238
        kEventParamTextInputReplyLeadingEdge = $74726C65 (* 'trle' *); {    typeBoolean}
 
239
        kEventParamTextInputSendTextOffset = $7473746F (* 'tsto' *); {    typeLongInteger}
 
240
        kEventParamTextInputReplyTextOffset = $7472746F (* 'trto' *); {    typeLongInteger}
 
241
        kEventParamTextInputReplyRegionClass = $74727267 (* 'trrg' *); {    typeLongInteger}
 
242
        kEventParamTextInputSendCurrentPoint = $74736370 (* 'tscp' *); {    typeQDPoint}
 
243
        kEventParamTextInputSendDraggingMode = $7473646D (* 'tsdm' *); {    typeBoolean}
 
244
        kEventParamTextInputReplyPoint = $74727074 (* 'trpt' *); {    typeQDPoint}
 
245
        kEventParamTextInputReplyFont = $74726674 (* 'trft' *); {    typeLongInteger}
 
246
        kEventParamTextInputReplyFMFont = $7472666D (* 'trfm' *); {    typeUInt32}
 
247
        kEventParamTextInputReplyPointSize = $7472707A (* 'trpz' *); {    typeFixed}
 
248
        kEventParamTextInputReplyLineHeight = $74726C68 (* 'trlh' *); {    typeShortInteger}
 
249
        kEventParamTextInputReplyLineAscent = $74726C61 (* 'trla' *); {    typeShortInteger}
 
250
        kEventParamTextInputReplyTextAngle = $74727461 (* 'trta' *); {    typeFixed}
 
251
        kEventParamTextInputSendShowHide = $74737368 (* 'tssh' *); {    typeBoolean}
 
252
        kEventParamTextInputReplyShowHide = $74727368 (* 'trsh' *); {    typeBoolean}
 
253
        kEventParamTextInputSendKeyboardEvent = $74736B65 (* 'tske' *); {    typeEventRef}
 
254
        kEventParamTextInputSendTextServiceEncoding = $74737365 (* 'tsse' *); {    typeUInt32}
 
255
        kEventParamTextInputSendTextServiceMacEncoding = $7473736D (* 'tssm' *); {    typeUInt32}
 
256
        kEventParamTextInputReplyMacEncoding = $74726D65 (* 'trme' *); {    typeUInt32}
 
257
        kEventParamTextInputGlyphInfoArray = $676C7068 (* 'glph' *); {    typeGlyphInfoArray}
 
258
        kEventParamTextInputSendGlyphInfoArray = kEventParamTextInputGlyphInfoArray;
 
259
        kEventParamTextInputReplyGlyphInfoArray = $72677068 (* 'rgph' *); {    typeGlyphInfoArray}
 
260
        kEventParamTextInputSendReplaceRange = $74737270 (* 'tsrp' *); {    typeCFRange}
 
261
 
 
262
{ TSMDocumentAccess event parameters and types}
 
263
 
 
264
const
 
265
        kEventParamTSMDocAccessSendRefCon = kEventParamTSMSendRefCon; {    typeLongInteger}
 
266
        kEventParamTSMDocAccessSendComponentInstance = kEventParamTSMSendComponentInstance; {    typeComponentInstance}
 
267
        kEventParamTSMDocAccessCharacterCount = $74646374 (* 'tdct' *); {    typeCFIndex}
 
268
        kEventParamTSMDocAccessReplyCharacterRange = $74647272 (* 'tdrr' *); {    typeCFRange}
 
269
        kEventParamTSMDocAccessReplyCharactersPtr = $74647270 (* 'tdrp' *); {    typePtr}
 
270
        kEventParamTSMDocAccessSendCharacterIndex = $74647369 (* 'tdsi' *); {    typeCFIndex}
 
271
        kEventParamTSMDocAccessSendCharacterRange = $74647372 (* 'tdsr' *); {    typeCFRange}
 
272
        kEventParamTSMDocAccessSendCharactersPtr = $74647370 (* 'tdsp' *); {    typePtr}
 
273
        kEventParamTSMDocAccessRequestedCharacterAttributes = $74646361 (* 'tdca' *); {    typeUInt32}
 
274
        kEventParamTSMDocAccessReplyATSFont = $74646166 (* 'tdaf' *); {    typeATSFontRef}
 
275
        kEventParamTSMDocAccessReplyFontSize = $74647273 (* 'tdrs' *); {    typeFloat}
 
276
        kEventParamTSMDocAccessEffectiveRange = $74646572 (* 'tder' *); {    typeRange}
 
277
        kEventParamTSMDocAccessReplyATSUGlyphSelector = $74647267 (* 'tdrg' *); {    typeGlyphSelector}
 
278
        kEventParamTSMDocAccessLockCount = $74646C63 (* 'tdlc' *); {    typeCFIndex}
 
279
        kEventParamTSMDocAccessLineBounds = $74646C62 (* 'tdlb' *); {  typeCFMutableArrayRef}
 
280
        typeATSFontRef = $61747366 (* 'atsf' *); {    ATSFontRef}
 
281
        typeGlyphSelector = $676C6673 (* 'glfs' *); {    ATSUGlyphSelector}
 
282
 
 
283
{ Command event parameters and types}
 
284
 
 
285
const
 
286
        kEventParamHICommand = $68636D64 (* 'hcmd' *); { typeHICommand}
 
287
        typeHICommand = $68636D64 (* 'hcmd' *); { HICommand}
 
288
 
 
289
{ Window event parameters and types}
 
290
 
 
291
const
 
292
        kEventParamWindowFeatures = $77667472 (* 'wftr' *); { typeUInt32}
 
293
        kEventParamWindowDefPart = $77647063 (* 'wdpc' *); { typeWindowDefPartCode}
 
294
        kEventParamWindowPartCode = $77706172 (* 'wpar' *); { typeWindowPartCode}
 
295
        kEventParamCurrentBounds = $63726374 (* 'crct' *); { typeQDRectangle}
 
296
        kEventParamOriginalBounds = $6F726374 (* 'orct' *); { typeQDRectangle}
 
297
        kEventParamPreviousBounds = $70726374 (* 'prct' *); { typeQDRectangle}
 
298
        kEventParamClickActivation = $636C6163 (* 'clac' *); { typeClickActivationResult}
 
299
        kEventParamWindowRegionCode = $77736870 (* 'wshp' *); { typeWindowRegionCode}
 
300
        kEventParamWindowDragHiliteFlag = $77646866 (* 'wdhf' *); { typeBoolean}
 
301
        kEventParamWindowModifiedFlag = $776D6666 (* 'wmff' *); { typeBoolean}
 
302
        kEventParamWindowProxyGWorldPtr = $77706777 (* 'wpgw' *); { typeGWorldPtr}
 
303
        kEventParamWindowProxyImageRgn = $77706972 (* 'wpir' *); { typeQDRgnHandle}
 
304
        kEventParamWindowProxyOutlineRgn = $77706F72 (* 'wpor' *); { typeQDRgnHandle}
 
305
        kEventParamWindowStateChangedFlags = $77736366 (* 'wscf' *); { typeUInt32 }
 
306
        kEventParamWindowTitleFullWidth = $77746677 (* 'wtfw' *); { typeSInt16}
 
307
        kEventParamWindowTitleTextWidth = $77747477 (* 'wttw' *); { typeSInt16}
 
308
        kEventParamWindowGrowRect = $67726374 (* 'grct' *); { typeQDRectangle}
 
309
        kEventParamPreviousDockRect = $70647263 (* 'pdrc' *); { typeHIRect}
 
310
        kEventParamPreviousDockDevice = $70646764 (* 'pdgd' *); { typeGDHandle}
 
311
        kEventParamCurrentDockRect = $63647263 (* 'cdrc' *); { typeHIRect}
 
312
        kEventParamCurrentDockDevice = $63646764 (* 'cdgd' *); { typeGDHandle}
 
313
        kEventParamWindowTransitionAction = $77746163 (* 'wtac' *); { typeWindowTransitionAction}
 
314
        kEventParamWindowTransitionEffect = $77746566 (* 'wtef' *); { typeWindowTransitionEffect}
 
315
        typeWindowRegionCode = $77736870 (* 'wshp' *); { WindowRegionCode}
 
316
        typeWindowDefPartCode = $77647074 (* 'wdpt' *); { WindowDefPartCode}
 
317
        typeWindowPartCode = $77706172 (* 'wpar' *); { WindowPartCode}
 
318
        typeClickActivationResult = $636C6163 (* 'clac' *); { ClickActivationResult}
 
319
        typeWindowTransitionAction = $77746163 (* 'wtac' *); { WindowTransitionAction}
 
320
        typeWindowTransitionEffect = $77746566 (* 'wtef' *); { WindowTransitionEffect}
 
321
 
 
322
{ Control event parameters and types}
 
323
 
 
324
const
 
325
        kEventParamControlPart = $63707274 (* 'cprt' *); { typeControlPartCode}
 
326
        kEventParamInitCollection = $69636F6C (* 'icol' *); { typeCollection}
 
327
        kEventParamControlMessage = $636D7367 (* 'cmsg' *); { typeShortInteger}
 
328
        kEventParamControlParam = $6370726D (* 'cprm' *); { typeLongInteger}
 
329
        kEventParamControlResult = $6372736C (* 'crsl' *); { typeLongInteger}
 
330
        kEventParamControlRegion = $6372676E (* 'crgn' *); { typeQDRgnHandle}
 
331
        kEventParamControlAction = $63617570 (* 'caup' *); { typeControlActionUPP}
 
332
        kEventParamControlIndicatorDragConstraint = $63696463 (* 'cidc' *); { typeIndicatorDragConstraint}
 
333
        kEventParamControlIndicatorRegion = $6369726E (* 'cirn' *); { typeQDRgnHandle}
 
334
        kEventParamControlIsGhosting = $63677374 (* 'cgst' *); { typeBoolean}
 
335
        kEventParamControlIndicatorOffset = $63696F66 (* 'ciof' *); { typeQDPoint}
 
336
        kEventParamControlClickActivationResult = $63636172 (* 'ccar' *); { typeClickActivationResult}
 
337
        kEventParamControlSubControl = $63737562 (* 'csub' *); { typeControlRef}
 
338
        kEventParamControlOptimalBounds = $636F626E (* 'cobn' *); { typeQDRectangle}
 
339
        kEventParamControlOptimalBaselineOffset = $636F626F (* 'cobo' *); { typeShortInteger}
 
340
        kEventParamControlDataTag = $63647467 (* 'cdtg' *); { typeEnumeration}
 
341
        kEventParamControlDataBuffer = $63646266 (* 'cdbf' *); { typePtr}
 
342
        kEventParamControlDataBufferSize = $63646273 (* 'cdbs' *); { typeLongInteger}
 
343
        kEventParamControlDrawDepth = $63646470 (* 'cddp' *); { typeShortInteger}
 
344
        kEventParamControlDrawInColor = $63646963 (* 'cdic' *); { typeBoolean}
 
345
        kEventParamControlFeatures = $63667472 (* 'cftr' *); { typeUInt32}
 
346
        kEventParamControlPartBounds = $63706264 (* 'cpbd' *); { typeQDRectangle}
 
347
        kEventParamControlOriginalOwningWindow = $636F6F77 (* 'coow' *); { typeWindowRef}
 
348
        kEventParamControlCurrentOwningWindow = $63636F77 (* 'ccow' *); { typeWindowRef}
 
349
        kEventParamControlFocusEverything = $63666576 (* 'cfev' *); { typeBoolean}
 
350
        kEventParamNextControl = $636E7863 (* 'cnxc' *); { typeControlRef}
 
351
        kEventParamStartControl = $63737463 (* 'cstc' *); { typeControlRef}
 
352
        kEventParamControlSubview = $63737677 (* 'csvw' *); { typeControlRef}
 
353
        kEventParamControlPreviousPart = $636F7063 (* 'copc' *); { typeControlPartCode}
 
354
        kEventParamControlCurrentPart = $636E7063 (* 'cnpc' *); { typeControlPartCode}
 
355
        kEventParamControlInvalRgn = $63697672 (* 'civr' *); { typeQDRgnHandle}
 
356
        kEventParamControlValue = $6376616C (* 'cval' *); { typeLongInteger}
 
357
        kEventParamControlHit = $63686974 (* 'chit' *); { typeBoolean}
 
358
        kEventParamControlPartAutoRepeats = $63617572 (* 'caur' *); { typeBoolean}
 
359
        kEventParamControlFrameMetrics = $63666D74 (* 'cfmt' *); { typeControlFrameMetrics}
 
360
        kEventParamControlWouldAcceptDrop = $636C6467 (* 'cldg' *); { typeBoolean}
 
361
        kEventParamControlPrefersShape = $63707368 (* 'cpsh' *); { typeBoolean}
 
362
        typeControlActionUPP = $63617570 (* 'caup' *); { ControlActionUPP}
 
363
        typeIndicatorDragConstraint = $63696463 (* 'cidc' *); { IndicatorDragConstraint}
 
364
        typeControlPartCode = $63707274 (* 'cprt' *); { ControlPartCode}
 
365
        typeControlFrameMetrics = $63696E73 (* 'cins' *); { HIViewFrameMetrics}
 
366
 
 
367
{ Menu event parameters and types}
 
368
 
 
369
const
 
370
        kEventParamCurrentMenuTrackingMode = $636D746D (* 'cmtm' *); { typeMenuTrackingMode}
 
371
        kEventParamNewMenuTrackingMode = $6E6D746D (* 'nmtm' *); { typeMenuTrackingMode}
 
372
        kEventParamMenuFirstOpen = $3173746F (* '1sto' *); { typeBoolean}
 
373
        kEventParamMenuItemIndex = $6974656D (* 'item' *); { typeMenuItemIndex}
 
374
        kEventParamMenuCommand = $6D636D64 (* 'mcmd' *); { typeMenuCommand}
 
375
        kEventParamEnableMenuForKeyEvent = $666F726B (* 'fork' *); { typeBoolean}
 
376
        kEventParamMenuEventOptions = $6D656F70 (* 'meop' *); { typeMenuEventOptions}
 
377
        kEventParamMenuContext = $6D637478 (* 'mctx' *); { typeUInt32}
 
378
        kEventParamMenuDismissed = $6D646973 (* 'mdis' *); { typeUInt32}
 
379
        kEventParamMenuItemBounds = $6D697462 (* 'mitb' *); { typeQDRectangle}
 
380
        kEventParamMenuMarkBounds = $6D6D6B62 (* 'mmkb' *); { typeQDRectangle}
 
381
        kEventParamMenuIconBounds = $6D696362 (* 'micb' *); { typeQDRectangle}
 
382
        kEventParamMenuTextBounds = $6D747862 (* 'mtxb' *); { typeQDRectangle}
 
383
        kEventParamMenuTextBaseline = $6D74626C (* 'mtbl' *); { typeShortInteger}
 
384
        kEventParamMenuCommandKeyBounds = $6D636D62 (* 'mcmb' *); { typeQDRectangle}
 
385
        kEventParamMenuVirtualTop = $6D767274 (* 'mvrt' *); { typeLongInteger}
 
386
        kEventParamMenuVirtualBottom = $6D767262 (* 'mvrb' *); { typeLongInteger}
 
387
        kEventParamMenuDrawState = $6D647273 (* 'mdrs' *); { typeThemeMenuState}
 
388
        kEventParamMenuItemType = $6D697470 (* 'mitp' *); { typeThemeMenuItemType}
 
389
        kEventParamMenuItemWidth = $6D697477 (* 'mitw' *); { typeShortInteger}
 
390
        kEventParamMenuItemHeight = $6D697468 (* 'mith' *); { typeShortInteger}
 
391
        kEventParamMenuFrameView = $6D667276 (* 'mfrv' *); { typeControlRef}
 
392
        kEventParamMenuType = $6D747970 (* 'mtyp' *); { typeThemeMenuType}
 
393
        kEventParamMenuIsPopup = $6D706F70 (* 'mpop' *); { typeBoolean}
 
394
        kEventParamMenuDirection = $6D646972 (* 'mdir' *); { typeMenuDirection}
 
395
        kEventParamParentMenu = $6D70726D (* 'mprm' *); { typeMenuRef}
 
396
        kEventParamParentMenuItem = $6D707269 (* 'mpri' *); { typeMenuItemIndex}
 
397
        kEventParamMenuPopupItem = $6D706974 (* 'mpit' *); { typeMenuItemIndex}
 
398
        typeMenuItemIndex = $6D696478 (* 'midx' *); { MenuItemIndex}
 
399
        typeMenuCommand = $6D636D64 (* 'mcmd' *); { MenuCommand}
 
400
        typeMenuTrackingMode = $6D746D64 (* 'mtmd' *); { MenuTrackingMode}
 
401
        typeMenuEventOptions = $6D656F70 (* 'meop' *); { MenuEventOptions}
 
402
        typeThemeMenuState = $746D6E73 (* 'tmns' *); { ThemeMenuState}
 
403
        typeThemeMenuItemType = $746D6974 (* 'tmit' *); { ThemeMenuItemType}
 
404
        typeMenuDirection = $6D646972 (* 'mdir' *); { UInt32}
 
405
        typeThemeMenuType = $746D7479 (* 'tmty' *); { ThemeMenuType}
 
406
 
 
407
{ Application event parameters}
 
408
 
 
409
const
 
410
        kEventParamProcessID = $70736E20 (* 'psn ' *); { typeProcessSerialNumber}
 
411
        kEventParamLaunchRefCon = $6C726566 (* 'lref' *); { typeUInt32}
 
412
        kEventParamLaunchErr = $65727220 (* 'err ' *); { typeOSStatus}
 
413
        kEventParamSystemUIMode = $75696D64 (* 'uimd' *); { typeUInt32}
 
414
        kEventParamIsInInstantMouser = $696D6F75 (* 'imou' *); { typeBoolean}
 
415
        kEventParamPreviousWindow = $70727677 (* 'prvw' *); { typeWindowRef}
 
416
        kEventParamCurrentWindow = $63757277 (* 'curw' *); { typeWindowRef}
 
417
 
 
418
{ Tablet event parameters and types}
 
419
 
 
420
const
 
421
        kEventParamTabletPointRec = $74627263 (* 'tbrc' *); { typeTabletPointRec}
 
422
        kEventParamTabletProximityRec = $74627078 (* 'tbpx' *); { typeTabletProximityRec}
 
423
        typeTabletPointRec = $74627263 (* 'tbrc' *); { kEventParamTabletPointRec}
 
424
        typeTabletProximityRec = $74627078 (* 'tbpx' *); { kEventParamTabletProximityRec}
 
425
 
 
426
{ Appearance event parameters}
 
427
 
 
428
const
 
429
        kEventParamNewScrollBarVariant = $6E736276 (* 'nsbv' *); { typeShortInteger}
 
430
 
 
431
{ Service event parameters}
 
432
 
 
433
const
 
434
        kEventParamPasteboardRef = $70627264 (* 'pbrd' *); {    typePasteboardRef}
 
435
        kEventParamScrapRef = $73637270 (* 'scrp' *); {    typeScrapRef}
 
436
        kEventParamServiceCopyTypes = $73767364 (* 'svsd' *); {    typeCFMutableArrayRef}
 
437
        kEventParamServicePasteTypes = $73767074 (* 'svpt' *); {    typeCFMutableArrayRef}
 
438
        kEventParamServiceMessageName = $73766D67 (* 'svmg' *); {    typeCFStringRef}
 
439
        kEventParamServiceUserData = $73767564 (* 'svud' *); {    typeCFStringRef}
 
440
        typePasteboardRef = $70627264 (* 'pbrd' *); {    PasteboardRef}
 
441
        typeScrapRef = $73637270 (* 'scrp' *); {    ScrapRef}
 
442
 
 
443
{ Accessibility event parameters}
 
444
 
 
445
const
 
446
        kEventParamAccessibleObject = $616F626A (* 'aobj' *); { typeCFTypeRef with an AXUIElementRef}
 
447
        kEventParamAccessibleChild = $6163686C (* 'achl' *); { typeCFTypeRef with an AXUIElementRef}
 
448
        kEventParamAccessibleAttributeName = $61746E6D (* 'atnm' *); { typeCFStringRef}
 
449
        kEventParamAccessibleAttributeNames = $61746E73 (* 'atns' *); { typeCFMutableArrayRef of CFStringRefs}
 
450
        kEventParamAccessibleAttributeValue = $6174766C (* 'atvl' *); { variable}
 
451
        kEventParamAccessibleAttributeSettable = $61747374 (* 'atst' *); { typeBoolean}
 
452
        kEventParamAccessibleAttributeParameter = $61747061 (* 'atpa' *); { typeCFTypeRef}
 
453
        kEventParamAccessibleActionName = $61636E6D (* 'acnm' *); { typeCFStringRef}
 
454
        kEventParamAccessibleActionNames = $61636E73 (* 'acns' *); { typeCFMutableArrayRef of CFStringRefs}
 
455
        kEventParamAccessibleActionDescription = $61636473 (* 'acds' *); { typeCFMutableStringRef}
 
456
        kEventParamAccessibilityEventQueued = $61657175 (* 'aequ' *); { typeBoolean}
 
457
 
 
458
{ Text field event type}
 
459
 
 
460
const
 
461
        typeCFRange = $6366726E (* 'cfrn' *); { CFRange}
 
462
 
 
463
{--------------------------------------------------------------------------------------}
 
464
{  � Helpful utilities                                                                 }
 
465
{--------------------------------------------------------------------------------------}
 
466
 
 
467
{
 
468
 *  Discussion:
 
469
 *    These are returned from calls to TrackMouseLocation and
 
470
 *    TrackMouseRegion. Those routines are designed as replacements to
 
471
 *    calls such as StillDown and WaitMouseUp. The advantage over those
 
472
 *    routines is that TrackMouseLocation and TrackMouseRegion will
 
473
 *    block if the user is not moving the mouse, whereas mouse tracking
 
474
 *    loops based on StillDown and WaitMouseUp will spin, chewing up
 
475
 *    valuable CPU time that could be better spent elsewhere. It is
 
476
 *    highly recommended that any tracking loops in your application
 
477
 *    stop using StillDown and WaitMouseUp and start using
 
478
 *    TrackMouseLocation/Region. See the notes on those routines for
 
479
 *    more information.
 
480
 }
 
481
const
 
482
        kTrackMouseLocationOptionDontConsumeMouseUp = 1 shl 0;
 
483
 
 
484
type
 
485
        MouseTrackingResult = UInt16;
 
486
const
 
487
        kMouseTrackingMouseDown = 1;
 
488
        kMouseTrackingMouseUp = 2;
 
489
        kMouseTrackingMouseExited = 3;
 
490
        kMouseTrackingMouseEntered = 4;
 
491
        kMouseTrackingMouseDragged = 5;
 
492
        kMouseTrackingKeyModifiersChanged = 6;
 
493
        kMouseTrackingUserCancelled = 7;
 
494
        kMouseTrackingTimedOut = 8;
 
495
        kMouseTrackingMouseMoved = 9;
 
496
 
 
497
{
 
498
 *  IsUserCancelEventRef()
 
499
 *  
 
500
 *  Discussion:
 
501
 *    Tests the event given to see whether the event represents a 'user
 
502
 *    cancel' event. Currently this is defined to be either the escape
 
503
 *    key being pressed, or command-period being pressed.
 
504
 *  
 
505
 *  Mac OS X threading:
 
506
 *    Not thread safe
 
507
 *  
 
508
 *  Result:
 
509
 *    A boolean value indicating whether the event is a user cancel
 
510
 *    event.
 
511
 *  
 
512
 *  Availability:
 
513
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
514
 *    CarbonLib:        in CarbonLib 1.1 and later
 
515
 *    Non-Carbon CFM:   not available
 
516
 }
 
517
function IsUserCancelEventRef( event: EventRef ): Boolean; external name '_IsUserCancelEventRef';
 
518
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
519
 
 
520
 
 
521
{
 
522
 *  TrackMouseLocation()
 
523
 *  
 
524
 *  Discussion:
 
525
 *    Once entered, this routine waits for certain mouse events (move,
 
526
 *    mouse down, mouse up). When one of these events occurs, the
 
527
 *    function returns and tells the caller what happened and where the
 
528
 *    mouse is currently located. While there is no activity, the
 
529
 *    current event loop is run, effectively blocking the current
 
530
 *    thread (save for any timers that fire). This helps to minimize
 
531
 *    CPU usage when there is nothing going on. 
 
532
 *    
 
533
 *    On Mac OS X 10.1 and earlier, and CarbonLib 1.5 and earlier,
 
534
 *    TrackMouseLocation, TrackMouseLocationWithOptions, and
 
535
 *    TrackMouseRegion only support mouse-tracking when a mouse button
 
536
 *    is pressed. They cannot be used for mouse-tracking when no mouse
 
537
 *    button is pressed; if called when no button is pressed, they will
 
538
 *    simply block until a button is pressed and will not return when
 
539
 *    the mouse is moved. On Mac OS X 10.2 and CarbonLib 1.6 and later,
 
540
 *    TrackMouseLocation, TrackMouseLocationWithOptions, and
 
541
 *    TrackMouseRegion support mouse-tracking without a pressed mouse
 
542
 *    button; TrackMouseLocation and TrackMouseLocationWithOptions
 
543
 *    return kMouseTrackingMouseMoved if the mouse is moved while no
 
544
 *    button is pressed, and TrackMouseRegion returns
 
545
 *    kMouseTrackingMouseEntered/Exited if the mouse moves into or out
 
546
 *    of the specified region while no button is pressed.
 
547
 *  
 
548
 *  Mac OS X threading:
 
549
 *    Not thread safe
 
550
 *  
 
551
 *  Parameters:
 
552
 *    
 
553
 *    inPort:
 
554
 *      The grafport to consider for mouse coordinates. You can pass
 
555
 *      NULL for this parameter to indicate the current port. The mouse
 
556
 *      location is returned in terms of local coordinates of this
 
557
 *      port. You can pass -1 for this parameter to indicate that the
 
558
 *      mouse location should be returned in global coordinates instead
 
559
 *      of local coordinates.
 
560
 *    
 
561
 *    outPt:
 
562
 *      On exit, this parameter receives the mouse location from the
 
563
 *      last mouse event that caused this function to exit.
 
564
 *    
 
565
 *    outResult:
 
566
 *      On exit, this parameter receives a value representing what kind
 
567
 *      of event was received that cause the function to exit, such as
 
568
 *      kMouseTrackingMouseUp.
 
569
 *  
 
570
 *  Result:
 
571
 *    An operating system result code.
 
572
 *  
 
573
 *  Availability:
 
574
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
575
 *    CarbonLib:        in CarbonLib 1.1 and later
 
576
 *    Non-Carbon CFM:   not available
 
577
 }
 
578
function TrackMouseLocation( inPort: GrafPtr { can be NULL }; var outPt: Point; var outResult: MouseTrackingResult ): OSStatus; external name '_TrackMouseLocation';
 
579
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
580
 
 
581
 
 
582
{
 
583
 *  TrackMouseLocationWithOptions()
 
584
 *  
 
585
 *  Discussion:
 
586
 *    This routine is largely identical to TrackMouseLocation. Please
 
587
 *    read the notes on that function as well.
 
588
 *    TrackMouseLocationWithOptions supports additional parameters for
 
589
 *    leaving mouse-up events in the event queue, specifying a timeout,
 
590
 *    and retrieving the current mouse position and keyboard modifiers.
 
591
 *  
 
592
 *  Mac OS X threading:
 
593
 *    Not thread safe
 
594
 *  
 
595
 *  Parameters:
 
596
 *    
 
597
 *    inPort:
 
598
 *      The grafport to consider for mouse coordinates. You can pass
 
599
 *      NULL for this parameter to indicate the current port. The mouse
 
600
 *      location is returned in terms of local coordinates of this
 
601
 *      port. You can pass -1 for this parameter to indicate that the
 
602
 *      mouse location should be returned in global coordinates instead
 
603
 *      of local coordinates.
 
604
 *    
 
605
 *    inOptions:
 
606
 *      The only option supported by this routine at present is
 
607
 *      kTrackMouseLocationOptionDontConsumeMouseUp, which indicates
 
608
 *      that the toolbox should leave mouse-up events in the queue. You
 
609
 *      may also pass zero for this parameter to get the default
 
610
 *      behavior, which is to remove mouse-up events from the queue
 
611
 *      before returning.
 
612
 *    
 
613
 *    inTimeout:
 
614
 *      The amount of time to wait for an event. If no events arrive
 
615
 *      within this time, kMouseTrackingTimedOut is returned in
 
616
 *      outResult.
 
617
 *    
 
618
 *    outPt:
 
619
 *      On exit, this parameter receives the mouse location from the
 
620
 *      last mouse event that caused this function to exit. If a
 
621
 *      timeout or key modifiers changed event caused this function to
 
622
 *      exit, the current mouse position at the time is returned.
 
623
 *    
 
624
 *    outModifiers:
 
625
 *      On exit, this parameter receives the most recent state of the
 
626
 *      keyboard modifiers. If a timeout caused this function to exit,
 
627
 *      the current keyboard modifiers at the time are returned.
 
628
 *    
 
629
 *    outResult:
 
630
 *      On exit, this parameter receives a value representing what kind
 
631
 *      of event was received that cause the function to exit, such as
 
632
 *      kMouseTrackingMouseUp.
 
633
 *  
 
634
 *  Result:
 
635
 *    An operating system result code.
 
636
 *  
 
637
 *  Availability:
 
638
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
639
 *    CarbonLib:        in CarbonLib 1.3 and later
 
640
 *    Non-Carbon CFM:   not available
 
641
 }
 
642
function TrackMouseLocationWithOptions( inPort: GrafPtr { can be NULL }; inOptions: OptionBits; inTimeout: EventTimeout; var outPt: Point; outModifiers: UInt32Ptr { can be NULL }; var outResult: MouseTrackingResult ): OSStatus; external name '_TrackMouseLocationWithOptions';
 
643
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
644
 
 
645
 
 
646
{
 
647
 *  TrackMouseRegion()
 
648
 *  
 
649
 *  Discussion:
 
650
 *    This routine is largely identical to TrackMouseLocation. Please
 
651
 *    read the notes on that function as well. TrackMouseRegion differs
 
652
 *    from TrackMouseLocation by only returning when the mouse enters
 
653
 *    or exits a specified region that you pass in to the function, as
 
654
 *    opposed to whenever the mouse moves (it also returns for mouse
 
655
 *    up/down events). This is useful if you don't need to know
 
656
 *    intermediate mouse events, but rather just if the mouse enters or
 
657
 *    leaves an area.
 
658
 *  
 
659
 *  Mac OS X threading:
 
660
 *    Not thread safe
 
661
 *  
 
662
 *  Parameters:
 
663
 *    
 
664
 *    inPort:
 
665
 *      The grafport to consider for mouse coordinates. You can pass
 
666
 *      NULL for this parameter to indicate the current port. You can
 
667
 *      pass -1 for this parameter to indicate that the mouse region
 
668
 *      should be interpreted in global coordinates instead of local
 
669
 *      coordinates.
 
670
 *    
 
671
 *    inRegion:
 
672
 *      The region to consider. This should be in the coordinates of
 
673
 *      the port you passed to inPort, or global coordinates if you
 
674
 *      passed -1 for the inPort parameter.
 
675
 *    
 
676
 *    ioWasInRgn:
 
677
 *      On entry, this parameter should be set to true if the mouse is
 
678
 *      currently inside the region passed in inRegion, or false if the
 
679
 *      mouse is currently outside the region. On exit, this parameter
 
680
 *      is updated to reflect the current reality; e.g. if the
 
681
 *      outResult parameter returns kMouseTrackingMouseExited,
 
682
 *      ioWasInRgn will be set to false when this function exits.
 
683
 *      Because it is updated from within, you should only need to set
 
684
 *      this yourself before the first call to this function in your
 
685
 *      tracking loop.
 
686
 *    
 
687
 *    outResult:
 
688
 *      On exit, this parameter receives a value representing what kind
 
689
 *      of event was received that cause the function to exit, such as
 
690
 *      kMouseTrackingMouseEntered.
 
691
 *  
 
692
 *  Result:
 
693
 *    An operating system result code.
 
694
 *  
 
695
 *  Availability:
 
696
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
697
 *    CarbonLib:        in CarbonLib 1.1 and later
 
698
 *    Non-Carbon CFM:   not available
 
699
 }
 
700
function TrackMouseRegion( inPort: GrafPtr { can be NULL }; inRegion: RgnHandle; var ioWasInRgn: Boolean; var outResult: MouseTrackingResult ): OSStatus; external name '_TrackMouseRegion';
 
701
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
702
 
 
703
 
 
704
{
 
705
 *  Summary:
 
706
 *    Mouse tracking info selectors for HIMouseTrackingGetParameters.
 
707
 }
 
708
const
 
709
{
 
710
   * Requests the time and distance for determining �sticky� mouse
 
711
   * tracking. When the mouse is clicked on a menu title, the toolbox
 
712
   * will enter a sticky mouse-tracking mode depending on the time and
 
713
   * distance between the mouse-down event and the mouse-up event. In
 
714
   * this mode, the menu is tracked even though the mouse has already
 
715
   * been released.
 
716
   }
 
717
        kMouseParamsSticky = $73746963 (* 'stic' *);
 
718
 
 
719
{
 
720
 *  HIMouseTrackingGetParameters()
 
721
 *  
 
722
 *  Summary:
 
723
 *    Returns information about how mouse tracking loops should behave.
 
724
 *  
 
725
 *  Discussion:
 
726
 *    Mouse tracking loops may use different timeouts and wander
 
727
 *    distances to determine their behavior. This API provides a
 
728
 *    generic service for requesting this information. Currently, the
 
729
 *    only supported selector is kMouseParamsSticky.
 
730
 *  
 
731
 *  Mac OS X threading:
 
732
 *    Not thread safe
 
733
 *  
 
734
 *  Parameters:
 
735
 *    
 
736
 *    inSelector:
 
737
 *      Indicates which type of information should be returned.
 
738
 *    
 
739
 *    outTime:
 
740
 *      If selector is kMouseParamsSticky, returns the maximum time
 
741
 *      between mouse-down and mouse-up. If the time between events is
 
742
 *      longer than this value, sticky mode should not be invoked. May
 
743
 *      be NULL if this information is not required.
 
744
 *    
 
745
 *    outDistance:
 
746
 *      If selector is kMouseParamsSticky, returns the maximum distance
 
747
 *      between mouse-down and mouse-up. If the distance between events
 
748
 *      is longer than this value, sticky mode should not be invoked.
 
749
 *      May be NULL if this information is not required.
 
750
 *  
 
751
 *  Availability:
 
752
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
753
 *    CarbonLib:        not available in CarbonLib 1.x
 
754
 *    Non-Carbon CFM:   not available
 
755
 }
 
756
function HIMouseTrackingGetParameters( inSelector: OSType; outTime: EventTimePtr { can be NULL }; outDistance: HISizePtr { can be NULL } ): OSStatus; external name '_HIMouseTrackingGetParameters';
 
757
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
 
758
 
 
759
 
 
760
{
 
761
 *  ConvertEventRefToEventRecord()
 
762
 *  
 
763
 *  Discussion:
 
764
 *    This is a convenience routine to help you if there are places in
 
765
 *    your application where you need an EventRecord and all you have
 
766
 *    is an EventRef. If the event can be converted, outEvent is filled
 
767
 *    in and the function returns true. If not, false is returned and
 
768
 *    outEvent will contain a nullEvent. 
 
769
 *    
 
770
 *    Currently, the following events can be converted: 
 
771
 *    
 
772
 *    kEventClassMouse: kEventMouseDown, kEventMouseUp,
 
773
 *    kEventMouseMoved, kEventMouseDragged. 
 
774
 *    
 
775
 *    kEventClassKeyboard: kEventRawKeyDown, kEventRawKeyUp,
 
776
 *    kEventRawKeyRepeat. 
 
777
 *    
 
778
 *    kEventClassControl: kEventControlTrack (in Mac OS X 10.4 and
 
779
 *    later; converts to a mouseDown event). 
 
780
 *    
 
781
 *    kEventClassWindow: kEventWindowUpdate, kEventWindowActivate,
 
782
 *    kEventWindowDeactivate, kEventWindowCursorChange. 
 
783
 *    
 
784
 *    kEventClassApplication: kEventAppActivated, kEventAppDeactivated.
 
785
 *    <BR><BR> kEventClassAppleEvent: kEventAppleEvent.
 
786
 *  
 
787
 *  Mac OS X threading:
 
788
 *    Not thread safe
 
789
 *  
 
790
 *  Parameters:
 
791
 *    
 
792
 *    inEvent:
 
793
 *      The EventRef to convert into an EventRecord.
 
794
 *    
 
795
 *    outEvent:
 
796
 *      The EventRecord to fill out.
 
797
 *  
 
798
 *  Result:
 
799
 *    A boolean indicating if the conversion was successful (true) or
 
800
 *    not (false).
 
801
 *  
 
802
 *  Availability:
 
803
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
804
 *    CarbonLib:        in CarbonLib 1.1 and later
 
805
 *    Non-Carbon CFM:   not available
 
806
 }
 
807
function ConvertEventRefToEventRecord( inEvent: EventRef; var outEvent: EventRecord ): Boolean; external name '_ConvertEventRefToEventRecord';
 
808
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
809
 
 
810
 
 
811
{
 
812
 *  IsEventInMask()
 
813
 *  
 
814
 *  Discussion:
 
815
 *    This is a companion function for ConvertEventRefToEventRecord,
 
816
 *    and is provided as a convenience routine to help you if there are
 
817
 *    places in your application where you want to check an EventRef to
 
818
 *    see if it matches a classic EventMask bitfield. If the event
 
819
 *    matches, the function returns true.
 
820
 *  
 
821
 *  Mac OS X threading:
 
822
 *    Not thread safe
 
823
 *  
 
824
 *  Parameters:
 
825
 *    
 
826
 *    inEvent:
 
827
 *      The EventRef to convert into an EventRecord.
 
828
 *    
 
829
 *    inMask:
 
830
 *      The mask to consider.
 
831
 *  
 
832
 *  Result:
 
833
 *    A boolean indicating if the event was considered to be in the
 
834
 *    mask provided.
 
835
 *  
 
836
 *  Availability:
 
837
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
838
 *    CarbonLib:        in CarbonLib 1.1 and later
 
839
 *    Non-Carbon CFM:   not available
 
840
 }
 
841
function IsEventInMask( inEvent: EventRef; inMask: EventMask ): Boolean; external name '_IsEventInMask';
 
842
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
843
 
 
844
 
 
845
{
 
846
 *  GetLastUserEventTime()
 
847
 *  
 
848
 *  Mac OS X threading:
 
849
 *    Not thread safe
 
850
 *  
 
851
 *  Availability:
 
852
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
853
 *    CarbonLib:        in CarbonLib 1.1 and later
 
854
 *    Non-Carbon CFM:   not available
 
855
 }
 
856
function GetLastUserEventTime: EventTime; external name '_GetLastUserEventTime';
 
857
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
858
 
 
859
 
 
860
{--------------------------------------------------------------------------------------}
 
861
{  � Mouse Coalescing                                                                  }
 
862
{--------------------------------------------------------------------------------------}
 
863
{
 
864
 *  IsMouseCoalescingEnabled()
 
865
 *  
 
866
 *  Discussion:
 
867
 *    Returns true if mouse coalescing is current enabled. When
 
868
 *    enabled, we coalesce mouse moved and mouse dragged events. By
 
869
 *    default, coalescing is on, but you can use
 
870
 *    SetMouseCoalescingEnabled to disable it if you want finer-grained
 
871
 *    mouse movement events, which is useful for drawing with tablets.
 
872
 *  
 
873
 *  Mac OS X threading:
 
874
 *    Not thread safe
 
875
 *  
 
876
 *  Result:
 
877
 *    A boolean indicating if coalescing is enabled.
 
878
 *  
 
879
 *  Availability:
 
880
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
881
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 
882
 *    Non-Carbon CFM:   not available
 
883
 }
 
884
function IsMouseCoalescingEnabled: Boolean; external name '_IsMouseCoalescingEnabled';
 
885
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
 
886
 
 
887
 
 
888
{
 
889
 *  SetMouseCoalescingEnabled()
 
890
 *  
 
891
 *  Discussion:
 
892
 *    Allows you to set mouse move/drag event coalescing on or off. By
 
893
 *    default, coalescing is on, but you can use this function to
 
894
 *    disable it if you want finer-grained mouse movement events, which
 
895
 *    is useful for drawing with tablets.
 
896
 *  
 
897
 *  Mac OS X threading:
 
898
 *    Not thread safe
 
899
 *  
 
900
 *  Parameters:
 
901
 *    
 
902
 *    inNewState:
 
903
 *      A boolean indicating if coalescing should be enabled (true) or
 
904
 *      disabled (false).
 
905
 *    
 
906
 *    outOldState:
 
907
 *      A boolean which receives the prior state of mouse coalescing
 
908
 *      for restoration later. You can pass NULL for this parameter if
 
909
 *      you don't care.
 
910
 *  
 
911
 *  Result:
 
912
 *    An operating system result code.
 
913
 *  
 
914
 *  Availability:
 
915
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
916
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 
917
 *    Non-Carbon CFM:   not available
 
918
 }
 
919
function SetMouseCoalescingEnabled( inNewState: Boolean; outOldState: BooleanPtr { can be NULL } ): OSStatus; external name '_SetMouseCoalescingEnabled';
 
920
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
 
921
 
 
922
 
 
923
{======================================================================================}
 
924
{  EVENT CLASSES                                                                       }
 
925
{======================================================================================}
 
926
 
 
927
{
 
928
 *  Summary:
 
929
 *    Event classes
 
930
 }
 
931
const
 
932
{
 
933
   * Events related to the mouse (mouse down/up/moved).
 
934
   }
 
935
        kEventClassMouse = $6D6F7573 (* 'mous' *);
 
936
 
 
937
  {
 
938
   * Events related to the keyboard.
 
939
   }
 
940
        kEventClassKeyboard = $6B657962 (* 'keyb' *);
 
941
 
 
942
  {
 
943
   * Events related to text input (by keyboard, or by input method).
 
944
   }
 
945
        kEventClassTextInput = $74657874 (* 'text' *);
 
946
 
 
947
  {
 
948
   * Application-level events (launch, quit, etc.).
 
949
   }
 
950
        kEventClassApplication = $6170706C (* 'appl' *);
 
951
 
 
952
  {
 
953
   * Apple Events.
 
954
   }
 
955
        kEventClassAppleEvent = $65707063 (* 'eppc' *);
 
956
 
 
957
  {
 
958
   * Events related to menus.
 
959
   }
 
960
        kEventClassMenu = $6D656E75 (* 'menu' *);
 
961
 
 
962
  {
 
963
   * Events related to windows.
 
964
   }
 
965
        kEventClassWindow = $77696E64 (* 'wind' *);
 
966
 
 
967
  {
 
968
   * Events related to controls.
 
969
   }
 
970
        kEventClassControl = $636E746C (* 'cntl' *);
 
971
 
 
972
  {
 
973
   * Events related to commands generated by menu items or controls.
 
974
   * These events contain HICommand structures.
 
975
   }
 
976
        kEventClassCommand = $636D6473 (* 'cmds' *);
 
977
 
 
978
  {
 
979
   * Events related to tablets.
 
980
   }
 
981
        kEventClassTablet = $74626C74 (* 'tblt' *);
 
982
 
 
983
  {
 
984
   * Events related to File Manager volumes.
 
985
   }
 
986
        kEventClassVolume = $766F6C20 (* 'vol ' *);
 
987
 
 
988
  {
 
989
   * Events related to the Appearance Manager.
 
990
   }
 
991
        kEventClassAppearance = $6170706D (* 'appm' *);
 
992
 
 
993
  {
 
994
   * Events related to the Services Manager.
 
995
   }
 
996
        kEventClassService = $73657276 (* 'serv' *);
 
997
 
 
998
  {
 
999
   * Events related to toolbars.
 
1000
   }
 
1001
        kEventClassToolbar = $74626172 (* 'tbar' *);
 
1002
 
 
1003
  {
 
1004
   * Events related to toolbar items.
 
1005
   }
 
1006
        kEventClassToolbarItem = $74626974 (* 'tbit' *);
 
1007
 
 
1008
  {
 
1009
   * Events related to toolbar item views.
 
1010
   }
 
1011
        kEventClassToolbarItemView = $74626976 (* 'tbiv' *);
 
1012
 
 
1013
  {
 
1014
   * Events related to application accessibility.
 
1015
   }
 
1016
        kEventClassAccessibility = $61636365 (* 'acce' *);
 
1017
 
 
1018
  {
 
1019
   * Events related to the system.
 
1020
   }
 
1021
        kEventClassSystem = $6D616373 (* 'macs' *);
 
1022
 
 
1023
  {
 
1024
   * Events related to Ink.
 
1025
   }
 
1026
        kEventClassInk = $696E6B20 (* 'ink ' *);
 
1027
        kEventClassTSMDocumentAccess = $74646163 (* 'tdac' *);
 
1028
 
 
1029
{--------------------------------------------------------------------------------------}
 
1030
{ Mouse Events                                                                         }
 
1031
{--------------------------------------------------------------------------------------}
 
1032
{
 
1033
    kEventClassMouse quick reference:
 
1034
    
 
1035
    kEventMouseDown                 = 1,
 
1036
    kEventMouseUp                   = 2,
 
1037
    kEventMouseMoved                = 5,
 
1038
    kEventMouseDragged              = 6,
 
1039
    kEventMouseEntered              = 8,
 
1040
    kEventMouseExited               = 9,
 
1041
    kEventMouseWheelMoved           = 10
 
1042
 
 
1043
    NOTE: As of Mac OS X 10.1, mouse events carry more information which allow you
 
1044
          to do less work and gain accuracy of hit testing. First, there is the
 
1045
          kEventParamWindowRef parameter. This parameter tells you over which window
 
1046
          the mouse click/move/etc occurred. In mouse dragged events, this is the
 
1047
          window the mouse went down in, NOT the window the mouse is currently over.
 
1048
          Next, there is the kEventParamWindowMouseLocation parameter. This is the
 
1049
          window-relative position of the mouse in the window given in the
 
1050
          kEventParamWindowRef parameter. 0,0 is at the top left of the structure
 
1051
          of the window.
 
1052
}
 
1053
 
 
1054
{
 
1055
 *  EventMouseButton
 
1056
 *  
 
1057
 }
 
1058
type
 
1059
        EventMouseButton = UInt16;
 
1060
const
 
1061
{
 
1062
   * Only button for a one-button mouse (usually left button for
 
1063
   * multi-button mouse)
 
1064
   }
 
1065
        kEventMouseButtonPrimary = 1;
 
1066
 
 
1067
  {
 
1068
   * Usually right button for a multi-button mouse
 
1069
   }
 
1070
        kEventMouseButtonSecondary = 2;
 
1071
 
 
1072
  {
 
1073
   * Usually middle button for a three-button mouse
 
1074
   }
 
1075
        kEventMouseButtonTertiary = 3;
 
1076
 
 
1077
 
 
1078
{
 
1079
 *  EventMouseWheelAxis
 
1080
 *  
 
1081
 }
 
1082
type
 
1083
        EventMouseWheelAxis = UInt16;
 
1084
const
 
1085
{
 
1086
   * The X axis (left or right)
 
1087
   }
 
1088
        kEventMouseWheelAxisX = 0;
 
1089
 
 
1090
  {
 
1091
   * The Y axis (up or down)
 
1092
   }
 
1093
        kEventMouseWheelAxisY = 1;
 
1094
 
 
1095
{
 
1096
 *  kEventClassMouse / kEventMouseDown
 
1097
 *  
 
1098
 *  Summary:
 
1099
 *    A mouse button was pressed.
 
1100
 *  
 
1101
 *  Discussion:
 
1102
 *    All windows have a default handler installed on the window target
 
1103
 *    that handles this event by calling SetFrontProcess on the current
 
1104
 *    process if the current process is not already the front process.
 
1105
 *    It is very important that an event handler for this event always
 
1106
 *    return eventNotHandledErr, so that the default handler can run
 
1107
 *    and can activate the current process.
 
1108
 *  
 
1109
 *  Mac OS X threading:
 
1110
 *    Not thread safe
 
1111
 *  
 
1112
 *  Parameters:
 
1113
 *    
 
1114
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
1115
 *          The mouse location, in global coordinates.
 
1116
 *    
 
1117
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
1118
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
1119
 *          later.
 
1120
 *    
 
1121
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
1122
 *          The window-relative position of the mouse in the window
 
1123
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
1124
 *          top left of the structure of the window. Available in Mac
 
1125
 *          OS X 10.1 and later.
 
1126
 *    
 
1127
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
1128
 *          The part code that the mouse location hit in the window.
 
1129
 *          This parameter only exists if the WindowRef parameter
 
1130
 *          exists. This saves you the trouble of calling FindWindow,
 
1131
 *          which is expensive on Mac OS X as it needs to call the
 
1132
 *          Window Server. Available in Mac OS X 10.3 and later.
 
1133
 *    
 
1134
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
1135
 *          The keyboard modifiers that were pressed when the event was
 
1136
 *          generated.
 
1137
 *    
 
1138
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
1139
 *          Which mouse button was pressed.
 
1140
 *    
 
1141
 *    --> kEventParamClickCount (in, typeUInt32)
 
1142
 *          Whether this is a single click, double click, etc.
 
1143
 *    
 
1144
 *    --> kEventParamMouseChord (in, typeUInt32)
 
1145
 *          Which other mouse buttons were pressed when the event was
 
1146
 *          generated. Available on Mac OS X only.
 
1147
 *    
 
1148
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
1149
 *          The type of tablet event which generated this mouse event;
 
1150
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
1151
 *          Only present if the event was generated from a tablet.
 
1152
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
1153
 *    
 
1154
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
1155
 *          Further information about the tablet event which generated
 
1156
 *          this mouse event. Present if the the
 
1157
 *          kEventParamTabletEventType parameter contains
 
1158
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
1159
 *          1.5, and later.
 
1160
 *    
 
1161
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
1162
 *          Further information about the tablet event which generated
 
1163
 *          this mouse event. Present if the the
 
1164
 *          kEventParamTabletEventType parameter contains
 
1165
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
1166
 *          CarbonLib 1.5, and later.
 
1167
 *  
 
1168
 *  Availability:
 
1169
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
1170
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1171
 }
 
1172
const
 
1173
        kEventMouseDown = 1;
 
1174
 
 
1175
{
 
1176
 *  kEventClassMouse / kEventMouseUp
 
1177
 *  
 
1178
 *  Summary:
 
1179
 *    A mouse button was released.
 
1180
 *  
 
1181
 *  Mac OS X threading:
 
1182
 *    Not thread safe
 
1183
 *  
 
1184
 *  Parameters:
 
1185
 *    
 
1186
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
1187
 *          The mouse location, in global coordinates.
 
1188
 *    
 
1189
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
1190
 *          The window in which the mouse was original pressed.
 
1191
 *          Available in Mac OS X 10.1 and later.
 
1192
 *    
 
1193
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
1194
 *          The window-relative position of the mouse in the window
 
1195
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
1196
 *          top left of the structure of the window. Available in Mac
 
1197
 *          OS X 10.1 and later.
 
1198
 *    
 
1199
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
1200
 *          The part code that the mouse location hit in the window.
 
1201
 *          This parameter only exists if the WindowRef parameter
 
1202
 *          exists. This saves you the trouble of calling FindWindow,
 
1203
 *          which is expensive on Mac OS X as it needs to call the
 
1204
 *          Window Server. Available in Mac OS X 10.3 and later.
 
1205
 *    
 
1206
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
1207
 *          The keyboard modifiers that were pressed when the event was
 
1208
 *          generated.
 
1209
 *    
 
1210
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
1211
 *          Which mouse button was released.
 
1212
 *    
 
1213
 *    --> kEventParamClickCount (in, typeUInt32)
 
1214
 *          Whether this is a single click, double click, etc.
 
1215
 *    
 
1216
 *    --> kEventParamMouseChord (in, typeUInt32)
 
1217
 *          Which other mouse buttons were pressed when the event was
 
1218
 *          generated. Available on Mac OS X only.
 
1219
 *    
 
1220
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
1221
 *          The type of tablet event which generated this mouse event;
 
1222
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
1223
 *          Only present if the event was generated from a tablet.
 
1224
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
1225
 *    
 
1226
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
1227
 *          Further information about the tablet event which generated
 
1228
 *          this mouse event. Present if the the
 
1229
 *          kEventParamTabletEventType parameter contains
 
1230
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
1231
 *          1.5, and later.
 
1232
 *    
 
1233
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
1234
 *          Further information about the tablet event which generated
 
1235
 *          this mouse event. Present if the the
 
1236
 *          kEventParamTabletEventType parameter contains
 
1237
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
1238
 *          CarbonLib 1.5, and later.
 
1239
 *  
 
1240
 *  Availability:
 
1241
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
1242
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1243
 }
 
1244
const
 
1245
        kEventMouseUp = 2;
 
1246
 
 
1247
{
 
1248
 *  kEventClassMouse / kEventMouseMoved
 
1249
 *  
 
1250
 *  Summary:
 
1251
 *    The mouse was moved.
 
1252
 *  
 
1253
 *  Mac OS X threading:
 
1254
 *    Not thread safe
 
1255
 *  
 
1256
 *  Parameters:
 
1257
 *    
 
1258
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
1259
 *          The mouse location, in global coordinates.
 
1260
 *    
 
1261
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
1262
 *          The window under the mouse. Available in Mac OS X 10.3 and
 
1263
 *          later.
 
1264
 *    
 
1265
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
1266
 *          The window-relative position of the mouse in the window
 
1267
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
1268
 *          top left of the structure of the window. Available in Mac
 
1269
 *          OS X 10.3 and later.
 
1270
 *    
 
1271
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
1272
 *          The part code that the mouse location hit in the window.
 
1273
 *          This parameter only exists if the WindowRef parameter
 
1274
 *          exists. This saves you the trouble of calling FindWindow,
 
1275
 *          which is expensive on Mac OS X as it needs to call the
 
1276
 *          Window Server. Available in Mac OS X 10.3 and later.
 
1277
 *    
 
1278
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
1279
 *          The keyboard modifiers that were pressed when the event was
 
1280
 *          generated.
 
1281
 *    
 
1282
 *    --> kEventParamMouseDelta (in, typeHIPoint)
 
1283
 *          The change in mouse position, in absolute units, ignoring
 
1284
 *          scaling. Available in Mac OS X only.
 
1285
 *    
 
1286
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
1287
 *          The type of tablet event which generated this mouse event;
 
1288
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
1289
 *          Only present if the event was generated from a tablet.
 
1290
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
1291
 *    
 
1292
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
1293
 *          Further information about the tablet event which generated
 
1294
 *          this mouse event. Present if the the
 
1295
 *          kEventParamTabletEventType parameter contains
 
1296
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
1297
 *          1.5, and later.
 
1298
 *    
 
1299
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
1300
 *          Further information about the tablet event which generated
 
1301
 *          this mouse event. Present if the the
 
1302
 *          kEventParamTabletEventType parameter contains
 
1303
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
1304
 *          CarbonLib 1.5, and later.
 
1305
 *  
 
1306
 *  Availability:
 
1307
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
1308
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1309
 }
 
1310
const
 
1311
        kEventMouseMoved = 5;
 
1312
 
 
1313
{
 
1314
 *  kEventClassMouse / kEventMouseDragged
 
1315
 *  
 
1316
 *  Summary:
 
1317
 *    The mouse was moved, and a button was down.
 
1318
 *  
 
1319
 *  Mac OS X threading:
 
1320
 *    Not thread safe
 
1321
 *  
 
1322
 *  Parameters:
 
1323
 *    
 
1324
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
1325
 *          The mouse location, in global coordinates.
 
1326
 *    
 
1327
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
1328
 *          The window in which the mouse was original pressed.
 
1329
 *          Available in Mac OS X 10.1 and later.
 
1330
 *    
 
1331
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
1332
 *          The window-relative position of the mouse in the window
 
1333
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
1334
 *          top left of the structure of the window. Available in Mac
 
1335
 *          OS X 10.1 and later.
 
1336
 *    
 
1337
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
1338
 *          The part code that the mouse location hit in the window.
 
1339
 *          This parameter only exists if the WindowRef parameter
 
1340
 *          exists. This saves you the trouble of calling FindWindow,
 
1341
 *          which is expensive on Mac OS X as it needs to call the
 
1342
 *          Window Server. Available in Mac OS X 10.3 and later.
 
1343
 *    
 
1344
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
1345
 *          The keyboard modifiers that were pressed when the event was
 
1346
 *          generated.
 
1347
 *    
 
1348
 *    --> kEventParamMouseDelta (in, typeHIPoint)
 
1349
 *          The change in mouse position, in absolute units, ignoring
 
1350
 *          scaling. Available in Mac OS X only.
 
1351
 *    
 
1352
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
1353
 *          The type of tablet event which generated this mouse event;
 
1354
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
1355
 *          Only present if the event was generated from a tablet.
 
1356
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
1357
 *    
 
1358
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
1359
 *          Further information about the tablet event which generated
 
1360
 *          this mouse event. Present if the the
 
1361
 *          kEventParamTabletEventType parameter contains
 
1362
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
1363
 *          1.5, and later.
 
1364
 *    
 
1365
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
1366
 *          Further information about the tablet event which generated
 
1367
 *          this mouse event. Present if the the
 
1368
 *          kEventParamTabletEventType parameter contains
 
1369
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
1370
 *          CarbonLib 1.5, and later.
 
1371
 *  
 
1372
 *  Availability:
 
1373
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
1374
 *    CarbonLib:        in CarbonLib 1.1 and later
 
1375
 }
 
1376
const
 
1377
        kEventMouseDragged = 6;
 
1378
 
 
1379
{
 
1380
 *  kEventClassMouse / kEventMouseEntered
 
1381
 *  
 
1382
 *  Summary:
 
1383
 *    The mouse entered a tracking area.
 
1384
 *  
 
1385
 *  Mac OS X threading:
 
1386
 *    Not thread safe
 
1387
 *  
 
1388
 *  Parameters:
 
1389
 *    
 
1390
 *    --> kEventParamMouseTrackingRef (in, typeMouseTrackingRef)
 
1391
 *          The MouseTrackingRef whose region the mouse has just
 
1392
 *          entered.
 
1393
 *    
 
1394
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
1395
 *          The mouse location, in global coordinates.
 
1396
 *    
 
1397
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
1398
 *          The window under the mouse.
 
1399
 *    
 
1400
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
1401
 *          The window-relative position of the mouse in the window
 
1402
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
1403
 *          top left of the structure of the window.
 
1404
 *    
 
1405
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
1406
 *          The keyboard modifiers that were pressed when the event was
 
1407
 *          generated.
 
1408
 *  
 
1409
 *  Availability:
 
1410
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
1411
 *    CarbonLib:        not available
 
1412
 }
 
1413
const
 
1414
        kEventMouseEntered = 8;
 
1415
 
 
1416
{
 
1417
 *  kEventClassMouse / kEventMouseExited
 
1418
 *  
 
1419
 *  Summary:
 
1420
 *    The mouse exited a tracking area.
 
1421
 *  
 
1422
 *  Mac OS X threading:
 
1423
 *    Not thread safe
 
1424
 *  
 
1425
 *  Parameters:
 
1426
 *    
 
1427
 *    --> kEventParamMouseTrackingRef (in, typeMouseTrackingRef)
 
1428
 *          The MouseTrackingRef whose region the mouse has just exited.
 
1429
 *    
 
1430
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
1431
 *          The mouse location, in global coordinates.
 
1432
 *    
 
1433
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
1434
 *          The window under the mouse.
 
1435
 *    
 
1436
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
1437
 *          The window-relative position of the mouse in the window
 
1438
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
1439
 *          top left of the structure of the window.
 
1440
 *    
 
1441
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
1442
 *          The keyboard modifiers that were pressed when the event was
 
1443
 *          generated.
 
1444
 *  
 
1445
 *  Availability:
 
1446
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
1447
 *    CarbonLib:        not available
 
1448
 }
 
1449
const
 
1450
        kEventMouseExited = 9;
 
1451
 
 
1452
{
 
1453
 *  kEventClassMouse / kEventMouseWheelMoved
 
1454
 *  
 
1455
 *  Summary:
 
1456
 *    The mouse wheel was moved.
 
1457
 *  
 
1458
 *  Mac OS X threading:
 
1459
 *    Not thread safe
 
1460
 *  
 
1461
 *  Parameters:
 
1462
 *    
 
1463
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
1464
 *          The mouse location, in global coordinates.
 
1465
 *    
 
1466
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
1467
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
1468
 *          later.
 
1469
 *    
 
1470
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
1471
 *          The window-relative position of the mouse in the window
 
1472
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
1473
 *          top left of the structure of the window. Available in Mac
 
1474
 *          OS X 10.1 and later.
 
1475
 *    
 
1476
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
1477
 *          The part code that the mouse location hit in the window.
 
1478
 *          This parameter only exists if the WindowRef parameter
 
1479
 *          exists. This saves you the trouble of calling FindWindow,
 
1480
 *          which is expensive on Mac OS X as it needs to call the
 
1481
 *          Window Server. Available in Mac OS X 10.3 and later.
 
1482
 *    
 
1483
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
1484
 *          The keyboard modifiers that were pressed when the event was
 
1485
 *          generated.
 
1486
 *    
 
1487
 *    --> kEventParamMouseWheelAxis (in, typeMouseWheelAxis)
 
1488
 *          The wheel axis which moved. Contains either
 
1489
 *          kEventMouseWheelAxisX or kEventMouseWheelAxisY.
 
1490
 *    
 
1491
 *    --> kEventParamMouseWheelDelta (in, typeLongInteger)
 
1492
 *          The amount of change in the wheel position. Generally, a
 
1493
 *          positive change should be interpreted as an upward scroll
 
1494
 *          (equivalent to a click in the up arrow of a scrollbar); a
 
1495
 *          negative change should be interpreted as a downward scroll
 
1496
 *          (equivalent to a click in the down arrow of a scrollbar).
 
1497
 *          Applications should not scale the delta value provided in
 
1498
 *          the event; the Mac OS X input device system provides
 
1499
 *          pre-scaling according to the user�s desired mouse wheel
 
1500
 *          speed.
 
1501
 *  
 
1502
 *  Availability:
 
1503
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
1504
 *    CarbonLib:        not available
 
1505
 }
 
1506
const
 
1507
        kEventMouseWheelMoved = 10;
 
1508
 
 
1509
{--------------------------------------------------------------------------------------}
 
1510
{ TSM Document Access Events                                                           }
 
1511
{--------------------------------------------------------------------------------------}
 
1512
{
 
1513
    kEventClassTSMDocumentAccess quick reference:
 
1514
    
 
1515
    ** Text Access **
 
1516
    kEventTSMDocumentAccessGetLength                        = 1,
 
1517
    kEventTSMDocumentAccessGetSelectedRange                 = 2,
 
1518
    kEventTSMDocumentAccessGetCharactersPtr                 = 3,
 
1519
    kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer = 4,
 
1520
    kEventTSMDocumentAccessGetCharacters                    = 5,
 
1521
        
 
1522
    ** Text Attribute Access **
 
1523
    kEventTSMDocumentAccessGetFont                          = 6,
 
1524
    kEventTSMDocumentAccessGetGlyphInfo                     = 7,
 
1525
    
 
1526
    ** Transaction control **
 
1527
    kEventTSMDocumentAccessLockDocument                     = 8,
 
1528
    kEventTSMDocumentAccessUnlockDocument                   = 9
 
1529
    
 
1530
    These events allow access to a document's content.  They are grouped in the following
 
1531
    categories: text access, text attribute, and transaction related events.
 
1532
    
 
1533
    NOTE:  TSM dispatches events of the TSMDocumentAccess class only as Carbon events.  These
 
1534
            are not converted for TSM clients that still install AppleEvent handlers for TSM events.
 
1535
    NOTE:  Text Services dispatch these Carbon events through TSM's SendTextInputEvent API.
 
1536
            Normally only used for TextInput class TSM events, but this SendTextInputEvent is a bit
 
1537
            of a misnomer.  You should use it for TSMDocumentAccess class events as well.
 
1538
}
 
1539
{
 
1540
 
 
1541
    ** Document Access Text events **
 
1542
 
 
1543
    The following Text Access events are very similar in design to the CFString API.
 
1544
    The entire document can be conceived as a flattened Unicode string, and the
 
1545
    events in this interface can access any portion of it.  The GetSelectedRange() method
 
1546
    allow a text service to obtain text near the insertion point (or selection), but access
 
1547
    is by no means restricted to this vicinity.  Use the GetLength() method to obtain the
 
1548
    size of the document.
 
1549
    
 
1550
    Supporting these events effectively provide hooks into the text engine, but it is
 
1551
    understood that access to a document in this way is to be strictly Read-Only.  Where
 
1552
    direct access to a document's content cannot be provided through a pointer, the requested
 
1553
    text can be copied instead.  Situations where a pointer may not be available from the
 
1554
    text engine include the following:
 
1555
    
 
1556
        -A pointer would require conversion of text in Mac encodings to Unicode
 
1557
        -A pointer would require sparse Unicode text blocks to be flattened into a single
 
1558
         buffer.
 
1559
 
 
1560
    The idea is to minimize copying and converting text encodings where possible.  The text
 
1561
    service will typically begin by asking for a document pointer via
 
1562
    kEventTSMDocumentAccessGetCharactersPtr.  If this fails, it will typically fallback to
 
1563
    kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer, specifying a location of interest.
 
1564
    If this fails, it will fallback to kEventTSMDocumentAccessGetCharacters, specifying a range
 
1565
    of interest.  Of course, when requesting small amounts of data such a few characters on either
 
1566
    side of the insertion point, there is no obligation to optimize in this way.  It's valid to
 
1567
    simply use kEventTSMDocumentAccessGetCharacters.
 
1568
    
 
1569
    The text engine is entirely free to deny a request for a text pointer for these or any other
 
1570
    implementation specific reason.
 
1571
}
 
1572
{
 
1573
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetLength
 
1574
 *  
 
1575
 *  Summary:
 
1576
 *    Returns the number of 16-bit Unicode characters in the document.
 
1577
 *  
 
1578
 *  Discussion:
 
1579
 *    This event is equivalent to calling CFStringGetLength() on the
 
1580
 *    app's document.
 
1581
 *  
 
1582
 *  Mac OS X threading:
 
1583
 *    Not thread safe
 
1584
 *  
 
1585
 *  Parameters:
 
1586
 *    
 
1587
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
1588
 *          This parameter is provided by the input method originating
 
1589
 *          the event. (Required parameter)
 
1590
 *    
 
1591
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
1592
 *          TSM's SendTextInputEvent, called by an input method,
 
1593
 *          inserts this parameter before dispatching the event to the
 
1594
 *          user focus.  (Required Parameter)
 
1595
 *    
 
1596
 *    <-- kEventParamTSMDocAccessCharacterCount (out, typeCFIndex)
 
1597
 *          The size of the document in UniChar. Required reply
 
1598
 *          parameter.
 
1599
 *  
 
1600
 *  Availability:
 
1601
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
1602
 *    CarbonLib:        not available
 
1603
 }
 
1604
const
 
1605
        kEventTSMDocumentAccessGetLength = 1;
 
1606
 
 
1607
{
 
1608
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetSelectedRange
 
1609
 *  
 
1610
 *  Summary:
 
1611
 *    Returns the selection range in the document.
 
1612
 *  
 
1613
 *  Mac OS X threading:
 
1614
 *    Not thread safe
 
1615
 *  
 
1616
 *  Parameters:
 
1617
 *    
 
1618
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
1619
 *          This parameter is provided by the input method originating
 
1620
 *          the event. (Required parameter)
 
1621
 *    
 
1622
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
1623
 *          TSM's SendTextInputEvent, called by an input method,
 
1624
 *          inserts this parameter before dispatching the event to the
 
1625
 *          user focus.  (Required Parameter)
 
1626
 *    
 
1627
 *    <-- kEventParamTSMDocAccessReplyCharacterRange (out, typeCFRange)
 
1628
 *          The selection range as a CFRange in UniChar.  If the
 
1629
 *          selection is empty, the range identifies the insertion
 
1630
 *          point and the range will specify a length of 0. Required
 
1631
 *          reply parameter.
 
1632
 *  
 
1633
 *  Availability:
 
1634
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
1635
 *    CarbonLib:        not available
 
1636
 }
 
1637
const
 
1638
        kEventTSMDocumentAccessGetSelectedRange = 2;
 
1639
 
 
1640
{
 
1641
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharactersPtr
 
1642
 *  
 
1643
 *  Summary:
 
1644
 *    Returns a Unicode pointer to the entire document content.
 
1645
 *  
 
1646
 *  Discussion:
 
1647
 *    This event is equivalent to calling CFStringGetCharactersPtr() on
 
1648
 *    the app's document treated as a CFString. Some text engines may
 
1649
 *    not support this event for reasons that are implementation
 
1650
 *    dependent. For example, a text engine's backing store may consist
 
1651
 *    of legacy encoding runs.  It may also consist of unflattened
 
1652
 *    Unicode, stored as a B-tree of text blocks.  For such reasons, a
 
1653
 *    text engine may reject a request for a pointer to a flattened
 
1654
 *    Unicode buffer. It is also understood that text access through
 
1655
 *    this pointer is to be strictly READ-ONLY.  Any changes to the
 
1656
 *    document should be made through TSM TextInput events, such as
 
1657
 *    kEventTextInputUpdateActiveInputArea or
 
1658
 *    kEventTextInputUnicodeText. NOTE:  This pointer is valid only
 
1659
 *    during a transaction surrounded by document lock/unlock events,
 
1660
 *    or until an event causes the document to change, such as
 
1661
 *    dispatching kEventTextInputUpdateActiveInputArea or
 
1662
 *    kEventTextInputUnicodeText events, whichever occurs first.
 
1663
 *  
 
1664
 *  Mac OS X threading:
 
1665
 *    Not thread safe
 
1666
 *  
 
1667
 *  Parameters:
 
1668
 *    
 
1669
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
1670
 *          This parameter is provided by the input method originating
 
1671
 *          the event. (Required parameter)
 
1672
 *    
 
1673
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
1674
 *          TSM's SendTextInputEvent, called by an input method,
 
1675
 *          inserts this parameter before dispatching the event to the
 
1676
 *          user focus.  (Required Parameter)
 
1677
 *    
 
1678
 *    <-- kEventParamTSMDocAccessReplyCharactersPtr (out, typePtr)
 
1679
 *          The UniChar pointer to the document. Required reply
 
1680
 *          parameter, if the event is supported.
 
1681
 *  
 
1682
 *  Availability:
 
1683
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
1684
 *    CarbonLib:        not available
 
1685
 }
 
1686
const
 
1687
        kEventTSMDocumentAccessGetCharactersPtr = 3;
 
1688
 
 
1689
{
 
1690
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer
 
1691
 *  
 
1692
 *  Summary:
 
1693
 *    Returns a Unicode pointer to a portion of the document.
 
1694
 *  
 
1695
 *  Discussion:
 
1696
 *    This event is similar to calling CFStringGetCharactersPtr() on a
 
1697
 *    portion of the app's document treated as a CFString, except that
 
1698
 *    the substring is determined by the text engine. Some text engines
 
1699
 *    may keep text in unflattened Unicode, stored as a B-tree of text
 
1700
 *    blocks, for example.  In some cases, especially near locations
 
1701
 *    such as the insertion point, the text engine may have cached a
 
1702
 *    good chunk of text to which it can readily provide a pointer. A
 
1703
 *    text engine may reject a request for such a pointer. It is also
 
1704
 *    understood that text access through this pointer is to be
 
1705
 *    strictly READ-ONLY.  Any changes to the document should be made
 
1706
 *    through TSM TextInput events, such as
 
1707
 *    kEventTextInputUpdateActiveInputArea or
 
1708
 *    kEventTextInputUnicodeText. NOTE:  This pointer is valid only
 
1709
 *    during a transaction surrounded by document lock/unlock, or until
 
1710
 *    an event causes the document to change, such as dispatching
 
1711
 *    kEventTextInputUpdateActiveInputArea or
 
1712
 *    kEventTextInputUnicodeText events.
 
1713
 *  
 
1714
 *  Mac OS X threading:
 
1715
 *    Not thread safe
 
1716
 *  
 
1717
 *  Parameters:
 
1718
 *    
 
1719
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
1720
 *          This parameter is provided by the input method originating
 
1721
 *          the event. (Required parameter)
 
1722
 *    
 
1723
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
1724
 *          TSM's SendTextInputEvent, called by an input method,
 
1725
 *          inserts this parameter before dispatching the event to the
 
1726
 *          user focus.  (Required Parameter)
 
1727
 *    
 
1728
 *    --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
 
1729
 *          The location in the document for which the caller would
 
1730
 *          like a pointer to a buffer of text that includes that
 
1731
 *          location.    This buffer could be available from a cache
 
1732
 *          due to recent interaction near that location, such as the
 
1733
 *          insertion point. Required parameter.
 
1734
 *    
 
1735
 *    <-- kEventParamTSMDocAccessReplyCharactersPtr (out, typePtr)
 
1736
 *          The UniChar pointer to a portion of the document text.
 
1737
 *          Required reply parameter, if the event is handled.
 
1738
 *    
 
1739
 *    <-- kEventParamTSMDocAccessReplyCharacterRange (out, typeCFRange)
 
1740
 *          The document-relative range of text represented by the
 
1741
 *          returned text pointer. Required reply parameter, if the
 
1742
 *          event is handled.
 
1743
 *  
 
1744
 *  Availability:
 
1745
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
1746
 *    CarbonLib:        not available
 
1747
 }
 
1748
const
 
1749
        kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer = 4;
 
1750
 
 
1751
{
 
1752
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharacters
 
1753
 *  
 
1754
 *  Summary:
 
1755
 *    Fills caller provided buffer with Unicode characters in the
 
1756
 *    specified range.
 
1757
 *  
 
1758
 *  Discussion:
 
1759
 *    This event is equivalent to calling CFStringGetCharacters() on
 
1760
 *    the app's document treated as a CFString.
 
1761
 *  
 
1762
 *  Mac OS X threading:
 
1763
 *    Not thread safe
 
1764
 *  
 
1765
 *  Parameters:
 
1766
 *    
 
1767
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
1768
 *          This parameter is provided by the input method originating
 
1769
 *          the event. (Required parameter)
 
1770
 *    
 
1771
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
1772
 *          TSM's SendTextInputEvent, called by an input method,
 
1773
 *          inserts this parameter before dispatching the event to the
 
1774
 *          user focus.  (Required Parameter)
 
1775
 *    
 
1776
 *    --> kEventParamTSMDocAccessSendCharacterRange (in, typeCFRange)
 
1777
 *          The range of text that should be copied into the buffer
 
1778
 *          provided by the caller. Required parameter.
 
1779
 *    
 
1780
 *    --> kEventParamTSMDocAccessSendCharactersPtr (in, typePtr)
 
1781
 *          A buffer provided by the caller to contain the specified
 
1782
 *          range of UniChars.  This buffer is identical in usage to
 
1783
 *          that of CFStringGetCharacters(). Required parameter.
 
1784
 *  
 
1785
 *  Availability:
 
1786
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
1787
 *    CarbonLib:        not available
 
1788
 }
 
1789
const
 
1790
        kEventTSMDocumentAccessGetCharacters = 5;
 
1791
 
 
1792
{
 
1793
 
 
1794
    ** Document Access Attribute events **
 
1795
 
 
1796
    The following Text Attribute events define how a text service can obtain certain attributes
 
1797
    at text locations throughout an application's document.
 
1798
 
 
1799
    Currently, the only attributes supported by these events are font (and font size)
 
1800
    via kEventTSMDocumentAccessGetFont and glyphID/CID info via kEventTSMDocumentAccessGetGlyphInfo.
 
1801
    
 
1802
    Where these attributes span multiple characters, effective ranges (over which
 
1803
    the attribute is constant) are returned by the text engine.
 
1804
}
 
1805
 
 
1806
{
 
1807
 *  Summary:
 
1808
 *    Values used TSMDocAccessAttributes bit field
 
1809
 *  
 
1810
 *  Discussion:
 
1811
 *    The following bit assignments are used for TSMDocAccessAttributes
 
1812
 *    parameters. This parameter is used to specify desired (optional)
 
1813
 *    attributes in the kEventTSMDocumentAccessGetFont and
 
1814
 *    kEventTSMDocumentAccessGetGlyphInfo events. They are specified in
 
1815
 *    the kEventParamTSMDocAccessRequestedCharacterAttributes parameter.
 
1816
 }
 
1817
const
 
1818
{
 
1819
   * Font size information is desired.  Used in
 
1820
   * kEventTSMDocumentAccessGetFont event.
 
1821
   }
 
1822
        kTSMDocAccessFontSizeAttributeBit = 0;
 
1823
 
 
1824
  {
 
1825
   * Effective Range information is desired.  Used in
 
1826
   * kEventTSMDocumentAccessGetFont and
 
1827
   * kEventTSMDocumentAccessGetGlyphInfo events.
 
1828
   }
 
1829
        kTSMDocAccessEffectiveRangeAttributeBit = 1;
 
1830
 
 
1831
type
 
1832
        TSMDocAccessAttributes = UInt32;
 
1833
const
 
1834
        kTSMDocAccessFontSizeAttribute = 1 shl kTSMDocAccessFontSizeAttributeBit;
 
1835
        kTSMDocAccessEffectiveRangeAttribute = 1 shl kTSMDocAccessEffectiveRangeAttributeBit; { More attributes may be added in the future}
 
1836
 
 
1837
 
 
1838
{
 
1839
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetFont
 
1840
 *  
 
1841
 *  Summary:
 
1842
 *    Returns font, font size, and the range over which these
 
1843
 *    attributes are constant.
 
1844
 *  
 
1845
 *  Discussion:
 
1846
 *    Where the font/font size attributes span multiple characters, an
 
1847
 *    effective range (over which requested attributes are constant) is
 
1848
 *    returned by the text engine.
 
1849
 *  
 
1850
 *  Mac OS X threading:
 
1851
 *    Not thread safe
 
1852
 *  
 
1853
 *  Parameters:
 
1854
 *    
 
1855
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
1856
 *          This parameter is provided by the input method originating
 
1857
 *          the event. (Required parameter)
 
1858
 *    
 
1859
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
1860
 *          TSM's SendTextInputEvent, called by an input method,
 
1861
 *          inserts this parameter before dispatching the event to the
 
1862
 *          user focus.  (Required Parameter)
 
1863
 *    
 
1864
 *    --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
 
1865
 *          The location in the document for which the caller would
 
1866
 *          like font information. Required parameter.
 
1867
 *    
 
1868
 *    --> kEventParamTSMDocAccessRequestedCharacterAttributes (in, typeUInt32)
 
1869
 *          A TSMDocAccessAttributes bit field filled out with the
 
1870
 *          attributes desired. Applicable values for this event are :
 
1871
 *          kTSMDocAccessFontSizeAttribute which requests font size
 
1872
 *          information through the
 
1873
 *          kEventParamTSMDocAccessReplyFontSize parameter, and
 
1874
 *          kTSMDocAccessEffectiveRangeAttribute which requests the
 
1875
 *          text range over which font or font/size is constant.
 
1876
 *          Required parameter.
 
1877
 *    
 
1878
 *    <-- kEventParamTSMDocAccessReplyATSFont (out, typeATSFontRef)
 
1879
 *          The ATSFontRef for the location specified  by the caller.
 
1880
 *          Required reply parameter.
 
1881
 *    
 
1882
 *    <-- kEventParamTSMDocAccessReplyFontSize (out, typeFloat)
 
1883
 *          The font size for the requested location. Optional reply
 
1884
 *          parameter. Return this information if
 
1885
 *          kTSMDocAccessFontSizeAttribute is specified in the bit
 
1886
 *          field passed as the
 
1887
 *          kEventParamTSMDocAccessRequestedCharacterAttributes
 
1888
 *          parameter.
 
1889
 *    
 
1890
 *    --> kEventParamTSMDocAccessSendCharacterRange (in, typeCFRange)
 
1891
 *          The maximum range of text the caller cares about.  This is
 
1892
 *          used to "clip" the area of interest to the caller so the
 
1893
 *          text engine doesn't need to process a style run all the way
 
1894
 *          back to, say, the beginning of a line or a document, in
 
1895
 *          order to return an effective range. Required parameter.
 
1896
 *    
 
1897
 *    <-- kEventParamTSMDocAccessEffectiveRange (out, typeCFRange)
 
1898
 *          The range of text over which both font and size are
 
1899
 *          constant, within the bounds of the
 
1900
 *          kEventParamTSMDocAccessSendCharacterRange parameter.
 
1901
 *          Optional reply parameter. Return this information if
 
1902
 *          kTSMDocAccessEffectiveRangeAttribute is specified in the
 
1903
 *          bit field passed as the
 
1904
 *          kEventParamTSMDocAccessRequestedCharacterAttributes
 
1905
 *          parameter.
 
1906
 *  
 
1907
 *  Availability:
 
1908
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
1909
 *    CarbonLib:        not available
 
1910
 }
 
1911
const
 
1912
        kEventTSMDocumentAccessGetFont = 6;
 
1913
 
 
1914
{
 
1915
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetGlyphInfo
 
1916
 *  
 
1917
 *  Summary:
 
1918
 *    Returns glyph info and the range covered by that glyph.
 
1919
 *  
 
1920
 *  Discussion:
 
1921
 *    Where a glyph spans multiple characters, the effective range,
 
1922
 *    represented by the glyph, is returned by the app.
 
1923
 *  
 
1924
 *  Mac OS X threading:
 
1925
 *    Not thread safe
 
1926
 *  
 
1927
 *  Parameters:
 
1928
 *    
 
1929
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
1930
 *          This parameter is provided by the input method originating
 
1931
 *          the event. (Required parameter)
 
1932
 *    
 
1933
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
1934
 *          TSM's SendTextInputEvent, called by an input method,
 
1935
 *          inserts this parameter before dispatching the event to the
 
1936
 *          user focus.  (Required Parameter)
 
1937
 *    
 
1938
 *    --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
 
1939
 *          The location in the document for which the caller would
 
1940
 *          like glyph information. Required parameter.
 
1941
 *    
 
1942
 *    --> kEventParamTSMDocAccessRequestedCharacterAttributes (in, typeUInt32)
 
1943
 *          A TSMDocAccessAttributes bit field filled out with the
 
1944
 *          information desired. Applicable values for this event are :
 
1945
 *          kTSMDocAccessEffectiveRangeAttribute which requests the
 
1946
 *          text range represented by a glyph. Required parameter.
 
1947
 *    
 
1948
 *    <-- kEventParamTSMDocAccessReplyATSUGlyphSelector (out, typeGlyphSelector)
 
1949
 *          The glyph used to display the range of text returned in the
 
1950
 *          kEventParamTSMDocAccessEffectiveRange parameter.  If the
 
1951
 *          glyph used is the one that ATSUI would normally derive,
 
1952
 *          this parameter can be omitted. Optional reply parameter.
 
1953
 *    
 
1954
 *    <-- kEventParamTSMDocAccessEffectiveRange (out, typeCFRange)
 
1955
 *          The range of text displayed as a glyph ID or CID. Optional
 
1956
 *          reply parameter. Return this information if
 
1957
 *          kTSMDocAccessEffectiveRangeAttribute is specified in the
 
1958
 *          bit field passed as the
 
1959
 *          kEventParamTSMDocAccessRequestedCharacterAttributes
 
1960
 *          parameter.
 
1961
 *  
 
1962
 *  Availability:
 
1963
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
1964
 *    CarbonLib:        not available
 
1965
 }
 
1966
const
 
1967
        kEventTSMDocumentAccessGetGlyphInfo = 7;
 
1968
 
 
1969
{
 
1970
 
 
1971
    ** Document Access Lock/Unlock events **
 
1972
 
 
1973
}
 
1974
{
 
1975
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessLockDocument
 
1976
 *  
 
1977
 *  Summary:
 
1978
 *    Notifies the app that it should not change its document's text
 
1979
 *    content (on its own) while a text service is involved in a
 
1980
 *    transaction.  The app should not allow changes, for example, by
 
1981
 *    its secondary threads.
 
1982
 *  
 
1983
 *  Discussion:
 
1984
 *    These events define how a text service can obtain access to a
 
1985
 *    document in a way that ensures data integrity during its
 
1986
 *    transaction.  The primary motivation of these events is to
 
1987
 *    prevent the application from letting its secondary threads modify
 
1988
 *    the document while a text service is busy servicing an event,
 
1989
 *    such as a key event, or some user interaction with text service
 
1990
 *    provided UI such as a menu selection. Also, while the document is
 
1991
 *    locked, a text service is free to request pointer access to the
 
1992
 *    document's text content (if this is supported by the app's text
 
1993
 *    engine.) These lock-related events should be implemented using a
 
1994
 *    ref counting scheme. Most apps will not support this kind of
 
1995
 *    threading, so implementation of these events in the text engine
 
1996
 *    will be optional.   In most text engines, the implementation of
 
1997
 *    these events should be trivial, i.e. just maintain a simple
 
1998
 *    semaphore.  TSM itself will implicitly lock/unlock around normal
 
1999
 *    entry points into a text service, such as when it delivers key
 
2000
 *    events to an input method, but there may be times when document
 
2001
 *    changes can be driven by an input method without TSM involvement,
 
2002
 *    such as the Carbon events involved when the user interacts with
 
2003
 *    some UI.  In this case, the input method must manage locking, if
 
2004
 *    the app supports it.  However, the logic in an input method
 
2005
 *    should not have to care whether TSM is in the call chain or
 
2006
 *    not... and TSM should not have to care whether an input method
 
2007
 *    will do the right thing. This is why the lock mechanism needs to
 
2008
 *    be some kind of refcounting scheme instead of a simple on/off
 
2009
 *    mechanism. This document lock support is completely optional on
 
2010
 *    the part of the text engine (if it is not threaded).  TSM will
 
2011
 *    implicitly lock/unlock the document around delivery of events to
 
2012
 *    input methods, if the app supports it.
 
2013
 *  
 
2014
 *  Mac OS X threading:
 
2015
 *    Not thread safe
 
2016
 *  
 
2017
 *  Parameters:
 
2018
 *    
 
2019
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
2020
 *          This parameter is provided by the input method originating
 
2021
 *          the event. (Required parameter)
 
2022
 *    
 
2023
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
2024
 *          TSM's SendTextInputEvent, called by an input method,
 
2025
 *          inserts this parameter before dispatching the event to the
 
2026
 *          user focus.  (Required Parameter)
 
2027
 *    
 
2028
 *    <-- kEventParamTSMDocAccessLockCount (out, typeCFIndex)
 
2029
 *          The resulting refCount of locks on the document. Required
 
2030
 *          reply parameter, if the event is handled.
 
2031
 *  
 
2032
 *  Availability:
 
2033
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
2034
 *    CarbonLib:        not available
 
2035
 }
 
2036
const
 
2037
        kEventTSMDocumentAccessLockDocument = 8;
 
2038
 
 
2039
 
 
2040
{
 
2041
 *  kEventClassTSMDocumentAccess / kEventTSMDocumentAccessUnlockDocument
 
2042
 *  
 
2043
 *  Summary:
 
2044
 *    Unlock the document so the app's text engine is free to initiate
 
2045
 *    changes again.
 
2046
 *  
 
2047
 *  Discussion:
 
2048
 *    (see kEventTSMDocumentAccessLockDocument)
 
2049
 *  
 
2050
 *  Mac OS X threading:
 
2051
 *    Not thread safe
 
2052
 *  
 
2053
 *  Parameters:
 
2054
 *    
 
2055
 *    --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
 
2056
 *          This parameter is provided by the input method originating
 
2057
 *          the event. (Required parameter)
 
2058
 *    
 
2059
 *    --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
 
2060
 *          TSM's SendTextInputEvent, called by an input method,
 
2061
 *          inserts this parameter before dispatching the event to the
 
2062
 *          user focus.  (Required Parameter)
 
2063
 *    
 
2064
 *    <-- kEventParamTSMDocAccessLockCount (out, typeCFIndex)
 
2065
 *          The resulting refCount of locks on the document. Required
 
2066
 *          reply parameter, if the event is handled.
 
2067
 *  
 
2068
 *  Availability:
 
2069
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
2070
 *    CarbonLib:        not available
 
2071
 }
 
2072
const
 
2073
        kEventTSMDocumentAccessUnlockDocument = 9;
 
2074
 
 
2075
 
 
2076
{--------------------------------------------------------------------------------------}
 
2077
{ Text Input Events                                                                    }
 
2078
{--------------------------------------------------------------------------------------}
 
2079
{
 
2080
    kEventClassTextInput quick reference:
 
2081
    
 
2082
    kEventTextInputUpdateActiveInputArea    = 1,
 
2083
    kEventTextInputUnicodeForKeyEvent       = 2,
 
2084
    kEventTextInputOffsetToPos              = 3,
 
2085
    kEventTextInputPosToOffset              = 4,
 
2086
    kEventTextInputShowHideBottomWindow     = 5,
 
2087
    kEventTextInputGetSelectedText          = 6,
 
2088
    kEventTextInputUnicodeText              = 7,
 
2089
    kEventTextInputFilterText               = 14
 
2090
    
 
2091
    The following TextInput events (UpdateActiveInputArea thru GetSelectedText) reimplement
 
2092
    the AppleEvents defined in Inside Mac Text: Text Services Manager, and provide the benefits
 
2093
    of Carbon Event targeting, dispatching, and propagation to applications that have formerly
 
2094
    handled the TSM suite of AppleEvents.
 
2095
    
 
2096
    TextInput handlers may be installed on controls, windows, or the application event target
 
2097
    (equivalent to AppleEvent-based handling). In all cases, if a given TextInput handler is
 
2098
    not installed, TSM will convert that TextInput to an AppleEvent and redispatch via AESend
 
2099
    to the current process, making adoption as gradual as is desired.
 
2100
}
 
2101
{
 
2102
 *  kEventClassTextInput / kEventTextInputUpdateActiveInputArea
 
2103
 *  
 
2104
 *  Summary:
 
2105
 *    Tells the application/text engine to initiate/terminate or manage
 
2106
 *    the content of an inline input session.
 
2107
 *  
 
2108
 *  Mac OS X threading:
 
2109
 *    Not thread safe
 
2110
 *  
 
2111
 *  Parameters:
 
2112
 *    
 
2113
 *    --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
 
2114
 *          This parameter is provided by the input method originating
 
2115
 *          the event. (Required parameter)
 
2116
 *    
 
2117
 *    --> kEventParamTextInputSendRefCon (in, typeLongInteger)
 
2118
 *          TSM's SendTextInputEvent, called by an input method,
 
2119
 *          inserts this parameter before dispatching the event to the
 
2120
 *          user focus.  (Required Parameter)
 
2121
 *    
 
2122
 *    --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
 
2123
 *          The ScriptLanguageRecord associated with the contents of an
 
2124
 *          inline input session.  This parameter is normally provided
 
2125
 *          by the input method originating the event.  TSM's
 
2126
 *          SendTextInputEvent will construct this parameter, when
 
2127
 *          missing, based on the input method component description. 
 
2128
 *          (Required Parameter)
 
2129
 *    
 
2130
 *    --> kEventParamTextInputSendFixLen (in, typeLongInteger)
 
2131
 *          This parameter indicates how much, if any, of the inline
 
2132
 *          input session is being confirmed (or commited) to the
 
2133
 *          application.  A value of -1 indicates the entire inline
 
2134
 *          session is being confirmed.  A value of 0 indicates that
 
2135
 *          none of the text is being confirmed (yet), although there
 
2136
 *          may be some change to the contents of the inline input
 
2137
 *          session.  This parameter is provided by the input method
 
2138
 *          originating the event.  (Required Parameter)
 
2139
 *    
 
2140
 *    --> kEventParamTextInputSendText (in, typeUnicodeText)
 
2141
 *          The text to be added to the inline input session. The data
 
2142
 *          type of this parameter actually depends on the TSMDocument
 
2143
 *          type created via NewTSMDocument: it will be typeChar for
 
2144
 *          kTextService documents, or typeUnicodeText for
 
2145
 *          kUnicodeDocument documents.  (Required Parameter)
 
2146
 *    
 
2147
 *    --> kEventParamTextInputSendUpdateRng (in, typeTextRangeArray)
 
2148
 *          An array of text-range records (see TextRangeArray) that
 
2149
 *          indicates how to update (a subrange of) the active input
 
2150
 *          area (aka. inline input session).  The TextRange structures
 
2151
 *          occur in pairs, the first of which identifies a subrange of
 
2152
 *          the existing active input area (in the app's backing store,
 
2153
 *          resulting from a previous UpdateActiveInputArea event) to
 
2154
 *          be replaced by a new subrange of text, identified by the
 
2155
 *          second TextRange in the pair.  The new text subrange is
 
2156
 *          obtained from the contents of the
 
2157
 *          kEventParamTextInputSendText parameter.  In general, the
 
2158
 *          Nth array element, where N is even, specifies the range of
 
2159
 *          old text to be updated and array element N+1 specifies the
 
2160
 *          range of new text to replace the corresponding old text. 
 
2161
 *          The fHiliteStyle field of the TextRange records is ignored
 
2162
 *          in this parameter. NOTE:  There are some "loose ends" in
 
2163
 *          the TSM event protocol that were never clearly defined, but
 
2164
 *          which have been introduced over the years by input methods
 
2165
 *          themselves, probably through some trial and error.  The
 
2166
 *          conventions regarding this optional parameter seem to be as
 
2167
 *          follows: If the UpdateRng parameter is missing from the
 
2168
 *          event, the input method is requesting that the entire
 
2169
 *          contents of the existing inline input session (if there is
 
2170
 *          one) is to be replaced "wholesale" by the new text
 
2171
 *          contained in the kEventParamTextInputSendText parameter. If
 
2172
 *          the UpdateRng parameter exists, but contains no ranges
 
2173
 *          (i.e. fNumOfRanges == 0), this seems to be hint from the
 
2174
 *          input method that no text in the active input area is
 
2175
 *          changing.  It may be that the existing active input area is
 
2176
 *          being confirmed "as is", or that the input method is
 
2177
 *          modifying its highlite attributes in some way, due to some
 
2178
 *          user action, such as changing the selected clause or
 
2179
 *          highlited subrange of text in the active input area, or
 
2180
 *          that the input method is changing the caret position in the
 
2181
 *          active input area (if it uses the kTSMHiliteCaretPosition
 
2182
 *          hilite style). Depending on how your text engine draws
 
2183
 *          hilite styles supported in the
 
2184
 *          kEventParamTextInputSendHiliteRng parameter, you may or may
 
2185
 *          not need to redraw the text itself, simply change the
 
2186
 *          hilite. This parameter is optional and may not be present
 
2187
 *          in all instances of this event.
 
2188
 *    
 
2189
 *    --> kEventParamTextInputSendHiliteRng (in, typeTextRangeArray)
 
2190
 *          An array of text-range records (see TextRangeArray) that
 
2191
 *          specifies how various subranges of the active input area
 
2192
 *          are to be highlited, and possibly specifies caret position
 
2193
 *          within the active input area. NOTE:  The text offsets used
 
2194
 *          in the HiliteRng parameter are relative to the beginning of
 
2195
 *          the active input area AFTER all text has been updated (per
 
2196
 *          the SendUpdateRng parameter) and any (subrange of) text has
 
2197
 *          been confirmed.  Specifically, if the entire text is being
 
2198
 *          confirmed, it is clear that any contents of this parameter
 
2199
 *          should be ignored, especially non-zero values
 
2200
 *          kTSMHiliteCaretPosition. This parameter is optional and may
 
2201
 *          not be present in all instances of this event.
 
2202
 *    
 
2203
 *    --> kEventParamTextInputSendClauseRng (in, typeOffsetArray)
 
2204
 *          An array of offsets (see OffsetArray) used by an input
 
2205
 *          method to specify word or clause boundaries in the
 
2206
 *          resulting active input area.  Offsets are relative to the
 
2207
 *          start of the resulting active input area. This parameter is
 
2208
 *          optional and may not be present in all instances of this
 
2209
 *          event.
 
2210
 *    
 
2211
 *    --> kEventParamTextInputSendPinRng (in, typeTextRange)
 
2212
 *          A TextRange record that specifies a start offset and an end
 
2213
 *          offset that should be scrolled into view if the text
 
2214
 *          specified by these offsets is not already in view. The
 
2215
 *          fHiliteStyle field of the TextRange records is ignored in
 
2216
 *          this parameter. This parameter is optional and may not be
 
2217
 *          present in all instances of this event.
 
2218
 *    
 
2219
 *    --> kEventParamTextInputSendTextServiceEncoding (in, typeUInt32)
 
2220
 *          The encoding associated with the text sent by an input
 
2221
 *          method. On MacOS X, this parameter is not commonly used
 
2222
 *          because all TSM input methods produce Unicode, but TSM will
 
2223
 *          respect a Unicode encoding variant here, if specified. In
 
2224
 *          CarbonLib, this parameter identifies the Mac encoding
 
2225
 *          (usually an encoding variant) of the text produced by the
 
2226
 *          input method on MacOS, where it is not a requirement that
 
2227
 *          input methods be Unicode-savvy.  On this platform, TSM
 
2228
 *          needs the information to convert text to Unicode from a Mac
 
2229
 *          encoding variant which cannot be derived from the
 
2230
 *          ScriptLanguage record associated with the input method
 
2231
 *          component. This parameter is optional and may not be
 
2232
 *          present in all instances of this event.
 
2233
 *    
 
2234
 *    --> kEventParamTextInputSendTextServiceMacEncoding (in, typeUInt32)
 
2235
 *          The Mac encoding (variant) associated with the text sent by
 
2236
 *          an input method. On Mac OS X, this parameter is needed by
 
2237
 *          TSM to convert input method produced Unicodes to a Mac
 
2238
 *          encoding when the application that has focus is not
 
2239
 *          Unicode-savvy in the TSM sense... i.e. the current
 
2240
 *          TSMDocument is not of type kUnicodeDocument. This parameter
 
2241
 *          can also be useful if a Unicode-savvy handler should need
 
2242
 *          to convert from Unicode. This parameter is optional and may
 
2243
 *          not be present in all instances of this event.
 
2244
 *    
 
2245
 *    --> kEventParamTextInputSendGlyphInfoArray (in, typeGlyphInfoArray)
 
2246
 *          A TSMGlyphInfoArray structure in which an input method can
 
2247
 *          associate unencoded glyphs IDs and/or fonts with
 
2248
 *          (sub)ranges of text it produces.  The array elements
 
2249
 *          identify non-overlapping ranges of text and the glyph ID
 
2250
 *          (character collection is 0) such as in an OpenType font, or
 
2251
 *          the CID (collection is non-zero) such as in TrueType fonts.
 
2252
 *           If the glyphID itself is 0, only the font specified is to
 
2253
 *          be applied to the text range.  This is useful for
 
2254
 *          characters in Unicode private use area, such as Windings,
 
2255
 *          but note that this capability should be used with care
 
2256
 *          because changing the font of an input text stream can lead
 
2257
 *          to a confusing user interface. An input method will only
 
2258
 *          include this parameter if the text engine has indicated it
 
2259
 *          supports this feature via the
 
2260
 *          kTSMDocumentSupportGlyphInfoPropertyTag TSMDocumentProperty
 
2261
 *          tag. For more information, see the Glyph Access protocol
 
2262
 *          described in Technote TN2079. This parameter is optional
 
2263
 *          and may not be present in all instances of this event.
 
2264
 *    
 
2265
 *    --> kEventParamTextInputSendReplaceRange (in, typeCFRange)
 
2266
 *          The CFRange in the application's document that should be
 
2267
 *          replaced by the contents of the inline input session
 
2268
 *          defined by other parameters in this event.  The text
 
2269
 *          service will have obtained and calculated this range by
 
2270
 *          accessing the document's text via events of the
 
2271
 *          TSMDocumentAccess class.  This CFRange parameter refers to
 
2272
 *          text in flat Unicode space (UniChar) offsets, and its
 
2273
 *          location is document relative, not relative to the
 
2274
 *          insertion point or any inline session. A text service may
 
2275
 *          include this parameter only if the text engine has
 
2276
 *          indicated it supports this feature via the
 
2277
 *          kTSMDocumentSupportDocumentAccessPropertyTag
 
2278
 *          TSMDocumentProperty tag. This parameter is optional and may
 
2279
 *          not be present in all instances of this event. NOTE:  This
 
2280
 *          parameter is supported by the TSM Carbon event only, not by
 
2281
 *          TSM's kUpdateActiveInputArea AppleEvent.  If a text engine
 
2282
 *          developer wishes to support this parameter, it must
 
2283
 *          implement a Carbon event handler for this event and set the
 
2284
 *          kTSMDocumentSupportDocumentAccessPropertyTag property tag.
 
2285
 *          NOTE:  Care must be exercised by the app when there is an
 
2286
 *          active inline input session. A text service that sends an a
 
2287
 *          UpdateActiveInputArea event specifying this parameter
 
2288
 *          should not be the same text service that owns the inline
 
2289
 *          input session, since the text engine would need to call
 
2290
 *          FixTSMDocument().  This, in turn, would cause recursion
 
2291
 *          through that same text service via FixTextService().
 
2292
 *          However, the app should be prepared for recursion
 
2293
 *          regardless of which text service owns the inline input
 
2294
 *          session because it will call FixTSMDocument() to confirm
 
2295
 *          the inline input session, and "somebody" will likely send
 
2296
 *          an UpdateActiveInputArea event as a result. Therefore,
 
2297
 *          document state obtained before the call to FixTSMDocument()
 
2298
 *          may not be valid after this call completes.
 
2299
 *  
 
2300
 *  Availability:
 
2301
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
2302
 *    CarbonLib:        in CarbonLib 1.1 and later
 
2303
 }
 
2304
const
 
2305
        kEventTextInputUpdateActiveInputArea = 1;
 
2306
 
 
2307
{
 
2308
 *  kEventClassTextInput / kEventTextInputUnicodeForKeyEvent
 
2309
 *  
 
2310
 *  Summary:
 
2311
 *    Provides Unicode text input resulting from either a key event
 
2312
 *    (TSM originates the event in this case) or from a
 
2313
 *    kEventTextInputUnicodeText event produced by an input method,
 
2314
 *    such as a Character Palette class input method, or a HandWriting
 
2315
 *    input method.
 
2316
 *  
 
2317
 *  Discussion:
 
2318
 *    This is the primary event by which applications should receive
 
2319
 *    text input on Mac OS X. Apple recommends that applications use
 
2320
 *    this event rather than the kEventRawKeyDown event to handle text
 
2321
 *    input. 
 
2322
 *    
 
2323
 *    A client need not be fully TSM-aware to process or receive this
 
2324
 *    event. You can also get Mac encoding characters from the raw
 
2325
 *    keyboard event contained in this event. If no UnicodeForKeyEvent
 
2326
 *    handler is installed, and no kUnicodeNotFromInputMethod
 
2327
 *    AppleEvent handler is installed (or the application has not
 
2328
 *    created a Unicode TSMDocument), the Mac encoding charCodes (if
 
2329
 *    these can be converted from the Unicodes) are provided to
 
2330
 *    WaitNextEvent. 
 
2331
 *    
 
2332
 *    This event is generated automatically by TSM when a
 
2333
 *    kEventRawKeyDown event is sent to the application event target.
 
2334
 *    The typical keyboard event flow begins with a kEventRawKeyDown
 
2335
 *    event posted to the event queue. This event is dequeued during
 
2336
 *    WaitNextEvent or RunApplicationEventLoop, and sent to the event
 
2337
 *    dispatcher target. If the keydown event reaches the application
 
2338
 *    target, it is handled by TSM, which generates a
 
2339
 *    kEventTextInputUnicodeForKeyEvent and sends it to the event
 
2340
 *    dispatcher target. The event dispatcher will resend the event to
 
2341
 *    the user focus target, which sends it to the focused control in
 
2342
 *    the focused window.
 
2343
 *  
 
2344
 *  Mac OS X threading:
 
2345
 *    Not thread safe
 
2346
 *  
 
2347
 *  Parameters:
 
2348
 *    
 
2349
 *    --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
 
2350
 *          This parameter is provided by the input method originating
 
2351
 *          the event. (Required parameter)
 
2352
 *    
 
2353
 *    --> kEventParamTextInputSendRefCon (in, typeLongInteger)
 
2354
 *          TSM's SendTextInputEvent, called by an input method,
 
2355
 *          inserts this parameter before dispatching the event to the
 
2356
 *          user focus.  (Required Parameter)
 
2357
 *    
 
2358
 *    --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
 
2359
 *          The ScriptLanguageRecord associated with the text contained
 
2360
 *          in the event. This parameter is normally provided by the
 
2361
 *          input method originating the event.  TSM's
 
2362
 *          SendTextInputEvent will construct this parameter from
 
2363
 *          current script information as a result of a key event, or
 
2364
 *          using input method provided information when TSM receives a
 
2365
 *          kEventTextInputUnicodeText event.  (Required Parameter)
 
2366
 *    
 
2367
 *    --> kEventParamTextInputSendText (in, typeUnicodeText)
 
2368
 *          The Unicode characters that were entered by the user.
 
2369
 *    
 
2370
 *    --> kEventParamTextInputSendKeyboardEvent (in, typeEventRef)
 
2371
 *          This parameter is the original raw keyboard event that
 
2372
 *          produced the text. It enables access to
 
2373
 *          kEventParamKeyModifiers and kEventParamKeyCode parameters.
 
2374
 *          Note that when contents of TSM�s bottom-line input window
 
2375
 *          are confirmed (i.e., during typing of Chinese, Korean, or
 
2376
 *          Japanese), the raw keyboard event�s keyCode and modifiers
 
2377
 *          are set to default values. 
 
2378
 *          
 
2379
 *          You can also extract from the RawKeyDown event either
 
2380
 *          Unicodes or Mac encoding characters as follows:
 
2381
 *          
 
2382
 *          kEventParamKeyUnicodes      typeUnicodeText
 
2383
 *           kEventParamKeyMacCharCodes  typeChar (if available)
 
2384
 *           
 
2385
 *          The kEventParamKeyUnicodes parameter of the raw keyboard
 
2386
 *          event is identical to the TextInput event�s
 
2387
 *          kEventParamTextInputSendText parameter.
 
2388
 *    
 
2389
 *    --> kEventParamTextInputSendGlyphInfoArray (in, typeGlyphInfoArray)
 
2390
 *          A TSMGlyphInfoArray structure in which an input method can
 
2391
 *          associate unencoded glyphs IDs and/or fonts with
 
2392
 *          (sub)ranges of text it produces.  The array elements
 
2393
 *          identify non-overlapping ranges of text and the glyph ID
 
2394
 *          (character collection is 0) such as in an OpenType font, or
 
2395
 *          the CID (collection is non-zero) such as in TrueType fonts.
 
2396
 *           If the glyphID itself is 0, only the font specified is to
 
2397
 *          be applied to the text range.  This is useful for
 
2398
 *          characters in Unicode private use area, such as Windings,
 
2399
 *          but note that this capability should be used with care
 
2400
 *          because changing the font of an input text stream can lead
 
2401
 *          to a confusing user interface. For more information, see
 
2402
 *          the Glyph Access protocol described in Technote TN2079.
 
2403
 *          This parameter is optional and may not be present in all
 
2404
 *          instances of this event.
 
2405
 *  
 
2406
 *  Availability:
 
2407
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
2408
 *    CarbonLib:        in CarbonLib 1.1 and later
 
2409
 }
 
2410
const
 
2411
        kEventTextInputUnicodeForKeyEvent = 2;
 
2412
 
 
2413
{
 
2414
 *  kEventClassTextInput / kEventTextInputOffsetToPos
 
2415
 *  
 
2416
 *  Summary:
 
2417
 *    Requests conversion from inline session text offset to global QD
 
2418
 *    coordinate.
 
2419
 *  
 
2420
 *  Discussion:
 
2421
 *    This event is typically produced by an input method so that it
 
2422
 *    can best position a palette near the text being edited by the
 
2423
 *    user.
 
2424
 *  
 
2425
 *  Mac OS X threading:
 
2426
 *    Not thread safe
 
2427
 *  
 
2428
 *  Parameters:
 
2429
 *    
 
2430
 *    --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
 
2431
 *          This parameter is provided by the input method originating
 
2432
 *          the event. (Required parameter)
 
2433
 *    
 
2434
 *    --> kEventParamTextInputSendRefCon (in, typeLongInteger)
 
2435
 *          TSM's SendTextInputEvent, called by an input method,
 
2436
 *          inserts this parameter before dispatching the event to the
 
2437
 *          user focus.  (Required Parameter)
 
2438
 *    
 
2439
 *    --> kEventParamTextInputSendTextOffset (in, typeLongInteger)
 
2440
 *          Specifies the text offset in an active input area for which
 
2441
 *          the global position (in QD coordinates) is desired. 
 
2442
 *          Because an inline input session always begins at the
 
2443
 *          insertion point, the offset is always considered relative
 
2444
 *          to the insertion point, even when there is no active input
 
2445
 *          area.  (Required Parameter)
 
2446
 *          
 
2447
 *          If an offset is outside the bounds of the document text,
 
2448
 *          errOffsetInvalid should be returned.  Negative offsets are
 
2449
 *          not valid when an inline input session exists, but are
 
2450
 *          valid when none exists, to allow query of offsets before
 
2451
 *          the insertion point.
 
2452
 *          
 
2453
 *          NOTE:  Non-zero offsets in the absence of an active input
 
2454
 *          area can only be specified when the originator of the event
 
2455
 *          is certain that the character encoding used by the target
 
2456
 *          (the current TSMDocument) is the same as its own encoding. 
 
2457
 *          When there is no active input area, TSM is unable to
 
2458
 *          convert offsets between different encodings that might be
 
2459
 *          used by the app and an input method (as it normally does)
 
2460
 *          since TSM does not have access to the document text. 
 
2461
 *          Practically, this means that both the originator and event
 
2462
 *          target must be Unicode-savvy, i.e. the current TSMDocument
 
2463
 *          was created with kUnicodeDocumentInterfaceType.
 
2464
 *          
 
2465
 *          NOTE:  Insertion point relative offsets when there is no
 
2466
 *          active input area is contrary to the original definition of
 
2467
 *          this parameter in IM-Text 7-74 which states that the offset
 
2468
 *          is "relative to the start of the current text body" in this
 
2469
 *          case.  However, most applications and text engines have
 
2470
 *          already implemented the case offset = 0 as being the
 
2471
 *          insertion point.  This allows an input method to display
 
2472
 *          some UI near the the insertion point even before typing
 
2473
 *          takes place.
 
2474
 *    
 
2475
 *    --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
 
2476
 *          Specifies which glyph on either side of the supplied text
 
2477
 *          offset that should be used to compute the on-screen
 
2478
 *          position returned.  This value is similar to the
 
2479
 *          leadingEdge parameter of the QuickDraw PixelToChar
 
2480
 *          function.  If this parameter is true, the location of the
 
2481
 *          character (or characters if the glyph is represented by
 
2482
 *          multiple characters) at the specified text offset is
 
2483
 *          returned.  If this parameter is false, the on-screen
 
2484
 *          position returned should be the trailing edge of the glyph
 
2485
 *          represented by the character (or characters) immediately
 
2486
 *          preceding (in memory order) the supplied text offset. Note
 
2487
 *          also that while the on-screen position for a given offset
 
2488
 *          and leading/trailing edge value is affected by this
 
2489
 *          parameter, it also affects what should be returned for the
 
2490
 *          other optional parameters at style run boundaries, such as
 
2491
 *          script and font information. This parameter is optional and
 
2492
 *          may not be present in all instances of this event. The
 
2493
 *          default value for this parameter is 'true'.
 
2494
 *    
 
2495
 *    --> kEventParamTextInputSendLeadingEdge (in, typeBoolean)
 
2496
 *          The position on screen (in QD coordinates) of the requested
 
2497
 *          text offset and leading/trailing edge value.  (Required
 
2498
 *          reply parameter)
 
2499
 *    
 
2500
 *    <-- kEventParamTextInputReplyPoint (out, typeQDPoint)
 
2501
 *          The ScriptLanguageRecord associated with the text at the
 
2502
 *          offset specified in the event, either the
 
2503
 *          ScriptLanguageRecord of the active input area if one
 
2504
 *          exists, or of the text at the specified offset and
 
2505
 *          specified leading/ trailing edge value.  At a script run
 
2506
 *          boundary, such as where a Japanese text run ends, and a
 
2507
 *          Roman begins, a leading edge value of 'true' should return
 
2508
 *          the Roman script/language while a leading edge value of
 
2509
 *          'false' should return the Japanese script/language. This
 
2510
 *          parameter is optional and may not be returned to the caller.
 
2511
 *    
 
2512
 *    <-- kEventParamTextInputReplySLRec (out, typeIntlWritingCode)
 
2513
 *          The QD Font associated with the text at the offset
 
2514
 *          specified in the event, either the QD Font of the active
 
2515
 *          input area if one exists, or of the text at the specified
 
2516
 *          offset and specified leading/ trailing edge value.  At a
 
2517
 *          font run boundary, such as where a Japanese text run ends,
 
2518
 *          and a Roman begins, a leading edge value of 'true' should
 
2519
 *          return the font of the Roman text run while a leading edge
 
2520
 *          value of 'false' should return the Japanese font. This
 
2521
 *          parameter is optional and may not be returned to the caller.
 
2522
 *    
 
2523
 *    <-- kEventParamTextInputReplyFont (out, typeLongInteger)
 
2524
 *          The FMFont associated with the text at the offset specified
 
2525
 *          in the event, either the FMFont of the active input area if
 
2526
 *          one exists, or of the text at the specified offset and
 
2527
 *          specified leading/ trailing edge value.  At a font run
 
2528
 *          boundary, such as where a Japanese text run ends, and a
 
2529
 *          Roman begins, a leading edge value of 'true' should return
 
2530
 *          the font of the Roman text run while a leading edge value
 
2531
 *          of 'false' should return the Japanese font. This parameter
 
2532
 *          allows the handler to return an FMFont when a FMFontFamily
 
2533
 *          or FOND would be inconvenient to compute. This parameter is
 
2534
 *          optional and may not be returned to the caller.
 
2535
 *    
 
2536
 *    <-- kEventParamTextInputReplyFMFont (out, typeUInt32)
 
2537
 *          The point size associated with the text at the offset
 
2538
 *          specified in the event, either the point size of the active
 
2539
 *          input area if one exists, or of the text at the specified
 
2540
 *          offset.  At a style run boundary where point size changes,
 
2541
 *          the leadingEdge parameter determines which point size
 
2542
 *          should be returned. This parameter is optional and may not
 
2543
 *          be returned to the caller.
 
2544
 *    
 
2545
 *    <-- kEventParamTextInputReplyPointSize (out, typeFixed)
 
2546
 *          The line height associated with the text at the offset
 
2547
 *          specified in the event, either the line height of the
 
2548
 *          active input area if one exists, or of the text at the
 
2549
 *          specified offset.  At a style run boundary where point size
 
2550
 *          changes, the leadingEdge parameter determines which line
 
2551
 *          height should be returned. This parameter is optional and
 
2552
 *          may not be returned to the caller.
 
2553
 *    
 
2554
 *    <-- kEventParamTextInputReplyLineHeight (out, typeShortInteger)
 
2555
 *          The line ascent associated with the text at the offset
 
2556
 *          specified in the event, either the line ascent of the
 
2557
 *          active input area if one exists, or of the text at the
 
2558
 *          specified offset.  At a style run boundary where point size
 
2559
 *          changes, the leadingEdge parameter determines which line
 
2560
 *          ascent should be returned. This parameter is optional and
 
2561
 *          may not be returned to the caller.
 
2562
 *    
 
2563
 *    <-- kEventParamTextInputReplyLineAscent (out, typeShortInteger)
 
2564
 *          The orientation associated with the text at the offset
 
2565
 *          specified in the event, either the orientation of the
 
2566
 *          active input area if one exists, or of the text at the
 
2567
 *          specified offset.  At a style run boundary where
 
2568
 *          orientation changes, the leadingEdge parameter determines
 
2569
 *          which orientation should be returned.  The value 90
 
2570
 *          specifies a horizontal line direction and 180 specifies a
 
2571
 *          vertical line direction. This parameter is optional and may
 
2572
 *          not be returned to the caller.
 
2573
 *  
 
2574
 *  Availability:
 
2575
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
2576
 *    CarbonLib:        in CarbonLib 1.1 and later
 
2577
 }
 
2578
const
 
2579
        kEventTextInputOffsetToPos = 3;
 
2580
 
 
2581
{
 
2582
 *  kEventClassTextInput / kEventTextInputPosToOffset
 
2583
 *  
 
2584
 *  Summary:
 
2585
 *    Requests conversion from global QD coordinate to a byte offset in
 
2586
 *    text.
 
2587
 *  
 
2588
 *  Discussion:
 
2589
 *    This event is used for mouse tracking.  An input method typically
 
2590
 *    produces this event to perform proper cursor management as the
 
2591
 *    cursor moves over various subranges, or clauses of text (or the
 
2592
 *    boundaries between these) in an inline input session, or moves
 
2593
 *    between an inline input session to the main text body, or even
 
2594
 *    outside of the main text body.
 
2595
 *  
 
2596
 *  Mac OS X threading:
 
2597
 *    Not thread safe
 
2598
 *  
 
2599
 *  Parameters:
 
2600
 *    
 
2601
 *    --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
 
2602
 *          This parameter is provided by the input method originating
 
2603
 *          the event. (Required parameter)
 
2604
 *    
 
2605
 *    --> kEventParamTextInputSendRefCon (in, typeLongInteger)
 
2606
 *          TSM's SendTextInputEvent, called by an input method,
 
2607
 *          inserts this parameter before dispatching the event to the
 
2608
 *          user focus.  (Required Parameter)
 
2609
 *    
 
2610
 *    --> kEventParamTextInputSendCurrentPoint (in, typeQDPoint)
 
2611
 *          The point whose text offset (and classification) the input
 
2612
 *          method is requesting. This point is usually the current
 
2613
 *          mouse position in global QD coordinates.  Text offset
 
2614
 *          classifications are defined by
 
2615
 *          kEventParamTextInputReplyRegionClass. (Required Parameter)
 
2616
 *    
 
2617
 *    --> kEventParamTextInputSendDraggingMode (in, typeBoolean)
 
2618
 *          A Boolean value that indicates whether the input method is
 
2619
 *          currently tracking the mouse -- that is, whether the user
 
2620
 *          is dragging the current selection. If it is TRUE, the
 
2621
 *          application should pin the cursor to the limits of the
 
2622
 *          active input area (to avoid highlighting beyond the limits
 
2623
 *          of the active input area). This parameter is optional and
 
2624
 *          may not be present in all instances of this event.
 
2625
 *    
 
2626
 *    <-- kEventParamTextInputReplyRegionClass (out, typeLongInteger)
 
2627
 *          The text offset corresponding to the supplied QD point. If
 
2628
 *          the click is within the limits of the active input area,
 
2629
 *          the offset is relative to the start of the active input
 
2630
 *          area. Otherwise, the offset is relative to the start of the
 
2631
 *          application's text body.  (Required reply parameter)
 
2632
 *    
 
2633
 *    <-- kEventParamTextInputReplyTextOffset (out, typeLongInteger)
 
2634
 *          The classification of the offset parameter.  The values
 
2635
 *          kTSMOutsideOfBody and kTSMInsideOfBody means that the
 
2636
 *          position is outside or inside of the text body,
 
2637
 *          respectively.  A value of kTSMInsideOfActiveInputArea means
 
2638
 *          that the position is inside of the active input area. 
 
2639
 *          (Required reply parameter)
 
2640
 *    
 
2641
 *    <-- kEventParamTextInputReplyLeadingEdge (out, typeBoolean)
 
2642
 *          Specifies whether the QD point supplied corresponds to the
 
2643
 *          leading edge (true) or trailing edge (false) of a glyph. 
 
2644
 *          This value is similar to the leadingEdge parameter of the
 
2645
 *          QuickDraw PixelToChar function. If the supplied point is on
 
2646
 *          the leading edge of a glyph, this parameter contains the
 
2647
 *          text offset of the character whose glyph is at the pixel
 
2648
 *          location.  (If the glyph represents multiple characters, it
 
2649
 *          returns the text offset of the first of these characters in
 
2650
 *          memory.)  If the supplied point is on the trailing edge of
 
2651
 *          a glyph, this parameter returns the text offset of the
 
2652
 *          first character in memory following the character or
 
2653
 *          characters represented by the glyph. This parameter is
 
2654
 *          optional and may not be returned to the caller.
 
2655
 *    
 
2656
 *    <-- kEventParamTextInputReplySLRec (out, typeIntlWritingCode)
 
2657
 *          The ScriptLanguageRecord of the script run containing the
 
2658
 *          character at the returned text offset and leading/trailing
 
2659
 *          edge value. This parameter is optional and may not be
 
2660
 *          returned to the caller.
 
2661
 *  
 
2662
 *  Availability:
 
2663
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
2664
 *    CarbonLib:        in CarbonLib 1.1 and later
 
2665
 }
 
2666
const
 
2667
        kEventTextInputPosToOffset = 4;
 
2668
 
 
2669
{
 
2670
 *  kEventClassTextInput / kEventTextInputShowHideBottomWindow
 
2671
 *  
 
2672
 *  Summary:
 
2673
 *    Show or hide the bottom-line input window.
 
2674
 *  
 
2675
 *  Discussion:
 
2676
 *    This event is produced by input methods to control the Text
 
2677
 *    Services Manager bottom-line input window, and is not normally
 
2678
 *    handled by an application.
 
2679
 *  
 
2680
 *  Mac OS X threading:
 
2681
 *    Not thread safe
 
2682
 *  
 
2683
 *  Parameters:
 
2684
 *    
 
2685
 *    --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
 
2686
 *          This parameter is provided by the input method originating
 
2687
 *          the event. (Required parameter)
 
2688
 *    
 
2689
 *    --> kEventParamTextInputSendRefCon (in, typeLongInteger)
 
2690
 *          TSM's SendTextInputEvent, called by an input method,
 
2691
 *          inserts this parameter before dispatching the event to the
 
2692
 *          user focus.  (Required Parameter)
 
2693
 *    
 
2694
 *    --> kEventParamTextInputSendShowHide (in, typeBoolean)
 
2695
 *          If true, the bottomline input window should be shown; if
 
2696
 *          false, it should be hidden. This parameter is not needed if
 
2697
 *          the input method is simply inquiring about the state of the
 
2698
 *          input window. This parameter is optional and may not be
 
2699
 *          present in all instances of this event.
 
2700
 *    
 
2701
 *    <-- kEventParamTextInputReplyShowHide (out, typeBoolean)
 
2702
 *          The current state of the input window: true if the window
 
2703
 *          is shown; false if it is hidden. If the optional parameter
 
2704
 *          kEventParamTextInputSendShowHide is included, this return
 
2705
 *          parameter should show the state of the window before it was
 
2706
 *          set to the state requested in the optional parameter. This
 
2707
 *          parameter is optional and may not be returned to the caller.
 
2708
 *  
 
2709
 *  Availability:
 
2710
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
2711
 *    CarbonLib:        in CarbonLib 1.1 and later
 
2712
 }
 
2713
const
 
2714
        kEventTextInputShowHideBottomWindow = 5;
 
2715
 
 
2716
{
 
2717
 *  kEventClassTextInput / kEventTextInputGetSelectedText
 
2718
 *  
 
2719
 *  Summary:
 
2720
 *    Get the selected text (or the character before or after the
 
2721
 *    insertion point, based on the leadingEdge parameter) from the
 
2722
 *    application�s text engine.
 
2723
 *  
 
2724
 *  Mac OS X threading:
 
2725
 *    Not thread safe
 
2726
 *  
 
2727
 *  Parameters:
 
2728
 *    
 
2729
 *    --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
 
2730
 *          This parameter is provided by the input method originating
 
2731
 *          the event. (Required parameter)
 
2732
 *    
 
2733
 *    --> kEventParamTextInputSendRefCon (in, typeLongInteger)
 
2734
 *          TSM's SendTextInputEvent, called by an input method,
 
2735
 *          inserts this parameter before dispatching the event to the
 
2736
 *          user focus.  (Required Parameter)
 
2737
 *    
 
2738
 *    --> kEventParamTextInputSendLeadingEdge (in, typeBoolean)
 
2739
 *          If there is a non-empty selection, this parameter should be
 
2740
 *          ignored.  When the current selection is empty, i.e. an
 
2741
 *          insertion point, and this parameter is NOT supplied, no
 
2742
 *          text should be returned. If the current selection is empty
 
2743
 *          and this parameter is supplied, return the character (or
 
2744
 *          characters) representing the glyph on the side of the
 
2745
 *          insertion point indicated by this leadingEdge parameter.
 
2746
 *          This value is similar to the leadingEdge parameter of the
 
2747
 *          QuickDraw PixelToChar function.  If this parameter is true,
 
2748
 *          the character (or characters) at the insertion point is
 
2749
 *          returned.  If this parameter is false, the character (or
 
2750
 *          characters) immediately preceding (in memory order) the
 
2751
 *          insertion point should be returned. This parameter is
 
2752
 *          optional and may not be present in all instances of this
 
2753
 *          event. This parameter has no default value and no text
 
2754
 *          should be returned when this parameter is ommited and there
 
2755
 *          is no selected text.
 
2756
 *    
 
2757
 *    --> kEventParamTextInputSendTextServiceEncoding (in, typeUInt32)
 
2758
 *          The encoding associated with the text sent by an input
 
2759
 *          method. On MacOS X, this parameter is not commonly used
 
2760
 *          because all TSM input methods produce (and request)
 
2761
 *          Unicode, but if specified, this may be a Unicode variant
 
2762
 *          encoding. In CarbonLib on MacOS, this parameter identifies
 
2763
 *          the Mac encoding (usually an encoding variant) of the text
 
2764
 *          produced by the input method on MacOS, where it is not a
 
2765
 *          requirement that input methods be Unicode-savvy.  On this
 
2766
 *          platform, TSM needs the information to convert text to
 
2767
 *          Unicode from a Mac encoding variant which cannot be derived
 
2768
 *          from the ScriptLanguage record associated with the input
 
2769
 *          method component. This parameter is optional and may not be
 
2770
 *          present in all instances of this event.
 
2771
 *    
 
2772
 *    <-- kEventParamTextInputReplyText (out, typeUnicodeText)
 
2773
 *          The data type of this parameter actually depends on the
 
2774
 *          TSMDocument type created via NewTSMDocument: it should be
 
2775
 *          typeChar for kTextService documents, or typeUnicodeText for
 
2776
 *          kUnicodeDocument documents. This parameter is optional and
 
2777
 *          may not be returned to the caller.
 
2778
 *    
 
2779
 *    <-- kEventParamTextInputReplySLRec (out, typeIntlWritingCode)
 
2780
 *          The ScriptLanguageRecord of the script run containing the
 
2781
 *          text being returned to an input method. This parameter is
 
2782
 *          optional and may not be returned to the caller.
 
2783
 *    
 
2784
 *    <-- kEventParamTextInputReplyMacEncoding (out, typeUInt32)
 
2785
 *          The Mac encoding (variant) associated with the text
 
2786
 *          returned to the input method. On Mac OS X, this parameter
 
2787
 *          may needed by TSM to convert application produced text from
 
2788
 *          a Mac encoding to Unicodes returned to the input method.
 
2789
 *          This parameter is optional and may not be returned to the
 
2790
 *          caller.
 
2791
 *    
 
2792
 *    <-- kEventParamTextInputGlyphInfoArray (out, typeGlyphInfoArray)
 
2793
 *          A TSMGlyphInfoArray structure in which the event handler
 
2794
 *          can associate unencoded glyphs IDs and/or fonts with
 
2795
 *          (sub)ranges of text it returns.  The array elements
 
2796
 *          identify non-overlapping ranges of text and the glyph ID
 
2797
 *          (character collection is 0) such as in an OpenType font, or
 
2798
 *          the CID (collection is non-zero) such as in TrueType fonts.
 
2799
 *           If the glyphID itself is 0, only the font specified is to
 
2800
 *          be applied to the text range.  This is useful for
 
2801
 *          characters in Unicode private use area. For more
 
2802
 *          information, see the Glyph Access protocol described in
 
2803
 *          Technote TN2079. This parameter is optional and may not be
 
2804
 *          returned to the caller. NOTE:  This parameter should really
 
2805
 *          have been kEventParamTextInputReplyGlyphInfoArray, which
 
2806
 *          was introduced after glyphInfo support was added to this
 
2807
 *          event, but we can't change it now without breaking binary
 
2808
 *          compatibility.
 
2809
 *  
 
2810
 *  Availability:
 
2811
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
2812
 *    CarbonLib:        in CarbonLib 1.1 and later
 
2813
 }
 
2814
const
 
2815
        kEventTextInputGetSelectedText = 6;
 
2816
 
 
2817
{
 
2818
 *  kEventClassTextInput / kEventTextInputUnicodeText
 
2819
 *  
 
2820
 *  Summary:
 
2821
 *    Used by input methods to provide original input text to the Text
 
2822
 *    Services Manager.
 
2823
 *  
 
2824
 *  Discussion:
 
2825
 *    This Unicode text event is produced only by input methods or
 
2826
 *    other text services, and is delivered to TSM via
 
2827
 *    SendTextInputEvent(). TSM never dispatches this event to the user
 
2828
 *    focus, so application handlers should NOT install handlers for
 
2829
 *    this event. Instead, TSM chains this event into any active
 
2830
 *    keyboard input method in order to prevent interference with
 
2831
 *    existing inline input sessions. The keyboard input method can
 
2832
 *    either insert the text into the inline session, or it may confirm
 
2833
 *    its session and return the UnicodeText event to TSM unhandled, in
 
2834
 *    which case TSM will convert the event into a UnicodeForKey event
 
2835
 *    (converting the Unicodes to Mac charCodes and synthesizing
 
2836
 *    information where needed) and finally dispatch the resulting
 
2837
 *    event to the user focus as usual.
 
2838
 *  
 
2839
 *  Mac OS X threading:
 
2840
 *    Not thread safe
 
2841
 *  
 
2842
 *  Parameters:
 
2843
 *    
 
2844
 *    --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
 
2845
 *          This parameter is provided by the input method originating
 
2846
 *          the event. (Required parameter)
 
2847
 *    
 
2848
 *    --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
 
2849
 *          The ScriptLanguageRecord associated with the text contained
 
2850
 *          in the event. This parameter is provided by the input
 
2851
 *          method originating the event. This parameter is optional
 
2852
 *          and may not be present in all instances of this event.
 
2853
 *    
 
2854
 *    --> kEventParamTextInputSendText (in, typeUnicodeText)
 
2855
 *          The Unicode characters produced by an input method. 
 
2856
 *          (Required Parameter)
 
2857
 *    
 
2858
 *    --> kEventParamTextInputSendTextServiceEncoding (in, typeUInt32)
 
2859
 *          The encoding associated with the text sent by an input
 
2860
 *          method. On MacOS X, this parameter is not commonly used
 
2861
 *          because all TSM input methods produce (and request)
 
2862
 *          Unicode, but if specified, this may be a Unicode variant
 
2863
 *          encoding. This parameter is optional and may not be present
 
2864
 *          in all instances of this event.
 
2865
 *    
 
2866
 *    --> kEventParamTextInputSendTextServiceMacEncoding (in, typeUInt32)
 
2867
 *          The Mac encoding (variant) associated with the text sent by
 
2868
 *          an input method, should TSM or an event handler need to
 
2869
 *          convert the Unicodes. This parameter is optional and may
 
2870
 *          not be present in all instances of this event.
 
2871
 *    
 
2872
 *    --> kEventParamTextInputSendGlyphInfoArray (in, typeGlyphInfoArray)
 
2873
 *          A TSMGlyphInfoArray structure in which an input method can
 
2874
 *          associate unencoded glyphs IDs and/or fonts with
 
2875
 *          (sub)ranges of text it produces.  The array elements
 
2876
 *          identify non-overlapping ranges of text and the glyph ID
 
2877
 *          (character collection is 0) such as in an OpenType font, or
 
2878
 *          the CID (collection is non-zero) such as in TrueType fonts.
 
2879
 *           If the glyphID itself is 0, only the font specified is to
 
2880
 *          be applied to the text range.  This is useful for
 
2881
 *          characters in Unicode private use area, such as Windings,
 
2882
 *          but note that this capability should be used with care
 
2883
 *          because changing the font of an input text stream can lead
 
2884
 *          to a confusing user interface. For more information, see
 
2885
 *          the Glyph Access protocol described in Technote TN2079.
 
2886
 *          This parameter is optional and may not be present in all
 
2887
 *          instances of this event.
 
2888
 *  
 
2889
 *  Availability:
 
2890
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
2891
 *    CarbonLib:        not available
 
2892
 }
 
2893
const
 
2894
        kEventTextInputUnicodeText = 7;
 
2895
 
 
2896
 
 
2897
{
 
2898
 *  kEventClassTextInput / kEventTextInputFilterText
 
2899
 *  
 
2900
 *  Summary:
 
2901
 *    Send text about to be inserted into the user focus to be filtered
 
2902
 *    first.
 
2903
 *  
 
2904
 *  Discussion:
 
2905
 *    Sent before any final-form text is sent to the user focus.  Final
 
2906
 *    form text includes text produced by a keyboard layout, Ink input
 
2907
 *    method, Character palette or any other TSM text service, and any
 
2908
 *    text being "confirmed" (or commited) from an inline input
 
2909
 *    session.  In the case of text confirmed from an inline input
 
2910
 *    session, TSM will take the resulting text buffer filtered by the
 
2911
 *    event handler and adjust all parameters in the
 
2912
 *    UpdateActiveInputArea event produced by the input method. The
 
2913
 *    text filtering action will thus be transparent to both the app's
 
2914
 *    UpdateActiveInputArea handler and the input method confirming the
 
2915
 *    text.
 
2916
 *  
 
2917
 *  Mac OS X threading:
 
2918
 *    Not thread safe
 
2919
 *  
 
2920
 *  Parameters:
 
2921
 *    
 
2922
 *    --> kEventParamTextInputSendRefCon (in, typeLongInteger)
 
2923
 *          TSM's SendTextInputEvent, called by an input method,
 
2924
 *          inserts this parameter before dispatching the event to the
 
2925
 *          user focus.  (Required Parameter)
 
2926
 *    
 
2927
 *    --> kEventParamTextInputSendText (in, typeUnicodeText)
 
2928
 *          The Unicode characters that are about to be sent to the
 
2929
 *          user focus, and need to be filtered.  (Required Parameter)
 
2930
 *    
 
2931
 *    <-- kEventParamTextInputReplyText (out, typeUnicodeText)
 
2932
 *          The filtered Unicode characters... may be a zero-size
 
2933
 *          parameter.  (Required Parameter)
 
2934
 *  
 
2935
 *  Result:
 
2936
 *    Return noErr to indicate that the text needing filtering has been
 
2937
 *    changed, otherwise return eventNotHandledErr.
 
2938
 *  
 
2939
 *  Availability:
 
2940
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
2941
 *    CarbonLib:        not available
 
2942
 }
 
2943
const
 
2944
        kEventTextInputFilterText = 14;
 
2945
 
 
2946
{--------------------------------------------------------------------------------------}
 
2947
{ Raw Keyboard Events                                                                  }
 
2948
{--------------------------------------------------------------------------------------}
 
2949
{
 
2950
    kEventClassKeyboard quick reference:
 
2951
    
 
2952
    kEventRawKeyDown                = 1,
 
2953
    kEventRawKeyRepeat              = 2,
 
2954
    kEventRawKeyUp                  = 3,
 
2955
    kEventRawKeyModifiersChanged    = 4,
 
2956
    kEventHotKeyPressed             = 5,
 
2957
    kEventHotKeyReleased            = 6
 
2958
);
 
2959
 
 
2960
|*!
 
2961
    @event          kEventRawKeyDown
 
2962
    @abstract       A key was pressed.
 
2963
    
 
2964
    @discussion     This is the lowest-level keyboard input event. When this event is sent, the keyboard
 
2965
                    input has not yet been processed by the Text Services Manager or passed to input methods.
 
2966
                    Usually, you should not handle this event, because doing so may interfere with input
 
2967
                    methods; instead, you should handle the kEventTextInputUnicodeForKeyEvent event, which
 
2968
                    is sent after input methods have handled the raw key event, and contains both Unicode
 
2969
                    and the original keyboard event.
 
2970
                    
 
2971
                    This event has a default handler on the application event target. The default handler
 
2972
                    calls the Text Services Manager to pass the event through to input methods. The default
 
2973
                    handler also implements certain standard keyboard equivalents, such as cmd-` for intra-
 
2974
                    process window rotation and the universal keyboard access equivalents for interprocess
 
2975
                    window rotation and document, floating, toolbar, and menubar keyboard focus.
 
2976
                    
 
2977
    @param          kEventParamKeyMacCharCodes
 
2978
                        The character generated by the key that was pressed. The character�s encoding
 
2979
                        is determined by the current keyboard script.
 
2980
                        
 
2981
    @param          kEventParamKeyCode
 
2982
                        The virtual keycode of the key that was pressed.
 
2983
                        
 
2984
    @param          kEventParamKeyModifiers
 
2985
                        The keyboard modifiers that were down when the key was pressed.
 
2986
                        
 
2987
    @param          kEventParamKeyboardType
 
2988
                        The type of keyboard on which the key was pressed.
 
2989
}
 
2990
{
 
2991
 *  kEventClassKeyboard / kEventRawKeyDown
 
2992
 *  
 
2993
 *  Mac OS X threading:
 
2994
 *    Not thread safe
 
2995
 *  
 
2996
 *  Availability:
 
2997
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
2998
 *    CarbonLib:        in CarbonLib 1.1 and later
 
2999
 }
 
3000
const
 
3001
        kEventRawKeyDown = 1;
 
3002
 
 
3003
{
 
3004
 *  kEventClassKeyboard / kEventRawKeyRepeat
 
3005
 *  
 
3006
 *  Summary:
 
3007
 *    Sent periodically as a key is held down by the user.
 
3008
 *  
 
3009
 *  Discussion:
 
3010
 *    Usually, you should not handle this event, because doing so may
 
3011
 *    interfere with input methods; instead, you should handle the
 
3012
 *    kEventTextInputUnicodeForKeyEvent event, which is sent after
 
3013
 *    input methods have handled the raw key event, and contains both
 
3014
 *    Unicode and the original keyboard event.
 
3015
 *  
 
3016
 *  Mac OS X threading:
 
3017
 *    Not thread safe
 
3018
 *  
 
3019
 *  Parameters:
 
3020
 *    
 
3021
 *    --> kEventParamKeyMacCharCodes (in, typeChar)
 
3022
 *          The character generated by the key that was pressed. The
 
3023
 *          character�s encoding is determined by the current keyboard
 
3024
 *          script.
 
3025
 *    
 
3026
 *    --> kEventParamKeyCode (in, typeUInt32)
 
3027
 *          The virtual keycode of the key that was pressed.
 
3028
 *    
 
3029
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3030
 *          The keyboard modifiers that were down when the key was
 
3031
 *          pressed.
 
3032
 *    
 
3033
 *    --> kEventParamKeyboardType (in, typeUInt32)
 
3034
 *          The type of keyboard on which the key was pressed.
 
3035
 *  
 
3036
 *  Availability:
 
3037
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3038
 *    CarbonLib:        in CarbonLib 1.1 and later
 
3039
 }
 
3040
const
 
3041
        kEventRawKeyRepeat = 2;
 
3042
 
 
3043
{
 
3044
 *  kEventClassKeyboard / kEventRawKeyUp
 
3045
 *  
 
3046
 *  Summary:
 
3047
 *    A key was released.
 
3048
 *  
 
3049
 *  Mac OS X threading:
 
3050
 *    Not thread safe
 
3051
 *  
 
3052
 *  Parameters:
 
3053
 *    
 
3054
 *    --> kEventParamKeyMacCharCodes (in, typeChar)
 
3055
 *          The character generated by the key that was released. The
 
3056
 *          character�s encoding is determined by the current keyboard
 
3057
 *          script.
 
3058
 *    
 
3059
 *    --> kEventParamKeyCode (in, typeUInt32)
 
3060
 *          The virtual keycode of the key that was released.
 
3061
 *    
 
3062
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3063
 *          The keyboard modifiers that were down when the key was
 
3064
 *          released.
 
3065
 *    
 
3066
 *    --> kEventParamKeyboardType (in, typeUInt32)
 
3067
 *          The type of keyboard on which the key was released.
 
3068
 *  
 
3069
 *  Availability:
 
3070
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3071
 *    CarbonLib:        in CarbonLib 1.1 and later
 
3072
 }
 
3073
const
 
3074
        kEventRawKeyUp = 3;
 
3075
 
 
3076
{
 
3077
 *  kEventClassKeyboard / kEventRawKeyModifiersChanged
 
3078
 *  
 
3079
 *  Summary:
 
3080
 *    The keyboard modifiers have changed.
 
3081
 *  
 
3082
 *  Discussion:
 
3083
 *    This event is sent to all handlers registered for it.
 
3084
 *  
 
3085
 *  Mac OS X threading:
 
3086
 *    Not thread safe
 
3087
 *  
 
3088
 *  Parameters:
 
3089
 *    
 
3090
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3091
 *          The keyboard modifiers that are now pressed. This is the
 
3092
 *          current state of the modifiers, not a delta state; it
 
3093
 *          includes modifiers that were pressed before the latest
 
3094
 *          change to modifier state.
 
3095
 *  
 
3096
 *  Availability:
 
3097
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3098
 *    CarbonLib:        in CarbonLib 1.1 and later
 
3099
 }
 
3100
const
 
3101
        kEventRawKeyModifiersChanged = 4;
 
3102
 
 
3103
{
 
3104
 *  kEventClassKeyboard / kEventHotKeyPressed
 
3105
 *  
 
3106
 *  Summary:
 
3107
 *    A registered hot key was pressed.
 
3108
 *  
 
3109
 *  Mac OS X threading:
 
3110
 *    Not thread safe
 
3111
 *  
 
3112
 *  Parameters:
 
3113
 *    
 
3114
 *    --> kEventParamDirectObject (in, typeEventHotKeyID)
 
3115
 *          The ID of the hot key that was pressed.
 
3116
 *  
 
3117
 *  Availability:
 
3118
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3119
 *    CarbonLib:        in CarbonLib 1.3 and later
 
3120
 }
 
3121
const
 
3122
        kEventHotKeyPressed = 5;
 
3123
 
 
3124
{
 
3125
 *  kEventClassKeyboard / kEventHotKeyReleased
 
3126
 *  
 
3127
 *  Summary:
 
3128
 *    A registered hot key was released.
 
3129
 *  
 
3130
 *  Mac OS X threading:
 
3131
 *    Not thread safe
 
3132
 *  
 
3133
 *  Parameters:
 
3134
 *    
 
3135
 *    --> kEventParamDirectObject (in, typeEventHotKeyID)
 
3136
 *          The ID of the hot key that was released.
 
3137
 *  
 
3138
 *  Availability:
 
3139
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3140
 *    CarbonLib:        in CarbonLib 1.3 and later
 
3141
 }
 
3142
const
 
3143
        kEventHotKeyReleased = 6;
 
3144
 
 
3145
 
 
3146
{
 
3147
 *  Summary:
 
3148
 *    Key modifier change event bits and masks
 
3149
 *  
 
3150
 *  Discussion:
 
3151
 *    From bit 8, cmdKeyBit, to bit 15, rightControlKeyBit, are
 
3152
 *    compatible with Event Manager modifiers.
 
3153
 }
 
3154
const
 
3155
{
 
3156
   * The Num Lock state bit (Mac OS X only).
 
3157
   }
 
3158
        kEventKeyModifierNumLockBit = 16;   { Num Lock is on? (Mac OS X only)}
 
3159
 
 
3160
  {
 
3161
   * The Fn key state bit (Mac OS X only).
 
3162
   }
 
3163
        kEventKeyModifierFnBit = 17;    { Fn key is down? (Mac OS X only)}
 
3164
 
 
3165
const
 
3166
        kEventKeyModifierNumLockMask = 1 shl kEventKeyModifierNumLockBit;
 
3167
        kEventKeyModifierFnMask = 1 shl kEventKeyModifierFnBit;
 
3168
 
 
3169
 
 
3170
{--------------------------------------------------------------------------------------}
 
3171
{ Application Events                                                                   }
 
3172
{--------------------------------------------------------------------------------------}
 
3173
 
 
3174
{
 
3175
    kEventClassApplication quick reference:
 
3176
    
 
3177
    kEventAppActivated                      = 1,
 
3178
    kEventAppDeactivated                    = 2,
 
3179
    kEventAppQuit                           = 3,
 
3180
    kEventAppLaunchNotification             = 4,
 
3181
    kEventAppLaunched                       = 5,
 
3182
    kEventAppTerminated                     = 6,
 
3183
    kEventAppFrontSwitched                  = 7,
 
3184
    
 
3185
    kEventAppFocusMenuBar                   = 8,
 
3186
    kEventAppFocusNextDocumentWindow        = 9,
 
3187
    kEventAppFocusNextFloatingWindow        = 10,
 
3188
    kEventAppFocusToolbar                   = 11,
 
3189
    kEventAppFocusDrawer                    = 12,
 
3190
    
 
3191
    kEventAppGetDockTileMenu                = 20,
 
3192
    
 
3193
    kEventAppIsEventInInstantMouser         = 104,
 
3194
    
 
3195
    kEventAppHidden                         = 107,
 
3196
    kEventAppShown                          = 108,
 
3197
    kEventAppSystemUIModeChanged            = 109,
 
3198
    kEventAppAvailableWindowBoundsChanged   = 110,
 
3199
    kEventAppActiveWindowChanged            = 111
 
3200
}
 
3201
 
 
3202
{
 
3203
 *  kEventClassApplication / kEventAppActivated
 
3204
 *  
 
3205
 *  Summary:
 
3206
 *    This application has been activated.
 
3207
 *  
 
3208
 *  Discussion:
 
3209
 *    This event is sent to all handlers registered for it.
 
3210
 *  
 
3211
 *  Mac OS X threading:
 
3212
 *    Not thread safe
 
3213
 *  
 
3214
 *  Parameters:
 
3215
 *    
 
3216
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
3217
 *          This parameter is present if a click on an application
 
3218
 *          window was the cause of the app activation; it contains the
 
3219
 *          window that was clicked. This parameter is not provided if
 
3220
 *          the application was activated for some other reason.
 
3221
 *  
 
3222
 *  Availability:
 
3223
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3224
 *    CarbonLib:        in CarbonLib 1.1 and later
 
3225
 }
 
3226
const
 
3227
        kEventAppActivated = 1;
 
3228
 
 
3229
{
 
3230
 *  kEventClassApplication / kEventAppDeactivated
 
3231
 *  
 
3232
 *  Summary:
 
3233
 *    This application has been deactivated.
 
3234
 *  
 
3235
 *  Discussion:
 
3236
 *    This event is sent to all handlers registered for it.
 
3237
 *  
 
3238
 *  Mac OS X threading:
 
3239
 *    Not thread safe
 
3240
 *  
 
3241
 *  Availability:
 
3242
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3243
 *    CarbonLib:        in CarbonLib 1.1 and later
 
3244
 }
 
3245
const
 
3246
        kEventAppDeactivated = 2;
 
3247
 
 
3248
{
 
3249
 *  kEventClassApplication / kEventAppQuit
 
3250
 *  
 
3251
 *  Summary:
 
3252
 *    A request to quit. Sent by QuitApplicationEventLoop to the
 
3253
 *    application target.
 
3254
 *  
 
3255
 *  Discussion:
 
3256
 *    The RunApplicationEventLoop API installs a default handler on the
 
3257
 *    application target for this event while the event loop is
 
3258
 *    running. The handler is removed before RunApplicationEventLoop
 
3259
 *    returns.
 
3260
 *    
 
3261
 *    The event handler installed by RunApplicationEventLoop will cause
 
3262
 *    RunApplicationEventLoop to exit. Most applications will not need
 
3263
 *    to handle this event; instead, an application should install an
 
3264
 *    AppleEvent handler for the kAEQuitApplication event handler if it
 
3265
 *    needs to check for unsaved documents or do other cleanup before
 
3266
 *    quitting.
 
3267
 *  
 
3268
 *  Mac OS X threading:
 
3269
 *    Not thread safe
 
3270
 *  
 
3271
 *  Availability:
 
3272
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3273
 *    CarbonLib:        in CarbonLib 1.1 and later
 
3274
 }
 
3275
const
 
3276
        kEventAppQuit = 3;
 
3277
 
 
3278
{
 
3279
 *  kEventClassApplication / kEventAppLaunchNotification
 
3280
 *  
 
3281
 *  Summary:
 
3282
 *    Notification that an asynchronous process launch has completed.
 
3283
 *  
 
3284
 *  Discussion:
 
3285
 *    This event is received when you use LaunchServices to launch a
 
3286
 *    process asynchronously. Your application only receives this event
 
3287
 *    for processes that you launch; it is not sent for process
 
3288
 *    launches from other applications (such as the Finder).
 
3289
 *  
 
3290
 *  Mac OS X threading:
 
3291
 *    Not thread safe
 
3292
 *  
 
3293
 *  Parameters:
 
3294
 *    
 
3295
 *    --> kEventParamProcessID (in, typeProcessSerialNumber)
 
3296
 *          The ProcessSerialNumber of the process that was launched.
 
3297
 *    
 
3298
 *    --> kEventParamLaunchRefCon (in, typeUInt32)
 
3299
 *          Contains the value in the asyncRefCon field of the LSLaunch
 
3300
 *          structure that was used to launch the process.
 
3301
 *    
 
3302
 *    --> kEventParamLaunchErr (in, typeOSStatus)
 
3303
 *          A result code indicating success or failure of the launch.
 
3304
 *  
 
3305
 *  Availability:
 
3306
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3307
 *    CarbonLib:        not available
 
3308
 }
 
3309
const
 
3310
        kEventAppLaunchNotification = 4;
 
3311
 
 
3312
{
 
3313
 *  kEventClassApplication / kEventAppLaunched
 
3314
 *  
 
3315
 *  Summary:
 
3316
 *    Another app was launched.
 
3317
 *  
 
3318
 *  Discussion:
 
3319
 *    This event is sent to all handlers registered for it.
 
3320
 *  
 
3321
 *  Mac OS X threading:
 
3322
 *    Not thread safe
 
3323
 *  
 
3324
 *  Parameters:
 
3325
 *    
 
3326
 *    --> kEventParamProcessID (in, typeProcessSerialNumber)
 
3327
 *          The ProcessSerialNumber of the process that was launched.
 
3328
 *  
 
3329
 *  Availability:
 
3330
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3331
 *    CarbonLib:        in CarbonLib 1.3.1 and later
 
3332
 }
 
3333
const
 
3334
        kEventAppLaunched = 5;
 
3335
 
 
3336
{
 
3337
 *  kEventClassApplication / kEventAppTerminated
 
3338
 *  
 
3339
 *  Summary:
 
3340
 *    Another app terminated.
 
3341
 *  
 
3342
 *  Discussion:
 
3343
 *    This event is sent to all handlers registered for it.
 
3344
 *  
 
3345
 *  Mac OS X threading:
 
3346
 *    Not thread safe
 
3347
 *  
 
3348
 *  Parameters:
 
3349
 *    
 
3350
 *    --> kEventParamProcessID (in, typeProcessSerialNumber)
 
3351
 *          The ProcessSerialNumber of the process that terminated.
 
3352
 *  
 
3353
 *  Availability:
 
3354
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3355
 *    CarbonLib:        in CarbonLib 1.3.1 and later
 
3356
 }
 
3357
const
 
3358
        kEventAppTerminated = 6;
 
3359
 
 
3360
{
 
3361
 *  kEventClassApplication / kEventAppFrontSwitched
 
3362
 *  
 
3363
 *  Summary:
 
3364
 *    The front (active) application has changed.
 
3365
 *  
 
3366
 *  Discussion:
 
3367
 *    This event is sent to all handlers registered for it.
 
3368
 *  
 
3369
 *  Mac OS X threading:
 
3370
 *    Not thread safe
 
3371
 *  
 
3372
 *  Parameters:
 
3373
 *    
 
3374
 *    --> kEventParamProcessID (in, typeProcessSerialNumber)
 
3375
 *          The ProcessSerialNumber of the process that became
 
3376
 *          frontmost.
 
3377
 *  
 
3378
 *  Availability:
 
3379
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3380
 *    CarbonLib:        in CarbonLib 1.3.1 and later
 
3381
 }
 
3382
const
 
3383
        kEventAppFrontSwitched = 7;
 
3384
 
 
3385
{
 
3386
 *  kEventClassApplication / kEventAppHidden
 
3387
 *  
 
3388
 *  Summary:
 
3389
 *    The current application has been hidden.
 
3390
 *  
 
3391
 *  Discussion:
 
3392
 *    This event is sent to all handlers registered for it.
 
3393
 *  
 
3394
 *  Mac OS X threading:
 
3395
 *    Not thread safe
 
3396
 *  
 
3397
 *  Availability:
 
3398
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3399
 *    CarbonLib:        not available
 
3400
 }
 
3401
const
 
3402
        kEventAppHidden = 107;
 
3403
 
 
3404
{
 
3405
 *  kEventClassApplication / kEventAppShown
 
3406
 *  
 
3407
 *  Summary:
 
3408
 *    The current application has been shown.
 
3409
 *  
 
3410
 *  Discussion:
 
3411
 *    This event is sent to all handlers registered for it.
 
3412
 *  
 
3413
 *  Mac OS X threading:
 
3414
 *    Not thread safe
 
3415
 *  
 
3416
 *  Availability:
 
3417
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3418
 *    CarbonLib:        not available
 
3419
 }
 
3420
const
 
3421
        kEventAppShown = 108;
 
3422
 
 
3423
{
 
3424
 *  kEventClassApplication / kEventAppSystemUIModeChanged
 
3425
 *  
 
3426
 *  Summary:
 
3427
 *    The system UI mode of the frontmost application has changed.
 
3428
 *  
 
3429
 *  Discussion:
 
3430
 *    This event is sent to all handlers registered for it.
 
3431
 *  
 
3432
 *  Mac OS X threading:
 
3433
 *    Not thread safe
 
3434
 *  
 
3435
 *  Parameters:
 
3436
 *    
 
3437
 *    --> kEventParamSystemUIMode (in, typeUInt32)
 
3438
 *          The new system UI mode. Contains a kUIMode constant from
 
3439
 *          MacApplication.h.
 
3440
 *  
 
3441
 *  Availability:
 
3442
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3443
 *    CarbonLib:        not available
 
3444
 }
 
3445
const
 
3446
        kEventAppSystemUIModeChanged = 109;
 
3447
 
 
3448
 
 
3449
const
 
3450
{
 
3451
   * Indicates that a device�s available window positioning bounds have
 
3452
   * changed because of a change in Dock position or size.
 
3453
   }
 
3454
        kAvailBoundsChangedForDock = 1 shl 0;
 
3455
 
 
3456
  {
 
3457
   * Indicates that a device�s available window positioning bounds have
 
3458
   * changed because of a change in display configuration.
 
3459
   }
 
3460
        kAvailBoundsChangedForDisplay = 1 shl 1;
 
3461
 
 
3462
{
 
3463
 *  kEventClassApplication / kEventAppAvailableWindowBoundsChanged
 
3464
 *  
 
3465
 *  Summary:
 
3466
 *    The available window positioning bounds have changed.
 
3467
 *  
 
3468
 *  Discussion:
 
3469
 *    This event is sent to all handlers registered for it.
 
3470
 *    
 
3471
 *    This event is currently sent in two circumstances: when the Dock
 
3472
 *    has changed position or size, and when the display configuration
 
3473
 *    has changed. A separate copy of this event is sent to each
 
3474
 *    affected GDevice.
 
3475
 *    
 
3476
 *    All applications have a default handler installed on the
 
3477
 *    application target that responds to this event by sending
 
3478
 *    kEventWindowConstrain events to each window on the specified
 
3479
 *    device. It is not possible to prevent this handler from running,
 
3480
 *    since this event is sent to all registered handlers. However,
 
3481
 *    applications that would like to do their own window layout may
 
3482
 *    install a handler for this event, and also set the
 
3483
 *    kWindowNoConstrainAttribute on their windows, which will cause
 
3484
 *    the basic window handler to ignore kEventWindowConstrain. An
 
3485
 *    application may also install its own kEventWindowConstrain
 
3486
 *    handler and selectively return a value other than
 
3487
 *    eventNotHandledErr, which will prevent the event from being sent
 
3488
 *    to the basic window handler.
 
3489
 *  
 
3490
 *  Mac OS X threading:
 
3491
 *    Not thread safe
 
3492
 *  
 
3493
 *  Parameters:
 
3494
 *    
 
3495
 *    --> kEventParamGDevice (in, typeGDHandle)
 
3496
 *          The device whose available positioning bounds have changed.
 
3497
 *    
 
3498
 *    --> kEventParamReason (in, typeUInt32)
 
3499
 *          The reasons why the available positioning bounds have
 
3500
 *          changed. This parameter contains one or more of the
 
3501
 *          kAvailBoundsChangedFor constants.
 
3502
 *    
 
3503
 *    --> kEventParamTransactionID (in, typeUInt32)
 
3504
 *          An integer which is the same for all instances of this
 
3505
 *          event that are produced by the same configuration change.
 
3506
 *          For example, if multiple displays are attached, then this
 
3507
 *          event is sent once for each display after a display
 
3508
 *          configuration change; however, the transaction ID parameter
 
3509
 *          will the same for each event, so a handler for this event
 
3510
 *          can choose to ignore all but the first event by correlating
 
3511
 *          the the transaction IDs.
 
3512
 *    
 
3513
 *    --> kEventParamPreviousDockRect (in, typeHIRect)
 
3514
 *          The Dock�s previous bounds, in global coordinates. This
 
3515
 *          parameter is optional and may not be present in all
 
3516
 *          instances of this event. It is present in events with a
 
3517
 *          kEventParamReason parameter containing
 
3518
 *          kAvailBoundsChangedForDock.
 
3519
 *    
 
3520
 *    --> kEventParamPreviousDockDevice (in, typeGDHandle)
 
3521
 *          The GDevice on which the Dock was previously positioned.
 
3522
 *          This parameter is optional and may not be present in all
 
3523
 *          instances of this event. It is present in events with a
 
3524
 *          kEventParamReason parameter containing
 
3525
 *          kAvailBoundsChangedForDock.
 
3526
 *    
 
3527
 *    --> kEventParamCurrentDockRect (in, typeHIRect)
 
3528
 *          The Dock�s current bounds, in global coordinates. This
 
3529
 *          parameter is optional and may not be present in all
 
3530
 *          instances of this event. It is present in events with a
 
3531
 *          kEventParamReason parameter containing
 
3532
 *          kAvailBoundsChangedForDock.
 
3533
 *    
 
3534
 *    --> kEventParamCurrentDockDevice (in, typeGDHandle)
 
3535
 *          The GDevice on which the Dock is currently positioned. This
 
3536
 *          parameter is optional and may not be present in all
 
3537
 *          instances of this event. It is present in events with a
 
3538
 *          kEventParamReason parameter containing
 
3539
 *          kAvailBoundsChangedForDock.
 
3540
 *    
 
3541
 *    --> kEventParamRgnHandle (in, typeQDRgnHandle)
 
3542
 *          The GrayRgn before the configuration change. This parameter
 
3543
 *          is optional and may not be present in all instances of this
 
3544
 *          event. It is present in events with a kEventParamReason
 
3545
 *          parameter containing kAvailBoundsChangedForDisplay. To get
 
3546
 *          the GrayRgn after the configuration change, just call the
 
3547
 *          GetGrayRgn API.
 
3548
 *  
 
3549
 *  Availability:
 
3550
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
3551
 *    CarbonLib:        not available
 
3552
 }
 
3553
const
 
3554
        kEventAppAvailableWindowBoundsChanged = 110;
 
3555
 
 
3556
{
 
3557
 *  kEventClassApplication / kEventAppActiveWindowChanged
 
3558
 *  
 
3559
 *  Summary:
 
3560
 *    Notification that the active window in the current process has
 
3561
 *    changed.
 
3562
 *  
 
3563
 *  Discussion:
 
3564
 *    The Window Manager internally tracks the active window, which is
 
3565
 *    the window that is returned by ActiveNonFloatingWindow. When
 
3566
 *    SelectWindow is called on a window, that window is made the new
 
3567
 *    active window. At that time, the Window Manager also posts a
 
3568
 *    kEventAppActiveWindowChanged event to the main event
 
3569
 *    queue.
 
3570
 *    
 
3571
 *    The ActivateWindow API also causes this event to be
 
3572
 *    posted.
 
3573
 *    
 
3574
 *    If more than one window is activated sequentially before the
 
3575
 *    event loop is run, only a single kEventAppActiveWindowChanged
 
3576
 *    event will be left in the event queue, its PreviousActiveWindow
 
3577
 *    parameter will be the window that was originally active, and its
 
3578
 *    CurrentActiveWindow parameter will be the window that was finally
 
3579
 *    active.
 
3580
 *    
 
3581
 *    This event only reports changes to the current process. It does
 
3582
 *    not report activation changes in other processes.
 
3583
 *    <BR> This event is sent to all handlers registered for it.
 
3584
 *  
 
3585
 *  Mac OS X threading:
 
3586
 *    Not thread safe
 
3587
 *  
 
3588
 *  Parameters:
 
3589
 *    
 
3590
 *    --> kEventParamPreviousWindow (in, typeWindowRef)
 
3591
 *          The window that was previously active.
 
3592
 *    
 
3593
 *    --> kEventParamCurrentWindow (in, typeWindowRef)
 
3594
 *          The window that is now active.
 
3595
 *  
 
3596
 *  Availability:
 
3597
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
3598
 *    CarbonLib:        not available
 
3599
 }
 
3600
const
 
3601
        kEventAppActiveWindowChanged = 111;
 
3602
 
 
3603
{
 
3604
 *  kEventClassApplication / kEventAppGetDockTileMenu
 
3605
 *  
 
3606
 *  Summary:
 
3607
 *    A request for a menu to be displayed by the application�s dock
 
3608
 *    tile.
 
3609
 *  
 
3610
 *  Discussion:
 
3611
 *    This event has a default handler on the application target. The
 
3612
 *    default handler will return the menu, if any, that was provided
 
3613
 *    by the SetApplicationDockTileMenu API. The sender of this event
 
3614
 *    will release the menu after the Dock has displayed it, so if you
 
3615
 *    return a permanently allocated MenuRef, you should call
 
3616
 *    RetainMenu on it before returning from your event handler. For
 
3617
 *    most applications, it will be easier to use the
 
3618
 *    SetApplicationDockTileMenu API directly rather than installing a
 
3619
 *    handler for this event.
 
3620
 *  
 
3621
 *  Mac OS X threading:
 
3622
 *    Not thread safe
 
3623
 *  
 
3624
 *  Parameters:
 
3625
 *    
 
3626
 *    <-- kEventParamMenuRef (out, typeMenuRef)
 
3627
 *          A MenuRef to be displayed in the Dock is returned by the
 
3628
 *          handler in this parameter.
 
3629
 *  
 
3630
 *  Availability:
 
3631
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
3632
 *    CarbonLib:        not available
 
3633
 }
 
3634
const
 
3635
        kEventAppGetDockTileMenu = 20;
 
3636
 
 
3637
{
 
3638
 *  kEventClassApplication / kEventAppFocusMenuBar
 
3639
 *  
 
3640
 *  Summary:
 
3641
 *    The user has requested keyboard focus on the menubar.
 
3642
 *  
 
3643
 *  Discussion:
 
3644
 *    This event is handled automatically by the default application
 
3645
 *    event handler. A handler for this event should switch the
 
3646
 *    keyboard focus to the menubar. Applications may install handlers
 
3647
 *    for this event to track keyboard focus, but should not prevent
 
3648
 *    the event from being handled by the default application handler.
 
3649
 *  
 
3650
 *  Mac OS X threading:
 
3651
 *    Not thread safe
 
3652
 *  
 
3653
 *  Parameters:
 
3654
 *    
 
3655
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3656
 *          The keyboard modifiers that were pressed when the user
 
3657
 *          requested a focus switch.
 
3658
 *  
 
3659
 *  Availability:
 
3660
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3661
 *    CarbonLib:        not available
 
3662
 }
 
3663
const
 
3664
        kEventAppFocusMenuBar = 8;
 
3665
 
 
3666
{
 
3667
 *  kEventClassApplication / kEventAppFocusNextDocumentWindow
 
3668
 *  
 
3669
 *  Summary:
 
3670
 *    The user has requested keyboard focus on a document window.
 
3671
 *  
 
3672
 *  Discussion:
 
3673
 *    This event is handled automatically by the default application
 
3674
 *    event handler. A handler for this event should cycle to the next
 
3675
 *    (or previous, if the shift key is down) document window, or if
 
3676
 *    there are no more windows to activate in the application�s window
 
3677
 *    list, to the next or previous document window in the next or
 
3678
 *    previous process. User focus (see SetUserFocusWindow) should be
 
3679
 *    applied to the new front document window. If something other than
 
3680
 *    a document window has the focus at the time you receive this
 
3681
 *    event, the frontmost document window should be given the user
 
3682
 *    focus instead, and no z-order change should be made.
 
3683
 *    Additionally, the keyboard focus should be moved to the main
 
3684
 *    control in the newly focused window if no keyboard focus exists
 
3685
 *    within the window.
 
3686
 *    
 
3687
 *    A handler for this event should never override it entirely; if
 
3688
 *    necessary, it should only check if the user focus is somewhere
 
3689
 *    other than a document window, and if so, set the focus on the
 
3690
 *    active document window. If the focus is already on a document
 
3691
 *    window, a handler for this event should always return
 
3692
 *    eventNotHandledErr so that the default handler can rotate to the
 
3693
 *    next window across all processes.
 
3694
 *  
 
3695
 *  Mac OS X threading:
 
3696
 *    Not thread safe
 
3697
 *  
 
3698
 *  Parameters:
 
3699
 *    
 
3700
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3701
 *          The keyboard modifiers that were pressed when the user
 
3702
 *          requested a focus switch.
 
3703
 *  
 
3704
 *  Availability:
 
3705
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3706
 *    CarbonLib:        not available
 
3707
 }
 
3708
const
 
3709
        kEventAppFocusNextDocumentWindow = 9;
 
3710
 
 
3711
{
 
3712
 *  kEventClassApplication / kEventAppFocusNextFloatingWindow
 
3713
 *  
 
3714
 *  Summary:
 
3715
 *    The user has requested keyboard focus on a floating window.
 
3716
 *  
 
3717
 *  Discussion:
 
3718
 *    This event is handled automatically by the default application
 
3719
 *    event handler. A handler for this event should cycle to the next
 
3720
 *    (or previous, if the shift key is down) floating window in the
 
3721
 *    application. User focus (see SetUserFocusWindow) should be
 
3722
 *    applied to the new front floating window. If something other than
 
3723
 *    a floating window has the focus at the time you receive this
 
3724
 *    event, the frontmost floating window should be given the user
 
3725
 *    focus instead, and no z-order change should be made.
 
3726
 *    Additionally, the keyboard focus should be moved to the main
 
3727
 *    control in the newly focused window if no keyboard focus exists
 
3728
 *    within the window. The default handler sends a
 
3729
 *    kEventCommandProcess event containing
 
3730
 *    kHICommandRotateFloatingWindowsForward/Backward when it detects
 
3731
 *    that floating windows should be cycled.
 
3732
 *  
 
3733
 *  Mac OS X threading:
 
3734
 *    Not thread safe
 
3735
 *  
 
3736
 *  Parameters:
 
3737
 *    
 
3738
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3739
 *          The keyboard modifiers that were pressed when the user
 
3740
 *          requested a focus switch.
 
3741
 *  
 
3742
 *  Availability:
 
3743
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3744
 *    CarbonLib:        not available
 
3745
 }
 
3746
const
 
3747
        kEventAppFocusNextFloatingWindow = 10;
 
3748
 
 
3749
{
 
3750
 *  kEventClassApplication / kEventAppFocusToolbar
 
3751
 *  
 
3752
 *  Summary:
 
3753
 *    The user has requested keyboard focus on the toolbar in the
 
3754
 *    focused window.
 
3755
 *  
 
3756
 *  Discussion:
 
3757
 *    For windows that use the standard HIToolbar control, this event
 
3758
 *    is handled automatically by the default application event
 
3759
 *    handler. A handler for this event should put focus on the first
 
3760
 *    control in the toolbar in the focused window, if a toolbar is
 
3761
 *    present.
 
3762
 *  
 
3763
 *  Mac OS X threading:
 
3764
 *    Not thread safe
 
3765
 *  
 
3766
 *  Parameters:
 
3767
 *    
 
3768
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3769
 *          The keyboard modifiers that were pressed when the user
 
3770
 *          requested a focus switch.
 
3771
 *  
 
3772
 *  Availability:
 
3773
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3774
 *    CarbonLib:        not available
 
3775
 }
 
3776
const
 
3777
        kEventAppFocusToolbar = 11;
 
3778
 
 
3779
{
 
3780
 *  kEventClassApplication / kEventAppFocusDrawer
 
3781
 *  
 
3782
 *  Summary:
 
3783
 *    The user has requested keyboard focus on the drawer in the
 
3784
 *    focused window.
 
3785
 *  
 
3786
 *  Discussion:
 
3787
 *    This event is handled automatically by the default application
 
3788
 *    event handler. A handler for this event should put focus on the
 
3789
 *    first control in the drawer in the focused window, if a drawer is
 
3790
 *    present. If multiple drawers are present, focus is moved in
 
3791
 *    clockwise order from one drawer to the next, starting with the
 
3792
 *    top drawer, if any. If the modifiers parameter contains the shift
 
3793
 *    key, then focus should be moved in reverse (counterclockwise)
 
3794
 *    order.
 
3795
 *  
 
3796
 *  Mac OS X threading:
 
3797
 *    Not thread safe
 
3798
 *  
 
3799
 *  Parameters:
 
3800
 *    
 
3801
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
3802
 *          The keyboard modifiers that were pressed when the user
 
3803
 *          requested a focus switch.
 
3804
 *  
 
3805
 *  Availability:
 
3806
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
3807
 *    CarbonLib:        not available
 
3808
 }
 
3809
const
 
3810
        kEventAppFocusDrawer = 12;
 
3811
 
 
3812
{
 
3813
 *  kEventClassApplication / kEventAppIsEventInInstantMouser
 
3814
 *  
 
3815
 *  Summary:
 
3816
 *    Sent when the system needs to determine if the given event's
 
3817
 *    global mouse location is over an "instant mousing" area. An
 
3818
 *    instant mousing area is an area where a mouse down should not
 
3819
 *    generate ink, but should only be interpreted as a click.
 
3820
 *  
 
3821
 *  Mac OS X threading:
 
3822
 *    Not thread safe
 
3823
 *  
 
3824
 *  Parameters:
 
3825
 *    
 
3826
 *    --> kEventParamEventRef (in, typeEventRef)
 
3827
 *          The Event to check.
 
3828
 *    
 
3829
 *    <-- kEventParamIsInInstantMouser (out, typeBoolean)
 
3830
 *          True if event was in an "instant mousing" area, false
 
3831
 *          otherwise.
 
3832
 *  
 
3833
 *  Availability:
 
3834
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
3835
 *    CarbonLib:        not available
 
3836
 }
 
3837
const
 
3838
        kEventAppIsEventInInstantMouser = 104;
 
3839
 
 
3840
 
 
3841
{--------------------------------------------------------------------------------------}
 
3842
{  Apple Events                                                                        }
 
3843
{--------------------------------------------------------------------------------------}
 
3844
{
 
3845
    kEventClassAppleEvent quick reference:
 
3846
 
 
3847
    kEventAppleEvent            = 1
 
3848
}
 
3849
{
 
3850
 *  kEventClassAppleEvent / kEventAppleEvent
 
3851
 *  
 
3852
 *  Summary:
 
3853
 *    Sent when a high-level event is received.
 
3854
 *  
 
3855
 *  Discussion:
 
3856
 *    The RunApplicationEventLoop API installs a default handler on the
 
3857
 *    application target for this event while the event loop is
 
3858
 *    running. The handler is removed before RunApplicationEventLoop
 
3859
 *    returns.
 
3860
 *    
 
3861
 *    The handler installed by RunApplicationEventLoop will call
 
3862
 *    AEProcessAppleEvent.
 
3863
 *    
 
3864
 *    It is not possible to get the AppleEvent itself from this Carbon
 
3865
 *    event; only its event class and kind are available. To inspect
 
3866
 *    the AppleEvent parameters, the event must actually be dispatched
 
3867
 *    using AEProcessAppleEvent.
 
3868
 *    
 
3869
 *    If you need to handle this Carbon event yourself, the necessary
 
3870
 *    steps are: (1) remove the Carbon event from the queue. The
 
3871
 *    AppleEvent requires some special preparation before it can be
 
3872
 *    processed, and this preparation only occurs when the event is
 
3873
 *    dequeued. (2) Use ConvertEventRefToEventRecord to get an
 
3874
 *    EventRecord from the Carbon event. (3) Call AEProcessAppleEvent
 
3875
 *    on the EventRecord.
 
3876
 *  
 
3877
 *  Mac OS X threading:
 
3878
 *    Not thread safe
 
3879
 *  
 
3880
 *  Parameters:
 
3881
 *    
 
3882
 *    --> kEventParamAEEventClass (in, typeType)
 
3883
 *          The event class of the Apple event.
 
3884
 *    
 
3885
 *    --> kEventParamAEEventID (in, typeType)
 
3886
 *          The event ID of the Apple event.
 
3887
 *  
 
3888
 *  Availability:
 
3889
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
3890
 *    CarbonLib:        in CarbonLib 1.1 and later
 
3891
 }
 
3892
const
 
3893
        kEventAppleEvent = 1;
 
3894
 
 
3895
{--------------------------------------------------------------------------------------}
 
3896
{  Window Events                                                                       }
 
3897
{--------------------------------------------------------------------------------------}
 
3898
{
 
3899
    kEventClassWindow quick reference:
 
3900
    
 
3901
    -- window refresh events --
 
3902
    
 
3903
    kEventWindowUpdate                  = 1,
 
3904
    kEventWindowDrawContent             = 2,
 
3905
    
 
3906
    -- window activation events --
 
3907
    
 
3908
    kEventWindowActivated               = 5,
 
3909
    kEventWindowDeactivated             = 6,
 
3910
    kEventWindowHandleActivate          = 91,
 
3911
    kEventWindowHandleDeactivate        = 92,
 
3912
    kEventWindowGetClickActivation      = 7,
 
3913
    kEventWindowGetClickModality        = 8,
 
3914
    
 
3915
    -- window state change events --
 
3916
    
 
3917
    kEventWindowShowing                 = 22,
 
3918
    kEventWindowHiding                  = 23,
 
3919
    kEventWindowShown                   = 24,
 
3920
    kEventWindowHidden                  = 25,
 
3921
    kEventWindowCollapsing              = 86,
 
3922
    kEventWindowCollapsed               = 67,
 
3923
    kEventWindowExpanding               = 87,
 
3924
    kEventWindowExpanded                = 70,
 
3925
    kEventWindowZoomed                  = 76,
 
3926
    kEventWindowBoundsChanging          = 26,
 
3927
    kEventWindowBoundsChanged           = 27,
 
3928
    kEventWindowResizeStarted           = 28,
 
3929
    kEventWindowResizeCompleted         = 29,
 
3930
    kEventWindowDragStarted             = 30,
 
3931
    kEventWindowDragCompleted           = 31,
 
3932
    kEventWindowClosed                  = 73,
 
3933
    kEventWindowTransitionStarted       = 88,
 
3934
    kEventWindowTransitionCompleted     = 89,
 
3935
    
 
3936
    -- window click events --
 
3937
    
 
3938
    kEventWindowClickDragRgn            = 32,
 
3939
    kEventWindowClickResizeRgn          = 33,
 
3940
    kEventWindowClickCollapseRgn        = 34,
 
3941
    kEventWindowClickCloseRgn           = 35,
 
3942
    kEventWindowClickZoomRgn            = 36,
 
3943
    kEventWindowClickContentRgn         = 37,
 
3944
    kEventWindowClickProxyIconRgn       = 38,
 
3945
    kEventWindowClickToolbarButtonRgn   = 41,
 
3946
    kEventWindowClickStructureRgn       = 42,
 
3947
 
 
3948
    -- window cursor change events --
 
3949
 
 
3950
    kEventWindowCursorChange            = 40,
 
3951
 
 
3952
    -- window action events --
 
3953
    
 
3954
    kEventWindowCollapse                = 66,
 
3955
%%  kEventWindowCollapsed               = 67,
 
3956
    kEventWindowCollapseAll             = 68,
 
3957
    kEventWindowExpand                  = 69,
 
3958
%%  kEventWindowExpanded                = 70,
 
3959
    kEventWindowExpandAll               = 71,
 
3960
    kEventWindowClose                   = 72,
 
3961
%%  kEventWindowClosed                  = 73,
 
3962
    kEventWindowCloseAll                = 74,
 
3963
    kEventWindowZoom                    = 75,
 
3964
%%  kEventWindowZoomed                  = 76,
 
3965
    kEventWindowZoomAll                 = 77,
 
3966
    kEventWindowContextualMenuSelect    = 78,
 
3967
    kEventWindowPathSelect              = 79,
 
3968
    kEventWindowGetIdealSize            = 80,
 
3969
    kEventWindowGetMinimumSize          = 81,
 
3970
    kEventWindowGetMaximumSize          = 82,
 
3971
    kEventWindowConstrain               = 83,
 
3972
    kEventWindowHandleContentClick      = 85,
 
3973
%%  kEventWindowCollapsing              = 86,
 
3974
%%  kEventWindowExpanding               = 87,
 
3975
%%  kEventWindowTransitionStarted       = 88,
 
3976
%%  kEventWindowTransitionCompleted     = 89,
 
3977
    kEventWindowGetDockTileMenu         = 90,
 
3978
%%  kEventWindowHandleActivate          = 91,
 
3979
%%  kEventWindowHandleDeactivate        = 92,
 
3980
    kEventWindowProxyBeginDrag          = 128,
 
3981
    kEventWindowProxyEndDrag            = 129,
 
3982
    kEventWindowToolbarSwitchMode       = 150,
 
3983
    
 
3984
    -- window focus events --
 
3985
    
 
3986
    kEventWindowFocusAcquired           = 200,
 
3987
    kEventWindowFocusRelinquish         = 201,
 
3988
    kEventWindowFocusContent            = 202,
 
3989
    kEventWindowFocusToolbar            = 203,
 
3990
    kEventWindowFocusDrawer             = 204,
 
3991
    
 
3992
    -- sheet events --
 
3993
    
 
3994
    kEventWindowSheetOpening,           = 210,
 
3995
    kEventWindowSheetOpened             = 211,
 
3996
    kEventWindowSheetClosing            = 212,
 
3997
    kEventWindowSheetClosed             = 213,
 
3998
    
 
3999
    -- drawer events --
 
4000
    
 
4001
    kEventWindowDrawerOpening           = 220,
 
4002
    kEventWindowDrawerOpened            = 221,
 
4003
    kEventWindowDrawerClosing           = 222,
 
4004
    kEventWindowDrawerClosed            = 223,
 
4005
    
 
4006
    -- window definition events --
 
4007
    
 
4008
    kEventWindowDrawFrame               = 1000,
 
4009
    kEventWindowDrawPart                = 1001,
 
4010
    kEventWindowGetRegion               = 1002,
 
4011
    kEventWindowHitTest                 = 1003,
 
4012
    kEventWindowInit                    = 1004,
 
4013
    kEventWindowDispose                 = 1005,
 
4014
    kEventWindowDragHilite              = 1006,
 
4015
    kEventWindowModified                = 1007,
 
4016
    kEventWindowSetupProxyDragImage     = 1008,
 
4017
    kEventWindowStateChanged            = 1009,
 
4018
    kEventWindowMeasureTitle            = 1010,
 
4019
    kEventWindowDrawGrowBox             = 1011,
 
4020
    kEventWindowGetGrowImageRegion      = 1012,
 
4021
    kEventWindowPaint                   = 1013
 
4022
    
 
4023
    On window handlers:
 
4024
    
 
4025
    All windows have a handler installed called the �basic window handler.� This handler provides certain
 
4026
    basic services for all windows; for example, it handles clicks in the collapse and toolbar buttons,
 
4027
    since these buttons were handled automatically for WaitNextEvent-based applications in the classic
 
4028
    Mac OS toolbox, and so are still be handled automatically in Carbon by the basic window handler. The
 
4029
    basic window handler also implements the HICommands that are sent by the standard window menu to minimize,
 
4030
    maximize, or zoom a window (kHICommandMinimize/Maximize/ZoomWindow), and the window-class events that are
 
4031
    generated by those commands (kEventWindowCollapse/Expand/Zoom).
 
4032
    
 
4033
    When the window is created with, or has added, the kWindowStandardHandlerAttribute, the window also has
 
4034
    installed the �standard window handler.� The standard handler provides much more advanced behavior than
 
4035
    the basic window handler; a window using the standard handler generally requires no other extra handlers
 
4036
    to move, resize, redraw, or track user clicks in controls. Applications will generally add extra handlers
 
4037
    to respond to command events generated by controls in the window.
 
4038
}
 
4039
{
 
4040
 *  kEventClassWindow / kEventWindowUpdate
 
4041
 *  
 
4042
 *  Summary:
 
4043
 *    The lowest-level window update event.
 
4044
 *  
 
4045
 *  Discussion:
 
4046
 *    Posted to the event queue for any window that needs updating
 
4047
 *    regardless of whether the window has the standard handler
 
4048
 *    installed. The standard window handler responds to this event by
 
4049
 *    calling BeginUpdate and SetPort, sending a
 
4050
 *    kEventWindowDrawContent event, and calling EndUpdate. An
 
4051
 *    application handler for this event that does not call through to
 
4052
 *    the standard handler must itself call BeginUpdate and
 
4053
 *    EndUpdate.
 
4054
 *    
 
4055
 *    If all handlers for this event return eventNotHandledErr, and the
 
4056
 *    application is calling WaitNextEvent or GetNextEvent, then a
 
4057
 *    kEventWindowUpdate event will be returned as a classic updateEvt.
 
4058
 *  
 
4059
 *  Mac OS X threading:
 
4060
 *    Not thread safe
 
4061
 *  
 
4062
 *  Parameters:
 
4063
 *    
 
4064
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4065
 *          The window that requires updating.
 
4066
 *  
 
4067
 *  Availability:
 
4068
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4069
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4070
 }
 
4071
const
 
4072
        kEventWindowUpdate = 1;
 
4073
 
 
4074
{
 
4075
 *  kEventClassWindow / kEventWindowDrawContent
 
4076
 *  
 
4077
 *  Summary:
 
4078
 *    A request to update a window�s content.
 
4079
 *  
 
4080
 *  Discussion:
 
4081
 *    This event is sent by the standard window handler when it
 
4082
 *    receives a kEventWindowUpdate event. BeginUpdate, SetPort, and
 
4083
 *    EndUpdate are called by the standard handler inside its
 
4084
 *    kEventWindowUpdate handler; your handler for the
 
4085
 *    kEventWindowDrawContent event only needs to draw into the current
 
4086
 *    port. 
 
4087
 *    
 
4088
 *    The standard window handler responds to this event by calling
 
4089
 *    UpdateControls. 
 
4090
 *    
 
4091
 *    Regardless of whether the window uses the standard window event
 
4092
 *    handler, you will also receive this event right before a window
 
4093
 *    is made visible, to allow you to draw the window�s initial
 
4094
 *    contents; you can implement this event to avoid flicker when the
 
4095
 *    window is first shown.
 
4096
 *  
 
4097
 *  Mac OS X threading:
 
4098
 *    Not thread safe
 
4099
 *  
 
4100
 *  Parameters:
 
4101
 *    
 
4102
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4103
 *          The window that requires updating.
 
4104
 *  
 
4105
 *  Availability:
 
4106
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4107
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4108
 }
 
4109
const
 
4110
        kEventWindowDrawContent = 2;
 
4111
 
 
4112
{
 
4113
 *  kEventClassWindow / kEventWindowActivated
 
4114
 *  
 
4115
 *  Summary:
 
4116
 *    Notification that a window has been activated.
 
4117
 *  
 
4118
 *  Discussion:
 
4119
 *    This event is sent to all handlers registered for it. It is sent
 
4120
 *    to any window that is activated, regardless of whether the window
 
4121
 *    has the standard handler installed. On Mac OS X 10.3 and later,
 
4122
 *    the standard window event handler responds to this event by
 
4123
 *    sending a kEventWindowHandleActivate event to the window; on
 
4124
 *    CarbonLib and earlier releases of Mac OS X, the standard window
 
4125
 *    handler calls ActivateControl on the window�s root
 
4126
 *    control.
 
4127
 *    
 
4128
 *    If all handlers for this event return eventNotHandledErr, then
 
4129
 *    the Window Manager posts the event to the event queue, where it
 
4130
 *    will later be returned from WaitNextEvent as a classic
 
4131
 *    activateEvt. If any handler returns an error code other than
 
4132
 *    eventNotHandledErr, then the event will not be posted to the
 
4133
 *    event queue.
 
4134
 *  
 
4135
 *  Mac OS X threading:
 
4136
 *    Not thread safe
 
4137
 *  
 
4138
 *  Parameters:
 
4139
 *    
 
4140
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4141
 *          The window that is now active.
 
4142
 *  
 
4143
 *  Availability:
 
4144
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4145
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4146
 }
 
4147
const
 
4148
        kEventWindowActivated = 5;
 
4149
 
 
4150
{
 
4151
 *  kEventClassWindow / kEventWindowDeactivated
 
4152
 *  
 
4153
 *  Summary:
 
4154
 *    Notification that a window has been deactivated.
 
4155
 *  
 
4156
 *  Discussion:
 
4157
 *    This event is sent to all handlers registered for it. It is sent
 
4158
 *    to any window that is deactivated, regardless of whether the
 
4159
 *    window has the standard handler installed. On Mac OS X 10.3 and
 
4160
 *    later, the standard window event handler responds to this event
 
4161
 *    by sending a kEventWindowHandleDeactivate event to the window; on
 
4162
 *    CarbonLib and earlier releases of Mac OS X, the standard window
 
4163
 *    handler calls DeactivateControl on the window�s root
 
4164
 *    control.
 
4165
 *    
 
4166
 *    If all handlers for this event return eventNotHandledErr, then
 
4167
 *    the Window Manager posts the event to the event queue, where it
 
4168
 *    will later be returned from WaitNextEvent as a classic
 
4169
 *    activateEvt. If any handler returns an error code other than
 
4170
 *    eventNotHandledErr, then the event will not be posted to the
 
4171
 *    event queue.
 
4172
 *  
 
4173
 *  Mac OS X threading:
 
4174
 *    Not thread safe
 
4175
 *  
 
4176
 *  Parameters:
 
4177
 *    
 
4178
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4179
 *          The window that is now inactive.
 
4180
 *  
 
4181
 *  Availability:
 
4182
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4183
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4184
 }
 
4185
const
 
4186
        kEventWindowDeactivated = 6;
 
4187
 
 
4188
{
 
4189
 *  kEventClassWindow / kEventWindowHandleActivate
 
4190
 *  
 
4191
 *  Summary:
 
4192
 *    The window has received a kEventWindowActivated event, and its
 
4193
 *    contents should become active.
 
4194
 *  
 
4195
 *  Discussion:
 
4196
 *    This event is generated by the standard window handler in
 
4197
 *    response to a kEventWindowActivated event. An application may
 
4198
 *    handle this event by activating its content appropriately. The
 
4199
 *    standard window handler responds to this event by calling
 
4200
 *    ActivateControl on the window's root control.
 
4201
 *  
 
4202
 *  Mac OS X threading:
 
4203
 *    Not thread safe
 
4204
 *  
 
4205
 *  Parameters:
 
4206
 *    
 
4207
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4208
 *          The window that was activated.
 
4209
 *  
 
4210
 *  Availability:
 
4211
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
4212
 *    CarbonLib:        not available
 
4213
 }
 
4214
const
 
4215
        kEventWindowHandleActivate = 91;
 
4216
 
 
4217
{
 
4218
 *  kEventClassWindow / kEventWindowHandleDeactivate
 
4219
 *  
 
4220
 *  Summary:
 
4221
 *    The window has received a kEventWindowDeactivated event, and its
 
4222
 *    contents should become inactive.
 
4223
 *  
 
4224
 *  Discussion:
 
4225
 *    This event is generated by the standard window handler in
 
4226
 *    response to a kEventWindowDeactivated event. An application may
 
4227
 *    handle this event by deactivating its content appropriately. The
 
4228
 *    standard window handler responds to this event by calling
 
4229
 *    DeactivateControl on the window's root control.
 
4230
 *  
 
4231
 *  Mac OS X threading:
 
4232
 *    Not thread safe
 
4233
 *  
 
4234
 *  Parameters:
 
4235
 *    
 
4236
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4237
 *          The window that was deactivated.
 
4238
 *  
 
4239
 *  Availability:
 
4240
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
4241
 *    CarbonLib:        not available
 
4242
 }
 
4243
const
 
4244
        kEventWindowHandleDeactivate = 92;
 
4245
 
 
4246
{
 
4247
 *  kEventClassWindow / kEventWindowGetClickActivation
 
4248
 *  
 
4249
 *  Summary:
 
4250
 *    Sent when a click occurs in a window. Allows the window to
 
4251
 *    determine whether the window should be activated and whether the
 
4252
 *    click should be handled.
 
4253
 *  
 
4254
 *  Discussion:
 
4255
 *    This event is sent in two situations:
 
4256
 *    - for all windows, it is sent to a clicked window when the
 
4257
 *    window's process is inactive
 
4258
 *    - for windows that use the standard window event handler, this
 
4259
 *    event is also sent to clicked windows when the window's process
 
4260
 *    is active. Prior to Mac OS X 10.4, this event is only sent when
 
4261
 *    the clicked window is not the frontmost window in its window
 
4262
 *    group. In Mac OS X 10.4 and later, this event is sent in response
 
4263
 *    to all clicks in a window, regardless of whether the window is
 
4264
 *    frontmost, so that command-clicks may properly avoid z-ordering
 
4265
 *    the window in front of other windows from other processes.
 
4266
 *    
 
4267
 *    
 
4268
 *    A handler for this event can determine whether the window is
 
4269
 *    activated and whether the click is handled or ignored by setting
 
4270
 *    the kEventParamClickActivation parameter to one of the
 
4271
 *    ClickActivationResult constants in Controls.h. 
 
4272
 *    
 
4273
 *    The default behavior varies according to the window state and the
 
4274
 *    click location:
 
4275
 *    - if the window's process is active, and the window is frontmost
 
4276
 *    in its group, then the standard window event handler returns
 
4277
 *    kActivateAndHandleClick.
 
4278
 *    - if the window's process is inactive, or the window is not
 
4279
 *    frontmost in its group, then the standard window event handler
 
4280
 *    returns kActivateAndIgnoreClick.
 
4281
 *    - if the click falls on the window widgets in the window
 
4282
 *    structure, then the default window event handler usually returns
 
4283
 *    kDoNotActivateAndHandleClick.
 
4284
 *    You have the option of overriding the behavior to support
 
4285
 *    click-through or select-and-click.
 
4286
 *  
 
4287
 *  Mac OS X threading:
 
4288
 *    Not thread safe
 
4289
 *  
 
4290
 *  Parameters:
 
4291
 *    
 
4292
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4293
 *          The window that was clicked.
 
4294
 *    
 
4295
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
4296
 *          The location of the click, in global coordinates.
 
4297
 *    
 
4298
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
4299
 *          The keyboard modifiers that were pressed when the mouse was
 
4300
 *          clicked.
 
4301
 *    
 
4302
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
4303
 *          The window part that was clicked. Available in Mac OS X
 
4304
 *          10.3 and later.
 
4305
 *    
 
4306
 *    --> kEventParamWindowDefPart (in, typeWindowDefPartCode)
 
4307
 *          The window part that was clicked. This is really a window
 
4308
 *          part code, not a window def part code, despite the
 
4309
 *          parameter name; this parameter is available in all versions
 
4310
 *          of Mac OS X and CarbonLib 1.1 and later, but use
 
4311
 *          kEventParamWindowPartCode when available instead for
 
4312
 *          clarity.
 
4313
 *    
 
4314
 *    --> kEventParamControlRef (in, typeControlRef)
 
4315
 *          The control that was clicked. Only present if the click was
 
4316
 *          on a control.
 
4317
 *    
 
4318
 *    <-- kEventParamClickActivation (out, typeClickActivationResult)
 
4319
 *          On exit, indicates how the click should be handled. Should
 
4320
 *          be set a ClickActivationResult constant from Controls.h.
 
4321
 *  
 
4322
 *  Availability:
 
4323
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4324
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4325
 }
 
4326
const
 
4327
        kEventWindowGetClickActivation = 7;
 
4328
 
 
4329
 
 
4330
{
 
4331
 *  Summary:
 
4332
 *    Responses to the kEventWindowGetClickModality event.
 
4333
 }
 
4334
const
 
4335
{
 
4336
   * Indicates whether a modal window prevents the mouse event from
 
4337
   * being passed to the clicked window. If this bit is set, the
 
4338
   * kEventParamModalWindow and kEventParamWindowModality parameters
 
4339
   * should be set before the event handler returns. If this bit is
 
4340
   * clear, normal event handling will occur; the clicked window will
 
4341
   * typically be z-ordered to the top of its window group, activated,
 
4342
   * become the user focus window, and receive the mouse event for
 
4343
   * further processing.
 
4344
   }
 
4345
        kHIModalClickIsModal = 1 shl 0;
 
4346
 
 
4347
  {
 
4348
   * If kHIModalClickIsModal is set, this flag indicates whether the
 
4349
   * click event should be allowed to pass to the clicked window. If
 
4350
   * kHIModalClickIsModal is not set, this flag is ignored.
 
4351
   }
 
4352
        kHIModalClickAllowEvent = 1 shl 1;
 
4353
 
 
4354
  {
 
4355
   * If kHIModalClickIsModal is set and kHIModalClickAllowEvent is not
 
4356
   * set, this flag indicates whether the caller should announce that
 
4357
   * the click has been blocked by a modal window using appropriate UI
 
4358
   * (typically, by calling SysBeep). If kHIModalClickIsModal is not
 
4359
   * set, or if kHIModalClickAllowEvent is set, this flag is ignored.
 
4360
   }
 
4361
        kHIModalClickAnnounce = 1 shl 2;
 
4362
 
 
4363
  {
 
4364
   * If both kHIModalClickIsModal and kHIModalClickAllowEvent are set,
 
4365
   * this flag indicates whether the clicked window should be z-ordered
 
4366
   * to the top of its window group. The window will not, however, be
 
4367
   * activated or become the user focus window. If either of
 
4368
   * kHIModalClickIsModal or kHIModalClickAllowEvent is not set, this
 
4369
   * flag is ignored.
 
4370
   }
 
4371
        kHIModalClickRaiseWindow = 1 shl 3;
 
4372
 
 
4373
type
 
4374
        HIModalClickResult = UInt32;
 
4375
const
 
4376
        typeModalClickResult = $776D6372 (* 'wmcr' *); { HIModalClickResult}
 
4377
        typeWindowModality = $776D6F64 (* 'wmod' *); { WindowModality}
 
4378
        kEventParamModalClickResult = typeModalClickResult; { typeModalClickResult}
 
4379
        kEventParamModalWindow = $6D77696E (* 'mwin' *); { typeWindowRef}
 
4380
        kEventParamWindowModality = typeWindowModality; { typeWindowModality}
 
4381
 
 
4382
{
 
4383
 *  kEventClassWindow / kEventWindowGetClickModality
 
4384
 *  
 
4385
 *  Summary:
 
4386
 *    Determines whether a mouse-down or mouse-up event is blocked by a
 
4387
 *    modal window.
 
4388
 *  
 
4389
 *  Discussion:
 
4390
 *    This event is sent to a window by the event dispatcher target
 
4391
 *    prior to dispatching a mouse-down or mouse-up event to the
 
4392
 *    clicked window. A handler for this event may examine application
 
4393
 *    state to determine whether this click should be allowed. 
 
4394
 *    
 
4395
 *    This event may also be sent in other circumstances besides a
 
4396
 *    mouse event. The toolbox currently sends this event in the
 
4397
 *    following other cases:
 
4398
 *    
 
4399
 *    - in SelectWindow
 
4400
 *    - when handling the cmd-~ key sequence
 
4401
 *    - when restoring a collapsed window from the Dock
 
4402
 *    - when handling the kHICommandSelectWindow command
 
4403
 *    - during application activation, when activating a clicked
 
4404
 *    window
 
4405
 *    
 
4406
 *    In each case, the result of this event is used to determine
 
4407
 *    whether z-ordering, activation, and hiliting of the window should
 
4408
 *    be allowed. 
 
4409
 *    
 
4410
 *    This event contains an optional EventRef parameter that is the
 
4411
 *    original mouse event. This parameter is not always present; if
 
4412
 *    not present, the handler should generally assume that the click
 
4413
 *    was a single click. 
 
4414
 *    
 
4415
 *    There is a default handler for this event installed on the
 
4416
 *    application target. The default behavior is to determine whether
 
4417
 *    this is a modal click by examining the modality of the visible,
 
4418
 *    uncollapsed windows in front of the clicked window, the location
 
4419
 *    of the click, and the keyboard modifiers. A custom handler may,
 
4420
 *    of course, entirely ignore window z-order or modality, and
 
4421
 *    determine modality in any way it deems necessary.
 
4422
 *  
 
4423
 *  Mac OS X threading:
 
4424
 *    Not thread safe
 
4425
 *  
 
4426
 *  Parameters:
 
4427
 *    
 
4428
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4429
 *          The window that was clicked.
 
4430
 *    
 
4431
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
4432
 *          The window part that was clicked.
 
4433
 *    
 
4434
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
4435
 *          The keyboard modifiers that were pressed when the mouse
 
4436
 *          button was pressed.
 
4437
 *    
 
4438
 *    --> kEventParamEventRef (in, typeEventRef)
 
4439
 *          The original mouse event. This parameter is optional and
 
4440
 *          may not be present in all instances of this event. If this
 
4441
 *          parameter is not present, the handler should assume that
 
4442
 *          the click was a single click, with the window part and
 
4443
 *          keyboard modifiers specified by the other parameters in the
 
4444
 *          kEventWindowGetClickModality event.
 
4445
 *    
 
4446
 *    <-- kEventParamModalClickResult (out, typeModalClickResult)
 
4447
 *          On exit, this parameter should contain an
 
4448
 *          HIModalClickResult value indicating how the click should be
 
4449
 *          handled.
 
4450
 *    
 
4451
 *    <-- kEventParamModalWindow (out, typeWindowRef)
 
4452
 *          On exit, this parameter should contain the modal window
 
4453
 *          that caused the click to be blocked, if any. The sender of
 
4454
 *          this event uses this information to determine which window
 
4455
 *          should be activated if the application is inactive.
 
4456
 *          
 
4457
 *          
 
4458
 *          This parameter is only required if the
 
4459
 *          kEventParamModalClickResult parameter contains
 
4460
 *          kHIModalClickIsModal. If an event handler wants to report
 
4461
 *          that a click has been blocked by modality, but cannot
 
4462
 *          determine which window blocked the click, it is acceptable
 
4463
 *          to either not add this parameter to the event, or to set
 
4464
 *          the parameter to a NULL WindowRef.
 
4465
 *    
 
4466
 *    <-- kEventParamWindowModality (out, typeWindowModality)
 
4467
 *          On exit, this parameter should contain the modality of the
 
4468
 *          modal window that is in front of the clicked window, if
 
4469
 *          any. This parameter is only required if the
 
4470
 *          kEventParamModalClickResult parameter contains
 
4471
 *          kHIModalClickIsModal.
 
4472
 *  
 
4473
 *  Availability:
 
4474
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
4475
 *    CarbonLib:        not available
 
4476
 }
 
4477
const
 
4478
        kEventWindowGetClickModality = 8;
 
4479
 
 
4480
 
 
4481
{
 
4482
 *  Summary:
 
4483
 *    Window bounds change event attributes
 
4484
 *  
 
4485
 *  Discussion:
 
4486
 *    When the toolbox sends out a kEventWindowBoundsChanging or
 
4487
 *    kEventWindowBoundsChanged event, it also sends along a parameter
 
4488
 *    containing attributes of the event. These attributes can be used
 
4489
 *    to determine what aspect of the window changed (origin, size, or
 
4490
 *    both), and whether or not some user action is driving the change
 
4491
 *    (drag or resize).
 
4492
 }
 
4493
const
 
4494
{
 
4495
   * The bounds is changing because the user is dragging the window
 
4496
   * around.
 
4497
   }
 
4498
        kWindowBoundsChangeUserDrag = 1 shl 0;
 
4499
 
 
4500
  {
 
4501
   * The bounds is changing because the user is resizing the window.
 
4502
   }
 
4503
        kWindowBoundsChangeUserResize = 1 shl 1;
 
4504
 
 
4505
  {
 
4506
   * The dimensions (width and height) of the window content area are
 
4507
   * changing.
 
4508
   }
 
4509
        kWindowBoundsChangeSizeChanged = 1 shl 2;
 
4510
 
 
4511
  {
 
4512
   * The top left corner (origin) of the window content is changing.
 
4513
   }
 
4514
        kWindowBoundsChangeOriginChanged = 1 shl 3;
 
4515
 
 
4516
  {
 
4517
   * The bounds is changing because ZoomWindow or ZoomWindowIdeal was
 
4518
   * called. Note that this flag does not imply any user interaction;
 
4519
   * if the application calls ZoomWindow itself without user request,
 
4520
   * this flag will still be set. Available in Mac OS X 10.2 and
 
4521
   * CarbonLib 1.6, and later.
 
4522
   }
 
4523
        kWindowBoundsChangeZoom = 1 shl 4;
 
4524
 
 
4525
{
 
4526
 *  kEventClassWindow / kEventWindowShowing
 
4527
 *  
 
4528
 *  Summary:
 
4529
 *    Notification that a window is being shown.
 
4530
 *  
 
4531
 *  Discussion:
 
4532
 *    This event is sent to all handlers registered for it.
 
4533
 *  
 
4534
 *  Mac OS X threading:
 
4535
 *    Not thread safe
 
4536
 *  
 
4537
 *  Parameters:
 
4538
 *    
 
4539
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4540
 *          The window being shown.
 
4541
 *  
 
4542
 *  Availability:
 
4543
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4544
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4545
 }
 
4546
const
 
4547
        kEventWindowShowing = 22;
 
4548
 
 
4549
{
 
4550
 *  kEventClassWindow / kEventWindowHiding
 
4551
 *  
 
4552
 *  Summary:
 
4553
 *    Notification that a window is being hidden.
 
4554
 *  
 
4555
 *  Discussion:
 
4556
 *    This event is sent to all handlers registered for it.
 
4557
 *  
 
4558
 *  Mac OS X threading:
 
4559
 *    Not thread safe
 
4560
 *  
 
4561
 *  Parameters:
 
4562
 *    
 
4563
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4564
 *          The window being hidden.
 
4565
 *  
 
4566
 *  Availability:
 
4567
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4568
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4569
 }
 
4570
const
 
4571
        kEventWindowHiding = 23;
 
4572
 
 
4573
{
 
4574
 *  kEventClassWindow / kEventWindowShown
 
4575
 *  
 
4576
 *  Summary:
 
4577
 *    Notification that a window has been shown.
 
4578
 *  
 
4579
 *  Discussion:
 
4580
 *    This event is sent to all handlers registered for it.
 
4581
 *  
 
4582
 *  Mac OS X threading:
 
4583
 *    Not thread safe
 
4584
 *  
 
4585
 *  Parameters:
 
4586
 *    
 
4587
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4588
 *          The window that was shown.
 
4589
 *  
 
4590
 *  Availability:
 
4591
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4592
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4593
 }
 
4594
const
 
4595
        kEventWindowShown = 24;
 
4596
 
 
4597
{
 
4598
 *  kEventClassWindow / kEventWindowHidden
 
4599
 *  
 
4600
 *  Summary:
 
4601
 *    Notification that a window has been hidden.
 
4602
 *  
 
4603
 *  Discussion:
 
4604
 *    This event is sent to all handlers registered for it. Prior to
 
4605
 *    Mac OS X 10.2 and CarbonLib 1.6, kEventWindowClosed and
 
4606
 *    kEventWindowHidden were sent in that order by the Window Manager
 
4607
 *    to a window being destroyed. This was problematic if you had a
 
4608
 *    Hidden handler which used data that was destroyed by the Closed
 
4609
 *    handler. The Window Manager in Mac OS X 10.2 and CarbonLib 1.6
 
4610
 *    and later now sends these events in the reverse order:
 
4611
 *    kEventWindowHidden first, followed by kEventWindowClosed. The
 
4612
 *    last event sent to a window remains kEventWindowDispose.
 
4613
 *  
 
4614
 *  Mac OS X threading:
 
4615
 *    Not thread safe
 
4616
 *  
 
4617
 *  Parameters:
 
4618
 *    
 
4619
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4620
 *          The window that was hidden.
 
4621
 *  
 
4622
 *  Availability:
 
4623
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4624
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4625
 }
 
4626
const
 
4627
        kEventWindowHidden = 25;
 
4628
 
 
4629
{
 
4630
 *  kEventClassWindow / kEventWindowCollapsing
 
4631
 *  
 
4632
 *  Summary:
 
4633
 *    Notification that a window is about to collapse.
 
4634
 *  
 
4635
 *  Discussion:
 
4636
 *    This event is sent to all handlers registered for it.
 
4637
 *  
 
4638
 *  Mac OS X threading:
 
4639
 *    Not thread safe
 
4640
 *  
 
4641
 *  Parameters:
 
4642
 *    
 
4643
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4644
 *          The window being collapsed.
 
4645
 *  
 
4646
 *  Availability:
 
4647
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
4648
 *    CarbonLib:        in CarbonLib 1.6 and later
 
4649
 }
 
4650
const
 
4651
        kEventWindowCollapsing = 86;
 
4652
 
 
4653
{
 
4654
 *  kEventClassWindow / kEventWindowCollapsed
 
4655
 *  
 
4656
 *  Summary:
 
4657
 *    Notification that a window has successfully collapsed.
 
4658
 *  
 
4659
 *  Discussion:
 
4660
 *    This event is sent to all handlers registered for it.
 
4661
 *  
 
4662
 *  Mac OS X threading:
 
4663
 *    Not thread safe
 
4664
 *  
 
4665
 *  Parameters:
 
4666
 *    
 
4667
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4668
 *          The window that was collapsed.
 
4669
 *  
 
4670
 *  Availability:
 
4671
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4672
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4673
 }
 
4674
const
 
4675
        kEventWindowCollapsed = 67;
 
4676
 
 
4677
{
 
4678
 *  kEventClassWindow / kEventWindowExpanding
 
4679
 *  
 
4680
 *  Summary:
 
4681
 *    Notification that a window is about to expand.
 
4682
 *  
 
4683
 *  Discussion:
 
4684
 *    This event is sent to all handlers registered for it.
 
4685
 *  
 
4686
 *  Mac OS X threading:
 
4687
 *    Not thread safe
 
4688
 *  
 
4689
 *  Parameters:
 
4690
 *    
 
4691
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4692
 *          The window being expanded.
 
4693
 *  
 
4694
 *  Availability:
 
4695
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
4696
 *    CarbonLib:        in CarbonLib 1.6 and later
 
4697
 }
 
4698
const
 
4699
        kEventWindowExpanding = 87;
 
4700
 
 
4701
{
 
4702
 *  kEventClassWindow / kEventWindowExpanded
 
4703
 *  
 
4704
 *  Summary:
 
4705
 *    Notification that a window has successfully expanded.
 
4706
 *  
 
4707
 *  Discussion:
 
4708
 *    This event is sent to all handlers registered for it.
 
4709
 *  
 
4710
 *  Mac OS X threading:
 
4711
 *    Not thread safe
 
4712
 *  
 
4713
 *  Parameters:
 
4714
 *    
 
4715
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4716
 *          The window that was expanded.
 
4717
 *  
 
4718
 *  Availability:
 
4719
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4720
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4721
 }
 
4722
const
 
4723
        kEventWindowExpanded = 70;
 
4724
 
 
4725
{
 
4726
 *  kEventClassWindow / kEventWindowZoomed
 
4727
 *  
 
4728
 *  Summary:
 
4729
 *    Notification that a window has been successfully zoomed.
 
4730
 *  
 
4731
 *  Discussion:
 
4732
 *    This event is sent to all handlers registered for it. In
 
4733
 *    CarbonLib 1.1 through CarbonLib 1.4, and Mac OS X 10.0 and 10.1,
 
4734
 *    this event is only sent by the standard window event handler
 
4735
 *    after handling kEventWindowZoom; starting with CarbonLib 1.5 and
 
4736
 *    Mac OS X 10.2, this event is sent by ZoomWindow and
 
4737
 *    ZoomWindowIdeal.
 
4738
 *  
 
4739
 *  Mac OS X threading:
 
4740
 *    Not thread safe
 
4741
 *  
 
4742
 *  Parameters:
 
4743
 *    
 
4744
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4745
 *          The window that was zoomed.
 
4746
 *    
 
4747
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
4748
 *          The part code (inZoomIn or inZoomOut) that was passed to
 
4749
 *          ZoomWindow or ZoomWindowIdeal. This parameter is available
 
4750
 *          in Mac OS X 10.4 and later.
 
4751
 *  
 
4752
 *  Availability:
 
4753
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4754
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4755
 }
 
4756
const
 
4757
        kEventWindowZoomed = 76;
 
4758
 
 
4759
{
 
4760
 *  kEventClassWindow / kEventWindowBoundsChanging
 
4761
 *  
 
4762
 *  Summary:
 
4763
 *    Notification that a window�s bounds are about to be changed.
 
4764
 *  
 
4765
 *  Discussion:
 
4766
 *    Sent during DragWindow or ResizeWindow, before the window is
 
4767
 *    actually moved or resized, and also during programmatic
 
4768
 *    bounds-changing APIs such as SetWindowBounds and ZoomWindow. An
 
4769
 *    event handler may alter the kEventParamCurrentBounds parameter in
 
4770
 *    the event to change the eventual location of the window. You may
 
4771
 *    change the size, origin, or both of the window�s bounds. Do not,
 
4772
 *    however, call SizeWindow or SetWindowBounds yourself from inside
 
4773
 *    a handler for this event. 
 
4774
 *    
 
4775
 *    In Mac OS X 10.1 and later, kEventWindowBoundsChanging is sent
 
4776
 *    before all changes to a window�s bounds, regardless of whether
 
4777
 *    the change is initiated by the user or by a direct call to a
 
4778
 *    Window Manager API. Applications may intercept the event and
 
4779
 *    modify the bounds. When the event is sent because of a direct
 
4780
 *    call to the Window Manager, the
 
4781
 *    kWindowBoundsChangeUserDrag/Resize attribute bits will not be set.
 
4782
 *  
 
4783
 *  Mac OS X threading:
 
4784
 *    Not thread safe
 
4785
 *  
 
4786
 *  Parameters:
 
4787
 *    
 
4788
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4789
 *          The window being shown.
 
4790
 *    
 
4791
 *    --> kEventParamAttributes (in, typeUInt32)
 
4792
 *          The bounds-changing attributes indicating whether the
 
4793
 *          window is being resized, moved, or both.
 
4794
 *    
 
4795
 *    --> kEventParamOriginalBounds (in, typeQDRectangle)
 
4796
 *          The window�s original content bounds before the window
 
4797
 *          resize or drag began.
 
4798
 *    
 
4799
 *    --> kEventParamPreviousBounds (in, typeQDRectangle)
 
4800
 *          The window�s content bounds before the current bounds
 
4801
 *          change.
 
4802
 *    
 
4803
 *    <-> kEventParamCurrentBounds (in/out, typeQDRectangle)
 
4804
 *          On entry, the window�s proposed new content bounds; on
 
4805
 *          exit, the content bounds that are desired by the event
 
4806
 *          handler.
 
4807
 *  
 
4808
 *  Result:
 
4809
 *    Return noErr to indicate that the Window Manager should use the
 
4810
 *    kEventParamCurrentBounds parameter as the window�s new content
 
4811
 *    bounds.
 
4812
 *  
 
4813
 *  Availability:
 
4814
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4815
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4816
 }
 
4817
const
 
4818
        kEventWindowBoundsChanging = 26;
 
4819
 
 
4820
{
 
4821
 *  kEventClassWindow / kEventWindowBoundsChanged
 
4822
 *  
 
4823
 *  Summary:
 
4824
 *    Notification that a window�s bounds have been changed.
 
4825
 *  
 
4826
 *  Discussion:
 
4827
 *    This event is sent to all handlers registered for it. Do not call
 
4828
 *    SizeWindow or SetWindowBounds from inside a handler for this
 
4829
 *    event; if you need to enforce a certain window bounds, install a
 
4830
 *    kEventWindowBoundsChanging handler instead.
 
4831
 *  
 
4832
 *  Mac OS X threading:
 
4833
 *    Not thread safe
 
4834
 *  
 
4835
 *  Parameters:
 
4836
 *    
 
4837
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4838
 *          The window whose bounds were changed.
 
4839
 *    
 
4840
 *    --> kEventParamAttributes (in, typeUInt32)
 
4841
 *          The bounds-changing attributes indicating whether the
 
4842
 *          window was resized, moved, or both.
 
4843
 *    
 
4844
 *    --> kEventParamOriginalBounds (in, typeQDRectangle)
 
4845
 *          The window�s original content bounds before the window
 
4846
 *          resize or drag began.
 
4847
 *    
 
4848
 *    --> kEventParamPreviousBounds (in, typeQDRectangle)
 
4849
 *          The window�s content bounds before the current bounds
 
4850
 *          change.
 
4851
 *    
 
4852
 *    --> kEventParamCurrentBounds (in, typeQDRectangle)
 
4853
 *          The window�s new content bounds.
 
4854
 *  
 
4855
 *  Availability:
 
4856
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4857
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4858
 }
 
4859
const
 
4860
        kEventWindowBoundsChanged = 27;
 
4861
 
 
4862
{
 
4863
 *  kEventClassWindow / kEventWindowResizeStarted
 
4864
 *  
 
4865
 *  Summary:
 
4866
 *    Notification that the user has just started to resize a window.
 
4867
 *  
 
4868
 *  Discussion:
 
4869
 *    This event is sent to all handlers registered for it.
 
4870
 *  
 
4871
 *  Mac OS X threading:
 
4872
 *    Not thread safe
 
4873
 *  
 
4874
 *  Parameters:
 
4875
 *    
 
4876
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4877
 *          The window being resized.
 
4878
 *  
 
4879
 *  Availability:
 
4880
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4881
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4882
 }
 
4883
const
 
4884
        kEventWindowResizeStarted = 28;
 
4885
 
 
4886
{
 
4887
 *  kEventClassWindow / kEventWindowResizeCompleted
 
4888
 *  
 
4889
 *  Summary:
 
4890
 *    Notification that the user has just finished resizing a window.
 
4891
 *  
 
4892
 *  Discussion:
 
4893
 *    This event is sent to all handlers registered for it.
 
4894
 *  
 
4895
 *  Mac OS X threading:
 
4896
 *    Not thread safe
 
4897
 *  
 
4898
 *  Parameters:
 
4899
 *    
 
4900
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4901
 *          The window that was resized.
 
4902
 *  
 
4903
 *  Availability:
 
4904
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4905
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4906
 }
 
4907
const
 
4908
        kEventWindowResizeCompleted = 29;
 
4909
 
 
4910
{
 
4911
 *  kEventClassWindow / kEventWindowDragStarted
 
4912
 *  
 
4913
 *  Summary:
 
4914
 *    Notification that the user has just started to drag a window.
 
4915
 *  
 
4916
 *  Discussion:
 
4917
 *    This event is sent to all handlers registered for it.
 
4918
 *  
 
4919
 *  Mac OS X threading:
 
4920
 *    Not thread safe
 
4921
 *  
 
4922
 *  Parameters:
 
4923
 *    
 
4924
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4925
 *          The window being dragged.
 
4926
 *  
 
4927
 *  Availability:
 
4928
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4929
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4930
 }
 
4931
const
 
4932
        kEventWindowDragStarted = 30;
 
4933
 
 
4934
{
 
4935
 *  kEventClassWindow / kEventWindowDragCompleted
 
4936
 *  
 
4937
 *  Summary:
 
4938
 *    Notification that the user has just finished dragging a window.
 
4939
 *  
 
4940
 *  Discussion:
 
4941
 *    This event is sent to all handlers registered for it.
 
4942
 *  
 
4943
 *  Mac OS X threading:
 
4944
 *    Not thread safe
 
4945
 *  
 
4946
 *  Parameters:
 
4947
 *    
 
4948
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4949
 *          The window that was dragged.
 
4950
 *  
 
4951
 *  Availability:
 
4952
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4953
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4954
 }
 
4955
const
 
4956
        kEventWindowDragCompleted = 31;
 
4957
 
 
4958
{
 
4959
 *  kEventClassWindow / kEventWindowClosed
 
4960
 *  
 
4961
 *  Summary:
 
4962
 *    Notification that a window is being destroyed.
 
4963
 *  
 
4964
 *  Discussion:
 
4965
 *    This event is sent to all handlers registered for it. Prior to
 
4966
 *    Mac OS X 10.2 and CarbonLib 1.6, kEventWindowClosed and
 
4967
 *    kEventWindowHidden were sent in that order by the Window Manager
 
4968
 *    to a window being destroyed. This was problematic if you had a
 
4969
 *    Hidden handler which used data that was destroyed by the Closed
 
4970
 *    handler. The Window Manager in Mac OS X 10.2 and CarbonLib 1.6
 
4971
 *    and later now sends these events in the reverse order:
 
4972
 *    kEventWindowHidden first, followed by kEventWindowClosed. The
 
4973
 *    last event sent to a window remains kEventWindowDispose.
 
4974
 *  
 
4975
 *  Mac OS X threading:
 
4976
 *    Not thread safe
 
4977
 *  
 
4978
 *  Parameters:
 
4979
 *    
 
4980
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
4981
 *          The window being destroyed.
 
4982
 *  
 
4983
 *  Availability:
 
4984
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
4985
 *    CarbonLib:        in CarbonLib 1.1 and later
 
4986
 }
 
4987
const
 
4988
        kEventWindowClosed = 73;
 
4989
 
 
4990
{
 
4991
 *  kEventClassWindow / kEventWindowTransitionStarted
 
4992
 *  
 
4993
 *  Summary:
 
4994
 *    Notification that a window transition has started.
 
4995
 *  
 
4996
 *  Discussion:
 
4997
 *    This event is sent to all handlers registered for it. It is sent
 
4998
 *    by the TransitionWindow, TransitionWindowAndParent, and
 
4999
 *    TransitionWindowWithOptions APIs just before the first frame of
 
5000
 *    the transition animation.
 
5001
 *  
 
5002
 *  Mac OS X threading:
 
5003
 *    Not thread safe
 
5004
 *  
 
5005
 *  Parameters:
 
5006
 *    
 
5007
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5008
 *          The window that will be transitioning.
 
5009
 *    
 
5010
 *    --> kEventParamUserData (in, typeVoidPtr)
 
5011
 *          The user data that was specified in the
 
5012
 *          TransitionWindowOptions.userData field. If no user data was
 
5013
 *          specified, this parameter will still be present, but its
 
5014
 *          value will be NULL.
 
5015
 *    
 
5016
 *    --> kEventParamWindowTransitionAction (in, typeWindowTransitionAction)
 
5017
 *          The transition action that is starting.
 
5018
 *    
 
5019
 *    --> kEventParamWindowTransitionEffect (in, typeWindowTransitionEffect)
 
5020
 *          The transition effect that is starting.
 
5021
 *  
 
5022
 *  Availability:
 
5023
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
5024
 *    CarbonLib:        not available
 
5025
 }
 
5026
const
 
5027
        kEventWindowTransitionStarted = 88;
 
5028
 
 
5029
{
 
5030
 *  kEventClassWindow / kEventWindowTransitionCompleted
 
5031
 *  
 
5032
 *  Summary:
 
5033
 *    Notification that a window transition has completed.
 
5034
 *  
 
5035
 *  Discussion:
 
5036
 *    This event is sent to all handlers registered for it. It is sent
 
5037
 *    by the TransitionWindow, TransitionWindowAndParent, and
 
5038
 *    TransitionWindowWithOptions APIs just after the last frame of the
 
5039
 *    transition animation.
 
5040
 *  
 
5041
 *  Mac OS X threading:
 
5042
 *    Not thread safe
 
5043
 *  
 
5044
 *  Parameters:
 
5045
 *    
 
5046
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5047
 *          The window that was transitioning.
 
5048
 *    
 
5049
 *    --> kEventParamUserData (in, typeVoidPtr)
 
5050
 *          The user data that was specified in the
 
5051
 *          TransitionWindowOptions.userData field. If no user data was
 
5052
 *          specified, this parameter will still be present, but its
 
5053
 *          value will be NULL.
 
5054
 *    
 
5055
 *    --> kEventParamWindowTransitionAction (in, typeWindowTransitionAction)
 
5056
 *          The transition action that has completed.
 
5057
 *    
 
5058
 *    --> kEventParamWindowTransitionEffect (in, typeWindowTransitionEffect)
 
5059
 *          The transition effect that has completed.
 
5060
 *  
 
5061
 *  Availability:
 
5062
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
5063
 *    CarbonLib:        not available
 
5064
 }
 
5065
const
 
5066
        kEventWindowTransitionCompleted = 89;
 
5067
 
 
5068
{
 
5069
 *  kEventClassWindow / kEventWindowClickDragRgn
 
5070
 *  
 
5071
 *  Summary:
 
5072
 *    Sent when the mouse is clicked in the drag region.
 
5073
 *  
 
5074
 *  Discussion:
 
5075
 *    The standard window handler responds to this event by checking if
 
5076
 *    the click is a window path-select click; if so, it sends
 
5077
 *    kEventWindowPathSelect to allow customization of the path-select
 
5078
 *    menu, and then calls WindowPathSelect. If the click is not a
 
5079
 *    path-select click, the standard window handler calls DragWindow.
 
5080
 *    Note that this event is not sent for composited windows; the
 
5081
 *    window frame view handles the mouse-down event directly. To
 
5082
 *    intercept a drag region click in a composited window, install a
 
5083
 *    kEventControlClick handler on the window�s root view.
 
5084
 *  
 
5085
 *  Mac OS X threading:
 
5086
 *    Not thread safe
 
5087
 *  
 
5088
 *  Parameters:
 
5089
 *    
 
5090
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5091
 *          The window that was clicked.
 
5092
 *    
 
5093
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5094
 *          The mouse location, in global coordinates.
 
5095
 *    
 
5096
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5097
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5098
 *          later.
 
5099
 *    
 
5100
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5101
 *          The window-relative position of the mouse in the window
 
5102
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5103
 *          top left of the structure of the window. Available in Mac
 
5104
 *          OS X 10.1 and later.
 
5105
 *    
 
5106
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5107
 *          The part code that the mouse location hit in the window.
 
5108
 *          This parameter only exists if the WindowRef parameter
 
5109
 *          exists. This saves you the trouble of calling FindWindow,
 
5110
 *          which is expensive on Mac OS X as it needs to call the
 
5111
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5112
 *    
 
5113
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5114
 *          The keyboard modifiers that were pressed when the event was
 
5115
 *          generated.
 
5116
 *    
 
5117
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5118
 *          Which mouse button was pressed.
 
5119
 *    
 
5120
 *    --> kEventParamClickCount (in, typeUInt32)
 
5121
 *          Whether this is a single click, double click, etc.
 
5122
 *    
 
5123
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5124
 *          Which other mouse buttons were pressed when the event was
 
5125
 *          generated. Available on Mac OS X only.
 
5126
 *    
 
5127
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5128
 *          The type of tablet event which generated this mouse event;
 
5129
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5130
 *          Only present if the event was generated from a tablet.
 
5131
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5132
 *    
 
5133
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5134
 *          Further information about the tablet event which generated
 
5135
 *          this mouse event. Present if the the
 
5136
 *          kEventParamTabletEventType parameter contains
 
5137
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5138
 *          1.5, and later.
 
5139
 *    
 
5140
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5141
 *          Further information about the tablet event which generated
 
5142
 *          this mouse event. Present if the the
 
5143
 *          kEventParamTabletEventType parameter contains
 
5144
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5145
 *          CarbonLib 1.5, and later.
 
5146
 *  
 
5147
 *  Availability:
 
5148
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5149
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5150
 }
 
5151
const
 
5152
        kEventWindowClickDragRgn = 32;
 
5153
 
 
5154
{
 
5155
 *  kEventClassWindow / kEventWindowClickResizeRgn
 
5156
 *  
 
5157
 *  Summary:
 
5158
 *    Sent when the mouse is clicked in the resize area.
 
5159
 *  
 
5160
 *  Discussion:
 
5161
 *    The standard window handler responds to this event by calling
 
5162
 *    ResizeWindow. Note that this event is not sent for composited
 
5163
 *    windows; the window resize view handles the mouse-down event
 
5164
 *    directly. To intercept a resize region click in a composited
 
5165
 *    window, install a kEventControlClick handler on the window�s
 
5166
 *    resize view.
 
5167
 *  
 
5168
 *  Mac OS X threading:
 
5169
 *    Not thread safe
 
5170
 *  
 
5171
 *  Parameters:
 
5172
 *    
 
5173
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5174
 *          The window that was clicked.
 
5175
 *    
 
5176
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5177
 *          The mouse location, in global coordinates.
 
5178
 *    
 
5179
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5180
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5181
 *          later.
 
5182
 *    
 
5183
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5184
 *          The window-relative position of the mouse in the window
 
5185
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5186
 *          top left of the structure of the window. Available in Mac
 
5187
 *          OS X 10.1 and later.
 
5188
 *    
 
5189
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5190
 *          The part code that the mouse location hit in the window.
 
5191
 *          This parameter only exists if the WindowRef parameter
 
5192
 *          exists. This saves you the trouble of calling FindWindow,
 
5193
 *          which is expensive on Mac OS X as it needs to call the
 
5194
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5195
 *    
 
5196
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5197
 *          The keyboard modifiers that were pressed when the event was
 
5198
 *          generated.
 
5199
 *    
 
5200
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5201
 *          Which mouse button was pressed.
 
5202
 *    
 
5203
 *    --> kEventParamClickCount (in, typeUInt32)
 
5204
 *          Whether this is a single click, double click, etc.
 
5205
 *    
 
5206
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5207
 *          Which other mouse buttons were pressed when the event was
 
5208
 *          generated. Available on Mac OS X only.
 
5209
 *    
 
5210
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5211
 *          The type of tablet event which generated this mouse event;
 
5212
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5213
 *          Only present if the event was generated from a tablet.
 
5214
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5215
 *    
 
5216
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5217
 *          Further information about the tablet event which generated
 
5218
 *          this mouse event. Present if the the
 
5219
 *          kEventParamTabletEventType parameter contains
 
5220
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5221
 *          1.5, and later.
 
5222
 *    
 
5223
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5224
 *          Further information about the tablet event which generated
 
5225
 *          this mouse event. Present if the the
 
5226
 *          kEventParamTabletEventType parameter contains
 
5227
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5228
 *          CarbonLib 1.5, and later.
 
5229
 *  
 
5230
 *  Availability:
 
5231
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5232
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5233
 }
 
5234
const
 
5235
        kEventWindowClickResizeRgn = 33;
 
5236
 
 
5237
{
 
5238
 *  kEventClassWindow / kEventWindowClickCollapseRgn
 
5239
 *  
 
5240
 *  Summary:
 
5241
 *    Sent when the mouse is clicked in the collapse button.
 
5242
 *  
 
5243
 *  Discussion:
 
5244
 *    For all windows, the basic window handler responds to this event
 
5245
 *    by tracking the click in the collapse button. If the mouse is
 
5246
 *    released while still in the button, the basic window handler
 
5247
 *    generates one of the kEventWindowCollapse,
 
5248
 *    kEventWindowCollapseAll, kEventWindowExpand, or
 
5249
 *    kEventWindowExpandAll events, depending on the window�s original
 
5250
 *    collapse state and whether the option key was pressed. Note that
 
5251
 *    this event is not sent for composited windows; the window
 
5252
 *    collapse button view handles the mouse-down event directly. To
 
5253
 *    intercept a collapse region click in a composited window, install
 
5254
 *    a kEventControlClick handler on the window�s collapse button view.
 
5255
 *  
 
5256
 *  Mac OS X threading:
 
5257
 *    Not thread safe
 
5258
 *  
 
5259
 *  Parameters:
 
5260
 *    
 
5261
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5262
 *          The window that was clicked.
 
5263
 *    
 
5264
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5265
 *          The mouse location, in global coordinates.
 
5266
 *    
 
5267
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5268
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5269
 *          later.
 
5270
 *    
 
5271
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5272
 *          The window-relative position of the mouse in the window
 
5273
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5274
 *          top left of the structure of the window. Available in Mac
 
5275
 *          OS X 10.1 and later.
 
5276
 *    
 
5277
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5278
 *          The part code that the mouse location hit in the window.
 
5279
 *          This parameter only exists if the WindowRef parameter
 
5280
 *          exists. This saves you the trouble of calling FindWindow,
 
5281
 *          which is expensive on Mac OS X as it needs to call the
 
5282
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5283
 *    
 
5284
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5285
 *          The keyboard modifiers that were pressed when the event was
 
5286
 *          generated.
 
5287
 *    
 
5288
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5289
 *          Which mouse button was pressed.
 
5290
 *    
 
5291
 *    --> kEventParamClickCount (in, typeUInt32)
 
5292
 *          Whether this is a single click, double click, etc.
 
5293
 *    
 
5294
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5295
 *          Which other mouse buttons were pressed when the event was
 
5296
 *          generated. Available on Mac OS X only.
 
5297
 *    
 
5298
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5299
 *          The type of tablet event which generated this mouse event;
 
5300
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5301
 *          Only present if the event was generated from a tablet.
 
5302
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5303
 *    
 
5304
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5305
 *          Further information about the tablet event which generated
 
5306
 *          this mouse event. Present if the the
 
5307
 *          kEventParamTabletEventType parameter contains
 
5308
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5309
 *          1.5, and later.
 
5310
 *    
 
5311
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5312
 *          Further information about the tablet event which generated
 
5313
 *          this mouse event. Present if the the
 
5314
 *          kEventParamTabletEventType parameter contains
 
5315
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5316
 *          CarbonLib 1.5, and later.
 
5317
 *  
 
5318
 *  Availability:
 
5319
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5320
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5321
 }
 
5322
const
 
5323
        kEventWindowClickCollapseRgn = 34;
 
5324
 
 
5325
{
 
5326
 *  kEventClassWindow / kEventWindowClickCloseRgn
 
5327
 *  
 
5328
 *  Summary:
 
5329
 *    Sent when the mouse is clicked in the close button.
 
5330
 *  
 
5331
 *  Discussion:
 
5332
 *    The standard window handler responds to this event by tracking
 
5333
 *    the click in the close button. If the mouse is released while
 
5334
 *    still in the button, the standard window handler generates one of
 
5335
 *    the kEventWindowClose or kEventWindowCloseAll events, depending
 
5336
 *    on whether the option key was pressed. Note that this event is
 
5337
 *    not sent for composited windows; the window close button view
 
5338
 *    handles the mouse-down event directly. To intercept a close
 
5339
 *    region click in a composited window, install a kEventControlClick
 
5340
 *    handler on the window�s close button view.
 
5341
 *  
 
5342
 *  Mac OS X threading:
 
5343
 *    Not thread safe
 
5344
 *  
 
5345
 *  Parameters:
 
5346
 *    
 
5347
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5348
 *          The window that was clicked.
 
5349
 *    
 
5350
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5351
 *          The mouse location, in global coordinates.
 
5352
 *    
 
5353
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5354
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5355
 *          later.
 
5356
 *    
 
5357
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5358
 *          The window-relative position of the mouse in the window
 
5359
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5360
 *          top left of the structure of the window. Available in Mac
 
5361
 *          OS X 10.1 and later.
 
5362
 *    
 
5363
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5364
 *          The part code that the mouse location hit in the window.
 
5365
 *          This parameter only exists if the WindowRef parameter
 
5366
 *          exists. This saves you the trouble of calling FindWindow,
 
5367
 *          which is expensive on Mac OS X as it needs to call the
 
5368
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5369
 *    
 
5370
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5371
 *          The keyboard modifiers that were pressed when the event was
 
5372
 *          generated.
 
5373
 *    
 
5374
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5375
 *          Which mouse button was pressed.
 
5376
 *    
 
5377
 *    --> kEventParamClickCount (in, typeUInt32)
 
5378
 *          Whether this is a single click, double click, etc.
 
5379
 *    
 
5380
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5381
 *          Which other mouse buttons were pressed when the event was
 
5382
 *          generated. Available on Mac OS X only.
 
5383
 *    
 
5384
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5385
 *          The type of tablet event which generated this mouse event;
 
5386
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5387
 *          Only present if the event was generated from a tablet.
 
5388
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5389
 *    
 
5390
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5391
 *          Further information about the tablet event which generated
 
5392
 *          this mouse event. Present if the the
 
5393
 *          kEventParamTabletEventType parameter contains
 
5394
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5395
 *          1.5, and later.
 
5396
 *    
 
5397
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5398
 *          Further information about the tablet event which generated
 
5399
 *          this mouse event. Present if the the
 
5400
 *          kEventParamTabletEventType parameter contains
 
5401
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5402
 *          CarbonLib 1.5, and later.
 
5403
 *  
 
5404
 *  Availability:
 
5405
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5406
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5407
 }
 
5408
const
 
5409
        kEventWindowClickCloseRgn = 35;
 
5410
 
 
5411
{
 
5412
 *  kEventClassWindow / kEventWindowClickZoomRgn
 
5413
 *  
 
5414
 *  Summary:
 
5415
 *    Sent when the mouse is clicked in the zoom button.
 
5416
 *  
 
5417
 *  Discussion:
 
5418
 *    The standard window handler responds to this event by tracking
 
5419
 *    the click in the zoom button. If the mouse is released while
 
5420
 *    still in the button, the standard window handler generates one of
 
5421
 *    the kEventWindowZoom or kEventWindowZoomAll events, depending on
 
5422
 *    whether the option key was pressed. Note that this event is not
 
5423
 *    sent for composited windows; the window zoom button view handles
 
5424
 *    the mouse-down event directly. To intercept a zoom region click
 
5425
 *    in a composited window, install a kEventControlClick handler on
 
5426
 *    the window�s zoom region view.
 
5427
 *  
 
5428
 *  Mac OS X threading:
 
5429
 *    Not thread safe
 
5430
 *  
 
5431
 *  Parameters:
 
5432
 *    
 
5433
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5434
 *          The window that was clicked.
 
5435
 *    
 
5436
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5437
 *          The mouse location, in global coordinates.
 
5438
 *    
 
5439
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5440
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5441
 *          later.
 
5442
 *    
 
5443
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5444
 *          The window-relative position of the mouse in the window
 
5445
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5446
 *          top left of the structure of the window. Available in Mac
 
5447
 *          OS X 10.1 and later.
 
5448
 *    
 
5449
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5450
 *          The part code that the mouse location hit in the window.
 
5451
 *          This parameter only exists if the WindowRef parameter
 
5452
 *          exists. This saves you the trouble of calling FindWindow,
 
5453
 *          which is expensive on Mac OS X as it needs to call the
 
5454
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5455
 *    
 
5456
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5457
 *          The keyboard modifiers that were pressed when the event was
 
5458
 *          generated.
 
5459
 *    
 
5460
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5461
 *          Which mouse button was pressed.
 
5462
 *    
 
5463
 *    --> kEventParamClickCount (in, typeUInt32)
 
5464
 *          Whether this is a single click, double click, etc.
 
5465
 *    
 
5466
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5467
 *          Which other mouse buttons were pressed when the event was
 
5468
 *          generated. Available on Mac OS X only.
 
5469
 *    
 
5470
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5471
 *          The type of tablet event which generated this mouse event;
 
5472
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5473
 *          Only present if the event was generated from a tablet.
 
5474
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5475
 *    
 
5476
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5477
 *          Further information about the tablet event which generated
 
5478
 *          this mouse event. Present if the the
 
5479
 *          kEventParamTabletEventType parameter contains
 
5480
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5481
 *          1.5, and later.
 
5482
 *    
 
5483
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5484
 *          Further information about the tablet event which generated
 
5485
 *          this mouse event. Present if the the
 
5486
 *          kEventParamTabletEventType parameter contains
 
5487
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5488
 *          CarbonLib 1.5, and later.
 
5489
 *  
 
5490
 *  Availability:
 
5491
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5492
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5493
 }
 
5494
const
 
5495
        kEventWindowClickZoomRgn = 36;
 
5496
 
 
5497
{
 
5498
 *  kEventClassWindow / kEventWindowClickContentRgn
 
5499
 *  
 
5500
 *  Summary:
 
5501
 *    Sent when the mouse is clicked in the content region.
 
5502
 *  
 
5503
 *  Discussion:
 
5504
 *    The standard window handler responds to this event by checking if
 
5505
 *    the click should display a contextual menu; if so, and if the
 
5506
 *    click was in an enabled control, it calls
 
5507
 *    HandleControlContextualMenuSelect. If the click was not in a
 
5508
 *    control, or if the control does not display a contextual menu,
 
5509
 *    the standard window handler sends a
 
5510
 *    kEventWindowContextualMenuSelect event to the window. 
 
5511
 *    
 
5512
 *    If the click was not a contextual menu click, then the standard
 
5513
 *    window handler uses HIViewGetViewForMouseEvent to determine the
 
5514
 *    HIView containing the click. If a view is found, the standard
 
5515
 *    window handler calls HIViewClick, which will generate a
 
5516
 *    kEventControlClick event. 
 
5517
 *    
 
5518
 *    If no view is found that contains the click, or if the containing
 
5519
 *    view does not handle the click, then the standard window handler
 
5520
 *    sends a kEventWindowHandleContentClick event. 
 
5521
 *    
 
5522
 *    Note that this event is not sent for composited windows; all
 
5523
 *    mouse-downs in a composited window are handled by a view, and
 
5524
 *    there is no �content region� in a composited window. To intercept
 
5525
 *    a content region click in a composited window, install a
 
5526
 *    kEventControlClick handler on the window�s content view, or
 
5527
 *    provide your own HIView subclass.
 
5528
 *  
 
5529
 *  Mac OS X threading:
 
5530
 *    Not thread safe
 
5531
 *  
 
5532
 *  Parameters:
 
5533
 *    
 
5534
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5535
 *          The window that was clicked.
 
5536
 *    
 
5537
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5538
 *          The mouse location, in global coordinates.
 
5539
 *    
 
5540
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5541
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5542
 *          later.
 
5543
 *    
 
5544
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5545
 *          The window-relative position of the mouse in the window
 
5546
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5547
 *          top left of the structure of the window. Available in Mac
 
5548
 *          OS X 10.1 and later.
 
5549
 *    
 
5550
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5551
 *          The part code that the mouse location hit in the window.
 
5552
 *          This parameter only exists if the WindowRef parameter
 
5553
 *          exists. This saves you the trouble of calling FindWindow,
 
5554
 *          which is expensive on Mac OS X as it needs to call the
 
5555
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5556
 *    
 
5557
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5558
 *          The keyboard modifiers that were pressed when the event was
 
5559
 *          generated.
 
5560
 *    
 
5561
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5562
 *          Which mouse button was pressed.
 
5563
 *    
 
5564
 *    --> kEventParamClickCount (in, typeUInt32)
 
5565
 *          Whether this is a single click, double click, etc.
 
5566
 *    
 
5567
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5568
 *          Which other mouse buttons were pressed when the event was
 
5569
 *          generated. Available on Mac OS X only.
 
5570
 *    
 
5571
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5572
 *          The type of tablet event which generated this mouse event;
 
5573
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5574
 *          Only present if the event was generated from a tablet.
 
5575
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5576
 *    
 
5577
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5578
 *          Further information about the tablet event which generated
 
5579
 *          this mouse event. Present if the the
 
5580
 *          kEventParamTabletEventType parameter contains
 
5581
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5582
 *          1.5, and later.
 
5583
 *    
 
5584
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5585
 *          Further information about the tablet event which generated
 
5586
 *          this mouse event. Present if the the
 
5587
 *          kEventParamTabletEventType parameter contains
 
5588
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5589
 *          CarbonLib 1.5, and later.
 
5590
 *  
 
5591
 *  Availability:
 
5592
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5593
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5594
 }
 
5595
const
 
5596
        kEventWindowClickContentRgn = 37;
 
5597
 
 
5598
{
 
5599
 *  kEventClassWindow / kEventWindowClickProxyIconRgn
 
5600
 *  
 
5601
 *  Summary:
 
5602
 *    Sent when the mouse is clicked in the proxy icon.
 
5603
 *  
 
5604
 *  Discussion:
 
5605
 *    The standard window handler responds to this event by handling
 
5606
 *    proxy icon dragging. It first sends a kEventWindowProxyBeginDrag
 
5607
 *    event to allow customization of the DragRef, and then calls
 
5608
 *    TrackWindowProxyFromExistingDrag. Finally, the standard window
 
5609
 *    handler sends a kEventWindowProxyEndDrag event. Note that this
 
5610
 *    event is not sent for composited windows; the window title view
 
5611
 *    handles the mouse-down event directly. To intercept a proxy icon
 
5612
 *    region click in a composited window, install a kEventControlClick
 
5613
 *    handler on the window�s title view.
 
5614
 *  
 
5615
 *  Mac OS X threading:
 
5616
 *    Not thread safe
 
5617
 *  
 
5618
 *  Parameters:
 
5619
 *    
 
5620
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5621
 *          The window that was clicked.
 
5622
 *    
 
5623
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5624
 *          The mouse location, in global coordinates.
 
5625
 *    
 
5626
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5627
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5628
 *          later.
 
5629
 *    
 
5630
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5631
 *          The window-relative position of the mouse in the window
 
5632
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5633
 *          top left of the structure of the window. Available in Mac
 
5634
 *          OS X 10.1 and later.
 
5635
 *    
 
5636
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5637
 *          The part code that the mouse location hit in the window.
 
5638
 *          This parameter only exists if the WindowRef parameter
 
5639
 *          exists. This saves you the trouble of calling FindWindow,
 
5640
 *          which is expensive on Mac OS X as it needs to call the
 
5641
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5642
 *    
 
5643
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5644
 *          The keyboard modifiers that were pressed when the event was
 
5645
 *          generated.
 
5646
 *    
 
5647
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5648
 *          Which mouse button was pressed.
 
5649
 *    
 
5650
 *    --> kEventParamClickCount (in, typeUInt32)
 
5651
 *          Whether this is a single click, double click, etc.
 
5652
 *    
 
5653
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5654
 *          Which other mouse buttons were pressed when the event was
 
5655
 *          generated. Available on Mac OS X only.
 
5656
 *    
 
5657
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5658
 *          The type of tablet event which generated this mouse event;
 
5659
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5660
 *          Only present if the event was generated from a tablet.
 
5661
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5662
 *    
 
5663
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5664
 *          Further information about the tablet event which generated
 
5665
 *          this mouse event. Present if the the
 
5666
 *          kEventParamTabletEventType parameter contains
 
5667
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5668
 *          1.5, and later.
 
5669
 *    
 
5670
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5671
 *          Further information about the tablet event which generated
 
5672
 *          this mouse event. Present if the the
 
5673
 *          kEventParamTabletEventType parameter contains
 
5674
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5675
 *          CarbonLib 1.5, and later.
 
5676
 *  
 
5677
 *  Availability:
 
5678
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5679
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5680
 }
 
5681
const
 
5682
        kEventWindowClickProxyIconRgn = 38;
 
5683
 
 
5684
{
 
5685
 *  kEventClassWindow / kEventWindowClickToolbarButtonRgn
 
5686
 *  
 
5687
 *  Summary:
 
5688
 *    Sent when the mouse is clicked in the toolbar button.
 
5689
 *  
 
5690
 *  Discussion:
 
5691
 *    For all windows, the basic window handler responds to this event
 
5692
 *    by tracking the click in the toolbar button. If the mouse is
 
5693
 *    released while still in the button, the basic window handler
 
5694
 *    sends a kEventWindowToolbarSwitchMode event. Note that this event
 
5695
 *    is not sent for composited windows; the window toolbar button
 
5696
 *    view handles the mouse-down event directly. To intercept a
 
5697
 *    toolbar button region click in a composited window, install a
 
5698
 *    kEventControlClick handler on the window�s toolbar button view.
 
5699
 *  
 
5700
 *  Mac OS X threading:
 
5701
 *    Not thread safe
 
5702
 *  
 
5703
 *  Parameters:
 
5704
 *    
 
5705
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5706
 *          The window that was clicked.
 
5707
 *    
 
5708
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5709
 *          The mouse location, in global coordinates.
 
5710
 *    
 
5711
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5712
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5713
 *          later.
 
5714
 *    
 
5715
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5716
 *          The window-relative position of the mouse in the window
 
5717
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5718
 *          top left of the structure of the window. Available in Mac
 
5719
 *          OS X 10.1 and later.
 
5720
 *    
 
5721
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5722
 *          The part code that the mouse location hit in the window.
 
5723
 *          This parameter only exists if the WindowRef parameter
 
5724
 *          exists. This saves you the trouble of calling FindWindow,
 
5725
 *          which is expensive on Mac OS X as it needs to call the
 
5726
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5727
 *    
 
5728
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5729
 *          The keyboard modifiers that were pressed when the event was
 
5730
 *          generated.
 
5731
 *    
 
5732
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5733
 *          Which mouse button was pressed.
 
5734
 *    
 
5735
 *    --> kEventParamClickCount (in, typeUInt32)
 
5736
 *          Whether this is a single click, double click, etc.
 
5737
 *    
 
5738
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5739
 *          Which other mouse buttons were pressed when the event was
 
5740
 *          generated. Available on Mac OS X only.
 
5741
 *    
 
5742
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5743
 *          The type of tablet event which generated this mouse event;
 
5744
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5745
 *          Only present if the event was generated from a tablet.
 
5746
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5747
 *    
 
5748
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5749
 *          Further information about the tablet event which generated
 
5750
 *          this mouse event. Present if the the
 
5751
 *          kEventParamTabletEventType parameter contains
 
5752
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5753
 *          1.5, and later.
 
5754
 *    
 
5755
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5756
 *          Further information about the tablet event which generated
 
5757
 *          this mouse event. Present if the the
 
5758
 *          kEventParamTabletEventType parameter contains
 
5759
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5760
 *          CarbonLib 1.5, and later.
 
5761
 *  
 
5762
 *  Availability:
 
5763
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5764
 *    CarbonLib:        not available
 
5765
 }
 
5766
const
 
5767
        kEventWindowClickToolbarButtonRgn = 41;
 
5768
 
 
5769
{
 
5770
 *  kEventClassWindow / kEventWindowClickStructureRgn
 
5771
 *  
 
5772
 *  Summary:
 
5773
 *    Sent when the mouse is clicked in some part of the window
 
5774
 *    structure other than the window widgets, drag region, or resize
 
5775
 *    region.
 
5776
 *  
 
5777
 *  Discussion:
 
5778
 *    The standard window handler responds to this event by calling
 
5779
 *    HIViewGetViewForMouseEvent to determine the HIView containing the
 
5780
 *    click. If a view is found, the standard window handler calls
 
5781
 *    HIViewClick, which will generate a kEventControlClick event. Note
 
5782
 *    that this event is not sent for composited windows; all parts of
 
5783
 *    the window frame are built from views, and the mouse will never
 
5784
 *    land outside of a view.
 
5785
 *  
 
5786
 *  Mac OS X threading:
 
5787
 *    Not thread safe
 
5788
 *  
 
5789
 *  Parameters:
 
5790
 *    
 
5791
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5792
 *          The window that was clicked.
 
5793
 *    
 
5794
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
5795
 *          The mouse location, in global coordinates.
 
5796
 *    
 
5797
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
5798
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
5799
 *          later.
 
5800
 *    
 
5801
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
5802
 *          The window-relative position of the mouse in the window
 
5803
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
5804
 *          top left of the structure of the window. Available in Mac
 
5805
 *          OS X 10.1 and later.
 
5806
 *    
 
5807
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
5808
 *          The part code that the mouse location hit in the window.
 
5809
 *          This parameter only exists if the WindowRef parameter
 
5810
 *          exists. This saves you the trouble of calling FindWindow,
 
5811
 *          which is expensive on Mac OS X as it needs to call the
 
5812
 *          Window Server. Available in Mac OS X 10.3 and later.
 
5813
 *    
 
5814
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5815
 *          The keyboard modifiers that were pressed when the event was
 
5816
 *          generated.
 
5817
 *    
 
5818
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
5819
 *          Which mouse button was pressed.
 
5820
 *    
 
5821
 *    --> kEventParamClickCount (in, typeUInt32)
 
5822
 *          Whether this is a single click, double click, etc.
 
5823
 *    
 
5824
 *    --> kEventParamMouseChord (in, typeUInt32)
 
5825
 *          Which other mouse buttons were pressed when the event was
 
5826
 *          generated. Available on Mac OS X only.
 
5827
 *    
 
5828
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
5829
 *          The type of tablet event which generated this mouse event;
 
5830
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
5831
 *          Only present if the event was generated from a tablet.
 
5832
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
5833
 *    
 
5834
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
5835
 *          Further information about the tablet event which generated
 
5836
 *          this mouse event. Present if the the
 
5837
 *          kEventParamTabletEventType parameter contains
 
5838
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
5839
 *          1.5, and later.
 
5840
 *    
 
5841
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
5842
 *          Further information about the tablet event which generated
 
5843
 *          this mouse event. Present if the the
 
5844
 *          kEventParamTabletEventType parameter contains
 
5845
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
5846
 *          CarbonLib 1.5, and later.
 
5847
 *  
 
5848
 *  Availability:
 
5849
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
5850
 *    CarbonLib:        not available
 
5851
 }
 
5852
const
 
5853
        kEventWindowClickStructureRgn = 42;
 
5854
 
 
5855
 
 
5856
{
 
5857
 *  kEventClassWindow / kEventWindowCursorChange
 
5858
 *  
 
5859
 *  Summary:
 
5860
 *    Sent when the mouse is moving over the content region of a window.
 
5861
 *  
 
5862
 *  Discussion:
 
5863
 *    This event is used to manage ownership of the cursor. You should
 
5864
 *    only change the cursor if you receive this event; otherwise,
 
5865
 *    someone else needed to adjust the cursor and handled the event
 
5866
 *    (e.g., a TSM Input Method when the mouse is over an inline input
 
5867
 *    region). This event is only sent to the window itself; it is not
 
5868
 *    propagated to controls in the window.
 
5869
 *  
 
5870
 *  Mac OS X threading:
 
5871
 *    Not thread safe
 
5872
 *  
 
5873
 *  Parameters:
 
5874
 *    
 
5875
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5876
 *          The window under the mouse.
 
5877
 *    
 
5878
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
5879
 *          The mouse location in global coordinates.
 
5880
 *    
 
5881
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
5882
 *          The current keyboard modifiers.
 
5883
 *  
 
5884
 *  Availability:
 
5885
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5886
 *    CarbonLib:        in CarbonLib 1.5 and later
 
5887
 }
 
5888
const
 
5889
        kEventWindowCursorChange = 40;
 
5890
 
 
5891
{
 
5892
 *  kEventClassWindow / kEventWindowCollapse
 
5893
 *  
 
5894
 *  Summary:
 
5895
 *    A request to collapse a window.
 
5896
 *  
 
5897
 *  Discussion:
 
5898
 *    For all windows, the basic window handler responds to this event
 
5899
 *    by calling CollapseWindow, passing true for the collapse
 
5900
 *    parameter, which sends kEventWindowCollapsing and
 
5901
 *    kEventWindowCollapsed events. This event is generated by the
 
5902
 *    standard window handler in response to a click in a window�s
 
5903
 *    collapse button. It is also generated by the basic window handler
 
5904
 *    when Minimize or Collapse is selected from the standard window
 
5905
 *    menu.
 
5906
 *  
 
5907
 *  Mac OS X threading:
 
5908
 *    Not thread safe
 
5909
 *  
 
5910
 *  Parameters:
 
5911
 *    
 
5912
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5913
 *          The window that should collapse.
 
5914
 *  
 
5915
 *  Availability:
 
5916
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5917
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5918
 }
 
5919
const
 
5920
        kEventWindowCollapse = 66;
 
5921
 
 
5922
{
 
5923
 *  kEventClassWindow / kEventWindowCollapseAll
 
5924
 *  
 
5925
 *  Summary:
 
5926
 *    A request to collapse all windows.
 
5927
 *  
 
5928
 *  Discussion:
 
5929
 *    For all windows, the basic window handler responds to this event
 
5930
 *    by calling CollapseAllWindows, passing true for the collapse
 
5931
 *    parameter. CollapseAllWindows simply calls CollapseWindow on each
 
5932
 *    window; it does not send a kEventWindowCollapse to each window.
 
5933
 *    This event is generated by the standard window handler in
 
5934
 *    response to an option-click in a window�s collapse button. It is
 
5935
 *    also generated by the basic window handler when Minimize All or
 
5936
 *    Collapse All is selected from the standard window menu.
 
5937
 *  
 
5938
 *  Mac OS X threading:
 
5939
 *    Not thread safe
 
5940
 *  
 
5941
 *  Parameters:
 
5942
 *    
 
5943
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5944
 *          The window whose collapse button was clicked.
 
5945
 *  
 
5946
 *  Availability:
 
5947
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5948
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5949
 }
 
5950
const
 
5951
        kEventWindowCollapseAll = 68;
 
5952
 
 
5953
{
 
5954
 *  kEventClassWindow / kEventWindowExpand
 
5955
 *  
 
5956
 *  Summary:
 
5957
 *    A request to expand a window.
 
5958
 *  
 
5959
 *  Discussion:
 
5960
 *    For all windows, the basic window handler responds to this event
 
5961
 *    by calling CollapseWindow, passing false for the collapse
 
5962
 *    parameter, which sends kEventWindowExpanding and
 
5963
 *    kEventWindowExpanded events. This event is generated by the
 
5964
 *    standard window handler in responds to a click in a collapsed
 
5965
 *    window�s collapse button. It is also generated by the basic
 
5966
 *    window handler when Uncollapse is selected from from the standard
 
5967
 *    window menu provided by CarbonLib. 
 
5968
 *    
 
5969
 *    Note that you will not receive this event on Mac OS X before a
 
5970
 *    window is expanded from the Dock, since minimized windows in the
 
5971
 *    dock don�t uses collapse buttons to unminimize. However, you will
 
5972
 *    still receive kEventWindowExpanding and kEventWindowExpanded in
 
5973
 *    that case. You will receive this event on Mac OS 8 and 9 using
 
5974
 *    CarbonLib since collapsed windows do have a collapse button there.
 
5975
 *  
 
5976
 *  Mac OS X threading:
 
5977
 *    Not thread safe
 
5978
 *  
 
5979
 *  Parameters:
 
5980
 *    
 
5981
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
5982
 *          The window that should expand.
 
5983
 *  
 
5984
 *  Availability:
 
5985
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
5986
 *    CarbonLib:        in CarbonLib 1.1 and later
 
5987
 }
 
5988
const
 
5989
        kEventWindowExpand = 69;
 
5990
 
 
5991
{
 
5992
 *  kEventClassWindow / kEventWindowExpandAll
 
5993
 *  
 
5994
 *  Summary:
 
5995
 *    A request to expand all windows.
 
5996
 *  
 
5997
 *  Discussion:
 
5998
 *    For all windows, the basic window handler responds to this event
 
5999
 *    by calling CollapseAllWindows, passing false for the collapse
 
6000
 *    parameter. On Mac OS X 10.3 and later, CollapseAllWindows sends a
 
6001
 *    kEventWindowExpand event to each window; on earlier version of
 
6002
 *    Mac OS X, and in CarbonLib, it simply calls CollapseWindow on
 
6003
 *    each window. This event is generated by the standard window
 
6004
 *    handler in response to an option-click in a window�s collapse
 
6005
 *    button. It is also generated by the basic window handler when
 
6006
 *    Uncollapse All is selected from the standard window menu provided
 
6007
 *    by CarbonLib.
 
6008
 *  
 
6009
 *  Mac OS X threading:
 
6010
 *    Not thread safe
 
6011
 *  
 
6012
 *  Parameters:
 
6013
 *    
 
6014
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6015
 *          The window whose collapse button was clicked.
 
6016
 *  
 
6017
 *  Availability:
 
6018
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6019
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6020
 }
 
6021
const
 
6022
        kEventWindowExpandAll = 71;
 
6023
 
 
6024
{
 
6025
 *  kEventClassWindow / kEventWindowClose
 
6026
 *  
 
6027
 *  Summary:
 
6028
 *    A request to close a window.
 
6029
 *  
 
6030
 *  Discussion:
 
6031
 *    The standard window handler responds to this event by calling
 
6032
 *    DisposeWindow. This event is generated by the standard window
 
6033
 *    handler in response to a click in a window�s close button. On Mac
 
6034
 *    OS X 10.3 and later, it is also generated when the Close menu
 
6035
 *    item is selected from the Dock menu of a minimized window.
 
6036
 *    
 
6037
 *    
 
6038
 *    Your application would typically intercept this event to check if
 
6039
 *    the window�s document is dirty, and display a Save Changes alert
 
6040
 *    if so. 
 
6041
 *    
 
6042
 *    In order to support closing minimized windows from the Dock, your
 
6043
 *    application must provide an event hander for this event,
 
6044
 *    installed on the window�s event target, even if your application
 
6045
 *    does not use the standard window handler or otherwise use Carbon
 
6046
 *    events.
 
6047
 *  
 
6048
 *  Mac OS X threading:
 
6049
 *    Not thread safe
 
6050
 *  
 
6051
 *  Parameters:
 
6052
 *    
 
6053
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6054
 *          The window that should close.
 
6055
 *  
 
6056
 *  Availability:
 
6057
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6058
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6059
 }
 
6060
const
 
6061
        kEventWindowClose = 72;
 
6062
 
 
6063
{
 
6064
 *  kEventClassWindow / kEventWindowCloseAll
 
6065
 *  
 
6066
 *  Summary:
 
6067
 *    A request to close all windows.
 
6068
 *  
 
6069
 *  Discussion:
 
6070
 *    The standard window handler responds to this event by sending a
 
6071
 *    kEventWindowClose event to all visible windows of the same window
 
6072
 *    class as the target window. This event is generated by the
 
6073
 *    standard window handler in response to an option-click in a
 
6074
 *    window�s close button.
 
6075
 *  
 
6076
 *  Mac OS X threading:
 
6077
 *    Not thread safe
 
6078
 *  
 
6079
 *  Parameters:
 
6080
 *    
 
6081
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6082
 *          The window whose close button was clicked.
 
6083
 *  
 
6084
 *  Availability:
 
6085
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6086
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6087
 }
 
6088
const
 
6089
        kEventWindowCloseAll = 74;
 
6090
 
 
6091
{
 
6092
 *  kEventClassWindow / kEventWindowZoom
 
6093
 *  
 
6094
 *  Summary:
 
6095
 *    A request to zoom a window.
 
6096
 *  
 
6097
 *  Discussion:
 
6098
 *    For all windows, the basic window handler responds to this event
 
6099
 *    by sending a kEventWindowIdealSize event to get the window�s
 
6100
 *    ideal size, and then calling ZoomWindowIdeal. This event is
 
6101
 *    generated by the standard window handler in response to a click
 
6102
 *    in the window�s zoom button. It is also generated by the basic
 
6103
 *    window handler when Zoom is selected from the standard window
 
6104
 *    menu.
 
6105
 *  
 
6106
 *  Mac OS X threading:
 
6107
 *    Not thread safe
 
6108
 *  
 
6109
 *  Parameters:
 
6110
 *    
 
6111
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6112
 *          The window that should zoom.
 
6113
 *    
 
6114
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
6115
 *          The part code (inZoomIn or inZoomOut) that should be passed
 
6116
 *          to ZoomWindow or ZoomWindowIdeal. This parameter is
 
6117
 *          optional and may not be present in all instances of this
 
6118
 *          event. If present, the event handler should determine if
 
6119
 *          the window is already in the requested state (i.e., if the
 
6120
 *          part code is inZoomOut and the window is already in the
 
6121
 *          standard state), and if so, the event handler should not
 
6122
 *          zoom the window at all. If this parameter is not present,
 
6123
 *          the event handler should zoom the window based on its
 
6124
 *          current state. This parameter is available in Mac OS X 10.3
 
6125
 *          and later.
 
6126
 *  
 
6127
 *  Availability:
 
6128
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6129
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6130
 }
 
6131
const
 
6132
        kEventWindowZoom = 75;
 
6133
 
 
6134
{
 
6135
 *  kEventClassWindow / kEventWindowZoomAll
 
6136
 *  
 
6137
 *  Summary:
 
6138
 *    A request to zoom all windows.
 
6139
 *  
 
6140
 *  Discussion:
 
6141
 *    The standard window handler responds to this event by zooming all
 
6142
 *    visible windows of the same window class as the target window. On
 
6143
 *    Mac OS X 10.3 and later, it causes each window to zoom by sending
 
6144
 *    a kEventWindowZoom event to the window; on earlier versions of
 
6145
 *    Mac OS X, and in CarbonLib, it simply calls ZoomWindowIdeal on
 
6146
 *    each window. This event is generated by the standard window
 
6147
 *    handler in response to an option-click on a window�s zoom button.
 
6148
 *    
 
6149
 *    
 
6150
 *    After zooming all of the windows, if the windows are being zoomed
 
6151
 *    out and the window class of the target window is
 
6152
 *    kDocumentWindowClass, the windows are cascaded by sending a
 
6153
 *    kEventCommandProcess event with the kHICommandArrangeInFront
 
6154
 *    command to the target window.
 
6155
 *  
 
6156
 *  Mac OS X threading:
 
6157
 *    Not thread safe
 
6158
 *  
 
6159
 *  Parameters:
 
6160
 *    
 
6161
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6162
 *          The window whose zoom button was clicked.
 
6163
 *  
 
6164
 *  Availability:
 
6165
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6166
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6167
 }
 
6168
const
 
6169
        kEventWindowZoomAll = 77;
 
6170
 
 
6171
{
 
6172
 *  kEventClassWindow / kEventWindowContextualMenuSelect
 
6173
 *  
 
6174
 *  Summary:
 
6175
 *    A request to display a contextual menu.
 
6176
 *  
 
6177
 *  Discussion:
 
6178
 *    This event is generated by the standard window handler in
 
6179
 *    response to a contextual menu click in the content area of a
 
6180
 *    window. In response to such an event, the standard window handler
 
6181
 *    first checks if the click is on a control, and if so, calls
 
6182
 *    HandleControlContextualMenuClick. If the click was not on a
 
6183
 *    control, or if HandleControlContextualMenuClick returned that it
 
6184
 *    did not handle the click, then the standard window handler sends
 
6185
 *    kEventWindowContextualMenuSelect to allow the application to
 
6186
 *    provide its own customized contextual menu. The standard window
 
6187
 *    handler does not respond to this event itself.
 
6188
 *  
 
6189
 *  Mac OS X threading:
 
6190
 *    Not thread safe
 
6191
 *  
 
6192
 *  Parameters:
 
6193
 *    
 
6194
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6195
 *          The window that should collapse.
 
6196
 *    
 
6197
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
6198
 *          The mouse location, in global coordinates.
 
6199
 *    
 
6200
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
6201
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
6202
 *          later.
 
6203
 *    
 
6204
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
6205
 *          The window-relative position of the mouse in the window
 
6206
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
6207
 *          top left of the structure of the window. Available in Mac
 
6208
 *          OS X 10.1 and later.
 
6209
 *    
 
6210
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
6211
 *          The part code that the mouse location hit in the window.
 
6212
 *          This parameter only exists if the WindowRef parameter
 
6213
 *          exists. This saves you the trouble of calling FindWindow,
 
6214
 *          which is expensive on Mac OS X as it needs to call the
 
6215
 *          Window Server. Available in Mac OS X 10.3 and later.
 
6216
 *    
 
6217
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
6218
 *          The keyboard modifiers that were pressed when the event was
 
6219
 *          generated.
 
6220
 *    
 
6221
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
6222
 *          Which mouse button was pressed.
 
6223
 *    
 
6224
 *    --> kEventParamClickCount (in, typeUInt32)
 
6225
 *          Whether this is a single click, double click, etc.
 
6226
 *    
 
6227
 *    --> kEventParamMouseChord (in, typeUInt32)
 
6228
 *          Which other mouse buttons were pressed when the event was
 
6229
 *          generated. Available on Mac OS X only.
 
6230
 *    
 
6231
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
6232
 *          The type of tablet event which generated this mouse event;
 
6233
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
6234
 *          Only present if the event was generated from a tablet.
 
6235
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
6236
 *    
 
6237
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
6238
 *          Further information about the tablet event which generated
 
6239
 *          this mouse event. Present if the the
 
6240
 *          kEventParamTabletEventType parameter contains
 
6241
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
6242
 *          1.5, and later.
 
6243
 *    
 
6244
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
6245
 *          Further information about the tablet event which generated
 
6246
 *          this mouse event. Present if the the
 
6247
 *          kEventParamTabletEventType parameter contains
 
6248
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
6249
 *          CarbonLib 1.5, and later.
 
6250
 *  
 
6251
 *  Availability:
 
6252
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6253
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6254
 }
 
6255
const
 
6256
        kEventWindowContextualMenuSelect = 78;
 
6257
 
 
6258
{
 
6259
 *  kEventClassWindow / kEventWindowPathSelect
 
6260
 *  
 
6261
 *  Summary:
 
6262
 *    Allows customization of the path-selection popup menu displayed
 
6263
 *    over a window�s title.
 
6264
 *  
 
6265
 *  Discussion:
 
6266
 *    This event is generated by the standard window handler in
 
6267
 *    response to a click in a window�s drag region. In response to
 
6268
 *    such an event, the standard window handler first calls
 
6269
 *    IsWindowPathSelectEvent to determine if the click should cause a
 
6270
 *    path-selection popup menu to be displayed. If so, and if the
 
6271
 *    window is also hilited and has a proxy icon, the standard window
 
6272
 *    handler sends a kEventWindowPathSelect event to the window.
 
6273
 *    
 
6274
 *    
 
6275
 *    A handler for this event should put a MenuRef into the event and
 
6276
 *    return noErr to cause the menu to be displayed as the path
 
6277
 *    selection popup menu. The menu will not be released by the
 
6278
 *    standard window handler; however, in Mac OS X 10.4 and later, it
 
6279
 *    will be retained by the EventRef when added to the event, and
 
6280
 *    released when the event is destroyed, so a handler for this event
 
6281
 *    may, on Mac OS X 10.4 and later, release the menu after adding it
 
6282
 *    to the menu. 
 
6283
 *    
 
6284
 *    Note! The standard window handler's use of this event was broken
 
6285
 *    in all releases of CarbonLib and Mac OS X before Mac OS X 10.4;
 
6286
 *    the MenuRef added to this event was not used to display the path
 
6287
 *    selection menu. Therefore, this event is effectively useless
 
6288
 *    before Mac OS X 10.4.
 
6289
 *  
 
6290
 *  Mac OS X threading:
 
6291
 *    Not thread safe
 
6292
 *  
 
6293
 *  Parameters:
 
6294
 *    
 
6295
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6296
 *          The window that will display the path-selection popup menu.
 
6297
 *    
 
6298
 *    <-- kEventParamMenuRef (out, typeMenuRef)
 
6299
 *          On exit, contains the menu that should be displayed.
 
6300
 *  
 
6301
 *  Availability:
 
6302
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6303
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6304
 }
 
6305
const
 
6306
        kEventWindowPathSelect = 79;
 
6307
 
 
6308
{
 
6309
 *  kEventClassWindow / kEventWindowGetIdealSize
 
6310
 *  
 
6311
 *  Summary:
 
6312
 *    A request for the ideal size of a window�s content region, for
 
6313
 *    use during window zooming.
 
6314
 *  
 
6315
 *  Discussion:
 
6316
 *    This event is generated by the basic window handler in response
 
6317
 *    to kEventWindowZoom. The basic window handler sends this event to
 
6318
 *    the window to get the window�s ideal size, and passes the
 
6319
 *    resulting size to ZoomWindowIdeal. 
 
6320
 *    
 
6321
 *    This event is not handled by either the basic or standard window
 
6322
 *    handlers. If no handler responds to this event, the basic window
 
6323
 *    handler uses an ideal size based on the size of the monitor on
 
6324
 *    which the window is located. 
 
6325
 *    
 
6326
 *    Prior to Mac OS X Mac OS X 10.4, the ZoomWindowIdeal API
 
6327
 *    malfunctioned if passed an idealSize that was large enough to
 
6328
 *    cause 16-bit integer overflow when added to the window's current
 
6329
 *    position. Therefore, when providing an ideal size in response to
 
6330
 *    this event, you should generally not return values that are close
 
6331
 *    to 32767. It is better to limit your ideal size to, say, 16K.
 
6332
 *  
 
6333
 *  Mac OS X threading:
 
6334
 *    Not thread safe
 
6335
 *  
 
6336
 *  Parameters:
 
6337
 *    
 
6338
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6339
 *          The window being zoomed.
 
6340
 *    
 
6341
 *    <-- kEventParamDimensions (out, typeQDPoint)
 
6342
 *          On exit, contains the window�s ideal size.
 
6343
 *  
 
6344
 *  Availability:
 
6345
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6346
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6347
 }
 
6348
const
 
6349
        kEventWindowGetIdealSize = 80;
 
6350
 
 
6351
{
 
6352
 *  kEventClassWindow / kEventWindowGetMinimumSize
 
6353
 *  
 
6354
 *  Summary:
 
6355
 *    A request for the minimum size of a window�s content region, for
 
6356
 *    use during window resizing.
 
6357
 *  
 
6358
 *  Discussion:
 
6359
 *    This event is generated by the standard window handler before
 
6360
 *    resizing a window. On Mac OS X 10.2 and later, the basic window
 
6361
 *    handler responds to this event by calling GetWindowResizeLimits
 
6362
 *    and returning the minimum size in the event; on earlier versions
 
6363
 *    of Mac OS X and CarbonLib, this event is not handled by the basic
 
6364
 *    or standard window handlers. 
 
6365
 *    
 
6366
 *    On Mac OS X 10.2 and CarbonLib 1.6 and later, this event is also
 
6367
 *    generated by ResizeWindow and GrowWindow if the sizeConstraints
 
6368
 *    parameter is NULL.
 
6369
 *  
 
6370
 *  Mac OS X threading:
 
6371
 *    Not thread safe
 
6372
 *  
 
6373
 *  Parameters:
 
6374
 *    
 
6375
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6376
 *          The window being resized.
 
6377
 *    
 
6378
 *    <-- kEventParamDimensions (out, typeQDPoint)
 
6379
 *          On exit, contains the window�s minimum size.
 
6380
 *  
 
6381
 *  Availability:
 
6382
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6383
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6384
 }
 
6385
const
 
6386
        kEventWindowGetMinimumSize = 81;
 
6387
 
 
6388
{
 
6389
 *  kEventClassWindow / kEventWindowGetMaximumSize
 
6390
 *  
 
6391
 *  Summary:
 
6392
 *    A request for the maximum size of a window�s content region, for
 
6393
 *    use during window resizing.
 
6394
 *  
 
6395
 *  Discussion:
 
6396
 *    This event is generated by the standard window handler before
 
6397
 *    resizing a window. On Mac OS X 10.2 and later, the basic window
 
6398
 *    handler responds to this event by calling GetWindowResizeLimits
 
6399
 *    and returning the maximum size in the event; on earlier versions
 
6400
 *    of Mac OS X and CarbonLib, this event is not handled by the basic
 
6401
 *    or standard window handlers. 
 
6402
 *    
 
6403
 *    On Mac OS X 10.2 and CarbonLib 1.6 and later, this event is also
 
6404
 *    generated by ResizeWindow and GrowWindow if the sizeConstraints
 
6405
 *    parameter is NULL.
 
6406
 *  
 
6407
 *  Mac OS X threading:
 
6408
 *    Not thread safe
 
6409
 *  
 
6410
 *  Parameters:
 
6411
 *    
 
6412
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6413
 *          The window being resized.
 
6414
 *    
 
6415
 *    <-- kEventParamDimensions (out, typeQDPoint)
 
6416
 *          On exit, contains the window�s minimum size.
 
6417
 *  
 
6418
 *  Availability:
 
6419
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6420
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6421
 }
 
6422
const
 
6423
        kEventWindowGetMaximumSize = 82;
 
6424
 
 
6425
{
 
6426
 *  kEventClassWindow / kEventWindowConstrain
 
6427
 *  
 
6428
 *  Summary:
 
6429
 *    Requests that a window�s position be constrained to the available
 
6430
 *    window positioning bounds.
 
6431
 *  
 
6432
 *  Discussion:
 
6433
 *    The basic window handler responds to this event by calling
 
6434
 *    ConstrainWindowToScreen. This event is generated in two
 
6435
 *    situations: changes in graphics device configuration, and changes
 
6436
 *    to Dock size. In either case, a window which was previously
 
6437
 *    visible onscreen may become obscured or be totally offscreen, and
 
6438
 *    should be repositioned back inside the available window
 
6439
 *    positioning bounds. 
 
6440
 *    
 
6441
 *    The behavior of the basic window handler may be customized by
 
6442
 *    modifying the parameters to the event and then allowing the event
 
6443
 *    to pass through to the basic handler, or an application may
 
6444
 *    choose to override the event entirely and perform its own window
 
6445
 *    constraining. 
 
6446
 *    
 
6447
 *    Applications may also use the
 
6448
 *    kEventAppAvailableWindowBoundsChanged event to be notified of
 
6449
 *    changes to a device�s available bounds.
 
6450
 *  
 
6451
 *  Mac OS X threading:
 
6452
 *    Not thread safe
 
6453
 *  
 
6454
 *  Parameters:
 
6455
 *    
 
6456
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6457
 *          The window being constrained.
 
6458
 *    
 
6459
 *    --> kEventParamAvailableBounds (in, typeQDRectangle)
 
6460
 *          The reasons why the window is being constrained. This
 
6461
 *          parameter contains one or more of the
 
6462
 *          kAvailBoundsChangedFor constants. This parameter is
 
6463
 *          available only on Mac OS X 10.3 and later.
 
6464
 *    
 
6465
 *    --> kEventParamAttributes (in, typeUInt32)
 
6466
 *          An integer which is the same for all instances of this
 
6467
 *          event that are produced by the same configuration change.
 
6468
 *          For example, if multiple displays are attached, then this
 
6469
 *          event is sent once for each window on each affected display
 
6470
 *          after a display configuration change; however, the
 
6471
 *          transaction ID parameter will the same for each event, so a
 
6472
 *          handler for this event can correlate events by observing
 
6473
 *          the transaction ID. This parameter is available only on Mac
 
6474
 *          OS X 10.3 and later.
 
6475
 *    
 
6476
 *    --> kEventParamWindowRegionCode (in, typeWindowRegionCode)
 
6477
 *          The available window positioning bounds in which the window
 
6478
 *          should be positioned. Event handlers may change the value
 
6479
 *          in this parameter and then return eventNotHandledErr to
 
6480
 *          allow the basic window handler to constrain the window to
 
6481
 *          the new bounding rect. 
 
6482
 *          
 
6483
 *          This parameter is used by the basic window handler on Mac
 
6484
 *          OS X 10.1 and later; on earlier versions of Mac OS X, the
 
6485
 *          basic window handler always constrains the window to the
 
6486
 *          rect returned by GetAvailableWindowPositioningBounds for
 
6487
 *          the window�s device.
 
6488
 *    
 
6489
 *    --> kEventParamRgnHandle (in, typeQDRgnHandle)
 
6490
 *          Window constraint options that should be passed to
 
6491
 *          ConstrainWindowToScreen. This parameter is optional and may
 
6492
 *          not be present in all instances of this event. If present,
 
6493
 *          this parameter should be formed from constants in the
 
6494
 *          WindowConstrainOptions enumeration. 
 
6495
 *          
 
6496
 *          This parameter is used by the basic window handler on Mac
 
6497
 *          OS X 10.2 and later; on earlier versions of Mac OS X, or if
 
6498
 *          this parameter is missing, the basic window handler passes
 
6499
 *          kWindowConstrainMoveRegardlessOfFit to
 
6500
 *          ConstrainWindowToScreen in Mac OS X 10.0, and
 
6501
 *          kWindowConstrainMoveRegardlessOfFit |
 
6502
 *          kWindowConstrainAllowPartial in Mac OS 10.1 and later.
 
6503
 *    
 
6504
 *    --> kEventParamPreviousDockRect (in, typeHIRect)
 
6505
 *          A WindowRegionCode that should be passed to
 
6506
 *          ConstrainWindowToScreen. This parameter is optional and may
 
6507
 *          not be present in all instances of this event. 
 
6508
 *          
 
6509
 *          This parameter is used by the basic window handler on Mac
 
6510
 *          OS X 10.2 and later. On earlier versions of Mac OS X, or if
 
6511
 *          this parameter is missing, the basic window handler passes
 
6512
 *          kWindowDragRgn to ConstrainWindowToScreen.
 
6513
 *    
 
6514
 *    --> kEventParamPreviousDockDevice (in, typeGDHandle)
 
6515
 *          The GrayRgn before a graphics device configuration change.
 
6516
 *          This parameter is optional and may not be present in all
 
6517
 *          instances of this event. It is present in events generated
 
6518
 *          on Mac OS X 10.2 and later. 
 
6519
 *          
 
6520
 *          An event handler may compare this region with the current
 
6521
 *          GrayRgn to more intelligently determine whether the window
 
6522
 *          should be constrained to the current GrayRgn. The basic
 
6523
 *          window handler in Mac OS X 10.2 will not constrain windows
 
6524
 *          that were not onscreen before the device configuration
 
6525
 *          change.
 
6526
 *    
 
6527
 *    --> kEventParamCurrentDockRect (in, typeHIRect)
 
6528
 *          The Dock bounding rect before a Dock size change. This
 
6529
 *          parameter is optional and may not be present in all
 
6530
 *          instances of this event. It is present in events in events
 
6531
 *          generated on Mac OS X 10.2 and later.
 
6532
 *    
 
6533
 *    --> kEventParamCurrentDockDevice (in, typeGDHandle)
 
6534
 *          The GDevice on which the Dock was previously positioned.
 
6535
 *          This parameter is optional and may not be present in all
 
6536
 *          instances of this event. It is present in events generated
 
6537
 *          on Mac OS X 10.3 and later.
 
6538
 *    
 
6539
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
6540
 *          The Dock bounding rect after a Dock size change. This
 
6541
 *          parameter is optional and may not be present in all
 
6542
 *          instances of this event. It is present in events in events
 
6543
 *          generated on Mac OS X 10.2 and later.
 
6544
 *    
 
6545
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
6546
 *          The GDevice on which the Dock is currently positioned. This
 
6547
 *          parameter is optional and may not be present in all
 
6548
 *          instances of this event. It is present in events generated
 
6549
 *          on Mac OS X 10.3 and later.
 
6550
 *  
 
6551
 *  Availability:
 
6552
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6553
 *    CarbonLib:        in CarbonLib 1.5 and later
 
6554
 }
 
6555
const
 
6556
        kEventWindowConstrain = 83;
 
6557
 
 
6558
{
 
6559
 *  kEventClassWindow / kEventWindowProxyBeginDrag
 
6560
 *  
 
6561
 *  Summary:
 
6562
 *    Notification that a proxy icon drag is beginning.
 
6563
 *  
 
6564
 *  Discussion:
 
6565
 *    This event includes the DragRef that will be used for the proxy
 
6566
 *    icon drag. An application handler may attach its own data to the
 
6567
 *    DragRef as appropriate for the document content.
 
6568
 *  
 
6569
 *  Mac OS X threading:
 
6570
 *    Not thread safe
 
6571
 *  
 
6572
 *  Parameters:
 
6573
 *    
 
6574
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6575
 *          The window whose proxy icon is being dragged.
 
6576
 *    
 
6577
 *    --> kEventParamDragRef (in, typeDragRef)
 
6578
 *          The DragRef that will be used for the proxy icon drag.
 
6579
 *  
 
6580
 *  Availability:
 
6581
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6582
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6583
 }
 
6584
const
 
6585
        kEventWindowProxyBeginDrag = 128;
 
6586
 
 
6587
{
 
6588
 *  kEventClassWindow / kEventWindowProxyEndDrag
 
6589
 *  
 
6590
 *  Summary:
 
6591
 *    Notification that a proxy icon drag has ended.
 
6592
 *  
 
6593
 *  Discussion:
 
6594
 *    This event is sent regardless of whether the drag completed
 
6595
 *    successfully, or was canceled by the user.
 
6596
 *  
 
6597
 *  Mac OS X threading:
 
6598
 *    Not thread safe
 
6599
 *  
 
6600
 *  Parameters:
 
6601
 *    
 
6602
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6603
 *          The window whose proxy icon is being dragged.
 
6604
 *    
 
6605
 *    --> kEventParamDragRef (in, typeDragRef)
 
6606
 *          The DragRef that was used for the proxy icon drag.
 
6607
 *  
 
6608
 *  Availability:
 
6609
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6610
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6611
 }
 
6612
const
 
6613
        kEventWindowProxyEndDrag = 129;
 
6614
 
 
6615
{
 
6616
 *  kEventClassWindow / kEventWindowHandleContentClick
 
6617
 *  
 
6618
 *  Summary:
 
6619
 *    The mouse has been clicked in the content region of a window, but
 
6620
 *    the click is not a contextual menu invocation or a click on a
 
6621
 *    control.
 
6622
 *  
 
6623
 *  Discussion:
 
6624
 *    This event is generated by the standard window handler in
 
6625
 *    response to a kEventWindowClickContentRgn event. An application
 
6626
 *    may handle this event by checking if the mouse click was on a
 
6627
 *    portion of its own user interface, and responding appropriately
 
6628
 *    if so.
 
6629
 *  
 
6630
 *  Mac OS X threading:
 
6631
 *    Not thread safe
 
6632
 *  
 
6633
 *  Parameters:
 
6634
 *    
 
6635
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6636
 *          The window that was clicked.
 
6637
 *    
 
6638
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
6639
 *          The mouse location, in global coordinates.
 
6640
 *    
 
6641
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
6642
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
6643
 *          later.
 
6644
 *    
 
6645
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
6646
 *          The window-relative position of the mouse in the window
 
6647
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
6648
 *          top left of the structure of the window. Available in Mac
 
6649
 *          OS X 10.1 and later.
 
6650
 *    
 
6651
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
6652
 *          The part code that the mouse location hit in the window.
 
6653
 *          This parameter only exists if the WindowRef parameter
 
6654
 *          exists. This saves you the trouble of calling FindWindow,
 
6655
 *          which is expensive on Mac OS X as it needs to call the
 
6656
 *          Window Server. Available in Mac OS X 10.3 and later.
 
6657
 *    
 
6658
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
6659
 *          The keyboard modifiers that were pressed when the event was
 
6660
 *          generated.
 
6661
 *    
 
6662
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
6663
 *          Which mouse button was pressed.
 
6664
 *    
 
6665
 *    --> kEventParamClickCount (in, typeUInt32)
 
6666
 *          Whether this is a single click, double click, etc.
 
6667
 *    
 
6668
 *    --> kEventParamMouseChord (in, typeUInt32)
 
6669
 *          Which other mouse buttons were pressed when the event was
 
6670
 *          generated. Available on Mac OS X only.
 
6671
 *    
 
6672
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
6673
 *          The type of tablet event which generated this mouse event;
 
6674
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
6675
 *          Only present if the event was generated from a tablet.
 
6676
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
6677
 *    
 
6678
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
6679
 *          Further information about the tablet event which generated
 
6680
 *          this mouse event. Present if the the
 
6681
 *          kEventParamTabletEventType parameter contains
 
6682
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
6683
 *          1.5, and later.
 
6684
 *    
 
6685
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
6686
 *          Further information about the tablet event which generated
 
6687
 *          this mouse event. Present if the the
 
6688
 *          kEventParamTabletEventType parameter contains
 
6689
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
6690
 *          CarbonLib 1.5, and later.
 
6691
 *  
 
6692
 *  Availability:
 
6693
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6694
 *    CarbonLib:        in CarbonLib 1.3.1 and later
 
6695
 }
 
6696
const
 
6697
        kEventWindowHandleContentClick = 85;
 
6698
 
 
6699
{
 
6700
 *  kEventClassWindow / kEventWindowGetDockTileMenu
 
6701
 *  
 
6702
 *  Summary:
 
6703
 *    A request for a menu to be displayed by a window�s dock tile.
 
6704
 *  
 
6705
 *  Discussion:
 
6706
 *    The basic window handler responds to this event by returning the
 
6707
 *    menu, if any, that was provided by the SetWindowDockTileMenu API.
 
6708
 *    For most applications, it will be easier to use the
 
6709
 *    SetWindowDockTileMenu API directly rather than installing a
 
6710
 *    handler for this event.
 
6711
 *  
 
6712
 *  Mac OS X threading:
 
6713
 *    Not thread safe
 
6714
 *  
 
6715
 *  Parameters:
 
6716
 *    
 
6717
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6718
 *          The window that should collapse.
 
6719
 *    
 
6720
 *    <-- kEventParamMenuRef (out, typeMenuRef)
 
6721
 *          On exit, contains the menu that should be displayed for the
 
6722
 *          window�s Dock tile. The sender of this event will release
 
6723
 *          the menu after the Dock has displayed it, so if you return
 
6724
 *          a permanently allocated MenuRef, you should call RetainMenu
 
6725
 *          on it before returning from your event handler.
 
6726
 *  
 
6727
 *  Availability:
 
6728
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
6729
 *    CarbonLib:        not available
 
6730
 }
 
6731
const
 
6732
        kEventWindowGetDockTileMenu = 90;
 
6733
 
 
6734
{
 
6735
 *  kEventClassWindow / kEventWindowToolbarSwitchMode
 
6736
 *  
 
6737
 *  Summary:
 
6738
 *    A request that the window�s toolbar change its display mode.
 
6739
 *  
 
6740
 *  Discussion:
 
6741
 *    For all windows, the basic window handler responds to this event
 
6742
 *    by changing the display mode of the window�s HIToolbar, if any.
 
6743
 *    If the application uses its own custom toolbar implementation, it
 
6744
 *    should handle this event itself and respond appropriately. This
 
6745
 *    event is generated by the basic window handler in response to a
 
6746
 *    click in the window�s toolbar button.
 
6747
 *  
 
6748
 *  Mac OS X threading:
 
6749
 *    Not thread safe
 
6750
 *  
 
6751
 *  Parameters:
 
6752
 *    
 
6753
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6754
 *          The window whose toolbar button was clicked.
 
6755
 *    
 
6756
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
6757
 *          The mouse location, in global coordinates.
 
6758
 *    
 
6759
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
6760
 *          The window under the mouse. Available in Mac OS X 10.1 and
 
6761
 *          later.
 
6762
 *    
 
6763
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
6764
 *          The window-relative position of the mouse in the window
 
6765
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
6766
 *          top left of the structure of the window. Available in Mac
 
6767
 *          OS X 10.1 and later.
 
6768
 *    
 
6769
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
6770
 *          The part code that the mouse location hit in the window.
 
6771
 *          This parameter only exists if the WindowRef parameter
 
6772
 *          exists. This saves you the trouble of calling FindWindow,
 
6773
 *          which is expensive on Mac OS X as it needs to call the
 
6774
 *          Window Server. Available in Mac OS X 10.3 and later.
 
6775
 *    
 
6776
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
6777
 *          The keyboard modifiers that were pressed when the event was
 
6778
 *          generated.
 
6779
 *    
 
6780
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
6781
 *          Which mouse button was pressed.
 
6782
 *    
 
6783
 *    --> kEventParamClickCount (in, typeUInt32)
 
6784
 *          Whether this is a single click, double click, etc.
 
6785
 *    
 
6786
 *    --> kEventParamMouseChord (in, typeUInt32)
 
6787
 *          Which other mouse buttons were pressed when the event was
 
6788
 *          generated. Available on Mac OS X only.
 
6789
 *    
 
6790
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
6791
 *          The type of tablet event which generated this mouse event;
 
6792
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
6793
 *          Only present if the event was generated from a tablet.
 
6794
 *          Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
 
6795
 *    
 
6796
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
6797
 *          Further information about the tablet event which generated
 
6798
 *          this mouse event. Present if the the
 
6799
 *          kEventParamTabletEventType parameter contains
 
6800
 *          kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
 
6801
 *          1.5, and later.
 
6802
 *    
 
6803
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
6804
 *          Further information about the tablet event which generated
 
6805
 *          this mouse event. Present if the the
 
6806
 *          kEventParamTabletEventType parameter contains
 
6807
 *          kEventTabletProximity. Available on Mac OS X 10.1 and
 
6808
 *          CarbonLib 1.5, and later.
 
6809
 *  
 
6810
 *  Availability:
 
6811
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6812
 *    CarbonLib:        not available
 
6813
 }
 
6814
const
 
6815
        kEventWindowToolbarSwitchMode = 150;
 
6816
 
 
6817
{
 
6818
 *  kEventClassWindow / kEventWindowFocusAcquired
 
6819
 *  
 
6820
 *  Summary:
 
6821
 *    Notification that the user (or some other action) has caused the
 
6822
 *    focus to shift to your window.
 
6823
 *  
 
6824
 *  Discussion:
 
6825
 *    This event is sent to all handlers registered for it. 
 
6826
 *    
 
6827
 *    The basic window handler responds to this event by forwarding the
 
6828
 *    event to the focused control in the specified window. This allows
 
6829
 *    the focused control to invalidate or redraw itself as necessary;
 
6830
 *    for example, the standard edit-text control responds to this
 
6831
 *    event by enabling its blinking insertion point. An application
 
6832
 *    handler may choose to set the focus to custom application content
 
6833
 *    instead.
 
6834
 *  
 
6835
 *  Mac OS X threading:
 
6836
 *    Not thread safe
 
6837
 *  
 
6838
 *  Parameters:
 
6839
 *    
 
6840
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6841
 *          The window that is gaining focus.
 
6842
 *  
 
6843
 *  Availability:
 
6844
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6845
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6846
 }
 
6847
const
 
6848
        kEventWindowFocusAcquired = 200;
 
6849
 
 
6850
{
 
6851
 *  kEventClassWindow / kEventWindowFocusRelinquish
 
6852
 *  
 
6853
 *  Summary:
 
6854
 *    Notification that a window has lost user focus.
 
6855
 *  
 
6856
 *  Discussion:
 
6857
 *    This event is sent to all handlers registered for it. 
 
6858
 *    
 
6859
 *    The basic window handler responds to this event by forwarding the
 
6860
 *    event to the focused control in the specified window. This allows
 
6861
 *    the focused control to invalidate or redraw itself as necessary;
 
6862
 *    for example, the standard edit-text control responds to this
 
6863
 *    event by disabling its blinking insertion point. An application
 
6864
 *    handler should remove the focus from custom application content
 
6865
 *    and ensure that the content is redrawn without the focus
 
6866
 *    highlight.
 
6867
 *  
 
6868
 *  Mac OS X threading:
 
6869
 *    Not thread safe
 
6870
 *  
 
6871
 *  Parameters:
 
6872
 *    
 
6873
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6874
 *          The window that is losing focus.
 
6875
 *  
 
6876
 *  Availability:
 
6877
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
6878
 *    CarbonLib:        in CarbonLib 1.1 and later
 
6879
 }
 
6880
const
 
6881
        kEventWindowFocusRelinquish = 201;
 
6882
 
 
6883
{
 
6884
 *  kEventClassWindow / kEventWindowFocusContent
 
6885
 *  
 
6886
 *  Summary:
 
6887
 *    A request to set the focus to the content area of a window.
 
6888
 *  
 
6889
 *  Discussion:
 
6890
 *    If the content area of your window is not already focused, you
 
6891
 *    should set the focus to the main part/control/view of the window.
 
6892
 *    If the content area of your window is already focused, do
 
6893
 *    nothing. The standard window handler responds to this event by
 
6894
 *    calling HIViewAdvanceFocus on the window�s root control, if the
 
6895
 *    focus is not already contained within the content root.
 
6896
 *  
 
6897
 *  Mac OS X threading:
 
6898
 *    Not thread safe
 
6899
 *  
 
6900
 *  Parameters:
 
6901
 *    
 
6902
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6903
 *          The window whose content should be focused.
 
6904
 *  
 
6905
 *  Availability:
 
6906
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
6907
 *    CarbonLib:        not available
 
6908
 }
 
6909
const
 
6910
        kEventWindowFocusContent = 202;
 
6911
 
 
6912
{
 
6913
 *  kEventClassWindow / kEventWindowFocusToolbar
 
6914
 *  
 
6915
 *  Summary:
 
6916
 *    A request to set the focus to the toolbar of a window.
 
6917
 *  
 
6918
 *  Discussion:
 
6919
 *    If your window�s toolbar is not already focused, you should set
 
6920
 *    the focus to the first item in the toolbar. If your window�s
 
6921
 *    toolbar is already focused, do nothing. The basic window handler
 
6922
 *    responds to this event by calling HIViewAdvanceFocus on the
 
6923
 *    toolbar control, if the focus is not already contained within the
 
6924
 *    toolbar.
 
6925
 *  
 
6926
 *  Mac OS X threading:
 
6927
 *    Not thread safe
 
6928
 *  
 
6929
 *  Parameters:
 
6930
 *    
 
6931
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6932
 *          The window whose toolbar should be focused.
 
6933
 *  
 
6934
 *  Availability:
 
6935
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
6936
 *    CarbonLib:        not available
 
6937
 }
 
6938
const
 
6939
        kEventWindowFocusToolbar = 203;
 
6940
 
 
6941
{
 
6942
 *  kEventClassWindow / kEventWindowFocusDrawer
 
6943
 *  
 
6944
 *  Summary:
 
6945
 *    A request to set the focus to the drawer of a window.
 
6946
 *  
 
6947
 *  Discussion:
 
6948
 *    If your window�s drawer is not already focused, you should set
 
6949
 *    the focus to the first item in the drawer. If your window�s
 
6950
 *    drawer is already focused, you should move the focus to the next
 
6951
 *    or previous drawer, if any, depending on whether the modifiers
 
6952
 *    parameter contains the shift key modifier. The basic window
 
6953
 *    handler responds to this event by calling SetUserFocusWindow on,
 
6954
 *    and sending a kEventWindowFocusContent event to, the appropriate
 
6955
 *    drawer, if the focus is not already contained within the drawer.
 
6956
 *  
 
6957
 *  Mac OS X threading:
 
6958
 *    Not thread safe
 
6959
 *  
 
6960
 *  Parameters:
 
6961
 *    
 
6962
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6963
 *          The window whose drawer should be focused.
 
6964
 *    
 
6965
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
6966
 *          The keyboard modifiers that were pressed when the user
 
6967
 *          requested a focus switch.
 
6968
 *  
 
6969
 *  Availability:
 
6970
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
6971
 *    CarbonLib:        not available
 
6972
 }
 
6973
const
 
6974
        kEventWindowFocusDrawer = 204;
 
6975
 
 
6976
{
 
6977
 *  kEventClassWindow / kEventWindowSheetOpening
 
6978
 *  
 
6979
 *  Summary:
 
6980
 *    Notification that a sheet is opening.
 
6981
 *  
 
6982
 *  Discussion:
 
6983
 *    This event is sent to all handlers registered for it. This event
 
6984
 *    is sent to the sheet, its parent window, and the application
 
6985
 *    target before the sheet begins opening.
 
6986
 *  
 
6987
 *  Mac OS X threading:
 
6988
 *    Not thread safe
 
6989
 *  
 
6990
 *  Parameters:
 
6991
 *    
 
6992
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
6993
 *          The sheet that is opening.
 
6994
 *  
 
6995
 *  Result:
 
6996
 *    An event handler for this event may return userCanceledErr if the
 
6997
 *    sheet should not open. Any other return value is ignored and will
 
6998
 *    still allow the sheet to open.
 
6999
 *  
 
7000
 *  Availability:
 
7001
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
7002
 *    CarbonLib:        not available
 
7003
 }
 
7004
const
 
7005
        kEventWindowSheetOpening = 210;
 
7006
 
 
7007
{
 
7008
 *  kEventClassWindow / kEventWindowSheetOpened
 
7009
 *  
 
7010
 *  Summary:
 
7011
 *    Notification that a sheet is open.
 
7012
 *  
 
7013
 *  Discussion:
 
7014
 *    This event is sent to all handlers registered for it. This event
 
7015
 *    is sent to the sheet, its parent window, and the application
 
7016
 *    target after the sheet is fully open.
 
7017
 *  
 
7018
 *  Mac OS X threading:
 
7019
 *    Not thread safe
 
7020
 *  
 
7021
 *  Parameters:
 
7022
 *    
 
7023
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7024
 *          The sheet that opened.
 
7025
 *  
 
7026
 *  Availability:
 
7027
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
7028
 *    CarbonLib:        not available
 
7029
 }
 
7030
const
 
7031
        kEventWindowSheetOpened = 211;
 
7032
 
 
7033
{
 
7034
 *  kEventClassWindow / kEventWindowSheetClosing
 
7035
 *  
 
7036
 *  Summary:
 
7037
 *    Notification that a sheet is closing.
 
7038
 *  
 
7039
 *  Discussion:
 
7040
 *    This event is sent to all handlers registered for it. This event
 
7041
 *    is sent to the sheet, its parent window, and the application
 
7042
 *    target before the sheet begins closing.
 
7043
 *  
 
7044
 *  Mac OS X threading:
 
7045
 *    Not thread safe
 
7046
 *  
 
7047
 *  Parameters:
 
7048
 *    
 
7049
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7050
 *          The sheet that is opening.
 
7051
 *  
 
7052
 *  Result:
 
7053
 *    An event handler for this event may return userCanceledErr if the
 
7054
 *    sheet should not close. Any other return value is ignored and
 
7055
 *    will still allow the sheet to close.
 
7056
 *  
 
7057
 *  Availability:
 
7058
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
7059
 *    CarbonLib:        not available
 
7060
 }
 
7061
const
 
7062
        kEventWindowSheetClosing = 212;
 
7063
 
 
7064
{
 
7065
 *  kEventClassWindow / kEventWindowSheetClosed
 
7066
 *  
 
7067
 *  Summary:
 
7068
 *    Notification that a sheet is closed.
 
7069
 *  
 
7070
 *  Discussion:
 
7071
 *    This event is sent to all handlers registered for it. This event
 
7072
 *    is sent to the sheet, its parent window, and the application
 
7073
 *    target after the sheet is fully closed.
 
7074
 *  
 
7075
 *  Mac OS X threading:
 
7076
 *    Not thread safe
 
7077
 *  
 
7078
 *  Parameters:
 
7079
 *    
 
7080
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7081
 *          The sheet that closed.
 
7082
 *  
 
7083
 *  Availability:
 
7084
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
7085
 *    CarbonLib:        not available
 
7086
 }
 
7087
const
 
7088
        kEventWindowSheetClosed = 213;
 
7089
 
 
7090
{
 
7091
 *  kEventClassWindow / kEventWindowDrawerOpening
 
7092
 *  
 
7093
 *  Summary:
 
7094
 *    Notification that a drawer is opening.
 
7095
 *  
 
7096
 *  Discussion:
 
7097
 *    This event is sent to all handlers registered for it. This event
 
7098
 *    is sent to the drawer, its parent window, and the application
 
7099
 *    target before the drawer begins opening.
 
7100
 *  
 
7101
 *  Mac OS X threading:
 
7102
 *    Not thread safe
 
7103
 *  
 
7104
 *  Parameters:
 
7105
 *    
 
7106
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7107
 *          The drawer that is opening.
 
7108
 *  
 
7109
 *  Result:
 
7110
 *    An event handler for this event may return userCanceledErr if the
 
7111
 *    drawer should not open. Any other return value is ignored and
 
7112
 *    will still allow the drawer to open.
 
7113
 *  
 
7114
 *  Availability:
 
7115
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
7116
 *    CarbonLib:        not available
 
7117
 }
 
7118
const
 
7119
        kEventWindowDrawerOpening = 220;
 
7120
 
 
7121
{
 
7122
 *  kEventClassWindow / kEventWindowDrawerOpened
 
7123
 *  
 
7124
 *  Summary:
 
7125
 *    Notification that a drawer is open.
 
7126
 *  
 
7127
 *  Discussion:
 
7128
 *    This event is sent to all handlers registered for it. This event
 
7129
 *    is sent to the drawer, its parent window, and the application
 
7130
 *    target after the drawer is fully open.
 
7131
 *  
 
7132
 *  Mac OS X threading:
 
7133
 *    Not thread safe
 
7134
 *  
 
7135
 *  Parameters:
 
7136
 *    
 
7137
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7138
 *          The drawer that opened.
 
7139
 *  
 
7140
 *  Availability:
 
7141
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
7142
 *    CarbonLib:        not available
 
7143
 }
 
7144
const
 
7145
        kEventWindowDrawerOpened = 221;
 
7146
 
 
7147
{
 
7148
 *  kEventClassWindow / kEventWindowDrawerClosing
 
7149
 *  
 
7150
 *  Summary:
 
7151
 *    Notification that a drawer is closing.
 
7152
 *  
 
7153
 *  Discussion:
 
7154
 *    This event is sent to all handlers registered for it. This event
 
7155
 *    is sent to the drawer, its parent window, and the application
 
7156
 *    target before the drawer begins closing.
 
7157
 *  
 
7158
 *  Mac OS X threading:
 
7159
 *    Not thread safe
 
7160
 *  
 
7161
 *  Parameters:
 
7162
 *    
 
7163
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7164
 *          The drawer that is opening.
 
7165
 *  
 
7166
 *  Result:
 
7167
 *    An event handler for this event may return userCanceledErr if the
 
7168
 *    drawer should not close. Any other return value is ignored and
 
7169
 *    will still allow the drawer to close.
 
7170
 *  
 
7171
 *  Availability:
 
7172
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
7173
 *    CarbonLib:        not available
 
7174
 }
 
7175
const
 
7176
        kEventWindowDrawerClosing = 222;
 
7177
 
 
7178
{
 
7179
 *  kEventClassWindow / kEventWindowDrawerClosed
 
7180
 *  
 
7181
 *  Summary:
 
7182
 *    Notification that a drawer is closed.
 
7183
 *  
 
7184
 *  Discussion:
 
7185
 *    This event is sent to all handlers registered for it. This event
 
7186
 *    is sent to the drawer, its parent window, and the application
 
7187
 *    target after the drawer is fully closed.
 
7188
 *  
 
7189
 *  Mac OS X threading:
 
7190
 *    Not thread safe
 
7191
 *  
 
7192
 *  Parameters:
 
7193
 *    
 
7194
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7195
 *          The drawer that closed.
 
7196
 *  
 
7197
 *  Availability:
 
7198
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
7199
 *    CarbonLib:        not available
 
7200
 }
 
7201
const
 
7202
        kEventWindowDrawerClosed = 223;
 
7203
 
 
7204
{
 
7205
 *  kEventClassWindow / kEventWindowDrawFrame
 
7206
 *  
 
7207
 *  Summary:
 
7208
 *    Sent by the Window Manager when it�s time to draw a window�s
 
7209
 *    structure.
 
7210
 *  
 
7211
 *  Discussion:
 
7212
 *    This is the replacement to the old wDraw defProc message (though
 
7213
 *    it is a special case of the 0 part code indicating to draw the
 
7214
 *    entire window frame).
 
7215
 *  
 
7216
 *  Mac OS X threading:
 
7217
 *    Not thread safe
 
7218
 *  
 
7219
 *  Parameters:
 
7220
 *    
 
7221
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7222
 *          The window to draw.
 
7223
 *  
 
7224
 *  Availability:
 
7225
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7226
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7227
 }
 
7228
const
 
7229
        kEventWindowDrawFrame = 1000;
 
7230
 
 
7231
{
 
7232
 *  kEventClassWindow / kEventWindowDrawPart
 
7233
 *  
 
7234
 *  Summary:
 
7235
 *    Sent by the Window Manager when it�s time to draw a specific part
 
7236
 *    of a window�s structure, such as the close button.
 
7237
 *  
 
7238
 *  Discussion:
 
7239
 *    This is typically sent during window widget tracking.
 
7240
 *  
 
7241
 *  Mac OS X threading:
 
7242
 *    Not thread safe
 
7243
 *  
 
7244
 *  Parameters:
 
7245
 *    
 
7246
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7247
 *          The window to draw.
 
7248
 *    
 
7249
 *    --> kEventParamWindowDefPart (in, typeWindowDefPartCode)
 
7250
 *          The part to draw.
 
7251
 *  
 
7252
 *  Availability:
 
7253
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7254
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7255
 }
 
7256
const
 
7257
        kEventWindowDrawPart = 1001;
 
7258
 
 
7259
{
 
7260
 *  kEventClassWindow / kEventWindowGetRegion
 
7261
 *  
 
7262
 *  Summary:
 
7263
 *    Sent by the Window Manager when it needs to get a specific region
 
7264
 *    from a window, or when the GetWindowRegion API is called.
 
7265
 *  
 
7266
 *  Mac OS X threading:
 
7267
 *    Not thread safe
 
7268
 *  
 
7269
 *  Parameters:
 
7270
 *    
 
7271
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7272
 *          The window whose region to return.
 
7273
 *    
 
7274
 *    --> kEventParamWindowRegionCode (in, typeWindowRegionCode)
 
7275
 *          The region to return.
 
7276
 *    
 
7277
 *    --> kEventParamRgnHandle (in, typeQDRgnHandle)
 
7278
 *          On entry, contains a valid but empty RgnHandle; you should
 
7279
 *          place the window region in this RgnHandle.
 
7280
 *  
 
7281
 *  Availability:
 
7282
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7283
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7284
 }
 
7285
const
 
7286
        kEventWindowGetRegion = 1002;
 
7287
 
 
7288
{
 
7289
 *  kEventClassWindow / kEventWindowHitTest
 
7290
 *  
 
7291
 *  Summary:
 
7292
 *    Sent when the Window Manager needs to determine what part of a
 
7293
 *    window would be 'hit' with a given mouse location in global
 
7294
 *    coordinates.
 
7295
 *  
 
7296
 *  Mac OS X threading:
 
7297
 *    Not thread safe
 
7298
 *  
 
7299
 *  Parameters:
 
7300
 *    
 
7301
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7302
 *          The window to hit-test.
 
7303
 *    
 
7304
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
7305
 *          The mouse location.
 
7306
 *    
 
7307
 *    <-- kEventParamWindowDefPart (out, typeWindowDefPartCode)
 
7308
 *          On exit, contains the window part that was hit.
 
7309
 *  
 
7310
 *  Availability:
 
7311
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7312
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7313
 }
 
7314
const
 
7315
        kEventWindowHitTest = 1003;
 
7316
 
 
7317
{
 
7318
 *  kEventClassWindow / kEventWindowInit
 
7319
 *  
 
7320
 *  Summary:
 
7321
 *    Sent by the Window Manager when the window is being created. This
 
7322
 *    is a hook to allow your window definition to do any
 
7323
 *    initialization you might need to do.
 
7324
 *  
 
7325
 *  Discussion:
 
7326
 *    This event can be sent more than once to a window if the window
 
7327
 *    definition function for the window is changed; see the note under
 
7328
 *    kEventWindowDispose.
 
7329
 *  
 
7330
 *  Mac OS X threading:
 
7331
 *    Not thread safe
 
7332
 *  
 
7333
 *  Parameters:
 
7334
 *    
 
7335
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7336
 *          The window being created.
 
7337
 *    
 
7338
 *    <-- kEventParamWindowFeatures (out, typeUInt32)
 
7339
 *          On exit, your event handler should store the window
 
7340
 *          features in this parameter.
 
7341
 *  
 
7342
 *  Availability:
 
7343
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7344
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7345
 }
 
7346
const
 
7347
        kEventWindowInit = 1004;
 
7348
 
 
7349
{
 
7350
 *  kEventClassWindow / kEventWindowDispose
 
7351
 *  
 
7352
 *  Summary:
 
7353
 *    Sent by the Window Manager to notify the window definition that
 
7354
 *    it should dispose of any private data structures attached to the
 
7355
 *    window.
 
7356
 *  
 
7357
 *  Discussion:
 
7358
 *    Note that this event does not directly correspond with
 
7359
 *    destruction of the window; the Window Manager occasionally needs
 
7360
 *    to change the window definition of a window (for example, when
 
7361
 *    ChangeWindowAttributes is used to change the visual appearance of
 
7362
 *    a window), and in that case, the window will receive a
 
7363
 *    kEventWindowDispose followed by a kEventWindowInit so that the
 
7364
 *    old and new window definitions can disconnect and connect to the
 
7365
 *    window. If you need to know when a window is really being
 
7366
 *    destroyed, install a handler for kEventWindowClosed.
 
7367
 *  
 
7368
 *  Mac OS X threading:
 
7369
 *    Not thread safe
 
7370
 *  
 
7371
 *  Parameters:
 
7372
 *    
 
7373
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7374
 *          The window being destroyed.
 
7375
 *  
 
7376
 *  Availability:
 
7377
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7378
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7379
 }
 
7380
const
 
7381
        kEventWindowDispose = 1005;
 
7382
 
 
7383
{
 
7384
 *  kEventClassWindow / kEventWindowDragHilite
 
7385
 *  
 
7386
 *  Summary:
 
7387
 *    Sent by the Window Manager when it is time to draw/erase any drag
 
7388
 *    hilite in the window structure.
 
7389
 *  
 
7390
 *  Discussion:
 
7391
 *    This is typically sent from within HiliteWindowFrameForDrag.
 
7392
 *  
 
7393
 *  Mac OS X threading:
 
7394
 *    Not thread safe
 
7395
 *  
 
7396
 *  Parameters:
 
7397
 *    
 
7398
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7399
 *          The window being hilited.
 
7400
 *    
 
7401
 *    --> kEventParamWindowDragHiliteFlag (in, typeBoolean)
 
7402
 *          Whether to draw (true) or erase (false) the hilite.
 
7403
 *  
 
7404
 *  Availability:
 
7405
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7406
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7407
 }
 
7408
const
 
7409
        kEventWindowDragHilite = 1006;
 
7410
 
 
7411
{
 
7412
 *  kEventClassWindow / kEventWindowModified
 
7413
 *  
 
7414
 *  Summary:
 
7415
 *    Sent by the Window Manager when it is time to redraw window
 
7416
 *    structure to account for a change in the document modified state.
 
7417
 *  
 
7418
 *  Discussion:
 
7419
 *    This is typically sent from within SetWindowModified.
 
7420
 *  
 
7421
 *  Mac OS X threading:
 
7422
 *    Not thread safe
 
7423
 *  
 
7424
 *  Parameters:
 
7425
 *    
 
7426
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7427
 *          The window that was modified.
 
7428
 *    
 
7429
 *    --> kEventParamWindowModifiedFlag (in, typeBoolean)
 
7430
 *          The new modified state.
 
7431
 *  
 
7432
 *  Availability:
 
7433
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7434
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7435
 }
 
7436
const
 
7437
        kEventWindowModified = 1007;
 
7438
 
 
7439
{
 
7440
 *  kEventClassWindow / kEventWindowSetupProxyDragImage
 
7441
 *  
 
7442
 *  Summary:
 
7443
 *    Sent by the Window Manager when it is time to generate a drag
 
7444
 *    image for the window proxy.
 
7445
 *  
 
7446
 *  Discussion:
 
7447
 *    This is typically sent from within BeginWindowProxyDrag.
 
7448
 *  
 
7449
 *  Mac OS X threading:
 
7450
 *    Not thread safe
 
7451
 *  
 
7452
 *  Parameters:
 
7453
 *    
 
7454
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7455
 *          The window whose proxy is being dragged.
 
7456
 *    
 
7457
 *    <-- kEventParamWindowProxyGWorldPtr (out, typeGWorldPtr)
 
7458
 *          On exit, contains a GWorld you allocate which contains the
 
7459
 *          drag image.
 
7460
 *    
 
7461
 *    --> kEventParamWindowProxyImageRgn (in, typeQDRgnHandle)
 
7462
 *          The region you modify to contain the clip region for the
 
7463
 *          GWorld.
 
7464
 *    
 
7465
 *    --> kEventParamWindowProxyOutlineRgn (in, typeQDRgnHandle)
 
7466
 *          The region you modify to contain the drag outline used when
 
7467
 *          the GWorld cannot be used.
 
7468
 *  
 
7469
 *  Availability:
 
7470
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7471
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7472
 }
 
7473
const
 
7474
        kEventWindowSetupProxyDragImage = 1008;
 
7475
 
 
7476
{
 
7477
 *  kEventClassWindow / kEventWindowStateChanged
 
7478
 *  
 
7479
 *  Summary:
 
7480
 *    Sent by the Window Manager when a particular window state changes.
 
7481
 *  
 
7482
 *  Discussion:
 
7483
 *    See the state-change flags in MacWindows.h.
 
7484
 *  
 
7485
 *  Mac OS X threading:
 
7486
 *    Not thread safe
 
7487
 *  
 
7488
 *  Parameters:
 
7489
 *    
 
7490
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7491
 *          The window whose state was changed.
 
7492
 *    
 
7493
 *    --> kEventParamWindowStateChangedFlags (in, typeUInt32)
 
7494
 *          The state change flags
 
7495
 *  
 
7496
 *  Availability:
 
7497
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7498
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7499
 }
 
7500
const
 
7501
        kEventWindowStateChanged = 1009;
 
7502
 
 
7503
{
 
7504
 *  kEventClassWindow / kEventWindowMeasureTitle
 
7505
 *  
 
7506
 *  Summary:
 
7507
 *    Sent when the Window Manager needs to know how much space the
 
7508
 *    window�s title area takes up.
 
7509
 *  
 
7510
 *  Mac OS X threading:
 
7511
 *    Not thread safe
 
7512
 *  
 
7513
 *  Parameters:
 
7514
 *    
 
7515
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7516
 *          The window whose title to measure.
 
7517
 *    
 
7518
 *    <-- kEventParamWindowTitleFullWidth (out, typeSInt16)
 
7519
 *          On exit, contains the length of the whole title area.
 
7520
 *    
 
7521
 *    <-- kEventParamWindowTitleTextWidth (out, typeSInt16)
 
7522
 *          On exit, contains the length just the title text.
 
7523
 *  
 
7524
 *  Availability:
 
7525
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7526
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7527
 }
 
7528
const
 
7529
        kEventWindowMeasureTitle = 1010;
 
7530
 
 
7531
{
 
7532
 *  kEventClassWindow / kEventWindowDrawGrowBox
 
7533
 *  
 
7534
 *  Summary:
 
7535
 *    When the DrawGrowIcon API is called, this event is sent to the
 
7536
 *    window to tell it to draw the grow box.
 
7537
 *  
 
7538
 *  Discussion:
 
7539
 *    This is a compatibility event harkening back to the old days
 
7540
 *    before Mac OS 8. Not very useful these days. This is only really
 
7541
 *    needed for windows that do not have the grow box integrated into
 
7542
 *    the window frame. Scroll bar delimiter lines are also drawn.
 
7543
 *  
 
7544
 *  Mac OS X threading:
 
7545
 *    Not thread safe
 
7546
 *  
 
7547
 *  Parameters:
 
7548
 *    
 
7549
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7550
 *          The window whose grow box to draw.
 
7551
 *  
 
7552
 *  Availability:
 
7553
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7554
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7555
 }
 
7556
const
 
7557
        kEventWindowDrawGrowBox = 1011;
 
7558
 
 
7559
{
 
7560
 *  kEventClassWindow / kEventWindowGetGrowImageRegion
 
7561
 *  
 
7562
 *  Summary:
 
7563
 *    This is a special way for a window to override the standard
 
7564
 *    resize outline for windows that do not do live resizing.
 
7565
 *  
 
7566
 *  Discussion:
 
7567
 *    As the user resizes the window, this event is sent with the
 
7568
 *    current size the user has chosen expressed as a rectangle. You
 
7569
 *    should calculate your window outline and modify the
 
7570
 *    kEventParamRgnHandle parameter to reflect your desired outline.
 
7571
 *  
 
7572
 *  Mac OS X threading:
 
7573
 *    Not thread safe
 
7574
 *  
 
7575
 *  Parameters:
 
7576
 *    
 
7577
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7578
 *          The window whose grow image to return.
 
7579
 *    
 
7580
 *    --> kEventParamWindowGrowRect (in, typeQDRectangle)
 
7581
 *          The window�s global port bounds.
 
7582
 *    
 
7583
 *    --> kEventParamRgnHandle (in, typeQDRgnHandle)
 
7584
 *          The region to modify.
 
7585
 *  
 
7586
 *  Availability:
 
7587
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7588
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7589
 }
 
7590
const
 
7591
        kEventWindowGetGrowImageRegion = 1012;
 
7592
 
 
7593
{
 
7594
 *  kEventClassWindow / kEventWindowPaint
 
7595
 *  
 
7596
 *  Summary:
 
7597
 *    When the Window Manager needs to paint a window (e.g, when a
 
7598
 *    window is first displayed), the kEventWindowPaint event is sent
 
7599
 *    to allow the window to control all aspect of painting, including
 
7600
 *    the window frame.
 
7601
 *  
 
7602
 *  Discussion:
 
7603
 *    If a window does not respond to this event, the Window Manager
 
7604
 *    ends up sending kEventWindowDrawFrame and then erasing the window
 
7605
 *    to the window content color as usual. This is mostly used for
 
7606
 *    specialty windows, such as help tags or appliance apps might have.
 
7607
 *  
 
7608
 *  Mac OS X threading:
 
7609
 *    Not thread safe
 
7610
 *  
 
7611
 *  Parameters:
 
7612
 *    
 
7613
 *    --> kEventParamDirectObject (in, typeWindowRef)
 
7614
 *          The window to paint.
 
7615
 *  
 
7616
 *  Availability:
 
7617
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7618
 *    CarbonLib:        not available
 
7619
 }
 
7620
const
 
7621
        kEventWindowPaint = 1013;
 
7622
 
 
7623
{--------------------------------------------------------------------------------------}
 
7624
{  Menu Events                                                                         }
 
7625
{--------------------------------------------------------------------------------------}
 
7626
{
 
7627
    kEventClassMenu quick reference:
 
7628
    
 
7629
    kEventMenuBeginTracking         = 1,
 
7630
    kEventMenuEndTracking           = 2,
 
7631
    kEventMenuChangeTrackingMode    = 3,
 
7632
    kEventMenuOpening               = 4,
 
7633
    kEventMenuClosed                = 5,
 
7634
    kEventMenuTargetItem            = 6,
 
7635
    kEventMenuMatchKey              = 7,
 
7636
    kEventMenuEnableItems           = 8,
 
7637
    kEventMenuPopulate              = 9,
 
7638
    
 
7639
    kEventMenuMeasureItemWidth      = 100,
 
7640
    kEventMenuMeasureItemHeight     = 101,
 
7641
    kEventMenuDrawItem              = 102,
 
7642
    kEventMenuDrawItemContent       = 103,
 
7643
    
 
7644
    kEventMenuDispose               = 1001,
 
7645
    kEventMenuCalculateSize         = 1004,
 
7646
    
 
7647
    -- menu content view events --
 
7648
    
 
7649
    kEventMenuCreateFrameView       = 1005,
 
7650
    kEventMenuGetFrameBounds        = 1006,
 
7651
    kEventMenuBecomeScrollable      = 1007,
 
7652
    kEventMenuCeaseToBeScrollable   = 1008,
 
7653
    
 
7654
    -- menu bar visibility events --
 
7655
    
 
7656
    kEventMenuBarShown              = 2000,
 
7657
    kEventMenuBarHidden             = 2001
 
7658
}
 
7659
 
 
7660
{
 
7661
 *  Discussion:
 
7662
 *    Menu context flags indicate the context or usage of a
 
7663
 *    menu-related Carbon event.
 
7664
 }
 
7665
const
 
7666
{ menu location}
 
7667
 
 
7668
  {
 
7669
   * Indicates that this menu is inserted in the menubar, or is a
 
7670
   * (directly or indirectly) a submenu of a menu that is inserted in
 
7671
   * the menubar.
 
7672
   }
 
7673
        kMenuContextMenuBar = 1 shl 0; { menu type}
 
7674
 
 
7675
  {
 
7676
   * Indicates that this menu is a pull-down menu inserted in the
 
7677
   * menubar.
 
7678
   }
 
7679
        kMenuContextPullDown = 1 shl 8;
 
7680
 
 
7681
  {
 
7682
   * Indicates that this menu is a popup menu being displayed by
 
7683
   * PopUpMenuSelect.
 
7684
   }
 
7685
        kMenuContextPopUp = 1 shl 9;
 
7686
 
 
7687
  {
 
7688
   * Indicates that this menu is a submenu of some other pull-down or
 
7689
   * popup menu.
 
7690
   }
 
7691
        kMenuContextSubmenu = 1 shl 10; { menu usage}
 
7692
 
 
7693
  {
 
7694
   * Indicates that this Carbon event has been sent during a menubar
 
7695
   * tracking session.
 
7696
   }
 
7697
        kMenuContextMenuBarTracking = 1 shl 16;
 
7698
 
 
7699
  {
 
7700
   * Indicates that this Carbon event has been sent during a popup menu
 
7701
   * tracking session.
 
7702
   }
 
7703
        kMenuContextPopUpTracking = 1 shl 17;
 
7704
 
 
7705
  {
 
7706
   * Indicates that this Carbon event has been sent during command key
 
7707
   * matching.
 
7708
   }
 
7709
        kMenuContextKeyMatching = 1 shl 18;
 
7710
 
 
7711
  {
 
7712
   * Indicates that this Carbon event has been sent at idle time to
 
7713
   * update the enabled state of the menus. Available on Mac OS X 10.1
 
7714
   * and later, and in CarbonLib 1.5 and later; on earlier releases,
 
7715
   * the kMenuContextKeyMatching flag is set when an event is sent
 
7716
   * during menu enabling.
 
7717
   }
 
7718
        kMenuContextMenuEnabling = 1 shl 19;
 
7719
 
 
7720
  {
 
7721
   * Indicates that this Carbon event has been sent during during a
 
7722
   * search for a menu item command ID by the
 
7723
   * CountMenuItemsWithCommandID or GetIndMenuItemWithCommandID APIs.
 
7724
   * Available on Mac OS X 10.2 and CarbonLib 1.6.
 
7725
   }
 
7726
        kMenuContextCommandIDSearch = 1 shl 20;
 
7727
 
 
7728
 
 
7729
{
 
7730
 *  Summary:
 
7731
 *    Menu direction
 
7732
 }
 
7733
const
 
7734
{
 
7735
   * Indicates that the menu should be placed to the right of its
 
7736
   * parent.
 
7737
   }
 
7738
        kHIMenuRightDirection = 0;
 
7739
 
 
7740
  {
 
7741
   * Indicates that the menu should be placed to the left of its parent.
 
7742
   }
 
7743
        kHIMenuLeftDirection = 1;
 
7744
 
 
7745
  {
 
7746
   * Indicates that the menu should be centered on its parent.
 
7747
   }
 
7748
        kHIMenuCenterDirection = 2;
 
7749
 
 
7750
{
 
7751
 *  kEventClassMenu / kEventMenuBeginTracking
 
7752
 *  
 
7753
 *  Summary:
 
7754
 *    The user has begun tracking the menubar or a pop-up menu.
 
7755
 *  
 
7756
 *  Discussion:
 
7757
 *    This event is sent to all handlers registered for it. It is sent
 
7758
 *    first to the menu specified in the direct object parameter, if
 
7759
 *    any, and then to the user focus target.
 
7760
 *  
 
7761
 *  Mac OS X threading:
 
7762
 *    Not thread safe
 
7763
 *  
 
7764
 *  Parameters:
 
7765
 *    
 
7766
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
7767
 *          The root of the menu hierarchy being tracked. If tracking a
 
7768
 *          popup menu, this parameter is the popup; if tracking the
 
7769
 *          menubar, this parameter is the root menu on Mac OS X, but
 
7770
 *          is NULL in CarbonLib.
 
7771
 *    
 
7772
 *    --> kEventParamCurrentMenuTrackingMode (in, typeMenuTrackingMode)
 
7773
 *          Indicates whether the user is tracking the menus using the
 
7774
 *          mouse or the keyboard. Contains either
 
7775
 *          kMenuTrackingModeMouse or kMenuTrackingModeKeyboard.
 
7776
 *    
 
7777
 *    --> kEventParamMenuContext (in, typeUInt32)
 
7778
 *          Menu context flags indicating what type of menu is being
 
7779
 *          tracked. This parameter is available on Mac OS X 10.1 and
 
7780
 *          later, and CarbonLib 1.5 and later.
 
7781
 *  
 
7782
 *  Result:
 
7783
 *    The handler may return userCanceledErr to stop menu tracking.
 
7784
 *  
 
7785
 *  Availability:
 
7786
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7787
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7788
 }
 
7789
const
 
7790
        kEventMenuBeginTracking = 1;
 
7791
 
 
7792
{
 
7793
 *  kEventClassMenu / kEventMenuEndTracking
 
7794
 *  
 
7795
 *  Summary:
 
7796
 *    The user has finished tracking the menubar or a popup menu
 
7797
 *  
 
7798
 *  Discussion:
 
7799
 *    This event is sent to all handlers registered for it. It is sent
 
7800
 *    first to the menu specified in the direct object parameter, if
 
7801
 *    any, and then to the user focus target. 
 
7802
 *    
 
7803
 *    In Mac OS X 10.3 and later, when a menu tracking session ends,
 
7804
 *    the Menu Manager now sends kEventMenuEndTracking to every menu
 
7805
 *    that was opened during the session, in addition to the root menu.
 
7806
 *    This is done to allow menus with dynamic content to remove that
 
7807
 *    content at the end of menu tracking; for example, a menu
 
7808
 *    containing many IconRefs might wish to load the IconRefs
 
7809
 *    dynamically in response to a kEventMenuPopulate, and remove them
 
7810
 *    in response to kEventMenuEndTracking, to avoid the memory
 
7811
 *    overhead of keeping the IconRef data in memory while the menu is
 
7812
 *    not being displayed.
 
7813
 *  
 
7814
 *  Mac OS X threading:
 
7815
 *    Not thread safe
 
7816
 *  
 
7817
 *  Parameters:
 
7818
 *    
 
7819
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
7820
 *          The root of the menu hierarchy being tracked. If tracking a
 
7821
 *          popup menu, this parameter is the popup; if tracking the
 
7822
 *          menubar, this parameter is the root menu on Mac OS X, but
 
7823
 *          is NULL in CarbonLib.
 
7824
 *    
 
7825
 *    --> kEventParamMenuContext (in, typeUInt32)
 
7826
 *          Menu context flags indicating what type of menu was being
 
7827
 *          tracked. This parameter is available on Mac OS X 10.1 and
 
7828
 *          later, and CarbonLib 1.5 and later.
 
7829
 *    
 
7830
 *    --> kEventParamMenuDismissed (in, typeUInt32)
 
7831
 *          Contains an indication of why menu tracking ended; this
 
7832
 *          will be one of the kHIMenuDismissedBy constants in Menus.h.
 
7833
 *          This parameter is available on Mac OS X 10.3 and later.
 
7834
 *  
 
7835
 *  Availability:
 
7836
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7837
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7838
 }
 
7839
const
 
7840
        kEventMenuEndTracking = 2;
 
7841
 
 
7842
{
 
7843
 *  kEventClassMenu / kEventMenuChangeTrackingMode
 
7844
 *  
 
7845
 *  Summary:
 
7846
 *    The user has switched from selecting a menu with the mouse to
 
7847
 *    selecting with the keyboard, or from selecting with the keyboard
 
7848
 *    to selecting with the mouse.
 
7849
 *  
 
7850
 *  Discussion:
 
7851
 *    This event is sent to all handlers registered for it. It is sent
 
7852
 *    first to the menu specified in the direct object parameter, and
 
7853
 *    then to the user focus target.
 
7854
 *  
 
7855
 *  Mac OS X threading:
 
7856
 *    Not thread safe
 
7857
 *  
 
7858
 *  Parameters:
 
7859
 *    
 
7860
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
7861
 *          The root of the menu hierarchy being tracked. If tracking a
 
7862
 *          popup menu, this parameter is the popup; if tracking the
 
7863
 *          menubar, this parameter is the root menu.
 
7864
 *    
 
7865
 *    --> kEventParamCurrentMenuTrackingMode (in, typeMenuTrackingMode)
 
7866
 *          Indicates whether the user was previously tracking the
 
7867
 *          menus using the mouse or the keyboard. Contains either
 
7868
 *          kMenuTrackingModeMouse or kMenuTrackingModeKeyboard.
 
7869
 *    
 
7870
 *    --> kEventParamNewMenuTrackingMode (in, typeMenuTrackingMode)
 
7871
 *          Indicates whether the user is now tracking the menus using
 
7872
 *          the mouse or the keyboard. Contains either
 
7873
 *          kMenuTrackingModeMouse or kMenuTrackingModeKeyboard.
 
7874
 *    
 
7875
 *    --> kEventParamMenuContext (in, typeUInt32)
 
7876
 *          Menu context flags indicating what type of menu is being
 
7877
 *          tracked.
 
7878
 *  
 
7879
 *  Availability:
 
7880
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
7881
 *    CarbonLib:        not available
 
7882
 }
 
7883
const
 
7884
        kEventMenuChangeTrackingMode = 3;
 
7885
 
 
7886
{
 
7887
 *  kEventClassMenu / kEventMenuOpening
 
7888
 *  
 
7889
 *  Summary:
 
7890
 *    A menu is opening.
 
7891
 *  
 
7892
 *  Discussion:
 
7893
 *    This event is sent to all handlers registered for it. It is sent
 
7894
 *    each time that the menu is opened (i.e., more than once during a
 
7895
 *    given tracking session if the user opens the menu multiple
 
7896
 *    times). It is sent before the menu is actually drawn, so you can
 
7897
 *    update the menu contents (including making changes that will
 
7898
 *    alter the menu size) and the new contents will be drawn correctly.
 
7899
 *  
 
7900
 *  Mac OS X threading:
 
7901
 *    Not thread safe
 
7902
 *  
 
7903
 *  Parameters:
 
7904
 *    
 
7905
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
7906
 *          The menu being opened.
 
7907
 *    
 
7908
 *    --> kEventParamMenuFirstOpen (in, typeBoolean)
 
7909
 *          Whether this is the first time this menu has been opened
 
7910
 *          during this menu tracking session.
 
7911
 *    
 
7912
 *    --> kEventParamMenuContext (in, typeUInt32)
 
7913
 *          The context in which this menu is opening. Available on Mac
 
7914
 *          OS X and CarbonLib 1.5 and later.
 
7915
 *  
 
7916
 *  Result:
 
7917
 *    On Mac OS X, the handler may return userCanceledErr to prevent
 
7918
 *    this menu from opening
 
7919
 *  
 
7920
 *  Availability:
 
7921
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7922
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7923
 }
 
7924
const
 
7925
        kEventMenuOpening = 4;
 
7926
 
 
7927
{
 
7928
 *  kEventClassMenu / kEventMenuClosed
 
7929
 *  
 
7930
 *  Summary:
 
7931
 *    A menu has been closed.
 
7932
 *  
 
7933
 *  Discussion:
 
7934
 *    This event is sent to all handlers registered for it. It is sent
 
7935
 *    after the menu is hidden.
 
7936
 *  
 
7937
 *  Mac OS X threading:
 
7938
 *    Not thread safe
 
7939
 *  
 
7940
 *  Parameters:
 
7941
 *    
 
7942
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
7943
 *          The menu being closed.
 
7944
 *    
 
7945
 *    --> kEventParamMenuContext (in, typeUInt32)
 
7946
 *          The context in which this menu is closing. Available on Mac
 
7947
 *          OS X 10.1 and later, and CarbonLib 1.5 and later.
 
7948
 *  
 
7949
 *  Availability:
 
7950
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7951
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7952
 }
 
7953
const
 
7954
        kEventMenuClosed = 5;
 
7955
 
 
7956
{
 
7957
 *  kEventClassMenu / kEventMenuTargetItem
 
7958
 *  
 
7959
 *  Summary:
 
7960
 *    The mouse is moving over a particular menu item.
 
7961
 *  
 
7962
 *  Discussion:
 
7963
 *    This event is sent to all handlers registered for it. It is sent
 
7964
 *    for both enabled and disabled items.
 
7965
 *  
 
7966
 *  Mac OS X threading:
 
7967
 *    Not thread safe
 
7968
 *  
 
7969
 *  Parameters:
 
7970
 *    
 
7971
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
7972
 *          The menu being tracked.
 
7973
 *    
 
7974
 *    --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
 
7975
 *          The menu item under the mouse.
 
7976
 *    
 
7977
 *    --> kEventParamMenuCommand (in, typeMenuCommand)
 
7978
 *          The command ID associated with this menu item.
 
7979
 *    
 
7980
 *    --> kEventParamMenuContext (in, typeUInt32)
 
7981
 *          The context in which this menu being tracked. Available on
 
7982
 *          Mac OS X 10.1 and later, and CarbonLib 1.5 and later.
 
7983
 *  
 
7984
 *  Availability:
 
7985
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
7986
 *    CarbonLib:        in CarbonLib 1.1 and later
 
7987
 }
 
7988
const
 
7989
        kEventMenuTargetItem = 6;
 
7990
 
 
7991
 
 
7992
{
 
7993
 *  kEventClassMenu / kEventMenuMatchKey
 
7994
 *  
 
7995
 *  Summary:
 
7996
 *    A menu is about to be examined for items that match a command key
 
7997
 *    event.
 
7998
 *  
 
7999
 *  Discussion:
 
8000
 *    A handler for this event may perform its own command key matching
 
8001
 *    and override the Menu Manager�s default matching algorithms.
 
8002
 *    Returning noErr from your handler indicates that you have found a
 
8003
 *    match. The handler for this event should not examine submenus of
 
8004
 *    this menu for a match; a separate event will be sent for each
 
8005
 *    submenu. 
 
8006
 *    
 
8007
 *    Handlers for this event must be installed directly on the menu
 
8008
 *    containing the item to be matched. To improve performance of
 
8009
 *    command key matching, the Menu Manager only sends this event if
 
8010
 *    the menu itself has a handler; if a handler for this event is
 
8011
 *    installed on any other event target, it will not receive the
 
8012
 *    event.
 
8013
 *    
 
8014
 *    In CarbonLib and Mac OS X through version 10.3, the Menu Manager
 
8015
 *    sends a kEventMenuEnableItems event to the menu before sending
 
8016
 *    kEventMenuMatchKey. In Mac OS X 10.4 and later, the Menu Manager
 
8017
 *    no longer sends kEventMenuEnableItems (or the resulting
 
8018
 *    kEventCommandUpdateStatus events) to the menu; a handler for
 
8019
 *    kEventMenuMatchKey is expected to determine on its own whether a
 
8020
 *    matching menu item is enabled.
 
8021
 *  
 
8022
 *  Mac OS X threading:
 
8023
 *    Not thread safe
 
8024
 *  
 
8025
 *  Parameters:
 
8026
 *    
 
8027
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8028
 *          The menu being searched for a command key match.
 
8029
 *    
 
8030
 *    --> kEventParamEventRef (in, typeEventRef)
 
8031
 *          The keyboard input event that should be checked for a
 
8032
 *          match. Currently this event is always kEventRawKeyDown, but
 
8033
 *          in the future it may be kEventTextInputUnicodeForKeyEvent.
 
8034
 *          When called from IsMenuKeyEvent, this parameter contains
 
8035
 *          the EventRef that was passed to IsMenuKeyEvent; when called
 
8036
 *          from MenuKey or MenuEvent, this parameter contains an event
 
8037
 *          created from the information passed to MenuKey or
 
8038
 *          MenuEvent. Note that in the MenuKey case, no virtual
 
8039
 *          keycode (kEventParamKeyCode) or key modifiers
 
8040
 *          (kEventParamKeyModifiers) will be available.
 
8041
 *    
 
8042
 *    --> kEventParamMenuEventOptions (in, typeMenuEventOptions)
 
8043
 *          Options from the MenuEventOptions enum that control how the
 
8044
 *          menu should be searched for a command key. This parameter
 
8045
 *          contains the options that were passed to IsMenuKeyEvent, or
 
8046
 *          0 if called from MenuKey or MenuEvent. The only option that
 
8047
 *          your handler will need to obey is
 
8048
 *          kMenuEventIncludeDisabledItems; other options are
 
8049
 *          irrelevant for an event handler.
 
8050
 *    
 
8051
 *    --> kEventParamMenuContext (in, typeUInt32)
 
8052
 *          The context in which this menu is being searched for a
 
8053
 *          command key. Available on Mac OS X 10.1 and later, and
 
8054
 *          CarbonLib 1.5 and later.
 
8055
 *    
 
8056
 *    <-- kEventParamMenuItemIndex (out, typeMenuItemIndex)
 
8057
 *          On exit, contains the menu item index that matched the
 
8058
 *          event.
 
8059
 *  
 
8060
 *  Result:
 
8061
 *    If your handler finds a match, it should set the
 
8062
 *    kEventParamMenuItemIndex parameter to contain the item index of
 
8063
 *    the matching item, and return noErr. If it does not find a match,
 
8064
 *    it should return menuItemNotFoundErr. Any other return value will
 
8065
 *    cause the Menu Manager to use its default command key matching
 
8066
 *    algorithm for this menu.
 
8067
 *  
 
8068
 *  Availability:
 
8069
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
8070
 *    CarbonLib:        in CarbonLib 1.1 and later
 
8071
 }
 
8072
const
 
8073
        kEventMenuMatchKey = 7;
 
8074
 
 
8075
 
 
8076
{
 
8077
 *  kEventClassMenu / kEventMenuEnableItems
 
8078
 *  
 
8079
 *  Summary:
 
8080
 *    A request that the items in the menu be properly enabled or
 
8081
 *    disabled according to the current state of the application.
 
8082
 *  
 
8083
 *  Discussion:
 
8084
 *    This event is sent from inside MenuKey, MenuEvent, and
 
8085
 *    IsMenuKeyEvent before those APIs examine the menu for an item
 
8086
 *    that matches a keyboard event. It is also sent during menu
 
8087
 *    tracking before a menu is first made visible; it is sent
 
8088
 *    immediately after kEventMenuOpening, once per menu per menu
 
8089
 *    tracking session. It is also sent to the top-level menus in the
 
8090
 *    menubar when the application is idle after user input has
 
8091
 *    occurred, to allow the menu titles to be enabled or disabled
 
8092
 *    appropriately according to the current user focus. You can
 
8093
 *    distinquish between all these cases by examining the contents of
 
8094
 *    the kEventParamMenuContext parameter. 
 
8095
 *    
 
8096
 *    If you install an event handler for kEventCommandProcess, you
 
8097
 *    should also install a handler for either kEventMenuEnableItems or
 
8098
 *    kEventCommandUpdateStatus. This is necessary because the Carbon
 
8099
 *    event system will attempt to match command keys against the
 
8100
 *    available menus before returning the keyboard event to your
 
8101
 *    application via WaitNextEvent. If you have menu command event
 
8102
 *    handlers installed for your menu items, your handlers will be
 
8103
 *    called without your ever receiving the keyboard event or calling
 
8104
 *    MenuKey/MenuEvent/IsMenuKeyEvent yourself. Therefore, you have no
 
8105
 *    opportunity to enable your menu items properly other than from a
 
8106
 *    kEventMenuEnableItems or kEventCommandUpdateStatus handler.
 
8107
 *    
 
8108
 *    
 
8109
 *    It is not necessary to handle this event if you do not install
 
8110
 *    kEventCommandProcess handlers for your menu items; in that case,
 
8111
 *    the command key event will be returned from WaitNextEvent or
 
8112
 *    ReceiveNextEvent as normal, and you can set up your menus before
 
8113
 *    calling MenuKey/MenuEvent/ IsMenuKeyEvent. 
 
8114
 *    
 
8115
 *    This event is sent first to the target menu, and then to the user
 
8116
 *    focus target.
 
8117
 *  
 
8118
 *  Mac OS X threading:
 
8119
 *    Not thread safe
 
8120
 *  
 
8121
 *  Parameters:
 
8122
 *    
 
8123
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8124
 *          The menu being enabled.
 
8125
 *    
 
8126
 *    --> kEventParamEnableMenuForKeyEvent (in, typeBoolean)
 
8127
 *          Indicates whether this menu should be enabled for key event
 
8128
 *          matching (true) or because the menu itself is about to
 
8129
 *          become visible (false). If true, only the item enable
 
8130
 *          state, command key, command key modifiers, and (optionally)
 
8131
 *          the command key glyph need to be correct. If false, the
 
8132
 *          entire menu item contents must be correct. This may be
 
8133
 *          useful if you have custom menu content that is expensive to
 
8134
 *          prepare.
 
8135
 *    
 
8136
 *    --> kEventParamMenuContext (in, typeUInt32)
 
8137
 *          The context in which this menu is being enabled. Available
 
8138
 *          on Mac OS X and CarbonLib 1.3.1 and later.
 
8139
 *  
 
8140
 *  Availability:
 
8141
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
8142
 *    CarbonLib:        in CarbonLib 1.1 and later
 
8143
 }
 
8144
const
 
8145
        kEventMenuEnableItems = 8;
 
8146
 
 
8147
 
 
8148
{
 
8149
 *  kEventClassMenu / kEventMenuPopulate
 
8150
 *  
 
8151
 *  Summary:
 
8152
 *    kEventMenuPopulate is intended to be handled by applications that
 
8153
 *    dynamically create their menu contents just-in-time before the
 
8154
 *    menu is displayed. A handler for this event can add items to tbe
 
8155
 *    menu that will be displayed or searched for a command key.
 
8156
 *  
 
8157
 *  Discussion:
 
8158
 *    This event is sent to all handlers registered for it. Previously,
 
8159
 *    kEventMenuOpening was recommended for the purpose of dynamically
 
8160
 *    updating menu content. kEventMenuPopulate is now recommended
 
8161
 *    because it will be sent by the Menu Manager before it searches a
 
8162
 *    menu for a matching command key, to allow a handler to
 
8163
 *    dynamically add menu items that may have command key equivalents
 
8164
 *    to the menu; kEventMenuOpening is only sent before the menu is
 
8165
 *    displayed. kEventMenuPopulate is also sent just before
 
8166
 *    kEventMenuOpening as a menu is being displayed. Finally,
 
8167
 *    kEventMenuPopulate is only sent once per menu tracking session
 
8168
 *    for a given menu, even if that menu is closed and opened multiple
 
8169
 *    times by the user; kEventMenuOpening is sent each time that the
 
8170
 *    menu is displayed. 
 
8171
 *    
 
8172
 *    You can distinguish the command-key case from the
 
8173
 *    menu-being-displayed case by examining the contents of the
 
8174
 *    kEventParamMenuContext parameter; the kMenuContextKeyMatching
 
8175
 *    flag will be set if the event is sent during command key
 
8176
 *    matching, and either the kMenuContextMenuBarTracking or
 
8177
 *    kMenuContextPopUpTracking flags will be sent if the event is sent
 
8178
 *    before actual display of the menu. 
 
8179
 *    
 
8180
 *    In Mac OS X 10.2 and CarbonLib 1.6, kEventMenuPopulate is also
 
8181
 *    sent to menus before the menu is searched for a command ID by the
 
8182
 *    CountMenuItemsWithCommandID and GetIndMenuItemWithCommandID APIs.
 
8183
 *    You can distinguish this case by checking for the
 
8184
 *    kMenuContextCommandIDSearch flag in the kEventParamMenuContext
 
8185
 *    parameter. In this case, the event also includes a
 
8186
 *    kEventParamMenuCommand parameter with the command ID being
 
8187
 *    searched for as the event parameter data.
 
8188
 *  
 
8189
 *  Mac OS X threading:
 
8190
 *    Not thread safe
 
8191
 *  
 
8192
 *  Parameters:
 
8193
 *    
 
8194
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8195
 *          The menu to be populated.
 
8196
 *    
 
8197
 *    --> kEventParamMenuContext (in, typeUInt32)
 
8198
 *          The context in which this menu is being populated.
 
8199
 *    
 
8200
 *    --> kEventParamMenuCommand (in, typeMenuCommand)
 
8201
 *          If this event is sent by CountMenuItemsWithCommandID or
 
8202
 *          GetIndMenuItemWithCommandID, this parameter contains the
 
8203
 *          command ID for which the API is searching. Available on Mac
 
8204
 *          OS X 10.2 and CarbonLib 1.6.
 
8205
 *  
 
8206
 *  Availability:
 
8207
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
8208
 *    CarbonLib:        in CarbonLib 1.5 and later
 
8209
 }
 
8210
const
 
8211
        kEventMenuPopulate = 9;
 
8212
 
 
8213
 
 
8214
{
 
8215
 *  kEventClassMenu / kEventMenuDispose
 
8216
 *  
 
8217
 *  Summary:
 
8218
 *    Sent when a menu definition should disconnect itself from a menu.
 
8219
 *  
 
8220
 *  Discussion:
 
8221
 *    This event is sent to all handlers registered for it.
 
8222
 *  
 
8223
 *  Mac OS X threading:
 
8224
 *    Not thread safe
 
8225
 *  
 
8226
 *  Parameters:
 
8227
 *    
 
8228
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8229
 *          The menu being destroyed.
 
8230
 *  
 
8231
 *  Availability:
 
8232
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
8233
 *    CarbonLib:        in CarbonLib 1.1 and later
 
8234
 }
 
8235
const
 
8236
        kEventMenuDispose = 1001;
 
8237
 
 
8238
{
 
8239
 *  kEventClassMenu / kEventMenuMeasureItemWidth
 
8240
 *  
 
8241
 *  Summary:
 
8242
 *    Requests measurement of the width of a menu item.
 
8243
 *  
 
8244
 *  Discussion:
 
8245
 *    Sent by the standard menu definition when a menu item has the
 
8246
 *    kMenuItemAttrCustomDraw attribute. Handlers for this event should
 
8247
 *    be installed directly on the menu. A handler for this event may
 
8248
 *    respond by providing a customized width for the menu item. If no
 
8249
 *    handler is installed, the standard menu definition provides a
 
8250
 *    default handler that will return the standard width for the item.
 
8251
 *  
 
8252
 *  Mac OS X threading:
 
8253
 *    Not thread safe
 
8254
 *  
 
8255
 *  Parameters:
 
8256
 *    
 
8257
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8258
 *          The menu that is being measured.
 
8259
 *    
 
8260
 *    --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
 
8261
 *          The menu item that is being measured.
 
8262
 *    
 
8263
 *    <-- kEventParamMenuItemWidth (out, typeShortInteger)
 
8264
 *          On exit, contains the menu item width.
 
8265
 *  
 
8266
 *  Availability:
 
8267
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
8268
 *    CarbonLib:        in CarbonLib 1.5 and later
 
8269
 }
 
8270
const
 
8271
        kEventMenuMeasureItemWidth = 100;
 
8272
 
 
8273
 
 
8274
{
 
8275
 *  kEventClassMenu / kEventMenuMeasureItemHeight
 
8276
 *  
 
8277
 *  Summary:
 
8278
 *    Requests measurement of the height of a menu item.
 
8279
 *  
 
8280
 *  Discussion:
 
8281
 *    Sent by the standard menu definition when a menu item has the
 
8282
 *    kMenuItemAttrCustomDraw attribute. Handlers for this event should
 
8283
 *    be installed directly on the menu. A handler for this event may
 
8284
 *    respond by providing a customized height for the menu item. If no
 
8285
 *    handler is installed, the standard menu definition provides a
 
8286
 *    default handler that will return the standard height for the item.
 
8287
 *  
 
8288
 *  Mac OS X threading:
 
8289
 *    Not thread safe
 
8290
 *  
 
8291
 *  Parameters:
 
8292
 *    
 
8293
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8294
 *          The menu that is being measured.
 
8295
 *    
 
8296
 *    --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
 
8297
 *          The menu item that is being measured.
 
8298
 *    
 
8299
 *    <-- kEventParamMenuItemHeight (out, typeShortInteger)
 
8300
 *          On exit, contains the menu item height.
 
8301
 *  
 
8302
 *  Availability:
 
8303
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
8304
 *    CarbonLib:        in CarbonLib 1.5 and later
 
8305
 }
 
8306
const
 
8307
        kEventMenuMeasureItemHeight = 101;
 
8308
 
 
8309
 
 
8310
{
 
8311
 *  kEventClassMenu / kEventMenuDrawItem
 
8312
 *  
 
8313
 *  Summary:
 
8314
 *    Requests drawing of an entire menu item, including its background.
 
8315
 *  
 
8316
 *  Discussion:
 
8317
 *    Sent by the standard menu definition when a menu item has the
 
8318
 *    kMenuItemAttrCustomDraw attribute. Handlers for this event should
 
8319
 *    be installed directly on the menu. A handler for this event may
 
8320
 *    respond by completely overriding the drawing of the menu item.
 
8321
 *    The item should be drawn into the current port if using
 
8322
 *    QuickDraw, or into the provided CGContextRef if using
 
8323
 *    CoreGraphics. If no handler is installed, the standard menu
 
8324
 *    definition provides a default handler that calls
 
8325
 *    DrawThemeMenuItem to draw the menu item background and content.
 
8326
 *  
 
8327
 *  Mac OS X threading:
 
8328
 *    Not thread safe
 
8329
 *  
 
8330
 *  Parameters:
 
8331
 *    
 
8332
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8333
 *          The menu being drawn.
 
8334
 *    
 
8335
 *    --> kEventParamCurrentBounds (in, typeQDRectangle)
 
8336
 *          The bounds of the menu, in global coordinates
 
8337
 *    
 
8338
 *    --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
 
8339
 *          The menu item being drawn.
 
8340
 *    
 
8341
 *    --> kEventParamMenuItemBounds (in, typeQDRectangle)
 
8342
 *          The bounds of the menu item, in local coordinates of the
 
8343
 *          current port.
 
8344
 *    
 
8345
 *    --> kEventParamMenuVirtualTop (in, typeLongInteger)
 
8346
 *          The virtual top coordinate of the menu, in global
 
8347
 *          coordinates.
 
8348
 *    
 
8349
 *    --> kEventParamMenuVirtualBottom (in, typeLongInteger)
 
8350
 *          The virtual bottom coordinate of the menu, in global
 
8351
 *          coordinates.
 
8352
 *    
 
8353
 *    --> kEventParamMenuDrawState (in, typeThemeMenuState)
 
8354
 *          The ThemeMenuState of the menu.
 
8355
 *    
 
8356
 *    --> kEventParamMenuItemType (in, typeThemeMenuItemType)
 
8357
 *          The type of menu item.
 
8358
 *    
 
8359
 *    --> kEventParamCGContextRef (in, typeCGContextRef)
 
8360
 *          The CG context in which the menu item should be drawn. Note
 
8361
 *          that this context has Cartesian coordinates, with (0,0) at
 
8362
 *          the bottom left, while the item bounds passed in the event
 
8363
 *          has QuickDraw coordinates, with (0,0) at the top left. To
 
8364
 *          align the context coordinates with the item bounds, use the
 
8365
 *          height of the current port to flip the context with
 
8366
 *          CGContextTranslateCTM( context, 0, height ) and
 
8367
 *          CGContextScaleCTM( context, 1, -1 ).
 
8368
 *    
 
8369
 *    <-- kEventParamMenuMarkBounds (out, typeQDRectangle)
 
8370
 *          On exit, contains the bounds of the menu item mark
 
8371
 *          character. Not present if the item has no mark. Added to
 
8372
 *          the event by the standard menu definition�s handler, if the
 
8373
 *          event is allowed to pass through.
 
8374
 *    
 
8375
 *    <-- kEventParamMenuIconBounds (out, typeQDRectangle)
 
8376
 *          On exit, contains the bounds of the menu item icon. Not
 
8377
 *          present if the item has no icon. Added to the event by the
 
8378
 *          standard menu definition�s handler, if the event is allowed
 
8379
 *          to pass through.
 
8380
 *    
 
8381
 *    <-- kEventParamMenuTextBounds (out, typeQDRectangle)
 
8382
 *          On exit, contains the bounds of the menu item�s text. Added
 
8383
 *          to the event by the standard menu definition�s handler, if
 
8384
 *          the event is allowed to pass through.
 
8385
 *    
 
8386
 *    <-- kEventParamMenuTextBaseline (out, typeShortInteger)
 
8387
 *          On exit, contains the baseline of the menu item�s text.
 
8388
 *          Added to the event by the standard menu definition�s
 
8389
 *          handler, if the event is allowed to pass through.
 
8390
 *    
 
8391
 *    <-- kEventParamMenuCommandKeyBounds (out, typeQDRectangle)
 
8392
 *          On exit, contains the bounds of the menu item command key.
 
8393
 *          Not present if the item has no command key. Added to the
 
8394
 *          event by the standard menu definition�s handler, if the
 
8395
 *          event is allowed to pass through.
 
8396
 *  
 
8397
 *  Availability:
 
8398
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
8399
 *    CarbonLib:        in CarbonLib 1.5 and later
 
8400
 }
 
8401
const
 
8402
        kEventMenuDrawItem = 102;
 
8403
 
 
8404
 
 
8405
{
 
8406
 *  kEventClassMenu / kEventMenuDrawItemContent
 
8407
 *  
 
8408
 *  Summary:
 
8409
 *    Requests drawing of a menu item�s content: its text, command key,
 
8410
 *    icon, etc.
 
8411
 *  
 
8412
 *  Discussion:
 
8413
 *    Sent by the standard menu definition when a menu item has the
 
8414
 *    kMenuItemAttrCustomDraw attribute. Handlers for this event should
 
8415
 *    be installed directly on the menu. A handler for this event may
 
8416
 *    respond by overriding the drawing of the menu item content: the
 
8417
 *    mark character, icon, text, and command key information. At the
 
8418
 *    time when this event is sent, the background of the menu item has
 
8419
 *    already been drawn using the standard system appearance, and if
 
8420
 *    the item is selected, the background is drawn with a hilite. The
 
8421
 *    item should be drawn into the current port if using QuickDraw, or
 
8422
 *    into the provided CGContextRef if using CoreGraphics. If no
 
8423
 *    handler is installed, the standard menu definition provides a
 
8424
 *    default handler that draws the standard menu item content. The
 
8425
 *    standard handler also adds event parameters to the event
 
8426
 *    indicating the bounding boxes of the different portions of the
 
8427
 *    menu item content (mark, icon, text, and command keys), and an
 
8428
 *    event parameter with the baseline of the menu item text; this
 
8429
 *    allows handlers to use CallNextEventHandler to call through to
 
8430
 *    the standard system handler, and then modify the system
 
8431
 *    appearance by drawing on top of the standard content.
 
8432
 *  
 
8433
 *  Mac OS X threading:
 
8434
 *    Not thread safe
 
8435
 *  
 
8436
 *  Parameters:
 
8437
 *    
 
8438
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8439
 *          The menu being drawn.
 
8440
 *    
 
8441
 *    --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
 
8442
 *          The menu item being drawn.
 
8443
 *    
 
8444
 *    --> kEventParamMenuItemBounds (in, typeQDRectangle)
 
8445
 *          The bounds of the menu item, in local coordinates of the
 
8446
 *          current port.
 
8447
 *    
 
8448
 *    --> kEventParamDeviceDepth (in, typeShortInteger)
 
8449
 *          The bit depth of the GDevice on which the menu is being
 
8450
 *          drawn.
 
8451
 *    
 
8452
 *    --> kEventParamDeviceColor (in, typeBoolean)
 
8453
 *          Whether the GDevice on which the menu is being drawn is in
 
8454
 *          black&white or color mode.
 
8455
 *    
 
8456
 *    --> kEventParamCGContextRef (in, typeCGContextRef)
 
8457
 *          The CG context in which the menu item should be drawn. Note
 
8458
 *          that this context has Cartesian coordinates, with (0,0) at
 
8459
 *          the bottom left, while the item bounds passed in the event
 
8460
 *          has QuickDraw coordinates, with (0,0) at the top left. To
 
8461
 *          align the context coordinates with the item bounds, use the
 
8462
 *          height of the current port to flip the context with
 
8463
 *          CGContextTranslateCTM( context, 0, height ) and
 
8464
 *          CGContextScaleCTM( context, 1, -1 ).
 
8465
 *    
 
8466
 *    <-- kEventParamMenuMarkBounds (out, typeQDRectangle)
 
8467
 *          On exit, contains the bounds of the menu item mark
 
8468
 *          character. Not present if the item has no mark. Added to
 
8469
 *          the event by the standard menu definition�s handler, if the
 
8470
 *          event is allowed to pass through.
 
8471
 *    
 
8472
 *    <-- kEventParamMenuIconBounds (out, typeQDRectangle)
 
8473
 *          On exit, contains the bounds of the menu item icon. Not
 
8474
 *          present if the item has no icon. Added to the event by the
 
8475
 *          standard menu definition�s handler, if the event is allowed
 
8476
 *          to pass through.
 
8477
 *    
 
8478
 *    <-- kEventParamMenuTextBounds (out, typeQDRectangle)
 
8479
 *          On exit, contains the bounds of the menu item�s text. Added
 
8480
 *          to the event by the standard menu definition�s handler, if
 
8481
 *          the event is allowed to pass through.
 
8482
 *    
 
8483
 *    <-- kEventParamMenuTextBaseline (out, typeShortInteger)
 
8484
 *          On exit, contains the baseline of the menu item�s text.
 
8485
 *          Added to the event by the standard menu definition�s
 
8486
 *          handler, if the event is allowed to pass through.
 
8487
 *    
 
8488
 *    <-- kEventParamMenuCommandKeyBounds (out, typeQDRectangle)
 
8489
 *          On exit, contains the bounds of the menu item command key.
 
8490
 *          Not present if the item has no command key. Added to the
 
8491
 *          event by the standard menu definition�s handler, if the
 
8492
 *          event is allowed to pass through.
 
8493
 *  
 
8494
 *  Availability:
 
8495
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
8496
 *    CarbonLib:        in CarbonLib 1.5 and later
 
8497
 }
 
8498
const
 
8499
        kEventMenuDrawItemContent = 103;
 
8500
 
 
8501
{
 
8502
 *  kEventClassMenu / kEventMenuCalculateSize
 
8503
 *  
 
8504
 *  Summary:
 
8505
 *    Requests that a menu calculate its total size.
 
8506
 *  
 
8507
 *  Discussion:
 
8508
 *    Sent by CalcMenuSize to request that the menu calculate its size.
 
8509
 *    The Menu Manager provides a default handler for all menus that
 
8510
 *    calls the menu's MDEF or menu content view to determine the menu
 
8511
 *    size. Applications will typically not need to handle this event;
 
8512
 *    a custom menu definition or menu content view should use
 
8513
 *    kMenuSizeMsg or kEventControlGetOptimalBounds to calculate its
 
8514
 *    size. 
 
8515
 *    
 
8516
 *    Note that if the menu uses an MDEF, the MDEF will set the menu's
 
8517
 *    width and height in response to kMenuSizeMsg. The default handler
 
8518
 *    for this event saves the old width and height before calling the
 
8519
 *    MDEF and restores them afterwards. CalcMenuSize will set the
 
8520
 *    final menu width and height based on the dimensions returned from
 
8521
 *    this event; applications may override this event to customize the
 
8522
 *    width or height of a menu by modifying the kEventParamDimensions
 
8523
 *    parameter. 
 
8524
 *    
 
8525
 *    This event is sent only to the menu, and is not propagated past
 
8526
 *    it.
 
8527
 *  
 
8528
 *  Mac OS X threading:
 
8529
 *    Not thread safe
 
8530
 *  
 
8531
 *  Parameters:
 
8532
 *    
 
8533
 *    --> kEventParamDirectObject (in, typeMenuRef)
 
8534
 *          The menu being measured.
 
8535
 *    
 
8536
 *    --> kEventParamControlRef (in, typeControlRef)
 
8537
 *          If the menu uses a content view, this parameter contains
 
8538
 *          the HIViewRef that should calculate the menu's size. This
 
8539
 *          parameter will not be present if the menu uses an MDEF.
 
8540
 *    
 
8541
 *    --> kEventParamGDevice (in, typeGDHandle)
 
8542
 *          If the menu uses an MDEF, this parameter contains the
 
8543
 *          GDevice on which the menu will be displayed. This parameter
 
8544
 *          will not be present if the menu uses a content view.
 
8545
 *    
 
8546
 *    --> kEventParamAvailableBounds (in, typeQDRectangle)
 
8547
 *          If the menu uses an MDEF, this parameter contains a
 
8548
 *          bounding rect in global coordinates inside of which the
 
8549
 *          menu should be displayed. This parameter is optional and
 
8550
 *          may not be present in all instances of this event; if not
 
8551
 *          present, the GDevice's bounds should be used instead. This
 
8552
 *          parameter will not be present if the menu uses a content
 
8553
 *          view.
 
8554
 *    
 
8555
 *    <-- kEventParamDimensions (out, typeHISize)
 
8556
 *          On exit, contains the menu's size.
 
8557
 *  
 
8558
 *  Availability:
 
8559
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
8560
 *    CarbonLib:        not available
 
8561
 }
 
8562
const
 
8563
        kEventMenuCalculateSize = 1004;
 
8564
 
 
8565
{
 
8566
 *  kEventClassMenu / kEventMenuCreateFrameView
 
8567
 *  
 
8568
 *  Summary:
 
8569
 *    Requests that a menu content view create the HIView that will
 
8570
 *    used to draw the menu window frame.
 
8571
 *  
 
8572
 *  Discussion:
 
8573
 *    The HIMenuView class provides a default handler for this event
 
8574
 *    that creates an instance of the standard menu window frame view.
 
8575
 *    
 
8576
 *    
 
8577
 *    This event is sent only to the menu content view, and is not
 
8578
 *    propagated past the view.
 
8579
 *  
 
8580
 *  Mac OS X threading:
 
8581
 *    Not thread safe
 
8582
 *  
 
8583
 *  Parameters:
 
8584
 *    
 
8585
 *    --> kEventParamEventRef (in, typeEventRef)
 
8586
 *          The initialization event that should be used to create the
 
8587
 *          view. A handler for this event may add its own parameters
 
8588
 *          to this event.
 
8589
 *    
 
8590
 *    --> kEventParamMenuType (in, typeThemeMenuType)
 
8591
 *          The type of menu frame (pull-down, popup, or hierarchical)
 
8592
 *          that is needed.
 
8593
 *    
 
8594
 *    <-- kEventParamMenuFrameView (out, typeControlRef)
 
8595
 *          On exit, contains the newly created menu frame view.
 
8596
 *  
 
8597
 *  Availability:
 
8598
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
8599
 *    CarbonLib:        not available
 
8600
 }
 
8601
const
 
8602
        kEventMenuCreateFrameView = 1005;
 
8603
 
 
8604
{
 
8605
 *  kEventClassMenu / kEventMenuGetFrameBounds
 
8606
 *  
 
8607
 *  Summary:
 
8608
 *    Requests that a menu content view calculate the bounding rect, in
 
8609
 *    global coordinates, of the menu window frame that should contain
 
8610
 *    the menu.
 
8611
 *  
 
8612
 *  Discussion:
 
8613
 *    This event is sent by the Menu Manager before displaying
 
8614
 *    pull-down, popup, and hierarchical menus. It provides an
 
8615
 *    opportunity for the menu content view to determine the position
 
8616
 *    of the menu frame based on the position of the menu title, parent
 
8617
 *    menu item, or popup menu location. 
 
8618
 *    
 
8619
 *    The HIMenuView class provides a default handler for this event
 
8620
 *    that calculates an appropriate location based on the bounds of
 
8621
 *    the menu, the available screen space, and the frame metrics of
 
8622
 *    the menu window content view. 
 
8623
 *    
 
8624
 *    This event is sent only to the menu content view, and is not
 
8625
 *    propagated past the view.
 
8626
 *  
 
8627
 *  Mac OS X threading:
 
8628
 *    Not thread safe
 
8629
 *  
 
8630
 *  Parameters:
 
8631
 *    
 
8632
 *    --> kEventParamMenuType (in, typeThemeMenuType)
 
8633
 *          The type of menu (pull-down, popup, or hierarchical) that
 
8634
 *          is being displayed.
 
8635
 *    
 
8636
 *    --> kEventParamMenuIsPopup (in, typeBoolean)
 
8637
 *          Whether this menu originated from a popup menu. Primarily
 
8638
 *          useful to distinguish between hierarchical menus that are
 
8639
 *          submenus of pull-down menus, and hierarchical menus that
 
8640
 *          are submenus of popup menus.
 
8641
 *    
 
8642
 *    --> kEventParamMenuFrameView (in, typeControlRef)
 
8643
 *          The menu window frame view.
 
8644
 *    
 
8645
 *    --> kEventParamMenuDirection (in, typeMenuDirection)
 
8646
 *          The suggested direction (left or right) which the view
 
8647
 *          should attempt to use when positioning the menu window. For
 
8648
 *          pull-down menus, this will typically be
 
8649
 *          kHIMenuRightDirection; for hierarchical menus, it will be
 
8650
 *          the same direction as the parent menu.
 
8651
 *    
 
8652
 *    --> kEventParamMenuItemBounds (in, typeHIRect)
 
8653
 *          The bounds, in global coordinates, of the parent menu title
 
8654
 *          (for pull-down menus), the parent menu item (for
 
8655
 *          hierarchical menus), or the popup location (for popup
 
8656
 *          menus).
 
8657
 *    
 
8658
 *    --> kEventParamGDevice (in, typeGDHandle)
 
8659
 *          The GDevice on which the menu should be displayed.
 
8660
 *    
 
8661
 *    --> kEventParamAvailableBounds (in, typeHIRect)
 
8662
 *          The available bounds, in global coordinates, inside which
 
8663
 *          the menu should be displayed. The menu should not extend
 
8664
 *          outside of these bounds.
 
8665
 *    
 
8666
 *    --> kEventParamParentMenu (in, typeMenuRef)
 
8667
 *          Only available when kEventParamMenuType is
 
8668
 *          kThemeMenuTypeHierarchical. The parent menu of this menu.
 
8669
 *    
 
8670
 *    --> kEventParamParentMenuItem (in, typeMenuItemIndex)
 
8671
 *          Only available when kEventParamMenuType is
 
8672
 *          kThemeMenuTypeHierarchical. The parent menu item of this
 
8673
 *          menu.
 
8674
 *    
 
8675
 *    --> kEventParamMenuPopupItem (in, typeMenuItemIndex)
 
8676
 *          Only available when kEventParamMenuType is
 
8677
 *          kThemeMenuTypePopUp. The item in the menu that should be
 
8678
 *          positioned at the popup location, or zero if no item should
 
8679
 *          be positioned there.
 
8680
 *    
 
8681
 *    <-- kEventParamBounds (out, typeHIRect)
 
8682
 *          On exit, contains the bounding rect, in global coordinates,
 
8683
 *          of the menu window. The handler should add this parameter
 
8684
 *          to the event.
 
8685
 *    
 
8686
 *    <-- kEventParamOrigin (out, typeHIPoint)
 
8687
 *          On exit, contains the origin to which the menu content view
 
8688
 *          should be scrolled before the menu is displayed.
 
8689
 *  
 
8690
 *  Availability:
 
8691
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
8692
 *    CarbonLib:        not available
 
8693
 }
 
8694
const
 
8695
        kEventMenuGetFrameBounds = 1006;
 
8696
 
 
8697
{
 
8698
 *  kEventClassMenu / kEventMenuBecomeScrollable
 
8699
 *  
 
8700
 *  Summary:
 
8701
 *    Requests that a menu content view prepare to be scrollable, by
 
8702
 *    installing the appropriate event handlers, timers, etc.
 
8703
 *  
 
8704
 *  Discussion:
 
8705
 *    This event is sent by the Menu Manager when a menu becomes the
 
8706
 *    most recently opened menu in the menu hierarchy. It is an
 
8707
 *    indication that this menu content view is now a candidate for
 
8708
 *    scrolling. 
 
8709
 *    
 
8710
 *    The Menu Manager provides a default handler for this event that
 
8711
 *    installs event handlers to provide automatic scrolling behavior
 
8712
 *    for HIView-based menus. 
 
8713
 *    
 
8714
 *    If a menu content view does not wish to use the Menu Manager's
 
8715
 *    default scrolling support, it can override this event and return
 
8716
 *    noErr to prevent the event from being propagated to the Menu
 
8717
 *    Manager's default handler. 
 
8718
 *    
 
8719
 *    This event is sent only to the menu content view, and is not
 
8720
 *    propagated past the view.
 
8721
 *  
 
8722
 *  Mac OS X threading:
 
8723
 *    Not thread safe
 
8724
 *  
 
8725
 *  Availability:
 
8726
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
8727
 *    CarbonLib:        not available
 
8728
 }
 
8729
const
 
8730
        kEventMenuBecomeScrollable = 1007;
 
8731
 
 
8732
{
 
8733
 *  kEventClassMenu / kEventMenuCeaseToBeScrollable
 
8734
 *  
 
8735
 *  Summary:
 
8736
 *    Requests that a menu content view cease to be scrollable.
 
8737
 *  
 
8738
 *  Discussion:
 
8739
 *    This event is sent by the Menu Manager when a menu ceases to be
 
8740
 *    the most recently opened menu. This occurs when the menu is
 
8741
 *    closed, or when a submenu of the most recently opened menu is
 
8742
 *    opened. It is an indication that this menu content view is no
 
8743
 *    longer a candidate for scrolling. 
 
8744
 *    
 
8745
 *    The Menu Manager provides a default handler for this event that
 
8746
 *    removes event handlers installed in response to
 
8747
 *    kEventMenuBecomeScrollable. 
 
8748
 *    
 
8749
 *    This event is sent only to the menu content view, and is not
 
8750
 *    propagated past the view.
 
8751
 *  
 
8752
 *  Mac OS X threading:
 
8753
 *    Not thread safe
 
8754
 *  
 
8755
 *  Availability:
 
8756
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
8757
 *    CarbonLib:        not available
 
8758
 }
 
8759
const
 
8760
        kEventMenuCeaseToBeScrollable = 1008;
 
8761
 
 
8762
{
 
8763
 *  kEventClassMenu / kEventMenuBarShown
 
8764
 *  
 
8765
 *  Summary:
 
8766
 *    Notification that the menubar in the frontmost process has been
 
8767
 *    shown.
 
8768
 *  
 
8769
 *  Discussion:
 
8770
 *    This event is sent to all handlers registered for it. This event
 
8771
 *    will be sent to registered handlers in all processes when the
 
8772
 *    front process shows its menubar. This event is sent only to the
 
8773
 *    application target.
 
8774
 *  
 
8775
 *  Mac OS X threading:
 
8776
 *    Not thread safe
 
8777
 *  
 
8778
 *  Availability:
 
8779
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
8780
 *    CarbonLib:        not available
 
8781
 }
 
8782
const
 
8783
        kEventMenuBarShown = 2000;
 
8784
 
 
8785
{
 
8786
 *  kEventClassMenu / kEventMenuBarHidden
 
8787
 *  
 
8788
 *  Summary:
 
8789
 *    Notification that the menubar in the frontmost process has been
 
8790
 *    hidden.
 
8791
 *  
 
8792
 *  Discussion:
 
8793
 *    This event is sent to all handlers registered for it. This event
 
8794
 *    will be sent to registered handlers in all processes when the
 
8795
 *    front process hides its menubar. This event is sent only to the
 
8796
 *    application target.
 
8797
 *  
 
8798
 *  Mac OS X threading:
 
8799
 *    Not thread safe
 
8800
 *  
 
8801
 *  Availability:
 
8802
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
8803
 *    CarbonLib:        not available
 
8804
 }
 
8805
const
 
8806
        kEventMenuBarHidden = 2001;
 
8807
 
 
8808
{--------------------------------------------------------------------------------------}
 
8809
{  Command Events                                                                      }
 
8810
{--------------------------------------------------------------------------------------}
 
8811
{
 
8812
    kEventClassCommand quick reference:
 
8813
    
 
8814
    kEventCommandProcess        = 1,
 
8815
    kEventCommandUpdateStatus   = 2
 
8816
}
 
8817
{
 
8818
 *  kEventClassCommand / kEventCommandProcess
 
8819
 *  
 
8820
 *  Summary:
 
8821
 *    A command has been invoked and the application should handle it.
 
8822
 *  
 
8823
 *  Discussion:
 
8824
 *    This event is sent when the user chooses a menu item or clicks a
 
8825
 *    control. Any menu item selection, from either the menubar, a
 
8826
 *    popup or contextual menu, or a popup or bevel button control,
 
8827
 *    will cause this event to be sent; if the menu item does not have
 
8828
 *    a command ID, the commandID field of the HICommand parameter will
 
8829
 *    be zero, but the event will still contain a valid MenuRef and
 
8830
 *    MenuItemIndex. Controls will send this event only if the control
 
8831
 *    has a non-zero command ID set with SetControlCommandID. 
 
8832
 *    
 
8833
 *    Some senders of this event will also include the modifier keys
 
8834
 *    that were pressed by the user when the command was invoked, but
 
8835
 *    this parameter is optional and may not be present in all
 
8836
 *    instances of this event. 
 
8837
 *    
 
8838
 *    When a command event is sent from a menu, a MenuContext parameter
 
8839
 *    will be included on Mac OS X 10.2 and CarbonLib 1.6, indicating
 
8840
 *    whether the command was sent from a menu in the menubar
 
8841
 *    (kMenuContextMenuBar will be set) or from a popup menu
 
8842
 *    (kMenuContextMenuBar will not be set). The MenuContext parameter
 
8843
 *    also indicates whether the event was sent by a selection of a
 
8844
 *    menu item with the mouse (kMenuContextMenuBarTracking or
 
8845
 *    kMenuContextPopUpTracking will be set), or by a command key press
 
8846
 *    (kMenuContextKeyMatching will be set). If you need to determine
 
8847
 *    the source of a command event on a Carbon release prior to Mac OS
 
8848
 *    X 10.2 or CarbonLib 1.6, we recommend installing a
 
8849
 *    kEventMenuEnableItems handler on each menu and caching the
 
8850
 *    MenuContext parameter in the EnableItems event in a menu
 
8851
 *    property; when you receive the CommandProcess event, look up the
 
8852
 *    cached MenuContext. 
 
8853
 *    
 
8854
 *    It is essential that your event handler for this event return
 
8855
 *    eventNotHandledErr for any command events that you do not handle,
 
8856
 *    especially for commands that are sent from menus attached to
 
8857
 *    popup or bevel button controls; if, for example, you return noErr
 
8858
 *    for command events sent in response to a menu selection from a
 
8859
 *    popup button, the Menu Manager will return zero from
 
8860
 *    PopUpMenuSelect, and the popup button control will not know that
 
8861
 *    an item was selected from the popup menu and will not redraw with
 
8862
 *    the new selection.
 
8863
 *  
 
8864
 *  Mac OS X threading:
 
8865
 *    Not thread safe
 
8866
 *  
 
8867
 *  Parameters:
 
8868
 *    
 
8869
 *    --> kEventParamDirectObject (in, typeHICommand)
 
8870
 *          The command to be handled.
 
8871
 *    
 
8872
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
8873
 *          The keyboard modifiers that were pressed when the command
 
8874
 *          was invoked by the user. This parameter is optional and may
 
8875
 *          not be present in all instances of this event.
 
8876
 *    
 
8877
 *    --> kEventParamMenuContext (in, typeUInt32)
 
8878
 *          If the command was contained in a menu, information about
 
8879
 *          the menu. This parameter is optional and may not be present
 
8880
 *          in all instances of this event. Available in Mac OS X 10.2
 
8881
 *          and CarbonLib 1.6, and later.
 
8882
 *  
 
8883
 *  Availability:
 
8884
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
8885
 *    CarbonLib:        in CarbonLib 1.1 and later
 
8886
 }
 
8887
const
 
8888
        kEventCommandProcess = 1;
 
8889
 
 
8890
{
 
8891
 *  kEventClassCommand / kEventCommandUpdateStatus
 
8892
 *  
 
8893
 *  Summary:
 
8894
 *    A command-generating user interface element requires updating.
 
8895
 *  
 
8896
 *  Discussion:
 
8897
 *    When you receive this event, you should update the necessary UI
 
8898
 *    elements in your application to reflect the current status of the
 
8899
 *    command. For example, if the command has the kHICommandFromMenu
 
8900
 *    bit set, you should update the menu item state, menu item text,
 
8901
 *    and so on, to reflect the current reality in your application. If
 
8902
 *    the menu item is the "Undo" item, and the last editing change to
 
8903
 *    the document was a Cut operation, then you might set the text to
 
8904
 *    "Undo Cut" and enable the menu item. 
 
8905
 *    
 
8906
 *    Currently, this event is only sent for menu items; it is not used
 
8907
 *    to update the status of controls. 
 
8908
 *    
 
8909
 *    Note that when responding to this event, you should only update
 
8910
 *    the status of the single user interface element (a menu item, for
 
8911
 *    example) described by the HICommand structure; you should not
 
8912
 *    update the status of the entire menu or of all menus in the
 
8913
 *    menubar. You will receive a separate UpdateStatus event for each
 
8914
 *    menu item in a menu, and each item should be updated
 
8915
 *    individually. When updating a menu item, you should generally not
 
8916
 *    use Enable/DisableMenuCommand; these APIs search the entire menu
 
8917
 *    hierarchy for the command ID. Instead, just call
 
8918
 *    Enable/DisableMenuItem directly, passing the menu and menu item
 
8919
 *    index that are provided to you in the HICommand structure.
 
8920
 *    
 
8921
 *    
 
8922
 *    You may wish to optimize your handling of the UpdateStatus event
 
8923
 *    by examining the MenuContext parameter to the event. This
 
8924
 *    parameter indicates the context in which the command requires
 
8925
 *    updating. For example, if the menu context parameter has the
 
8926
 *    kMenuContextKeyMatching bit set, you know that the update request
 
8927
 *    is being sent in while search for a menu item that matches a
 
8928
 *    command key. This knowledge can help you avoid unnecessary work;
 
8929
 *    if your menu item for this command has no command key, for
 
8930
 *    example, you can ignore this event when the KeyMatching bit is
 
8931
 *    set because your menu item will never match a command key
 
8932
 *    anyways, regardless of whether it is enabled or disabled.
 
8933
 *  
 
8934
 *  Mac OS X threading:
 
8935
 *    Not thread safe
 
8936
 *  
 
8937
 *  Parameters:
 
8938
 *    
 
8939
 *    --> kEventParamDirectObject (in, typeHICommand)
 
8940
 *          The command to be updated.
 
8941
 *    
 
8942
 *    --> kEventParamMenuContext (in, typeUInt32)
 
8943
 *          If the command was contained in a menu, information about
 
8944
 *          the menu and the context of the command updating request.
 
8945
 *          This parameter is optional and may not be present in all
 
8946
 *          instances of this event.
 
8947
 *  
 
8948
 *  Availability:
 
8949
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
8950
 *    CarbonLib:        in CarbonLib 1.1 and later
 
8951
 }
 
8952
const
 
8953
        kEventCommandUpdateStatus = 2;
 
8954
 
 
8955
{ HI Commands }
 
8956
 
 
8957
{
 
8958
 *  Summary:
 
8959
 *    Common command IDs
 
8960
 }
 
8961
const
 
8962
{
 
8963
   * The OK button in a dialog or alert.
 
8964
   }
 
8965
        kHICommandOK = $6F6B2020 (* 'ok  ' *);
 
8966
 
 
8967
  {
 
8968
   * The Cancel button in a dialog or alert.
 
8969
   }
 
8970
        kHICommandCancel = $6E6F7421 (* 'not!' *);
 
8971
 
 
8972
  {
 
8973
   * The application should quit.
 
8974
   }
 
8975
        kHICommandQuit = $71756974 (* 'quit' *);
 
8976
 
 
8977
  {
 
8978
   * The last editing operation should be undone.
 
8979
   }
 
8980
        kHICommandUndo = $756E646F (* 'undo' *);
 
8981
 
 
8982
  {
 
8983
   * The last editing operation should be redone.
 
8984
   }
 
8985
        kHICommandRedo = $7265646F (* 'redo' *);
 
8986
 
 
8987
  {
 
8988
   * The selected items should be cut.
 
8989
   }
 
8990
        kHICommandCut = $63757420 (* 'cut ' *);
 
8991
 
 
8992
  {
 
8993
   * The selected items should be copied.
 
8994
   }
 
8995
        kHICommandCopy = $636F7079 (* 'copy' *);
 
8996
 
 
8997
  {
 
8998
   * The contents of the clipboard should be pasted.
 
8999
   }
 
9000
        kHICommandPaste = $70617374 (* 'past' *);
 
9001
 
 
9002
  {
 
9003
   * The selected items should be deleted.
 
9004
   }
 
9005
        kHICommandClear = $636C6561 (* 'clea' *);
 
9006
 
 
9007
  {
 
9008
   * All items in the active window should be selected.
 
9009
   }
 
9010
        kHICommandSelectAll = $73616C6C (* 'sall' *);
 
9011
 
 
9012
  {
 
9013
   * The application should be hidden. The Menu Manager will respond to
 
9014
   * this command automatically; your application does not need to
 
9015
   * handle it.
 
9016
   }
 
9017
        kHICommandHide = $68696465 (* 'hide' *);
 
9018
 
 
9019
  {
 
9020
   * Other applications should be hidden. The Menu Manager will respond
 
9021
   * to this command automatically; your application does not need to
 
9022
   * handle it.
 
9023
   }
 
9024
        kHICommandHideOthers = $6869646F (* 'hido' *);
 
9025
 
 
9026
  {
 
9027
   * All applications should become visible. The Menu Manager will
 
9028
   * respond to this command automatically; your application does not
 
9029
   * need to handle it.
 
9030
   }
 
9031
        kHICommandShowAll = $7368616C (* 'shal' *);
 
9032
 
 
9033
  {
 
9034
   * The Preferences menu item has been selected.
 
9035
   }
 
9036
        kHICommandPreferences = $70726566 (* 'pref' *);
 
9037
 
 
9038
  {
 
9039
   * The active window should be zoomed in or out. The default
 
9040
   * application handler will respond to this event automatically; your
 
9041
   * application does not need to handle it, but you may want to
 
9042
   * install a Carbon event handler for kEventWindowGetIdealSize to
 
9043
   * return the ideal size for your document windows.
 
9044
   }
 
9045
        kHICommandZoomWindow = $7A6F6F6D (* 'zoom' *);
 
9046
 
 
9047
  {
 
9048
   * The active window should be minimized. The default application
 
9049
   * handler will respond to this event automatically; your application
 
9050
   * does not need to handle it.
 
9051
   }
 
9052
        kHICommandMinimizeWindow = $6D696E69 (* 'mini' *);
 
9053
 
 
9054
  {
 
9055
   * All collapsable windows should be minimized. The default
 
9056
   * application handler will respond to this event automatically; your
 
9057
   * application does not need to handle it.
 
9058
   }
 
9059
        kHICommandMinimizeAll = $6D696E61 (* 'mina' *);
 
9060
 
 
9061
  {
 
9062
   * The active window should be maximized. Only sent on Mac OS 9. The
 
9063
   * default application handler will respond to this event
 
9064
   * automatically; your application does not need to handle it.
 
9065
   }
 
9066
        kHICommandMaximizeWindow = $6D617869 (* 'maxi' *);
 
9067
 
 
9068
  {
 
9069
   * All collapsable windows should be maximized. This command is not
 
9070
   * sent or handled on Mac OS X.
 
9071
   }
 
9072
        kHICommandMaximizeAll = $6D617861 (* 'maxa' *);
 
9073
 
 
9074
  {
 
9075
   * All document-class windows should be arranged in a stack. The
 
9076
   * default application handler will respond to this event
 
9077
   * automatically; your application does not need to handle it.
 
9078
   }
 
9079
        kHICommandArrangeInFront = $66726E74 (* 'frnt' *);
 
9080
 
 
9081
  {
 
9082
   * All windows of this application should be brought in front of
 
9083
   * windows from other applications. Only sent on Mac OS X. The
 
9084
   * default application handler will respond to this event
 
9085
   * automatically; your application does not need to handle it.
 
9086
   }
 
9087
        kHICommandBringAllToFront = $62667274 (* 'bfrt' *);
 
9088
 
 
9089
  {
 
9090
   * This command ID is used as a placeholder to mark the separator
 
9091
   * item dividing the Zoom/Minimize/Maximize/Arrange menu items in the
 
9092
   * standard Window menu from the menu items listing the visible
 
9093
   * windows. If you need to add your own menu items to the standard
 
9094
   * Window menu before the window list section, you can look for the
 
9095
   * menu item with this command ID using GetIndMenuItemWithCommandID,
 
9096
   * and insert your menu items before the item with this ID.
 
9097
   }
 
9098
        kHICommandWindowListSeparator = $776C6476 (* 'wldv' *);
 
9099
 
 
9100
  {
 
9101
   * This command ID is used as a placeholder to mark the end of the
 
9102
   * window list section of the standard Window menu. If you need to
 
9103
   * add your own menu items to the standard Window menu after the
 
9104
   * window list section, you can look for the menu item with this
 
9105
   * command ID using GetIndMenuItemWithCommandID, and insert your
 
9106
   * items after the item with this ID.
 
9107
   }
 
9108
        kHICommandWindowListTerminator = $776C7374 (* 'wlst' *);
 
9109
 
 
9110
  {
 
9111
   * A window in the standard Window menu has been selected and should
 
9112
   * be activated. In Mac OS X 10.3, this command is also sent by the
 
9113
   * toolbox whenever it needs to activate a window in your
 
9114
   * application; for example, it is used when a window is selected
 
9115
   * from the application's Dock menu, and when a window that uses the
 
9116
   * standard window event handler is clicked. The default application
 
9117
   * handler will respond to this event automatically; your application
 
9118
   * does not need to handle it.
 
9119
   }
 
9120
        kHICommandSelectWindow = $7377696E (* 'swin' *);
 
9121
 
 
9122
  {
 
9123
   * The Rotate Windows hotkey (cmd-~ by default) has been pressed, and
 
9124
   * non-floating windows should be rotated so that the window after
 
9125
   * the active window is activated. The default application handler
 
9126
   * will respond to this event automatically; your application does
 
9127
   * not need to handle it.
 
9128
   }
 
9129
        kHICommandRotateWindowsForward = $726F7477 (* 'rotw' *);
 
9130
 
 
9131
  {
 
9132
   * The Rotate Windows hotkey (cmd-~ by default) has been pressed, and
 
9133
   * non-floating windows should be rotated so that the window before
 
9134
   * the active window is activated. The default application handler
 
9135
   * will respond to this event automatically; your application does
 
9136
   * not need to handle it.
 
9137
   }
 
9138
        kHICommandRotateWindowsBackward = $726F7462 (* 'rotb' *);
 
9139
 
 
9140
  {
 
9141
   * The floating window focus hotkey (ctl-F6 by default) has been
 
9142
   * pressed, and floating windows should be rotated so that the window
 
9143
   * after the focused window is activated. The default application
 
9144
   * handler will respond to this event automatically; your application
 
9145
   * does not need to handle it.
 
9146
   }
 
9147
        kHICommandRotateFloatingWindowsForward = $72746677 (* 'rtfw' *);
 
9148
 
 
9149
  {
 
9150
   * The floating window focus hotkey (ctl-F6 by default) has been
 
9151
   * pressed, and floating windows should be rotated so that the window
 
9152
   * before the focused window is activated. The default application
 
9153
   * handler will respond to this event automatically; your application
 
9154
   * does not need to handle it.
 
9155
   }
 
9156
        kHICommandRotateFloatingWindowsBackward = $72746662 (* 'rtfb' *);
 
9157
 
 
9158
  {
 
9159
   * The About menu item has been selected. In Mac OS X 10.3 and later,
 
9160
   * RunApplicationEventLoop installs a handler for this command ID on
 
9161
   * the application target, and will handle this event automatically
 
9162
   * by calling HIAboutBox. Your application may install its own
 
9163
   * handler if it wishes to display a customized about box.
 
9164
   }
 
9165
        kHICommandAbout = $61626F75 (* 'abou' *);
 
9166
 
 
9167
  {
 
9168
   * A new document or item should be created.
 
9169
   }
 
9170
        kHICommandNew = $6E657720 (* 'new ' *);
 
9171
 
 
9172
  {
 
9173
   * The user wants to open an existing document.
 
9174
   }
 
9175
        kHICommandOpen = $6F70656E (* 'open' *);
 
9176
 
 
9177
  {
 
9178
   * The active window should be closed. This command would typically
 
9179
   * be generated by a Close menu item. On Mac OS X 10.3 and later, the
 
9180
   * default application handler responds to this command by sending a
 
9181
   * kEventWindowClose event; on earlier systems, only the standard
 
9182
   * window event handler responded to this event.
 
9183
   }
 
9184
        kHICommandClose = $636C6F73 (* 'clos' *);
 
9185
 
 
9186
  {
 
9187
   * The active document should be saved.
 
9188
   }
 
9189
        kHICommandSave = $73617665 (* 'save' *);
 
9190
 
 
9191
  {
 
9192
   * The user wants to save the active document under a new name.
 
9193
   }
 
9194
        kHICommandSaveAs = $73766173 (* 'svas' *);
 
9195
 
 
9196
  {
 
9197
   * The contents of the active document should be reverted to the last
 
9198
   * saved version.
 
9199
   }
 
9200
        kHICommandRevert = $72767274 (* 'rvrt' *);
 
9201
 
 
9202
  {
 
9203
   * The active window should be printed.
 
9204
   }
 
9205
        kHICommandPrint = $70726E74 (* 'prnt' *);
 
9206
 
 
9207
  {
 
9208
   * The user wants to configure the current page margins, formatting,
 
9209
   * and print options.
 
9210
   }
 
9211
        kHICommandPageSetup = $70616765 (* 'page' *);
 
9212
 
 
9213
  {
 
9214
   * The application�s help book should be displayed. Used by the Help
 
9215
   * Manager when it adds the "<AppName> Help" menu item to the Help
 
9216
   * menu. The Help Manager installs a handler for this command ID on
 
9217
   * the Help menu returned by HMGetHelpMenu, and will respond to this
 
9218
   * event automatically; your application does not need to handle it.
 
9219
   }
 
9220
        kHICommandAppHelp = $61686C70 (* 'ahlp' *);
 
9221
 
 
9222
  {
 
9223
   * The character palette needs to be shown. Events with this command
 
9224
   * ID are only generated in Mac OS X 10.3 and later. The toolbox will
 
9225
   * respond to this event automatically; your application does not
 
9226
   * need to handle it.
 
9227
   }
 
9228
        kHICommandShowCharacterPalette = $63687270 (* 'chrp' *);
 
9229
 
 
9230
  {
 
9231
   * Display the spelling panel if it is not already visible. Events
 
9232
   * with this command ID are only generated in Mac OS X 10.4 and
 
9233
   * later.  If spell checking has been enabled in MLTE or an
 
9234
   * HITextView then this command is handled automatically.
 
9235
   }
 
9236
        kHICommandShowSpellingPanel = $73687370 (* 'shsp' *);
 
9237
 
 
9238
  {
 
9239
   * Spell check the document now.  Events with this command ID are
 
9240
   * only generated in Mac OS X 10.4 and later.  If spell checking has
 
9241
   * been enabled in MLTE or an HITextView then this command is handled
 
9242
   * automatically.
 
9243
   }
 
9244
        kHICommandCheckSpelling = $636B7370 (* 'cksp' *);
 
9245
        kHICommandChangeSpelling = $63687370 (* 'chsp' *);
 
9246
 
 
9247
  {
 
9248
   * Begin interactive spell checking. Events with this command ID are
 
9249
   * only generated in Mac OS X 10.4 and later.  If spell checking has
 
9250
   * been enabled in MLTE or an HITextView then this command is handled
 
9251
   * automatically.
 
9252
   }
 
9253
        kHICommandCheckSpellingAsYouType = $61737063 (* 'aspc' *);
 
9254
 
 
9255
  {
 
9256
   * Ignore this word while spell checking this text view. Events with
 
9257
   * this command ID are only generated in Mac OS X 10.4 and later.  If
 
9258
   * spell checking has been enabled in MLTE or an HITextView then this
 
9259
   * command is handled automatically.
 
9260
   }
 
9261
        kHICommandIgnoreSpelling = $69677370 (* 'igsp' *);
 
9262
 
 
9263
  {
 
9264
   * Learn this spelling for all documents.  Events with this command
 
9265
   * ID are only generated in Mac OS X 10.4 and later.  If spell
 
9266
   * checking has been enabled in MLTE or an HITextView then this
 
9267
   * command is handled automatically.
 
9268
   }
 
9269
        kHICommandLearnWord = $6C727764 (* 'lrwd' *);
 
9270
 
 
9271
 
 
9272
{
 
9273
 *  Summary:
 
9274
 *    Values for the attributes field of the HICommand and
 
9275
 *    HICommandExtended structures.
 
9276
 *  
 
9277
 *  Discussion:
 
9278
 *    These bit masks are mutually exclusive; only one should be set at
 
9279
 *    any given time. Some HICommand and HICommandExtended structures
 
9280
 *    will have an attributes value of zero; in this case, there is no
 
9281
 *    information available about the source of the command.
 
9282
 }
 
9283
const
 
9284
{
 
9285
   * Indicates that the command originates from a menu item. The
 
9286
   * HICommand.menu and HICommandExtended.source.menu fields are valid.
 
9287
   }
 
9288
        kHICommandFromMenu = 1 shl 0;
 
9289
 
 
9290
  {
 
9291
   * Indicates that the command originates from a control. The
 
9292
   * HICommandExtended.source.control field is valid.
 
9293
   }
 
9294
        kHICommandFromControl = 1 shl 1;
 
9295
 
 
9296
  {
 
9297
   * Indicates that the command originates from a window. The
 
9298
   * HICommandExtended.source.window field is valid.
 
9299
   }
 
9300
        kHICommandFromWindow = 1 shl 2;
 
9301
 
 
9302
type
 
9303
        HICommand = record
 
9304
                attributes: UInt32;
 
9305
                commandID: UInt32;
 
9306
                menuRef: MenuRef;
 
9307
                menuItemIndex: MenuItemIndex;
 
9308
        end;
 
9309
        HICommandPtr = ^HICommand;
 
9310
type
 
9311
        HICommandExtended = record
 
9312
                attributes: UInt32;
 
9313
                commandID: UInt32;
 
9314
                case SInt16 of
 
9315
                0: (
 
9316
                        control: ControlRef;
 
9317
                );
 
9318
                1: (
 
9319
                        window: WindowRef;
 
9320
                );
 
9321
                2: (
 
9322
                        menuRef: MenuRef;
 
9323
                        menuItemIndex: MenuItemIndex;
 
9324
                 );
 
9325
        end;
 
9326
        HICommandExtendedPtr = ^HICommandExtended;
 
9327
{--------------------------------------------------------------------------------------}
 
9328
{  Control Events                                                                      }
 
9329
{--------------------------------------------------------------------------------------}
 
9330
 
 
9331
{
 
9332
    kEventClassControl quick reference:
 
9333
  
 
9334
    // lifespan
 
9335
    kEventControlInitialize                     = 1000,
 
9336
    kEventControlDispose                        = 1001,
 
9337
    kEventControlGetOptimalBounds               = 1003,
 
9338
    kEventControlDefInitialize                  = kEventControlInitialize,
 
9339
    kEventControlDefDispose                     = kEventControlDispose,
 
9340
    
 
9341
    // event handling
 
9342
    kEventControlHit                            = 1,
 
9343
    kEventControlSimulateHit                    = 2,
 
9344
    kEventControlHitTest                        = 3,
 
9345
    kEventControlDraw                           = 4,
 
9346
    kEventControlApplyBackground                = 5,
 
9347
    kEventControlApplyTextColor                 = 6,
 
9348
    kEventControlSetFocusPart                   = 7,
 
9349
    kEventControlGetFocusPart                   = 8,
 
9350
    kEventControlActivate                       = 9,
 
9351
    kEventControlDeactivate                     = 10,
 
9352
    kEventControlSetCursor                      = 11,
 
9353
    kEventControlContextualMenuClick            = 12,
 
9354
    kEventControlClick                          = 13,
 
9355
    kEventControlGetNextFocusCandidate          = 14,
 
9356
    kEventControlGetAutoToggleValue             = 15,
 
9357
    kEventControlInterceptSubviewClick          = 16,
 
9358
    kEventControlGetClickActivation             = 17,
 
9359
    kEventControlDragEnter                      = 18,
 
9360
    kEventControlDragWithin                     = 19,
 
9361
    kEventControlDragLeave                      = 20,
 
9362
    kEventControlDragReceive                    = 21,
 
9363
    kEventControlInvalidateForSizeChange        = 22,
 
9364
    kEventControlTrackingAreaEntered            = 23,   // in HIView.h
 
9365
    kEventControlTrackingAreaExited             = 24,   // in HIView.h
 
9366
 
 
9367
    // tracking
 
9368
    kEventControlTrack                          = 51,
 
9369
    kEventControlGetScrollToHereStartPoint      = 52,
 
9370
    kEventControlGetIndicatorDragConstraint     = 53,
 
9371
    kEventControlIndicatorMoved                 = 54,
 
9372
    kEventControlGhostingFinished               = 55,
 
9373
    kEventControlGetActionProcPart              = 56,
 
9374
    
 
9375
    // accessors
 
9376
    kEventControlGetPartRegion                  = 101,
 
9377
    kEventControlGetPartBounds                  = 102,
 
9378
    kEventControlSetData                        = 103,
 
9379
    kEventControlGetData                        = 104,
 
9380
    kEventControlGetSizeConstraints             = 105,
 
9381
    kEventControlGetFrameMetrics                = 106,
 
9382
    
 
9383
    // notification
 
9384
    kEventControlValueFieldChanged              = 151,
 
9385
    kEventControlAddedSubControl                = 152,
 
9386
    kEventControlRemovingSubControl             = 153,
 
9387
    kEventControlBoundsChanged                  = 154,
 
9388
    kEventControlVisibilityChanged              = 157,
 
9389
    kEventControlTitleChanged                   = 158,
 
9390
    kEventControlOwningWindowChanged            = 159,  
 
9391
    kEventControlHiliteChanged                  = 160,
 
9392
    kEventControlEnabledStateChanged            = 161,
 
9393
    kEventControlLayoutInfoChanged              = 162,
 
9394
    
 
9395
    // miscellaneous
 
9396
    kEventControlArbitraryMessage               = 201
 
9397
}
 
9398
 
 
9399
{
 
9400
 *  kEventClassControl / kEventControlClick
 
9401
 *  
 
9402
 *  Summary:
 
9403
 *    A mouse down event occurred over a control.
 
9404
 *  
 
9405
 *  Discussion:
 
9406
 *    This event is sent when a non-contextual-menu click occurs over a
 
9407
 *    control; a contextual menu click generates
 
9408
 *    kEventControlContextualMenuClick instead.
 
9409
 *    
 
9410
 *    The handler of this event is responsible for two things: first,
 
9411
 *    the handler must set the keyboard focus to the control if the
 
9412
 *    control takes focus on clicks; look for the
 
9413
 *    kControlGetsFocusOnClick feature bit and call an API such as
 
9414
 *    SetKeyboardFocus. Second, the handler must call one of the
 
9415
 *    control tracking APIs: HIViewClick, HandleControlClick, or
 
9416
 *    TrackControl. The standard window handler does both of these
 
9417
 *    things.
 
9418
 *    
 
9419
 *    Warning: Beware of handling kEventControlClick events! This is
 
9420
 *    usually NOT the event you really want to handle.
 
9421
 *    kEventControlClick is a request to "please click this control,"
 
9422
 *    not "allow a control definition to track the mouse." If you are
 
9423
 *    implementing or overriding a control definition�s or HIView�s
 
9424
 *    support for tracking the mouse, you should handle
 
9425
 *    kEventControlTrack instead.
 
9426
 *  
 
9427
 *  Mac OS X threading:
 
9428
 *    Not thread safe
 
9429
 *  
 
9430
 *  Parameters:
 
9431
 *    
 
9432
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9433
 *          The control that was clicked.
 
9434
 *    
 
9435
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
9436
 *          The mouse location, in global coordinates.
 
9437
 *    
 
9438
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
9439
 *          The window under the mouse.
 
9440
 *    
 
9441
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
9442
 *          The window-relative position of the mouse in the window
 
9443
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
9444
 *          top left of the structure of the window.
 
9445
 *    
 
9446
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
9447
 *          The part code that the mouse location hit in the window.
 
9448
 *          This parameter only exists if the WindowRef parameter
 
9449
 *          exists. This saves you the trouble of calling FindWindow,
 
9450
 *          which is expensive on Mac OS X as it needs to call the
 
9451
 *          Window Server. Available in Mac OS X 10.3 and later.
 
9452
 *    
 
9453
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
9454
 *          The keyboard modifiers that were pressed when the event was
 
9455
 *          generated.
 
9456
 *    
 
9457
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
9458
 *          Which mouse button was pressed.
 
9459
 *    
 
9460
 *    --> kEventParamClickCount (in, typeUInt32)
 
9461
 *          Whether this is a single click, double click, etc.
 
9462
 *    
 
9463
 *    --> kEventParamMouseChord (in, typeUInt32)
 
9464
 *          Which other mouse buttons were pressed when the event was
 
9465
 *          generated. Available on Mac OS X only.
 
9466
 *    
 
9467
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
9468
 *          The type of tablet event which generated this mouse event;
 
9469
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
9470
 *          Only present if the event was generated from a tablet.
 
9471
 *    
 
9472
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
9473
 *          Further information about the tablet event which generated
 
9474
 *          this mouse event. Present if the the
 
9475
 *          kEventParamTabletEventType parameter contains
 
9476
 *          kEventTabletPoint.
 
9477
 *    
 
9478
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
9479
 *          Further information about the tablet event which generated
 
9480
 *          this mouse event. Present if the the
 
9481
 *          kEventParamTabletEventType parameter contains
 
9482
 *          kEventTabletProximity.
 
9483
 *  
 
9484
 *  Availability:
 
9485
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9486
 *    CarbonLib:        in CarbonLib 1.3.1 and later
 
9487
 }
 
9488
const
 
9489
        kEventControlClick = 13;
 
9490
 
 
9491
{
 
9492
 *  kEventClassControl / kEventControlHit
 
9493
 *  
 
9494
 *  Summary:
 
9495
 *    Sent by TrackControl and HandleControlClick after handling a
 
9496
 *    click in a control.
 
9497
 *  
 
9498
 *  Discussion:
 
9499
 *    This event indicates that a control has been manipulated by the
 
9500
 *    user and that the user released the mouse button over some part
 
9501
 *    of the control. It is sent automatically by the Control Manager
 
9502
 *    when the control tracking code returns a non-zero part
 
9503
 *    code.
 
9504
 *    
 
9505
 *    You might want to handle this event in a custom control
 
9506
 *    definition if your control definition has special behavior after
 
9507
 *    the control has been tracked. You can also handle this event in
 
9508
 *    application code, to be notified after a control has been
 
9509
 *    tracked; however, from the application level, it is generally
 
9510
 *    preferred to provide a command ID for the control and handle
 
9511
 *    kEventCommandProcess instead of kEventControlHit. Handling
 
9512
 *    kEventCommandProcess is more generic and allows the same code to
 
9513
 *    handle events from both controls and menu items.
 
9514
 *  
 
9515
 *  Mac OS X threading:
 
9516
 *    Not thread safe
 
9517
 *  
 
9518
 *  Parameters:
 
9519
 *    
 
9520
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9521
 *          The control that was tracked.
 
9522
 *    
 
9523
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
9524
 *          The control part that the mouse was over when it was
 
9525
 *          released.
 
9526
 *    
 
9527
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
9528
 *          The keyboard modifiers that were pressed when the mouse was
 
9529
 *          released.
 
9530
 *  
 
9531
 *  Availability:
 
9532
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9533
 *    CarbonLib:        in CarbonLib 1.1 and later
 
9534
 }
 
9535
const
 
9536
        kEventControlHit = 1;
 
9537
 
 
9538
{
 
9539
 *  kEventClassControl / kEventControlInitialize
 
9540
 *  
 
9541
 *  Summary:
 
9542
 *    Allows the control to initialize private data.
 
9543
 *  
 
9544
 *  Mac OS X threading:
 
9545
 *    Not thread safe
 
9546
 *  
 
9547
 *  Parameters:
 
9548
 *    
 
9549
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9550
 *          The control that is being created.
 
9551
 *    
 
9552
 *    --> kEventParamInitCollection (in, typeCollection)
 
9553
 *          Initialization data supplied to CreateCustomControl.
 
9554
 *    
 
9555
 *    <-- kEventParamControlFeatures (out, typeUInt32)
 
9556
 *          On exit, your event handler should supply the control
 
9557
 *          features flags. NOTE: On Mac OS X 10.3 and later, this is
 
9558
 *          deprecated in favor of using the HIViewChangeFeatures API.
 
9559
 *          Instead of supplying this parameter, just call
 
9560
 *          HIViewChangeFeatures. Also, this parameter can only be used
 
9561
 *          to supply features for the original kControlFoo features,
 
9562
 *          not the new kHIViewFoo features.
 
9563
 *  
 
9564
 *  Availability:
 
9565
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9566
 *    CarbonLib:        not available
 
9567
 }
 
9568
const
 
9569
        kEventControlInitialize = 1000;
 
9570
 
 
9571
{
 
9572
 *  kEventClassControl / kEventControlDispose
 
9573
 *  
 
9574
 *  Summary:
 
9575
 *    Allows the control to dispose of private data.
 
9576
 *  
 
9577
 *  Mac OS X threading:
 
9578
 *    Not thread safe
 
9579
 *  
 
9580
 *  Parameters:
 
9581
 *    
 
9582
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9583
 *          The control that is being destroyed.
 
9584
 *  
 
9585
 *  Availability:
 
9586
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9587
 *    CarbonLib:        not available
 
9588
 }
 
9589
const
 
9590
        kEventControlDispose = 1001;
 
9591
 
 
9592
{
 
9593
 *  kEventClassControl / kEventControlGetOptimalBounds
 
9594
 *  
 
9595
 *  Summary:
 
9596
 *    Allows the control to report its best size and its text baseline
 
9597
 *    based on its current settings.
 
9598
 *  
 
9599
 *  Mac OS X threading:
 
9600
 *    Not thread safe
 
9601
 *  
 
9602
 *  Parameters:
 
9603
 *    
 
9604
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9605
 *          The control whose optimal bounds to return.
 
9606
 *    
 
9607
 *    <-- kEventParamControlOptimalBounds (out, typeHIRect)
 
9608
 *          On exit, contains the control�s optimal bounds.
 
9609
 *    
 
9610
 *    <-- kEventParamControlOptimalBaselineOffset (out, typeShortInteger)
 
9611
 *          On exit, contains the control�s optimal baseline offset:
 
9612
 *          the distance from the top of the control�s optimal bounds
 
9613
 *          to the baseline of the control text, if any. This parameter
 
9614
 *          is optional and does not need to be provided if it doesn�t
 
9615
 *          apply for your control.
 
9616
 *  
 
9617
 *  Availability:
 
9618
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9619
 *    CarbonLib:        not available
 
9620
 }
 
9621
const
 
9622
        kEventControlGetOptimalBounds = 1003;
 
9623
 
 
9624
{
 
9625
 *  kEventClassControl / kEventControlSimulateHit
 
9626
 *  
 
9627
 *  Summary:
 
9628
 *    Sent when your control should simulate a click in response to
 
9629
 *    some other action, such as a return key for a default button.
 
9630
 *  
 
9631
 *  Discussion:
 
9632
 *    Note that this event is solely meant to provide visual feedback
 
9633
 *    that a control was clicked. For example, the push button control
 
9634
 *    hilites itself briefly in response to this event. This event does
 
9635
 *    not cause other events (such as kEventControlHit or
 
9636
 *    kEventCommandProcess) to be sent. To fully simulate the results
 
9637
 *    of clicking on a control, you can use the HIViewSimulateClick
 
9638
 *    API, which sends a kEventControlSimulateHit event and also sends
 
9639
 *    the kEventControlHit and kEventCommandProcess events that would
 
9640
 *    normally result from a click on a control.
 
9641
 *  
 
9642
 *  Mac OS X threading:
 
9643
 *    Not thread safe
 
9644
 *  
 
9645
 *  Parameters:
 
9646
 *    
 
9647
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9648
 *          The control for which a hit should be simulated.
 
9649
 *    
 
9650
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
9651
 *          The keyboard modifiers that should be used for the
 
9652
 *          simulated hit.
 
9653
 *    
 
9654
 *    <-> kEventParamControlPart (in/out, typeControlPartCode)
 
9655
 *          On entry, contains the part code for which the control
 
9656
 *          should simulate a hit. On exit, the control may modify this
 
9657
 *          parameter to reflect the same sort of part code that it
 
9658
 *          would pass back while handling kEventControlTrack.
 
9659
 *  
 
9660
 *  Availability:
 
9661
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9662
 *    CarbonLib:        not available
 
9663
 }
 
9664
const
 
9665
        kEventControlSimulateHit = 2;
 
9666
 
 
9667
{
 
9668
 *  kEventClassControl / kEventControlHitTest
 
9669
 *  
 
9670
 *  Summary:
 
9671
 *    Sent when someone wants to find out what part of your control is
 
9672
 *    at a given point in local coordinates.
 
9673
 *  
 
9674
 *  Mac OS X threading:
 
9675
 *    Not thread safe
 
9676
 *  
 
9677
 *  Parameters:
 
9678
 *    
 
9679
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9680
 *          The control to hit-test.
 
9681
 *    
 
9682
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
9683
 *          The point to hit-test. For controls in non-compositing
 
9684
 *          windows, this coordinate is in local coordinates of the
 
9685
 *          owning window; for controls in compositing windows, this
 
9686
 *          coordinate is in view-local coordinates.
 
9687
 *    
 
9688
 *    <-- kEventParamControlPart (out, typeControlPartCode)
 
9689
 *          On exit, contains the part code of the control part that
 
9690
 *          was hit, or kControlNoPart if no part was hit.
 
9691
 *  
 
9692
 *  Availability:
 
9693
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9694
 *    CarbonLib:        not available
 
9695
 }
 
9696
const
 
9697
        kEventControlHitTest = 3;
 
9698
 
 
9699
{
 
9700
 *  kEventClassControl / kEventControlDraw
 
9701
 *  
 
9702
 *  Summary:
 
9703
 *    Sent when your control should draw itself. The event can
 
9704
 *    optionally contain a port in which to draw and a part to
 
9705
 *    constrain drawing to.
 
9706
 *  
 
9707
 *  Mac OS X threading:
 
9708
 *    Not thread safe
 
9709
 *  
 
9710
 *  Parameters:
 
9711
 *    
 
9712
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9713
 *          The control to be drawn.
 
9714
 *    
 
9715
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
9716
 *          The control part code to draw. This parameter is optional
 
9717
 *          and may not be present in all instances of this event. Draw
 
9718
 *          the entire control if the parameter is not present.
 
9719
 *    
 
9720
 *    --> kEventParamGrafPort (in, typeGrafPtr)
 
9721
 *          The GrafPort into which to draw the control. This parameter
 
9722
 *          is optional and may not be present in all instances of this
 
9723
 *          event. Draw into the current port if the parameter is not
 
9724
 *          present.
 
9725
 *    
 
9726
 *    --> kEventParamRgnHandle (in, typeQDRgnHandle)
 
9727
 *          A region describing the area that needs to be redrawn; you
 
9728
 *          may constrain your drawing to this region. This parameter
 
9729
 *          is only provided on Mac OS X 10.2 and later, and only in
 
9730
 *          certain situations in compositing mode (when the view is
 
9731
 *          visible, etc). Draw the entire control if the parameter is
 
9732
 *          not present.
 
9733
 *    
 
9734
 *    --> kEventParamShape (in, typeHIShapeRef)
 
9735
 *          An HIShapeRef describing the area that needs to be redrawn;
 
9736
 *          you may constrain your drawing to this area. This parameter
 
9737
 *          is only provided on Mac OS X 10.4 and later, and only in
 
9738
 *          certain situations in compositing mode (when the view is
 
9739
 *          visible, etc). Draw the entire control if the parameter is
 
9740
 *          not present.
 
9741
 *    
 
9742
 *    --> kEventParamCGContextRef (in, typeCGContextRef)
 
9743
 *          The CGContext into which to draw the control. This
 
9744
 *          parameter is only provided on Mac OS X 10.2 and later, and
 
9745
 *          only when the owning window uses compositing mode. The
 
9746
 *          context is already transformed and clipped appropriately
 
9747
 *          for view-local drawing. If this parameter is present, you
 
9748
 *          should always use it; this will be extremely important to
 
9749
 *          allow printing of controls. If this parameter is not
 
9750
 *          present (prior to Mac OS X 10.2, or in a non-compositing
 
9751
 *          window), and you want to draw with CoreGraphics, you can
 
9752
 *          create your own CGContext with QDBeginCGContext.
 
9753
 *  
 
9754
 *  Availability:
 
9755
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9756
 *    CarbonLib:        not available
 
9757
 }
 
9758
const
 
9759
        kEventControlDraw = 4;
 
9760
 
 
9761
{
 
9762
 *  kEventClassControl / kEventControlApplyBackground
 
9763
 *  
 
9764
 *  Summary:
 
9765
 *    Sent when your control should apply its background color or
 
9766
 *    pattern to the specified port so that subcontrols of this control
 
9767
 *    can properly erase.
 
9768
 *  
 
9769
 *  Discussion:
 
9770
 *    This event is used for non-composited control drawing. When an
 
9771
 *    embedded control in a non-composited window draws, it first
 
9772
 *    erases its bounding rect. Before calling EraseRect or EraseRgn,
 
9773
 *    the control calls SetUpControlBackground, which sends this event
 
9774
 *    to parent controls of the embedded control that have the
 
9775
 *    kControlHasSpecialBackground feature flag. An embedding control
 
9776
 *    may respond to this event by setting the background color or
 
9777
 *    pattern of the specified GrafPort; this color or pattern will
 
9778
 *    then be used by the embedded control when it erases its
 
9779
 *    bounds.
 
9780
 *    
 
9781
 *    Note that an embedding control should not actually draw its
 
9782
 *    background in response to this event; doing so would not have any
 
9783
 *    effect, because the embedded control will erase any drawing
 
9784
 *    shortly anyways.
 
9785
 *  
 
9786
 *  Mac OS X threading:
 
9787
 *    Not thread safe
 
9788
 *  
 
9789
 *  Parameters:
 
9790
 *    
 
9791
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9792
 *          The control which should apply a background color or
 
9793
 *          pattern.
 
9794
 *    
 
9795
 *    --> kEventParamControlSubControl (in, typeControlRef)
 
9796
 *          The subcontrol that is about to draw.
 
9797
 *    
 
9798
 *    --> kEventParamControlDrawDepth (in, typeShortInteger)
 
9799
 *          The bit depth of the GDevice on which the subcontrol will
 
9800
 *          be drawn.
 
9801
 *    
 
9802
 *    --> kEventParamControlDrawInColor (in, typeBoolean)
 
9803
 *          Whether the GDevice on which the subcontrol will be drawn
 
9804
 *          is in color or black & white.
 
9805
 *    
 
9806
 *    --> kEventParamGrafPort (in, typeGrafPtr)
 
9807
 *          The port to which the background color or pattern should be
 
9808
 *          applied. This parameter is optional and may not be present
 
9809
 *          in all instances of this event. Apply the background to the
 
9810
 *          current port if this parameter is not present.
 
9811
 *  
 
9812
 *  Availability:
 
9813
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9814
 *    CarbonLib:        not available
 
9815
 }
 
9816
const
 
9817
        kEventControlApplyBackground = 5;
 
9818
 
 
9819
{
 
9820
 *  kEventClassControl / kEventControlApplyTextColor
 
9821
 *  
 
9822
 *  Summary:
 
9823
 *    Sent when your control should apply a color or pattern to the
 
9824
 *    specified port and context so a subcontrol can draw text which
 
9825
 *    looks appropriate for your control�s background.
 
9826
 *  
 
9827
 *  Mac OS X threading:
 
9828
 *    Not thread safe
 
9829
 *  
 
9830
 *  Parameters:
 
9831
 *    
 
9832
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9833
 *          The control which should apply a text color.
 
9834
 *    
 
9835
 *    --> kEventParamControlSubControl (in, typeControlRef)
 
9836
 *          The subcontrol that is about to draw.
 
9837
 *    
 
9838
 *    --> kEventParamControlDrawDepth (in, typeShortInteger)
 
9839
 *          The bit depth of the GDevice on which the subcontrol will
 
9840
 *          be drawn.
 
9841
 *    
 
9842
 *    --> kEventParamControlDrawInColor (in, typeBoolean)
 
9843
 *          Whether the GDevice on which the subcontrol will be drawn
 
9844
 *          is in color or black & white.
 
9845
 *    
 
9846
 *    --> kEventParamCGContextRef (in, typeCGContextRef)
 
9847
 *          The CGContext to which the text color should be applied.
 
9848
 *          This parameter is optional and may not be present in all
 
9849
 *          instances of this event.
 
9850
 *    
 
9851
 *    --> kEventParamGrafPort (in, typeGrafPtr)
 
9852
 *          The GrafPort to which the text color should be applied.
 
9853
 *          This parameter is optional and may not be present in all
 
9854
 *          instances of this event. Apply to the current port if this
 
9855
 *          parameter is not present.
 
9856
 *  
 
9857
 *  Availability:
 
9858
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
9859
 *    CarbonLib:        not available
 
9860
 }
 
9861
const
 
9862
        kEventControlApplyTextColor = 6;
 
9863
 
 
9864
{
 
9865
 *  kEventClassControl / kEventControlGetNextFocusCandidate
 
9866
 *  
 
9867
 *  Summary:
 
9868
 *    Sent so that a given control can customize the focus order of its
 
9869
 *    subcontrols.
 
9870
 *  
 
9871
 *  Discussion:
 
9872
 *    The recipient will receive a start subcontrol in the
 
9873
 *    kEventParamStartControl parameter and a focusing direction in the
 
9874
 *    kEventParamControlPart parameter. You must only pass back
 
9875
 *    subcontrols of yourself (or NULL) when receiving this event; if
 
9876
 *    you do otherwise, the Control Manager�s behavior is undefined.
 
9877
 *  
 
9878
 *  Mac OS X threading:
 
9879
 *    Not thread safe
 
9880
 *  
 
9881
 *  Parameters:
 
9882
 *    
 
9883
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9884
 *          The control which should customize the focus order.
 
9885
 *    
 
9886
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
9887
 *          A focusing meta-part code, either kControlFocusNextPart or
 
9888
 *          kControlFocusPrevPart.
 
9889
 *    
 
9890
 *    --> kEventParamStartControl (in, typeControlRef)
 
9891
 *          On exit, should contain the next or previous subcontrol; if
 
9892
 *          there is no next subcontrol in the given focusing
 
9893
 *          direction, the recipient must either exclude the
 
9894
 *          kEventParamNextControl parameter or set it to NULL
 
9895
 *    
 
9896
 *    <-- kEventParamNextControl (out, typeControlRef)
 
9897
 *          The starting point from which to search for the next or
 
9898
 *          previous control. This parameter is optional and may not be
 
9899
 *          present in all instances of this event. Find the first
 
9900
 *          subcontrol in the appropriate focusing direction if this
 
9901
 *          parameter is not present or if it contains NULL.
 
9902
 *  
 
9903
 *  Availability:
 
9904
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
9905
 *    CarbonLib:        not available
 
9906
 }
 
9907
const
 
9908
        kEventControlGetNextFocusCandidate = 14;
 
9909
 
 
9910
{
 
9911
 *  kEventClassControl / kEventControlGetAutoToggleValue
 
9912
 *  
 
9913
 *  Summary:
 
9914
 *    This event is sent when the Control Manager is about to
 
9915
 *    autotoggle a control. You can specify the toggled value to use
 
9916
 *    based on the current value of your control.
 
9917
 *  
 
9918
 *  Discussion:
 
9919
 *    The Control Manager provides default behavior for this event. If
 
9920
 *    the event is not handled by a control, the default handler
 
9921
 *    automatically provides this mapping: if the control�s value is 1,
 
9922
 *    the toggled value is 0. If the control�s value is any other
 
9923
 *    value, the toggled value is 1.
 
9924
 *  
 
9925
 *  Mac OS X threading:
 
9926
 *    Not thread safe
 
9927
 *  
 
9928
 *  Parameters:
 
9929
 *    
 
9930
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9931
 *          The control that is being toggled.
 
9932
 *    
 
9933
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
9934
 *          The control part that is being toggled.
 
9935
 *    
 
9936
 *    <-- kEventParamControlValue (out, typeLongInteger)
 
9937
 *          On exit, contains the new control value.
 
9938
 *  
 
9939
 *  Availability:
 
9940
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
9941
 *    CarbonLib:        not available
 
9942
 }
 
9943
const
 
9944
        kEventControlGetAutoToggleValue = 15;
 
9945
 
 
9946
{
 
9947
 *  kEventClassControl / kEventControlInterceptSubviewClick
 
9948
 *  
 
9949
 *  Summary:
 
9950
 *    This is sent when the HIViewGetViewForMouseEvent API is called,
 
9951
 *    to allow embedding controls to intercept clicks in the their
 
9952
 *    embedded controls.
 
9953
 *  
 
9954
 *  Discussion:
 
9955
 *    The Control Manager sends this event before descending into any
 
9956
 *    subviews. Controls can override this to intercept clicks which
 
9957
 *    would normally be destined for their children. For example, the
 
9958
 *    HIToolbar control intercepts cmd-clicks to handle dragging its
 
9959
 *    children. To accomplish this, it overrides this event, looking
 
9960
 *    for the command key modifier. When the command key is pressed,
 
9961
 *    the view just returns noErr as the result from its event handler.
 
9962
 *    This tells the Control Manager to stop descending and return the
 
9963
 *    view that it called as the mouse event destination.
 
9964
 *  
 
9965
 *  Mac OS X threading:
 
9966
 *    Not thread safe
 
9967
 *  
 
9968
 *  Parameters:
 
9969
 *    
 
9970
 *    --> kEventParamDirectObject (in, typeControlRef)
 
9971
 *          The mouse-down event to intercept.
 
9972
 *  
 
9973
 *  Result:
 
9974
 *    An operating system result code. Return noErr to indicate that
 
9975
 *    this view intercepted the click, or eventNotHandledErr to allow
 
9976
 *    subviews of this view to take the click.
 
9977
 *  
 
9978
 *  Availability:
 
9979
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
9980
 *    CarbonLib:        not available
 
9981
 }
 
9982
const
 
9983
        kEventControlInterceptSubviewClick = 16;
 
9984
 
 
9985
{
 
9986
 *  kEventClassControl / kEventControlGetClickActivation
 
9987
 *  
 
9988
 *  Summary:
 
9989
 *    Sent when a click occurs in a window. Allows the control to
 
9990
 *    determine whether the window should be activated and whether the
 
9991
 *    click should be handled.
 
9992
 *  
 
9993
 *  Discussion:
 
9994
 *    This is very much like the window class version of this event.
 
9995
 *    The difference is that the mouse location is view- or
 
9996
 *    port-relative. This event is actually a copy of the mouse down
 
9997
 *    event, and so it has all the parameters that such an event would
 
9998
 *    have (modifiers, button number, etc.).
 
9999
 *    
 
10000
 *    When handling a click, this event is sent first, and is sent only
 
10001
 *    to the control that was clicked; it is not propagated to the
 
10002
 *    embedder of the clicked control. If the event is not handled,
 
10003
 *    then a kEventWindowGetClickActivation event is sent to the window
 
10004
 *    that was clicked.
 
10005
 *  
 
10006
 *  Mac OS X threading:
 
10007
 *    Not thread safe
 
10008
 *  
 
10009
 *  Parameters:
 
10010
 *    
 
10011
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10012
 *          The control that was clicked.
 
10013
 *    
 
10014
 *    <-- kEventParamClickActivation (out, typeClickActivationResult)
 
10015
 *          On exit, indicates how the click should be handled. Should
 
10016
 *          be set a ClickActivationResult constant from Controls.h.
 
10017
 *    
 
10018
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
10019
 *          The mouse location, in view-local coordinates if the
 
10020
 *          control�s owning window is composited, or port-local
 
10021
 *          coordinates if not.
 
10022
 *    
 
10023
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
10024
 *          The window under the mouse.
 
10025
 *    
 
10026
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
10027
 *          The window-relative position of the mouse in the window
 
10028
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
10029
 *          top left of the structure of the window.
 
10030
 *    
 
10031
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
10032
 *          The part code that the mouse location hit in the window.
 
10033
 *          This parameter only exists if the WindowRef parameter
 
10034
 *          exists. This saves you the trouble of calling FindWindow,
 
10035
 *          which is expensive on Mac OS X as it needs to call the
 
10036
 *          Window Server. Available in Mac OS X 10.3 and later.
 
10037
 *    
 
10038
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
10039
 *          The keyboard modifiers that were pressed when the event was
 
10040
 *          generated.
 
10041
 *    
 
10042
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
10043
 *          Which mouse button was pressed.
 
10044
 *    
 
10045
 *    --> kEventParamClickCount (in, typeUInt32)
 
10046
 *          Whether this is a single click, double click, etc.
 
10047
 *    
 
10048
 *    --> kEventParamMouseChord (in, typeUInt32)
 
10049
 *          Which other mouse buttons were pressed when the event was
 
10050
 *          generated. Available on Mac OS X only.
 
10051
 *    
 
10052
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
10053
 *          The type of tablet event which generated this mouse event;
 
10054
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
10055
 *          Only present if the event was generated from a tablet.
 
10056
 *    
 
10057
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
10058
 *          Further information about the tablet event which generated
 
10059
 *          this mouse event. Present if the the
 
10060
 *          kEventParamTabletEventType parameter contains
 
10061
 *          kEventTabletPoint.
 
10062
 *    
 
10063
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
10064
 *          Further information about the tablet event which generated
 
10065
 *          this mouse event. Present if the the
 
10066
 *          kEventParamTabletEventType parameter contains
 
10067
 *          kEventTabletProximity.
 
10068
 *  
 
10069
 *  Availability:
 
10070
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
10071
 *    CarbonLib:        not available
 
10072
 }
 
10073
const
 
10074
        kEventControlGetClickActivation = 17;
 
10075
 
 
10076
{
 
10077
 *  kEventClassControl / kEventControlDragEnter
 
10078
 *  
 
10079
 *  Summary:
 
10080
 *    A drag has entered your control.
 
10081
 *  
 
10082
 *  Discussion:
 
10083
 *    If you at all wish to handle the drag, you must return true in
 
10084
 *    the kEventParamControlWouldAcceptDrop parameter from your event
 
10085
 *    handler in response to this event. If you return
 
10086
 *    eventNotHandledErr, do not supply a
 
10087
 *    kEventParamControlWouldAcceptDrop parameter, or set its value to
 
10088
 *    false, you will not receive 'within' or 'leave' messages, nor
 
10089
 *    will you be eligible to receive the drop. This is done to try to
 
10090
 *    be as efficient as possible when sending events during the drag
 
10091
 *    operation.
 
10092
 *  
 
10093
 *  Mac OS X threading:
 
10094
 *    Not thread safe
 
10095
 *  
 
10096
 *  Parameters:
 
10097
 *    
 
10098
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10099
 *          The control that is the drag target.
 
10100
 *    
 
10101
 *    --> kEventParamDragRef (in, typeDragRef)
 
10102
 *          The DragRef for the drag.
 
10103
 *    
 
10104
 *    <-- kEventParamControlWouldAcceptDrop (out, typeBoolean)
 
10105
 *          The control would accept the drop. Return true in this
 
10106
 *          parameter if your view wants to track and possibly receive
 
10107
 *          this drag.
 
10108
 *  
 
10109
 *  Availability:
 
10110
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
10111
 *    CarbonLib:        not available
 
10112
 }
 
10113
const
 
10114
        kEventControlDragEnter = 18;
 
10115
 
 
10116
{
 
10117
 *  kEventClassControl / kEventControlDragWithin
 
10118
 *  
 
10119
 *  Summary:
 
10120
 *    A drag has moved with your airspace (but not on any subcontrol).
 
10121
 *  
 
10122
 *  Discussion:
 
10123
 *    Your control will typically respond to this event by drawing its
 
10124
 *    drag highlight. If the user moves into a subcontrol, it becomes
 
10125
 *    the target of the drag and your control will not receive 'within'
 
10126
 *    messages any longer.
 
10127
 *  
 
10128
 *  Mac OS X threading:
 
10129
 *    Not thread safe
 
10130
 *  
 
10131
 *  Parameters:
 
10132
 *    
 
10133
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10134
 *          The control that is the drag target.
 
10135
 *    
 
10136
 *    --> kEventParamDragRef (in, typeDragRef)
 
10137
 *          The DragRef for the drag.
 
10138
 *  
 
10139
 *  Availability:
 
10140
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
10141
 *    CarbonLib:        not available
 
10142
 }
 
10143
const
 
10144
        kEventControlDragWithin = 19;
 
10145
 
 
10146
{
 
10147
 *  kEventClassControl / kEventControlDragLeave
 
10148
 *  
 
10149
 *  Summary:
 
10150
 *    A drag is leaving your view.
 
10151
 *  
 
10152
 *  Discussion:
 
10153
 *    Your control will typically respond to this event by removing its
 
10154
 *    drag highlight.
 
10155
 *  
 
10156
 *  Mac OS X threading:
 
10157
 *    Not thread safe
 
10158
 *  
 
10159
 *  Parameters:
 
10160
 *    
 
10161
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10162
 *          The control that is the drag target.
 
10163
 *    
 
10164
 *    --> kEventParamDragRef (in, typeDragRef)
 
10165
 *          The DragRef for the drag.
 
10166
 *  
 
10167
 *  Availability:
 
10168
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
10169
 *    CarbonLib:        not available
 
10170
 }
 
10171
const
 
10172
        kEventControlDragLeave = 20;
 
10173
 
 
10174
{
 
10175
 *  kEventClassControl / kEventControlDragReceive
 
10176
 *  
 
10177
 *  Summary:
 
10178
 *    Congratulations, you are the lucky recipient of a drag. Enjoy it.
 
10179
 *  
 
10180
 *  Mac OS X threading:
 
10181
 *    Not thread safe
 
10182
 *  
 
10183
 *  Parameters:
 
10184
 *    
 
10185
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10186
 *          The control that is the drag target.
 
10187
 *    
 
10188
 *    --> kEventParamDragRef (in, typeDragRef)
 
10189
 *          The DragRef for the drag.
 
10190
 *  
 
10191
 *  Availability:
 
10192
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
10193
 *    CarbonLib:        not available
 
10194
 }
 
10195
const
 
10196
        kEventControlDragReceive = 21;
 
10197
 
 
10198
{
 
10199
 *  kEventClassControl / kEventControlSetFocusPart
 
10200
 *  
 
10201
 *  Summary:
 
10202
 *    Sent when your control is gaining, losing, or changing the focus.
 
10203
 *  
 
10204
 *  Mac OS X threading:
 
10205
 *    Not thread safe
 
10206
 *  
 
10207
 *  Parameters:
 
10208
 *    
 
10209
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10210
 *          The control that is gaining, losing, or changing focus.
 
10211
 *    
 
10212
 *    --> kEventParamControlFocusEverything (in, typeBoolean)
 
10213
 *          Indicates whether to allowing focusing on a part that
 
10214
 *          doesn�t accept general keyboard input, such as a push
 
10215
 *          button, or if only traditionally focusable parts such as
 
10216
 *          edit fields and list boxes should be allowed to gain focus.
 
10217
 *          This parameter is optional and may not be present in all
 
10218
 *          instances of this event. Restrict focus to traditionally
 
10219
 *          focusable parts if this parameter is not present.
 
10220
 *    
 
10221
 *    <-> kEventParamControlPart (in/out, typeControlPartCode)
 
10222
 *          On entry, a part code that may be either an actual control
 
10223
 *          part or a control focus meta-part. This parameter may be
 
10224
 *          one of kControlFocusNoPart (if the control is losing
 
10225
 *          focus), kControlFocusNextPart (if the next part in the
 
10226
 *          control should be focused), kControlFocusPrevPart (if the
 
10227
 *          previous part in the control should be focused), or an
 
10228
 *          actual control part (if that specific part should be
 
10229
 *          focused). On exit, your event handler should store the
 
10230
 *          actual part code that was focused into this parameter. Your
 
10231
 *          control must always allow the focus to be removed (when
 
10232
 *          this parameter is kControlFocusNoPart on entry).
 
10233
 *  
 
10234
 *  Availability:
 
10235
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10236
 *    CarbonLib:        not available
 
10237
 }
 
10238
const
 
10239
        kEventControlSetFocusPart = 7;
 
10240
 
 
10241
{
 
10242
 *  kEventClassControl / kEventControlGetFocusPart
 
10243
 *  
 
10244
 *  Summary:
 
10245
 *    Sent when your the Control Manager wants to know what part of
 
10246
 *    your control is currently focused. Set the kEventParamControlPart
 
10247
 *    param to your currently focused part.
 
10248
 *  
 
10249
 *  Discussion:
 
10250
 *    The Control Manager provides default behavior for this event. If
 
10251
 *    the event is not handled by a control, the default handler
 
10252
 *    returns the part of the control that was most recently focused.
 
10253
 *  
 
10254
 *  Mac OS X threading:
 
10255
 *    Not thread safe
 
10256
 *  
 
10257
 *  Parameters:
 
10258
 *    
 
10259
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10260
 *          The control for which to get the current focus.
 
10261
 *    
 
10262
 *    <-- kEventParamControlPart (out, typeControlPartCode)
 
10263
 *          On exit, contains the current focus for this control.
 
10264
 *  
 
10265
 *  Availability:
 
10266
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10267
 *    CarbonLib:        not available
 
10268
 }
 
10269
const
 
10270
        kEventControlGetFocusPart = 8;
 
10271
 
 
10272
{
 
10273
 *  kEventClassControl / kEventControlActivate
 
10274
 *  
 
10275
 *  Summary:
 
10276
 *    Sent when your control becomes active as a result of a call to
 
10277
 *    ActivateControl.
 
10278
 *  
 
10279
 *  Mac OS X threading:
 
10280
 *    Not thread safe
 
10281
 *  
 
10282
 *  Parameters:
 
10283
 *    
 
10284
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10285
 *          The control that was activated.
 
10286
 *  
 
10287
 *  Availability:
 
10288
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10289
 *    CarbonLib:        not available
 
10290
 }
 
10291
const
 
10292
        kEventControlActivate = 9;
 
10293
 
 
10294
{
 
10295
 *  kEventClassControl / kEventControlDeactivate
 
10296
 *  
 
10297
 *  Summary:
 
10298
 *    Sent when your control becomes inactive as a result of a call to
 
10299
 *    DeactivateControl.
 
10300
 *  
 
10301
 *  Mac OS X threading:
 
10302
 *    Not thread safe
 
10303
 *  
 
10304
 *  Parameters:
 
10305
 *    
 
10306
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10307
 *          The control that was deactivated.
 
10308
 *  
 
10309
 *  Availability:
 
10310
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10311
 *    CarbonLib:        not available
 
10312
 }
 
10313
const
 
10314
        kEventControlDeactivate = 10;
 
10315
 
 
10316
{
 
10317
 *  kEventClassControl / kEventControlSetCursor
 
10318
 *  
 
10319
 *  Summary:
 
10320
 *    Sent when your control is asked to change the cursor as a result
 
10321
 *    of a call to HandleControlSetCursor.
 
10322
 *  
 
10323
 *  Discussion:
 
10324
 *    Note that the standard window event handler does not call
 
10325
 *    HandleControlSetCursor, and therefore, your control will not
 
10326
 *    ordinarily receive this event. Your host application must call
 
10327
 *    HandleControlSetCursor itself in order for your control to
 
10328
 *    receive this event. On Mac OS X 10.2 and later, we recommend
 
10329
 *    using mouse tracking regions in your control to be notified when
 
10330
 *    to change the cursor, rather than using this event.
 
10331
 *  
 
10332
 *  Mac OS X threading:
 
10333
 *    Not thread safe
 
10334
 *  
 
10335
 *  Parameters:
 
10336
 *    
 
10337
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10338
 *          The control that should set the cursor.
 
10339
 *    
 
10340
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
10341
 *          The mouse location, in view-local coordinates if the
 
10342
 *          control�s owning window is composited, or port-local
 
10343
 *          coordinates if not.
 
10344
 *    
 
10345
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
10346
 *          The current keyboard modifiers.
 
10347
 *  
 
10348
 *  Availability:
 
10349
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10350
 *    CarbonLib:        not available
 
10351
 }
 
10352
const
 
10353
        kEventControlSetCursor = 11;
 
10354
 
 
10355
{
 
10356
 *  kEventClassControl / kEventControlContextualMenuClick
 
10357
 *  
 
10358
 *  Summary:
 
10359
 *    Sent when your control is asked to display a contextual menu as a
 
10360
 *    result of a call to HandleControlContextualMenuClick.
 
10361
 *  
 
10362
 *  Mac OS X threading:
 
10363
 *    Not thread safe
 
10364
 *  
 
10365
 *  Parameters:
 
10366
 *    
 
10367
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10368
 *          The control that was clicked.
 
10369
 *    
 
10370
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
10371
 *          The mouse location, in view-local coordinates if the
 
10372
 *          control�s owning window is composited, or port-local
 
10373
 *          coordinates if not. In Mac OS X 10.2 and earlier, however,
 
10374
 *          this parameter was incorrectly in global coordinates.
 
10375
 *    
 
10376
 *    --> kEventParamWindowRef (in, typeWindowRef)
 
10377
 *          The window under the mouse. Available in Mac OS X 10.3 and
 
10378
 *          later.
 
10379
 *    
 
10380
 *    --> kEventParamWindowMouseLocation (in, typeHIPoint)
 
10381
 *          The window-relative position of the mouse in the window
 
10382
 *          given in the kEventParamWindowRef parameter. 0,0 is at the
 
10383
 *          top left of the structure of the window. Available in Mac
 
10384
 *          OS X 10.3 and later.
 
10385
 *    
 
10386
 *    --> kEventParamWindowPartCode (in, typeWindowPartCode)
 
10387
 *          The part code that the mouse location hit in the window.
 
10388
 *          This parameter only exists if the WindowRef parameter
 
10389
 *          exists. This saves you the trouble of calling FindWindow,
 
10390
 *          which is expensive on Mac OS X as it needs to call the
 
10391
 *          Window Server. Available in Mac OS X 10.3 and later.
 
10392
 *    
 
10393
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
10394
 *          The keyboard modifiers that were pressed when the event was
 
10395
 *          generated. Available in Mac OS X 10.3 and later.
 
10396
 *    
 
10397
 *    --> kEventParamMouseButton (in, typeMouseButton)
 
10398
 *          Which mouse button was pressed. Available in Mac OS X 10.3
 
10399
 *          and later.
 
10400
 *    
 
10401
 *    --> kEventParamClickCount (in, typeUInt32)
 
10402
 *          Whether this is a single click, double click, etc.
 
10403
 *          Available in Mac OS X 10.3 and later.
 
10404
 *    
 
10405
 *    --> kEventParamMouseChord (in, typeUInt32)
 
10406
 *          Which other mouse buttons were pressed when the event was
 
10407
 *          generated. Available in Mac OS X 10.3 and later.
 
10408
 *    
 
10409
 *    --> kEventParamTabletEventType (in, typeUInt32)
 
10410
 *          The type of tablet event which generated this mouse event;
 
10411
 *          contains either kEventTabletPoint or kEventTabletProximity.
 
10412
 *          Only present if the event was generated from a tablet.
 
10413
 *          Available in Mac OS X 10.3 and later.
 
10414
 *    
 
10415
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
10416
 *          Further information about the tablet event which generated
 
10417
 *          this mouse event. Present if the the
 
10418
 *          kEventParamTabletEventType parameter contains
 
10419
 *          kEventTabletPoint. Available in Mac OS X 10.3 and later.
 
10420
 *    
 
10421
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
10422
 *          Further information about the tablet event which generated
 
10423
 *          this mouse event. Present if the the
 
10424
 *          kEventParamTabletEventType parameter contains
 
10425
 *          kEventTabletProximity. Available in Mac OS X 10.3 and later.
 
10426
 *  
 
10427
 *  Availability:
 
10428
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10429
 *    CarbonLib:        not available
 
10430
 }
 
10431
const
 
10432
        kEventControlContextualMenuClick = 12;
 
10433
 
 
10434
{
 
10435
 *  kEventClassControl / kEventControlTrack
 
10436
 *  
 
10437
 *  Summary:
 
10438
 *    Sent to allow a control definition to track the mouse in response
 
10439
 *    to a call to HIViewClick, HandleControlClick, etc.
 
10440
 *  
 
10441
 *  Discussion:
 
10442
 *    In fact, this event is actually sent from within HIViewClick and
 
10443
 *    HandleControlClick. The default handling of this event is the
 
10444
 *    Control Manager�s normal tracking logic; this is good enough for
 
10445
 *    simple controls (such as push buttons) and controls with simple
 
10446
 *    indicators (such as scroll bars and sliders). You should only
 
10447
 *    need to handle or override this event if you are trying to do
 
10448
 *    more complex tracking, such as displaying a menu in the middle of
 
10449
 *    tracking.
 
10450
 *  
 
10451
 *  Mac OS X threading:
 
10452
 *    Not thread safe
 
10453
 *  
 
10454
 *  Parameters:
 
10455
 *    
 
10456
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10457
 *          The control to track.
 
10458
 *    
 
10459
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
10460
 *          The mouse location, in view-local coordinates if the
 
10461
 *          control�s owning window is composited, or port-local
 
10462
 *          coordinates if not.
 
10463
 *    
 
10464
 *    <-> kEventParamKeyModifiers (in/out, typeUInt32)
 
10465
 *          The current keyboard modifiers. On exit, the event handler
 
10466
 *          may update this parameter with the modifiers that were
 
10467
 *          pressed when tracking ended; these modifiers will be
 
10468
 *          included in the kEventCommandProcess event that is sent by
 
10469
 *          the Control Manager.
 
10470
 *    
 
10471
 *    --> kEventParamControlAction (in, typeControlActionUPP)
 
10472
 *          The control action proc that should be called by the
 
10473
 *          control during tracking.
 
10474
 *    
 
10475
 *    <-- kEventParamControlPart (out, typeControlPartCode)
 
10476
 *          On exit, contains the part code of the control part that
 
10477
 *          was selected when tracking ended, or kControlNoPart if no
 
10478
 *          part was selected. If the part code is non-zero, the
 
10479
 *          Control Manager will automatically send kEventControlHit
 
10480
 *          and kEventCommandProcess events.
 
10481
 *  
 
10482
 *  Availability:
 
10483
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10484
 *    CarbonLib:        not available
 
10485
 }
 
10486
const
 
10487
        kEventControlTrack = 51;
 
10488
 
 
10489
{
 
10490
 *  kEventClassControl / kEventControlGetScrollToHereStartPoint
 
10491
 *  
 
10492
 *  Summary:
 
10493
 *    Sent so your control can support Scroll To Here behavior during
 
10494
 *    tracking.
 
10495
 *  
 
10496
 *  Mac OS X threading:
 
10497
 *    Not thread safe
 
10498
 *  
 
10499
 *  Parameters:
 
10500
 *    
 
10501
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10502
 *          The control for which to retrieve the Scroll To Here point.
 
10503
 *    
 
10504
 *    <-> kEventParamMouseLocation (in/out, typeQDPoint)
 
10505
 *          On entry, a point in view-local coordinates if the
 
10506
 *          control�s owning window is composited, or port-local
 
10507
 *          coordinates if not, which provides the location at which
 
10508
 *          the user clicked to request Scroll To Here behavior. On
 
10509
 *          exit, this parameter should contain the mouse location in
 
10510
 *          view-local or port-local coordinates where a click would
 
10511
 *          have needed to be to cause your indicator to be dragged to
 
10512
 *          the incoming mouse location.
 
10513
 *    
 
10514
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
10515
 *          The current keyboard modifiers.
 
10516
 *  
 
10517
 *  Availability:
 
10518
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10519
 *    CarbonLib:        not available
 
10520
 }
 
10521
const
 
10522
        kEventControlGetScrollToHereStartPoint = 52;
 
10523
 
 
10524
{
 
10525
 *  kEventClassControl / kEventControlGetIndicatorDragConstraint
 
10526
 *  
 
10527
 *  Summary:
 
10528
 *    Sent so your control can constrain the movement of its indicator
 
10529
 *    during tracking.
 
10530
 *  
 
10531
 *  Mac OS X threading:
 
10532
 *    Not thread safe
 
10533
 *  
 
10534
 *  Parameters:
 
10535
 *    
 
10536
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10537
 *          The control that is being tracked.
 
10538
 *    
 
10539
 *    --> kEventParamMouseLocation (in, typeQDPoint)
 
10540
 *          The mouse location, in view-local coordinates if the
 
10541
 *          control�s owning window is composited, or port-local
 
10542
 *          coordinates if not.
 
10543
 *    
 
10544
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
10545
 *          The current keyboard modifiers.
 
10546
 *    
 
10547
 *    <-- kEventParamControlIndicatorDragConstraint (out, typeIndicatorDragConstraint)
 
10548
 *          On exit, contains an IndicatorDragConstraint structure.
 
10549
 *  
 
10550
 *  Availability:
 
10551
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10552
 *    CarbonLib:        not available
 
10553
 }
 
10554
const
 
10555
        kEventControlGetIndicatorDragConstraint = 53;
 
10556
 
 
10557
{
 
10558
 *  kEventClassControl / kEventControlIndicatorMoved
 
10559
 *  
 
10560
 *  Summary:
 
10561
 *    Sent during live-tracking of the indicator so your control can
 
10562
 *    update its value based on the new indicator position. During
 
10563
 *    non-live tracking, this event lets you redraw the indicator ghost
 
10564
 *    at the appropriate place.
 
10565
 *  
 
10566
 *  Mac OS X threading:
 
10567
 *    Not thread safe
 
10568
 *  
 
10569
 *  Parameters:
 
10570
 *    
 
10571
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10572
 *          The control that is being tracked.
 
10573
 *    
 
10574
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10575
 *          The new indicator region.
 
10576
 *    
 
10577
 *    --> kEventParamControlIndicatorRegion (in, typeQDRgnHandle)
 
10578
 *          Indicates whether the control is using non-live-tracking
 
10579
 *          (true) or live tracking (false).
 
10580
 *  
 
10581
 *  Availability:
 
10582
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10583
 *    CarbonLib:        not available
 
10584
 }
 
10585
const
 
10586
        kEventControlIndicatorMoved = 54;
 
10587
 
 
10588
{
 
10589
 *  kEventClassControl / kEventControlGhostingFinished
 
10590
 *  
 
10591
 *  Summary:
 
10592
 *    Sent at the end of non-live indicator tracking so your control
 
10593
 *    can update its value based on the final ghost location.
 
10594
 *  
 
10595
 *  Mac OS X threading:
 
10596
 *    Not thread safe
 
10597
 *  
 
10598
 *  Parameters:
 
10599
 *    
 
10600
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10601
 *          The control that was being tracked.
 
10602
 *    
 
10603
 *    --> kEventParamControlIndicatorOffset (in, typeQDPoint)
 
10604
 *          The final offset of the indicator.
 
10605
 *  
 
10606
 *  Availability:
 
10607
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10608
 *    CarbonLib:        not available
 
10609
 }
 
10610
const
 
10611
        kEventControlGhostingFinished = 55;
 
10612
 
 
10613
{
 
10614
 *  kEventClassControl / kEventControlGetActionProcPart
 
10615
 *  
 
10616
 *  Summary:
 
10617
 *    Sent during tracking so your control can alter the part that is
 
10618
 *    passed to its action proc based on modifier keys, etc.
 
10619
 *  
 
10620
 *  Mac OS X threading:
 
10621
 *    Not thread safe
 
10622
 *  
 
10623
 *  Parameters:
 
10624
 *    
 
10625
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10626
 *          The control being tracked.
 
10627
 *    
 
10628
 *    --> kEventParamKeyModifiers (in, typeUInt32)
 
10629
 *          The current keyboard modifiers.
 
10630
 *    
 
10631
 *    <-> kEventParamControlPart (in/out, typeControlPartCode)
 
10632
 *          On entry, the proposed control part that will be sent to
 
10633
 *          the action proc. Your handler may modify this parameter
 
10634
 *          based on its own criteria (which modifier keys are pressed,
 
10635
 *          for example).
 
10636
 *    
 
10637
 *    <-- kEventParamControlPartAutoRepeats (out, typeBoolean)
 
10638
 *          On output, a flag to the standard control tracking loop in
 
10639
 *          the Control Manager indicating whether to autorepeat when
 
10640
 *          the user presses and holds on certain parts of your custom
 
10641
 *          control. The autorepeat timing curve is the same as that
 
10642
 *          used for the buttons/page areas of scroll bars. This
 
10643
 *          parameter is observed by the Control Manager in Mac OS X
 
10644
 *          10.2 and later.
 
10645
 *  
 
10646
 *  Availability:
 
10647
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10648
 *    CarbonLib:        not available
 
10649
 }
 
10650
const
 
10651
        kEventControlGetActionProcPart = 56;
 
10652
 
 
10653
{
 
10654
 *  kEventClassControl / kEventControlGetPartRegion
 
10655
 *  
 
10656
 *  Summary:
 
10657
 *    Sent by the GetControlRegion, HIViewCopyPartShape, and similar
 
10658
 *    APIs when a client wants to get a particular region or shape of
 
10659
 *    your control.
 
10660
 *  
 
10661
 *  Discussion:
 
10662
 *    This event is sent to your handler in order to fetch both regions
 
10663
 *    and shapes from your view. Shapes will only be requested on Mac
 
10664
 *    OS X 10.4 and later. There are two strategies for handling this
 
10665
 *    event: the non-shape savvy way and the shape savvy way. The shape
 
10666
 *    savvy way avoids costly conversions between regions and shapes
 
10667
 *    which can slow your view's performance. 
 
10668
 *    
 
10669
 *    Non-shape savvy way: Get the region out of the
 
10670
 *    kEventParamControlRegion parameter and modify it appropriately to
 
10671
 *    reflect the desired part. Before the advent of shapes, this was
 
10672
 *    the only method for handling this event. If you always handle the
 
10673
 *    event this way on Mac OS X 10.4 and later, you may force the
 
10674
 *    Control Manager to convert the region to a shape, which adversely
 
10675
 *    affects performance. 
 
10676
 *    
 
10677
 *    Shape savvy way: Get the value of the
 
10678
 *    kEventParamControlPrefersShape parameter. If the parameter
 
10679
 *    doesn't exist or if its value is false, handle this event in the
 
10680
 *    non-shape savvy way as described above. If the parameter exists
 
10681
 *    and has a value of true, allocate an immutable shape that
 
10682
 *    represents the given part of your view and use SetEventParameter
 
10683
 *    to add the shape to the event in the kEventParamShape parameter.
 
10684
 *    You may now release the shape, since it was retained by
 
10685
 *    SetEventParameter. If for some reason you are unwilling or unable
 
10686
 *    to provide a shape for the given part, you may still fall back to
 
10687
 *    the non-shape savvy method. 
 
10688
 *    
 
10689
 *    NOTE: If your handler attempts to pre- or post-process some other
 
10690
 *    handler's processing of this event by calling
 
10691
 *    CallNextEventHandler, you MUST NOT rely on the value of the
 
10692
 *    kEventParamControlPrefersShape parameter being preserved across
 
10693
 *    the call to CallNextEventHandler. This event may dynamically
 
10694
 *    modify itself depending on how any given handler acts upon it.
 
10695
 *  
 
10696
 *  Mac OS X threading:
 
10697
 *    Not thread safe
 
10698
 *  
 
10699
 *  Parameters:
 
10700
 *    
 
10701
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10702
 *          The control whose region/shape to return.
 
10703
 *    
 
10704
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
10705
 *          The control part code whose region/shape to return.
 
10706
 *    
 
10707
 *    --> kEventParamControlPrefersShape (in, typeBoolean)
 
10708
 *          A Boolean indicating whether your view may respond to this
 
10709
 *          event by adding a kEventParamShape parameter to it instead
 
10710
 *          of modifying the region in the kEventParamControlRegion
 
10711
 *          parameter. If the parameter is false, you must respond to
 
10712
 *          the event by modifying the region in the
 
10713
 *          kEventParamControlRegion parameter; you may not add a
 
10714
 *          kEventParamShape parameter. If the parameter is true, you
 
10715
 *          may � but are not required to � respond to the event by
 
10716
 *          adding the kEventParamShape parameter; if you choose not
 
10717
 *          to, you must respond to the event by modifying the region
 
10718
 *          in the kEventParamControlRegion parameter. This parameter
 
10719
 *          will only be present on Mac OS X 10.4 and later. In fact,
 
10720
 *          even on Mac OS X 10.4 it is an optional parameter and will
 
10721
 *          not always be present. If this parameter is not present,
 
10722
 *          you should act as though its value were false.
 
10723
 *    
 
10724
 *    --> kEventParamControlRegion (in, typeQDRgnHandle)
 
10725
 *          A pre-allocated RgnHandle. Unless your handler is allowed
 
10726
 *          to and chooses to add a kEventParamShape parameter (see the
 
10727
 *          discussion of kEventParamControlPrefersShape above), your
 
10728
 *          handler should get the RgnHandle from the event and set the
 
10729
 *          region contents appropriately. If your handler adds a
 
10730
 *          kEventParamShape parameter to the event, it must neither
 
10731
 *          get nor modify this parameter.
 
10732
 *    
 
10733
 *    <-- kEventParamShape (out, typeHIShapeRef)
 
10734
 *          If your handler is allowed to and chooses to provide a
 
10735
 *          shape (see the discussion of kEventParamControlPrefersShape
 
10736
 *          above), your handler should create a new, immutable shape
 
10737
 *          and return it in this parameter. After you call
 
10738
 *          SetEventParameter, you may release the shape, as it will be
 
10739
 *          retained by SetEventParameter and released when the event
 
10740
 *          is destroyed. If your handler gets or modifies the
 
10741
 *          kEventParamControlRegion parameter, it must not set this
 
10742
 *          parameter.
 
10743
 *  
 
10744
 *  Availability:
 
10745
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10746
 *    CarbonLib:        not available
 
10747
 }
 
10748
const
 
10749
        kEventControlGetPartRegion = 101;
 
10750
 
 
10751
{
 
10752
 *  kEventClassControl / kEventControlGetPartBounds
 
10753
 *  
 
10754
 *  Summary:
 
10755
 *    Sent when a client wants to get a particular rectangle of your
 
10756
 *    control when it may be more efficient than asking for a region.
 
10757
 *  
 
10758
 *  Mac OS X threading:
 
10759
 *    Not thread safe
 
10760
 *  
 
10761
 *  Parameters:
 
10762
 *    
 
10763
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10764
 *          The control whose bounds to return.
 
10765
 *    
 
10766
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
10767
 *          The control part whose bounds to return.
 
10768
 *    
 
10769
 *    <-- kEventParamControlPartBounds (out, typeHIRect)
 
10770
 *          On exit, contains the bounds of the specified part.
 
10771
 *  
 
10772
 *  Availability:
 
10773
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10774
 *    CarbonLib:        not available
 
10775
 }
 
10776
const
 
10777
        kEventControlGetPartBounds = 102;
 
10778
 
 
10779
{
 
10780
 *  kEventClassControl / kEventControlSetData
 
10781
 *  
 
10782
 *  Summary:
 
10783
 *    Sent by the SetControlData API when a client wants to change an
 
10784
 *    arbitrary setting of your control.
 
10785
 *  
 
10786
 *  Mac OS X threading:
 
10787
 *    Not thread safe
 
10788
 *  
 
10789
 *  Parameters:
 
10790
 *    
 
10791
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10792
 *          The control for which to set data.
 
10793
 *    
 
10794
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
10795
 *          The control part for which to set data.
 
10796
 *    
 
10797
 *    --> kEventParamControlDataTag (in, typeEnumeration)
 
10798
 *          The type of data to set.
 
10799
 *    
 
10800
 *    --> kEventParamControlDataBuffer (in, typePtr)
 
10801
 *          A pointer to the data.
 
10802
 *    
 
10803
 *    --> kEventParamControlDataBufferSize (in, typeLongInteger)
 
10804
 *          The size of the data.
 
10805
 *  
 
10806
 *  Availability:
 
10807
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10808
 *    CarbonLib:        not available
 
10809
 }
 
10810
const
 
10811
        kEventControlSetData = 103;
 
10812
 
 
10813
{
 
10814
 *  kEventClassControl / kEventControlGetData
 
10815
 *  
 
10816
 *  Summary:
 
10817
 *    Sent by the GetControlData API when a client wants to get an
 
10818
 *    arbitrary setting of your control.
 
10819
 *  
 
10820
 *  Mac OS X threading:
 
10821
 *    Not thread safe
 
10822
 *  
 
10823
 *  Parameters:
 
10824
 *    
 
10825
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10826
 *          The control from which to get data.
 
10827
 *    
 
10828
 *    --> kEventParamControlPart (in, typeControlPartCode)
 
10829
 *          The control part for which to get data.
 
10830
 *    
 
10831
 *    --> kEventParamControlDataTag (in, typeEnumeration)
 
10832
 *          The type of data to get.
 
10833
 *    
 
10834
 *    --> kEventParamControlDataBuffer (in, typePtr)
 
10835
 *          A buffer in which to write the data.
 
10836
 *    
 
10837
 *    <-> kEventParamControlDataBufferSize (in/out, typeLongInteger)
 
10838
 *          On entry, the size of the data buffer. On exit, the amount
 
10839
 *          of data that was available.
 
10840
 *  
 
10841
 *  Availability:
 
10842
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10843
 *    CarbonLib:        not available
 
10844
 }
 
10845
const
 
10846
        kEventControlGetData = 104;
 
10847
 
 
10848
{
 
10849
 *  kEventClassControl / kEventControlGetSizeConstraints
 
10850
 *  
 
10851
 *  Summary:
 
10852
 *    Sent by the HIViewGetSizeConstraints API to allow your custom
 
10853
 *    control/view to specify its minimum and maximum size.
 
10854
 *  
 
10855
 *  Discussion:
 
10856
 *    This is different from the optimal size event above. The optimal
 
10857
 *    size might be larger than a view�s minimum size. A parent view
 
10858
 *    can use this information to help it lay out subviews. The toolbar
 
10859
 *    control uses this information to help lay out toolbar items, for
 
10860
 *    example.
 
10861
 *  
 
10862
 *  Mac OS X threading:
 
10863
 *    Not thread safe
 
10864
 *  
 
10865
 *  Parameters:
 
10866
 *    
 
10867
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10868
 *          The control for which to get size constraints.
 
10869
 *    
 
10870
 *    <-- kEventParamMinimumSize (out, typeHISize)
 
10871
 *          On exit, contains the control�s minimum size.
 
10872
 *    
 
10873
 *    <-- kEventParamMaximumSize (out, typeHISize)
 
10874
 *          On exit, contains the control�s maximum size.
 
10875
 *  
 
10876
 *  Availability:
 
10877
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
10878
 *    CarbonLib:        not available
 
10879
 }
 
10880
const
 
10881
        kEventControlGetSizeConstraints = 105;
 
10882
 
 
10883
{
 
10884
 *  kEventClassControl / kEventControlGetFrameMetrics
 
10885
 *  
 
10886
 *  Summary:
 
10887
 *    Sent when a control client needs to determine the width of the
 
10888
 *    control�s structure region.
 
10889
 *  
 
10890
 *  Discussion:
 
10891
 *    This event is not sent automatically by the Control Manager at
 
10892
 *    any time, but may be sent by control clients during various
 
10893
 *    layout operations. For example, the Window Manager will send this
 
10894
 *    event to a window frame HIView to determine the window structure
 
10895
 *    widths, and the Menu Manager will send this event to a menu
 
10896
 *    content view to determine the content structure widths.
 
10897
 *  
 
10898
 *  Mac OS X threading:
 
10899
 *    Not thread safe
 
10900
 *  
 
10901
 *  Parameters:
 
10902
 *    
 
10903
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10904
 *          The control for which to get frame metrics.
 
10905
 *    
 
10906
 *    <-- kEventParamControlFrameMetrics (out, typeControlFrameMetrics)
 
10907
 *          On exit, contains the control�s frame metrics.
 
10908
 *  
 
10909
 *  Availability:
 
10910
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
10911
 *    CarbonLib:        not available
 
10912
 }
 
10913
const
 
10914
        kEventControlGetFrameMetrics = 106;
 
10915
 
 
10916
{
 
10917
 *  kEventClassControl / kEventControlValueFieldChanged
 
10918
 *  
 
10919
 *  Summary:
 
10920
 *    Sent when your control�s value, min, max, or view size has
 
10921
 *    changed. Useful so other entities can watch for changes to your
 
10922
 *    control�s value.
 
10923
 *  
 
10924
 *  Mac OS X threading:
 
10925
 *    Not thread safe
 
10926
 *  
 
10927
 *  Parameters:
 
10928
 *    
 
10929
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10930
 *          The control whose value, min, max, or view size has changed.
 
10931
 *  
 
10932
 *  Availability:
 
10933
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10934
 *    CarbonLib:        not available
 
10935
 }
 
10936
const
 
10937
        kEventControlValueFieldChanged = 151;
 
10938
 
 
10939
{
 
10940
 *  kEventClassControl / kEventControlAddedSubControl
 
10941
 *  
 
10942
 *  Summary:
 
10943
 *    Sent when a control was embedded within your control.
 
10944
 *  
 
10945
 *  Mac OS X threading:
 
10946
 *    Not thread safe
 
10947
 *  
 
10948
 *  Parameters:
 
10949
 *    
 
10950
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10951
 *          The control that gained a new subcontrol.
 
10952
 *    
 
10953
 *    --> kEventParamControlSubControl (in, typeControlRef)
 
10954
 *          The subcontrol that was added.
 
10955
 *  
 
10956
 *  Availability:
 
10957
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10958
 *    CarbonLib:        not available
 
10959
 }
 
10960
const
 
10961
        kEventControlAddedSubControl = 152;
 
10962
 
 
10963
{
 
10964
 *  kEventClassControl / kEventControlRemovingSubControl
 
10965
 *  
 
10966
 *  Summary:
 
10967
 *    Sent when one of your child controls will be removed from your
 
10968
 *    control.
 
10969
 *  
 
10970
 *  Mac OS X threading:
 
10971
 *    Not thread safe
 
10972
 *  
 
10973
 *  Parameters:
 
10974
 *    
 
10975
 *    --> kEventParamDirectObject (in, typeControlRef)
 
10976
 *          The control that will be losing a subcontrol.
 
10977
 *    
 
10978
 *    --> kEventParamControlSubControl (in, typeControlRef)
 
10979
 *          The subcontrol that will be removed.
 
10980
 *  
 
10981
 *  Availability:
 
10982
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
10983
 *    CarbonLib:        not available
 
10984
 }
 
10985
const
 
10986
        kEventControlRemovingSubControl = 153;
 
10987
 
 
10988
{
 
10989
 *  kEventClassControl / kEventControlBoundsChanged
 
10990
 *  
 
10991
 *  Summary:
 
10992
 *    Sent when your control�s bounding rectangle has changed.
 
10993
 *  
 
10994
 *  Discussion:
 
10995
 *    If you want to generate an efficient invalid region in response
 
10996
 *    to a size change, you need to handle
 
10997
 *    kEventControlInvalidateForSizeChange.
 
10998
 *  
 
10999
 *  Mac OS X threading:
 
11000
 *    Not thread safe
 
11001
 *  
 
11002
 *  Parameters:
 
11003
 *    
 
11004
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11005
 *          The control whose bounds have changed.
 
11006
 *    
 
11007
 *    --> kEventParamAttributes (in, typeUInt32)
 
11008
 *          Flags indicating how the bounds changed, including
 
11009
 *          kControlBoundsChangeSizeChanged and
 
11010
 *          kControlBoundsChangePositionChanged.
 
11011
 *    
 
11012
 *    --> kEventParamOriginalBounds (in, typeQDRectangle)
 
11013
 *          The control�s bounds before the change. This is the
 
11014
 *          control�s frame bounds; for a compositing view, this
 
11015
 *          bounding rect is in the parent view�s coordinate system,
 
11016
 *          and for a non-compositing view, it is in local GrafPort
 
11017
 *          coordinates.
 
11018
 *    
 
11019
 *    --> kEventParamPreviousBounds (in, typeQDRectangle)
 
11020
 *          The control�s bounds before the change. This parameter
 
11021
 *          always has the same value as the kEventParamOriginalBounds
 
11022
 *          parameter.
 
11023
 *    
 
11024
 *    --> kEventParamCurrentBounds (in, typeQDRectangle)
 
11025
 *          The control�s new bounds. This is the control�s frame
 
11026
 *          bounds; for a compositing view, this bounding rect is in
 
11027
 *          the parent view�s coordinate system, and for a
 
11028
 *          non-compositing view, it is in local GrafPort coordinates.
 
11029
 *  
 
11030
 *  Availability:
 
11031
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
11032
 *    CarbonLib:        not available
 
11033
 }
 
11034
const
 
11035
        kEventControlBoundsChanged = 154;
 
11036
 
 
11037
{
 
11038
 *  kEventClassControl / kEventControlInvalidateForSizeChange
 
11039
 *  
 
11040
 *  Summary:
 
11041
 *    Sent when a control's size changes so it can invalidate the area
 
11042
 *    of itself that needs to be redrawn.
 
11043
 *  
 
11044
 *  Discussion:
 
11045
 *    Handle this event by calling HIViewSetNeedsDisplayInRegion with a
 
11046
 *    region that properly reflects the area of your control that needs
 
11047
 *    to be redrawn after a size change. The default handler for this
 
11048
 *    event will invalidate the entire control.
 
11049
 *  
 
11050
 *  Mac OS X threading:
 
11051
 *    Not thread safe
 
11052
 *  
 
11053
 *  Parameters:
 
11054
 *    
 
11055
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11056
 *          The control whose size has changed.
 
11057
 *    
 
11058
 *    --> kEventParamOriginalBounds (in, typeQDRectangle)
 
11059
 *          The control�s bounds before the change.
 
11060
 *    
 
11061
 *    --> kEventParamCurrentBounds (in, typeQDRectangle)
 
11062
 *          The control�s new bounds.
 
11063
 *  
 
11064
 *  Availability:
 
11065
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
11066
 *    CarbonLib:        not available
 
11067
 }
 
11068
const
 
11069
        kEventControlInvalidateForSizeChange = 22;
 
11070
 
 
11071
{
 
11072
 *  kEventClassControl / kEventControlVisibilityChanged
 
11073
 *  
 
11074
 *  Summary:
 
11075
 *    Sent when a control is hidden or shown. This is here to support
 
11076
 *    custom views/controls which need to update information when the
 
11077
 *    visibility changes.
 
11078
 *  
 
11079
 *  Mac OS X threading:
 
11080
 *    Not thread safe
 
11081
 *  
 
11082
 *  Parameters:
 
11083
 *    
 
11084
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11085
 *          The control whose visibility has changed.
 
11086
 *  
 
11087
 *  Availability:
 
11088
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11089
 *    CarbonLib:        not available
 
11090
 }
 
11091
const
 
11092
        kEventControlVisibilityChanged = 157;
 
11093
 
 
11094
{
 
11095
 *  kEventClassControl / kEventControlOwningWindowChanged
 
11096
 *  
 
11097
 *  Summary:
 
11098
 *    Sent when your control�s owning window has changed. Useful to
 
11099
 *    udpate any dependencies that your control has on its owning 
 
11100
 *    window.
 
11101
 *  
 
11102
 *  Mac OS X threading:
 
11103
 *    Not thread safe
 
11104
 *  
 
11105
 *  Parameters:
 
11106
 *    
 
11107
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11108
 *          The control whose owning window has changed.
 
11109
 *    
 
11110
 *    --> kEventParamAttributes (in, typeUInt32)
 
11111
 *          Currently unused.
 
11112
 *    
 
11113
 *    --> kEventParamControlOriginalOwningWindow (in, typeWindowRef)
 
11114
 *          The control�s original owning window.
 
11115
 *    
 
11116
 *    --> kEventParamControlCurrentOwningWindow (in, typeWindowRef)
 
11117
 *          The control�s new owning window.
 
11118
 *  
 
11119
 *  Availability:
 
11120
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
11121
 *    CarbonLib:        not available
 
11122
 }
 
11123
const
 
11124
        kEventControlOwningWindowChanged = 159;
 
11125
 
 
11126
{
 
11127
 *  kEventClassControl / kEventControlTitleChanged
 
11128
 *  
 
11129
 *  Summary:
 
11130
 *    Sent when the title of your control changes.
 
11131
 *  
 
11132
 *  Mac OS X threading:
 
11133
 *    Not thread safe
 
11134
 *  
 
11135
 *  Parameters:
 
11136
 *    
 
11137
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11138
 *          The control whose title has changed.
 
11139
 *  
 
11140
 *  Availability:
 
11141
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11142
 *    CarbonLib:        not available
 
11143
 }
 
11144
const
 
11145
        kEventControlTitleChanged = 158;
 
11146
 
 
11147
{
 
11148
 *  kEventClassControl / kEventControlHiliteChanged
 
11149
 *  
 
11150
 *  Summary:
 
11151
 *    Sent when the hilite state changes in a control. This is here to
 
11152
 *    support custom views/controls which need to update information
 
11153
 *    when the hilite state changes.
 
11154
 *  
 
11155
 *  Mac OS X threading:
 
11156
 *    Not thread safe
 
11157
 *  
 
11158
 *  Parameters:
 
11159
 *    
 
11160
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11161
 *          The control whose hilite has changed.
 
11162
 *    
 
11163
 *    --> kEventParamControlPreviousPart (in, typeControlPartCode)
 
11164
 *          The previously hilited part.
 
11165
 *    
 
11166
 *    --> kEventParamControlCurrentPart (in, typeControlPartCode)
 
11167
 *          The newly hilited part.
 
11168
 *  
 
11169
 *  Availability:
 
11170
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11171
 *    CarbonLib:        not available
 
11172
 }
 
11173
const
 
11174
        kEventControlHiliteChanged = 160;
 
11175
 
 
11176
{
 
11177
 *  kEventClassControl / kEventControlEnabledStateChanged
 
11178
 *  
 
11179
 *  Summary:
 
11180
 *    Sent when the enabled state changes in a control. This is here to
 
11181
 *    support custom views/controls which need to update information
 
11182
 *    when the enabled state changes.
 
11183
 *  
 
11184
 *  Mac OS X threading:
 
11185
 *    Not thread safe
 
11186
 *  
 
11187
 *  Parameters:
 
11188
 *    
 
11189
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11190
 *          The control whose enabled state has changed.
 
11191
 *  
 
11192
 *  Availability:
 
11193
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11194
 *    CarbonLib:        not available
 
11195
 }
 
11196
const
 
11197
        kEventControlEnabledStateChanged = 161;
 
11198
 
 
11199
{
 
11200
 *  kEventClassControl / kEventControlLayoutInfoChanged
 
11201
 *  
 
11202
 *  Summary:
 
11203
 *    Sent when the layout info changes in a control.
 
11204
 *  
 
11205
 *  Mac OS X threading:
 
11206
 *    Not thread safe
 
11207
 *  
 
11208
 *  Parameters:
 
11209
 *    
 
11210
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11211
 *          The control whose enabled state has changed.
 
11212
 *  
 
11213
 *  Availability:
 
11214
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11215
 *    CarbonLib:        not available
 
11216
 }
 
11217
const
 
11218
        kEventControlLayoutInfoChanged = 162;
 
11219
 
 
11220
{
 
11221
 *  kEventClassControl / kEventControlArbitraryMessage
 
11222
 *  
 
11223
 *  Summary:
 
11224
 *    Sent by the SendControlMessage API when someone is trying to send
 
11225
 *    an old-style CDEF message to your control.
 
11226
 *  
 
11227
 *  Mac OS X threading:
 
11228
 *    Not thread safe
 
11229
 *  
 
11230
 *  Parameters:
 
11231
 *    
 
11232
 *    --> kEventParamDirectObject (in, typeControlRef)
 
11233
 *          The control that is receiving the message.
 
11234
 *    
 
11235
 *    --> kEventParamControlMessage (in, typeShortInteger)
 
11236
 *          The message.
 
11237
 *    
 
11238
 *    --> kEventParamControlParam (in, typeLongInteger)
 
11239
 *          The inParam parameter from SendControlMessage.
 
11240
 *    
 
11241
 *    <-- kEventParamControlResult (out, typeLongInteger)
 
11242
 *          On exit, contains the result that should be returned from
 
11243
 *          SendControlMessage.
 
11244
 *  
 
11245
 *  Availability:
 
11246
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
11247
 *    CarbonLib:        not available
 
11248
 }
 
11249
const
 
11250
        kEventControlArbitraryMessage = 201;
 
11251
 
 
11252
 
 
11253
{
 
11254
 *  Summary:
 
11255
 *    Control bounds change event attributes
 
11256
 *  
 
11257
 *  Discussion:
 
11258
 *    When the toolbox sends out a kEventControlBoundsChanged event, it
 
11259
 *    also sends along a parameter containing attributes of the event.
 
11260
 *    These attributes can be used to determine what aspect of the
 
11261
 *    control changed (position, size, or both).
 
11262
 }
 
11263
const
 
11264
{
 
11265
   * The dimensions of the control (width and height) changed.
 
11266
   }
 
11267
        kControlBoundsChangeSizeChanged = 1 shl 2;
 
11268
 
 
11269
  {
 
11270
   * The top left corner (position) changed.
 
11271
   }
 
11272
        kControlBoundsChangePositionChanged = 1 shl 3;
 
11273
 
 
11274
{--------------------------------------------------------------------------------------}
 
11275
{  Tablet Events (and tablet data in mouse events)                                     }
 
11276
{--------------------------------------------------------------------------------------}
 
11277
{
 
11278
    kEventClassTablet quick reference:
 
11279
  
 
11280
    kEventTabletPoint                   = 1,
 
11281
    kEventTabletProximity               = 2,
 
11282
}
 
11283
{
 
11284
 *  kEventClassTablet / kEventTabletPoint
 
11285
 *  
 
11286
 *  Summary:
 
11287
 *    Indicates that the pen has moved on or near a tablet.
 
11288
 *  
 
11289
 *  Discussion:
 
11290
 *    Same as deprecated kEventTabletPointer.
 
11291
 *  
 
11292
 *  Mac OS X threading:
 
11293
 *    Not thread safe
 
11294
 *  
 
11295
 *  Parameters:
 
11296
 *    
 
11297
 *    --> kEventParamTabletPointRec (in, typeTabletPointRec)
 
11298
 *          Tablet information for the event.
 
11299
 *  
 
11300
 *  Availability:
 
11301
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
11302
 *    CarbonLib:        not available
 
11303
 }
 
11304
const
 
11305
        kEventTabletPoint = 1;
 
11306
 
 
11307
{
 
11308
 *  kEventClassTablet / kEventTabletProximity
 
11309
 *  
 
11310
 *  Summary:
 
11311
 *    Indicates that the pen has entered or exited proximity of a
 
11312
 *    tablet.
 
11313
 *  
 
11314
 *  Mac OS X threading:
 
11315
 *    Not thread safe
 
11316
 *  
 
11317
 *  Parameters:
 
11318
 *    
 
11319
 *    --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
 
11320
 *          Tablet information for the event.
 
11321
 *  
 
11322
 *  Availability:
 
11323
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
11324
 *    CarbonLib:        not available
 
11325
 }
 
11326
const
 
11327
        kEventTabletProximity = 2;
 
11328
 
 
11329
type
 
11330
        TabletPointRecPtr = ^TabletPointRec;
 
11331
        TabletPointRec = record
 
11332
                absX: SInt32;                   { absolute x coordinate in tablet space at full tablet resolution }
 
11333
                absY: SInt32;                   { absolute y coordinate in tablet space at full tablet resolution }
 
11334
                absZ: SInt32;                   { absolute z coordinate in tablet space at full tablet resolution }
 
11335
                buttons: UInt16;                { one bit per button - bit 0 is first button - 1 = closed }
 
11336
                pressure: UInt16;               { scaled pressure value; MAXPRESSURE=(2^16)-1, MINPRESSURE=0 }
 
11337
                tiltX: SInt16;                  { scaled tilt x value; range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) }
 
11338
                tiltY: SInt16;                  { scaled tilt y value; range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) }
 
11339
                rotation: UInt16;               { Fixed-point representation of device rotation in a 10.6 format }
 
11340
                tangentialPressure: SInt16;     { tangential pressure on the device; range same as tilt }
 
11341
                deviceID: UInt16;               { system-assigned unique device ID - matches to deviceID field in proximity event }
 
11342
                vendor1: SInt16;                { vendor-defined signed 16-bit integer }
 
11343
                vendor2: SInt16;                { vendor-defined signed 16-bit integer }
 
11344
                vendor3: SInt16;                { vendor-defined signed 16-bit integer }
 
11345
        end;
 
11346
type
 
11347
        TabletPointerRec = TabletPointRec;
 
11348
        TabletPointerRecPtr = ^TabletPointerRec;
 
11349
        TabletProximityRecPtr = ^TabletProximityRec;
 
11350
        TabletProximityRec = record
 
11351
                vendorID: UInt16;               { vendor-defined ID - typically will be USB vendor ID }
 
11352
                tabletID: UInt16;               { vendor-defined tablet ID - typically will be USB product ID for the tablet }
 
11353
                pointerID: UInt16;              { vendor-defined ID of the specific pointing device }
 
11354
                deviceID: UInt16;               { system-assigned unique device ID - matches to deviceID field in tablet event }
 
11355
                systemTabletID: UInt16;         { system-assigned unique tablet ID }
 
11356
                vendorPointerType: UInt16;      { vendor-defined pointer type }
 
11357
                pointerSerialNumber: UInt32;    { vendor-defined serial number of the specific pointing device }
 
11358
                uniqueID: UInt64;               { vendor-defined unique ID for this pointer }
 
11359
                capabilityMask: UInt32;         { mask representing the capabilities of the device. }
 
11360
                                              { capability bits are defined in the tablet capability }
 
11361
                                              { masks section of <IOKit/hidsystem/IOLLEvent.h> }
 
11362
                pointerType: SInt8;            { type of pointing device - enum to be defined }
 
11363
                enterProximity: SInt8;         { non-zero = entering; zero = leaving }
 
11364
        end;
 
11365
{--------------------------------------------------------------------------------------}
 
11366
{ Volume Events                                                                        }
 
11367
{--------------------------------------------------------------------------------------}
 
11368
{
 
11369
    kEventClassVolume quick reference:
 
11370
 
 
11371
    kEventVolumeMounted             = 1,        // new volume mounted
 
11372
    kEventVolumeUnmounted           = 2         // volume has been ejected or unmounted
 
11373
}
 
11374
const
 
11375
        typeFSVolumeRefNum = $766F6C6E (* 'voln' *); { FSVolumeRefNum}
 
11376
 
 
11377
{
 
11378
 *  kEventClassVolume / kEventVolumeMounted
 
11379
 *  
 
11380
 *  Summary:
 
11381
 *    A new volume has been mounted (or new media inserted).
 
11382
 *  
 
11383
 *  Discussion:
 
11384
 *    This event is sent to all handlers registered for it.
 
11385
 *  
 
11386
 *  Mac OS X threading:
 
11387
 *    Not thread safe
 
11388
 *  
 
11389
 *  Parameters:
 
11390
 *    
 
11391
 *    --> kEventParamDirectObject (in, typeFSVolumeRefNum)
 
11392
 *          The volume refnum of the volume that was mounted.
 
11393
 *  
 
11394
 *  Availability:
 
11395
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
11396
 *    CarbonLib:        in CarbonLib 1.3.1 and later
 
11397
 }
 
11398
const
 
11399
        kEventVolumeMounted = 1;
 
11400
 
 
11401
{
 
11402
 *  kEventClassVolume / kEventVolumeUnmounted
 
11403
 *  
 
11404
 *  Summary:
 
11405
 *    An existing volume has been unmounted (or media ejected).
 
11406
 *  
 
11407
 *  Discussion:
 
11408
 *    This event is sent to all handlers registered for it.
 
11409
 *  
 
11410
 *  Mac OS X threading:
 
11411
 *    Not thread safe
 
11412
 *  
 
11413
 *  Parameters:
 
11414
 *    
 
11415
 *    --> kEventParamDirectObject (in, typeFSVolumeRefNum)
 
11416
 *          The volume refnum of the volume that was unmounted. At the
 
11417
 *          point when this event is sent, this is no longer a valid
 
11418
 *          volume refnum, and cannot be passed to any File Manager
 
11419
 *          API; it is useful only for comparison with cached volume
 
11420
 *          refnums in your own data structures.
 
11421
 *  
 
11422
 *  Availability:
 
11423
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
11424
 *    CarbonLib:        in CarbonLib 1.3.1 and later
 
11425
 }
 
11426
const
 
11427
        kEventVolumeUnmounted = 2;
 
11428
 
 
11429
{--------------------------------------------------------------------------------------}
 
11430
{ Appearance Events                                                                    }
 
11431
{--------------------------------------------------------------------------------------}
 
11432
{
 
11433
    kEventClassAppearance quick reference:
 
11434
 
 
11435
    kEventAppearanceScrollBarVariantChanged = 1
 
11436
}
 
11437
{
 
11438
 *  kEventClassAppearance / kEventAppearanceScrollBarVariantChanged
 
11439
 *  
 
11440
 *  Summary:
 
11441
 *    The scroll bar variant has changed. Available on Mac OS X 10.1
 
11442
 *    and later.
 
11443
 *  
 
11444
 *  Discussion:
 
11445
 *    This event is sent to all handlers registered for it on Mac OS X
 
11446
 *    10.3 and later.
 
11447
 *  
 
11448
 *  Mac OS X threading:
 
11449
 *    Not thread safe
 
11450
 *  
 
11451
 *  Parameters:
 
11452
 *    
 
11453
 *    --> kEventParamNewScrollBarVariant (in, typeShortInteger)
 
11454
 *          The new scroll bar variant.
 
11455
 *  
 
11456
 *  Availability:
 
11457
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
11458
 *    CarbonLib:        not available
 
11459
 }
 
11460
const
 
11461
        kEventAppearanceScrollBarVariantChanged = 1;
 
11462
 
 
11463
{--------------------------------------------------------------------------------------}
 
11464
{  Services Events                                                                     }
 
11465
{--------------------------------------------------------------------------------------}
 
11466
{
 
11467
    kEventClassService quick reference:
 
11468
    
 
11469
    Services are a feature by which applications can communicate with
 
11470
    one another to request and provide services. This communication
 
11471
    happens either through the Pasteboard or Scrap Manager. When an event is sent that 
 
11472
    requires communication for processing or servicing a request, 
 
11473
    you will need to use the pasteboard or scrap given in the kEventParamPasteboardRef and
 
11474
    kEventParamScrapRef parameters of the event in order to communicate.
 
11475
    When your app requests a service, it is usually acting on data that is 
 
11476
    currently selected or in focus. Therefore all of the Services events 
 
11477
    are sent to the UserFocus event target.
 
11478
    <BR><BR>
 
11479
    Service events are available on Mac OS X 10.1 and later.
 
11480
    
 
11481
    kEventServiceCopy           = 1,
 
11482
    kEventServicePaste          = 2,
 
11483
    kEventServiceGetTypes       = 3,
 
11484
    kEventServicePerform        = 4
 
11485
}
 
11486
{
 
11487
 *  kEventClassService / kEventServiceCopy
 
11488
 *  
 
11489
 *  Summary:
 
11490
 *    The user has invoked a service that requires the application to
 
11491
 *    update the given pasteboard or scrap in the
 
11492
 *    kEventParamPasteboardRef and kEventParamScrapRef parameters with
 
11493
 *    appropriate data from the focus.
 
11494
 *  
 
11495
 *  Discussion:
 
11496
 *    On Mac OS X 10.3 and later, this event includes both a
 
11497
 *    PasteboardRef and a ScrapRef. A handler for this event should
 
11498
 *    provide its data using either Pasteboard or Scrap Manager APIs,
 
11499
 *    and the corresponding pasteboard or scrap reference, depending on
 
11500
 *    which is more convenient or appropriate. Data only needs to be
 
11501
 *    placed on one of the pasteboard or scrap; it does not need to be
 
11502
 *    placed on both. Data written to the pasteboard will also be
 
11503
 *    available on the scrap, and vice versa.
 
11504
 *  
 
11505
 *  Mac OS X threading:
 
11506
 *    Not thread safe
 
11507
 *  
 
11508
 *  Parameters:
 
11509
 *    
 
11510
 *    --> kEventParamPasteboardRef (in, typePasteboardRef)
 
11511
 *          Data from the current selection should be placed into this
 
11512
 *          pasteboard. This parameter is provided on Mac OS X 10.3 and
 
11513
 *          later.
 
11514
 *    
 
11515
 *    --> kEventParamScrapRef (in, typeScrapRef)
 
11516
 *          Data from the current selection should be placed into this
 
11517
 *          scrap.
 
11518
 *  
 
11519
 *  Availability:
 
11520
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
11521
 *    CarbonLib:        not available
 
11522
 }
 
11523
const
 
11524
        kEventServiceCopy = 1;
 
11525
 
 
11526
{
 
11527
 *  kEventClassService / kEventServicePaste
 
11528
 *  
 
11529
 *  Summary:
 
11530
 *    The user has invoked a service that requires the application to
 
11531
 *    update the current focus with data from the pasteboard or scrap
 
11532
 *    given in the kEventParamPasteboardRef and kEventParamScrapRef
 
11533
 *    parameters.
 
11534
 *  
 
11535
 *  Discussion:
 
11536
 *    On Mac OS X 10.3 and later, this event includes both a
 
11537
 *    PasteboardRef and a ScrapRef. A handler for this event should
 
11538
 *    retrieve its data using either Pasteboard or Scrap Manager APIs,
 
11539
 *    and the corresponding pasteboard or scrap reference, depending on
 
11540
 *    which is more convenient or appropriate. Data only needs to be
 
11541
 *    read from one of the pasteboard or scrap; it does not need to be
 
11542
 *    read from both. Data available on the pasteboard will also be
 
11543
 *    available on the scrap, and vice versa.
 
11544
 *  
 
11545
 *  Mac OS X threading:
 
11546
 *    Not thread safe
 
11547
 *  
 
11548
 *  Parameters:
 
11549
 *    
 
11550
 *    --> kEventParamPasteboardRef (in, typePasteboardRef)
 
11551
 *          The current selection should be replaced by data from this
 
11552
 *          pasteboard. This parameter is provided on Mac OS X 10.3 and
 
11553
 *          later.
 
11554
 *    
 
11555
 *    --> kEventParamScrapRef (in, typeScrapRef)
 
11556
 *          The current selection should be replaced by data from this
 
11557
 *          scrap.
 
11558
 *  
 
11559
 *  Availability:
 
11560
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
11561
 *    CarbonLib:        not available
 
11562
 }
 
11563
const
 
11564
        kEventServicePaste = 2;
 
11565
 
 
11566
{
 
11567
 *  kEventClassService / kEventServiceGetTypes
 
11568
 *  
 
11569
 *  Summary:
 
11570
 *    The Services Manager needs to know what types of data the
 
11571
 *    application can copy and paste to and from the pasteboard or
 
11572
 *    scrap in order to update the Services menu to enable items that
 
11573
 *    the user can select.
 
11574
 *  
 
11575
 *  Discussion:
 
11576
 *    This event sends two CFMutableArrayRefs for the application to
 
11577
 *    add the types to: the kEventParamServiceCopyTypes and the
 
11578
 *    kEventParamServicePasteTypes parameters. The types that are added
 
11579
 *    are CFStringRefs. There is a convenience function,
 
11580
 *    CreateTypeStringWithOSType, which takes an OSType and will create
 
11581
 *    a CFStringRef that you can add to the array(s).
 
11582
 *  
 
11583
 *  Mac OS X threading:
 
11584
 *    Not thread safe
 
11585
 *  
 
11586
 *  Parameters:
 
11587
 *    
 
11588
 *    --> kEventParamServiceCopyTypes (in, typeCFMutableArrayRef)
 
11589
 *          Add CFStringRefs to this array to report the types that can
 
11590
 *          be copied from the current selection. These strings will be
 
11591
 *          released automatically after the event is handled.
 
11592
 *    
 
11593
 *    --> kEventParamServicePasteTypes (in, typeCFMutableArrayRef)
 
11594
 *          Add CFStringRefs to this array to report the types that can
 
11595
 *          be pasted into the currently focused object. These strings
 
11596
 *          will be released automatically after the event is handled.
 
11597
 *  
 
11598
 *  Availability:
 
11599
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
11600
 *    CarbonLib:        not available
 
11601
 }
 
11602
const
 
11603
        kEventServiceGetTypes = 3;
 
11604
 
 
11605
{
 
11606
 *  kEventClassService / kEventServicePerform
 
11607
 *  
 
11608
 *  Summary:
 
11609
 *    If the application is a service provider, this event will get
 
11610
 *    sent when a service is requested of the app.
 
11611
 *  
 
11612
 *  Discussion:
 
11613
 *    On Mac OS X 10.3 and later, this event includes both a
 
11614
 *    PasteboardRef and a ScrapRef. A handler for this event may
 
11615
 *    provide its data using either Pasteboard or Scrap Manager APIs,
 
11616
 *    and the corresponding pasteboard or scrap reference, depending on
 
11617
 *    which is more convenient or appropriate.
 
11618
 *  
 
11619
 *  Mac OS X threading:
 
11620
 *    Not thread safe
 
11621
 *  
 
11622
 *  Parameters:
 
11623
 *    
 
11624
 *    --> kEventParamPasteboardRef (in, typePasteboardRef)
 
11625
 *          The pasteboard that should be used to send and receive data
 
11626
 *          from the requester. This parameter is only provided on Mac
 
11627
 *          OS X 10.3 and later.
 
11628
 *    
 
11629
 *    --> kEventParamScrapRef (in, typeScrapRef)
 
11630
 *          The scrap that should be used to send and receive data from
 
11631
 *          the requester.
 
11632
 *    
 
11633
 *    --> kEventParamServiceMessageName (in, typeCFStringRef)
 
11634
 *          A string with the name of the advertised service that was
 
11635
 *          invoked.
 
11636
 *    
 
11637
 *    --> kEventParamServiceUserData (in, typeCFStringRef)
 
11638
 *          Extra data provided by the requestor.
 
11639
 *  
 
11640
 *  Availability:
 
11641
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
11642
 *    CarbonLib:        not available
 
11643
 }
 
11644
const
 
11645
        kEventServicePerform = 4;
 
11646
 
 
11647
{
 
11648
 *  CreateTypeStringWithOSType()
 
11649
 *  
 
11650
 *  Discussion:
 
11651
 *    This routine is used to convert an OSType to a CFStringRef that
 
11652
 *    services will understand.
 
11653
 *  
 
11654
 *  Mac OS X threading:
 
11655
 *    Not thread safe
 
11656
 *  
 
11657
 *  Parameters:
 
11658
 *    
 
11659
 *    inType:
 
11660
 *      The OSType that needs to be converted to a CFString.
 
11661
 *  
 
11662
 *  Result:
 
11663
 *    A CFStringRef that contains the string that corresponds to the
 
11664
 *    given OSType. This follows CoreFoundation semantics in that it
 
11665
 *    will return NULL for failure, and because it is a "Create"
 
11666
 *    function you will need to CFRelease this string when it is no
 
11667
 *    longer needed.
 
11668
 *  
 
11669
 *  Availability:
 
11670
 *    Mac OS X:         in version 10.1 and later in Carbon.framework
 
11671
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
 
11672
 *    Non-Carbon CFM:   not available
 
11673
 }
 
11674
function CreateTypeStringWithOSType( inType: OSType ): CFStringRef; external name '_CreateTypeStringWithOSType';
 
11675
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
 
11676
 
 
11677
 
 
11678
{
 
11679
 *  kHIServicesMenuProviderName
 
11680
 *  
 
11681
 *  Discussion:
 
11682
 *    A CFDictionaryRef key in a dictionary returned by
 
11683
 *    CopyServicesMenuCommandKeys. The value for this key is the name
 
11684
 *    of the service provider represented as a CFString.
 
11685
 }
 
11686
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
11687
{$definec kHIServicesMenuProviderName CFSTRP('kHIServicesMenuProviderName')}
 
11688
{$endc}
 
11689
 
 
11690
{
 
11691
 *  kHIServicesMenuItemName
 
11692
 *  
 
11693
 *  Discussion:
 
11694
 *    A CFDictionaryRef key in a dictionary returned by
 
11695
 *    CopyServicesMenuCommandKeys. The value for this key is the name
 
11696
 *    of the menu item represented as a CFString.
 
11697
 }
 
11698
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
11699
{$definec kHIServicesMenuItemName CFSTRP('kHIServicesMenuItemName')}
 
11700
{$endc}
 
11701
 
 
11702
{
 
11703
 *  kHIServicesMenuCharCode
 
11704
 *  
 
11705
 *  Discussion:
 
11706
 *    A CFDictionaryRef key in a dictionary returned by
 
11707
 *    CopyServicesMenuCommandKeys. The value for this key is the
 
11708
 *    character code of the menu item shortcut, represented as a
 
11709
 *    CFString.
 
11710
 }
 
11711
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
11712
{$definec kHIServicesMenuCharCode CFSTRP('kHIServicesMenuCharCode')}
 
11713
{$endc}
 
11714
 
 
11715
{
 
11716
 *  kHIServicesMenuKeyModifiers
 
11717
 *  
 
11718
 *  Discussion:
 
11719
 *    A CFDictionaryRef key in a dictionary returned by
 
11720
 *    CopyServicesMenuCommandKeys. The value for this key is the
 
11721
 *    keyboard modifiers of the menu item shortcut in Menu Manager
 
11722
 *    modifiers format, represented as a CFNumber.
 
11723
 }
 
11724
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
11725
{$definec kHIServicesMenuKeyModifiers CFSTRP('kHIServicesMenuKeyModifiers')}
 
11726
{$endc}
 
11727
{
 
11728
 *  CopyServicesMenuCommandKeys()
 
11729
 *  
 
11730
 *  Summary:
 
11731
 *    Returns an array of CFDictionaryRefs containing information about
 
11732
 *    the command-key short cuts for items in the application services
 
11733
 *    menu.
 
11734
 *  
 
11735
 *  Discussion:
 
11736
 *    Each array entry is a CFDictionaryRef, and each dictionary
 
11737
 *    contains information about a single command key shortcut for
 
11738
 *    items in the application's Services menu. Each dictionary
 
11739
 *    contains the following keys: kHIServicesMenuProviderName,
 
11740
 *    kHIServicesMenuItemName, kHIServicesMenuCharCode, and
 
11741
 *    kHIServicesMenuKeyModifiers. The array must be released by the
 
11742
 *    caller; the dictionaries do not need to be released (they will be
 
11743
 *    auto-released when the array is released).
 
11744
 *  
 
11745
 *  Mac OS X threading:
 
11746
 *    Not thread safe
 
11747
 *  
 
11748
 *  Parameters:
 
11749
 *    
 
11750
 *    outCommandKeyArray:
 
11751
 *      On exit, contains an array of the values of the Services menu
 
11752
 *      items that have command key shortcuts associated with them.
 
11753
 *  
 
11754
 *  Result:
 
11755
 *    An operating system status code.
 
11756
 *  
 
11757
 *  Availability:
 
11758
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
11759
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 
11760
 *    Non-Carbon CFM:   not available
 
11761
 }
 
11762
function CopyServicesMenuCommandKeys( var outCommandKeyArray: CFArrayRef ): OSStatus; external name '_CopyServicesMenuCommandKeys';
 
11763
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
11764
 
 
11765
 
 
11766
{--------------------------------------------------------------------------------------}
 
11767
{  Accessibility Events                                                                }
 
11768
{--------------------------------------------------------------------------------------}
 
11769
{
 
11770
    kEventClassAccessibility quick reference:
 
11771
    
 
11772
    kEventAccessibleGetChildAtPoint                     =   1,
 
11773
    kEventAccessibleGetFocusedChild                     =   2,
 
11774
    
 
11775
    kEventAccessibleGetAllAttributeNames                =   21,
 
11776
    kEventAccessibleGetAllParameterizedAttributeNames   =   25,
 
11777
    kEventAccessibleGetNamedAttribute                   =   22,
 
11778
    kEventAccessibleSetNamedAttribute                   =   23,
 
11779
    kEventAccessibleIsNamedAttributeSettable            =   24,
 
11780
    
 
11781
    kEventAccessibleGetAllActionNames                   =   41,
 
11782
    kEventAccessiblePerformNamedAction                  =   42,
 
11783
    kEventAccessibleGetNamedActionDescription           =   44
 
11784
}
 
11785
{
 
11786
 *  kEventClassAccessibility / kEventAccessibleGetChildAtPoint
 
11787
 *  
 
11788
 *  Summary:
 
11789
 *    Finds the child of an accessible object at a given point.
 
11790
 *  
 
11791
 *  Discussion:
 
11792
 *    The kEventParamMouseLocation parameter will contain a global
 
11793
 *    point. Your handler for this event should find the child of
 
11794
 *    yourself which is underneath that point and return it in the
 
11795
 *    kEventParamAccessibleChild parameter.
 
11796
 *  
 
11797
 *  Mac OS X threading:
 
11798
 *    Not thread safe
 
11799
 *  
 
11800
 *  Parameters:
 
11801
 *    
 
11802
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
11803
 *          The accessible object, in the form of an AXUIElementRef.
 
11804
 *    
 
11805
 *    --> kEventParamMouseLocation (in, typeHIPoint)
 
11806
 *          The location in global coordinates.
 
11807
 *    
 
11808
 *    <-- kEventParamAccessibleChild (out, typeCFTypeRef)
 
11809
 *          On exit, contains the child of the accessible object at the
 
11810
 *          specified point, in the form of an AXUIElementRef. If there
 
11811
 *          is no child at the given point, you should still return
 
11812
 *          noErr, but leave the parameter empty (do not call
 
11813
 *          SetEventParameter). Only return immediate children; do not
 
11814
 *          return grandchildren of yourself.
 
11815
 *  
 
11816
 *  Availability:
 
11817
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11818
 *    CarbonLib:        not available
 
11819
 }
 
11820
const
 
11821
        kEventAccessibleGetChildAtPoint = 1;
 
11822
 
 
11823
{
 
11824
 *  kEventClassAccessibility / kEventAccessibleGetFocusedChild
 
11825
 *  
 
11826
 *  Summary:
 
11827
 *    Finds the focused child of an accessible object.
 
11828
 *  
 
11829
 *  Discussion:
 
11830
 *    Your handler for this event should find the child of itself which
 
11831
 *    is part of the focus chain and return it in the
 
11832
 *    kEventParamAccessibleChild parameter.
 
11833
 *  
 
11834
 *  Mac OS X threading:
 
11835
 *    Not thread safe
 
11836
 *  
 
11837
 *  Parameters:
 
11838
 *    
 
11839
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
11840
 *          The accessible object, in the form of an AXUIElementRef.
 
11841
 *    
 
11842
 *    <-- kEventParamAccessibleChild (out, typeCFTypeRef)
 
11843
 *          On exit, contains the focused child of the accessible
 
11844
 *          object, in the form of an AXUIElementRef. If there is no
 
11845
 *          child in the focus chain, you should still return noErr,
 
11846
 *          but leave the parameter empty (do not call
 
11847
 *          SetEventParameter). Only return immediate children; do not
 
11848
 *          return grandchildren of yourself.
 
11849
 *  
 
11850
 *  Availability:
 
11851
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11852
 *    CarbonLib:        not available
 
11853
 }
 
11854
const
 
11855
        kEventAccessibleGetFocusedChild = 2;
 
11856
 
 
11857
{
 
11858
 *  kEventClassAccessibility / kEventAccessibleGetAllAttributeNames
 
11859
 *  
 
11860
 *  Summary:
 
11861
 *    Returns the attributes supported by an accessible object. You
 
11862
 *    must only return the names of your regular (non-parameterized)
 
11863
 *    attributes via this event. If you support parameterized
 
11864
 *    attributes, you must return them via the new
 
11865
 *    kEventAccessibleGetAllParameterizedAttributeNames event.
 
11866
 *  
 
11867
 *  Mac OS X threading:
 
11868
 *    Not thread safe
 
11869
 *  
 
11870
 *  Parameters:
 
11871
 *    
 
11872
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
11873
 *          The accessible object, in the form of an AXUIElementRef.
 
11874
 *    
 
11875
 *    <-> kEventParamAccessibleAttributeNames (in/out, typeCFMutableArrayRef)
 
11876
 *          Add each of the regular (non-parameterized) attribute names
 
11877
 *          supported by the accessible object to this array, as
 
11878
 *          CFStringRefs.
 
11879
 *  
 
11880
 *  Availability:
 
11881
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11882
 *    CarbonLib:        not available
 
11883
 }
 
11884
const
 
11885
        kEventAccessibleGetAllAttributeNames = 21;
 
11886
 
 
11887
{
 
11888
 *  kEventClassAccessibility / kEventAccessibleGetAllParameterizedAttributeNames
 
11889
 *  
 
11890
 *  Summary:
 
11891
 *    Returns the parameterized attributes supported by an accessible
 
11892
 *    object. You must not return the names of your regular
 
11893
 *    (non-parameterized) attributes via this event. If you support
 
11894
 *    regular attributes, you must return them via the original
 
11895
 *    kEventAccessibleGetAllAttributeNames event. Parameterized
 
11896
 *    attributes are introduced in Mac OS X 10.3.
 
11897
 *  
 
11898
 *  Mac OS X threading:
 
11899
 *    Not thread safe
 
11900
 *  
 
11901
 *  Parameters:
 
11902
 *    
 
11903
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
11904
 *          The accessible object, in the form of an AXUIElementRef.
 
11905
 *    
 
11906
 *    <-> kEventParamAccessibleAttributeNames (in/out, typeCFMutableArrayRef)
 
11907
 *          Add each of the parameterized attribute names supported by
 
11908
 *          the accessible object to this array, as CFStringRefs.
 
11909
 *  
 
11910
 *  Availability:
 
11911
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
11912
 *    CarbonLib:        not available
 
11913
 }
 
11914
const
 
11915
        kEventAccessibleGetAllParameterizedAttributeNames = 25;
 
11916
 
 
11917
{
 
11918
 *  kEventClassAccessibility / kEventAccessibleGetNamedAttribute
 
11919
 *  
 
11920
 *  Summary:
 
11921
 *    Returns the value of an attribute of an accessible object.
 
11922
 *  
 
11923
 *  Discussion:
 
11924
 *    The kEventParamAccessibleAttributeName parameter will contain an
 
11925
 *    attribute name in the form of a CFStringRef. If you support the
 
11926
 *    named attribute, return the attribute�s value in the
 
11927
 *    kEventParamAccessibleAttributeValue parameter.
 
11928
 *  
 
11929
 *  Mac OS X threading:
 
11930
 *    Not thread safe
 
11931
 *  
 
11932
 *  Parameters:
 
11933
 *    
 
11934
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
11935
 *          The accessible object, in the form of an AXUIElementRef.
 
11936
 *    
 
11937
 *    --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
 
11938
 *          The name of the requested attribute.
 
11939
 *    
 
11940
 *    --> kEventParamAccessibleAttributeParameter (in, typeCFTypeRef)
 
11941
 *          This parameter is optional and will only exist if your
 
11942
 *          accessible object is being asked for the value of a
 
11943
 *          parameterized attribute. When present, this event parameter
 
11944
 *          will contain a CFTypeRef describing the parameters of the
 
11945
 *          request. Parameterized attributes are introduced in Mac OS
 
11946
 *          X 10.3.
 
11947
 *    
 
11948
 *    <-- kEventParamAccessibleAttributeValue (out, typeCFTypeRef)
 
11949
 *          On exit, contains the attribute's value. The type of this
 
11950
 *          parameter varies according to the attribute; it might
 
11951
 *          typically be typeCFStringRef (for a textual attribute),
 
11952
 *          typeBoolean (for a boolean attribute), or typeSInt32 (for
 
11953
 *          an integer-valued attribute).
 
11954
 *  
 
11955
 *  Availability:
 
11956
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11957
 *    CarbonLib:        not available
 
11958
 }
 
11959
const
 
11960
        kEventAccessibleGetNamedAttribute = 22;
 
11961
 
 
11962
{
 
11963
 *  kEventClassAccessibility / kEventAccessibleSetNamedAttribute
 
11964
 *  
 
11965
 *  Summary:
 
11966
 *    Sets the value of an attribute of an accessible object.
 
11967
 *  
 
11968
 *  Discussion:
 
11969
 *    The kEventParamAccessibleAttributeName parameter will contain an
 
11970
 *    attribute name in the form of a CFStringRef. The
 
11971
 *    kEventParamAccessibleAttributeValue parameter will contain data
 
11972
 *    in an arbitrary format. If you support the named attribute, set
 
11973
 *    the named attribute�s value to the data provided in the event.
 
11974
 *  
 
11975
 *  Mac OS X threading:
 
11976
 *    Not thread safe
 
11977
 *  
 
11978
 *  Parameters:
 
11979
 *    
 
11980
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
11981
 *          The accessible object, in the form of an AXUIElementRef.
 
11982
 *    
 
11983
 *    --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
 
11984
 *          The name of the requested attribute.
 
11985
 *    
 
11986
 *    --> kEventParamAccessibleAttributeValue (in, typeCFTypeRef)
 
11987
 *          The new value of the attribute. The type of this parameter
 
11988
 *          varies according to the attribute; it might typically be
 
11989
 *          typeCFStringRef (for a textual attribute), typeBoolean (for
 
11990
 *          a boolean attribute), or typeSInt32 (for an integer-valued
 
11991
 *          attribute).
 
11992
 *  
 
11993
 *  Availability:
 
11994
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
11995
 *    CarbonLib:        not available
 
11996
 }
 
11997
const
 
11998
        kEventAccessibleSetNamedAttribute = 23;
 
11999
 
 
12000
{
 
12001
 *  kEventClassAccessibility / kEventAccessibleIsNamedAttributeSettable
 
12002
 *  
 
12003
 *  Summary:
 
12004
 *    Determines whether an attribute of an accessible object can be
 
12005
 *    modified.
 
12006
 *  
 
12007
 *  Discussion:
 
12008
 *    The kEventParamAccessibleAttributeName parameter will contain an
 
12009
 *    attribute name in the form of a CFStringRef. If you support the
 
12010
 *    named attribute, set the kEventParamAccessibleAttributeSettable
 
12011
 *    parameter to a Boolean indicating whether the named attribute can
 
12012
 *    have its value changed via the kEventAccessibleSetNamedAttribute
 
12013
 *    event.
 
12014
 *  
 
12015
 *  Mac OS X threading:
 
12016
 *    Not thread safe
 
12017
 *  
 
12018
 *  Parameters:
 
12019
 *    
 
12020
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
12021
 *          The accessible object, in the form of an AXUIElementRef.
 
12022
 *    
 
12023
 *    --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
 
12024
 *          The name of the requested attribute.
 
12025
 *    
 
12026
 *    <-- kEventParamAccessibleAttributeSettable (out, typeBoolean)
 
12027
 *          On exit, indicates whether the attribute may be modified.
 
12028
 *  
 
12029
 *  Availability:
 
12030
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12031
 *    CarbonLib:        not available
 
12032
 }
 
12033
const
 
12034
        kEventAccessibleIsNamedAttributeSettable = 24;
 
12035
 
 
12036
{
 
12037
 *  kEventClassAccessibility / kEventAccessibleGetAllActionNames
 
12038
 *  
 
12039
 *  Summary:
 
12040
 *    Returns the actions supported by an accessible object.
 
12041
 *  
 
12042
 *  Discussion:
 
12043
 *    The kEventParamAccessibleActionNames parameter will contain a
 
12044
 *    CFMutableArrayRef. Add each of the action names you support to
 
12045
 *    this array in the form of a CFStringRef.
 
12046
 *  
 
12047
 *  Mac OS X threading:
 
12048
 *    Not thread safe
 
12049
 *  
 
12050
 *  Parameters:
 
12051
 *    
 
12052
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
12053
 *          The accessible object, in the form of an AXUIElementRef.
 
12054
 *    
 
12055
 *    <-> kEventParamAccessibleActionNames (in/out, typeCFMutableArrayRef)
 
12056
 *          Add each of the actions supported by the accessible object
 
12057
 *          to this array, as CFStringRefs.
 
12058
 *  
 
12059
 *  Availability:
 
12060
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12061
 *    CarbonLib:        not available
 
12062
 }
 
12063
const
 
12064
        kEventAccessibleGetAllActionNames = 41;
 
12065
 
 
12066
{
 
12067
 *  kEventClassAccessibility / kEventAccessiblePerformNamedAction
 
12068
 *  
 
12069
 *  Summary:
 
12070
 *    Requests that a specific action be performed by an accessible
 
12071
 *    object.
 
12072
 *  
 
12073
 *  Discussion:
 
12074
 *    The kEventParamAccessibleActionName parameter will contain an
 
12075
 *    attribute name in the form of a CFStringRef. If you support the
 
12076
 *    named action, perform the action. There are times, however, when
 
12077
 *    performing an action causes an accessible object to call a
 
12078
 *    routine which may not return immediately, such as StandardAlert
 
12079
 *    or PopUpMenuSelect. You should only call such routines when you
 
12080
 *    receive an action request that was queued; if you call such a
 
12081
 *    routine when processing an event that was directly dispatched,
 
12082
 *    you will probably cause the assistive app to receive a timeout
 
12083
 *    error. On Mac OS X 10.3 and later, the
 
12084
 *    kEventParamAccessibilityEventQueued parameter will indicate
 
12085
 *    whether the event was queued. If so, process the request
 
12086
 *    normally. If not, you can request that the event be posted to the
 
12087
 *    queue and sent to you later by returning
 
12088
 *    eventDeferAccessibilityEventErr from your handler. On Mac OS X
 
12089
 *    10.2, the parameter will not exist, the event will always be
 
12090
 *    directly dispatched, and there is no way to request that it be
 
12091
 *    posted to the queue; in this case, you should perform the action
 
12092
 *    even if it will cause the assistive app to receive a timeout
 
12093
 *    error.
 
12094
 *  
 
12095
 *  Mac OS X threading:
 
12096
 *    Not thread safe
 
12097
 *  
 
12098
 *  Parameters:
 
12099
 *    
 
12100
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
12101
 *          The accessible object, in the form of an AXUIElementRef.
 
12102
 *    
 
12103
 *    --> kEventParamAccessibleActionName (in, typeCFStringRef)
 
12104
 *          The name of the requested action.
 
12105
 *    
 
12106
 *    --> kEventParamAccessibilityEventQueued (in, typeBoolean)
 
12107
 *          An indication of whether this event was delivered to you
 
12108
 *          via the main event queue. This parameter only exists on Mac
 
12109
 *          OS X 10.3 and later. See the discussion for more details.
 
12110
 *  
 
12111
 *  Availability:
 
12112
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12113
 *    CarbonLib:        not available
 
12114
 }
 
12115
const
 
12116
        kEventAccessiblePerformNamedAction = 42;
 
12117
 
 
12118
{
 
12119
 *  kEventClassAccessibility / kEventAccessibleGetNamedActionDescription
 
12120
 *  
 
12121
 *  Summary:
 
12122
 *    Returns a human-language description of an action supported by an
 
12123
 *    accessible object.
 
12124
 *  
 
12125
 *  Discussion:
 
12126
 *    The kEventParamAccessibleActionName parameter will contain an
 
12127
 *    attribute name in the form of a CFStringRef. The
 
12128
 *    kEventParamAccessibleActionDescription parameter will contain a
 
12129
 *    CFMutableStringRef. If you support the named action, alter the
 
12130
 *    mutable string to contain a textual description of the action�s
 
12131
 *    significance.
 
12132
 *  
 
12133
 *  Mac OS X threading:
 
12134
 *    Not thread safe
 
12135
 *  
 
12136
 *  Parameters:
 
12137
 *    
 
12138
 *    --> kEventParamAccessibleObject (in, typeCFTypeRef)
 
12139
 *          The accessible object, in the form of an AXUIElementRef.
 
12140
 *    
 
12141
 *    --> kEventParamAccessibleActionName (in, typeCFStringRef)
 
12142
 *          The name of the requested action.
 
12143
 *    
 
12144
 *    <-> kEventParamAccessibleActionDescription (in/out, typeCFMutableStringRef)
 
12145
 *          If you support the action, extract this parameter from the
 
12146
 *          event and set the contents of the mutable string to contain
 
12147
 *          a description of the action. Do not set this event
 
12148
 *          parameter to a CFStringRef of your own creation; you must
 
12149
 *          modify the preexisting mutable string stored in the event
 
12150
 *          parameter.
 
12151
 *  
 
12152
 *  Availability:
 
12153
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12154
 *    CarbonLib:        not available
 
12155
 }
 
12156
const
 
12157
        kEventAccessibleGetNamedActionDescription = 44;
 
12158
 
 
12159
{
 
12160
 *  AXUIElementCreateWithHIObjectAndIdentifier()
 
12161
 *  
 
12162
 *  Discussion:
 
12163
 *    This routine creates an AXUIElementRef to represent an accessible
 
12164
 *    object for a Carbon application. A Carbon accessible object is
 
12165
 *    comprised of an HIObjectRef and a 64-bit identifier. The
 
12166
 *    resulting AXUIElementRef is a CFTypeRef, and must be managed as
 
12167
 *    such. You can create a new AXUIElementRef every time you need
 
12168
 *    one. Even though the actual hex values of two AXUIElementRefs
 
12169
 *    might be different, they may represent the same accessible
 
12170
 *    object; because AXUIElementRefs are Core Foundation objects, you
 
12171
 *    can use CFEqual to compare them.
 
12172
 *  
 
12173
 *  Mac OS X threading:
 
12174
 *    Not thread safe
 
12175
 *  
 
12176
 *  Parameters:
 
12177
 *    
 
12178
 *    inHIObject:
 
12179
 *      The HIObjectRef of the accessible object.
 
12180
 *    
 
12181
 *    inIdentifier:
 
12182
 *      The 64-bit identifier of the accessible object.
 
12183
 *  
 
12184
 *  Result:
 
12185
 *    An AXUIElementRef that represents the Carbon accessible object
 
12186
 *    identified by the given HIObjectRef and 64-bit identifier. This
 
12187
 *    follows CoreFoundation semantics in that it will return NULL for
 
12188
 *    failure, and because it is a "Create" function you will need to
 
12189
 *    CFRelease() this AXUIElementRef when it is no longer needed.
 
12190
 *  
 
12191
 *  Availability:
 
12192
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12193
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
12194
 *    Non-Carbon CFM:   not available
 
12195
 }
 
12196
function AXUIElementCreateWithHIObjectAndIdentifier( inHIObject: HIObjectRef; inIdentifier: UInt64 ): AXUIElementRef; external name '_AXUIElementCreateWithHIObjectAndIdentifier';
 
12197
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 
12198
 
 
12199
 
 
12200
{
 
12201
 *  AXUIElementGetHIObject()
 
12202
 *  
 
12203
 *  Discussion:
 
12204
 *    If the incoming AXUIElementRef is a Carbon accessible object,
 
12205
 *    this routine will return the HIObjectRef of the accessible object.
 
12206
 *  
 
12207
 *  Mac OS X threading:
 
12208
 *    Not thread safe
 
12209
 *  
 
12210
 *  Parameters:
 
12211
 *    
 
12212
 *    inUIElement:
 
12213
 *      The AXUIElementRef of whom you'd like to get the HIObjectRef.
 
12214
 *  
 
12215
 *  Result:
 
12216
 *    The HIObjectRef of the AXUIElementRef. If the incoming
 
12217
 *    AXUIElementRef is not a Carbon accessible object, this routine
 
12218
 *    will return NULL.
 
12219
 *  
 
12220
 *  Availability:
 
12221
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12222
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
12223
 *    Non-Carbon CFM:   not available
 
12224
 }
 
12225
function AXUIElementGetHIObject( inUIElement: AXUIElementRef ): HIObjectRef; external name '_AXUIElementGetHIObject';
 
12226
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 
12227
 
 
12228
 
 
12229
{
 
12230
 *  AXUIElementGetIdentifier()
 
12231
 *  
 
12232
 *  Discussion:
 
12233
 *    If the incoming AXUIElementRef is a Carbon accessible object,
 
12234
 *    this routine will pass back the 64-bit identifier of the
 
12235
 *    accessible object.
 
12236
 *  
 
12237
 *  Mac OS X threading:
 
12238
 *    Not thread safe
 
12239
 *  
 
12240
 *  Parameters:
 
12241
 *    
 
12242
 *    inUIElement:
 
12243
 *      The AXUIElementRef of whom you'd like to get the 64-bit
 
12244
 *      identifier.
 
12245
 *    
 
12246
 *    outIdentifier:
 
12247
 *      The 64-bit identifier of the AXUIElementRef. If the incoming
 
12248
 *      AXUIElementRef is not a Carbon accessible object, this routine
 
12249
 *      will pass back zero. Note that zero is often a legal value for
 
12250
 *      Carbon accessible object, so do not assume that the accessible
 
12251
 *      object is not a Carbon accessible object just because you get a
 
12252
 *      result of zero.
 
12253
 *  
 
12254
 *  Availability:
 
12255
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12256
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
12257
 *    Non-Carbon CFM:   not available
 
12258
 }
 
12259
procedure AXUIElementGetIdentifier( inUIElement: AXUIElementRef; var outIdentifier: UInt64 ); external name '_AXUIElementGetIdentifier';
 
12260
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 
12261
 
 
12262
 
 
12263
{
 
12264
 *  AXNotificationHIObjectNotify()
 
12265
 *  
 
12266
 *  Discussion:
 
12267
 *    Posts a notification for the given pseudo-AXUIElementRef. Though
 
12268
 *    an actual AXUIElementRef is not actually passed in to this
 
12269
 *    function, its component parts are. This saves the implementation
 
12270
 *    the hassle of dismantling the AXUIElementRef into its component
 
12271
 *    parts.
 
12272
 *  
 
12273
 *  Mac OS X threading:
 
12274
 *    Not thread safe
 
12275
 *  
 
12276
 *  Parameters:
 
12277
 *    
 
12278
 *    inNotification:
 
12279
 *      The notification name string.
 
12280
 *    
 
12281
 *    inHIObject:
 
12282
 *      The HIObjectRef component of the AXUIElementRef to whom the
 
12283
 *      notification applies.
 
12284
 *    
 
12285
 *    inIdentifier:
 
12286
 *      The 64-bit identifier component of the AXUIElementRef to whom
 
12287
 *      the notification applies.
 
12288
 *  
 
12289
 *  Availability:
 
12290
 *    Mac OS X:         in version 10.2 and later in Carbon.framework
 
12291
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
12292
 *    Non-Carbon CFM:   not available
 
12293
 }
 
12294
procedure AXNotificationHIObjectNotify( inNotification: CFStringRef; inHIObject: HIObjectRef; inIdentifier: UInt64 ); external name '_AXNotificationHIObjectNotify';
 
12295
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
 
12296
 
 
12297
 
 
12298
{
 
12299
 *  HICopyAccessibilityRoleDescription()
 
12300
 *  
 
12301
 *  Summary:
 
12302
 *    Returns the role description string for a standard role or a
 
12303
 *    standard role-subrole pair.
 
12304
 *  
 
12305
 *  Discussion:
 
12306
 *    This routine is useful if you are implementing an accessible
 
12307
 *    object that has a standard role or role-subrole pair and you want
 
12308
 *    to make sure your object provides the same role description
 
12309
 *    string that the equivalent system-supplied object provides. In
 
12310
 *    other words, if you are implementing an accessible object of role
 
12311
 *    kAXButtonRole, you can use this routine to make sure it provides
 
12312
 *    the same role description that the standard push button provides.
 
12313
 *    
 
12314
 *    This routine can provide role description strings for all roles
 
12315
 *    and role-subrole pairs that are used in the standard/system
 
12316
 *    accessible objects on Mac OS X 10.4 and later. Once this routine
 
12317
 *    is able to provide a role description string for a role or
 
12318
 *    role-subrole pair, it will continue to do so on subsequent system
 
12319
 *    releases, even if the system no longer produces a standard
 
12320
 *    accessible object with that role or role-subrole pair.
 
12321
 *  
 
12322
 *  Mac OS X threading:
 
12323
 *    Not thread safe
 
12324
 *  
 
12325
 *  Parameters:
 
12326
 *    
 
12327
 *    inRole:
 
12328
 *      The role CFStringRef for your accessible object. Callers
 
12329
 *      typically pass one of the kAXFooRole constant strings from
 
12330
 *      within the HIServices framework.
 
12331
 *    
 
12332
 *    inSubrole:
 
12333
 *      The subrole CFStringRef for your accessible object. Callers
 
12334
 *      typically pass one of the kAXFooSubrole constant strings from
 
12335
 *      within the HIServices framework. Pass NULL if your accessible
 
12336
 *      object does not have a subrole.
 
12337
 *  
 
12338
 *  Result:
 
12339
 *    A CFStringRef with the standard role description for the role or
 
12340
 *    role-subrole pair. You must release the role description when you
 
12341
 *    are finished with it. If there is no standard role description
 
12342
 *    for the role or role-subrole pair, this routine will return NULL.
 
12343
 *    If you pass either an unknown role or an unknown subrole, this
 
12344
 *    routine will return NULL.
 
12345
 *  
 
12346
 *  Availability:
 
12347
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
12348
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 
12349
 *    Non-Carbon CFM:   not available
 
12350
 }
 
12351
function HICopyAccessibilityRoleDescription( inRole: CFStringRef; inSubrole: CFStringRef { can be NULL } ): CFStringRef; external name '_HICopyAccessibilityRoleDescription';
 
12352
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
12353
 
 
12354
 
 
12355
{
 
12356
 *  HICopyAccessibilityActionDescription()
 
12357
 *  
 
12358
 *  Summary:
 
12359
 *    Returns the action description string for a standard
 
12360
 *    accessibility action.
 
12361
 *  
 
12362
 *  Discussion:
 
12363
 *    This routine is useful if you are implementing an accessible
 
12364
 *    object that implements a standard action and you want to make
 
12365
 *    sure your object provides the same role action string that the a
 
12366
 *    system-supplied object provides. 
 
12367
 *    This routine can provide action description strings for all
 
12368
 *    actions that are used in the standard/system accessible objects
 
12369
 *    on Mac OS X 10.4 and later. Once this routine is able to provide
 
12370
 *    a description string for an action, it will continue to do so on
 
12371
 *    subsequent system releases, even if the system no longer produces
 
12372
 *    a standard accessible object that supports the action.
 
12373
 *  
 
12374
 *  Mac OS X threading:
 
12375
 *    Not thread safe
 
12376
 *  
 
12377
 *  Parameters:
 
12378
 *    
 
12379
 *    inAction:
 
12380
 *      The action CFStringRef for which you'd like to generate a
 
12381
 *      description. Callers must pass one of the kAXFooAction constant
 
12382
 *      strings from within the HIServices framework.
 
12383
 *  
 
12384
 *  Result:
 
12385
 *    A CFStringRef with the standard description for the action. You
 
12386
 *    must release the description when you are finished with it. If
 
12387
 *    you pass an unsupported action to this routine, the behavior is
 
12388
 *    undefined.
 
12389
 *  
 
12390
 *  Availability:
 
12391
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
12392
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 
12393
 *    Non-Carbon CFM:   not available
 
12394
 }
 
12395
function HICopyAccessibilityActionDescription( inAction: CFStringRef ): CFStringRef; external name '_HICopyAccessibilityActionDescription';
 
12396
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
12397
 
 
12398
 
 
12399
{--------------------------------------------------------------------------------------}
 
12400
{  System Events                                                                       }
 
12401
{--------------------------------------------------------------------------------------}
 
12402
 
 
12403
{
 
12404
    kEventClassSystem quick reference:
 
12405
 
 
12406
    kEventSystemTimeDateChanged         = 2,
 
12407
    kEventSystemUserSessionActivated    = 10,
 
12408
    kEventSystemUserSessionDeactivated  = 11
 
12409
}
 
12410
{
 
12411
 *  kEventClassSystem / kEventSystemTimeDateChanged
 
12412
 *  
 
12413
 *  Summary:
 
12414
 *    The system time and/or date has changed via the preferences panel.
 
12415
 *  
 
12416
 *  Discussion:
 
12417
 *    This event is sent to all handlers registered for it on the
 
12418
 *    application event target.
 
12419
 *  
 
12420
 *  Mac OS X threading:
 
12421
 *    Not thread safe
 
12422
 *  
 
12423
 *  Availability:
 
12424
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
12425
 *    CarbonLib:        not available
 
12426
 }
 
12427
const
 
12428
        kEventSystemTimeDateChanged = 2;
 
12429
 
 
12430
{
 
12431
 *  kEventClassSystem / kEventSystemUserSessionActivated
 
12432
 *  
 
12433
 *  Summary:
 
12434
 *    The current user login session has been activated.
 
12435
 *  
 
12436
 *  Discussion:
 
12437
 *    This event is sent to all handlers registered for it on the
 
12438
 *    application event target. It is sent when the Fast User Switching
 
12439
 *    feature of Mac OS X 10.3 is used to activate the login session in
 
12440
 *    which the current application is running.
 
12441
 *  
 
12442
 *  Mac OS X threading:
 
12443
 *    Not thread safe
 
12444
 *  
 
12445
 *  Availability:
 
12446
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
12447
 *    CarbonLib:        not available
 
12448
 }
 
12449
const
 
12450
        kEventSystemUserSessionActivated = 10;
 
12451
 
 
12452
{
 
12453
 *  kEventClassSystem / kEventSystemUserSessionDeactivated
 
12454
 *  
 
12455
 *  Summary:
 
12456
 *    The current user login session has been deactivated.
 
12457
 *  
 
12458
 *  Discussion:
 
12459
 *    This event is sent to all handlers registered for it on the
 
12460
 *    application event target. It is sent when the Fast User Switching
 
12461
 *    feature of Mac OS X 10.3 is used to switch to another user's
 
12462
 *    login session.
 
12463
 *  
 
12464
 *  Mac OS X threading:
 
12465
 *    Not thread safe
 
12466
 *  
 
12467
 *  Availability:
 
12468
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
12469
 *    CarbonLib:        not available
 
12470
 }
 
12471
const
 
12472
        kEventSystemUserSessionDeactivated = 11;
 
12473
 
 
12474
{--------------------------------------------------------------------------------------}
 
12475
{  Installing Event Handlers                                                           }
 
12476
{--------------------------------------------------------------------------------------}
 
12477
{
 
12478
 *  GetWindowEventTarget()
 
12479
 *  
 
12480
 *  Discussion:
 
12481
 *    Returns the EventTargetRef for the specified window. Once you
 
12482
 *    obtain this reference, you can send events to the target and
 
12483
 *    install an event handler on it.
 
12484
 *  
 
12485
 *  Mac OS X threading:
 
12486
 *    Not thread safe
 
12487
 *  
 
12488
 *  Parameters:
 
12489
 *    
 
12490
 *    inWindow:
 
12491
 *      The window to return the target for.
 
12492
 *  
 
12493
 *  Result:
 
12494
 *    An EventTargetRef.
 
12495
 *  
 
12496
 *  Availability:
 
12497
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12498
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12499
 *    Non-Carbon CFM:   not available
 
12500
 }
 
12501
function GetWindowEventTarget( inWindow: WindowRef ): EventTargetRef; external name '_GetWindowEventTarget';
 
12502
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12503
 
 
12504
 
 
12505
{
 
12506
 *  GetControlEventTarget()
 
12507
 *  
 
12508
 *  Discussion:
 
12509
 *    Returns the EventTargetRef for the specified control. Once you
 
12510
 *    obtain this reference, you can send events to the target and
 
12511
 *    install event handler on it.
 
12512
 *  
 
12513
 *  Mac OS X threading:
 
12514
 *    Not thread safe
 
12515
 *  
 
12516
 *  Parameters:
 
12517
 *    
 
12518
 *    inControl:
 
12519
 *      The control to return the target for.
 
12520
 *  
 
12521
 *  Result:
 
12522
 *    An EventTargetRef.
 
12523
 *  
 
12524
 *  Availability:
 
12525
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12526
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12527
 *    Non-Carbon CFM:   not available
 
12528
 }
 
12529
function GetControlEventTarget( inControl: ControlRef ): EventTargetRef; external name '_GetControlEventTarget';
 
12530
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12531
 
 
12532
 
 
12533
{
 
12534
 *  GetMenuEventTarget()
 
12535
 *  
 
12536
 *  Discussion:
 
12537
 *    Returns the EventTargetRef for the specified menu. Once you
 
12538
 *    obtain this reference, you can send events to the target and
 
12539
 *    install event handler on it.
 
12540
 *  
 
12541
 *  Mac OS X threading:
 
12542
 *    Not thread safe
 
12543
 *  
 
12544
 *  Parameters:
 
12545
 *    
 
12546
 *    inMenu:
 
12547
 *      The menu to return the target for.
 
12548
 *  
 
12549
 *  Result:
 
12550
 *    An EventTargetRef.
 
12551
 *  
 
12552
 *  Availability:
 
12553
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12554
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12555
 *    Non-Carbon CFM:   not available
 
12556
 }
 
12557
function GetMenuEventTarget( inMenu: MenuRef ): EventTargetRef; external name '_GetMenuEventTarget';
 
12558
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12559
 
 
12560
 
 
12561
{
 
12562
 *  GetApplicationEventTarget()
 
12563
 *  
 
12564
 *  Discussion:
 
12565
 *    Returns the EventTargetRef for the application. Once you obtain
 
12566
 *    this reference, you can send events to the target and install
 
12567
 *    event handler on it.
 
12568
 *  
 
12569
 *  Mac OS X threading:
 
12570
 *    Not thread safe
 
12571
 *  
 
12572
 *  Result:
 
12573
 *    An EventTargetRef.
 
12574
 *  
 
12575
 *  Availability:
 
12576
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12577
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12578
 *    Non-Carbon CFM:   not available
 
12579
 }
 
12580
function GetApplicationEventTarget: EventTargetRef; external name '_GetApplicationEventTarget';
 
12581
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12582
 
 
12583
 
 
12584
{
 
12585
 *  GetUserFocusEventTarget()
 
12586
 *  
 
12587
 *  Discussion:
 
12588
 *    Returns the EventTargetRef for the current user focus at the time
 
12589
 *    of the call. Keyboard events are always sent to this target.
 
12590
 *    Events that are sent to this target are automatically propagated
 
12591
 *    to the following other targets: first to the focused control in
 
12592
 *    the focused window, then up the control hierarchy to the focused
 
12593
 *    window itself, and then to the application target. 
 
12594
 *    
 
12595
 *    Note that command key processing occurs before key events are
 
12596
 *    sent to this target; to intercept key events before command key
 
12597
 *    processing occurs, install a handler on the event dispatcher
 
12598
 *    target instead of this target.
 
12599
 *  
 
12600
 *  Mac OS X threading:
 
12601
 *    Not thread safe
 
12602
 *  
 
12603
 *  Result:
 
12604
 *    An EventTargetRef.
 
12605
 *  
 
12606
 *  Availability:
 
12607
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12608
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12609
 *    Non-Carbon CFM:   not available
 
12610
 }
 
12611
function GetUserFocusEventTarget: EventTargetRef; external name '_GetUserFocusEventTarget';
 
12612
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12613
 
 
12614
 
 
12615
{
 
12616
 *  GetEventDispatcherTarget()
 
12617
 *  
 
12618
 *  Discussion:
 
12619
 *    Returns the EventTargetRef for the standard toolbox dispatcher.
 
12620
 *    You typically would never need to use this, but there are some
 
12621
 *    exotic apps that need to pick events off the event queue and call
 
12622
 *    the dispatcher themselves. This allows you to do just that
 
12623
 *    instead of calling RunApplicationEventLoop to handle it all.
 
12624
 *  
 
12625
 *  Mac OS X threading:
 
12626
 *    Not thread safe
 
12627
 *  
 
12628
 *  Result:
 
12629
 *    An EventTargetRef.
 
12630
 *  
 
12631
 *  Availability:
 
12632
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12633
 *    CarbonLib:        in CarbonLib 1.3 and later
 
12634
 *    Non-Carbon CFM:   not available
 
12635
 }
 
12636
function GetEventDispatcherTarget: EventTargetRef; external name '_GetEventDispatcherTarget';
 
12637
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12638
 
 
12639
 
 
12640
{
 
12641
 *  GetEventMonitorTarget()
 
12642
 *  
 
12643
 *  Summary:
 
12644
 *    Returns the event monitor target.
 
12645
 *  
 
12646
 *  Discussion:
 
12647
 *    The event monitor target is a special event target used to
 
12648
 *    monitor user input events across all processes. When an event
 
12649
 *    handler is installed on the event monitor target, the Carbon
 
12650
 *    Event Manager examines the EventTypeSpec for user input event
 
12651
 *    types, such as mouse-down, mouse-up, key-down, and so forth. It
 
12652
 *    then requests that the WindowServer make copies of any of these
 
12653
 *    events that are sent to any process, and deliver them to the
 
12654
 *    current process also. These events are queued into the main
 
12655
 *    thread�s event queue, and during normal event dispatching are
 
12656
 *    sent directly to the event handlers installed on the event
 
12657
 *    monitor target. Monitored events are not sent through the normal
 
12658
 *    event dispatching path for the current process; they will pass
 
12659
 *    through the event dispatcher target, and will then be sent
 
12660
 *    directly to the event monitor target.
 
12661
 *    
 
12662
 *    Handlers installed on the event monitor target will only receive
 
12663
 *    events when the current application is inactive. When the current
 
12664
 *    application is active, all event flow occurs through the event
 
12665
 *    dispatcher target, and no events are sent to the event monitor
 
12666
 *    target.
 
12667
 *    
 
12668
 *    Currently, the event monitor supports the following event kinds:
 
12669
 *    kEventRawKeyDown, kEventRawKeyUp, kEventRawKeyRepeat,
 
12670
 *    kEventRawKeyModifiersChanged, kEventMouseDown, kEventMouseUp,
 
12671
 *    kEventMouseMoved, kEventMouseDragged, kEventMouseWheelMoved,
 
12672
 *    kEventTabletPoint, and kEventTabletProximity.
 
12673
 *    
 
12674
 *    Note that both Carbon and Cocoa password edit text controls
 
12675
 *    enable a secure input mode while the focus is on the control,
 
12676
 *    which prevents keyboard events from being passed to other
 
12677
 *    applications. This prevents the monitoring event target from
 
12678
 *    being used to sniff password keystrokes.
 
12679
 *    
 
12680
 *    For added security, GetEventMonitorTarget requires that "Enable
 
12681
 *    access for assistive devices" be checked in the Universal Access
 
12682
 *    preference pane in order to monitor RawKeyDown, RawKeyUp, and
 
12683
 *    RawKeyRepeat events. If this control is not checked, you can
 
12684
 *    still install handlers for these events on the event monitor
 
12685
 *    target, but no events of these types will be sent to your
 
12686
 *    handler. Administrator privileges are required to enable this
 
12687
 *    feature. You can determine whether this control is checked using
 
12688
 *    the AXAPIEnabled API in AXUIElement.h.
 
12689
 *  
 
12690
 *  Mac OS X threading:
 
12691
 *    Not thread safe
 
12692
 *  
 
12693
 *  Result:
 
12694
 *    An EventTargetRef.
 
12695
 *  
 
12696
 *  Availability:
 
12697
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
12698
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
 
12699
 *    Non-Carbon CFM:   not available
 
12700
 }
 
12701
function GetEventMonitorTarget: EventTargetRef; external name '_GetEventMonitorTarget';
 
12702
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
 
12703
 
 
12704
(*
 
12705
#define InstallApplicationEventHandler( handler, numTypes, list, userData, outHandlerRef ) \
 
12706
      InstallEventHandler( GetApplicationEventTarget(), (handler), (numTypes), (list), (userData), (outHandlerRef) )
 
12707
 
 
12708
#define InstallHIObjectEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
 
12709
      InstallEventHandler( HIObjectGetEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
 
12710
 
 
12711
#define InstallWindowEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
 
12712
       InstallEventHandler( GetWindowEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
 
12713
 
 
12714
#define InstallControlEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
 
12715
        InstallEventHandler( GetControlEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
 
12716
 
 
12717
#define InstallMenuEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
 
12718
      InstallEventHandler( GetMenuEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
 
12719
 
 
12720
#define HIViewInstallEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
 
12721
       InstallEventHandler( HIObjectGetEventTarget( (HIObjectRef) (target) ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
 
12722
 
 
12723
 
 
12724
{
 
12725
    You can use the following macro in your code to allow you to set up an
 
12726
 event handler lazily. You pass the name of your event handler in. You should
 
12727
   use this with caution on Mac OS 9 systems since it could cause heap fragmentation.
 
12728
}
 
12729
#define DEFINE_ONE_SHOT_HANDLER_GETTER( x )       \
 
12730
EventHandlerUPP Get ## x ## UPP()             \
 
12731
{                                             \
 
12732
  static EventHandlerUPP  sHandler = NULL;    \
 
12733
                                              \
 
12734
  if ( sHandler == NULL )                     \
 
12735
      sHandler = NewEventHandlerUPP( x );     \
 
12736
                                              \
 
12737
  return sHandler;                            \
 
12738
}
 
12739
 
 
12740
 
 
12741
#define SendEventToApplication( e ) \
 
12742
        SendEventToEventTarget( (e), GetApplicationEventTarget() )
 
12743
 
 
12744
#define SendEventToHIObject( e, t ) \
 
12745
      SendEventToEventTarget( (e), HIObjectGetEventTarget( t ) )
 
12746
 
 
12747
#define SendEventToWindow( e, t ) \
 
12748
        SendEventToEventTarget( (e), GetWindowEventTarget( t ) )
 
12749
 
 
12750
#define SendEventToControl( e, t ) \
 
12751
     SendEventToEventTarget( (e), GetControlEventTarget( t ) )
 
12752
 
 
12753
#define SendEventToMenu( e, t ) \
 
12754
       SendEventToEventTarget( (e), GetMenuEventTarget( t ) )
 
12755
 
 
12756
#define SendEventToUserFocus( e ) \
 
12757
        SendEventToEventTarget( (e), GetUserFocusEventTarget() )
 
12758
*)
 
12759
 
 
12760
{======================================================================================}
 
12761
{  � Command Routines                                                                  }
 
12762
{======================================================================================}
 
12763
{
 
12764
 *  ProcessHICommand()
 
12765
 *  
 
12766
 *  Summary:
 
12767
 *    Sends a kEventCommandProcess event.
 
12768
 *  
 
12769
 *  Discussion:
 
12770
 *    ProcessHICommand is a convenience function for dispatching
 
12771
 *    kEventCommandProcesss events. Normally these events are created
 
12772
 *    and dispatched automatically by the toolbox when a menu item or
 
12773
 *    control is selected, but you may need to dispatch an event
 
12774
 *    yourself at times. This API creates a CommandProcess event, adds
 
12775
 *    the specified HICommand structure as an event parameter, and
 
12776
 *    sends the event to the user focus target for handling. 
 
12777
 *    
 
12778
 *    If you need to send a CommandProcess event to some other target,
 
12779
 *    or you need to add other event parameters to the event besides
 
12780
 *    the HICommand structure, it is correct and supported to simply
 
12781
 *    create the event yourself and send it to the desired target,
 
12782
 *    without using this API.
 
12783
 *  
 
12784
 *  Mac OS X threading:
 
12785
 *    Not thread safe
 
12786
 *  
 
12787
 *  Availability:
 
12788
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12789
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12790
 *    Non-Carbon CFM:   not available
 
12791
 }
 
12792
function ProcessHICommand( const (*var*) inCommand: HICommand ): OSStatus; external name '_ProcessHICommand';
 
12793
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12794
 
 
12795
 
 
12796
{--------------------------------------------------------------------------------------}
 
12797
{  � Event Loop Routines                                                               }
 
12798
{--------------------------------------------------------------------------------------}
 
12799
 
 
12800
{
 
12801
 *  RunApplicationEventLoop()
 
12802
 *  
 
12803
 *  Discussion:
 
12804
 *    This routine is used as the main event loop for a Carbon
 
12805
 *    Event-based application. Once entered, this function waits for
 
12806
 *    events to arrive and dispatches them to your event handlers
 
12807
 *    automatically.
 
12808
 *  
 
12809
 *  Mac OS X threading:
 
12810
 *    Not thread safe
 
12811
 *  
 
12812
 *  Availability:
 
12813
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12814
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12815
 *    Non-Carbon CFM:   not available
 
12816
 }
 
12817
procedure RunApplicationEventLoop; external name '_RunApplicationEventLoop';
 
12818
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12819
 
 
12820
 
 
12821
{
 
12822
 *  QuitApplicationEventLoop()
 
12823
 *  
 
12824
 *  Discussion:
 
12825
 *    This routine is used to quit the RunApplicationEventLoop
 
12826
 *    function. Typically, your application doesn't need to call this.
 
12827
 *    If your application has the Quit menu item tagged with the
 
12828
 *    kHICommandQuit Menu Command ID, the toolbox will automatically
 
12829
 *    call this for your application, automatically terminating your
 
12830
 *    event loop. If your application wants to do pre-processing before
 
12831
 *    the event loop exits, it should intercept either the
 
12832
 *    kHICommandQuit menu command, or the kEventApplicationQuit event.
 
12833
 *  
 
12834
 *  Mac OS X threading:
 
12835
 *    Not thread safe
 
12836
 *  
 
12837
 *  Availability:
 
12838
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12839
 *    CarbonLib:        in CarbonLib 1.1 and later
 
12840
 *    Non-Carbon CFM:   not available
 
12841
 }
 
12842
procedure QuitApplicationEventLoop; external name '_QuitApplicationEventLoop';
 
12843
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12844
 
 
12845
 
 
12846
{--------------------------------------------------------------------------------------}
 
12847
{  � Event Modality routines                                                           }
 
12848
{--------------------------------------------------------------------------------------}
 
12849
 
 
12850
{
 
12851
 *  RunAppModalLoopForWindow()
 
12852
 *  
 
12853
 *  Discussion:
 
12854
 *    This routine is used as a replacement to ModalDialog to drive a
 
12855
 *    Carbon Event-based modal dialog. Once called, this routine will
 
12856
 *    not exit until QuitAppModalLoopForWindow is called. Calls to
 
12857
 *    RunAppModalLoopForWindow can be nested, as long as each call is
 
12858
 *    made on a different window. The window must be visible when
 
12859
 *    calling RunAppModalLoopForWindow; otherwise, windowWrongStateErr
 
12860
 *    is returned. In Mac OS X 10.0.x, RunAppModalLoopForWindow will
 
12861
 *    fail to re-enable the menubar before exiting if you dispose of
 
12862
 *    the window during the modal loop (for example, from a Carbon
 
12863
 *    event handler). You can work around this bug by retaining the
 
12864
 *    window before calling RunAppModalLoopForWindow, and releasing it
 
12865
 *    afterwards.
 
12866
 *  
 
12867
 *  Mac OS X threading:
 
12868
 *    Not thread safe
 
12869
 *  
 
12870
 *  Parameters:
 
12871
 *    
 
12872
 *    inWindow:
 
12873
 *      The window you wish to behave modally.
 
12874
 *  
 
12875
 *  Result:
 
12876
 *    An operating system status code. windowWrongStateErr will be
 
12877
 *    returned if the window is invisible.
 
12878
 *  
 
12879
 *  Availability:
 
12880
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12881
 *    CarbonLib:        in CarbonLib 1.3 and later
 
12882
 *    Non-Carbon CFM:   not available
 
12883
 }
 
12884
function RunAppModalLoopForWindow( inWindow: WindowRef ): OSStatus; external name '_RunAppModalLoopForWindow';
 
12885
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12886
 
 
12887
 
 
12888
{
 
12889
 *  QuitAppModalLoopForWindow()
 
12890
 *  
 
12891
 *  Discussion:
 
12892
 *    This routine is used to quit a currently running call to
 
12893
 *    RunAppModalLoopForWindow, i.e. it terminates a modal loop.
 
12894
 *    Typically this would be called from a handler you have installed
 
12895
 *    on the modal window in question when the user clicks the
 
12896
 *    appropriate button, etc.
 
12897
 *  
 
12898
 *  Mac OS X threading:
 
12899
 *    Not thread safe
 
12900
 *  
 
12901
 *  Parameters:
 
12902
 *    
 
12903
 *    inWindow:
 
12904
 *      The window for which to quit the modal state.
 
12905
 *  
 
12906
 *  Result:
 
12907
 *    An operating system status code.
 
12908
 *  
 
12909
 *  Availability:
 
12910
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12911
 *    CarbonLib:        in CarbonLib 1.3 and later
 
12912
 *    Non-Carbon CFM:   not available
 
12913
 }
 
12914
function QuitAppModalLoopForWindow( inWindow: WindowRef ): OSStatus; external name '_QuitAppModalLoopForWindow';
 
12915
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12916
 
 
12917
 
 
12918
{
 
12919
 *  BeginAppModalStateForWindow()
 
12920
 *  
 
12921
 *  Discussion:
 
12922
 *    This routine is a lower level routine than
 
12923
 *    RunAppModalLoopForWindow. It can be used if you wish to enter an
 
12924
 *    app modal state for a window, but need to control the event loop
 
12925
 *    yourself for whatever reason. In most cases, you would use
 
12926
 *    RunAppModalLoopForWindow. Once you begin your app modal state,
 
12927
 *    the menu bar will disable and prepare for the modal situation.
 
12928
 *    The window must be visible when calling
 
12929
 *    BeginAppModalStateForWindow; otherwise, windowWrongStateErr is
 
12930
 *    returned. Calls to BeginAppModalStateForWindow can be nested, as
 
12931
 *    long as each call is made on a different window. In Mac OS 10.0.x
 
12932
 *    and CarbonLib 1.3.1, BeginAppModalStateForWindow can only be
 
12933
 *    called on a window once; future calls will return an error. This
 
12934
 *    bug is fixed in Mac OS 10.1 and CarbonLib 1.4.
 
12935
 *  
 
12936
 *  Mac OS X threading:
 
12937
 *    Not thread safe
 
12938
 *  
 
12939
 *  Parameters:
 
12940
 *    
 
12941
 *    inWindow:
 
12942
 *      The window you wish to behave modally.
 
12943
 *  
 
12944
 *  Result:
 
12945
 *    An operating system status code. windowWrongStateErr will be
 
12946
 *    returned if the window is invisible.
 
12947
 *  
 
12948
 *  Availability:
 
12949
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12950
 *    CarbonLib:        in CarbonLib 1.3 and later
 
12951
 *    Non-Carbon CFM:   not available
 
12952
 }
 
12953
function BeginAppModalStateForWindow( inWindow: WindowRef ): OSStatus; external name '_BeginAppModalStateForWindow';
 
12954
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12955
 
 
12956
 
 
12957
{
 
12958
 *  EndAppModalStateForWindow()
 
12959
 *  
 
12960
 *  Discussion:
 
12961
 *    This routine ends an app modal state started with
 
12962
 *    BeginAppModalStateForWindow.
 
12963
 *  
 
12964
 *  Mac OS X threading:
 
12965
 *    Not thread safe
 
12966
 *  
 
12967
 *  Parameters:
 
12968
 *    
 
12969
 *    inWindow:
 
12970
 *      The window you wish to stop acting as app modal.
 
12971
 *  
 
12972
 *  Result:
 
12973
 *    An operating system status code.
 
12974
 *  
 
12975
 *  Availability:
 
12976
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
12977
 *    CarbonLib:        in CarbonLib 1.3 and later
 
12978
 *    Non-Carbon CFM:   not available
 
12979
 }
 
12980
function EndAppModalStateForWindow( inWindow: WindowRef ): OSStatus; external name '_EndAppModalStateForWindow';
 
12981
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
12982
 
 
12983
 
 
12984
{--------------------------------------------------------------------------------------}
 
12985
{  � User Focus                                                                        }
 
12986
{ The 'user focus' is where keyboard input goes. We also use the term 'key' applied    }
 
12987
{ to windows to mean this. The user focus window is normally the active non-floating   }
 
12988
{ window or dialog. It is possible to make a floater get the focus, however, by calling}
 
12989
{ SetUserFocusWindow. After that call, the event model will automatically route key    }
 
12990
{ input to the active keyboard focus of that window, if any. Passing kUserFocusAuto    }
 
12991
{ into the window parameter tells the toolbox to pick what it considers to be the best }
 
12992
{ candidate for focus. You should call this to restore focus, rather than getting the  }
 
12993
{ focus, setting it to a special window, and then restoring to the saved focus. There  }
 
12994
{ are cases, however, when you might want to restore to an explicit window, but the    }
 
12995
{ typical usage should just be to restore to the kUserFocusAuto focus.                 }
 
12996
{ Keep in mind that setting the focus will only last until you restore focus, or the   }
 
12997
{ user starts clicking in other windows. When that happens, the toolbox will auto-     }
 
12998
{ redirect the user focus to a newly selected window.                                  }
 
12999
{--------------------------------------------------------------------------------------}
 
13000
{ pick the most appropriate window for focus}
 
13001
const
 
13002
        kUserFocusAuto = WindowRef(-1);
 
13003
{
 
13004
 *  SetUserFocusWindow()
 
13005
 *  
 
13006
 *  Mac OS X threading:
 
13007
 *    Not thread safe
 
13008
 *  
 
13009
 *  Availability:
 
13010
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13011
 *    CarbonLib:        in CarbonLib 1.1 and later
 
13012
 *    Non-Carbon CFM:   not available
 
13013
 }
 
13014
function SetUserFocusWindow( inWindow: WindowRef ): OSStatus; external name '_SetUserFocusWindow';
 
13015
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13016
 
 
13017
 
 
13018
{
 
13019
 *  GetUserFocusWindow()
 
13020
 *  
 
13021
 *  Mac OS X threading:
 
13022
 *    Not thread safe
 
13023
 *  
 
13024
 *  Availability:
 
13025
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13026
 *    CarbonLib:        in CarbonLib 1.1 and later
 
13027
 *    Non-Carbon CFM:   not available
 
13028
 }
 
13029
function GetUserFocusWindow: WindowRef; external name '_GetUserFocusWindow';
 
13030
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13031
 
 
13032
 
 
13033
{--------------------------------------------------------------------------------------}
 
13034
{  � Default/Cancel buttons                                                            }
 
13035
{ In our quest to eliminate the need for dialogs when using the new event model, we    }
 
13036
{ have added the following routines which add dialog-like button control to normal     }
 
13037
{ windows. With these routines, you can set the default and cancel buttons for a       }
 
13038
{ window; these work just like the corresponding concepts in dialogs, and when         }
 
13039
{ present, the standard toolbox handlers will handle keyboard input mapping to these   }
 
13040
{ buttons. This means that pressing return or enter will 'press' the default button    }
 
13041
{ and escape or command-period will 'press' the cancel button.                         }
 
13042
{--------------------------------------------------------------------------------------}
 
13043
 
 
13044
{
 
13045
 *  SetWindowDefaultButton()
 
13046
 *  
 
13047
 *  Mac OS X threading:
 
13048
 *    Not thread safe
 
13049
 *  
 
13050
 *  Availability:
 
13051
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13052
 *    CarbonLib:        in CarbonLib 1.1 and later
 
13053
 *    Non-Carbon CFM:   not available
 
13054
 }
 
13055
function SetWindowDefaultButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowDefaultButton';
 
13056
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13057
 
 
13058
 
 
13059
{
 
13060
 *  SetWindowCancelButton()
 
13061
 *  
 
13062
 *  Mac OS X threading:
 
13063
 *    Not thread safe
 
13064
 *  
 
13065
 *  Availability:
 
13066
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13067
 *    CarbonLib:        in CarbonLib 1.1 and later
 
13068
 *    Non-Carbon CFM:   not available
 
13069
 }
 
13070
function SetWindowCancelButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowCancelButton';
 
13071
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13072
 
 
13073
 
 
13074
{
 
13075
 *  GetWindowDefaultButton()
 
13076
 *  
 
13077
 *  Mac OS X threading:
 
13078
 *    Not thread safe
 
13079
 *  
 
13080
 *  Availability:
 
13081
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13082
 *    CarbonLib:        in CarbonLib 1.1 and later
 
13083
 *    Non-Carbon CFM:   not available
 
13084
 }
 
13085
function GetWindowDefaultButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowDefaultButton';
 
13086
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13087
 
 
13088
 
 
13089
{
 
13090
 *  GetWindowCancelButton()
 
13091
 *  
 
13092
 *  Mac OS X threading:
 
13093
 *    Not thread safe
 
13094
 *  
 
13095
 *  Availability:
 
13096
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13097
 *    CarbonLib:        in CarbonLib 1.1 and later
 
13098
 *    Non-Carbon CFM:   not available
 
13099
 }
 
13100
function GetWindowCancelButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowCancelButton';
 
13101
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13102
 
 
13103
 
 
13104
{--------------------------------------------------------------------------------------}
 
13105
{  � Global HotKey API                                                                 }
 
13106
{--------------------------------------------------------------------------------------}
 
13107
type
 
13108
        EventHotKeyIDPtr = ^EventHotKeyID;
 
13109
        EventHotKeyID = record
 
13110
                signature: OSType;
 
13111
                id: UInt32;
 
13112
        end;
 
13113
type
 
13114
        EventHotKeyRef = ^SInt32; { an opaque 32-bit type }
 
13115
{
 
13116
 *  RegisterEventHotKey()
 
13117
 *  
 
13118
 *  Discussion:
 
13119
 *    Registers a global hot key based on the virtual key code and
 
13120
 *    modifiers you pass in. Only one such combination can exist for
 
13121
 *    the current application, i.e. multiple entities in the same
 
13122
 *    application cannot register for the same hot key combination. The
 
13123
 *    same hot key can, however, be registered by multiple
 
13124
 *    applications. This means that multiple applications can
 
13125
 *    potentially be notified when a particular hot key is requested.
 
13126
 *    This might not necessarily be desirable, but it is how it works
 
13127
 *    at present.
 
13128
 *  
 
13129
 *  Mac OS X threading:
 
13130
 *    Not thread safe
 
13131
 *  
 
13132
 *  Parameters:
 
13133
 *    
 
13134
 *    inHotKeyCode:
 
13135
 *      The virtual key code of the key to watch
 
13136
 *    
 
13137
 *    inHotKeyModifiers:
 
13138
 *      The keyboard modifiers to look for. On Mac OS X 10.2 or
 
13139
 *      earlier, this parameter must be non-zero, i.e. there must be a
 
13140
 *      modifier specified. On Mac OS X 10.3 or later, you may pass
 
13141
 *      zero.
 
13142
 *    
 
13143
 *    inHotKeyID:
 
13144
 *      The application-specified hot key ID. You will receive this in
 
13145
 *      the kEventHotKeyPressed event as the direct object parameter.
 
13146
 *    
 
13147
 *    inTarget:
 
13148
 *      The target to notify when the hot key is pressed.
 
13149
 *    
 
13150
 *    inOptions:
 
13151
 *      Currently unused. Pass 0 or face the consequences.
 
13152
 *    
 
13153
 *    outRef:
 
13154
 *      The EventHotKeyRef that represents your new, shiny hot key. You
 
13155
 *      need this if you later wish to unregister it.
 
13156
 *  
 
13157
 *  Result:
 
13158
 *    An operating system status code.
 
13159
 *  
 
13160
 *  Availability:
 
13161
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13162
 *    CarbonLib:        in CarbonLib 1.3 and later
 
13163
 *    Non-Carbon CFM:   not available
 
13164
 }
 
13165
function RegisterEventHotKey( inHotKeyCode: UInt32; inHotKeyModifiers: UInt32; inHotKeyID: EventHotKeyID; inTarget: EventTargetRef; inOptions: OptionBits; var outRef: EventHotKeyRef ): OSStatus; external name '_RegisterEventHotKey';
 
13166
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13167
 
 
13168
 
 
13169
{
 
13170
 *  UnregisterEventHotKey()
 
13171
 *  
 
13172
 *  Discussion:
 
13173
 *    Unregisters a global hot key that was previously registered with
 
13174
 *    the RegisterEventHotKey API. You do not need to unregister a hot
 
13175
 *    key when your application terminates, the system will take care
 
13176
 *    of that for you. This would be used if the user changes a hot key
 
13177
 *    for something in your application - you would unregister the
 
13178
 *    previous key and register your new key.
 
13179
 *  
 
13180
 *  Mac OS X threading:
 
13181
 *    Not thread safe
 
13182
 *  
 
13183
 *  Parameters:
 
13184
 *    
 
13185
 *    inHotKey:
 
13186
 *      The EventHotKeyRef to unregister.
 
13187
 *  
 
13188
 *  Result:
 
13189
 *    An operating system status code.
 
13190
 *  
 
13191
 *  Availability:
 
13192
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
13193
 *    CarbonLib:        in CarbonLib 1.3 and later
 
13194
 *    Non-Carbon CFM:   not available
 
13195
 }
 
13196
function UnregisterEventHotKey( inHotKey: EventHotKeyRef ): OSStatus; external name '_UnregisterEventHotKey';
 
13197
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
13198
 
 
13199
 
 
13200
{
 
13201
 *  kHISymbolicHotKeyCode
 
13202
 *  
 
13203
 *  Discussion:
 
13204
 *    A CFDictionaryRef key in a dictionary returned by
 
13205
 *    CopySymbolicHotKeys. The value for this key is the virtual
 
13206
 *    keycode of the hotkey, represented as a CFNumber.
 
13207
 }
 
13208
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
13209
{$definec kHISymbolicHotKeyCode CFSTRP('kHISymbolicHotKeyCode')}
 
13210
{$endc}
 
13211
 
 
13212
{
 
13213
 *  kHISymbolicHotKeyModifiers
 
13214
 *  
 
13215
 *  Discussion:
 
13216
 *    A CFDictionaryRef key in a dictionary returned by
 
13217
 *    CopySymbolicHotKeys. The value for this key is the keyboard
 
13218
 *    modifiers of the hotkey, represented as a CFNumber.
 
13219
 }
 
13220
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
13221
{$definec kHISymbolicHotKeyModifiers CFSTRP('kHISymbolicHotKeyModifiers')}
 
13222
{$endc}
 
13223
 
 
13224
{
 
13225
 *  kHISymbolicHotKeyEnabled
 
13226
 *  
 
13227
 *  Discussion:
 
13228
 *    A CFDictionaryRef key in a dictionary returned by
 
13229
 *    CopySymbolicHotKeys. The value for this key is the enable state
 
13230
 *    of the hotkey, represented as a CFBoolean.
 
13231
 }
 
13232
{$ifc USE_CFSTR_CONSTANT_MACROS}
 
13233
{$definec kHISymbolicHotKeyEnabled CFSTRP('kHISymbolicHotKeyEnabled')}
 
13234
{$endc}
 
13235
{
 
13236
 *  CopySymbolicHotKeys()
 
13237
 *  
 
13238
 *  Summary:
 
13239
 *    Returns an array of CFDictionaryRefs containing information about
 
13240
 *    the system-wide symbolic hotkeys that are defined in the Keyboard
 
13241
 *    preferences pane.
 
13242
 *  
 
13243
 *  Discussion:
 
13244
 *    The hotkey info returned by this API describes the system-wide
 
13245
 *    hotkeys such as the Screen Capture, Universal Access, and
 
13246
 *    Keyboard Navigation keys. It does not include customized
 
13247
 *    application-specific command keys.
 
13248
 *    
 
13249
 *    Each array entry is a CFDictionaryRef, and each dictionary
 
13250
 *    contains information about a single hotkey. There is currently no
 
13251
 *    way to determine which hotkey in the Keyboards preference pane
 
13252
 *    corresponds to a specific dictionary. Each dictionary contains
 
13253
 *    the following keys: kHISymbolicHotKeyCode,
 
13254
 *    kHISymbolicHotKeyModifiers, and kHISymbolicHotKeyEnabled. The
 
13255
 *    array must be released by the caller; the dictionaries do not
 
13256
 *    need to be released (they will be auto-released when the array is
 
13257
 *    released).
 
13258
 *    
 
13259
 *    Note that this API will require O(number of hotkeys) to run, and
 
13260
 *    the number of hotkeys will increase in the future, so do not call
 
13261
 *    this API unnecessarily or in highly performance-sensitive code.
 
13262
 *  
 
13263
 *  Mac OS X threading:
 
13264
 *    Not thread safe
 
13265
 *  
 
13266
 *  Parameters:
 
13267
 *    
 
13268
 *    outHotKeyArray:
 
13269
 *      On exit, contains an array of the values of all symbolic hot
 
13270
 *      keys.
 
13271
 *  
 
13272
 *  Result:
 
13273
 *    An operating system result code; currently, noErr and memFullErr
 
13274
 *    may be returned.
 
13275
 *  
 
13276
 *  Availability:
 
13277
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
13278
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
 
13279
 *    Non-Carbon CFM:   not available
 
13280
 }
 
13281
function CopySymbolicHotKeys( var outHotKeyArray: CFArrayRef ): OSStatus; external name '_CopySymbolicHotKeys';
 
13282
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
 
13283
 
 
13284
 
 
13285
{
 
13286
 *  Summary:
 
13287
 *    Parameters to the PushSymbolicHotKeyMode SPI.
 
13288
 }
 
13289
const
 
13290
{
 
13291
   * All hotkeys are enabled.
 
13292
   }
 
13293
        kHIHotKeyModeAllEnabled = 0;
 
13294
 
 
13295
  {
 
13296
   * All hotkeys are disabled.
 
13297
   }
 
13298
        kHIHotKeyModeAllDisabled = 1 shl 0;
 
13299
 
 
13300
  {
 
13301
   * All hotkeys are disabled except for the Universal Access hotkeys
 
13302
   * (zooming, white-on-black, and enhanced contrast).
 
13303
   }
 
13304
        kHIHotKeyModeAllDisabledExceptUniversalAccess = 1 shl 1;
 
13305
 
 
13306
{
 
13307
 *  PushSymbolicHotKeyMode()
 
13308
 *  
 
13309
 *  Summary:
 
13310
 *    Sets a new mode for enabling or disabling symbolic hotkeys.
 
13311
 *  
 
13312
 *  Discussion:
 
13313
 *    The Event Manager keeps a stack of hotkey modes that have been
 
13314
 *    requested using the PushSymbolicHotKeyMode API. The most recently
 
13315
 *    pushed mode is the mode that is currently in use. 
 
13316
 *    
 
13317
 *    Because disabling hotkeys can significantly affect the usability
 
13318
 *    of Mac OS X, applications are only allowed to disable hotkeys if
 
13319
 *    the "Enable access for assistive devices" checkbox is checked in
 
13320
 *    the Universal Access preference pane. If this feature is not
 
13321
 *    enabled, PushSymbolicHotKeyMode will still push the mode request
 
13322
 *    onto the mode stack and return a valid token, but the actual
 
13323
 *    hotkey mode will not change. 
 
13324
 *    
 
13325
 *    If an application that pushes a new hotkey mode is frontmost,
 
13326
 *    then the new mode (if it disables any hotkeys) will only be
 
13327
 *    active while the application remains frontmost. If the
 
13328
 *    application is deactivated or exits without reenabling hotkeys,
 
13329
 *    the hotkey mode will automatically revert to the previous mode.
 
13330
 *  
 
13331
 *  Mac OS X threading:
 
13332
 *    Not thread safe
 
13333
 *  
 
13334
 *  Parameters:
 
13335
 *    
 
13336
 *    inOptions:
 
13337
 *      The symbolic hotkey mode that is requested.
 
13338
 *  
 
13339
 *  Result:
 
13340
 *    A token that should be passed to PopSymbolicHotKeyMode to remove
 
13341
 *    this mode request from the stack.
 
13342
 *  
 
13343
 *  Availability:
 
13344
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
13345
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 
13346
 *    Non-Carbon CFM:   not available
 
13347
 }
 
13348
function PushSymbolicHotKeyMode( inOptions: OptionBits ): UnivPtr; external name '_PushSymbolicHotKeyMode';
 
13349
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
13350
 
 
13351
 
 
13352
{
 
13353
 *  PopSymbolicHotKeyMode()
 
13354
 *  
 
13355
 *  Summary:
 
13356
 *    Removes a hotkey mode request from the hotkey mode stack.
 
13357
 *  
 
13358
 *  Discussion:
 
13359
 *    This API removes a mode request from the mode stack. If this
 
13360
 *    request was the topmost request in the stack, the actual hotkey
 
13361
 *    mode will change to the next request in the stack; if there are
 
13362
 *    other mode requests on top of this one on the stack, the actual
 
13363
 *    mode will not change.
 
13364
 *  
 
13365
 *  Mac OS X threading:
 
13366
 *    Not thread safe
 
13367
 *  
 
13368
 *  Parameters:
 
13369
 *    
 
13370
 *    inToken:
 
13371
 *      A hotkey mode token that was returned by PushSymbolicHotKeyMode.
 
13372
 *  
 
13373
 *  Availability:
 
13374
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
13375
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 
13376
 *    Non-Carbon CFM:   not available
 
13377
 }
 
13378
procedure PopSymbolicHotKeyMode( inToken: UnivPtr ); external name '_PopSymbolicHotKeyMode';
 
13379
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
13380
 
 
13381
 
 
13382
{
 
13383
 *  GetSymbolicHotKeyMode()
 
13384
 *  
 
13385
 *  Summary:
 
13386
 *    Returns the current hotkey mode in use.
 
13387
 *  
 
13388
 *  Mac OS X threading:
 
13389
 *    Not thread safe
 
13390
 *  
 
13391
 *  Result:
 
13392
 *    The mode request at the top of the hotkey mode stack. If there
 
13393
 *    are no requests on the stack, it returns zero, indicating that
 
13394
 *    hotkeys are currently enabled. 
 
13395
 *    
 
13396
 *    Note that even if hotkeys are enabled in the current process,
 
13397
 *    hotkeys can still be disabled for the current user session if
 
13398
 *    they are disabled by some other process. 
 
13399
 *    
 
13400
 *    Note that if "Enable access for assistive devices" is not checked
 
13401
 *    in the Universal Access preference pane, then even if this API
 
13402
 *    returns a non-zero value, the actual hotkey mode will still be
 
13403
 *    that all hotkeys are enabled.
 
13404
 *  
 
13405
 *  Availability:
 
13406
 *    Mac OS X:         in version 10.4 and later in Carbon.framework
 
13407
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
 
13408
 *    Non-Carbon CFM:   not available
 
13409
 }
 
13410
function GetSymbolicHotKeyMode: OptionBits; external name '_GetSymbolicHotKeyMode';
 
13411
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
13412
 
 
13413
 
 
13414
{--------------------------------------------------------------------------------------}
 
13415
{  Ink Events                                                                          }
 
13416
{--------------------------------------------------------------------------------------}
 
13417
const
 
13418
        kEventParamInkTextRef = $69777264 (* 'iwrd' *); { typePtr }
 
13419
        kEventParamInkKeyboardShortcut = $696B6264 (* 'ikbd' *); { typeBoolean }
 
13420
        kEventParamInkGestureKind = $676B6E64 (* 'gknd' *); { typeUInt32 }
 
13421
        kEventParamInkGestureBounds = $67626E64 (* 'gbnd' *); { typeHIRect }
 
13422
        kEventParamInkGestureHotspot = $67686F74 (* 'ghot' *); { typeHIPoint }
 
13423
 
 
13424
 
 
13425
{
 
13426
 *  kEventClassInk / kEventInkPoint
 
13427
 *  
 
13428
 *  Summary:
 
13429
 *    A mouse event will be handled as an Ink point and used for
 
13430
 *    recognition.
 
13431
 *  
 
13432
 *  Discussion:
 
13433
 *    The Ink manager has determined that the mouse event in
 
13434
 *    kEventParamEventRef should be used for recognition.  If the
 
13435
 *    application handles the event and returns noErr, then the Ink
 
13436
 *    Manager does nothing further with the mouse event.  If the
 
13437
 *    application returns any other value (including
 
13438
 *    eventNotHandledErr), the point will be processed normally by the
 
13439
 *    Ink Manager.
 
13440
 *  
 
13441
 *  Mac OS X threading:
 
13442
 *    Not thread safe
 
13443
 *  
 
13444
 *  Parameters:
 
13445
 *    
 
13446
 *    --> kEventParamEventRef (in, typeEventRef)
 
13447
 *          The mouse event being handled.
 
13448
 *  
 
13449
 *  Availability:
 
13450
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
13451
 *    CarbonLib:        not available
 
13452
 }
 
13453
const
 
13454
        kEventInkPoint = 10;
 
13455
 
 
13456
 
 
13457
{
 
13458
 *  kEventClassInk / kEventInkGesture
 
13459
 *  
 
13460
 *  Summary:
 
13461
 *    An Ink gesture has been generated.
 
13462
 *  
 
13463
 *  Discussion:
 
13464
 *    This Ink event is sent when the Ink Manager has recognized the
 
13465
 *    current ink phrase as one of the known system gestures. 
 
13466
 *    Applications can install a handler for these events, to provide
 
13467
 *    targeted gestures and support for context-dependent (tentative)
 
13468
 *    gestures.  Applications should return noErr if they handled the
 
13469
 *    gesture.  If the gesture was context-dependent and does not apply
 
13470
 *    to the current situation, then return eventNotHandledErr.
 
13471
 *  
 
13472
 *  Mac OS X threading:
 
13473
 *    Not thread safe
 
13474
 *  
 
13475
 *  Parameters:
 
13476
 *    
 
13477
 *    --> kEventParamInkGestureKind (in, typeUInt32)
 
13478
 *          Kind of gesture.
 
13479
 *    
 
13480
 *    --> kEventParamInkGestureBounds (in, typeHIRect)
 
13481
 *          Bounds of the gesture in global coordinates.
 
13482
 *    
 
13483
 *    --> kEventParamInkGestureHotspot (in, typeHIPoint)
 
13484
 *          Hotspot for the gesture in global coordinates.
 
13485
 *  
 
13486
 *  Availability:
 
13487
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
13488
 *    CarbonLib:        not available
 
13489
 }
 
13490
const
 
13491
        kEventInkGesture = 11;
 
13492
 
 
13493
 
 
13494
{
 
13495
 *  kEventClassInk / kEventInkText
 
13496
 *  
 
13497
 *  Summary:
 
13498
 *    A recognized word from the Ink Manager.
 
13499
 *  
 
13500
 *  Discussion:
 
13501
 *    The Ink Manager has recognized a word.  kEventParamInkTextRef
 
13502
 *    contains the InkTextRef with all of the information about the
 
13503
 *    word.  See Ink.h for more information.
 
13504
 *  
 
13505
 *  Mac OS X threading:
 
13506
 *    Not thread safe
 
13507
 *  
 
13508
 *  Parameters:
 
13509
 *    
 
13510
 *    --> kEventParamInkTextRef (in, typePtr)
 
13511
 *          The InkTextRef containing the data for the recognized word.
 
13512
 *    
 
13513
 *    --> kEventParamInkKeyboardShortcut (in, typeBoolean)
 
13514
 *          Is this likely a keyboard shortcut? (Command or Control key
 
13515
 *          is held down and the top-choice alternate text is a single
 
13516
 *          character.)
 
13517
 *  
 
13518
 *  Availability:
 
13519
 *    Mac OS X:         in version 10.3 and later in Carbon.framework
 
13520
 *    CarbonLib:        not available
 
13521
 }
 
13522
const
 
13523
        kEventInkText = 12;
 
13524
 
 
13525
 
 
13526
{--------------------------------------------------------------------------------------}
 
13527
{  � DEPRECATED                                                                        }
 
13528
{  All functions below this point are either deprecated (they continue to function     }
 
13529
{  but are not the most modern nor most efficient solution to a problem), or they are  }
 
13530
{  completely unavailable on Mac OS X.                                                 }
 
13531
{--------------------------------------------------------------------------------------}
 
13532
 
 
13533
{--------------------------------------------------------------------------------------}
 
13534
{  � MouseTrackingRegions                                                              }
 
13535
{--------------------------------------------------------------------------------------}
 
13536
 
 
13537
{
 
13538
 *  MouseTrackingRef
 
13539
 *  
 
13540
 *  Discussion:
 
13541
 *    MouseTrackingRef   *** DEPRECATED ***
 
13542
 *    
 
13543
 *    Deprecated:
 
13544
 *    Applications should use HIViewTrackingAreas, described in
 
13545
 *    HIView.h, instead of MouseTrackingRegions and their associated
 
13546
 *    settings.
 
13547
 *    
 
13548
 *    A MouseTrackingRef is an object that controls the generation of
 
13549
 *    mouse-enter and mouse-exit events. When the user moves the mouse
 
13550
 *    into a tracking region, a kEventClassMouse/kEventMouseEntered
 
13551
 *    event is sent to the app. When the user moves the mouse out of a
 
13552
 *    tracking region, an event of type
 
13553
 *    kEventClassMouse/kEventMouseExited is sent.
 
13554
 *    
 
13555
 *    Mouse tracking regions are uniquely identified within the scope
 
13556
 *    of a window by a MouseTrackingRegionID which is a client
 
13557
 *    signature/id pair. The client signature should be any unique
 
13558
 *    four-character constant that does not have entirely lowercase
 
13559
 *    characters; a good choice is the usual DTS-registered creator
 
13560
 *    OSType, but you can use any constant that you like.
 
13561
 *    
 
13562
 *    Mouse tracking regions can overlap, but are not exclusive. Mouse
 
13563
 *    motion events are generated for each of the tracking areas
 
13564
 *    intersected by the mouse.
 
13565
 *    
 
13566
 *    Mouse tracking regions are initially enabled. You can explicitly
 
13567
 *    disable a mouse tracking area to prevent mouse-enter/exit events
 
13568
 *    from being generated.
 
13569
 *    
 
13570
 *    Unlike global mouse-moved events, mouse-enter and mouse-exit
 
13571
 *    events are generated while your app is in the background. If this
 
13572
 *    is not considered desirable, disable the tracking areas while the
 
13573
 *    application is in the background.
 
13574
 *    
 
13575
 *    MouseTrackingRefs become invalid when the window that they are
 
13576
 *    bound to is disposed.
 
13577
 }
 
13578
type
 
13579
        MouseTrackingRef = ^SInt32; { an opaque 32-bit type }
 
13580
 
 
13581
 
 
13582
{
 
13583
 *  MouseTrackingOptions
 
13584
 *  
 
13585
 *  Discussion:
 
13586
 *    MouseTrackingOptions   *** DEPRECATED ***
 
13587
 *    
 
13588
 *    Deprecated:
 
13589
 *    Applications should use HIViewTrackingAreas, described in
 
13590
 *    HIView.h, instead of MouseTrackingRegions and their associated
 
13591
 *    settings.
 
13592
 *    
 
13593
 *    These values define how the user�s region is handled by the Mouse
 
13594
 *    Tracking Region API. They define the behavior throughout the life
 
13595
 *    of the Mouse Tracking Region. For example, if a region is created
 
13596
 *    with the option of kMouseTrackingOptionsGlobalClip then all
 
13597
 *    operations on this region will be interpreted in global
 
13598
 *    coordinates and will be clipped to the owning window�s structure.
 
13599
 }
 
13600
type
 
13601
        MouseTrackingOptions = UInt32;
 
13602
const
 
13603
{
 
13604
   * The region is expected in local coordinates and mouse movement
 
13605
   * tracking is clipped to the owning window�s content region.
 
13606
   }
 
13607
        kMouseTrackingOptionsLocalClip = 0;
 
13608
 
 
13609
  {
 
13610
   * The region is expected in global coordinates and mouse movement
 
13611
   * tracking is clipped to the owning window�s structure region.
 
13612
   }
 
13613
        kMouseTrackingOptionsGlobalClip = 1;
 
13614
 
 
13615
  {
 
13616
   * Standard options. The region will be handled in local coordinates
 
13617
   * and remain clipped against the windows content region.
 
13618
   }
 
13619
        kMouseTrackingOptionsStandard = kMouseTrackingOptionsLocalClip;
 
13620
 
 
13621
type
 
13622
        MouseTrackingRegionID = record
 
13623
                signature: OSType;
 
13624
                id: SInt32;
 
13625
        end;
 
13626
{ Creation}
 
13627
 
 
13628
{
 
13629
 *  CreateMouseTrackingRegion()   *** DEPRECATED ***
 
13630
 *  
 
13631
 *  Deprecated:
 
13632
 *    Use HIView-based tracking areas instead of MouseTrackingRegions.
 
13633
 *    In this case, use HIViewNewTrackingArea(), defined in HIView.h,
 
13634
 *    instead of CreateMouseTrackingRegion().
 
13635
 *  
 
13636
 *  Discussion:
 
13637
 *    Creates a mouse tracking region and installs it into the window
 
13638
 *    system.
 
13639
 *  
 
13640
 *  Mac OS X threading:
 
13641
 *    Not thread safe
 
13642
 *  
 
13643
 *  Parameters:
 
13644
 *    
 
13645
 *    inWindow:
 
13646
 *      The window that will contain the created region.
 
13647
 *    
 
13648
 *    inRegion:
 
13649
 *      The region for which you will receive entered/exit events.
 
13650
 *    
 
13651
 *    inClip:
 
13652
 *      A region to clip inRegion against (can be NULL).
 
13653
 *    
 
13654
 *    inOptions:
 
13655
 *      The options which define whether inRegion is given in global or
 
13656
 *      local coordinates. If local coordinates are used, inRegion will
 
13657
 *      be clipped against the window's current content region; if
 
13658
 *      global coordinates are used, inRegion will be clipped against
 
13659
 *      the window's current structure region. All clipping occurs
 
13660
 *      against the regions as they are at the moment when the tracking
 
13661
 *      region is created; changes to the window content or structure
 
13662
 *      regions after the tracking region is created will not affect
 
13663
 *      the tracking region.
 
13664
 *    
 
13665
 *    inID:
 
13666
 *      The signature/id pair which uniquely defines this region. Note
 
13667
 *      that if you are creating both LocalClip and GlobalClip tracking
 
13668
 *      regions for a given window, the global regions must use a
 
13669
 *      different inID.signature value from the local regions.
 
13670
 *    
 
13671
 *    inRefCon:
 
13672
 *      Any user defined value. This value can be retrieved later by
 
13673
 *      calling GetMouseTrackingRegionRefCon on the MouseTrackingRef.
 
13674
 *    
 
13675
 *    inTargetToNotify:
 
13676
 *      The event target that should receive kEventMouseEntered/Exited
 
13677
 *      events for this tracking region. If NULL, the window�s event
 
13678
 *      target receives these events.
 
13679
 *    
 
13680
 *    outTrackingRef:
 
13681
 *      A reference to the newly created mouse tracking region. This
 
13682
 *      reference will also be provided in the
 
13683
 *      kEventMouseEntered/Exited events sent to your event target.
 
13684
 *  
 
13685
 *  Result:
 
13686
 *    An operating system status code.
 
13687
 *  
 
13688
 *  Availability:
 
13689
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13690
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13691
 *    Non-Carbon CFM:   not available
 
13692
 }
 
13693
function CreateMouseTrackingRegion( inWindow: WindowRef; inRegion: RgnHandle; inClip: RgnHandle { can be NULL }; inOptions: MouseTrackingOptions; inID: MouseTrackingRegionID; inRefCon: UnivPtr; inTargetToNotify: EventTargetRef { can be NULL }; var outTrackingRef: MouseTrackingRef ): OSStatus; external name '_CreateMouseTrackingRegion';
 
13694
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13695
 
 
13696
 
 
13697
{
 
13698
 *  RetainMouseTrackingRegion()   *** DEPRECATED ***
 
13699
 *  
 
13700
 *  Deprecated:
 
13701
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
13702
 *    of MouseTrackingRegions.
 
13703
 *  
 
13704
 *  Discussion:
 
13705
 *    Retains the MouseTrackingRef.
 
13706
 *  
 
13707
 *  Mac OS X threading:
 
13708
 *    Not thread safe
 
13709
 *  
 
13710
 *  Parameters:
 
13711
 *    
 
13712
 *    inMouseRef:
 
13713
 *      A valid MouseTrackingRef to retain.
 
13714
 *  
 
13715
 *  Result:
 
13716
 *    An operating system status code.
 
13717
 *  
 
13718
 *  Availability:
 
13719
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13720
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13721
 *    Non-Carbon CFM:   not available
 
13722
 }
 
13723
function RetainMouseTrackingRegion( inMouseRef: MouseTrackingRef ): OSStatus; external name '_RetainMouseTrackingRegion';
 
13724
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13725
 
 
13726
 
 
13727
{
 
13728
 *  ReleaseMouseTrackingRegion()   *** DEPRECATED ***
 
13729
 *  
 
13730
 *  Deprecated:
 
13731
 *    Use HIView-based tracking areas instead of MouseTrackingRegions.
 
13732
 *    In this case, use HIViewDisposeTrackingArea(), defined in
 
13733
 *    HIView.h, instead of ReleaseMouseTrackingRegion().
 
13734
 *  
 
13735
 *  Discussion:
 
13736
 *    Releases the MouseTrackingRef. Since mouse tracking regions are
 
13737
 *    bound to a window, they are automatically released when the
 
13738
 *    window is disposed of.
 
13739
 *  
 
13740
 *  Mac OS X threading:
 
13741
 *    Not thread safe
 
13742
 *  
 
13743
 *  Parameters:
 
13744
 *    
 
13745
 *    inMouseRef:
 
13746
 *      A valid MouseTrackingRef to release.
 
13747
 *  
 
13748
 *  Result:
 
13749
 *    An operating system status code.
 
13750
 *  
 
13751
 *  Availability:
 
13752
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13753
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13754
 *    Non-Carbon CFM:   not available
 
13755
 }
 
13756
function ReleaseMouseTrackingRegion( inMouseRef: MouseTrackingRef ): OSStatus; external name '_ReleaseMouseTrackingRegion';
 
13757
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13758
 
 
13759
 
 
13760
{
 
13761
 *  ChangeMouseTrackingRegion()   *** DEPRECATED ***
 
13762
 *  
 
13763
 *  Deprecated:
 
13764
 *    Use HIView-based tracking areas instead of MouseTrackingRegions.
 
13765
 *    In this case, use HIViewChangeTrackingArea(), defined in
 
13766
 *    HIView.h, instead of ChangeMouseTrackingRegion().
 
13767
 *  
 
13768
 *  Discussion:
 
13769
 *    Changes the MouseTrackingRefs region and optionally, its clip.
 
13770
 *    This will not change the enabled state or options of the region.
 
13771
 *  
 
13772
 *  Mac OS X threading:
 
13773
 *    Not thread safe
 
13774
 *  
 
13775
 *  Parameters:
 
13776
 *    
 
13777
 *    inMouseRef:
 
13778
 *      A valid MouseTrackingRef to modify.
 
13779
 *    
 
13780
 *    inRegion:
 
13781
 *      The region to set as the mouse tracking region.
 
13782
 *    
 
13783
 *    inClip:
 
13784
 *      An optional clip to clip inRegion against (may be NULL).
 
13785
 *  
 
13786
 *  Result:
 
13787
 *    An operating system status code.
 
13788
 *  
 
13789
 *  Availability:
 
13790
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13791
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13792
 *    Non-Carbon CFM:   not available
 
13793
 }
 
13794
function ChangeMouseTrackingRegion( inMouseRef: MouseTrackingRef; inRegion: RgnHandle; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_ChangeMouseTrackingRegion';
 
13795
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13796
 
 
13797
 
 
13798
{
 
13799
 *  ClipMouseTrackingRegion()   *** DEPRECATED ***
 
13800
 *  
 
13801
 *  Deprecated:
 
13802
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
13803
 *    of MouseTrackingRegions.
 
13804
 *  
 
13805
 *  Discussion:
 
13806
 *    Adjust the region to clip the MouseTrackingRef against. This can
 
13807
 *    be used in the case where a window is resized or when a
 
13808
 *    previously obscured region becomes exposed.
 
13809
 *  
 
13810
 *  Mac OS X threading:
 
13811
 *    Not thread safe
 
13812
 *  
 
13813
 *  Parameters:
 
13814
 *    
 
13815
 *    inMouseRef:
 
13816
 *      A valid MouseTrackingRef to adjust.
 
13817
 *    
 
13818
 *    inRegion:
 
13819
 *      A new region to clip inMouseRef against (can be NULL). If NULL,
 
13820
 *      standard clipping will be provided.
 
13821
 *  
 
13822
 *  Result:
 
13823
 *    An operating system status code.
 
13824
 *  
 
13825
 *  Availability:
 
13826
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13827
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13828
 *    Non-Carbon CFM:   not available
 
13829
 }
 
13830
function ClipMouseTrackingRegion( inMouseRef: MouseTrackingRef; inRegion: RgnHandle ): OSStatus; external name '_ClipMouseTrackingRegion';
 
13831
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13832
 
 
13833
 
 
13834
{ Accessors}
 
13835
 
 
13836
{
 
13837
 *  GetMouseTrackingRegionID()   *** DEPRECATED ***
 
13838
 *  
 
13839
 *  Deprecated:
 
13840
 *    Use HIView-based tracking areas instead of MouseTrackingRegions.
 
13841
 *    In this case, use HIViewGetTrackingAreaID(), defined in HIView.h,
 
13842
 *    instead of GetMouseTrackingRegionID().
 
13843
 *  
 
13844
 *  Discussion:
 
13845
 *    Retrieves the MouseTrackingRegionID of the given
 
13846
 *    MouseTrackingRef. Can be used to determine if the region belongs
 
13847
 *    to your app, and if so, which region it is.
 
13848
 *  
 
13849
 *  Mac OS X threading:
 
13850
 *    Not thread safe
 
13851
 *  
 
13852
 *  Parameters:
 
13853
 *    
 
13854
 *    inMouseRef:
 
13855
 *      A valid MouseTrackingRef from which to obtain the
 
13856
 *      MouseTrackingRegionID.
 
13857
 *    
 
13858
 *    outID:
 
13859
 *      Receives the MouseTrackingRegionID.
 
13860
 *  
 
13861
 *  Result:
 
13862
 *    An operating system status code.
 
13863
 *  
 
13864
 *  Availability:
 
13865
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13866
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13867
 *    Non-Carbon CFM:   not available
 
13868
 }
 
13869
function GetMouseTrackingRegionID( inMouseRef: MouseTrackingRef; var outID: MouseTrackingRegionID ): OSStatus; external name '_GetMouseTrackingRegionID';
 
13870
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13871
 
 
13872
 
 
13873
{
 
13874
 *  GetMouseTrackingRegionRefCon()   *** DEPRECATED ***
 
13875
 *  
 
13876
 *  Deprecated:
 
13877
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
13878
 *    of MouseTrackingRegions.
 
13879
 *  
 
13880
 *  Discussion:
 
13881
 *    Retrieves the RefCon from the given mouse tracking region.
 
13882
 *  
 
13883
 *  Mac OS X threading:
 
13884
 *    Not thread safe
 
13885
 *  
 
13886
 *  Parameters:
 
13887
 *    
 
13888
 *    inMouseRef:
 
13889
 *      A valid MouseTrackingRef from which to obtain the refcon.
 
13890
 *    
 
13891
 *    outRefCon:
 
13892
 *      Receives the refcon that was provided to
 
13893
 *      CreateMouseTrackingRegion.
 
13894
 *  
 
13895
 *  Result:
 
13896
 *    An operating system status code.
 
13897
 *  
 
13898
 *  Availability:
 
13899
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13900
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13901
 *    Non-Carbon CFM:   not available
 
13902
 }
 
13903
function GetMouseTrackingRegionRefCon( inMouseRef: MouseTrackingRef; var outRefCon: UnivPtr ): OSStatus; external name '_GetMouseTrackingRegionRefCon';
 
13904
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13905
 
 
13906
 
 
13907
{ Geometry}
 
13908
 
 
13909
{
 
13910
 *  MoveMouseTrackingRegion()   *** DEPRECATED ***
 
13911
 *  
 
13912
 *  Deprecated:
 
13913
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
13914
 *    of MouseTrackingRegions.
 
13915
 *  
 
13916
 *  Discussion:
 
13917
 *    Moves the given mouse tracking region by the specified delta. It
 
13918
 *    can also optionally reclip the region, such as if the region is
 
13919
 *    scrolled within a pane.
 
13920
 *  
 
13921
 *  Mac OS X threading:
 
13922
 *    Not thread safe
 
13923
 *  
 
13924
 *  Parameters:
 
13925
 *    
 
13926
 *    inMouseRef:
 
13927
 *      A valid MouseTrackingRef to move.
 
13928
 *    
 
13929
 *    deltaH:
 
13930
 *      The horizontal delta to move the MouseTrackingRef.
 
13931
 *    
 
13932
 *    deltaV:
 
13933
 *      The vertical delta to move the MouseTrackingRef.
 
13934
 *    
 
13935
 *    inClip:
 
13936
 *      A region to optionally clip against (can be NULL).
 
13937
 *  
 
13938
 *  Result:
 
13939
 *    An operating system status code.
 
13940
 *  
 
13941
 *  Availability:
 
13942
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13943
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13944
 *    Non-Carbon CFM:   not available
 
13945
 }
 
13946
function MoveMouseTrackingRegion( inMouseRef: MouseTrackingRef; deltaH: SInt16; deltaV: SInt16; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_MoveMouseTrackingRegion';
 
13947
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13948
 
 
13949
 
 
13950
{ Enable/disable}
 
13951
 
 
13952
{
 
13953
 *  SetMouseTrackingRegionEnabled()   *** DEPRECATED ***
 
13954
 *  
 
13955
 *  Deprecated:
 
13956
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
13957
 *    of MouseTrackingRegions.
 
13958
 *  
 
13959
 *  Discussion:
 
13960
 *    Set the enabled state of the mouse tracking region
 
13961
 *  
 
13962
 *  Mac OS X threading:
 
13963
 *    Not thread safe
 
13964
 *  
 
13965
 *  Parameters:
 
13966
 *    
 
13967
 *    inMouseRef:
 
13968
 *      A valid MouseTrackingRef to modify.
 
13969
 *    
 
13970
 *    inEnabled:
 
13971
 *      Indicate whether this region should be enabled (true) or
 
13972
 *      disabled (false).
 
13973
 *  
 
13974
 *  Result:
 
13975
 *    An operating system status code.
 
13976
 *  
 
13977
 *  Availability:
 
13978
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
13979
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
13980
 *    Non-Carbon CFM:   not available
 
13981
 }
 
13982
function SetMouseTrackingRegionEnabled( inMouseRef: MouseTrackingRef; inEnabled: Boolean ): OSStatus; external name '_SetMouseTrackingRegionEnabled';
 
13983
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
13984
 
 
13985
 
 
13986
{
 
13987
   
 
13988
   Namespace operators
 
13989
}
 
13990
 
 
13991
{
 
13992
 *  ClipWindowMouseTrackingRegions()   *** DEPRECATED ***
 
13993
 *  
 
13994
 *  Deprecated:
 
13995
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
13996
 *    of MouseTrackingRegions.
 
13997
 *  
 
13998
 *  Discussion:
 
13999
 *    Bulk clip operation to modify the region that all mouse tracking
 
14000
 *    regions with the given signature will be clipped against.
 
14001
 *  
 
14002
 *  Mac OS X threading:
 
14003
 *    Not thread safe
 
14004
 *  
 
14005
 *  Parameters:
 
14006
 *    
 
14007
 *    inWindow:
 
14008
 *      The window that contains the regions with the given signature
 
14009
 *      that you are interested in updating.
 
14010
 *    
 
14011
 *    inSignature:
 
14012
 *      The signature of the mouse tracking regions that will be
 
14013
 *      reclipped.
 
14014
 *    
 
14015
 *    inClip:
 
14016
 *      The region to clip all of the regions against (can be NULL). If
 
14017
 *      NULL, standard clipping will be provided.
 
14018
 *  
 
14019
 *  Result:
 
14020
 *    An operating system status code.
 
14021
 *  
 
14022
 *  Availability:
 
14023
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
14024
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
14025
 *    Non-Carbon CFM:   not available
 
14026
 }
 
14027
function ClipWindowMouseTrackingRegions( inWindow: WindowRef; inSignature: OSType; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_ClipWindowMouseTrackingRegions';
 
14028
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
14029
 
 
14030
 
 
14031
{
 
14032
 *  MoveWindowMouseTrackingRegions()   *** DEPRECATED ***
 
14033
 *  
 
14034
 *  Deprecated:
 
14035
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
14036
 *    of MouseTrackingRegions.
 
14037
 *  
 
14038
 *  Discussion:
 
14039
 *    Bulk move operation to move all regions with the given signature
 
14040
 *    the specified delta. An optional clip can be provided to reclip
 
14041
 *    the regions against, such as in the case of the regions are being
 
14042
 *    scrolled within a pane.
 
14043
 *  
 
14044
 *  Mac OS X threading:
 
14045
 *    Not thread safe
 
14046
 *  
 
14047
 *  Parameters:
 
14048
 *    
 
14049
 *    inWindow:
 
14050
 *      The window that contains the regions with the given signature
 
14051
 *      that you are interested in moving.
 
14052
 *    
 
14053
 *    inSignature:
 
14054
 *      The signature of the mouse tracking regions that will be moved.
 
14055
 *    
 
14056
 *    deltaH:
 
14057
 *      The horizontal delta to move all of the regions.
 
14058
 *    
 
14059
 *    deltaV:
 
14060
 *      The vertical delta to move all of the regions.
 
14061
 *    
 
14062
 *    inClip:
 
14063
 *      An optional clipping region to clip against (can be NULL). If
 
14064
 *      NULL, standard clipping will be provided.
 
14065
 *  
 
14066
 *  Result:
 
14067
 *    An operating system status code.
 
14068
 *  
 
14069
 *  Availability:
 
14070
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
14071
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
14072
 *    Non-Carbon CFM:   not available
 
14073
 }
 
14074
function MoveWindowMouseTrackingRegions( inWindow: WindowRef; inSignature: OSType; deltaH: SInt16; deltaV: SInt16; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_MoveWindowMouseTrackingRegions';
 
14075
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
14076
 
 
14077
 
 
14078
{
 
14079
 *  SetWindowMouseTrackingRegionsEnabled()   *** DEPRECATED ***
 
14080
 *  
 
14081
 *  Deprecated:
 
14082
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
14083
 *    of MouseTrackingRegions.
 
14084
 *  
 
14085
 *  Discussion:
 
14086
 *    Bulk set the enabled state of the mouse tracking regions of the
 
14087
 *    given signature belonging to the given window.
 
14088
 *  
 
14089
 *  Mac OS X threading:
 
14090
 *    Not thread safe
 
14091
 *  
 
14092
 *  Parameters:
 
14093
 *    
 
14094
 *    inWindow:
 
14095
 *      The window which contains the mouse tracking regions that you
 
14096
 *      are interested in modifying.
 
14097
 *    
 
14098
 *    inSignature:
 
14099
 *      The signature of the mouse tracking regions whose enabled state
 
14100
 *      you wish to modify.
 
14101
 *    
 
14102
 *    inEnabled:
 
14103
 *      Indicates whether the regions should be enabled (true) or
 
14104
 *      disabled (false).
 
14105
 *  
 
14106
 *  Result:
 
14107
 *    An operating system status code.
 
14108
 *  
 
14109
 *  Availability:
 
14110
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
14111
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
14112
 *    Non-Carbon CFM:   not available
 
14113
 }
 
14114
function SetWindowMouseTrackingRegionsEnabled( inWindow: WindowRef; inSignature: OSType; inEnabled: Boolean ): OSStatus; external name '_SetWindowMouseTrackingRegionsEnabled';
 
14115
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
14116
 
 
14117
 
 
14118
{
 
14119
 *  ReleaseWindowMouseTrackingRegions()   *** DEPRECATED ***
 
14120
 *  
 
14121
 *  Deprecated:
 
14122
 *    Use HIView-based tracking areas, described in HIView.h, instead
 
14123
 *    of MouseTrackingRegions.
 
14124
 *  
 
14125
 *  Discussion:
 
14126
 *    Bulk release the mouse tracking regions with the given signature.
 
14127
 *  
 
14128
 *  Mac OS X threading:
 
14129
 *    Not thread safe
 
14130
 *  
 
14131
 *  Parameters:
 
14132
 *    
 
14133
 *    inWindow:
 
14134
 *      The window to which the regions to be released belong.
 
14135
 *    
 
14136
 *    inSignature:
 
14137
 *      The signature of the regions to be released.
 
14138
 *  
 
14139
 *  Result:
 
14140
 *    An operating system status code.
 
14141
 *  
 
14142
 *  Availability:
 
14143
 *    Mac OS X:         in version 10.2 and later in Carbon.framework but deprecated in 10.4
 
14144
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
 
14145
 *    Non-Carbon CFM:   not available
 
14146
 }
 
14147
function ReleaseWindowMouseTrackingRegions( inWindow: WindowRef; inSignature: OSType ): OSStatus; external name '_ReleaseWindowMouseTrackingRegions';
 
14148
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
14149
 
 
14150
 
 
14151
{======================================================================================}
 
14152
{  EVENT-BASED OBJECT CLASSES                                                          }
 
14153
{  *** DEPRECATED ***                                                                  }
 
14154
{  Here it is - the replacement for classic defprocs. This is also a convenient way    }
 
14155
{  to create toolbox objects (windows, etc.) that have a specific behavior without     }
 
14156
{  installing handlers on each instance of the object. With a toolbox object class,    }
 
14157
{  you register your class, then use special creation routines to create objects of    }
 
14158
{  that class. The event handlers are automatically installed and ready to go.         }
 
14159
{  Note that on Mac OS X 10.2 and later, we recommend using the HIObject API           }
 
14160
{  HIObjectRegisterSubclass rather than RegisterToolboxObjectClass. This API is        }
 
14161
{  considered deprecated on Mac OS X 10.2 and later.                                   }
 
14162
{======================================================================================}
 
14163
type
 
14164
        ToolboxObjectClassRef = ^SInt32; { an opaque 32-bit type }
 
14165
{
 
14166
 *  RegisterToolboxObjectClass()
 
14167
 *  
 
14168
 *  Mac OS X threading:
 
14169
 *    Not thread safe
 
14170
 *  
 
14171
 *  Availability:
 
14172
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
14173
 *    CarbonLib:        in CarbonLib 1.1 and later
 
14174
 *    Non-Carbon CFM:   not available
 
14175
 }
 
14176
function RegisterToolboxObjectClass( inClassID: CFStringRef; inBaseClass: ToolboxObjectClassRef { can be NULL }; inNumEvents: UInt32; {const} inEventList: {variable-size-array} EventTypeSpecPtr; inEventHandler: EventHandlerUPP; inEventHandlerData: UnivPtr; var outClassRef: ToolboxObjectClassRef ): OSStatus; external name '_RegisterToolboxObjectClass';
 
14177
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
14178
 
 
14179
 
 
14180
{
 
14181
 *  UnregisterToolboxObjectClass()
 
14182
 *  
 
14183
 *  Mac OS X threading:
 
14184
 *    Not thread safe
 
14185
 *  
 
14186
 *  Availability:
 
14187
 *    Mac OS X:         in version 10.0 and later in Carbon.framework
 
14188
 *    CarbonLib:        in CarbonLib 1.1 and later
 
14189
 *    Non-Carbon CFM:   not available
 
14190
 }
 
14191
function UnregisterToolboxObjectClass( inClassRef: ToolboxObjectClassRef ): OSStatus; external name '_UnregisterToolboxObjectClass';
 
14192
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
14193
 
 
14194
 
 
14195
{--------------------------------------------------------------------------------------}
 
14196
{ Obsolete constant names - use the new ones.                                          }
 
14197
{--------------------------------------------------------------------------------------}
 
14198
const
 
14199
        kEventParamTabletPointerRec = $74627263 (* 'tbrc' *); { typeTabletPointerRec      -- deprecated, for compatibility only}
 
14200
        typeTabletPointerRec = $74627263 (* 'tbrc' *); { kEventParamTabletPointerRec    -- deprecated, for compatibility only}
 
14201
 
 
14202
const
 
14203
        kEventWindowDefDrawFrame = kEventWindowDrawFrame;
 
14204
        kEventWindowDefDrawPart = kEventWindowDrawPart;
 
14205
        kEventWindowDefGetRegion = kEventWindowGetRegion;
 
14206
        kEventWindowDefHitTest = kEventWindowHitTest;
 
14207
        kEventWindowDefInit = kEventWindowInit;
 
14208
        kEventWindowDefDispose = kEventWindowDispose;
 
14209
        kEventWindowDefDragHilite = kEventWindowDragHilite;
 
14210
        kEventWindowDefModified = kEventWindowModified;
 
14211
        kEventWindowDefSetupProxyDragImage = kEventWindowSetupProxyDragImage;
 
14212
        kEventWindowDefStateChanged = kEventWindowStateChanged;
 
14213
        kEventWindowDefMeasureTitle = kEventWindowMeasureTitle;
 
14214
        kEventWindowDefDrawGrowBox = kEventWindowDrawGrowBox;
 
14215
        kEventWindowDefGetGrowImageRegion = kEventWindowGetGrowImageRegion;
 
14216
 
 
14217
 
 
14218
const
 
14219
        kEventClassEPPC = kEventClassAppleEvent;
 
14220
        kEventHighLevelEvent = kEventAppleEvent;
 
14221
 
 
14222
const
 
14223
        kEventUpdateActiveInputArea = kEventTextInputUpdateActiveInputArea;
 
14224
        kEventUnicodeForKeyEvent = kEventTextInputUnicodeForKeyEvent;
 
14225
        kEventOffsetToPos = kEventTextInputOffsetToPos;
 
14226
        kEventPosToOffset = kEventTextInputPosToOffset;
 
14227
        kEventShowHideBottomWindow = kEventTextInputShowHideBottomWindow;
 
14228
        kEventGetSelectedText = kEventTextInputGetSelectedText;
 
14229
 
 
14230
const
 
14231
        kEventProcessCommand = kEventCommandProcess;
 
14232
        kEventTabletPointer = kEventTabletPoint;
 
14233
 
 
14234
{--------------------------------------------------------------------------------------}
 
14235
{ Obsolete typedefs.                                                                   }
 
14236
{--------------------------------------------------------------------------------------}
 
14237
 
 
14238
type
 
14239
        EventClassID = UInt32;
 
14240
type
 
14241
        EventClass = UInt32;
 
14242
type
 
14243
        EventType = UInt32;
 
14244
{ OBSOLETE CONSTANTS}
 
14245
const
 
14246
        kMouseTrackingMousePressed = kMouseTrackingMouseDown;
 
14247
        kMouseTrackingMouseReleased = kMouseTrackingMouseUp;
 
14248
 
 
14249
const
 
14250
        kEventControlGetSubviewForMouseEvent = kEventControlInterceptSubviewClick;
 
14251
 
 
14252
 
 
14253
 
 
14254
 
 
14255
end.