diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/coreservices/carboncore/IntlResources.d	Sat Aug 01 15:03:28 2009 +0200
@@ -0,0 +1,342 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Jul 21, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.coreservices.carboncore.IntlResources;
+
+//import dstep.AvailabilityMacros;
+import dstep.coreservices.carboncore.MacTypes;
+
+alias byte DateOrders;
+alias Intl0Rec* Intl0Ptr;
+alias Intl0Ptr* Intl0Hndl;
+alias Intl1Rec* Intl1Ptr;
+alias Intl1Ptr* Intl1Hndl;
+alias UntokenTable* UntokenTablePtr;
+alias UntokenTablePtr* UntokenTableHandle;
+alias NumberParts* NumberPartsPtr;
+alias Itl4Rec* Itl4Ptr;
+alias Itl4Ptr* Itl4Handle;
+alias NItl4Rec* NItl4Ptr;
+alias NItl4Ptr* NItl4Handle;
+alias OffPair[3] OffsetTable;
+
+enum
+{
+	itlcShowIcon = 7,
+	itlcDualCaret = 6,
+	itlcSysDirection = 15
+}
+
+enum
+{
+	itlcDisableKeyScriptSync = 3
+}
+
+enum
+{
+	itlcDisableKeyScriptSyncMask = 1 << itlcDisableKeyScriptSync
+}
+
+enum
+{
+	tokLeftQuote = 1,
+	tokRightQuote = 2,
+	tokLeadPlacer = 3,
+	tokLeader = 4,
+	tokNonLeader = 5,
+	tokZeroLead = 6,
+	tokPercent = 7,
+	tokPlusSign = 8,
+	tokMinusSign = 9,
+	tokThousands = 10,
+	tokReserved = 11,
+	tokSeparator = 12,
+	tokEscape = 13,
+	tokDecPoint = 14,
+	tokEPlus = 15,
+	tokEMinus = 16,
+	tokMaxSymbols = 31,
+	curNumberPartsVersion = 1
+}
+
+enum
+{
+	currSymLead = 16,
+	currNegSym = 32,
+	currTrailingZ = 64,
+	currLeadingZ = 128
+}
+
+enum
+{
+	mdy = 0,
+	dmy = 1,
+	ymd = 2,
+	myd = 3,
+	dym = 4,
+	ydm = 5
+}
+
+enum
+{
+	timeCycle24 = 0,
+	timeCycleZero = 1,
+	timeCycle12 = 255,
+	zeroCycle = 1,
+	longDay = 0,
+	longWeek = 1,
+	longMonth = 2,
+	longYear = 3,
+	supDay = 1,
+	supWeek = 2,
+	supMonth = 4,
+	supYear = 8,
+	dayLdingZ = 32,
+	mntLdingZ = 64,
+	century = 128,
+	secLeadingZ = 32,
+	minLeadingZ = 64,
+	hrLeadingZ = 128
+}
+
+union WideChar
+{
+	char[2] a;
+	short b;
+}
+
+struct OffPair
+{
+	short offFirst;
+	short offSecond;
+}
+
+
+struct Intl0Rec
+{
+	byte decimalPt;
+	byte thousSep;
+	byte listSep;
+	byte currSym1;
+	byte currSym2;
+	byte currSym3;
+	ubyte currFmt;
+	ubyte dateOrder;
+	ubyte shrtDateFmt;
+	byte dateSep;
+	ubyte timeCycle;
+	ubyte timeFmt;
+	char* mornStr;
+	char* eveStr;
+	byte timeSep;
+	byte time1Suff;
+	byte time2Suff;
+	byte time3Suff;
+	byte time4Suff;
+	byte time5Suff;
+	byte time6Suff;
+	byte time7Suff;
+	byte time8Suff;
+	ubyte metricSys;
+	short intl0Vers;
+}
+
+
+struct Intl1Rec
+{
+	Str15* days;
+	Str15* months;
+	ubyte suppressDay;
+	ubyte lngDateFmt;
+	ubyte dayLeading0;
+	ubyte abbrLen;
+	char* st0;
+	char* st1;
+	char* st2;
+	char* st3;
+	char* st4;
+	short intl1Vers;
+	short* localRtn;
+}
+
+
+struct Itl1ExtRec
+{
+	Intl1Rec base;
+	short version_;
+	short format;
+	short calendarCode;
+	int extraDaysTableOffset;
+	int extraDaysTableLength;
+	int extraMonthsTableOffset;
+	int extraMonthsTableLength;
+	int abbrevDaysTableOffset;
+	int abbrevDaysTableLength;
+	int abbrevMonthsTableOffset;
+	int abbrevMonthsTableLength;
+	int extraSepsTableOffset;
+	int extraSepsTableLength;
+	short* tables;
+}
+
+
+struct UntokenTable
+{
+	short len;
+	short lastToken;
+	short* index;
+}
+
+
+struct WideCharArr
+{
+	short size;
+	WideChar* data;
+}
+
+
+struct NumberParts
+{
+	short version_;
+	WideChar* data;
+	WideCharArr pePlus;
+	WideCharArr peMinus;
+	WideCharArr peMinusPlus;
+	WideCharArr altNumTable;
+	char* reserved;
+}
+
+
+struct Itl4Rec
+{
+	short flags;
+	int resourceType;
+	short resourceNum;
+	short version_;
+	int resHeader1;
+	int resHeader2;
+	short numTables;
+	int mapOffset;
+	int strOffset;
+	int fetchOffset;
+	int unTokenOffset;
+	int defPartsOffset;
+	int resOffset6;
+	int resOffset7;
+	int resOffset8;
+}
+
+
+struct NItl4Rec
+{
+	short flags;
+	int resourceType;
+	short resourceNum;
+	short version_;
+	short format;
+	short resHeader;
+	int resHeader2;
+	short numTables;
+	int mapOffset;
+	int strOffset;
+	int fetchOffset;
+	int unTokenOffset;
+	int defPartsOffset;
+	int whtSpListOffset;
+	int resOffset7;
+	int resOffset8;
+	short resLength1;
+	short resLength2;
+	short resLength3;
+	short unTokenLength;
+	short defPartsLength;
+	short whtSpListLength;
+	short resLength7;
+	short resLength8;
+}
+
+
+struct TableDirectoryRecord
+{
+	uint tableSignature;
+	uint reserved;
+	uint tableStartOffset;
+	uint tableSize;
+}
+
+
+struct Itl5Record
+{
+	int versionNumber;
+	ushort numberOfTables;
+	ushort* reserved;
+	TableDirectoryRecord* tableDirectory;
+}
+
+
+struct RuleBasedTrslRecord
+{
+	short sourceType;
+	short targetType;
+	short formatNumber;
+	short propertyFlag;
+	short numberOfRules;
+}
+
+
+struct ItlcRecord
+{
+	short itlcSystem;
+	short itlcReserved;
+	byte itlcFontForce;
+	byte itlcIntlForce;
+	byte itlcOldKybd;
+	byte itlcFlags;
+	short itlcIconOffset;
+	byte itlcIconSide;
+	byte itlcIconRsvd;
+	short itlcRegionCode;
+	short itlcSysFlags;
+	char* itlcReserved4;
+}
+
+
+struct ItlbRecord
+{
+	short itlbNumber;
+	short itlbDate;
+	short itlbSort;
+	short itlbFlags;
+	short itlbToken;
+	short itlbEncoding;
+	short itlbLang;
+	byte itlbNumRep;
+	byte itlbDateRep;
+	short itlbKeys;
+	short itlbIcon;
+}
+
+
+struct ItlbExtRecord
+{
+	ItlbRecord base;
+	int itlbLocalSize;
+	short itlbMonoFond;
+	short itlbMonoSize;
+	short itlbPrefFond;
+	short itlbPrefSize;
+	short itlbSmallFond;
+	short itlbSmallSize;
+	short itlbSysFond;
+	short itlbSysSize;
+	short itlbAppFond;
+	short itlbAppSize;
+	short itlbHelpFond;
+	short itlbHelpSize;
+	ubyte itlbValidStyles;
+	ubyte itlbAliasStyle;
+}
+