2
File: HIToolbox/CarbonEvents.h
4
Contains: Carbon Event Manager
6
Version: HIToolbox-219.4.81~2
8
Copyright: � 1999-2005 by Apple Computer, Inc., all rights reserved.
10
Bugs?: For bug reports, consult the following page on
13
http://www.freepascal.org/bugs.html
16
{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
18
Modified for use with Free Pascal
20
Please report any bugs to <gpc@microbizz.nl>
31
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
32
{$setc GAP_INTERFACES_VERSION := $0200}
34
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
35
{$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
38
{$ifc defined CPUPOWERPC and defined CPUI386}
39
{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
41
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
42
{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
45
{$ifc not defined __ppc__ and defined CPUPOWERPC}
50
{$ifc not defined __i386__ and defined CPUI386}
56
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
57
{$error Conflicting definitions for __ppc__ and __i386__}
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}
67
{$error Neither __ppc__ nor __i386__ is defined.}
69
{$setc TARGET_CPU_PPC_64 := FALSE}
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}
78
{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
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;
110
{--------------------------------------------------------------------------------------}
111
{ Parameter names and types }
112
{--------------------------------------------------------------------------------------}
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.
125
kEventParamPostTarget = $70747267 (* 'ptrg' *); { typeEventTargetRef}
128
* Indicates an event parameter of type EventTargetRef.
130
typeEventTargetRef = $65747267 (* 'etrg' *); { EventTargetRef}
132
{ Generic toolbox parameters and types}
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.
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}
190
{ Mouse event parameters and types}
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}
207
{ Keyboard event parameter and types}
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}
217
{ General TSM event parameters}
220
kEventParamTSMSendRefCon = $74737263 (* 'tsrc' *); { typeLongInteger}
221
kEventParamTSMSendComponentInstance = $74736369 (* 'tsci' *); { typeComponentInstance}
223
{ TextInput event parameters}
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}
262
{ TSMDocumentAccess event parameters and types}
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}
283
{ Command event parameters and types}
286
kEventParamHICommand = $68636D64 (* 'hcmd' *); { typeHICommand}
287
typeHICommand = $68636D64 (* 'hcmd' *); { HICommand}
289
{ Window event parameters and types}
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}
322
{ Control event parameters and types}
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}
367
{ Menu event parameters and types}
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}
407
{ Application event parameters}
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}
418
{ Tablet event parameters and types}
421
kEventParamTabletPointRec = $74627263 (* 'tbrc' *); { typeTabletPointRec}
422
kEventParamTabletProximityRec = $74627078 (* 'tbpx' *); { typeTabletProximityRec}
423
typeTabletPointRec = $74627263 (* 'tbrc' *); { kEventParamTabletPointRec}
424
typeTabletProximityRec = $74627078 (* 'tbpx' *); { kEventParamTabletProximityRec}
426
{ Appearance event parameters}
429
kEventParamNewScrollBarVariant = $6E736276 (* 'nsbv' *); { typeShortInteger}
431
{ Service event parameters}
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}
443
{ Accessibility event parameters}
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}
458
{ Text field event type}
461
typeCFRange = $6366726E (* 'cfrn' *); { CFRange}
463
{--------------------------------------------------------------------------------------}
464
{ � Helpful utilities }
465
{--------------------------------------------------------------------------------------}
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
482
kTrackMouseLocationOptionDontConsumeMouseUp = 1 shl 0;
485
MouseTrackingResult = UInt16;
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;
498
* IsUserCancelEventRef()
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.
505
* Mac OS X threading:
509
* A boolean value indicating whether the event is a user cancel
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
517
function IsUserCancelEventRef( event: EventRef ): Boolean; external name '_IsUserCancelEventRef';
518
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
522
* TrackMouseLocation()
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.
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.
548
* Mac OS X threading:
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.
562
* On exit, this parameter receives the mouse location from the
563
* last mouse event that caused this function to exit.
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.
571
* An operating system result code.
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
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 *)
583
* TrackMouseLocationWithOptions()
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.
592
* Mac OS X threading:
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.
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
614
* The amount of time to wait for an event. If no events arrive
615
* within this time, kMouseTrackingTimedOut is returned in
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.
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.
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.
635
* An operating system result code.
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
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 *)
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
659
* Mac OS X threading:
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
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.
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
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.
693
* An operating system result code.
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
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 *)
706
* Mouse tracking info selectors for HIMouseTrackingGetParameters.
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
717
kMouseParamsSticky = $73746963 (* 'stic' *);
720
* HIMouseTrackingGetParameters()
723
* Returns information about how mouse tracking loops should behave.
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.
731
* Mac OS X threading:
737
* Indicates which type of information should be returned.
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.
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.
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
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 *)
761
* ConvertEventRefToEventRecord()
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.
770
* Currently, the following events can be converted:
772
* kEventClassMouse: kEventMouseDown, kEventMouseUp,
773
* kEventMouseMoved, kEventMouseDragged.
775
* kEventClassKeyboard: kEventRawKeyDown, kEventRawKeyUp,
776
* kEventRawKeyRepeat.
778
* kEventClassControl: kEventControlTrack (in Mac OS X 10.4 and
779
* later; converts to a mouseDown event).
781
* kEventClassWindow: kEventWindowUpdate, kEventWindowActivate,
782
* kEventWindowDeactivate, kEventWindowCursorChange.
784
* kEventClassApplication: kEventAppActivated, kEventAppDeactivated.
785
* <BR><BR> kEventClassAppleEvent: kEventAppleEvent.
787
* Mac OS X threading:
793
* The EventRef to convert into an EventRecord.
796
* The EventRecord to fill out.
799
* A boolean indicating if the conversion was successful (true) or
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
807
function ConvertEventRefToEventRecord( inEvent: EventRef; var outEvent: EventRecord ): Boolean; external name '_ConvertEventRefToEventRecord';
808
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
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.
821
* Mac OS X threading:
827
* The EventRef to convert into an EventRecord.
830
* The mask to consider.
833
* A boolean indicating if the event was considered to be in the
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
841
function IsEventInMask( inEvent: EventRef; inMask: EventMask ): Boolean; external name '_IsEventInMask';
842
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
846
* GetLastUserEventTime()
848
* Mac OS X threading:
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
856
function GetLastUserEventTime: EventTime; external name '_GetLastUserEventTime';
857
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
860
{--------------------------------------------------------------------------------------}
861
{ � Mouse Coalescing }
862
{--------------------------------------------------------------------------------------}
864
* IsMouseCoalescingEnabled()
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.
873
* Mac OS X threading:
877
* A boolean indicating if coalescing is enabled.
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
884
function IsMouseCoalescingEnabled: Boolean; external name '_IsMouseCoalescingEnabled';
885
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
889
* SetMouseCoalescingEnabled()
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.
897
* Mac OS X threading:
903
* A boolean indicating if coalescing should be enabled (true) or
907
* A boolean which receives the prior state of mouse coalescing
908
* for restoration later. You can pass NULL for this parameter if
912
* An operating system result code.
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
919
function SetMouseCoalescingEnabled( inNewState: Boolean; outOldState: BooleanPtr { can be NULL } ): OSStatus; external name '_SetMouseCoalescingEnabled';
920
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
923
{======================================================================================}
925
{======================================================================================}
933
* Events related to the mouse (mouse down/up/moved).
935
kEventClassMouse = $6D6F7573 (* 'mous' *);
938
* Events related to the keyboard.
940
kEventClassKeyboard = $6B657962 (* 'keyb' *);
943
* Events related to text input (by keyboard, or by input method).
945
kEventClassTextInput = $74657874 (* 'text' *);
948
* Application-level events (launch, quit, etc.).
950
kEventClassApplication = $6170706C (* 'appl' *);
955
kEventClassAppleEvent = $65707063 (* 'eppc' *);
958
* Events related to menus.
960
kEventClassMenu = $6D656E75 (* 'menu' *);
963
* Events related to windows.
965
kEventClassWindow = $77696E64 (* 'wind' *);
968
* Events related to controls.
970
kEventClassControl = $636E746C (* 'cntl' *);
973
* Events related to commands generated by menu items or controls.
974
* These events contain HICommand structures.
976
kEventClassCommand = $636D6473 (* 'cmds' *);
979
* Events related to tablets.
981
kEventClassTablet = $74626C74 (* 'tblt' *);
984
* Events related to File Manager volumes.
986
kEventClassVolume = $766F6C20 (* 'vol ' *);
989
* Events related to the Appearance Manager.
991
kEventClassAppearance = $6170706D (* 'appm' *);
994
* Events related to the Services Manager.
996
kEventClassService = $73657276 (* 'serv' *);
999
* Events related to toolbars.
1001
kEventClassToolbar = $74626172 (* 'tbar' *);
1004
* Events related to toolbar items.
1006
kEventClassToolbarItem = $74626974 (* 'tbit' *);
1009
* Events related to toolbar item views.
1011
kEventClassToolbarItemView = $74626976 (* 'tbiv' *);
1014
* Events related to application accessibility.
1016
kEventClassAccessibility = $61636365 (* 'acce' *);
1019
* Events related to the system.
1021
kEventClassSystem = $6D616373 (* 'macs' *);
1024
* Events related to Ink.
1026
kEventClassInk = $696E6B20 (* 'ink ' *);
1027
kEventClassTSMDocumentAccess = $74646163 (* 'tdac' *);
1029
{--------------------------------------------------------------------------------------}
1031
{--------------------------------------------------------------------------------------}
1033
kEventClassMouse quick reference:
1035
kEventMouseDown = 1,
1037
kEventMouseMoved = 5,
1038
kEventMouseDragged = 6,
1039
kEventMouseEntered = 8,
1040
kEventMouseExited = 9,
1041
kEventMouseWheelMoved = 10
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
1059
EventMouseButton = UInt16;
1062
* Only button for a one-button mouse (usually left button for
1063
* multi-button mouse)
1065
kEventMouseButtonPrimary = 1;
1068
* Usually right button for a multi-button mouse
1070
kEventMouseButtonSecondary = 2;
1073
* Usually middle button for a three-button mouse
1075
kEventMouseButtonTertiary = 3;
1079
* EventMouseWheelAxis
1083
EventMouseWheelAxis = UInt16;
1086
* The X axis (left or right)
1088
kEventMouseWheelAxisX = 0;
1091
* The Y axis (up or down)
1093
kEventMouseWheelAxisY = 1;
1096
* kEventClassMouse / kEventMouseDown
1099
* A mouse button was pressed.
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.
1109
* Mac OS X threading:
1114
* --> kEventParamMouseLocation (in, typeHIPoint)
1115
* The mouse location, in global coordinates.
1117
* --> kEventParamWindowRef (in, typeWindowRef)
1118
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
1134
* --> kEventParamKeyModifiers (in, typeUInt32)
1135
* The keyboard modifiers that were pressed when the event was
1138
* --> kEventParamMouseButton (in, typeMouseButton)
1139
* Which mouse button was pressed.
1141
* --> kEventParamClickCount (in, typeUInt32)
1142
* Whether this is a single click, double click, etc.
1144
* --> kEventParamMouseChord (in, typeUInt32)
1145
* Which other mouse buttons were pressed when the event was
1146
* generated. Available on Mac OS X only.
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.
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
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.
1169
* Mac OS X: in version 10.0 and later in Carbon.framework
1170
* CarbonLib: in CarbonLib 1.1 and later
1173
kEventMouseDown = 1;
1176
* kEventClassMouse / kEventMouseUp
1179
* A mouse button was released.
1181
* Mac OS X threading:
1186
* --> kEventParamMouseLocation (in, typeHIPoint)
1187
* The mouse location, in global coordinates.
1189
* --> kEventParamWindowRef (in, typeWindowRef)
1190
* The window in which the mouse was original pressed.
1191
* Available in Mac OS X 10.1 and later.
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.
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.
1206
* --> kEventParamKeyModifiers (in, typeUInt32)
1207
* The keyboard modifiers that were pressed when the event was
1210
* --> kEventParamMouseButton (in, typeMouseButton)
1211
* Which mouse button was released.
1213
* --> kEventParamClickCount (in, typeUInt32)
1214
* Whether this is a single click, double click, etc.
1216
* --> kEventParamMouseChord (in, typeUInt32)
1217
* Which other mouse buttons were pressed when the event was
1218
* generated. Available on Mac OS X only.
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.
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
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.
1241
* Mac OS X: in version 10.0 and later in Carbon.framework
1242
* CarbonLib: in CarbonLib 1.1 and later
1248
* kEventClassMouse / kEventMouseMoved
1251
* The mouse was moved.
1253
* Mac OS X threading:
1258
* --> kEventParamMouseLocation (in, typeHIPoint)
1259
* The mouse location, in global coordinates.
1261
* --> kEventParamWindowRef (in, typeWindowRef)
1262
* The window under the mouse. Available in Mac OS X 10.3 and
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.
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.
1278
* --> kEventParamKeyModifiers (in, typeUInt32)
1279
* The keyboard modifiers that were pressed when the event was
1282
* --> kEventParamMouseDelta (in, typeHIPoint)
1283
* The change in mouse position, in absolute units, ignoring
1284
* scaling. Available in Mac OS X only.
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.
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
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.
1307
* Mac OS X: in version 10.0 and later in Carbon.framework
1308
* CarbonLib: in CarbonLib 1.1 and later
1311
kEventMouseMoved = 5;
1314
* kEventClassMouse / kEventMouseDragged
1317
* The mouse was moved, and a button was down.
1319
* Mac OS X threading:
1324
* --> kEventParamMouseLocation (in, typeHIPoint)
1325
* The mouse location, in global coordinates.
1327
* --> kEventParamWindowRef (in, typeWindowRef)
1328
* The window in which the mouse was original pressed.
1329
* Available in Mac OS X 10.1 and later.
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.
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.
1344
* --> kEventParamKeyModifiers (in, typeUInt32)
1345
* The keyboard modifiers that were pressed when the event was
1348
* --> kEventParamMouseDelta (in, typeHIPoint)
1349
* The change in mouse position, in absolute units, ignoring
1350
* scaling. Available in Mac OS X only.
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.
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
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.
1373
* Mac OS X: in version 10.0 and later in Carbon.framework
1374
* CarbonLib: in CarbonLib 1.1 and later
1377
kEventMouseDragged = 6;
1380
* kEventClassMouse / kEventMouseEntered
1383
* The mouse entered a tracking area.
1385
* Mac OS X threading:
1390
* --> kEventParamMouseTrackingRef (in, typeMouseTrackingRef)
1391
* The MouseTrackingRef whose region the mouse has just
1394
* --> kEventParamMouseLocation (in, typeHIPoint)
1395
* The mouse location, in global coordinates.
1397
* --> kEventParamWindowRef (in, typeWindowRef)
1398
* The window under the mouse.
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.
1405
* --> kEventParamKeyModifiers (in, typeUInt32)
1406
* The keyboard modifiers that were pressed when the event was
1410
* Mac OS X: in version 10.2 and later in Carbon.framework
1411
* CarbonLib: not available
1414
kEventMouseEntered = 8;
1417
* kEventClassMouse / kEventMouseExited
1420
* The mouse exited a tracking area.
1422
* Mac OS X threading:
1427
* --> kEventParamMouseTrackingRef (in, typeMouseTrackingRef)
1428
* The MouseTrackingRef whose region the mouse has just exited.
1430
* --> kEventParamMouseLocation (in, typeHIPoint)
1431
* The mouse location, in global coordinates.
1433
* --> kEventParamWindowRef (in, typeWindowRef)
1434
* The window under the mouse.
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.
1441
* --> kEventParamKeyModifiers (in, typeUInt32)
1442
* The keyboard modifiers that were pressed when the event was
1446
* Mac OS X: in version 10.2 and later in Carbon.framework
1447
* CarbonLib: not available
1450
kEventMouseExited = 9;
1453
* kEventClassMouse / kEventMouseWheelMoved
1456
* The mouse wheel was moved.
1458
* Mac OS X threading:
1463
* --> kEventParamMouseLocation (in, typeHIPoint)
1464
* The mouse location, in global coordinates.
1466
* --> kEventParamWindowRef (in, typeWindowRef)
1467
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
1483
* --> kEventParamKeyModifiers (in, typeUInt32)
1484
* The keyboard modifiers that were pressed when the event was
1487
* --> kEventParamMouseWheelAxis (in, typeMouseWheelAxis)
1488
* The wheel axis which moved. Contains either
1489
* kEventMouseWheelAxisX or kEventMouseWheelAxisY.
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
1503
* Mac OS X: in version 10.0 and later in Carbon.framework
1504
* CarbonLib: not available
1507
kEventMouseWheelMoved = 10;
1509
{--------------------------------------------------------------------------------------}
1510
{ TSM Document Access Events }
1511
{--------------------------------------------------------------------------------------}
1513
kEventClassTSMDocumentAccess quick reference:
1516
kEventTSMDocumentAccessGetLength = 1,
1517
kEventTSMDocumentAccessGetSelectedRange = 2,
1518
kEventTSMDocumentAccessGetCharactersPtr = 3,
1519
kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer = 4,
1520
kEventTSMDocumentAccessGetCharacters = 5,
1522
** Text Attribute Access **
1523
kEventTSMDocumentAccessGetFont = 6,
1524
kEventTSMDocumentAccessGetGlyphInfo = 7,
1526
** Transaction control **
1527
kEventTSMDocumentAccessLockDocument = 8,
1528
kEventTSMDocumentAccessUnlockDocument = 9
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.
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.
1541
** Document Access Text events **
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.
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:
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
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.
1569
The text engine is entirely free to deny a request for a text pointer for these or any other
1570
implementation specific reason.
1573
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetLength
1576
* Returns the number of 16-bit Unicode characters in the document.
1579
* This event is equivalent to calling CFStringGetLength() on the
1582
* Mac OS X threading:
1587
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
1588
* This parameter is provided by the input method originating
1589
* the event. (Required parameter)
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)
1596
* <-- kEventParamTSMDocAccessCharacterCount (out, typeCFIndex)
1597
* The size of the document in UniChar. Required reply
1601
* Mac OS X: in version 10.3 and later in Carbon.framework
1602
* CarbonLib: not available
1605
kEventTSMDocumentAccessGetLength = 1;
1608
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetSelectedRange
1611
* Returns the selection range in the document.
1613
* Mac OS X threading:
1618
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
1619
* This parameter is provided by the input method originating
1620
* the event. (Required parameter)
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)
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
1634
* Mac OS X: in version 10.3 and later in Carbon.framework
1635
* CarbonLib: not available
1638
kEventTSMDocumentAccessGetSelectedRange = 2;
1641
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharactersPtr
1644
* Returns a Unicode pointer to the entire document content.
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.
1664
* Mac OS X threading:
1669
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
1670
* This parameter is provided by the input method originating
1671
* the event. (Required parameter)
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)
1678
* <-- kEventParamTSMDocAccessReplyCharactersPtr (out, typePtr)
1679
* The UniChar pointer to the document. Required reply
1680
* parameter, if the event is supported.
1683
* Mac OS X: in version 10.3 and later in Carbon.framework
1684
* CarbonLib: not available
1687
kEventTSMDocumentAccessGetCharactersPtr = 3;
1690
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer
1693
* Returns a Unicode pointer to a portion of the document.
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.
1714
* Mac OS X threading:
1719
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
1720
* This parameter is provided by the input method originating
1721
* the event. (Required parameter)
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)
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.
1735
* <-- kEventParamTSMDocAccessReplyCharactersPtr (out, typePtr)
1736
* The UniChar pointer to a portion of the document text.
1737
* Required reply parameter, if the event is handled.
1739
* <-- kEventParamTSMDocAccessReplyCharacterRange (out, typeCFRange)
1740
* The document-relative range of text represented by the
1741
* returned text pointer. Required reply parameter, if the
1745
* Mac OS X: in version 10.3 and later in Carbon.framework
1746
* CarbonLib: not available
1749
kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer = 4;
1752
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharacters
1755
* Fills caller provided buffer with Unicode characters in the
1759
* This event is equivalent to calling CFStringGetCharacters() on
1760
* the app's document treated as a CFString.
1762
* Mac OS X threading:
1767
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
1768
* This parameter is provided by the input method originating
1769
* the event. (Required parameter)
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)
1776
* --> kEventParamTSMDocAccessSendCharacterRange (in, typeCFRange)
1777
* The range of text that should be copied into the buffer
1778
* provided by the caller. Required parameter.
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.
1786
* Mac OS X: in version 10.3 and later in Carbon.framework
1787
* CarbonLib: not available
1790
kEventTSMDocumentAccessGetCharacters = 5;
1794
** Document Access Attribute events **
1796
The following Text Attribute events define how a text service can obtain certain attributes
1797
at text locations throughout an application's document.
1799
Currently, the only attributes supported by these events are font (and font size)
1800
via kEventTSMDocumentAccessGetFont and glyphID/CID info via kEventTSMDocumentAccessGetGlyphInfo.
1802
Where these attributes span multiple characters, effective ranges (over which
1803
the attribute is constant) are returned by the text engine.
1808
* Values used TSMDocAccessAttributes bit field
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.
1819
* Font size information is desired. Used in
1820
* kEventTSMDocumentAccessGetFont event.
1822
kTSMDocAccessFontSizeAttributeBit = 0;
1825
* Effective Range information is desired. Used in
1826
* kEventTSMDocumentAccessGetFont and
1827
* kEventTSMDocumentAccessGetGlyphInfo events.
1829
kTSMDocAccessEffectiveRangeAttributeBit = 1;
1832
TSMDocAccessAttributes = UInt32;
1834
kTSMDocAccessFontSizeAttribute = 1 shl kTSMDocAccessFontSizeAttributeBit;
1835
kTSMDocAccessEffectiveRangeAttribute = 1 shl kTSMDocAccessEffectiveRangeAttributeBit; { More attributes may be added in the future}
1839
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetFont
1842
* Returns font, font size, and the range over which these
1843
* attributes are constant.
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.
1850
* Mac OS X threading:
1855
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
1856
* This parameter is provided by the input method originating
1857
* the event. (Required parameter)
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)
1864
* --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
1865
* The location in the document for which the caller would
1866
* like font information. Required parameter.
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.
1878
* <-- kEventParamTSMDocAccessReplyATSFont (out, typeATSFontRef)
1879
* The ATSFontRef for the location specified by the caller.
1880
* Required reply parameter.
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
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.
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
1908
* Mac OS X: in version 10.3 and later in Carbon.framework
1909
* CarbonLib: not available
1912
kEventTSMDocumentAccessGetFont = 6;
1915
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetGlyphInfo
1918
* Returns glyph info and the range covered by that glyph.
1921
* Where a glyph spans multiple characters, the effective range,
1922
* represented by the glyph, is returned by the app.
1924
* Mac OS X threading:
1929
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
1930
* This parameter is provided by the input method originating
1931
* the event. (Required parameter)
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)
1938
* --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
1939
* The location in the document for which the caller would
1940
* like glyph information. Required parameter.
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.
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.
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
1963
* Mac OS X: in version 10.3 and later in Carbon.framework
1964
* CarbonLib: not available
1967
kEventTSMDocumentAccessGetGlyphInfo = 7;
1971
** Document Access Lock/Unlock events **
1975
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessLockDocument
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.
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.
2014
* Mac OS X threading:
2019
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
2020
* This parameter is provided by the input method originating
2021
* the event. (Required parameter)
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)
2028
* <-- kEventParamTSMDocAccessLockCount (out, typeCFIndex)
2029
* The resulting refCount of locks on the document. Required
2030
* reply parameter, if the event is handled.
2033
* Mac OS X: in version 10.3 and later in Carbon.framework
2034
* CarbonLib: not available
2037
kEventTSMDocumentAccessLockDocument = 8;
2041
* kEventClassTSMDocumentAccess / kEventTSMDocumentAccessUnlockDocument
2044
* Unlock the document so the app's text engine is free to initiate
2048
* (see kEventTSMDocumentAccessLockDocument)
2050
* Mac OS X threading:
2055
* --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
2056
* This parameter is provided by the input method originating
2057
* the event. (Required parameter)
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)
2064
* <-- kEventParamTSMDocAccessLockCount (out, typeCFIndex)
2065
* The resulting refCount of locks on the document. Required
2066
* reply parameter, if the event is handled.
2069
* Mac OS X: in version 10.3 and later in Carbon.framework
2070
* CarbonLib: not available
2073
kEventTSMDocumentAccessUnlockDocument = 9;
2076
{--------------------------------------------------------------------------------------}
2077
{ Text Input Events }
2078
{--------------------------------------------------------------------------------------}
2080
kEventClassTextInput quick reference:
2082
kEventTextInputUpdateActiveInputArea = 1,
2083
kEventTextInputUnicodeForKeyEvent = 2,
2084
kEventTextInputOffsetToPos = 3,
2085
kEventTextInputPosToOffset = 4,
2086
kEventTextInputShowHideBottomWindow = 5,
2087
kEventTextInputGetSelectedText = 6,
2088
kEventTextInputUnicodeText = 7,
2089
kEventTextInputFilterText = 14
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.
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.
2102
* kEventClassTextInput / kEventTextInputUpdateActiveInputArea
2105
* Tells the application/text engine to initiate/terminate or manage
2106
* the content of an inline input session.
2108
* Mac OS X threading:
2113
* --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
2114
* This parameter is provided by the input method originating
2115
* the event. (Required parameter)
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)
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)
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)
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)
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.
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.
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
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.
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.
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.
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.
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.
2301
* Mac OS X: in version 10.0 and later in Carbon.framework
2302
* CarbonLib: in CarbonLib 1.1 and later
2305
kEventTextInputUpdateActiveInputArea = 1;
2308
* kEventClassTextInput / kEventTextInputUnicodeForKeyEvent
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
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
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
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.
2344
* Mac OS X threading:
2349
* --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
2350
* This parameter is provided by the input method originating
2351
* the event. (Required parameter)
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)
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)
2367
* --> kEventParamTextInputSendText (in, typeUnicodeText)
2368
* The Unicode characters that were entered by the user.
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.
2379
* You can also extract from the RawKeyDown event either
2380
* Unicodes or Mac encoding characters as follows:
2382
* kEventParamKeyUnicodes typeUnicodeText
2383
* kEventParamKeyMacCharCodes typeChar (if available)
2385
* The kEventParamKeyUnicodes parameter of the raw keyboard
2386
* event is identical to the TextInput event�s
2387
* kEventParamTextInputSendText parameter.
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.
2407
* Mac OS X: in version 10.0 and later in Carbon.framework
2408
* CarbonLib: in CarbonLib 1.1 and later
2411
kEventTextInputUnicodeForKeyEvent = 2;
2414
* kEventClassTextInput / kEventTextInputOffsetToPos
2417
* Requests conversion from inline session text offset to global QD
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
2425
* Mac OS X threading:
2430
* --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
2431
* This parameter is provided by the input method originating
2432
* the event. (Required parameter)
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)
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)
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.
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.
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
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'.
2495
* --> kEventParamTextInputSendLeadingEdge (in, typeBoolean)
2496
* The position on screen (in QD coordinates) of the requested
2497
* text offset and leading/trailing edge value. (Required
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.
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.
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.
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.
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.
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.
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.
2575
* Mac OS X: in version 10.0 and later in Carbon.framework
2576
* CarbonLib: in CarbonLib 1.1 and later
2579
kEventTextInputOffsetToPos = 3;
2582
* kEventClassTextInput / kEventTextInputPosToOffset
2585
* Requests conversion from global QD coordinate to a byte offset in
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.
2596
* Mac OS X threading:
2601
* --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
2602
* This parameter is provided by the input method originating
2603
* the event. (Required parameter)
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)
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)
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.
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)
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)
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.
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.
2663
* Mac OS X: in version 10.0 and later in Carbon.framework
2664
* CarbonLib: in CarbonLib 1.1 and later
2667
kEventTextInputPosToOffset = 4;
2670
* kEventClassTextInput / kEventTextInputShowHideBottomWindow
2673
* Show or hide the bottom-line input window.
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.
2680
* Mac OS X threading:
2685
* --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
2686
* This parameter is provided by the input method originating
2687
* the event. (Required parameter)
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)
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.
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.
2710
* Mac OS X: in version 10.0 and later in Carbon.framework
2711
* CarbonLib: in CarbonLib 1.1 and later
2714
kEventTextInputShowHideBottomWindow = 5;
2717
* kEventClassTextInput / kEventTextInputGetSelectedText
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.
2724
* Mac OS X threading:
2729
* --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
2730
* This parameter is provided by the input method originating
2731
* the event. (Required parameter)
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)
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.
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.
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.
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.
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
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
2811
* Mac OS X: in version 10.0 and later in Carbon.framework
2812
* CarbonLib: in CarbonLib 1.1 and later
2815
kEventTextInputGetSelectedText = 6;
2818
* kEventClassTextInput / kEventTextInputUnicodeText
2821
* Used by input methods to provide original input text to the Text
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.
2839
* Mac OS X threading:
2844
* --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
2845
* This parameter is provided by the input method originating
2846
* the event. (Required parameter)
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.
2854
* --> kEventParamTextInputSendText (in, typeUnicodeText)
2855
* The Unicode characters produced by an input method.
2856
* (Required Parameter)
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.
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.
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.
2890
* Mac OS X: in version 10.2 and later in Carbon.framework
2891
* CarbonLib: not available
2894
kEventTextInputUnicodeText = 7;
2898
* kEventClassTextInput / kEventTextInputFilterText
2901
* Send text about to be inserted into the user focus to be filtered
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
2917
* Mac OS X threading:
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)
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)
2931
* <-- kEventParamTextInputReplyText (out, typeUnicodeText)
2932
* The filtered Unicode characters... may be a zero-size
2933
* parameter. (Required Parameter)
2936
* Return noErr to indicate that the text needing filtering has been
2937
* changed, otherwise return eventNotHandledErr.
2940
* Mac OS X: in version 10.4 and later in Carbon.framework
2941
* CarbonLib: not available
2944
kEventTextInputFilterText = 14;
2946
{--------------------------------------------------------------------------------------}
2947
{ Raw Keyboard Events }
2948
{--------------------------------------------------------------------------------------}
2950
kEventClassKeyboard quick reference:
2952
kEventRawKeyDown = 1,
2953
kEventRawKeyRepeat = 2,
2955
kEventRawKeyModifiersChanged = 4,
2956
kEventHotKeyPressed = 5,
2957
kEventHotKeyReleased = 6
2961
@event kEventRawKeyDown
2962
@abstract A key was pressed.
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.
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.
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.
2981
@param kEventParamKeyCode
2982
The virtual keycode of the key that was pressed.
2984
@param kEventParamKeyModifiers
2985
The keyboard modifiers that were down when the key was pressed.
2987
@param kEventParamKeyboardType
2988
The type of keyboard on which the key was pressed.
2991
* kEventClassKeyboard / kEventRawKeyDown
2993
* Mac OS X threading:
2997
* Mac OS X: in version 10.0 and later in Carbon.framework
2998
* CarbonLib: in CarbonLib 1.1 and later
3001
kEventRawKeyDown = 1;
3004
* kEventClassKeyboard / kEventRawKeyRepeat
3007
* Sent periodically as a key is held down by the user.
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.
3016
* Mac OS X threading:
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
3026
* --> kEventParamKeyCode (in, typeUInt32)
3027
* The virtual keycode of the key that was pressed.
3029
* --> kEventParamKeyModifiers (in, typeUInt32)
3030
* The keyboard modifiers that were down when the key was
3033
* --> kEventParamKeyboardType (in, typeUInt32)
3034
* The type of keyboard on which the key was pressed.
3037
* Mac OS X: in version 10.0 and later in Carbon.framework
3038
* CarbonLib: in CarbonLib 1.1 and later
3041
kEventRawKeyRepeat = 2;
3044
* kEventClassKeyboard / kEventRawKeyUp
3047
* A key was released.
3049
* Mac OS X threading:
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
3059
* --> kEventParamKeyCode (in, typeUInt32)
3060
* The virtual keycode of the key that was released.
3062
* --> kEventParamKeyModifiers (in, typeUInt32)
3063
* The keyboard modifiers that were down when the key was
3066
* --> kEventParamKeyboardType (in, typeUInt32)
3067
* The type of keyboard on which the key was released.
3070
* Mac OS X: in version 10.0 and later in Carbon.framework
3071
* CarbonLib: in CarbonLib 1.1 and later
3077
* kEventClassKeyboard / kEventRawKeyModifiersChanged
3080
* The keyboard modifiers have changed.
3083
* This event is sent to all handlers registered for it.
3085
* Mac OS X threading:
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.
3097
* Mac OS X: in version 10.0 and later in Carbon.framework
3098
* CarbonLib: in CarbonLib 1.1 and later
3101
kEventRawKeyModifiersChanged = 4;
3104
* kEventClassKeyboard / kEventHotKeyPressed
3107
* A registered hot key was pressed.
3109
* Mac OS X threading:
3114
* --> kEventParamDirectObject (in, typeEventHotKeyID)
3115
* The ID of the hot key that was pressed.
3118
* Mac OS X: in version 10.0 and later in Carbon.framework
3119
* CarbonLib: in CarbonLib 1.3 and later
3122
kEventHotKeyPressed = 5;
3125
* kEventClassKeyboard / kEventHotKeyReleased
3128
* A registered hot key was released.
3130
* Mac OS X threading:
3135
* --> kEventParamDirectObject (in, typeEventHotKeyID)
3136
* The ID of the hot key that was released.
3139
* Mac OS X: in version 10.0 and later in Carbon.framework
3140
* CarbonLib: in CarbonLib 1.3 and later
3143
kEventHotKeyReleased = 6;
3148
* Key modifier change event bits and masks
3151
* From bit 8, cmdKeyBit, to bit 15, rightControlKeyBit, are
3152
* compatible with Event Manager modifiers.
3156
* The Num Lock state bit (Mac OS X only).
3158
kEventKeyModifierNumLockBit = 16; { Num Lock is on? (Mac OS X only)}
3161
* The Fn key state bit (Mac OS X only).
3163
kEventKeyModifierFnBit = 17; { Fn key is down? (Mac OS X only)}
3166
kEventKeyModifierNumLockMask = 1 shl kEventKeyModifierNumLockBit;
3167
kEventKeyModifierFnMask = 1 shl kEventKeyModifierFnBit;
3170
{--------------------------------------------------------------------------------------}
3171
{ Application Events }
3172
{--------------------------------------------------------------------------------------}
3175
kEventClassApplication quick reference:
3177
kEventAppActivated = 1,
3178
kEventAppDeactivated = 2,
3180
kEventAppLaunchNotification = 4,
3181
kEventAppLaunched = 5,
3182
kEventAppTerminated = 6,
3183
kEventAppFrontSwitched = 7,
3185
kEventAppFocusMenuBar = 8,
3186
kEventAppFocusNextDocumentWindow = 9,
3187
kEventAppFocusNextFloatingWindow = 10,
3188
kEventAppFocusToolbar = 11,
3189
kEventAppFocusDrawer = 12,
3191
kEventAppGetDockTileMenu = 20,
3193
kEventAppIsEventInInstantMouser = 104,
3195
kEventAppHidden = 107,
3196
kEventAppShown = 108,
3197
kEventAppSystemUIModeChanged = 109,
3198
kEventAppAvailableWindowBoundsChanged = 110,
3199
kEventAppActiveWindowChanged = 111
3203
* kEventClassApplication / kEventAppActivated
3206
* This application has been activated.
3209
* This event is sent to all handlers registered for it.
3211
* Mac OS X threading:
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.
3223
* Mac OS X: in version 10.0 and later in Carbon.framework
3224
* CarbonLib: in CarbonLib 1.1 and later
3227
kEventAppActivated = 1;
3230
* kEventClassApplication / kEventAppDeactivated
3233
* This application has been deactivated.
3236
* This event is sent to all handlers registered for it.
3238
* Mac OS X threading:
3242
* Mac OS X: in version 10.0 and later in Carbon.framework
3243
* CarbonLib: in CarbonLib 1.1 and later
3246
kEventAppDeactivated = 2;
3249
* kEventClassApplication / kEventAppQuit
3252
* A request to quit. Sent by QuitApplicationEventLoop to the
3253
* application target.
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
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
3268
* Mac OS X threading:
3272
* Mac OS X: in version 10.0 and later in Carbon.framework
3273
* CarbonLib: in CarbonLib 1.1 and later
3279
* kEventClassApplication / kEventAppLaunchNotification
3282
* Notification that an asynchronous process launch has completed.
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).
3290
* Mac OS X threading:
3295
* --> kEventParamProcessID (in, typeProcessSerialNumber)
3296
* The ProcessSerialNumber of the process that was launched.
3298
* --> kEventParamLaunchRefCon (in, typeUInt32)
3299
* Contains the value in the asyncRefCon field of the LSLaunch
3300
* structure that was used to launch the process.
3302
* --> kEventParamLaunchErr (in, typeOSStatus)
3303
* A result code indicating success or failure of the launch.
3306
* Mac OS X: in version 10.0 and later in Carbon.framework
3307
* CarbonLib: not available
3310
kEventAppLaunchNotification = 4;
3313
* kEventClassApplication / kEventAppLaunched
3316
* Another app was launched.
3319
* This event is sent to all handlers registered for it.
3321
* Mac OS X threading:
3326
* --> kEventParamProcessID (in, typeProcessSerialNumber)
3327
* The ProcessSerialNumber of the process that was launched.
3330
* Mac OS X: in version 10.0 and later in Carbon.framework
3331
* CarbonLib: in CarbonLib 1.3.1 and later
3334
kEventAppLaunched = 5;
3337
* kEventClassApplication / kEventAppTerminated
3340
* Another app terminated.
3343
* This event is sent to all handlers registered for it.
3345
* Mac OS X threading:
3350
* --> kEventParamProcessID (in, typeProcessSerialNumber)
3351
* The ProcessSerialNumber of the process that terminated.
3354
* Mac OS X: in version 10.0 and later in Carbon.framework
3355
* CarbonLib: in CarbonLib 1.3.1 and later
3358
kEventAppTerminated = 6;
3361
* kEventClassApplication / kEventAppFrontSwitched
3364
* The front (active) application has changed.
3367
* This event is sent to all handlers registered for it.
3369
* Mac OS X threading:
3374
* --> kEventParamProcessID (in, typeProcessSerialNumber)
3375
* The ProcessSerialNumber of the process that became
3379
* Mac OS X: in version 10.0 and later in Carbon.framework
3380
* CarbonLib: in CarbonLib 1.3.1 and later
3383
kEventAppFrontSwitched = 7;
3386
* kEventClassApplication / kEventAppHidden
3389
* The current application has been hidden.
3392
* This event is sent to all handlers registered for it.
3394
* Mac OS X threading:
3398
* Mac OS X: in version 10.2 and later in Carbon.framework
3399
* CarbonLib: not available
3402
kEventAppHidden = 107;
3405
* kEventClassApplication / kEventAppShown
3408
* The current application has been shown.
3411
* This event is sent to all handlers registered for it.
3413
* Mac OS X threading:
3417
* Mac OS X: in version 10.2 and later in Carbon.framework
3418
* CarbonLib: not available
3421
kEventAppShown = 108;
3424
* kEventClassApplication / kEventAppSystemUIModeChanged
3427
* The system UI mode of the frontmost application has changed.
3430
* This event is sent to all handlers registered for it.
3432
* Mac OS X threading:
3437
* --> kEventParamSystemUIMode (in, typeUInt32)
3438
* The new system UI mode. Contains a kUIMode constant from
3442
* Mac OS X: in version 10.2 and later in Carbon.framework
3443
* CarbonLib: not available
3446
kEventAppSystemUIModeChanged = 109;
3451
* Indicates that a device�s available window positioning bounds have
3452
* changed because of a change in Dock position or size.
3454
kAvailBoundsChangedForDock = 1 shl 0;
3457
* Indicates that a device�s available window positioning bounds have
3458
* changed because of a change in display configuration.
3460
kAvailBoundsChangedForDisplay = 1 shl 1;
3463
* kEventClassApplication / kEventAppAvailableWindowBoundsChanged
3466
* The available window positioning bounds have changed.
3469
* This event is sent to all handlers registered for it.
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
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.
3490
* Mac OS X threading:
3495
* --> kEventParamGDevice (in, typeGDHandle)
3496
* The device whose available positioning bounds have changed.
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.
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.
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.
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.
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.
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.
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
3550
* Mac OS X: in version 10.3 and later in Carbon.framework
3551
* CarbonLib: not available
3554
kEventAppAvailableWindowBoundsChanged = 110;
3557
* kEventClassApplication / kEventAppActiveWindowChanged
3560
* Notification that the active window in the current process has
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
3571
* The ActivateWindow API also causes this event to be
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
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.
3585
* Mac OS X threading:
3590
* --> kEventParamPreviousWindow (in, typeWindowRef)
3591
* The window that was previously active.
3593
* --> kEventParamCurrentWindow (in, typeWindowRef)
3594
* The window that is now active.
3597
* Mac OS X: in version 10.3 and later in Carbon.framework
3598
* CarbonLib: not available
3601
kEventAppActiveWindowChanged = 111;
3604
* kEventClassApplication / kEventAppGetDockTileMenu
3607
* A request for a menu to be displayed by the application�s dock
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.
3621
* Mac OS X threading:
3626
* <-- kEventParamMenuRef (out, typeMenuRef)
3627
* A MenuRef to be displayed in the Dock is returned by the
3628
* handler in this parameter.
3631
* Mac OS X: in version 10.1 and later in Carbon.framework
3632
* CarbonLib: not available
3635
kEventAppGetDockTileMenu = 20;
3638
* kEventClassApplication / kEventAppFocusMenuBar
3641
* The user has requested keyboard focus on the menubar.
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.
3650
* Mac OS X threading:
3655
* --> kEventParamKeyModifiers (in, typeUInt32)
3656
* The keyboard modifiers that were pressed when the user
3657
* requested a focus switch.
3660
* Mac OS X: in version 10.2 and later in Carbon.framework
3661
* CarbonLib: not available
3664
kEventAppFocusMenuBar = 8;
3667
* kEventClassApplication / kEventAppFocusNextDocumentWindow
3670
* The user has requested keyboard focus on a document window.
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.
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.
3695
* Mac OS X threading:
3700
* --> kEventParamKeyModifiers (in, typeUInt32)
3701
* The keyboard modifiers that were pressed when the user
3702
* requested a focus switch.
3705
* Mac OS X: in version 10.2 and later in Carbon.framework
3706
* CarbonLib: not available
3709
kEventAppFocusNextDocumentWindow = 9;
3712
* kEventClassApplication / kEventAppFocusNextFloatingWindow
3715
* The user has requested keyboard focus on a floating window.
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.
3733
* Mac OS X threading:
3738
* --> kEventParamKeyModifiers (in, typeUInt32)
3739
* The keyboard modifiers that were pressed when the user
3740
* requested a focus switch.
3743
* Mac OS X: in version 10.2 and later in Carbon.framework
3744
* CarbonLib: not available
3747
kEventAppFocusNextFloatingWindow = 10;
3750
* kEventClassApplication / kEventAppFocusToolbar
3753
* The user has requested keyboard focus on the toolbar in the
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
3763
* Mac OS X threading:
3768
* --> kEventParamKeyModifiers (in, typeUInt32)
3769
* The keyboard modifiers that were pressed when the user
3770
* requested a focus switch.
3773
* Mac OS X: in version 10.2 and later in Carbon.framework
3774
* CarbonLib: not available
3777
kEventAppFocusToolbar = 11;
3780
* kEventClassApplication / kEventAppFocusDrawer
3783
* The user has requested keyboard focus on the drawer in the
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)
3796
* Mac OS X threading:
3801
* --> kEventParamKeyModifiers (in, typeUInt32)
3802
* The keyboard modifiers that were pressed when the user
3803
* requested a focus switch.
3806
* Mac OS X: in version 10.4 and later in Carbon.framework
3807
* CarbonLib: not available
3810
kEventAppFocusDrawer = 12;
3813
* kEventClassApplication / kEventAppIsEventInInstantMouser
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.
3821
* Mac OS X threading:
3826
* --> kEventParamEventRef (in, typeEventRef)
3827
* The Event to check.
3829
* <-- kEventParamIsInInstantMouser (out, typeBoolean)
3830
* True if event was in an "instant mousing" area, false
3834
* Mac OS X: in version 10.2 and later in Carbon.framework
3835
* CarbonLib: not available
3838
kEventAppIsEventInInstantMouser = 104;
3841
{--------------------------------------------------------------------------------------}
3843
{--------------------------------------------------------------------------------------}
3845
kEventClassAppleEvent quick reference:
3847
kEventAppleEvent = 1
3850
* kEventClassAppleEvent / kEventAppleEvent
3853
* Sent when a high-level event is received.
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
3861
* The handler installed by RunApplicationEventLoop will call
3862
* AEProcessAppleEvent.
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.
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.
3877
* Mac OS X threading:
3882
* --> kEventParamAEEventClass (in, typeType)
3883
* The event class of the Apple event.
3885
* --> kEventParamAEEventID (in, typeType)
3886
* The event ID of the Apple event.
3889
* Mac OS X: in version 10.0 and later in Carbon.framework
3890
* CarbonLib: in CarbonLib 1.1 and later
3893
kEventAppleEvent = 1;
3895
{--------------------------------------------------------------------------------------}
3897
{--------------------------------------------------------------------------------------}
3899
kEventClassWindow quick reference:
3901
-- window refresh events --
3903
kEventWindowUpdate = 1,
3904
kEventWindowDrawContent = 2,
3906
-- window activation events --
3908
kEventWindowActivated = 5,
3909
kEventWindowDeactivated = 6,
3910
kEventWindowHandleActivate = 91,
3911
kEventWindowHandleDeactivate = 92,
3912
kEventWindowGetClickActivation = 7,
3913
kEventWindowGetClickModality = 8,
3915
-- window state change events --
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,
3936
-- window click events --
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,
3948
-- window cursor change events --
3950
kEventWindowCursorChange = 40,
3952
-- window action events --
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,
3984
-- window focus events --
3986
kEventWindowFocusAcquired = 200,
3987
kEventWindowFocusRelinquish = 201,
3988
kEventWindowFocusContent = 202,
3989
kEventWindowFocusToolbar = 203,
3990
kEventWindowFocusDrawer = 204,
3994
kEventWindowSheetOpening, = 210,
3995
kEventWindowSheetOpened = 211,
3996
kEventWindowSheetClosing = 212,
3997
kEventWindowSheetClosed = 213,
4001
kEventWindowDrawerOpening = 220,
4002
kEventWindowDrawerOpened = 221,
4003
kEventWindowDrawerClosing = 222,
4004
kEventWindowDrawerClosed = 223,
4006
-- window definition events --
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
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).
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.
4040
* kEventClassWindow / kEventWindowUpdate
4043
* The lowest-level window update event.
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
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.
4059
* Mac OS X threading:
4064
* --> kEventParamDirectObject (in, typeWindowRef)
4065
* The window that requires updating.
4068
* Mac OS X: in version 10.0 and later in Carbon.framework
4069
* CarbonLib: in CarbonLib 1.1 and later
4072
kEventWindowUpdate = 1;
4075
* kEventClassWindow / kEventWindowDrawContent
4078
* A request to update a window�s content.
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
4088
* The standard window handler responds to this event by calling
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.
4097
* Mac OS X threading:
4102
* --> kEventParamDirectObject (in, typeWindowRef)
4103
* The window that requires updating.
4106
* Mac OS X: in version 10.0 and later in Carbon.framework
4107
* CarbonLib: in CarbonLib 1.1 and later
4110
kEventWindowDrawContent = 2;
4113
* kEventClassWindow / kEventWindowActivated
4116
* Notification that a window has been activated.
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
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
4135
* Mac OS X threading:
4140
* --> kEventParamDirectObject (in, typeWindowRef)
4141
* The window that is now active.
4144
* Mac OS X: in version 10.0 and later in Carbon.framework
4145
* CarbonLib: in CarbonLib 1.1 and later
4148
kEventWindowActivated = 5;
4151
* kEventClassWindow / kEventWindowDeactivated
4154
* Notification that a window has been deactivated.
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
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
4173
* Mac OS X threading:
4178
* --> kEventParamDirectObject (in, typeWindowRef)
4179
* The window that is now inactive.
4182
* Mac OS X: in version 10.0 and later in Carbon.framework
4183
* CarbonLib: in CarbonLib 1.1 and later
4186
kEventWindowDeactivated = 6;
4189
* kEventClassWindow / kEventWindowHandleActivate
4192
* The window has received a kEventWindowActivated event, and its
4193
* contents should become active.
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.
4202
* Mac OS X threading:
4207
* --> kEventParamDirectObject (in, typeWindowRef)
4208
* The window that was activated.
4211
* Mac OS X: in version 10.3 and later in Carbon.framework
4212
* CarbonLib: not available
4215
kEventWindowHandleActivate = 91;
4218
* kEventClassWindow / kEventWindowHandleDeactivate
4221
* The window has received a kEventWindowDeactivated event, and its
4222
* contents should become inactive.
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.
4231
* Mac OS X threading:
4236
* --> kEventParamDirectObject (in, typeWindowRef)
4237
* The window that was deactivated.
4240
* Mac OS X: in version 10.3 and later in Carbon.framework
4241
* CarbonLib: not available
4244
kEventWindowHandleDeactivate = 92;
4247
* kEventClassWindow / kEventWindowGetClickActivation
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.
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.
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.
4273
* The default behavior varies according to the window state and the
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.
4287
* Mac OS X threading:
4292
* --> kEventParamDirectObject (in, typeWindowRef)
4293
* The window that was clicked.
4295
* --> kEventParamMouseLocation (in, typeQDPoint)
4296
* The location of the click, in global coordinates.
4298
* --> kEventParamKeyModifiers (in, typeUInt32)
4299
* The keyboard modifiers that were pressed when the mouse was
4302
* --> kEventParamWindowPartCode (in, typeWindowPartCode)
4303
* The window part that was clicked. Available in Mac OS X
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
4314
* --> kEventParamControlRef (in, typeControlRef)
4315
* The control that was clicked. Only present if the click was
4318
* <-- kEventParamClickActivation (out, typeClickActivationResult)
4319
* On exit, indicates how the click should be handled. Should
4320
* be set a ClickActivationResult constant from Controls.h.
4323
* Mac OS X: in version 10.0 and later in Carbon.framework
4324
* CarbonLib: in CarbonLib 1.1 and later
4327
kEventWindowGetClickActivation = 7;
4332
* Responses to the kEventWindowGetClickModality event.
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.
4345
kHIModalClickIsModal = 1 shl 0;
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.
4352
kHIModalClickAllowEvent = 1 shl 1;
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.
4361
kHIModalClickAnnounce = 1 shl 2;
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
4371
kHIModalClickRaiseWindow = 1 shl 3;
4374
HIModalClickResult = UInt32;
4376
typeModalClickResult = $776D6372 (* 'wmcr' *); { HIModalClickResult}
4377
typeWindowModality = $776D6F64 (* 'wmod' *); { WindowModality}
4378
kEventParamModalClickResult = typeModalClickResult; { typeModalClickResult}
4379
kEventParamModalWindow = $6D77696E (* 'mwin' *); { typeWindowRef}
4380
kEventParamWindowModality = typeWindowModality; { typeWindowModality}
4383
* kEventClassWindow / kEventWindowGetClickModality
4386
* Determines whether a mouse-down or mouse-up event is blocked by a
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.
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:
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
4406
* In each case, the result of this event is used to determine
4407
* whether z-ordering, activation, and hiliting of the window should
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.
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.
4423
* Mac OS X threading:
4428
* --> kEventParamDirectObject (in, typeWindowRef)
4429
* The window that was clicked.
4431
* --> kEventParamWindowPartCode (in, typeWindowPartCode)
4432
* The window part that was clicked.
4434
* --> kEventParamKeyModifiers (in, typeUInt32)
4435
* The keyboard modifiers that were pressed when the mouse
4436
* button was pressed.
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.
4446
* <-- kEventParamModalClickResult (out, typeModalClickResult)
4447
* On exit, this parameter should contain an
4448
* HIModalClickResult value indicating how the click should be
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.
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.
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.
4474
* Mac OS X: in version 10.4 and later in Carbon.framework
4475
* CarbonLib: not available
4478
kEventWindowGetClickModality = 8;
4483
* Window bounds change event attributes
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
4495
* The bounds is changing because the user is dragging the window
4498
kWindowBoundsChangeUserDrag = 1 shl 0;
4501
* The bounds is changing because the user is resizing the window.
4503
kWindowBoundsChangeUserResize = 1 shl 1;
4506
* The dimensions (width and height) of the window content area are
4509
kWindowBoundsChangeSizeChanged = 1 shl 2;
4512
* The top left corner (origin) of the window content is changing.
4514
kWindowBoundsChangeOriginChanged = 1 shl 3;
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.
4523
kWindowBoundsChangeZoom = 1 shl 4;
4526
* kEventClassWindow / kEventWindowShowing
4529
* Notification that a window is being shown.
4532
* This event is sent to all handlers registered for it.
4534
* Mac OS X threading:
4539
* --> kEventParamDirectObject (in, typeWindowRef)
4540
* The window being shown.
4543
* Mac OS X: in version 10.0 and later in Carbon.framework
4544
* CarbonLib: in CarbonLib 1.1 and later
4547
kEventWindowShowing = 22;
4550
* kEventClassWindow / kEventWindowHiding
4553
* Notification that a window is being hidden.
4556
* This event is sent to all handlers registered for it.
4558
* Mac OS X threading:
4563
* --> kEventParamDirectObject (in, typeWindowRef)
4564
* The window being hidden.
4567
* Mac OS X: in version 10.0 and later in Carbon.framework
4568
* CarbonLib: in CarbonLib 1.1 and later
4571
kEventWindowHiding = 23;
4574
* kEventClassWindow / kEventWindowShown
4577
* Notification that a window has been shown.
4580
* This event is sent to all handlers registered for it.
4582
* Mac OS X threading:
4587
* --> kEventParamDirectObject (in, typeWindowRef)
4588
* The window that was shown.
4591
* Mac OS X: in version 10.0 and later in Carbon.framework
4592
* CarbonLib: in CarbonLib 1.1 and later
4595
kEventWindowShown = 24;
4598
* kEventClassWindow / kEventWindowHidden
4601
* Notification that a window has been hidden.
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.
4614
* Mac OS X threading:
4619
* --> kEventParamDirectObject (in, typeWindowRef)
4620
* The window that was hidden.
4623
* Mac OS X: in version 10.0 and later in Carbon.framework
4624
* CarbonLib: in CarbonLib 1.1 and later
4627
kEventWindowHidden = 25;
4630
* kEventClassWindow / kEventWindowCollapsing
4633
* Notification that a window is about to collapse.
4636
* This event is sent to all handlers registered for it.
4638
* Mac OS X threading:
4643
* --> kEventParamDirectObject (in, typeWindowRef)
4644
* The window being collapsed.
4647
* Mac OS X: in version 10.1 and later in Carbon.framework
4648
* CarbonLib: in CarbonLib 1.6 and later
4651
kEventWindowCollapsing = 86;
4654
* kEventClassWindow / kEventWindowCollapsed
4657
* Notification that a window has successfully collapsed.
4660
* This event is sent to all handlers registered for it.
4662
* Mac OS X threading:
4667
* --> kEventParamDirectObject (in, typeWindowRef)
4668
* The window that was collapsed.
4671
* Mac OS X: in version 10.0 and later in Carbon.framework
4672
* CarbonLib: in CarbonLib 1.1 and later
4675
kEventWindowCollapsed = 67;
4678
* kEventClassWindow / kEventWindowExpanding
4681
* Notification that a window is about to expand.
4684
* This event is sent to all handlers registered for it.
4686
* Mac OS X threading:
4691
* --> kEventParamDirectObject (in, typeWindowRef)
4692
* The window being expanded.
4695
* Mac OS X: in version 10.1 and later in Carbon.framework
4696
* CarbonLib: in CarbonLib 1.6 and later
4699
kEventWindowExpanding = 87;
4702
* kEventClassWindow / kEventWindowExpanded
4705
* Notification that a window has successfully expanded.
4708
* This event is sent to all handlers registered for it.
4710
* Mac OS X threading:
4715
* --> kEventParamDirectObject (in, typeWindowRef)
4716
* The window that was expanded.
4719
* Mac OS X: in version 10.0 and later in Carbon.framework
4720
* CarbonLib: in CarbonLib 1.1 and later
4723
kEventWindowExpanded = 70;
4726
* kEventClassWindow / kEventWindowZoomed
4729
* Notification that a window has been successfully zoomed.
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
4739
* Mac OS X threading:
4744
* --> kEventParamDirectObject (in, typeWindowRef)
4745
* The window that was zoomed.
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.
4753
* Mac OS X: in version 10.0 and later in Carbon.framework
4754
* CarbonLib: in CarbonLib 1.1 and later
4757
kEventWindowZoomed = 76;
4760
* kEventClassWindow / kEventWindowBoundsChanging
4763
* Notification that a window�s bounds are about to be changed.
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.
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.
4783
* Mac OS X threading:
4788
* --> kEventParamDirectObject (in, typeWindowRef)
4789
* The window being shown.
4791
* --> kEventParamAttributes (in, typeUInt32)
4792
* The bounds-changing attributes indicating whether the
4793
* window is being resized, moved, or both.
4795
* --> kEventParamOriginalBounds (in, typeQDRectangle)
4796
* The window�s original content bounds before the window
4797
* resize or drag began.
4799
* --> kEventParamPreviousBounds (in, typeQDRectangle)
4800
* The window�s content bounds before the current bounds
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
4809
* Return noErr to indicate that the Window Manager should use the
4810
* kEventParamCurrentBounds parameter as the window�s new content
4814
* Mac OS X: in version 10.0 and later in Carbon.framework
4815
* CarbonLib: in CarbonLib 1.1 and later
4818
kEventWindowBoundsChanging = 26;
4821
* kEventClassWindow / kEventWindowBoundsChanged
4824
* Notification that a window�s bounds have been changed.
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.
4832
* Mac OS X threading:
4837
* --> kEventParamDirectObject (in, typeWindowRef)
4838
* The window whose bounds were changed.
4840
* --> kEventParamAttributes (in, typeUInt32)
4841
* The bounds-changing attributes indicating whether the
4842
* window was resized, moved, or both.
4844
* --> kEventParamOriginalBounds (in, typeQDRectangle)
4845
* The window�s original content bounds before the window
4846
* resize or drag began.
4848
* --> kEventParamPreviousBounds (in, typeQDRectangle)
4849
* The window�s content bounds before the current bounds
4852
* --> kEventParamCurrentBounds (in, typeQDRectangle)
4853
* The window�s new content bounds.
4856
* Mac OS X: in version 10.0 and later in Carbon.framework
4857
* CarbonLib: in CarbonLib 1.1 and later
4860
kEventWindowBoundsChanged = 27;
4863
* kEventClassWindow / kEventWindowResizeStarted
4866
* Notification that the user has just started to resize a window.
4869
* This event is sent to all handlers registered for it.
4871
* Mac OS X threading:
4876
* --> kEventParamDirectObject (in, typeWindowRef)
4877
* The window being resized.
4880
* Mac OS X: in version 10.0 and later in Carbon.framework
4881
* CarbonLib: in CarbonLib 1.1 and later
4884
kEventWindowResizeStarted = 28;
4887
* kEventClassWindow / kEventWindowResizeCompleted
4890
* Notification that the user has just finished resizing a window.
4893
* This event is sent to all handlers registered for it.
4895
* Mac OS X threading:
4900
* --> kEventParamDirectObject (in, typeWindowRef)
4901
* The window that was resized.
4904
* Mac OS X: in version 10.0 and later in Carbon.framework
4905
* CarbonLib: in CarbonLib 1.1 and later
4908
kEventWindowResizeCompleted = 29;
4911
* kEventClassWindow / kEventWindowDragStarted
4914
* Notification that the user has just started to drag a window.
4917
* This event is sent to all handlers registered for it.
4919
* Mac OS X threading:
4924
* --> kEventParamDirectObject (in, typeWindowRef)
4925
* The window being dragged.
4928
* Mac OS X: in version 10.0 and later in Carbon.framework
4929
* CarbonLib: in CarbonLib 1.1 and later
4932
kEventWindowDragStarted = 30;
4935
* kEventClassWindow / kEventWindowDragCompleted
4938
* Notification that the user has just finished dragging a window.
4941
* This event is sent to all handlers registered for it.
4943
* Mac OS X threading:
4948
* --> kEventParamDirectObject (in, typeWindowRef)
4949
* The window that was dragged.
4952
* Mac OS X: in version 10.0 and later in Carbon.framework
4953
* CarbonLib: in CarbonLib 1.1 and later
4956
kEventWindowDragCompleted = 31;
4959
* kEventClassWindow / kEventWindowClosed
4962
* Notification that a window is being destroyed.
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.
4975
* Mac OS X threading:
4980
* --> kEventParamDirectObject (in, typeWindowRef)
4981
* The window being destroyed.
4984
* Mac OS X: in version 10.0 and later in Carbon.framework
4985
* CarbonLib: in CarbonLib 1.1 and later
4988
kEventWindowClosed = 73;
4991
* kEventClassWindow / kEventWindowTransitionStarted
4994
* Notification that a window transition has started.
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.
5002
* Mac OS X threading:
5007
* --> kEventParamDirectObject (in, typeWindowRef)
5008
* The window that will be transitioning.
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.
5016
* --> kEventParamWindowTransitionAction (in, typeWindowTransitionAction)
5017
* The transition action that is starting.
5019
* --> kEventParamWindowTransitionEffect (in, typeWindowTransitionEffect)
5020
* The transition effect that is starting.
5023
* Mac OS X: in version 10.3 and later in Carbon.framework
5024
* CarbonLib: not available
5027
kEventWindowTransitionStarted = 88;
5030
* kEventClassWindow / kEventWindowTransitionCompleted
5033
* Notification that a window transition has completed.
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.
5041
* Mac OS X threading:
5046
* --> kEventParamDirectObject (in, typeWindowRef)
5047
* The window that was transitioning.
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.
5055
* --> kEventParamWindowTransitionAction (in, typeWindowTransitionAction)
5056
* The transition action that has completed.
5058
* --> kEventParamWindowTransitionEffect (in, typeWindowTransitionEffect)
5059
* The transition effect that has completed.
5062
* Mac OS X: in version 10.3 and later in Carbon.framework
5063
* CarbonLib: not available
5066
kEventWindowTransitionCompleted = 89;
5069
* kEventClassWindow / kEventWindowClickDragRgn
5072
* Sent when the mouse is clicked in the drag region.
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.
5085
* Mac OS X threading:
5090
* --> kEventParamDirectObject (in, typeWindowRef)
5091
* The window that was clicked.
5093
* --> kEventParamMouseLocation (in, typeHIPoint)
5094
* The mouse location, in global coordinates.
5096
* --> kEventParamWindowRef (in, typeWindowRef)
5097
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5113
* --> kEventParamKeyModifiers (in, typeUInt32)
5114
* The keyboard modifiers that were pressed when the event was
5117
* --> kEventParamMouseButton (in, typeMouseButton)
5118
* Which mouse button was pressed.
5120
* --> kEventParamClickCount (in, typeUInt32)
5121
* Whether this is a single click, double click, etc.
5123
* --> kEventParamMouseChord (in, typeUInt32)
5124
* Which other mouse buttons were pressed when the event was
5125
* generated. Available on Mac OS X only.
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.
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
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.
5148
* Mac OS X: in version 10.0 and later in Carbon.framework
5149
* CarbonLib: in CarbonLib 1.1 and later
5152
kEventWindowClickDragRgn = 32;
5155
* kEventClassWindow / kEventWindowClickResizeRgn
5158
* Sent when the mouse is clicked in the resize area.
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
5168
* Mac OS X threading:
5173
* --> kEventParamDirectObject (in, typeWindowRef)
5174
* The window that was clicked.
5176
* --> kEventParamMouseLocation (in, typeHIPoint)
5177
* The mouse location, in global coordinates.
5179
* --> kEventParamWindowRef (in, typeWindowRef)
5180
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5196
* --> kEventParamKeyModifiers (in, typeUInt32)
5197
* The keyboard modifiers that were pressed when the event was
5200
* --> kEventParamMouseButton (in, typeMouseButton)
5201
* Which mouse button was pressed.
5203
* --> kEventParamClickCount (in, typeUInt32)
5204
* Whether this is a single click, double click, etc.
5206
* --> kEventParamMouseChord (in, typeUInt32)
5207
* Which other mouse buttons were pressed when the event was
5208
* generated. Available on Mac OS X only.
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.
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
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.
5231
* Mac OS X: in version 10.0 and later in Carbon.framework
5232
* CarbonLib: in CarbonLib 1.1 and later
5235
kEventWindowClickResizeRgn = 33;
5238
* kEventClassWindow / kEventWindowClickCollapseRgn
5241
* Sent when the mouse is clicked in the collapse button.
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.
5256
* Mac OS X threading:
5261
* --> kEventParamDirectObject (in, typeWindowRef)
5262
* The window that was clicked.
5264
* --> kEventParamMouseLocation (in, typeHIPoint)
5265
* The mouse location, in global coordinates.
5267
* --> kEventParamWindowRef (in, typeWindowRef)
5268
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5284
* --> kEventParamKeyModifiers (in, typeUInt32)
5285
* The keyboard modifiers that were pressed when the event was
5288
* --> kEventParamMouseButton (in, typeMouseButton)
5289
* Which mouse button was pressed.
5291
* --> kEventParamClickCount (in, typeUInt32)
5292
* Whether this is a single click, double click, etc.
5294
* --> kEventParamMouseChord (in, typeUInt32)
5295
* Which other mouse buttons were pressed when the event was
5296
* generated. Available on Mac OS X only.
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.
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
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.
5319
* Mac OS X: in version 10.0 and later in Carbon.framework
5320
* CarbonLib: in CarbonLib 1.1 and later
5323
kEventWindowClickCollapseRgn = 34;
5326
* kEventClassWindow / kEventWindowClickCloseRgn
5329
* Sent when the mouse is clicked in the close button.
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.
5342
* Mac OS X threading:
5347
* --> kEventParamDirectObject (in, typeWindowRef)
5348
* The window that was clicked.
5350
* --> kEventParamMouseLocation (in, typeHIPoint)
5351
* The mouse location, in global coordinates.
5353
* --> kEventParamWindowRef (in, typeWindowRef)
5354
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5370
* --> kEventParamKeyModifiers (in, typeUInt32)
5371
* The keyboard modifiers that were pressed when the event was
5374
* --> kEventParamMouseButton (in, typeMouseButton)
5375
* Which mouse button was pressed.
5377
* --> kEventParamClickCount (in, typeUInt32)
5378
* Whether this is a single click, double click, etc.
5380
* --> kEventParamMouseChord (in, typeUInt32)
5381
* Which other mouse buttons were pressed when the event was
5382
* generated. Available on Mac OS X only.
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.
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
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.
5405
* Mac OS X: in version 10.0 and later in Carbon.framework
5406
* CarbonLib: in CarbonLib 1.1 and later
5409
kEventWindowClickCloseRgn = 35;
5412
* kEventClassWindow / kEventWindowClickZoomRgn
5415
* Sent when the mouse is clicked in the zoom button.
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.
5428
* Mac OS X threading:
5433
* --> kEventParamDirectObject (in, typeWindowRef)
5434
* The window that was clicked.
5436
* --> kEventParamMouseLocation (in, typeHIPoint)
5437
* The mouse location, in global coordinates.
5439
* --> kEventParamWindowRef (in, typeWindowRef)
5440
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5456
* --> kEventParamKeyModifiers (in, typeUInt32)
5457
* The keyboard modifiers that were pressed when the event was
5460
* --> kEventParamMouseButton (in, typeMouseButton)
5461
* Which mouse button was pressed.
5463
* --> kEventParamClickCount (in, typeUInt32)
5464
* Whether this is a single click, double click, etc.
5466
* --> kEventParamMouseChord (in, typeUInt32)
5467
* Which other mouse buttons were pressed when the event was
5468
* generated. Available on Mac OS X only.
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.
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
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.
5491
* Mac OS X: in version 10.0 and later in Carbon.framework
5492
* CarbonLib: in CarbonLib 1.1 and later
5495
kEventWindowClickZoomRgn = 36;
5498
* kEventClassWindow / kEventWindowClickContentRgn
5501
* Sent when the mouse is clicked in the content region.
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.
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.
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.
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.
5529
* Mac OS X threading:
5534
* --> kEventParamDirectObject (in, typeWindowRef)
5535
* The window that was clicked.
5537
* --> kEventParamMouseLocation (in, typeHIPoint)
5538
* The mouse location, in global coordinates.
5540
* --> kEventParamWindowRef (in, typeWindowRef)
5541
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5557
* --> kEventParamKeyModifiers (in, typeUInt32)
5558
* The keyboard modifiers that were pressed when the event was
5561
* --> kEventParamMouseButton (in, typeMouseButton)
5562
* Which mouse button was pressed.
5564
* --> kEventParamClickCount (in, typeUInt32)
5565
* Whether this is a single click, double click, etc.
5567
* --> kEventParamMouseChord (in, typeUInt32)
5568
* Which other mouse buttons were pressed when the event was
5569
* generated. Available on Mac OS X only.
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.
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
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.
5592
* Mac OS X: in version 10.0 and later in Carbon.framework
5593
* CarbonLib: in CarbonLib 1.1 and later
5596
kEventWindowClickContentRgn = 37;
5599
* kEventClassWindow / kEventWindowClickProxyIconRgn
5602
* Sent when the mouse is clicked in the proxy icon.
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.
5615
* Mac OS X threading:
5620
* --> kEventParamDirectObject (in, typeWindowRef)
5621
* The window that was clicked.
5623
* --> kEventParamMouseLocation (in, typeHIPoint)
5624
* The mouse location, in global coordinates.
5626
* --> kEventParamWindowRef (in, typeWindowRef)
5627
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5643
* --> kEventParamKeyModifiers (in, typeUInt32)
5644
* The keyboard modifiers that were pressed when the event was
5647
* --> kEventParamMouseButton (in, typeMouseButton)
5648
* Which mouse button was pressed.
5650
* --> kEventParamClickCount (in, typeUInt32)
5651
* Whether this is a single click, double click, etc.
5653
* --> kEventParamMouseChord (in, typeUInt32)
5654
* Which other mouse buttons were pressed when the event was
5655
* generated. Available on Mac OS X only.
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.
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
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.
5678
* Mac OS X: in version 10.0 and later in Carbon.framework
5679
* CarbonLib: in CarbonLib 1.1 and later
5682
kEventWindowClickProxyIconRgn = 38;
5685
* kEventClassWindow / kEventWindowClickToolbarButtonRgn
5688
* Sent when the mouse is clicked in the toolbar button.
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.
5700
* Mac OS X threading:
5705
* --> kEventParamDirectObject (in, typeWindowRef)
5706
* The window that was clicked.
5708
* --> kEventParamMouseLocation (in, typeHIPoint)
5709
* The mouse location, in global coordinates.
5711
* --> kEventParamWindowRef (in, typeWindowRef)
5712
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5728
* --> kEventParamKeyModifiers (in, typeUInt32)
5729
* The keyboard modifiers that were pressed when the event was
5732
* --> kEventParamMouseButton (in, typeMouseButton)
5733
* Which mouse button was pressed.
5735
* --> kEventParamClickCount (in, typeUInt32)
5736
* Whether this is a single click, double click, etc.
5738
* --> kEventParamMouseChord (in, typeUInt32)
5739
* Which other mouse buttons were pressed when the event was
5740
* generated. Available on Mac OS X only.
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.
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
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.
5763
* Mac OS X: in version 10.0 and later in Carbon.framework
5764
* CarbonLib: not available
5767
kEventWindowClickToolbarButtonRgn = 41;
5770
* kEventClassWindow / kEventWindowClickStructureRgn
5773
* Sent when the mouse is clicked in some part of the window
5774
* structure other than the window widgets, drag region, or resize
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.
5786
* Mac OS X threading:
5791
* --> kEventParamDirectObject (in, typeWindowRef)
5792
* The window that was clicked.
5794
* --> kEventParamMouseLocation (in, typeHIPoint)
5795
* The mouse location, in global coordinates.
5797
* --> kEventParamWindowRef (in, typeWindowRef)
5798
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
5814
* --> kEventParamKeyModifiers (in, typeUInt32)
5815
* The keyboard modifiers that were pressed when the event was
5818
* --> kEventParamMouseButton (in, typeMouseButton)
5819
* Which mouse button was pressed.
5821
* --> kEventParamClickCount (in, typeUInt32)
5822
* Whether this is a single click, double click, etc.
5824
* --> kEventParamMouseChord (in, typeUInt32)
5825
* Which other mouse buttons were pressed when the event was
5826
* generated. Available on Mac OS X only.
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.
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
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.
5849
* Mac OS X: in version 10.1 and later in Carbon.framework
5850
* CarbonLib: not available
5853
kEventWindowClickStructureRgn = 42;
5857
* kEventClassWindow / kEventWindowCursorChange
5860
* Sent when the mouse is moving over the content region of a window.
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.
5870
* Mac OS X threading:
5875
* --> kEventParamDirectObject (in, typeWindowRef)
5876
* The window under the mouse.
5878
* --> kEventParamMouseLocation (in, typeQDPoint)
5879
* The mouse location in global coordinates.
5881
* --> kEventParamKeyModifiers (in, typeUInt32)
5882
* The current keyboard modifiers.
5885
* Mac OS X: in version 10.0 and later in Carbon.framework
5886
* CarbonLib: in CarbonLib 1.5 and later
5889
kEventWindowCursorChange = 40;
5892
* kEventClassWindow / kEventWindowCollapse
5895
* A request to collapse a window.
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
5907
* Mac OS X threading:
5912
* --> kEventParamDirectObject (in, typeWindowRef)
5913
* The window that should collapse.
5916
* Mac OS X: in version 10.0 and later in Carbon.framework
5917
* CarbonLib: in CarbonLib 1.1 and later
5920
kEventWindowCollapse = 66;
5923
* kEventClassWindow / kEventWindowCollapseAll
5926
* A request to collapse all windows.
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.
5938
* Mac OS X threading:
5943
* --> kEventParamDirectObject (in, typeWindowRef)
5944
* The window whose collapse button was clicked.
5947
* Mac OS X: in version 10.0 and later in Carbon.framework
5948
* CarbonLib: in CarbonLib 1.1 and later
5951
kEventWindowCollapseAll = 68;
5954
* kEventClassWindow / kEventWindowExpand
5957
* A request to expand a window.
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.
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.
5976
* Mac OS X threading:
5981
* --> kEventParamDirectObject (in, typeWindowRef)
5982
* The window that should expand.
5985
* Mac OS X: in version 10.0 and later in Carbon.framework
5986
* CarbonLib: in CarbonLib 1.1 and later
5989
kEventWindowExpand = 69;
5992
* kEventClassWindow / kEventWindowExpandAll
5995
* A request to expand all windows.
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
6009
* Mac OS X threading:
6014
* --> kEventParamDirectObject (in, typeWindowRef)
6015
* The window whose collapse button was clicked.
6018
* Mac OS X: in version 10.0 and later in Carbon.framework
6019
* CarbonLib: in CarbonLib 1.1 and later
6022
kEventWindowExpandAll = 71;
6025
* kEventClassWindow / kEventWindowClose
6028
* A request to close a window.
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.
6038
* Your application would typically intercept this event to check if
6039
* the window�s document is dirty, and display a Save Changes alert
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
6048
* Mac OS X threading:
6053
* --> kEventParamDirectObject (in, typeWindowRef)
6054
* The window that should close.
6057
* Mac OS X: in version 10.0 and later in Carbon.framework
6058
* CarbonLib: in CarbonLib 1.1 and later
6061
kEventWindowClose = 72;
6064
* kEventClassWindow / kEventWindowCloseAll
6067
* A request to close all windows.
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.
6076
* Mac OS X threading:
6081
* --> kEventParamDirectObject (in, typeWindowRef)
6082
* The window whose close button was clicked.
6085
* Mac OS X: in version 10.0 and later in Carbon.framework
6086
* CarbonLib: in CarbonLib 1.1 and later
6089
kEventWindowCloseAll = 74;
6092
* kEventClassWindow / kEventWindowZoom
6095
* A request to zoom a window.
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
6106
* Mac OS X threading:
6111
* --> kEventParamDirectObject (in, typeWindowRef)
6112
* The window that should zoom.
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
6128
* Mac OS X: in version 10.0 and later in Carbon.framework
6129
* CarbonLib: in CarbonLib 1.1 and later
6132
kEventWindowZoom = 75;
6135
* kEventClassWindow / kEventWindowZoomAll
6138
* A request to zoom all windows.
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.
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.
6156
* Mac OS X threading:
6161
* --> kEventParamDirectObject (in, typeWindowRef)
6162
* The window whose zoom button was clicked.
6165
* Mac OS X: in version 10.0 and later in Carbon.framework
6166
* CarbonLib: in CarbonLib 1.1 and later
6169
kEventWindowZoomAll = 77;
6172
* kEventClassWindow / kEventWindowContextualMenuSelect
6175
* A request to display a contextual menu.
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.
6189
* Mac OS X threading:
6194
* --> kEventParamDirectObject (in, typeWindowRef)
6195
* The window that should collapse.
6197
* --> kEventParamMouseLocation (in, typeHIPoint)
6198
* The mouse location, in global coordinates.
6200
* --> kEventParamWindowRef (in, typeWindowRef)
6201
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
6217
* --> kEventParamKeyModifiers (in, typeUInt32)
6218
* The keyboard modifiers that were pressed when the event was
6221
* --> kEventParamMouseButton (in, typeMouseButton)
6222
* Which mouse button was pressed.
6224
* --> kEventParamClickCount (in, typeUInt32)
6225
* Whether this is a single click, double click, etc.
6227
* --> kEventParamMouseChord (in, typeUInt32)
6228
* Which other mouse buttons were pressed when the event was
6229
* generated. Available on Mac OS X only.
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.
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
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.
6252
* Mac OS X: in version 10.0 and later in Carbon.framework
6253
* CarbonLib: in CarbonLib 1.1 and later
6256
kEventWindowContextualMenuSelect = 78;
6259
* kEventClassWindow / kEventWindowPathSelect
6262
* Allows customization of the path-selection popup menu displayed
6263
* over a window�s title.
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.
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
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.
6290
* Mac OS X threading:
6295
* --> kEventParamDirectObject (in, typeWindowRef)
6296
* The window that will display the path-selection popup menu.
6298
* <-- kEventParamMenuRef (out, typeMenuRef)
6299
* On exit, contains the menu that should be displayed.
6302
* Mac OS X: in version 10.0 and later in Carbon.framework
6303
* CarbonLib: in CarbonLib 1.1 and later
6306
kEventWindowPathSelect = 79;
6309
* kEventClassWindow / kEventWindowGetIdealSize
6312
* A request for the ideal size of a window�s content region, for
6313
* use during window zooming.
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.
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.
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.
6333
* Mac OS X threading:
6338
* --> kEventParamDirectObject (in, typeWindowRef)
6339
* The window being zoomed.
6341
* <-- kEventParamDimensions (out, typeQDPoint)
6342
* On exit, contains the window�s ideal size.
6345
* Mac OS X: in version 10.0 and later in Carbon.framework
6346
* CarbonLib: in CarbonLib 1.1 and later
6349
kEventWindowGetIdealSize = 80;
6352
* kEventClassWindow / kEventWindowGetMinimumSize
6355
* A request for the minimum size of a window�s content region, for
6356
* use during window resizing.
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.
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.
6370
* Mac OS X threading:
6375
* --> kEventParamDirectObject (in, typeWindowRef)
6376
* The window being resized.
6378
* <-- kEventParamDimensions (out, typeQDPoint)
6379
* On exit, contains the window�s minimum size.
6382
* Mac OS X: in version 10.0 and later in Carbon.framework
6383
* CarbonLib: in CarbonLib 1.1 and later
6386
kEventWindowGetMinimumSize = 81;
6389
* kEventClassWindow / kEventWindowGetMaximumSize
6392
* A request for the maximum size of a window�s content region, for
6393
* use during window resizing.
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.
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.
6407
* Mac OS X threading:
6412
* --> kEventParamDirectObject (in, typeWindowRef)
6413
* The window being resized.
6415
* <-- kEventParamDimensions (out, typeQDPoint)
6416
* On exit, contains the window�s minimum size.
6419
* Mac OS X: in version 10.0 and later in Carbon.framework
6420
* CarbonLib: in CarbonLib 1.1 and later
6423
kEventWindowGetMaximumSize = 82;
6426
* kEventClassWindow / kEventWindowConstrain
6429
* Requests that a window�s position be constrained to the available
6430
* window positioning bounds.
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.
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
6447
* Applications may also use the
6448
* kEventAppAvailableWindowBoundsChanged event to be notified of
6449
* changes to a device�s available bounds.
6451
* Mac OS X threading:
6456
* --> kEventParamDirectObject (in, typeWindowRef)
6457
* The window being constrained.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
6552
* Mac OS X: in version 10.0 and later in Carbon.framework
6553
* CarbonLib: in CarbonLib 1.5 and later
6556
kEventWindowConstrain = 83;
6559
* kEventClassWindow / kEventWindowProxyBeginDrag
6562
* Notification that a proxy icon drag is beginning.
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.
6569
* Mac OS X threading:
6574
* --> kEventParamDirectObject (in, typeWindowRef)
6575
* The window whose proxy icon is being dragged.
6577
* --> kEventParamDragRef (in, typeDragRef)
6578
* The DragRef that will be used for the proxy icon drag.
6581
* Mac OS X: in version 10.0 and later in Carbon.framework
6582
* CarbonLib: in CarbonLib 1.1 and later
6585
kEventWindowProxyBeginDrag = 128;
6588
* kEventClassWindow / kEventWindowProxyEndDrag
6591
* Notification that a proxy icon drag has ended.
6594
* This event is sent regardless of whether the drag completed
6595
* successfully, or was canceled by the user.
6597
* Mac OS X threading:
6602
* --> kEventParamDirectObject (in, typeWindowRef)
6603
* The window whose proxy icon is being dragged.
6605
* --> kEventParamDragRef (in, typeDragRef)
6606
* The DragRef that was used for the proxy icon drag.
6609
* Mac OS X: in version 10.0 and later in Carbon.framework
6610
* CarbonLib: in CarbonLib 1.1 and later
6613
kEventWindowProxyEndDrag = 129;
6616
* kEventClassWindow / kEventWindowHandleContentClick
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
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
6630
* Mac OS X threading:
6635
* --> kEventParamDirectObject (in, typeWindowRef)
6636
* The window that was clicked.
6638
* --> kEventParamMouseLocation (in, typeHIPoint)
6639
* The mouse location, in global coordinates.
6641
* --> kEventParamWindowRef (in, typeWindowRef)
6642
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
6658
* --> kEventParamKeyModifiers (in, typeUInt32)
6659
* The keyboard modifiers that were pressed when the event was
6662
* --> kEventParamMouseButton (in, typeMouseButton)
6663
* Which mouse button was pressed.
6665
* --> kEventParamClickCount (in, typeUInt32)
6666
* Whether this is a single click, double click, etc.
6668
* --> kEventParamMouseChord (in, typeUInt32)
6669
* Which other mouse buttons were pressed when the event was
6670
* generated. Available on Mac OS X only.
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.
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
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.
6693
* Mac OS X: in version 10.0 and later in Carbon.framework
6694
* CarbonLib: in CarbonLib 1.3.1 and later
6697
kEventWindowHandleContentClick = 85;
6700
* kEventClassWindow / kEventWindowGetDockTileMenu
6703
* A request for a menu to be displayed by a window�s dock tile.
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.
6712
* Mac OS X threading:
6717
* --> kEventParamDirectObject (in, typeWindowRef)
6718
* The window that should collapse.
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.
6728
* Mac OS X: in version 10.2 and later in Carbon.framework
6729
* CarbonLib: not available
6732
kEventWindowGetDockTileMenu = 90;
6735
* kEventClassWindow / kEventWindowToolbarSwitchMode
6738
* A request that the window�s toolbar change its display mode.
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.
6748
* Mac OS X threading:
6753
* --> kEventParamDirectObject (in, typeWindowRef)
6754
* The window whose toolbar button was clicked.
6756
* --> kEventParamMouseLocation (in, typeHIPoint)
6757
* The mouse location, in global coordinates.
6759
* --> kEventParamWindowRef (in, typeWindowRef)
6760
* The window under the mouse. Available in Mac OS X 10.1 and
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.
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.
6776
* --> kEventParamKeyModifiers (in, typeUInt32)
6777
* The keyboard modifiers that were pressed when the event was
6780
* --> kEventParamMouseButton (in, typeMouseButton)
6781
* Which mouse button was pressed.
6783
* --> kEventParamClickCount (in, typeUInt32)
6784
* Whether this is a single click, double click, etc.
6786
* --> kEventParamMouseChord (in, typeUInt32)
6787
* Which other mouse buttons were pressed when the event was
6788
* generated. Available on Mac OS X only.
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.
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
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.
6811
* Mac OS X: in version 10.0 and later in Carbon.framework
6812
* CarbonLib: not available
6815
kEventWindowToolbarSwitchMode = 150;
6818
* kEventClassWindow / kEventWindowFocusAcquired
6821
* Notification that the user (or some other action) has caused the
6822
* focus to shift to your window.
6825
* This event is sent to all handlers registered for it.
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
6835
* Mac OS X threading:
6840
* --> kEventParamDirectObject (in, typeWindowRef)
6841
* The window that is gaining focus.
6844
* Mac OS X: in version 10.0 and later in Carbon.framework
6845
* CarbonLib: in CarbonLib 1.1 and later
6848
kEventWindowFocusAcquired = 200;
6851
* kEventClassWindow / kEventWindowFocusRelinquish
6854
* Notification that a window has lost user focus.
6857
* This event is sent to all handlers registered for it.
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
6868
* Mac OS X threading:
6873
* --> kEventParamDirectObject (in, typeWindowRef)
6874
* The window that is losing focus.
6877
* Mac OS X: in version 10.0 and later in Carbon.framework
6878
* CarbonLib: in CarbonLib 1.1 and later
6881
kEventWindowFocusRelinquish = 201;
6884
* kEventClassWindow / kEventWindowFocusContent
6887
* A request to set the focus to the content area of a window.
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.
6897
* Mac OS X threading:
6902
* --> kEventParamDirectObject (in, typeWindowRef)
6903
* The window whose content should be focused.
6906
* Mac OS X: in version 10.2 and later in Carbon.framework
6907
* CarbonLib: not available
6910
kEventWindowFocusContent = 202;
6913
* kEventClassWindow / kEventWindowFocusToolbar
6916
* A request to set the focus to the toolbar of a window.
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
6926
* Mac OS X threading:
6931
* --> kEventParamDirectObject (in, typeWindowRef)
6932
* The window whose toolbar should be focused.
6935
* Mac OS X: in version 10.2 and later in Carbon.framework
6936
* CarbonLib: not available
6939
kEventWindowFocusToolbar = 203;
6942
* kEventClassWindow / kEventWindowFocusDrawer
6945
* A request to set the focus to the drawer of a window.
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.
6957
* Mac OS X threading:
6962
* --> kEventParamDirectObject (in, typeWindowRef)
6963
* The window whose drawer should be focused.
6965
* --> kEventParamKeyModifiers (in, typeUInt32)
6966
* The keyboard modifiers that were pressed when the user
6967
* requested a focus switch.
6970
* Mac OS X: in version 10.4 and later in Carbon.framework
6971
* CarbonLib: not available
6974
kEventWindowFocusDrawer = 204;
6977
* kEventClassWindow / kEventWindowSheetOpening
6980
* Notification that a sheet is opening.
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.
6987
* Mac OS X threading:
6992
* --> kEventParamDirectObject (in, typeWindowRef)
6993
* The sheet that is opening.
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.
7001
* Mac OS X: in version 10.4 and later in Carbon.framework
7002
* CarbonLib: not available
7005
kEventWindowSheetOpening = 210;
7008
* kEventClassWindow / kEventWindowSheetOpened
7011
* Notification that a sheet is open.
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.
7018
* Mac OS X threading:
7023
* --> kEventParamDirectObject (in, typeWindowRef)
7024
* The sheet that opened.
7027
* Mac OS X: in version 10.4 and later in Carbon.framework
7028
* CarbonLib: not available
7031
kEventWindowSheetOpened = 211;
7034
* kEventClassWindow / kEventWindowSheetClosing
7037
* Notification that a sheet is closing.
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.
7044
* Mac OS X threading:
7049
* --> kEventParamDirectObject (in, typeWindowRef)
7050
* The sheet that is opening.
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.
7058
* Mac OS X: in version 10.4 and later in Carbon.framework
7059
* CarbonLib: not available
7062
kEventWindowSheetClosing = 212;
7065
* kEventClassWindow / kEventWindowSheetClosed
7068
* Notification that a sheet is closed.
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.
7075
* Mac OS X threading:
7080
* --> kEventParamDirectObject (in, typeWindowRef)
7081
* The sheet that closed.
7084
* Mac OS X: in version 10.4 and later in Carbon.framework
7085
* CarbonLib: not available
7088
kEventWindowSheetClosed = 213;
7091
* kEventClassWindow / kEventWindowDrawerOpening
7094
* Notification that a drawer is opening.
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.
7101
* Mac OS X threading:
7106
* --> kEventParamDirectObject (in, typeWindowRef)
7107
* The drawer that is opening.
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.
7115
* Mac OS X: in version 10.2 and later in Carbon.framework
7116
* CarbonLib: not available
7119
kEventWindowDrawerOpening = 220;
7122
* kEventClassWindow / kEventWindowDrawerOpened
7125
* Notification that a drawer is open.
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.
7132
* Mac OS X threading:
7137
* --> kEventParamDirectObject (in, typeWindowRef)
7138
* The drawer that opened.
7141
* Mac OS X: in version 10.2 and later in Carbon.framework
7142
* CarbonLib: not available
7145
kEventWindowDrawerOpened = 221;
7148
* kEventClassWindow / kEventWindowDrawerClosing
7151
* Notification that a drawer is closing.
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.
7158
* Mac OS X threading:
7163
* --> kEventParamDirectObject (in, typeWindowRef)
7164
* The drawer that is opening.
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.
7172
* Mac OS X: in version 10.2 and later in Carbon.framework
7173
* CarbonLib: not available
7176
kEventWindowDrawerClosing = 222;
7179
* kEventClassWindow / kEventWindowDrawerClosed
7182
* Notification that a drawer is closed.
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.
7189
* Mac OS X threading:
7194
* --> kEventParamDirectObject (in, typeWindowRef)
7195
* The drawer that closed.
7198
* Mac OS X: in version 10.2 and later in Carbon.framework
7199
* CarbonLib: not available
7202
kEventWindowDrawerClosed = 223;
7205
* kEventClassWindow / kEventWindowDrawFrame
7208
* Sent by the Window Manager when it�s time to draw a window�s
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).
7216
* Mac OS X threading:
7221
* --> kEventParamDirectObject (in, typeWindowRef)
7222
* The window to draw.
7225
* Mac OS X: in version 10.0 and later in Carbon.framework
7226
* CarbonLib: in CarbonLib 1.1 and later
7229
kEventWindowDrawFrame = 1000;
7232
* kEventClassWindow / kEventWindowDrawPart
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.
7239
* This is typically sent during window widget tracking.
7241
* Mac OS X threading:
7246
* --> kEventParamDirectObject (in, typeWindowRef)
7247
* The window to draw.
7249
* --> kEventParamWindowDefPart (in, typeWindowDefPartCode)
7253
* Mac OS X: in version 10.0 and later in Carbon.framework
7254
* CarbonLib: in CarbonLib 1.1 and later
7257
kEventWindowDrawPart = 1001;
7260
* kEventClassWindow / kEventWindowGetRegion
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.
7266
* Mac OS X threading:
7271
* --> kEventParamDirectObject (in, typeWindowRef)
7272
* The window whose region to return.
7274
* --> kEventParamWindowRegionCode (in, typeWindowRegionCode)
7275
* The region to return.
7277
* --> kEventParamRgnHandle (in, typeQDRgnHandle)
7278
* On entry, contains a valid but empty RgnHandle; you should
7279
* place the window region in this RgnHandle.
7282
* Mac OS X: in version 10.0 and later in Carbon.framework
7283
* CarbonLib: in CarbonLib 1.1 and later
7286
kEventWindowGetRegion = 1002;
7289
* kEventClassWindow / kEventWindowHitTest
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
7296
* Mac OS X threading:
7301
* --> kEventParamDirectObject (in, typeWindowRef)
7302
* The window to hit-test.
7304
* --> kEventParamMouseLocation (in, typeQDPoint)
7305
* The mouse location.
7307
* <-- kEventParamWindowDefPart (out, typeWindowDefPartCode)
7308
* On exit, contains the window part that was hit.
7311
* Mac OS X: in version 10.0 and later in Carbon.framework
7312
* CarbonLib: in CarbonLib 1.1 and later
7315
kEventWindowHitTest = 1003;
7318
* kEventClassWindow / kEventWindowInit
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.
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.
7330
* Mac OS X threading:
7335
* --> kEventParamDirectObject (in, typeWindowRef)
7336
* The window being created.
7338
* <-- kEventParamWindowFeatures (out, typeUInt32)
7339
* On exit, your event handler should store the window
7340
* features in this parameter.
7343
* Mac OS X: in version 10.0 and later in Carbon.framework
7344
* CarbonLib: in CarbonLib 1.1 and later
7347
kEventWindowInit = 1004;
7350
* kEventClassWindow / kEventWindowDispose
7353
* Sent by the Window Manager to notify the window definition that
7354
* it should dispose of any private data structures attached to the
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.
7368
* Mac OS X threading:
7373
* --> kEventParamDirectObject (in, typeWindowRef)
7374
* The window being destroyed.
7377
* Mac OS X: in version 10.0 and later in Carbon.framework
7378
* CarbonLib: in CarbonLib 1.1 and later
7381
kEventWindowDispose = 1005;
7384
* kEventClassWindow / kEventWindowDragHilite
7387
* Sent by the Window Manager when it is time to draw/erase any drag
7388
* hilite in the window structure.
7391
* This is typically sent from within HiliteWindowFrameForDrag.
7393
* Mac OS X threading:
7398
* --> kEventParamDirectObject (in, typeWindowRef)
7399
* The window being hilited.
7401
* --> kEventParamWindowDragHiliteFlag (in, typeBoolean)
7402
* Whether to draw (true) or erase (false) the hilite.
7405
* Mac OS X: in version 10.0 and later in Carbon.framework
7406
* CarbonLib: in CarbonLib 1.1 and later
7409
kEventWindowDragHilite = 1006;
7412
* kEventClassWindow / kEventWindowModified
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.
7419
* This is typically sent from within SetWindowModified.
7421
* Mac OS X threading:
7426
* --> kEventParamDirectObject (in, typeWindowRef)
7427
* The window that was modified.
7429
* --> kEventParamWindowModifiedFlag (in, typeBoolean)
7430
* The new modified state.
7433
* Mac OS X: in version 10.0 and later in Carbon.framework
7434
* CarbonLib: in CarbonLib 1.1 and later
7437
kEventWindowModified = 1007;
7440
* kEventClassWindow / kEventWindowSetupProxyDragImage
7443
* Sent by the Window Manager when it is time to generate a drag
7444
* image for the window proxy.
7447
* This is typically sent from within BeginWindowProxyDrag.
7449
* Mac OS X threading:
7454
* --> kEventParamDirectObject (in, typeWindowRef)
7455
* The window whose proxy is being dragged.
7457
* <-- kEventParamWindowProxyGWorldPtr (out, typeGWorldPtr)
7458
* On exit, contains a GWorld you allocate which contains the
7461
* --> kEventParamWindowProxyImageRgn (in, typeQDRgnHandle)
7462
* The region you modify to contain the clip region for the
7465
* --> kEventParamWindowProxyOutlineRgn (in, typeQDRgnHandle)
7466
* The region you modify to contain the drag outline used when
7467
* the GWorld cannot be used.
7470
* Mac OS X: in version 10.0 and later in Carbon.framework
7471
* CarbonLib: in CarbonLib 1.1 and later
7474
kEventWindowSetupProxyDragImage = 1008;
7477
* kEventClassWindow / kEventWindowStateChanged
7480
* Sent by the Window Manager when a particular window state changes.
7483
* See the state-change flags in MacWindows.h.
7485
* Mac OS X threading:
7490
* --> kEventParamDirectObject (in, typeWindowRef)
7491
* The window whose state was changed.
7493
* --> kEventParamWindowStateChangedFlags (in, typeUInt32)
7494
* The state change flags
7497
* Mac OS X: in version 10.0 and later in Carbon.framework
7498
* CarbonLib: in CarbonLib 1.1 and later
7501
kEventWindowStateChanged = 1009;
7504
* kEventClassWindow / kEventWindowMeasureTitle
7507
* Sent when the Window Manager needs to know how much space the
7508
* window�s title area takes up.
7510
* Mac OS X threading:
7515
* --> kEventParamDirectObject (in, typeWindowRef)
7516
* The window whose title to measure.
7518
* <-- kEventParamWindowTitleFullWidth (out, typeSInt16)
7519
* On exit, contains the length of the whole title area.
7521
* <-- kEventParamWindowTitleTextWidth (out, typeSInt16)
7522
* On exit, contains the length just the title text.
7525
* Mac OS X: in version 10.0 and later in Carbon.framework
7526
* CarbonLib: in CarbonLib 1.1 and later
7529
kEventWindowMeasureTitle = 1010;
7532
* kEventClassWindow / kEventWindowDrawGrowBox
7535
* When the DrawGrowIcon API is called, this event is sent to the
7536
* window to tell it to draw the grow box.
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.
7544
* Mac OS X threading:
7549
* --> kEventParamDirectObject (in, typeWindowRef)
7550
* The window whose grow box to draw.
7553
* Mac OS X: in version 10.0 and later in Carbon.framework
7554
* CarbonLib: in CarbonLib 1.1 and later
7557
kEventWindowDrawGrowBox = 1011;
7560
* kEventClassWindow / kEventWindowGetGrowImageRegion
7563
* This is a special way for a window to override the standard
7564
* resize outline for windows that do not do live resizing.
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.
7572
* Mac OS X threading:
7577
* --> kEventParamDirectObject (in, typeWindowRef)
7578
* The window whose grow image to return.
7580
* --> kEventParamWindowGrowRect (in, typeQDRectangle)
7581
* The window�s global port bounds.
7583
* --> kEventParamRgnHandle (in, typeQDRgnHandle)
7584
* The region to modify.
7587
* Mac OS X: in version 10.0 and later in Carbon.framework
7588
* CarbonLib: in CarbonLib 1.1 and later
7591
kEventWindowGetGrowImageRegion = 1012;
7594
* kEventClassWindow / kEventWindowPaint
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
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.
7608
* Mac OS X threading:
7613
* --> kEventParamDirectObject (in, typeWindowRef)
7614
* The window to paint.
7617
* Mac OS X: in version 10.0 and later in Carbon.framework
7618
* CarbonLib: not available
7621
kEventWindowPaint = 1013;
7623
{--------------------------------------------------------------------------------------}
7625
{--------------------------------------------------------------------------------------}
7627
kEventClassMenu quick reference:
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,
7639
kEventMenuMeasureItemWidth = 100,
7640
kEventMenuMeasureItemHeight = 101,
7641
kEventMenuDrawItem = 102,
7642
kEventMenuDrawItemContent = 103,
7644
kEventMenuDispose = 1001,
7645
kEventMenuCalculateSize = 1004,
7647
-- menu content view events --
7649
kEventMenuCreateFrameView = 1005,
7650
kEventMenuGetFrameBounds = 1006,
7651
kEventMenuBecomeScrollable = 1007,
7652
kEventMenuCeaseToBeScrollable = 1008,
7654
-- menu bar visibility events --
7656
kEventMenuBarShown = 2000,
7657
kEventMenuBarHidden = 2001
7662
* Menu context flags indicate the context or usage of a
7663
* menu-related Carbon event.
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
7673
kMenuContextMenuBar = 1 shl 0; { menu type}
7676
* Indicates that this menu is a pull-down menu inserted in the
7679
kMenuContextPullDown = 1 shl 8;
7682
* Indicates that this menu is a popup menu being displayed by
7685
kMenuContextPopUp = 1 shl 9;
7688
* Indicates that this menu is a submenu of some other pull-down or
7691
kMenuContextSubmenu = 1 shl 10; { menu usage}
7694
* Indicates that this Carbon event has been sent during a menubar
7697
kMenuContextMenuBarTracking = 1 shl 16;
7700
* Indicates that this Carbon event has been sent during a popup menu
7703
kMenuContextPopUpTracking = 1 shl 17;
7706
* Indicates that this Carbon event has been sent during command key
7709
kMenuContextKeyMatching = 1 shl 18;
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.
7718
kMenuContextMenuEnabling = 1 shl 19;
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.
7726
kMenuContextCommandIDSearch = 1 shl 20;
7735
* Indicates that the menu should be placed to the right of its
7738
kHIMenuRightDirection = 0;
7741
* Indicates that the menu should be placed to the left of its parent.
7743
kHIMenuLeftDirection = 1;
7746
* Indicates that the menu should be centered on its parent.
7748
kHIMenuCenterDirection = 2;
7751
* kEventClassMenu / kEventMenuBeginTracking
7754
* The user has begun tracking the menubar or a pop-up menu.
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.
7761
* Mac OS X threading:
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.
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.
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.
7783
* The handler may return userCanceledErr to stop menu tracking.
7786
* Mac OS X: in version 10.0 and later in Carbon.framework
7787
* CarbonLib: in CarbonLib 1.1 and later
7790
kEventMenuBeginTracking = 1;
7793
* kEventClassMenu / kEventMenuEndTracking
7796
* The user has finished tracking the menubar or a popup menu
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.
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.
7814
* Mac OS X threading:
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.
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.
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.
7836
* Mac OS X: in version 10.0 and later in Carbon.framework
7837
* CarbonLib: in CarbonLib 1.1 and later
7840
kEventMenuEndTracking = 2;
7843
* kEventClassMenu / kEventMenuChangeTrackingMode
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.
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.
7855
* Mac OS X threading:
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.
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.
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.
7875
* --> kEventParamMenuContext (in, typeUInt32)
7876
* Menu context flags indicating what type of menu is being
7880
* Mac OS X: in version 10.1 and later in Carbon.framework
7881
* CarbonLib: not available
7884
kEventMenuChangeTrackingMode = 3;
7887
* kEventClassMenu / kEventMenuOpening
7890
* A menu is opening.
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.
7900
* Mac OS X threading:
7905
* --> kEventParamDirectObject (in, typeMenuRef)
7906
* The menu being opened.
7908
* --> kEventParamMenuFirstOpen (in, typeBoolean)
7909
* Whether this is the first time this menu has been opened
7910
* during this menu tracking session.
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.
7917
* On Mac OS X, the handler may return userCanceledErr to prevent
7918
* this menu from opening
7921
* Mac OS X: in version 10.0 and later in Carbon.framework
7922
* CarbonLib: in CarbonLib 1.1 and later
7925
kEventMenuOpening = 4;
7928
* kEventClassMenu / kEventMenuClosed
7931
* A menu has been closed.
7934
* This event is sent to all handlers registered for it. It is sent
7935
* after the menu is hidden.
7937
* Mac OS X threading:
7942
* --> kEventParamDirectObject (in, typeMenuRef)
7943
* The menu being closed.
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.
7950
* Mac OS X: in version 10.0 and later in Carbon.framework
7951
* CarbonLib: in CarbonLib 1.1 and later
7954
kEventMenuClosed = 5;
7957
* kEventClassMenu / kEventMenuTargetItem
7960
* The mouse is moving over a particular menu item.
7963
* This event is sent to all handlers registered for it. It is sent
7964
* for both enabled and disabled items.
7966
* Mac OS X threading:
7971
* --> kEventParamDirectObject (in, typeMenuRef)
7972
* The menu being tracked.
7974
* --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
7975
* The menu item under the mouse.
7977
* --> kEventParamMenuCommand (in, typeMenuCommand)
7978
* The command ID associated with this menu item.
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.
7985
* Mac OS X: in version 10.0 and later in Carbon.framework
7986
* CarbonLib: in CarbonLib 1.1 and later
7989
kEventMenuTargetItem = 6;
7993
* kEventClassMenu / kEventMenuMatchKey
7996
* A menu is about to be examined for items that match a command key
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
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
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.
8022
* Mac OS X threading:
8027
* --> kEventParamDirectObject (in, typeMenuRef)
8028
* The menu being searched for a command key match.
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.
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.
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.
8056
* <-- kEventParamMenuItemIndex (out, typeMenuItemIndex)
8057
* On exit, contains the menu item index that matched the
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.
8069
* Mac OS X: in version 10.0 and later in Carbon.framework
8070
* CarbonLib: in CarbonLib 1.1 and later
8073
kEventMenuMatchKey = 7;
8077
* kEventClassMenu / kEventMenuEnableItems
8080
* A request that the items in the menu be properly enabled or
8081
* disabled according to the current state of the application.
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.
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.
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.
8115
* This event is sent first to the target menu, and then to the user
8118
* Mac OS X threading:
8123
* --> kEventParamDirectObject (in, typeMenuRef)
8124
* The menu being enabled.
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
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.
8141
* Mac OS X: in version 10.0 and later in Carbon.framework
8142
* CarbonLib: in CarbonLib 1.1 and later
8145
kEventMenuEnableItems = 8;
8149
* kEventClassMenu / kEventMenuPopulate
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.
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.
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.
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.
8189
* Mac OS X threading:
8194
* --> kEventParamDirectObject (in, typeMenuRef)
8195
* The menu to be populated.
8197
* --> kEventParamMenuContext (in, typeUInt32)
8198
* The context in which this menu is being populated.
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.
8207
* Mac OS X: in version 10.1 and later in Carbon.framework
8208
* CarbonLib: in CarbonLib 1.5 and later
8211
kEventMenuPopulate = 9;
8215
* kEventClassMenu / kEventMenuDispose
8218
* Sent when a menu definition should disconnect itself from a menu.
8221
* This event is sent to all handlers registered for it.
8223
* Mac OS X threading:
8228
* --> kEventParamDirectObject (in, typeMenuRef)
8229
* The menu being destroyed.
8232
* Mac OS X: in version 10.0 and later in Carbon.framework
8233
* CarbonLib: in CarbonLib 1.1 and later
8236
kEventMenuDispose = 1001;
8239
* kEventClassMenu / kEventMenuMeasureItemWidth
8242
* Requests measurement of the width of a menu item.
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.
8252
* Mac OS X threading:
8257
* --> kEventParamDirectObject (in, typeMenuRef)
8258
* The menu that is being measured.
8260
* --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
8261
* The menu item that is being measured.
8263
* <-- kEventParamMenuItemWidth (out, typeShortInteger)
8264
* On exit, contains the menu item width.
8267
* Mac OS X: in version 10.1 and later in Carbon.framework
8268
* CarbonLib: in CarbonLib 1.5 and later
8271
kEventMenuMeasureItemWidth = 100;
8275
* kEventClassMenu / kEventMenuMeasureItemHeight
8278
* Requests measurement of the height of a menu item.
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.
8288
* Mac OS X threading:
8293
* --> kEventParamDirectObject (in, typeMenuRef)
8294
* The menu that is being measured.
8296
* --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
8297
* The menu item that is being measured.
8299
* <-- kEventParamMenuItemHeight (out, typeShortInteger)
8300
* On exit, contains the menu item height.
8303
* Mac OS X: in version 10.1 and later in Carbon.framework
8304
* CarbonLib: in CarbonLib 1.5 and later
8307
kEventMenuMeasureItemHeight = 101;
8311
* kEventClassMenu / kEventMenuDrawItem
8314
* Requests drawing of an entire menu item, including its background.
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.
8327
* Mac OS X threading:
8332
* --> kEventParamDirectObject (in, typeMenuRef)
8333
* The menu being drawn.
8335
* --> kEventParamCurrentBounds (in, typeQDRectangle)
8336
* The bounds of the menu, in global coordinates
8338
* --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
8339
* The menu item being drawn.
8341
* --> kEventParamMenuItemBounds (in, typeQDRectangle)
8342
* The bounds of the menu item, in local coordinates of the
8345
* --> kEventParamMenuVirtualTop (in, typeLongInteger)
8346
* The virtual top coordinate of the menu, in global
8349
* --> kEventParamMenuVirtualBottom (in, typeLongInteger)
8350
* The virtual bottom coordinate of the menu, in global
8353
* --> kEventParamMenuDrawState (in, typeThemeMenuState)
8354
* The ThemeMenuState of the menu.
8356
* --> kEventParamMenuItemType (in, typeThemeMenuItemType)
8357
* The type of menu item.
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 ).
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.
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
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.
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.
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.
8398
* Mac OS X: in version 10.1 and later in Carbon.framework
8399
* CarbonLib: in CarbonLib 1.5 and later
8402
kEventMenuDrawItem = 102;
8406
* kEventClassMenu / kEventMenuDrawItemContent
8409
* Requests drawing of a menu item�s content: its text, command key,
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.
8433
* Mac OS X threading:
8438
* --> kEventParamDirectObject (in, typeMenuRef)
8439
* The menu being drawn.
8441
* --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
8442
* The menu item being drawn.
8444
* --> kEventParamMenuItemBounds (in, typeQDRectangle)
8445
* The bounds of the menu item, in local coordinates of the
8448
* --> kEventParamDeviceDepth (in, typeShortInteger)
8449
* The bit depth of the GDevice on which the menu is being
8452
* --> kEventParamDeviceColor (in, typeBoolean)
8453
* Whether the GDevice on which the menu is being drawn is in
8454
* black&white or color mode.
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 ).
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.
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
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.
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.
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.
8495
* Mac OS X: in version 10.1 and later in Carbon.framework
8496
* CarbonLib: in CarbonLib 1.5 and later
8499
kEventMenuDrawItemContent = 103;
8502
* kEventClassMenu / kEventMenuCalculateSize
8505
* Requests that a menu calculate its total size.
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
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
8525
* This event is sent only to the menu, and is not propagated past
8528
* Mac OS X threading:
8533
* --> kEventParamDirectObject (in, typeMenuRef)
8534
* The menu being measured.
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.
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.
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
8555
* <-- kEventParamDimensions (out, typeHISize)
8556
* On exit, contains the menu's size.
8559
* Mac OS X: in version 10.3 and later in Carbon.framework
8560
* CarbonLib: not available
8563
kEventMenuCalculateSize = 1004;
8566
* kEventClassMenu / kEventMenuCreateFrameView
8569
* Requests that a menu content view create the HIView that will
8570
* used to draw the menu window frame.
8573
* The HIMenuView class provides a default handler for this event
8574
* that creates an instance of the standard menu window frame view.
8577
* This event is sent only to the menu content view, and is not
8578
* propagated past the view.
8580
* Mac OS X threading:
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
8590
* --> kEventParamMenuType (in, typeThemeMenuType)
8591
* The type of menu frame (pull-down, popup, or hierarchical)
8594
* <-- kEventParamMenuFrameView (out, typeControlRef)
8595
* On exit, contains the newly created menu frame view.
8598
* Mac OS X: in version 10.3 and later in Carbon.framework
8599
* CarbonLib: not available
8602
kEventMenuCreateFrameView = 1005;
8605
* kEventClassMenu / kEventMenuGetFrameBounds
8608
* Requests that a menu content view calculate the bounding rect, in
8609
* global coordinates, of the menu window frame that should contain
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.
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.
8624
* This event is sent only to the menu content view, and is not
8625
* propagated past the view.
8627
* Mac OS X threading:
8632
* --> kEventParamMenuType (in, typeThemeMenuType)
8633
* The type of menu (pull-down, popup, or hierarchical) that
8634
* is being displayed.
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.
8642
* --> kEventParamMenuFrameView (in, typeControlRef)
8643
* The menu window frame view.
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.
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
8658
* --> kEventParamGDevice (in, typeGDHandle)
8659
* The GDevice on which the menu should be displayed.
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.
8666
* --> kEventParamParentMenu (in, typeMenuRef)
8667
* Only available when kEventParamMenuType is
8668
* kThemeMenuTypeHierarchical. The parent menu of this menu.
8670
* --> kEventParamParentMenuItem (in, typeMenuItemIndex)
8671
* Only available when kEventParamMenuType is
8672
* kThemeMenuTypeHierarchical. The parent menu item of this
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.
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
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.
8691
* Mac OS X: in version 10.3 and later in Carbon.framework
8692
* CarbonLib: not available
8695
kEventMenuGetFrameBounds = 1006;
8698
* kEventClassMenu / kEventMenuBecomeScrollable
8701
* Requests that a menu content view prepare to be scrollable, by
8702
* installing the appropriate event handlers, timers, etc.
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
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.
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.
8719
* This event is sent only to the menu content view, and is not
8720
* propagated past the view.
8722
* Mac OS X threading:
8726
* Mac OS X: in version 10.3 and later in Carbon.framework
8727
* CarbonLib: not available
8730
kEventMenuBecomeScrollable = 1007;
8733
* kEventClassMenu / kEventMenuCeaseToBeScrollable
8736
* Requests that a menu content view cease to be scrollable.
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.
8745
* The Menu Manager provides a default handler for this event that
8746
* removes event handlers installed in response to
8747
* kEventMenuBecomeScrollable.
8749
* This event is sent only to the menu content view, and is not
8750
* propagated past the view.
8752
* Mac OS X threading:
8756
* Mac OS X: in version 10.3 and later in Carbon.framework
8757
* CarbonLib: not available
8760
kEventMenuCeaseToBeScrollable = 1008;
8763
* kEventClassMenu / kEventMenuBarShown
8766
* Notification that the menubar in the frontmost process has been
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.
8775
* Mac OS X threading:
8779
* Mac OS X: in version 10.3 and later in Carbon.framework
8780
* CarbonLib: not available
8783
kEventMenuBarShown = 2000;
8786
* kEventClassMenu / kEventMenuBarHidden
8789
* Notification that the menubar in the frontmost process has been
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.
8798
* Mac OS X threading:
8802
* Mac OS X: in version 10.3 and later in Carbon.framework
8803
* CarbonLib: not available
8806
kEventMenuBarHidden = 2001;
8808
{--------------------------------------------------------------------------------------}
8810
{--------------------------------------------------------------------------------------}
8812
kEventClassCommand quick reference:
8814
kEventCommandProcess = 1,
8815
kEventCommandUpdateStatus = 2
8818
* kEventClassCommand / kEventCommandProcess
8821
* A command has been invoked and the application should handle it.
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.
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.
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.
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.
8864
* Mac OS X threading:
8869
* --> kEventParamDirectObject (in, typeHICommand)
8870
* The command to be handled.
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.
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.
8884
* Mac OS X: in version 10.0 and later in Carbon.framework
8885
* CarbonLib: in CarbonLib 1.1 and later
8888
kEventCommandProcess = 1;
8891
* kEventClassCommand / kEventCommandUpdateStatus
8894
* A command-generating user interface element requires updating.
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.
8906
* Currently, this event is only sent for menu items; it is not used
8907
* to update the status of controls.
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.
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.
8934
* Mac OS X threading:
8939
* --> kEventParamDirectObject (in, typeHICommand)
8940
* The command to be updated.
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.
8949
* Mac OS X: in version 10.0 and later in Carbon.framework
8950
* CarbonLib: in CarbonLib 1.1 and later
8953
kEventCommandUpdateStatus = 2;
8959
* Common command IDs
8963
* The OK button in a dialog or alert.
8965
kHICommandOK = $6F6B2020 (* 'ok ' *);
8968
* The Cancel button in a dialog or alert.
8970
kHICommandCancel = $6E6F7421 (* 'not!' *);
8973
* The application should quit.
8975
kHICommandQuit = $71756974 (* 'quit' *);
8978
* The last editing operation should be undone.
8980
kHICommandUndo = $756E646F (* 'undo' *);
8983
* The last editing operation should be redone.
8985
kHICommandRedo = $7265646F (* 'redo' *);
8988
* The selected items should be cut.
8990
kHICommandCut = $63757420 (* 'cut ' *);
8993
* The selected items should be copied.
8995
kHICommandCopy = $636F7079 (* 'copy' *);
8998
* The contents of the clipboard should be pasted.
9000
kHICommandPaste = $70617374 (* 'past' *);
9003
* The selected items should be deleted.
9005
kHICommandClear = $636C6561 (* 'clea' *);
9008
* All items in the active window should be selected.
9010
kHICommandSelectAll = $73616C6C (* 'sall' *);
9013
* The application should be hidden. The Menu Manager will respond to
9014
* this command automatically; your application does not need to
9017
kHICommandHide = $68696465 (* 'hide' *);
9020
* Other applications should be hidden. The Menu Manager will respond
9021
* to this command automatically; your application does not need to
9024
kHICommandHideOthers = $6869646F (* 'hido' *);
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.
9031
kHICommandShowAll = $7368616C (* 'shal' *);
9034
* The Preferences menu item has been selected.
9036
kHICommandPreferences = $70726566 (* 'pref' *);
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.
9045
kHICommandZoomWindow = $7A6F6F6D (* 'zoom' *);
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.
9052
kHICommandMinimizeWindow = $6D696E69 (* 'mini' *);
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.
9059
kHICommandMinimizeAll = $6D696E61 (* 'mina' *);
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.
9066
kHICommandMaximizeWindow = $6D617869 (* 'maxi' *);
9069
* All collapsable windows should be maximized. This command is not
9070
* sent or handled on Mac OS X.
9072
kHICommandMaximizeAll = $6D617861 (* 'maxa' *);
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.
9079
kHICommandArrangeInFront = $66726E74 (* 'frnt' *);
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.
9087
kHICommandBringAllToFront = $62667274 (* 'bfrt' *);
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.
9098
kHICommandWindowListSeparator = $776C6476 (* 'wldv' *);
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.
9108
kHICommandWindowListTerminator = $776C7374 (* 'wlst' *);
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.
9120
kHICommandSelectWindow = $7377696E (* 'swin' *);
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.
9129
kHICommandRotateWindowsForward = $726F7477 (* 'rotw' *);
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.
9138
kHICommandRotateWindowsBackward = $726F7462 (* 'rotb' *);
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.
9147
kHICommandRotateFloatingWindowsForward = $72746677 (* 'rtfw' *);
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.
9156
kHICommandRotateFloatingWindowsBackward = $72746662 (* 'rtfb' *);
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.
9165
kHICommandAbout = $61626F75 (* 'abou' *);
9168
* A new document or item should be created.
9170
kHICommandNew = $6E657720 (* 'new ' *);
9173
* The user wants to open an existing document.
9175
kHICommandOpen = $6F70656E (* 'open' *);
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.
9184
kHICommandClose = $636C6F73 (* 'clos' *);
9187
* The active document should be saved.
9189
kHICommandSave = $73617665 (* 'save' *);
9192
* The user wants to save the active document under a new name.
9194
kHICommandSaveAs = $73766173 (* 'svas' *);
9197
* The contents of the active document should be reverted to the last
9200
kHICommandRevert = $72767274 (* 'rvrt' *);
9203
* The active window should be printed.
9205
kHICommandPrint = $70726E74 (* 'prnt' *);
9208
* The user wants to configure the current page margins, formatting,
9209
* and print options.
9211
kHICommandPageSetup = $70616765 (* 'page' *);
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.
9220
kHICommandAppHelp = $61686C70 (* 'ahlp' *);
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.
9228
kHICommandShowCharacterPalette = $63687270 (* 'chrp' *);
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.
9236
kHICommandShowSpellingPanel = $73687370 (* 'shsp' *);
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
9244
kHICommandCheckSpelling = $636B7370 (* 'cksp' *);
9245
kHICommandChangeSpelling = $63687370 (* 'chsp' *);
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
9253
kHICommandCheckSpellingAsYouType = $61737063 (* 'aspc' *);
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.
9261
kHICommandIgnoreSpelling = $69677370 (* 'igsp' *);
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.
9269
kHICommandLearnWord = $6C727764 (* 'lrwd' *);
9274
* Values for the attributes field of the HICommand and
9275
* HICommandExtended structures.
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.
9285
* Indicates that the command originates from a menu item. The
9286
* HICommand.menu and HICommandExtended.source.menu fields are valid.
9288
kHICommandFromMenu = 1 shl 0;
9291
* Indicates that the command originates from a control. The
9292
* HICommandExtended.source.control field is valid.
9294
kHICommandFromControl = 1 shl 1;
9297
* Indicates that the command originates from a window. The
9298
* HICommandExtended.source.window field is valid.
9300
kHICommandFromWindow = 1 shl 2;
9307
menuItemIndex: MenuItemIndex;
9309
HICommandPtr = ^HICommand;
9311
HICommandExtended = record
9316
control: ControlRef;
9323
menuItemIndex: MenuItemIndex;
9326
HICommandExtendedPtr = ^HICommandExtended;
9327
{--------------------------------------------------------------------------------------}
9329
{--------------------------------------------------------------------------------------}
9332
kEventClassControl quick reference:
9335
kEventControlInitialize = 1000,
9336
kEventControlDispose = 1001,
9337
kEventControlGetOptimalBounds = 1003,
9338
kEventControlDefInitialize = kEventControlInitialize,
9339
kEventControlDefDispose = kEventControlDispose,
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
9368
kEventControlTrack = 51,
9369
kEventControlGetScrollToHereStartPoint = 52,
9370
kEventControlGetIndicatorDragConstraint = 53,
9371
kEventControlIndicatorMoved = 54,
9372
kEventControlGhostingFinished = 55,
9373
kEventControlGetActionProcPart = 56,
9376
kEventControlGetPartRegion = 101,
9377
kEventControlGetPartBounds = 102,
9378
kEventControlSetData = 103,
9379
kEventControlGetData = 104,
9380
kEventControlGetSizeConstraints = 105,
9381
kEventControlGetFrameMetrics = 106,
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,
9396
kEventControlArbitraryMessage = 201
9400
* kEventClassControl / kEventControlClick
9403
* A mouse down event occurred over a control.
9406
* This event is sent when a non-contextual-menu click occurs over a
9407
* control; a contextual menu click generates
9408
* kEventControlContextualMenuClick instead.
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
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.
9427
* Mac OS X threading:
9432
* --> kEventParamDirectObject (in, typeControlRef)
9433
* The control that was clicked.
9435
* --> kEventParamMouseLocation (in, typeHIPoint)
9436
* The mouse location, in global coordinates.
9438
* --> kEventParamWindowRef (in, typeWindowRef)
9439
* The window under the mouse.
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.
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.
9453
* --> kEventParamKeyModifiers (in, typeUInt32)
9454
* The keyboard modifiers that were pressed when the event was
9457
* --> kEventParamMouseButton (in, typeMouseButton)
9458
* Which mouse button was pressed.
9460
* --> kEventParamClickCount (in, typeUInt32)
9461
* Whether this is a single click, double click, etc.
9463
* --> kEventParamMouseChord (in, typeUInt32)
9464
* Which other mouse buttons were pressed when the event was
9465
* generated. Available on Mac OS X only.
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.
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.
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.
9485
* Mac OS X: in version 10.0 and later in Carbon.framework
9486
* CarbonLib: in CarbonLib 1.3.1 and later
9489
kEventControlClick = 13;
9492
* kEventClassControl / kEventControlHit
9495
* Sent by TrackControl and HandleControlClick after handling a
9496
* click in a control.
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
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.
9515
* Mac OS X threading:
9520
* --> kEventParamDirectObject (in, typeControlRef)
9521
* The control that was tracked.
9523
* --> kEventParamControlPart (in, typeControlPartCode)
9524
* The control part that the mouse was over when it was
9527
* --> kEventParamKeyModifiers (in, typeUInt32)
9528
* The keyboard modifiers that were pressed when the mouse was
9532
* Mac OS X: in version 10.0 and later in Carbon.framework
9533
* CarbonLib: in CarbonLib 1.1 and later
9536
kEventControlHit = 1;
9539
* kEventClassControl / kEventControlInitialize
9542
* Allows the control to initialize private data.
9544
* Mac OS X threading:
9549
* --> kEventParamDirectObject (in, typeControlRef)
9550
* The control that is being created.
9552
* --> kEventParamInitCollection (in, typeCollection)
9553
* Initialization data supplied to CreateCustomControl.
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.
9565
* Mac OS X: in version 10.0 and later in Carbon.framework
9566
* CarbonLib: not available
9569
kEventControlInitialize = 1000;
9572
* kEventClassControl / kEventControlDispose
9575
* Allows the control to dispose of private data.
9577
* Mac OS X threading:
9582
* --> kEventParamDirectObject (in, typeControlRef)
9583
* The control that is being destroyed.
9586
* Mac OS X: in version 10.0 and later in Carbon.framework
9587
* CarbonLib: not available
9590
kEventControlDispose = 1001;
9593
* kEventClassControl / kEventControlGetOptimalBounds
9596
* Allows the control to report its best size and its text baseline
9597
* based on its current settings.
9599
* Mac OS X threading:
9604
* --> kEventParamDirectObject (in, typeControlRef)
9605
* The control whose optimal bounds to return.
9607
* <-- kEventParamControlOptimalBounds (out, typeHIRect)
9608
* On exit, contains the control�s optimal bounds.
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.
9618
* Mac OS X: in version 10.0 and later in Carbon.framework
9619
* CarbonLib: not available
9622
kEventControlGetOptimalBounds = 1003;
9625
* kEventClassControl / kEventControlSimulateHit
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.
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.
9642
* Mac OS X threading:
9647
* --> kEventParamDirectObject (in, typeControlRef)
9648
* The control for which a hit should be simulated.
9650
* --> kEventParamKeyModifiers (in, typeUInt32)
9651
* The keyboard modifiers that should be used for the
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.
9661
* Mac OS X: in version 10.0 and later in Carbon.framework
9662
* CarbonLib: not available
9665
kEventControlSimulateHit = 2;
9668
* kEventClassControl / kEventControlHitTest
9671
* Sent when someone wants to find out what part of your control is
9672
* at a given point in local coordinates.
9674
* Mac OS X threading:
9679
* --> kEventParamDirectObject (in, typeControlRef)
9680
* The control to hit-test.
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.
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.
9693
* Mac OS X: in version 10.0 and later in Carbon.framework
9694
* CarbonLib: not available
9697
kEventControlHitTest = 3;
9700
* kEventClassControl / kEventControlDraw
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.
9707
* Mac OS X threading:
9712
* --> kEventParamDirectObject (in, typeControlRef)
9713
* The control to be drawn.
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.
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
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
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
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.
9755
* Mac OS X: in version 10.0 and later in Carbon.framework
9756
* CarbonLib: not available
9759
kEventControlDraw = 4;
9762
* kEventClassControl / kEventControlApplyBackground
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.
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
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
9786
* Mac OS X threading:
9791
* --> kEventParamDirectObject (in, typeControlRef)
9792
* The control which should apply a background color or
9795
* --> kEventParamControlSubControl (in, typeControlRef)
9796
* The subcontrol that is about to draw.
9798
* --> kEventParamControlDrawDepth (in, typeShortInteger)
9799
* The bit depth of the GDevice on which the subcontrol will
9802
* --> kEventParamControlDrawInColor (in, typeBoolean)
9803
* Whether the GDevice on which the subcontrol will be drawn
9804
* is in color or black & white.
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.
9813
* Mac OS X: in version 10.0 and later in Carbon.framework
9814
* CarbonLib: not available
9817
kEventControlApplyBackground = 5;
9820
* kEventClassControl / kEventControlApplyTextColor
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.
9827
* Mac OS X threading:
9832
* --> kEventParamDirectObject (in, typeControlRef)
9833
* The control which should apply a text color.
9835
* --> kEventParamControlSubControl (in, typeControlRef)
9836
* The subcontrol that is about to draw.
9838
* --> kEventParamControlDrawDepth (in, typeShortInteger)
9839
* The bit depth of the GDevice on which the subcontrol will
9842
* --> kEventParamControlDrawInColor (in, typeBoolean)
9843
* Whether the GDevice on which the subcontrol will be drawn
9844
* is in color or black & white.
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.
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.
9858
* Mac OS X: in version 10.0 and later in Carbon.framework
9859
* CarbonLib: not available
9862
kEventControlApplyTextColor = 6;
9865
* kEventClassControl / kEventControlGetNextFocusCandidate
9868
* Sent so that a given control can customize the focus order of its
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.
9878
* Mac OS X threading:
9883
* --> kEventParamDirectObject (in, typeControlRef)
9884
* The control which should customize the focus order.
9886
* --> kEventParamControlPart (in, typeControlPartCode)
9887
* A focusing meta-part code, either kControlFocusNextPart or
9888
* kControlFocusPrevPart.
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
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.
9904
* Mac OS X: in version 10.2 and later in Carbon.framework
9905
* CarbonLib: not available
9908
kEventControlGetNextFocusCandidate = 14;
9911
* kEventClassControl / kEventControlGetAutoToggleValue
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.
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.
9925
* Mac OS X threading:
9930
* --> kEventParamDirectObject (in, typeControlRef)
9931
* The control that is being toggled.
9933
* --> kEventParamControlPart (in, typeControlPartCode)
9934
* The control part that is being toggled.
9936
* <-- kEventParamControlValue (out, typeLongInteger)
9937
* On exit, contains the new control value.
9940
* Mac OS X: in version 10.2 and later in Carbon.framework
9941
* CarbonLib: not available
9944
kEventControlGetAutoToggleValue = 15;
9947
* kEventClassControl / kEventControlInterceptSubviewClick
9950
* This is sent when the HIViewGetViewForMouseEvent API is called,
9951
* to allow embedding controls to intercept clicks in the their
9952
* embedded controls.
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.
9965
* Mac OS X threading:
9970
* --> kEventParamDirectObject (in, typeControlRef)
9971
* The mouse-down event to intercept.
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.
9979
* Mac OS X: in version 10.2 and later in Carbon.framework
9980
* CarbonLib: not available
9983
kEventControlInterceptSubviewClick = 16;
9986
* kEventClassControl / kEventControlGetClickActivation
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.
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.).
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.
10006
* Mac OS X threading:
10011
* --> kEventParamDirectObject (in, typeControlRef)
10012
* The control that was clicked.
10014
* <-- kEventParamClickActivation (out, typeClickActivationResult)
10015
* On exit, indicates how the click should be handled. Should
10016
* be set a ClickActivationResult constant from Controls.h.
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.
10023
* --> kEventParamWindowRef (in, typeWindowRef)
10024
* The window under the mouse.
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.
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.
10038
* --> kEventParamKeyModifiers (in, typeUInt32)
10039
* The keyboard modifiers that were pressed when the event was
10042
* --> kEventParamMouseButton (in, typeMouseButton)
10043
* Which mouse button was pressed.
10045
* --> kEventParamClickCount (in, typeUInt32)
10046
* Whether this is a single click, double click, etc.
10048
* --> kEventParamMouseChord (in, typeUInt32)
10049
* Which other mouse buttons were pressed when the event was
10050
* generated. Available on Mac OS X only.
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.
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.
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.
10070
* Mac OS X: in version 10.2 and later in Carbon.framework
10071
* CarbonLib: not available
10074
kEventControlGetClickActivation = 17;
10077
* kEventClassControl / kEventControlDragEnter
10080
* A drag has entered your control.
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
10093
* Mac OS X threading:
10098
* --> kEventParamDirectObject (in, typeControlRef)
10099
* The control that is the drag target.
10101
* --> kEventParamDragRef (in, typeDragRef)
10102
* The DragRef for the drag.
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
10110
* Mac OS X: in version 10.2 and later in Carbon.framework
10111
* CarbonLib: not available
10114
kEventControlDragEnter = 18;
10117
* kEventClassControl / kEventControlDragWithin
10120
* A drag has moved with your airspace (but not on any subcontrol).
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.
10128
* Mac OS X threading:
10133
* --> kEventParamDirectObject (in, typeControlRef)
10134
* The control that is the drag target.
10136
* --> kEventParamDragRef (in, typeDragRef)
10137
* The DragRef for the drag.
10140
* Mac OS X: in version 10.2 and later in Carbon.framework
10141
* CarbonLib: not available
10144
kEventControlDragWithin = 19;
10147
* kEventClassControl / kEventControlDragLeave
10150
* A drag is leaving your view.
10153
* Your control will typically respond to this event by removing its
10156
* Mac OS X threading:
10161
* --> kEventParamDirectObject (in, typeControlRef)
10162
* The control that is the drag target.
10164
* --> kEventParamDragRef (in, typeDragRef)
10165
* The DragRef for the drag.
10168
* Mac OS X: in version 10.2 and later in Carbon.framework
10169
* CarbonLib: not available
10172
kEventControlDragLeave = 20;
10175
* kEventClassControl / kEventControlDragReceive
10178
* Congratulations, you are the lucky recipient of a drag. Enjoy it.
10180
* Mac OS X threading:
10185
* --> kEventParamDirectObject (in, typeControlRef)
10186
* The control that is the drag target.
10188
* --> kEventParamDragRef (in, typeDragRef)
10189
* The DragRef for the drag.
10192
* Mac OS X: in version 10.2 and later in Carbon.framework
10193
* CarbonLib: not available
10196
kEventControlDragReceive = 21;
10199
* kEventClassControl / kEventControlSetFocusPart
10202
* Sent when your control is gaining, losing, or changing the focus.
10204
* Mac OS X threading:
10209
* --> kEventParamDirectObject (in, typeControlRef)
10210
* The control that is gaining, losing, or changing focus.
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.
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).
10235
* Mac OS X: in version 10.0 and later in Carbon.framework
10236
* CarbonLib: not available
10239
kEventControlSetFocusPart = 7;
10242
* kEventClassControl / kEventControlGetFocusPart
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.
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.
10254
* Mac OS X threading:
10259
* --> kEventParamDirectObject (in, typeControlRef)
10260
* The control for which to get the current focus.
10262
* <-- kEventParamControlPart (out, typeControlPartCode)
10263
* On exit, contains the current focus for this control.
10266
* Mac OS X: in version 10.0 and later in Carbon.framework
10267
* CarbonLib: not available
10270
kEventControlGetFocusPart = 8;
10273
* kEventClassControl / kEventControlActivate
10276
* Sent when your control becomes active as a result of a call to
10279
* Mac OS X threading:
10284
* --> kEventParamDirectObject (in, typeControlRef)
10285
* The control that was activated.
10288
* Mac OS X: in version 10.0 and later in Carbon.framework
10289
* CarbonLib: not available
10292
kEventControlActivate = 9;
10295
* kEventClassControl / kEventControlDeactivate
10298
* Sent when your control becomes inactive as a result of a call to
10299
* DeactivateControl.
10301
* Mac OS X threading:
10306
* --> kEventParamDirectObject (in, typeControlRef)
10307
* The control that was deactivated.
10310
* Mac OS X: in version 10.0 and later in Carbon.framework
10311
* CarbonLib: not available
10314
kEventControlDeactivate = 10;
10317
* kEventClassControl / kEventControlSetCursor
10320
* Sent when your control is asked to change the cursor as a result
10321
* of a call to HandleControlSetCursor.
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.
10332
* Mac OS X threading:
10337
* --> kEventParamDirectObject (in, typeControlRef)
10338
* The control that should set the cursor.
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.
10345
* --> kEventParamKeyModifiers (in, typeUInt32)
10346
* The current keyboard modifiers.
10349
* Mac OS X: in version 10.0 and later in Carbon.framework
10350
* CarbonLib: not available
10353
kEventControlSetCursor = 11;
10356
* kEventClassControl / kEventControlContextualMenuClick
10359
* Sent when your control is asked to display a contextual menu as a
10360
* result of a call to HandleControlContextualMenuClick.
10362
* Mac OS X threading:
10367
* --> kEventParamDirectObject (in, typeControlRef)
10368
* The control that was clicked.
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.
10376
* --> kEventParamWindowRef (in, typeWindowRef)
10377
* The window under the mouse. Available in Mac OS X 10.3 and
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.
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.
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.
10397
* --> kEventParamMouseButton (in, typeMouseButton)
10398
* Which mouse button was pressed. Available in Mac OS X 10.3
10401
* --> kEventParamClickCount (in, typeUInt32)
10402
* Whether this is a single click, double click, etc.
10403
* Available in Mac OS X 10.3 and later.
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.
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.
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.
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.
10428
* Mac OS X: in version 10.0 and later in Carbon.framework
10429
* CarbonLib: not available
10432
kEventControlContextualMenuClick = 12;
10435
* kEventClassControl / kEventControlTrack
10438
* Sent to allow a control definition to track the mouse in response
10439
* to a call to HIViewClick, HandleControlClick, etc.
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
10451
* Mac OS X threading:
10456
* --> kEventParamDirectObject (in, typeControlRef)
10457
* The control to track.
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.
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.
10471
* --> kEventParamControlAction (in, typeControlActionUPP)
10472
* The control action proc that should be called by the
10473
* control during tracking.
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.
10483
* Mac OS X: in version 10.0 and later in Carbon.framework
10484
* CarbonLib: not available
10487
kEventControlTrack = 51;
10490
* kEventClassControl / kEventControlGetScrollToHereStartPoint
10493
* Sent so your control can support Scroll To Here behavior during
10496
* Mac OS X threading:
10501
* --> kEventParamDirectObject (in, typeControlRef)
10502
* The control for which to retrieve the Scroll To Here point.
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.
10514
* --> kEventParamKeyModifiers (in, typeUInt32)
10515
* The current keyboard modifiers.
10518
* Mac OS X: in version 10.0 and later in Carbon.framework
10519
* CarbonLib: not available
10522
kEventControlGetScrollToHereStartPoint = 52;
10525
* kEventClassControl / kEventControlGetIndicatorDragConstraint
10528
* Sent so your control can constrain the movement of its indicator
10531
* Mac OS X threading:
10536
* --> kEventParamDirectObject (in, typeControlRef)
10537
* The control that is being tracked.
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.
10544
* --> kEventParamKeyModifiers (in, typeUInt32)
10545
* The current keyboard modifiers.
10547
* <-- kEventParamControlIndicatorDragConstraint (out, typeIndicatorDragConstraint)
10548
* On exit, contains an IndicatorDragConstraint structure.
10551
* Mac OS X: in version 10.0 and later in Carbon.framework
10552
* CarbonLib: not available
10555
kEventControlGetIndicatorDragConstraint = 53;
10558
* kEventClassControl / kEventControlIndicatorMoved
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.
10566
* Mac OS X threading:
10571
* --> kEventParamDirectObject (in, typeControlRef)
10572
* The control that is being tracked.
10574
* --> kEventParamDirectObject (in, typeControlRef)
10575
* The new indicator region.
10577
* --> kEventParamControlIndicatorRegion (in, typeQDRgnHandle)
10578
* Indicates whether the control is using non-live-tracking
10579
* (true) or live tracking (false).
10582
* Mac OS X: in version 10.0 and later in Carbon.framework
10583
* CarbonLib: not available
10586
kEventControlIndicatorMoved = 54;
10589
* kEventClassControl / kEventControlGhostingFinished
10592
* Sent at the end of non-live indicator tracking so your control
10593
* can update its value based on the final ghost location.
10595
* Mac OS X threading:
10600
* --> kEventParamDirectObject (in, typeControlRef)
10601
* The control that was being tracked.
10603
* --> kEventParamControlIndicatorOffset (in, typeQDPoint)
10604
* The final offset of the indicator.
10607
* Mac OS X: in version 10.0 and later in Carbon.framework
10608
* CarbonLib: not available
10611
kEventControlGhostingFinished = 55;
10614
* kEventClassControl / kEventControlGetActionProcPart
10617
* Sent during tracking so your control can alter the part that is
10618
* passed to its action proc based on modifier keys, etc.
10620
* Mac OS X threading:
10625
* --> kEventParamDirectObject (in, typeControlRef)
10626
* The control being tracked.
10628
* --> kEventParamKeyModifiers (in, typeUInt32)
10629
* The current keyboard modifiers.
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,
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
10647
* Mac OS X: in version 10.0 and later in Carbon.framework
10648
* CarbonLib: not available
10651
kEventControlGetActionProcPart = 56;
10654
* kEventClassControl / kEventControlGetPartRegion
10657
* Sent by the GetControlRegion, HIViewCopyPartShape, and similar
10658
* APIs when a client wants to get a particular region or shape of
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.
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.
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.
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.
10696
* Mac OS X threading:
10701
* --> kEventParamDirectObject (in, typeControlRef)
10702
* The control whose region/shape to return.
10704
* --> kEventParamControlPart (in, typeControlPartCode)
10705
* The control part code whose region/shape to return.
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.
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.
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
10745
* Mac OS X: in version 10.0 and later in Carbon.framework
10746
* CarbonLib: not available
10749
kEventControlGetPartRegion = 101;
10752
* kEventClassControl / kEventControlGetPartBounds
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.
10758
* Mac OS X threading:
10763
* --> kEventParamDirectObject (in, typeControlRef)
10764
* The control whose bounds to return.
10766
* --> kEventParamControlPart (in, typeControlPartCode)
10767
* The control part whose bounds to return.
10769
* <-- kEventParamControlPartBounds (out, typeHIRect)
10770
* On exit, contains the bounds of the specified part.
10773
* Mac OS X: in version 10.0 and later in Carbon.framework
10774
* CarbonLib: not available
10777
kEventControlGetPartBounds = 102;
10780
* kEventClassControl / kEventControlSetData
10783
* Sent by the SetControlData API when a client wants to change an
10784
* arbitrary setting of your control.
10786
* Mac OS X threading:
10791
* --> kEventParamDirectObject (in, typeControlRef)
10792
* The control for which to set data.
10794
* --> kEventParamControlPart (in, typeControlPartCode)
10795
* The control part for which to set data.
10797
* --> kEventParamControlDataTag (in, typeEnumeration)
10798
* The type of data to set.
10800
* --> kEventParamControlDataBuffer (in, typePtr)
10801
* A pointer to the data.
10803
* --> kEventParamControlDataBufferSize (in, typeLongInteger)
10804
* The size of the data.
10807
* Mac OS X: in version 10.0 and later in Carbon.framework
10808
* CarbonLib: not available
10811
kEventControlSetData = 103;
10814
* kEventClassControl / kEventControlGetData
10817
* Sent by the GetControlData API when a client wants to get an
10818
* arbitrary setting of your control.
10820
* Mac OS X threading:
10825
* --> kEventParamDirectObject (in, typeControlRef)
10826
* The control from which to get data.
10828
* --> kEventParamControlPart (in, typeControlPartCode)
10829
* The control part for which to get data.
10831
* --> kEventParamControlDataTag (in, typeEnumeration)
10832
* The type of data to get.
10834
* --> kEventParamControlDataBuffer (in, typePtr)
10835
* A buffer in which to write the data.
10837
* <-> kEventParamControlDataBufferSize (in/out, typeLongInteger)
10838
* On entry, the size of the data buffer. On exit, the amount
10839
* of data that was available.
10842
* Mac OS X: in version 10.0 and later in Carbon.framework
10843
* CarbonLib: not available
10846
kEventControlGetData = 104;
10849
* kEventClassControl / kEventControlGetSizeConstraints
10852
* Sent by the HIViewGetSizeConstraints API to allow your custom
10853
* control/view to specify its minimum and maximum size.
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
10862
* Mac OS X threading:
10867
* --> kEventParamDirectObject (in, typeControlRef)
10868
* The control for which to get size constraints.
10870
* <-- kEventParamMinimumSize (out, typeHISize)
10871
* On exit, contains the control�s minimum size.
10873
* <-- kEventParamMaximumSize (out, typeHISize)
10874
* On exit, contains the control�s maximum size.
10877
* Mac OS X: in version 10.2 and later in Carbon.framework
10878
* CarbonLib: not available
10881
kEventControlGetSizeConstraints = 105;
10884
* kEventClassControl / kEventControlGetFrameMetrics
10887
* Sent when a control client needs to determine the width of the
10888
* control�s structure region.
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.
10898
* Mac OS X threading:
10903
* --> kEventParamDirectObject (in, typeControlRef)
10904
* The control for which to get frame metrics.
10906
* <-- kEventParamControlFrameMetrics (out, typeControlFrameMetrics)
10907
* On exit, contains the control�s frame metrics.
10910
* Mac OS X: in version 10.3 and later in Carbon.framework
10911
* CarbonLib: not available
10914
kEventControlGetFrameMetrics = 106;
10917
* kEventClassControl / kEventControlValueFieldChanged
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
10924
* Mac OS X threading:
10929
* --> kEventParamDirectObject (in, typeControlRef)
10930
* The control whose value, min, max, or view size has changed.
10933
* Mac OS X: in version 10.0 and later in Carbon.framework
10934
* CarbonLib: not available
10937
kEventControlValueFieldChanged = 151;
10940
* kEventClassControl / kEventControlAddedSubControl
10943
* Sent when a control was embedded within your control.
10945
* Mac OS X threading:
10950
* --> kEventParamDirectObject (in, typeControlRef)
10951
* The control that gained a new subcontrol.
10953
* --> kEventParamControlSubControl (in, typeControlRef)
10954
* The subcontrol that was added.
10957
* Mac OS X: in version 10.0 and later in Carbon.framework
10958
* CarbonLib: not available
10961
kEventControlAddedSubControl = 152;
10964
* kEventClassControl / kEventControlRemovingSubControl
10967
* Sent when one of your child controls will be removed from your
10970
* Mac OS X threading:
10975
* --> kEventParamDirectObject (in, typeControlRef)
10976
* The control that will be losing a subcontrol.
10978
* --> kEventParamControlSubControl (in, typeControlRef)
10979
* The subcontrol that will be removed.
10982
* Mac OS X: in version 10.0 and later in Carbon.framework
10983
* CarbonLib: not available
10986
kEventControlRemovingSubControl = 153;
10989
* kEventClassControl / kEventControlBoundsChanged
10992
* Sent when your control�s bounding rectangle has changed.
10995
* If you want to generate an efficient invalid region in response
10996
* to a size change, you need to handle
10997
* kEventControlInvalidateForSizeChange.
10999
* Mac OS X threading:
11004
* --> kEventParamDirectObject (in, typeControlRef)
11005
* The control whose bounds have changed.
11007
* --> kEventParamAttributes (in, typeUInt32)
11008
* Flags indicating how the bounds changed, including
11009
* kControlBoundsChangeSizeChanged and
11010
* kControlBoundsChangePositionChanged.
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
11019
* --> kEventParamPreviousBounds (in, typeQDRectangle)
11020
* The control�s bounds before the change. This parameter
11021
* always has the same value as the kEventParamOriginalBounds
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.
11031
* Mac OS X: in version 10.0 and later in Carbon.framework
11032
* CarbonLib: not available
11035
kEventControlBoundsChanged = 154;
11038
* kEventClassControl / kEventControlInvalidateForSizeChange
11041
* Sent when a control's size changes so it can invalidate the area
11042
* of itself that needs to be redrawn.
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.
11050
* Mac OS X threading:
11055
* --> kEventParamDirectObject (in, typeControlRef)
11056
* The control whose size has changed.
11058
* --> kEventParamOriginalBounds (in, typeQDRectangle)
11059
* The control�s bounds before the change.
11061
* --> kEventParamCurrentBounds (in, typeQDRectangle)
11062
* The control�s new bounds.
11065
* Mac OS X: in version 10.3 and later in Carbon.framework
11066
* CarbonLib: not available
11069
kEventControlInvalidateForSizeChange = 22;
11072
* kEventClassControl / kEventControlVisibilityChanged
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.
11079
* Mac OS X threading:
11084
* --> kEventParamDirectObject (in, typeControlRef)
11085
* The control whose visibility has changed.
11088
* Mac OS X: in version 10.2 and later in Carbon.framework
11089
* CarbonLib: not available
11092
kEventControlVisibilityChanged = 157;
11095
* kEventClassControl / kEventControlOwningWindowChanged
11098
* Sent when your control�s owning window has changed. Useful to
11099
* udpate any dependencies that your control has on its owning
11102
* Mac OS X threading:
11107
* --> kEventParamDirectObject (in, typeControlRef)
11108
* The control whose owning window has changed.
11110
* --> kEventParamAttributes (in, typeUInt32)
11111
* Currently unused.
11113
* --> kEventParamControlOriginalOwningWindow (in, typeWindowRef)
11114
* The control�s original owning window.
11116
* --> kEventParamControlCurrentOwningWindow (in, typeWindowRef)
11117
* The control�s new owning window.
11120
* Mac OS X: in version 10.0 and later in Carbon.framework
11121
* CarbonLib: not available
11124
kEventControlOwningWindowChanged = 159;
11127
* kEventClassControl / kEventControlTitleChanged
11130
* Sent when the title of your control changes.
11132
* Mac OS X threading:
11137
* --> kEventParamDirectObject (in, typeControlRef)
11138
* The control whose title has changed.
11141
* Mac OS X: in version 10.2 and later in Carbon.framework
11142
* CarbonLib: not available
11145
kEventControlTitleChanged = 158;
11148
* kEventClassControl / kEventControlHiliteChanged
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.
11155
* Mac OS X threading:
11160
* --> kEventParamDirectObject (in, typeControlRef)
11161
* The control whose hilite has changed.
11163
* --> kEventParamControlPreviousPart (in, typeControlPartCode)
11164
* The previously hilited part.
11166
* --> kEventParamControlCurrentPart (in, typeControlPartCode)
11167
* The newly hilited part.
11170
* Mac OS X: in version 10.2 and later in Carbon.framework
11171
* CarbonLib: not available
11174
kEventControlHiliteChanged = 160;
11177
* kEventClassControl / kEventControlEnabledStateChanged
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.
11184
* Mac OS X threading:
11189
* --> kEventParamDirectObject (in, typeControlRef)
11190
* The control whose enabled state has changed.
11193
* Mac OS X: in version 10.2 and later in Carbon.framework
11194
* CarbonLib: not available
11197
kEventControlEnabledStateChanged = 161;
11200
* kEventClassControl / kEventControlLayoutInfoChanged
11203
* Sent when the layout info changes in a control.
11205
* Mac OS X threading:
11210
* --> kEventParamDirectObject (in, typeControlRef)
11211
* The control whose enabled state has changed.
11214
* Mac OS X: in version 10.2 and later in Carbon.framework
11215
* CarbonLib: not available
11218
kEventControlLayoutInfoChanged = 162;
11221
* kEventClassControl / kEventControlArbitraryMessage
11224
* Sent by the SendControlMessage API when someone is trying to send
11225
* an old-style CDEF message to your control.
11227
* Mac OS X threading:
11232
* --> kEventParamDirectObject (in, typeControlRef)
11233
* The control that is receiving the message.
11235
* --> kEventParamControlMessage (in, typeShortInteger)
11238
* --> kEventParamControlParam (in, typeLongInteger)
11239
* The inParam parameter from SendControlMessage.
11241
* <-- kEventParamControlResult (out, typeLongInteger)
11242
* On exit, contains the result that should be returned from
11243
* SendControlMessage.
11246
* Mac OS X: in version 10.0 and later in Carbon.framework
11247
* CarbonLib: not available
11250
kEventControlArbitraryMessage = 201;
11255
* Control bounds change event attributes
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).
11265
* The dimensions of the control (width and height) changed.
11267
kControlBoundsChangeSizeChanged = 1 shl 2;
11270
* The top left corner (position) changed.
11272
kControlBoundsChangePositionChanged = 1 shl 3;
11274
{--------------------------------------------------------------------------------------}
11275
{ Tablet Events (and tablet data in mouse events) }
11276
{--------------------------------------------------------------------------------------}
11278
kEventClassTablet quick reference:
11280
kEventTabletPoint = 1,
11281
kEventTabletProximity = 2,
11284
* kEventClassTablet / kEventTabletPoint
11287
* Indicates that the pen has moved on or near a tablet.
11290
* Same as deprecated kEventTabletPointer.
11292
* Mac OS X threading:
11297
* --> kEventParamTabletPointRec (in, typeTabletPointRec)
11298
* Tablet information for the event.
11301
* Mac OS X: in version 10.0 and later in Carbon.framework
11302
* CarbonLib: not available
11305
kEventTabletPoint = 1;
11308
* kEventClassTablet / kEventTabletProximity
11311
* Indicates that the pen has entered or exited proximity of a
11314
* Mac OS X threading:
11319
* --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
11320
* Tablet information for the event.
11323
* Mac OS X: in version 10.0 and later in Carbon.framework
11324
* CarbonLib: not available
11327
kEventTabletProximity = 2;
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 }
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 }
11365
{--------------------------------------------------------------------------------------}
11367
{--------------------------------------------------------------------------------------}
11369
kEventClassVolume quick reference:
11371
kEventVolumeMounted = 1, // new volume mounted
11372
kEventVolumeUnmounted = 2 // volume has been ejected or unmounted
11375
typeFSVolumeRefNum = $766F6C6E (* 'voln' *); { FSVolumeRefNum}
11378
* kEventClassVolume / kEventVolumeMounted
11381
* A new volume has been mounted (or new media inserted).
11384
* This event is sent to all handlers registered for it.
11386
* Mac OS X threading:
11391
* --> kEventParamDirectObject (in, typeFSVolumeRefNum)
11392
* The volume refnum of the volume that was mounted.
11395
* Mac OS X: in version 10.0 and later in Carbon.framework
11396
* CarbonLib: in CarbonLib 1.3.1 and later
11399
kEventVolumeMounted = 1;
11402
* kEventClassVolume / kEventVolumeUnmounted
11405
* An existing volume has been unmounted (or media ejected).
11408
* This event is sent to all handlers registered for it.
11410
* Mac OS X threading:
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.
11423
* Mac OS X: in version 10.0 and later in Carbon.framework
11424
* CarbonLib: in CarbonLib 1.3.1 and later
11427
kEventVolumeUnmounted = 2;
11429
{--------------------------------------------------------------------------------------}
11430
{ Appearance Events }
11431
{--------------------------------------------------------------------------------------}
11433
kEventClassAppearance quick reference:
11435
kEventAppearanceScrollBarVariantChanged = 1
11438
* kEventClassAppearance / kEventAppearanceScrollBarVariantChanged
11441
* The scroll bar variant has changed. Available on Mac OS X 10.1
11445
* This event is sent to all handlers registered for it on Mac OS X
11448
* Mac OS X threading:
11453
* --> kEventParamNewScrollBarVariant (in, typeShortInteger)
11454
* The new scroll bar variant.
11457
* Mac OS X: in version 10.1 and later in Carbon.framework
11458
* CarbonLib: not available
11461
kEventAppearanceScrollBarVariantChanged = 1;
11463
{--------------------------------------------------------------------------------------}
11464
{ Services Events }
11465
{--------------------------------------------------------------------------------------}
11467
kEventClassService quick reference:
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.
11479
Service events are available on Mac OS X 10.1 and later.
11481
kEventServiceCopy = 1,
11482
kEventServicePaste = 2,
11483
kEventServiceGetTypes = 3,
11484
kEventServicePerform = 4
11487
* kEventClassService / kEventServiceCopy
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.
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.
11505
* Mac OS X threading:
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
11515
* --> kEventParamScrapRef (in, typeScrapRef)
11516
* Data from the current selection should be placed into this
11520
* Mac OS X: in version 10.1 and later in Carbon.framework
11521
* CarbonLib: not available
11524
kEventServiceCopy = 1;
11527
* kEventClassService / kEventServicePaste
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
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.
11545
* Mac OS X threading:
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
11555
* --> kEventParamScrapRef (in, typeScrapRef)
11556
* The current selection should be replaced by data from this
11560
* Mac OS X: in version 10.1 and later in Carbon.framework
11561
* CarbonLib: not available
11564
kEventServicePaste = 2;
11567
* kEventClassService / kEventServiceGetTypes
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.
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).
11583
* Mac OS X threading:
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.
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.
11599
* Mac OS X: in version 10.1 and later in Carbon.framework
11600
* CarbonLib: not available
11603
kEventServiceGetTypes = 3;
11606
* kEventClassService / kEventServicePerform
11609
* If the application is a service provider, this event will get
11610
* sent when a service is requested of the app.
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.
11619
* Mac OS X threading:
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.
11629
* --> kEventParamScrapRef (in, typeScrapRef)
11630
* The scrap that should be used to send and receive data from
11633
* --> kEventParamServiceMessageName (in, typeCFStringRef)
11634
* A string with the name of the advertised service that was
11637
* --> kEventParamServiceUserData (in, typeCFStringRef)
11638
* Extra data provided by the requestor.
11641
* Mac OS X: in version 10.1 and later in Carbon.framework
11642
* CarbonLib: not available
11645
kEventServicePerform = 4;
11648
* CreateTypeStringWithOSType()
11651
* This routine is used to convert an OSType to a CFStringRef that
11652
* services will understand.
11654
* Mac OS X threading:
11660
* The OSType that needs to be converted to a CFString.
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
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
11674
function CreateTypeStringWithOSType( inType: OSType ): CFStringRef; external name '_CreateTypeStringWithOSType';
11675
(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
11679
* kHIServicesMenuProviderName
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.
11686
{$ifc USE_CFSTR_CONSTANT_MACROS}
11687
{$definec kHIServicesMenuProviderName CFSTRP('kHIServicesMenuProviderName')}
11691
* kHIServicesMenuItemName
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.
11698
{$ifc USE_CFSTR_CONSTANT_MACROS}
11699
{$definec kHIServicesMenuItemName CFSTRP('kHIServicesMenuItemName')}
11703
* kHIServicesMenuCharCode
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
11711
{$ifc USE_CFSTR_CONSTANT_MACROS}
11712
{$definec kHIServicesMenuCharCode CFSTRP('kHIServicesMenuCharCode')}
11716
* kHIServicesMenuKeyModifiers
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.
11724
{$ifc USE_CFSTR_CONSTANT_MACROS}
11725
{$definec kHIServicesMenuKeyModifiers CFSTRP('kHIServicesMenuKeyModifiers')}
11728
* CopyServicesMenuCommandKeys()
11731
* Returns an array of CFDictionaryRefs containing information about
11732
* the command-key short cuts for items in the application services
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).
11745
* Mac OS X threading:
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.
11755
* An operating system status code.
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
11762
function CopyServicesMenuCommandKeys( var outCommandKeyArray: CFArrayRef ): OSStatus; external name '_CopyServicesMenuCommandKeys';
11763
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
11766
{--------------------------------------------------------------------------------------}
11767
{ Accessibility Events }
11768
{--------------------------------------------------------------------------------------}
11770
kEventClassAccessibility quick reference:
11772
kEventAccessibleGetChildAtPoint = 1,
11773
kEventAccessibleGetFocusedChild = 2,
11775
kEventAccessibleGetAllAttributeNames = 21,
11776
kEventAccessibleGetAllParameterizedAttributeNames = 25,
11777
kEventAccessibleGetNamedAttribute = 22,
11778
kEventAccessibleSetNamedAttribute = 23,
11779
kEventAccessibleIsNamedAttributeSettable = 24,
11781
kEventAccessibleGetAllActionNames = 41,
11782
kEventAccessiblePerformNamedAction = 42,
11783
kEventAccessibleGetNamedActionDescription = 44
11786
* kEventClassAccessibility / kEventAccessibleGetChildAtPoint
11789
* Finds the child of an accessible object at a given point.
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.
11797
* Mac OS X threading:
11802
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
11803
* The accessible object, in the form of an AXUIElementRef.
11805
* --> kEventParamMouseLocation (in, typeHIPoint)
11806
* The location in global coordinates.
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.
11817
* Mac OS X: in version 10.2 and later in Carbon.framework
11818
* CarbonLib: not available
11821
kEventAccessibleGetChildAtPoint = 1;
11824
* kEventClassAccessibility / kEventAccessibleGetFocusedChild
11827
* Finds the focused child of an accessible object.
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.
11834
* Mac OS X threading:
11839
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
11840
* The accessible object, in the form of an AXUIElementRef.
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.
11851
* Mac OS X: in version 10.2 and later in Carbon.framework
11852
* CarbonLib: not available
11855
kEventAccessibleGetFocusedChild = 2;
11858
* kEventClassAccessibility / kEventAccessibleGetAllAttributeNames
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.
11867
* Mac OS X threading:
11872
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
11873
* The accessible object, in the form of an AXUIElementRef.
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
11881
* Mac OS X: in version 10.2 and later in Carbon.framework
11882
* CarbonLib: not available
11885
kEventAccessibleGetAllAttributeNames = 21;
11888
* kEventClassAccessibility / kEventAccessibleGetAllParameterizedAttributeNames
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.
11898
* Mac OS X threading:
11903
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
11904
* The accessible object, in the form of an AXUIElementRef.
11906
* <-> kEventParamAccessibleAttributeNames (in/out, typeCFMutableArrayRef)
11907
* Add each of the parameterized attribute names supported by
11908
* the accessible object to this array, as CFStringRefs.
11911
* Mac OS X: in version 10.3 and later in Carbon.framework
11912
* CarbonLib: not available
11915
kEventAccessibleGetAllParameterizedAttributeNames = 25;
11918
* kEventClassAccessibility / kEventAccessibleGetNamedAttribute
11921
* Returns the value of an attribute of an accessible object.
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.
11929
* Mac OS X threading:
11934
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
11935
* The accessible object, in the form of an AXUIElementRef.
11937
* --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
11938
* The name of the requested attribute.
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
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).
11956
* Mac OS X: in version 10.2 and later in Carbon.framework
11957
* CarbonLib: not available
11960
kEventAccessibleGetNamedAttribute = 22;
11963
* kEventClassAccessibility / kEventAccessibleSetNamedAttribute
11966
* Sets the value of an attribute of an accessible object.
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.
11975
* Mac OS X threading:
11980
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
11981
* The accessible object, in the form of an AXUIElementRef.
11983
* --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
11984
* The name of the requested attribute.
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
11994
* Mac OS X: in version 10.2 and later in Carbon.framework
11995
* CarbonLib: not available
11998
kEventAccessibleSetNamedAttribute = 23;
12001
* kEventClassAccessibility / kEventAccessibleIsNamedAttributeSettable
12004
* Determines whether an attribute of an accessible object can be
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
12015
* Mac OS X threading:
12020
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
12021
* The accessible object, in the form of an AXUIElementRef.
12023
* --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
12024
* The name of the requested attribute.
12026
* <-- kEventParamAccessibleAttributeSettable (out, typeBoolean)
12027
* On exit, indicates whether the attribute may be modified.
12030
* Mac OS X: in version 10.2 and later in Carbon.framework
12031
* CarbonLib: not available
12034
kEventAccessibleIsNamedAttributeSettable = 24;
12037
* kEventClassAccessibility / kEventAccessibleGetAllActionNames
12040
* Returns the actions supported by an accessible object.
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.
12047
* Mac OS X threading:
12052
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
12053
* The accessible object, in the form of an AXUIElementRef.
12055
* <-> kEventParamAccessibleActionNames (in/out, typeCFMutableArrayRef)
12056
* Add each of the actions supported by the accessible object
12057
* to this array, as CFStringRefs.
12060
* Mac OS X: in version 10.2 and later in Carbon.framework
12061
* CarbonLib: not available
12064
kEventAccessibleGetAllActionNames = 41;
12067
* kEventClassAccessibility / kEventAccessiblePerformNamedAction
12070
* Requests that a specific action be performed by an accessible
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
12095
* Mac OS X threading:
12100
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
12101
* The accessible object, in the form of an AXUIElementRef.
12103
* --> kEventParamAccessibleActionName (in, typeCFStringRef)
12104
* The name of the requested action.
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.
12112
* Mac OS X: in version 10.2 and later in Carbon.framework
12113
* CarbonLib: not available
12116
kEventAccessiblePerformNamedAction = 42;
12119
* kEventClassAccessibility / kEventAccessibleGetNamedActionDescription
12122
* Returns a human-language description of an action supported by an
12123
* accessible object.
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
12133
* Mac OS X threading:
12138
* --> kEventParamAccessibleObject (in, typeCFTypeRef)
12139
* The accessible object, in the form of an AXUIElementRef.
12141
* --> kEventParamAccessibleActionName (in, typeCFStringRef)
12142
* The name of the requested action.
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
12153
* Mac OS X: in version 10.2 and later in Carbon.framework
12154
* CarbonLib: not available
12157
kEventAccessibleGetNamedActionDescription = 44;
12160
* AXUIElementCreateWithHIObjectAndIdentifier()
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.
12173
* Mac OS X threading:
12179
* The HIObjectRef of the accessible object.
12182
* The 64-bit identifier of the accessible object.
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.
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
12196
function AXUIElementCreateWithHIObjectAndIdentifier( inHIObject: HIObjectRef; inIdentifier: UInt64 ): AXUIElementRef; external name '_AXUIElementCreateWithHIObjectAndIdentifier';
12197
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
12201
* AXUIElementGetHIObject()
12204
* If the incoming AXUIElementRef is a Carbon accessible object,
12205
* this routine will return the HIObjectRef of the accessible object.
12207
* Mac OS X threading:
12213
* The AXUIElementRef of whom you'd like to get the HIObjectRef.
12216
* The HIObjectRef of the AXUIElementRef. If the incoming
12217
* AXUIElementRef is not a Carbon accessible object, this routine
12218
* will return NULL.
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
12225
function AXUIElementGetHIObject( inUIElement: AXUIElementRef ): HIObjectRef; external name '_AXUIElementGetHIObject';
12226
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
12230
* AXUIElementGetIdentifier()
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.
12237
* Mac OS X threading:
12243
* The AXUIElementRef of whom you'd like to get the 64-bit
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
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
12259
procedure AXUIElementGetIdentifier( inUIElement: AXUIElementRef; var outIdentifier: UInt64 ); external name '_AXUIElementGetIdentifier';
12260
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
12264
* AXNotificationHIObjectNotify()
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
12273
* Mac OS X threading:
12279
* The notification name string.
12282
* The HIObjectRef component of the AXUIElementRef to whom the
12283
* notification applies.
12286
* The 64-bit identifier component of the AXUIElementRef to whom
12287
* the notification applies.
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
12294
procedure AXNotificationHIObjectNotify( inNotification: CFStringRef; inHIObject: HIObjectRef; inIdentifier: UInt64 ); external name '_AXNotificationHIObjectNotify';
12295
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
12299
* HICopyAccessibilityRoleDescription()
12302
* Returns the role description string for a standard role or a
12303
* standard role-subrole pair.
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.
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.
12322
* Mac OS X threading:
12328
* The role CFStringRef for your accessible object. Callers
12329
* typically pass one of the kAXFooRole constant strings from
12330
* within the HIServices framework.
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.
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.
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
12351
function HICopyAccessibilityRoleDescription( inRole: CFStringRef; inSubrole: CFStringRef { can be NULL } ): CFStringRef; external name '_HICopyAccessibilityRoleDescription';
12352
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
12356
* HICopyAccessibilityActionDescription()
12359
* Returns the action description string for a standard
12360
* accessibility action.
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.
12374
* Mac OS X threading:
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.
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
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
12395
function HICopyAccessibilityActionDescription( inAction: CFStringRef ): CFStringRef; external name '_HICopyAccessibilityActionDescription';
12396
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
12399
{--------------------------------------------------------------------------------------}
12401
{--------------------------------------------------------------------------------------}
12404
kEventClassSystem quick reference:
12406
kEventSystemTimeDateChanged = 2,
12407
kEventSystemUserSessionActivated = 10,
12408
kEventSystemUserSessionDeactivated = 11
12411
* kEventClassSystem / kEventSystemTimeDateChanged
12414
* The system time and/or date has changed via the preferences panel.
12417
* This event is sent to all handlers registered for it on the
12418
* application event target.
12420
* Mac OS X threading:
12424
* Mac OS X: in version 10.3 and later in Carbon.framework
12425
* CarbonLib: not available
12428
kEventSystemTimeDateChanged = 2;
12431
* kEventClassSystem / kEventSystemUserSessionActivated
12434
* The current user login session has been activated.
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.
12442
* Mac OS X threading:
12446
* Mac OS X: in version 10.3 and later in Carbon.framework
12447
* CarbonLib: not available
12450
kEventSystemUserSessionActivated = 10;
12453
* kEventClassSystem / kEventSystemUserSessionDeactivated
12456
* The current user login session has been deactivated.
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
12464
* Mac OS X threading:
12468
* Mac OS X: in version 10.3 and later in Carbon.framework
12469
* CarbonLib: not available
12472
kEventSystemUserSessionDeactivated = 11;
12474
{--------------------------------------------------------------------------------------}
12475
{ Installing Event Handlers }
12476
{--------------------------------------------------------------------------------------}
12478
* GetWindowEventTarget()
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.
12485
* Mac OS X threading:
12491
* The window to return the target for.
12494
* An EventTargetRef.
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
12501
function GetWindowEventTarget( inWindow: WindowRef ): EventTargetRef; external name '_GetWindowEventTarget';
12502
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12506
* GetControlEventTarget()
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.
12513
* Mac OS X threading:
12519
* The control to return the target for.
12522
* An EventTargetRef.
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
12529
function GetControlEventTarget( inControl: ControlRef ): EventTargetRef; external name '_GetControlEventTarget';
12530
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12534
* GetMenuEventTarget()
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.
12541
* Mac OS X threading:
12547
* The menu to return the target for.
12550
* An EventTargetRef.
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
12557
function GetMenuEventTarget( inMenu: MenuRef ): EventTargetRef; external name '_GetMenuEventTarget';
12558
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12562
* GetApplicationEventTarget()
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.
12569
* Mac OS X threading:
12573
* An EventTargetRef.
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
12580
function GetApplicationEventTarget: EventTargetRef; external name '_GetApplicationEventTarget';
12581
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12585
* GetUserFocusEventTarget()
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.
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.
12600
* Mac OS X threading:
12604
* An EventTargetRef.
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
12611
function GetUserFocusEventTarget: EventTargetRef; external name '_GetUserFocusEventTarget';
12612
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12616
* GetEventDispatcherTarget()
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.
12625
* Mac OS X threading:
12629
* An EventTargetRef.
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
12636
function GetEventDispatcherTarget: EventTargetRef; external name '_GetEventDispatcherTarget';
12637
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12641
* GetEventMonitorTarget()
12644
* Returns the event monitor target.
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.
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
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.
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.
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.
12690
* Mac OS X threading:
12694
* An EventTargetRef.
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
12701
function GetEventMonitorTarget: EventTargetRef; external name '_GetEventMonitorTarget';
12702
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
12705
#define InstallApplicationEventHandler( handler, numTypes, list, userData, outHandlerRef ) \
12706
InstallEventHandler( GetApplicationEventTarget(), (handler), (numTypes), (list), (userData), (outHandlerRef) )
12708
#define InstallHIObjectEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
12709
InstallEventHandler( HIObjectGetEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
12711
#define InstallWindowEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
12712
InstallEventHandler( GetWindowEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
12714
#define InstallControlEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
12715
InstallEventHandler( GetControlEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
12717
#define InstallMenuEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
12718
InstallEventHandler( GetMenuEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
12720
#define HIViewInstallEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
12721
InstallEventHandler( HIObjectGetEventTarget( (HIObjectRef) (target) ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
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.
12729
#define DEFINE_ONE_SHOT_HANDLER_GETTER( x ) \
12730
EventHandlerUPP Get ## x ## UPP() \
12732
static EventHandlerUPP sHandler = NULL; \
12734
if ( sHandler == NULL ) \
12735
sHandler = NewEventHandlerUPP( x ); \
12741
#define SendEventToApplication( e ) \
12742
SendEventToEventTarget( (e), GetApplicationEventTarget() )
12744
#define SendEventToHIObject( e, t ) \
12745
SendEventToEventTarget( (e), HIObjectGetEventTarget( t ) )
12747
#define SendEventToWindow( e, t ) \
12748
SendEventToEventTarget( (e), GetWindowEventTarget( t ) )
12750
#define SendEventToControl( e, t ) \
12751
SendEventToEventTarget( (e), GetControlEventTarget( t ) )
12753
#define SendEventToMenu( e, t ) \
12754
SendEventToEventTarget( (e), GetMenuEventTarget( t ) )
12756
#define SendEventToUserFocus( e ) \
12757
SendEventToEventTarget( (e), GetUserFocusEventTarget() )
12760
{======================================================================================}
12761
{ � Command Routines }
12762
{======================================================================================}
12764
* ProcessHICommand()
12767
* Sends a kEventCommandProcess event.
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.
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.
12784
* Mac OS X threading:
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
12792
function ProcessHICommand( const (*var*) inCommand: HICommand ): OSStatus; external name '_ProcessHICommand';
12793
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12796
{--------------------------------------------------------------------------------------}
12797
{ � Event Loop Routines }
12798
{--------------------------------------------------------------------------------------}
12801
* RunApplicationEventLoop()
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
12809
* Mac OS X threading:
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
12817
procedure RunApplicationEventLoop; external name '_RunApplicationEventLoop';
12818
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12822
* QuitApplicationEventLoop()
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.
12834
* Mac OS X threading:
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
12842
procedure QuitApplicationEventLoop; external name '_QuitApplicationEventLoop';
12843
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12846
{--------------------------------------------------------------------------------------}
12847
{ � Event Modality routines }
12848
{--------------------------------------------------------------------------------------}
12851
* RunAppModalLoopForWindow()
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
12867
* Mac OS X threading:
12873
* The window you wish to behave modally.
12876
* An operating system status code. windowWrongStateErr will be
12877
* returned if the window is invisible.
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
12884
function RunAppModalLoopForWindow( inWindow: WindowRef ): OSStatus; external name '_RunAppModalLoopForWindow';
12885
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12889
* QuitAppModalLoopForWindow()
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.
12898
* Mac OS X threading:
12904
* The window for which to quit the modal state.
12907
* An operating system status code.
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
12914
function QuitAppModalLoopForWindow( inWindow: WindowRef ): OSStatus; external name '_QuitAppModalLoopForWindow';
12915
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12919
* BeginAppModalStateForWindow()
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.
12936
* Mac OS X threading:
12942
* The window you wish to behave modally.
12945
* An operating system status code. windowWrongStateErr will be
12946
* returned if the window is invisible.
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
12953
function BeginAppModalStateForWindow( inWindow: WindowRef ): OSStatus; external name '_BeginAppModalStateForWindow';
12954
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12958
* EndAppModalStateForWindow()
12961
* This routine ends an app modal state started with
12962
* BeginAppModalStateForWindow.
12964
* Mac OS X threading:
12970
* The window you wish to stop acting as app modal.
12973
* An operating system status code.
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
12980
function EndAppModalStateForWindow( inWindow: WindowRef ): OSStatus; external name '_EndAppModalStateForWindow';
12981
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
12984
{--------------------------------------------------------------------------------------}
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}
13002
kUserFocusAuto = WindowRef(-1);
13004
* SetUserFocusWindow()
13006
* Mac OS X threading:
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
13014
function SetUserFocusWindow( inWindow: WindowRef ): OSStatus; external name '_SetUserFocusWindow';
13015
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
13019
* GetUserFocusWindow()
13021
* Mac OS X threading:
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
13029
function GetUserFocusWindow: WindowRef; external name '_GetUserFocusWindow';
13030
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
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
{--------------------------------------------------------------------------------------}
13045
* SetWindowDefaultButton()
13047
* Mac OS X threading:
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
13055
function SetWindowDefaultButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowDefaultButton';
13056
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
13060
* SetWindowCancelButton()
13062
* Mac OS X threading:
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
13070
function SetWindowCancelButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowCancelButton';
13071
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
13075
* GetWindowDefaultButton()
13077
* Mac OS X threading:
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
13085
function GetWindowDefaultButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowDefaultButton';
13086
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
13090
* GetWindowCancelButton()
13092
* Mac OS X threading:
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
13100
function GetWindowCancelButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowCancelButton';
13101
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
13104
{--------------------------------------------------------------------------------------}
13105
{ � Global HotKey API }
13106
{--------------------------------------------------------------------------------------}
13108
EventHotKeyIDPtr = ^EventHotKeyID;
13109
EventHotKeyID = record
13114
EventHotKeyRef = ^SInt32; { an opaque 32-bit type }
13116
* RegisterEventHotKey()
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
13129
* Mac OS X threading:
13135
* The virtual key code of the key to watch
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
13144
* The application-specified hot key ID. You will receive this in
13145
* the kEventHotKeyPressed event as the direct object parameter.
13148
* The target to notify when the hot key is pressed.
13151
* Currently unused. Pass 0 or face the consequences.
13154
* The EventHotKeyRef that represents your new, shiny hot key. You
13155
* need this if you later wish to unregister it.
13158
* An operating system status code.
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
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 *)
13170
* UnregisterEventHotKey()
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.
13180
* Mac OS X threading:
13186
* The EventHotKeyRef to unregister.
13189
* An operating system status code.
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
13196
function UnregisterEventHotKey( inHotKey: EventHotKeyRef ): OSStatus; external name '_UnregisterEventHotKey';
13197
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
13201
* kHISymbolicHotKeyCode
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.
13208
{$ifc USE_CFSTR_CONSTANT_MACROS}
13209
{$definec kHISymbolicHotKeyCode CFSTRP('kHISymbolicHotKeyCode')}
13213
* kHISymbolicHotKeyModifiers
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.
13220
{$ifc USE_CFSTR_CONSTANT_MACROS}
13221
{$definec kHISymbolicHotKeyModifiers CFSTRP('kHISymbolicHotKeyModifiers')}
13225
* kHISymbolicHotKeyEnabled
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.
13232
{$ifc USE_CFSTR_CONSTANT_MACROS}
13233
{$definec kHISymbolicHotKeyEnabled CFSTRP('kHISymbolicHotKeyEnabled')}
13236
* CopySymbolicHotKeys()
13239
* Returns an array of CFDictionaryRefs containing information about
13240
* the system-wide symbolic hotkeys that are defined in the Keyboard
13241
* preferences pane.
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.
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
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.
13263
* Mac OS X threading:
13269
* On exit, contains an array of the values of all symbolic hot
13273
* An operating system result code; currently, noErr and memFullErr
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
13281
function CopySymbolicHotKeys( var outHotKeyArray: CFArrayRef ): OSStatus; external name '_CopySymbolicHotKeys';
13282
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
13287
* Parameters to the PushSymbolicHotKeyMode SPI.
13291
* All hotkeys are enabled.
13293
kHIHotKeyModeAllEnabled = 0;
13296
* All hotkeys are disabled.
13298
kHIHotKeyModeAllDisabled = 1 shl 0;
13301
* All hotkeys are disabled except for the Universal Access hotkeys
13302
* (zooming, white-on-black, and enhanced contrast).
13304
kHIHotKeyModeAllDisabledExceptUniversalAccess = 1 shl 1;
13307
* PushSymbolicHotKeyMode()
13310
* Sets a new mode for enabling or disabling symbolic hotkeys.
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.
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.
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.
13331
* Mac OS X threading:
13337
* The symbolic hotkey mode that is requested.
13340
* A token that should be passed to PopSymbolicHotKeyMode to remove
13341
* this mode request from the stack.
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
13348
function PushSymbolicHotKeyMode( inOptions: OptionBits ): UnivPtr; external name '_PushSymbolicHotKeyMode';
13349
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
13353
* PopSymbolicHotKeyMode()
13356
* Removes a hotkey mode request from the hotkey mode stack.
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.
13365
* Mac OS X threading:
13371
* A hotkey mode token that was returned by PushSymbolicHotKeyMode.
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
13378
procedure PopSymbolicHotKeyMode( inToken: UnivPtr ); external name '_PopSymbolicHotKeyMode';
13379
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
13383
* GetSymbolicHotKeyMode()
13386
* Returns the current hotkey mode in use.
13388
* Mac OS X threading:
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.
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.
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.
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
13410
function GetSymbolicHotKeyMode: OptionBits; external name '_GetSymbolicHotKeyMode';
13411
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
13414
{--------------------------------------------------------------------------------------}
13416
{--------------------------------------------------------------------------------------}
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 }
13426
* kEventClassInk / kEventInkPoint
13429
* A mouse event will be handled as an Ink point and used for
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
13441
* Mac OS X threading:
13446
* --> kEventParamEventRef (in, typeEventRef)
13447
* The mouse event being handled.
13450
* Mac OS X: in version 10.3 and later in Carbon.framework
13451
* CarbonLib: not available
13454
kEventInkPoint = 10;
13458
* kEventClassInk / kEventInkGesture
13461
* An Ink gesture has been generated.
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.
13472
* Mac OS X threading:
13477
* --> kEventParamInkGestureKind (in, typeUInt32)
13480
* --> kEventParamInkGestureBounds (in, typeHIRect)
13481
* Bounds of the gesture in global coordinates.
13483
* --> kEventParamInkGestureHotspot (in, typeHIPoint)
13484
* Hotspot for the gesture in global coordinates.
13487
* Mac OS X: in version 10.3 and later in Carbon.framework
13488
* CarbonLib: not available
13491
kEventInkGesture = 11;
13495
* kEventClassInk / kEventInkText
13498
* A recognized word from the Ink Manager.
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.
13505
* Mac OS X threading:
13510
* --> kEventParamInkTextRef (in, typePtr)
13511
* The InkTextRef containing the data for the recognized word.
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
13519
* Mac OS X: in version 10.3 and later in Carbon.framework
13520
* CarbonLib: not available
13523
kEventInkText = 12;
13526
{--------------------------------------------------------------------------------------}
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
{--------------------------------------------------------------------------------------}
13533
{--------------------------------------------------------------------------------------}
13534
{ � MouseTrackingRegions }
13535
{--------------------------------------------------------------------------------------}
13541
* MouseTrackingRef *** DEPRECATED ***
13544
* Applications should use HIViewTrackingAreas, described in
13545
* HIView.h, instead of MouseTrackingRegions and their associated
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.
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.
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.
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.
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.
13575
* MouseTrackingRefs become invalid when the window that they are
13576
* bound to is disposed.
13579
MouseTrackingRef = ^SInt32; { an opaque 32-bit type }
13583
* MouseTrackingOptions
13586
* MouseTrackingOptions *** DEPRECATED ***
13589
* Applications should use HIViewTrackingAreas, described in
13590
* HIView.h, instead of MouseTrackingRegions and their associated
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.
13601
MouseTrackingOptions = UInt32;
13604
* The region is expected in local coordinates and mouse movement
13605
* tracking is clipped to the owning window�s content region.
13607
kMouseTrackingOptionsLocalClip = 0;
13610
* The region is expected in global coordinates and mouse movement
13611
* tracking is clipped to the owning window�s structure region.
13613
kMouseTrackingOptionsGlobalClip = 1;
13616
* Standard options. The region will be handled in local coordinates
13617
* and remain clipped against the windows content region.
13619
kMouseTrackingOptionsStandard = kMouseTrackingOptionsLocalClip;
13622
MouseTrackingRegionID = record
13629
* CreateMouseTrackingRegion() *** DEPRECATED ***
13632
* Use HIView-based tracking areas instead of MouseTrackingRegions.
13633
* In this case, use HIViewNewTrackingArea(), defined in HIView.h,
13634
* instead of CreateMouseTrackingRegion().
13637
* Creates a mouse tracking region and installs it into the window
13640
* Mac OS X threading:
13646
* The window that will contain the created region.
13649
* The region for which you will receive entered/exit events.
13652
* A region to clip inRegion against (can be NULL).
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.
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.
13672
* Any user defined value. This value can be retrieved later by
13673
* calling GetMouseTrackingRegionRefCon on the MouseTrackingRef.
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.
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.
13686
* An operating system status code.
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
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 *)
13698
* RetainMouseTrackingRegion() *** DEPRECATED ***
13701
* Use HIView-based tracking areas, described in HIView.h, instead
13702
* of MouseTrackingRegions.
13705
* Retains the MouseTrackingRef.
13707
* Mac OS X threading:
13713
* A valid MouseTrackingRef to retain.
13716
* An operating system status code.
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
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 *)
13728
* ReleaseMouseTrackingRegion() *** DEPRECATED ***
13731
* Use HIView-based tracking areas instead of MouseTrackingRegions.
13732
* In this case, use HIViewDisposeTrackingArea(), defined in
13733
* HIView.h, instead of ReleaseMouseTrackingRegion().
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.
13740
* Mac OS X threading:
13746
* A valid MouseTrackingRef to release.
13749
* An operating system status code.
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
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 *)
13761
* ChangeMouseTrackingRegion() *** DEPRECATED ***
13764
* Use HIView-based tracking areas instead of MouseTrackingRegions.
13765
* In this case, use HIViewChangeTrackingArea(), defined in
13766
* HIView.h, instead of ChangeMouseTrackingRegion().
13769
* Changes the MouseTrackingRefs region and optionally, its clip.
13770
* This will not change the enabled state or options of the region.
13772
* Mac OS X threading:
13778
* A valid MouseTrackingRef to modify.
13781
* The region to set as the mouse tracking region.
13784
* An optional clip to clip inRegion against (may be NULL).
13787
* An operating system status code.
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
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 *)
13799
* ClipMouseTrackingRegion() *** DEPRECATED ***
13802
* Use HIView-based tracking areas, described in HIView.h, instead
13803
* of MouseTrackingRegions.
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.
13810
* Mac OS X threading:
13816
* A valid MouseTrackingRef to adjust.
13819
* A new region to clip inMouseRef against (can be NULL). If NULL,
13820
* standard clipping will be provided.
13823
* An operating system status code.
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
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 *)
13837
* GetMouseTrackingRegionID() *** DEPRECATED ***
13840
* Use HIView-based tracking areas instead of MouseTrackingRegions.
13841
* In this case, use HIViewGetTrackingAreaID(), defined in HIView.h,
13842
* instead of GetMouseTrackingRegionID().
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.
13849
* Mac OS X threading:
13855
* A valid MouseTrackingRef from which to obtain the
13856
* MouseTrackingRegionID.
13859
* Receives the MouseTrackingRegionID.
13862
* An operating system status code.
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
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 *)
13874
* GetMouseTrackingRegionRefCon() *** DEPRECATED ***
13877
* Use HIView-based tracking areas, described in HIView.h, instead
13878
* of MouseTrackingRegions.
13881
* Retrieves the RefCon from the given mouse tracking region.
13883
* Mac OS X threading:
13889
* A valid MouseTrackingRef from which to obtain the refcon.
13892
* Receives the refcon that was provided to
13893
* CreateMouseTrackingRegion.
13896
* An operating system status code.
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
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 *)
13910
* MoveMouseTrackingRegion() *** DEPRECATED ***
13913
* Use HIView-based tracking areas, described in HIView.h, instead
13914
* of MouseTrackingRegions.
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.
13921
* Mac OS X threading:
13927
* A valid MouseTrackingRef to move.
13930
* The horizontal delta to move the MouseTrackingRef.
13933
* The vertical delta to move the MouseTrackingRef.
13936
* A region to optionally clip against (can be NULL).
13939
* An operating system status code.
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
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 *)
13953
* SetMouseTrackingRegionEnabled() *** DEPRECATED ***
13956
* Use HIView-based tracking areas, described in HIView.h, instead
13957
* of MouseTrackingRegions.
13960
* Set the enabled state of the mouse tracking region
13962
* Mac OS X threading:
13968
* A valid MouseTrackingRef to modify.
13971
* Indicate whether this region should be enabled (true) or
13972
* disabled (false).
13975
* An operating system status code.
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
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 *)
13988
Namespace operators
13992
* ClipWindowMouseTrackingRegions() *** DEPRECATED ***
13995
* Use HIView-based tracking areas, described in HIView.h, instead
13996
* of MouseTrackingRegions.
13999
* Bulk clip operation to modify the region that all mouse tracking
14000
* regions with the given signature will be clipped against.
14002
* Mac OS X threading:
14008
* The window that contains the regions with the given signature
14009
* that you are interested in updating.
14012
* The signature of the mouse tracking regions that will be
14016
* The region to clip all of the regions against (can be NULL). If
14017
* NULL, standard clipping will be provided.
14020
* An operating system status code.
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
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 *)
14032
* MoveWindowMouseTrackingRegions() *** DEPRECATED ***
14035
* Use HIView-based tracking areas, described in HIView.h, instead
14036
* of MouseTrackingRegions.
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.
14044
* Mac OS X threading:
14050
* The window that contains the regions with the given signature
14051
* that you are interested in moving.
14054
* The signature of the mouse tracking regions that will be moved.
14057
* The horizontal delta to move all of the regions.
14060
* The vertical delta to move all of the regions.
14063
* An optional clipping region to clip against (can be NULL). If
14064
* NULL, standard clipping will be provided.
14067
* An operating system status code.
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
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 *)
14079
* SetWindowMouseTrackingRegionsEnabled() *** DEPRECATED ***
14082
* Use HIView-based tracking areas, described in HIView.h, instead
14083
* of MouseTrackingRegions.
14086
* Bulk set the enabled state of the mouse tracking regions of the
14087
* given signature belonging to the given window.
14089
* Mac OS X threading:
14095
* The window which contains the mouse tracking regions that you
14096
* are interested in modifying.
14099
* The signature of the mouse tracking regions whose enabled state
14100
* you wish to modify.
14103
* Indicates whether the regions should be enabled (true) or
14104
* disabled (false).
14107
* An operating system status code.
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
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 *)
14119
* ReleaseWindowMouseTrackingRegions() *** DEPRECATED ***
14122
* Use HIView-based tracking areas, described in HIView.h, instead
14123
* of MouseTrackingRegions.
14126
* Bulk release the mouse tracking regions with the given signature.
14128
* Mac OS X threading:
14134
* The window to which the regions to be released belong.
14137
* The signature of the regions to be released.
14140
* An operating system status code.
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
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 *)
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
{======================================================================================}
14164
ToolboxObjectClassRef = ^SInt32; { an opaque 32-bit type }
14166
* RegisterToolboxObjectClass()
14168
* Mac OS X threading:
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
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 *)
14181
* UnregisterToolboxObjectClass()
14183
* Mac OS X threading:
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
14191
function UnregisterToolboxObjectClass( inClassRef: ToolboxObjectClassRef ): OSStatus; external name '_UnregisterToolboxObjectClass';
14192
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
14195
{--------------------------------------------------------------------------------------}
14196
{ Obsolete constant names - use the new ones. }
14197
{--------------------------------------------------------------------------------------}
14199
kEventParamTabletPointerRec = $74627263 (* 'tbrc' *); { typeTabletPointerRec -- deprecated, for compatibility only}
14200
typeTabletPointerRec = $74627263 (* 'tbrc' *); { kEventParamTabletPointerRec -- deprecated, for compatibility only}
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;
14219
kEventClassEPPC = kEventClassAppleEvent;
14220
kEventHighLevelEvent = kEventAppleEvent;
14223
kEventUpdateActiveInputArea = kEventTextInputUpdateActiveInputArea;
14224
kEventUnicodeForKeyEvent = kEventTextInputUnicodeForKeyEvent;
14225
kEventOffsetToPos = kEventTextInputOffsetToPos;
14226
kEventPosToOffset = kEventTextInputPosToOffset;
14227
kEventShowHideBottomWindow = kEventTextInputShowHideBottomWindow;
14228
kEventGetSelectedText = kEventTextInputGetSelectedText;
14231
kEventProcessCommand = kEventCommandProcess;
14232
kEventTabletPointer = kEventTabletPoint;
14234
{--------------------------------------------------------------------------------------}
14235
{ Obsolete typedefs. }
14236
{--------------------------------------------------------------------------------------}
14239
EventClassID = UInt32;
14241
EventClass = UInt32;
14243
EventType = UInt32;
14244
{ OBSOLETE CONSTANTS}
14246
kMouseTrackingMousePressed = kMouseTrackingMouseDown;
14247
kMouseTrackingMouseReleased = kMouseTrackingMouseUp;
14250
kEventControlGetSubviewForMouseEvent = kEventControlInterceptSubviewClick;