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.

128 lines
4.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // File: globals.h
  4. //
  5. // Contents: Global variable declarations.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef GLOBALS_H
  9. #define GLOBALS_H
  10. #include "private.h"
  11. #include "ciccs.h"
  12. extern HINSTANCE g_hInst;
  13. extern HINSTANCE g_hInstSpgrmr;
  14. extern DWORD g_dwTlsIndex;
  15. extern const GUID GUID_PROP_SAPI_DISPATTR;
  16. extern const GUID GUID_PROP_SAPIRESULTOBJECT; // ISpRecoResult object
  17. extern const GUID GUID_ATTR_SAPI_INPUT;
  18. extern const GUID GUID_ATTR_SAPI_GREENBAR;
  19. extern const GUID GUID_ATTR_SAPI_GREENBAR2;
  20. extern const GUID GUID_ATTR_SAPI_REDBAR;
  21. extern const GUID GUID_ATTR_SAPI_SELECTION;
  22. extern const GUID GUID_IC_PRIVATE;
  23. extern const GUID GUID_COMPARTMENT_SPEECHPRIV_REFCNT;
  24. extern const GUID GUID_COMPARTMENT_SPEECH_LEARNDOC;
  25. extern const GUID GUID_COMPARTMENT_TTS_STATUS;
  26. extern const GUID GUID_COMPARTMENT_SHARED_BLN_TEXT;
  27. extern const GUID GUID_COMPARTMENT_SPEECHUISHOWN;
  28. extern const GUID GUID_COMPARTMENT_SPEECH_STAGE;
  29. extern const GUID GUID_COMPARTMENT_SPEECH_STAGECHANGE;
  30. extern const GUID GUID_COMPARTMENT_SPEECH_STAGEDICTATION;
  31. extern const GUID CLSID_UIHost;
  32. extern const GUID GUID_COMPARTMENT_SPEECH_PROPERTY_CHANGE;
  33. extern const GUID CLSID_SpPropertyPage;
  34. extern const LARGE_INTEGER c_li0;
  35. extern const GUID GUID_HOTKEY_TTS_PLAY_STOP;
  36. extern const GUID GUID_HOTKEY_MODE_DICTATION;
  37. extern const GUID GUID_HOTKEY_MODE_COMMAND;
  38. extern CCicCriticalSectionStatic g_cs;
  39. // tablet stuff
  40. extern const CLSID CLSID_CorrectionIMX;
  41. extern const GUID GUID_IC_PRIVATE;
  42. const TCHAR c_szStatusWndClass[] = TEXT("SapiLayrStatusWndClass");
  43. const TCHAR c_szStatusWndName[] = TEXT("SapiLayer");
  44. const TCHAR c_szWorkerWndClass[] = TEXT("SapiTipWorkerClassV1.0");
  45. const TCHAR c_szSapilayrKey[] = TEXT("SOFTWARE\\Microsoft\\CTF\\Sapilayr\\");
  46. const TCHAR c_szDocBlockSize[] = TEXT("docblocksize");
  47. const TCHAR c_szMaxCandChars[] = TEXT("MaxCandChars");
  48. // Rule and property values in shrdcmd.xml
  49. const WCHAR c_szSelword[] = L"selword";
  50. const WCHAR c_szSelThrough[] = L"SelectThrough";
  51. const WCHAR c_szSelectSimple[] = L"SelectSimpleCmds";
  52. const WCHAR c_szEditCmds[] = L"EditCmds";
  53. const WCHAR c_szNavigationCmds[]= L"NavigationCmds";
  54. const WCHAR c_szCasingCmds[] = L"CasingCmds";
  55. const WCHAR c_szKeyboardCmds[] = L"KeyboardCmds";
  56. // Rule and property values in spell.xml
  57. const WCHAR c_szSpelling[] = L"spelling";
  58. const WCHAR c_szSpellMode[] = L"spellmode";
  59. const WCHAR c_szSpellThat[] = L"spellthat";
  60. const WCHAR c_szSpellingMode[] = L"spellingmode";
  61. // Rule and property values in dictcmd.xml
  62. const WCHAR c_szDictTBRule[] = L"ToolbarCmd"; // Diction toolbar command rule name in dictcmd.xml
  63. const WCHAR c_szDynUrlHist[] = L"UrlDynHistory"; // modebias command for Url History
  64. const WCHAR c_szStaticUrlHist[] = L"UrlHistory";
  65. const WCHAR c_szStaticUrlSpell[] = L"UrlSpelling";
  66. const WCHAR c_szHttp[] = L"http";
  67. const WCHAR c_szDot[] = L"dot";
  68. const WCHAR c_szSlash[] = L"slash";
  69. const WCHAR c_szColon[] = L"colon";
  70. const WCHAR c_szTilda[] = L"tilda";
  71. const WCHAR c_szWWWDot[] = L"www dot";
  72. const WCHAR c_szDotCom[] = L"dot com";
  73. const WCHAR c_szDotHtml[] = L"dot html";
  74. const WCHAR c_szDotExe[] = L"dot exe";
  75. const WCHAR c_szWWW[] = L"www";
  76. const WCHAR c_szCom[] = L"com";
  77. const WCHAR c_szHtml[] = L"html";
  78. const WCHAR c_szExe[] = L"exe";
  79. const WCHAR c_szHttpSla2[] = L"http://";
  80. const WCHAR c_szSymDot[] = L".";
  81. const WCHAR c_szSymSlash[] = L"/";
  82. const WCHAR c_szSymColon[] = L":";
  83. const WCHAR c_szSymTilda[] = L"~";
  84. const WCHAR c_szSymWWWDot[] = L"www.";
  85. const WCHAR c_szSymDotCom[] = L".com";
  86. const WCHAR c_szSymDotExe[] = L".exe";
  87. const WCHAR c_szSymDotHtml[] = L".html";
  88. #define MAX_CANDIDATE_CHARS 128
  89. #define MAX_ALTERNATES_NUM 20
  90. // global typedef
  91. typedef struct {
  92. GUID guidFormatId;
  93. }SRPROPHEADER;
  94. //
  95. // per thread information.
  96. //
  97. class CSpeechUIServer;
  98. typedef struct {
  99. CSpeechUIServer *psus;
  100. }SPTIPTHREAD;
  101. SPTIPTHREAD *GetSPTIPTHREAD();
  102. void FreeSPTIPTHREAD();
  103. void UninitProcess();
  104. void LoadSpgrmrModule();
  105. #define TF_SAPI_PERF 0x00010000 // for SAPI perf tracing
  106. #define TF_LB_SINK 0x00020000 // for Language Bar sink related code tracing
  107. #define TF_SPBUTTON 0x00040000 // for speech button & mode change tracing.
  108. #endif // GLOBALS_H