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.

72 lines
2.3 KiB

  1. #ifndef __SSHNDLER_H_INCLUDED_
  2. #define __SSHNDLER_H_INCLUDED_
  3. #include "precomp.h"
  4. #include "imagescr.h"
  5. #include "extimer.h"
  6. #include "simstr.h"
  7. #include "findthrd.h"
  8. class CScreenSaverHandler
  9. {
  10. private:
  11. CImageScreenSaver *m_pImageScreenSaver;
  12. HINSTANCE m_hInstance;
  13. HWND m_hWnd;
  14. UINT m_nPaintTimerId;
  15. UINT m_nChangeTimerId;
  16. UINT m_nToolbarTimerId;
  17. bool m_bToolbarVisible;
  18. UINT m_nFindNotifyMessage;
  19. bool m_bPaused;
  20. CExclusiveTimer m_TimerPaint;
  21. CExclusiveTimer m_TimerInput;
  22. HANDLE m_hFindThread;
  23. HANDLE m_hFindCancel;
  24. bool m_bFirstImage;
  25. HWND m_hwndTB;
  26. LPARAM m_LastMousePosition;
  27. private:
  28. HRESULT _ShowToolbar(bool bShow);
  29. HRESULT _CreateToolbar();
  30. HRESULT _InitializeToolbar(HWND hwndTB, int idCold, int idHot);
  31. void _OnInput();
  32. void HandleButtons(HDC hDC);
  33. void OnPlay();
  34. void OnNext();
  35. void OnStop();
  36. void OnPrev();
  37. void OnPause();
  38. // No implementation
  39. CScreenSaverHandler(void);
  40. CScreenSaverHandler( const CScreenSaverHandler & );
  41. CScreenSaverHandler &operator=( const CScreenSaverHandler & );
  42. public:
  43. void Initialize(void);
  44. CScreenSaverHandler( HWND hWnd,
  45. UINT nFindNotifyMessage,
  46. UINT nPaintTimer,
  47. UINT nChangeTimer,
  48. UINT nToolbarTimer,
  49. HINSTANCE hInstance );
  50. virtual ~CScreenSaverHandler(void);
  51. // Message handlers
  52. bool HandleKeyboardMessage(UINT nMessage, WPARAM nVirtkey);
  53. bool HandleMouseMessage(WPARAM wParam, LPARAM lParam);
  54. bool HandleMouseMove(WPARAM wParam, LPARAM lParam);
  55. void HandleConfigChange();
  56. void OnSize(WPARAM wParam, LPARAM lParam);
  57. void HandleTimer( WPARAM nEvent );
  58. void HandlePaint(void);
  59. void HandleFindFile( CFoundFileMessageData *pFoundFileMessageData );
  60. void HandleOnCommand( WPARAM wParam, LPARAM lParam);
  61. void HandleOnAppCommand ( WPARAM wParam, LPARAM lParam);
  62. };
  63. #endif // __SSHNDLER_H_INCLUDED