symbian-qemu-0.9.1-12/libsdl-trunk/src/video/maccommon/SDL_lowvideo.h
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 /*
       
     2     SDL - Simple DirectMedia Layer
       
     3     Copyright (C) 1997-2006 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
       
    39 typedef 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 */
       
    50 extern QDGlobals *theQD;
       
    51 #endif
       
    52 
       
    53 /* Private display data */
       
    54 struct 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 */