1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 
19 */
20 
21 //
22 // win_local.h
23 //
24 
25 #define WIN32_LEAN_AND_MEAN
26 #include <windows.h>
27 #include "resource.h"
28 #include "qcommon.h"
29 #include "key_public.h"
30 #include "in_public.h"
31 #include "vid_public.h"
32 
33 #ifndef WM_MOUSEWHEEL
34 #define WM_MOUSEWHEEL ( WM_MOUSELAST + 1 )  // message that will be supported by the OS
35 #endif
36 
37 #ifndef SPI_GETWHEELSCROLLLINES
38 #define SPI_GETWHEELSCROLLLINES	104
39 #endif
40 
41 #ifndef WM_XBUTTONDOWN
42 #define WM_XBUTTONDOWN                  0x020B
43 #define WM_XBUTTONUP                    0x020C
44 #endif
45 
46 #ifndef MK_XBUTTON1
47 #define MK_XBUTTON1         0x0020
48 #define MK_XBUTTON2         0x0040
49 #endif
50 
51 #define MOUSE_BUTTONS	5
52 
53 #ifndef __LPCGUID_DEFINED__
54 #define __LPCGUID_DEFINED__
55 typedef const GUID *LPCGUID;
56 #endif
57 
58 #define PRIVATE	static
59 
60 #define	WINDOW_CLASS_NAME	__TEXT( "Quake2" )
61 #define	WINDOW_STYLE	(WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU)
62 
63 extern qboolean		win_initialized;
64 
65 extern HINSTANCE		hGlobalInstance;
66 extern HWND				hWndMain;
67 
68 void Win_Init( void );
69 void Win_Shutdown( void );
70 void Win_PumpEvents( void );
71 void Win_SendMouseButtonEvents( int mstate, DWORD time );
72 HWND Win_CreateWindow( int width, int height, qboolean fullscreen );
73 void Win_DestroyWindow( HWND hWnd );
74 LONG WINAPI Win_MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
75 
76 void GLimp_FatalShutdown( void );
77 void SWimp_FatalShutdown( void );
78 
79