Mercurial > projects > dstep
comparison dstep/coreservices/carboncore/IntlResources.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 21, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.coreservices.carboncore.IntlResources; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.coreservices.carboncore.MacTypes; | |
11 | |
12 alias byte DateOrders; | |
13 alias Intl0Rec* Intl0Ptr; | |
14 alias Intl0Ptr* Intl0Hndl; | |
15 alias Intl1Rec* Intl1Ptr; | |
16 alias Intl1Ptr* Intl1Hndl; | |
17 alias UntokenTable* UntokenTablePtr; | |
18 alias UntokenTablePtr* UntokenTableHandle; | |
19 alias NumberParts* NumberPartsPtr; | |
20 alias Itl4Rec* Itl4Ptr; | |
21 alias Itl4Ptr* Itl4Handle; | |
22 alias NItl4Rec* NItl4Ptr; | |
23 alias NItl4Ptr* NItl4Handle; | |
24 alias OffPair[3] OffsetTable; | |
25 | |
26 enum | |
27 { | |
28 itlcShowIcon = 7, | |
29 itlcDualCaret = 6, | |
30 itlcSysDirection = 15 | |
31 } | |
32 | |
33 enum | |
34 { | |
35 itlcDisableKeyScriptSync = 3 | |
36 } | |
37 | |
38 enum | |
39 { | |
40 itlcDisableKeyScriptSyncMask = 1 << itlcDisableKeyScriptSync | |
41 } | |
42 | |
43 enum | |
44 { | |
45 tokLeftQuote = 1, | |
46 tokRightQuote = 2, | |
47 tokLeadPlacer = 3, | |
48 tokLeader = 4, | |
49 tokNonLeader = 5, | |
50 tokZeroLead = 6, | |
51 tokPercent = 7, | |
52 tokPlusSign = 8, | |
53 tokMinusSign = 9, | |
54 tokThousands = 10, | |
55 tokReserved = 11, | |
56 tokSeparator = 12, | |
57 tokEscape = 13, | |
58 tokDecPoint = 14, | |
59 tokEPlus = 15, | |
60 tokEMinus = 16, | |
61 tokMaxSymbols = 31, | |
62 curNumberPartsVersion = 1 | |
63 } | |
64 | |
65 enum | |
66 { | |
67 currSymLead = 16, | |
68 currNegSym = 32, | |
69 currTrailingZ = 64, | |
70 currLeadingZ = 128 | |
71 } | |
72 | |
73 enum | |
74 { | |
75 mdy = 0, | |
76 dmy = 1, | |
77 ymd = 2, | |
78 myd = 3, | |
79 dym = 4, | |
80 ydm = 5 | |
81 } | |
82 | |
83 enum | |
84 { | |
85 timeCycle24 = 0, | |
86 timeCycleZero = 1, | |
87 timeCycle12 = 255, | |
88 zeroCycle = 1, | |
89 longDay = 0, | |
90 longWeek = 1, | |
91 longMonth = 2, | |
92 longYear = 3, | |
93 supDay = 1, | |
94 supWeek = 2, | |
95 supMonth = 4, | |
96 supYear = 8, | |
97 dayLdingZ = 32, | |
98 mntLdingZ = 64, | |
99 century = 128, | |
100 secLeadingZ = 32, | |
101 minLeadingZ = 64, | |
102 hrLeadingZ = 128 | |
103 } | |
104 | |
105 union WideChar | |
106 { | |
107 char[2] a; | |
108 short b; | |
109 } | |
110 | |
111 struct OffPair | |
112 { | |
113 short offFirst; | |
114 short offSecond; | |
115 } | |
116 | |
117 | |
118 struct Intl0Rec | |
119 { | |
120 byte decimalPt; | |
121 byte thousSep; | |
122 byte listSep; | |
123 byte currSym1; | |
124 byte currSym2; | |
125 byte currSym3; | |
126 ubyte currFmt; | |
127 ubyte dateOrder; | |
128 ubyte shrtDateFmt; | |
129 byte dateSep; | |
130 ubyte timeCycle; | |
131 ubyte timeFmt; | |
132 char* mornStr; | |
133 char* eveStr; | |
134 byte timeSep; | |
135 byte time1Suff; | |
136 byte time2Suff; | |
137 byte time3Suff; | |
138 byte time4Suff; | |
139 byte time5Suff; | |
140 byte time6Suff; | |
141 byte time7Suff; | |
142 byte time8Suff; | |
143 ubyte metricSys; | |
144 short intl0Vers; | |
145 } | |
146 | |
147 | |
148 struct Intl1Rec | |
149 { | |
150 Str15* days; | |
151 Str15* months; | |
152 ubyte suppressDay; | |
153 ubyte lngDateFmt; | |
154 ubyte dayLeading0; | |
155 ubyte abbrLen; | |
156 char* st0; | |
157 char* st1; | |
158 char* st2; | |
159 char* st3; | |
160 char* st4; | |
161 short intl1Vers; | |
162 short* localRtn; | |
163 } | |
164 | |
165 | |
166 struct Itl1ExtRec | |
167 { | |
168 Intl1Rec base; | |
169 short version_; | |
170 short format; | |
171 short calendarCode; | |
172 int extraDaysTableOffset; | |
173 int extraDaysTableLength; | |
174 int extraMonthsTableOffset; | |
175 int extraMonthsTableLength; | |
176 int abbrevDaysTableOffset; | |
177 int abbrevDaysTableLength; | |
178 int abbrevMonthsTableOffset; | |
179 int abbrevMonthsTableLength; | |
180 int extraSepsTableOffset; | |
181 int extraSepsTableLength; | |
182 short* tables; | |
183 } | |
184 | |
185 | |
186 struct UntokenTable | |
187 { | |
188 short len; | |
189 short lastToken; | |
190 short* index; | |
191 } | |
192 | |
193 | |
194 struct WideCharArr | |
195 { | |
196 short size; | |
197 WideChar* data; | |
198 } | |
199 | |
200 | |
201 struct NumberParts | |
202 { | |
203 short version_; | |
204 WideChar* data; | |
205 WideCharArr pePlus; | |
206 WideCharArr peMinus; | |
207 WideCharArr peMinusPlus; | |
208 WideCharArr altNumTable; | |
209 char* reserved; | |
210 } | |
211 | |
212 | |
213 struct Itl4Rec | |
214 { | |
215 short flags; | |
216 int resourceType; | |
217 short resourceNum; | |
218 short version_; | |
219 int resHeader1; | |
220 int resHeader2; | |
221 short numTables; | |
222 int mapOffset; | |
223 int strOffset; | |
224 int fetchOffset; | |
225 int unTokenOffset; | |
226 int defPartsOffset; | |
227 int resOffset6; | |
228 int resOffset7; | |
229 int resOffset8; | |
230 } | |
231 | |
232 | |
233 struct NItl4Rec | |
234 { | |
235 short flags; | |
236 int resourceType; | |
237 short resourceNum; | |
238 short version_; | |
239 short format; | |
240 short resHeader; | |
241 int resHeader2; | |
242 short numTables; | |
243 int mapOffset; | |
244 int strOffset; | |
245 int fetchOffset; | |
246 int unTokenOffset; | |
247 int defPartsOffset; | |
248 int whtSpListOffset; | |
249 int resOffset7; | |
250 int resOffset8; | |
251 short resLength1; | |
252 short resLength2; | |
253 short resLength3; | |
254 short unTokenLength; | |
255 short defPartsLength; | |
256 short whtSpListLength; | |
257 short resLength7; | |
258 short resLength8; | |
259 } | |
260 | |
261 | |
262 struct TableDirectoryRecord | |
263 { | |
264 uint tableSignature; | |
265 uint reserved; | |
266 uint tableStartOffset; | |
267 uint tableSize; | |
268 } | |
269 | |
270 | |
271 struct Itl5Record | |
272 { | |
273 int versionNumber; | |
274 ushort numberOfTables; | |
275 ushort* reserved; | |
276 TableDirectoryRecord* tableDirectory; | |
277 } | |
278 | |
279 | |
280 struct RuleBasedTrslRecord | |
281 { | |
282 short sourceType; | |
283 short targetType; | |
284 short formatNumber; | |
285 short propertyFlag; | |
286 short numberOfRules; | |
287 } | |
288 | |
289 | |
290 struct ItlcRecord | |
291 { | |
292 short itlcSystem; | |
293 short itlcReserved; | |
294 byte itlcFontForce; | |
295 byte itlcIntlForce; | |
296 byte itlcOldKybd; | |
297 byte itlcFlags; | |
298 short itlcIconOffset; | |
299 byte itlcIconSide; | |
300 byte itlcIconRsvd; | |
301 short itlcRegionCode; | |
302 short itlcSysFlags; | |
303 char* itlcReserved4; | |
304 } | |
305 | |
306 | |
307 struct ItlbRecord | |
308 { | |
309 short itlbNumber; | |
310 short itlbDate; | |
311 short itlbSort; | |
312 short itlbFlags; | |
313 short itlbToken; | |
314 short itlbEncoding; | |
315 short itlbLang; | |
316 byte itlbNumRep; | |
317 byte itlbDateRep; | |
318 short itlbKeys; | |
319 short itlbIcon; | |
320 } | |
321 | |
322 | |
323 struct ItlbExtRecord | |
324 { | |
325 ItlbRecord base; | |
326 int itlbLocalSize; | |
327 short itlbMonoFond; | |
328 short itlbMonoSize; | |
329 short itlbPrefFond; | |
330 short itlbPrefSize; | |
331 short itlbSmallFond; | |
332 short itlbSmallSize; | |
333 short itlbSysFond; | |
334 short itlbSysSize; | |
335 short itlbAppFond; | |
336 short itlbAppSize; | |
337 short itlbHelpFond; | |
338 short itlbHelpSize; | |
339 ubyte itlbValidStyles; | |
340 ubyte itlbAliasStyle; | |
341 } | |
342 |