changeset 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 07194b026fa4
children 4f583f7e242e
files dstep/applicationservices/ats/ATS.d dstep/applicationservices/ats/ATSFont.d dstep/applicationservices/ats/ATSLayoutTypes.d dstep/applicationservices/ats/ATSTypes.d dstep/applicationservices/ats/SFNTLayoutTypes.d dstep/applicationservices/ats/SFNTTypes.d dstep/applicationservices/ats/ScalerStreamTypes.d dstep/applicationservices/colorsync/CMApplication.d dstep/applicationservices/colorsync/CMBase.d dstep/applicationservices/colorsync/CMDeviceIntegration.d dstep/applicationservices/colorsync/CMFloatBitmap.d dstep/applicationservices/colorsync/CMICCProfile.d dstep/applicationservices/colorsync/CMMComponent.d dstep/applicationservices/colorsync/CMScriptingPlugin.d dstep/applicationservices/colorsync/CMTypes.d dstep/applicationservices/colorsync/ColorSync.d dstep/applicationservices/coregraphics/CGAffineTransform.d dstep/applicationservices/coregraphics/CGBase.d dstep/applicationservices/coregraphics/CGBitmapContext.d dstep/applicationservices/coregraphics/CGColor.d dstep/applicationservices/coregraphics/CGColorSpace.d dstep/applicationservices/coregraphics/CGContext.d dstep/applicationservices/coregraphics/CGDataConsumer.d dstep/applicationservices/coregraphics/CGDataProvider.d dstep/applicationservices/coregraphics/CGDirectDisplay.d dstep/applicationservices/coregraphics/CGDirectPalette.d dstep/applicationservices/coregraphics/CGDisplayConfiguration.d dstep/applicationservices/coregraphics/CGDisplayFade.d dstep/applicationservices/coregraphics/CGError.d dstep/applicationservices/coregraphics/CGEvent.d dstep/applicationservices/coregraphics/CGEventSource.d dstep/applicationservices/coregraphics/CGEventTypes.d dstep/applicationservices/coregraphics/CGFont.d dstep/applicationservices/coregraphics/CGFunction.d dstep/applicationservices/coregraphics/CGGLContext.d dstep/applicationservices/coregraphics/CGGeometry.d dstep/applicationservices/coregraphics/CGGradient.d dstep/applicationservices/coregraphics/CGImage.d dstep/applicationservices/coregraphics/CGLayer.d dstep/applicationservices/coregraphics/CGPDFArray.d dstep/applicationservices/coregraphics/CGPDFContentStream.d dstep/applicationservices/coregraphics/CGPDFContext.d dstep/applicationservices/coregraphics/CGPDFDictionary.d dstep/applicationservices/coregraphics/CGPDFDocument.d dstep/applicationservices/coregraphics/CGPDFObject.d dstep/applicationservices/coregraphics/CGPDFOperatorTable.d dstep/applicationservices/coregraphics/CGPDFPage.d dstep/applicationservices/coregraphics/CGPDFScanner.d dstep/applicationservices/coregraphics/CGPDFStream.d dstep/applicationservices/coregraphics/CGPDFString.d dstep/applicationservices/coregraphics/CGPSConverter.d dstep/applicationservices/coregraphics/CGPath.d dstep/applicationservices/coregraphics/CGPattern.d dstep/applicationservices/coregraphics/CGRemoteOperation.d dstep/applicationservices/coregraphics/CGSession.d dstep/applicationservices/coregraphics/CGShading.d dstep/applicationservices/coregraphics/CGWindow.d dstep/applicationservices/coregraphics/CGWindowLevel.d dstep/applicationservices/coregraphics/CoreGraphics.d
diffstat 59 files changed, 6724 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/ats/ATS.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,17 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.ats.ATS;
+
+public:
+
+import dstep.applicationservices.ats.ATSFont;
+import dstep.applicationservices.ats.ATSLayoutTypes;
+import dstep.applicationservices.ats.ATSTypes;
+import dstep.applicationservices.ats.SFNTLayoutTypes;
+import dstep.applicationservices.ats.SFNTTypes;
+import dstep.applicationservices.ats.ScalerStreamTypes;
+import dstep.coreservices.CoreServices;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/ats/ATSFont.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,204 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.ats.ATSFont;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.ats.ATSTypes;
+import dstep.applicationservices.ats.SFNTTypes;
+import dstep.corefoundation.CoreFoundation;
+import dstep.coreservices.CoreServices;
+import dstep.objc.bridge.TypeEncoding;
+
+struct ATSFontFamilyIterator_;
+struct ATSFontIterator_;
+struct ATSFontNotificationRef_;
+struct ATSFontNotificationInfoRef_;
+
+alias uint ATSFontContext;
+alias ATSFontFamilyIterator_* ATSFontFamilyIterator;
+alias ATSFontIterator_* ATSFontIterator;
+alias int ATSFontFilterSelector;
+alias ATSFontNotificationRef_* ATSFontNotificationRef;
+alias ATSFontNotificationInfoRef_* ATSFontNotificationInfoRef;
+alias int ATSFontNotifyOption;
+alias int ATSFontNotifyAction;
+alias int ATSFontQueryMessageID;
+alias uint ATSFontAutoActivationSetting;
+
+extern (C)
+{
+	alias int function (uint, void*) ATSFontApplierFunction;
+	alias void function (ATSFontNotificationInfoRef, void*) ATSNotificationCallback;
+	alias CFPropertyListRef function (int, CFPropertyListRef, void*) ATSFontQueryCallback;
+	alias int function (uint, void*) ATSFontFamilyApplierFunction;
+}
+
+// This is needed otherwise the enums will fail compiling with gdc
+version (GNU)
+{
+	private
+	{
+		const __kATSQueryActivateFontMessage = getOSType!("atsa");
+	}
+}
+
+enum
+{
+	kATSOptionFlagsDefault = kNilOptions,
+	kATSOptionFlagsComposeFontPostScriptName = 1 << 0,
+	kATSOptionFlagsUseDataForkAsResourceFork = 1 << 8,
+	kATSOptionFlagsUseResourceFork = 2 << 8,
+	kATSOptionFlagsUseDataFork = 3 << 8
+}
+
+enum
+{
+	kATSIterationCompleted = -980L,
+	kATSInvalidFontFamilyAccess = -981L,
+	kATSInvalidFontAccess = -982L,
+	kATSIterationScopeModified = -983L,
+	kATSInvalidFontTableAccess = -984L,
+	kATSInvalidFontContainerAccess = -985L,
+	kATSInvalidGlyphAccess = -986L
+}
+
+enum
+{
+	kATSFontContextUnspecified = 0,
+	kATSFontContextGlobal = 1,
+	kATSFontContextLocal = 2
+}
+
+enum
+{
+	kATSOptionFlagsActivateDisabled = 0x00000001 << 5,
+	kATSOptionFlagsProcessSubdirectories = 0x00000001 << 6,
+	kATSOptionFlagsDoNotNotify = 0x00000001 << 7,
+	kATSOptionFlagsRecordPersistently = 0x00000001 << 18
+}
+
+enum
+{
+	kATSOptionFlagsIterateByPrecedenceMask = 0x00000001 << 5,
+	kATSOptionFlagsIncludeDisabledMask = 0x00000001 << 7,
+	kATSOptionFlagsIterationScopeMask = 0x00000007 << 12,
+	kATSOptionFlagsDefaultScope = 0x00000000 << 12,
+	kATSOptionFlagsUnRestrictedScope = 0x00000001 << 12,
+	kATSOptionFlagsRestrictedScope = 0x00000002 << 12
+}
+
+enum
+{
+	kATSFontFilterCurrentVersion = 0
+}
+
+enum /*ATSFontFilterSelector*/ 
+{
+	kATSFontFilterSelectorUnspecified = 0,
+	kATSFontFilterSelectorGeneration = 3,
+	kATSFontFilterSelectorFontFamily = 7,
+	kATSFontFilterSelectorFontFamilyApplierFunction = 8,
+	kATSFontFilterSelectorFontApplierFunction = 9,
+	kATSFileReferenceFilterSelector = 10
+}
+
+enum /*ATSFontNotifyOption*/ 
+{
+	kATSFontNotifyOptionDefault = 0,
+	kATSFontNotifyOptionReceiveWhileSuspended = 1L << 0
+}
+
+enum /*ATSFontNotifyAction*/ 
+{
+	kATSFontNotifyActionFontsChanged = 1,
+	kATSFontNotifyActionDirectoriesChanged = 2
+}
+
+enum /*ATSFontQueryMessageID*/ 
+{
+	kATSQueryActivateFontMessage = getOSType!("atsa")
+}
+
+enum
+{
+	kATSFontAutoActivationDefault = 0,
+	kATSFontAutoActivationDisabled = 1,
+	kATSFontAutoActivationEnabled = 2,
+	kATSFontAutoActivationAsk = 4
+}
+
+struct ATSFontFilter
+{
+	 uint version_;
+	 ATSFontFilterSelector filterSelector;
+	 
+	 union
+	 {
+		 ATSGeneration generationFilter;
+		 ATSFontFamilyRef fontFamilyFilter;
+		 ATSFontFamilyApplierFunction fontFamilyApplierFunctionFilter;
+		 ATSFontApplierFunction fontApplierFunctionFilter;
+		 /*const*/ FSRef* fontFileRefFilter;
+	 }
+}
+
+
+struct ATSFontQuerySourceContext
+{
+	UInt32 version_;
+	void* refCon;
+	CFAllocatorRetainCallBack retain;
+	CFAllocatorReleaseCallBack release;
+}
+
+extern (C)
+{
+	uint ATSGetGeneration ();
+	int ATSFontActivateFromFileReference (FSRef* iFile, uint iContext, uint iFormat, void* iRefCon, uint iOptions, ATSFontContainerRef* oContainer);
+	int ATSFontActivateFromMemory (LogicalAddress iData, uint iLength, uint iContext, uint iFormat, void* iReserved, uint iOptions, ATSFontContainerRef* oContainer);
+	int ATSFontDeactivate (uint iContainer, void* iRefCon, uint iOptions);
+	int ATSFontGetContainerFromFileReference (FSRef* iFile, uint iContext, uint iOptions, ATSFontContainerRef* oContainer);
+	int ATSFontGetContainer (uint iFont, uint iOptions, ATSFontContainerRef* oContainer);
+	int ATSFontSetEnabled (uint iFont, uint iOptions, ubyte iEnabled);
+	ubyte ATSFontIsEnabled (uint iFont);
+	int ATSFontFamilyApplyFunction (ATSFontFamilyApplierFunction iFunction, void* iRefCon);
+	int ATSFontFamilyIteratorCreate (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontFamilyIterator* ioIterator);
+	int ATSFontFamilyIteratorRelease (ATSFontFamilyIterator* ioIterator);
+	int ATSFontFamilyIteratorReset (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontFamilyIterator* ioIterator);
+	int ATSFontFamilyIteratorNext (ATSFontFamilyIterator iIterator, ATSFontFamilyRef* oFamily);
+	uint ATSFontFamilyFindFromName (CFStringRef iName, uint iOptions);
+	uint ATSFontFamilyGetGeneration (uint iFamily);
+	int ATSFontFamilyGetName (uint iFamily, uint iOptions, CFStringRef* oName);
+	uint ATSFontFamilyGetEncoding (uint iFamily);
+	int ATSFontApplyFunction (ATSFontApplierFunction iFunction, void* iRefCon);
+	int ATSFontIteratorCreate (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontIterator* ioIterator);
+	int ATSFontIteratorRelease (ATSFontIterator* ioIterator);
+	int ATSFontIteratorReset (uint iContext, ATSFontFilter* iFilter, void* iRefCon, uint iOptions, ATSFontIterator* ioIterator);
+	int ATSFontIteratorNext (ATSFontIterator iIterator, ATSFontRef* oFont);
+	uint ATSFontFindFromName (CFStringRef iName, uint iOptions);
+	uint ATSFontFindFromPostScriptName (CFStringRef iName, uint iOptions);
+	int ATSFontFindFromContainer (uint iContainer, uint iOptions, uint iCount, ATSFontRef* ioArray, ItemCount* oCount);
+	uint ATSFontGetGeneration (uint iFont);
+	int ATSFontGetName (uint iFont, uint iOptions, CFStringRef* oName);
+	int ATSFontGetPostScriptName (uint iFont, uint iOptions, CFStringRef* oName);
+	int ATSFontGetTableDirectory (uint iFont, uint iBufferSize, void* ioBuffer, ByteCount* oSize);
+	int ATSFontGetTable (uint iFont, uint iTag, uint iOffset, uint iBufferSize, void* ioBuffer, ByteCount* oSize);
+	int ATSFontGetHorizontalMetrics (uint iFont, uint iOptions, ATSFontMetrics* oMetrics);
+	int ATSFontGetVerticalMetrics (uint iFont, uint iOptions, ATSFontMetrics* oMetrics);
+	uint ATSFontFamilyFindFromQuickDrawName (char* iName);
+	int ATSFontFamilyGetQuickDrawName (uint iFamily, ubyte[256] oName);
+	int ATSFontGetFileReference (uint iFont, FSRef* oFile);
+	int ATSFontGetFontFamilyResource (uint iFont, uint iBufferSize, void* ioBuffer, ByteCount* oSize);
+	int ATSFontNotify (int action, void* info);
+	int ATSFontNotificationSubscribe (ATSNotificationCallback callback, int options, void* iRefcon, ATSFontNotificationRef* oNotificationRef);
+	int ATSFontNotificationUnsubscribe (ATSFontNotificationRef notificationRef);
+	CFRunLoopSourceRef ATSCreateFontQueryRunLoopSource (int queryOrder, int sourceOrder, ATSFontQueryCallback callout, ATSFontQuerySourceContext* context);
+	int ATSFontSetGlobalAutoActivationSetting (uint iSetting);
+	uint ATSFontGetGlobalAutoActivationSetting ();
+	int ATSFontSetAutoActivationSettingForApplication (uint iSetting, CFURLRef iApplicationFileURL);
+	uint ATSFontGetAutoActivationSettingForApplication (CFURLRef iApplicationFileURL);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/ats/ATSLayoutTypes.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,156 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.ats.ATSLayoutTypes;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.ats.ATSTypes;
+import dstep.applicationservices.ats.SFNTLayoutTypes;
+import dstep.coreservices.CoreServices;
+import dstep.internal.Version;
+import dstep.internal.Types;
+
+struct ATSGlyphVector;
+
+alias uint ATSULayoutOperationSelector;
+alias uint ATSULayoutOperationCallbackStatus;
+alias uint ATSLineLayoutOptions;
+alias uint ATSStyleRenderingOptions;
+alias uint ATSGlyphInfoFlags;
+alias ATSGlyphVector* ATSULineRef;
+alias ATSUDirectLayoutOperationOverrideProcPtr ATSUDirectLayoutOperationOverrideUPP;
+
+extern (C)
+{
+	alias int function (uint, ATSULineRef, uint, void*, ATSULayoutOperationCallbackStatus*) ATSUDirectLayoutOperationOverrideProcPtr;
+}
+
+enum
+{
+	kATSUseGlyphAdvance = 0x7FFFFFFF,
+	kATSUseLineHeight = 0x7FFFFFFF,
+	kATSNoTracking = cast(c_long)0x80000000
+}
+
+enum
+{
+	kATSUseCaretOrigins = 0,
+	kATSUseDeviceOrigins = 1,
+	kATSUseFractionalOrigins = 2,
+	kATSUseOriginFlags = 3
+}
+
+enum
+{
+	kATSULayoutOperationNone = 0x00000000,
+	kATSULayoutOperationJustification = 0x00000001,
+	kATSULayoutOperationMorph = 0x00000002,
+	kATSULayoutOperationKerningAdjustment = 0x00000004,
+	kATSULayoutOperationBaselineAdjustment = 0x00000008,
+	kATSULayoutOperationTrackingAdjustment = 0x00000010,
+	kATSULayoutOperationPostLayoutAdjustment = 0x00000020,
+	kATSULayoutOperationAppleReserved = cast(uint) 0xFFFFFFC0
+}
+
+enum
+{
+	kATSULayoutOperationCallbackStatusHandled = 0x00000000,
+	kATSULayoutOperationCallbackStatusContinue = 0x00000001
+}
+
+enum
+{
+	kATSLineNoLayoutOptions = 0x00000000,
+	kATSLineIsDisplayOnly = 0x00000001,
+	kATSLineHasNoHangers = 0x00000002,
+	kATSLineHasNoOpticalAlignment = 0x00000004,
+	kATSLineKeepSpacesOutOfMargin = 0x00000008,
+	kATSLineNoSpecialJustification = 0x00000010,
+	kATSLineLastNoJustification = 0x00000020,
+	kATSLineFractDisable = 0x00000040,
+	kATSLineImposeNoAngleForEnds = 0x00000080,
+	kATSLineFillOutToWidth = 0x00000100,
+	kATSLineTabAdjustEnabled = 0x00000200,
+	kATSLineIgnoreFontLeading = 0x00000400,
+	kATSLineApplyAntiAliasing = 0x00000800,
+	kATSLineNoAntiAliasing = 0x00001000,
+	kATSLineDisableNegativeJustification = 0x00002000,
+	kATSLineDisableAutoAdjustDisplayPos = 0x00004000,
+	kATSLineUseQDRendering = 0x00008000,
+	kATSLineDisableAllJustification = 0x00010000,
+	kATSLineDisableAllGlyphMorphing = 0x00020000,
+	kATSLineDisableAllKerningAdjustments = 0x00040000,
+	kATSLineDisableAllBaselineAdjustments = 0x00080000,
+	kATSLineDisableAllTrackingAdjustments = 0x00100000,
+	kATSLineDisableAllLayoutOperations = kATSLineDisableAllJustification | kATSLineDisableAllGlyphMorphing | kATSLineDisableAllKerningAdjustments | kATSLineDisableAllBaselineAdjustments | kATSLineDisableAllTrackingAdjustments,
+	kATSLineUseDeviceMetrics = 0x01000000,
+	kATSLineBreakToNearestCharacter = 0x02000000,
+	kATSLineAppleReserved = cast(uint) 0xFCE00000
+}
+
+enum
+{
+	kATSStyleNoOptions = 0x00000000,
+	kATSStyleNoHinting = 0x00000001,
+	kATSStyleApplyAntiAliasing = 0x00000002,
+	kATSStyleNoAntiAliasing = 0x00000004,
+	kATSStyleAppleReserved = cast(uint) 0xFFFFFFF8,
+	kATSStyleApplyHints = kATSStyleNoOptions
+}
+
+enum
+{
+	kATSGlyphInfoAppleReserved = 0x1FFBFFE8,
+	kATSGlyphInfoIsAttachment = cast(uint) 0x80000000,
+	kATSGlyphInfoIsLTHanger = 0x40000000,
+	kATSGlyphInfoIsRBHanger = 0x20000000,
+	kATSGlyphInfoTerminatorGlyph = 0x00080000,
+	kATSGlyphInfoIsWhiteSpace = 0x00040000,
+	kATSGlyphInfoHasImposedWidth = 0x00000010,
+	kATSGlyphInfoByteSizeMask = 0x00000007
+}
+
+struct ATSLayoutRecord
+{
+	ushort glyphID;
+	uint flags;
+	uint originalOffset;
+	int realPos;
+}
+
+
+struct ATSTrapezoid
+{
+	FixedPoint upperLeft;
+	FixedPoint upperRight;
+	FixedPoint lowerRight;
+	FixedPoint lowerLeft;
+}
+
+
+struct ATSJustWidthDeltaEntryOverride
+{
+	int beforeGrowLimit;
+	int beforeShrinkLimit;
+	int afterGrowLimit;
+	int afterShrinkLimit;
+	ushort growFlags;
+	ushort shrinkFlags;
+}
+
+
+struct ATSULayoutOperationOverrideSpecifier
+{
+	uint operationSelector;
+	ATSUDirectLayoutOperationOverrideUPP overrideUPP;
+}
+
+extern (C)
+{
+	ATSUDirectLayoutOperationOverrideUPP NewATSUDirectLayoutOperationOverrideUPP (ATSUDirectLayoutOperationOverrideProcPtr userRoutine);
+	void DisposeATSUDirectLayoutOperationOverrideUPP (ATSUDirectLayoutOperationOverrideUPP userUPP);
+	int InvokeATSUDirectLayoutOperationOverrideUPP (uint iCurrentOperation, ATSULineRef iLineRef, uint iRefCon, void* iOperationCallbackParameterPtr, ATSULayoutOperationCallbackStatus* oCallbackStatus, ATSUDirectLayoutOperationOverrideUPP userUPP);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/ats/ATSTypes.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,230 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.ats.ATSTypes;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.coreservices.CoreServices;
+import dstep.objc.bridge.TypeEncoding;
+
+alias CGPoint ATSPoint;
+alias uint FMGeneration;
+alias short FMFontFamily;
+alias short FMFontStyle;
+alias short FMFontSize;
+alias uint FMFont;
+alias uint FMFilterSelector;
+alias FMFontFamilyCallbackFilterProcPtr FMFontFamilyCallbackFilterUPP;
+alias FMFontCallbackFilterProcPtr FMFontCallbackFilterUPP;
+alias uint ATSOptionFlags;
+alias uint ATSGeneration;
+alias uint ATSFontContainerRef;
+alias uint ATSFontFamilyRef;
+alias uint ATSFontRef;
+alias ushort ATSGlyphRef;
+alias CGFloat ATSFontSize;
+alias uint ATSFontFormat;
+alias ushort ATSCurveType;
+alias ushort GlyphID;
+
+extern (C)
+{
+	alias int function (uint, void*) FMFontCallbackFilterProcPtr;
+	alias int function (short, void*) FMFontFamilyCallbackFilterProcPtr;
+}
+
+// This is needed otherwise the enums will fail compiling with gdc
+version (GNU)
+{
+	private
+	{
+		const __kFMTrueTypeFontTechnology = getOSType!("true");
+		const __kFMPostScriptFontTechnology = getOSType!("typ1");
+	}
+}
+
+enum
+{
+	kInvalidGeneration = 0L,
+	kInvalidFontFamily = -1,
+	kInvalidFont = 0L
+}
+
+enum
+{
+	kFMCurrentFilterFormat = 0L
+}
+
+enum
+{
+	kFMFontTechnologyFilterSelector = 1L,
+	kFMFontContainerFilterSelector = 2L,
+	kFMGenerationFilterSelector = 3L,
+	kFMFontFamilyCallbackFilterSelector = 4L,
+	kFMFontCallbackFilterSelector = 5L,
+	kFMFontDirectoryFilterSelector = 6L,
+	kFMFontFileRefFilterSelector = 10L
+}
+
+enum
+{
+	kFMTrueTypeFontTechnology = getOSType!("true"),
+	kFMPostScriptFontTechnology = getOSType!("typ1")
+}
+
+enum
+{
+	kATSFontFormatUnspecified = 0
+}
+
+enum
+{
+	kATSGenerationUnspecified = 0L,
+	kATSFontContainerRefUnspecified = 0L,
+	kATSFontFamilyRefUnspecified = 0L,
+	kATSFontRefUnspecified = 0L
+}
+
+enum
+{
+	kATSItalicQDSkew = (1 << 16) / 4,
+	kATSBoldQDStretch = (1 << 16) * 3 / 2,
+	kATSRadiansFactor = 1144
+}
+
+enum
+{
+	kATSCubicCurveType = 0x0001,
+	kATSQuadCurveType = 0x0002,
+	kATSOtherCurveType = 0x0003
+}
+
+enum
+{
+	kATSDeletedGlyphcode = 0xFFFF
+}
+
+struct ATSFSSpec
+{
+	short vRefNum;
+	int parID;
+	ubyte[64] name;
+}
+
+
+struct FMFontFamilyInstance
+{
+	short fontFamily;
+	short fontStyle;
+}
+
+
+struct FMFontFamilyIterator
+{
+	UInt32* reserved;
+}
+
+
+struct FMFontIterator
+{
+	UInt32* reserved;
+}
+
+
+struct FMFontFamilyInstanceIterator
+{
+	UInt32* reserved;
+}
+
+
+struct FMFontDirectoryFilter
+{
+	short fontFolderDomain;
+	UInt32* reserved;
+}
+
+struct FMFilter
+{
+	uint format;
+	FMFilterSelector selector;
+	
+	union
+	{
+		FourCharCode fontTechnologyFilter;
+		ATSFSSpec fontContainerFilter;
+		FMGeneration generationFilter;
+		FMFontFamilyCallbackFilterUPP fontFamilyCallbackFilter;
+		FMFontCallbackFilterUPP fontCallbackFilter;
+		FMFontDirectoryFilter fontDirectoryFilter;
+		/*const*/ FSRef* fontFileRefFilter;
+	}
+}
+
+
+struct ATSFontMetrics
+{
+	float version_;
+	CGFloat ascent;
+	CGFloat descent;
+	CGFloat leading;
+	CGFloat avgAdvanceWidth;
+	CGFloat maxAdvanceWidth;
+	CGFloat minLeftSideBearing;
+	CGFloat minRightSideBearing;
+	CGFloat stemWidth;
+	CGFloat stemHeight;
+	CGFloat capHeight;
+	CGFloat xHeight;
+	CGFloat italicAngle;
+	CGFloat underlinePosition;
+	CGFloat underlineThickness;
+}
+
+
+struct ATSUCurvePath
+{
+	UInt32 vectors;
+	UInt32* controlBits;
+	ATSPoint* vector;
+}
+
+
+struct ATSUCurvePaths
+{
+	UInt32 contours;
+	ATSUCurvePath* contour;
+}
+
+
+struct ATSGlyphIdealMetrics
+{
+	ATSPoint advance;
+	ATSPoint sideBearing;
+	ATSPoint otherSideBearing;
+}
+
+
+struct ATSGlyphScreenMetrics
+{
+	ATSPoint deviceAdvance;
+	uint topLeft;
+	uint height;
+	UInt32 width;
+	ATSPoint sideBearing;
+	ATSPoint otherSideBearing;
+}
+
+extern (C)
+{
+	FMFontFamilyCallbackFilterUPP NewFMFontFamilyCallbackFilterUPP (FMFontFamilyCallbackFilterProcPtr userRoutine);
+	FMFontCallbackFilterUPP NewFMFontCallbackFilterUPP (FMFontCallbackFilterProcPtr userRoutine);
+	void DisposeFMFontFamilyCallbackFilterUPP (FMFontFamilyCallbackFilterUPP userUPP);
+	void DisposeFMFontCallbackFilterUPP (FMFontCallbackFilterUPP userUPP);
+	int InvokeFMFontFamilyCallbackFilterUPP (short iFontFamily, void* iRefCon, FMFontFamilyCallbackFilterUPP userUPP);
+	int InvokeFMFontCallbackFilterUPP (uint iFont, void* iRefCon, FMFontCallbackFilterUPP userUPP);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/ats/SFNTLayoutTypes.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,1244 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.ats.SFNTLayoutTypes;
+
+//import dstep.AvailabilityMacros;
+import dstep.coreservices.CoreServices;
+import dstep.internal.Types;
+
+alias ushort SFNTLookupTableFormat;
+alias ushort SFNTLookupValue;
+alias ushort SFNTLookupOffset;
+alias uint SFNTLookupKind;
+alias SFNTLookupTable* SFNTLookupTablePtr;
+alias SFNTLookupTablePtr* SFNTLookupTableHandle;
+alias ubyte STClass;
+alias ubyte STEntryIndex;
+alias ushort STXClass;
+alias ushort STXStateIndex;
+alias ushort STXEntryIndex;
+alias SFNTLookupTable STXClassTable;
+alias LcarCaretTable* LcarCaretTablePtr;
+alias ushort JustPCActionType;
+alias ushort JustificationFlags;
+alias ushort JustPCUnconditionalAddAction;
+alias ushort OpbdTableFormat;
+alias uint MortSubtableMaskFlags;
+alias uint MortLigatureActionEntry;
+alias ushort PropCharProperties;
+alias short TrakValue;
+alias ubyte KernTableFormat;
+alias ushort KernSubtableInfo;
+alias short KernKerningValue;
+alias ushort KernArrayOffset;
+alias KernTableHeader* KernTableHeaderPtr;
+alias KernTableHeaderPtr* KernTableHeaderHandle;
+alias KernOrderedListEntry* KernOrderedListEntryPtr;
+alias KernOffsetTable* KernOffsetTablePtr;
+alias KernSubtableHeader* KernSubtableHeaderPtr;
+alias uint BslnBaselineClass;
+alias ushort BslnTableFormat;
+alias BslnTable* BslnTablePtr;
+
+enum
+{
+	kAllTypographicFeaturesType = 0,
+	kLigaturesType = 1,
+	kCursiveConnectionType = 2,
+	kLetterCaseType = 3,
+	kVerticalSubstitutionType = 4,
+	kLinguisticRearrangementType = 5,
+	kNumberSpacingType = 6,
+	kSmartSwashType = 8,
+	kDiacriticsType = 9,
+	kVerticalPositionType = 10,
+	kFractionsType = 11,
+	kOverlappingCharactersType = 13,
+	kTypographicExtrasType = 14,
+	kMathematicalExtrasType = 15,
+	kOrnamentSetsType = 16,
+	kCharacterAlternativesType = 17,
+	kDesignComplexityType = 18,
+	kStyleOptionsType = 19,
+	kCharacterShapeType = 20,
+	kNumberCaseType = 21,
+	kTextSpacingType = 22,
+	kTransliterationType = 23,
+	kAnnotationType = 24,
+	kKanaSpacingType = 25,
+	kIdeographicSpacingType = 26,
+	kUnicodeDecompositionType = 27,
+	kRubyKanaType = 28,
+	kCJKSymbolAlternativesType = 29,
+	kIdeographicAlternativesType = 30,
+	kCJKVerticalRomanPlacementType = 31,
+	kItalicCJKRomanType = 32,
+	kCJKRomanSpacingType = 103,
+	kLastFeatureType = -1
+}
+
+enum
+{
+	kAllTypeFeaturesOnSelector = 0,
+	kAllTypeFeaturesOffSelector = 1
+}
+
+enum
+{
+	kRequiredLigaturesOnSelector = 0,
+	kRequiredLigaturesOffSelector = 1,
+	kCommonLigaturesOnSelector = 2,
+	kCommonLigaturesOffSelector = 3,
+	kRareLigaturesOnSelector = 4,
+	kRareLigaturesOffSelector = 5,
+	kLogosOnSelector = 6,
+	kLogosOffSelector = 7,
+	kRebusPicturesOnSelector = 8,
+	kRebusPicturesOffSelector = 9,
+	kDiphthongLigaturesOnSelector = 10,
+	kDiphthongLigaturesOffSelector = 11,
+	kSquaredLigaturesOnSelector = 12,
+	kSquaredLigaturesOffSelector = 13,
+	kAbbrevSquaredLigaturesOnSelector = 14,
+	kAbbrevSquaredLigaturesOffSelector = 15,
+	kSymbolLigaturesOnSelector = 16,
+	kSymbolLigaturesOffSelector = 17
+}
+
+enum
+{
+	kUnconnectedSelector = 0,
+	kPartiallyConnectedSelector = 1,
+	kCursiveSelector = 2
+}
+
+enum
+{
+	kUpperAndLowerCaseSelector = 0,
+	kAllCapsSelector = 1,
+	kAllLowerCaseSelector = 2,
+	kSmallCapsSelector = 3,
+	kInitialCapsSelector = 4,
+	kInitialCapsAndSmallCapsSelector = 5
+}
+
+enum
+{
+	kSubstituteVerticalFormsOnSelector = 0,
+	kSubstituteVerticalFormsOffSelector = 1
+}
+
+enum
+{
+	kLinguisticRearrangementOnSelector = 0,
+	kLinguisticRearrangementOffSelector = 1
+}
+
+enum
+{
+	kMonospacedNumbersSelector = 0,
+	kProportionalNumbersSelector = 1,
+	kThirdWidthNumbersSelector = 2,
+	kQuarterWidthNumbersSelector = 3
+}
+
+enum
+{
+	kWordInitialSwashesOnSelector = 0,
+	kWordInitialSwashesOffSelector = 1,
+	kWordFinalSwashesOnSelector = 2,
+	kWordFinalSwashesOffSelector = 3,
+	kLineInitialSwashesOnSelector = 4,
+	kLineInitialSwashesOffSelector = 5,
+	kLineFinalSwashesOnSelector = 6,
+	kLineFinalSwashesOffSelector = 7,
+	kNonFinalSwashesOnSelector = 8,
+	kNonFinalSwashesOffSelector = 9
+}
+
+enum
+{
+	kShowDiacriticsSelector = 0,
+	kHideDiacriticsSelector = 1,
+	kDecomposeDiacriticsSelector = 2
+}
+
+enum
+{
+	kNormalPositionSelector = 0,
+	kSuperiorsSelector = 1,
+	kInferiorsSelector = 2,
+	kOrdinalsSelector = 3
+}
+
+enum
+{
+	kNoFractionsSelector = 0,
+	kVerticalFractionsSelector = 1,
+	kDiagonalFractionsSelector = 2
+}
+
+enum
+{
+	kPreventOverlapOnSelector = 0,
+	kPreventOverlapOffSelector = 1
+}
+
+enum
+{
+	kHyphensToEmDashOnSelector = 0,
+	kHyphensToEmDashOffSelector = 1,
+	kHyphenToEnDashOnSelector = 2,
+	kHyphenToEnDashOffSelector = 3,
+	kSlashedZeroOnSelector = 4,
+	kSlashedZeroOffSelector = 5,
+	kFormInterrobangOnSelector = 6,
+	kFormInterrobangOffSelector = 7,
+	kSmartQuotesOnSelector = 8,
+	kSmartQuotesOffSelector = 9,
+	kPeriodsToEllipsisOnSelector = 10,
+	kPeriodsToEllipsisOffSelector = 11
+}
+
+enum
+{
+	kHyphenToMinusOnSelector = 0,
+	kHyphenToMinusOffSelector = 1,
+	kAsteriskToMultiplyOnSelector = 2,
+	kAsteriskToMultiplyOffSelector = 3,
+	kSlashToDivideOnSelector = 4,
+	kSlashToDivideOffSelector = 5,
+	kInequalityLigaturesOnSelector = 6,
+	kInequalityLigaturesOffSelector = 7,
+	kExponentsOnSelector = 8,
+	kExponentsOffSelector = 9
+}
+
+enum
+{
+	kNoOrnamentsSelector = 0,
+	kDingbatsSelector = 1,
+	kPiCharactersSelector = 2,
+	kFleuronsSelector = 3,
+	kDecorativeBordersSelector = 4,
+	kInternationalSymbolsSelector = 5,
+	kMathSymbolsSelector = 6
+}
+
+enum
+{
+	kNoAlternatesSelector = 0
+}
+
+enum
+{
+	kDesignLevel1Selector = 0,
+	kDesignLevel2Selector = 1,
+	kDesignLevel3Selector = 2,
+	kDesignLevel4Selector = 3,
+	kDesignLevel5Selector = 4
+}
+
+enum
+{
+	kNoStyleOptionsSelector = 0,
+	kDisplayTextSelector = 1,
+	kEngravedTextSelector = 2,
+	kIlluminatedCapsSelector = 3,
+	kTitlingCapsSelector = 4,
+	kTallCapsSelector = 5
+}
+
+enum
+{
+	kTraditionalCharactersSelector = 0,
+	kSimplifiedCharactersSelector = 1,
+	kJIS1978CharactersSelector = 2,
+	kJIS1983CharactersSelector = 3,
+	kJIS1990CharactersSelector = 4,
+	kTraditionalAltOneSelector = 5,
+	kTraditionalAltTwoSelector = 6,
+	kTraditionalAltThreeSelector = 7,
+	kTraditionalAltFourSelector = 8,
+	kTraditionalAltFiveSelector = 9,
+	kExpertCharactersSelector = 10
+}
+
+enum
+{
+	kLowerCaseNumbersSelector = 0,
+	kUpperCaseNumbersSelector = 1
+}
+
+enum
+{
+	kProportionalTextSelector = 0,
+	kMonospacedTextSelector = 1,
+	kHalfWidthTextSelector = 2
+}
+
+enum
+{
+	kNoTransliterationSelector = 0,
+	kHanjaToHangulSelector = 1,
+	kHiraganaToKatakanaSelector = 2,
+	kKatakanaToHiraganaSelector = 3,
+	kKanaToRomanizationSelector = 4,
+	kRomanizationToHiraganaSelector = 5,
+	kRomanizationToKatakanaSelector = 6,
+	kHanjaToHangulAltOneSelector = 7,
+	kHanjaToHangulAltTwoSelector = 8,
+	kHanjaToHangulAltThreeSelector = 9
+}
+
+enum
+{
+	kNoAnnotationSelector = 0,
+	kBoxAnnotationSelector = 1,
+	kRoundedBoxAnnotationSelector = 2,
+	kCircleAnnotationSelector = 3,
+	kInvertedCircleAnnotationSelector = 4,
+	kParenthesisAnnotationSelector = 5,
+	kPeriodAnnotationSelector = 6,
+	kRomanNumeralAnnotationSelector = 7,
+	kDiamondAnnotationSelector = 8,
+	kInvertedBoxAnnotationSelector = 9,
+	kInvertedRoundedBoxAnnotationSelector = 10
+}
+
+enum
+{
+	kFullWidthKanaSelector = 0,
+	kProportionalKanaSelector = 1
+}
+
+enum
+{
+	kFullWidthIdeographsSelector = 0,
+	kProportionalIdeographsSelector = 1,
+	kHalfWidthIdeographsSelector = 2
+}
+
+enum
+{
+	kCanonicalCompositionOnSelector = 0,
+	kCanonicalCompositionOffSelector = 1,
+	kCompatibilityCompositionOnSelector = 2,
+	kCompatibilityCompositionOffSelector = 3,
+	kTranscodingCompositionOnSelector = 4,
+	kTranscodingCompositionOffSelector = 5
+}
+
+enum
+{
+	kNoRubyKanaSelector = 0,
+	kRubyKanaSelector = 1,
+	kRubyKanaOnSelector = 2,
+	kRubyKanaOffSelector = 3
+}
+
+enum
+{
+	kNoCJKSymbolAlternativesSelector = 0,
+	kCJKSymbolAltOneSelector = 1,
+	kCJKSymbolAltTwoSelector = 2,
+	kCJKSymbolAltThreeSelector = 3,
+	kCJKSymbolAltFourSelector = 4,
+	kCJKSymbolAltFiveSelector = 5
+}
+
+enum
+{
+	kNoIdeographicAlternativesSelector = 0,
+	kIdeographicAltOneSelector = 1,
+	kIdeographicAltTwoSelector = 2,
+	kIdeographicAltThreeSelector = 3,
+	kIdeographicAltFourSelector = 4,
+	kIdeographicAltFiveSelector = 5
+}
+
+enum
+{
+	kCJKVerticalRomanCenteredSelector = 0,
+	kCJKVerticalRomanHBaselineSelector = 1
+}
+
+enum
+{
+	kNoCJKItalicRomanSelector = 0,
+	kCJKItalicRomanSelector = 1,
+	kCJKItalicRomanOnSelector = 2,
+	kCJKItalicRomanOffSelector = 3
+}
+
+enum
+{
+	kHalfWidthCJKRomanSelector = 0,
+	kProportionalCJKRomanSelector = 1,
+	kDefaultCJKRomanSelector = 2,
+	kFullWidthCJKRomanSelector = 3
+}
+
+enum
+{
+	kSFNTLookupSimpleArray = 0,
+	kSFNTLookupSegmentSingle = 2,
+	kSFNTLookupSegmentArray = 4,
+	kSFNTLookupSingleTable = 6,
+	kSFNTLookupTrimmedArray = 8
+}
+
+enum
+{
+	kSTClassEndOfText = 0,
+	kSTClassOutOfBounds = 1,
+	kSTClassDeletedGlyph = 2,
+	kSTClassEndOfLine = 3,
+	kSTSetMark = 0x8000,
+	kSTNoAdvance = 0x4000,
+	kSTMarkEnd = 0x2000,
+	kSTLigActionMask = 0x3FFF,
+	kSTRearrVerbMask = 0x000F
+}
+
+enum
+{
+	kSTXHasLigAction = 0x2000
+}
+
+enum
+{
+	kLCARTag = 0x6C636172,
+	kLCARCurrentVersion = 0x00010000,
+	kLCARLinearFormat = 0,
+	kLCARCtlPointFormat = 1
+}
+
+enum
+{
+	kJUSTTag = 0x6A757374,
+	kJUSTCurrentVersion = 0x00010000,
+	kJUSTStandardFormat = 0,
+	kJUSTnoGlyphcode = 0xFFFF,
+	kJUSTpcDecompositionAction = 0,
+	kJUSTpcUnconditionalAddAction = 1,
+	kJUSTpcConditionalAddAction = 2,
+	kJUSTpcGlyphStretchAction = 3,
+	kJUSTpcDuctilityAction = 4,
+	kJUSTpcGlyphRepeatAddAction = 5
+}
+
+enum
+{
+	kJUSTKashidaPriority = 0,
+	kJUSTSpacePriority = 1,
+	kJUSTLetterPriority = 2,
+	kJUSTNullPriority = 3,
+	kJUSTPriorityCount = 4
+}
+
+enum
+{
+	kJUSTOverridePriority = 0x8000,
+	kJUSTOverrideLimits = 0x4000,
+	kJUSTOverrideUnlimited = 0x2000,
+	kJUSTUnlimited = 0x1000,
+	kJUSTPriorityMask = 0x0003
+}
+
+enum
+{
+	kOPBDTag = 0x6F706264,
+	kOPBDCurrentVersion = 0x00010000,
+	kOPBDDistanceFormat = 0,
+	kOPBDControlPointFormat = 1
+}
+
+enum
+{
+	kMORTTag = 0x6D6F7274,
+	kMORTCurrentVersion = 0x00010000,
+	kMORTCoverVertical = 0x8000,
+	kMORTCoverDescending = 0x4000,
+	kMORTCoverIgnoreVertical = 0x2000,
+	kMORTCoverTypeMask = 0x000F,
+	kMORTRearrangementType = 0,
+	kMORTContextualType = 1,
+	kMORTLigatureType = 2,
+	kMORTSwashType = 4,
+	kMORTInsertionType = 5,
+	kMORTLigLastAction = cast(c_long)0x80000000,
+	kMORTLigStoreLigature = 0x40000000,
+	kMORTLigFormOffsetMask = 0x3FFFFFFF,
+	kMORTLigFormOffsetShift = 2,
+	kMORTraNoAction = 0,
+	kMORTraxA = 1,
+	kMORTraDx = 2,
+	kMORTraDxA = 3,
+	kMORTraxAB = 4,
+	kMORTraxBA = 5,
+	kMORTraCDx = 6,
+	kMORTraDCx = 7,
+	kMORTraCDxA = 8,
+	kMORTraDCxA = 9,
+	kMORTraDxAB = 10,
+	kMORTraDxBA = 11,
+	kMORTraCDxAB = 12,
+	kMORTraCDxBA = 13,
+	kMORTraDCxAB = 14,
+	kMORTraDCxBA = 15,
+	kMORTDoInsertionsBefore = 0x80,
+	kMORTIsSplitVowelPiece = 0x40,
+	kMORTInsertionsCountMask = 0x3F,
+	kMORTCurrInsertKashidaLike = 0x2000,
+	kMORTMarkInsertKashidaLike = 0x1000,
+	kMORTCurrInsertBefore = 0x0800,
+	kMORTMarkInsertBefore = 0x0400,
+	kMORTMarkJustTableCountMask = 0x3F80,
+	kMORTMarkJustTableCountShift = 7,
+	kMORTCurrJustTableCountMask = 0x007F,
+	kMORTCurrJustTableCountShift = 0,
+	kMORTCurrInsertCountMask = 0x03E0,
+	kMORTCurrInsertCountShift = 5,
+	kMORTMarkInsertCountMask = 0x001F,
+	kMORTMarkInsertCountShift = 0
+}
+
+enum
+{
+	kMORXTag = 0x6D6F7278,
+	kMORXCurrentVersion = 0x00020000,
+	kMORXCoverVertical = cast(c_long)0x80000000,
+	kMORXCoverDescending = 0x40000000,
+	kMORXCoverIgnoreVertical = 0x20000000,
+	kMORXCoverTypeMask = 0x000000FF
+}
+
+enum
+{
+	kPROPTag = 0x70726F70,
+	kPROPCurrentVersion = 0x00030000,
+	kPROPPairOffsetShift = 8,
+	kPROPPairOffsetSign = 7,
+	kPROPIsFloaterMask = 0x8000,
+	kPROPCanHangLTMask = 0x4000,
+	kPROPCanHangRBMask = 0x2000,
+	kPROPUseRLPairMask = 0x1000,
+	kPROPPairOffsetMask = 0x0F00,
+	kPROPRightConnectMask = 0x0080,
+	kPROPZeroReserved = 0x0060,
+	kPROPDirectionMask = 0x001F
+}
+
+enum
+{
+	kPROPLDirectionClass = 0,
+	kPROPRDirectionClass = 1,
+	kPROPALDirectionClass = 2,
+	kPROPENDirectionClass = 3,
+	kPROPESDirectionClass = 4,
+	kPROPETDirectionClass = 5,
+	kPROPANDirectionClass = 6,
+	kPROPCSDirectionClass = 7,
+	kPROPPSDirectionClass = 8,
+	kPROPSDirectionClass = 9,
+	kPROPWSDirectionClass = 10,
+	kPROPONDirectionClass = 11,
+	kPROPSENDirectionClass = 12,
+	kPROPLREDirectionClass = 13,
+	kPROPLRODirectionClass = 14,
+	kPROPRLEDirectionClass = 15,
+	kPROPRLODirectionClass = 16,
+	kPROPPDFDirectionClass = 17,
+	kPROPNSMDirectionClass = 18,
+	kPROPBNDirectionClass = 19,
+	kPROPNumDirectionClasses = 20
+}
+
+enum
+{
+	kTRAKTag = 0x7472616B,
+	kTRAKCurrentVersion = 0x00010000,
+	kTRAKUniformFormat = 0
+}
+
+enum
+{
+	kKERNTag = 0x6B65726E,
+	kKERNCurrentVersion = 0x00010000,
+	kKERNVertical = 0x8000,
+	kKERNResetCrossStream = 0x8000,
+	kKERNCrossStream = 0x4000,
+	kKERNVariation = 0x2000,
+	kKERNUnusedBits = 0x1F00,
+	kKERNFormatMask = 0x00FF
+}
+
+enum
+{
+	kKERNOrderedList = 0,
+	kKERNStateTable = 1,
+	kKERNSimpleArray = 2,
+	kKERNIndexArray = 3
+}
+
+enum
+{
+	kKERNLineStart = 0x00000001,
+	kKERNLineEndKerning = 0x00000002,
+	kKERNNoCrossKerning = 0x00000004,
+	kKERNNotesRequested = 0x00000008,
+	kKERNNoStakeNote = 1,
+	kKERNCrossStreamResetNote = 2,
+	kKERNNotApplied = 0x00000001
+}
+
+enum
+{
+	kBSLNTag = 0x62736C6E,
+	kBSLNCurrentVersion = 0x00010000,
+	kBSLNDistanceFormatNoMap = 0,
+	kBSLNDistanceFormatWithMap = 1,
+	kBSLNControlPointFormatNoMap = 2,
+	kBSLNControlPointFormatWithMap = 3
+}
+
+enum
+{
+	kBSLNRomanBaseline = 0,
+	kBSLNIdeographicCenterBaseline = 1,
+	kBSLNIdeographicLowBaseline = 2,
+	kBSLNHangingBaseline = 3,
+	kBSLNMathBaseline = 4,
+	kBSLNLastBaseline = 31,
+	kBSLNNumBaselineClasses = kBSLNLastBaseline + 1,
+	kBSLNNoBaselineOverride = 255
+}
+
+struct SFNTLookupBinarySearchHeader
+{
+	ushort unitSize;
+	ushort nUnits;
+	ushort searchRange;
+	ushort entrySelector;
+	ushort rangeShift;
+}
+
+
+struct SFNTLookupArrayHeader
+{
+	SFNTLookupValue* lookupValues;
+}
+
+
+struct SFNTLookupTrimmedArrayHeader
+{
+	ushort firstGlyph;
+	ushort count;
+	SFNTLookupValue* valueArray;
+}
+
+
+struct SFNTLookupSegment
+{
+	ushort lastGlyph;
+	ushort firstGlyph;
+	UInt16* value;
+}
+
+
+struct SFNTLookupSegmentHeader
+{
+	SFNTLookupBinarySearchHeader binSearch;
+	SFNTLookupSegment* segments;
+}
+
+
+struct SFNTLookupSingle
+{
+	ushort glyph;
+	UInt16* value;
+}
+
+
+struct SFNTLookupSingleHeader
+{
+	SFNTLookupBinarySearchHeader binSearch;
+	SFNTLookupSingle* entries;
+}
+
+union SFNTLookupFormatSpecificHeader
+{
+	SFNTLookupArrayHeader theArray;
+	SFNTLookupSegmentHeader segment;
+	SFNTLookupSingleHeader single;
+	SFNTLookupTrimmedArrayHeader trimmedArray;
+}
+
+struct SFNTLookupTable
+{
+	ushort format;
+	SFNTLookupFormatSpecificHeader fsHeader;
+}
+
+
+struct STHeader
+{
+	ubyte filler;
+	ubyte nClasses;
+	ushort classTableOffset;
+	ushort stateArrayOffset;
+	ushort entryTableOffset;
+}
+
+
+struct STClassTable
+{
+	ushort firstGlyph;
+	ushort nGlyphs;
+	char* classes;
+}
+
+
+struct STEntryZero
+{
+	ushort newState;
+	ushort flags;
+}
+
+
+struct STEntryOne
+{
+	ushort newState;
+	ushort flags;
+	ushort offset1;
+}
+
+
+struct STEntryTwo
+{
+	ushort newState;
+	ushort flags;
+	ushort offset1;
+	ushort offset2;
+}
+
+
+struct STXHeader
+{
+	uint nClasses;
+	uint classTableOffset;
+	uint stateArrayOffset;
+	uint entryTableOffset;
+}
+
+
+struct STXEntryZero
+{
+	ushort newState;
+	ushort flags;
+}
+
+
+struct STXEntryOne
+{
+	ushort newState;
+	ushort flags;
+	ushort index1;
+}
+
+
+struct STXEntryTwo
+{
+	ushort newState;
+	ushort flags;
+	ushort index1;
+	ushort index2;
+}
+
+
+struct LcarCaretClassEntry
+{
+	ushort count;
+	UInt16* partials;
+}
+
+
+struct LcarCaretTable
+{
+	int version_;
+	ushort format;
+	SFNTLookupTable lookup;
+}
+
+
+struct JustPCDecompositionAction
+{
+	int lowerLimit;
+	int upperLimit;
+	ushort order;
+	ushort count;
+	UInt16* glyphs;
+}
+
+
+struct JustPCConditionalAddAction
+{
+	int substThreshhold;
+	ushort addGlyph;
+	ushort substGlyph;
+}
+
+
+struct JustPCDuctilityAction
+{
+	uint ductilityAxis;
+	int minimumLimit;
+	int noStretchValue;
+	int maximumLimit;
+}
+
+
+struct JustPCGlyphRepeatAddAction
+{
+	ushort flags;
+	ushort glyph;
+}
+
+
+struct JustPCActionSubrecord
+{
+	ushort theClass;
+	ushort theType;
+	uint length;
+	uint data;
+}
+
+
+struct JustPCAction
+{
+	uint actionCount;
+	JustPCActionSubrecord* actions;
+}
+
+
+struct JustWidthDeltaEntry
+{
+	uint justClass;
+	int beforeGrowLimit;
+	int beforeShrinkLimit;
+	int afterGrowLimit;
+	int afterShrinkLimit;
+	ushort growFlags;
+	ushort shrinkFlags;
+}
+
+
+struct JustWidthDeltaGroup
+{
+	uint count;
+	JustWidthDeltaEntry* entries;
+}
+
+
+struct JustPostcompTable
+{
+	SFNTLookupTable lookupTable;
+}
+
+
+struct JustDirectionTable
+{
+	ushort justClass;
+	ushort widthDeltaClusters;
+	ushort postcomp;
+	SFNTLookupTable lookup;
+}
+
+
+struct JustTable
+{
+	int version_;
+	ushort format;
+	ushort horizHeaderOffset;
+	ushort vertHeaderOffset;
+}
+
+
+struct OpbdSideValues
+{
+	short leftSideShift;
+	short topSideShift;
+	short rightSideShift;
+	short bottomSideShift;
+}
+
+
+struct OpbdTable
+{
+	int version_;
+	ushort format;
+	SFNTLookupTable lookupTable;
+}
+
+
+struct MortRearrangementSubtable
+{
+	STHeader header;
+}
+
+
+struct MortContextualSubtable
+{
+	STHeader header;
+	ushort substitutionTableOffset;
+}
+
+
+struct MortLigatureSubtable
+{
+	STHeader header;
+	ushort ligatureActionTableOffset;
+	ushort componentTableOffset;
+	ushort ligatureTableOffset;
+}
+
+
+struct MortSwashSubtable
+{
+	SFNTLookupTable lookup;
+}
+
+
+struct MortInsertionSubtable
+{
+	STHeader header;
+}
+
+union MortSpecificSubtable
+{
+	MortRearrangementSubtable rearrangement;
+	MortContextualSubtable contextual;
+	MortLigatureSubtable ligature;
+	MortSwashSubtable swash;
+	MortInsertionSubtable insertion;
+}
+
+struct MortSubtable
+{
+	ushort length;
+	ushort coverage;
+	uint flags;
+	MortSpecificSubtable u;
+}
+
+
+struct MortFeatureEntry
+{
+	ushort featureType;
+	ushort featureSelector;
+	uint enableFlags;
+	uint disableFlags;
+}
+
+
+struct MortChain
+{
+	uint defaultFlags;
+	uint length;
+	ushort nFeatures;
+	ushort nSubtables;
+	MortFeatureEntry* featureEntries;
+}
+
+
+struct MortTable
+{
+	int version_;
+	uint nChains;
+	MortChain* chains;
+}
+
+
+struct MorxRearrangementSubtable
+{
+	STXHeader header;
+}
+
+
+struct MorxContextualSubtable
+{
+	STXHeader header;
+	uint substitutionTableOffset;
+}
+
+
+struct MorxLigatureSubtable
+{
+	STXHeader header;
+	uint ligatureActionTableOffset;
+	uint componentTableOffset;
+	uint ligatureTableOffset;
+}
+
+
+struct MorxInsertionSubtable
+{
+	STXHeader header;
+	uint insertionGlyphTableOffset;
+}
+
+union MorxSpecificSubtable
+{
+	MorxRearrangementSubtable rearrangement;
+	MorxRearrangementSubtable contextual;
+	MorxRearrangementSubtable ligature;
+	MorxRearrangementSubtable swash;
+	MorxRearrangementSubtable insertion;
+}
+
+struct MorxSubtable
+{
+	uint length;
+	uint coverage;
+	uint flags;
+	MorxSpecificSubtable u;
+}
+
+
+struct MorxChain
+{
+	uint defaultFlags;
+	uint length;
+	uint nFeatures;
+	uint nSubtables;
+	MortFeatureEntry* featureEntries;
+}
+
+
+struct MorxTable
+{
+	int version_;
+	uint nChains;
+	MorxChain* chains;
+}
+
+
+struct PropTable
+{
+	int version_;
+	ushort format;
+	ushort defaultProps;
+	SFNTLookupTable lookup;
+}
+
+
+struct PropLookupSegment
+{
+	ushort lastGlyph;
+	ushort firstGlyph;
+	ushort value;
+}
+
+
+struct PropLookupSingle
+{
+	ushort glyph;
+	ushort props;
+}
+
+
+struct TrakTableEntry
+{
+	int track;
+	ushort nameTableIndex;
+	ushort sizesOffset;
+}
+
+
+struct TrakTableData
+{
+	ushort nTracks;
+	ushort nSizes;
+	uint sizeTableOffset;
+	TrakTableEntry* trakTable;
+}
+
+
+struct TrakTable
+{
+	int version_;
+	ushort format;
+	ushort horizOffset;
+	ushort vertOffset;
+}
+
+
+struct KernVersion0Header
+{
+	ushort version_;
+	ushort nTables;
+	UInt16* firstSubtable;
+}
+
+
+struct KernTableHeader
+{
+	int version_;
+	int nTables;
+	UInt16* firstSubtable;
+}
+
+
+struct KernKerningPair
+{
+	ushort left;
+	ushort right;
+}
+
+
+struct KernOrderedListEntry
+{
+	KernKerningPair pair;
+	short value;
+}
+
+
+struct KernOrderedListHeader
+{
+	ushort nPairs;
+	ushort searchRange;
+	ushort entrySelector;
+	ushort rangeShift;
+	UInt16* table;
+}
+
+
+struct KernStateHeader
+{
+	STHeader header;
+	ushort valueTable;
+	char* firstTable;
+}
+
+
+struct KernStateEntry
+{
+	ushort newState;
+	ushort flags;
+}
+
+
+struct KernOffsetTable
+{
+	ushort firstGlyph;
+	ushort nGlyphs;
+	KernArrayOffset* offsetTable;
+}
+
+
+struct KernSimpleArrayHeader
+{
+	ushort rowWidth;
+	ushort leftOffsetTable;
+	ushort rightOffsetTable;
+	ushort theArray;
+	UInt16* firstTable;
+}
+
+
+struct KernIndexArrayHeader
+{
+	ushort glyphCount;
+	ubyte kernValueCount;
+	ubyte leftClassCount;
+	ubyte rightClassCount;
+	ubyte flags;
+	SInt16* kernValue;
+	char* leftClass;
+	char* rightClass;
+	char* kernIndex;
+}
+
+/*
+ * union KernFormatSpecificHeader {
+  KernOrderedListHeader  orderedList;
+  KernStateHeader     stateTable;
+  KernSimpleArrayHeader  simpleArray;
+  KernIndexArrayHeader  indexArray;
+};
+ */
+
+union KernFormatSpecificHeader
+{
+	KernOrderedListHeader orderedList;
+	KernStateHeader stateTable;
+	KernSimpleArrayHeader simpleArray;
+	KernIndexArrayHeader indexArray;
+}
+
+struct KernVersion0SubtableHeader
+{
+	ushort version_;
+	ushort length;
+	ushort stInfo;
+	KernFormatSpecificHeader fsHeader;
+}
+
+
+struct KernSubtableHeader
+{
+	int length;
+	ushort stInfo;
+	short tupleIndex;
+	KernFormatSpecificHeader fsHeader;
+}
+
+
+struct BslnFormat0Part
+{
+	SInt16* deltas;
+}
+
+
+struct BslnFormat1Part
+{
+	SInt16* deltas;
+	SFNTLookupTable mappingData;
+}
+
+
+struct BslnFormat2Part
+{
+	ushort stdGlyph;
+	SInt16* ctlPoints;
+}
+
+
+struct BslnFormat3Part
+{
+	ushort stdGlyph;
+	SInt16* ctlPoints;
+	SFNTLookupTable mappingData;
+}
+
+union BslnFormatUnion
+{
+	BslnFormat0Part fmt0Part;
+	BslnFormat1Part fmt1Part;
+	BslnFormat2Part fmt2Part;
+	BslnFormat3Part fmt3Part;
+}
+
+struct BslnTable
+{
+	int version_;
+	ushort format;
+	ushort defaultBaseline;
+	BslnFormatUnion parts;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/ats/SFNTTypes.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,517 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.ats.SFNTTypes;
+
+//import dstep.AvailabilityMacros;
+import dstep.coreservices.CoreServices;
+import dstep.objc.bridge.TypeEncoding;
+
+alias uint FontNameCode;
+alias uint FontPlatformCode;
+alias uint FontScriptCode;
+alias uint FontLanguageCode;
+
+// This is needed otherwise the enums will fail compiling with gdc
+version (GNU)
+{
+	private
+	{
+		const __cmapFontTableTag = getOSType!("cmap");
+		const __nameFontTableTag = getOSType!("name");
+		const __variationFontTableTag = getOSType!("fvar");
+		const __descriptorFontTableTag = getOSType!("fdsc");
+		const __featureFontTableTag = getOSType!("feat");
+		const __os2FontTableTag = getOSType!("OS/2");
+	}
+}
+
+enum
+{
+	sizeof_sfntDirectory = 12
+}
+
+enum
+{
+	cmapFontTableTag = getOSType!("cmap")
+}
+
+enum
+{
+	kFontUnicodePlatform = 0,
+	kFontMacintoshPlatform = 1,
+	kFontReservedPlatform = 2,
+	kFontMicrosoftPlatform = 3,
+	kFontCustomPlatform = 4
+}
+
+enum
+{
+	kFontUnicodeDefaultSemantics = 0,
+	kFontUnicodeV1_1Semantics = 1,
+	kFontISO10646_1993Semantics = 2
+}
+
+enum
+{
+	kFontRomanScript = 0,
+	kFontJapaneseScript = 1,
+	kFontTraditionalChineseScript = 2,
+	kFontChineseScript = kFontTraditionalChineseScript,
+	kFontKoreanScript = 3,
+	kFontArabicScript = 4,
+	kFontHebrewScript = 5,
+	kFontGreekScript = 6,
+	kFontCyrillicScript = 7,
+	kFontRussian = kFontCyrillicScript,
+	kFontRSymbolScript = 8,
+	kFontDevanagariScript = 9,
+	kFontGurmukhiScript = 10,
+	kFontGujaratiScript = 11,
+	kFontOriyaScript = 12,
+	kFontBengaliScript = 13,
+	kFontTamilScript = 14,
+	kFontTeluguScript = 15,
+	kFontKannadaScript = 16,
+	kFontMalayalamScript = 17,
+	kFontSinhaleseScript = 18,
+	kFontBurmeseScript = 19,
+	kFontKhmerScript = 20,
+	kFontThaiScript = 21,
+	kFontLaotianScript = 22,
+	kFontGeorgianScript = 23,
+	kFontArmenianScript = 24,
+	kFontSimpleChineseScript = 25,
+	kFontTibetanScript = 26,
+	kFontMongolianScript = 27,
+	kFontGeezScript = 28,
+	kFontEthiopicScript = kFontGeezScript,
+	kFontAmharicScript = kFontGeezScript,
+	kFontSlavicScript = 29,
+	kFontEastEuropeanRomanScript = kFontSlavicScript,
+	kFontVietnameseScript = 30,
+	kFontExtendedArabicScript = 31,
+	kFontSindhiScript = kFontExtendedArabicScript,
+	kFontUninterpretedScript = 32
+}
+
+enum
+{
+	kFontMicrosoftSymbolScript = 0,
+	kFontMicrosoftStandardScript = 1,
+	kFontMicrosoftUCS4Script = 10
+}
+
+enum
+{
+	kFontCustom8BitScript = 0,
+	kFontCustom816BitScript = 1,
+	kFontCustom16BitScript = 2
+}
+
+enum
+{
+	kFontEnglishLanguage = 0,
+	kFontFrenchLanguage = 1,
+	kFontGermanLanguage = 2,
+	kFontItalianLanguage = 3,
+	kFontDutchLanguage = 4,
+	kFontSwedishLanguage = 5,
+	kFontSpanishLanguage = 6,
+	kFontDanishLanguage = 7,
+	kFontPortugueseLanguage = 8,
+	kFontNorwegianLanguage = 9,
+	kFontHebrewLanguage = 10,
+	kFontJapaneseLanguage = 11,
+	kFontArabicLanguage = 12,
+	kFontFinnishLanguage = 13,
+	kFontGreekLanguage = 14,
+	kFontIcelandicLanguage = 15,
+	kFontMalteseLanguage = 16,
+	kFontTurkishLanguage = 17,
+	kFontCroatianLanguage = 18,
+	kFontTradChineseLanguage = 19,
+	kFontUrduLanguage = 20,
+	kFontHindiLanguage = 21,
+	kFontThaiLanguage = 22,
+	kFontKoreanLanguage = 23,
+	kFontLithuanianLanguage = 24,
+	kFontPolishLanguage = 25,
+	kFontHungarianLanguage = 26,
+	kFontEstonianLanguage = 27,
+	kFontLettishLanguage = 28,
+	kFontLatvianLanguage = kFontLettishLanguage,
+	kFontSaamiskLanguage = 29,
+	kFontLappishLanguage = kFontSaamiskLanguage,
+	kFontFaeroeseLanguage = 30,
+	kFontFarsiLanguage = 31,
+	kFontPersianLanguage = kFontFarsiLanguage,
+	kFontRussianLanguage = 32,
+	kFontSimpChineseLanguage = 33,
+	kFontFlemishLanguage = 34,
+	kFontIrishLanguage = 35,
+	kFontAlbanianLanguage = 36,
+	kFontRomanianLanguage = 37,
+	kFontCzechLanguage = 38,
+	kFontSlovakLanguage = 39,
+	kFontSlovenianLanguage = 40,
+	kFontYiddishLanguage = 41,
+	kFontSerbianLanguage = 42,
+	kFontMacedonianLanguage = 43,
+	kFontBulgarianLanguage = 44,
+	kFontUkrainianLanguage = 45,
+	kFontByelorussianLanguage = 46,
+	kFontUzbekLanguage = 47,
+	kFontKazakhLanguage = 48,
+	kFontAzerbaijaniLanguage = 49,
+	kFontAzerbaijanArLanguage = 50,
+	kFontArmenianLanguage = 51,
+	kFontGeorgianLanguage = 52,
+	kFontMoldavianLanguage = 53,
+	kFontKirghizLanguage = 54,
+	kFontTajikiLanguage = 55,
+	kFontTurkmenLanguage = 56,
+	kFontMongolianLanguage = 57,
+	kFontMongolianCyrLanguage = 58,
+	kFontPashtoLanguage = 59,
+	kFontKurdishLanguage = 60,
+	kFontKashmiriLanguage = 61,
+	kFontSindhiLanguage = 62,
+	kFontTibetanLanguage = 63,
+	kFontNepaliLanguage = 64,
+	kFontSanskritLanguage = 65,
+	kFontMarathiLanguage = 66,
+	kFontBengaliLanguage = 67,
+	kFontAssameseLanguage = 68,
+	kFontGujaratiLanguage = 69,
+	kFontPunjabiLanguage = 70,
+	kFontOriyaLanguage = 71,
+	kFontMalayalamLanguage = 72,
+	kFontKannadaLanguage = 73,
+	kFontTamilLanguage = 74,
+	kFontTeluguLanguage = 75,
+	kFontSinhaleseLanguage = 76,
+	kFontBurmeseLanguage = 77,
+	kFontKhmerLanguage = 78,
+	kFontLaoLanguage = 79,
+	kFontVietnameseLanguage = 80,
+	kFontIndonesianLanguage = 81,
+	kFontTagalogLanguage = 82,
+	kFontMalayRomanLanguage = 83,
+	kFontMalayArabicLanguage = 84,
+	kFontAmharicLanguage = 85,
+	kFontTigrinyaLanguage = 86,
+	kFontGallaLanguage = 87,
+	kFontOromoLanguage = kFontGallaLanguage,
+	kFontSomaliLanguage = 88,
+	kFontSwahiliLanguage = 89,
+	kFontRuandaLanguage = 90,
+	kFontRundiLanguage = 91,
+	kFontChewaLanguage = 92,
+	kFontMalagasyLanguage = 93,
+	kFontEsperantoLanguage = 94,
+	kFontWelshLanguage = 128,
+	kFontBasqueLanguage = 129,
+	kFontCatalanLanguage = 130,
+	kFontLatinLanguage = 131,
+	kFontQuechuaLanguage = 132,
+	kFontGuaraniLanguage = 133,
+	kFontAymaraLanguage = 134,
+	kFontTatarLanguage = 135,
+	kFontUighurLanguage = 136,
+	kFontDzongkhaLanguage = 137,
+	kFontJavaneseRomLanguage = 138,
+	kFontSundaneseRomLanguage = 139
+}
+
+enum : uint
+{
+	kFontNoPlatformCode = (~0),
+	kFontNoScriptCode = (~0),
+	kFontNoLanguageCode = (~0)
+}
+
+enum
+{
+	sizeof_sfntCMapSubHeader = 6
+}
+
+enum
+{
+	sizeof_sfntCMapExtendedSubHeader = 12
+}
+
+enum
+{
+	sizeof_sfntCMapEncoding = 8
+}
+
+enum
+{
+	sizeof_sfntCMapHeader = 4
+}
+
+enum
+{
+	nameFontTableTag = getOSType!("name")
+}
+
+enum
+{
+	kFontCopyrightName = 0,
+	kFontFamilyName = 1,
+	kFontStyleName = 2,
+	kFontUniqueName = 3,
+	kFontFullName = 4,
+	kFontVersionName = 5,
+	kFontPostscriptName = 6,
+	kFontTrademarkName = 7,
+	kFontManufacturerName = 8,
+	kFontDesignerName = 9,
+	kFontDescriptionName = 10,
+	kFontVendorURLName = 11,
+	kFontDesignerURLName = 12,
+	kFontLicenseDescriptionName = 13,
+	kFontLicenseInfoURLName = 14,
+	kFontPreferredFamilyName = 16,
+	kFontPreferredSubfamilyName = 17,
+	kFontMacCompatibleFullName = 18,
+	kFontSampleTextName = 19,
+	kFontPostScriptCIDName = 20,
+	kFontLastReservedName = 255
+}
+
+enum : uint 
+{
+	kFontNoNameCode = (~0)
+}
+
+enum
+{
+	sizeof_sfntNameRecord = 12
+}
+
+enum
+{
+	sizeof_sfntNameHeader = 6
+}
+
+enum
+{
+	variationFontTableTag = getOSType!("fvar")
+}
+
+enum
+{
+	sizeof_sfntVariationAxis = 20
+}
+
+enum
+{
+	sizeof_sfntInstance = 4
+}
+
+enum
+{
+	sizeof_sfntVariationHeader = 16
+}
+
+enum
+{
+	descriptorFontTableTag = getOSType!("fdsc")
+}
+
+enum
+{
+	sizeof_sfntDescriptorHeader = 8
+}
+
+enum
+{
+	featureFontTableTag = getOSType!("feat")
+}
+
+enum
+{
+	os2FontTableTag = getOSType!("OS/2")
+}
+
+enum
+{
+	nonGlyphID = 65535L
+}
+
+enum : uint 
+{
+	kFontNoPlatform = (~0),
+	kFontNoScript = (~0),
+	kFontNoLanguage = (~0),
+	kFontNoName = (~0)
+}
+
+struct sfntDirectoryEntry
+{
+	uint tableTag;
+	uint checkSum;
+	uint offset;
+	uint length;
+}
+
+
+struct sfntDirectory
+{
+	uint format;
+	ushort numOffsets;
+	ushort searchRange;
+	ushort entrySelector;
+	ushort rangeShift;
+	sfntDirectoryEntry* table;
+}
+
+
+struct sfntCMapSubHeader
+{
+	ushort format;
+	ushort length;
+	ushort languageID;
+}
+
+
+struct sfntCMapExtendedSubHeader
+{
+	ushort format;
+	ushort reserved;
+	uint length;
+	uint language;
+}
+
+
+struct sfntCMapEncoding
+{
+	ushort platformID;
+	ushort scriptID;
+	uint offset;
+}
+
+
+struct sfntCMapHeader
+{
+	ushort version_;
+	ushort numTables;
+	sfntCMapEncoding* encoding;
+}
+
+
+struct sfntNameRecord
+{
+	ushort platformID;
+	ushort scriptID;
+	ushort languageID;
+	ushort nameID;
+	ushort length;
+	ushort offset;
+}
+
+
+struct sfntNameHeader
+{
+	ushort format;
+	ushort count;
+	ushort stringOffset;
+	sfntNameRecord* rec;
+}
+
+
+struct sfntVariationAxis
+{
+	uint axisTag;
+	int minValue;
+	int defaultValue;
+	int maxValue;
+	short flags;
+	short nameID;
+}
+
+
+struct sfntInstance
+{
+	short nameID;
+	short flags;
+	Fixed* coord;
+}
+
+
+struct sfntVariationHeader
+{
+	int version_;
+	ushort offsetToData;
+	ushort countSizePairs;
+	ushort axisCount;
+	ushort axisSize;
+	ushort instanceCount;
+	ushort instanceSize;
+	sfntVariationAxis* axis;
+	sfntInstance* instance;
+}
+
+
+struct sfntFontDescriptor
+{
+	uint name;
+	int value;
+}
+
+
+struct sfntDescriptorHeader
+{
+	int version_;
+	int descriptorCount;
+	sfntFontDescriptor* descriptor;
+}
+
+
+struct sfntFeatureName
+{
+	ushort featureType;
+	ushort settingCount;
+	int offsetToSettings;
+	ushort featureFlags;
+	ushort nameID;
+}
+
+
+struct sfntFontFeatureSetting
+{
+	ushort setting;
+	ushort nameID;
+}
+
+
+struct sfntFontRunFeature
+{
+	ushort featureType;
+	ushort setting;
+}
+
+
+struct sfntFeatureHeader
+{
+	int version_;
+	ushort featureNameCount;
+	ushort featureSetCount;
+	int reserved;
+	sfntFeatureName* names;
+	sfntFontFeatureSetting* settings;
+	sfntFontRunFeature* runs;
+}
+
+
+struct FontVariation
+{
+	uint name;
+	int value;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/ats/ScalerStreamTypes.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,76 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.ats.ScalerStreamTypes;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.ats.SFNTTypes;
+import dstep.coreservices.CoreServices;
+import dstep.internal.Types;
+
+alias uint scalerStreamTypeFlag;
+alias int scalerStreamAction;
+
+enum
+{
+	cexec68K = 0x00000001,
+	truetypeStreamType = 0x00000001,
+	type1StreamType = 0x00000002,
+	type3StreamType = 0x00000004,
+	type42StreamType = 0x00000008,
+	type42GXStreamType = 0x00000010,
+	portableStreamType = 0x00000020,
+	flattenedStreamType = 0x00000040,
+	cidType2StreamType = 0x00000080,
+	cidType0StreamType = 0x00000100,
+	type1CFFStreamType = 0x00000200,
+	evenOddModifierStreamType = 0x00008000,
+	eexecBinaryModifierStreamType = 0x00010000,
+	unicodeMappingModifierStreamType = 0x00020000,
+	scalerSpecifcModifierMask = 0x0000F000,
+	streamTypeModifierMask = cast(c_long)0xFFFFF000
+}
+
+enum
+{
+	downloadStreamAction = 0,
+	asciiDownloadStreamAction = 1,
+	fontSizeQueryStreamAction = 2,
+	encodingOnlyStreamAction = 3,
+	prerequisiteQueryStreamAction = 4,
+	prerequisiteItemStreamAction = 5,
+	variationQueryStreamAction = 6,
+	variationPSOperatorStreamAction = 7
+}
+
+enum
+{
+	selectAllVariations = -1
+}
+
+struct scalerPrerequisiteItem
+{
+	int enumeration;
+	int size;
+	char* name;
+}
+
+
+struct scalerStream
+{
+	int prerequisiteQuery;
+	int prerequisiteItem;
+	SInt32 variationQueryResult;
+}
+
+
+struct scalerStreamData
+{
+	int hexFlag;
+	SInt32 byteCount;
+	void* data;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMApplication.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,580 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMApplication;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.colorsync.CMBase;
+import dstep.applicationservices.colorsync.CMICCProfile;
+import dstep.applicationservices.colorsync.CMTypes;
+import dstep.coreservices.CoreServices;
+import dstep.internal.Version;
+import dstep.objc.bridge.TypeEncoding;
+
+alias uint CMBitmapColorSpace;
+alias CMProfileIterateProcPtr CMProfileIterateUPP;
+alias CMMIterateProcPtr CMMIterateUPP;
+
+extern (C)
+{
+	alias short function (CMProfileIterateData*, void*) CMProfileIterateProcPtr;
+	alias short function (CMMInfo*, void*) CMMIterateProcPtr;
+	alias void function (float*, float*, float*, void*) CMLabToLabProcPtr;
+}
+
+// This is needed otherwise the enums will fail compiling with gdc
+version (GNU)
+{
+	private
+	{
+		const __kDefaultCMMSignature = getOSType!("appl");
+		const __cmInputUse = getOSType!("inpt");
+		const __cmOutputUse = getOSType!("outp");
+		const __cmDisplayUse = getOSType!("dply");
+		const __cmProofUse = getOSType!("pruf");
+	}
+}
+
+static if (!D_LP64 && !Win32)
+{	
+	struct CMFileLocation
+	{
+		FSSpec spec;
+	}
+	
+	struct CMPtrLocation
+	{
+		Ptr p;
+	}
+	
+	struct CMProcedureLocation
+	{
+		CMProfileAccessUPP proc;
+		void* refCon;
+	}
+	
+	union CMProfLoc
+	{
+		CMFileLocation fileLoc;
+		CMHandleLocation handleLoc;
+		CMPtrLocation ptrLoc;
+		CMProcedureLocation procLoc;
+		CMPathLocation pathLoc;
+		CMBufferLocation bufferLoc;
+	}
+	
+	union CMAppleProfileHeader
+	{
+		CMHeader cm1;
+		CM2Header cm2;
+		CM4Header cm4;
+	}
+}
+
+else
+{
+	union CMProfLoc
+	{	
+		CMHandleLocation handleLoc;
+		CMPathLocation pathLoc;
+		CMBufferLocation bufferLoc;
+	}
+	
+	union CMAppleProfileHeader
+	{
+		CM2Header cm2;
+		CM4Header cm4;
+	}
+}
+
+enum
+{
+	kDefaultCMMSignature = getOSType!("appl")
+}
+
+enum
+{
+	cmPS7bit = 1,
+	cmPS8bit = 2
+}
+
+enum
+{
+	cmOpenReadSpool = 1,
+	cmOpenWriteSpool = 2,
+	cmReadSpool = 3,
+	cmWriteSpool = 4,
+	cmCloseSpool = 5
+}
+
+enum
+{
+	cmOpenReadAccess = 1,
+	cmOpenWriteAccess = 2,
+	cmReadAccess = 3,
+	cmWriteAccess = 4,
+	cmCloseAccess = 5,
+	cmCreateNewAccess = 6,
+	cmAbortWriteAccess = 7,
+	cmBeginAccess = 8,
+	cmEndAccess = 9
+}
+
+enum
+{
+	cmInputUse = getOSType!("inpt"),
+	cmOutputUse = getOSType!("outp"),
+	cmDisplayUse = getOSType!("dply"),
+	cmProofUse = getOSType!("pruf")
+}
+
+enum
+{
+	kNoTransform = 0,
+	kUseAtoB = 1,
+	kUseBtoA = 2,
+	kUseBtoB = 3,
+	kDeviceToPCS = kUseAtoB,
+	kPCSToDevice = kUseBtoA,
+	kPCSToPCS = kUseBtoB,
+	kUseProfileIntent = 0xFFFFFFFF
+}
+
+enum
+{
+	cmColorSpaceSpaceMask = 0x0000003F,
+	cmColorSpacePremulAlphaMask = 0x00000040,
+	cmColorSpaceAlphaMask = 0x00000080,
+	cmColorSpaceSpaceAndAlphaMask = 0x000000FF,
+	cmColorSpacePackingMask = 0x0000FF00,
+	cmColorSpaceEncodingMask = 0x000F0000,
+	cmColorSpaceReservedMask = 0xFFF00000
+}
+
+enum
+{
+	cmNoColorPacking = 0x0000,
+	cmWord5ColorPacking = 0x0500,
+	cmWord565ColorPacking = 0x0600,
+	cmLong8ColorPacking = 0x0800,
+	cmLong10ColorPacking = 0x0A00,
+	cmAlphaFirstPacking = 0x1000,
+	cmOneBitDirectPacking = 0x0B00,
+	cmAlphaLastPacking = 0x0000,
+	cm8_8ColorPacking = 0x2800,
+	cm16_8ColorPacking = 0x2000,
+	cm24_8ColorPacking = 0x2100,
+	cm32_8ColorPacking = cmLong8ColorPacking,
+	cm40_8ColorPacking = 0x2200,
+	cm48_8ColorPacking = 0x2300,
+	cm56_8ColorPacking = 0x2400,
+	cm64_8ColorPacking = 0x2500,
+	cm32_16ColorPacking = 0x2600,
+	cm48_16ColorPacking = 0x2900,
+	cm64_16ColorPacking = 0x2A00,
+	cm32_32ColorPacking = 0x2700,
+	cmLittleEndianPacking = 0x4000,
+	cmReverseChannelPacking = 0x8000
+}
+
+enum
+{
+	cmSRGB16ChannelEncoding = 0x00010000
+}
+
+enum
+{
+	cmNoSpace = 0x0000,
+	cmRGBSpace = 0x0001,
+	cmCMYKSpace = 0x0002,
+	cmHSVSpace = 0x0003,
+	cmHLSSpace = 0x0004,
+	cmYXYSpace = 0x0005,
+	cmXYZSpace = 0x0006,
+	cmLUVSpace = 0x0007,
+	cmLABSpace = 0x0008,
+	cmReservedSpace1 = 0x0009,
+	cmGraySpace = 0x000A,
+	cmReservedSpace2 = 0x000B,
+	cmGamutResultSpace = 0x000C,
+	cmNamedIndexedSpace = 0x0010,
+	cmMCFiveSpace = 0x0011,
+	cmMCSixSpace = 0x0012,
+	cmMCSevenSpace = 0x0013,
+	cmMCEightSpace = 0x0014,
+	cmAlphaPmulSpace = 0x0040,
+	cmAlphaSpace = 0x0080,
+	cmRGBASpace = cmRGBSpace + cmAlphaSpace,
+	cmGrayASpace = cmGraySpace + cmAlphaSpace,
+	cmRGBAPmulSpace = cmRGBASpace + cmAlphaPmulSpace,
+	cmGrayAPmulSpace = cmGrayASpace + cmAlphaPmulSpace
+}
+
+enum
+{
+	cmGray8Space = cmGraySpace + cm8_8ColorPacking,
+	cmGray16Space = cmGraySpace,
+	cmGray16LSpace = cmGraySpace + cmLittleEndianPacking,
+	cmGrayA16Space = cmGrayASpace + cm16_8ColorPacking,
+	cmGrayA32Space = cmGrayASpace,
+	cmGrayA32LSpace = cmGrayASpace + cmLittleEndianPacking,
+	cmGrayA16PmulSpace = cmGrayAPmulSpace + cm16_8ColorPacking,
+	cmGrayA32PmulSpace = cmGrayAPmulSpace,
+	cmGrayA32LPmulSpace = cmGrayAPmulSpace + cmLittleEndianPacking,
+	cmRGB16Space = cmRGBSpace + cmWord5ColorPacking,
+	cmRGB16LSpace = cmRGBSpace + cmWord5ColorPacking + cmLittleEndianPacking,
+	cmRGB565Space = cmRGBSpace + cmWord565ColorPacking,
+	cmRGB565LSpace = cmRGBSpace + cmWord565ColorPacking + cmLittleEndianPacking,
+	cmRGB24Space = cmRGBSpace + cm24_8ColorPacking,
+	cmRGB32Space = cmRGBSpace + cm32_8ColorPacking,
+	cmRGB48Space = cmRGBSpace + cm48_16ColorPacking,
+	cmRGB48LSpace = cmRGBSpace + cm48_16ColorPacking + cmLittleEndianPacking,
+	cmARGB32Space = cmRGBASpace + cm32_8ColorPacking + cmAlphaFirstPacking,
+	cmARGB64Space = cmRGBASpace + cm64_16ColorPacking + cmAlphaFirstPacking,
+	cmARGB64LSpace = cmRGBASpace + cm64_16ColorPacking + cmAlphaFirstPacking + cmLittleEndianPacking,
+	cmRGBA32Space = cmRGBASpace + cm32_8ColorPacking + cmAlphaLastPacking,
+	cmRGBA64Space = cmRGBASpace + cm64_16ColorPacking + cmAlphaLastPacking,
+	cmRGBA64LSpace = cmRGBASpace + cm64_16ColorPacking + cmAlphaLastPacking + cmLittleEndianPacking,
+	cmARGB32PmulSpace = cmRGBAPmulSpace + cm32_8ColorPacking + cmAlphaFirstPacking,
+	cmARGB64PmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaFirstPacking,
+	cmARGB64LPmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaFirstPacking + cmLittleEndianPacking,
+	cmRGBA32PmulSpace = cmRGBAPmulSpace + cm32_8ColorPacking + cmAlphaLastPacking,
+	cmRGBA64PmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaLastPacking,
+	cmRGBA64LPmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaLastPacking + cmLittleEndianPacking,
+	cmCMYK32Space = cmCMYKSpace + cm32_8ColorPacking,
+	cmCMYK64Space = cmCMYKSpace + cm64_16ColorPacking,
+	cmCMYK64LSpace = cmCMYKSpace + cm64_16ColorPacking + cmLittleEndianPacking,
+	cmHSV32Space = cmHSVSpace + cmLong10ColorPacking,
+	cmHLS32Space = cmHLSSpace + cmLong10ColorPacking,
+	cmYXY32Space = cmYXYSpace + cmLong10ColorPacking,
+	cmXYZ24Space = cmXYZSpace + cm24_8ColorPacking,
+	cmXYZ32Space = cmXYZSpace + cmLong10ColorPacking,
+	cmXYZ48Space = cmXYZSpace + cm48_16ColorPacking,
+	cmXYZ48LSpace = cmXYZSpace + cm48_16ColorPacking + cmLittleEndianPacking,
+	cmLUV32Space = cmLUVSpace + cmLong10ColorPacking,
+	cmLAB24Space = cmLABSpace + cm24_8ColorPacking,
+	cmLAB32Space = cmLABSpace + cmLong10ColorPacking,
+	cmLAB48Space = cmLABSpace + cm48_16ColorPacking,
+	cmLAB48LSpace = cmLABSpace + cm48_16ColorPacking + cmLittleEndianPacking,
+	cmGamutResult1Space = cmOneBitDirectPacking + cmGamutResultSpace,
+	cmNamedIndexed32Space = cm32_32ColorPacking + cmNamedIndexedSpace,
+	cmNamedIndexed32LSpace = cm32_32ColorPacking + cmNamedIndexedSpace + cmLittleEndianPacking,
+	cmMCFive8Space = cm40_8ColorPacking + cmMCFiveSpace,
+	cmMCSix8Space = cm48_8ColorPacking + cmMCSixSpace,
+	cmMCSeven8Space = cm56_8ColorPacking + cmMCSevenSpace,
+	cmMCEight8Space = cm64_8ColorPacking + cmMCEightSpace
+}
+
+enum
+{
+	CS_MAX_PATH = 1024
+}
+
+enum
+{
+	cmNoProfileBase = 0,
+	cmPathBasedProfile = 5,
+	cmBufferBasedProfile = 6
+}
+
+enum
+{
+	cmProfileIterateDataVersion1 = 0x00010000,
+	cmProfileIterateDataVersion2 = 0x00020000,
+	cmProfileIterateDataVersion3 = 0x00030000
+}
+
+enum
+{
+	cmTextureRGBtoRGBX8 = 0,
+	cmTextureRGBtoRGBX16 = 1,
+	cmTextureRGBtoRGBXFloat32 = 2
+}
+
+union CMColor
+{
+	CMRGBColor rgb;
+	CMHSVColor hsv;
+	CMHLSColor hls;
+	CMXYZColor XYZ;
+	CMLabColor Lab;
+	CMLuvColor Luv;
+	CMYxyColor Yxy;
+	CMCMYKColor cmyk;
+	CMCMYColor cmy;
+	CMGrayColor gray;
+	CMMultichannel5Color mc5;
+	CMMultichannel6Color mc6;
+	CMMultichannel7Color mc7;
+	CMMultichannel8Color mc8;
+	CMNamedColor namedColor;
+}
+
+struct CMProfileLocation
+{
+	short locType;
+	CMProfLoc u;
+}
+
+struct CMConcatProfileSet
+{
+	ushort keyIndex;
+	ushort count;
+	CMProfileRef* profileSet;
+}
+
+
+struct NCMConcatProfileSpec
+{
+	uint renderingIntent;
+	uint transformTag;
+	CMProfileRef profile;
+}
+
+
+struct NCMConcatProfileSet
+{
+	uint cmm;
+	uint flags;
+	uint flagsMask;
+	uint profileCount;
+	NCMConcatProfileSpec* profileSpecs;
+}
+
+
+struct CMRGBColor
+{
+	ushort red;
+	ushort green;
+	ushort blue;
+}
+
+
+struct CMCMYKColor
+{
+	ushort cyan;
+	ushort magenta;
+	ushort yellow;
+	ushort black;
+}
+
+
+struct CMCMYColor
+{
+	ushort cyan;
+	ushort magenta;
+	ushort yellow;
+}
+
+
+struct CMHLSColor
+{
+	ushort hue;
+	ushort lightness;
+	ushort saturation;
+}
+
+
+struct CMHSVColor
+{
+	ushort hue;
+	ushort saturation;
+	ushort value;
+}
+
+
+struct CMLabColor
+{
+	ushort L;
+	ushort a;
+	ushort b;
+}
+
+
+struct CMLuvColor
+{
+	ushort L;
+	ushort u;
+	ushort v;
+}
+
+
+struct CMYxyColor
+{
+	ushort capY;
+	ushort x;
+	ushort y;
+}
+
+
+struct CMGrayColor
+{
+	ushort gray;
+}
+
+
+struct CMMultichannel5Color
+{
+	char* components;
+}
+
+
+struct CMMultichannel6Color
+{
+	char* components;
+}
+
+
+struct CMMultichannel7Color
+{
+	char* components;
+}
+
+
+struct CMMultichannel8Color
+{
+	char* components;
+}
+
+
+struct CMNamedColor
+{
+	uint namedColorIndex;
+}
+
+
+struct CMMInfo
+{
+	uint dataSize;
+	uint CMMType;
+	uint CMMMfr;
+	uint CMMVersion;
+	char* ASCIIName;
+	char* ASCIIDesc;
+	uint UniCodeNameCount;
+	wchar* UniCodeName;
+	uint UniCodeDescCount;
+	wchar* UniCodeDesc;
+}
+
+
+struct CMBitmap
+{
+	char* image;
+	uint width;
+	uint height;
+	uint rowBytes;
+	uint pixelSize;
+	uint space;
+	uint user1;
+	uint user2;
+}
+
+
+struct CMHandleLocation
+{
+	Handle h;
+}
+
+
+struct CMPathLocation
+{
+	char* path;
+}
+
+
+struct CMBufferLocation
+{
+	void* buffer;
+	uint size;
+}
+
+
+struct CMProfileIterateData
+{
+	uint dataVersion;
+	CM2Header header;
+	short code;
+	ubyte[256] name;
+	CMProfileLocation location;
+	uint uniCodeNameCount;
+	wchar* uniCodeName;
+	char* asciiName;
+	CMMakeAndModel* makeAndModel;
+	CMProfileMD5* digest;
+}
+
+enum
+{
+	cmOriginalProfileLocationSize = 72,
+	cmCurrentProfileLocationSize = CMProfileLocation.sizeof
+}
+
+extern (C)
+{
+	CMError CMNewProfile (CMProfileRef* prof, CMProfileLocation* theProfile);
+	CMError NCWNewLinkProfile (CMProfileRef* prof, CMProfileLocation* targetLocation, NCMConcatProfileSet* profileSet, CMConcatCallBackUPP proc, void* refCon);
+	CMError CMMakeProfile (CMProfileRef prof, CFDictionaryRef spec);
+	CMError CMOpenProfile (CMProfileRef* prof, CMProfileLocation* theProfile);
+	CMError CMCloseProfile (CMProfileRef prof);
+	CMError CMUpdateProfile (CMProfileRef prof);
+	CMError CMCopyProfile (CMProfileRef* targetProf, CMProfileLocation* targetLocation, CMProfileRef srcProf);
+	CMError CMValidateProfile (CMProfileRef prof, char* valid, char* preferredCMMnotfound);
+	CMError NCMGetProfileLocation (CMProfileRef prof, CMProfileLocation* theProfile, UInt32* locationSize);
+	CMError CMProfileCopyICCData (CFAllocatorRef allocator, CMProfileRef prof);
+	CMError CMGetProfileHeader (CMProfileRef prof, CMAppleProfileHeader* header);
+	CMError CMSetProfileHeader (CMProfileRef prof, CMAppleProfileHeader* header);
+	CMError CMCloneProfileRef (CMProfileRef prof);
+	CMError CMGetProfileRefCount (CMProfileRef prof, long* count);
+	CMError CMProfileModified (CMProfileRef prof, char* modified);
+	CMError CMGetProfileMD5 (CMProfileRef prof, ubyte[16] digest);
+	CMError CMCountProfileElements (CMProfileRef prof, UInt32* elementCount);
+	CMError CMProfileElementExists (CMProfileRef prof, uint tag, char* found);
+	CMError CMGetProfileElement (CMProfileRef prof, uint tag, UInt32* elementSize, void* elementData);
+	CMError CMSetProfileElement (CMProfileRef prof, uint tag, uint elementSize, void* elementData);
+	CMError CMSetProfileElementSize (CMProfileRef prof, uint tag, uint elementSize);
+	CMError CMSetProfileElementReference (CMProfileRef prof, uint elementTag, uint referenceTag);
+	CMError CMGetPartialProfileElement (CMProfileRef prof, uint tag, uint offset, UInt32* byteCount, void* elementData);
+	CMError CMSetPartialProfileElement (CMProfileRef prof, uint tag, uint offset, uint byteCount, void* elementData);
+	CMError CMGetIndProfileElementInfo (CMProfileRef prof, uint index, OSType* tag, UInt32* elementSize, char* refs);
+	CMError CMGetIndProfileElement (CMProfileRef prof, uint index, UInt32* elementSize, void* elementData);
+	CMError CMRemoveProfileElement (CMProfileRef prof, uint tag);
+	CMError CMGetProfileDescriptions (CMProfileRef prof, char* aName, UInt32* aCount, ubyte[256] mName, ScriptCode* mCode, wchar* uName, UniCharCount* uCount);
+	CMError CMSetProfileDescriptions (CMProfileRef prof, char* aName, uint aCount, char* mName, short mCode, wchar* uName, uint uCount);
+	CMError CMCopyProfileLocalizedStringDictionary (CMProfileRef prof, uint tag, CFDictionaryRef* theDict);
+	CMError CMSetProfileLocalizedStringDictionary (CMProfileRef prof, uint tag, CFDictionaryRef theDict);
+	CMError CMCopyProfileLocalizedString (CMProfileRef prof, uint tag, CFStringRef reqLocale, CFStringRef* locale, CFStringRef* str);
+	CMError CMCopyProfileDescriptionString (CMProfileRef prof, CFStringRef* str);
+	CMError CMGetNamedColorInfo (CMProfileRef prof, UInt32* deviceChannels, OSType* deviceColorSpace, OSType* PCSColorSpace, UInt32* count, char* prefix, char* suffix);
+	CMError CMGetNamedColorValue (CMProfileRef prof, char* name, CMColor* deviceColor, CMColor* PCSColor);
+	CMError CMGetIndNamedColorValue (CMProfileRef prof, uint index, CMColor* deviceColor, CMColor* PCSColor);
+	CMError CMGetNamedColorIndex (CMProfileRef prof, char* name, UInt32* index);
+	CMError CMGetNamedColorName (CMProfileRef prof, uint index, char* name);
+	CMError NCWNewColorWorld (CMWorldRef* cw, CMProfileRef src, CMProfileRef dst);
+	CMError NCWConcatColorWorld (CMWorldRef* cw, NCMConcatProfileSet* profileSet, CMConcatCallBackUPP proc, void* refCon);
+	CMError CWDisposeColorWorld (CMWorldRef cw);
+	CMError CWMatchColors (CMWorldRef cw, CMColor* myColors, uint count);
+	CMError CWCheckColors (CMWorldRef cw, CMColor* myColors, uint count, char* result);
+	CMError CWMatchBitmap (CMWorldRef cw, CMBitmap* bitmap, CMBitmapCallBackUPP progressProc, void* refCon, CMBitmap* matchedBitmap);
+	CMError CWCheckBitmap (CMWorldRef cw, CMBitmap* bitmap, CMBitmapCallBackUPP progressProc, void* refCon, CMBitmap* resultBitmap);
+	CMError CWGetCMMSignature (CMWorldRef cw);
+	CMError CWFillLookupTexture (CMWorldRef cw, uint gridPoints, uint format, uint dataSize, void* data);
+	CMError CMGetSystemProfile (CMProfileRef* prof);
+	CMError CMGetDefaultProfileBySpace (uint dataColorSpace, CMProfileRef* prof);
+	CMError CMGetDefaultProfileByUse (uint use, CMProfileRef* prof);
+	CMError CMGetProfileByAVID (uint theID, CMProfileRef* prof);
+	CMError CMSetProfileByAVID (uint theID, CMProfileRef prof);
+	CMError CMGetGammaByAVID (uint theID, CMVideoCardGamma* gamma, UInt32* size);
+	CMError CMSetGammaByAVID (uint theID, CMVideoCardGamma* gamma);
+	CMError CMIterateColorSyncFolder (CMProfileIterateUPP proc, UInt32* seed, UInt32* count, void* refCon);
+	CMError CMIterateCMMInfo (CMMIterateUPP proc, UInt32* count, void* refCon);
+	CMError CMGetColorSyncVersion (UInt32* version_);
+	CMError CMLaunchControlPanel (uint flags);
+	CMError CMGetPS2ColorSpace (CMProfileRef srcProf, uint flags, CMFlattenUPP proc, void* refCon, char* preferredCMMnotfound);
+	CMError CMGetPS2ColorRenderingIntent (CMProfileRef srcProf, uint flags, CMFlattenUPP proc, void* refCon, char* preferredCMMnotfound);
+	CMError CMGetPS2ColorRendering (CMProfileRef srcProf, CMProfileRef dstProf, uint flags, CMFlattenUPP proc, void* refCon, char* preferredCMMnotfound);
+	CMError CMGetPS2ColorRenderingVMSize (CMProfileRef srcProf, CMProfileRef dstProf, UInt32* vmSize, char* preferredCMMnotfound);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMBase.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,7 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMBase;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMDeviceIntegration.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,162 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMDeviceIntegration;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.colorsync.CMApplication;
+import dstep.applicationservices.colorsync.CMBase;
+import dstep.applicationservices.colorsync.CMICCProfile;
+import dstep.applicationservices.colorsync.CMTypes;
+import dstep.coreservices.CoreServices;
+import dstep.objc.bridge.TypeEncoding;
+
+alias uint CMDeviceState;
+alias uint CMDeviceID;
+alias uint CMDeviceProfileID;
+alias uint CMDeviceClass;
+alias CMDeviceScope CMDeviceProfileScope;
+
+extern (C)
+{
+	alias short function (CMDeviceInfo*, void*) CMIterateDeviceInfoProcPtr;
+	alias short function (CMDeviceInfo*, NCMDeviceProfileInfo*, void*) CMIterateDeviceProfileProcPtr;
+}
+
+// This is needed otherwise the enums will fail compiling with gdc
+version (GNU)
+{
+	private
+	{
+		const __cmScannerDeviceClass = getOSType!("scnr");
+		const __cmCameraDeviceClass = getOSType!("cmra");
+		const __cmDisplayDeviceClass = getOSType!("mntr");
+		const __cmPrinterDeviceClass = getOSType!("prtr");
+		const __cmProofDeviceClass = getOSType!("pruf");
+	}
+}
+
+enum
+{
+	cmDeviceInfoVersion1 = 0x00010000,
+	cmDeviceProfileInfoVersion1 = 0x00010000,
+	cmDeviceProfileInfoVersion2 = 0x00020000
+}
+
+enum
+{
+	cmCurrentDeviceInfoVersion = cmDeviceInfoVersion1,
+	cmCurrentProfileInfoVersion = cmDeviceProfileInfoVersion1
+}
+
+enum
+{
+	cmDefaultDeviceID = 0,
+	cmDefaultProfileID = 0
+}
+
+enum
+{
+	cmDeviceStateDefault = 0x00000000,
+	cmDeviceStateOffline = 0x00000001,
+	cmDeviceStateBusy = 0x00000002,
+	cmDeviceStateForceNotify = cast(int)0x80000000,
+	cmDeviceStateDeviceRsvdBits = 0x00FF0000,
+	cmDeviceStateAppleRsvdBits = cast(int)0xFF00FFFF
+}
+
+enum
+{
+	cmIterateFactoryDeviceProfiles = 0x00000001,
+	cmIterateCustomDeviceProfiles = 0x00000002,
+	cmIterateCurrentDeviceProfiles = 0x00000003,
+	cmIterateAllDeviceProfiles = 0x00000004,
+	cmIterateDeviceProfilesMask = 0x0000000F
+}
+
+enum
+{
+	cmDeviceDBNotFoundErr = -4227,
+	cmDeviceAlreadyRegistered = -4228,
+	cmDeviceNotRegistered = -4229,
+	cmDeviceProfilesNotFound = -4230,
+	cmInternalCFErr = -4231
+}
+
+enum
+{
+	cmScannerDeviceClass = getOSType!("scnr"),
+	cmCameraDeviceClass = getOSType!("cmra"),
+	cmDisplayDeviceClass = getOSType!("mntr"),
+	cmPrinterDeviceClass = getOSType!("prtr"),
+	cmProofDeviceClass = getOSType!("pruf")
+}
+
+struct CMDeviceScope
+{
+	CFStringRef deviceUser;
+	CFStringRef deviceHost;
+}
+
+struct CMDeviceInfo
+{
+	uint dataVersion;
+	uint deviceClass;
+	uint deviceID;
+	CMDeviceScope deviceScope;
+	uint deviceState;
+	uint defaultProfileID;
+	CFDictionaryRef* deviceName;
+	uint profileCount;
+	uint reserved;
+}
+
+
+struct CMDeviceProfileInfo
+{
+	uint dataVersion;
+	uint profileID;
+	CMProfileLocation profileLoc;
+	CFDictionaryRef profileName;
+	uint reserved;
+}
+
+
+struct NCMDeviceProfileInfo
+{
+	uint dataVersion;
+	uint profileID;
+	CMProfileLocation profileLoc;
+	CFDictionaryRef profileName;
+	CMDeviceProfileScope profileScope;
+	uint reserved;
+}
+
+
+struct CMDeviceProfileArray
+{
+	uint profileCount;
+	CMDeviceProfileInfo* profiles;
+}
+
+extern (C)
+{
+	CMError CMRegisterColorDevice (uint deviceClass, uint deviceID, CFDictionaryRef deviceName, CMDeviceScope* deviceScope);
+	CMError CMUnregisterColorDevice (uint deviceClass, uint deviceID);
+	CMError CMSetDefaultDevice (uint deviceClass, uint deviceID);
+	CMError CMGetDefaultDevice (uint deviceClass, CMDeviceID* deviceID);
+	CMError CMSetDeviceFactoryProfiles (uint deviceClass, uint deviceID, uint defaultProfID, CMDeviceProfileArray* deviceProfiles);
+	CMError CMGetDeviceFactoryProfiles (uint deviceClass, uint deviceID, CMDeviceProfileID* defaultProfID, UInt32* arraySize, CMDeviceProfileArray* deviceProfiles);
+	CMError CMSetDeviceDefaultProfileID (uint deviceClass, uint deviceID, uint defaultProfID);
+	CMError CMGetDeviceDefaultProfileID (uint deviceClass, uint deviceID, CMDeviceProfileID* defaultProfID);
+	CMError CMSetDeviceProfile (uint deviceClass, uint deviceID, CMDeviceProfileScope* profileScope, uint profileID, CMProfileLocation* profileLoc);
+	CMError CMGetDeviceProfile (uint deviceClass, uint deviceID, uint profileID, CMProfileLocation* profileLoc);
+	CMError CMSetDeviceState (uint deviceClass, uint deviceID, uint deviceState);
+	CMError CMGetDeviceState (uint deviceClass, uint deviceID, CMDeviceState* deviceState);
+	CMError CMGetDeviceInfo (uint deviceClass, uint deviceID, CMDeviceInfo* deviceInfo);
+	CMError CMIterateColorDevices (CMIterateDeviceInfoProcPtr proc, UInt32* seed, UInt32* count, void* refCon);
+	CMError CMIterateDeviceProfiles (CMIterateDeviceProfileProcPtr proc, UInt32* seed, UInt32* count, uint flags, void* refCon);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMFloatBitmap.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,41 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMFloatBitmap;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.colorsync.CMBase;
+import dstep.applicationservices.colorsync.CMTypes;
+
+alias int CMFloatBitmapFlags;
+
+enum /*CMFloatBitmapFlags*/ 
+{
+	kCMFloatBitmapFlagsNone = 0,
+	kCMFloatBitmapFlagsAlpha = 1,
+	kCMFloatBitmapFlagsAlphaPremul = 2,
+	kCMFloatBitmapFlagsRangeClipped = 4
+}
+
+struct CMFloatBitmap
+{
+	uint version_;
+	float** buffers;
+	uint height;
+	uint width;
+	int rowStride;
+	int colStride;
+	uint space;
+	int flags;
+}
+
+extern (C)
+{
+	CMError CMFloatBitmapMakeChunky (float* buffer, uint height, uint width, uint space);
+	CMError CMConvertXYZFloatBitmap (CMFloatBitmap* src, float[3] srcIlluminantXYZ, CMFloatBitmap* dst, float[3] dstIlluminantXYZ, uint method);
+	CMError CMConvertRGBFloatBitmap (CMFloatBitmap* src, CMFloatBitmap* dst);
+	CMError CMMatchFloatBitmap (CMWorldRef cw, CMFloatBitmap* src, CMFloatBitmap* dst);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMICCProfile.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,1024 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMICCProfile;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.colorsync.CMBase;
+import dstep.coreservices.CoreServices;
+import dstep.objc.bridge.TypeEncoding;
+
+alias ushort CMXYZComponent;
+alias ubyte[16] CMProfileMD5;
+alias CMProfileMD5* CMProfileMD5Ptr;
+alias uint CMMatchOption;
+alias uint CMMatchFlag;
+
+// This is needed otherwise the enums will fail compiling with gdc
+version (GNU)
+{
+	private
+	{
+		const __cmMagicNumber = getOSType!("acsp");
+		const __cmAToB0Tag = getOSType!("A2B0");
+		const __cmAToB1Tag = getOSType!("A2B1");
+		const __cmAToB2Tag = getOSType!("A2B2");
+		const __cmBlueColorantTag = getOSType!("bXYZ");
+		const __cmBlueTRCTag = getOSType!("bTRC");
+		const __cmBToA0Tag = getOSType!("B2A0");
+		const __cmBToA1Tag = getOSType!("B2A1");
+		const __cmBToA2Tag = getOSType!("B2A2");
+		const __cmCalibrationDateTimeTag = getOSType!("calt");
+		const __cmChromaticAdaptationTag = getOSType!("chad");
+		const __cmCharTargetTag = getOSType!("targ");
+		const __cmCopyrightTag = getOSType!("cprt");
+		const __cmDeviceMfgDescTag = getOSType!("dmnd");
+		const __cmDeviceModelDescTag = getOSType!("dmdd");
+		const __cmGamutTag = getOSType!("gamt");
+		const __cmGrayTRCTag = getOSType!("kTRC");
+		const __cmGreenColorantTag = getOSType!("gXYZ");
+		const __cmGreenTRCTag = getOSType!("gTRC");
+		const __cmLuminanceTag = getOSType!("lumi");
+		const __cmMeasurementTag = getOSType!("meas");
+		const __cmMediaBlackPointTag = getOSType!("bkpt");
+		const __cmMediaWhitePointTag = getOSType!("wtpt");
+		const __cmNamedColorTag = getOSType!("ncol");
+		const __cmNamedColor2Tag = getOSType!("ncl2");
+		const __cmPreview0Tag = getOSType!("pre0");
+		const __cmPreview1Tag = getOSType!("pre1");
+		const __cmPreview2Tag = getOSType!("pre2");
+		const __cmProfileDescriptionTag = getOSType!("desc");
+		const __cmProfileSequenceDescTag = getOSType!("pseq");
+		const __cmPS2CRD0Tag = getOSType!("psd0");
+		const __cmPS2CRD1Tag = getOSType!("psd1");
+		const __cmPS2CRD2Tag = getOSType!("psd2");
+		const __cmPS2CRD3Tag = getOSType!("psd3");
+		const __cmPS2CSATag = getOSType!("ps2s");
+		const __cmPS2RenderingIntentTag = getOSType!("ps2i");
+		const __cmRedColorantTag = getOSType!("rXYZ");
+		const __cmRedTRCTag = getOSType!("rTRC");
+		const __cmScreeningDescTag = getOSType!("scrd");
+		const __cmScreeningTag = getOSType!("scrn");
+		const __cmTechnologyTag = getOSType!("tech");
+		const __cmUcrBgTag = getOSType!("bfd ");
+		const __cmViewingConditionsDescTag = getOSType!("vued");
+		const __cmViewingConditionsTag = getOSType!("view");
+		const __cmPS2CRDVMSizeTag = getOSType!("psvm");
+		const __cmVideoCardGammaTag = getOSType!("vcgt");
+		const __cmMakeAndModelTag = getOSType!("mmod");
+		const __cmProfileDescriptionMLTag = getOSType!("dscm");
+		const __cmNativeDisplayInfoTag = getOSType!("ndin");
+		const __cmSigCrdInfoType = getOSType!("crdi");
+		const __cmSigCurveType = getOSType!("curv");
+		const __cmSigDataType = getOSType!("data");
+		const __cmSigDateTimeType = getOSType!("dtim");
+		const __cmSigLut16Type = getOSType!("mft2");
+		const __cmSigLut8Type = getOSType!("mft1");
+		const __cmSigMeasurementType = getOSType!("meas");
+		const __cmSigMultiFunctA2BType = getOSType!("mAB ");
+		const __cmSigMultiFunctB2AType = getOSType!("mBA ");
+		const __cmSigNamedColorType = getOSType!("ncol");
+		const __cmSigNamedColor2Type = getOSType!("ncl2");
+		const __cmSigParametricCurveType = getOSType!("para");
+		const __cmSigProfileDescriptionType = getOSType!("desc");
+		const __cmSigProfileSequenceDescType = getOSType!("pseq");
+		const __cmSigScreeningType = getOSType!("scrn");
+		const __cmSigS15Fixed16Type = getOSType!("sf32");
+		const __cmSigSignatureType = getOSType!("sig ");
+		const __cmSigTextType = getOSType!("text");
+		const __cmSigU16Fixed16Type = getOSType!("uf32");
+		const __cmSigU1Fixed15Type = getOSType!("uf16");
+		const __cmSigUInt8Type = getOSType!("ui08");
+		const __cmSigUInt16Type = getOSType!("ui16");
+		const __cmSigUInt32Type = getOSType!("ui32");
+		const __cmSigUInt64Type = getOSType!("ui64");
+		const __cmSigUcrBgType = getOSType!("bfd ");
+		const __cmSigUnicodeTextType = getOSType!("utxt");
+		const __cmSigViewingConditionsType = getOSType!("view");
+		const __cmSigXYZType = getOSType!("XYZ ");
+		const __cmSigPS2CRDVMSizeType = getOSType!("psvm");
+		const __cmSigVideoCardGammaType = getOSType!("vcgt");
+		const __cmSigMakeAndModelType = getOSType!("mmod");
+		const __cmSigNativeDisplayInfoType = getOSType!("ndin");
+		const __cmSigMultiLocalizedUniCodeType = getOSType!("mluc");
+		const __cmTechnologyDigitalCamera = getOSType!("dcam");
+		const __cmTechnologyFilmScanner = getOSType!("fscn");
+		const __cmTechnologyReflectiveScanner = getOSType!("rscn");
+		const __cmTechnologyInkJetPrinter = getOSType!("ijet");
+		const __cmTechnologyThermalWaxPrinter = getOSType!("twax");
+		const __cmTechnologyElectrophotographicPrinter = getOSType!("epho");
+		const __cmTechnologyElectrostaticPrinter = getOSType!("esta");
+		const __cmTechnologyDyeSublimationPrinter = getOSType!("dsub");
+		const __cmTechnologyPhotographicPaperPrinter = getOSType!("rpho");
+		const __cmTechnologyFilmWriter = getOSType!("fprn");
+		const __cmTechnologyVideoMonitor = getOSType!("vidm");
+		const __cmTechnologyVideoCamera = getOSType!("vidc");
+		const __cmTechnologyProjectionTelevision = getOSType!("pjtv");
+		const __cmTechnologyCRTDisplay = getOSType!("CRT ");
+		const __cmTechnologyPMDisplay = getOSType!("PMD ");
+		const __cmTechnologyAMDisplay = getOSType!("AMD ");
+		const __cmTechnologyPhotoCD = getOSType!("KPCD");
+		const __cmTechnologyPhotoImageSetter = getOSType!("imgs");
+		const __cmTechnologyGravure = getOSType!("grav");
+		const __cmTechnologyOffsetLithography = getOSType!("offs");
+		const __cmTechnologySilkscreen = getOSType!("silk");
+		const __cmTechnologyFlexography = getOSType!("flex");
+		const __cmXYZData = getOSType!("XYZ ");
+		const __cmLabData = getOSType!("Lab ");
+		const __cmLuvData = getOSType!("Luv ");
+		const __cmYCbCrData = getOSType!("YCbr");
+		const __cmYxyData = getOSType!("Yxy ");
+		const __cmRGBData = getOSType!("RGB ");
+		const __cmSRGBData = getOSType!("sRGB");
+		const __cmGrayData = getOSType!("GRAY");
+		const __cmHSVData = getOSType!("HSV ");
+		const __cmHLSData = getOSType!("HLS ");
+		const __cmCMYKData = getOSType!("CMYK");
+		const __cmCMYData = getOSType!("CMY ");
+		const __cmMCH5Data = getOSType!("MCH5");
+		const __cmMCH6Data = getOSType!("MCH6");
+		const __cmMCH7Data = getOSType!("MCH7");
+		const __cmMCH8Data = getOSType!("MCH8");
+		const __cm3CLRData = getOSType!("3CLR");
+		const __cm4CLRData = getOSType!("4CLR");
+		const __cm5CLRData = getOSType!("5CLR");
+		const __cm6CLRData = getOSType!("6CLR");
+		const __cm7CLRData = getOSType!("7CLR");
+		const __cm8CLRData = getOSType!("8CLR");
+		const __cm9CLRData = getOSType!("9CLR");
+		const __cm10CLRData = getOSType!("ACLR");
+		const __cm11CLRData = getOSType!("BCLR");
+		const __cm12CLRData = getOSType!("CCLR");
+		const __cm13CLRData = getOSType!("DCLR");
+		const __cm14CLRData = getOSType!("ECLR");
+		const __cm15CLRData = getOSType!("FCLR");
+		const __cmNamedData = getOSType!("NAME");
+		const __cmInputClass = getOSType!("scnr");
+		const __cmDisplayClass = getOSType!("mntr");
+		const __cmOutputClass = getOSType!("prtr");
+		const __cmLinkClass = getOSType!("link");
+		const __cmAbstractClass = getOSType!("abst");
+		const __cmColorSpaceClass = getOSType!("spac");
+		const __cmNamedColorClass = getOSType!("nmcl");
+		const __cmMacintosh = getOSType!("APPL");
+		const __cmMicrosoft = getOSType!("MSFT");
+		const __cmSolaris = getOSType!("SUNW");
+		const __cmSiliconGraphics = getOSType!("SGI ");
+		const __cmTaligent = getOSType!("TGNT");
+		const __cmCS1ChromTag = getOSType!("chrm");
+		const __cmCS1TRCTag = getOSType!("trc ");
+		const __cmCS1NameTag = getOSType!("name");
+		const __cmCS1CustTag = getOSType!("cust");
+	}
+}
+
+enum
+{
+	cmICCProfileVersion4 = 0x04000000,
+	cmICCProfileVersion2 = 0x02000000,
+	cmICCProfileVersion21 = 0x02100000,
+	cmCS2ProfileVersion = cmICCProfileVersion2,
+	cmCS1ProfileVersion = 0x00000100
+}
+
+enum
+{
+	cmProfileMajorVersionMask = cast(int)0xFF000000,
+	cmCurrentProfileMajorVersion = 0x02000000
+}
+
+enum
+{
+	cmMagicNumber = getOSType!("acsp")
+}
+
+enum
+{
+	cmICCReservedFlagsMask = 0x0000FFFF,
+	cmEmbeddedMask = 0x00000001,
+	cmEmbeddedUseMask = 0x00000002,
+	cmBlackPointCompensationMask = 0x00000004,
+	cmCMSReservedFlagsMask = cast(int)0xFFFF0000,
+	cmQualityMask = 0x00030000,
+	cmInterpolationMask = 0x00040000,
+	cmGamutCheckingMask = 0x00080000
+}
+
+enum
+{
+	cmEmbeddedProfile = 0,
+	cmEmbeddedUse = 1
+}
+
+enum
+{
+	cmNormalMode = 0,
+	cmDraftMode = 1,
+	cmBestMode = 2
+}
+
+enum
+{
+	cmBlackPointCompensation = 1
+}
+
+enum
+{
+	cmReflectiveTransparentMask = 0x00000001,
+	cmGlossyMatteMask = 0x00000002
+}
+
+enum
+{
+	cmReflective = 0,
+	cmGlossy = 1
+}
+
+enum
+{
+	cmPerceptual = 0,
+	cmRelativeColorimetric = 1,
+	cmSaturation = 2,
+	cmAbsoluteColorimetric = 3
+}
+
+enum
+{
+	cmAsciiData = 0,
+	cmBinaryData = 1
+}
+
+enum
+{
+	cmPrtrDefaultScreens = 0,
+	cmLinesPer = 1
+}
+
+enum
+{
+	cmNumHeaderElements = 10
+}
+
+enum
+{
+	cmAToB0Tag = getOSType!("A2B0"),
+	cmAToB1Tag = getOSType!("A2B1"),
+	cmAToB2Tag = getOSType!("A2B2"),
+	cmBlueColorantTag = getOSType!("bXYZ"),
+	cmBlueTRCTag = getOSType!("bTRC"),
+	cmBToA0Tag = getOSType!("B2A0"),
+	cmBToA1Tag = getOSType!("B2A1"),
+	cmBToA2Tag = getOSType!("B2A2"),
+	cmCalibrationDateTimeTag = getOSType!("calt"),
+	cmChromaticAdaptationTag = getOSType!("chad"),
+	cmCharTargetTag = getOSType!("targ"),
+	cmCopyrightTag = getOSType!("cprt"),
+	cmDeviceMfgDescTag = getOSType!("dmnd"),
+	cmDeviceModelDescTag = getOSType!("dmdd"),
+	cmGamutTag = getOSType!("gamt"),
+	cmGrayTRCTag = getOSType!("kTRC"),
+	cmGreenColorantTag = getOSType!("gXYZ"),
+	cmGreenTRCTag = getOSType!("gTRC"),
+	cmLuminanceTag = getOSType!("lumi"),
+	cmMeasurementTag = getOSType!("meas"),
+	cmMediaBlackPointTag = getOSType!("bkpt"),
+	cmMediaWhitePointTag = getOSType!("wtpt"),
+	cmNamedColorTag = getOSType!("ncol"),
+	cmNamedColor2Tag = getOSType!("ncl2"),
+	cmPreview0Tag = getOSType!("pre0"),
+	cmPreview1Tag = getOSType!("pre1"),
+	cmPreview2Tag = getOSType!("pre2"),
+	cmProfileDescriptionTag = getOSType!("desc"),
+	cmProfileSequenceDescTag = getOSType!("pseq"),
+	cmPS2CRD0Tag = getOSType!("psd0"),
+	cmPS2CRD1Tag = getOSType!("psd1"),
+	cmPS2CRD2Tag = getOSType!("psd2"),
+	cmPS2CRD3Tag = getOSType!("psd3"),
+	cmPS2CSATag = getOSType!("ps2s"),
+	cmPS2RenderingIntentTag = getOSType!("ps2i"),
+	cmRedColorantTag = getOSType!("rXYZ"),
+	cmRedTRCTag = getOSType!("rTRC"),
+	cmScreeningDescTag = getOSType!("scrd"),
+	cmScreeningTag = getOSType!("scrn"),
+	cmTechnologyTag = getOSType!("tech"),
+	cmUcrBgTag = getOSType!("bfd "),
+	cmViewingConditionsDescTag = getOSType!("vued"),
+	cmViewingConditionsTag = getOSType!("view")
+}
+
+enum
+{
+	cmPS2CRDVMSizeTag = getOSType!("psvm"),
+	cmVideoCardGammaTag = getOSType!("vcgt"),
+	cmMakeAndModelTag = getOSType!("mmod"),
+	cmProfileDescriptionMLTag = getOSType!("dscm"),
+	cmNativeDisplayInfoTag = getOSType!("ndin")
+}
+
+enum
+{
+	cmSigCrdInfoType = getOSType!("crdi"),
+	cmSigCurveType = getOSType!("curv"),
+	cmSigDataType = getOSType!("data"),
+	cmSigDateTimeType = getOSType!("dtim"),
+	cmSigLut16Type = getOSType!("mft2"),
+	cmSigLut8Type = getOSType!("mft1"),
+	cmSigMeasurementType = getOSType!("meas"),
+	cmSigMultiFunctA2BType = getOSType!("mAB "),
+	cmSigMultiFunctB2AType = getOSType!("mBA "),
+	cmSigNamedColorType = getOSType!("ncol"),
+	cmSigNamedColor2Type = getOSType!("ncl2"),
+	cmSigParametricCurveType = getOSType!("para"),
+	cmSigProfileDescriptionType = getOSType!("desc"),
+	cmSigProfileSequenceDescType = getOSType!("pseq"),
+	cmSigScreeningType = getOSType!("scrn"),
+	cmSigS15Fixed16Type = getOSType!("sf32"),
+	cmSigSignatureType = getOSType!("sig "),
+	cmSigTextType = getOSType!("text"),
+	cmSigU16Fixed16Type = getOSType!("uf32"),
+	cmSigU1Fixed15Type = getOSType!("uf16"),
+	cmSigUInt8Type = getOSType!("ui08"),
+	cmSigUInt16Type = getOSType!("ui16"),
+	cmSigUInt32Type = getOSType!("ui32"),
+	cmSigUInt64Type = getOSType!("ui64"),
+	cmSigUcrBgType = getOSType!("bfd "),
+	cmSigUnicodeTextType = getOSType!("utxt"),
+	cmSigViewingConditionsType = getOSType!("view"),
+	cmSigXYZType = getOSType!("XYZ ")
+}
+
+enum
+{
+	cmSigPS2CRDVMSizeType = getOSType!("psvm"),
+	cmSigVideoCardGammaType = getOSType!("vcgt"),
+	cmSigMakeAndModelType = getOSType!("mmod"),
+	cmSigNativeDisplayInfoType = getOSType!("ndin"),
+	cmSigMultiLocalizedUniCodeType = getOSType!("mluc")
+}
+
+enum
+{
+	cmTechnologyDigitalCamera = getOSType!("dcam"),
+	cmTechnologyFilmScanner = getOSType!("fscn"),
+	cmTechnologyReflectiveScanner = getOSType!("rscn"),
+	cmTechnologyInkJetPrinter = getOSType!("ijet"),
+	cmTechnologyThermalWaxPrinter = getOSType!("twax"),
+	cmTechnologyElectrophotographicPrinter = getOSType!("epho"),
+	cmTechnologyElectrostaticPrinter = getOSType!("esta"),
+	cmTechnologyDyeSublimationPrinter = getOSType!("dsub"),
+	cmTechnologyPhotographicPaperPrinter = getOSType!("rpho"),
+	cmTechnologyFilmWriter = getOSType!("fprn"),
+	cmTechnologyVideoMonitor = getOSType!("vidm"),
+	cmTechnologyVideoCamera = getOSType!("vidc"),
+	cmTechnologyProjectionTelevision = getOSType!("pjtv"),
+	cmTechnologyCRTDisplay = getOSType!("CRT "),
+	cmTechnologyPMDisplay = getOSType!("PMD "),
+	cmTechnologyAMDisplay = getOSType!("AMD "),
+	cmTechnologyPhotoCD = getOSType!("KPCD"),
+	cmTechnologyPhotoImageSetter = getOSType!("imgs"),
+	cmTechnologyGravure = getOSType!("grav"),
+	cmTechnologyOffsetLithography = getOSType!("offs"),
+	cmTechnologySilkscreen = getOSType!("silk"),
+	cmTechnologyFlexography = getOSType!("flex")
+}
+
+enum
+{
+	cmFlare0 = 0x00000000,
+	cmFlare100 = 0x00000001
+}
+
+enum
+{
+	cmGeometryUnknown = 0x00000000,
+	cmGeometry045or450 = 0x00000001,
+	cmGeometry0dord0 = 0x00000002
+}
+
+enum
+{
+	cmStdobsUnknown = 0x00000000,
+	cmStdobs1931TwoDegrees = 0x00000001,
+	cmStdobs1964TenDegrees = 0x00000002
+}
+
+enum
+{
+	cmIlluminantUnknown = 0x00000000,
+	cmIlluminantD50 = 0x00000001,
+	cmIlluminantD65 = 0x00000002,
+	cmIlluminantD93 = 0x00000003,
+	cmIlluminantF2 = 0x00000004,
+	cmIlluminantD55 = 0x00000005,
+	cmIlluminantA = 0x00000006,
+	cmIlluminantEquiPower = 0x00000007,
+	cmIlluminantF8 = 0x00000008
+}
+
+enum
+{
+	cmSpotFunctionUnknown = 0,
+	cmSpotFunctionDefault = 1,
+	cmSpotFunctionRound = 2,
+	cmSpotFunctionDiamond = 3,
+	cmSpotFunctionEllipse = 4,
+	cmSpotFunctionLine = 5,
+	cmSpotFunctionSquare = 6,
+	cmSpotFunctionCross = 7
+}
+
+enum
+{
+	cmXYZData = getOSType!("XYZ "),
+	cmLabData = getOSType!("Lab "),
+	cmLuvData = getOSType!("Luv "),
+	cmYCbCrData = getOSType!("YCbr"),
+	cmYxyData = getOSType!("Yxy "),
+	cmRGBData = getOSType!("RGB "),
+	cmSRGBData = getOSType!("sRGB"),
+	cmGrayData = getOSType!("GRAY"),
+	cmHSVData = getOSType!("HSV "),
+	cmHLSData = getOSType!("HLS "),
+	cmCMYKData = getOSType!("CMYK"),
+	cmCMYData = getOSType!("CMY "),
+	cmMCH5Data = getOSType!("MCH5"),
+	cmMCH6Data = getOSType!("MCH6"),
+	cmMCH7Data = getOSType!("MCH7"),
+	cmMCH8Data = getOSType!("MCH8"),
+	cm3CLRData = getOSType!("3CLR"),
+	cm4CLRData = getOSType!("4CLR"),
+	cm5CLRData = getOSType!("5CLR"),
+	cm6CLRData = getOSType!("6CLR"),
+	cm7CLRData = getOSType!("7CLR"),
+	cm8CLRData = getOSType!("8CLR"),
+	cm9CLRData = getOSType!("9CLR"),
+	cm10CLRData = getOSType!("ACLR"),
+	cm11CLRData = getOSType!("BCLR"),
+	cm12CLRData = getOSType!("CCLR"),
+	cm13CLRData = getOSType!("DCLR"),
+	cm14CLRData = getOSType!("ECLR"),
+	cm15CLRData = getOSType!("FCLR"),
+	cmNamedData = getOSType!("NAME")
+}
+
+enum
+{
+	cmInputClass = getOSType!("scnr"),
+	cmDisplayClass = getOSType!("mntr"),
+	cmOutputClass = getOSType!("prtr"),
+	cmLinkClass = getOSType!("link"),
+	cmAbstractClass = getOSType!("abst"),
+	cmColorSpaceClass = getOSType!("spac"),
+	cmNamedColorClass = getOSType!("nmcl")
+}
+
+enum
+{
+	cmMacintosh = getOSType!("APPL"),
+	cmMicrosoft = getOSType!("MSFT"),
+	cmSolaris = getOSType!("SUNW"),
+	cmSiliconGraphics = getOSType!("SGI "),
+	cmTaligent = getOSType!("TGNT")
+}
+
+enum
+{
+	cmParametricType0 = 0,
+	cmParametricType1 = 1,
+	cmParametricType2 = 2,
+	cmParametricType3 = 3,
+	cmParametricType4 = 4
+}
+
+enum
+{
+	cmCS1ChromTag = getOSType!("chrm"),
+	cmCS1TRCTag = getOSType!("trc "),
+	cmCS1NameTag = getOSType!("name"),
+	cmCS1CustTag = getOSType!("cust")
+}
+
+enum
+{
+	cmVideoCardGammaTableType = 0,
+	cmVideoCardGammaFormulaType = 1
+}
+
+struct CMDateTime
+{
+	ushort year;
+	ushort month;
+	ushort dayOfTheMonth;
+	ushort hours;
+	ushort minutes;
+	ushort seconds;
+}
+
+
+struct CMFixedXYColor
+{
+	int x;
+	int y;
+}
+
+
+struct CMFixedXYZColor
+{
+	int X;
+	int Y;
+	int Z;
+}
+
+
+struct CMXYZColor
+{
+	ushort X;
+	ushort Y;
+	ushort Z;
+}
+
+struct CMHeader
+{
+	uint size;
+	OSType CMMType;
+	uint applProfileVersion;
+	OSType dataType;
+	OSType deviceType;
+	OSType deviceManufacturer;
+	uint deviceModel;
+	uint[2] deviceAttributes;
+	uint profileNameOffset;
+	uint customDataOffset;
+	CMMatchFlag flags;
+	CMMatchOption options;
+	CMXYZColor white;
+	CMXYZColor black;
+}
+
+struct CM2Header
+{
+	uint size;
+	uint CMMType;
+	uint profileVersion;
+	uint profileClass;
+	uint dataColorSpace;
+	uint profileConnectionSpace;
+	CMDateTime dateTime;
+	uint CS2profileSignature;
+	uint platform;
+	uint flags;
+	uint deviceManufacturer;
+	uint deviceModel;
+	UInt32* deviceAttributes;
+	uint renderingIntent;
+	CMFixedXYZColor white;
+	uint creator;
+	char* reserved;
+}
+
+
+struct CM4Header
+{
+	uint size;
+	uint CMMType;
+	uint profileVersion;
+	uint profileClass;
+	uint dataColorSpace;
+	uint profileConnectionSpace;
+	CMDateTime dateTime;
+	uint CS2profileSignature;
+	uint platform;
+	uint flags;
+	uint deviceManufacturer;
+	uint deviceModel;
+	UInt32* deviceAttributes;
+	uint renderingIntent;
+	CMFixedXYZColor white;
+	uint creator;
+	ubyte[16] digest;
+	char* reserved;
+}
+
+
+struct CMTagRecord
+{
+	uint tag;
+	uint elementOffset;
+	uint elementSize;
+}
+
+
+struct CMTagElemTable
+{
+	uint count;
+	CMTagRecord* tagList;
+}
+
+
+struct CM2Profile
+{
+	CM2Header header;
+	CMTagElemTable tagTable;
+	char* elemData;
+}
+
+
+struct CMAdaptationMatrixType
+{
+	uint typeDescriptor;
+	uint reserved;
+	Fixed* adaptationMatrix;
+}
+
+
+struct CMCurveType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint countValue;
+	UInt16* data;
+}
+
+
+struct CMDataType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint dataFlag;
+	char* data;
+}
+
+
+struct CMDateTimeType
+{
+	uint typeDescriptor;
+	uint reserved;
+	CMDateTime dateTime;
+}
+
+
+struct CMLut16Type
+{
+	uint typeDescriptor;
+	uint reserved;
+	ubyte inputChannels;
+	ubyte outputChannels;
+	ubyte gridPoints;
+	ubyte reserved2;
+	Fixed* matrix;
+	ushort inputTableEntries;
+	ushort outputTableEntries;
+	UInt16* inputTable;
+}
+
+
+struct CMLut8Type
+{
+	uint typeDescriptor;
+	uint reserved;
+	ubyte inputChannels;
+	ubyte outputChannels;
+	ubyte gridPoints;
+	ubyte reserved2;
+	Fixed* matrix;
+	char* inputTable;
+}
+
+
+struct CMMultiFunctLutType
+{
+	uint typeDescriptor;
+	uint reserved;
+	ubyte inputChannels;
+	ubyte outputChannels;
+	ushort reserved2;
+	uint offsetBcurves;
+	uint offsetMatrix;
+	uint offsetMcurves;
+	uint offsetCLUT;
+	uint offsetAcurves;
+	char* data;
+}
+
+
+struct CMMultiFunctCLUTType
+{
+	char* gridPoints;
+	ubyte entrySize;
+	char* reserved;
+	char* data;
+}
+
+
+struct CMMeasurementType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint standardObserver;
+	CMFixedXYZColor backingXYZ;
+	uint geometry;
+	uint flare;
+	uint illuminant;
+}
+
+
+struct CMNamedColorType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint vendorFlag;
+	uint count;
+	char* prefixName;
+}
+
+
+struct CMNamedColor2EntryType
+{
+	char* rootName;
+	UInt16* PCSColorCoords;
+	UInt16* DeviceColorCoords;
+}
+
+
+struct CMNamedColor2Type
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint vendorFlag;
+	uint count;
+	uint deviceChannelCount;
+	char* prefixName;
+	char* suffixName;
+	char* data;
+}
+
+
+struct CMNativeDisplayInfo
+{
+	uint dataSize;
+	CMFixedXYColor redPhosphor;
+	CMFixedXYColor greenPhosphor;
+	CMFixedXYColor bluePhosphor;
+	CMFixedXYColor whitePoint;
+	int redGammaValue;
+	int greenGammaValue;
+	int blueGammaValue;
+	ushort gammaChannels;
+	ushort gammaEntryCount;
+	ushort gammaEntrySize;
+	char* gammaData;
+}
+
+
+struct CMNativeDisplayInfoType
+{
+	uint typeDescriptor;
+	uint reserved;
+	CMNativeDisplayInfo nativeDisplayInfo;
+}
+
+
+struct CMParametricCurveType
+{
+	uint typeDescriptor;
+	uint reserved;
+	ushort functionType;
+	ushort reserved2;
+	Fixed* value;
+}
+
+
+struct CMTextDescriptionType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint ASCIICount;
+	char* ASCIIName;
+}
+
+
+struct CMTextType
+{
+	uint typeDescriptor;
+	uint reserved;
+	char* text;
+}
+
+
+struct CMUnicodeTextType
+{
+	uint typeDescriptor;
+	uint reserved;
+	wchar* text;
+}
+
+
+struct CMScreeningChannelRec
+{
+	int frequency;
+	int angle;
+	uint spotFunction;
+}
+
+
+struct CMScreeningType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint screeningFlag;
+	uint channelCount;
+	CMScreeningChannelRec* channelInfo;
+}
+
+
+struct CMSignatureType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint signature;
+}
+
+
+struct CMS15Fixed16ArrayType
+{
+	uint typeDescriptor;
+	uint reserved;
+	Fixed* value;
+}
+
+
+struct CMU16Fixed16ArrayType
+{
+	uint typeDescriptor;
+	uint reserved;
+	UInt32* value;
+}
+
+
+struct CMUInt8ArrayType
+{
+	uint typeDescriptor;
+	uint reserved;
+	char* value;
+}
+
+
+struct CMUInt16ArrayType
+{
+	uint typeDescriptor;
+	uint reserved;
+	UInt16* value;
+}
+
+
+struct CMUInt32ArrayType
+{
+	uint typeDescriptor;
+	uint reserved;
+	UInt32* value;
+}
+
+
+struct CMUInt64ArrayType
+{
+	uint typeDescriptor;
+	uint reserved;
+	UInt32* value;
+}
+
+
+struct CMViewingConditionsType
+{
+	uint typeDescriptor;
+	uint reserved;
+	CMFixedXYZColor illuminant;
+	CMFixedXYZColor surround;
+	uint stdIlluminant;
+}
+
+
+struct CMXYZType
+{
+	uint typeDescriptor;
+	uint reserved;
+	CMFixedXYZColor* XYZ;
+}
+
+
+struct CMProfileSequenceDescType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint count;
+	char* data;
+}
+
+
+struct CMUcrBgType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint ucrCount;
+	UInt16* ucrValues;
+}
+
+
+struct CMIntentCRDVMSize
+{
+	uint renderingIntent;
+	uint VMSize;
+}
+
+
+struct CMPS2CRDVMSizeType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint count;
+	CMIntentCRDVMSize* intentCRD;
+}
+
+
+struct CMVideoCardGammaTable
+{
+	ushort channels;
+	ushort entryCount;
+	ushort entrySize;
+	char* data;
+}
+
+
+struct CMVideoCardGammaFormula
+{
+	int redGamma;
+	int redMin;
+	int redMax;
+	int greenGamma;
+	int greenMin;
+	int greenMax;
+	int blueGamma;
+	int blueMin;
+	int blueMax;
+}
+
+
+struct CMVideoCardGamma
+{
+	 uint tagType;
+	 
+	 union
+	 {
+		 CMVideoCardGammaTable table;
+		 CMVideoCardGammaFormula formula;
+	 }
+}
+
+struct CMVideoCardGammaType
+{
+	uint typeDescriptor;
+	UInt32 reserved;
+	CMVideoCardGamma gamma;
+}
+
+
+struct CMMakeAndModel
+{
+	uint manufacturer;
+	uint model;
+	uint serialNumber;
+	uint manufactureDate;
+	uint reserved1;
+	uint reserved2;
+	uint reserved3;
+	UInt32 reserved4;
+}
+
+
+struct CMMakeAndModelType
+{
+	uint typeDescriptor;
+	UInt32 reserved;
+	CMMakeAndModel makeAndModel;
+}
+
+
+struct CMMultiLocalizedUniCodeEntryRec
+{
+	char* languageCode;
+	uint regionCode;
+	uint textLength;
+	UInt32 textOffset;
+}
+
+
+struct CMMultiLocalizedUniCodeType
+{
+	uint typeDescriptor;
+	uint reserved;
+	uint entryCount;
+	UInt32 entrySize;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMMComponent.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,28 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMMComponent;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.colorsync.CMApplication;
+import dstep.applicationservices.colorsync.CMFloatBitmap;
+import dstep.applicationservices.colorsync.CMTypes;
+import dstep.coreservices.CoreServices;
+
+extern (C)
+{
+	CMError CWColorWorldSetProperty (CMWorldRef cw, CFStringRef key, CFTypeRef value);
+	CMError CWColorWorldGetProperty (CMWorldRef cw, CFStringRef key);
+	int CMM_ConcatColorWorld (CMWorldRef cw, NCMConcatProfileSet* profileSet, CMConcatCallBackUPP proc, void* refCon);
+	int CMM_MatchColors (CMWorldRef cw, CMColor* colors, uint count);
+	int CMM_CheckColors (CMWorldRef cw, CMColor* colors, uint count, char* result);
+	int CMM_ValidateProfile (CMProfileRef prof, char* valid);
+	int CMM_MatchBitmap (CMWorldRef cw, CMBitmap* bitmap, CMBitmapCallBackUPP progressProc, void* refCon, CMBitmap* matchedBitmap);
+	int CMM_CheckBitmap (CMWorldRef cw, CMBitmap* bitmap, CMBitmapCallBackUPP progressProc, void* refCon, CMBitmap* resultBitmap);
+	int CMM_MatchFloatBitmap (CMWorldRef cw, CMFloatBitmap* bitmap, CMFloatBitmap* resultBitmap);
+	int CMM_CreateLinkProfile (CMProfileRef prof, NCMConcatProfileSet* profileSet, CMConcatCallBackUPP proc, void* refCon);
+	CFTypeRef CMM_GetProperty (CMWorldRef cw, CFStringRef requestedKey);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMScriptingPlugin.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,45 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMScriptingPlugin;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.colorsync.CMApplication;
+import dstep.applicationservices.colorsync.CMBase;
+import dstep.applicationservices.colorsync.CMTypes;
+import dstep.coreservices.CoreServices;
+import dstep.internal.Version;
+
+static if (!D_LP64 && !Win32):
+	
+enum
+{
+	cmspInvalidImageFile = -4220,
+	cmspInvalidImageSpace = -4221,
+	cmspInvalidProfileEmbed = -4222,
+	cmspInvalidProfileSource = -4223,
+	cmspInvalidProfileDest = -4224,
+	cmspInvalidProfileProof = -4225,
+	cmspInvalidProfileLink = -4226	
+}
+
+enum
+{
+	cmspFavorEmbeddedMask = 0x00000001
+}
+
+extern (C):
+	
+CMError CMValidImage (/*const*/ FSSpec* spec);
+CMError CMGetImageSpace (/*const*/ FSSpec* spec, OSType* space);
+CMError CMEmbedImage (/*const*/ FSSpec* specFrom, /*const*/ FSSpec* specInto, bool repl, CMProfileRef embProf);
+CMError CMUnembedImage (/*const*/ FSSpec* specFrom, /*const*/ FSSpec* specInto, bool repl);
+CMError CMMatchImage (/*const*/ FSSpec* specFrom, /*const*/ FSSpec* specInto, bool repl, uint qual, CMProfileRef srcProf, uint srcIntent, CMProfileRef dstProf);
+CMError CMProofImage (/*const*/ FSSpec* specFrom, /*const*/ FSSpec* specInto, bool repl, uint qual, CMProfileRef srcProf, uint srcIntent, CMProfileRef dstProf, CMProfileRef prfProf);
+CMError CMLinkImage (/*const*/ FSSpec* specFrom, /*const*/ FSSpec* specInto, bool repl, uint qual, CMProfileRef lnkProf, uint lnkIntent);
+CMError CMCountImageProfiles (/*const*/ FSSpec* spec, uint* count);
+CMError CMGetIndImageProfile (/*const*/ FSSpec* spec, uint index, CMProfileRef* prof);
+CMError CMSetIndImageProfile (/*const*/ FSSpec* specFrom, /*const*/ FSSpec* specInto, bool repl, uint index, CMProfileRef prof);
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/CMTypes.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,43 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.CMTypes;
+
+//import dstep.AvailabilityMacros;
+import dstep.applicationservices.colorsync.CMBase;
+import dstep.coreservices.CoreServices;
+//import dstep.stddef;
+//import dstep.sys.types;
+
+struct OpaqueCMProfileRef;
+struct OpaqueCMWorldRef;
+
+alias int CMError;
+alias OpaqueCMProfileRef* CMProfileRef;
+alias OpaqueCMWorldRef* CMWorldRef;
+alias uint CMDisplayIDType;
+alias uint CMChromaticAdaptation;
+alias CMFlattenProcPtr CMFlattenUPP;
+alias CMBitmapCallBackProcPtr CMBitmapCallBackUPP;
+alias CMConcatCallBackProcPtr CMConcatCallBackUPP;
+alias CMProfileAccessProcPtr CMProfileAccessUPP;
+
+extern (C)
+{
+	alias short function (int, long*, void*, void*) CMFlattenProcPtr;
+	alias ubyte function (int, void*) CMConcatCallBackProcPtr;
+	alias ubyte function (int, void*) CMBitmapCallBackProcPtr;
+	alias OSErr function (int command, int offset, int* size, void* data, void* refCon) CMProfileAccessProcPtr;
+}
+
+enum
+{
+	cmUseDefaultChromaticAdaptation = 0,
+	cmLinearChromaticAdaptation = 1,
+	cmVonKriesChromaticAdaptation = 2,
+	cmBradfordChromaticAdaptation = 3
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/colorsync/ColorSync.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,18 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.colorsync.ColorSync;
+
+public:
+
+import dstep.applicationservices.colorsync.CMApplication;
+import dstep.applicationservices.colorsync.CMDeviceIntegration;
+import dstep.applicationservices.colorsync.CMFloatBitmap;
+import dstep.applicationservices.colorsync.CMICCProfile;
+import dstep.applicationservices.colorsync.CMMComponent;
+import dstep.applicationservices.colorsync.CMScriptingPlugin;
+import dstep.applicationservices.colorsync.CMTypes;
+import dstep.coreservices.CoreServices;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGAffineTransform.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,47 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGAffineTransform;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+
+extern (C)
+{
+	extern
+	{
+		const CGAffineTransform CGAffineTransformIdentity;
+	}
+}
+
+struct CGAffineTransform
+{
+	CGFloat a;
+	CGFloat b;
+	CGFloat c;
+	CGFloat d;
+	CGFloat tx;
+	CGFloat ty;
+}
+
+extern (C)
+{
+	CGAffineTransform CGAffineTransformMake (CGFloat a, CGFloat b, CGFloat c, CGFloat d, CGFloat tx, CGFloat ty);
+	CGAffineTransform CGAffineTransformMakeTranslation (CGFloat tx, CGFloat ty);
+	CGAffineTransform CGAffineTransformMakeScale (CGFloat sx, CGFloat sy);
+	CGAffineTransform CGAffineTransformMakeRotation (CGFloat angle);
+	bool CGAffineTransformIsIdentity (CGAffineTransform t);
+	CGAffineTransform CGAffineTransformTranslate (CGAffineTransform t, CGFloat tx, CGFloat ty);
+	CGAffineTransform CGAffineTransformScale (CGAffineTransform t, CGFloat sx, CGFloat sy);
+	CGAffineTransform CGAffineTransformRotate (CGAffineTransform t, CGFloat angle);
+	CGAffineTransform CGAffineTransformInvert (CGAffineTransform t);
+	CGAffineTransform CGAffineTransformConcat (CGAffineTransform t1, CGAffineTransform t2);
+	bool CGAffineTransformEqualToTransform (CGAffineTransform t1, CGAffineTransform t2);
+	CGPoint CGPointApplyAffineTransform (CGPoint point, CGAffineTransform t);
+	CGSize CGSizeApplyAffineTransform (CGSize size, CGAffineTransform t);
+	CGRect CGRectApplyAffineTransform (CGRect rect, CGAffineTransform t);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGBase.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,19 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGBase;
+
+/*import dstep.AvailabilityMacros;
+import dstep.float;
+import dstep.stdbool;
+import dstep.stddef;*/
+import dstep.internal.Version;
+
+static if (D_LP64)
+	alias double CGFloat;
+
+else
+	alias float CGFloat;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGBitmapContext.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,27 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGBitmapContext;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGImage;
+import dstep.applicationservices.coregraphics.CGContext;
+
+extern (C)
+{
+	CGContextRef CGBitmapContextCreate (void* data, uint width, uint height, uint bitsPerComponent, uint bytesPerRow, CGColorSpaceRef colorspace, uint bitmapInfo);
+	void* CGBitmapContextGetData (CGContextRef c);
+	uint CGBitmapContextGetWidth (CGContextRef c);
+	uint CGBitmapContextGetHeight (CGContextRef c);
+	uint CGBitmapContextGetBitsPerComponent (CGContextRef c);
+	uint CGBitmapContextGetBitsPerPixel (CGContextRef c);
+	uint CGBitmapContextGetBytesPerRow (CGContextRef c);
+	CGColorSpaceRef CGBitmapContextGetColorSpace (CGContextRef c);
+	int CGBitmapContextGetAlphaInfo (CGContextRef c);
+	uint CGBitmapContextGetBitmapInfo (CGContextRef c);
+	CGImageRef CGBitmapContextCreateImage (CGContextRef c);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGColor.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,47 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGColor;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGPattern;
+import dstep.corefoundation.CFBase;
+
+struct CGColor;
+
+alias CGColor* CGColorRef;
+
+extern (C)
+{
+	extern
+	{
+		const CFStringRef kCGColorWhite;
+		const CFStringRef kCGColorBlack;
+		const CFStringRef kCGColorClear;
+	}
+}
+
+extern (C)
+{
+	CGColorRef CGColorCreate (CGColorSpaceRef space, CGFloat* components);
+	CGColorRef CGColorCreateGenericGray (CGFloat gray, CGFloat alpha);
+	CGColorRef CGColorCreateGenericRGB (CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha);
+	CGColorRef CGColorCreateGenericCMYK (CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha);
+	CGColorRef CGColorGetConstantColor (CFStringRef colorName);
+	CGColorRef CGColorCreateWithPattern (CGColorSpaceRef space, CGPatternRef pattern, CGFloat* components);
+	CGColorRef CGColorCreateCopy (CGColorRef color);
+	CGColorRef CGColorCreateCopyWithAlpha (CGColorRef color, CGFloat alpha);
+	CGColorRef CGColorRetain (CGColorRef color);
+	void CGColorRelease (CGColorRef color);
+	bool CGColorEqualToColor (CGColorRef color1, CGColorRef color2);
+	uint CGColorGetNumberOfComponents (CGColorRef color);
+	CGFloat* CGColorGetComponents (CGColorRef color);
+	CGFloat CGColorGetAlpha (CGColorRef color);
+	CGColorSpaceRef CGColorGetColorSpace (CGColorRef color);
+	CGPatternRef CGColorGetPattern (CGColorRef color);
+	uint CGColorGetTypeID ();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGColorSpace.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,76 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGColorSpace;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGDataProvider;
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFData;
+
+struct CGColorSpace;
+
+alias CGColorSpace* CGColorSpaceRef;
+alias int CGColorRenderingIntent;
+alias int CGColorSpaceModel;
+
+extern (C)
+{
+	extern
+	{
+		const CFStringRef kCGColorSpaceGenericGray;
+		const CFStringRef kCGColorSpaceGenericRGB;
+		const CFStringRef kCGColorSpaceGenericCMYK;
+		const CFStringRef kCGColorSpaceGenericRGBLinear;
+		const CFStringRef kCGColorSpaceAdobeRGB1998;
+		const CFStringRef kCGColorSpaceSRGB;
+	}
+}
+
+enum /*CGColorRenderingIntent*/ 
+{
+	kCGRenderingIntentDefault,
+	kCGRenderingIntentAbsoluteColorimetric,
+	kCGRenderingIntentRelativeColorimetric,
+	kCGRenderingIntentPerceptual,
+	kCGRenderingIntentSaturation
+}
+
+enum /*CGColorSpaceModel*/ 
+{
+	kCGColorSpaceModelUnknown = -1,
+	kCGColorSpaceModelMonochrome,
+	kCGColorSpaceModelRGB,
+	kCGColorSpaceModelCMYK,
+	kCGColorSpaceModelLab,
+	kCGColorSpaceModelDeviceN,
+	kCGColorSpaceModelIndexed,
+	kCGColorSpaceModelPattern
+}
+
+extern (C)
+{
+	CGColorSpaceRef CGColorSpaceCreateDeviceGray ();
+	CGColorSpaceRef CGColorSpaceCreateDeviceRGB ();
+	CGColorSpaceRef CGColorSpaceCreateDeviceCMYK ();
+	CGColorSpaceRef CGColorSpaceCreateCalibratedGray (CGFloat* whitePoint, CGFloat* blackPoint, CGFloat gamma);
+	CGColorSpaceRef CGColorSpaceCreateCalibratedRGB (CGFloat* whitePoint, CGFloat* blackPoint, CGFloat* gamma, CGFloat* matrix);
+	CGColorSpaceRef CGColorSpaceCreateLab (CGFloat* whitePoint, CGFloat* blackPoint, CGFloat* range);
+	CGColorSpaceRef CGColorSpaceCreateICCBased (uint nComponents, CGFloat* range, CGDataProviderRef profile, CGColorSpaceRef alternate);
+	CGColorSpaceRef CGColorSpaceCreateIndexed (CGColorSpaceRef baseSpace, uint lastIndex, char* colorTable);
+	CGColorSpaceRef CGColorSpaceCreatePattern (CGColorSpaceRef baseSpace);
+	CGColorSpaceRef CGColorSpaceCreateWithPlatformColorSpace (void* ref_);
+	CGColorSpaceRef CGColorSpaceCreateWithName (CFStringRef name);
+	CGColorSpaceRef CGColorSpaceRetain (CGColorSpaceRef space);
+	void CGColorSpaceRelease (CGColorSpaceRef space);
+	uint CGColorSpaceGetTypeID ();
+	uint CGColorSpaceGetNumberOfComponents (CGColorSpaceRef space);
+	int CGColorSpaceGetModel (CGColorSpaceRef space);
+	CGColorSpaceRef CGColorSpaceGetBaseColorSpace (CGColorSpaceRef space);
+	uint CGColorSpaceGetColorTableCount (CGColorSpaceRef space);
+	void CGColorSpaceGetColorTable (CGColorSpaceRef space, char* table);
+	CFDataRef CGColorSpaceCopyICCProfile (CGColorSpaceRef space);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGContext.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,232 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGContext;
+
+import dstep.applicationservices.coregraphics.CGAffineTransform;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGColor;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGContext;
+import dstep.applicationservices.coregraphics.CGFont;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.applicationservices.coregraphics.CGGradient;
+import dstep.applicationservices.coregraphics.CGImage;
+import dstep.applicationservices.coregraphics.CGPDFDocument;
+import dstep.applicationservices.coregraphics.CGPath;
+import dstep.applicationservices.coregraphics.CGPattern;
+import dstep.applicationservices.coregraphics.CGPDFPage;
+import dstep.applicationservices.coregraphics.CGShading;
+import dstep.corefoundation.CFDictionary;
+
+struct CGContext;
+
+alias CGContext* CGContextRef;
+alias int CGLineJoin;
+alias int CGLineCap;
+alias int CGPathDrawingMode;
+alias int CGTextDrawingMode;
+alias int CGTextEncoding;
+alias int CGInterpolationQuality;
+alias int CGBlendMode;
+
+enum /*CGLineJoin*/ 
+{
+	kCGLineJoinMiter,
+	kCGLineJoinRound,
+	kCGLineJoinBevel
+}
+
+enum /*CGLineCap*/ 
+{
+	kCGLineCapButt,
+	kCGLineCapRound,
+	kCGLineCapSquare
+}
+
+enum /*CGPathDrawingMode*/ 
+{
+	kCGPathFill,
+	kCGPathEOFill,
+	kCGPathStroke,
+	kCGPathFillStroke,
+	kCGPathEOFillStroke
+}
+
+enum /*CGTextDrawingMode*/ 
+{
+	kCGTextFill,
+	kCGTextStroke,
+	kCGTextFillStroke,
+	kCGTextInvisible,
+	kCGTextFillClip,
+	kCGTextStrokeClip,
+	kCGTextFillStrokeClip,
+	kCGTextClip
+}
+
+enum /*CGTextEncoding*/ 
+{
+	kCGEncodingFontSpecific,
+	kCGEncodingMacRoman
+}
+
+enum /*CGInterpolationQuality*/ 
+{
+	kCGInterpolationDefault,
+	kCGInterpolationNone,
+	kCGInterpolationLow,
+	kCGInterpolationHigh
+}
+
+enum /*CGBlendMode*/ 
+{
+	kCGBlendModeNormal,
+	kCGBlendModeMultiply,
+	kCGBlendModeScreen,
+	kCGBlendModeOverlay,
+	kCGBlendModeDarken,
+	kCGBlendModeLighten,
+	kCGBlendModeColorDodge,
+	kCGBlendModeColorBurn,
+	kCGBlendModeSoftLight,
+	kCGBlendModeHardLight,
+	kCGBlendModeDifference,
+	kCGBlendModeExclusion,
+	kCGBlendModeHue,
+	kCGBlendModeSaturation,
+	kCGBlendModeColor,
+	kCGBlendModeLuminosity,
+	kCGBlendModeClear,
+	kCGBlendModeCopy,
+	kCGBlendModeSourceIn,
+	kCGBlendModeSourceOut,
+	kCGBlendModeSourceAtop,
+	kCGBlendModeDestinationOver,
+	kCGBlendModeDestinationIn,
+	kCGBlendModeDestinationOut,
+	kCGBlendModeDestinationAtop,
+	kCGBlendModeXOR,
+	kCGBlendModePlusDarker,
+	kCGBlendModePlusLighter
+}
+
+extern (C)
+{
+	uint CGContextGetTypeID ();
+	void CGContextSaveGState (CGContextRef c);
+	void CGContextRestoreGState (CGContextRef c);
+	void CGContextScaleCTM (CGContextRef c, CGFloat sx, CGFloat sy);
+	void CGContextTranslateCTM (CGContextRef c, CGFloat tx, CGFloat ty);
+	void CGContextRotateCTM (CGContextRef c, CGFloat angle);
+	void CGContextConcatCTM (CGContextRef c, CGAffineTransform transform);
+	CGAffineTransform CGContextGetCTM (CGContextRef c);
+	void CGContextSetLineWidth (CGContextRef c, CGFloat width);
+	void CGContextSetLineCap (CGContextRef c, int cap);
+	void CGContextSetLineJoin (CGContextRef c, int join);
+	void CGContextSetMiterLimit (CGContextRef c, CGFloat limit);
+	void CGContextSetLineDash (CGContextRef c, CGFloat phase, CGFloat* lengths, uint count);
+	void CGContextSetFlatness (CGContextRef c, CGFloat flatness);
+	void CGContextSetAlpha (CGContextRef c, CGFloat alpha);
+	void CGContextSetBlendMode (CGContextRef context, int mode);
+	void CGContextBeginPath (CGContextRef c);
+	void CGContextMoveToPoint (CGContextRef c, CGFloat x, CGFloat y);
+	void CGContextAddLineToPoint (CGContextRef c, CGFloat x, CGFloat y);
+	void CGContextAddCurveToPoint (CGContextRef c, CGFloat cp1x, CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y);
+	void CGContextAddQuadCurveToPoint (CGContextRef c, CGFloat cpx, CGFloat cpy, CGFloat x, CGFloat y);
+	void CGContextClosePath (CGContextRef c);
+	void CGContextAddRect (CGContextRef c, CGRect rect);
+	void CGContextAddRects (CGContextRef c, CGRect* rects, uint count);
+	void CGContextAddLines (CGContextRef c, CGPoint* points, uint count);
+	void CGContextAddEllipseInRect (CGContextRef context, CGRect rect);
+	void CGContextAddArc (CGContextRef c, CGFloat x, CGFloat y, CGFloat radius, CGFloat startAngle, CGFloat endAngle, int clockwise);
+	void CGContextAddArcToPoint (CGContextRef c, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat radius);
+	void CGContextAddPath (CGContextRef context, CGPathRef path);
+	void CGContextReplacePathWithStrokedPath (CGContextRef c);
+	bool CGContextIsPathEmpty (CGContextRef c);
+	CGPoint CGContextGetPathCurrentPoint (CGContextRef c);
+	CGRect CGContextGetPathBoundingBox (CGContextRef c);
+	bool CGContextPathContainsPoint (CGContextRef context, CGPoint point, int mode);
+	void CGContextDrawPath (CGContextRef c, int mode);
+	void CGContextFillPath (CGContextRef c);
+	void CGContextEOFillPath (CGContextRef c);
+	void CGContextStrokePath (CGContextRef c);
+	void CGContextFillRect (CGContextRef c, CGRect rect);
+	void CGContextFillRects (CGContextRef c, CGRect* rects, uint count);
+	void CGContextStrokeRect (CGContextRef c, CGRect rect);
+	void CGContextStrokeRectWithWidth (CGContextRef c, CGRect rect, CGFloat width);
+	void CGContextClearRect (CGContextRef c, CGRect rect);
+	void CGContextFillEllipseInRect (CGContextRef context, CGRect rect);
+	void CGContextStrokeEllipseInRect (CGContextRef context, CGRect rect);
+	void CGContextStrokeLineSegments (CGContextRef c, CGPoint* points, uint count);
+	void CGContextClip (CGContextRef c);
+	void CGContextEOClip (CGContextRef c);
+	void CGContextClipToMask (CGContextRef c, CGRect rect, CGImageRef mask);
+	CGRect CGContextGetClipBoundingBox (CGContextRef c);
+	void CGContextClipToRect (CGContextRef c, CGRect rect);
+	void CGContextClipToRects (CGContextRef c, CGRect* rects, uint count);
+	void CGContextSetFillColorWithColor (CGContextRef c, CGColorRef color);
+	void CGContextSetStrokeColorWithColor (CGContextRef c, CGColorRef color);
+	void CGContextSetFillColorSpace (CGContextRef c, CGColorSpaceRef colorspace);
+	void CGContextSetStrokeColorSpace (CGContextRef c, CGColorSpaceRef colorspace);
+	void CGContextSetFillColor (CGContextRef c, CGFloat* components);
+	void CGContextSetStrokeColor (CGContextRef c, CGFloat* components);
+	void CGContextSetFillPattern (CGContextRef c, CGPatternRef pattern, CGFloat* components);
+	void CGContextSetStrokePattern (CGContextRef c, CGPatternRef pattern, CGFloat* components);
+	void CGContextSetPatternPhase (CGContextRef c, CGSize phase);
+	void CGContextSetGrayFillColor (CGContextRef c, CGFloat gray, CGFloat alpha);
+	void CGContextSetGrayStrokeColor (CGContextRef c, CGFloat gray, CGFloat alpha);
+	void CGContextSetRGBFillColor (CGContextRef c, CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha);
+	void CGContextSetRGBStrokeColor (CGContextRef c, CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha);
+	void CGContextSetCMYKFillColor (CGContextRef c, CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha);
+	void CGContextSetCMYKStrokeColor (CGContextRef c, CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha);
+	void CGContextSetRenderingIntent (CGContextRef c, int intent);
+	void CGContextDrawImage (CGContextRef c, CGRect rect, CGImageRef image);
+	void CGContextDrawTiledImage (CGContextRef c, CGRect rect, CGImageRef image);
+	int CGContextGetInterpolationQuality (CGContextRef c);
+	void CGContextSetInterpolationQuality (CGContextRef c, int quality);
+	void CGContextSetShadowWithColor (CGContextRef context, CGSize offset, CGFloat blur, CGColorRef color);
+	void CGContextSetShadow (CGContextRef context, CGSize offset, CGFloat blur);
+	void CGContextDrawLinearGradient (CGContextRef context, CGGradientRef gradient, CGPoint startPoint, CGPoint endPoint, uint options);
+	void CGContextDrawRadialGradient (CGContextRef context, CGGradientRef gradient, CGPoint startCenter, CGFloat startRadius, CGPoint endCenter, CGFloat endRadius, uint options);
+	void CGContextDrawShading (CGContextRef context, CGShadingRef shading);
+	void CGContextSetCharacterSpacing (CGContextRef c, CGFloat spacing);
+	void CGContextSetTextPosition (CGContextRef c, CGFloat x, CGFloat y);
+	CGPoint CGContextGetTextPosition (CGContextRef c);
+	void CGContextSetTextMatrix (CGContextRef c, CGAffineTransform t);
+	CGAffineTransform CGContextGetTextMatrix (CGContextRef c);
+	void CGContextSetTextDrawingMode (CGContextRef c, int mode);
+	void CGContextSetFont (CGContextRef c, CGFontRef font);
+	void CGContextSetFontSize (CGContextRef c, CGFloat size);
+	void CGContextSelectFont (CGContextRef c, char* name, CGFloat size, int textEncoding);
+	void CGContextShowGlyphsAtPositions (CGContextRef context, CGGlyph* glyphs, CGPoint* positions, uint count);
+	void CGContextShowText (CGContextRef c, char* string, uint length);
+	void CGContextShowTextAtPoint (CGContextRef c, CGFloat x, CGFloat y, char* string, uint length);
+	void CGContextShowGlyphs (CGContextRef c, CGGlyph* g, uint count);
+	void CGContextShowGlyphsAtPoint (CGContextRef c, CGFloat x, CGFloat y, CGGlyph* glyphs, uint count);
+	void CGContextShowGlyphsWithAdvances (CGContextRef c, CGGlyph* glyphs, CGSize* advances, uint count);
+	void CGContextDrawPDFPage (CGContextRef c, CGPDFPageRef page);
+	void CGContextDrawPDFDocument (CGContextRef c, CGRect rect, CGPDFDocumentRef document, int page);
+	void CGContextBeginPage (CGContextRef c, CGRect* mediaBox);
+	void CGContextEndPage (CGContextRef c);
+	CGContextRef CGContextRetain (CGContextRef c);
+	void CGContextRelease (CGContextRef c);
+	void CGContextFlush (CGContextRef c);
+	void CGContextSynchronize (CGContextRef c);
+	void CGContextSetShouldAntialias (CGContextRef c, bool shouldAntialias);
+	void CGContextSetAllowsAntialiasing (CGContextRef context, bool allowsAntialiasing);
+	void CGContextSetShouldSmoothFonts (CGContextRef c, bool shouldSmoothFonts);
+	void CGContextBeginTransparencyLayer (CGContextRef context, CFDictionaryRef auxiliaryInfo);
+	void CGContextBeginTransparencyLayerWithRect (CGContextRef context, CGRect rect, CFDictionaryRef auxiliaryInfo);
+	void CGContextEndTransparencyLayer (CGContextRef context);
+	CGAffineTransform CGContextGetUserSpaceToDeviceSpaceTransform (CGContextRef c);
+	CGPoint CGContextConvertPointToDeviceSpace (CGContextRef c, CGPoint point);
+	CGPoint CGContextConvertPointToUserSpace (CGContextRef c, CGPoint point);
+	CGSize CGContextConvertSizeToDeviceSpace (CGContextRef c, CGSize size);
+	CGSize CGContextConvertSizeToUserSpace (CGContextRef c, CGSize size);
+	CGRect CGContextConvertRectToDeviceSpace (CGContextRef c, CGRect rect);
+	CGRect CGContextConvertRectToUserSpace (CGContextRef c, CGRect rect);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGDataConsumer.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,38 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGDataConsumer;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.corefoundation.CFData;
+import dstep.corefoundation.CFURL;
+//import dstep.stddef;
+
+struct CGDataConsumer; 
+
+alias CGDataConsumer* CGDataConsumerRef;
+
+extern (C)
+{
+	alias void function (void*) CGDataConsumerReleaseInfoCallback;
+	alias uint function (void*, void*, uint) CGDataConsumerPutBytesCallback;
+}
+
+struct CGDataConsumerCallbacks
+{
+	CGDataConsumerPutBytesCallback putBytes;
+	CGDataConsumerReleaseInfoCallback releaseConsumer;
+}
+
+extern (C)
+{
+	uint CGDataConsumerGetTypeID ();
+	CGDataConsumerRef CGDataConsumerCreate (void* info, CGDataConsumerCallbacks* callbacks);
+	CGDataConsumerRef CGDataConsumerCreateWithURL (CFURLRef url);
+	CGDataConsumerRef CGDataConsumerCreateWithCFData (CFMutableDataRef data);
+	CGDataConsumerRef CGDataConsumerRetain (CGDataConsumerRef consumer);
+	void CGDataConsumerRelease (CGDataConsumerRef consumer);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGDataProvider.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,84 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGDataProvider;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.corefoundation.CFData;
+import dstep.corefoundation.CFURL;
+/*import dstep.stddef;
+import dstep.unistd;*/
+
+struct CGDataProvider;
+
+alias CGDataProvider* CGDataProviderRef;
+
+extern (C)
+{
+	alias void function (void*, uint) CGDataProviderSkipBytesCallback;
+	alias void function (void*, void*) CGDataProviderReleaseBytePointerCallback;
+	alias uint function (void*, void*, uint, uint) CGDataProviderGetBytesAtOffsetCallback;
+	alias uint function (void*, void*, long, uint) CGDataProviderGetBytesAtPositionCallback;
+	alias uint function (void*, void*, uint) CGDataProviderGetBytesCallback;
+	alias void function (void*, void*, uint) CGDataProviderReleaseDataCallback;
+	alias void function (void*) CGDataProviderReleaseInfoCallback;
+	alias long function (void*, long) CGDataProviderSkipForwardCallback;
+	alias void * function (void*) CGDataProviderGetBytePointerCallback;
+	alias void function (void*) CGDataProviderRewindCallback;
+}
+
+struct CGDataProviderSequentialCallbacks
+{
+	uint version_;
+	CGDataProviderGetBytesCallback getBytes;
+	CGDataProviderSkipForwardCallback skipForward;
+	CGDataProviderRewindCallback rewind;
+	CGDataProviderReleaseInfoCallback releaseInfo;
+}
+
+
+struct CGDataProviderDirectCallbacks
+{
+	uint version_;
+	CGDataProviderGetBytePointerCallback getBytePointer;
+	CGDataProviderReleaseBytePointerCallback releaseBytePointer;
+	CGDataProviderGetBytesAtPositionCallback getBytesAtPosition;
+	CGDataProviderReleaseInfoCallback releaseInfo;
+}
+
+
+struct CGDataProviderCallbacks
+{
+	CGDataProviderGetBytesCallback getBytes;
+	CGDataProviderSkipBytesCallback skipBytes;
+	CGDataProviderRewindCallback rewind;
+	CGDataProviderReleaseInfoCallback releaseProvider;
+}
+
+
+struct CGDataProviderDirectAccessCallbacks
+{
+	CGDataProviderGetBytePointerCallback getBytePointer;
+	CGDataProviderReleaseBytePointerCallback releaseBytePointer;
+	CGDataProviderGetBytesAtOffsetCallback getBytes;
+	CGDataProviderReleaseInfoCallback releaseProvider;
+}
+
+extern (C)
+{
+	uint CGDataProviderGetTypeID ();
+	CGDataProviderRef CGDataProviderCreateSequential (void* info, CGDataProviderSequentialCallbacks* callbacks);
+	CGDataProviderRef CGDataProviderCreateDirect (void* info, long size, CGDataProviderDirectCallbacks* callbacks);
+	CGDataProviderRef CGDataProviderCreateWithData (void* info, void* data, uint size, CGDataProviderReleaseDataCallback releaseData);
+	CGDataProviderRef CGDataProviderCreateWithCFData (CFDataRef data);
+	CGDataProviderRef CGDataProviderCreateWithURL (CFURLRef url);
+	CGDataProviderRef CGDataProviderCreateWithFilename (char* filename);
+	CGDataProviderRef CGDataProviderRetain (CGDataProviderRef provider);
+	void CGDataProviderRelease (CGDataProviderRef provider);
+	CFDataRef CGDataProviderCopyData (CGDataProviderRef provider);
+	CGDataProviderRef CGDataProviderCreate (void* info, CGDataProviderCallbacks* callbacks);
+	CGDataProviderRef CGDataProviderCreateDirectAccess (void* info, uint size, CGDataProviderDirectAccessCallbacks* callbacks);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGDirectDisplay.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,91 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGDirectDisplay;
+
+//import dstep.AvailabilityMacros;
+import dstep.corefoundation.CoreFoundation;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGContext;
+import dstep.applicationservices.coregraphics.CGError;
+import dstep.applicationservices.coregraphics.CGGeometry;
+/*import dstep.mach.boolean;
+import dstep.stdint;*/
+
+struct _CGDirectPaletteRef;
+
+alias uint CGDirectDisplayID;
+alias _CGDirectPaletteRef* CGDirectPaletteRef;
+alias uint CGDisplayCount;
+alias uint CGTableCount;
+alias int CGDisplayCoord;
+alias ubyte CGByteValue;
+alias uint CGOpenGLDisplayMask;
+alias uint CGBeamPosition;
+alias int CGMouseDelta;
+alias double CGRefreshRate;
+alias uint CGCaptureOptions;
+alias int CGDisplayErr;
+alias float CGGammaValue;
+
+enum
+{
+	kCGCaptureNoOptions = 0,
+	kCGCaptureNoFill = (1 << 0)
+}
+
+extern (C)
+{
+	uint CGMainDisplayID ();
+	int CGGetDisplaysWithPoint (CGPoint point, uint maxDisplays, CGDirectDisplayID* dspys, CGDisplayCount* dspyCnt);
+	int CGGetDisplaysWithRect (CGRect rect, uint maxDisplays, CGDirectDisplayID* dspys, CGDisplayCount* dspyCnt);
+	int CGGetDisplaysWithOpenGLDisplayMask (uint mask, uint maxDisplays, CGDirectDisplayID* dspys, CGDisplayCount* dspyCnt);
+	int CGGetActiveDisplayList (uint maxDisplays, CGDirectDisplayID* activeDspys, CGDisplayCount* dspyCnt);
+	int CGGetOnlineDisplayList (uint maxDisplays, CGDirectDisplayID* onlineDspys, CGDisplayCount* dspyCnt);
+	uint CGDisplayIDToOpenGLDisplayMask (uint display);
+	uint CGOpenGLDisplayMaskToDisplayID (uint mask);
+	CGRect CGDisplayBounds (uint display);
+	uint CGDisplayPixelsWide (uint display);
+	uint CGDisplayPixelsHigh (uint display);
+	CFArrayRef CGDisplayAvailableModes (uint display);
+	CFDictionaryRef CGDisplayBestModeForParameters (uint display, uint bitsPerPixel, uint width, uint height, bool* exactMatch);
+	CFDictionaryRef CGDisplayBestModeForParametersAndRefreshRate (uint display, uint bitsPerPixel, uint width, uint height, double refresh, bool* exactMatch);
+	CFDictionaryRef CGDisplayBestModeForParametersAndRefreshRateWithProperty (uint display, uint bitsPerPixel, uint width, uint height, double refresh, CFStringRef property, bool* exactMatch);
+	CFDictionaryRef CGDisplayCurrentMode (uint display);
+	int CGDisplaySwitchToMode (uint display, CFDictionaryRef mode);
+	uint CGDisplayBitsPerPixel (uint display);
+	uint CGDisplayBitsPerSample (uint display);
+	uint CGDisplaySamplesPerPixel (uint display);
+	uint CGDisplayBytesPerRow (uint display);
+	int CGSetDisplayTransferByFormula (uint display, float redMin, float redMax, float redGamma, float greenMin, float greenMax, float greenGamma, float blueMin, float blueMax, float blueGamma);
+	int CGGetDisplayTransferByFormula (uint display, CGGammaValue* redMin, CGGammaValue* redMax, CGGammaValue* redGamma, CGGammaValue* greenMin, CGGammaValue* greenMax, CGGammaValue* greenGamma, CGGammaValue* blueMin, CGGammaValue* blueMax, CGGammaValue* blueGamma);
+	uint CGDisplayGammaTableCapacity (uint display);
+	int CGSetDisplayTransferByTable (uint display, uint tableSize, CGGammaValue* redTable, CGGammaValue* greenTable, CGGammaValue* blueTable);
+	int CGGetDisplayTransferByTable (uint display, uint capacity, CGGammaValue* redTable, CGGammaValue* greenTable, CGGammaValue* blueTable, CGTableCount* sampleCount);
+	int CGSetDisplayTransferByByteTable (uint display, uint tableSize, char* redTable, char* greenTable, char* blueTable);
+	void CGDisplayRestoreColorSyncSettings ();
+	int CGDisplayIsCaptured (uint display);
+	int CGDisplayCapture (uint display);
+	int CGDisplayCaptureWithOptions (uint display, uint options);
+	int CGDisplayRelease (uint display);
+	int CGCaptureAllDisplays ();
+	int CGCaptureAllDisplaysWithOptions (uint options);
+	int CGReleaseAllDisplays ();
+	uint CGShieldingWindowID (uint display);
+	int CGShieldingWindowLevel ();
+	void* CGDisplayBaseAddress (uint display);
+	void* CGDisplayAddressForPosition (uint display, int x, int y);
+	int CGDisplayHideCursor (uint display);
+	int CGDisplayShowCursor (uint display);
+	int CGDisplayMoveCursorToPoint (uint display, CGPoint point);
+	void CGGetLastMouseDelta (CGMouseDelta* deltaX, CGMouseDelta* deltaY);
+	int CGDisplayCanSetPalette (uint display);
+	int CGDisplaySetPalette (uint display, CGDirectPaletteRef palette);
+	int CGDisplayWaitForBeamPositionOutsideLines (uint display, uint upperScanLine, uint lowerScanLine);
+	uint CGDisplayBeamPosition (uint display);
+	CGContextRef CGDisplayGetDrawingContext (uint display);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGDirectPalette.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,45 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGDirectPalette;
+
+import dstep.applicationservices.coregraphics.CGDirectDisplay;
+
+alias float CGPaletteBlendFraction;
+alias _CGDeviceColor CGDeviceColor;
+alias _CGDeviceByteColor CGDeviceByteColor;
+
+struct _CGDeviceColor
+{
+	float red;
+	float green;
+	float blue;
+}
+
+
+struct _CGDeviceByteColor
+{
+	ubyte red;
+	ubyte green;
+	ubyte blue;
+}
+
+extern (C)
+{
+	CGDirectPaletteRef CGPaletteCreateDefaultColorPalette ();
+	CGDirectPaletteRef CGPaletteCreateWithDisplay (uint display);
+	CGDirectPaletteRef CGPaletteCreateWithCapacity (uint capacity);
+	CGDirectPaletteRef CGPaletteCreateWithSamples (CGDeviceColor* sampleTable, uint sampleCount);
+	CGDirectPaletteRef CGPaletteCreateWithByteSamples (CGDeviceByteColor* sampleTable, uint sampleCount);
+	void CGPaletteRelease (CGDirectPaletteRef palette);
+	CGDeviceColor CGPaletteGetColorAtIndex (CGDirectPaletteRef palette, uint index);
+	uint CGPaletteGetIndexForColor (CGDirectPaletteRef palette, CGDeviceColor color);
+	uint CGPaletteGetNumberOfSamples (CGDirectPaletteRef palette);
+	void CGPaletteSetColorAtIndex (CGDirectPaletteRef palette, CGDeviceColor color, uint index);
+	CGDirectPaletteRef CGPaletteCreateCopy (CGDirectPaletteRef palette);
+	ubyte CGPaletteIsEqualToPalette (CGDirectPaletteRef palette1, CGDirectPaletteRef palette2);
+	CGDirectPaletteRef CGPaletteCreateFromPaletteBlendedWithColor (CGDirectPaletteRef palette, float fraction, CGDeviceColor color);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGDisplayConfiguration.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,82 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGDisplayConfiguration;
+
+import dstep.corefoundation.CFDictionary;
+
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGDirectDisplay;
+import dstep.applicationservices.coregraphics.CGGeometry;
+//import dstep.iokit.IOKitLib;
+
+struct _CGDisplayConfigRef;
+
+alias _CGDisplayConfigRef* CGDisplayConfigRef;
+alias uint CGConfigureOption;
+alias uint CGDisplayChangeSummaryFlags;
+
+extern (C)
+{
+	alias void function (uint, uint, void*) CGDisplayReconfigurationCallBack;
+}
+
+enum
+{
+	kCGConfigureForAppOnly = 0,
+	kCGConfigureForSession = 1,
+	kCGConfigurePermanently = 2
+}
+
+enum
+{
+	kCGDisplayBeginConfigurationFlag = (1 << 0),
+	kCGDisplayMovedFlag = (1 << 1),
+	kCGDisplaySetMainFlag = (1 << 2),
+	kCGDisplaySetModeFlag = (1 << 3),
+	kCGDisplayAddFlag = (1 << 4),
+	kCGDisplayRemoveFlag = (1 << 5),
+	kCGDisplayEnabledFlag = (1 << 8),
+	kCGDisplayDisabledFlag = (1 << 9),
+	kCGDisplayMirrorFlag = (1 << 10),
+	kCGDisplayUnMirrorFlag = (1 << 11),
+	kCGDisplayDesktopShapeChangedFlag = (1 << 12)
+}
+
+extern (C)
+{
+	int CGBeginDisplayConfiguration (CGDisplayConfigRef* pConfigRef);
+	int CGConfigureDisplayOrigin (CGDisplayConfigRef configRef, uint display, int x, int y);
+	int CGConfigureDisplayMode (CGDisplayConfigRef configRef, uint display, CFDictionaryRef mode);
+	int CGConfigureDisplayStereoOperation (CGDisplayConfigRef configRef, uint display, int stereo, int forceBlueLine);
+	int CGConfigureDisplayMirrorOfDisplay (CGDisplayConfigRef configRef, uint display, uint masterDisplay);
+	int CGCancelDisplayConfiguration (CGDisplayConfigRef configRef);
+	int CGCompleteDisplayConfiguration (CGDisplayConfigRef configRef, uint option);
+	void CGRestorePermanentDisplayConfiguration ();
+	int CGDisplayRegisterReconfigurationCallback (CGDisplayReconfigurationCallBack proc, void* userInfo);
+	int CGDisplayRemoveReconfigurationCallback (CGDisplayReconfigurationCallBack proc, void* userInfo);
+	int CGDisplaySetStereoOperation (uint display, int stereo, int forceBlueLine, uint option);
+	int CGDisplayIsActive (uint display);
+	int CGDisplayIsAsleep (uint display);
+	int CGDisplayIsOnline (uint display);
+	int CGDisplayIsMain (uint display);
+	int CGDisplayIsBuiltin (uint display);
+	int CGDisplayIsInMirrorSet (uint display);
+	int CGDisplayIsAlwaysInMirrorSet (uint display);
+	int CGDisplayIsInHWMirrorSet (uint display);
+	uint CGDisplayMirrorsDisplay (uint display);
+	int CGDisplayUsesOpenGLAcceleration (uint display);
+	int CGDisplayIsStereo (uint display);
+	uint CGDisplayPrimaryDisplay (uint display);
+	uint CGDisplayUnitNumber (uint display);
+	uint CGDisplayVendorNumber (uint display);
+	uint CGDisplayModelNumber (uint display);
+	uint CGDisplaySerialNumber (uint display);
+	uint CGDisplayIOServicePort (uint display);
+	CGSize CGDisplayScreenSize (uint display);
+	double CGDisplayRotation (uint display);
+	CGColorSpaceRef CGDisplayCopyColorSpace (uint display);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGDisplayFade.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,24 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGDisplayFade;
+
+import dstep.applicationservices.coregraphics.CGDirectDisplay;
+import dstep.applicationservices.coregraphics.CGDisplayConfiguration;
+
+alias uint CGDisplayFadeReservationToken;
+alias float CGDisplayBlendFraction;
+alias float CGDisplayFadeInterval;
+alias float CGDisplayReservationInterval;
+
+extern (C)
+{
+	int CGConfigureDisplayFadeEffect (CGDisplayConfigRef configRef, float fadeOutSeconds, float fadeInSeconds, float fadeRed, float fadeGreen, float fadeBlue);
+	int CGAcquireDisplayFadeReservation (float seconds, CGDisplayFadeReservationToken* pNewToken);
+	int CGReleaseDisplayFadeReservation (uint myToken);
+	int CGDisplayFade (uint myToken, float seconds, float startBlend, float endBlend, float redBlend, float greenBlend, float blueBlend, int synchronous);
+	int CGDisplayFadeOperationInProgress ();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGError.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,38 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGError;
+
+alias int CGError;
+
+enum _CGError 
+{
+	kCGErrorSuccess = 0,
+	kCGErrorFirst = 1000,
+	kCGErrorFailure = kCGErrorFirst,
+	kCGErrorIllegalArgument = 1001,
+	kCGErrorInvalidConnection = 1002,
+	kCGErrorInvalidContext = 1003,
+	kCGErrorCannotComplete = 1004,
+	kCGErrorNameTooLong = 1005,
+	kCGErrorNotImplemented = 1006,
+	kCGErrorRangeCheck = 1007,
+	kCGErrorTypeCheck = 1008,
+	kCGErrorNoCurrentPoint = 1009,
+	kCGErrorInvalidOperation = 1010,
+	kCGErrorNoneAvailable = 1011,
+	kCGErrorApplicationRequiresNewerSystem = 1015,
+	kCGErrorApplicationNotPermittedToExecute = 1016,
+	kCGErrorApplicationIncorrectExecutableFormatFound = 1023,
+	kCGErrorApplicationIsLaunching = 1024,
+	kCGErrorApplicationAlreadyRunning = 1025,
+	kCGErrorApplicationCanOnlyBeRunInOneSessionAtATime = 1026,
+	kCGErrorClassicApplicationsMustBeLaunchedByClassic = 1027,
+	kCGErrorForkFailed = 1028,
+	kCGErrorRetryRegistration = 1029,
+	kCGErrorLast = kCGErrorRetryRegistration
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGEvent.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,54 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGEvent;
+
+import dstep.corefoundation.CoreFoundation;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGDirectDisplay;
+import dstep.applicationservices.coregraphics.CGError;
+import dstep.applicationservices.coregraphics.CGEventSource;
+import dstep.applicationservices.coregraphics.CGEventTypes;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.applicationservices.coregraphics.CGRemoteOperation;
+import dstep.coreservices.CoreServices;
+
+extern (C)
+{
+	uint CGEventGetTypeID ();
+	CGEventRef CGEventCreate (CGEventSourceRef source);
+	CGEventRef CGEventCreateFromData (CFAllocatorRef allocator, CFDataRef eventData);
+	CFDataRef CGEventCreateData (CFAllocatorRef allocator, CGEventRef event);
+	CGEventRef CGEventCreateMouseEvent (CGEventSourceRef source, uint mouseType, CGPoint mouseCursorPosition, uint mouseButton);
+	CGEventRef CGEventCreateKeyboardEvent (CGEventSourceRef source, ushort virtualKey, bool keyDown);
+	CGEventRef CGEventCreateScrollWheelEvent (CGEventSourceRef source, uint units, uint wheelCount, int wheel1, ...);
+	CGEventRef CGEventCreateCopy (CGEventRef event);
+	CGEventSourceRef CGEventCreateSourceFromEvent (CGEventRef event);
+	void CGEventSetSource (CGEventRef event, CGEventSourceRef source);
+	uint CGEventGetType (CGEventRef event);
+	void CGEventSetType (CGEventRef event, uint type);
+	ulong CGEventGetTimestamp (CGEventRef event);
+	void CGEventSetTimestamp (CGEventRef event, ulong timestamp);
+	CGPoint CGEventGetLocation (CGEventRef event);
+	CGPoint CGEventGetUnflippedLocation (CGEventRef event);
+	void CGEventSetLocation (CGEventRef event, CGPoint location);
+	ulong CGEventGetFlags (CGEventRef event);
+	void CGEventSetFlags (CGEventRef event, ulong flags);
+	void CGEventKeyboardGetUnicodeString (CGEventRef event, uint maxStringLength, UniCharCount* actualStringLength, wchar* unicodeString);
+	void CGEventKeyboardSetUnicodeString (CGEventRef event, uint stringLength, wchar* unicodeString);
+	long CGEventGetIntegerValueField (CGEventRef event, uint field);
+	double CGEventGetDoubleValueField (CGEventRef event, uint field);
+	void CGEventSetIntegerValueField (CGEventRef event, uint field, long value);
+	void CGEventSetDoubleValueField (CGEventRef event, uint field, double value);
+	CFMachPortRef CGEventTapCreate (uint tap, uint place, uint options, ulong eventsOfInterest, CGEventTapCallBack callback, void* refcon);
+	CFMachPortRef CGEventTapCreateForPSN (void* processSerialNumber, uint place, uint options, ulong eventsOfInterest, CGEventTapCallBack callback, void* refcon);
+	void CGEventTapEnable (CFMachPortRef myTap, bool enable);
+	bool CGEventTapIsEnabled (CFMachPortRef myTap);
+	void CGEventTapPostEvent (CGEventTapProxy proxy, CGEventRef event);
+	void CGEventPost (uint tap, CGEventRef event);
+	void CGEventPostToPSN (void* processSerialNumber, CGEventRef event);
+	int CGGetEventTapList (uint maxNumberOfTaps, CGEventTapInformation* tapList, CGTableCount* eventTapCount);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGEventSource.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,32 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGEventSource;
+
+import dstep.applicationservices.coregraphics.CGEventTypes;
+import dstep.applicationservices.coregraphics.CGRemoteOperation;
+
+extern (C)
+{
+	uint CGEventSourceGetTypeID ();
+	CGEventSourceRef CGEventSourceCreate (uint sourceState);
+	uint CGEventSourceGetKeyboardType (CGEventSourceRef source);
+	void CGEventSourceSetKeyboardType (CGEventSourceRef source, uint keyboardType);
+	void CGEventSourceSetPixelsPerLine (CGEventSourceRef source, double pixelsPerLine);
+	double CGEventSourceGetPixelsPerLine (CGEventSourceRef source);
+	uint CGEventSourceGetSourceStateID (CGEventSourceRef source);
+	bool CGEventSourceButtonState (uint sourceState, uint button);
+	bool CGEventSourceKeyState (uint sourceState, ushort key);
+	ulong CGEventSourceFlagsState (uint sourceState);
+	double CGEventSourceSecondsSinceLastEventType (uint source, uint eventType);
+	uint CGEventSourceCounterForEventType (uint source, uint evType);
+	void CGEventSourceSetUserData (CGEventSourceRef source, long userData);
+	long CGEventSourceGetUserData (CGEventSourceRef source);
+	void CGEventSourceSetLocalEventsFilterDuringSuppressionState (CGEventSourceRef source, uint filter, uint state);
+	uint CGEventSourceGetLocalEventsFilterDuringSuppressionState (CGEventSourceRef source, uint state);
+	void CGEventSourceSetLocalEventsSuppressionInterval (CGEventSourceRef source, double seconds);
+	double CGEventSourceGetLocalEventsSuppressionInterval (CGEventSourceRef source);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGEventTypes.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,193 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGEventTypes;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGRemoteOperation;
+//import dstep.iokit.hidsystem.IOLLEvent;
+
+struct __CGEvent;
+struct __CGEventTapProxy;
+struct __CGEventSource;
+
+alias __CGEvent* CGEventRef;
+alias uint CGMouseButton;
+alias uint CGScrollEventUnit;
+alias ulong CGEventFlags;
+alias uint CGEventType;
+alias ulong CGEventTimestamp;
+alias uint CGEventField;
+alias uint CGEventMouseSubtype;
+alias uint CGEventTapLocation;
+alias uint CGEventTapPlacement;
+alias uint CGEventTapOptions;
+alias ulong CGEventMask;
+alias __CGEventTapProxy* CGEventTapProxy;
+alias __CGEventSource* CGEventSourceRef;
+alias uint CGEventSourceStateID;
+alias uint CGEventSourceKeyboardType;
+
+extern (C)
+{
+	alias CGEventRef function (CGEventTapProxy, uint, CGEventRef, void*) CGEventTapCallBack;
+}
+
+enum _CGMouseButton
+
+{
+	kCGMouseButtonLeft = 0,
+	kCGMouseButtonRight = 1,
+	kCGMouseButtonCenter = 2
+}
+
+enum
+{
+	kCGScrollEventUnitPixel = 0,
+	kCGScrollEventUnitLine = 1
+}
+
+enum _CGEventFlags
+
+{
+	kCGEventFlagMaskAlphaShift = 0x00010000,
+	kCGEventFlagMaskShift = 0x00020000,
+	kCGEventFlagMaskControl = 0x00040000,
+	kCGEventFlagMaskAlternate = 0x00080000,
+	kCGEventFlagMaskCommand = 0x00100000,
+	kCGEventFlagMaskHelp = 0x00400000,
+	kCGEventFlagMaskSecondaryFn = 0x00800000,
+	kCGEventFlagMaskNumericPad = 0x00200000,
+	kCGEventFlagMaskNonCoalesced = 0x00000100
+}
+
+enum _CGEventType 
+{
+	kCGEventNull = 0,
+	kCGEventLeftMouseDown = 1,
+	kCGEventLeftMouseUp = 2,
+	kCGEventRightMouseDown = 3,
+	kCGEventRightMouseUp = 4,
+	kCGEventMouseMoved = 5,
+	kCGEventLeftMouseDragged = 6,
+	kCGEventRightMouseDragged = 7,
+	kCGEventKeyDown = 10,
+	kCGEventKeyUp = 11,
+	kCGEventFlagsChanged = 12,
+	kCGEventScrollWheel = 22,
+	kCGEventTabletPointer = 23,
+	kCGEventTabletProximity = 24,
+	kCGEventOtherMouseDown = 25,
+	kCGEventOtherMouseUp = 26,
+	kCGEventOtherMouseDragged = 27,
+	kCGEventTapDisabledByTimeout = 0xFFFFFFFE,
+	kCGEventTapDisabledByUserInput = 0xFFFFFFFF
+}
+
+enum _CGEventField 
+{
+	kCGMouseEventNumber = 0,
+	kCGMouseEventClickState = 1,
+	kCGMouseEventPressure = 2,
+	kCGMouseEventButtonNumber = 3,
+	kCGMouseEventDeltaX = 4,
+	kCGMouseEventDeltaY = 5,
+	kCGMouseEventInstantMouser = 6,
+	kCGMouseEventSubtype = 7,
+	kCGKeyboardEventAutorepeat = 8,
+	kCGKeyboardEventKeycode = 9,
+	kCGKeyboardEventKeyboardType = 10,
+	kCGScrollWheelEventDeltaAxis1 = 11,
+	kCGScrollWheelEventDeltaAxis2 = 12,
+	kCGScrollWheelEventDeltaAxis3 = 13,
+	kCGScrollWheelEventFixedPtDeltaAxis1 = 93,
+	kCGScrollWheelEventFixedPtDeltaAxis2 = 94,
+	kCGScrollWheelEventFixedPtDeltaAxis3 = 95,
+	kCGScrollWheelEventPointDeltaAxis1 = 96,
+	kCGScrollWheelEventPointDeltaAxis2 = 97,
+	kCGScrollWheelEventPointDeltaAxis3 = 98,
+	kCGScrollWheelEventInstantMouser = 14,
+	kCGTabletEventPointX = 15,
+	kCGTabletEventPointY = 16,
+	kCGTabletEventPointZ = 17,
+	kCGTabletEventPointButtons = 18,
+	kCGTabletEventPointPressure = 19,
+	kCGTabletEventTiltX = 20,
+	kCGTabletEventTiltY = 21,
+	kCGTabletEventRotation = 22,
+	kCGTabletEventTangentialPressure = 23,
+	kCGTabletEventDeviceID = 24,
+	kCGTabletEventVendor1 = 25,
+	kCGTabletEventVendor2 = 26,
+	kCGTabletEventVendor3 = 27,
+	kCGTabletProximityEventVendorID = 28,
+	kCGTabletProximityEventTabletID = 29,
+	kCGTabletProximityEventPointerID = 30,
+	kCGTabletProximityEventDeviceID = 31,
+	kCGTabletProximityEventSystemTabletID = 32,
+	kCGTabletProximityEventVendorPointerType = 33,
+	kCGTabletProximityEventVendorPointerSerialNumber = 34,
+	kCGTabletProximityEventVendorUniqueID = 35,
+	kCGTabletProximityEventCapabilityMask = 36,
+	kCGTabletProximityEventPointerType = 37,
+	kCGTabletProximityEventEnterProximity = 38,
+	kCGEventTargetProcessSerialNumber = 39,
+	kCGEventTargetUnixProcessID = 40,
+	kCGEventSourceUnixProcessID = 41,
+	kCGEventSourceUserData = 42,
+	kCGEventSourceUserID = 43,
+	kCGEventSourceGroupID = 44,
+	kCGEventSourceStateID = 45,
+	kCGScrollWheelEventIsContinuous = 88
+}
+
+enum _CGEventMouseSubtype 
+{
+	kCGEventMouseSubtypeDefault = 0,
+	kCGEventMouseSubtypeTabletPoint = 1,
+	kCGEventMouseSubtypeTabletProximity = 2
+}
+
+enum _CGEventTapLocation 
+{
+	kCGHIDEventTap = 0,
+	kCGSessionEventTap,
+	kCGAnnotatedSessionEventTap
+}
+
+enum _CGEventTapPlacement 
+{
+	kCGHeadInsertEventTap = 0,
+	kCGTailAppendEventTap
+}
+
+enum _CGEventTapOptions 
+{
+	kCGEventTapOptionDefault = 0x00000000,
+	kCGEventTapOptionListenOnly = 0x00000001
+}
+
+enum
+{
+	kCGEventSourceStatePrivate = -1,
+	kCGEventSourceStateCombinedSessionState = 0,
+	kCGEventSourceStateHIDSystemState = 1
+}
+
+struct CGEventTapInformation
+{
+	uint eventTapID;
+	uint tapPoint;
+	uint options;
+	ulong eventsOfInterest;
+	int tappingProcess;
+	int processBeingTapped;
+	bool enabled;
+	float minUsecLatency;
+	float avgUsecLatency;
+	float maxUsecLatency;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGFont.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,88 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGFont;
+
+import dstep.corefoundation.CFArray;
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFData;
+import dstep.corefoundation.CFDictionary;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGDataProvider;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+struct CGFont;
+
+alias CGFont* CGFontRef;
+alias ushort CGFontIndex;
+alias ushort CGGlyph;
+alias int CGFontPostScriptFormat;
+
+extern (C)
+{
+	extern
+	{
+		const CFStringRef kCGFontVariationAxisName;
+		const CFStringRef kCGFontVariationAxisMinValue;
+		const CFStringRef kCGFontVariationAxisMaxValue;
+		const CFStringRef kCGFontVariationAxisDefaultValue;
+	}
+}
+
+enum /*CGFontPostScriptFormat*/ 
+{
+	kCGFontPostScriptFormatType1 = 1,
+	kCGFontPostScriptFormatType3 = 3,
+	kCGFontPostScriptFormatType42 = 42
+}
+
+enum
+{
+	kCGFontIndexMax = ((1 << 16) - 2),
+	kCGFontIndexInvalid = ((1 << 16) - 1),
+	kCGGlyphMax = kCGFontIndexMax
+}
+
+enum
+{
+	CGGlyphMin = 0,
+	CGGlyphMax = kCGGlyphMax
+}
+
+extern (C)
+{
+	uint CGFontGetTypeID ();
+	CGFontRef CGFontCreateWithPlatformFont (void* platformFontReference);
+	CGFontRef CGFontCreateWithDataProvider (CGDataProviderRef provider);
+	CGFontRef CGFontCreateWithFontName (CFStringRef name);
+	CGFontRef CGFontCreateCopyWithVariations (CGFontRef font, CFDictionaryRef variations);
+	CGFontRef CGFontRetain (CGFontRef font);
+	void CGFontRelease (CGFontRef font);
+	uint CGFontGetNumberOfGlyphs (CGFontRef font);
+	int CGFontGetUnitsPerEm (CGFontRef font);
+	CFStringRef CGFontCopyPostScriptName (CGFontRef font);
+	CFStringRef CGFontCopyFullName (CGFontRef font);
+	int CGFontGetAscent (CGFontRef font);
+	int CGFontGetDescent (CGFontRef font);
+	int CGFontGetLeading (CGFontRef font);
+	int CGFontGetCapHeight (CGFontRef font);
+	int CGFontGetXHeight (CGFontRef font);
+	CGRect CGFontGetFontBBox (CGFontRef font);
+	CGFloat CGFontGetItalicAngle (CGFontRef font);
+	CGFloat CGFontGetStemV (CGFontRef font);
+	CFArrayRef CGFontCopyVariationAxes (CGFontRef font);
+	CFDictionaryRef CGFontCopyVariations (CGFontRef font);
+	bool CGFontGetGlyphAdvances (CGFontRef font, CGGlyph* glyphs, uint count, int* advances);
+	bool CGFontGetGlyphBBoxes (CGFontRef font, CGGlyph* glyphs, uint count, CGRect* bboxes);
+	ushort CGFontGetGlyphWithGlyphName (CGFontRef font, CFStringRef name);
+	CFStringRef CGFontCopyGlyphNameForGlyph (CGFontRef font, ushort glyph);
+	bool CGFontCanCreatePostScriptSubset (CGFontRef font, int format);
+	CFDataRef CGFontCreatePostScriptSubset (CGFontRef font, CFStringRef subsetName, int format, CGGlyph* glyphs, uint count, ushort[256] encoding);
+	CFDataRef CGFontCreatePostScriptEncoding (CGFontRef font, ushort[256] encoding);
+	CFArrayRef CGFontCopyTableTags (CGFontRef font);
+	CFDataRef CGFontCopyTableForTag (CGFontRef font, uint tag);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGFunction.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,35 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGFunction;
+
+import dstep.corefoundation.CFBase;
+import dstep.applicationservices.coregraphics.CGBase;
+
+struct CGFunction;
+
+alias CGFunction* CGFunctionRef;
+
+extern (C)
+{
+	alias void function (void*, CGFloat*, CGFloat*) CGFunctionEvaluateCallback;
+	alias void function (void*) CGFunctionReleaseInfoCallback;
+}
+
+struct CGFunctionCallbacks
+{
+	uint version_;
+	CGFunctionEvaluateCallback evaluate;
+	CGFunctionReleaseInfoCallback releaseInfo;
+}
+
+extern (C)
+{
+	uint CGFunctionGetTypeID ();
+	CGFunctionRef CGFunctionCreate (void* info, uint domainDimension, CGFloat* domain, uint rangeDimension, CGFloat* range, CGFunctionCallbacks* callbacks);
+	CGFunctionRef CGFunctionRetain (CGFunctionRef function_);
+	void CGFunctionRelease (CGFunctionRef function_);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGGLContext.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,18 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGGLContext;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.applicationservices.coregraphics.CGContext;
+
+extern (C)
+{
+	CGContextRef CGGLContextCreate (void* glContext, CGSize size, CGColorSpaceRef colorspace);
+	void CGGLContextUpdateViewportSize (CGContextRef c, CGSize size);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGGeometry.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,86 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGGeometry;
+
+import dstep.corefoundation.CFDictionary;
+import dstep.applicationservices.coregraphics.CGBase;
+
+alias int CGRectEdge;
+
+extern (C)
+{
+	extern
+	{
+		const CGPoint CGPointZero;
+		const CGSize CGSizeZero;
+		const CGRect CGRectZero;
+		const CGRect CGRectNull;
+		const CGRect CGRectInfinite;
+	}
+}
+
+enum /*CGRectEdge*/ 
+{
+	CGRectMinXEdge,
+	CGRectMinYEdge,
+	CGRectMaxXEdge,
+	CGRectMaxYEdge
+}
+
+struct CGPoint
+{
+	CGFloat x;
+	CGFloat y;
+}
+
+
+struct CGSize
+{
+	CGFloat width;
+	CGFloat height;
+}
+
+
+struct CGRect
+{
+	CGPoint origin;
+	CGSize size;
+}
+
+extern (C)
+{
+	CGFloat CGRectGetMinX (CGRect rect);
+	CGFloat CGRectGetMidX (CGRect rect);
+	CGFloat CGRectGetMaxX (CGRect rect);
+	CGFloat CGRectGetMinY (CGRect rect);
+	CGFloat CGRectGetMidY (CGRect rect);
+	CGFloat CGRectGetMaxY (CGRect rect);
+	CGFloat CGRectGetWidth (CGRect rect);
+	CGFloat CGRectGetHeight (CGRect rect);
+	bool CGPointEqualToPoint (CGPoint point1, CGPoint point2);
+	bool CGSizeEqualToSize (CGSize size1, CGSize size2);
+	bool CGRectEqualToRect (CGRect rect1, CGRect rect2);
+	CGRect CGRectStandardize (CGRect rect);
+	bool CGRectIsEmpty (CGRect rect);
+	bool CGRectIsNull (CGRect rect);
+	bool CGRectIsInfinite (CGRect rect);
+	CGRect CGRectInset (CGRect rect, CGFloat dx, CGFloat dy);
+	CGRect CGRectIntegral (CGRect rect);
+	CGRect CGRectUnion (CGRect r1, CGRect r2);
+	CGRect CGRectIntersection (CGRect r1, CGRect r2);
+	CGRect CGRectOffset (CGRect rect, CGFloat dx, CGFloat dy);
+	void CGRectDivide (CGRect rect, CGRect* slice, CGRect* remainder, CGFloat amount, int edge);
+	bool CGRectContainsPoint (CGRect rect, CGPoint point);
+	bool CGRectContainsRect (CGRect rect1, CGRect rect2);
+	bool CGRectIntersectsRect (CGRect rect1, CGRect rect2);
+	CFDictionaryRef CGPointCreateDictionaryRepresentation (CGPoint point);
+	bool CGPointMakeWithDictionaryRepresentation (CFDictionaryRef dict, CGPoint* point);
+	CFDictionaryRef CGSizeCreateDictionaryRepresentation (CGSize size);
+	bool CGSizeMakeWithDictionaryRepresentation (CFDictionaryRef dict, CGSize* size);
+	CFDictionaryRef CGRectCreateDictionaryRepresentation (CGRect dummy);
+	bool CGRectMakeWithDictionaryRepresentation (CFDictionaryRef dict, CGRect* rect);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGGradient.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,33 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGGradient;
+
+import dstep.corefoundation.CFArray;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGContext;
+//import dstep.stdint;
+
+struct CGGradient;
+
+alias CGGradient* CGGradientRef;
+alias uint CGGradientDrawingOptions;
+
+enum
+{
+	kCGGradientDrawsBeforeStartLocation = (1 << 0),
+	kCGGradientDrawsAfterEndLocation = (1 << 1)
+}
+
+extern (C)
+{
+	uint CGGradientGetTypeID ();
+	CGGradientRef CGGradientCreateWithColorComponents (CGColorSpaceRef space, CGFloat* components, CGFloat* locations, uint count);
+	CGGradientRef CGGradientCreateWithColors (CGColorSpaceRef space, CFArrayRef colors, CGFloat* locations);
+	CGGradientRef CGGradientRetain (CGGradientRef gradient);
+	void CGGradientRelease (CGGradientRef gradient);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGImage.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,71 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGImage;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGDataProvider;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+struct CGImage;
+
+alias CGImage* CGImageRef;
+alias int CGImageAlphaInfo;
+alias uint CGBitmapInfo;
+
+enum /*CGImageAlphaInfo*/ 
+{
+	kCGImageAlphaNone,
+	kCGImageAlphaPremultipliedLast,
+	kCGImageAlphaPremultipliedFirst,
+	kCGImageAlphaLast,
+	kCGImageAlphaFirst,
+	kCGImageAlphaNoneSkipLast,
+	kCGImageAlphaNoneSkipFirst,
+	kCGImageAlphaOnly
+}
+
+enum
+{
+	kCGBitmapAlphaInfoMask = 0x1F,
+	kCGBitmapFloatComponents = (1 << 8),
+	kCGBitmapByteOrderMask = 0x7000,
+	kCGBitmapByteOrderDefault = (0 << 12),
+	kCGBitmapByteOrder16Little = (1 << 12),
+	kCGBitmapByteOrder32Little = (2 << 12),
+	kCGBitmapByteOrder16Big = (3 << 12),
+	kCGBitmapByteOrder32Big = (4 << 12)
+}
+
+extern (C)
+{
+	uint CGImageGetTypeID ();
+	CGImageRef CGImageCreate (uint width, uint height, uint bitsPerComponent, uint bitsPerPixel, uint bytesPerRow, CGColorSpaceRef colorspace, uint bitmapInfo, CGDataProviderRef provider, CGFloat* decode, bool shouldInterpolate, int intent);
+	CGImageRef CGImageMaskCreate (uint width, uint height, uint bitsPerComponent, uint bitsPerPixel, uint bytesPerRow, CGDataProviderRef provider, CGFloat* decode, bool shouldInterpolate);
+	CGImageRef CGImageCreateCopy (CGImageRef image);
+	CGImageRef CGImageCreateWithJPEGDataProvider (CGDataProviderRef source, CGFloat* decode, bool shouldInterpolate, int intent);
+	CGImageRef CGImageCreateWithPNGDataProvider (CGDataProviderRef source, CGFloat* decode, bool shouldInterpolate, int intent);
+	CGImageRef CGImageCreateWithImageInRect (CGImageRef image, CGRect rect);
+	CGImageRef CGImageCreateWithMask (CGImageRef image, CGImageRef mask);
+	CGImageRef CGImageCreateWithMaskingColors (CGImageRef image, CGFloat* components);
+	CGImageRef CGImageCreateCopyWithColorSpace (CGImageRef image, CGColorSpaceRef colorspace);
+	CGImageRef CGImageRetain (CGImageRef image);
+	void CGImageRelease (CGImageRef image);
+	bool CGImageIsMask (CGImageRef image);
+	uint CGImageGetWidth (CGImageRef image);
+	uint CGImageGetHeight (CGImageRef image);
+	uint CGImageGetBitsPerComponent (CGImageRef image);
+	uint CGImageGetBitsPerPixel (CGImageRef image);
+	uint CGImageGetBytesPerRow (CGImageRef image);
+	CGColorSpaceRef CGImageGetColorSpace (CGImageRef image);
+	int CGImageGetAlphaInfo (CGImageRef image);
+	CGDataProviderRef CGImageGetDataProvider (CGImageRef image);
+	CGFloat* CGImageGetDecode (CGImageRef image);
+	bool CGImageGetShouldInterpolate (CGImageRef image);
+	int CGImageGetRenderingIntent (CGImageRef image);
+	uint CGImageGetBitmapInfo (CGImageRef image);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGLayer.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,28 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGLayer;
+
+import dstep.corefoundation.CFDictionary;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGContext;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+struct CGLayer;
+
+alias CGLayer* CGLayerRef;
+
+extern (C)
+{
+	CGLayerRef CGLayerCreateWithContext (CGContextRef context, CGSize size, CFDictionaryRef auxiliaryInfo);
+	CGLayerRef CGLayerRetain (CGLayerRef layer);
+	void CGLayerRelease (CGLayerRef layer);
+	CGSize CGLayerGetSize (CGLayerRef layer);
+	CGContextRef CGLayerGetContext (CGLayerRef layer);
+	void CGContextDrawLayerInRect (CGContextRef context, CGRect rect, CGLayerRef layer);
+	void CGContextDrawLayerAtPoint (CGContextRef context, CGPoint point, CGLayerRef layer);
+	uint CGLayerGetTypeID ();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFArray.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,31 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFArray;
+
+import dstep.applicationservices.coregraphics.CGPDFDictionary;
+import dstep.applicationservices.coregraphics.CGPDFObject;
+import dstep.applicationservices.coregraphics.CGPDFStream;
+import dstep.applicationservices.coregraphics.CGPDFString;
+
+struct CGPDFArray;
+
+alias CGPDFArray* CGPDFArrayRef;
+
+extern (C)
+{
+	uint CGPDFArrayGetCount (CGPDFArrayRef array);
+	bool CGPDFArrayGetObject (CGPDFArrayRef array, uint index, CGPDFObjectRef* value);
+	bool CGPDFArrayGetNull (CGPDFArrayRef array, uint index);
+	bool CGPDFArrayGetBoolean (CGPDFArrayRef array, uint index, char* value);
+	bool CGPDFArrayGetInteger (CGPDFArrayRef array, uint index, CGPDFInteger* value);
+	bool CGPDFArrayGetNumber (CGPDFArrayRef array, uint index, CGPDFReal* value);
+	bool CGPDFArrayGetName (CGPDFArrayRef array, uint index, char** value);
+	bool CGPDFArrayGetString (CGPDFArrayRef array, uint index, CGPDFStringRef* value);
+	bool CGPDFArrayGetArray (CGPDFArrayRef array, uint index, CGPDFArrayRef* value);
+	bool CGPDFArrayGetDictionary (CGPDFArrayRef array, uint index, CGPDFDictionaryRef* value);
+	bool CGPDFArrayGetStream (CGPDFArrayRef array, uint index, CGPDFStreamRef* value);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFContentStream.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,28 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFContentStream;
+
+import dstep.corefoundation.CFArray;
+
+import dstep.applicationservices.coregraphics.CGPDFDictionary;
+import dstep.applicationservices.coregraphics.CGPDFObject;
+import dstep.applicationservices.coregraphics.CGPDFPage;
+import dstep.applicationservices.coregraphics.CGPDFStream;
+
+struct CGPDFContentStream;
+
+alias CGPDFContentStream* CGPDFContentStreamRef;
+
+extern (C)
+{
+	CGPDFContentStreamRef CGPDFContentStreamCreateWithPage (CGPDFPageRef page);
+	CGPDFContentStreamRef CGPDFContentStreamCreateWithStream (CGPDFStreamRef stream, CGPDFDictionaryRef streamResources, CGPDFContentStreamRef parent);
+	CGPDFContentStreamRef CGPDFContentStreamRetain (CGPDFContentStreamRef cs);
+	void CGPDFContentStreamRelease (CGPDFContentStreamRef cs);
+	CFArrayRef CGPDFContentStreamGetStreams (CGPDFContentStreamRef cs);
+	CGPDFObjectRef CGPDFContentStreamGetResource (CGPDFContentStreamRef cs, char* category, char* name);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFContext.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,58 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFContext;
+
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFDictionary;
+import dstep.corefoundation.CFURL;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGContext;
+import dstep.applicationservices.coregraphics.CGDataConsumer;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+extern (C)
+{
+	extern
+	{
+		const CFStringRef kCGPDFContextMediaBox;
+		const CFStringRef kCGPDFContextCropBox;
+		const CFStringRef kCGPDFContextBleedBox;
+		const CFStringRef kCGPDFContextTrimBox;
+		const CFStringRef kCGPDFContextArtBox;
+		const CFStringRef kCGPDFContextTitle;
+		const CFStringRef kCGPDFContextAuthor;
+		const CFStringRef kCGPDFContextSubject;
+		const CFStringRef kCGPDFContextKeywords;
+		const CFStringRef kCGPDFContextCreator;
+		const CFStringRef kCGPDFContextOwnerPassword;
+		const CFStringRef kCGPDFContextUserPassword;
+		const CFStringRef kCGPDFContextEncryptionKeyLength;
+		const CFStringRef kCGPDFContextAllowsPrinting;
+		const CFStringRef kCGPDFContextAllowsCopying;
+		const CFStringRef kCGPDFContextOutputIntent;
+		const CFStringRef kCGPDFXOutputIntentSubtype;
+		const CFStringRef kCGPDFXOutputConditionIdentifier;
+		const CFStringRef kCGPDFXOutputCondition;
+		const CFStringRef kCGPDFXRegistryName;
+		const CFStringRef kCGPDFXInfo;
+		const CFStringRef kCGPDFXDestinationOutputProfile;
+		const CFStringRef kCGPDFContextOutputIntents;
+	}
+}
+
+extern (C)
+{
+	CGContextRef CGPDFContextCreate (CGDataConsumerRef consumer, CGRect* mediaBox, CFDictionaryRef auxiliaryInfo);
+	CGContextRef CGPDFContextCreateWithURL (CFURLRef url, CGRect* mediaBox, CFDictionaryRef auxiliaryInfo);
+	void CGPDFContextClose (CGContextRef context);
+	void CGPDFContextBeginPage (CGContextRef context, CFDictionaryRef pageInfo);
+	void CGPDFContextEndPage (CGContextRef context);
+	void CGPDFContextSetURLForRect (CGContextRef context, CFURLRef url, CGRect rect);
+	void CGPDFContextAddDestinationAtPoint (CGContextRef context, CFStringRef name, CGPoint point);
+	void CGPDFContextSetDestinationForRect (CGContextRef context, CFStringRef name, CGRect rect);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFDictionary.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,36 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFDictionary;
+
+import dstep.applicationservices.coregraphics.CGPDFArray;
+import dstep.applicationservices.coregraphics.CGPDFObject;
+import dstep.applicationservices.coregraphics.CGPDFStream;
+import dstep.applicationservices.coregraphics.CGPDFString;
+
+struct CGPDFDictionary;
+
+alias CGPDFDictionary* CGPDFDictionaryRef;
+
+extern (C)
+{
+	alias void function (char*, CGPDFObjectRef, void*) CGPDFDictionaryApplierFunction;
+}
+
+extern (C)
+{
+	uint CGPDFDictionaryGetCount (CGPDFDictionaryRef dict);
+	bool CGPDFDictionaryGetObject (CGPDFDictionaryRef dict, char* key, CGPDFObjectRef* value);
+	bool CGPDFDictionaryGetBoolean (CGPDFDictionaryRef dict, char* key, char* value);
+	bool CGPDFDictionaryGetInteger (CGPDFDictionaryRef dict, char* key, CGPDFInteger* value);
+	bool CGPDFDictionaryGetNumber (CGPDFDictionaryRef dict, char* key, CGPDFReal* value);
+	bool CGPDFDictionaryGetName (CGPDFDictionaryRef dict, char* key, char** value);
+	bool CGPDFDictionaryGetString (CGPDFDictionaryRef dict, char* key, CGPDFStringRef* value);
+	bool CGPDFDictionaryGetArray (CGPDFDictionaryRef dict, char* key, CGPDFArrayRef* value);
+	bool CGPDFDictionaryGetDictionary (CGPDFDictionaryRef dict, char* key, CGPDFDictionaryRef* value);
+	bool CGPDFDictionaryGetStream (CGPDFDictionaryRef dict, char* key, CGPDFStreamRef* value);
+	void CGPDFDictionaryApplyFunction (CGPDFDictionaryRef dict, CGPDFDictionaryApplierFunction function_, void* info);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFDocument.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,44 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFDocument;
+
+import dstep.corefoundation.CFURL;
+import dstep.applicationservices.coregraphics.CGDataProvider;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.applicationservices.coregraphics.CGPDFArray;
+import dstep.applicationservices.coregraphics.CGPDFDictionary;
+import dstep.applicationservices.coregraphics.CGPDFPage;
+
+struct CGPDFDocument;
+
+alias CGPDFDocument* CGPDFDocumentRef;
+
+extern (C)
+{
+	CGPDFDocumentRef CGPDFDocumentCreateWithProvider (CGDataProviderRef provider);
+	CGPDFDocumentRef CGPDFDocumentCreateWithURL (CFURLRef url);
+	CGPDFDocumentRef CGPDFDocumentRetain (CGPDFDocumentRef document);
+	void CGPDFDocumentRelease (CGPDFDocumentRef document);
+	void CGPDFDocumentGetVersion (CGPDFDocumentRef document, int* majorVersion, int* minorVersion);
+	bool CGPDFDocumentIsEncrypted (CGPDFDocumentRef document);
+	bool CGPDFDocumentUnlockWithPassword (CGPDFDocumentRef document, char* password);
+	bool CGPDFDocumentIsUnlocked (CGPDFDocumentRef document);
+	bool CGPDFDocumentAllowsPrinting (CGPDFDocumentRef document);
+	bool CGPDFDocumentAllowsCopying (CGPDFDocumentRef document);
+	uint CGPDFDocumentGetNumberOfPages (CGPDFDocumentRef document);
+	CGPDFPageRef CGPDFDocumentGetPage (CGPDFDocumentRef document, uint pageNumber);
+	CGPDFDictionaryRef CGPDFDocumentGetCatalog (CGPDFDocumentRef document);
+	CGPDFDictionaryRef CGPDFDocumentGetInfo (CGPDFDocumentRef document);
+	CGPDFArrayRef CGPDFDocumentGetID (CGPDFDocumentRef document);
+	uint CGPDFDocumentGetTypeID ();
+	CGRect CGPDFDocumentGetMediaBox (CGPDFDocumentRef document, int page);
+	CGRect CGPDFDocumentGetCropBox (CGPDFDocumentRef document, int page);
+	CGRect CGPDFDocumentGetBleedBox (CGPDFDocumentRef document, int page);
+	CGRect CGPDFDocumentGetTrimBox (CGPDFDocumentRef document, int page);
+	CGRect CGPDFDocumentGetArtBox (CGPDFDocumentRef document, int page);
+	int CGPDFDocumentGetRotationAngle (CGPDFDocumentRef document, int page);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFObject.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,36 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFObject;
+
+import dstep.applicationservices.coregraphics.CGBase;
+
+union CGPDFObject;
+
+alias ubyte CGPDFBoolean;
+alias int CGPDFInteger;
+alias CGFloat CGPDFReal;
+alias CGPDFObject* CGPDFObjectRef;
+alias int CGPDFObjectType;
+
+enum /*CGPDFObjectType*/ 
+{
+	kCGPDFObjectTypeNull = 1,
+	kCGPDFObjectTypeBoolean,
+	kCGPDFObjectTypeInteger,
+	kCGPDFObjectTypeReal,
+	kCGPDFObjectTypeName,
+	kCGPDFObjectTypeString,
+	kCGPDFObjectTypeArray,
+	kCGPDFObjectTypeDictionary,
+	kCGPDFObjectTypeStream
+}
+
+extern (C)
+{
+	int CGPDFObjectGetType (CGPDFObjectRef object);
+	bool CGPDFObjectGetValue (CGPDFObjectRef object, int type, void* value);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFOperatorTable.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,26 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFOperatorTable;
+
+import dstep.applicationservices.coregraphics.CGPDFScanner;
+
+struct CGPDFOperatorTable;
+
+alias CGPDFOperatorTable* CGPDFOperatorTableRef;
+
+extern (C)
+{
+	alias void function (CGPDFScannerRef, void*) CGPDFOperatorCallback;
+}
+
+extern (C)
+{
+	CGPDFOperatorTableRef CGPDFOperatorTableCreate ();
+	CGPDFOperatorTableRef CGPDFOperatorTableRetain (CGPDFOperatorTableRef table);
+	void CGPDFOperatorTableRelease (CGPDFOperatorTableRef table);
+	void CGPDFOperatorTableSetCallback (CGPDFOperatorTableRef table, char* name, CGPDFOperatorCallback callback);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFPage.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,39 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFPage;
+
+import dstep.applicationservices.coregraphics.CGAffineTransform;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.applicationservices.coregraphics.CGPDFDictionary;
+import dstep.applicationservices.coregraphics.CGPDFDocument;
+
+struct CGPDFPage;
+
+alias CGPDFPage* CGPDFPageRef;
+alias int CGPDFBox;
+
+enum /*CGPDFBox*/ 
+{
+	kCGPDFMediaBox = 0,
+	kCGPDFCropBox = 1,
+	kCGPDFBleedBox = 2,
+	kCGPDFTrimBox = 3,
+	kCGPDFArtBox = 4
+}
+
+extern (C)
+{
+	CGPDFPageRef CGPDFPageRetain (CGPDFPageRef page);
+	void CGPDFPageRelease (CGPDFPageRef page);
+	CGPDFDocumentRef CGPDFPageGetDocument (CGPDFPageRef page);
+	uint CGPDFPageGetPageNumber (CGPDFPageRef page);
+	CGRect CGPDFPageGetBoxRect (CGPDFPageRef page, int box);
+	int CGPDFPageGetRotationAngle (CGPDFPageRef page);
+	CGAffineTransform CGPDFPageGetDrawingTransform (CGPDFPageRef page, int box, CGRect rect, int rotate, bool preserveAspectRatio);
+	CGPDFDictionaryRef CGPDFPageGetDictionary (CGPDFPageRef page);
+	uint CGPDFPageGetTypeID ();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFScanner.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,37 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFScanner;
+
+import dstep.applicationservices.coregraphics.CGPDFArray;
+import dstep.applicationservices.coregraphics.CGPDFContentStream;
+import dstep.applicationservices.coregraphics.CGPDFDictionary;
+import dstep.applicationservices.coregraphics.CGPDFObject;
+import dstep.applicationservices.coregraphics.CGPDFOperatorTable;
+import dstep.applicationservices.coregraphics.CGPDFStream;
+import dstep.applicationservices.coregraphics.CGPDFString;
+
+struct CGPDFScanner;
+
+alias CGPDFScanner* CGPDFScannerRef;
+
+extern (C)
+{
+	CGPDFScannerRef CGPDFScannerCreate (CGPDFContentStreamRef cs, CGPDFOperatorTableRef table, void* info);
+	CGPDFScannerRef CGPDFScannerRetain (CGPDFScannerRef scanner);
+	void CGPDFScannerRelease (CGPDFScannerRef scanner);
+	bool CGPDFScannerScan (CGPDFScannerRef scanner);
+	CGPDFContentStreamRef CGPDFScannerGetContentStream (CGPDFScannerRef scanner);
+	bool CGPDFScannerPopObject (CGPDFScannerRef scanner, CGPDFObjectRef* value);
+	bool CGPDFScannerPopBoolean (CGPDFScannerRef scanner, char* value);
+	bool CGPDFScannerPopInteger (CGPDFScannerRef scanner, CGPDFInteger* value);
+	bool CGPDFScannerPopNumber (CGPDFScannerRef scanner, CGPDFReal* value);
+	bool CGPDFScannerPopName (CGPDFScannerRef scanner, char** value);
+	bool CGPDFScannerPopString (CGPDFScannerRef scanner, CGPDFStringRef* value);
+	bool CGPDFScannerPopArray (CGPDFScannerRef scanner, CGPDFArrayRef* value);
+	bool CGPDFScannerPopDictionary (CGPDFScannerRef scanner, CGPDFDictionaryRef* value);
+	bool CGPDFScannerPopStream (CGPDFScannerRef scanner, CGPDFStreamRef* value);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFStream.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,29 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFStream;
+
+import dstep.corefoundation.CFData;
+import dstep.applicationservices.coregraphics.CGPDFDictionary;
+import dstep.applicationservices.coregraphics.CGPDFStream;
+
+struct CGPDFStream;
+
+alias CGPDFStream* CGPDFStreamRef;
+alias int CGPDFDataFormat;
+
+enum /*CGPDFDataFormat*/ 
+{
+	CGPDFDataFormatRaw,
+	CGPDFDataFormatJPEGEncoded,
+	CGPDFDataFormatJPEG2000
+}
+
+extern (C)
+{
+	CGPDFDictionaryRef CGPDFStreamGetDictionary (CGPDFStreamRef stream);
+	CFDataRef CGPDFStreamCopyData (CGPDFStreamRef stream, CGPDFDataFormat* format);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPDFString.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,24 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPDFString;
+
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFDate;
+import dstep.corefoundation.CFString;
+import dstep.applicationservices.coregraphics.CGBase;
+
+struct CGPDFString;
+
+alias CGPDFString* CGPDFStringRef;
+
+extern (C)
+{
+	uint CGPDFStringGetLength (CGPDFStringRef string);
+	char* CGPDFStringGetBytePtr (CGPDFStringRef string);
+	CFStringRef CGPDFStringCopyTextString (CGPDFStringRef string);
+	CFDateRef CGPDFStringCopyDate (CGPDFStringRef string);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPSConverter.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,50 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPSConverter;
+
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFDictionary;
+import dstep.corefoundation.CFString;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGDataConsumer;
+import dstep.applicationservices.coregraphics.CGDataProvider;
+
+struct CGPSConverter;
+
+alias CGPSConverter* CGPSConverterRef;
+
+extern (C)
+{
+	alias void function (void*, bool) CGPSConverterEndDocumentCallback;
+	alias void function (void*) CGPSConverterProgressCallback;
+	alias void function (void*, uint, CFDictionaryRef) CGPSConverterEndPageCallback;
+	alias void function (void*, uint, CFDictionaryRef) CGPSConverterBeginPageCallback;
+	alias void function (void*) CGPSConverterReleaseInfoCallback;
+	alias void function (void*, CFStringRef) CGPSConverterMessageCallback;
+	alias void function (void*) CGPSConverterBeginDocumentCallback;
+}
+
+struct CGPSConverterCallbacks
+{
+	uint version_;
+	CGPSConverterBeginDocumentCallback beginDocument;
+	CGPSConverterEndDocumentCallback endDocument;
+	CGPSConverterBeginPageCallback beginPage;
+	CGPSConverterEndPageCallback endPage;
+	CGPSConverterProgressCallback noteProgress;
+	CGPSConverterMessageCallback noteMessage;
+	CGPSConverterReleaseInfoCallback releaseInfo;
+}
+
+extern (C)
+{
+	CGPSConverterRef CGPSConverterCreate (void* info, CGPSConverterCallbacks* callbacks, CFDictionaryRef options);
+	bool CGPSConverterConvert (CGPSConverterRef converter, CGDataProviderRef provider, CGDataConsumerRef consumer, CFDictionaryRef options);
+	bool CGPSConverterAbort (CGPSConverterRef converter);
+	bool CGPSConverterIsConverting (CGPSConverterRef converter);
+	uint CGPSConverterGetTypeID ();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPath.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,67 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPath;
+
+import dstep.corefoundation.CFBase;
+import dstep.applicationservices.coregraphics.CGAffineTransform;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+struct CGPath;
+
+alias CGPath* CGMutablePathRef;
+alias CGPath* CGPathRef;
+alias int CGPathElementType;
+
+extern (C)
+{
+	alias void function (void*, CGPathElement*) CGPathApplierFunction;
+}
+
+enum /*CGPathElementType*/ 
+{
+	kCGPathElementMoveToPoint,
+	kCGPathElementAddLineToPoint,
+	kCGPathElementAddQuadCurveToPoint,
+	kCGPathElementAddCurveToPoint,
+	kCGPathElementCloseSubpath
+}
+
+struct CGPathElement
+{
+	int type;
+	CGPoint* points;
+}
+
+extern (C)
+{
+	uint CGPathGetTypeID ();
+	CGMutablePathRef CGPathCreateMutable ();
+	CGPathRef CGPathCreateCopy (CGPathRef path);
+	CGMutablePathRef CGPathCreateMutableCopy (CGPathRef path);
+	CGPathRef CGPathRetain (CGPathRef path);
+	void CGPathRelease (CGPathRef path);
+	bool CGPathEqualToPath (CGPathRef path1, CGPathRef path2);
+	void CGPathMoveToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat x, CGFloat y);
+	void CGPathAddLineToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat x, CGFloat y);
+	void CGPathAddQuadCurveToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat cpx, CGFloat cpy, CGFloat x, CGFloat y);
+	void CGPathAddCurveToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat cp1x, CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y);
+	void CGPathCloseSubpath (CGMutablePathRef path);
+	void CGPathAddRect (CGMutablePathRef path, CGAffineTransform* m, CGRect rect);
+	void CGPathAddRects (CGMutablePathRef path, CGAffineTransform* m, CGRect* rects, uint count);
+	void CGPathAddLines (CGMutablePathRef path, CGAffineTransform* m, CGPoint* points, uint count);
+	void CGPathAddEllipseInRect (CGMutablePathRef path, CGAffineTransform* m, CGRect rect);
+	void CGPathAddArc (CGMutablePathRef path, CGAffineTransform* m, CGFloat x, CGFloat y, CGFloat radius, CGFloat startAngle, CGFloat endAngle, bool clockwise);
+	void CGPathAddArcToPoint (CGMutablePathRef path, CGAffineTransform* m, CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat radius);
+	void CGPathAddPath (CGMutablePathRef path1, CGAffineTransform* m, CGPathRef path2);
+	bool CGPathIsEmpty (CGPathRef path);
+	bool CGPathIsRect (CGPathRef path, CGRect* rect);
+	CGPoint CGPathGetCurrentPoint (CGPathRef path);
+	CGRect CGPathGetBoundingBox (CGPathRef path);
+	bool CGPathContainsPoint (CGPathRef path, CGAffineTransform* m, CGPoint point, bool eoFill);
+	void CGPathApply (CGPathRef path, void* info, CGPathApplierFunction function_);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGPattern.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,46 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGPattern;
+
+import dstep.corefoundation.CFBase;
+import dstep.applicationservices.coregraphics.CGAffineTransform;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGContext;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+struct CGPattern;
+
+alias CGPattern* CGPatternRef;
+alias int CGPatternTiling;
+
+extern (C)
+{
+	alias void function (void*, CGContextRef) CGPatternDrawPatternCallback;
+	alias void function (void*) CGPatternReleaseInfoCallback;
+}
+
+enum /*CGPatternTiling*/ 
+{
+	kCGPatternTilingNoDistortion,
+	kCGPatternTilingConstantSpacingMinimalDistortion,
+	kCGPatternTilingConstantSpacing
+}
+
+struct CGPatternCallbacks
+{
+	uint version_;
+	CGPatternDrawPatternCallback drawPattern;
+	CGPatternReleaseInfoCallback releaseInfo;
+}
+
+extern (C)
+{
+	uint CGPatternGetTypeID ();
+	CGPatternRef CGPatternCreate (void* info, CGRect bounds, CGAffineTransform matrix, CGFloat xStep, CGFloat yStep, int tiling, bool isColored, CGPatternCallbacks* callbacks);
+	CGPatternRef CGPatternRetain (CGPatternRef pattern);
+	void CGPatternRelease (CGPatternRef pattern);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGRemoteOperation.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,78 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGRemoteOperation;
+
+import dstep.corefoundation.CFMachPort;
+
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGDirectDisplay;
+import dstep.applicationservices.coregraphics.CGError;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+struct _CGScreenUpdateMoveDelta;
+
+alias int CGEventErr;
+alias uint CGRectCount;
+alias uint CGScreenUpdateOperation;
+alias _CGScreenUpdateMoveDelta CGScreenUpdateMoveDelta;
+alias uint CGButtonCount;
+alias uint CGWheelCount;
+alias ushort CGCharCode;
+alias ushort CGKeyCode;
+alias uint CGEventFilterMask;
+alias uint CGEventSuppressionState;
+
+extern (C)
+{
+	alias void function (CGScreenUpdateMoveDelta, uint, CGRect*, void*) CGScreenUpdateMoveCallback;
+	alias void function (uint, CGRect*, void*) CGScreenRefreshCallback;
+}
+
+enum _CGScreenUpdateOperation
+
+{
+	kCGScreenUpdateOperationRefresh = 0,
+	kCGScreenUpdateOperationMove = (1 << 0),
+	kCGScreenUpdateOperationReducedDirtyRectangleCount = (1 << 31)
+}
+
+enum
+{
+	kCGEventFilterMaskPermitLocalMouseEvents = 0x00000001,
+	kCGEventFilterMaskPermitLocalKeyboardEvents = 0x00000002,
+	kCGEventFilterMaskPermitSystemDefinedEvents = 0x00000004
+}
+
+enum
+{
+	kCGEventSuppressionStateSuppressionInterval = 0,
+	kCGEventSuppressionStateRemoteMouseDrag,
+	kCGNumberOfEventSuppressionStates
+}
+
+extern (C)
+{
+	int CGRegisterScreenRefreshCallback (CGScreenRefreshCallback function_, void* userParameter);
+	void CGUnregisterScreenRefreshCallback (CGScreenRefreshCallback function_, void* userParameter);
+	int CGWaitForScreenRefreshRects (CGRect** pRectArray, CGRectCount* pCount);
+	int CGScreenRegisterMoveCallback (CGScreenUpdateMoveCallback function_, void* userParameter);
+	void CGScreenUnregisterMoveCallback (CGScreenUpdateMoveCallback function_, void* userParameter);
+	int CGWaitForScreenUpdateRects (uint requestedOperations, CGScreenUpdateOperation* currentOperation, CGRect** pRectArray, size_t* pCount, CGScreenUpdateMoveDelta* pDelta);
+	void CGReleaseScreenRefreshRects (CGRect* rectArray);
+	int CGCursorIsVisible ();
+	int CGCursorIsDrawnInFramebuffer ();
+	int CGPostMouseEvent (CGPoint mouseCursorPosition, int updateMouseCursorPosition, uint buttonCount, int mouseButtonDown, ...);
+	int CGPostScrollWheelEvent (uint wheelCount, int wheel1, ...);
+	int CGPostKeyboardEvent (ushort keyChar, ushort virtualKey, int keyDown);
+	int CGWarpMouseCursorPosition (CGPoint newCursorPosition);
+	int CGInhibitLocalEvents (int doInhibit);
+	int CGSetLocalEventsSuppressionInterval (double seconds);
+	int CGEnableEventStateCombining (int doCombineState);
+	int CGSetLocalEventsFilterDuringSuppressionState (uint filter, uint state);
+	int CGAssociateMouseAndMouseCursorPosition (int connected);
+	CFMachPortRef CGWindowServerCFMachPort ();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGSession.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,14 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGSession;
+
+import dstep.corefoundation.CFDictionary;
+
+extern (C)
+{
+	CFDictionaryRef CGSessionCopyCurrentDictionary ();
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGShading.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,26 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGShading;
+
+import dstep.corefoundation.CFBase;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGFunction;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+struct CGShading;
+
+alias CGShading* CGShadingRef;
+
+extern (C)
+{
+	uint CGShadingGetTypeID ();
+	CGShadingRef CGShadingCreateAxial (CGColorSpaceRef colorspace, CGPoint start, CGPoint end, CGFunctionRef function_, bool extendStart, bool extendEnd);
+	CGShadingRef CGShadingCreateRadial (CGColorSpaceRef colorspace, CGPoint start, CGFloat startRadius, CGPoint end, CGFloat endRadius, CGFunctionRef function_, bool extendStart, bool extendEnd);
+	CGShadingRef CGShadingRetain (CGShadingRef shading);
+	void CGShadingRelease (CGShadingRef shading);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGWindow.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,81 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGWindow;
+
+import dstep.corefoundation.CFArray;
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFDictionary;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGImage;
+import dstep.applicationservices.coregraphics.CGGeometry;
+
+alias uint CGWindowID;
+alias uint CGWindowListOption;
+alias uint CGWindowImageOption;
+alias uint CGWindowSharingType;
+alias uint CGWindowBackingType;
+
+extern (C)
+{
+	extern
+	{
+		const CFStringRef kCGWindowNumber;
+		const CFStringRef kCGWindowStoreType;
+		const CFStringRef kCGWindowLayer;
+		const CFStringRef kCGWindowBounds;
+		const CFStringRef kCGWindowSharingState;
+		const CFStringRef kCGWindowAlpha;
+		const CFStringRef kCGWindowOwnerPID;
+		const CFStringRef kCGWindowMemoryUsage;
+		const CFStringRef kCGWindowWorkspace;
+		const CFStringRef kCGWindowOwnerName;
+		const CFStringRef kCGWindowName;
+		const CFStringRef kCGWindowIsOnscreen;
+		const CFStringRef kCGWindowBackingLocationVideoMemory;
+	}
+}
+
+enum
+{
+	kCGWindowSharingNone = 0,
+	kCGWindowSharingReadOnly = 1,
+	kCGWindowSharingReadWrite = 2
+}
+
+enum
+{
+	kCGBackingStoreRetained = 0,
+	kCGBackingStoreNonretained = 1,
+	kCGBackingStoreBuffered = 2
+}
+
+enum
+{
+	kCGWindowListOptionAll = 0,
+	kCGWindowListOptionOnScreenOnly = (1 << 0),
+	kCGWindowListOptionOnScreenAboveWindow = (1 << 1),
+	kCGWindowListOptionOnScreenBelowWindow = (1 << 2),
+	kCGWindowListOptionIncludingWindow = (1 << 3),
+	kCGWindowListExcludeDesktopElements = (1 << 4)
+}
+
+enum
+{
+	kCGWindowImageDefault = 0,
+	kCGWindowImageBoundsIgnoreFraming = (1 << 0),
+	kCGWindowImageShouldBeOpaque = (1 << 1),
+	kCGWindowImageOnlyShadows = (1 << 2)
+}
+
+extern (C)
+{
+	CFArrayRef CGWindowListCopyWindowInfo (uint option, uint relativeToWindow);
+	CFArrayRef CGWindowListCreate (uint option, uint relativeToWindow);
+	CFArrayRef CGWindowListCreateDescriptionFromArray (CFArrayRef windowArray);
+	CGImageRef CGWindowListCreateImage (CGRect screenBounds, uint windowOption, uint windowID, uint imageOption);
+	CGImageRef CGWindowListCreateImageFromArray (CGRect screenBounds, CFArrayRef windowArray, uint imageOption);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGWindowLevel.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,41 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGWindowLevel;
+
+alias int CGWindowLevel;
+alias int CGWindowLevelKey;
+
+enum _CGCommonWindowLevelKey 
+{
+	kCGBaseWindowLevelKey = 0,
+	kCGMinimumWindowLevelKey,
+	kCGDesktopWindowLevelKey,
+	kCGBackstopMenuLevelKey,
+	kCGNormalWindowLevelKey,
+	kCGFloatingWindowLevelKey,
+	kCGTornOffMenuWindowLevelKey,
+	kCGDockWindowLevelKey,
+	kCGMainMenuWindowLevelKey,
+	kCGStatusWindowLevelKey,
+	kCGModalPanelWindowLevelKey,
+	kCGPopUpMenuWindowLevelKey,
+	kCGDraggingWindowLevelKey,
+	kCGScreenSaverWindowLevelKey,
+	kCGMaximumWindowLevelKey,
+	kCGOverlayWindowLevelKey,
+	kCGHelpWindowLevelKey,
+	kCGUtilityWindowLevelKey,
+	kCGDesktopIconWindowLevelKey,
+	kCGCursorWindowLevelKey,
+	kCGAssistiveTechHighWindowLevelKey,
+	kCGNumberOfWindowLevelKeys
+}
+
+extern (C)
+{
+	int CGWindowLevelForKey (int key);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CoreGraphics.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,53 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CoreGraphics;
+
+public:
+
+import dstep.applicationservices.coregraphics.CGAffineTransform;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGBitmapContext;
+import dstep.applicationservices.coregraphics.CGColor;
+import dstep.applicationservices.coregraphics.CGColorSpace;
+import dstep.applicationservices.coregraphics.CGContext;
+import dstep.applicationservices.coregraphics.CGDataConsumer;
+import dstep.applicationservices.coregraphics.CGDataProvider;
+import dstep.applicationservices.coregraphics.CGDirectDisplay;
+import dstep.applicationservices.coregraphics.CGDirectPalette;
+import dstep.applicationservices.coregraphics.CGDisplayConfiguration;
+import dstep.applicationservices.coregraphics.CGDisplayFade;
+import dstep.applicationservices.coregraphics.CGError;
+import dstep.applicationservices.coregraphics.CGEvent;
+import dstep.applicationservices.coregraphics.CGEventSource;
+import dstep.applicationservices.coregraphics.CGEventTypes;
+import dstep.applicationservices.coregraphics.CGFont;
+import dstep.applicationservices.coregraphics.CGFunction;
+import dstep.applicationservices.coregraphics.CGGLContext;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.applicationservices.coregraphics.CGGradient;
+import dstep.applicationservices.coregraphics.CGImage;
+import dstep.applicationservices.coregraphics.CGLayer;
+import dstep.applicationservices.coregraphics.CGPDFArray;
+import dstep.applicationservices.coregraphics.CGPDFContentStream;
+import dstep.applicationservices.coregraphics.CGPDFContext;
+import dstep.applicationservices.coregraphics.CGPDFDictionary;
+import dstep.applicationservices.coregraphics.CGPDFDocument;
+import dstep.applicationservices.coregraphics.CGPDFObject;
+import dstep.applicationservices.coregraphics.CGPDFOperatorTable;
+import dstep.applicationservices.coregraphics.CGPDFPage;
+import dstep.applicationservices.coregraphics.CGPDFScanner;
+import dstep.applicationservices.coregraphics.CGPDFStream;
+import dstep.applicationservices.coregraphics.CGPDFString;
+import dstep.applicationservices.coregraphics.CGPSConverter;
+import dstep.applicationservices.coregraphics.CGPath;
+import dstep.applicationservices.coregraphics.CGPattern;
+import dstep.applicationservices.coregraphics.CGRemoteOperation;
+import dstep.applicationservices.coregraphics.CGSession;
+import dstep.applicationservices.coregraphics.CGShading;
+import dstep.applicationservices.coregraphics.CGWindow;
+import dstep.applicationservices.coregraphics.CGWindowLevel;
+