Skip to content
This repository has been archived by the owner on Apr 21, 2019. It is now read-only.

Commit

Permalink
Further fixes for compilability.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Jun 8, 2010
1 parent ed098ad commit b977887
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 57 deletions.
10 changes: 1 addition & 9 deletions PhotoLibrary/CLLocationManagerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,4 @@

#import "NSObject.h"


@protocol CLLocationManagerDelegate <NSObject>
@optional
-(void)locationManager:(id)manager didUpdateToLocation:(id)location fromLocation:(id)location3;
-(void)locationManager:(id)manager didUpdateHeading:(id)heading;
-(BOOL)locationManagerShouldDisplayHeadingCalibration:(id)locationManager;
-(void)locationManager:(id)manager didFailWithError:(id)error;
@end

#import <CoreLocation/CLLocationManagerDelegate.h>
8 changes: 1 addition & 7 deletions PhotoLibrary/MLPhotoBakedThumbnailsDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,4 @@
* Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
*/

#import "PhotoLibrary-Structs.h"


@protocol MLPhotoBakedThumbnailsDelegate
-(void)decorateThumbnail:(id)thumbnail inContext:(CGContextRef)context;
@end

#import <MusicLibrary/MLPhotoBakedThumbnailsDelegate.h>
2 changes: 1 addition & 1 deletion PhotoLibrary/PLDataArrayInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#import "PhotoLibrary-Structs.h"
#import <Foundation/NSInputStream.h>
#import <Foundation/NSStream.h>

@class NSArray, NSMutableData;
@protocol PLDataArrayInputStreamProgressDelegate;
Expand Down
52 changes: 52 additions & 0 deletions PhotoLibrary/PLImageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,57 @@
* Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
*/

#import <Availability2.h>

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2

// me being lazy here. no diff.

#import <UIKit/UIImageView.h>
@class PLVideoView, UILabel, NSString;

@interface PLImageView : UIImageView {
NSString* _name;
UIView* _borderView;
PLVideoView* _videoView;
UILabel* _textBadge;
unsigned _shadowEnabled : 1;
unsigned _suppressShadowDrawing : 1;
unsigned _borderIsVisible : 1;
float _aspectRatio;
double _lastBorderAlphaTime;
double _lastShadowAlphaTime;
float _transitionProgress;
BOOL _edgeAntialiasingEnabled;
}
@property(copy, nonatomic) NSString* name;
@property(assign, nonatomic) float transitionProgress;
@property(retain, nonatomic) PLVideoView* videoView;
@property(assign, nonatomic) float borderAlpha;
@property(assign, nonatomic, getter=isBorderVisible) BOOL borderVisible;
@property(assign, nonatomic, getter=isDimmed) BOOL dimmed;
@property(assign, nonatomic, getter=isShadowEnabled) BOOL shadowEnabled;
+(void)initialize;
+(BOOL)shouldDrawShadows;
+(id)textBadgeForString:(id)string photoSize:(CGSize)size;
-(id)textBadgeString;
-(void)setTextBadgeString:(id)string;
-(id)initWithFrame:(CGRect)frame;
-(void)dealloc;
-(CGSize)sizeThatFits:(CGSize)fits allowRounding:(BOOL)rounding;
-(CGSize)sizeThatFits:(CGSize)fits;
-(void)renderSnapshotInContext:(CGContextRef)context;
-(void)layoutSubviews;
-(void)_updateShadowPath;
-(void)setImage:(id)image;
-(void)parentDidLayout;
-(void)setBorderAlpha:(float)alpha forced:(BOOL)forced;
-(void)setBorderWidthScale:(float)scale heightScale:(float)scale2;
-(void)setEdgeAntialiasingEnabled:(BOOL)enabled;
@end

#else

#import "PhotoLibrary-Structs.h"
#import <UIKit/UITiledView.h>
#import "PLItemView.h"
Expand Down Expand Up @@ -92,3 +143,4 @@
-(void)zoomToWindowPoint:(CGPoint)windowPoint scale:(float)scale duration:(float)duration constrainScrollPoint:(BOOL)point event:(GSEventRef)event;
@end

#endif
6 changes: 6 additions & 0 deletions PhotoLibrary/PLImageViewTile.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
*/

#import <Availability2.h>

#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_3_2

#import "PhotoLibrary-Structs.h"
#import <UIKit/UITile.h>

Expand All @@ -17,3 +21,5 @@
-(void)setFrame:(CGRect)frame;
@end

#endif

5 changes: 5 additions & 0 deletions PhotoLibrary/PLTVOutImageTileView.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
*/

#import <Availability2.h>

#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_3_2

#import "PhotoLibrary-Structs.h"
#import "PLImageTileView.h"

Expand All @@ -17,3 +21,4 @@
// inherited: -(CGSize)imageSize;
@end

#endif
11 changes: 1 addition & 10 deletions PhotoLibrary/UIImagePickerControllerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,4 @@
* Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
*/

#import "NSObject.h"


@protocol UIImagePickerControllerDelegate <NSObject>
@optional
-(void)imagePickerController:(id)controller didFinishPickingImage:(id)image editingInfo:(id)info;
-(void)imagePickerController:(id)controller didFinishPickingMediaWithInfo:(id)info;
-(void)imagePickerControllerDidCancel:(id)imagePickerController;
@end

#import <UIKit/UIImagePickerController.h>
2 changes: 1 addition & 1 deletion Preferences/PSTableCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#import "Preferences-Structs.h"
#import "PSTableCell.h"
#import "PSSpecifier.h"
#import <UIKit/UIPreferencesTableCell.h>


Expand Down
8 changes: 1 addition & 7 deletions SpringBoard/APSConnectionDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,5 @@
* Source: (null)
*/

#import "NSObject.h"


@protocol APSConnectionDelegate <NSObject>
-(void)connection:(id)connection didReceivePublicToken:(id)token;
-(void)connection:(id)connection didReceiveMessageForTopic:(id)topic userInfo:(id)info;
@end
#import <Message/APSConnectionDelegate.h>

12 changes: 1 addition & 11 deletions SpringBoard/SpringBoard-Structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#import <AppSupport/AppSupport.h>
#import <ChatKit/ChatKit.h>
#import <QuartzCore/QuartzCore2.h>
#import <DataAccess/DataAccess.h>

typedef struct __CTCall* CTCallRef;

Expand Down Expand Up @@ -41,21 +42,10 @@ typedef struct {
long long voicemailID;
} XXStruct_EX3dgA;

typedef struct {
int _field1;
BOOL _field2;
BOOL _field3;
BOOL _field4;
BOOL _field5;
double _field6;
} XXStruct_fhKmAA;

typedef struct CalEventExpirationMonitor CalEventExpirationMonitor;

typedef struct CalAlarmEngine CalAlarmEngine;

typedef struct CalDatabase CalDatabase;

typedef struct {
double _field1;
double _field2;
Expand Down
4 changes: 1 addition & 3 deletions SpringBoardServices/SpringBoardServices.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ extern "C" {
void SBReloadApplication(mach_port_t port) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0);
*/


#endif


#if __cplusplus
}
#endif
Expand Down
7 changes: 1 addition & 6 deletions TelephonyUI/TelephonyUI-Structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
*/

#import <GraphicsServices/GraphicsServices.h>

typedef struct {
CGRect _field1;
CGRect _field2;
CGRect _field3;
} XXStruct_SIyEID;
#import <PhotoLibrary/PhotoLibrary.h>


6 changes: 4 additions & 2 deletions test-compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

from os import listdir, fdopen, system, remove, close
from os.path import isdir
from os.path import isdir, exists, join
from subprocess import Popen, PIPE, STDOUT
import sys

Expand All @@ -32,7 +32,9 @@
content = []
for dirname in listdir('.'):
if dirname[0].isupper() and isdir(dirname):
content.append('#import <{0}/{0}.h>'.format(dirname))
mainname = join(dirname, dirname + '.h')
if exists(mainname):
content.append('#import <{0}>'.format(mainname))
elif dirname[-2:] == '.h':
content.append('#import <{0}>'.format(dirname))
content_string = "\n".join(content).encode()
Expand Down

0 comments on commit b977887

Please sign in to comment.