My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
Changes to /AppKit/NSDisplay.m
e5277a40a7e8 vs. 2470bd80abf4 Compare: vs.  Format:
Revision 2470bd80abf4
Go to: 
Project members, sign in to write a code review
/AppKit/NSDisplay.m   e5277a40a7e8 /AppKit/NSDisplay.m   2470bd80abf4
1 /* Copyright (c) 2006 Christopher J. W. Lloyd 1 /* Copyright (c) 2006-2007 Christopher J. W. Lloyd
2 2
3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 4
5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 6
7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
8 8
9 // Original - Christopher Lloyd <cjwl@objc.net> 9 // Original - Christopher Lloyd <cjwl@objc.net>
10 #import <AppKit/NSDisplay.h> 10 #import <AppKit/NSDisplay.h>
11 #import <AppKit/NSPlatform.h> 11 #import <AppKit/NSPlatform.h>
12 #import <AppKit/NSFont.h> 12 #import <AppKit/NSFont.h>
13 #import <AppKit/NSEvent_periodic.h> 13 #import <AppKit/NSEvent_periodic.h>
14 #import <AppKit/NSApplication.h> 14 #import <AppKit/NSApplication.h>
15 15
16 @implementation NSDisplay 16 @implementation NSDisplay
17 17
18 +(void)initialize { 18 +(void)initialize {
19 if(self==[NSDisplay class]){ 19 if(self==[NSDisplay class]){
20 NSDictionary *map=[NSDictionary dictionaryWithObjectsAndKeys: 20 NSDictionary *map=[NSDictionary dictionaryWithObjectsAndKeys:
21 @"Command",@"LeftControl", 21 @"Command",@"LeftControl",
22 @"Alt",@"LeftAlt", 22 @"Alt",@"LeftAlt",
23 @"Control",@"RightControl", 23 @"Control",@"RightControl",
24 @"Alt",@"RightAlt", 24 @"Alt",@"RightAlt",
25 nil]; 25 nil];
26 NSDictionary *modifierMapping=[NSDictionary dictionaryWithObject:map forKey:@"NSModifierFlagMapping"]; 26 NSDictionary *modifierMapping=[NSDictionary dictionaryWithObject:map forKey:@"NSModifierFlagMapping"];
27 27
28 [[NSUserDefaults standardUserDefaults] registerDefaults:modifierMapping]; 28 [[NSUserDefaults standardUserDefaults] registerDefaults:modifierMapping];
29 } 29 }
30 } 30 }
31 31
32 +(NSDisplay *)currentDisplay { 32 +(NSDisplay *)currentDisplay {
33 return NSThreadSharedInstance([[NSPlatform currentPlatform] displayClassName]); 33 return NSThreadSharedInstance([[NSPlatform currentPlatform] displayClassName]);
34 } 34 }
35 35
36 -init { 36 -init {
37 _fontCacheCapacity=4; 37 _fontCacheCapacity=4;
38 _fontCacheSize=0; 38 _fontCacheSize=0;
39 _fontCache=NSZoneMalloc([self zone],sizeof(NSFont *)*_fontCacheCapacity); 39 _fontCache=NSZoneMalloc([self zone],sizeof(NSFont *)*_fontCacheCapacity);
40 _eventMask=0; 40 _eventMask=0;
41 _eventQueue=[NSMutableArray new]; 41 _eventQueue=[NSMutableArray new];
42 _periodicTimer=nil; 42 _periodicTimer=nil;
43 return self; 43 return self;
44 } 44 }
45 45
46 -(void)showSplashImage { 46 -(void)showSplashImage {
47 NSInvalidAbstractInvocation(); 47 NSInvalidAbstractInvocation();
48 } 48 }
49 49
50 -(void)closeSplashImage { 50 -(void)closeSplashImage {
51 NSInvalidAbstractInvocation(); 51 NSInvalidAbstractInvocation();
52 } 52 }
53 53
54 -(NSArray *)screens { 54 -(NSArray *)screens {
55 NSInvalidAbstractInvocation(); 55 NSInvalidAbstractInvocation();
56 return nil; 56 return nil;
57 } 57 }
58 58
59 -(NSPasteboard *)pasteboardWithName:(NSString *)name { 59 -(NSPasteboard *)pasteboardWithName:(NSString *)name {
60 NSInvalidAbstractInvocation(); 60 NSInvalidAbstractInvocation();
61 return nil; 61 return nil;
62 } 62 }
63 63
64 -(NSDraggingManager *)draggingManager { 64 -(NSDraggingManager *)draggingManager {
65 NSInvalidAbstractInvocation(); 65 NSInvalidAbstractInvocation();
66 return nil; 66 return nil;
67 } 67 }
68 68
69 -(CGWindow *)windowWithFrame:(NSRect)frame styleMask:(unsigned)styleMask backingType:(unsigned)backingType { 69 -(CGWindow *)windowWithFrame:(NSRect)frame styleMask:(unsigned)styleMask backingType:(unsigned)backingType {
70 NSInvalidAbstractInvocation(); 70 NSInvalidAbstractInvocation();
71 return nil; 71 return nil;
72 } 72 }
73 73
74 -(CGWindow *)panelWithFrame:(NSRect)frame styleMask:(unsigned)styleMask backingType:(unsigned)backingType { 74 -(CGWindow *)panelWithFrame:(NSRect)frame styleMask:(unsigned)styleMask backingType:(unsigned)backingType {
75 NSInvalidAbstractInvocation(); 75 NSInvalidAbstractInvocation();
76 return nil; 76 return nil;
77 } 77 }
78 78
79 -(CGRenderingContext *)bitmapRenderingContextWithSize:(NSSize)size { 79 -(CGRenderingContext *)bitmapRenderingContextWithSize:(NSSize)size {
80 NSInvalidAbstractInvocation(); 80 NSInvalidAbstractInvocation();
81 return nil; 81 return nil;
82 } 82 }
83 83
84 -(NSColor *)colorWithName:(NSString *)colorName { 84 -(NSColor *)colorWithName:(NSString *)colorName {
85 NSInvalidAbstractInvocation(); 85 NSInvalidAbstractInvocation();
86 return nil; 86 return nil;
87 } 87 }
88 88
89 -(NSString *)menuFontNameAndSize:(float *)pointSize { 89 -(NSString *)menuFontNameAndSize:(float *)pointSize {
90 NSInvalidAbstractInvocation(); 90 NSInvalidAbstractInvocation();
91 return nil; 91 return nil;
92 } 92 }
93 93
94 -(unsigned)_cacheIndexOfFontWithName:(NSString *)name size:(float)size { 94 -(unsigned)_cacheIndexOfFontWithName:(NSString *)name size:(float)size {
95 unsigned i; 95 unsigned i;
96 96
97 for(i=0;i<_fontCacheSize;i++){ 97 for(i=0;i<_fontCacheSize;i++){
98 NSFont *check=_fontCache[i]; 98 NSFont *check=_fontCache[i];
99 99
100 if(check!=nil && [[check fontName] isEqualToString:name] && [check pointSize]==size) 100 if(check!=nil && [[check fontName] isEqualToString:name] && [check pointSize]==size)
101 return i; 101 return i;
102 } 102 }
103 103
104 return NSNotFound; 104 return NSNotFound;
105 } 105 }
106 106
107 -(NSFont *)cachedFontWithName:(NSString *)name size:(float)size { 107 -(NSFont *)cachedFontWithName:(NSString *)name size:(float)size {
108 unsigned i=[self _cacheIndexOfFontWithName:name size:size]; 108 unsigned i=[self _cacheIndexOfFontWithName:name size:size];
109 109
110 return (i==NSNotFound)?nil:_fontCache[i]; 110 return (i==NSNotFound)?nil:_fontCache[i];
111 } 111 }
112 112
113 -(void)addFontToCache:(NSFont *)font { 113 -(void)addFontToCache:(NSFont *)font {
114 unsigned i; 114 unsigned i;
115 115
116 for(i=0;i<_fontCacheSize;i++){ 116 for(i=0;i<_fontCacheSize;i++){
117 if(_fontCache[i]==nil){ 117 if(_fontCache[i]==nil){
118 _fontCache[i]=font; 118 _fontCache[i]=font;
119 return; 119 return;
120 } 120 }
121 } 121 }
122 122
123 if(_fontCacheSize>=_fontCacheCapacity){ 123 if(_fontCacheSize>=_fontCacheCapacity){
124 _fontCacheCapacity*=2; 124 _fontCacheCapacity*=2;
125 _fontCache=NSZoneRealloc([self zone],_fontCache,sizeof(NSFont *)*_fontCacheCapacity); 125 _fontCache=NSZoneRealloc([self zone],_fontCache,sizeof(NSFont *)*_fontCacheCapacity);
126 } 126 }
127 _fontCache[_fontCacheSize++]=font; 127 _fontCache[_fontCacheSize++]=font;
128 } 128 }
129 129
130 -(void)removeFontFromCache:(NSFont *)font { 130 -(void)removeFontFromCache:(NSFont *)font {
131 unsigned i=[self _cacheIndexOfFontWithName:[font fontName] size:[font pointSize]]; 131 unsigned i=[self _cacheIndexOfFontWithName:[font fontName] size:[font pointSize]];
132 132
133 if(i!=NSNotFound) 133 if(i!=NSNotFound)
134 _fontCache[i]=nil; 134 _fontCache[i]=nil;
135 } 135 }
136 136
137 -(NSTimeInterval)textCaretBlinkInterval { 137 -(NSTimeInterval)textCaretBlinkInterval {
138 NSInvalidAbstractInvocation(); 138 NSInvalidAbstractInvocation();
139 return 1; 139 return 1;
140 } 140 }
141 141
142 -(void)hideCursor { 142 -(void)hideCursor {
143 NSInvalidAbstractInvocation(); 143 NSInvalidAbstractInvocation();
144 } 144 }
145 145
146 -(void)unhideCursor { 146 -(void)unhideCursor {
147 NSInvalidAbstractInvocation(); 147 NSInvalidAbstractInvocation();
148 } 148 }
149 149
150 // Arrow, IBeam, HorizontalResize, VerticalResize 150 // Arrow, IBeam, HorizontalResize, VerticalResize
151 -(id)cursorWithName:(NSString *)name { 151 -(id)cursorWithName:(NSString *)name {
152 NSInvalidAbstractInvocation(); 152 NSInvalidAbstractInvocation();
153 return nil; 153 return nil;
154 } 154 }
155 155
156 -(void)setCursor:(id)cursor { 156 -(void)setCursor:(id)cursor {
157 NSInvalidAbstractInvocation(); 157 NSInvalidAbstractInvocation();
158 } 158 }
159 159
160 -(NSEvent *)nextEventMatchingMask:(unsigned)mask untilDate:(NSDate *)untilDate inMode:(NSString *)mode dequeue:(BOOL)dequeue { 160 -(NSEvent *)nextEventMatchingMask:(unsigned)mask untilDate:(NSDate *)untilDate inMode:(NSString *)mode dequeue:(BOOL)dequeue {
161 NSEvent *result; 161 NSEvent *result;
162 162
163 _eventMask=mask; 163 _eventMask=mask;
164 164
165 [[NSRunLoop currentRunLoop] runMode:mode beforeDate:untilDate]; 165 [[NSRunLoop currentRunLoop] runMode:mode beforeDate:untilDate];
166 166
167 if([_eventQueue count]==0) 167 if([_eventQueue count]==0)
168 result=[[[NSEvent alloc] initWithType:NSAppKitSystem location:NSMakePoint(0,0) modifierFlags:0 window:nil] autorelease]; 168 result=[[[NSEvent alloc] initWithType:NSAppKitSystem location:NSMakePoint(0,0) modifierFlags:0 window:nil] autorelease];
169 else { 169 else {
170 result=[[[_eventQueue objectAtIndex:0] retain] autorelease]; 170 result=[[[_eventQueue objectAtIndex:0] retain] autorelease];
171 171
172 if(dequeue) 172 if(dequeue)
173 [_eventQueue removeObjectAtIndex:0]; 173 [_eventQueue removeObjectAtIndex:0];
174 } 174 }
175 175
176 return result; 176 return result;
177 } 177 }
178 178
179 -(void)discardEventsMatchingMask:(unsigned)mask beforeEvent:(NSEvent *)event { 179 -(void)discardEventsMatchingMask:(unsigned)mask beforeEvent:(NSEvent *)event {
180 int count=[_eventQueue count]; 180 int count=[_eventQueue count];
181 181
182 while(--count>=0){ 182 while(--count>=0){
183 NSEvent *check=[_eventQueue objectAtIndex:count]; 183 NSEvent *check=[_eventQueue objectAtIndex:count];
184 184
185 if(check==event) 185 if(check==event)
186 break; 186 break;
187 } 187 }
188 188
189 while(--count>=0){ 189 while(--count>=0){
190 if(NSEventMaskFromType([event type])&mask) 190 if(NSEventMaskFromType([event type])&mask)
191 [_eventQueue removeObjectAtIndex:count]; 191 [_eventQueue removeObjectAtIndex:count];
192 } 192 }
193 } 193 }
194 194
195 -(void)postEvent:(NSEvent *)event atStart:(BOOL)atStart { 195 -(void)postEvent:(NSEvent *)event atStart:(BOOL)atStart {
196 if(atStart) 196 if(atStart)
197 [_eventQueue insertObject:event atIndex:0]; 197 [_eventQueue insertObject:event atIndex:0];
198 else 198 else
199 [_eventQueue addObject:event]; 199 [_eventQueue addObject:event];
200 } 200 }
201 201
202 -(BOOL)containsAndRemovePeriodicEvents { 202 -(BOOL)containsAndRemovePeriodicEvents {
203 BOOL result=NO; 203 BOOL result=NO;
204 int count=[_eventQueue count]; 204 int count=[_eventQueue count];
205 205
206 while(--count>=0){ 206 while(--count>=0){
207 if([[_eventQueue objectAtIndex:count] type]==NSPeriodic){ 207 if([[_eventQueue objectAtIndex:count] type]==NSPeriodic){
208 result=YES; 208 result=YES;
209 [_eventQueue removeObjectAtIndex:count]; 209 [_eventQueue removeObjectAtIndex:count];
210 } 210 }
211 } 211 }
212 212
213 return result; 213 return result;
214 } 214 }
215 215
216 -(BOOL)hasEventsMatchingMask { 216 -(BOOL)hasEventsMatchingMask {
217 return [_eventQueue count]>0; 217 return [_eventQueue count]>0;
218 } 218 }
219 219
220 -(void)_periodicDelay:(NSTimer *)timer { 220 -(void)_periodicDelay:(NSTimer *)timer {
221 NSTimeInterval period=[[timer userInfo] doubleValue]; 221 NSTimeInterval period=[[timer userInfo] doubleValue];
222 222
223 [_periodicTimer invalidate]; 223 [_periodicTimer invalidate];
224 [_periodicTimer release]; 224 [_periodicTimer release];
225 225
226 _periodicTimer=[[NSTimer timerWithTimeInterval:period 226 _periodicTimer=[[NSTimer timerWithTimeInterval:period
227 target:self selector:@selector(_periodicEvent:) userInfo:nil 227 target:self selector:@selector(_periodicEvent:) userInfo:nil
228 repeats:YES] retain]; 228 repeats:YES] retain];
229 229
230 [[NSRunLoop currentRunLoop] addTimer:_periodicTimer forMode:NSEventTrackingRunLoopMode]; 230 [[NSRunLoop currentRunLoop] addTimer:_periodicTimer forMode:NSEventTrackingRunLoopMode];
231 } 231 }
232 232
233 -(void)_periodicEvent:(NSTimer *)timer { 233 -(void)_periodicEvent:(NSTimer *)timer {
234 NSEvent *event=[[[NSEvent_periodic alloc] initWithType:NSPeriodic location:NSMakePoint(0,0) modifierFlags:0 window:nil] autorelease]; 234 NSEvent *event=[[[NSEvent_periodic alloc] initWithType:NSPeriodic location:NSMakePoint(0,0) modifierFlags:0 window:nil] autorelease];
235 235
236 [self postEvent:event atStart:NO]; 236 [self postEvent:event atStart:NO];
237 [self discardEventsMatchingMask:NSPeriodicMask beforeEvent:event]; 237 [self discardEventsMatchingMask:NSPeriodicMask beforeEvent:event];
238 } 238 }
239 239
240 -(void)startPeriodicEventsAfterDelay:(NSTimeInterval)delay withPeriod:(NSTimeInterval)period { 240 -(void)startPeriodicEventsAfterDelay:(NSTimeInterval)delay withPeriod:(NSTimeInterval)period {
241 NSNumber *userInfo=[NSNumber numberWithDouble:period]; 241 NSNumber *userInfo=[NSNumber numberWithDouble:period];
242 242
243 if(_periodicTimer!=nil) 243 if(_periodicTimer!=nil)
244 [NSException raise:NSInternalInconsistencyException format:@"periodic events already enabled"]; 244 [NSException raise:NSInternalInconsistencyException format:@"periodic events already enabled"];
245 245
246 _periodicTimer=[[NSTimer timerWithTimeInterval:delay 246 _periodicTimer=[[NSTimer timerWithTimeInterval:delay
247 target:self selector:@selector(_periodicDelay:) userInfo:userInfo 247 target:self selector:@selector(_periodicDelay:) userInfo:userInfo
248 repeats:NO] retain]; 248 repeats:NO] retain];
249 249
250 [[NSRunLoop currentRunLoop] addTimer:_periodicTimer forMode:NSEventTrackingRunLoopMode]; 250 [[NSRunLoop currentRunLoop] addTimer:_periodicTimer forMode:NSEventTrackingRunLoopMode];
251 } 251 }
252 252
253 -(void)stopPeriodicEvents { 253 -(void)stopPeriodicEvents {
254 [_periodicTimer invalidate]; 254 [_periodicTimer invalidate];
255 [_periodicTimer release]; 255 [_periodicTimer release];
256 _periodicTimer=nil; 256 _periodicTimer=nil;
257 } 257 }
258 258
259 -(unsigned)modifierForDefault:(NSString *)key:(unsigned)standard { 259 -(unsigned)modifierForDefault:(NSString *)key:(unsigned)standard {
260 NSDictionary *modmap=[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"NSModifierFlagMapping"]; 260 NSDictionary *modmap=[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"NSModifierFlagMapping"];
261 NSString *remap=[modmap objectForKey:key]; 261 NSString *remap=[modmap objectForKey:key];
262 262
263 if([remap isEqualToString:@"Command"]) 263 if([remap isEqualToString:@"Command"])
264 return NSCommandKeyMask; 264 return NSCommandKeyMask;
265 if([remap isEqualToString:@"Alt"]) 265 if([remap isEqualToString:@"Alt"])
266 return NSAlternateKeyMask; 266 return NSAlternateKeyMask;
267 if([remap isEqualToString:@"Control"]) 267 if([remap isEqualToString:@"Control"])
268 return NSControlKeyMask; 268 return NSControlKeyMask;
269 269
270 return standard; 270 return standard;
271 } 271 }
272 272
273 -(void)beep { 273 -(void)beep {
274 NSInvalidAbstractInvocation(); 274 NSInvalidAbstractInvocation();
275 } 275 }
276 276
277 -(NSSet *)allFontFamilyNames { 277 -(NSSet *)allFontFamilyNames {
278 NSInvalidAbstractInvocation(); 278 NSInvalidAbstractInvocation();
279 return nil; 279 return nil;
280 } 280 }
281 281
282 -(NSArray *)fontTypefacesForFamilyName:(NSString *)name { 282 -(NSArray *)fontTypefacesForFamilyName:(NSString *)name {
283 NSInvalidAbstractInvocation(); 283 NSInvalidAbstractInvocation();
284 return nil; 284 return nil;
285 } 285 }
286 286
287 -(float)scrollerWidth { 287 -(float)scrollerWidth {
288 NSInvalidAbstractInvocation(); 288 NSInvalidAbstractInvocation();
289 return 0; 289 return 0;
290 } 290 }
291 291
292 -(void)metricsForFontWithName:(NSString *)name pointSize:(float)pointSize metrics:(NSFontMetrics *)metrics { 292 -(void)metricsForFontWithName:(NSString *)name pointSize:(float)pointSize metrics:(NSFontMetrics *)metrics {
293 NSInvalidAbstractInvocation(); 293 NSInvalidAbstractInvocation();
294 } 294 }
295 295
296 -(void)loadGlyphRangeTable:(NSGlyphRangeTable *)table fontName:(NSString *)name range:(NSRange)range { 296 -(void)loadGlyphRangeTable:(NSGlyphRangeTable *)table fontName:(NSString *)name range:(NSRange)range {
297 NSInvalidAbstractInvocation(); 297 NSInvalidAbstractInvocation();
298 } 298 }
299 299
300 -(void)fetchAdvancementsForFontWithName:(NSString *)name pointSize:(float)pointSize glyphRanges:(NSGlyphRangeTable *)table infoSet:(NSGlyphInfoSet *)infoSet forGlyph:(NSGlyph)glyph { 300 -(void)fetchAdvancementsForFontWithName:(NSString *)name pointSize:(float)pointSize glyphRanges:(NSGlyphRangeTable *)table infoSet:(NSGlyphMetricsSet *)infoSet forGlyph:(NSGlyph)glyph {
301 NSInvalidAbstractInvocation(); 301 NSInvalidAbstractInvocation();
302 } 302 }
303 303
304 -(void)fetchGlyphKerningForFontWithName:(NSString *)name pointSize:(float)pointSize glyphRanges:(NSGlyphRangeTable *)table infoSet:(NSGlyphInfoSet *)infoSet { 304 -(void)fetchGlyphKerningForFontWithName:(NSString *)name pointSize:(float)pointSize glyphRanges:(NSGlyphRangeTable *)table infoSet:(NSGlyphMetricsSet *)infoSet {
305 NSInvalidAbstractInvocation(); 305 NSInvalidAbstractInvocation();
306 } 306 }
307 307
308 -(void)runModalWithPrintInfo:(NSPrintInfo *)printInfo { 308 -(void)runModalWithPrintInfo:(NSPrintInfo *)printInfo {
309 NSInvalidAbstractInvocation(); 309 NSInvalidAbstractInvocation();
310 } 310 }
311 311
312 -(CGContext *)graphicsPortForPrintOperationWithView:(NSView *)view printInfo:(NSPrintInfo *)printInfo pageRange:(NSRange)pageRange { 312 -(CGContext *)graphicsPortForPrintOperationWithView:(NSView *)view printInfo:(NSPrintInfo *)printInfo pageRange:(NSRange)pageRange {
313 NSInvalidAbstractInvocation(); 313 NSInvalidAbstractInvocation();
314 return nil; 314 return nil;
315 } 315 }
316 316
317 -(int)savePanel:(NSSavePanel *)savePanel runModalForDirectory:(NSString *)directory file:(NSString *)file { 317 -(int)savePanel:(NSSavePanel *)savePanel runModalForDirectory:(NSString *)directory file:(NSString *)file {
318 NSInvalidAbstractInvocation(); 318 NSInvalidAbstractInvocation();
319 return 0; 319 return 0;
320 } 320 }
321 321
322 -(int)openPanel:(NSOpenPanel *)openPanel runModalForDirectory:(NSString *)directory file:(NSString *)file types:(NSArray *)types { 322 -(int)openPanel:(NSOpenPanel *)openPanel runModalForDirectory:(NSString *)directory file:(NSString *)file types:(NSArray *)types {
323 NSInvalidAbstractInvocation(); 323 NSInvalidAbstractInvocation();
324 return 0; 324 return 0;
325 } 325 }
326 326
327 @end 327 @end
Powered by Google Project Hosting