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.

63 lines
1.6 KiB

  1. #ifndef _TTS_H
  2. #define _TTS_H
  3. #include "sapilayr.h"
  4. #include "kes.h"
  5. class CSapiIMX;
  6. class CSpTask;
  7. class __declspec(novtable) CTextToSpeech
  8. {
  9. public:
  10. CTextToSpeech(CSapiIMX *psi);
  11. virtual ~CTextToSpeech( );
  12. HRESULT TtsPlay( );
  13. HRESULT TtsStop( );
  14. HRESULT TtsPause( );
  15. HRESULT TtsResume( );
  16. HRESULT _TtsPlay(TfEditCookie ec,ITfContext *pic);
  17. HRESULT _SetTTSButtonStatus(ITfContext *pic);
  18. BOOL _IsPureCiceroIC(ITfContext *pic);
  19. HRESULT _HandleEventOnPlayButton( );
  20. HRESULT _HandleEventOnPauseButton( );
  21. BOOL _IsInPlay( ) { return m_fIsInPlay; }
  22. BOOL _IsInPause( ) { return m_fIsInPause; }
  23. void _SetPlayMode(BOOL fIsInPlay )
  24. {
  25. m_fIsInPlay = fIsInPlay;
  26. // Temporally enable or disable dictation if dictation is ON
  27. // if it Is In Play, Disable Dictation.
  28. // if it Is Not In Play, Enable Dicatation.
  29. _SetDictation(!fIsInPlay);
  30. };
  31. void _SetPauseMode(BOOL fIsInPause )
  32. {
  33. m_fIsInPause = fIsInPause;
  34. // Temporally enable or disable dictation if dictation is ON
  35. //
  36. // if it is In pause, Enable dictation.
  37. // if it is not In pause, Disable Dication.
  38. _SetDictation(fIsInPause);
  39. };
  40. private:
  41. void _SetDictation( BOOL fEnable );
  42. CSapiIMX *m_psi;
  43. CComPtr<ITfFnPlayBack> m_cpPlayBack;
  44. BOOL m_fPlaybackInitialized;
  45. BOOL m_fIsInPlay;
  46. BOOL m_fIsInPause;
  47. };
  48. #endif // _TTS_H