spellcheck.idl 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. cpp_quote("#ifndef MIN_SPELLING_NTDDI")
  7. cpp_quote("#define MIN_SPELLING_NTDDI NTDDI_WIN8")
  8. cpp_quote("#endif")
  9. cpp_quote("#if NTDDI_VERSION >= MIN_SPELLING_NTDDI")
  10. import "oaidl.idl";
  11. import "ocidl.idl";
  12. cpp_quote("#include <winapifamily.h>")
  13. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  14. typedef [v1_enum] enum WORDLIST_TYPE {
  15. WORDLIST_TYPE_IGNORE = 0,
  16. WORDLIST_TYPE_ADD = 1,
  17. WORDLIST_TYPE_EXCLUDE = 2,
  18. WORDLIST_TYPE_AUTOCORRECT = 3,
  19. } WORDLIST_TYPE;
  20. [
  21. object,
  22. uuid(b7c82d61-fbe8-4b47-9b27-6c0d2e0de0a3),
  23. pointer_default(unique)
  24. ]
  25. interface ISpellingError : IUnknown {
  26. typedef [v1_enum] enum CORRECTIVE_ACTION {
  27. CORRECTIVE_ACTION_NONE = 0,
  28. CORRECTIVE_ACTION_GET_SUGGESTIONS = 1,
  29. CORRECTIVE_ACTION_REPLACE = 2,
  30. CORRECTIVE_ACTION_DELETE = 3,
  31. } CORRECTIVE_ACTION;
  32. [propget] HRESULT StartIndex([out, retval] ULONG *val);
  33. [propget] HRESULT Length([out, retval] ULONG *val);
  34. [propget] HRESULT CorrectiveAction([out, retval] CORRECTIVE_ACTION *val);
  35. [propget] HRESULT Replacement([out, retval] LPWSTR *val);
  36. }
  37. [
  38. object,
  39. uuid(803e3bd4-2828-4410-8290-418d1d73c762),
  40. pointer_default(unique)
  41. ]
  42. interface IEnumSpellingError : IUnknown {
  43. HRESULT Next([out, retval] ISpellingError **val);
  44. }
  45. [
  46. object,
  47. uuid(432e5f85-35cf-4606-a801-6f70277e1d7a),
  48. pointer_default(unique)
  49. ]
  50. interface IOptionDescription : IUnknown {
  51. [propget] HRESULT Id([out, retval] LPWSTR *val);
  52. [propget] HRESULT Heading([out, retval] LPWSTR *val);
  53. [propget] HRESULT Description([out, retval] LPWSTR *val);
  54. [propget] HRESULT Labels([out, retval] IEnumString **val);
  55. }
  56. interface ISpellChecker;
  57. [
  58. object,
  59. uuid(0b83a5b0-792f-4eab-9799-acf52c5ed08a),
  60. pointer_default(unique)
  61. ]
  62. interface ISpellCheckerChangedEventHandler : IUnknown {
  63. HRESULT Invoke([in] ISpellChecker *sender);
  64. }
  65. [
  66. object,
  67. uuid(b6fd0b71-e2bc-4653-8d05-f197e412770b),
  68. pointer_default(unique)
  69. ]
  70. interface ISpellChecker : IUnknown {
  71. [propget] HRESULT LanguageTag([out, retval] LPWSTR *val);
  72. HRESULT Check([in] LPCWSTR text, [out, retval] IEnumSpellingError **val);
  73. HRESULT Suggest([in] LPCWSTR word, [out, retval] IEnumString **val);
  74. HRESULT Add([in] LPCWSTR word);
  75. HRESULT Ignore([in] LPCWSTR word);
  76. HRESULT AutoCorrect([in] LPCWSTR from, [in] LPCWSTR to);
  77. HRESULT GetOptionValue([in] LPCWSTR option_id, [out, retval] BYTE *val);
  78. [propget] HRESULT OptionIds([out, retval] IEnumString **val);
  79. [propget] HRESULT Id([out, retval] LPWSTR *val);
  80. [propget] HRESULT LocalizedName([out, retval] LPWSTR *val);
  81. HRESULT add_SpellCheckerChanged([in] ISpellCheckerChangedEventHandler *handler, [out, retval] DWORD *event_cookie);
  82. HRESULT remove_SpellCheckerChanged([in] DWORD event_cookie);
  83. HRESULT GetOptionDescription([in] LPCWSTR optionId, [out, retval] IOptionDescription **val);
  84. HRESULT ComprehensiveCheck([in] LPCWSTR text, [out, retval] IEnumSpellingError **val);
  85. }
  86. [
  87. object,
  88. uuid(e7ed1c71-87f7-4378-a840-c9200dacee47),
  89. pointer_default(unique)
  90. ]
  91. interface ISpellChecker2 : ISpellChecker {
  92. HRESULT Remove([in] LPCWSTR word);
  93. }
  94. [
  95. object,
  96. uuid(8e018a9d-2415-4677-bf08-794ea61f94bb),
  97. pointer_default(unique)
  98. ]
  99. interface ISpellCheckerFactory : IUnknown {
  100. [propget] HRESULT SupportedLanguages([out, retval] IEnumString **val);
  101. HRESULT IsSupported([in] LPCWSTR languageTag, [out, retval] WINBOOL *val);
  102. HRESULT CreateSpellChecker([in] LPCWSTR languageTag, [out, retval] ISpellChecker **val);
  103. }
  104. cpp_quote("#endif /* WINAPI_PARTITION_APP */")
  105. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  106. [
  107. object,
  108. uuid(aa176b85-0e12-4844-8e1a-eef1da77f586),
  109. pointer_default(unique)
  110. ]
  111. interface IUserDictionariesRegistrar : IUnknown {
  112. HRESULT RegisterUserDictionary([in] LPCWSTR dictionaryPath, [in] LPCWSTR languageTag);
  113. HRESULT UnregisterUserDictionary([in] LPCWSTR dictionaryPath, [in] LPCWSTR languageTag);
  114. }
  115. cpp_quote("#endif /* WINAPI_PARTITION_DESKTOP */")
  116. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)")
  117. [
  118. uuid(4a250e01-61ea-400b-a27d-bf3744bcc9f5),
  119. version(1.0),
  120. ]
  121. library MsSpellCheckLib {
  122. importlib("stdole2.tlb");
  123. [
  124. uuid(7ab36653-1796-484b-bdfa-e74f1db7c1dc)
  125. ]
  126. coclass SpellCheckerFactory {
  127. [default] interface ISpellCheckerFactory;
  128. interface IUserDictionariesRegistrar;
  129. };
  130. }
  131. cpp_quote("#endif /* WINAPI_PARTITION_APP */")
  132. cpp_quote("#endif /* MIN_SPELLING_NTDDI */")