Mercurial > projects > dstep
comparison 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 |
comparison
equal
deleted
inserted
replaced
11:07194b026fa4 | 12:9f0b49a2f64e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Aug 1, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.applicationservices.coregraphics.CGDirectPalette; | |
8 | |
9 import dstep.applicationservices.coregraphics.CGDirectDisplay; | |
10 | |
11 alias float CGPaletteBlendFraction; | |
12 alias _CGDeviceColor CGDeviceColor; | |
13 alias _CGDeviceByteColor CGDeviceByteColor; | |
14 | |
15 struct _CGDeviceColor | |
16 { | |
17 float red; | |
18 float green; | |
19 float blue; | |
20 } | |
21 | |
22 | |
23 struct _CGDeviceByteColor | |
24 { | |
25 ubyte red; | |
26 ubyte green; | |
27 ubyte blue; | |
28 } | |
29 | |
30 extern (C) | |
31 { | |
32 CGDirectPaletteRef CGPaletteCreateDefaultColorPalette (); | |
33 CGDirectPaletteRef CGPaletteCreateWithDisplay (uint display); | |
34 CGDirectPaletteRef CGPaletteCreateWithCapacity (uint capacity); | |
35 CGDirectPaletteRef CGPaletteCreateWithSamples (CGDeviceColor* sampleTable, uint sampleCount); | |
36 CGDirectPaletteRef CGPaletteCreateWithByteSamples (CGDeviceByteColor* sampleTable, uint sampleCount); | |
37 void CGPaletteRelease (CGDirectPaletteRef palette); | |
38 CGDeviceColor CGPaletteGetColorAtIndex (CGDirectPaletteRef palette, uint index); | |
39 uint CGPaletteGetIndexForColor (CGDirectPaletteRef palette, CGDeviceColor color); | |
40 uint CGPaletteGetNumberOfSamples (CGDirectPaletteRef palette); | |
41 void CGPaletteSetColorAtIndex (CGDirectPaletteRef palette, CGDeviceColor color, uint index); | |
42 CGDirectPaletteRef CGPaletteCreateCopy (CGDirectPaletteRef palette); | |
43 ubyte CGPaletteIsEqualToPalette (CGDirectPaletteRef palette1, CGDirectPaletteRef palette2); | |
44 CGDirectPaletteRef CGPaletteCreateFromPaletteBlendedWithColor (CGDirectPaletteRef palette, float fraction, CGDeviceColor color); | |
45 } |