0
|
1 /*
|
|
2 SDL - Simple DirectMedia Layer
|
|
3 Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga
|
|
4
|
|
5 This library is free software; you can redistribute it and/or
|
|
6 modify it under the terms of the GNU Library General Public
|
|
7 License as published by the Free Software Foundation; either
|
|
8 version 2 of the License, or (at your option) any later version.
|
|
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
|
|
13 Library General Public License for more details.
|
|
14
|
|
15 You should have received a copy of the GNU Library General Public
|
|
16 License along with this library; if not, write to the Free
|
|
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
18
|
|
19 Sam Lantinga
|
|
20 slouken@devolution.com
|
|
21 */
|
|
22
|
|
23 #ifdef SAVE_RCSID
|
|
24 static char rcsid =
|
|
25 "@(#) $Id$";
|
|
26 #endif
|
|
27
|
|
28 #ifndef _SDL_lowvideo_h
|
|
29 #define _SDL_lowvideo_h
|
|
30
|
|
31 #if TARGET_API_MAC_CARBON
|
|
32 #include <Carbon.h>
|
|
33 #else
|
|
34 #include <Quickdraw.h>
|
|
35 #include <Palettes.h>
|
|
36 #include <Menus.h>
|
|
37 #include <DrawSprocket.h>
|
|
38 #endif
|
|
39
|
|
40 #ifdef HAVE_OPENGL
|
|
41 #ifdef MACOSX
|
|
42 #include <OpenGL/gl.h> /* OpenGL.framework */
|
|
43 #include <AGL/agl.h> /* AGL.framework */
|
|
44 #else
|
|
45 #include <GL/gl.h>
|
|
46 #include <agl.h>
|
|
47 #endif /* MACOSX */
|
|
48 #endif /* HAVE_OPENGL */
|
|
49
|
|
50 #include "SDL_video.h"
|
|
51 #include "SDL_sysvideo.h"
|
|
52
|
|
53 /* Hidden "this" pointer for the video functions */
|
|
54 #define _THIS SDL_VideoDevice *this
|
|
55
|
|
56 #if !TARGET_API_MAC_CARBON /* not available in OS X (or more accurately, Carbon) */
|
|
57 /* Global QuickDraw data */
|
|
58 extern QDGlobals *theQD;
|
|
59 #endif
|
|
60
|
|
61 /* Private display data */
|
|
62 struct SDL_PrivateVideoData {
|
|
63 GDevice **SDL_Display;
|
|
64 WindowRef SDL_Window;
|
|
65 SDL_Rect **SDL_modelist;
|
|
66 CTabHandle SDL_CTab;
|
|
67 PaletteHandle SDL_CPal;
|
|
68
|
|
69 #if TARGET_API_MAC_CARBON
|
|
70 /* For entering and leaving fullscreen mode */
|
|
71 Ptr fullscreen_ctx;
|
|
72 #endif
|
|
73
|
|
74 /* The current window document style */
|
|
75 int current_style;
|
|
76
|
|
77 /* Information about the last cursor position */
|
|
78 Point last_where;
|
|
79
|
|
80 /* Information about the last keys down */
|
|
81 EventModifiers last_mods;
|
|
82 KeyMap last_keys;
|
|
83
|
|
84 /* A handle to the Apple Menu */
|
|
85 MenuRef apple_menu;
|
|
86
|
|
87 /* Information used by DrawSprocket driver */
|
|
88 struct DSpInfo *dspinfo;
|
|
89
|
|
90 #ifdef HAVE_OPENGL
|
|
91 AGLContext appleGLContext;
|
|
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 */
|