Skip to content

Commit

Permalink
adding methods from previous project
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Feb 5, 2012
1 parent 75b2f3a commit b9ee833
Show file tree
Hide file tree
Showing 7 changed files with 1,038 additions and 3,931 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
ViewDown.xcodeproj/project.xcworkspace/xcuserdata/martin.xcuserdatad/UserInterfaceState.xcuserstate
.DS_Store
ViewDown.xcodeproj/project.xcworkspace/xcuserdata/
File renamed without changes.
10 changes: 3 additions & 7 deletions ViewDown.xcodeproj/project.pbxproj
Expand Up @@ -15,7 +15,6 @@
5B6C29AD14DE24AB00D75D88 /* Document.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B6C29AB14DE24AB00D75D88 /* Document.xib */; };
5B6C29B014DE24AB00D75D88 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B6C29AE14DE24AB00D75D88 /* MainMenu.xib */; };
5B6C29C114DE254E00D75D88 /* md.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5B6C29BE14DE254E00D75D88 /* md.icns */; };
5B6C29C214DE254E00D75D88 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 5B6C29BF14DE254E00D75D88 /* README.md */; };
5B6C29C614DE256100D75D88 /* ViewDown.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5B6C29C514DE256100D75D88 /* ViewDown.icns */; };
5B6C29C914DE25B300D75D88 /* empty.html in Resources */ = {isa = PBXBuildFile; fileRef = 5B6C29C714DE25B300D75D88 /* empty.html */; };
5B6C29CA14DE25B300D75D88 /* userstyles.css in Resources */ = {isa = PBXBuildFile; fileRef = 5B6C29C814DE25B300D75D88 /* userstyles.css */; };
Expand All @@ -38,7 +37,6 @@
5B6C29AC14DE24AB00D75D88 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Document.xib; sourceTree = "<group>"; };
5B6C29AF14DE24AB00D75D88 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
5B6C29BE14DE254E00D75D88 /* md.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = md.icns; sourceTree = "<group>"; };
5B6C29BF14DE254E00D75D88 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
5B6C29C514DE256100D75D88 /* ViewDown.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = ViewDown.icns; sourceTree = "<group>"; };
5B6C29C714DE25B300D75D88 /* empty.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = empty.html; path = "../../viewdown-/ViewDown/empty.html"; sourceTree = "<group>"; };
5B6C29C814DE25B300D75D88 /* userstyles.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = userstyles.css; path = "../../viewdown-/ViewDown/userstyles.css"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -105,9 +103,8 @@
5B6C29C714DE25B300D75D88 /* empty.html */,
5B6C29AE14DE24AB00D75D88 /* MainMenu.xib */,
5B6C29BE14DE254E00D75D88 /* md.icns */,
5B6C29BF14DE254E00D75D88 /* README.md */,
5B6C299D14DE24AB00D75D88 /* Supporting Files */,
5B6C29C814DE25B300D75D88 /* userstyles.css */,
5B6C299D14DE24AB00D75D88 /* Supporting Files */,
);
path = ViewDown;
sourceTree = "<group>";
Expand Down Expand Up @@ -179,7 +176,6 @@
5B6C29AD14DE24AB00D75D88 /* Document.xib in Resources */,
5B6C29B014DE24AB00D75D88 /* MainMenu.xib in Resources */,
5B6C29C114DE254E00D75D88 /* md.icns in Resources */,
5B6C29C214DE254E00D75D88 /* README.md in Resources */,
5B6C29C614DE256100D75D88 /* ViewDown.icns in Resources */,
5B6C29C914DE25B300D75D88 /* empty.html in Resources */,
5B6C29CA14DE25B300D75D88 /* userstyles.css in Resources */,
Expand Down Expand Up @@ -254,7 +250,7 @@
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
Expand All @@ -275,7 +271,7 @@
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
Expand Down
40 changes: 39 additions & 1 deletion ViewDown/Document.h
Expand Up @@ -7,7 +7,45 @@
//

#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>

@interface Document : NSDocument
@interface Document : NSDocument <NSWindowDelegate>
{
@private

NSFileManager* fm;
NSMutableArray* pathsToWatch;
NSNumber* lastEventId;
FSEventStreamRef stream;

NSString *monitored;
NSDate *lastModified;

NSDate *lastBuilt;

NSString* tmpFile;

NSString* markdownPath;

NSData *head;
NSData *tail;

NSPoint savedScrollPosition;
BOOL scrollToLast;

}

@property (strong) IBOutlet WebView *web;

// called by FSEvent callback
-(void)scanDir:(NSString*)path lastEventId:(uint64_t)eventId;

////////////////// Delegate methods for WebView
-(NSUInteger)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id<NSDraggingInfo>)draggingInfo;

-(void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id <NSDraggingInfo>)draggingInfo;

-(void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame;
/////////////////////////////////////////////////

@end

0 comments on commit b9ee833

Please sign in to comment.