summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2017-01-21 15:18:31 -0500
committerFranklin Wei <git@fwei.tk>2017-12-23 21:01:26 -0500
commita855d6202536ff28e5aae4f22a0f31d8f5b325d0 (patch)
tree8c75f224dd64ed360505afa8843d016b0d75000b /apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h
parent01c6dcf6c7b9bb1ad2fa0450f99bacc5f3d3e04b (diff)
downloadrockbox-a855d6202536ff28e5aae4f22a0f31d8f5b325d0.tar.gz
rockbox-a855d6202536ff28e5aae4f22a0f31d8f5b325d0.zip
Port of Duke Nukem 3D
This ports Fabien Sanglard's Chocolate Duke to run on a version of SDL for Rockbox. Change-Id: I8f2c4c78af19de10c1633ed7bb7a997b43256dd9
Diffstat (limited to 'apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h')
-rw-r--r--apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h b/apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h
new file mode 100644
index 0000000000..f3dac29091
--- /dev/null
+++ b/apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h
@@ -0,0 +1,102 @@
1/*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2012 Sam Lantinga
4
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.
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 Lesser General Public License for more details.
14
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
18
19 Sam Lantinga
20 slouken@libsdl.org
21*/
22#include "SDL_config.h"
23
24#ifndef _SDL_lowvideo_h
25#define _SDL_lowvideo_h
26
27#if defined(__APPLE__) && defined(__MACH__)
28#include <Carbon/Carbon.h>
29#elif TARGET_API_MAC_CARBON && (UNIVERSAL_INTERFACES_VERSION > 0x0335)
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
38#if SDL_VIDEO_OPENGL
39typedef struct __AGLContextRec *AGLContext;
40#endif
41
42#include "SDL_video.h"
43#include "../SDL_sysvideo.h"
44
45/* Hidden "this" pointer for the video functions */
46#define _THIS SDL_VideoDevice *this
47
48#if !TARGET_API_MAC_CARBON /* not available in OS X (or more accurately, Carbon) */
49/* Global QuickDraw data */
50extern QDGlobals *theQD;
51#endif
52
53/* Private display data */
54struct SDL_PrivateVideoData {
55 GDevice **SDL_Display;
56 WindowRef SDL_Window;
57 SDL_Rect **SDL_modelist;
58 CTabHandle SDL_CTab;
59 PaletteHandle SDL_CPal;
60
61#if TARGET_API_MAC_CARBON
62 /* For entering and leaving fullscreen mode */
63 Ptr fullscreen_ctx;
64#endif
65
66 /* The current window document style */
67 int current_style;
68
69 /* Information about the last cursor position */
70 Point last_where;
71
72 /* Information about the last keys down */
73 EventModifiers last_mods;
74 KeyMap last_keys;
75
76 /* A handle to the Apple Menu */
77 MenuRef apple_menu;
78
79 /* Information used by DrawSprocket driver */
80 struct DSpInfo *dspinfo;
81
82#if SDL_VIDEO_OPENGL
83 AGLContext appleGLContext;
84
85 void *libraryHandle;
86#endif
87};
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)
101
102#endif /* _SDL_lowvideo_h */