home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wpentk.zip / WBPENTK4.DSK / IDRTEXT.IDL < prev    next >
Text File  |  1994-10-07  |  27KB  |  794 lines

  1.  
  2. //# This file was generated by the SOM Compiler.
  3. //# FileName: idrtext.id2.
  4. //# Generated using:
  5. //#     SOM Precompiler somopc: 2.7
  6. //#     SOM Emitter emitidl: 2.22
  7.  
  8. //
  9. //   CLASS: IDRText
  10. //
  11. //   CLASS HIERARCHY:
  12. //
  13. //     SOMObject
  14. //      └── IDRReco
  15. //            └── IDRText
  16. //
  17. //   DESCRIPTION:
  18. //
  19. //     Transformation of input data to text.
  20.  
  21. #ifndef idrtext_idl
  22. #define idrtext_idl
  23.  
  24. #include "idrreco.idl"
  25. #include <somcls.idl>
  26.  
  27. interface M_IDRText;
  28.  
  29. interface IDRText : IDRReco
  30. {
  31.  
  32.   VOID idrSetSymbolSubsetPriority(in ULONG ulSymSets) raises(IDR_PROB);
  33.  
  34.   // Method   : idrSetSymbolSubsetPriority
  35.   //
  36.   // Purpose  : Specify the symbol sets to be given higher priority than
  37.   //            others during recognition.
  38.   //
  39.   // Synopsis : VOID idrSetSymbolSubsetPriority( ULONG ulSymSets );
  40.   //
  41.   //    ulSymSets... Symbol sets to be given priority
  42.   //
  43.   // Returns  :
  44.   //   NO_ERROR.............. Success.
  45.   //   IDRERR_ERROR.......... Error.
  46.   //
  47.   // Usage    :
  48.   //   Callable - Always.
  49.   //   Override - Override by subclasses if specific symbols are implemented.
  50.  
  51.   ULONG idrGetSymbolSubsetPriority( ) raises(IDR_PROB);
  52.  
  53.   // Method   : idrGetSymbolSubsetPriority
  54.   //
  55.   // Purpose  : Get the symbol sets having higher priority in
  56.   //            recognition over others.
  57.   //
  58.   // Synopsis : ULONG idrGetSymbolSubsetPriority( );
  59.   //
  60.   //    ULONG ulSymSets... Pointer to symbol subsets mask having priority.
  61.   //
  62.   // Returns  :
  63.   //   NO_ERROR.............. Success.
  64.   //   IDRERR_ERROR.......... Error.
  65.   //
  66.   // Usage    :
  67.   //   Callable - Always.
  68.   //   Override - Override by subclasses if specific symbols are implemented.
  69.  
  70.  
  71.   VOID idrSetResultMaximum(in ULONG ulMaxResults ) raises(IDR_PROB);
  72.  
  73.   // Method   : idrSetResultMaximum
  74.   //
  75.   // Purpose  : Set the maximum number of results that the engine should
  76.   //            process during recognition.
  77.   //
  78.   // Synopsis : VOID idrSetResultMaximum
  79.   //
  80.   //   ulMaxResults... Maximum number of results.
  81.   //
  82.   // Returns  :
  83.   //   NO_ERROR.............. Success.
  84.   //   IDRERR_ERROR.......... Error.
  85.   //
  86.   // Notes    : If this maximum is set to 0, the engine's default
  87.   //            value will be used.  The lower the number of resluts set,
  88.   //            the less processing the engine has to do.
  89.   //
  90.  
  91.   ULONG idrGetResultMaximum( ) raises(IDR_PROB);
  92.  
  93.   // Method   : idrGetResultMaximum
  94.   //
  95.   // Purpose  : Get the maximum number of results that the engine will
  96.   //            process during recognition for this instance.
  97.   //
  98.   // Synopsis : ULONG idrGetResultMaximum( )
  99.   //
  100.   //   ULONG ulMaxResults... Maximum number of results.
  101.   //
  102.   // Returns  :
  103.   //   NO_ERROR.............. Success.
  104.   //   IDRERR_ERROR.......... Error.
  105.   //
  106.   // Notes    :
  107.  
  108.   VOID idrRecoInput(in HWND hNotify,
  109.                         in ULONG ulUser ) raises(IDR_PROB);
  110.  
  111.   // Method   : idrRecoInput
  112.   //
  113.   // Purpose  :  Indicate that all stroke input is complete; request
  114.   //             recognition of training processing.
  115.   //
  116.   // Synopsis : VOID idrRecoInput( HWND hNotify, ULONG ulUser);
  117.   //
  118.   //   hNotify... Window to notify when processing is complete.
  119.   //   ulUser...  User value.
  120.   //
  121.   // Returns  :
  122.   //   NO_ERROR.............. Success.
  123.   //   IDRERR_ERROR.......... Error.
  124.   //
  125.   // Notes    : An IDR_RESULT message will be send to hNotify when
  126.   //            processing is done.  The ulUser parameter will be
  127.   //            passed back in mp1.
  128.   //
  129.   //            Once the application returns from this message, all strokes
  130.   //            are cleared from the engine.
  131.   //
  132.  
  133.    VOID idrGetTopResult( in PULONG pulCnt,
  134.                            in PIDR_TXTSYM pResults ) raises(IDR_PROB);
  135.  
  136.   // Method   : idrGetTopResult
  137.   //
  138.   // Purpose  : Retrieve the most probable, highest level recognition result.
  139.   //
  140.   // Synopsis : VOID idrGetTopResult( INOUT PULONG pulCnt,
  141.   //                                    INOUT PIDR_TXTSYM pResults )
  142.   //
  143.   //   pulCnt....... Pointer to the count of clusters available.
  144.   //   pResults..... Pointer to the array of IDR_TXTSYM to be returned
  145.   //
  146.   // Returns  :
  147.   //   NO_ERROR.............. Success.
  148.   //   IDRERR_ERROR.......... Error.
  149.   //   IDRERR_BUF_TOO_SMALL...A larger buffer is required.
  150.   //
  151.   // Notes    :
  152.   //   Two invocations may be required to get the data:
  153.   //     1) Allocate *pulCnt * sizeof (IDR_TXTSYM) and point to it with
  154.   //        pResults.
  155.   //     2) If successful and the initial buffer was large enough,
  156.   //        pResults will contain the information and *pulCnt will contain
  157.   //        the number of symbols returned.  Otherwise,
  158.   //        IDRERR_BUF_TOO_SMALL will be returned and *pulCnt will contain
  159.   //        the number of symbols to be returned.
  160.   //     3) Reallocate the block, point to it (via 'pResults') and invoke
  161.   //        again.  The 'pResults' is an array of *pulCnt IDR_TXTSYM structures.
  162.   //
  163.   // Usage    :
  164.   //   Callable - Always.
  165.   //   Override - Override by subclasses.
  166.  
  167.   VOID idrGetBoxResult( in ULONG ulLocation,
  168.                           in PULONG pulMemSize,
  169.                           in PIDR_TXTBOX pInfo) raises(IDR_PROB);
  170.  
  171.   // Method   : idGetBoxResult
  172.   //
  173.   // Purpose  : Specialized retrieval of recognition information for a
  174.   //            particular box.
  175.   //
  176.   // Synopsis : VOID idrGetBoxResult( INOUT ULONG ulLocation,
  177.   //                                    INOUT PULONG pulMemSize,
  178.   //                                    INOUT PIDR_TXTBOX pInfo )
  179.   //
  180.   //   ulLocation... Location of the box, the box id.
  181.   //   pulMemSize... Pointer to size variable.
  182.   //   pInfo........ Pointer to the box info buffer of size *pulSize.
  183.   //
  184.   // Returns  :
  185.   //   NO_ERROR.............. Success.
  186.   //   IDRERR_ERROR.......... Error.
  187.   //   IDRERR_BUF_TOO_SMALL...A larger buffer is required.
  188.   //
  189.   // Notes    :
  190.   //   Two invocations may be required to get the data:
  191.   //     1) Invoke with the 'pInfo' pointer variable pointing to an initial
  192.   //        buffer of size *pulMemSize.
  193.   //     2) If successful, the size variable will contain the number of bytes
  194.   //        required for the information.  If the initial buffer was large enough,
  195.   //        pInfo will contain the information.  Otherwise, IDRERR_BUF_TOO_SMALL
  196.   //        will be returned.
  197.   //     3) Reallocate the block, point to it (via 'pInfo') and invoke
  198.   //        again.  The 'paInfo' is an array of *pulCnt cluster info structures.
  199.   //
  200.   // Usage    :
  201.   //   Callable - Always.
  202.   //   Override - Override by subclasses.
  203.  
  204.   VOID idrGetClusterHandles ( in PULONG pulCnt,
  205.                                 in PHCLUSTER phClusters ) raises(IDR_PROB);
  206.  
  207.   // Method   : idrGetClusterHandles
  208.   //
  209.   // Purpose  : Retrieve the handles to all available clusters.
  210.   //
  211.   // Synopsis : VOID idrGetClusterHandles( INOUT PULONG pulCnt,
  212.   //                                    INOUT PHCLUSTER phClusters ),
  213.   //
  214.   //   pulCnt....... Pointer to the count of clusters available.
  215.   //   pClusters.... Pointer to the array of HCLUSTERS to be returned
  216.   //
  217.   // Returns  :
  218.   //   NO_ERROR.............. Success.
  219.   //   IDRERR_ERROR.......... Error.
  220.   //   IDRERR_BUF_TOO_SMALL...A larger buffer is required.
  221.   //
  222.   // Notes    :
  223.   //   Two invocations may be required to get the data:
  224.   //     1) Allocate *pulCnt * sizeof (HCLUSTER) and point to it with
  225.   //        phClusters.
  226.   //     2) If successful and the initial buffer was large enough,
  227.   //        phClusters will contain the information and *pulCnt will contain
  228.   //        the number of cluster handles returned.  Otherwise,
  229.   //        IDRERR_BUF_TOO_SMALL will be returned and *pulCnt will contain
  230.   //        the number of handles to be returned.
  231.   //     3) Reallocate the block, point to it (via 'phClusters') and invoke
  232.   //        again.  The 'pClusters' is an array of *pulCnt HCLUSTERs.
  233.   //
  234.   // Usage    :
  235.   //   Callable - Always.
  236.   //   Override - Override by subclasses.
  237.  
  238.  
  239.   ULONG idrGetResultCount( in HCLUSTER hCluster ) raises(IDR_PROB);
  240.  
  241.   // Method   : idrGetResultCount
  242.   //
  243.   // Purpose  : Get the number of possible results available from the
  244.   //            recognition of this cluster.
  245.   //
  246.   // Synopsis : ULONG idrGetResultCount(IN HCLUSTER hCluster )
  247.   //
  248.   //    hCluster.. Handle to the cluster.
  249.   //
  250.   //    ULONG ulResultCnt.. Number of possible results for this cluster.
  251.   //
  252.   // Returns  :
  253.   //   NO_ERROR.............. Success.
  254.   //   IDRERR_ERROR.......... Error.
  255.   //   IDRERR_NO_RESULTS_AVAIL... No results are available.
  256.   //
  257.   // Notes    :
  258.   //    Each cluster will have one result and possible alternative results.
  259.   //    This method returns the total number of possible results.
  260.  
  261.   VOID idrGetResultInfo( in HCLUSTER hCluster,
  262.                             in ULONG ulResult,
  263.                             in PULONG pulMemSize,
  264.                             in PIDR_TXTCLUSTER pInfo ) raises(IDR_PROB);
  265.  
  266.   // Method   : idrGetResultInfo
  267.   //
  268.   // Purpose  :
  269.   //
  270.   // Synopsis : VOID idrGetResultInfo( HCLUSTER hCluster,
  271.   //                                      ULONG ulResult,
  272.   //                                      PULONG pulMemSize,
  273.   //                                      PIDR_TXTCLUSTER pInfo );
  274.   //
  275.   //    hCluster... handle to the cluster of strokes
  276.   //    ulResult... number of the result; >0 gives alternative result
  277.   //                0 is the top result.
  278.   //    pulMemSize.. pointer to the number of bytes needed
  279.   //    pInfo...... pointer to the cluster info
  280.   //
  281.   // Returns  :
  282.   //   NO_ERROR.............. Success.
  283.   //   IDRERR_ERROR.......... Error.
  284.   //   IDRERR_BUF_TOO_SMALL.. Buffer was not large enough for the data.
  285.   //
  286.   // Notes    :
  287.   //   Two invocations may be required to get the data:
  288.   //     1) Invoke with the 'pInfo' pointer variable pointing to an initial
  289.   //        buffer of size *pulMemSize.
  290.   //     2) If successful, the size variable will contain the number of bytes
  291.   //        required for the information.  If the initial buffer was large enough,
  292.   //        pInfo will contain the information.  Otherwise, IDRERR_BUF_TOO_SMALL
  293.   //        will be returned.
  294.   //     3) Reallocate the block, point to it (via 'pInfo') and invoke
  295.   //        again.  The 'pInfo' will contain the results for this cluster.
  296.  
  297.  
  298.   VOID idrSetDictionaryLangModel( in ULONG ulCoercion,
  299.                           in ULONG  ulDomSpecUse ) raises(IDR_PROB);
  300.  
  301.   // Method   : idrSetDictionaryLangModel
  302.   //
  303.   // Purpose  :  Set the usage level for language modeling.
  304.   //
  305.   // Synopsis : VOID idrSetDictionaryLangModel( ULONG ulCoercion,
  306.   //                                              ULONG ulDomSpecUse);
  307.   //
  308.   //   ulCoercion.... Dictionary coercion flag.  See language modeling
  309.   //                  coercion flags.
  310.   //   ulDomSpecUse.. Domain specific usage.  See text-specific language
  311.   //                  modeling flags.
  312.   //
  313.   // Returns  :
  314.   //   NO_ERROR.................. Success.
  315.   //   IDRERR_ERROR.............. Error.
  316.   //   IDRERR_INVALID_PARM...  Value not allowed.
  317.   //
  318.   // Notes    :
  319.  
  320.   VOID idrGetDictionaryLangModel( in PULONG pulCoercion,
  321.                           in PULONG  pulDomSpecUse ) raises(IDR_PROB);
  322.  
  323.   // Method   : idrGetDictionaryLangModel
  324.   //
  325.   // Purpose  : Get the usage level for language modeling.
  326.   //
  327.   // Synopsis : VOID idrGetDictionaryLangModel( OUT PULONG pulCoercion,
  328.   //                                            OUT PULONG pulDomSpecUse);
  329.   //
  330.   //    pulCoercion... Pointer to the dictionary coercion flags.  See
  331.   //                   language modeling coercion flags.
  332.   //    pulDomSpecUse..Pointer to variable for domain specific usage.  See
  333.   //                   text-specific language modeling flags.
  334.   //
  335.   // Returns  :
  336.   //   NO_ERROR.................. Success.
  337.   //   IDRERR_ERROR.............. Error.
  338.   //   IDRERR_INVALID_PARM...  Value not allowed.
  339.   //
  340.   // Notes    :
  341.  
  342.   VOID idrSetWordList( in HWORD hWord,
  343.                          in ULONG ulOptions ) raises(IDR_PROB);
  344.  
  345.   // Method   : idrSetWordList
  346.   //
  347.   // Purpose  :
  348.   //
  349.   // Synopsis : VOID idrSetWordList( IN, IN ):
  350.   //
  351.   //   ulStartBoxIndex.... Index of box to start at.
  352.   //   ulEndBoxIndex...... Index of the final box.
  353.   //
  354.   // Returns  :
  355.   //   NO_ERROR.............. Success.
  356.   //   IDRERR_ERROR.......... Error.
  357.   //   IDRERR_INVALID_STATE.. Invalid state.
  358.   //   IDRERR_INVALID_HANDLE. Invalid handle.
  359.   //
  360.   // Notes    :
  361.  
  362.   HWORD idrGetWordList( ) raises(IDR_PROB);
  363.  
  364.   // Method   : idrGetWordList
  365.   //
  366.   // Purpose  :
  367.   //
  368.   // Synopsis : HWORD idrGetWordList( ):
  369.   //
  370.   //   HWORD hWord........ Current word list handle.
  371.   //
  372.   // Returns  :
  373.   //   NO_ERROR.................. Success.
  374.   //   IDRERR_ERROR.......... Error.
  375.   //   IDRERR_INVALID_HANDLE..... Invalid handle.
  376.   //
  377.   // Notes    :
  378.   //   A NULL handle retruned means no word list was set.
  379.   //   The word list will still be active after this call.
  380.  
  381.   VOID idrSetWordListLangModel( in ULONG ulCoercion ) raises(IDR_PROB);
  382.  
  383.   // Method   : idrSetWordListLangModel
  384.   //
  385.   // Purpose  :
  386.   //
  387.   // Synopsis : VOID idrSetWordListLangModel( IN );
  388.   //
  389.   //   ulCoercion......... Word list coercion flag.
  390.   //
  391.   // Returns  :
  392.   //   NO_ERROR.................. Success.
  393.   //   IDRERR_ERROR.......... Error.
  394.   //   IDRERR_INVALID_HANDLE..... Invalid handle.
  395.   //
  396.   // Notes    :
  397.  
  398.   ULONG idrGetWordListLangModel( ) raises(IDR_PROB);
  399.  
  400.   // Method   : idrGetWordListLangModel
  401.   //
  402.   // Purpose  : Get the degree of coercion (the degree that input should
  403.   //            match word lists) for a recognizer instance.
  404.   //
  405.   // Synopsis : ULONG idrGetWordListLangModel( )
  406.   //
  407.   //   ULONG ulCoercion... Word list coercion flag.
  408.   //
  409.   // Returns  :
  410.   //   NO_ERROR.................. Success.
  411.   //   IDRERR_ERROR.......... Error.
  412.   //   IDRERR_INVALID_HANDLE..... Invalid handle.
  413.   //
  414.   // Notes    :
  415.  
  416.  
  417.  
  418.  
  419. #ifdef __SOMIDL__
  420.   implementation {
  421.  
  422.     releaseorder: idrSetSymbolSubsetPriority,idrGetSymbolSubsetPriority,
  423.                   idrSetTrainString,idrGetTrainStatus,
  424.                   idrSetResultMaximum,idrGetResultMaximum,
  425.                   idrRecoInput,idrGetResultEnviron,
  426.                   idrGetTopResult, idrGetBoxResult,
  427.                   idrGetClusterHandles, idrGetResultCount,
  428.                   idrSetDictionaryLangModel, idrGetDictionaryLangModel,
  429.                   idrSetWordList, idrGetWordList,
  430.                   idrSetWordListLangModel, idrGetWordListLangModel,
  431.                   idrGetResultInfo,
  432.                   idrGetBoxTopResult,idrGetBoxAltChars,
  433.                   idrSetConstraints,idrSetBoxString,
  434.                   idrGetConstraints,idrGetTrainStrings,idrGetBoxString,
  435.                   idrSetLngMdlUse, idrGetLngMdlUse,
  436.                   idrGetResultScore,
  437.                   idrCopyResultsEnviron,
  438.                   idrSetMTSemaphore,idrGetMTSemaphore,
  439.                   idrISetSymbolSubset,idrISetMetrics,
  440.                   idrIClearStrokes,
  441.                   idrISetSymbolSubsetPriority, idrISetTrainString,
  442.                   idrISetResultMaximum, idrISetDictionaryLangModel,
  443.                   idrISetWordList, idrISetWordListLangModel,
  444.                   idrIRecoInput, idrGetTrainingLevel ;
  445.  
  446.     //# Class Modifiers
  447.     functionprefix = IDRText;
  448.     majorversion = 0;
  449.     minorversion = 1;
  450.     local;
  451.     filestem = idrtext;
  452.     metaclass = M_IDRText;
  453.     callstyle = idl;
  454.  
  455.  
  456.     passthru C_h_after =  ""
  457. "#pragma pack(2)"
  458. ""
  459. ""
  460. "typedef LHANDLE HWORD, *PHWORD;        /* Handle to a word list. */"
  461. "typedef VOID   *HCLUSTER,              /* Handle to a cluster. */ "
  462. "               **PHCLUSTER;"
  463. "/*"
  464. "**  Defines for word list string type specification."
  465. "*/"
  466. "#define IDR_WORDTYPE_ASCII (1)"
  467. "#define IDR_WORDTYPE_NOLANG (2)"
  468. "/*"
  469. "**  Word list type defines."
  470. "*/"
  471. "#define IDR_WORD_EMPTY         (0x0001)"
  472. "#define IDR_WORD_STRING        (0x0002)"
  473. "#define IDR_WORD_STRINGTABLE   (0x0003)"
  474. "#define IDR_WORD_FILENAME      (0x0004)"
  475. "#define IDR_WORD_FILEPOINTER   (0x0005)"
  476. "#define IDR_WORD_HANDLE        (0x0006)"
  477. "/*"
  478. "**  Text symbol descriptor status defines."
  479. "*/"
  480. ""
  481. "#define IDR_TXTSYM_VALID    ((ULONG)0)      /* valid symbol */"
  482. "#define IDR_TXTSYM_EMPTY    ((ULONG)1)      /* no data for symbol(s) */"
  483. "#define IDR_TXTSYM_UNKNOWN  ((ULONG)2)      /* unrecognized */"
  484. "#define IDR_TXTSYM_NEWLINE  ((ULONG)3)      /* new line RULED/UNRULED */"
  485. ""
  486. "/*"
  487. "** Result types."
  488. "*/"
  489. "#define IDR_RESTYPE_BOXED   ((ULONG) 0 )        /* Boxed mode. */"
  490. "#define IDR_RESTYPE_LINED   ((ULONG) 1 )        /* Lined mode. */"
  491. "#define IDR_RESTYPE_UNLINED ((ULONG) 2 )        /* Unlined mode. */"
  492. ""
  493. "typedef struct _IDR_TXTSYM      /* Text symbol descriptor */"
  494. "{"
  495. "  ULONG         ulSSize;        /* IDR_TXTSYM size */"
  496. "  ULONG         ulStatus;       /* Character status, see IDR_TXTSYMxx */"
  497. "  IDR_SYM       Symbol;         /* Symbol type/value */"
  498. "}   IDR_TXTSYM,"
  499. "   *PIDR_TXTSYM,"
  500. "  **PPIDR_TXTSYM;"
  501. ""
  502. "/*"
  503. "** Box result structure."
  504. "*/"
  505. "typedef struct _IDR_TXTBOX"
  506. "{"
  507. "   ULONG ulSSize;               /* Size of the structure. */"
  508. "   ULONG ulSymCnt;              /* Count of IDR_TXTSYMs in pSyms. */"
  509. "   PIDR_TXTSYM pSyms;           /* Recognition results for this box.  This"
  510. "                                   provides all alternatives available for this"
  511. "                                   box, from most likely to least likely.*/"
  512. "   ULONG ulIdCnt;               /* Stroke count returned. */"
  513. "   PULONG pStrokeId;            /* Pointer to an array of stroke ids. */"
  514. "   ULONG ulLocation;            /* Location information. This is the box id. */"
  515. "   ULONG ulReserved;            /* Reserved. */"
  516. "   PVOID pReserved;             /* Reserved. */"
  517. "} IDR_TXTBOX,"
  518. " *PIDR_TXTBOX,"
  519. " **PPIDR_TXTBOX;"
  520. ""
  521. "typedef struct _IDR_TXTCLUSTER  /* Text cluster descriptor */"
  522. "{"
  523. "  ULONG ulSSize;               /* Size of the structure. */"
  524. "  HCLUSTER hCluster;           /* Handle to the cluster. */"
  525. "  ULONG ulResultType;          /* Type of result. */"
  526. "  ULONG ulSymCnt;              /* Count of IDR_TXTSYMs in pSyms. */"
  527. "  PIDR_TXTSYM pSyms;           /* Recognition results of this cluster. */"
  528. "  ULONG ulIdCnt;               /* Stroke count returned. */"
  529. "  PULONG pStrokeId;            /* Pointer to an array of stroke ids. */"
  530. "  ULONG ulLocation;            /* Location information.  Depends on"
  531. "                                  ulResultType.  For Boxed mode, this is"
  532. "                                  the starting box id.  For Lined mode,"
  533. "                                  this is the row id.  For Unlined mode,"
  534. "                                  this is the baseline. */"
  535. "  RECTL rclBoundBox;           /* Bounding box for strokes, in lined and"
  536. "                                  unline modes. */"
  537. "  ULONG ulReserved1;           /* Reserved. */"
  538. "  PVOID pReserved1;            /* Reserved. */"
  539. "  ULONG ulReserved2;           /* Reserved. */"
  540. "  PVOID pReserved2;            /* Reserved. */"
  541. "} IDR_TXTCLUSTER, *PIDR_TXTCLUSTER,"
  542. "  **PPIDR_TXTCLUSTER;"
  543. ""
  544. "/*"
  545. "**  Defines for training results status."
  546. "*/"
  547. "#define IDR_TRN_NOIMPACT       (0x0001)"
  548. "#define IDR_TRN_UPDATE         (0x0002)"
  549. "#define IDR_TRN_ADDED          (0x0003)"
  550. "#define IDR_TRN_REJECTED       (0x0004)"
  551. "#define IDR_TRN_CONFUSION      (0x0005)"
  552. ""
  553. "/*"
  554. "**  Word list and dictionary language modeling coercion flags."
  555. "*/"
  556. "#define IDR_LM_NONE              (0x00000000)    /* Disable it */"
  557. "#define IDR_LM_ADVISE            (0x00000001)    /* Enable it */"
  558. "#define IDR_LM_FORCE             (0x00000002)    /* Suggest results */"
  559. "#define IDR_LM_REJECT            (0x00000004)    /* Constrain results */"
  560. "#define IDR_LMCASE_FORCE         (0x00000008)    /* Force case sensitivity */"
  561. "#define IDR_LM_UNKNOWN           (0x80000000)    /* Unknown/unsupported */"
  562. ""
  563. "/*"
  564. "**  Defines for text-specific domain language modeling."
  565. "*/"
  566. ""
  567. "#define IDR_TXTLM_WRDCASE        (0x00000001)"
  568. "        /* Advise recognition to all upper case, all lower case, or first letter capitalized. */"
  569. "#define IDR_TXTLM_SENTCASE       (0x00000002)"
  570. "        /* Advise recognition toward proper sentence capitalization. */"
  571. "#define IDR_TXTLM_ALPHANUM       (0x00000004)"
  572. "        /* Advise recognition to group alphabetic and digits separately. */"
  573. "#define IDR_TXTLM_PUNCT          (0x00000008)"
  574. "        /* Advise recognition to have punctuation at beginning and end of words. */"
  575. "                                                /*   and end words only  */"
  576. ""
  577. "#pragma pack()"
  578. ""
  579. "";
  580.  
  581.  
  582.  
  583.     //# Method Modifiers
  584.     //# Overridden for Multi-threading purposes
  585.     idrSetSymbolSubset: override;
  586.     idrGetSymbolSubset: override;
  587.     idrGetSymbolSubsetInfo: override;
  588.     idrGetMetrics: override;
  589.     idrAddStroke: override;
  590.     idrAddStrokefromStrokeObject: override;
  591.     idrClearStrokes: override;
  592.  
  593.  
  594.     //# Overridden to add/change function
  595.     idrSetMetrics: override;
  596.     somInit: override;
  597.     somUninit: override;
  598.  
  599.     //# Data Modifiers
  600.  
  601.  
  602.   };
  603. #endif /* __SOMIDL__ */
  604. };
  605.  
  606. interface M_IDRText
  607. {
  608.  
  609.   VOID idrclsAddToWordList( in HWORD hWord,
  610.                               in PVOID pWord,
  611.                               in ULONG ulWordType,
  612.                               in ULONG ulStringType ) raises(IDR_PROB);
  613.  
  614.   // Method   : idrclsAddToWordList
  615.   //
  616.   // Purpose  : Add to an existing local or global word list.
  617.   //
  618.   // Synopsis : VOID  idrclsAddToWordList( IN, IN, IN, IN );
  619.   //
  620.   //   hWord......... Handle of target word list.
  621.   //   pWord......... Pointer to source of words; depends on ulWordType.
  622.   //   ulWordType.... Word list type.
  623.   //   ulStringType.. Word list string type.
  624.   //
  625.   // Returns  :
  626.   //   NO_ERROR.............. Success.
  627.   //   IDRERR_ERROR.......... Error.
  628.   //   IDRERR_INVALID_HANDLE. Invalid handle.
  629.   //
  630.   // Notes    : N/A.
  631.  
  632.   HWORD idrclsCreateWordList( in PVOID pWord,
  633.                               in ULONG ulWordType,
  634.                               in ULONG ulStringType,
  635.                               in PSZ pszGlobalName ) raises(IDR_PROB);
  636.  
  637.   // Method   : idrclsCreateWordList
  638.   //
  639.   // Purpose  : Create a new word list.
  640.   //
  641.   // Synopsis : HWORD idrclsCreateWordList( IN, IN, IN, IN )
  642.   //
  643.   //   pWord......... Pointer to source of words; depends on ulWordType.
  644.   //   ulWordType.... Word list type.
  645.   //   ulStringType.. Word list string type.
  646.   //   pszGlobalName. Set to NULL for creation of local word list.
  647.   //                  If not NULL, this string will be used as the global name,
  648.   //                  allowing other objects to gain access to this word list
  649.   //                  via the idrclsGetWordListHandle() method.
  650.   //   HWORD hWord... Handle to the new word list.
  651.   //
  652.   // Returns  :
  653.   //   NO_ERROR.............. Success.
  654.   //   IDRERR_ERROR.......... Error.
  655.   //   IDRERR_ALREADY_EXISTS. Global name already exists.
  656.   //
  657.   // Notes    :
  658.  
  659.   HWORD idrclsCreateWordListFromRes( in HMODULE hModule,
  660.                               in ULONG ulTypeID,
  661.                               in ULONG ulNameID ) raises(IDR_PROB);
  662.  
  663.   // Method   : idrclsCreateWordListFromRes
  664.   //
  665.   // Purpose  :
  666.   //
  667.   // Synopsis : HWORD  idrclsCreateWordListFromRes( IN, IN, IN )
  668.   //
  669.   //   hModule....... Handle of the module that has the resource.
  670.   //   ulTypeID...... Resource type id specified in the resource file.
  671.   //   ulNameID...... Resource type id specified in the resource file.
  672.   //   HWORD hWord... Handle to the new word list.
  673.   //
  674.   // Returns  :
  675.   //   NO_ERROR.............. Success.
  676.   //   IDRERR_ERROR.......... Error.
  677.   //
  678.   // Notes    :
  679.  
  680.   VOID idrclsDestroyWordList( in HWORD hWord ) raises(IDR_PROB);
  681.  
  682.   // Method   : idrclsDestroyWordList
  683.   //
  684.   // Purpose  :
  685.   //
  686.   // Synopsis : VOID  idrclsDestroyWordList( IN );
  687.   //
  688.   //   hWord......... Handle to a word list.
  689.   //
  690.   // Returns  :
  691.   //   NO_ERROR.............. Success.
  692.   //   IDRERR_ERROR.......... Error.
  693.   //   IDRERR_INVALID_HANDLE. Invalid handle.
  694.   //
  695.   // Notes    :
  696.  
  697.   HWORD idrclsGetWordListHandle( in PSZ pszWordList ) raises(IDR_PROB);
  698.  
  699.   // Method   : idrclsGetWordListHandle
  700.   //
  701.   // Purpose  : Get handle to an existing global word list.
  702.   //
  703.   // Synopsis : HWORD  idrclsGetWordListHandle( IN )
  704.   //
  705.   //   pszWordList... Global name that identifies the word list.
  706.   //   HWORD hWord... Handle to the word list.
  707.   //
  708.   // Returns  :
  709.   //   NO_ERROR.............. Success.
  710.   //   IDRERR_ERROR.......... Error.
  711.   //   IDRERR_NOT_FOUND...... Global name not found.
  712.   //   IDRERR_INVALID_HANDLE. Invalid handle.
  713.   //
  714.   // Notes    :
  715.  
  716.   VOID idrclsWriteWordList( in PVOID pFile,
  717.                               in HWORD hWord,
  718.                               in ULONG ulStringType,
  719.                               in ULONG ulFileType ) raises(IDR_PROB);
  720.  
  721.   // Method   : idrclsWriteWordList
  722.   //
  723.   // Purpose  :
  724.   //
  725.   // Synopsis : VOID  idrclsWriteWordList( IN, IN, IN, IN );
  726.   //
  727.   //   pFile......... Either file name string or file pointer; depending on ulFileType.
  728.   //   hWord......... Handle of the word list to write.
  729.   //   ulStringType.. Word list string type.
  730.   //   ulFileType.... Identifies the type of pFile.
  731.   //
  732.   // Returns  :
  733.   //   NO_ERROR.............. Success.
  734.   //   IDRERR_ERROR.......... Error.
  735.   //   IDRERR_INVALID_HANDLE. Invalid handle.
  736.   //
  737.   // Notes    :
  738.   //   Word list remains active after this call.
  739.  
  740.   IDRText  idrclsNewIDRText(in PVOID pCfg ) raises(IDR_PROB);
  741.  
  742.   // Method   : idrclsNewIDRText
  743.   //
  744.   // Purpose  : Construct an ink-data to text transformer object using a
  745.   //            specific recognition configuration.
  746.   //
  747.   // Synopsis : IDRText * idrclsNewIDRText( IN   PVOID   pCfg )
  748.   //
  749.   //   pCfg.......... Recognition configuration to use; if NULL the
  750.   //                  system default configuration will be used.
  751.   //            This is private and must be NULL.
  752.   //   IDRText *ppObject...... Pointer to newly created object.
  753.   //
  754.   // Returns  :
  755.   //   NO_ERROR.............. Success.
  756.   //   IDRERR_ERROR.......... Error.
  757.   //
  758.   // Notes    : N/A.
  759.   //
  760.   // Usage    :
  761.   //   Callable - Always.
  762.   //   Override - Override by subclasses.
  763.  
  764.  
  765.  
  766. #ifdef __SOMIDL__
  767.   implementation {
  768.  
  769.     releaseorder: idrclsAddToWordList,idrclsCreateWordList,
  770.                   idrclsCreateWordListFromRes,idrclsDestroyWordList,
  771.                   idrclsGetWordListHandle,idrclsWriteWordList,
  772.                   idrclsNewIDRText,
  773.                   idrclsINewIDRText,idrclsIFreeIDR ;
  774.  
  775.     //# Class Modifiers
  776.     functionprefix = IDRTextM;
  777.     majorversion = 0;
  778.     minorversion = 1;
  779.     local;
  780.     filestem = idrtext;
  781.     callstyle = idl;
  782.  
  783.     //# Method Modifiers
  784.     //# Overridden for Multi-threading purposes
  785.     idrclsFreeIDR: override;
  786.     //# Overridden to add/change function
  787.     somInit: override;
  788.  
  789.   };
  790. #endif /* __SOMIDL__ */
  791. };
  792.  
  793. #endif  /* idrtext_idl */
  794.