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.

74 lines
1.9 KiB

  1. //
  2. // regwatch.h
  3. //
  4. #ifndef REGdWATCH_H
  5. #define REGdWATCH_H
  6. #include "private.h"
  7. //#include "smblock.h"
  8. #include "cregkey.h"
  9. #define REG_WATCH_KBDTOGGLE 0
  10. #define REG_WATCH_HKLM_IMX 1
  11. #define REG_WATCH_KBDPRELOAD 2
  12. #define REG_WATCH_RUN 3
  13. #define REG_WATCH_HKCU_IMX 4
  14. #define REG_WATCH_HKCU_SPEECH 5
  15. #define REG_WATCH_HKCU_CPL_APPEARANCE 6
  16. #define REG_WATCH_HKCU_CPL_COLORS 7
  17. #define REG_WATCH_HKCU_CPL_METRICS 8
  18. #define REG_WATCH_HKLM_SPEECH 9
  19. #define REG_WATCH_KBDLAYOUT 10
  20. #define REG_WATCH_HKCU_ASSEMBLIES 11
  21. #define NUM_REG_WATCH 12
  22. typedef struct _REGWATCH
  23. {
  24. HKEY hKeyRoot;
  25. const char *pszKey;
  26. HKEY hKey;
  27. } REGWATCH;
  28. class CRegWatcher
  29. {
  30. public:
  31. CRegWatcher() {}
  32. static BOOL Init();
  33. static void Uninit();
  34. static const HANDLE *GetEvents()
  35. {
  36. return _rgEvent;
  37. }
  38. static void OnEvent(DWORD dwEventId);
  39. static void StartSysColorChangeTimer();
  40. private:
  41. static BOOL InitEvent(int nId, BOOL fReset = FALSE);
  42. static BOOL PostAllThreadMsg(WPARAM wParam);
  43. static UINT_PTR nRegImxTimerId;
  44. static void RegImxTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
  45. static UINT_PTR nSysColorTimerId;
  46. static void SysColorTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
  47. static UINT_PTR nKbdToggleTimerId;
  48. static void KbdToggleTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
  49. static UINT_PTR nKbdLayoutTimerId;
  50. static void KbdLayoutTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
  51. static void KillInternat();
  52. static void UpdateSpTip();
  53. static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam);
  54. static REGWATCH _rgRegWatch[NUM_REG_WATCH];
  55. static HANDLE _rgEvent[NUM_REG_WATCH];
  56. };
  57. #endif // REGdWATCH_H