Mercurial > sdl-ios-xcode
comparison src/video/quartz/SDL_QuartzWindow.m @ 56:ce9cd2cf0d0d
Date: Sun, 10 Jun 2001 17:33:44 -0500
From: Darrell Walisser <dwaliss1@purdue.edu>
Subject: Re: [SDL] Mac OS X Goodies For You
Updates and fixes:
-fixed erasing window when minmizing it (with some minor window redraw problems)
-implemented close box to send SDLQuit event
-fixed messed up alpha on 32bpp windows
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Mon, 11 Jun 2001 00:08:10 +0000 |
parents | 45b1c4303f87 |
children | bd6b0a910a65 |
comparison
equal
deleted
inserted
replaced
55:55f1f1b3e27d | 56:ce9cd2cf0d0d |
---|---|
2 | 2 |
3 @interface SDL_QuartzWindow : NSWindow | 3 @interface SDL_QuartzWindow : NSWindow |
4 {} | 4 {} |
5 - (void)miniaturize:(id)sender; | 5 - (void)miniaturize:(id)sender; |
6 - (void)deminiaturize:(id)sender; | 6 - (void)deminiaturize:(id)sender; |
7 - (void)display; | |
7 @end | 8 @end |
8 | 9 |
9 @implementation SDL_QuartzWindow | 10 @implementation SDL_QuartzWindow |
10 | 11 |
11 /* These methods should be rewritten to fix the miniaturize bug */ | 12 /* These methods should be rewritten to fix the miniaturize bug */ |
14 [ super miniaturize:sender ]; | 15 [ super miniaturize:sender ]; |
15 } | 16 } |
16 | 17 |
17 - (void)deminiaturize:(id)sender | 18 - (void)deminiaturize:(id)sender |
18 { | 19 { |
19 /* Let the app know they have to redraw everything */ | |
20 SDL_PrivateExpose (); | |
21 | |
22 [ super deminiaturize:sender ]; | 20 [ super deminiaturize:sender ]; |
23 } | 21 } |
24 | 22 |
23 - (void)display | |
24 { | |
25 /* Do nothing to keep pinstripe pattern from drawing */ | |
26 } | |
25 @end | 27 @end |
28 | |
29 /* Delegate for our NSWindow to send SDLQuit() on close */ | |
30 @interface SDL_QuartzWindowDelegate : NSObject | |
31 {} | |
32 - (BOOL)windowShouldClose:(id)sender; | |
33 @end | |
34 | |
35 @implementation SDL_QuartzWindowDelegate | |
36 - (BOOL)windowShouldClose:(id)sender { | |
37 | |
38 SDL_Event event; | |
39 event.type = SDL_QUIT; | |
40 SDL_PushEvent(&event); | |
41 return NO; | |
42 } | |
43 @end |