2016-12-18 04:43:04 +00:00
|
|
|
/*
|
|
|
|
===========================================================================
|
|
|
|
Copyright (C) 1999-2005 Id Software, Inc.
|
|
|
|
|
|
|
|
This file is part of Quake III Arena source code.
|
|
|
|
|
|
|
|
Quake III Arena source code 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.
|
|
|
|
|
|
|
|
Quake III Arena source code 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 Quake III Arena source code; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
===========================================================================
|
|
|
|
*/
|
|
|
|
// win_local.h: Win32-specific Quake3 header file
|
|
|
|
|
2016-12-30 04:13:59 +00:00
|
|
|
#include "windows.h"
|
2016-12-18 04:43:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr );
|
|
|
|
|
|
|
|
void Sys_CreateConsole( void );
|
|
|
|
void Sys_DestroyConsole( void );
|
|
|
|
const char* Sys_ConsoleInput();
|
|
|
|
void Conbuf_AppendText( const char *msg );
|
|
|
|
|
|
|
|
void IN_Activate( qbool active );
|
2016-12-30 04:13:59 +00:00
|
|
|
qbool IN_ProcessMessage( UINT msg, WPARAM wParam, LPARAM lParam ); // returns true if the event was handled
|
2016-12-18 04:43:04 +00:00
|
|
|
void IN_Frame();
|
|
|
|
|
2017-05-17 05:41:25 +00:00
|
|
|
void WIN_UpdateMonitorIndexFromCvar();
|
|
|
|
void WIN_UpdateMonitorIndexFromMainWindow();
|
2017-03-07 22:32:50 +00:00
|
|
|
void WIN_UpdateResolution( int width, int height );
|
2017-06-01 11:02:19 +00:00
|
|
|
void WIN_RegisterLastValidHotKey();
|
|
|
|
void WIN_UnregisterHotKey();
|
2017-06-01 18:48:21 +00:00
|
|
|
void WIN_SetGameDisplaySettings();
|
|
|
|
void WIN_SetDesktopDisplaySettings();
|
2016-12-18 04:43:04 +00:00
|
|
|
|
|
|
|
void SNDDMA_Activate();
|
|
|
|
|
2017-01-11 13:24:58 +00:00
|
|
|
LRESULT CALLBACK MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
2017-06-01 11:02:19 +00:00
|
|
|
|
|
|
|
// crash handling
|
2017-03-14 04:11:12 +00:00
|
|
|
LONG CALLBACK WIN_HandleException( EXCEPTION_POINTERS* ep );
|
2017-03-20 23:58:59 +00:00
|
|
|
void WIN_HandleExit();
|
2017-03-14 04:11:12 +00:00
|
|
|
void WIN_EndTimePeriod();
|
2017-06-01 11:02:19 +00:00
|
|
|
|
|
|
|
#define MAX_MONITOR_COUNT 16
|
2017-03-05 19:10:48 +00:00
|
|
|
|
2016-12-18 04:43:04 +00:00
|
|
|
typedef struct
|
2017-06-01 11:02:19 +00:00
|
|
|
{
|
2016-12-18 04:43:04 +00:00
|
|
|
HWND hWnd;
|
2017-06-01 11:02:19 +00:00
|
|
|
HINSTANCE hInstance;
|
2016-12-18 04:43:04 +00:00
|
|
|
qbool activeApp;
|
|
|
|
|
2016-12-30 04:13:59 +00:00
|
|
|
// when we get a windows message, we store the time off
|
2017-05-06 20:01:14 +00:00
|
|
|
// using Sys_Milliseconds
|
|
|
|
int sysMsgTime;
|
2017-03-05 21:48:02 +00:00
|
|
|
|
|
|
|
RECT monitorRects[MAX_MONITOR_COUNT];
|
|
|
|
HMONITOR hMonitors[MAX_MONITOR_COUNT];
|
2017-05-17 05:41:25 +00:00
|
|
|
int monitor; // 0-based index of the monitor currently used for display
|
|
|
|
int primaryMonitor; // 0-based index of the primary monitor
|
2017-03-05 21:48:02 +00:00
|
|
|
int monitorCount;
|
2017-06-01 11:02:19 +00:00
|
|
|
|
|
|
|
int minimizeHotKeyId;
|
|
|
|
qbool minimizeHotKeyValid;
|
|
|
|
UINT minimizeHotKeyKey;
|
|
|
|
UINT minimizeHotKeyMods;
|
2017-09-06 11:04:58 +00:00
|
|
|
|
|
|
|
qbool inputInitialized;
|
2016-12-18 04:43:04 +00:00
|
|
|
} WinVars_t;
|
|
|
|
|
2017-05-17 05:41:25 +00:00
|
|
|
extern WinVars_t g_wv;
|