Mercurial > projects > dstep
comparison dstep/quartzcore/CIFilter.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 | b9de51448c6b |
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.CIFilter; | |
8 | |
9 import dstep.foundation.NSArray; | |
10 import dstep.foundation.NSCoder; | |
11 import dstep.foundation.NSData; | |
12 import dstep.foundation.NSDictionary; | |
13 import dstep.foundation.NSObject; | |
14 import dstep.foundation.NSString; | |
15 import dstep.foundation.NSURL; | |
16 import dstep.foundation.NSZone; | |
17 import dstep.objc.bridge.Bridge; | |
18 import dstep.objc.objc; | |
19 import dstep.quartzcore.CACIFilterAdditions; | |
20 import dstep.quartzcore.CIImage; | |
21 import dstep.quartzcore.CIKernel; | |
22 import dstep.quartzcore.CIRAWFilter; | |
23 | |
24 import bindings = dstep.quartzcore.CIFilter_bindings; | |
25 | |
26 private | |
27 { | |
28 NSString kCIAttributeFilterName_; | |
29 NSString kCIAttributeFilterDisplayName_; | |
30 NSString kCIAttributeDescription_; | |
31 NSString kCIAttributeReferenceDocumentation_; | |
32 NSString kCIAttributeFilterCategories_; | |
33 NSString kCIAttributeClass_; | |
34 NSString kCIAttributeType_; | |
35 NSString kCIAttributeMin_; | |
36 NSString kCIAttributeMax_; | |
37 NSString kCIAttributeSliderMin_; | |
38 NSString kCIAttributeSliderMax_; | |
39 NSString kCIAttributeDefault_; | |
40 NSString kCIAttributeIdentity_; | |
41 NSString kCIAttributeName_; | |
42 NSString kCIAttributeDisplayName_; | |
43 NSString kCIUIParameterSet_; | |
44 NSString kCIUISetBasic_; | |
45 NSString kCIUISetIntermediate_; | |
46 NSString kCIUISetAdvanced_; | |
47 NSString kCIUISetDevelopment_; | |
48 NSString kCIAttributeTypeTime_; | |
49 NSString kCIAttributeTypeScalar_; | |
50 NSString kCIAttributeTypeDistance_; | |
51 NSString kCIAttributeTypeAngle_; | |
52 NSString kCIAttributeTypeBoolean_; | |
53 NSString kCIAttributeTypeInteger_; | |
54 NSString kCIAttributeTypeCount_; | |
55 NSString kCIAttributeTypePosition_; | |
56 NSString kCIAttributeTypeOffset_; | |
57 NSString kCIAttributeTypePosition3_; | |
58 NSString kCIAttributeTypeRectangle_; | |
59 NSString kCIAttributeTypeOpaqueColor_; | |
60 NSString kCIAttributeTypeGradient_; | |
61 NSString kCICategoryDistortionEffect_; | |
62 NSString kCICategoryGeometryAdjustment_; | |
63 NSString kCICategoryCompositeOperation_; | |
64 NSString kCICategoryHalftoneEffect_; | |
65 NSString kCICategoryColorAdjustment_; | |
66 NSString kCICategoryColorEffect_; | |
67 NSString kCICategoryTransition_; | |
68 NSString kCICategoryTileEffect_; | |
69 NSString kCICategoryGenerator_; | |
70 NSString kCICategoryReduction_; | |
71 NSString kCICategoryGradient_; | |
72 NSString kCICategoryStylize_; | |
73 NSString kCICategorySharpen_; | |
74 NSString kCICategoryBlur_; | |
75 NSString kCICategoryVideo_; | |
76 NSString kCICategoryStillImage_; | |
77 NSString kCICategoryInterlaced_; | |
78 NSString kCICategoryNonSquarePixels_; | |
79 NSString kCICategoryHighDynamicRange_; | |
80 NSString kCICategoryBuiltIn_; | |
81 NSString kCICategoryFilterGenerator_; | |
82 NSString kCIApplyOptionExtent_; | |
83 NSString kCIApplyOptionDefinition_; | |
84 NSString kCIApplyOptionUserInfo_; | |
85 NSString kCIOutputImageKey_; | |
86 NSString kCIInputBackgroundImageKey_; | |
87 NSString kCIInputImageKey_; | |
88 NSString kCIInputTimeKey_; | |
89 NSString kCIInputTransformKey_; | |
90 NSString kCIInputScaleKey_; | |
91 NSString kCIInputAspectRatioKey_; | |
92 NSString kCIInputCenterKey_; | |
93 NSString kCIInputRadiusKey_; | |
94 NSString kCIInputAngleKey_; | |
95 NSString kCIInputRefractionKey_; | |
96 NSString kCIInputWidthKey_; | |
97 NSString kCIInputSharpnessKey_; | |
98 NSString kCIInputIntensityKey_; | |
99 NSString kCIInputEVKey_; | |
100 NSString kCIInputSaturationKey_; | |
101 NSString kCIInputColorKey_; | |
102 NSString kCIInputBrightnessKey_; | |
103 NSString kCIInputContrastKey_; | |
104 NSString kCIInputGradientImageKey_; | |
105 NSString kCIInputMaskImageKey_; | |
106 NSString kCIInputShadingImageKey_; | |
107 NSString kCIInputTargetImageKey_; | |
108 NSString kCIInputExtentKey_; | |
109 } | |
110 | |
111 NSString kCIAttributeFilterName () | |
112 { | |
113 if (kCIAttributeFilterName_) | |
114 return kCIAttributeFilterName_; | |
115 | |
116 return kCIAttributeFilterName_ = new NSString(bindings.kCIAttributeFilterName); | |
117 } | |
118 | |
119 NSString kCIAttributeFilterDisplayName () | |
120 { | |
121 if (kCIAttributeFilterDisplayName_) | |
122 return kCIAttributeFilterDisplayName_; | |
123 | |
124 return kCIAttributeFilterDisplayName_ = new NSString(bindings.kCIAttributeFilterDisplayName); | |
125 } | |
126 | |
127 NSString kCIAttributeDescription () | |
128 { | |
129 if (kCIAttributeDescription_) | |
130 return kCIAttributeDescription_; | |
131 | |
132 return kCIAttributeDescription_ = new NSString(bindings.kCIAttributeDescription); | |
133 } | |
134 | |
135 NSString kCIAttributeReferenceDocumentation () | |
136 { | |
137 if (kCIAttributeReferenceDocumentation_) | |
138 return kCIAttributeReferenceDocumentation_; | |
139 | |
140 return kCIAttributeReferenceDocumentation_ = new NSString(bindings.kCIAttributeReferenceDocumentation); | |
141 } | |
142 | |
143 NSString kCIAttributeFilterCategories () | |
144 { | |
145 if (kCIAttributeFilterCategories_) | |
146 return kCIAttributeFilterCategories_; | |
147 | |
148 return kCIAttributeFilterCategories_ = new NSString(bindings.kCIAttributeFilterCategories); | |
149 } | |
150 | |
151 NSString kCIAttributeClass () | |
152 { | |
153 if (kCIAttributeClass_) | |
154 return kCIAttributeClass_; | |
155 | |
156 return kCIAttributeClass_ = new NSString(bindings.kCIAttributeClass); | |
157 } | |
158 | |
159 NSString kCIAttributeType () | |
160 { | |
161 if (kCIAttributeType_) | |
162 return kCIAttributeType_; | |
163 | |
164 return kCIAttributeType_ = new NSString(bindings.kCIAttributeType); | |
165 } | |
166 | |
167 NSString kCIAttributeMin () | |
168 { | |
169 if (kCIAttributeMin_) | |
170 return kCIAttributeMin_; | |
171 | |
172 return kCIAttributeMin_ = new NSString(bindings.kCIAttributeMin); | |
173 } | |
174 | |
175 NSString kCIAttributeMax () | |
176 { | |
177 if (kCIAttributeMax_) | |
178 return kCIAttributeMax_; | |
179 | |
180 return kCIAttributeMax_ = new NSString(bindings.kCIAttributeMax); | |
181 } | |
182 | |
183 NSString kCIAttributeSliderMin () | |
184 { | |
185 if (kCIAttributeSliderMin_) | |
186 return kCIAttributeSliderMin_; | |
187 | |
188 return kCIAttributeSliderMin_ = new NSString(bindings.kCIAttributeSliderMin); | |
189 } | |
190 | |
191 NSString kCIAttributeSliderMax () | |
192 { | |
193 if (kCIAttributeSliderMax_) | |
194 return kCIAttributeSliderMax_; | |
195 | |
196 return kCIAttributeSliderMax_ = new NSString(bindings.kCIAttributeSliderMax); | |
197 } | |
198 | |
199 NSString kCIAttributeDefault () | |
200 { | |
201 if (kCIAttributeDefault_) | |
202 return kCIAttributeDefault_; | |
203 | |
204 return kCIAttributeDefault_ = new NSString(bindings.kCIAttributeDefault); | |
205 } | |
206 | |
207 NSString kCIAttributeIdentity () | |
208 { | |
209 if (kCIAttributeIdentity_) | |
210 return kCIAttributeIdentity_; | |
211 | |
212 return kCIAttributeIdentity_ = new NSString(bindings.kCIAttributeIdentity); | |
213 } | |
214 | |
215 NSString kCIAttributeName () | |
216 { | |
217 if (kCIAttributeName_) | |
218 return kCIAttributeName_; | |
219 | |
220 return kCIAttributeName_ = new NSString(bindings.kCIAttributeName); | |
221 } | |
222 | |
223 NSString kCIAttributeDisplayName () | |
224 { | |
225 if (kCIAttributeDisplayName_) | |
226 return kCIAttributeDisplayName_; | |
227 | |
228 return kCIAttributeDisplayName_ = new NSString(bindings.kCIAttributeDisplayName); | |
229 } | |
230 | |
231 NSString kCIUIParameterSet () | |
232 { | |
233 if (kCIUIParameterSet_) | |
234 return kCIUIParameterSet_; | |
235 | |
236 return kCIUIParameterSet_ = new NSString(bindings.kCIUIParameterSet); | |
237 } | |
238 | |
239 NSString kCIUISetBasic () | |
240 { | |
241 if (kCIUISetBasic_) | |
242 return kCIUISetBasic_; | |
243 | |
244 return kCIUISetBasic_ = new NSString(bindings.kCIUISetBasic); | |
245 } | |
246 | |
247 NSString kCIUISetIntermediate () | |
248 { | |
249 if (kCIUISetIntermediate_) | |
250 return kCIUISetIntermediate_; | |
251 | |
252 return kCIUISetIntermediate_ = new NSString(bindings.kCIUISetIntermediate); | |
253 } | |
254 | |
255 NSString kCIUISetAdvanced () | |
256 { | |
257 if (kCIUISetAdvanced_) | |
258 return kCIUISetAdvanced_; | |
259 | |
260 return kCIUISetAdvanced_ = new NSString(bindings.kCIUISetAdvanced); | |
261 } | |
262 | |
263 NSString kCIUISetDevelopment () | |
264 { | |
265 if (kCIUISetDevelopment_) | |
266 return kCIUISetDevelopment_; | |
267 | |
268 return kCIUISetDevelopment_ = new NSString(bindings.kCIUISetDevelopment); | |
269 } | |
270 | |
271 NSString kCIAttributeTypeTime () | |
272 { | |
273 if (kCIAttributeTypeTime_) | |
274 return kCIAttributeTypeTime_; | |
275 | |
276 return kCIAttributeTypeTime_ = new NSString(bindings.kCIAttributeTypeTime); | |
277 } | |
278 | |
279 NSString kCIAttributeTypeScalar () | |
280 { | |
281 if (kCIAttributeTypeScalar_) | |
282 return kCIAttributeTypeScalar_; | |
283 | |
284 return kCIAttributeTypeScalar_ = new NSString(bindings.kCIAttributeTypeScalar); | |
285 } | |
286 | |
287 NSString kCIAttributeTypeDistance () | |
288 { | |
289 if (kCIAttributeTypeDistance_) | |
290 return kCIAttributeTypeDistance_; | |
291 | |
292 return kCIAttributeTypeDistance_ = new NSString(bindings.kCIAttributeTypeDistance); | |
293 } | |
294 | |
295 NSString kCIAttributeTypeAngle () | |
296 { | |
297 if (kCIAttributeTypeAngle_) | |
298 return kCIAttributeTypeAngle_; | |
299 | |
300 return kCIAttributeTypeAngle_ = new NSString(bindings.kCIAttributeTypeAngle); | |
301 } | |
302 | |
303 NSString kCIAttributeTypeBoolean () | |
304 { | |
305 if (kCIAttributeTypeBoolean_) | |
306 return kCIAttributeTypeBoolean_; | |
307 | |
308 return kCIAttributeTypeBoolean_ = new NSString(bindings.kCIAttributeTypeBoolean); | |
309 } | |
310 | |
311 NSString kCIAttributeTypeInteger () | |
312 { | |
313 if (kCIAttributeTypeInteger_) | |
314 return kCIAttributeTypeInteger_; | |
315 | |
316 return kCIAttributeTypeInteger_ = new NSString(bindings.kCIAttributeTypeInteger); | |
317 } | |
318 | |
319 NSString kCIAttributeTypeCount () | |
320 { | |
321 if (kCIAttributeTypeCount_) | |
322 return kCIAttributeTypeCount_; | |
323 | |
324 return kCIAttributeTypeCount_ = new NSString(bindings.kCIAttributeTypeCount); | |
325 } | |
326 | |
327 NSString kCIAttributeTypePosition () | |
328 { | |
329 if (kCIAttributeTypePosition_) | |
330 return kCIAttributeTypePosition_; | |
331 | |
332 return kCIAttributeTypePosition_ = new NSString(bindings.kCIAttributeTypePosition); | |
333 } | |
334 | |
335 NSString kCIAttributeTypeOffset () | |
336 { | |
337 if (kCIAttributeTypeOffset_) | |
338 return kCIAttributeTypeOffset_; | |
339 | |
340 return kCIAttributeTypeOffset_ = new NSString(bindings.kCIAttributeTypeOffset); | |
341 } | |
342 | |
343 NSString kCIAttributeTypePosition3 () | |
344 { | |
345 if (kCIAttributeTypePosition3_) | |
346 return kCIAttributeTypePosition3_; | |
347 | |
348 return kCIAttributeTypePosition3_ = new NSString(bindings.kCIAttributeTypePosition3); | |
349 } | |
350 | |
351 NSString kCIAttributeTypeRectangle () | |
352 { | |
353 if (kCIAttributeTypeRectangle_) | |
354 return kCIAttributeTypeRectangle_; | |
355 | |
356 return kCIAttributeTypeRectangle_ = new NSString(bindings.kCIAttributeTypeRectangle); | |
357 } | |
358 | |
359 NSString kCIAttributeTypeOpaqueColor () | |
360 { | |
361 if (kCIAttributeTypeOpaqueColor_) | |
362 return kCIAttributeTypeOpaqueColor_; | |
363 | |
364 return kCIAttributeTypeOpaqueColor_ = new NSString(bindings.kCIAttributeTypeOpaqueColor); | |
365 } | |
366 | |
367 NSString kCIAttributeTypeGradient () | |
368 { | |
369 if (kCIAttributeTypeGradient_) | |
370 return kCIAttributeTypeGradient_; | |
371 | |
372 return kCIAttributeTypeGradient_ = new NSString(bindings.kCIAttributeTypeGradient); | |
373 } | |
374 | |
375 NSString kCICategoryDistortionEffect () | |
376 { | |
377 if (kCICategoryDistortionEffect_) | |
378 return kCICategoryDistortionEffect_; | |
379 | |
380 return kCICategoryDistortionEffect_ = new NSString(bindings.kCICategoryDistortionEffect); | |
381 } | |
382 | |
383 NSString kCICategoryGeometryAdjustment () | |
384 { | |
385 if (kCICategoryGeometryAdjustment_) | |
386 return kCICategoryGeometryAdjustment_; | |
387 | |
388 return kCICategoryGeometryAdjustment_ = new NSString(bindings.kCICategoryGeometryAdjustment); | |
389 } | |
390 | |
391 NSString kCICategoryCompositeOperation () | |
392 { | |
393 if (kCICategoryCompositeOperation_) | |
394 return kCICategoryCompositeOperation_; | |
395 | |
396 return kCICategoryCompositeOperation_ = new NSString(bindings.kCICategoryCompositeOperation); | |
397 } | |
398 | |
399 NSString kCICategoryHalftoneEffect () | |
400 { | |
401 if (kCICategoryHalftoneEffect_) | |
402 return kCICategoryHalftoneEffect_; | |
403 | |
404 return kCICategoryHalftoneEffect_ = new NSString(bindings.kCICategoryHalftoneEffect); | |
405 } | |
406 | |
407 NSString kCICategoryColorAdjustment () | |
408 { | |
409 if (kCICategoryColorAdjustment_) | |
410 return kCICategoryColorAdjustment_; | |
411 | |
412 return kCICategoryColorAdjustment_ = new NSString(bindings.kCICategoryColorAdjustment); | |
413 } | |
414 | |
415 NSString kCICategoryColorEffect () | |
416 { | |
417 if (kCICategoryColorEffect_) | |
418 return kCICategoryColorEffect_; | |
419 | |
420 return kCICategoryColorEffect_ = new NSString(bindings.kCICategoryColorEffect); | |
421 } | |
422 | |
423 NSString kCICategoryTransition () | |
424 { | |
425 if (kCICategoryTransition_) | |
426 return kCICategoryTransition_; | |
427 | |
428 return kCICategoryTransition_ = new NSString(bindings.kCICategoryTransition); | |
429 } | |
430 | |
431 NSString kCICategoryTileEffect () | |
432 { | |
433 if (kCICategoryTileEffect_) | |
434 return kCICategoryTileEffect_; | |
435 | |
436 return kCICategoryTileEffect_ = new NSString(bindings.kCICategoryTileEffect); | |
437 } | |
438 | |
439 NSString kCICategoryGenerator () | |
440 { | |
441 if (kCICategoryGenerator_) | |
442 return kCICategoryGenerator_; | |
443 | |
444 return kCICategoryGenerator_ = new NSString(bindings.kCICategoryGenerator); | |
445 } | |
446 | |
447 NSString kCICategoryReduction () | |
448 { | |
449 if (kCICategoryReduction_) | |
450 return kCICategoryReduction_; | |
451 | |
452 return kCICategoryReduction_ = new NSString(bindings.kCICategoryReduction); | |
453 } | |
454 | |
455 NSString kCICategoryGradient () | |
456 { | |
457 if (kCICategoryGradient_) | |
458 return kCICategoryGradient_; | |
459 | |
460 return kCICategoryGradient_ = new NSString(bindings.kCICategoryGradient); | |
461 } | |
462 | |
463 NSString kCICategoryStylize () | |
464 { | |
465 if (kCICategoryStylize_) | |
466 return kCICategoryStylize_; | |
467 | |
468 return kCICategoryStylize_ = new NSString(bindings.kCICategoryStylize); | |
469 } | |
470 | |
471 NSString kCICategorySharpen () | |
472 { | |
473 if (kCICategorySharpen_) | |
474 return kCICategorySharpen_; | |
475 | |
476 return kCICategorySharpen_ = new NSString(bindings.kCICategorySharpen); | |
477 } | |
478 | |
479 NSString kCICategoryBlur () | |
480 { | |
481 if (kCICategoryBlur_) | |
482 return kCICategoryBlur_; | |
483 | |
484 return kCICategoryBlur_ = new NSString(bindings.kCICategoryBlur); | |
485 } | |
486 | |
487 NSString kCICategoryVideo () | |
488 { | |
489 if (kCICategoryVideo_) | |
490 return kCICategoryVideo_; | |
491 | |
492 return kCICategoryVideo_ = new NSString(bindings.kCICategoryVideo); | |
493 } | |
494 | |
495 NSString kCICategoryStillImage () | |
496 { | |
497 if (kCICategoryStillImage_) | |
498 return kCICategoryStillImage_; | |
499 | |
500 return kCICategoryStillImage_ = new NSString(bindings.kCICategoryStillImage); | |
501 } | |
502 | |
503 NSString kCICategoryInterlaced () | |
504 { | |
505 if (kCICategoryInterlaced_) | |
506 return kCICategoryInterlaced_; | |
507 | |
508 return kCICategoryInterlaced_ = new NSString(bindings.kCICategoryInterlaced); | |
509 } | |
510 | |
511 NSString kCICategoryNonSquarePixels () | |
512 { | |
513 if (kCICategoryNonSquarePixels_) | |
514 return kCICategoryNonSquarePixels_; | |
515 | |
516 return kCICategoryNonSquarePixels_ = new NSString(bindings.kCICategoryNonSquarePixels); | |
517 } | |
518 | |
519 NSString kCICategoryHighDynamicRange () | |
520 { | |
521 if (kCICategoryHighDynamicRange_) | |
522 return kCICategoryHighDynamicRange_; | |
523 | |
524 return kCICategoryHighDynamicRange_ = new NSString(bindings.kCICategoryHighDynamicRange); | |
525 } | |
526 | |
527 NSString kCICategoryBuiltIn () | |
528 { | |
529 if (kCICategoryBuiltIn_) | |
530 return kCICategoryBuiltIn_; | |
531 | |
532 return kCICategoryBuiltIn_ = new NSString(bindings.kCICategoryBuiltIn); | |
533 } | |
534 | |
535 NSString kCICategoryFilterGenerator () | |
536 { | |
537 if (kCICategoryFilterGenerator_) | |
538 return kCICategoryFilterGenerator_; | |
539 | |
540 return kCICategoryFilterGenerator_ = new NSString(bindings.kCICategoryFilterGenerator); | |
541 } | |
542 | |
543 NSString kCIApplyOptionExtent () | |
544 { | |
545 if (kCIApplyOptionExtent_) | |
546 return kCIApplyOptionExtent_; | |
547 | |
548 return kCIApplyOptionExtent_ = new NSString(bindings.kCIApplyOptionExtent); | |
549 } | |
550 | |
551 NSString kCIApplyOptionDefinition () | |
552 { | |
553 if (kCIApplyOptionDefinition_) | |
554 return kCIApplyOptionDefinition_; | |
555 | |
556 return kCIApplyOptionDefinition_ = new NSString(bindings.kCIApplyOptionDefinition); | |
557 } | |
558 | |
559 NSString kCIApplyOptionUserInfo () | |
560 { | |
561 if (kCIApplyOptionUserInfo_) | |
562 return kCIApplyOptionUserInfo_; | |
563 | |
564 return kCIApplyOptionUserInfo_ = new NSString(bindings.kCIApplyOptionUserInfo); | |
565 } | |
566 | |
567 NSString kCIOutputImageKey () | |
568 { | |
569 if (kCIOutputImageKey_) | |
570 return kCIOutputImageKey_; | |
571 | |
572 return kCIOutputImageKey_ = new NSString(bindings.kCIOutputImageKey); | |
573 } | |
574 | |
575 NSString kCIInputBackgroundImageKey () | |
576 { | |
577 if (kCIInputBackgroundImageKey_) | |
578 return kCIInputBackgroundImageKey_; | |
579 | |
580 return kCIInputBackgroundImageKey_ = new NSString(bindings.kCIInputBackgroundImageKey); | |
581 } | |
582 | |
583 NSString kCIInputImageKey () | |
584 { | |
585 if (kCIInputImageKey_) | |
586 return kCIInputImageKey_; | |
587 | |
588 return kCIInputImageKey_ = new NSString(bindings.kCIInputImageKey); | |
589 } | |
590 | |
591 NSString kCIInputTimeKey () | |
592 { | |
593 if (kCIInputTimeKey_) | |
594 return kCIInputTimeKey_; | |
595 | |
596 return kCIInputTimeKey_ = new NSString(bindings.kCIInputTimeKey); | |
597 } | |
598 | |
599 NSString kCIInputTransformKey () | |
600 { | |
601 if (kCIInputTransformKey_) | |
602 return kCIInputTransformKey_; | |
603 | |
604 return kCIInputTransformKey_ = new NSString(bindings.kCIInputTransformKey); | |
605 } | |
606 | |
607 NSString kCIInputScaleKey () | |
608 { | |
609 if (kCIInputScaleKey_) | |
610 return kCIInputScaleKey_; | |
611 | |
612 return kCIInputScaleKey_ = new NSString(bindings.kCIInputScaleKey); | |
613 } | |
614 | |
615 NSString kCIInputAspectRatioKey () | |
616 { | |
617 if (kCIInputAspectRatioKey_) | |
618 return kCIInputAspectRatioKey_; | |
619 | |
620 return kCIInputAspectRatioKey_ = new NSString(bindings.kCIInputAspectRatioKey); | |
621 } | |
622 | |
623 NSString kCIInputCenterKey () | |
624 { | |
625 if (kCIInputCenterKey_) | |
626 return kCIInputCenterKey_; | |
627 | |
628 return kCIInputCenterKey_ = new NSString(bindings.kCIInputCenterKey); | |
629 } | |
630 | |
631 NSString kCIInputRadiusKey () | |
632 { | |
633 if (kCIInputRadiusKey_) | |
634 return kCIInputRadiusKey_; | |
635 | |
636 return kCIInputRadiusKey_ = new NSString(bindings.kCIInputRadiusKey); | |
637 } | |
638 | |
639 NSString kCIInputAngleKey () | |
640 { | |
641 if (kCIInputAngleKey_) | |
642 return kCIInputAngleKey_; | |
643 | |
644 return kCIInputAngleKey_ = new NSString(bindings.kCIInputAngleKey); | |
645 } | |
646 | |
647 NSString kCIInputRefractionKey () | |
648 { | |
649 if (kCIInputRefractionKey_) | |
650 return kCIInputRefractionKey_; | |
651 | |
652 return kCIInputRefractionKey_ = new NSString(bindings.kCIInputRefractionKey); | |
653 } | |
654 | |
655 NSString kCIInputWidthKey () | |
656 { | |
657 if (kCIInputWidthKey_) | |
658 return kCIInputWidthKey_; | |
659 | |
660 return kCIInputWidthKey_ = new NSString(bindings.kCIInputWidthKey); | |
661 } | |
662 | |
663 NSString kCIInputSharpnessKey () | |
664 { | |
665 if (kCIInputSharpnessKey_) | |
666 return kCIInputSharpnessKey_; | |
667 | |
668 return kCIInputSharpnessKey_ = new NSString(bindings.kCIInputSharpnessKey); | |
669 } | |
670 | |
671 NSString kCIInputIntensityKey () | |
672 { | |
673 if (kCIInputIntensityKey_) | |
674 return kCIInputIntensityKey_; | |
675 | |
676 return kCIInputIntensityKey_ = new NSString(bindings.kCIInputIntensityKey); | |
677 } | |
678 | |
679 NSString kCIInputEVKey () | |
680 { | |
681 if (kCIInputEVKey_) | |
682 return kCIInputEVKey_; | |
683 | |
684 return kCIInputEVKey_ = new NSString(bindings.kCIInputEVKey); | |
685 } | |
686 | |
687 NSString kCIInputSaturationKey () | |
688 { | |
689 if (kCIInputSaturationKey_) | |
690 return kCIInputSaturationKey_; | |
691 | |
692 return kCIInputSaturationKey_ = new NSString(bindings.kCIInputSaturationKey); | |
693 } | |
694 | |
695 NSString kCIInputColorKey () | |
696 { | |
697 if (kCIInputColorKey_) | |
698 return kCIInputColorKey_; | |
699 | |
700 return kCIInputColorKey_ = new NSString(bindings.kCIInputColorKey); | |
701 } | |
702 | |
703 NSString kCIInputBrightnessKey () | |
704 { | |
705 if (kCIInputBrightnessKey_) | |
706 return kCIInputBrightnessKey_; | |
707 | |
708 return kCIInputBrightnessKey_ = new NSString(bindings.kCIInputBrightnessKey); | |
709 } | |
710 | |
711 NSString kCIInputContrastKey () | |
712 { | |
713 if (kCIInputContrastKey_) | |
714 return kCIInputContrastKey_; | |
715 | |
716 return kCIInputContrastKey_ = new NSString(bindings.kCIInputContrastKey); | |
717 } | |
718 | |
719 NSString kCIInputGradientImageKey () | |
720 { | |
721 if (kCIInputGradientImageKey_) | |
722 return kCIInputGradientImageKey_; | |
723 | |
724 return kCIInputGradientImageKey_ = new NSString(bindings.kCIInputGradientImageKey); | |
725 } | |
726 | |
727 NSString kCIInputMaskImageKey () | |
728 { | |
729 if (kCIInputMaskImageKey_) | |
730 return kCIInputMaskImageKey_; | |
731 | |
732 return kCIInputMaskImageKey_ = new NSString(bindings.kCIInputMaskImageKey); | |
733 } | |
734 | |
735 NSString kCIInputShadingImageKey () | |
736 { | |
737 if (kCIInputShadingImageKey_) | |
738 return kCIInputShadingImageKey_; | |
739 | |
740 return kCIInputShadingImageKey_ = new NSString(bindings.kCIInputShadingImageKey); | |
741 } | |
742 | |
743 NSString kCIInputTargetImageKey () | |
744 { | |
745 if (kCIInputTargetImageKey_) | |
746 return kCIInputTargetImageKey_; | |
747 | |
748 return kCIInputTargetImageKey_ = new NSString(bindings.kCIInputTargetImageKey); | |
749 } | |
750 | |
751 NSString kCIInputExtentKey () | |
752 { | |
753 if (kCIInputExtentKey_) | |
754 return kCIInputExtentKey_; | |
755 | |
756 return kCIInputExtentKey_ = new NSString(bindings.kCIInputExtentKey); | |
757 } | |
758 | |
759 const TCIFilterRegistry = ` | |
760 | |
761 static CIFilter filterWithName (NSString name) | |
762 { | |
763 return invokeObjcSelfClass!(CIFilter, "filterWithName:", NSString)(name); | |
764 } | |
765 | |
766 static CIFilter filterWithName_keysAndValues (ARGS...) (NSString name, ARGS args) | |
767 { | |
768 return invokeObjcSelfClass!(CIFilter, "filterWithName:keysAndValues:", NSString, ARGS)(name, args); | |
769 } | |
770 | |
771 static NSArray filterNamesInCategory (NSString category) | |
772 { | |
773 return invokeObjcSelfClass!(NSArray, "filterNamesInCategory:", NSString)(category); | |
774 } | |
775 | |
776 static NSArray filterNamesInCategories (NSArray categories) | |
777 { | |
778 return invokeObjcSelfClass!(NSArray, "filterNamesInCategories:", NSArray)(categories); | |
779 } | |
780 | |
781 static void registerFilterName (NSString name, Object anObject, NSDictionary attributes) | |
782 { | |
783 return invokeObjcSelfClass!(void, "registerFilterName:constructor:classAttributes:", NSString, Object, NSDictionary)(name, anObject, attributes); | |
784 } | |
785 | |
786 static NSString localizedNameForFilterName (NSString filterName) | |
787 { | |
788 return invokeObjcSelfClass!(NSString, "localizedNameForFilterName:", NSString)(filterName); | |
789 } | |
790 | |
791 static NSString localizedNameForCategory (NSString category) | |
792 { | |
793 return invokeObjcSelfClass!(NSString, "localizedNameForCategory:", NSString)(category); | |
794 } | |
795 | |
796 static NSString localizedDescriptionForFilterName (NSString filterName) | |
797 { | |
798 return invokeObjcSelfClass!(NSString, "localizedDescriptionForFilterName:", NSString)(filterName); | |
799 } | |
800 | |
801 static NSURL localizedReferenceDocumentationForFilterName (NSString filterName) | |
802 { | |
803 return invokeObjcSelfClass!(NSURL, "localizedReferenceDocumentationForFilterName:", NSString)(filterName); | |
804 } | |
805 | |
806 //mixin ObjcBindClassMethod!(filterWithName, "filterWithName:"); | |
807 ////mixin ObjcBindClassMethod!(filterWithName_keysAndValues, "filterWithName:keysAndValues:"); | |
808 //mixin ObjcBindClassMethod!(filterNamesInCategory, "filterNamesInCategory:"); | |
809 //mixin ObjcBindClassMethod!(filterNamesInCategories, "filterNamesInCategories:"); | |
810 //mixin ObjcBindClassMethod!(registerFilterName, "registerFilterName:constructor:classAttributes:"); | |
811 //mixin ObjcBindClassMethod!(localizedNameForFilterName, "localizedNameForFilterName:"); | |
812 //mixin ObjcBindClassMethod!(localizedNameForCategory, "localizedNameForCategory:"); | |
813 //mixin ObjcBindClassMethod!(localizedDescriptionForFilterName, "localizedDescriptionForFilterName:"); | |
814 //mixin ObjcBindClassMethod!(localizedReferenceDocumentationForFilterName, "localizedReferenceDocumentationForFilterName:"); | |
815 | |
816 `; | |
817 | |
818 | |
819 class CIFilter : NSObject, INSCoding, INSCopying | |
820 { | |
821 mixin (ObjcWrap); | |
822 | |
823 this (NSCoder aDecoder) | |
824 { | |
825 super(typeof(this).alloc.initWithCoder(aDecoder).objcObject); | |
826 } | |
827 | |
828 void encodeWithCoder (NSCoder aCoder) | |
829 { | |
830 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder); | |
831 } | |
832 | |
833 typeof(this) initWithCoder (NSCoder aDecoder) | |
834 { | |
835 return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder); | |
836 } | |
837 | |
838 typeof(this) copyWithZone (NSZone* zone) | |
839 { | |
840 return invokeObjcSelf!(typeof(this), "copyWithZone:", NSZone*)(zone); | |
841 } | |
842 | |
843 NSArray inputKeys () | |
844 { | |
845 return invokeObjcSelf!(NSArray, "inputKeys"); | |
846 } | |
847 | |
848 NSArray outputKeys () | |
849 { | |
850 return invokeObjcSelf!(NSArray, "outputKeys"); | |
851 } | |
852 | |
853 void setDefaults () | |
854 { | |
855 return invokeObjcSelf!(void, "setDefaults"); | |
856 } | |
857 | |
858 NSDictionary attributes () | |
859 { | |
860 return invokeObjcSelf!(NSDictionary, "attributes"); | |
861 } | |
862 | |
863 CIImage apply (CIKernel k, NSArray args, NSDictionary dict) | |
864 { | |
865 return invokeObjcSelf!(CIImage, "apply:arguments:options:", CIKernel, NSArray, NSDictionary)(k, args, dict); | |
866 } | |
867 | |
868 /*CIImage apply (CIKernel apply, ...) | |
869 { | |
870 return invokeObjcSelf!(CIImage, "apply:", CIKernel)(apply); | |
871 }*/ | |
872 | |
873 // CIRAWFilter | |
874 static CIFilter filterWithImageURL (NSURL url, NSDictionary options) | |
875 { | |
876 return invokeObjcSelfClass!(CIFilter, "filterWithImageURL:options:", NSURL, NSDictionary)(url, options); | |
877 } | |
878 | |
879 static CIFilter filterWithImageData (NSData data, NSDictionary options) | |
880 { | |
881 return invokeObjcSelfClass!(CIFilter, "filterWithImageData:options:", NSData, NSDictionary)(data, options); | |
882 } | |
883 | |
884 // CACIFilterAdditions | |
885 NSString name () | |
886 { | |
887 return invokeObjcSelf!(NSString, "name"); | |
888 } | |
889 | |
890 void name (NSString name) | |
891 { | |
892 return invokeObjcSelf!(void, "setName:", NSString)(name); | |
893 } | |
894 | |
895 alias name setName; | |
896 | |
897 bool enabled () | |
898 { | |
899 return invokeObjcSelf!(bool, "enabled"); | |
900 } | |
901 | |
902 void enabled (bool enabled) | |
903 { | |
904 return invokeObjcSelf!(void, "setEnabled:", bool)(enabled); | |
905 } | |
906 | |
907 alias enabled setEnabled; | |
908 | |
909 // CIFilterRegistry | |
910 static CIFilter filterWithName (NSString name) | |
911 { | |
912 return invokeObjcSelfClass!(CIFilter, "filterWithName:", NSString)(name); | |
913 } | |
914 | |
915 static CIFilter filterWithName_keysAndValues (ARGS...) (NSString name, ARGS args) | |
916 { | |
917 return invokeObjcSelfClass!(CIFilter, "filterWithName:keysAndValues:", NSString, ARGS)(name, args); | |
918 } | |
919 | |
920 static NSArray filterNamesInCategory (NSString category) | |
921 { | |
922 return invokeObjcSelfClass!(NSArray, "filterNamesInCategory:", NSString)(category); | |
923 } | |
924 | |
925 static NSArray filterNamesInCategories (NSArray categories) | |
926 { | |
927 return invokeObjcSelfClass!(NSArray, "filterNamesInCategories:", NSArray)(categories); | |
928 } | |
929 | |
930 static void registerFilterName (NSString name, Object anObject, NSDictionary attributes) | |
931 { | |
932 return invokeObjcSelfClass!(void, "registerFilterName:constructor:classAttributes:", NSString, Object, NSDictionary)(name, anObject, attributes); | |
933 } | |
934 | |
935 static NSString localizedNameForFilterName (NSString filterName) | |
936 { | |
937 return invokeObjcSelfClass!(NSString, "localizedNameForFilterName:", NSString)(filterName); | |
938 } | |
939 | |
940 static NSString localizedNameForCategory (NSString category) | |
941 { | |
942 return invokeObjcSelfClass!(NSString, "localizedNameForCategory:", NSString)(category); | |
943 } | |
944 | |
945 static NSString localizedDescriptionForFilterName (NSString filterName) | |
946 { | |
947 return invokeObjcSelfClass!(NSString, "localizedDescriptionForFilterName:", NSString)(filterName); | |
948 } | |
949 | |
950 static NSURL localizedReferenceDocumentationForFilterName (NSString filterName) | |
951 { | |
952 return invokeObjcSelfClass!(NSURL, "localizedReferenceDocumentationForFilterName:", NSString)(filterName); | |
953 } | |
954 } |