-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathControls.h
3344 lines (2954 loc) · 119 KB
/
Controls.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
File: Controls.h
Contains: Control Manager interfaces
Version: Technology: Mac OS 9
Release: Universal Interfaces 3.4
Copyright: © 1985-2001 by Apple Computer, Inc., all rights reserved
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __CONTROLS__
#define __CONTROLS__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __QUICKDRAW__
#include <Quickdraw.h>
#endif
#ifndef __MENUS__
#include <Menus.h>
#endif
#ifndef __TEXTEDIT__
#include <TextEdit.h>
#endif
#ifndef __DRAG__
#include <Drag.h>
#endif
#ifndef __ICONS__
#include <Icons.h>
#endif
#ifndef __COLLECTIONS__
#include <Collections.h>
#endif
#ifndef __MACERRORS__
#include <MacErrors.h>
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT
#pragma import on
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Resource Types */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
kControlDefProcType = FOUR_CHAR_CODE('CDEF'),
kControlTemplateResourceType = FOUR_CHAR_CODE('CNTL'),
kControlColorTableResourceType = FOUR_CHAR_CODE('cctb'),
kControlDefProcResourceType = FOUR_CHAR_CODE('CDEF')
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Format of a ÔCNTLÕ resource */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlTemplate {
Rect controlRect;
SInt16 controlValue;
Boolean controlVisible;
UInt8 fill;
SInt16 controlMaximum;
SInt16 controlMinimum;
SInt16 controlDefProcID;
SInt32 controlReference;
Str255 controlTitle;
};
typedef struct ControlTemplate ControlTemplate;
typedef ControlTemplate * ControlTemplatePtr;
typedef ControlTemplatePtr * ControlTemplateHandle;
#if !TARGET_OS_MAC
/*
ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
¥ NON-MAC COMPATIBILITY CODES (QuickTime 3.0)
ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
*/
typedef UInt32 ControlNotification;
enum {
controlNotifyNothing = FOUR_CHAR_CODE('nada'), /* No (null) notification*/
controlNotifyClick = FOUR_CHAR_CODE('clik'), /* Control was clicked*/
controlNotifyFocus = FOUR_CHAR_CODE('focu'), /* Control got keyboard focus*/
controlNotifyKey = FOUR_CHAR_CODE('key ') /* Control got a keypress*/
};
typedef UInt32 ControlCapabilities;
enum {
kControlCanAutoInvalidate = 1L << 0 /* Control component automatically invalidates areas left behind after hide/move operation.*/
};
/* procID's for our added "controls"*/
enum {
staticTextProc = 256, /* static text*/
editTextProc = 272, /* editable text*/
iconProc = 288, /* icon*/
userItemProc = 304, /* user drawn item*/
pictItemProc = 320 /* pict*/
};
#endif /* !TARGET_OS_MAC */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ ControlRef */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
#if !OPAQUE_TOOLBOX_STRUCTS
typedef struct ControlRecord ControlRecord;
typedef ControlRecord * ControlPtr;
typedef ControlPtr * ControlRef;
#else
typedef struct OpaqueControlRef* ControlRef;
#endif /* !OPAQUE_TOOLBOX_STRUCTS */
/* ControlHandle is obsolete. Use ControlRef.*/
typedef ControlRef ControlHandle;
typedef SInt16 ControlPartCode;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control ActionProcPtr */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
typedef CALLBACK_API( void , ControlActionProcPtr )(ControlRef theControl, ControlPartCode partCode);
typedef STACK_UPP_TYPE(ControlActionProcPtr) ControlActionUPP;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ ControlRecord */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
#if !OPAQUE_TOOLBOX_STRUCTS
struct ControlRecord {
ControlRef nextControl; /* in Carbon use embedding heirarchy functions*/
WindowRef contrlOwner; /* in Carbon use GetControlOwner or EmbedControl*/
Rect contrlRect; /* in Carbon use Get/SetControlBounds*/
UInt8 contrlVis; /* in Carbon use IsControlVisible, SetControlVisibility*/
UInt8 contrlHilite; /* in Carbon use GetControlHilite, HiliteControl*/
SInt16 contrlValue; /* in Carbon use Get/SetControlValue, Get/SetControl32BitValue*/
SInt16 contrlMin; /* in Carbon use Get/SetControlMinimum, Get/SetControl32BitMinimum*/
SInt16 contrlMax; /* in Carbon use Get/SetControlMaximum, Get/SetControl32BitMaximum*/
Handle contrlDefProc; /* not supported in Carbon*/
Handle contrlData; /* in Carbon use Get/SetControlDataHandle*/
ControlActionUPP contrlAction; /* in Carbon use Get/SetControlAction*/
SInt32 contrlRfCon; /* in Carbon use Get/SetControlReference*/
Str255 contrlTitle; /* in Carbon use Get/SetControlTitle*/
};
#endif /* !OPAQUE_TOOLBOX_STRUCTS */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control ActionProcPtr : Epilogue */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/*
* NewControlActionUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( ControlActionUPP )
NewControlActionUPP(ControlActionProcPtr userRoutine);
#if !OPAQUE_UPP_TYPES
enum { uppControlActionProcInfo = 0x000002C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
#ifdef __cplusplus
inline ControlActionUPP NewControlActionUPP(ControlActionProcPtr userRoutine) { return (ControlActionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlActionProcInfo, GetCurrentArchitecture()); }
#else
#define NewControlActionUPP(userRoutine) (ControlActionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlActionProcInfo, GetCurrentArchitecture())
#endif
#endif
/*
* DisposeControlActionUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( void )
DisposeControlActionUPP(ControlActionUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline void DisposeControlActionUPP(ControlActionUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
#else
#define DisposeControlActionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
#endif
#endif
/*
* InvokeControlActionUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( void )
InvokeControlActionUPP(
ControlRef theControl,
ControlPartCode partCode,
ControlActionUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline void InvokeControlActionUPP(ControlRef theControl, ControlPartCode partCode, ControlActionUPP userUPP) { CALL_TWO_PARAMETER_UPP(userUPP, uppControlActionProcInfo, theControl, partCode); }
#else
#define InvokeControlActionUPP(theControl, partCode, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppControlActionProcInfo, (theControl), (partCode))
#endif
#endif
#if CALL_NOT_IN_CARBON || OLDROUTINENAMES
/* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
#define NewControlActionProc(userRoutine) NewControlActionUPP(userRoutine)
#define CallControlActionProc(userRoutine, theControl, partCode) InvokeControlActionUPP(theControl, partCode, userRoutine)
#endif /* CALL_NOT_IN_CARBON */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Color Table */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
cFrameColor = 0,
cBodyColor = 1,
cTextColor = 2,
cThumbColor = 3,
kNumberCtlCTabEntries = 4
};
struct CtlCTab {
SInt32 ccSeed;
SInt16 ccRider;
SInt16 ctSize;
ColorSpec ctTable[4];
};
typedef struct CtlCTab CtlCTab;
typedef CtlCTab * CCTabPtr;
typedef CCTabPtr * CCTabHandle;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Auxiliary Control Record */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
#if !OPAQUE_TOOLBOX_STRUCTS
struct AuxCtlRec {
Handle acNext; /* not supported in Carbon*/
ControlRef acOwner; /* not supported in Carbon*/
CCTabHandle acCTable; /* not supported in Carbon*/
SInt16 acFlags; /* not supported in Carbon*/
SInt32 acReserved; /* not supported in Carbon*/
SInt32 acRefCon; /* in Carbon use Get/SetControlProperty if you need more refCons*/
};
typedef struct AuxCtlRec AuxCtlRec;
typedef AuxCtlRec * AuxCtlPtr;
typedef AuxCtlPtr * AuxCtlHandle;
#endif /* !OPAQUE_TOOLBOX_STRUCTS */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Variants */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
typedef SInt16 ControlVariant;
enum {
kControlNoVariant = 0, /* No variant*/
kControlUsesOwningWindowsFontVariant = 1 << 3 /* Control uses owning windows font to display text*/
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Part Codes */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* Basic part codes */
enum {
kControlNoPart = 0,
kControlIndicatorPart = 129,
kControlDisabledPart = 254,
kControlInactivePart = 255
};
/* Use this constant in Get/SetControlData when the data referred to is not */
/* specific to a part, but rather the entire control, e.g. the list handle of a */
/* list box control. */
enum {
kControlEntireControl = 0
};
/* Meta-Parts */
/* */
/* If you haven't guessed from looking at other toolbox headers. We like the word */
/* 'meta'. It's cool. So here's one more for you. A meta-part is a part used in a call */
/* to the GetControlRegion API. These parts are parts that might be defined by a */
/* control, but should not be returned from calls like TestControl, et al. They define */
/* a region of a control, presently the structure and the content region. The content */
/* region is only defined by controls that can embed other controls. It is the area */
/* that embedded content can live. */
/* */
/* Along with these parts, you can also pass in normal part codes to get the regions */
/* of the parts. Not all controls fully support this at the time this was written. */
enum {
kControlStructureMetaPart = -1,
kControlContentMetaPart = -2
};
/* focusing part codes */
enum {
kControlFocusNoPart = 0, /* tells control to clear its focus*/
kControlFocusNextPart = -1, /* tells control to focus on the next part*/
kControlFocusPrevPart = -2 /* tells control to focus on the previous part*/
};
typedef SInt16 ControlFocusPart;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Collection Tags */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* These are standard tags that you will find in a flattened Control's Collection. */
/* */
/* All tags at ID zero in a flattened Control's Collection is reserved for Control Manager use. */
/* Custom control definitions should use other IDs. */
/* */
/* Most of these tags are interpreted when you call CreateCustomControl; the Control Manager will */
/* put value in the right place before calling the Control Definition with the initialization message. */
/* Other tags are only interpreted when calling UnflattenControl. */
enum {
kControlCollectionTagBounds = FOUR_CHAR_CODE('boun'), /* Rect - the bounding rectangle*/
kControlCollectionTagValue = FOUR_CHAR_CODE('valu'), /* SInt32 - the value*/
kControlCollectionTagMinimum = FOUR_CHAR_CODE('min '), /* SInt32 - the minimum*/
kControlCollectionTagMaximum = FOUR_CHAR_CODE('max '), /* SInt32 - the maximum*/
kControlCollectionTagViewSize = FOUR_CHAR_CODE('view'), /* SInt32 - the view size*/
kControlCollectionTagVisibility = FOUR_CHAR_CODE('visi'), /* Boolean - the visible state*/
kControlCollectionTagRefCon = FOUR_CHAR_CODE('refc'), /* SInt32 - the refCon*/
kControlCollectionTagTitle = FOUR_CHAR_CODE('titl'), /* arbitrarily sized character array - the title*/
kControlCollectionTagUnicodeTitle = FOUR_CHAR_CODE('uttl'), /* bytes as received via CFStringCreateExternalRepresentation*/
kControlCollectionTagIDSignature = FOUR_CHAR_CODE('idsi'), /* OSType - the ControlID signature*/
kControlCollectionTagIDID = FOUR_CHAR_CODE('idid'), /* SInt32 - the ControlID id*/
kControlCollectionTagCommand = FOUR_CHAR_CODE('cmd '), /* UInt32 - the command*/
kControlCollectionTagVarCode = FOUR_CHAR_CODE('varc') /* SInt16 - the variant*/
};
/* The following are additional tags which are only interpreted by UnflattenControl. */
enum {
kControlCollectionTagSubControls = FOUR_CHAR_CODE('subc') /* data for all of a control's subcontrols*/
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Image Content */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
kControlContentTextOnly = 0,
kControlNoContent = 0,
kControlContentIconSuiteRes = 1,
kControlContentCIconRes = 2,
kControlContentPictRes = 3,
kControlContentICONRes = 4,
kControlContentIconSuiteHandle = 129,
kControlContentCIconHandle = 130,
kControlContentPictHandle = 131,
kControlContentIconRef = 132,
kControlContentICON = 133
};
typedef SInt16 ControlContentType;
struct ControlButtonContentInfo {
ControlContentType contentType;
union {
SInt16 resID;
CIconHandle cIconHandle;
Handle iconSuite;
IconRef iconRef;
PicHandle picture;
Handle ICONHandle;
} u;
};
typedef struct ControlButtonContentInfo ControlButtonContentInfo;
typedef ControlButtonContentInfo * ControlButtonContentInfoPtr;
typedef ControlButtonContentInfo ControlImageContentInfo;
typedef ControlButtonContentInfo * ControlImageContentInfoPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Key Script Behavior */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
kControlKeyScriptBehaviorAllowAnyScript = FOUR_CHAR_CODE('any '), /* leaves the current keyboard alone and allows user to change the keyboard.*/
kControlKeyScriptBehaviorPrefersRoman = FOUR_CHAR_CODE('prmn'), /* switches the keyboard to roman, but allows them to change it as desired.*/
kControlKeyScriptBehaviorRequiresRoman = FOUR_CHAR_CODE('rrmn') /* switches the keyboard to roman and prevents the user from changing it.*/
};
typedef UInt32 ControlKeyScriptBehavior;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Font Style */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* SPECIAL FONT USAGE NOTES: You can specify the font to use for many control types.
The constants below are meta-font numbers which you can use to set a particular
control's font usage. There are essentially two modes you can use: 1) default,
which is essentially the same as it always has been, i.e. it uses the system font, unless
directed to use the window font via a control variant. 2) you can specify to use
the big or small system font in a generic manner. The Big system font is the font
used in menus, etc. Chicago has filled that role for some time now. Small system
font is currently Geneva 10. The meta-font number implies the size and style.
NOTE: Not all font attributes are used by all controls. Most, in fact, ignore
the fore and back color (Static Text is the only one that does, for
backwards compatibility). Also size, face, and addFontSize are ignored
when using the meta-font numbering.
*/
/* Meta-font numbering - see note above */
enum {
kControlFontBigSystemFont = -1, /* force to big system font*/
kControlFontSmallSystemFont = -2, /* force to small system font*/
kControlFontSmallBoldSystemFont = -3, /* force to small bold system font*/
kControlFontViewSystemFont = -4 /* force to views system font (DataBrowser control only)*/
};
/* Add these masks together to set the flags field of a ControlFontStyleRec */
/* They specify which fields to apply to the text. It is important to make */
/* sure that you specify only the fields that you wish to set. */
enum {
kControlUseFontMask = 0x0001,
kControlUseFaceMask = 0x0002,
kControlUseSizeMask = 0x0004,
kControlUseForeColorMask = 0x0008,
kControlUseBackColorMask = 0x0010,
kControlUseModeMask = 0x0020,
kControlUseJustMask = 0x0040,
kControlUseAllMask = 0x00FF,
kControlAddFontSizeMask = 0x0100
};
/* AddToMetaFont indicates that we want to start with a standard system */
/* font, but then we'd like to add the other attributes. Normally, the meta */
/* font ignores all other flags */
enum {
kControlAddToMetaFontMask = 0x0200 /* Available in Appearance 1.1 or later*/
};
/* UseThemeFontID indicates that the font field of the ControlFontStyleRec */
/* should be interpreted as a ThemeFontID (see Appearance.h). In all other */
/* ways, specifying a ThemeFontID is just like using one of the control */
/* meta-fonts IDs. */
enum {
kControlUseThemeFontIDMask = 0x0080 /* Available in Mac OS X or later*/
};
struct ControlFontStyleRec {
SInt16 flags;
SInt16 font;
SInt16 size;
SInt16 style;
SInt16 mode;
SInt16 just;
RGBColor foreColor;
RGBColor backColor;
};
typedef struct ControlFontStyleRec ControlFontStyleRec;
typedef ControlFontStyleRec * ControlFontStylePtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Click Activation Results */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* These are for use with GetControlClickActivation. The enumerated values should be pretty */
/* self-explanatory, but just in case: */
/* ¥ Activate/DoNotActivate indicates whether or not to change the owning window's z-ordering before */
/* processing the click. If activation is requested, you may also want to immediately redraw the */
/* newly exposed portion of the window. */
/* ¥ Ignore/Handle Click indicates whether or not to call an appropriate click handling API (like */
/* HandleControlClick) in respose to the event. */
enum {
kDoNotActivateAndIgnoreClick = 0, /* probably never used. here for completeness.*/
kDoNotActivateAndHandleClick = 1, /* let the control handle the click while the window is still in the background.*/
kActivateAndIgnoreClick = 2, /* control doesn't want to respond directly to the click, but window should still be brought forward.*/
kActivateAndHandleClick = 3 /* control wants to respond to the click, but only after the window has been activated.*/
};
typedef UInt32 ClickActivationResult;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Common data tags for Get/SetControlData */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/*
* Discussion:
* Get/SetControlData Common Tags
*/
enum {
kControlFontStyleTag = FOUR_CHAR_CODE('font'),
kControlKeyFilterTag = FOUR_CHAR_CODE('fltr'),
/*
* Sent with a pointer to a ControlKind record to be filled in. Only
* valid for GetControlData.
*/
kControlKindTag = FOUR_CHAR_CODE('kind'),
/*
* Sent with a pointer to a ControlSize. Only valid with explicitly
* sizeable controls.
*/
kControlSizeTag = FOUR_CHAR_CODE('size')
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Feature Bits */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
/* Control feature bits - returned by GetControlFeatures */
kControlSupportsGhosting = 1 << 0,
kControlSupportsEmbedding = 1 << 1,
kControlSupportsFocus = 1 << 2,
kControlWantsIdle = 1 << 3,
kControlWantsActivate = 1 << 4,
kControlHandlesTracking = 1 << 5,
kControlSupportsDataAccess = 1 << 6,
kControlHasSpecialBackground = 1 << 7,
kControlGetsFocusOnClick = 1 << 8,
kControlSupportsCalcBestRect = 1 << 9,
kControlSupportsLiveFeedback = 1 << 10,
kControlHasRadioBehavior = 1 << 11, /* Available in Appearance 1.0.1 or later*/
kControlSupportsDragAndDrop = 1 << 12, /* Available in Carbon*/
kControlAutoToggles = 1 << 14, /* Available in Appearance 1.1 or later*/
kControlSupportsGetRegion = 1 << 17, /* Available in Appearance 1.1 or later*/
kControlSupportsFlattening = 1 << 19, /* Available in Carbon*/
kControlSupportsSetCursor = 1 << 20, /* Available in Carbon*/
kControlSupportsContextualMenus = 1 << 21, /* Available in Carbon*/
kControlSupportsClickActivation = 1 << 22, /* Available in Carbon*/
kControlIdlesWithTimer = 1 << 23 /* Available in Carbon - this bit indicates that the control animates automatically*/
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Messages */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
drawCntl = 0,
testCntl = 1,
calcCRgns = 2,
initCntl = 3,
dispCntl = 4,
posCntl = 5,
thumbCntl = 6,
dragCntl = 7,
autoTrack = 8,
calcCntlRgn = 10,
calcThumbRgn = 11,
drawThumbOutline = 12,
kControlMsgDrawGhost = 13,
kControlMsgCalcBestRect = 14, /* Calculate best fitting rectangle for control*/
kControlMsgHandleTracking = 15,
kControlMsgFocus = 16, /* param indicates action.*/
kControlMsgKeyDown = 17,
kControlMsgIdle = 18,
kControlMsgGetFeatures = 19,
kControlMsgSetData = 20,
kControlMsgGetData = 21,
kControlMsgActivate = 22,
kControlMsgSetUpBackground = 23,
kControlMsgCalcValueFromPos = 26,
kControlMsgTestNewMsgSupport = 27, /* See if this control supports new messaging*/
kControlMsgSubValueChanged = 25, /* Available in Appearance 1.0.1 or later*/
kControlMsgSubControlAdded = 28, /* Available in Appearance 1.0.1 or later*/
kControlMsgSubControlRemoved = 29, /* Available in Appearance 1.0.1 or later*/
kControlMsgApplyTextColor = 30, /* Available in Appearance 1.1 or later*/
kControlMsgGetRegion = 31, /* Available in Appearance 1.1 or later*/
kControlMsgFlatten = 32, /* Available in Carbon. Param is Collection.*/
kControlMsgSetCursor = 33, /* Available in Carbon. Param is ControlSetCursorRec*/
kControlMsgDragEnter = 38, /* Available in Carbon. Param is DragRef, result is boolean indicating acceptibility of drag.*/
kControlMsgDragLeave = 39, /* Available in Carbon. As above.*/
kControlMsgDragWithin = 40, /* Available in Carbon. As above.*/
kControlMsgDragReceive = 41, /* Available in Carbon. Param is DragRef, result is OSStatus indicating success/failure.*/
kControlMsgDisplayDebugInfo = 46, /* Available in Carbon on X.*/
kControlMsgContextualMenuClick = 47, /* Available in Carbon. Param is ControlContextualMenuClickRec*/
kControlMsgGetClickActivation = 48 /* Available in Carbon. Param is ControlClickActivationRec*/
};
typedef SInt16 ControlDefProcMessage;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Sizes */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
kControlSizeNormal = 0,
kControlSizeSmall = 1,
kControlSizeLarge = 2,
kControlSizeAuto = 0xFFFF
};
typedef UInt16 ControlSize;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Constants for drawCntl message (passed in param) */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
kDrawControlEntireControl = 0,
kDrawControlIndicatorOnly = 129
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Constants for dragCntl message (passed in param) */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
kDragControlEntireControl = 0,
kDragControlIndicator = 1
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Drag Constraint Structure for thumbCntl message (passed in param) */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct IndicatorDragConstraint {
Rect limitRect;
Rect slopRect;
DragConstraint axis;
};
typedef struct IndicatorDragConstraint IndicatorDragConstraint;
typedef IndicatorDragConstraint * IndicatorDragConstraintPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* CDEF should return as result of kControlMsgTestNewMsgSupport */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
kControlSupportsNewMessages = FOUR_CHAR_CODE(' ok ')
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when called with the kControlMsgHandleTracking */
/* message */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlTrackingRec {
Point startPt;
EventModifiers modifiers;
ControlActionUPP action;
};
typedef struct ControlTrackingRec ControlTrackingRec;
typedef ControlTrackingRec * ControlTrackingPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when called with the kControlMsgKeyDown message */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlKeyDownRec {
EventModifiers modifiers;
SInt16 keyCode;
SInt16 charCode;
};
typedef struct ControlKeyDownRec ControlKeyDownRec;
typedef ControlKeyDownRec * ControlKeyDownPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when called with the kControlMsgGetData or */
/* kControlMsgSetData message */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlDataAccessRec {
ResType tag;
ResType part;
Size size;
Ptr dataPtr;
};
typedef struct ControlDataAccessRec ControlDataAccessRec;
typedef ControlDataAccessRec * ControlDataAccessPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when called with the kControlCalcBestRect msg */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlCalcSizeRec {
SInt16 height;
SInt16 width;
SInt16 baseLine;
};
typedef struct ControlCalcSizeRec ControlCalcSizeRec;
typedef ControlCalcSizeRec * ControlCalcSizePtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when called with the kControlMsgSetUpBackground */
/* message is sent */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlBackgroundRec {
SInt16 depth;
Boolean colorDevice;
};
typedef struct ControlBackgroundRec ControlBackgroundRec;
typedef ControlBackgroundRec * ControlBackgroundPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when called with the kControlMsgApplyTextColor */
/* message is sent */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlApplyTextColorRec {
SInt16 depth;
Boolean colorDevice;
Boolean active;
};
typedef struct ControlApplyTextColorRec ControlApplyTextColorRec;
typedef ControlApplyTextColorRec * ControlApplyTextColorPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when called with the kControlMsgGetRegion */
/* message is sent */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlGetRegionRec {
RgnHandle region;
ControlPartCode part;
};
typedef struct ControlGetRegionRec ControlGetRegionRec;
typedef ControlGetRegionRec * ControlGetRegionPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when the kControlMsgSetCursor message is sent */
/* Only sent on Carbon */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlSetCursorRec {
Point localPoint;
EventModifiers modifiers;
Boolean cursorWasSet; /* your CDEF must set this to true if you set the cursor, or false otherwise*/
};
typedef struct ControlSetCursorRec ControlSetCursorRec;
typedef ControlSetCursorRec * ControlSetCursorPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when the kControlMsgContextualMenuClick message */
/* is sent */
/* Only sent on Carbon */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlContextualMenuClickRec {
Point localPoint;
Boolean menuDisplayed; /* your CDEF must set this to true if you displayed a menu, or false otherwise*/
};
typedef struct ControlContextualMenuClickRec ControlContextualMenuClickRec;
typedef ControlContextualMenuClickRec * ControlContextualMenuClickPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* This structure is passed into a CDEF when the kControlMsgGetClickActivation message */
/* is sent */
/* Only sent on Carbon */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
struct ControlClickActivationRec {
Point localPoint;
EventModifiers modifiers;
ClickActivationResult result; /* your CDEF must pass the desired result back*/
};
typedef struct ControlClickActivationRec ControlClickActivationRec;
typedef ControlClickActivationRec * ControlClickActivationPtr;
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ ÔCDEFÕ entrypoint */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
typedef CALLBACK_API( SInt32 , ControlDefProcPtr )(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param);
typedef STACK_UPP_TYPE(ControlDefProcPtr) ControlDefUPP;
/*
* NewControlDefUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( ControlDefUPP )
NewControlDefUPP(ControlDefProcPtr userRoutine);
#if !OPAQUE_UPP_TYPES
enum { uppControlDefProcInfo = 0x00003BB0 }; /* pascal 4_bytes Func(2_bytes, 4_bytes, 2_bytes, 4_bytes) */
#ifdef __cplusplus
inline ControlDefUPP NewControlDefUPP(ControlDefProcPtr userRoutine) { return (ControlDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlDefProcInfo, GetCurrentArchitecture()); }
#else
#define NewControlDefUPP(userRoutine) (ControlDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlDefProcInfo, GetCurrentArchitecture())
#endif
#endif
/*
* DisposeControlDefUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( void )
DisposeControlDefUPP(ControlDefUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline void DisposeControlDefUPP(ControlDefUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
#else
#define DisposeControlDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
#endif
#endif
/*
* InvokeControlDefUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( SInt32 )
InvokeControlDefUPP(
SInt16 varCode,
ControlRef theControl,
ControlDefProcMessage message,
SInt32 param,
ControlDefUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline SInt32 InvokeControlDefUPP(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param, ControlDefUPP userUPP) { return (SInt32)CALL_FOUR_PARAMETER_UPP(userUPP, uppControlDefProcInfo, varCode, theControl, message, param); }
#else
#define InvokeControlDefUPP(varCode, theControl, message, param, userUPP) (SInt32)CALL_FOUR_PARAMETER_UPP((userUPP), uppControlDefProcInfo, (varCode), (theControl), (message), (param))
#endif
#endif
#if CALL_NOT_IN_CARBON || OLDROUTINENAMES
/* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
#define NewControlDefProc(userRoutine) NewControlDefUPP(userRoutine)
#define CallControlDefProc(userRoutine, varCode, theControl, message, param) InvokeControlDefUPP(varCode, theControl, message, param, userRoutine)
#endif /* CALL_NOT_IN_CARBON */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* Control Key Filter */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* Certain controls can have a keyfilter attached to them. */
/* Definition of a key filter for intercepting and possibly changing keystrokes */
/* which are destined for a control. */
/* Key Filter Result Codes */
/* The filter proc should return one of the two constants below. If */
/* kKeyFilterBlockKey is returned, the key is blocked and never makes it to the */
/* control. If kKeyFilterPassKey is returned, the control receives the keystroke. */
enum {
kControlKeyFilterBlockKey = 0,
kControlKeyFilterPassKey = 1
};
typedef SInt16 ControlKeyFilterResult;
typedef CALLBACK_API( ControlKeyFilterResult , ControlKeyFilterProcPtr )(ControlRef theControl, SInt16 *keyCode, SInt16 *charCode, EventModifiers *modifiers);
typedef STACK_UPP_TYPE(ControlKeyFilterProcPtr) ControlKeyFilterUPP;
/*
* NewControlKeyFilterUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( ControlKeyFilterUPP )
NewControlKeyFilterUPP(ControlKeyFilterProcPtr userRoutine);
#if !OPAQUE_UPP_TYPES
enum { uppControlKeyFilterProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
#ifdef __cplusplus
inline ControlKeyFilterUPP NewControlKeyFilterUPP(ControlKeyFilterProcPtr userRoutine) { return (ControlKeyFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlKeyFilterProcInfo, GetCurrentArchitecture()); }
#else
#define NewControlKeyFilterUPP(userRoutine) (ControlKeyFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlKeyFilterProcInfo, GetCurrentArchitecture())
#endif
#endif
/*
* DisposeControlKeyFilterUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( void )
DisposeControlKeyFilterUPP(ControlKeyFilterUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline void DisposeControlKeyFilterUPP(ControlKeyFilterUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
#else
#define DisposeControlKeyFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
#endif
#endif
/*
* InvokeControlKeyFilterUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API_C( ControlKeyFilterResult )
InvokeControlKeyFilterUPP(
ControlRef theControl,
SInt16 * keyCode,
SInt16 * charCode,
EventModifiers * modifiers,
ControlKeyFilterUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline ControlKeyFilterResult InvokeControlKeyFilterUPP(ControlRef theControl, SInt16 * keyCode, SInt16 * charCode, EventModifiers * modifiers, ControlKeyFilterUPP userUPP) { return (ControlKeyFilterResult)CALL_FOUR_PARAMETER_UPP(userUPP, uppControlKeyFilterProcInfo, theControl, keyCode, charCode, modifiers); }
#else
#define InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, userUPP) (ControlKeyFilterResult)CALL_FOUR_PARAMETER_UPP((userUPP), uppControlKeyFilterProcInfo, (theControl), (keyCode), (charCode), (modifiers))
#endif
#endif
#if CALL_NOT_IN_CARBON || OLDROUTINENAMES
/* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
#define NewControlKeyFilterProc(userRoutine) NewControlKeyFilterUPP(userRoutine)
#define CallControlKeyFilterProc(userRoutine, theControl, keyCode, charCode, modifiers) InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, userRoutine)
#endif /* CALL_NOT_IN_CARBON */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ DragGrayRgn Constatns */
/* */
/* For DragGrayRgnUPP used in TrackControl() */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
enum {
noConstraint = kNoConstraint,
hAxisOnly = 1,
vAxisOnly = 2
};
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* ¥ Control Creation/Deletion/Persistence */
/*ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ*/
/* CreateCustomControl is only available as part of Carbon */
enum {
kControlDefProcPtr = 0, /* raw proc-ptr based access*/
kControlDefObjectClass = 1 /* event-based definition (Carbon 1.1 or later)*/
};
typedef UInt32 ControlDefType;
struct ControlDefSpec {
ControlDefType defType;
union {
ControlDefUPP defProc;
void * classRef;
} u;
};
typedef struct ControlDefSpec ControlDefSpec;
/*
* CreateCustomControl()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API( OSStatus )
CreateCustomControl(
WindowRef owningWindow,
const Rect * contBounds,
const ControlDefSpec * def,
Collection initData,
ControlRef * outControl);
/*
* NewControl()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API( ControlRef )
NewControl(
WindowRef owningWindow,
const Rect * boundsRect,
ConstStr255Param controlTitle,
Boolean initiallyVisible,
SInt16 initialValue,
SInt16 minimumValue,
SInt16 maximumValue,
SInt16 procID,
SInt32 controlReference) ONEWORDINLINE(0xA954);
/*
* GetNewControl()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API( ControlRef )
GetNewControl(
SInt16 resourceID,
WindowRef owningWindow) ONEWORDINLINE(0xA9BE);
/*
* DisposeControl()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/
EXTERN_API( void )
DisposeControl(ControlRef theControl) ONEWORDINLINE(0xA955);
/*
* KillControls()
*
* Availability:
* Non-Carbon CFM: in InterfaceLib 7.1 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 or later
*/