Mercurial > sdl-ios-xcode
annotate src/video/maccommon/SDL_lowvideo.h @ 1921:f3399f779a1d
Bug fixes to the OpenGL renderer
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 22 Jul 2006 18:01:56 +0000 |
parents | c121d94672cb |
children |
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 |
1432
0801c9fdbdd6
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1424
diff
changeset
|
39 typedef struct __AGLContextRec *AGLContext; |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
40 #endif |
0 | 41 |
42 #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
|
43 #include "../SDL_sysvideo.h" |
0 | 44 |
45 /* Hidden "this" pointer for the video functions */ | |
46 #define _THIS SDL_VideoDevice *this | |
47 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
48 #if !TARGET_API_MAC_CARBON /* not available in OS X (or more accurately, Carbon) */ |
0 | 49 /* Global QuickDraw data */ |
50 extern QDGlobals *theQD; | |
51 #endif | |
52 | |
53 /* Private display data */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
54 struct SDL_PrivateVideoData |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
55 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
56 GDevice **SDL_Display; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
57 WindowRef SDL_Window; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
58 SDL_Rect **SDL_modelist; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
59 CTabHandle SDL_CTab; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
60 PaletteHandle SDL_CPal; |
0 | 61 |
62 #if TARGET_API_MAC_CARBON | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
63 /* For entering and leaving fullscreen mode */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
64 Ptr fullscreen_ctx; |
0 | 65 #endif |
66 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
67 /* The current window document style */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
68 int current_style; |
0 | 69 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
70 /* Information about the last cursor position */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
71 Point last_where; |
0 | 72 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
73 /* Information about the last keys down */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
74 EventModifiers last_mods; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
75 KeyMap last_keys; |
0 | 76 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
77 /* A handle to the Apple Menu */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
78 MenuRef apple_menu; |
0 | 79 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
80 /* Information used by DrawSprocket driver */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
81 struct DSpInfo *dspinfo; |
0 | 82 |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
83 #if SDL_VIDEO_OPENGL |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
84 AGLContext appleGLContext; |
774
0c3e00cc9580
Date: Mon, 5 Jan 2004 00:09:36 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
85 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
86 void *libraryHandle; |
0 | 87 #endif |
88 }; | |
89 /* Old variable names */ | |
90 #define SDL_Display (this->hidden->SDL_Display) | |
91 #define SDL_Window (this->hidden->SDL_Window) | |
92 #define SDL_modelist (this->hidden->SDL_modelist) | |
93 #define SDL_CTab (this->hidden->SDL_CTab) | |
94 #define SDL_CPal (this->hidden->SDL_CPal) | |
95 #define fullscreen_ctx (this->hidden->fullscreen_ctx) | |
96 #define current_style (this->hidden->current_style) | |
97 #define last_where (this->hidden->last_where) | |
98 #define last_mods (this->hidden->last_mods) | |
99 #define last_keys (this->hidden->last_keys) | |
100 #define apple_menu (this->hidden->apple_menu) | |
101 #define glContext (this->hidden->appleGLContext) | |
102 | |
103 #endif /* _SDL_lowvideo_h */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1432
diff
changeset
|
104 /* vi: set ts=4 sw=4 expandtab: */ |