Leaked source code of windows server 2003
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.

102 lines
2.6 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. // 07-11-1997 anirudhs Temporarily added to NT admin project,
  16. // BUGBUG NEEDS TO BE REMOVED when Darren checks in for NT
  17. //
  18. //----------------------------------------------------------------------------
  19. //
  20. // Idle callback type
  21. //
  22. typedef void (WINAPI* _IDLECALLBACK) (DWORD dwState);
  23. #define STATE_USER_IDLE_BEGIN 1
  24. #define STATE_USER_IDLE_END 2
  25. //
  26. // BeginIdleDetection - start monitoring idleness
  27. //
  28. // pfnCallback - function to call back when idle state changes
  29. // dwIdleMin - minutes of inactivity before idle callback
  30. // dwReserved - must be 0
  31. //
  32. // Returns: 0 on success, error code on failure
  33. //
  34. // Note: Exported as ordinal 3
  35. //
  36. DWORD BeginIdleDetection(_IDLECALLBACK pfnCallback, DWORD dwIdleMin, DWORD dwReserved);
  37. typedef DWORD (WINAPI* _BEGINIDLEDETECTION) (_IDLECALLBACK, DWORD, DWORD);
  38. //
  39. // EndIdleDetection - stop monitoring idleness
  40. //
  41. // Returns: TRUE on success, FALSE on failure
  42. //
  43. // Note: Exported as ordinal 4
  44. //
  45. BOOL EndIdleDetection(DWORD dwReserved);
  46. typedef BOOL (WINAPI* _ENDIDLEDETECTION) (DWORD);
  47. //
  48. // SetIdleTimeout - Set minutes for idle timeout and reset idle state
  49. //
  50. // dwMinutes - new minutes threshold for idleness
  51. // fResetState - flag to return to non-idle state to retrigger idle callback
  52. // dwReserved - must be 0
  53. //
  54. // Note: Exported as ordinal 5
  55. //
  56. BOOL SetIdleTimeout(DWORD dwMinutes, DWORD dwReserved);
  57. typedef BOOL (WINAPI* _SETIDLETIMEOUT) (DWORD, DWORD);
  58. //
  59. // SetIdleNotify - Turns on or off notification when idle
  60. //
  61. // fNotify - flag whether to notify or not
  62. // dwReserved - must be 0
  63. //
  64. // Note: Exported as ordinal 6
  65. //
  66. void SetIdleNotify(BOOL fNotify, DWORD dwReserved);
  67. typedef void (WINAPI* _SETIDLENOTIFY) (BOOL, DWORD);
  68. //
  69. // SetBusyNotify - Turns on or off notification when busy
  70. //
  71. // fNotify - flag whether to notify or not
  72. // dwReserved - must be 0
  73. //
  74. // Note: Exported as ordinal 7
  75. //
  76. void SetBusyNotify(BOOL fNotify, DWORD dwReserved);
  77. typedef void (WINAPI* _SETBUSYNOTIFY) (BOOL, DWORD);
  78. //
  79. // GetIdleMinutes
  80. //
  81. // dwReserved - must be 0
  82. //
  83. // Returns number of minutes since user's last activity
  84. //
  85. // Note: Exported as ordinal 8
  86. //
  87. DWORD GetIdleMinutes(DWORD dwReserved);
  88. typedef DWORD (WINAPI* _GETIDLEMINUTES) (DWORD);