Mercurial > projects > dstep
comparison dstep/quartzcore/CAAnimation.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 | f8a3b67adfcb |
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.CAAnimation; | |
8 | |
9 import dstep.applicationservices.coregraphics.CGAffineTransform; | |
10 import dstep.applicationservices.coregraphics.CGBase; | |
11 import dstep.applicationservices.coregraphics.CGColor; | |
12 import dstep.applicationservices.coregraphics.CGContext; | |
13 import dstep.applicationservices.coregraphics.CGGeometry; | |
14 import dstep.foundation.NSArray; | |
15 import dstep.foundation.NSCoder; | |
16 import dstep.foundation.NSObject; | |
17 import dstep.foundation.NSDictionary; | |
18 import dstep.foundation.NSString; | |
19 import dstep.foundation.NSZone; | |
20 import dstep.objc.bridge.Bridge; | |
21 import dstep.objc.objc; | |
22 import dstep.quartzcore.CALayer; | |
23 import dstep.quartzcore.CAMediaTiming; | |
24 import dstep.quartzcore.CAMediaTimingFunction; | |
25 import dstep.quartzcore.CATransform3D; | |
26 | |
27 import bindings = dstep.quartzcore.CAAnimation_bindings; | |
28 | |
29 private | |
30 { | |
31 NSString kCAAnimationLinear_; | |
32 NSString kCAAnimationDiscrete_; | |
33 NSString kCAAnimationPaced_; | |
34 NSString kCAAnimationRotateAuto_; | |
35 NSString kCAAnimationRotateAutoReverse_; | |
36 NSString kCATransitionFade_; | |
37 NSString kCATransitionMoveIn_; | |
38 NSString kCATransitionPush_; | |
39 NSString kCATransitionReveal_; | |
40 NSString kCATransitionFromRight_; | |
41 NSString kCATransitionFromLeft_; | |
42 NSString kCATransitionFromTop_; | |
43 NSString kCATransitionFromBottom_; | |
44 } | |
45 | |
46 NSString kCAAnimationLinear () | |
47 { | |
48 if (kCAAnimationLinear_) | |
49 return kCAAnimationLinear_; | |
50 | |
51 return kCAAnimationLinear_ = new NSString(bindings.kCAAnimationLinear); | |
52 } | |
53 | |
54 NSString kCAAnimationDiscrete () | |
55 { | |
56 if (kCAAnimationDiscrete_) | |
57 return kCAAnimationDiscrete_; | |
58 | |
59 return kCAAnimationDiscrete_ = new NSString(bindings.kCAAnimationDiscrete); | |
60 } | |
61 | |
62 NSString kCAAnimationPaced () | |
63 { | |
64 if (kCAAnimationPaced_) | |
65 return kCAAnimationPaced_; | |
66 | |
67 return kCAAnimationPaced_ = new NSString(bindings.kCAAnimationPaced); | |
68 } | |
69 | |
70 NSString kCAAnimationRotateAuto () | |
71 { | |
72 if (kCAAnimationRotateAuto_) | |
73 return kCAAnimationRotateAuto_; | |
74 | |
75 return kCAAnimationRotateAuto_ = new NSString(bindings.kCAAnimationRotateAuto); | |
76 } | |
77 | |
78 NSString kCAAnimationRotateAutoReverse () | |
79 { | |
80 if (kCAAnimationRotateAutoReverse_) | |
81 return kCAAnimationRotateAutoReverse_; | |
82 | |
83 return kCAAnimationRotateAutoReverse_ = new NSString(bindings.kCAAnimationRotateAutoReverse); | |
84 } | |
85 | |
86 NSString kCATransitionFade () | |
87 { | |
88 if (kCATransitionFade_) | |
89 return kCATransitionFade_; | |
90 | |
91 return kCATransitionFade_ = new NSString(bindings.kCATransitionFade); | |
92 } | |
93 | |
94 NSString kCATransitionMoveIn () | |
95 { | |
96 if (kCATransitionMoveIn_) | |
97 return kCATransitionMoveIn_; | |
98 | |
99 return kCATransitionMoveIn_ = new NSString(bindings.kCATransitionMoveIn); | |
100 } | |
101 | |
102 NSString kCATransitionPush () | |
103 { | |
104 if (kCATransitionPush_) | |
105 return kCATransitionPush_; | |
106 | |
107 return kCATransitionPush_ = new NSString(bindings.kCATransitionPush); | |
108 } | |
109 | |
110 NSString kCATransitionReveal () | |
111 { | |
112 if (kCATransitionReveal_) | |
113 return kCATransitionReveal_; | |
114 | |
115 return kCATransitionReveal_ = new NSString(bindings.kCATransitionReveal); | |
116 } | |
117 | |
118 NSString kCATransitionFromRight () | |
119 { | |
120 if (kCATransitionFromRight_) | |
121 return kCATransitionFromRight_; | |
122 | |
123 return kCATransitionFromRight_ = new NSString(bindings.kCATransitionFromRight); | |
124 } | |
125 | |
126 NSString kCATransitionFromLeft () | |
127 { | |
128 if (kCATransitionFromLeft_) | |
129 return kCATransitionFromLeft_; | |
130 | |
131 return kCATransitionFromLeft_ = new NSString(bindings.kCATransitionFromLeft); | |
132 } | |
133 | |
134 NSString kCATransitionFromTop () | |
135 { | |
136 if (kCATransitionFromTop_) | |
137 return kCATransitionFromTop_; | |
138 | |
139 return kCATransitionFromTop_ = new NSString(bindings.kCATransitionFromTop); | |
140 } | |
141 | |
142 NSString kCATransitionFromBottom () | |
143 { | |
144 if (kCATransitionFromBottom_) | |
145 return kCATransitionFromBottom_; | |
146 | |
147 return kCATransitionFromBottom_ = new NSString(bindings.kCATransitionFromBottom); | |
148 } | |
149 | |
150 class CAAnimation : NSObject, INSCoding, INSCopying, ICAMediaTiming, ICAAction | |
151 { | |
152 mixin (ObjcWrap); | |
153 | |
154 static Object animation () | |
155 { | |
156 return invokeObjcSelfClass!(Object, "animation"); | |
157 } | |
158 | |
159 static Object defaultValueForKey (NSString key) | |
160 { | |
161 return invokeObjcSelfClass!(Object, "defaultValueForKey:", NSString)(key); | |
162 } | |
163 | |
164 bool shouldArchiveValueForKey (NSString key) | |
165 { | |
166 return invokeObjcSelf!(bool, "shouldArchiveValueForKey:", NSString)(key); | |
167 } | |
168 | |
169 Object delegate_ () | |
170 { | |
171 return invokeObjcSelf!(Object, "delegate"); | |
172 } | |
173 | |
174 void setDelegate (Object arg0) | |
175 { | |
176 return invokeObjcSelf!(void, "setDelegate:", Object)(arg0); | |
177 } | |
178 | |
179 bool isRemovedOnCompletion () | |
180 { | |
181 return invokeObjcSelf!(bool, "isRemovedOnCompletion"); | |
182 } | |
183 | |
184 void setRemovedOnCompletion (bool arg0) | |
185 { | |
186 return invokeObjcSelf!(void, "setRemovedOnCompletion:", bool)(arg0); | |
187 } | |
188 | |
189 double beginTime () | |
190 { | |
191 return invokeObjcSelf!(double, "beginTime"); | |
192 } | |
193 | |
194 void beginTime (double arg0) | |
195 { | |
196 return invokeObjcSelf!(void, "setBeginTime:", double)(arg0); | |
197 } | |
198 | |
199 alias beginTime setBeginTime; | |
200 | |
201 double duration () | |
202 { | |
203 return invokeObjcSelf!(double, "duration"); | |
204 } | |
205 | |
206 void duration (double arg0) | |
207 { | |
208 return invokeObjcSelf!(void, "setDuration:", double)(arg0); | |
209 } | |
210 | |
211 alias duration setDuration; | |
212 | |
213 float speed () | |
214 { | |
215 return invokeObjcSelf!(float, "speed"); | |
216 } | |
217 | |
218 void speed (float arg0) | |
219 { | |
220 return invokeObjcSelf!(void, "setSpeed:", float)(arg0); | |
221 } | |
222 | |
223 alias speed setSpeed; | |
224 | |
225 double timeOffset () | |
226 { | |
227 return invokeObjcSelf!(double, "timeOffset"); | |
228 } | |
229 | |
230 void timeOffset (double arg0) | |
231 { | |
232 return invokeObjcSelf!(void, "setTimeOffset:", double)(arg0); | |
233 } | |
234 | |
235 alias timeOffset setTimeOffset; | |
236 | |
237 float repeatCount () | |
238 { | |
239 return invokeObjcSelf!(float, "repeatCount"); | |
240 } | |
241 | |
242 void repeatCount (float arg0) | |
243 { | |
244 return invokeObjcSelf!(void, "setRepeatCount:", float)(arg0); | |
245 } | |
246 | |
247 alias repeatCount setRepeatCount; | |
248 | |
249 double repeatDuration () | |
250 { | |
251 return invokeObjcSelf!(double, "repeatDuration"); | |
252 } | |
253 | |
254 void repeatDuration (double arg0) | |
255 { | |
256 return invokeObjcSelf!(void, "setRepeatDuration:", double)(arg0); | |
257 } | |
258 | |
259 alias repeatDuration setRepeatDuration; | |
260 | |
261 NSString fillMode () | |
262 { | |
263 return invokeObjcSelf!(NSString, "fillMode"); | |
264 } | |
265 | |
266 void fillMode (NSString mode) | |
267 { | |
268 return invokeObjcSelf!(void, "setFillMode:", NSString)(mode); | |
269 } | |
270 | |
271 alias fillMode setFillMode; | |
272 | |
273 bool autoreverses () | |
274 { | |
275 return invokeObjcSelf!(bool, "autoreverses"); | |
276 } | |
277 | |
278 void autoreverses (bool arg0) | |
279 { | |
280 return invokeObjcSelf!(void, "setAutoreverses:", bool)(arg0); | |
281 } | |
282 | |
283 alias autoreverses setAutoreverses; | |
284 | |
285 static Object layer () | |
286 { | |
287 return invokeObjcSelfClass!(Object, "layer"); | |
288 } | |
289 | |
290 CAAnimation init () | |
291 { | |
292 id result = invokeObjcSelf!(id, "init"); | |
293 return result is this.objcObject ? this : (result !is null ? new CAAnimation(result) : null); | |
294 } | |
295 | |
296 this () | |
297 { | |
298 super(CAAnimation.alloc.init.objcObject); | |
299 } | |
300 | |
301 CAAnimation initWithLayer (Object layer) | |
302 { | |
303 id result = invokeObjcSelf!(id, "initWithLayer:", Object)(layer); | |
304 return result is this.objcObject ? this : (result !is null ? new CAAnimation(result) : null); | |
305 } | |
306 | |
307 this (Object layer) | |
308 { | |
309 super(CAAnimation.alloc.initWithLayer(layer).objcObject); | |
310 } | |
311 | |
312 Object presentationLayer () | |
313 { | |
314 return invokeObjcSelf!(Object, "presentationLayer"); | |
315 } | |
316 | |
317 Object modelLayer () | |
318 { | |
319 return invokeObjcSelf!(Object, "modelLayer"); | |
320 } | |
321 | |
322 static Object defaultValueForKey (NSString key) | |
323 { | |
324 return invokeObjcSelfClass!(Object, "defaultValueForKey:", NSString)(key); | |
325 } | |
326 | |
327 bool shouldArchiveValueForKey (NSString key) | |
328 { | |
329 return invokeObjcSelf!(bool, "shouldArchiveValueForKey:", NSString)(key); | |
330 } | |
331 | |
332 CGRect bounds () | |
333 { | |
334 return invokeObjcSelf!(CGRect, "bounds"); | |
335 } | |
336 | |
337 void setBounds (CGRect arg0) | |
338 { | |
339 return invokeObjcSelf!(void, "setBounds:", CGRect)(arg0); | |
340 } | |
341 | |
342 CGPoint position () | |
343 { | |
344 return invokeObjcSelf!(CGPoint, "position"); | |
345 } | |
346 | |
347 void setPosition (CGPoint arg0) | |
348 { | |
349 return invokeObjcSelf!(void, "setPosition:", CGPoint)(arg0); | |
350 } | |
351 | |
352 CGFloat zPosition () | |
353 { | |
354 return invokeObjcSelf!(CGFloat, "zPosition"); | |
355 } | |
356 | |
357 void setZPosition (CGFloat arg0) | |
358 { | |
359 return invokeObjcSelf!(void, "setZPosition:", CGFloat)(arg0); | |
360 } | |
361 | |
362 CGPoint anchorPoint () | |
363 { | |
364 return invokeObjcSelf!(CGPoint, "anchorPoint"); | |
365 } | |
366 | |
367 void setAnchorPoint (CGPoint arg0) | |
368 { | |
369 return invokeObjcSelf!(void, "setAnchorPoint:", CGPoint)(arg0); | |
370 } | |
371 | |
372 CATransform3D transform () | |
373 { | |
374 return invokeObjcSelf!(CATransform3D, "transform"); | |
375 } | |
376 | |
377 void setTransform (CATransform3D arg0) | |
378 { | |
379 return invokeObjcSelf!(void, "setTransform:", CATransform3D)(arg0); | |
380 } | |
381 | |
382 CGAffineTransform affineTransform () | |
383 { | |
384 return invokeObjcSelf!(CGAffineTransform, "affineTransform"); | |
385 } | |
386 | |
387 void setAffineTransform (CGAffineTransform m) | |
388 { | |
389 return invokeObjcSelf!(void, "setAffineTransform:", CGAffineTransform)(m); | |
390 } | |
391 | |
392 CGRect frame () | |
393 { | |
394 return invokeObjcSelf!(CGRect, "frame"); | |
395 } | |
396 | |
397 void setFrame (CGRect arg0) | |
398 { | |
399 return invokeObjcSelf!(void, "setFrame:", CGRect)(arg0); | |
400 } | |
401 | |
402 bool isHidden () | |
403 { | |
404 return invokeObjcSelf!(bool, "isHidden"); | |
405 } | |
406 | |
407 void setHidden (bool arg0) | |
408 { | |
409 return invokeObjcSelf!(void, "setHidden:", bool)(arg0); | |
410 } | |
411 | |
412 bool isDoubleSided () | |
413 { | |
414 return invokeObjcSelf!(bool, "isDoubleSided"); | |
415 } | |
416 | |
417 void setDoubleSided (bool arg0) | |
418 { | |
419 return invokeObjcSelf!(void, "setDoubleSided:", bool)(arg0); | |
420 } | |
421 | |
422 void removeFromSuperlayer () | |
423 { | |
424 return invokeObjcSelf!(void, "removeFromSuperlayer"); | |
425 } | |
426 | |
427 void addSublayer (dstep.quartzcore.CALayer.CALayer layer) | |
428 { | |
429 return invokeObjcSelf!(void, "addSublayer:", dstep.quartzcore.CALayer.CALayer)(layer); | |
430 } | |
431 | |
432 void insertSublayer (dstep.quartzcore.CALayer.CALayer layer, uint idx) | |
433 { | |
434 return invokeObjcSelf!(void, "insertSublayer:atIndex:", dstep.quartzcore.CALayer.CALayer, uint)(layer, idx); | |
435 } | |
436 | |
437 void insertSublayer (dstep.quartzcore.CALayer.CALayer layer, dstep.quartzcore.CALayer.CALayer sibling) | |
438 { | |
439 return invokeObjcSelf!(void, "insertSublayer:below:", dstep.quartzcore.CALayer.CALayer, dstep.quartzcore.CALayer.CALayer)(layer, sibling); | |
440 } | |
441 | |
442 void insertSublayer (dstep.quartzcore.CALayer.CALayer layer, dstep.quartzcore.CALayer.CALayer sibling) | |
443 { | |
444 return invokeObjcSelf!(void, "insertSublayer:above:", dstep.quartzcore.CALayer.CALayer, dstep.quartzcore.CALayer.CALayer)(layer, sibling); | |
445 } | |
446 | |
447 void replaceSublayer (dstep.quartzcore.CALayer.CALayer layer, dstep.quartzcore.CALayer.CALayer layer2) | |
448 { | |
449 return invokeObjcSelf!(void, "replaceSublayer:with:", dstep.quartzcore.CALayer.CALayer, dstep.quartzcore.CALayer.CALayer)(layer, layer2); | |
450 } | |
451 | |
452 CATransform3D sublayerTransform () | |
453 { | |
454 return invokeObjcSelf!(CATransform3D, "sublayerTransform"); | |
455 } | |
456 | |
457 void setSublayerTransform (CATransform3D arg0) | |
458 { | |
459 return invokeObjcSelf!(void, "setSublayerTransform:", CATransform3D)(arg0); | |
460 } | |
461 | |
462 bool masksToBounds () | |
463 { | |
464 return invokeObjcSelf!(bool, "masksToBounds"); | |
465 } | |
466 | |
467 void setMasksToBounds (bool arg0) | |
468 { | |
469 return invokeObjcSelf!(void, "setMasksToBounds:", bool)(arg0); | |
470 } | |
471 | |
472 CGPoint convertPoint (CGPoint p, dstep.quartzcore.CALayer.CALayer l) | |
473 { | |
474 return invokeObjcSelf!(CGPoint, "convertPoint:fromLayer:", CGPoint, dstep.quartzcore.CALayer.CALayer)(p, l); | |
475 } | |
476 | |
477 CGPoint convertPoint (CGPoint p, dstep.quartzcore.CALayer.CALayer l) | |
478 { | |
479 return invokeObjcSelf!(CGPoint, "convertPoint:toLayer:", CGPoint, dstep.quartzcore.CALayer.CALayer)(p, l); | |
480 } | |
481 | |
482 CGRect convertRect (CGRect r, dstep.quartzcore.CALayer.CALayer l) | |
483 { | |
484 return invokeObjcSelf!(CGRect, "convertRect:fromLayer:", CGRect, dstep.quartzcore.CALayer.CALayer)(r, l); | |
485 } | |
486 | |
487 CGRect convertRect (CGRect r, dstep.quartzcore.CALayer.CALayer l) | |
488 { | |
489 return invokeObjcSelf!(CGRect, "convertRect:toLayer:", CGRect, dstep.quartzcore.CALayer.CALayer)(r, l); | |
490 } | |
491 | |
492 double convertTime (double t, dstep.quartzcore.CALayer.CALayer l) | |
493 { | |
494 return invokeObjcSelf!(double, "convertTime:fromLayer:", double, dstep.quartzcore.CALayer.CALayer)(t, l); | |
495 } | |
496 | |
497 double convertTime (double t, dstep.quartzcore.CALayer.CALayer l) | |
498 { | |
499 return invokeObjcSelf!(double, "convertTime:toLayer:", double, dstep.quartzcore.CALayer.CALayer)(t, l); | |
500 } | |
501 | |
502 dstep.quartzcore.CALayer.CALayer hitTest (CGPoint p) | |
503 { | |
504 return invokeObjcSelf!(dstep.quartzcore.CALayer.CALayer, "hitTest:", CGPoint)(p); | |
505 } | |
506 | |
507 bool containsPoint (CGPoint p) | |
508 { | |
509 return invokeObjcSelf!(bool, "containsPoint:", CGPoint)(p); | |
510 } | |
511 | |
512 Object contents () | |
513 { | |
514 return invokeObjcSelf!(Object, "contents"); | |
515 } | |
516 | |
517 void setContents (Object arg0) | |
518 { | |
519 return invokeObjcSelf!(void, "setContents:", Object)(arg0); | |
520 } | |
521 | |
522 CGRect contentsRect () | |
523 { | |
524 return invokeObjcSelf!(CGRect, "contentsRect"); | |
525 } | |
526 | |
527 void setContentsRect (CGRect arg0) | |
528 { | |
529 return invokeObjcSelf!(void, "setContentsRect:", CGRect)(arg0); | |
530 } | |
531 | |
532 bool isOpaque () | |
533 { | |
534 return invokeObjcSelf!(bool, "isOpaque"); | |
535 } | |
536 | |
537 void setOpaque (bool arg0) | |
538 { | |
539 return invokeObjcSelf!(void, "setOpaque:", bool)(arg0); | |
540 } | |
541 | |
542 void display () | |
543 { | |
544 return invokeObjcSelf!(void, "display"); | |
545 } | |
546 | |
547 void setNeedsDisplay () | |
548 { | |
549 return invokeObjcSelf!(void, "setNeedsDisplay"); | |
550 } | |
551 | |
552 void setNeedsDisplayInRect (CGRect r) | |
553 { | |
554 return invokeObjcSelf!(void, "setNeedsDisplayInRect:", CGRect)(r); | |
555 } | |
556 | |
557 bool needsDisplayOnBoundsChange () | |
558 { | |
559 return invokeObjcSelf!(bool, "needsDisplayOnBoundsChange"); | |
560 } | |
561 | |
562 void setNeedsDisplayOnBoundsChange (bool arg0) | |
563 { | |
564 return invokeObjcSelf!(void, "setNeedsDisplayOnBoundsChange:", bool)(arg0); | |
565 } | |
566 | |
567 void drawInContext (CGContextRef ctx) | |
568 { | |
569 return invokeObjcSelf!(void, "drawInContext:", CGContextRef)(ctx); | |
570 } | |
571 | |
572 void renderInContext (CGContextRef ctx) | |
573 { | |
574 return invokeObjcSelf!(void, "renderInContext:", CGContextRef)(ctx); | |
575 } | |
576 | |
577 uint edgeAntialiasingMask () | |
578 { | |
579 return invokeObjcSelf!(uint, "edgeAntialiasingMask"); | |
580 } | |
581 | |
582 void setEdgeAntialiasingMask (uint arg0) | |
583 { | |
584 return invokeObjcSelf!(void, "setEdgeAntialiasingMask:", uint)(arg0); | |
585 } | |
586 | |
587 CGColorRef backgroundColor () | |
588 { | |
589 return invokeObjcSelf!(CGColorRef, "backgroundColor"); | |
590 } | |
591 | |
592 void setBackgroundColor (CGColorRef arg0) | |
593 { | |
594 return invokeObjcSelf!(void, "setBackgroundColor:", CGColorRef)(arg0); | |
595 } | |
596 | |
597 CGFloat cornerRadius () | |
598 { | |
599 return invokeObjcSelf!(CGFloat, "cornerRadius"); | |
600 } | |
601 | |
602 void setCornerRadius (CGFloat arg0) | |
603 { | |
604 return invokeObjcSelf!(void, "setCornerRadius:", CGFloat)(arg0); | |
605 } | |
606 | |
607 CGFloat borderWidth () | |
608 { | |
609 return invokeObjcSelf!(CGFloat, "borderWidth"); | |
610 } | |
611 | |
612 void setBorderWidth (CGFloat arg0) | |
613 { | |
614 return invokeObjcSelf!(void, "setBorderWidth:", CGFloat)(arg0); | |
615 } | |
616 | |
617 CGColorRef borderColor () | |
618 { | |
619 return invokeObjcSelf!(CGColorRef, "borderColor"); | |
620 } | |
621 | |
622 void setBorderColor (CGColorRef arg0) | |
623 { | |
624 return invokeObjcSelf!(void, "setBorderColor:", CGColorRef)(arg0); | |
625 } | |
626 | |
627 float opacity () | |
628 { | |
629 return invokeObjcSelf!(float, "opacity"); | |
630 } | |
631 | |
632 void setOpacity (float arg0) | |
633 { | |
634 return invokeObjcSelf!(void, "setOpacity:", float)(arg0); | |
635 } | |
636 | |
637 Object compositingFilter () | |
638 { | |
639 return invokeObjcSelf!(Object, "compositingFilter"); | |
640 } | |
641 | |
642 void setCompositingFilter (Object arg0) | |
643 { | |
644 return invokeObjcSelf!(void, "setCompositingFilter:", Object)(arg0); | |
645 } | |
646 | |
647 CGColorRef shadowColor () | |
648 { | |
649 return invokeObjcSelf!(CGColorRef, "shadowColor"); | |
650 } | |
651 | |
652 void setShadowColor (CGColorRef arg0) | |
653 { | |
654 return invokeObjcSelf!(void, "setShadowColor:", CGColorRef)(arg0); | |
655 } | |
656 | |
657 float shadowOpacity () | |
658 { | |
659 return invokeObjcSelf!(float, "shadowOpacity"); | |
660 } | |
661 | |
662 void setShadowOpacity (float arg0) | |
663 { | |
664 return invokeObjcSelf!(void, "setShadowOpacity:", float)(arg0); | |
665 } | |
666 | |
667 CGSize shadowOffset () | |
668 { | |
669 return invokeObjcSelf!(CGSize, "shadowOffset"); | |
670 } | |
671 | |
672 void setShadowOffset (CGSize arg0) | |
673 { | |
674 return invokeObjcSelf!(void, "setShadowOffset:", CGSize)(arg0); | |
675 } | |
676 | |
677 CGFloat shadowRadius () | |
678 { | |
679 return invokeObjcSelf!(CGFloat, "shadowRadius"); | |
680 } | |
681 | |
682 void setShadowRadius (CGFloat arg0) | |
683 { | |
684 return invokeObjcSelf!(void, "setShadowRadius:", CGFloat)(arg0); | |
685 } | |
686 | |
687 uint autoresizingMask () | |
688 { | |
689 return invokeObjcSelf!(uint, "autoresizingMask"); | |
690 } | |
691 | |
692 void setAutoresizingMask (uint arg0) | |
693 { | |
694 return invokeObjcSelf!(void, "setAutoresizingMask:", uint)(arg0); | |
695 } | |
696 | |
697 Object layoutManager () | |
698 { | |
699 return invokeObjcSelf!(Object, "layoutManager"); | |
700 } | |
701 | |
702 void setLayoutManager (Object arg0) | |
703 { | |
704 return invokeObjcSelf!(void, "setLayoutManager:", Object)(arg0); | |
705 } | |
706 | |
707 CGSize preferredFrameSize () | |
708 { | |
709 return invokeObjcSelf!(CGSize, "preferredFrameSize"); | |
710 } | |
711 | |
712 void setNeedsLayout () | |
713 { | |
714 return invokeObjcSelf!(void, "setNeedsLayout"); | |
715 } | |
716 | |
717 void layoutIfNeeded () | |
718 { | |
719 return invokeObjcSelf!(void, "layoutIfNeeded"); | |
720 } | |
721 | |
722 void layoutSublayers () | |
723 { | |
724 return invokeObjcSelf!(void, "layoutSublayers"); | |
725 } | |
726 | |
727 void resizeSublayersWithOldSize (CGSize size) | |
728 { | |
729 return invokeObjcSelf!(void, "resizeSublayersWithOldSize:", CGSize)(size); | |
730 } | |
731 | |
732 void resizeWithOldSuperlayerSize (CGSize size) | |
733 { | |
734 return invokeObjcSelf!(void, "resizeWithOldSuperlayerSize:", CGSize)(size); | |
735 } | |
736 | |
737 static ICAAction defaultActionForKey (NSString event) | |
738 { | |
739 return invokeObjcSelfClass!(ICAAction, "defaultActionForKey:", NSString)(event); | |
740 } | |
741 | |
742 ICAAction actionForKey (NSString event) | |
743 { | |
744 return invokeObjcSelf!(ICAAction, "actionForKey:", NSString)(event); | |
745 } | |
746 | |
747 void addAnimation (CAAnimation anim, NSString key) | |
748 { | |
749 return invokeObjcSelf!(void, "addAnimation:forKey:", CAAnimation, NSString)(anim, key); | |
750 } | |
751 | |
752 void removeAllAnimations () | |
753 { | |
754 return invokeObjcSelf!(void, "removeAllAnimations"); | |
755 } | |
756 | |
757 void removeAnimationForKey (NSString key) | |
758 { | |
759 return invokeObjcSelf!(void, "removeAnimationForKey:", NSString)(key); | |
760 } | |
761 | |
762 CAAnimation animationForKey (NSString key) | |
763 { | |
764 return invokeObjcSelf!(CAAnimation, "animationForKey:", NSString)(key); | |
765 } | |
766 | |
767 void setDelegate (Object arg0) | |
768 { | |
769 return invokeObjcSelf!(void, "setDelegate:", Object)(arg0); | |
770 } | |
771 | |
772 alias setDelegate delegate_; | |
773 | |
774 void runActionForKey (NSString event, Object anObject, NSDictionary dict) | |
775 { | |
776 return invokeObjcSelf!(void, "runActionForKey:object:arguments:", NSString, Object, NSDictionary)(event, anObject, dict); | |
777 } | |
778 | |
779 void encodeWithCoder (NSCoder aCoder) | |
780 { | |
781 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder); | |
782 } | |
783 | |
784 CAAnimation initWithCoder (NSCoder aDecoder) | |
785 { | |
786 return invokeObjcSelf!(CAAnimation, "initWithCoder:", NSCoder)(aDecoder); | |
787 } | |
788 | |
789 CAAnimation copyWithZone (NSZone* zone) | |
790 { | |
791 return invokeObjcSelf!(CAAnimation, "copyWithZone:", NSZone*)(zone); | |
792 } | |
793 } | |
794 | |
795 class CAPropertyAnimation : CAAnimation | |
796 { | |
797 mixin (ObjcWrap); | |
798 | |
799 static Object animationWithKeyPath (NSString path) | |
800 { | |
801 return invokeObjcSelfClass!(Object, "animationWithKeyPath:", NSString)(path); | |
802 } | |
803 | |
804 bool isAdditive () | |
805 { | |
806 return invokeObjcSelf!(bool, "isAdditive"); | |
807 } | |
808 | |
809 void setAdditive (bool arg0) | |
810 { | |
811 return invokeObjcSelf!(void, "setAdditive:", bool)(arg0); | |
812 } | |
813 | |
814 bool isCumulative () | |
815 { | |
816 return invokeObjcSelf!(bool, "isCumulative"); | |
817 } | |
818 | |
819 void setCumulative (bool arg0) | |
820 { | |
821 return invokeObjcSelf!(void, "setCumulative:", bool)(arg0); | |
822 } | |
823 } | |
824 | |
825 const TCAAnimationDelegate = ` | |
826 | |
827 void animationDidStart (CAAnimation anim) | |
828 { | |
829 return invokeObjcSelf!(void, "animationDidStart:", CAAnimation)(anim); | |
830 } | |
831 | |
832 void animationDidStop (CAAnimation anim, bool flag) | |
833 { | |
834 return invokeObjcSelf!(void, "animationDidStop:finished:", CAAnimation, bool)(anim, flag); | |
835 } | |
836 | |
837 //mixin ObjcBindMethod!(animationDidStart, "animationDidStart:"); | |
838 //mixin ObjcBindMethod!(animationDidStop, "animationDidStop:finished:"); | |
839 | |
840 `; | |
841 |