summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/univint/src/TextInputSources.pas
blob: acb14082065d4443d43fd0380fb1ace656040dcd (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
{
     File:       HIToolbox/TextInputSources.h
 
     Version:    HIToolbox-437~1
 
     Copyright:  © 2006-2008 Apple Inc. All rights reserved.
 
     Bugs?:      For bug reports, consult the following page on
                 the World Wide Web:
 
                     http://www.freepascal.org/bugs.html
 
}

{	 Pascal Translation:  Gale R Paeper, <gpaeper@empirenet.com>, 2008 }
{  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2009 (no changes in 10.6) }

{
    Modified for use with Free Pascal
    Version 308
    Please report any bugs to <gpc@microbizz.nl>
}

{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
{$mode macpas}
{$packenum 1}
{$macro on}
{$inline on}
{$calling mwpascal}

unit TextInputSources;
interface
{$setc UNIVERSAL_INTERFACES_VERSION := $0400}
{$setc GAP_INTERFACES_VERSION := $0308}

{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
{$endc}

{$ifc defined CPUPOWERPC and defined CPUI386}
	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
{$endc}
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
{$endc}

{$ifc not defined __ppc__ and defined CPUPOWERPC32}
	{$setc __ppc__ := 1}
{$elsec}
	{$setc __ppc__ := 0}
{$endc}
{$ifc not defined __ppc64__ and defined CPUPOWERPC64}
	{$setc __ppc64__ := 1}
{$elsec}
	{$setc __ppc64__ := 0}
{$endc}
{$ifc not defined __i386__ and defined CPUI386}
	{$setc __i386__ := 1}
{$elsec}
	{$setc __i386__ := 0}
{$endc}
{$ifc not defined __x86_64__ and defined CPUX86_64}
	{$setc __x86_64__ := 1}
{$elsec}
	{$setc __x86_64__ := 0}
{$endc}
{$ifc not defined __arm__ and defined CPUARM}
	{$setc __arm__ := 1}
{$elsec}
	{$setc __arm__ := 0}
{$endc}

{$ifc defined cpu64}
  {$setc __LP64__ := 1}
{$elsec}
  {$setc __LP64__ := 0}
{$endc}


{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
	{$error Conflicting definitions for __ppc__ and __i386__}
{$endc}

{$ifc defined __ppc__ and __ppc__}
	{$setc TARGET_CPU_PPC := TRUE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __ppc64__ and __ppc64__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := TRUE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __i386__ and __i386__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := TRUE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
{$ifc defined(iphonesim)}
 	{$setc TARGET_OS_MAC := FALSE}
	{$setc TARGET_OS_IPHONE := TRUE}
	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
{$elsec}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$endc}
{$elifc defined __x86_64__ and __x86_64__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := TRUE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __arm__ and __arm__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := TRUE}
	{ will require compiler define when/if other Apple devices with ARM cpus ship }
	{$setc TARGET_OS_MAC := FALSE}
	{$setc TARGET_OS_IPHONE := TRUE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elsec}
	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
{$endc}

{$ifc defined __LP64__ and __LP64__ }
  {$setc TARGET_CPU_64 := TRUE}
{$elsec}
  {$setc TARGET_CPU_64 := FALSE}
{$endc}

{$ifc defined FPC_BIG_ENDIAN}
	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
{$elifc defined FPC_LITTLE_ENDIAN}
	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
{$elsec}
	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
{$endc}
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
{$setc CALL_NOT_IN_CARBON := FALSE}
{$setc OLDROUTINENAMES := FALSE}
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
{$setc OPAQUE_UPP_TYPES := TRUE}
{$setc OTCARBONAPPLICATION := TRUE}
{$setc OTKERNEL := FALSE}
{$setc PM_USE_SESSION_APIS := TRUE}
{$setc TARGET_API_MAC_CARBON := TRUE}
{$setc TARGET_API_MAC_OS8 := FALSE}
{$setc TARGET_API_MAC_OSX := TRUE}
{$setc TARGET_CARBON := TRUE}
{$setc TARGET_CPU_68K := FALSE}
{$setc TARGET_CPU_MIPS := FALSE}
{$setc TARGET_CPU_SPARC := FALSE}
{$setc TARGET_OS_UNIX := FALSE}
{$setc TARGET_OS_WIN32 := FALSE}
{$setc TARGET_RT_MAC_68881 := FALSE}
{$setc TARGET_RT_MAC_CFM := FALSE}
{$setc TARGET_RT_MAC_MACHO := TRUE}
{$setc TYPED_FUNCTION_POINTERS := TRUE}
{$setc TYPE_BOOL := FALSE}
{$setc TYPE_EXTENDED := FALSE}
{$setc TYPE_LONGLONG := TRUE}
uses MacTypes, CFArray, CFBase, CFDictionary, CFURL;
{$endc} {not MACOSALLINCLUDE}

{$ALIGN POWER}

{$ifc TARGET_OS_MAC}

{
 *  TextInputSources.h
 *  
 *  Summary:
 *    Specifies the modern, non-Script-Manager-based interfaces for
 *    operating on text input sources: finding information about them,
 *    selecting/enabling/disabling them, and receiving notifications
 *    about relevant changes.
 *  
 *  Discussion:
 *    Text input sources are of three general categories: keyboard
 *    input sources (keyboard layouts, keyboard input methods and input
 *    modes), palette input sources (character palette, keyboard
 *    viewer, private dictionary panels), and ink. Palette input
 *    sources and ink input sources are categorized as non-keyboard
 *    input sources, although palette input sources may still involve
 *    some keyboard interaction. Keyboard input methods may be
 *    mode-enabled (e.g. Kotoeri), in which case they may be the parent
 *    of several input modes which are directly selectable in the user
 *    interface (e.g. hiragana, katakana, romaji); in this case the
 *    parent input method is not directly selectable. Non-mode-enabled
 *    input methods are directly selectable. 
 *    
 *    
 *    Some input sources are invisible to system UI; they do not appear
 *    in the normal user interface for manipulating input sources.
 *    Examples include input sources such as ink, the dictionary panel,
 *    and some assistiveware; these have their own special UI for
 *    enabling, disabling, etc. Other examples include special keyboard
 *    layouts used by input methods, which have their own ways of
 *    controlling use of these keyboard layouts. 
 *    
 *    
 *    Some input sources are pre-installed by Apple. Other input
 *    sources (of any type) may be installed as third party products
 *    themselves or as part of installing certain applications. Most
 *    non-invisible input sources may be enabled or disabled by users
 *    using International Preferences, which displays a list of all
 *    visible installed input sources (Setup Assistant also enables
 *    some input sources); there is a separate UI for enabling ink.
 *    Applications may enable or disable input sources programmatically
 *    using some of the functions here. At least one keyboard input
 *    source is enabled (the system ensures this). At most one ink
 *    input source may be enabled; multiple instances of other input
 *    source types may be enabled. 
 *    
 *    
 *    Some enabled input sources are invisible but programmatically
 *    selectable, such as ink. Some are visible but not
 *    programmatically selectable, such as mode-savvy parent input
 *    methods (which must be visible so that International Preferences
 *    can display the parent input method for a group of input modes).
 *    
 *    
 *    
 *    Input modes can only be changed from disabled to enabled if their
 *    parent input method is enabled. Input modes can only be selected
 *    if both they and their parent input method are enabled. 
 *     
 *    
 *    Exactly one keyboard input source is selected at any time; this
 *    is the current keyboard input source. Selecting a new keyboard
 *    input source deselects the previous keyboard input source.
 *    Multiple palette input sources may be selected - e.g. there may
 *    be one or more character palettes and one or more keyboard
 *    viewers selected in addition to the selected keyboard input
 *    source. Selecting or deselecting a palette (or ink) input source
 *    does not affect any other input source. Input methods that
 *    provide associated input palettes may programmatically deselect
 *    the palette when the input method is deselected, for example.
 }
{
*===============================================================================
*   Basic type
*===============================================================================
}

{
 *  TISInputSourceRef
 *  
 *  Summary:
 *    Opaque CF object that unambiguously (within a single process)
 *    represents a text input source.
 *  
 *  Discussion:
 *    Cannot be shared cross-process.
 }
type
	TISInputSourceRef = ^SInt32; { an opaque type }
{
 *  TISInputSourceGetTypeID()
 *  
 *  Summary:
 *    Gets the CFTypeID of a TISInputSourceRef.
 *  
 *  Result:
 *    Returns the CFTypeID of a TISInputSourceRef, for comparison with
 *    the result of CFGetTypeID().
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISInputSourceGetTypeID: CFTypeID; external name '_TISInputSourceGetTypeID';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
*===============================================================================
*   Property key constants,
*
*   Input sources may have additional properties beyond those listed here,
*   and some input sources do not have values for some of the properties
*   listed here. The property value for a particular input source can be
*   obtained using TISGetInputSourceProperty. A set of specific property
*   key-value pairs can also be used as a filter when creating a list of
*   input sources using TISCreateInputSourceList.
*
*   The following keys may be used with both TISGetInputSourceProperty and
*   TISCreateInputSourceList:
*===============================================================================
}
{
 *  kTISPropertyInputSourceCategory
 *  
 *  Summary:
 *    The property key constant for a CFStringRef value that indicates
 *    the category of input source.
 *  
 *  Discussion:
 *    The possible values are specified by property value constants
 *    kTISCategoryKeyboardInputSource, kTISCategoryPaletteInputSource,
 *    kTISCategoryInkInputSource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceCategory: CFStringRef; external name '_kTISPropertyInputSourceCategory'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputSourceType
 *  
 *  Summary:
 *    The property key constant for a CFStringRef value that indicates
 *    the specific type of input source.
 *  
 *  Discussion:
 *    The possible values are specified by property value constants
 *    kTISTypeKeyboardLayout, kTISTypeKeyboardInputMethodWithoutModes,
 *    kTISTypeKeyboardInputMethodModeEnabled,
 *    kTISTypeKeyboardInputMode, kTISTypeCharacterPalette,
 *    kTISTypeKeyboardViewer, kTISTypeInk.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceType: CFStringRef; external name '_kTISPropertyInputSourceType'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputSourceIsASCIICapable
 *  
 *  Summary:
 *    The property key constant for a CFBooleanRef value that indicates
 *    whether the input source identifies itself as ASCII-capable.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceIsASCIICapable: CFStringRef; external name '_kTISPropertyInputSourceIsASCIICapable'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputSourceIsEnableCapable
 *  
 *  Summary:
 *    The property key constant for a CFBooleanRef value that indicates
 *    whether the input source can ever (given the right conditions) be
 *    programmatically enabled using TISEnableInputSource.
 *  
 *  Discussion:
 *    This is a static property of an input source, and does not depend
 *    on any current state. 
 *    
 *    Most input sources can be programmatically enabled at any time;
 *    kTISPropertyInputSourceIsEnableCapable is true for these.
 *    
 *    
 *    Some input sources can never be programmatically enabled. These
 *    are mainly input method private keyboard layouts that are used by
 *    the input method via TISSetInputMethodKeyboardLayoutOverride, but
 *    which cannot be directly enabled and used as keyboard layout
 *    input sources. kTISPropertyInputSourceIsEnableCapable is false
 *    for these. 
 *    
 *    Some input sources can only be programmatically enabled under the
 *    correct conditions. These are mainly input modes, which can only
 *    be changed from disabled to enabled if their parent input method
 *    is enabled (however, they can already be in the enabled state -
 *    but not currently selectable - if their parent input method is
 *    disabled). kTISPropertyInputSourceIsEnableCapable is true for
 *    these.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceIsEnableCapable: CFStringRef; external name '_kTISPropertyInputSourceIsEnableCapable'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputSourceIsSelectCapable
 *  
 *  Summary:
 *    The property key constant for a CFBooleanRef value that indicates
 *    whether the input source can ever (given the right conditions) be
 *    programmatically selected using TISSelectInputSource.
 *  
 *  Discussion:
 *    This is a static property of an input source, and does not depend
 *    on any current state. 
 *    
 *    Most input sources can be programmatically selected if they are
 *    enabled; kTISPropertyInputSourceIsSelectCapable is true for
 *    these. 
 *    
 *    Some input sources can never be programmatically selected even if
 *    they are enabled. These are mainly input methods that have modes
 *    (parent input methods); only their modes can be selected.
 *    kTISPropertyInputSourceIsSelectCapable is false for these.
 *    
 *    
 *    Some input sources which are enabled can only be programmatically
 *    selected under the correct conditions. These are mainly input
 *    modes, which can only be selected if both they and their parent
 *    input method are enabled.  kTISPropertyInputSourceIsSelectCapable
 *    is true for these. 
 *    
 *    Input source which can never be enabled - i.e. for which
 *    kTISPropertyInputSourceIsEnableCapable is false - can also never
 *    be selected. kTISPropertyInputSourceIsSelectCapable is false for
 *    these.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceIsSelectCapable: CFStringRef; external name '_kTISPropertyInputSourceIsSelectCapable'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputSourceIsEnabled
 *  
 *  Summary:
 *    The property key constant for a CFBooleanRef value that indicates
 *    whether the input source is currently enabled.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceIsEnabled: CFStringRef; external name '_kTISPropertyInputSourceIsEnabled'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputSourceIsSelected
 *  
 *  Summary:
 *    The property key constant for a CFBooleanRef value that indicates
 *    whether the input source is currently selected.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceIsSelected: CFStringRef; external name '_kTISPropertyInputSourceIsSelected'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputSourceID
 *  
 *  Summary:
 *    The property key constant for a CFStringRef value for the unique
 *    reverse DNS name associated with the input source.
 *  
 *  Discussion:
 *    1. For keyboard input methods and for input sources of the
 *    palette or ink category, this is typically the bundle ID, e.g.
 *    "com.apple.Kotoeri". 
 *    
 *    2. For keyboard input modes, this is typically the bundle ID of
 *    the parent input method plus a suffix that uniquely identifies
 *    the input mode, e.g. "com.apple.Kotoeri.Katakana" (it is not the
 *    generic input mode name used across input methods, e.g.
 *    "com.apple.inputmethod.Japanese.Katakana"). 
 *    
 *    3. For keyboard layouts this is a new identification mechanism
 *    typically structured as "com.company.keyboardlayout.name", e.g.
 *    "com.apple.keyboardlayout.US".
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceID: CFStringRef; external name '_kTISPropertyInputSourceID'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyBundleID
 *  
 *  Summary:
 *    The property key constant for a CFStringRef value for the reverse
 *    DNS BundleID associated with the input source.
 *  
 *  Discussion:
 *    Not valid for all input sources (especially some keyboard
 *    layouts).
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyBundleID: CFStringRef; external name '_kTISPropertyBundleID'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyInputModeID
 *  
 *  Summary:
 *    The property key constant for a CFStringRef value that identifies
 *    a particular usage class for input modes.
 *  
 *  Discussion:
 *    For example, "com.apple.inputmethod.Japanese.Katakana" identifies
 *    a standard Katakana-input usage class that may be associated with
 *    input modes from several different input methods. 
 *    
 *    This InputModeID can be attached to a TSMDocument using
 *    TSMSetDocumentProperty with the tag
 *    kTSMDocumentInputModePropertyTag, in order to control which input
 *    mode usage class should be used with that TSMDocument.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputModeID: CFStringRef; external name '_kTISPropertyInputModeID'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyLocalizedName
 *  
 *  Summary:
 *    The property key constant for a CFStringRef value for the input
 *    source's localized name for UI purposes.
 *  
 *  Discussion:
 *    Uses the best match (determined by CFBundle) between the
 *    localization being used by the caller and the available
 *    localizations of the input source name. In some cases this may
 *    fall back to an unlocalized name.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyLocalizedName: CFStringRef; external name '_kTISPropertyLocalizedName'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
*===============================================================================
*   The following keys may be used with TISGetInputSourceProperty, but may NOT
*   be used in the filter dictionary passed to TISCreateInputSourceList:
*===============================================================================
}
{
 *  kTISPropertyInputSourceLanguages
 *  
 *  Summary:
 *    The property key constant for a value which is a CFArrayRef of
 *    CFStringRefs, where each CFString is the language code for a
 *    language that can be input using the input source.
 *  
 *  Discussion:
 *    Languages codes are in the same BCP 47 format as returned by
 *    CFLocaleCreateCanonicalLanguageIdentifierFromString. The first
 *    language code in the array is the language for which the input
 *    source is intended. If there is no such language (e.g. for the
 *    Unicode Hex Input keyboard layout), the first language code is an
 *    empty string. 
 *    
 *    NOTE: This key (and a corresponding value) may not be used in the
 *    filter dictionary passed to TISCreateInputSourceList.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyInputSourceLanguages: CFStringRef; external name '_kTISPropertyInputSourceLanguages'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyUnicodeKeyLayoutData
 *  
 *  Summary:
 *    The property key constant for a value which is a CFDataRef that
 *    refers to the 'uchr' keyboard layout data for a keyboard layout
 *    input source.
 *  
 *  Discussion:
 *    The uchr data is in native-endian order. If the input source is
 *    not a keyboard layout, or is a keyboard layout for which only
 *    'KCHR data' is available, the value is NULL. 
 *    
 *    NOTE: This key (and a corresponding value) may not be used in the
 *    filter dictionary passed to TISCreateInputSourceList.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyUnicodeKeyLayoutData: CFStringRef; external name '_kTISPropertyUnicodeKeyLayoutData'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyIconRef
 *  
 *  Summary:
 *    The property key constant for an IconRef value for the input
 *    source icon.
 *  
 *  Discussion:
 *    IconRefs are the normal icon format for keyboard layouts and
 *    input methods. If an IconRef is not available for the specified
 *    input source, the value is NULL. 
 *    
 *    NOTE: This key (and a corresponding value) may not be used in the
 *    filter dictionary passed to TISCreateInputSourceList.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyIconRef: CFStringRef; external name '_kTISPropertyIconRef'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISPropertyIconImageURL
 *  
 *  Summary:
 *    The property key constant for a CFURLRef value indicating the
 *    file containing the image (typically TIFF) to be used as the
 *    input source icon.
 *  
 *  Discussion:
 *    TIFF files are the normal icon format for input modes. If an
 *    image file URL is not available for the specified input source,
 *    the value will be NULL. Note that other image formats (e.g. JPEG,
 *    PNG) may also be used in the future. 
 *    
 *    NOTE: This key (and a corresponding value) may not be used in the
 *    filter dictionary passed to TISCreateInputSourceList.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISPropertyIconImageURL: CFStringRef; external name '_kTISPropertyIconImageURL'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
*===============================================================================
*   Property value constants for input source category
*===============================================================================
}
{
 *  kTISCategoryKeyboardInputSource
 *  
 *  Summary:
 *    The property value constant for one input source category value
 *    associated with the property key kTISPropertyInputSourceCategory.
 *  
 *  Discussion:
 *    This category includes keyboard layouts, keyboard input methods
 *    (both with modes and without), and keyboard input modes. At least
 *    one input source in this category is installed. Of all input
 *    sources in this category, exactly one is selected; selecting a
 *    new one deselects the previous one.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISCategoryKeyboardInputSource: CFStringRef; external name '_kTISCategoryKeyboardInputSource'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISCategoryPaletteInputSource
 *  
 *  Summary:
 *    The property value constant for one input source category value
 *    associated with the property key kTISPropertyInputSourceCategory.
 *  
 *  Discussion:
 *    This category includes character palettes and keyboard viewers.
 *    Zero or more of these can be selected.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISCategoryPaletteInputSource: CFStringRef; external name '_kTISCategoryPaletteInputSource'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISCategoryInkInputSource
 *  
 *  Summary:
 *    The property value constant for one input source category value
 *    associated with the property key kTISPropertyInputSourceCategory.
 *  
 *  Discussion:
 *    Zero or one ink input sources can be installed and selected.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISCategoryInkInputSource: CFStringRef; external name '_kTISCategoryInkInputSource'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
*===============================================================================
*   Property value constants for input source type
*===============================================================================
}
{
 *  kTISTypeKeyboardLayout
 *  
 *  Summary:
 *    The property value constant for one input source type value
 *    associated with the property key kTISPropertyInputSourceType.
 *  
 *  Discussion:
 *    This type belongs to the category kTISCategoryKeyboardInputSource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISTypeKeyboardLayout: CFStringRef; external name '_kTISTypeKeyboardLayout'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISTypeKeyboardInputMethodWithoutModes
 *  
 *  Summary:
 *    The property value constant for one input source type value
 *    associated with the property key kTISPropertyInputSourceType.
 *  
 *  Discussion:
 *    This type belongs to the category kTISCategoryKeyboardInputSource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISTypeKeyboardInputMethodWithoutModes: CFStringRef; external name '_kTISTypeKeyboardInputMethodWithoutModes'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISTypeKeyboardInputMethodModeEnabled
 *  
 *  Summary:
 *    The property value constant for one input source type value
 *    associated with the property key kTISPropertyInputSourceType.
 *  
 *  Discussion:
 *    This type belongs to the category kTISCategoryKeyboardInputSource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISTypeKeyboardInputMethodModeEnabled: CFStringRef; external name '_kTISTypeKeyboardInputMethodModeEnabled'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISTypeKeyboardInputMode
 *  
 *  Summary:
 *    The property value constant for one input source type value
 *    associated with the property key kTISPropertyInputSourceType.
 *  
 *  Discussion:
 *    This type belongs to the category kTISCategoryKeyboardInputSource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISTypeKeyboardInputMode: CFStringRef; external name '_kTISTypeKeyboardInputMode'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISTypeCharacterPalette
 *  
 *  Summary:
 *    The property value constant for one input source type value
 *    associated with the property key kTISPropertyInputSourceType.
 *  
 *  Discussion:
 *    This type belongs to the category kTISCategoryPaletteInputSource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISTypeCharacterPalette: CFStringRef; external name '_kTISTypeCharacterPalette'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISTypeKeyboardViewer
 *  
 *  Summary:
 *    The property value constant for one input source type value
 *    associated with the property key kTISPropertyInputSourceType.
 *  
 *  Discussion:
 *    This type belongs to the category kTISCategoryPaletteInputSource.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISTypeKeyboardViewer: CFStringRef; external name '_kTISTypeKeyboardViewer'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISTypeInk
 *  
 *  Summary:
 *    The property value constant for one input source type value
 *    associated with the property key kTISPropertyInputSourceType.
 *  
 *  Discussion:
 *    This type belongs to the category kTISCategoryInkInputSource.
 *    Even though it is the only type in that category, a type is
 *    provided so that clients who donÕt need category information can
 *    just check input source type.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISTypeInk: CFStringRef; external name '_kTISTypeInk'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
*===============================================================================
*   Find out information about text input sources
*===============================================================================
}
{
 *  TISGetInputSourceProperty()
 *  
 *  Summary:
 *    Gets value of specified property for specified input source.
 *  
 *  Parameters:
 *    
 *    inputSource:
 *      The text input source for which a property value is requested.
 *    
 *    propertyKey:
 *      The property key constant specifying the desired property value.
 *  
 *  Result:
 *    Returns a pointer type appropriate for value object associated
 *    with the property key. The specific pointer type is specified for
 *    each key. Typically it is a CFTypeRef of some sort, but in one
 *    case it is IconRef. The function may return NULL if the specified
 *    property is missing or invalid for the specified input source.
 *    The objects referred to by the pointer follow the "Get" rule and
 *    should not be be released by the caller (unless first retained by
 *    the caller).
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISGetInputSourceProperty( inputSource: TISInputSourceRef; propertyKey: CFStringRef ): UnivPtr; external name '_TISGetInputSourceProperty';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISCreateInputSourceList()
 *  
 *  Summary:
 *    Creates a list of input sources that match specified properties.
 *  
 *  Discussion:
 *    This list represents a snapshot of input sources that matched the
 *    specified properties at the time the call was made. If the caller
 *    desires to include input sources that are installed but not
 *    currently enabled, the includeAllInstalled parameter may be set
 *    true. Typically this is done in order to obtain a
 *    TISInputSourceRef for a newly-installed input source; in this
 *    case the properties parameter would include very specific
 *    criteria limiting the matching input sources. 
 *    
 *    Warning: Calling this with includeAllInstalled true can have
 *    significant memory impact on the calling application if the
 *    properties parameter is NULL (match all) or if it specifies
 *    criteria that may match many installed input sources, since this
 *    may force caching of data for all matching input sources (which
 *    can result in allocation of up to 120K). If
 *    TISCreateInputSourceList is being called in order to find a
 *    specific input source or sources from among the sources included
 *    in the list, then it is best to first call
 *    TISCreateInputSourceList with includeAllInstalled = false and
 *    check whether the returned array includes the desired input
 *    source(s); if not, then call TISCreateInputSourceList again with
 *    includeAllInstalled = true.
 *  
 *  Parameters:
 *    
 *    properties:
 *      Dictionary of property keys and corresponding values to filter
 *      the input source list. May be NULL, in which case no filtering
 *      is performed.
 *    
 *    includeAllInstalled:
 *      Normally false so that only enabled input sources will be
 *      included; set true to include all installed input sources that
 *      match the filter (see discussion).
 *  
 *  Result:
 *    Returns a CFArrayRef for a list of TISInputSourceRefs that match
 *    the specified properties.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCreateInputSourceList( properties: CFDictionaryRef; includeAllInstalled: Boolean ): CFArrayRef; external name '_TISCreateInputSourceList';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
*===============================================================================
*   Get specific input sources
*===============================================================================
}
{
 *  TISCopyCurrentKeyboardInputSource()
 *  
 *  Summary:
 *    Copies a TISInputSourceRef for the currently-selected keyboard
 *    input source; convenience function.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCopyCurrentKeyboardInputSource: TISInputSourceRef; external name '_TISCopyCurrentKeyboardInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISCopyCurrentKeyboardLayoutInputSource()
 *  
 *  Summary:
 *    Copies a TISInputSourceRef for the keyboard layout currently
 *    being used. If the currently-selected keyboard input source is a
 *    keyboard layout, the TISInputSourceRef refers to that layout; if
 *    the currently-selected keyboard input source is an input method
 *    or mode, the TISInputSourceRef refers to the keyboard layout
 *    being used by that input method or mode.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCopyCurrentKeyboardLayoutInputSource: TISInputSourceRef; external name '_TISCopyCurrentKeyboardLayoutInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISCopyCurrentASCIICapableKeyboardInputSource()
 *  
 *  Summary:
 *    Copies a TISInputSourceRef for the most-recently-used
 *    ASCII-capable keyboard input source.
 *  
 *  Discussion:
 *    If no ASCII-capable keyboard input source has been used yet,
 *    returns the default ASCII-capable keyboard layout (chosen by
 *    Setup Assistant).
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCopyCurrentASCIICapableKeyboardInputSource: TISInputSourceRef; external name '_TISCopyCurrentASCIICapableKeyboardInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISCopyCurrentASCIICapableKeyboardLayoutInputSource()
 *  
 *  Summary:
 *    Copies a TISInputSourceRef for the most-recently-used
 *    ASCII-capable keyboard layout.
 *  
 *  Discussion:
 *    If no ASCII-capable keyboard input source has been used yet,
 *    returns the default ASCII-capable keyboard layout (chosen by
 *    Setup Assistant). 
 *    
 *    This is used by input methods to get the keyboard layout that
 *    will be used for key translation if there is no specific keyboard
 *    layout override. 
 *    
 *    Note the similar TISCopyCurrentASCIICapableKeyboardInputSource,
 *    which can return input sources that are not keyboard layouts.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCopyCurrentASCIICapableKeyboardLayoutInputSource: TISInputSourceRef; external name '_TISCopyCurrentASCIICapableKeyboardLayoutInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISCopyInputSourceForLanguage()
 *  
 *  Summary:
 *    Copies a TISInputSourceRef for the input source that should be
 *    used to input the specified language.
 *  
 *  Discussion:
 *    Sample usage: If a text field is expected to have input in a
 *    particular language, an application can call
 *    TISCopyInputSourceForLanguage and then TISSelectInputSource to
 *    select an input source that would be appropriate for that
 *    language. 
 *    
 *    This is intended to provide a replacement for one way in which
 *    the now-deprecated KeyScript API was used: Selection of the
 *    default input source associated with a particular ScriptCode.
 *  
 *  Parameters:
 *    
 *    language:
 *      A language tag in BCP 47 format (i.e. in the same form as
 *      returned by
 *      CFLocaleCreateCanonicalLanguageIdentifierFromString) that
 *      represents the language for which an input source should be
 *      returned.
 *  
 *  Result:
 *    TISInputSourceRef for an enabled input source that can input the
 *    specified language. If there is more than one such input source
 *    and at least one has previously been used, then the
 *    most-recently-used one will be chosen. If none of them has
 *    previously been used, one will be chosen based on the intended
 *    languages of the input sources. If there is no enabled input
 *    source that can input the specified language, the function will
 *    return NULL.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCopyInputSourceForLanguage( language: CFStringRef ): TISInputSourceRef; external name '_TISCopyInputSourceForLanguage';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISCreateASCIICapableInputSourceList()
 *  
 *  Summary:
 *    Creates a list of ASCII capable keyboard input sources.
 *  
 *  Discussion:
 *    This list represents a snapshot of ASCII capable keyboard input
 *    sources that were enabled at the time the call was made.
 *    Successive calls to TISCreateASCIICapableInputSourceList may
 *    return different results because, for example, in between the
 *    calls the user may enable or disable an input source in the
 *    International Preferences pane. When a keyboard input source is
 *    enabled or disabled, whether by the user or programmatically, the
 *    kTISNotifyEnabledKeyboardInputSourcesChanged CF distributed
 *    notification is posted.
 *  
 *  Result:
 *    Returns a CFArrayRef containing a list of TISInputSourceRefs.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCreateASCIICapableInputSourceList: CFArrayRef; external name '_TISCreateASCIICapableInputSourceList';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
*===============================================================================
*   Manipulate input sources
*===============================================================================
}
{
 *  TISSelectInputSource()
 *  
 *  Summary:
 *    Selects the specified input source.
 *  
 *  Discussion:
 *    Calling TISSelectInputSource on a keyboard input source that can
 *    be selected makes the specified input source the new current
 *    keyboard input source, and deselects the previous one. Calling
 *    TISSelectInputSource on a palette input source usually results in
 *    the palette being displayed and available for input. Ink input
 *    sources are typically enabled and selected at the same time.
 *    Calling TISSelectInputSource on a palette or ink input source has
 *    no effect on other input sources. Calling TISSelectInputSource
 *    for an already-selected input source has no effect. 
 *    
 *    For TISSelectInputSource to succeed, the input source must be
 *    capable of being selected (kTISPropertyInputSourceIsSelectCapable
 *    must be true) and the input source must be enabled
 *    (kTISPropertyInputSourceIsEnabled must be true). Furthermore, if
 *    if the input source is an input mode, its parent must be enabled
 *    for it to be selected.
 *  
 *  Result:
 *    Returns an error code: paramErr if the input source is not
 *    selectable, else noErr.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISSelectInputSource( inputSource: TISInputSourceRef ): OSStatus; external name '_TISSelectInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISDeselectInputSource()
 *  
 *  Summary:
 *    Deselects the specified input source.
 *  
 *  Discussion:
 *    TISDeselectInputSource is only intended for use with palette or
 *    ink input sources; calling it has no effect on other input
 *    sources. When palette input sources are disabled, the palette
 *    disappears. Ink input sources are usually deselected and disabled
 *    at the same time.
 *  
 *  Result:
 *    Returns an error code: paramErr if the input source is not
 *    deselectable, else noErr.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISDeselectInputSource( inputSource: TISInputSourceRef ): OSStatus; external name '_TISDeselectInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISEnableInputSource()
 *  
 *  Summary:
 *    Enables the specified input source.
 *  
 *  Discussion:
 *    TISEnableInputSource is mainly intended for input methods, or for
 *    applications that supply their own input sources (e.g.
 *    applications that provide keyboard layouts or palette input
 *    methods, and keyboard input methods that provide their own
 *    keyboard layouts and/or input modes). It makes the specified
 *    input source available in UI for selection. 
 *    
 *    For TISEnableInputSource to succeed, the input source must be
 *    capable of being enabled (kTISPropertyInputSourceIsEnableCapable
 *    must be true). Furthermore, if the input source is an input mode,
 *    its parent must already be enabled for the mode to become enabled.
 *  
 *  Result:
 *    Returns an error code: paramErr if the input source cannot be
 *    enabled, else noErr.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISEnableInputSource( inputSource: TISInputSourceRef ): OSStatus; external name '_TISEnableInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISDisableInputSource()
 *  
 *  Summary:
 *    Disables the specified input source.
 *  
 *  Discussion:
 *    TISDisableInputSource is mainly intended for input methods, or
 *    for applications that supply their own input sources (e.g.
 *    applications that provide keyboard layouts or palette input
 *    methods, and keyboard input methods that provide their own
 *    keyboard layouts and/or input modes). It makes the specified
 *    input source unavailable for selection, and removes it from
 *    system UI.
 *  
 *  Result:
 *    Returns an error code: paramErr if the input source cannot be
 *    disabled, else noErr.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISDisableInputSource( inputSource: TISInputSourceRef ): OSStatus; external name '_TISDisableInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
*===============================================================================
*   Notification constants
*===============================================================================
}
{
 *  kTISNotifySelectedKeyboardInputSourceChanged
 *  
 *  Summary:
 *    The name of the CF distributed notification for a change to the
 *    selected keyboard input source.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISNotifySelectedKeyboardInputSourceChanged: CFStringRef; external name '_kTISNotifySelectedKeyboardInputSourceChanged'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
 *  kTISNotifyEnabledKeyboardInputSourcesChanged
 *  
 *  Summary:
 *    The name of the CF distributed notification for a change to the
 *    set of enabled keyboard input sources.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
var kTISNotifyEnabledKeyboardInputSourcesChanged: CFStringRef; external name '_kTISNotifyEnabledKeyboardInputSourcesChanged'; (* attribute const *)
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
{
*===============================================================================
*   Allow input method to override keyboard layout
*===============================================================================
}
{
 *  TISSetInputMethodKeyboardLayoutOverride()
 *  
 *  Summary:
 *    Sets the keyboard layout override for an input method or mode.
 *  
 *  Discussion:
 *    When an input method or mode is the selected input source, TSM
 *    will by default use the most-recently-used ASCII-capable keyboard
 *    layout to translate key events* (this keyboard layout is also the
 *    one that will appear in Keyboard Viewer); an input source for
 *    this keyboard layout is returned by
 *    TISCopyCurrentASCIICapableKeyboardLayout. If a different keyboard
 *    layout should be used for a particular input method or mode, then
 *    when that input method/mode is activated it should call
 *    TISSetInputMethodKeyboardLayoutOverride to specify the desired
 *    keyboard layout. 
 *    
 *    For example, when a Kotoeri user selects kana layout for kana
 *    input, Kotoeri should call
 *    TISSetInputMethodKeyboardLayoutOverride to set the kana keyboard
 *    as the override for the appropriate input modes. 
 *    
 *    The keyboard layout set in this way will be used for the final
 *    stage of key translation in the Window Server - the connection or
 *    application-specific key translation. 
 *    
 *    The override setting is lost when the input method that set it is
 *    deactivated. 
 *    
 *    The keyboardLayout to be used for overriding need not be enabled
 *    or explicitly selectable. It can be a non-selectable layout that
 *    is included in an input method bundle and automatically
 *    registered. 
 *    
 *    *The default behavior is new for Mac OS X 10.5, and is meant to
 *    eliminate the necessity for input methods to have UI for setting
 *    which ASCII- capable keyboard to use for latin-character-based
 *    phonetic input.
 *  
 *  Parameters:
 *    
 *    keyboardLayout:
 *      TISInputSourceRef for the keyboard layout that should be used
 *      until the current input method is deactivated (if it should be
 *      something other than the most-recently-used ASCII-capable
 *      keyboard layout).
 *  
 *  Result:
 *    Returns an error code: paramErr if the current keyboard input
 *    source is not an input method/mode or if keyboardLayout does not
 *    designate a keyboard layout, else noErr.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISSetInputMethodKeyboardLayoutOverride( keyboardLayout: TISInputSourceRef ): OSStatus; external name '_TISSetInputMethodKeyboardLayoutOverride';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
 *  TISCopyInputMethodKeyboardLayoutOverride()
 *  
 *  Summary:
 *    Copies a TISInputSourceRef for the currently-selected input
 *    method's keyboard layout override, if any.
 *  
 *  Result:
 *    If the current keyboard input source is an input method or mode
 *    that has a keyboard layout override, then a TISInputSourceRef for
 *    that keyboard layout is returned; otherwise, NULL is returned.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISCopyInputMethodKeyboardLayoutOverride: TISInputSourceRef; external name '_TISCopyInputMethodKeyboardLayoutOverride';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
*===============================================================================
*   Install/register an input source
*===============================================================================
}
{
 *  TISRegisterInputSource()
 *  
 *  Summary:
 *    Registers the new input source(s) in a file or bundle so that a
 *    TISInputSourceRef can immediately be obtained for each of the new
 *    input source(s).
 *  
 *  Discussion:
 *    This allows an installer for an input method bundle or a keyboard
 *    layout file or bundle to notify the system that these new input
 *    sources should be registered. The system can then locate the
 *    specified file or bundle and perform any necessary cache rebuilds
 *    so that the installer can immediately call
 *    TISCreateInputSourceList with appropriate properties (e.g.
 *    BundleID or InputSourceID) in order to get TISInputSourceRefs for
 *    one or more of the newly registered input sources. 
 *    
 *    This can only be used to register the following: 
 *    
 *    - Keyboard layout files or bundles in "/Library/Keyboard
 *    Layouts/" or "~/Library/Keyboard Layouts/" (available to all
 *    users or current user, respectively). Such keyboard layouts, once
 *    enabled, are selectable. 
 *    
 *    - Input method bundles in the new "/Library/Input Methods/" or
 *    "~/Library/Input Methods/" directories (available to all users or
 *    current user, respectively). 
 *    
 *    Note: Input method bundles can include private non-selectable
 *    keyboard layouts for use with
 *    TISSetInputMethodKeyboardLayoutOverride. These are registered
 *    automatically when the input method is registered, and do not
 *    need to be separately registered. 
 *    
 *    Security: Any code that calls TISRegisterInputSource is part of
 *    an application or service that has already been validated in some
 *    way (e.g. by the user).
 *  
 *  Parameters:
 *    
 *    location:
 *      CFURLRef for the location of the input source(s), a file or
 *      bundle.
 *  
 *  Result:
 *    Error code: paramErr if location is invalid or the input
 *    source(s) in the specified location cannot be registered;
 *    otherwise noErr.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in Carbon.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function TISRegisterInputSource( location: CFURLRef ): OSStatus; external name '_TISRegisterInputSource';
(* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)


{
*===============================================================================
*   Text Input Sources properties and bundle-packaged text input sources
*===============================================================================
*
*   For Leopard, there are two new keys for use in plists to provide information
*   that supports the Text Input Sources functions above (these keys will be
*   ignored in earlier systems):
*
*   "TISInputSourceID" - a key to specify the InputSourceID, a reverse-DNS-style
*   string meant to uniquely identify any input source. If this key is not
*   specified, the Text Input Sources functions will attempt to construct an
*   InputSourceID from other information.
*
*   "TISIntendedLanguage" - a key to specify the primary language which the
*   input source is intended to input. If there is none - as with the Unicode
*   Hex Input key layout, for example - this key need not be specified. The
*   language is indicated by a string in in the format described by BCP 47
*   (the successor to RFC 3066).
*
*   How these keys are used depends on the type of input source, as described
*   below.
*
*   1. Keyboard layouts ( in <domain>/Library/Keyboard Layouts/ )
*
*   Keyboard layouts packaged in bundles use either a resource file or a set of
*   xml keylayout files together with optional icns files. The following example
*   shows the two methods of packaging a set of two key layouts in Unicode 'uchr'
*   format with key layout names "MyLayoutOne" and "MyLayoutTwo" and corresponding
*   numeric IDs -9001 and -9002 (see Tech Note 2056).
*
*   MyKeyboardLayouts.bundle/
*       Contents/
*           Info.plist
*           version.plist
*           Resources/
*               MyKeyboardLayouts.rsrc, containing the following resources:
*                   resources 'uchr' (-9001, "MyLayoutOne"), 'kcs#' (-9001), 'kcs4' (-9001)
*                   resources 'uchr' (-9002, "MyLayoutTwo"), 'kcs#' (-9002), 'kcs4' (-9002)
*               en.lproj/InfoPlist.strings, maps "MyLayoutOne" & "MyLayoutTwo" to localized names
*               ja.lproj/InfoPlist.strings, maps "MyLayoutOne" & "MyLayoutTwo" to localized names
*               ...
*
*   MyKeyboardLayouts.bundle/
*       Contents/
*           Info.plist
*           version.plist
*           Resources/
*               MyLayoutOne.keylayout, specifying name="MyLayoutOne" and id=-9001
*               MyLayoutOne.icns (optional)
*               MyLayoutTwo.keylayout, specifying name="MyLayoutTwo" and id=-9002
*               MyLayoutTwo.icns (optional)
*               en.lproj/InfoPlist.strings, maps "MyLayoutOne" & "MyLayoutTwo" to localized names
*               ja.lproj/InfoPlist.strings, maps "MyLayoutOne" & "MyLayoutTwo" to localized names
*               ...
*
*   In the Info.plist file, the value for the CFBundleIdentifier key must be a
*   string that includes ".keyboardlayout."; typically this might be something
*   like "com.companyname.keyboardlayout.MyKeyboardLayouts" (Before Leopard,
*   it was required to be a string that began "com.apple.keyboardlayout", even
*   for keyboard layouts not supplied by Apple).
*
*   A dictionary of properties for each key layout in the bundle should be
*   provided using a key of the form "KLInfo_keylayoutname" (even if
*   keylayoutname includes spaces or punctuation). This dictionary is where to
*   specify the keys "TISInputSourceID" and "TISIntendedLanguage" and their
*   associated values.
*
*   "TISInputSourceID" note: For keyboard layouts this should typically be
*   something like "com.companyname.keylayout.keylayoutname". If this key is
*   not specified, an InputSourceID will be constructed by combining
*   bundleID + ". keylayout." + keylayoutname.
*
*   If the keyboard layouts in the above example were intended to input
*   Azerbaijani in Latin script, then the Info.plist entries could be:
*
*       <key>KLInfo_MyLayoutOne</key>
*       <dict>
*           <key>TISInputSourceID</key>
*           <string>com.companyname.keylayout.MyLayoutOne</string>
*           <key>TISIntendedLanguage</key>
*           <string>az-Latn</string>
*       </dict>
*       <key>KLInfo_MyLayoutTwo</key>
*       <dict>
*           <key>TISInputSourceID</key>
*           <string>com.companyname.keylayout.MyLayoutTwo</string>
*           <key>TISIntendedLanguage</key>
*           <string>az-Latn</string>
*       </dict>
*
*   2. Input methods
*
*   Input methods are always packaged as bundles, either as Component bundles
*   in "<domain>/Library/Components/" (the old way, still supported in Leopard)
*   or as application bundles in "<domain>/Library/Input Methods/" (new for
*   Leopard).
*
*   The new keys keys "TISInputSourceID" and "TISIntendedLanguage" and their
*   associated values are added at the top level of the Info.plist file.
*
*   "TISInputSourceID" note: For input methods this is typically the same as
*   the BundleID, and if this key is not specified the BundleID will be used
*   as the InputSourceID.
*
*   3. Input modes
*
*   An input method's input modes are defined using the "ComponentInputModeDict"
*   key at the top level of the input method's Info.plist file (even for
*   non-component application-based input methods). The value of this key is a
*   dictionary, one of whose keys is "tsInputModeListKey"; the value of this
*   key is also a dictionary of input modes, with the InputModeID as the key
*   and the input mode's dictionary as the value (see TextServices.h).
*
*   The new keys keys "TISInputSourceID" and "TISIntendedLanguage" and their
*   associated values are added to the input mode's dictionary.
*
*   "TISInputSourceID" note: For input modes this is a string that begins with
*   the parent input method's InputSourceID or BundleID, followed by something
*   that identifies the mode. For example, "com.apple.Kotoeri.Japanese.Katakana".
*   In general it is not necessarily the same as the InputModeID, since a
*   particular InputModeID such as "com.apple.inputmethod.Japanese.Katakana"
*   may be used by multiple input methods. If this key is not specified, an
*   InputSourceID will be constructed by combining the BundleID with an
*   InputModeID suffix formed by deleting any prefix that matches the BundleID
*   or that ends in ".inputmethod."
}
{
*===============================================================================
}

{$endc} {TARGET_OS_MAC}

{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}

end.
{$endc} {not MACOSALLINCLUDE}