Mercurial > sdl-ios-xcode
annotate src/video/maccommon/SDL_lowvideo.h @ 1312:c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 01 Feb 2006 06:32:25 +0000 |
parents | 609c060fd2a2 |
children | 19418e4422cb |
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 */ |
22 | |
23 #ifndef _SDL_lowvideo_h | |
24 #define _SDL_lowvideo_h | |
25 | |
1133
609c060fd2a2
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
Ryan C. Gordon <icculus@icculus.org>
parents:
774
diff
changeset
|
26 #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
|
27 #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
|
28 #elif TARGET_API_MAC_CARBON && (UNIVERSAL_INTERFACES_VERSION > 0x0335) |
0 | 29 #include <Carbon.h> |
30 #else | |
31 #include <Quickdraw.h> | |
32 #include <Palettes.h> | |
33 #include <Menus.h> | |
34 #include <DrawSprocket.h> | |
35 #endif | |
36 | |
37 #ifdef HAVE_OPENGL | |
38 #ifdef MACOSX | |
39 #include <OpenGL/gl.h> /* OpenGL.framework */ | |
40 #include <AGL/agl.h> /* AGL.framework */ | |
41 #else | |
42 #include <GL/gl.h> | |
43 #include <agl.h> | |
44 #endif /* MACOSX */ | |
45 #endif /* HAVE_OPENGL */ | |
46 | |
47 #include "SDL_video.h" | |
48 #include "SDL_sysvideo.h" | |
49 | |
50 /* Hidden "this" pointer for the video functions */ | |
51 #define _THIS SDL_VideoDevice *this | |
52 | |
53 #if !TARGET_API_MAC_CARBON /* not available in OS X (or more accurately, Carbon) */ | |
54 /* Global QuickDraw data */ | |
55 extern QDGlobals *theQD; | |
56 #endif | |
57 | |
58 /* Private display data */ | |
59 struct SDL_PrivateVideoData { | |
60 GDevice **SDL_Display; | |
61 WindowRef SDL_Window; | |
62 SDL_Rect **SDL_modelist; | |
63 CTabHandle SDL_CTab; | |
64 PaletteHandle SDL_CPal; | |
65 | |
66 #if TARGET_API_MAC_CARBON | |
67 /* For entering and leaving fullscreen mode */ | |
68 Ptr fullscreen_ctx; | |
69 #endif | |
70 | |
71 /* The current window document style */ | |
72 int current_style; | |
73 | |
74 /* Information about the last cursor position */ | |
75 Point last_where; | |
76 | |
77 /* Information about the last keys down */ | |
78 EventModifiers last_mods; | |
79 KeyMap last_keys; | |
80 | |
81 /* A handle to the Apple Menu */ | |
82 MenuRef apple_menu; | |
83 | |
84 /* Information used by DrawSprocket driver */ | |
85 struct DSpInfo *dspinfo; | |
86 | |
87 #ifdef HAVE_OPENGL | |
88 AGLContext appleGLContext; | |
774
0c3e00cc9580
Date: Mon, 5 Jan 2004 00:09:36 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
89 |
0c3e00cc9580
Date: Mon, 5 Jan 2004 00:09:36 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
90 void *libraryHandle; |
0 | 91 #endif |
92 }; | |
93 /* Old variable names */ | |
94 #define SDL_Display (this->hidden->SDL_Display) | |
95 #define SDL_Window (this->hidden->SDL_Window) | |
96 #define SDL_modelist (this->hidden->SDL_modelist) | |
97 #define SDL_CTab (this->hidden->SDL_CTab) | |
98 #define SDL_CPal (this->hidden->SDL_CPal) | |
99 #define fullscreen_ctx (this->hidden->fullscreen_ctx) | |
100 #define current_style (this->hidden->current_style) | |
101 #define last_where (this->hidden->last_where) | |
102 #define last_mods (this->hidden->last_mods) | |
103 #define last_keys (this->hidden->last_keys) | |
104 #define apple_menu (this->hidden->apple_menu) | |
105 #define glContext (this->hidden->appleGLContext) | |
106 | |
107 #endif /* _SDL_lowvideo_h */ |