PageRenderTime 14ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.h

http://macfuse.googlecode.com/
C++ Header | 46 lines | 8 code | 4 blank | 34 comment | 0 complexity | 5a9329949cd098a576c6f65cdd200446 MD5 | raw file
 1//
 2//  GTMCALayer+UnitTesting.h
 3//
 4//  Code for making unit testing of graphics/UI easier. Generally you
 5//  will only want to look at the macros:
 6//    GTMAssertDrawingEqualToFile
 7//    GTMAssertViewRepEqualToFile
 8//  and the protocol GTMUnitTestCALayerDrawer. When using these routines
 9//  make sure you are using device colors and not calibrated/generic colors
10//  or else your test graphics WILL NOT match across devices/graphics cards.
11//
12//  Copyright 2006-2008 Google Inc.
13//
14//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
15//  use this file except in compliance with the License.  You may obtain a copy
16//  of the License at
17// 
18//  http://www.apache.org/licenses/LICENSE-2.0
19// 
20//  Unless required by applicable law or agreed to in writing, software
21//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
22//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
23//  License for the specific language governing permissions and limitations under
24//  the License.
25//
26
27#import <QuartzCore/QuartzCore.h>
28#import "GTMNSObject+UnitTesting.h"
29
30//  Category for making unit testing of graphics/UI easier.
31
32//  Allows you to take a state of a view. Supports both image and state.
33//  See GTMNSObject+UnitTesting.h for details.
34@interface CALayer (GTMUnitTestingAdditions) <GTMUnitTestingImaging>
35//  Returns whether gtm_unitTestEncodeState should recurse into sublayers
36//
37//  Returns:
38//    should gtm_unitTestEncodeState pick up sublayer state.
39- (BOOL)gtm_shouldEncodeStateForSublayers;
40@end
41
42@interface NSObject (GTMCALayerUnitTestingDelegateMethods)
43// Delegate method that allows a delegate for a layer to
44// decide whether we should recurse 
45- (BOOL)gtm_shouldEncodeStateForSublayersOfLayer:(CALayer*)layer;
46@end