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.

124 lines
3.6 KiB

  1. //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation. All rights reserved.
  4. //
  5. // Module:
  6. // volcano/dll/volcanop.h
  7. //
  8. // Description:
  9. // Private header for volcano project.
  10. // This should include all the internal data types
  11. // as well as including all recognizers used by TSUNAMI class products
  12. //
  13. // Author:
  14. // hrowley
  15. //
  16. //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  17. #pragma once
  18. // Sort out which 2 stroke recognizer we're using.
  19. #if !defined(USE_FUGU) && !defined(USE_OTTER) && !defined(USE_OTTERFUGU)
  20. # define USE_OTTER
  21. #endif
  22. // Sort out which 3 and up stroke recognizer we're using.
  23. #if !defined(USE_HOUND) && !defined(USE_ZILLA) && !defined(USE_ZILLAHOUND)
  24. # define USE_ZILLA
  25. #endif
  26. // When training Hound-Zilla combiner, set this.
  27. //#define TRAIN_ZILLA_HOUND_COMBINER 1
  28. #include "common.h"
  29. #include "zilla.h"
  30. #include "otter.h"
  31. #include "jaws.h"
  32. #include "sole.h"
  33. #include "fugu.h"
  34. #ifdef USE_OLD_DATABASES
  35. # include "crane.h"
  36. #else
  37. # include "hawk.h"
  38. #endif
  39. #include "bboxfeat.h"
  40. #include "ttune.h"
  41. #include "centipede.h"
  42. #include "inkbox.h"
  43. #include "score.h"
  44. #include "vtune.h"
  45. #include "lattice.h"
  46. // Max alternates we can return for one character.
  47. #define MAX_ALTERNATES 20
  48. // Flag to mark VRCRESULT as the full top one string.
  49. #define ALL_TOP_ONE 0xFFFF
  50. // Structure to hold free input results. Predeclare the VRC pointer
  51. // since it froms a loop, we have to break it.
  52. typedef struct tagVRC *PVRC;
  53. typedef struct tagVRCRESULT {
  54. PVRC pVRC; // We need the XRC object to get all top1.
  55. wchar_t wch; // Results charater, FFFF -> return all top1.
  56. short iChar; // The position of this alternate in the current path
  57. } VRCRESULT;
  58. // Struct to hold InkSet information.
  59. typedef struct tagVINKSET {
  60. PVRC pVRC; // We need the XRC object to get all top1.
  61. UINT iChar; // Index of first char.
  62. UINT cChar; // Count of chars.
  63. UINT cIntervals; // How many intervals in inkset
  64. } VINKSET;
  65. // Internal structure matching up to the HRC passed to most interface
  66. // calls. To avoid accidental confusion and problems with the
  67. // Tsunami name of XRC, it will be called VRC (for Volcano RC).
  68. typedef struct tagVRC {
  69. // Status flags.
  70. BOOL fBoxedInput;// Being called by boxed API.
  71. BOOL fHaveInput; // Have recieved at least one stroke.
  72. BOOL fEndInput; // End input has been called.
  73. BOOL fBeginProcess; // If a process input call has been made (to disallow further config calls)
  74. // The lattice used to build up and process the ink.
  75. LATTICE *pLattice;
  76. // The final results.
  77. LATTICE_PATH *pLatticePath;
  78. } VRC;
  79. // Global data loaded by LoadCharRec.
  80. extern LOCRUN_INFO g_locRunInfo;
  81. #ifdef __cplusplus
  82. extern "C" {
  83. #endif
  84. // The language ("JPN", "KOR", "CHS", or "CHT") we are recognizing
  85. extern wchar_t *g_szRecognizerLanguage;
  86. // Other APIs and calls used by wispapis.c
  87. BOOL SetHwxCorrectionContext(HRC hrc, wchar_t *wszBefore, wchar_t *wszAfter);
  88. BOOL HwxUnconfig(BOOL bCanUnloadIFELang3);
  89. BOOL SetHwxFlags(HRC hrc, DWORD dwFlags);
  90. BOOL SetHwxFactoid(HRC hrc, wchar_t *wszFactoid);
  91. BOOL IsWStringSupportedHRC(HRC hrc, wchar_t *pwcString);
  92. // Factoid related functions private to the recognizer
  93. BOOL FactoidTableConfig(LOCRUN_INFO *pLocRunInfo, wchar_t *wszRecognizerLanguage);
  94. BOOL FactoidTableUnconfig();
  95. BOOL SetFactoidDefaultInternal(LATTICE *pLattice);
  96. BOOL SetFactoidInternal(LOCRUN_INFO *pLocRunInfo, LATTICE *pLattice, DWORD dwFactoid);
  97. BOOL IsSupportedFactoid(DWORD dwFactoid);
  98. // Stroke utils functions
  99. POINT *DupPoints(POINT *pOldPoints, int nPoints);
  100. GLYPH *GlyphFromStrokes(UINT cStrokes, STROKE *pStrokes);
  101. #ifdef __cplusplus
  102. }
  103. #endif