src/video/wincommon/SDL_lowvideo.h
author Ryan C. Gordon <icculus@icculus.org>
Fri, 06 Jan 2006 13:20:10 +0000
changeset 1234 73676c1f56ee
parent 833 31fa08b36380
child 1251 86d0d01290ea
permissions -rw-r--r--
For sanity's sake, removed the '&' when passing copy_row array to asm.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2004 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@libsdl.org
    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 #include <windows.h>
    32 
    33 #include "SDL_sysvideo.h"
    34 
    35 /* Hidden "this" pointer for the video functions */
    36 #define _THIS	SDL_VideoDevice *this
    37 
    38 #define WINDIB_FULLSCREEN()						\
    39 (									\
    40 	SDL_VideoSurface &&						\
    41 	((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) && \
    42 	(((SDL_VideoSurface->flags & SDL_OPENGL   ) == SDL_OPENGL    ) || \
    43 	 (strcmp(this->name, "windib") == 0))				\
    44 )
    45 #define DDRAW_FULLSCREEN() 						\
    46 (									\
    47 	SDL_VideoSurface &&						\
    48 	((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) && \
    49 	((SDL_VideoSurface->flags & SDL_OPENGL    ) != SDL_OPENGL    ) && \
    50 	(strcmp(this->name, "directx") == 0)				\
    51 )
    52 
    53 #define DINPUT_FULLSCREEN()	DDRAW_FULLSCREEN()
    54 
    55 /* The main window -- and a function to set it for the audio */
    56 #ifdef _WIN32_WCE
    57 extern LPWSTR SDL_Appname;
    58 #else
    59 extern LPSTR SDL_Appname;
    60 #endif
    61 extern HINSTANCE SDL_Instance;
    62 extern HWND SDL_Window;
    63 extern const char *SDL_windowid;
    64 
    65 /* Variables and functions exported to other parts of the native video
    66    subsystem (SDL_sysevents.c)
    67 */
    68 /* Called by windows message loop when system palette is available */
    69 extern void (*WIN_RealizePalette)(_THIS);
    70 
    71 /* Called by windows message loop when the system palette changes */
    72 extern void (*WIN_PaletteChanged)(_THIS, HWND window);
    73 
    74 /* Called by windows message loop when a portion of the screen needs update */
    75 extern void (*WIN_WinPAINT)(_THIS, HDC hdc);
    76 
    77 /* Called by windows message loop when the message isn't handled */
    78 extern LONG (*HandleMessage)(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
    79 
    80 /* The window cursor (from SDL_sysmouse.c) */
    81 extern HCURSOR SDL_hcursor;
    82 
    83 /* The bounds of the window in screen coordinates */
    84 extern RECT SDL_bounds;
    85 
    86 /* The position of the window in windowed mode */
    87 extern int SDL_windowX;
    88 extern int SDL_windowY;
    89 
    90 /* Flag -- SDL is performing a resize, rather than the user */
    91 extern int SDL_resizing;
    92 
    93 /* Flag -- the mouse is in relative motion mode */
    94 extern int mouse_relative;
    95 
    96 /* The GDI fullscreen mode currently active */
    97 #ifndef NO_CHANGEDISPLAYSETTINGS
    98 extern DEVMODE SDL_fullscreen_mode;
    99 #endif
   100 
   101 /* The system gamma ramp for GDI modes */
   102 extern WORD *gamma_saved;
   103 
   104 /* This is really from SDL_dx5audio.c */
   105 extern void DX5_SoundFocus(HWND window);
   106 
   107 /* DJM: This is really from SDL_sysevents.c, we need it in
   108    GDL_CreateWindow as well */
   109 LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
   110 
   111 #endif /* SDL_lowvideo_h */