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.

92 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: IWBreak.hxx
  7. //
  8. // Contents: NLG FarEast Word Breaker
  9. //
  10. // Classes: CWordBreaker
  11. //
  12. // History: 01-July-1996 PatHal Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #ifndef __IWBREAK_HXX__
  16. #define __IWBREAK_HXX__
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Class: CWordBreaker
  20. //
  21. // Purpose: Break text into phrases and words (Infosoft's wordbreaker)
  22. //
  23. //----------------------------------------------------------------------------
  24. class CWordBreaker : public IWordBreaker
  25. {
  26. public:
  27. // From IUnknown
  28. //
  29. virtual SCODE STDMETHODCALLTYPE
  30. QueryInterface( REFIID riid, void **ppvObject );
  31. virtual ULONG STDMETHODCALLTYPE
  32. AddRef();
  33. virtual ULONG STDMETHODCALLTYPE
  34. Release();
  35. // From IWordBreaker
  36. //
  37. virtual SCODE STDMETHODCALLTYPE
  38. Init( BOOL fQuery, ULONG ulMaxTokenSize, BOOL *pfLicense );
  39. virtual SCODE STDMETHODCALLTYPE
  40. BreakText( TEXT_SOURCE *pTextSource, IWordSink *pWordSink,
  41. IPhraseSink *pPhraseSink );
  42. virtual SCODE STDMETHODCALLTYPE
  43. ComposePhrase( WCHAR const *pwcNoun, ULONG cwcNoun,
  44. WCHAR const *pwcModifier, ULONG cwcModifier, ULONG ulAttachmentType,
  45. WCHAR *pwcPhrase, ULONG *pcwcPhrase );
  46. virtual SCODE STDMETHODCALLTYPE
  47. GetLicenseToUse( const WCHAR **ppwcsLicense );
  48. // Local methods
  49. //
  50. CWordBreaker( LCID lcid );
  51. private:
  52. ~CWordBreaker();
  53. BOOL
  54. FoldInputString(
  55. IN CONST WCHAR *pwc,
  56. IN ULONG cwc);
  57. static BOOL CALLBACK
  58. EnumOffsetsCallback (
  59. IN CONST DWORD *pichOffsets,
  60. IN CONST DWORD cOffsets,
  61. IN OUT LPARAM lpData);
  62. long _cRefs;
  63. LCID _lcid;
  64. BOOL _fQuery;
  65. ULONG _ulMaxTokenSize;
  66. #if defined(TH_LOG)
  67. HANDLE _hLog;
  68. #endif
  69. };
  70. #endif // __IWBREAK_HXX__