Skip to content

Commit

Permalink
Clean Up POP Imports
Browse files Browse the repository at this point in the history
A bunch were out of order and didn't really all follow the same style, this cleans them up and fixes some inconsistent imports.
  • Loading branch information
b3ll committed Mar 23, 2015
1 parent 29b17e4 commit 147f248
Show file tree
Hide file tree
Showing 25 changed files with 66 additions and 36 deletions.
2 changes: 2 additions & 0 deletions pop-tests/POPAnimatable.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
*/

#import <CoreGraphics/CoreGraphics.h>

#import <Foundation/Foundation.h>

#import <QuartzCore/QuartzCore.h>

@interface POPAnimatable : NSObject
Expand Down
4 changes: 3 additions & 1 deletion pop-tests/POPBaseAnimationTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import <cmath>

#import <XCTest/XCTest.h>

#import "POPCGUtils.h"
#import <cmath>

@class CALayer;
@class POPAnimator;
Expand Down
3 changes: 2 additions & 1 deletion pop-tests/POPCustomAnimationTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import <OCMock/OCMock.h>

#import <XCTest/XCTest.h>

#import <OCMock/OCMock.h>
#import <pop/POPCustomAnimation.h>

#import "POPAnimatable.h"
Expand Down
4 changes: 2 additions & 2 deletions pop-tests/POPEaseInEaseOutAnimationTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import <QuartzCore/QuartzCore.h>

#import <OCMock/OCMock.h>

#import <QuartzCore/QuartzCore.h>

#import <XCTest/XCTest.h>

#import <pop/POP.h>
Expand Down
5 changes: 3 additions & 2 deletions pop-tests/POPSpringAnimationTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import <XCTest/XCTest.h>

#import <OCMock/OCMock.h>

#import <QuartzCore/QuartzCore.h>

#import <XCTest/XCTest.h>

#import <pop/POPAnimation.h>
#import <pop/POPAnimationPrivate.h>
#import <pop/POPAnimator.h>
Expand Down
5 changes: 3 additions & 2 deletions pop/POP.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#ifndef POP_POP_H
#define POP_POP_H

#import <pop/POPDefines.h>

#import <pop/POPAnimatableProperty.h>
#import <pop/POPAnimation.h>
#import <pop/POPAnimationEvent.h>
Expand All @@ -19,10 +21,9 @@
#import <pop/POPBasicAnimation.h>
#import <pop/POPCustomAnimation.h>
#import <pop/POPDecayAnimation.h>
#import <pop/POPDefines.h>
#import <pop/POPGeometry.h>
#import <pop/POPLayerExtras.h>
#import <pop/POPPropertyAnimation.h>
#import <pop/POPSpringAnimation.h>
#import <pop/POPLayerExtras.h>

#endif /* POP_POP_H */
1 change: 1 addition & 0 deletions pop/POPAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define POPACTION_H

#import <QuartzCore/CATransaction.h>

#import <pop/POPDefines.h>

#ifdef __cplusplus
Expand Down
3 changes: 3 additions & 0 deletions pop/POPAnimatableProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
*/

#import <CoreGraphics/CoreGraphics.h>

#import <Foundation/NSObject.h>

#import <pop/POPDefines.h>

@class POPMutableAnimatableProperty;

/**
Expand Down
7 changes: 4 additions & 3 deletions pop/POPAnimatableProperty.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
*/

#import "POPAnimatableProperty.h"
#import "POPCGUtils.h"
#import "POPAnimationRuntime.h"

#import <QuartzCore/QuartzCore.h>

#import <pop/POPLayerExtras.h>
#import "POPAnimationRuntime.h"
#import "POPCGUtils.h"
#import "POPDefines.h"
#import "POPLayerExtras.h"

// common threshold definitions
static CGFloat const kPOPThresholdColor = 0.01;
Expand Down
6 changes: 3 additions & 3 deletions pop/POPAnimation.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import "POPAnimationExtras.h"
#import "POPAnimationInternal.h"
#import "POPAnimationTracerInternal.h"

#import <objc/runtime.h>

#import "POPAnimationExtras.h"
#import "POPAction.h"
#import "POPAnimationRuntime.h"
#import "POPAnimationTracerInternal.h"
#import "POPAnimatorPrivate.h"
#import "POPAction.h"

using namespace POP;

Expand Down
4 changes: 2 additions & 2 deletions pop/POPAnimationExtras.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
*/

#import "POPAnimationExtras.h"

#import "POPAnimationPrivate.h"
#import "POPMath.h"

#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
Expand All @@ -20,6 +18,8 @@
UIKIT_EXTERN float UIAnimationDragCoefficient(); // UIKit private drag coeffient, use judiciously
#endif

#import "POPMath.h"

CGFloat POPAnimationDragCoefficient()
{
#if TARGET_IPHONE_SIMULATOR
Expand Down
5 changes: 3 additions & 2 deletions pop/POPAnimationInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import "POPAnimation.h"

#import <QuartzCore/CAMediaTimingFunction.h>

#import "POPAnimation.h"
#import "POPAction.h"
#import "POPAnimationRuntime.h"
#import "POPAnimationTracerInternal.h"
#import "POPSpringSolver.h"
#import "POPAction.h"

using namespace POP;

Expand Down
4 changes: 2 additions & 2 deletions pop/POPAnimationRuntime.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#import <UIKit/UIKit.h>
#endif

#import "POPVector.h"
#import "POPAnimationRuntime.h"
#import "POPCGUtils.h"
#import "POPDefines.h"
#import "POPGeometry.h"
#import "POPVector.h"

static Boolean pointerEqual(const void *ptr1, const void *ptr2) {
return ptr1 == ptr2;
Expand Down
11 changes: 6 additions & 5 deletions pop/POPAnimator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@
#import "POPAnimatorPrivate.h"

#import <list>
#import <objc/objc-auto.h>
#import <vector>

#if !TARGET_OS_IPHONE
#import <libkern/OSAtomic.h>
#endif

#import <objc/objc-auto.h>

#import <QuartzCore/QuartzCore.h>

#import "POPAnimation.h"
#import "POPAnimationExtras.h"
#import "POPBasicAnimationInternal.h"
#import "POPDecayAnimation.h"

#if !TARGET_OS_IPHONE
#import <libkern/OSAtomic.h>
#endif

using namespace std;
using namespace POP;

Expand Down
1 change: 1 addition & 0 deletions pop/POPBasicAnimationInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

#import "POPBasicAnimation.h"

#import "POPPropertyAnimationInternal.h"

// default animation duration
Expand Down
3 changes: 2 additions & 1 deletion pop/POPCGUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

#import <CoreGraphics/CoreGraphics.h>
#import "POPDefines.h"

#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
Expand All @@ -20,6 +19,8 @@
#import <SceneKit/SceneKit.h>
#endif

#import "POPDefines.h"

POP_EXTERN_C_BEGIN

NS_INLINE CGPoint values_to_point(const CGFloat values[])
Expand Down
3 changes: 2 additions & 1 deletion pop/POPCustomAnimation.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import "POPCustomAnimation.h"
#import "POPAnimationInternal.h"

#import "POPCustomAnimation.h"

@interface POPCustomAnimation ()
@property (nonatomic, copy) POPCustomAnimationBlock animate;
@end
Expand Down
3 changes: 2 additions & 1 deletion pop/POPDecayAnimationInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
*/

#import "POPDecayAnimation.h"
#import "POPPropertyAnimationInternal.h"

#import <cmath>

#import "POPPropertyAnimationInternal.h"

// minimal velocity factor before decay animation is considered complete, in units / s
static CGFloat kPOPAnimationDecayMinimalVelocityFactor = 5.;

Expand Down
1 change: 1 addition & 0 deletions pop/POPMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

#import <Foundation/Foundation.h>

#import <CoreGraphics/CoreGraphics.h>

#import "POPDefines.h"
Expand Down
3 changes: 2 additions & 1 deletion pop/POPMath.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
*/

#import "POPMath.h"
#import "UnitBezier.h"

#import "POPAnimationPrivate.h"
#import "UnitBezier.h"

void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f)
{
Expand Down
3 changes: 2 additions & 1 deletion pop/POPSpringAnimationInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
of patent rights can be found in the PATENTS file in the same directory.
*/

#import <cmath>

#import "POPAnimationExtras.h"
#import "POPPropertyAnimationInternal.h"
#import <cmath>

struct _POPSpringAnimationState : _POPPropertyAnimationState
{
Expand Down
13 changes: 8 additions & 5 deletions pop/POPVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@
#include <iostream>
#include <vector>

#import <CoreGraphics/CoreGraphics.h>
#import <objc/NSObjCRuntime.h>
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#endif

#import "POPMath.h"
#import <CoreGraphics/CoreGraphics.h>

#import "POPDefines.h"

#if SCENEKIT_SDK_AVAILABLE
#import <SceneKit/SceneKit.h>
#endif

#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#endif

#import "POPMath.h"

namespace POP {

/** Fixed two-size vector class */
Expand Down
2 changes: 2 additions & 0 deletions pop/POPVector.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*/

#import "POPVector.h"

#import "POPDefines.h"
#import "POPCGUtils.h"

namespace POP
Expand Down
4 changes: 3 additions & 1 deletion pop/WebCore/TransformationMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
*/

#include "TransformationMatrix.h"
#include "FloatConversion.h"

#include <math.h>

#include "FloatConversion.h"

inline double deg2rad(double d) { return d * M_PI / 180.0; }
inline double rad2deg(double r) { return r * 180.0 / M_PI; }
inline double deg2grad(double d) { return d * 400.0 / 360.0; }
Expand Down
2 changes: 2 additions & 0 deletions pop/WebCore/TransformationMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
#define TransformationMatrix_h

#include <string.h> //for memcpy

#include <CoreGraphics/CGAffineTransform.h>

#include <QuartzCore/QuartzCore.h>

namespace WebCore {
Expand Down

0 comments on commit 147f248

Please sign in to comment.