diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/igame.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/igame.h')
| -rw-r--r-- | engine/igame.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/engine/igame.h b/engine/igame.h new file mode 100644 index 0000000..90f37c2 --- /dev/null +++ b/engine/igame.h @@ -0,0 +1,60 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// $NoKeywords: $ +//===========================================================================// +#ifndef IGAME_H +#define IGAME_H + +#ifdef _WIN32 +#pragma once +#endif + +class IGame +{ +public: + virtual ~IGame( void ) { } + + virtual bool Init( void *pvInstance ) = 0; + virtual bool Shutdown( void ) = 0; + + virtual bool CreateGameWindow( void ) = 0; + virtual void DestroyGameWindow( void ) = 0; + + // This is used in edit mode to specify a particular game window (created by hammer) + virtual void SetGameWindow( void* hWnd ) = 0; + + // This is used in edit mode to override the default wnd proc associated w/ + // the game window specified in SetGameWindow. + virtual bool InputAttachToGameWindow() = 0; + virtual void InputDetachFromGameWindow() = 0; + + virtual void PlayStartupVideos( void ) = 0; + + // This will be the SDL_Window* under SDL, the WindowRef under Mac, and + // the HWND on Win32. + virtual void* GetMainWindow( void ) = 0; + // This will be the HWND under Direct3D, and the SDL_Window* or + // WindowRef under GL. + virtual void* GetMainDeviceWindow( void ) = 0; + + virtual void** GetMainWindowAddress( void ) = 0; + virtual void GetDesktopInfo( int &width, int &height, int &refreshrate ) = 0; + + virtual void SetWindowXY( int x, int y ) = 0; + virtual void SetWindowSize( int w, int h ) = 0; + + virtual void GetWindowRect( int *x, int *y, int *w, int *h ) = 0; + + // Not Alt-Tabbed away + virtual bool IsActiveApp( void ) = 0; + + virtual void DispatchAllStoredGameMessages() = 0; +}; + +extern IGame *game; + +#endif // IGAME_H |