/*
Copyright (C) 1997-2001 Id Software, Inc.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

//
// win_local.h
//

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "resource.h"
#include "qcommon.h"
#include "key_public.h"
#include "in_public.h"
#include "vid_public.h"

#ifndef WM_MOUSEWHEEL
#define WM_MOUSEWHEEL ( WM_MOUSELAST + 1 )  // message that will be supported by the OS 
#endif

#ifndef SPI_GETWHEELSCROLLLINES
#define SPI_GETWHEELSCROLLLINES	104
#endif

#ifndef WM_XBUTTONDOWN
#define WM_XBUTTONDOWN                  0x020B
#define WM_XBUTTONUP                    0x020C
#endif

#ifndef MK_XBUTTON1
#define MK_XBUTTON1         0x0020
#define MK_XBUTTON2         0x0040
#endif

#define MOUSE_BUTTONS	5

#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif

#define PRIVATE	static

#define	WINDOW_CLASS_NAME	__TEXT( "Quake2" )
#define	WINDOW_STYLE	(WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU)

extern qboolean		win_initialized;

extern HINSTANCE		hGlobalInstance;
extern HWND				hWndMain;

void Win_Init( void );
void Win_Shutdown( void );
void Win_PumpEvents( void );
void Win_SendMouseButtonEvents( int mstate, DWORD time );
HWND Win_CreateWindow( int width, int height, qboolean fullscreen );
void Win_DestroyWindow( HWND hWnd );
LONG WINAPI Win_MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );

void GLimp_FatalShutdown( void );
void SWimp_FatalShutdown( void );

