annotate src/video/quartz/SDL_QuartzWindow.m @ 78:e9582f471c02

Added the environment variable SDL_MOUSE_NORELATIVE to completely disable relative mouse motion if the application desires it. UNDOCUMENTED!!
author Sam Lantinga <slouken@lokigames.com>
date Sat, 23 Jun 2001 18:51:29 +0000
parents bd6b0a910a65
children d1447a846d80
rev   line source
47
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 /* Subclass of NSWindow to allow customization if we need it */
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
3 @interface SDL_QuartzWindow : NSWindow
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
4 {}
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
5 - (void)miniaturize:(id)sender;
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
6 - (void)deminiaturize:(id)sender;
56
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
7 - (void)display;
47
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
8 @end
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
9
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
10 @implementation SDL_QuartzWindow
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
11
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
12 /* These methods should be rewritten to fix the miniaturize bug */
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
13 - (void)miniaturize:(id)sender
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14 {
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
15 [ super miniaturize:sender ];
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
16 }
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
17
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
18 - (void)deminiaturize:(id)sender
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
19 {
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
20 [ super deminiaturize:sender ];
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
21 }
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
22
56
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
23 - (void)display
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
24 {
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
25 /* Do nothing to keep pinstripe pattern from drawing */
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
26 }
47
45b1c4303f87 Added initial support for Quartz video (thanks Darrell!)
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
27 @end
56
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
28
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
29 /* Delegate for our NSWindow to send SDLQuit() on close */
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
30 @interface SDL_QuartzWindowDelegate : NSObject
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
31 {}
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
32 - (BOOL)windowShouldClose:(id)sender;
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
33 @end
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
34
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
35 @implementation SDL_QuartzWindowDelegate
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
36 - (BOOL)windowShouldClose:(id)sender {
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
37
58
bd6b0a910a65 * Removed fullscreen menu option from the "Window" menu
Sam Lantinga <slouken@lokigames.com>
parents: 56
diff changeset
38 SDL_PrivateQuit();
56
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
39 return NO;
ce9cd2cf0d0d Date: Sun, 10 Jun 2001 17:33:44 -0500
Sam Lantinga <slouken@lokigames.com>
parents: 47
diff changeset
40 }
58
bd6b0a910a65 * Removed fullscreen menu option from the "Window" menu
Sam Lantinga <slouken@lokigames.com>
parents: 56
diff changeset
41 @end