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.
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@769
     3
    Copyright (C) 1997-2004 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@0
     6
    modify it under the terms of the GNU Library General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@0
     8
    version 2 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@0
    13
    Library General Public License for more details.
slouken@0
    14
slouken@0
    15
    You should have received a copy of the GNU Library General Public
slouken@0
    16
    License along with this library; if not, write to the Free
slouken@0
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@252
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@0
    22
slouken@0
    23
#ifdef SAVE_RCSID
slouken@0
    24
static char rcsid =
slouken@0
    25
 "@(#) $Id$";
slouken@0
    26
#endif
slouken@0
    27
slouken@0
    28
#ifndef _SDL_lowvideo_h
slouken@0
    29
#define _SDL_lowvideo_h
slouken@0
    30
slouken@0
    31
#include <windows.h>
slouken@0
    32
slouken@0
    33
#include "SDL_sysvideo.h"
slouken@0
    34
slouken@0
    35
/* Hidden "this" pointer for the video functions */
slouken@0
    36
#define _THIS	SDL_VideoDevice *this
slouken@0
    37
slouken@304
    38
#define WINDIB_FULLSCREEN()						\
slouken@304
    39
(									\
slouken@335
    40
	SDL_VideoSurface &&						\
slouken@304
    41
	((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) && \
slouken@304
    42
	(((SDL_VideoSurface->flags & SDL_OPENGL   ) == SDL_OPENGL    ) || \
slouken@304
    43
	 (strcmp(this->name, "windib") == 0))				\
slouken@304
    44
)
slouken@13
    45
#define DDRAW_FULLSCREEN() 						\
slouken@0
    46
(									\
slouken@335
    47
	SDL_VideoSurface &&						\
slouken@0
    48
	((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) && \
slouken@0
    49
	((SDL_VideoSurface->flags & SDL_OPENGL    ) != SDL_OPENGL    ) && \
slouken@0
    50
	(strcmp(this->name, "directx") == 0)				\
slouken@0
    51
)
slouken@0
    52
slouken@325
    53
#define DINPUT_FULLSCREEN()	DDRAW_FULLSCREEN()
slouken@13
    54
slouken@0
    55
/* The main window -- and a function to set it for the audio */
slouken@453
    56
#ifdef _WIN32_WCE
slouken@453
    57
extern LPWSTR SDL_Appname;
slouken@453
    58
#else
slouken@453
    59
extern LPSTR SDL_Appname;
slouken@453
    60
#endif
slouken@0
    61
extern HINSTANCE SDL_Instance;
slouken@0
    62
extern HWND SDL_Window;
slouken@0
    63
extern const char *SDL_windowid;
slouken@0
    64
slouken@0
    65
/* Variables and functions exported to other parts of the native video
slouken@0
    66
   subsystem (SDL_sysevents.c)
slouken@0
    67
*/
slouken@0
    68
/* Called by windows message loop when system palette is available */
slouken@0
    69
extern void (*WIN_RealizePalette)(_THIS);
slouken@0
    70
slouken@0
    71
/* Called by windows message loop when the system palette changes */
slouken@0
    72
extern void (*WIN_PaletteChanged)(_THIS, HWND window);
slouken@0
    73
slouken@0
    74
/* Called by windows message loop when a portion of the screen needs update */
slouken@0
    75
extern void (*WIN_WinPAINT)(_THIS, HDC hdc);
slouken@0
    76
slouken@0
    77
/* Called by windows message loop when the message isn't handled */
slouken@0
    78
extern LONG (*HandleMessage)(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
slouken@0
    79
slouken@0
    80
/* The window cursor (from SDL_sysmouse.c) */
slouken@0
    81
extern HCURSOR SDL_hcursor;
slouken@0
    82
slouken@0
    83
/* The bounds of the window in screen coordinates */
slouken@0
    84
extern RECT SDL_bounds;
slouken@0
    85
slouken@833
    86
/* The position of the window in windowed mode */
slouken@833
    87
extern int SDL_windowX;
slouken@833
    88
extern int SDL_windowY;
slouken@833
    89
slouken@0
    90
/* Flag -- SDL is performing a resize, rather than the user */
slouken@0
    91
extern int SDL_resizing;
slouken@0
    92
slouken@0
    93
/* Flag -- the mouse is in relative motion mode */
slouken@0
    94
extern int mouse_relative;
slouken@0
    95
slouken@304
    96
/* The GDI fullscreen mode currently active */
slouken@304
    97
#ifndef NO_CHANGEDISPLAYSETTINGS
slouken@304
    98
extern DEVMODE SDL_fullscreen_mode;
slouken@304
    99
#endif
slouken@304
   100
slouken@338
   101
/* The system gamma ramp for GDI modes */
slouken@338
   102
extern WORD *gamma_saved;
slouken@338
   103
slouken@0
   104
/* This is really from SDL_dx5audio.c */
slouken@0
   105
extern void DX5_SoundFocus(HWND window);
slouken@0
   106
slouken@145
   107
/* DJM: This is really from SDL_sysevents.c, we need it in
slouken@145
   108
   GDL_CreateWindow as well */
slouken@145
   109
LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
slouken@145
   110
slouken@0
   111
#endif /* SDL_lowvideo_h */