Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.5 KiB

  1. //===== Copyright 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //===========================================================================//
  9. #ifndef IGAME_H
  10. #define IGAME_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. class IGame
  15. {
  16. public:
  17. virtual ~IGame( void ) { }
  18. virtual bool Init( void *pvInstance ) = 0;
  19. virtual bool Shutdown( void ) = 0;
  20. virtual bool CreateGameWindow( void ) = 0;
  21. virtual void DestroyGameWindow( void ) = 0;
  22. // This is used in edit mode to specify a particular game window (created by hammer)
  23. virtual void SetGameWindow( void* hWnd ) = 0;
  24. // This is used in edit mode to override the default wnd proc associated w/
  25. // the game window specified in SetGameWindow.
  26. virtual bool InputAttachToGameWindow() = 0;
  27. virtual void InputDetachFromGameWindow() = 0;
  28. virtual void PlayStartupVideos( void ) = 0;
  29. virtual void* GetMainWindow( void ) = 0;
  30. virtual void** GetMainWindowAddress( void ) = 0;
  31. virtual void GetDesktopInfo( int &width, int &height, int &refreshrate ) = 0;
  32. virtual void SetWindowXY( int x, int y ) = 0;
  33. virtual void SetWindowSize( int w, int h ) = 0;
  34. virtual void GetWindowRect( int *x, int *y, int *w, int *h ) = 0;
  35. // Not Alt-Tabbed away
  36. virtual bool IsActiveApp( void ) = 0;
  37. virtual void DispatchAllStoredGameMessages() = 0;
  38. virtual void OnScreenSizeChanged( int nOldWidth, int nOldHeight ) = 0;
  39. };
  40. extern IGame *game;
  41. #endif // IGAME_H