2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "SDL_config.h"
24 #ifndef _SDL_lowvideo_h
25 #define _SDL_lowvideo_h
27 #if defined(__APPLE__) && defined(__MACH__)
28 #include <Carbon/Carbon.h>
29 #elif TARGET_API_MAC_CARBON && (UNIVERSAL_INTERFACES_VERSION > 0x0335)
32 #include <Quickdraw.h>
35 #include <DrawSprocket.h>
39 typedef struct __AGLContextRec *AGLContext;
42 #include "SDL_video.h"
43 #include "../SDL_sysvideo.h"
45 /* Hidden "this" pointer for the video functions */
46 #define _THIS SDL_VideoDevice *this
48 #if !TARGET_API_MAC_CARBON /* not available in OS X (or more accurately, Carbon) */
49 /* Global QuickDraw data */
50 extern QDGlobals *theQD;
53 /* Private display data */
54 struct SDL_PrivateVideoData {
55 GDevice **SDL_Display;
57 SDL_Rect **SDL_modelist;
59 PaletteHandle SDL_CPal;
61 #if TARGET_API_MAC_CARBON
62 /* For entering and leaving fullscreen mode */
66 /* The current window document style */
69 /* Information about the last cursor position */
72 /* Information about the last keys down */
73 EventModifiers last_mods;
76 /* A handle to the Apple Menu */
79 /* Information used by DrawSprocket driver */
80 struct DSpInfo *dspinfo;
83 AGLContext appleGLContext;
88 /* Old variable names */
89 #define SDL_Display (this->hidden->SDL_Display)
90 #define SDL_Window (this->hidden->SDL_Window)
91 #define SDL_modelist (this->hidden->SDL_modelist)
92 #define SDL_CTab (this->hidden->SDL_CTab)
93 #define SDL_CPal (this->hidden->SDL_CPal)
94 #define fullscreen_ctx (this->hidden->fullscreen_ctx)
95 #define current_style (this->hidden->current_style)
96 #define last_where (this->hidden->last_where)
97 #define last_mods (this->hidden->last_mods)
98 #define last_keys (this->hidden->last_keys)
99 #define apple_menu (this->hidden->apple_menu)
100 #define glContext (this->hidden->appleGLContext)
102 #endif /* _SDL_lowvideo_h */