123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #import <Cocoa/Cocoa.h>
- #import "synctex_parser.h"
- enum {
- SKPDFSynchronizerDefaultOptions = 0,
- SKPDFSynchronizerShowReadingBarMask = 1 << 0,
- SKPDFSynchronizerFlippedMask = 1 << 1,
- };
- @protocol SKPDFSynchronizerDelegate;
- @interface SKPDFSynchronizer : NSObject {
- id <SKPDFSynchronizerDelegate> delegate;
-
- dispatch_queue_t queue;
- dispatch_queue_t lockQueue;
-
- NSString *syncFileName;
-
- BOOL isPdfsync;
-
- NSFileManager *fileManager;
-
- NSMutableArray *pages;
- NSMapTable *lines;
-
- NSMapTable *filenames;
- synctex_scanner_p scanner;
-
- volatile int32_t shouldKeepRunning;
- }
- @property (nonatomic, strong) NSString *fileName;
- @property (nonatomic, strong) NSDate *lastModDate;
- @property (nonatomic, assign) id <SKPDFSynchronizerDelegate> delegate;
- @property (readonly) BOOL shouldKeepRunning;
- - (void)findFileAndLineForLocation:(NSPoint)point inRect:(NSRect)rect pageBounds:(NSRect)bounds atPageIndex:(NSUInteger)pageIndex;
- - (void)findPageAndLocationForLine:(NSInteger)line inFile:(NSString *)file options:(NSInteger)options;
- - (void)terminate;
- @end
- @protocol SKPDFSynchronizerDelegate <NSObject>
- - (void)synchronizer:(SKPDFSynchronizer *)synchronizer foundLine:(NSInteger)line inFile:(NSString *)file;
- - (void)synchronizer:(SKPDFSynchronizer *)synchronizer foundLocation:(NSPoint)point atPageIndex:(NSUInteger)pageIndex options:(NSInteger)options;
- @end
|