Source code of Windows XP (NT5)
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.

100 lines
2.4 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997
  5. //
  6. // File: msidle.h
  7. //
  8. // Contents: Types and prototypes for idle detection callback dll
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 05-26-1997 darrenmi (Darren Mitchell) Created
  15. //
  16. //----------------------------------------------------------------------------
  17. //
  18. // Idle callback type
  19. //
  20. typedef void (WINAPI* _IDLECALLBACK) (DWORD dwState);
  21. #define STATE_USER_IDLE_BEGIN 1
  22. #define STATE_USER_IDLE_END 2
  23. //
  24. // BeginIdleDetection - start monitoring idleness
  25. //
  26. // pfnCallback - function to call back when idle state changes
  27. // dwIdleMin - minutes of inactivity before idle callback
  28. // dwReserved - must be 0
  29. //
  30. // Returns: 0 on success, error code on failure
  31. //
  32. // Note: Exported as ordinal 3
  33. //
  34. DWORD BeginIdleDetection(_IDLECALLBACK pfnCallback, DWORD dwIdleMin, DWORD dwReserved);
  35. typedef DWORD (WINAPI* _BEGINIDLEDETECTION) (_IDLECALLBACK, DWORD, DWORD);
  36. //
  37. // EndIdleDetection - stop monitoring idleness
  38. //
  39. // Returns: TRUE on success, FALSE on failure
  40. //
  41. // Note: Exported as ordinal 4
  42. //
  43. BOOL EndIdleDetection(DWORD dwReserved);
  44. typedef BOOL (WINAPI* _ENDIDLEDETECTION) (DWORD, DWORD);
  45. //
  46. // SetIdleTimeout - Set minutes for idle timeout and reset idle state
  47. //
  48. // dwMinutes - new minutes threshold for idleness
  49. // fResetState - flag to return to non-idle state to retrigger idle callback
  50. // dwReserved - must be 0
  51. //
  52. // Note: Exported as ordinal 5
  53. //
  54. BOOL SetIdleTimeout(DWORD dwMinutes, DWORD dwReserved);
  55. typedef BOOL (WINAPI* _SETIDLETIMEOUT) (DWORD, DWORD);
  56. //
  57. // SetIdleNotify - Turns on or off notification when idle
  58. //
  59. // fNotify - flag whether to notify or not
  60. // dwReserved - must be 0
  61. //
  62. // Note: Exported as ordinal 6
  63. //
  64. void SetIdleNotify(BOOL fNotify, DWORD dwReserved);
  65. typedef void (WINAPI* _SETIDLENOTIFY) (BOOL, DWORD);
  66. //
  67. // SetBusyNotify - Turns on or off notification when busy
  68. //
  69. // fNotify - flag whether to notify or not
  70. // dwReserved - must be 0
  71. //
  72. // Note: Exported as ordinal 7
  73. //
  74. void SetBusyNotify(BOOL fNotify, DWORD dwReserved);
  75. typedef void (WINAPI* _SETBUSYNOTIFY) (BOOL, DWORD);
  76. //
  77. // GetIdleMinutes
  78. //
  79. // dwReserved - must be 0
  80. //
  81. // Returns number of minutes since user's last activity
  82. //
  83. // Note: Exported as ordinal 8
  84. //
  85. DWORD GetIdleMinutes(DWORD dwReserved);
  86. typedef DWORD (WINAPI* _GETIDLEMINUTES) (DWORD);