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.

69 lines
2.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: The application object.
  4. //
  5. //=============================================================================//
  6. #ifndef IHAMMER_H
  7. #define IHAMMER_H
  8. #include "appframework/iappsystem.h"
  9. typedef struct tagMSG MSG;
  10. class IStudioDataCache;
  11. //-----------------------------------------------------------------------------
  12. // Return values for RequestNewConfig
  13. //-----------------------------------------------------------------------------
  14. enum RequestRetval_t
  15. {
  16. REQUEST_OK = 0,
  17. REQUEST_QUIT
  18. };
  19. //-----------------------------------------------------------------------------
  20. // Interface used to drive hammer
  21. //-----------------------------------------------------------------------------
  22. #define INTERFACEVERSION_HAMMER "Hammer001"
  23. class IHammer : public IAppSystem
  24. {
  25. public:
  26. virtual bool HammerPreTranslateMessage( MSG * pMsg ) = 0;
  27. virtual bool HammerIsIdleMessage( MSG * pMsg ) = 0;
  28. virtual bool HammerOnIdle( long count ) = 0;
  29. virtual void RunFrame() = 0;
  30. // Returns the mod and the game to initially start up
  31. virtual const char *GetDefaultMod() = 0;
  32. virtual const char *GetDefaultGame() = 0;
  33. virtual bool InitSessionGameConfig( const char *szGameDir ) = 0;
  34. // Request a new config from hammer's config system
  35. virtual RequestRetval_t RequestNewConfig() = 0;
  36. // Returns the full path to the mod and the game to initially start up
  37. virtual const char *GetDefaultModFullPath() = 0;
  38. virtual int MainLoop() = 0;
  39. // When Foundry is using Hammer:
  40. // - Hammer doesn't create its main window.
  41. // - Select windows (like the object properties dialog) are parented to the game's window and share its message pump
  42. // - A CMapView3D is created and renders only entities on top of the game's 3D window
  43. virtual void InitFoundryMode( CreateInterfaceFn factory, void *hGameWnd, const char *szGameDir ) = 0;
  44. // Called when the engine's window took the focus.
  45. virtual void NoteEngineGotFocus() = 0;
  46. // Used in Foundry to show and hide the full Hammer UI.
  47. virtual bool IsHammerVisible() = 0;
  48. virtual void ToggleHammerVisible() = 0;
  49. };
  50. #endif // IHAMMER_H