/
SDL_QuartzWindow.m
41 lines (33 loc) · 806 Bytes
1
2
3
4
5
6
/* Subclass of NSWindow to allow customization if we need it */
@interface SDL_QuartzWindow : NSWindow
{}
- (void)miniaturize:(id)sender;
- (void)deminiaturize:(id)sender;
7
- (void)display;
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@end
@implementation SDL_QuartzWindow
/* These methods should be rewritten to fix the miniaturize bug */
- (void)miniaturize:(id)sender
{
[ super miniaturize:sender ];
}
- (void)deminiaturize:(id)sender
{
[ super deminiaturize:sender ];
}
23
24
25
26
27
28
29
30
31
32
- (void)display
{
/* Do nothing to keep pinstripe pattern from drawing */
}
@end
/* Delegate for our NSWindow to send SDLQuit() on close */
@interface SDL_QuartzWindowDelegate : NSObject
{}
- (BOOL)windowShouldClose:(id)sender;
33
@end
34
35
36
37
@implementation SDL_QuartzWindowDelegate
- (BOOL)windowShouldClose:(id)sender {
38
SDL_PrivateQuit();
39
40
return NO;
}
41
@end