Mercurial > sdl-ios-xcode
annotate src/video/maccommon/SDL_lowvideo.h @ 1424:7a610f25c12f
Updated MacOS Classic MPW build
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 24 Feb 2006 09:57:14 +0000 |
parents | d910939febfa |
children | 0801c9fdbdd6 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1133
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1133
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1133
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1133
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1133
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1133
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1133
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
252
e8157fcb3114
Updated the source with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
22 #include "SDL_config.h" |
0 | 23 |
24 #ifndef _SDL_lowvideo_h | |
25 #define _SDL_lowvideo_h | |
26 | |
1133
609c060fd2a2
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
Ryan C. Gordon <icculus@icculus.org>
parents:
774
diff
changeset
|
27 #if defined(__APPLE__) && defined(__MACH__) |
609c060fd2a2
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
Ryan C. Gordon <icculus@icculus.org>
parents:
774
diff
changeset
|
28 #include <Carbon/Carbon.h> |
609c060fd2a2
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
Ryan C. Gordon <icculus@icculus.org>
parents:
774
diff
changeset
|
29 #elif TARGET_API_MAC_CARBON && (UNIVERSAL_INTERFACES_VERSION > 0x0335) |
0 | 30 #include <Carbon.h> |
31 #else | |
32 #include <Quickdraw.h> | |
33 #include <Palettes.h> | |
34 #include <Menus.h> | |
35 #include <DrawSprocket.h> | |
36 #endif | |
37 | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
38 #if SDL_VIDEO_OPENGL |
1424
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
39 #ifdef MACOSX |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
40 #include <OpenGL/gl.h> /* OpenGL.framework */ |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
41 #include <AGL/agl.h> /* AGL.framework */ |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
42 #else |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
43 #include <gl.h> |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
44 #include <agl.h> |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
45 #endif /* MACOSX */ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
46 #endif |
0 | 47 |
48 #include "SDL_video.h" | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
49 #include "../SDL_sysvideo.h" |
0 | 50 |
51 /* Hidden "this" pointer for the video functions */ | |
52 #define _THIS SDL_VideoDevice *this | |
53 | |
54 #if !TARGET_API_MAC_CARBON /* not available in OS X (or more accurately, Carbon) */ | |
55 /* Global QuickDraw data */ | |
56 extern QDGlobals *theQD; | |
57 #endif | |
58 | |
59 /* Private display data */ | |
60 struct SDL_PrivateVideoData { | |
61 GDevice **SDL_Display; | |
62 WindowRef SDL_Window; | |
63 SDL_Rect **SDL_modelist; | |
64 CTabHandle SDL_CTab; | |
65 PaletteHandle SDL_CPal; | |
66 | |
67 #if TARGET_API_MAC_CARBON | |
68 /* For entering and leaving fullscreen mode */ | |
69 Ptr fullscreen_ctx; | |
70 #endif | |
71 | |
72 /* The current window document style */ | |
73 int current_style; | |
74 | |
75 /* Information about the last cursor position */ | |
76 Point last_where; | |
77 | |
78 /* Information about the last keys down */ | |
79 EventModifiers last_mods; | |
80 KeyMap last_keys; | |
81 | |
82 /* A handle to the Apple Menu */ | |
83 MenuRef apple_menu; | |
84 | |
85 /* Information used by DrawSprocket driver */ | |
86 struct DSpInfo *dspinfo; | |
87 | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
88 #if SDL_VIDEO_OPENGL |
0 | 89 AGLContext appleGLContext; |
774
0c3e00cc9580
Date: Mon, 5 Jan 2004 00:09:36 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
90 |
0c3e00cc9580
Date: Mon, 5 Jan 2004 00:09:36 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
91 void *libraryHandle; |
0 | 92 #endif |
93 }; | |
94 /* Old variable names */ | |
95 #define SDL_Display (this->hidden->SDL_Display) | |
96 #define SDL_Window (this->hidden->SDL_Window) | |
97 #define SDL_modelist (this->hidden->SDL_modelist) | |
98 #define SDL_CTab (this->hidden->SDL_CTab) | |
99 #define SDL_CPal (this->hidden->SDL_CPal) | |
100 #define fullscreen_ctx (this->hidden->fullscreen_ctx) | |
101 #define current_style (this->hidden->current_style) | |
102 #define last_where (this->hidden->last_where) | |
103 #define last_mods (this->hidden->last_mods) | |
104 #define last_keys (this->hidden->last_keys) | |
105 #define apple_menu (this->hidden->apple_menu) | |
106 #define glContext (this->hidden->appleGLContext) | |
107 | |
108 #endif /* _SDL_lowvideo_h */ |