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.

49 lines
1.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef SYS_UTILS_H
  8. #define SYS_UTILS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. typedef int WHANDLE;
  13. // ERROR HANDLING
  14. extern const unsigned int SYS_NO_ERROR;
  15. extern const unsigned int SYS_ERROR_INVALID_HANDLE;
  16. void Sys_SetLastError(unsigned long error);
  17. unsigned long Sys_GetLastError();
  18. // MUTEX HANDLING
  19. WHANDLE Sys_CreateMutex(const char *mutexName);
  20. void Sys_ReleaseMutex(WHANDLE mutexHandle);
  21. // MUTEX SYNCHRONIZATION
  22. extern const unsigned int SYS_WAIT_OBJECT_0;
  23. extern const unsigned int SYS_WAIT_ABANDONED;
  24. unsigned int Sys_WaitForSingleObject(WHANDLE mutexHandle, int milliseconds);
  25. // window handling
  26. unsigned int Sys_RegisterWindowMessage(const char *msgName);
  27. WHANDLE Sys_FindWindow(const char *className, const char *windowName);
  28. void Sys_EnumWindows(void *callbackFunction, int lparam);
  29. void Sys_GetWindowText(WHANDLE wnd, char *buffer, int bufferSize);
  30. void Sys_PostMessage(WHANDLE wnd, unsigned int msg, unsigned int wParam, unsigned int lParam);
  31. WHANDLE Sys_CreateWindowEx(const char *windowName);
  32. void Sys_DestroyWindow(WHANDLE wnd);
  33. // mouse
  34. void Sys_SetCursorPos(int x, int y);
  35. #endif // SYS_UTILS_H