Mercurial > projects > dstep
view dstep/applicationservices/coregraphics/CGDirectPalette.d @ 12:9f0b49a2f64e
Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 03 Aug 2009 14:00:21 +0200 |
parents | |
children |
line wrap: on
line source
/** * 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); }