* Fixed scaling of king pieces when the board's state is set.
* Added IBOutlets for tilting the BoardView.
5 // Created by Jens Alfke on 3/7/08.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
11 #import <QuartzCore/QuartzCore.h>
13 #import <Quartz/Quartz.h>
17 extern NSString* const GGBLayerStyleChangedNotification;
20 @interface GGBLayer : CALayer <NSCopying>
22 CABasicAnimation *_curAnimation;
23 NSMutableDictionary *_styleDict;
25 #if ! TARGET_OS_IPHONE
28 // For some reason, the CALayer class on iPhone OS doesn't have these!
29 CGFloat _cornerRadius, _borderWidth;
30 CGColorRef _borderColor, _realBGColor;
31 unsigned int _autoresizingMask;
34 @property CGFloat cornerRadius, borderWidth;
35 @property CGColorRef borderColor;
38 - (void) redisplayAll;
40 - (void) animateAndBlock: (NSString*)keyPath from: (id)from to: (id)to duration: (NSTimeInterval)duration;
42 /** Change a property in this layer's 'style' dictionary (if it has one),
43 and update every other layer that shares the same style dictionary. */
44 - (void) setValue: (id)value ofStyleProperty: (NSString*)prop;
46 /** Send a message to all sublayers in my tree */
47 - (void) makeSublayersPerformSelector: (SEL)selector withObject: (id)object;
49 @property (readonly) CATransform3D aggregateTransform;
51 /** Call this to notify all sublayers that their aggregate transform has changed. */
52 - (void) changedTransform;
54 /** Called to notify that a superlayer's transform has changed. */
55 - (void) aggregateTransformChanged;
60 /** Moves a layer from one superlayer to another, without changing its position onscreen. */
61 void ChangeSuperlayer( CALayer *layer, CALayer *newSuperlayer, int index );
63 /** Removes a layer from its superlayer without any fade-out animation. */
64 void RemoveImmediately( CALayer *layer );
66 /** Disables animations until EndDisableAnimations is called. */
67 void BeginDisableAnimations(void);
68 void EndDisableAnimations(void);
70 CGColorRef GetEffectiveBackground( CALayer *layer );
72 NSString* StringFromTransform3D( CATransform3D xform );