annotate dstep/applicationservices/ats/ATSFont.d @ 12:9f0b49a2f64e

Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
author Jacob Carlborg <doob@me.com>
date Mon, 03 Aug 2009 14:00:21 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Aug 1, 2009
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.applicationservices.ats.ATSFont;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 //import dstep.AvailabilityMacros;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.applicationservices.ats.ATSTypes;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.applicationservices.ats.SFNTTypes;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.corefoundation.CoreFoundation;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.coreservices.CoreServices;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 import dstep.objc.bridge.TypeEncoding;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 struct ATSFontFamilyIterator_;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 struct ATSFontIterator_;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18 struct ATSFontNotificationRef_;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 struct ATSFontNotificationInfoRef_;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 alias uint ATSFontContext;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 alias ATSFontFamilyIterator_* ATSFontFamilyIterator;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 alias ATSFontIterator_* ATSFontIterator;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 alias int ATSFontFilterSelector;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 alias ATSFontNotificationRef_* ATSFontNotificationRef;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 alias ATSFontNotificationInfoRef_* ATSFontNotificationInfoRef;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 alias int ATSFontNotifyOption;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28 alias int ATSFontNotifyAction;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 alias int ATSFontQueryMessageID;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 alias uint ATSFontAutoActivationSetting;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 extern (C)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 alias int function (uint, void*) ATSFontApplierFunction;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 alias void function (ATSFontNotificationInfoRef, void*) ATSNotificationCallback;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 alias CFPropertyListRef function (int, CFPropertyListRef, void*) ATSFontQueryCallback;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 alias int function (uint, void*) ATSFontFamilyApplierFunction;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 // This is needed otherwise the enums will fail compiling with gdc
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 version (GNU)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 private
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 const __kATSQueryActivateFontMessage = getOSType!("atsa");
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51 kATSOptionFlagsDefault = kNilOptions,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 kATSOptionFlagsComposeFontPostScriptName = 1 << 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 kATSOptionFlagsUseDataForkAsResourceFork = 1 << 8,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 kATSOptionFlagsUseResourceFork = 2 << 8,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55 kATSOptionFlagsUseDataFork = 3 << 8
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60 kATSIterationCompleted = -980L,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 kATSInvalidFontFamilyAccess = -981L,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 kATSInvalidFontAccess = -982L,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 kATSIterationScopeModified = -983L,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64 kATSInvalidFontTableAccess = -984L,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65 kATSInvalidFontContainerAccess = -985L,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 kATSInvalidGlyphAccess = -986L
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 kATSFontContextUnspecified = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72 kATSFontContextGlobal = 1,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
73 kATSFontContextLocal = 2
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
74 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
75
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
76 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 kATSOptionFlagsActivateDisabled = 0x00000001 << 5,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
79 kATSOptionFlagsProcessSubdirectories = 0x00000001 << 6,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
80 kATSOptionFlagsDoNotNotify = 0x00000001 << 7,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 kATSOptionFlagsRecordPersistently = 0x00000001 << 18
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
82 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
83
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
84 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
85 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
86 kATSOptionFlagsIterateByPrecedenceMask = 0x00000001 << 5,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
87 kATSOptionFlagsIncludeDisabledMask = 0x00000001 << 7,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
88 kATSOptionFlagsIterationScopeMask = 0x00000007 << 12,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
89 kATSOptionFlagsDefaultScope = 0x00000000 << 12,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
90 kATSOptionFlagsUnRestrictedScope = 0x00000001 << 12,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
91 kATSOptionFlagsRestrictedScope = 0x00000002 << 12
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
92 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
93
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
94 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
95 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
96 kATSFontFilterCurrentVersion = 0
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
97 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
98
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
99 enum /*ATSFontFilterSelector*/
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
100 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
101 kATSFontFilterSelectorUnspecified = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
102 kATSFontFilterSelectorGeneration = 3,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
103 kATSFontFilterSelectorFontFamily = 7,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
104 kATSFontFilterSelectorFontFamilyApplierFunction = 8,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
105 kATSFontFilterSelectorFontApplierFunction = 9,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
106 kATSFileReferenceFilterSelector = 10
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
107 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
108
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
109 enum /*ATSFontNotifyOption*/
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
110 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
111 kATSFontNotifyOptionDefault = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
112 kATSFontNotifyOptionReceiveWhileSuspended = 1L << 0
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
113 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
114
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
115 enum /*ATSFontNotifyAction*/
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
116 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
117 kATSFontNotifyActionFontsChanged = 1,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
118 kATSFontNotifyActionDirectoriesChanged = 2
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
119 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
120
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
121 enum /*ATSFontQueryMessageID*/
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
122 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
123 kATSQueryActivateFontMessage = getOSType!("atsa")
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
124 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
125
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
126 enum
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
127 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
128 kATSFontAutoActivationDefault = 0,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
129 kATSFontAutoActivationDisabled = 1,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
130 kATSFontAutoActivationEnabled = 2,
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
131 kATSFontAutoActivationAsk = 4
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
132 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
133
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
134 struct ATSFontFilter
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
135 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
136 uint version_;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
137 ATSFontFilterSelector filterSelector;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
138
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
139 union
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
140 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
141 ATSGeneration generationFilter;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
142 ATSFontFamilyRef fontFamilyFilter;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
143 ATSFontFamilyApplierFunction fontFamilyApplierFunctionFilter;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
144 ATSFontApplierFunction fontApplierFunctionFilter;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
145 /*const*/ FSRef* fontFileRefFilter;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
146 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
147 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
148
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
149
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
150 struct ATSFontQuerySourceContext
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
151 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
152 UInt32 version_;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
153 void* refCon;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
154 CFAllocatorRetainCallBack retain;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
155 CFAllocatorReleaseCallBack release;
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
156 }
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
157
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
158 extern (C)
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
159 {
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
160 uint ATSGetGeneration ();
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
161 int ATSFontActivateFromFileReference (FSRef* iFile, uint iContext, uint iFormat, void* iRefCon, uint iOptions, ATSFontContainerRef* oContainer);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
162 int ATSFontActivateFromMemory (LogicalAddress iData, uint iLength, uint iContext, uint iFormat, void* iReserved, uint iOptions, ATSFontContainerRef* oContainer);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
163 int ATSFontDeactivate (uint iContainer, void* iRefCon, uint iOptions);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
164 int ATSFontGetContainerFromFileReference (FSRef* iFile, uint iContext, uint iOptions, ATSFontContainerRef* oContainer);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
165 int ATSFontGetContainer (uint iFont, uint iOptions, ATSFontContainerRef* oContainer);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
166 int ATSFontSetEnabled (uint iFont, uint iOptions, ubyte iEnabled);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
167 ubyte ATSFontIsEnabled (uint iFont);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
168 int ATSFontFamilyApplyFunction (ATSFontFamilyApplierFunction iFunction, void* iRefCon);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
169 int ATSFontFamilyIteratorCreate (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontFamilyIterator* ioIterator);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
170 int ATSFontFamilyIteratorRelease (ATSFontFamilyIterator* ioIterator);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
171 int ATSFontFamilyIteratorReset (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontFamilyIterator* ioIterator);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
172 int ATSFontFamilyIteratorNext (ATSFontFamilyIterator iIterator, ATSFontFamilyRef* oFamily);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
173 uint ATSFontFamilyFindFromName (CFStringRef iName, uint iOptions);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
174 uint ATSFontFamilyGetGeneration (uint iFamily);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
175 int ATSFontFamilyGetName (uint iFamily, uint iOptions, CFStringRef* oName);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
176 uint ATSFontFamilyGetEncoding (uint iFamily);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
177 int ATSFontApplyFunction (ATSFontApplierFunction iFunction, void* iRefCon);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
178 int ATSFontIteratorCreate (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontIterator* ioIterator);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
179 int ATSFontIteratorRelease (ATSFontIterator* ioIterator);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
180 int ATSFontIteratorReset (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontIterator* ioIterator);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
181 int ATSFontIteratorNext (ATSFontIterator iIterator, ATSFontRef* oFont);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
182 uint ATSFontFindFromName (CFStringRef iName, uint iOptions);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
183 uint ATSFontFindFromPostScriptName (CFStringRef iName, uint iOptions);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
184 int ATSFontFindFromContainer (uint iContainer, uint iOptions, uint iCount, ATSFontRef* ioArray, ItemCount* oCount);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
185 uint ATSFontGetGeneration (uint iFont);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
186 int ATSFontGetName (uint iFont, uint iOptions, CFStringRef* oName);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
187 int ATSFontGetPostScriptName (uint iFont, uint iOptions, CFStringRef* oName);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
188 int ATSFontGetTableDirectory (uint iFont, uint iBufferSize, void* ioBuffer, ByteCount* oSize);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
189 int ATSFontGetTable (uint iFont, uint iTag, uint iOffset, uint iBufferSize, void* ioBuffer, ByteCount* oSize);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
190 int ATSFontGetHorizontalMetrics (uint iFont, uint iOptions, ATSFontMetrics* oMetrics);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
191 int ATSFontGetVerticalMetrics (uint iFont, uint iOptions, ATSFontMetrics* oMetrics);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
192 uint ATSFontFamilyFindFromQuickDrawName (char* iName);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
193 int ATSFontFamilyGetQuickDrawName (uint iFamily, ubyte[256] oName);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
194 int ATSFontGetFileReference (uint iFont, FSRef* oFile);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
195 int ATSFontGetFontFamilyResource (uint iFont, uint iBufferSize, void* ioBuffer, ByteCount* oSize);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
196 int ATSFontNotify (int action, void* info);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
197 int ATSFontNotificationSubscribe (ATSNotificationCallback callback, int options, void* iRefcon, ATSFontNotificationRef* oNotificationRef);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
198 int ATSFontNotificationUnsubscribe (ATSFontNotificationRef notificationRef);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
199 CFRunLoopSourceRef ATSCreateFontQueryRunLoopSource (int queryOrder, int sourceOrder, ATSFontQueryCallback callout, ATSFontQuerySourceContext* context);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
200 int ATSFontSetGlobalAutoActivationSetting (uint iSetting);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
201 uint ATSFontGetGlobalAutoActivationSetting ();
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
202 int ATSFontSetAutoActivationSettingForApplication (uint iSetting, CFURLRef iApplicationFileURL);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
203 uint ATSFontGetAutoActivationSettingForApplication (CFURLRef iApplicationFileURL);
9f0b49a2f64e Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
Jacob Carlborg <doob@me.com>
parents:
diff changeset
204 }