Mercurial > projects > dstep
comparison dstep/quartzcore/CIRAWFilter.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Sep 24, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.quartzcore.CIRAWFilter; | |
8 | |
9 import dstep.foundation.NSData; | |
10 import dstep.foundation.NSDictionary; | |
11 import dstep.foundation.NSString; | |
12 import dstep.foundation.NSURL; | |
13 import dstep.objc.bridge.Bridge; | |
14 import dstep.objc.objc; | |
15 | |
16 import bindings = dstep.quartzcore.CIRAWFilter_bindings; | |
17 | |
18 private | |
19 { | |
20 NSString kCIInputDecoderVersionKey_; | |
21 NSString kCISupportedDecoderVersionsKey_; | |
22 NSString kCIInputBoostKey_; | |
23 NSString kCIInputNeutralChromaticityXKey_; | |
24 NSString kCIInputNeutralChromaticityYKey_; | |
25 NSString kCIInputNeutralTemperatureKey_; | |
26 NSString kCIInputNeutralTintKey_; | |
27 NSString kCIInputNeutralLocationKey_; | |
28 NSString kCIInputScaleFactorKey_; | |
29 NSString kCIInputAllowDraftModeKey_; | |
30 NSString kCIInputIgnoreImageOrientationKey_; | |
31 NSString kCIInputImageOrientationKey_; | |
32 NSString kCIInputEnableSharpeningKey_; | |
33 NSString kCIInputEnableChromaticNoiseTrackingKey_; | |
34 NSString kCIInputBoostShadowAmountKey_; | |
35 NSString kCIInputBiasKey_; | |
36 } | |
37 | |
38 NSString kCIInputDecoderVersionKey () | |
39 { | |
40 if (kCIInputDecoderVersionKey_) | |
41 return kCIInputDecoderVersionKey_; | |
42 | |
43 return kCIInputDecoderVersionKey_ = new NSString(bindings.kCIInputDecoderVersionKey); | |
44 } | |
45 | |
46 NSString kCISupportedDecoderVersionsKey () | |
47 { | |
48 if (kCISupportedDecoderVersionsKey_) | |
49 return kCISupportedDecoderVersionsKey_; | |
50 | |
51 return kCISupportedDecoderVersionsKey_ = new NSString(bindings.kCISupportedDecoderVersionsKey); | |
52 } | |
53 | |
54 NSString kCIInputBoostKey () | |
55 { | |
56 if (kCIInputBoostKey_) | |
57 return kCIInputBoostKey_; | |
58 | |
59 return kCIInputBoostKey_ = new NSString(bindings.kCIInputBoostKey); | |
60 } | |
61 | |
62 NSString kCIInputNeutralChromaticityXKey () | |
63 { | |
64 if (kCIInputNeutralChromaticityXKey_) | |
65 return kCIInputNeutralChromaticityXKey_; | |
66 | |
67 return kCIInputNeutralChromaticityXKey_ = new NSString(bindings.kCIInputNeutralChromaticityXKey); | |
68 } | |
69 | |
70 NSString kCIInputNeutralChromaticityYKey () | |
71 { | |
72 if (kCIInputNeutralChromaticityYKey_) | |
73 return kCIInputNeutralChromaticityYKey_; | |
74 | |
75 return kCIInputNeutralChromaticityYKey_ = new NSString(bindings.kCIInputNeutralChromaticityYKey); | |
76 } | |
77 | |
78 NSString kCIInputNeutralTemperatureKey () | |
79 { | |
80 if (kCIInputNeutralTemperatureKey_) | |
81 return kCIInputNeutralTemperatureKey_; | |
82 | |
83 return kCIInputNeutralTemperatureKey_ = new NSString(bindings.kCIInputNeutralTemperatureKey); | |
84 } | |
85 | |
86 NSString kCIInputNeutralTintKey () | |
87 { | |
88 if (kCIInputNeutralTintKey_) | |
89 return kCIInputNeutralTintKey_; | |
90 | |
91 return kCIInputNeutralTintKey_ = new NSString(bindings.kCIInputNeutralTintKey); | |
92 } | |
93 | |
94 NSString kCIInputNeutralLocationKey () | |
95 { | |
96 if (kCIInputNeutralLocationKey_) | |
97 return kCIInputNeutralLocationKey_; | |
98 | |
99 return kCIInputNeutralLocationKey_ = new NSString(bindings.kCIInputNeutralLocationKey); | |
100 } | |
101 | |
102 NSString kCIInputScaleFactorKey () | |
103 { | |
104 if (kCIInputScaleFactorKey_) | |
105 return kCIInputScaleFactorKey_; | |
106 | |
107 return kCIInputScaleFactorKey_ = new NSString(bindings.kCIInputScaleFactorKey); | |
108 } | |
109 | |
110 NSString kCIInputAllowDraftModeKey () | |
111 { | |
112 if (kCIInputAllowDraftModeKey_) | |
113 return kCIInputAllowDraftModeKey_; | |
114 | |
115 return kCIInputAllowDraftModeKey_ = new NSString(bindings.kCIInputAllowDraftModeKey); | |
116 } | |
117 | |
118 NSString kCIInputIgnoreImageOrientationKey () | |
119 { | |
120 if (kCIInputIgnoreImageOrientationKey_) | |
121 return kCIInputIgnoreImageOrientationKey_; | |
122 | |
123 return kCIInputIgnoreImageOrientationKey_ = new NSString(bindings.kCIInputIgnoreImageOrientationKey); | |
124 } | |
125 | |
126 NSString kCIInputImageOrientationKey () | |
127 { | |
128 if (kCIInputImageOrientationKey_) | |
129 return kCIInputImageOrientationKey_; | |
130 | |
131 return kCIInputImageOrientationKey_ = new NSString(bindings.kCIInputImageOrientationKey); | |
132 } | |
133 | |
134 NSString kCIInputEnableSharpeningKey () | |
135 { | |
136 if (kCIInputEnableSharpeningKey_) | |
137 return kCIInputEnableSharpeningKey_; | |
138 | |
139 return kCIInputEnableSharpeningKey_ = new NSString(bindings.kCIInputEnableSharpeningKey); | |
140 } | |
141 | |
142 NSString kCIInputEnableChromaticNoiseTrackingKey () | |
143 { | |
144 if (kCIInputEnableChromaticNoiseTrackingKey_) | |
145 return kCIInputEnableChromaticNoiseTrackingKey_; | |
146 | |
147 return kCIInputEnableChromaticNoiseTrackingKey_ = new NSString(bindings.kCIInputEnableChromaticNoiseTrackingKey); | |
148 } | |
149 | |
150 NSString kCIInputBoostShadowAmountKey () | |
151 { | |
152 if (kCIInputBoostShadowAmountKey_) | |
153 return kCIInputBoostShadowAmountKey_; | |
154 | |
155 return kCIInputBoostShadowAmountKey_ = new NSString(bindings.kCIInputBoostShadowAmountKey); | |
156 } | |
157 | |
158 NSString kCIInputBiasKey () | |
159 { | |
160 if (kCIInputBiasKey_) | |
161 return kCIInputBiasKey_; | |
162 | |
163 return kCIInputBiasKey_ = new NSString(bindings.kCIInputBiasKey); | |
164 } | |
165 | |
166 const TCIRAWFilter = ` | |
167 | |
168 static CIFilter filterWithImageURL (NSURL url, NSDictionary options) | |
169 { | |
170 return invokeObjcSelfClass!(CIFilter, "filterWithImageURL:options:", NSURL, NSDictionary)(url, options); | |
171 } | |
172 | |
173 static CIFilter filterWithImageData (NSData data, NSDictionary options) | |
174 { | |
175 return invokeObjcSelfClass!(CIFilter, "filterWithImageData:options:", NSData, NSDictionary)(data, options); | |
176 } | |
177 | |
178 //mixin ObjcBindClassMethod!(filterWithImageURL, "filterWithImageURL:options:"); | |
179 //mixin ObjcBindClassMethod!(filterWithImageData, "filterWithImageData:options:"); | |
180 | |
181 `; | |
182 |