Skip to content

Commit

Permalink
Fix up QLUIPrivate so that it builds cleanly in 64 bit.
Browse files Browse the repository at this point in the history
Cleaned up some warnings in main.
  • Loading branch information
dmaclach committed Sep 11, 2009
1 parent 1154032 commit 6e4a250
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
41 changes: 26 additions & 15 deletions QuickLookUI/QLUIPrivate.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
#import <Cocoa/Cocoa.h>

#if !NSINTEGER_DEFINED
// For people building on 10.4
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
#endif // NSINTEGER_DEFINED

@interface NSObject (QLPreviewPanelDelegate)
- (NSRect)previewPanel:(NSPanel*)panel frameForURL:(NSURL*)URL;
Expand All @@ -20,12 +31,12 @@ enum {
QLAppearEffect = 0,
QLFadeEffect,
QLZoomEffect
} QLPreviewPanelEffect;

};
typedef NSInteger QLPreviewPanelEffect;

@interface QLPreviewPanel : NSPanel {
QLAnimationWindowEffect *_currentEffect;
int _openingEffect;
QLPreviewPanelEffect _openingEffect;
BOOL _ignorePanelFrameChanges;
QLPreviewPanelReserved *_reserved;
double _openingTime;
Expand All @@ -34,7 +45,7 @@ enum {
+ (id)sharedPreviewPanel;
//+ (id)_previewPanel;
+ (BOOL)isSharedPreviewPanelLoaded;
- (id)initWithContentRect:(NSRect)fp8 styleMask:(unsigned int)fp24 backing:(unsigned int)fp28 defer:(BOOL)fp32;
- (id)initWithContentRect:(NSRect)fp8 styleMask:(NSUInteger)fp24 backing:(NSBackingStoreType)fp28 defer:(BOOL)fp32;
- (id)initWithCoder:(id)fp8;
- (void)dealloc;
- (BOOL)isOpaque;
Expand All @@ -50,27 +61,27 @@ enum {
- (void)setAutosizesAndCenters:(BOOL)fp8;
- (BOOL)autosizesAndCenters;
- (void)makeKeyAndOrderFront:(id)fp8;
- (void)makeKeyAndOrderFrontWithEffect:(int)fp8;
- (void)makeKeyAndGoFullscreenWithEffect:(int)fp8;
- (void)makeKeyAndOrderFrontWithEffect:(int)fp8 canClose:(BOOL)fp12;
- (void)_makeKeyAndOrderFrontWithEffect:(int)fp8 canClose:(BOOL)fp12 willOpen:(BOOL)fp16 toFullscreen:(BOOL)fp20;
- (int)openingEffect;
- (void)makeKeyAndOrderFrontWithEffect:(QLPreviewPanelEffect)fp8;
- (void)makeKeyAndGoFullscreenWithEffect:(QLPreviewPanelEffect)fp8;
- (void)makeKeyAndOrderFrontWithEffect:(QLPreviewPanelEffect)fp8 canClose:(BOOL)fp12;
- (void)_makeKeyAndOrderFrontWithEffect:(QLPreviewPanelEffect)fp8 canClose:(BOOL)fp12 willOpen:(BOOL)fp16 toFullscreen:(BOOL)fp20;
- (QLPreviewPanelEffect)openingEffect;
- (void)closePanel;
- (void)close;
- (void)closeWithEffect:(int)fp8;
- (void)closeWithEffect:(int)fp8 canReopen:(BOOL)fp12;
- (void)_closeWithEffect:(int)fp8 canReopen:(BOOL)fp12;
- (void)closeWithEffect:(QLPreviewPanelEffect)fp8;
- (void)closeWithEffect:(QLPreviewPanelEffect)fp8 canReopen:(BOOL)fp12;
- (void)_closeWithEffect:(QLPreviewPanelEffect)fp8 canReopen:(BOOL)fp12;
- (void)windowEffectDidTerminate:(id)fp8;
- (void)_close:(id)fp8;
- (void)sendEvent:(id)fp8;
- (void)selectNextItem;
- (void)selectPreviousItem;
- (void)setURLs:(id)fp8 currentIndex:(unsigned int)fp12 preservingDisplayState:(BOOL)fp16;
- (void)setURLs:(id)fp8 currentIndex:(NSUInteger)fp12 preservingDisplayState:(BOOL)fp16;
- (void)setURLs:(id)fp8 preservingDisplayState:(BOOL)fp12;
- (void)setURLs:(id)fp8;
- (id)URLs;
- (unsigned int)indexOfCurrentURL;
- (void)setIndexOfCurrentURL:(unsigned int)fp8;
- (NSUInteger)indexOfCurrentURL;
- (void)setIndexOfCurrentURL:(NSUInteger)fp8;
- (void)setDelegate:(id)fp8;
- (id)sharedPreviewView;
- (void)setSharedPreviewView:(id)fp8;
Expand Down
4 changes: 2 additions & 2 deletions UndocumentedGoodness/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ int main(int argc, char *argv[])

NSLog(@"DEFINE");
NSString *word = @"onomatopoeia";
NSLog(DCSCopyTextDefinition (NULL, word, CFRangeMake(0, [word length])));
NSLog(@"%@", (NSString *)DCSCopyTextDefinition (NULL, (CFStringRef)word, CFRangeMake(0, [word length])));

NSURL *url = [NSURL fileURLWithPath:@"/Library/Dictionaries/New Oxford American Dictionary.dictionary"];

CFTypeRef dictionary = DCSDictionaryCreate((CFURLRef) url);
CFArrayRef records = DCSCopyRecordsForSearchString(dictionary, word, 0, 0);
CFArrayRef records = DCSCopyRecordsForSearchString(dictionary, (CFStringRef)word, 0, 0);

for (id record in (NSArray *)records) {
NSLog(@"dict %@", DCSRecordCopyData(record) );
Expand Down

0 comments on commit 6e4a250

Please sign in to comment.