PageRenderTime 24ms CodeModel.GetById 14ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/src/PluginInstance.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 74 lines | 48 code | 4 blank | 22 comment | 0 complexity | e759fb003c8b8c13df9653c34e1a2e40 MD5 | raw file
 1/*
 2 * Copyright (c) 2008 Samuel Gross.
 3 *
 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
 5 * of this software and associated documentation files (the "Software"), to deal
 6 * in the Software without restriction, including without limitation the rights
 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 * copies of the Software, and to permit persons to whom the Software is
 9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22#include "npapi.h";
23
24class PDFService;
25class PDFPluginShim;
26
27@class SelectionController;
28@class PluginPDFView;
29@class PluginProgressView;
30
31@interface PluginInstance : NSObject {
32  IBOutlet PluginPDFView* pluginView;
33  IBOutlet PluginProgressView* progressView;
34  PDFView* pdfView;
35  NSView* parentView;
36  NPP _npp;
37  BOOL _attached;
38  SelectionController* selectionController;
39  NSMutableArray* _searchResults;
40  NSString* _plugin_id;
41  NSString* _url;
42  NSString* _mimeType;
43  NSData* _data;
44  BOOL written;
45  NSString *path;
46  PDFPluginShim* _shim;
47  PDFService* _pdfService;
48}
49- (BOOL)attached;
50- (void)attachToWindow:(NSWindow*)window at:(NSPoint)point;
51- (void)dealloc;
52- (id)initWithService:(PDFService*)pdfService plugin_id:(NSString*)plugin_id npp:(NPP)npp mimeType:(NSString*)mimeType;
53- (void)setProgress:(int)progress total:(int)total;
54- (void)downloadFailed;
55- (void)findPrevious;
56- (void)save;
57- (void)setData:(NSData*)data;
58- (void)setUrl:(NSString*)url;
59- (void)setVisible:(bool)visible;
60- (void)print;
61- (void)requestFocus;
62- (void)updatePreferences;
63// plugin shim methods
64- (void)copy;
65- (int)find:(NSString*)string caseSensitive:(bool)caseSensitive forwards:(bool)forwards;
66- (void)findAll:(NSString*)string caseSensitive:(bool)caseSensitive;
67- (void)removeHighlights;
68- (BOOL)zoom:(int)zoomArg;
69@end
70
71@interface PluginInstance (OpenWithFinder)
72- (void)openWithFinder;
73- (NSData *)convertPostScriptDataSourceToPDF:(NSData *)data;
74@end