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.

71 lines
2.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Methods associated with the cursor
  4. //
  5. // $Revision: $
  6. // $NoKeywords: $
  7. //=============================================================================//
  8. #ifndef MATSURFACE_CURSOR_H
  9. #define MATSURFACE_CURSOR_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "VGuiMatSurface/IMatSystemSurface.h"
  14. #include <vgui/Cursor.h>
  15. FORWARD_DECLARE_HANDLE( InputContextHandle_t );
  16. //-----------------------------------------------------------------------------
  17. // Initializes cursors
  18. //-----------------------------------------------------------------------------
  19. void InitCursors();
  20. //-----------------------------------------------------------------------------
  21. // Selects a cursor
  22. //-----------------------------------------------------------------------------
  23. void CursorSelect( InputContextHandle_t hContext, vgui::HCursor hCursor );
  24. //-----------------------------------------------------------------------------
  25. // Activates the current cursor
  26. //-----------------------------------------------------------------------------
  27. void ActivateCurrentCursor( InputContextHandle_t hContext );
  28. //-----------------------------------------------------------------------------
  29. // handles mouse movement
  30. //-----------------------------------------------------------------------------
  31. void CursorSetPos( InputContextHandle_t hContext, int x, int y );
  32. void CursorGetPos( InputContextHandle_t hContext, int &x, int &y );
  33. //-----------------------------------------------------------------------------
  34. // Purpose: prevents vgui from changing the cursor
  35. //-----------------------------------------------------------------------------
  36. void LockCursor( InputContextHandle_t hContext, bool bEnable );
  37. //-----------------------------------------------------------------------------
  38. // Purpose: unlocks the cursor state
  39. //-----------------------------------------------------------------------------
  40. bool IsCursorLocked();
  41. //-----------------------------------------------------------------------------
  42. // Purpose: loads a custom cursor file from the file system
  43. //-----------------------------------------------------------------------------
  44. vgui::HCursor Cursor_CreateCursorFromFile( char const *curOrAniFile, char const *pPathID );
  45. // Helper for shutting down cursors
  46. void Cursor_ClearUserCursors();
  47. #endif // MATSURFACE_CURSOR_H