InputScope.idl 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-2000.
  5. //
  6. // File: InputScope.idl
  7. //
  8. // Contents: InputScope declarations.
  9. //
  10. //
  11. //--------------------------------------------------------------------------
  12. cpp_quote("//=--------------------------------------------------------------------------=")
  13. cpp_quote("// InputScope.h")
  14. cpp_quote("")
  15. cpp_quote("")
  16. cpp_quote("// InputScope declarations.")
  17. cpp_quote("")
  18. cpp_quote("//=--------------------------------------------------------------------------=")
  19. cpp_quote("// (C) Copyright 1995-2003 Microsoft Corporation. All Rights Reserved.")
  20. cpp_quote("//")
  21. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  22. cpp_quote("// ANY KIND, EITHER EXPRESSED OR TFPLIED, INCLUDING BUT NOT LIMITED TO")
  23. cpp_quote("// THE TFPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  24. cpp_quote("// PARTICULAR PURPOSE.")
  25. cpp_quote("//=--------------------------------------------------------------------------=")
  26. cpp_quote("")
  27. cpp_quote("#ifndef INPUTSCOPE_DEFINED")
  28. cpp_quote("#define INPUTSCOPE_DEFINED")
  29. cpp_quote("")
  30. cpp_quote("#include <windows.h>")
  31. cpp_quote("")
  32. cpp_quote("#ifdef __cplusplus")
  33. cpp_quote("extern \"C\" {")
  34. cpp_quote("#endif /* __cplusplus */")
  35. cpp_quote("")
  36. typedef enum
  37. {
  38. // common input scopes
  39. IS_DEFAULT = 0,
  40. IS_URL = 1,
  41. IS_FILE_FULLFILEPATH = 2,
  42. IS_FILE_FILENAME = 3,
  43. IS_EMAIL_USERNAME = 4,
  44. IS_EMAIL_SMTPEMAILADDRESS = 5,
  45. IS_LOGINNAME = 6,
  46. IS_PERSONALNAME_FULLNAME = 7,
  47. IS_PERSONALNAME_PREFIX = 8,
  48. IS_PERSONALNAME_GIVENNAME = 9,
  49. IS_PERSONALNAME_MIDDLENAME = 10,
  50. IS_PERSONALNAME_SURNAME = 11,
  51. IS_PERSONALNAME_SUFFIX = 12,
  52. IS_ADDRESS_FULLPOSTALADDRESS = 13,
  53. IS_ADDRESS_POSTALCODE = 14,
  54. IS_ADDRESS_STREET = 15,
  55. IS_ADDRESS_STATEORPROVINCE = 16,
  56. IS_ADDRESS_CITY = 17,
  57. IS_ADDRESS_COUNTRYNAME = 18,
  58. IS_ADDRESS_COUNTRYSHORTNAME = 19,
  59. IS_CURRENCY_AMOUNTANDSYMBOL = 20,
  60. IS_CURRENCY_AMOUNT = 21,
  61. IS_DATE_FULLDATE = 22,
  62. IS_DATE_MONTH = 23,
  63. IS_DATE_DAY = 24,
  64. IS_DATE_YEAR = 25,
  65. IS_DATE_MONTHNAME = 26,
  66. IS_DATE_DAYNAME = 27,
  67. IS_DIGITS = 28,
  68. IS_NUMBER = 29,
  69. IS_ONECHAR = 30,
  70. IS_PASSWORD = 31,
  71. IS_TELEPHONE_FULLTELEPHONENUMBER = 32,
  72. IS_TELEPHONE_COUNTRYCODE = 33,
  73. IS_TELEPHONE_AREACODE = 34,
  74. IS_TELEPHONE_LOCALNUMBER = 35,
  75. IS_TIME_FULLTIME = 36,
  76. IS_TIME_HOUR = 37,
  77. IS_TIME_MINORSEC = 38,
  78. IS_NUMBER_FULLWIDTH = 39,
  79. IS_ALPHANUMERIC_HALFWIDTH = 40,
  80. IS_ALPHANUMERIC_FULLWIDTH = 41,
  81. IS_CURRENCY_CHINESE = 42,
  82. IS_BOPOMOFO = 43,
  83. IS_HIRAGANA = 44,
  84. IS_KATAKANA_HALFWIDTH = 45,
  85. IS_KATAKANA_FULLWIDTH = 46,
  86. IS_HANJA = 47,
  87. // special input scopes for ITfInputScope
  88. IS_PHRASELIST = -1,
  89. IS_REGULAREXPRESSION = -2,
  90. IS_SRGS = -3,
  91. IS_XML = -4,
  92. } InputScope;
  93. //
  94. // MSCTF entry
  95. //
  96. cpp_quote("HRESULT WINAPI SetInputScope(HWND hwnd, InputScope inputscope);")
  97. cpp_quote("HRESULT WINAPI SetInputScopes(HWND hwnd, const InputScope *pInputScopes, UINT cInputScopes, WCHAR **ppszPhraseList, UINT cPhrases, WCHAR *pszRegExp, WCHAR *pszSRGS);")
  98. cpp_quote("HRESULT WINAPI SetInputScopeXML(HWND hwnd, WCHAR *pszXML);")
  99. cpp_quote("DEFINE_GUID(IID_ITfInputScope, 0xfde1eaee, 0x6924, 0x4cdf, 0x91, 0xe7, 0xda, 0x38, 0xcf, 0xf5, 0x55, 0x9d);")
  100. cpp_quote("DEFINE_GUID(GUID_PROP_INPUTSCOPE, 0x1713dd5a, 0x68e7, 0x4a5b, 0x9a, 0xf6, 0x59, 0x2a, 0x59, 0x5c, 0x77, 0x8d);")
  101. cpp_quote("#ifdef __cplusplus")
  102. cpp_quote("}")
  103. cpp_quote("#endif /* __cplusplus */")
  104. import "oaidl.idl";
  105. import "ocidl.idl";
  106. //
  107. // ITfInputScope
  108. //
  109. [
  110. object,
  111. uuid(fde1eaee-6924-4cdf-91e7-da38cff5559d),
  112. pointer_default(unique)
  113. ]
  114. interface ITfInputScope : IUnknown
  115. {
  116. HRESULT GetInputScopes([out] InputScope **pprgInputScopes,
  117. [out] UINT *pcCount);
  118. HRESULT GetPhrase([out] BSTR **ppbstrPhrases,
  119. [out] UINT *pcCount);
  120. HRESULT GetRegularExpression([out] BSTR *pbstrRegExp);
  121. HRESULT GetSRGS([out] BSTR *pbstrSRGS);
  122. HRESULT GetXML([out] BSTR *pbstrXML);
  123. };
  124. cpp_quote("#endif // INPUTSCOPE_DEFINED")