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

  1. //
  2. //  idmobj.idl
  3. //
  4. //  CLASS: IDMObject
  5. //
  6. //  CLASS HIERARCHY:
  7. //
  8. //     SOMObject
  9. //       └── IDMObject
  10. //
  11. //  DESCRIPTION:
  12. //
  13. //     Input Data Management class.
  14. //
  15. #ifndef __IDMOBJECT_IDL__
  16. #define __IDMOBJECT_IDL__
  17.  
  18. #include <somcls.idl>
  19. //#    #include <mlink.idl>
  20.  
  21. #include <pentypes.idl>
  22. #include <idftypes.idl>
  23.  
  24.  
  25.  
  26. interface IDODoodle;
  27. exception IDM_PROB { ULONG ulErrorCode; };
  28.  
  29. interface IDMObject : SOMObject
  30. {
  31. //  #include <idmerror.idl>
  32. exception IDM_PROB { ULONG ulErrorCode; };
  33.  
  34.   //# Public Methods
  35.  
  36.   VOID idmStart () raises (IDM_PROB);
  37.  
  38.   // Method   : idmStart
  39.   //
  40.   // Purpose  : Allows the application to request that IDM start processing
  41.   //            pen input based on the current IDM parameters.
  42.   //
  43.   // Synopsis : VOID idmStart ();
  44.   //
  45.   // Notes    : This method is used to inform IDM to start processing pen
  46.   //            input based on the current IDM parameters. IDM parameters
  47.   //            are set to default values when IDM is instantiated, the
  48.   //            parameters are changed via idmSet... methods, including
  49.   //            idmSetCtlData.
  50.   //
  51.   //            Note: idmStart must be called during the processing of
  52.   //            the WM_TOUCHDOWN message of the first stroke that you want
  53.   //            to have processed by IDM. When the IDM returns from the
  54.   //            idmStart method, the application can return from the
  55.   //            WM_TOUCHDOWN message.  Once the IDM is started, the MRESULT
  56.   //            from the WM_TOUCHDOWN message will be ignored.
  57.   //
  58.   //            Note:  If you accepted default IDM parameters, the first
  59.   //            time you start IDM the IDM will create instances of IDO and
  60.   //            IDR objects, on an "as needed" basis during the processing of
  61.   //            pen input messages. The performance and memory overhead of IDO
  62.   //            and IDR object creation and initialization is incurred at this
  63.   //            time. Object creation and initialization during pen input
  64.   //            message processing may affect Pen for OS/2s ability to ink at
  65.   //            real-time while this creation is occurring. To eliminate the
  66.   //            possibility of this occurring the application can do the
  67.   //            following:
  68.   //
  69.   //            During WM_CREATE message processing: instantiate IDM; if
  70.   //            necessary, change any default parameters using idmSet...
  71.   //            methods, including the idmSetCtlData method. Once IDM
  72.   //            parameters are set, call the idmInitNow method to force IDM,
  73.   //            IDO and IDR object creation and initialization.
  74.   //
  75.   //
  76.   // Returns  :
  77.   //
  78.   // Error Return:
  79.   //   NO_EXCEPTION            Success
  80.   //   IDMERR_INVALID_PARM     Invalid parameter
  81.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  82.   //   IDMERR_ALREADY_STARTED  This IDM is working on behalf of another hwnd
  83.   //   IDMERR_RECOING_IN_ANOTHER_WINDOW
  84.   //   IDMERR_CANNOT_START_NOW
  85.   //   IDMERR_INVALID_OPERATION
  86.   //   IDMERR_OUTSIDE_INCLUDE_RECT
  87.   //   IDMERR_INSIDE_EXCLUDE_RECT
  88.   //
  89.  
  90.  
  91.   VOID idmStop (in ULONG ulStopIndicator) raises (IDM_PROB);
  92.  
  93.   // Method   : idmStop
  94.   //
  95.   // Purpose  : This method is used to tell the IDM to stop processing pen
  96.   //            input. idmStop can be done at anytime. The effect of
  97.   //            idmStop is based on the stopIndicator input parameter.
  98.   //
  99.   // Synopsis : APIRET idmStop (in ULONG ulStopIndicator);
  100.   //
  101.   // Notes    :
  102.   //
  103.   // Returns  :
  104.   //
  105.  
  106.   VOID idmInputComplete () raises (IDM_PROB);
  107.  
  108.   // Method   : idmInputComplete
  109.   //
  110.   // Purpose  : Allows the application to request that IDM stop collecting
  111.   //            and bgin the next phase of IDM processing.
  112.   //
  113.   // Synopsis : VOID idmInputComplete () raises (IDM_PROB);
  114.   //
  115.   // Notes    : This method causes the IDM to stop collecting input and begin
  116.   //            the next phase of IDM processing. If the IDM is recognizing
  117.   //            strokes, the IDM will have the IDR objects complete the
  118.   //            recognition process. When the IDR objects have completed
  119.   //            recognition, the IDM will send a WM_RESULT message back to the
  120.   //            application indicating the completion of this IDM operation. If
  121.   //            the IDM is only collecting strokes, the IDM will immediately
  122.   //            send a WM_RESULT message to the application indicating the
  123.   //            completion of the IDM operation.
  124.   //
  125.   // Returns  : none
  126.   //
  127.  
  128.   VOID idmSetCtlData (in PVOID pIDMCtlData) raises (IDM_PROB);
  129.  
  130.   // Method   : idmSetCtlData
  131.   //
  132.   // Purpose  : Allows the application to change the IDM parameters.
  133.   //
  134.   // Synopsis : VOID idmSetCtlData (in PVOID pIDMCtlData);
  135.   //
  136.   // Notes    : This method sets the IDM parameters
  137.   //
  138.   // Returns  :
  139.   //
  140.   // Error Return:
  141.   //   NO_EXCEPTION            Success
  142.   //   IDMERR_INVALID_PARM     Invalid parameter
  143.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  144.   //
  145.  
  146.   VOID idmInitNow () raises (IDM_PROB);
  147.  
  148.   // Method   : idmInitNow
  149.   //
  150.   // Purpose  : Inform IDM to initialize now.
  151.   //
  152.   // Synopsis : VOID idmInitNow ();
  153.   //
  154.   // Notes    : By default, the IDM will delay initialization until
  155.   //            idmStart. This method allows the application to
  156.   //            request that the IDM initialize immediately. IDM
  157.   //            will instantiate IDO and/or IDR objects based on
  158.   //            IDMCTLDATA parameters. The performance and memory
  159.   //            overhead of IDO/IDR object creation and initialization
  160.   //            is incurred with this method. If the application requires
  161.   //            pen input it should use this method.
  162.   //
  163.   // Returns  :
  164.   //
  165.   // Error Return:
  166.   //   NO_EXCEPTION            Success
  167.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  168.   //
  169.  
  170.   HWND idmGetOwner () raises (IDM_PROB);
  171.  
  172.   // Method   : idmGetOwner
  173.   //
  174.   // Purpose  : Allows the application to determine what window IDM
  175.   //            is sending notification messages to.
  176.   //
  177.   // Synopsis : HWND idmGetOwner () raises (IDM_PROB);
  178.   //
  179.   // Notes    : This method returns a handle to the window IDM is
  180.   //            sending notification messages to. If no handle was
  181.   //            specified via idmSetOwner or idmSetCtlData, IDM sends
  182.   //            notification messages to hwndClient, the window specified
  183.   //            in idmStart method (the window IDM is working on behalf of).
  184.   //
  185.   // Returns  :
  186.   //
  187.   //    somThis->hwndOwner, if one exists.
  188.   //    somThis->hwndClient, if hwndOwner does not exist.
  189.   //    (HWND) NULLHANDLE, if hwndOwner and hwndClient do not exist.
  190.   //
  191.   // Error Return:
  192.   //    NO_EXCEPTION      Success
  193.   //
  194.  
  195.  
  196.   VOID idmSetOwner (in HWND hOwner) raises (IDM_PROB);
  197.  
  198.   // Method   : idmSetOwner
  199.   //
  200.   // Purpose  : Allows application to specify the window
  201.   //            for IDM to send notfication messages to.
  202.   //
  203.   // Synopsis : VOID idmSetOwner (in HWND hOwner) raises (IDM_PROB);
  204.   //
  205.   // Notes    : Handle of the window to send notification messages
  206.   //            to. If NULL, IDM sends notification messages to hwndClient,
  207.   //            the window specified in idmStart method (the window IDM is
  208.   //            working on behalf of).
  209.   //
  210.   // Returns  :  nothing
  211.   //
  212.   // Error Return:
  213.   //    NO_EXCEPTION            Success
  214.   //    IDMERR_INVALID_STATE    Attempt to set owner during IDM_COLLECTING
  215.   //                            IDM_RECOING state.
  216.   //
  217.  
  218.   ULONG idmGetInkingStyle () raises (IDM_PROB);
  219.  
  220.   // Method   : idmGetInkingStyle
  221.   //
  222.   // Purpose  : Allow the application to determine what inking
  223.   //            style is being used during this IDM operation,
  224.   //            system inking or inking to a window PS.
  225.   //
  226.   // Synopsis : ULONG idmGetInkingStyle ();
  227.   //
  228.   // Notes    : This method retrieves the current inking style,
  229.   //            system inking or inking to a window PS.
  230.   //
  231.   // Returns  : ULONG
  232.   // Possible return values:  IDM_INK_SYSTEM - ink into system PS
  233.   //                          IDM_INK_WINDOW - ink into window PS
  234.   //                          The default is IDM_INK_SYSTEM.
  235.   //
  236.   // Error Return:
  237.   //   NO_EXCEPTION    Success
  238.   //
  239.  
  240.   VOID idmSetInkingStyle (in ULONG ulInkingStyle) raises (IDM_PROB);
  241.  
  242.   // Method   : idmSetInkingStyle
  243.   //
  244.   // Purpose  : Allows the application to specify the style of inking
  245.   //            to be done during this IDM operation.
  246.   //
  247.   // Synopsis : VOID idmSetInkingStyle (in ULONG ulInkingStyle);
  248.   //
  249.   // Notes    : Indicates whether to ink into system PS or to ink into
  250.   //            window PS. Also indicates whether to leave or remove the
  251.   //            ink at the end of the IDM operation.
  252.   //
  253.   //            Inking into the system PS allows inking to
  254.   //            occur outside the window that the user started writing
  255.   //            into. Inking to the system PS, uses an enhanced XOR'ing
  256.   //            function that will not XOR bits at path crossings. This
  257.   //            XOR'ing technique allows the system to quickly remove the
  258.   //            ink from the screen (i.e., after recognition occurs)
  259.   //            without the involvement of any window that has been
  260.   //            inked on. When inking to a system PS: ulStrokeType,
  261.   //            lInkColor, lBackColor, lLineType, and lInkMix are not
  262.   //            available. When handwriting windows are small, such as
  263.   //            the typical SLEs, or the ink is transient (removed after
  264.   //            recognition occurs) the application should specify inking
  265.   //            into the system PS.
  266.   //
  267.   //            Inking into a window PS does not allow
  268.   //            inking to occur outside the window that the user started
  269.   //            writing into. The strokes that occur while the user is
  270.   //            writing are captured even if the user writes outside the
  271.   //            window but inking only occurs inside the window. Inking
  272.   //            to a window PS is not restricted to only using the XOR'ing
  273.   //            paint mix. Therefore all of the following values are
  274.   //            available when inking to a window PS: ulStrokeType,
  275.   //            lInkColor, lBackColor, lLineType, and lInkMix. When
  276.   //            the handwriting window is large enough to confine the
  277.   //            user to writing primarily within the window or when the
  278.   //            application desires the ink to be displayed in different
  279.   //            colors, different line types, different paint mixes, the
  280.   //            application should specify inking into the window PS.
  281.   //
  282.   // Returns  :
  283.   //
  284.   // Error Return:
  285.   //   NO_EXCEPTION            Success
  286.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  287.   //
  288.  
  289.   HPS idmGetHps () raises (IDM_PROB);
  290.  
  291.   // Method   : idmGetHps
  292.   //
  293.   // Purpose  : Allows the application to determine what presentation
  294.   //            space is being used by the IDM.
  295.   //
  296.   // Synopsis : HPS idmGetHps ();
  297.   //
  298.   // Notes    : This method will return the presentation space
  299.   //            being used in the current IDM operation.
  300.   //
  301.   // Returns  : HPS
  302.   // Possible return values:  Handle of the window PS to ink into.
  303.   //                          NULL, if ulInkingStyle is IDM_INK_SYSTEM.
  304.   //
  305.   // Error Return:
  306.   //   NO_EXCEPTION    Success
  307.   //
  308.  
  309.   VOID idmSetHps (in HPS hps) raises (IDM_PROB);
  310.  
  311.   // Method   : idmSetHps
  312.   //
  313.   // Purpose  : Allows the application to specify the window presentation
  314.   //            space for IDM to ink into.
  315.   //
  316.   // Synopsis : VOID idmSetHps (in HPS hps);
  317.   //
  318.   // Notes    : This method will set the window presentation space for
  319.   //            IDM to ink into.
  320.   //
  321.   // Returns  :
  322.   //
  323.   // Error Return:
  324.   //   NO_EXCEPTION            Success
  325.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  326.   //
  327.  
  328.   LONG idmGetInkColor () raises (IDM_PROB);
  329.  
  330.   // Method   : idmGetInkColor
  331.   //
  332.   // Purpose  : Allows the application to determine the color being
  333.   //            used to ink incoming strokes in the current IDM operation.
  334.   //
  335.   // Synopsis : LONG idmGetInkColor ();
  336.   //
  337.   // Notes    : This method will return the color index of the color
  338.   //            being used to ink incoming strokes for the current
  339.   //            IDM operation.
  340.   //
  341.   // Returns  : LONG The color index of the ink.
  342.   //                 The ink color is only used when ulInking
  343.   //                 Style is  IDM_INK_WINDOW and hps is a window PS.
  344.   //
  345.   // Error Return:
  346.   //   NO_EXCEPTION    Success
  347.   //
  348.  
  349.   VOID idmSetInkColor (in LONG lInkColor) raises (IDM_PROB);
  350.  
  351.   // Method   : idmSetInkColor
  352.   //
  353.   // Purpose  : Allows the application to specify the color of the ink in the
  354.   //            current IDM operation.
  355.   //
  356.   // Synopsis : VOID idmSetInkColor (in LONG lInkColor);
  357.   //
  358.   // Notes    : This method will set the color of the ink for the
  359.   //            incoming strokes in the current IDM operation.
  360.   //
  361.   // Returns  :
  362.   //
  363.   // Error Return:
  364.   //   NO_EXCEPTION            Success
  365.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  366.   //
  367.  
  368.   LONG idmGetBackColor () raises (IDM_PROB);
  369.  
  370.   // Method   : idmGetBackColor
  371.   //
  372.   // Purpose  : Allows the application to determine what background
  373.   //            color is being used for the current IDM operation.
  374.   //
  375.   // Synopsis : LONG idmGetBackColor ();
  376.   //
  377.   // Notes    : This method will return the color index of the
  378.   //            background color.
  379.   //
  380.   // Returns  : LONG The background color index.
  381.   //                 The background color is only used when
  382.   //                 ulIDMOp is IDM_COLLECTSTROKE, ulStrokeType
  383.   //                 is ST_ERASER, hbmpBackBitmap is NULL,
  384.   //                 ulInking Style is  IDM_INK_WINDOW and
  385.   //                 hps is a window PS.
  386.   //
  387.   // Error Return:
  388.   //   NO_EXCEPTION    Success
  389.   //
  390.  
  391.   VOID idmSetBackColor (in LONG lBackColor) raises (IDM_PROB);
  392.  
  393.   // Method   : idmSetBackColor
  394.   //
  395.   // Purpose  : Allows the application to specify the color of the background
  396.   //            for the current IDM operation. The background color is used
  397.   //            when the incoming stroke is an eraser stroke.
  398.   //
  399.   // Synopsis : VOID idmSetBackColor (in LONG lBackColor);
  400.   //
  401.   // Notes    : This method will set the color index of the background
  402.   //            color to be used for this IDM operation.
  403.   //
  404.   // Returns  :
  405.   //
  406.   // Error Return:
  407.   //   NO_EXCEPTION            Success
  408.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  409.   //
  410.  
  411.   FIXED idmGetInkWidth () raises (IDM_PROB);
  412.  
  413.   // Method   : idmGetInkWidth
  414.   //
  415.   // Purpose  : Allows the application to determine the width of
  416.   //            the ink or eraser stroke to use when inking or
  417.   //            erasing incoming strokes during the current IDM operation.
  418.   //
  419.   // Synopsis : FIXED idmGetInkWidth ();
  420.   //
  421.   // Notes    : This method retrieves the ink or eraser width to be
  422.   //            used when inking incoming strokes during the current
  423.   //            IDM operation.
  424.   //
  425.   // Returns  : FIXED   The width (1, 2, or 4) of the ink.
  426.   //                    The width of the eraser.
  427.   //                    The range of the eraser width is TBD.
  428.   //                    Only used when  ulIDMOp is IDM_COLLECTSTROKE,
  429.   //                    ulStrokeType is ST_ERASER, ulInking Style is
  430.   //                    IDM_INK_WINDOW and hps is a window PS.
  431.   //
  432.   // Error Return:
  433.   //   NO_EXCEPTION    Success
  434.   //
  435.  
  436.   VOID idmSetInkWidth (in FIXED ulInkWidth) raises (IDM_PROB);
  437.  
  438.   // Method   : idmSetInkWidth
  439.   //
  440.   // Purpose  : Allows the application to indicate the width of
  441.   //            the ink or eraser stroke to use when inking or erasing
  442.   //            incoming strokes during the current IDM operation.
  443.   //
  444.   // Synopsis : VOID idmSetInkWidth (in FIXED ulInkWidth);
  445.   //
  446.   // Notes    : This method sets the ink or eraser width to be  used
  447.   //            when inking incoming strokes during the current IDM operation.
  448.   //
  449.   // Returns  :
  450.   //
  451.   // Error Return:
  452.   //   NO_EXCEPTION            Success
  453.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  454.   //
  455.  
  456.   LONG idmGetLineType () raises (IDM_PROB);
  457.  
  458.   // Method   : idmGetLineType
  459.   //
  460.   // Purpose  : Allows the application to determine the line
  461.   //            type being used when inking incoming strokes
  462.   //            into a window PS during the current IDM operation.
  463.   //
  464.   // Synopsis : LONG idmGetLineType ();
  465.   //
  466.   // Notes    : This method retrieves the line type being used
  467.   //            when inking incoming strokes into a window PS
  468.   //            during the current IDM operation.
  469.   //
  470.   // Returns  : LONG    See GpiSetLineType for all possible LINETYPE_ values.
  471.   //
  472.   // Error Return:
  473.   //   NO_EXCEPTION    Success
  474.   //
  475.  
  476.   VOID idmSetLineType (in LONG lLineType) raises (IDM_PROB);
  477.  
  478.   // Method   : idmSetLineType
  479.   //
  480.   // Purpose  : Allows the application to indicate the line type to use
  481.   //            when inking incoming strokes into a window PS during the
  482.   //            current IDM operation.
  483.   //
  484.   // Synopsis : VOID idmSetLineType (in LONG lLineType);
  485.   //
  486.   // Notes    : This method sets the line type to be  used when inking
  487.   //            incoming strokes into a window PS during the current IDM
  488.   //            operation.
  489.   //
  490.   // Returns  :
  491.   //
  492.   // Error Return:
  493.   //   NO_EXCEPTION            Success
  494.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  495.   //
  496.  
  497.   LONG idmGetInkMix () raises (IDM_PROB);
  498.  
  499.   // Method   : idmGetInkMix
  500.   //
  501.   // Purpose  : Allows the application to determine the ink
  502.   //            color mixing mode being used when inking
  503.   //            incoming strokes into a window PS during the
  504.   //            current IDM operation.
  505.   //
  506.   // Synopsis : LONG idmGetInkMix ();
  507.   //
  508.   // Notes    : This method retrieves the ink color mixing mode
  509.   //            being used when inking incoming strokes into a
  510.   //            window PS during the current IDM operation.
  511.   //
  512.   // Returns  : LONG    See GpiSetMix for all possible
  513.   //                    color-mixing mode (FM_) values.
  514.   //
  515.   // Error Return:
  516.   //   NO_EXCEPTION    Success
  517.   //
  518.  
  519.   VOID idmPaintDoodle (in PRECTL pInvalidRect) raises (IDM_PROB);
  520.  
  521.   // Method   : idmPaintDoodle
  522.   //
  523.   // Purpose  : Inform the IDM to paint the contents of the doodle.
  524.   //
  525.   // Synopsis : VOID idmPaintDoodle (in PRECTL pInvalidRect) raises (IDM_PROB);
  526.   //
  527.   // Notes    : It is possible for the IDM to be preempted by another process
  528.   //            and for the IDM window to be overwritten. Whether this
  529.   //            situation can or cannot occur is based on the recognition
  530.   //            trigger values (RTE_) specified by the application. When this
  531.   //            situation does occur, the IDM must handle the repainting of the
  532.   //            ink. The IDM could be sharing the window PS it is inking into
  533.   //            with other application objects. In order to ensure that the IDM
  534.   //            repaints in the correct order, the IDM will not process the
  535.   //            WM_PAINT message, it will wait until the application requests
  536.   //            the IDM to paint its doodle.
  537.   //
  538.   // Returns  : nothing
  539.   //
  540.   //
  541.   // Error Return:
  542.   //   NO_EXCEPTION          Success
  543.   //   IDOERR_PS_BUSY        Presentation space is busy
  544.   //   IDOERR_INVALID_PARM   Invalid parameter
  545.   //
  546.  
  547.   VOID idmSetInkMix (in LONG lInkMix) raises (IDM_PROB);
  548.  
  549.   // Method   : idmSetInkMix
  550.   //
  551.   // Purpose  : Allows the application to specify the ink color mixing
  552.   //            mode to use when inking incoming strokes into a window
  553.   //            PS during the current IDM operation..
  554.   //
  555.   // Synopsis : VOID idmSetInkMix (in LONG lInkMix);
  556.   //
  557.   // Notes    : This method set the ink color mixing mode to use when
  558.   //            inking incoming strokes into a window PS during the
  559.   //            current IDM operation.
  560.   //
  561.   // Returns  :
  562.   //
  563.   // Error Return:
  564.   //   NO_EXCEPTION            Success
  565.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  566.   //
  567.  
  568.   ULONG idmGetIDMOp () raises (IDM_PROB);
  569.  
  570.   // Method   : idmGetIDMOp
  571.   //
  572.   // Purpose  : Allows the application to determine what IDM
  573.   //            operation was requested.
  574.   //
  575.   // Synopsis : ULONG idmGetIDMOp ();
  576.   //
  577.   // Notes    : This method will retrieve the setting for the current
  578.   //            IDM operation.
  579.   //
  580.   // Returns  : ULONG   Indicates the current IDM operations.
  581.   // Possible return values: IDM_TEXT    - Recognizes strokes as text
  582.   //                         IDM_GESTURE - Recognizes strokes as gesture
  583.   //                         IDM_COLLECTSTROKE - The IDM will collect strokes
  584.   //                                             into a Doodle.  No recogntion
  585.   //                                             is possible during this
  586.   //                                             operation.
  587.   //                         IDM_TEXT and IDM_GESTURE can be or'ed together.
  588.   //                         IDM_COLLECTSTROKE is mutually exclusive
  589.   //                         with IDM_TEXT and IDM_GESTURE.
  590.   //
  591.   // Error Return:
  592.   //   NO_EXCEPTION    Success
  593.   //
  594.  
  595.   VOID idmSetIDMOp (in ULONG ulIDMOp) raises (IDM_PROB);
  596.  
  597.   // Method   : idmSetIDMOp
  598.   //
  599.   // Purpose  : Allows the application to indicate the type of IDM operation
  600.   //            desired.
  601.   //
  602.   // Synopsis : VOID idmSetIDMOp (in ULONG ulIDMOp);
  603.   //
  604.   // Notes    : This method sets the type of IDM operation desired.
  605.   //
  606.   // Returns  :
  607.   //
  608.   // Error Return:
  609.   //   NO_EXCEPTION               Success
  610.   //   IDMERR_INVALID_STATE       Cannot do request while IDM in current state
  611.   //   IDMERR_INVALID_OPERATION   Requested operation is invalid
  612.   //
  613.  
  614.   IDODoodle idmGetDoodle (in ULONG ulOptions) raises (IDM_PROB);
  615.  
  616.   // Method   : idmGetDoodle
  617.   //
  618.   // Purpose  : Retrieve the doodle being used in the current IDM operation.
  619.   //
  620.   // Synopsis : IDODoodle idmGetDoodle (in ULONG ulOptions)
  621.   //
  622.   // Notes    : The IDM captures all strokes drawn by the user from
  623.   //            the first touchdown to the recognition trigger event
  624.   //            into a single doodle object. This method is used to
  625.   //            retrieve the doodle associated with the current IDM operation.
  626.   //            The doodle may have been provided by the application
  627.   //            via idmSetDoodle or idmSetCtlData. If no doodle was
  628.   //            provided, the IDM will create a doodle as part of IDM
  629.   //            initialization. If the application provided the
  630.   //            doodle via idmSetDoodle or via idmSetCtlData, it is
  631.   //            the applications responsibility to free the doodle. The
  632.   //            IDM will use the doodle for one IDM operation, the application
  633.   //            can free the doodle during or after WM_RESULT processing.
  634.   //            If the application does not provide a doodle , the IDM will
  635.   //            create a doodle as part of IDM initialization. If the
  636.   //            application wants to retrieve the strokes associated with
  637.   //            recognition, the application should get this doodle during
  638.   //            WM_RESULT processing. I the application doesn't get the
  639.   //            doodle before returning from WM_RESULT, the IDM will clear
  640.   //            and re-use the doodle.
  641.   //
  642.   // Returns  :
  643.   //
  644.   // Error Return:
  645.   //   NO_EXCEPTION            Success
  646.   //   IDMERR_NO_DOODLE        No doodle has been set or allocated.
  647.   //
  648.  
  649.   VOID idmSetDoodle (in IDODoodle doodleObject, in ULONG ulDoodlePrePr)
  650.                                                             raises (IDM_PROB);
  651.  
  652.   // Method   : idmSetDoodle
  653.   //
  654.   // Purpose  : Allows the application to provide a doodle
  655.   //            object to be used during the current IDM operation.
  656.   //
  657.   // Synopsis : VOID idmSetDoodle (in IDODoodle doodleObject,
  658.   //                               in ULONG ulDoodlePrePr);
  659.   //
  660.   // Notes    : Allows the application to provide a doodle object
  661.   //            to be used during the current IDM operation. All
  662.   //            incoming strokes will be added to this doodle. The
  663.   //            application can also specify the type of pre-processing
  664.   //            to be done with the doodle before kes to the doodle.
  665.   //            The application should not change this doodle or any
  666.   //            strokes associated with doodle while the IDM operation
  667.   //            is in process. If the application does this, the IDM
  668.   //            cannot guarantee correct results. The IDM will not
  669.   //            free this object. It is the application's responsibility
  670.   //            to free this doodle anytime after all IDM processing has
  671.   //            completed. If the application does not specify a
  672.   //            doodle object, the IDM will create it's own doodle
  673.   //            to collect strokes for this IDM operation. If the
  674.   //            IDM creates it's own doodle, the IDM will free the
  675.   //            doodle on return from WM_RESULT, unless the application
  676.   //            takes ownership via the idmGetDoodle method.
  677.   //
  678.   // Returns  :
  679.   //
  680.   // Error Return:
  681.   //   NO_EXCEPTION            Success
  682.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  683.   //   IDMERR_INVALID_PARM     Invalid parameter
  684.   //
  685.  
  686.   VOID idmGetMetrics (in PIDR_INKMETRICS pInkMetrics) raises (IDM_PROB);
  687.  
  688.   // Method   : idmGetMetrics
  689.   //
  690.   // Purpose  : Allows the application to determine the segmentation
  691.   //            mode and metrics in use during this IDM operation.
  692.   //
  693.   // Synopsis : VOID idmGetMetrics (in PIDR_INKMETRICS pInkMetrics);
  694.   //
  695.   // Notes    : This method will retrieve the segmentation mode
  696.   //            and metrics in use during the current IDM operation.
  697.   //
  698.   // Returns  :
  699.   //
  700.   // Error Return:
  701.   //   NO_EXCEPTION    Success
  702.   //
  703.  
  704.   VOID idmSetMetrics (in PIDR_INKMETRICS pInkMetrics) raises (IDM_PROB);
  705.  
  706.   // Method   : idmSetMetrics
  707.   //
  708.   // Purpose  : Allows the application to specify the segmentation mode
  709.   //            and metrics in use during this IDM operation.
  710.   //
  711.   // Synopsis : VOID idmSetMetrics (in PIDR_INKMETRICS pInkMetrics);
  712.   //
  713.   // Notes    : This method will set the segmentation mode and metrics
  714.   //            in use during the current IDM operation.
  715.   //
  716.   // Returns  :
  717.   //
  718.   // Error Return:
  719.   //   NO_EXCEPTION            Success
  720.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  721.   //
  722.  
  723.   ULONG idmGetRecoTrigger () raises (IDM_PROB);
  724.  
  725.   // Method   : idmGetRecoTrigger
  726.   //
  727.   // Purpose  : Allows the application to determine what events
  728.   //            will cause the IDM to stop collecting and adding
  729.   //            strokes (idrAddStroke) and start the recognition
  730.   //            of strokes (idrStartReco).
  731.   //
  732.   // Synopsis : ULONG idmGetRecoTrigger ();
  733.   //
  734.   // Notes    : This method will return the events that will trigger
  735.   //            recognition. When a trigger event occurs, IDM stops
  736.   //            collecting and  adding strokes and starts the recognition
  737.   //            of strokes.
  738.   //
  739.   // Returns  : ULONG
  740.   // Possible return values:  RTE_EXITPROX   - start when user exits proximity
  741.   //                          RTE_APPSPEC    - start when the application does
  742.   //                                           idmInputComplete
  743.   //                          RTE_LIFTOFF    - start at WM_LIFTOFF (one
  744.   //                                           stroke recognition)
  745.   //                          RTE_WRTTIMEOUT - start when user stops writing
  746.   //                                           for amount of time specified in
  747.   //                                           PPMSV_GESTURE_TIMEOUT
  748.   //                          RTE_FOCUS OST  - start when hwndClient receives
  749.   //                                           loss of focus message.
  750.   //
  751.   // Error Return:
  752.   //   NO_EXCEPTION    Success
  753.   //
  754.  
  755.   VOID idmSetRecoTrigger (in ULONG ulRecoTrigger) raises (IDM_PROB);
  756.  
  757.   // Method   : idmSetRecoTrigger
  758.   //
  759.   // Purpose  : Allows the application to specify what events
  760.   //            will cause the IDM to stop collecting and
  761.   //            adding strokes (idrAddStroke) and start the
  762.   //            recognition of strokes (idrStartReco).
  763.   //
  764.   // Synopsis : VOID idmSetRecoTrigger (in ULONG ulRecoTrigger);
  765.   //
  766.   // Notes    : This method will set the events that will trigger
  767.   //            recognition. When a trigger event occurs, IDM stops collecting
  768.   //            and adding strokes (idrAddStroke) and starts the recognition of
  769.   //            strokes (idrStartReco).
  770.   //
  771.   // Returns  :
  772.   //
  773.   // Error Return:
  774.   //   NO_EXCEPTION            Success
  775.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  776.   //
  777.  
  778.   VOID idmGetSymbolSubset (in PIDR_SYMSET pSymSet, in PULONG pulSize)
  779.                                                             raises (IDM_PROB);
  780.  
  781.   // Method   : idmGetSymbolSubset
  782.   //
  783.   // Purpose  : Allows the application to retrieve the symbol
  784.   //            subset being used in this IDM operation.
  785.   //
  786.   // Synopsis : VOID idmGetSymbolSubset (in PIDR_SYMSET pSymSet,
  787.   //                               in PULONG pulSize);
  788.   //
  789.   // Notes    : This method returns the symbol subset in use during
  790.   //            this IDM operation.
  791.   //
  792.   //             Two invocations may be required to get the data:
  793.   //             Invoke with pulSize pointing to the initial size of
  794.   //             the buffer at pSymSet. On return, pulSize will point
  795.   //             to the size of the required buffer. If the buffer size
  796.   //             passed in was large enough,  pSymSet will contain the
  797.   //             information. Otherwise, IDRERR_BUF_TOO_SMALL will be
  798.   //             returned. Rellocate the memory needed and point to it
  799.   //             with pSymSet.  Invoke the method again.
  800.   //
  801.   // Returns  :
  802.   //
  803.   // Error Return:
  804.   //   NO_EXCEPTION            Success
  805.   //   IDTERR_BUF_TOO_SMALL    The buffer (pSymSet) was to small to
  806.   //                            contain the entire symbol subset.
  807.   //                            pulSize was updated to contain required size.
  808.   //
  809.  
  810.   VOID idmSetSymbolSubset (in PIDR_SYMSET pSymSet) raises (IDM_PROB);
  811.  
  812.   // Method   : idmSetSymbolSubset
  813.   //
  814.   // Purpose  : Allows the application to specify the symbol subset
  815.   //            to be used during the current IDM operation.
  816.   //
  817.   // Synopsis : VOID idmSetSymbolSubset (in PIDR_SYMSET pSymSet);
  818.   //
  819.   // Notes    : This method will set the symbol subset to be
  820.   //            used during the current IDM operation. The symbol
  821.   //            subset provides a way to constrain recognition by
  822.   //            limiting the possible recognition results to a
  823.   //            subset of the total symbol set.
  824.   //
  825.   // Returns  :
  826.   //
  827.   // Error Return:
  828.   //   NO_EXCEPTION            Success
  829.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  830.   //
  831.  
  832.   VOID idmGetDictionaryLangModel( in PULONG pulCoercion,
  833.                           in PULONG  pulDomSpecUse ) raises(IDM_PROB);
  834.  
  835.   // Method   : idmGetDictionaryLangModel
  836.   //
  837.   // Purpose  : Get the usage level for language modeling.
  838.   //
  839.   // Synopsis : VOID idmGetDictionaryLangModel( OUT PULONG pulCoercion,
  840.   //                                            OUT PULONG pulDomSpecUse);
  841.   //
  842.   //    pulCoercion... Pointer to the dictionary coercion flags.  See
  843.   //                   language modeling coercion flags.
  844.   //    pulDomSpecUse..Pointer to variable for domain specific usage.  See
  845.   //                   text-specific language modeling flags.
  846.   //
  847.   // Returns  :
  848.   //   NO_ERROR.................. Success.
  849.   //   IDRERR_ERROR.............. Error.
  850.   //   IDRERR_INVALID_PARM...  Value not allowed.
  851.   //
  852.   // Notes    :
  853.  
  854.   VOID idmSetDictionaryLangModel( in ULONG ulCoercion,
  855.                           in ULONG  ulDomSpecUse ) raises(IDM_PROB);
  856.  
  857.   // Method   : idmSetDictionaryLangModel
  858.   //
  859.   // Purpose  :  Set the usage level for language modeling.
  860.   //
  861.   // Synopsis : VOID idmSetDictionaryLangModel( ULONG ulCoercion,
  862.   //                                              ULONG ulDomSpecUse);
  863.   //
  864.   //   ulCoercion.... Dictionary coercion flag.  See language modeling
  865.   //                  coercion flags.
  866.   //   ulDomSpecUse.. Domain specific usage.  See text-specific language
  867.   //                  modeling flags.
  868.   //
  869.   // Returns  :
  870.   //   NO_ERROR.................. Success.
  871.   //   IDRERR_ERROR.............. Error.
  872.   //   IDRERR_INVALID_PARM...  Value not allowed.
  873.   //
  874.   // Notes    :
  875.  
  876.   ULONG idmGetDictCoer () raises (IDM_PROB);
  877.  
  878.   // Method   : idmGetDictCoer
  879.   //
  880.   // Purpose  : Allows the application to determine the degree of
  881.   //            influence that the system dictionary has on the
  882.   //            recognition process during the current IDM operation.
  883.   //
  884.   // Synopsis : ULONG idmGetDictCoer ();
  885.   //
  886.   // Notes    : This method will retrieve the setting which indicates
  887.   //            degree of influence that the system dictionary has on
  888.   //            the recognition process during the current IDM operation.
  889.   //
  890.   // Returns  : ULONG  Indicates the degree of influence that the
  891.   //                   system dictionary has on the recognition process.
  892.   //                   See IDTReco definitions for possible values.
  893.   //                   The default value is IDR_LM_ADVISE.
  894.   //
  895.   // Error Return:
  896.   //   NO_EXCEPTION    Success
  897.   //
  898.  
  899.   VOID idmSetDictCoer (in ULONG ulDictCoer) raises (IDM_PROB);
  900.  
  901.   // Method   : idmSetDictCoer
  902.   //
  903.   // Purpose  : Allows the application to indicate the degree of
  904.   //            influence that the system dictionary has on the
  905.   //            recognition process during the current IDM operation.
  906.   //
  907.   // Synopsis : VOID idmSetDictCoer (in ULONG ulDictCoer);
  908.   //
  909.   // Notes    : This method will establish the degree of influence
  910.   //            that the system dictionary has on the recognition
  911.   //            process during the current IDM operation.
  912.   //
  913.   // Returns  :
  914.   //
  915.   // Error Return:
  916.   //   NO_EXCEPTION            Success
  917.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  918.   //
  919.  
  920.   ULONG idmGetTextSpecLM () raises (IDM_PROB);
  921.  
  922.   // Method   : idmGetTextSpecLM
  923.   //
  924.   // Purpose  : Allows the application to retrieve the text specific
  925.   //            language modeling constraints in effect for the current
  926.   //            IDM operation.
  927.   //
  928.   // Synopsis : ULONG idmGetTextSpecLM ();
  929.   //
  930.   // Notes    : This method will return the setting for text specific
  931.   //            language modeling for the current IDM operation.
  932.   //
  933.   // Returns  : ULONG   Text specific language modeling options.
  934.   //                    See IDTReco definitions for possible
  935.   //                    IDR_TXTLM_ values.
  936.   //                    The default value is no IDR_TXTLM_ options.
  937.   //
  938.   // Error Return:
  939.   //   NO_EXCEPTION    Success
  940.   //
  941.  
  942.   VOID idmSetTextSpecLM (in ULONG ulTextSpecLM) raises (IDM_PROB);
  943.  
  944.   // Method   : idmSetTextSpecLM
  945.   //
  946.   // Purpose  : Allows the application to specify text specific language
  947.   //            modeling constraints to use during the current IDM operation.
  948.   //
  949.   // Synopsis : VOID idmSetTextSpecLM (in ULONG ulTextSpecLM);
  950.   //
  951.   // Notes    : This method will set  text specific language
  952.   //            modeling constraints to use during the current IDM operation.
  953.   //
  954.   // Returns  :
  955.   //
  956.   // Error Return:
  957.   //   NO_EXCEPTION            Success
  958.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  959.   //
  960.  
  961.   ULONG idmGetMaxResults () raises (IDM_PROB);
  962.  
  963.   // Method   : idmGetMaxResults
  964.   //
  965.   // Purpose  : Allows the application to determine  the
  966.   //            maximum number of results that the engine will return.
  967.   //
  968.   // Synopsis : ULONG idmGetMaxResults ();
  969.   //
  970.   // Notes    : This method will return the setting for the maximum
  971.   //            number of results the engine will return. If NULL,
  972.   //            engine will return one result.
  973.   //
  974.   // Returns  : ULONG   The maximum number of results the engine
  975.   //                    will return. If NULL, engine will return one result.
  976.   //
  977.   // Error Return:
  978.   //   NO_EXCEPTION    Success
  979.   //
  980.  
  981.   VOID idmSetMaxResults (in ULONG ulMaxResults) raises (IDM_PROB);
  982.  
  983.   // Method   : idmSetMaxResults
  984.   //
  985.   // Purpose  : Allows the application to indicate the maximum
  986.   //            number of results that the engine can return.
  987.   //
  988.   // Synopsis : VOID idmSetMaxResults (in ULONG ulMaxResults);
  989.   //
  990.   // Notes    : This method will set the maximum number of
  991.   //            results that the engine can return. If NULL,
  992.   //            engine will return one result.
  993.   //
  994.   // Returns  :
  995.   //
  996.   // Error Return:
  997.   //   NO_EXCEPTION            Success
  998.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  999.   //
  1000.  
  1001.   ULONG idmGetNotifyFlags () raises (IDM_PROB);
  1002.  
  1003.   // Method   : idmGetNotifyFlags
  1004.   //
  1005.   // Purpose  : Allows the application to determine what notification
  1006.   //            messages will be sent during the current IDM operation.
  1007.   //
  1008.   // Synopsis : ULONG idmGetNotifyFlags ();
  1009.   //
  1010.   // Notes    : This methods returns the message filter flags that
  1011.   //            are in effect for the current IDM operation.
  1012.   //
  1013.   // Returns  : ULONG   The application can request that notification
  1014.   //                    messages be sent to hwndOwner. The flag indicates
  1015.   //                    that a notification message will be sent if the
  1016.   //                    event occurs. Possible message filter flags are:
  1017.   //                    MSG_ALL
  1018.   //                    MSG_IDM_STROKE_ADDED
  1019.   //                    MSG_IDM_WRITING_STARTED
  1020.   //                    MSG_IDM_STATE_CHANGE
  1021.   //                    MSG_WM_CONTROL_POINTER
  1022.   //
  1023.   // Error Return:
  1024.   //   NO_EXCEPTION    Success
  1025.   //
  1026.  
  1027.   VOID idmSetNotifyFlags (in ULONG ulNotifyFlags) raises (IDM_PROB);
  1028.  
  1029.   // Method   : idmSetNotifyFlags
  1030.   //
  1031.   // Purpose  : Allows the application to indicate which notification
  1032.   //            messages it wants to be sent during the current IDM operation.
  1033.   //
  1034.   // Synopsis : VOID idmSetNotifyFlags (in ULONG ulNotifyFlags);
  1035.   //
  1036.   // Notes    : This methods sets the message filter flags that
  1037.   //            indicate which notification message are to be
  1038.   //            sent to hwndOwner during the current IDM operation.
  1039.   //
  1040.   // Returns  :
  1041.   //
  1042.   // Error Return:
  1043.   //   NO_EXCEPTION            Success
  1044.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  1045.   //
  1046.  
  1047.   ULONG idmGetTapFlags () raises (IDM_PROB);
  1048.  
  1049.   //
  1050.   // Method   : idmGetTapFlags
  1051.   //
  1052.   // Purpose  : Allows the application to retrieve current tap flags.
  1053.   //
  1054.   // Synopsis : ULONG idmGetTapFlags ();
  1055.   //
  1056.   // Notes    : This methods returns the tap flags that
  1057.   //            are in effect for the current IDM operation.
  1058.   //
  1059.   // Returns  : ULONG   ulTapFLags
  1060.   //
  1061.   // Error Return:
  1062.   //   NO_EXCEPTION    Success
  1063.   //
  1064.  
  1065.   VOID idmSetTapFlags (in ULONG ulTapFlags) raises (IDM_PROB);
  1066.  
  1067.   // Method   : idmSetTapFlags
  1068.   //
  1069.   // Purpose  : Allows the application to indicate how to handle taps.
  1070.   //
  1071.   // Synopsis : VOID idmSetTapFlags (in ULONG ulTapFlags);
  1072.   //
  1073.   // Returns  :
  1074.   //
  1075.   // Error Return:
  1076.   //   NO_EXCEPTION            Success
  1077.   //   IDMERR_INVALID_STATE    Cannot do request while IDM in current state
  1078.   //
  1079.  
  1080.   HPOINTER idmGetProximityPtr () raises (IDM_PROB);
  1081.  
  1082.   // Method   : idmGetProximityPtr
  1083.   //
  1084.   // Purpose  : Get the proximity pointer.
  1085.   //
  1086.   // Synopsis : HPOINTER idmGetProximityPtr ();
  1087.   //
  1088.   // Notes    : This method returns a handle to the proximity pointer.
  1089.   //            If no proximity pointer was a handle to the default
  1090.   //            proximity pointer is returned.
  1091.   //
  1092.   // Returns  : HPOINTER   Handle to the proximity pointer
  1093.   //
  1094.   // Error Return:
  1095.   //   NO_EXCEPTION    Success
  1096.   //
  1097.  
  1098.   VOID idmSetProximityPtr (in HPOINTER hptrNewPointer) raises (IDM_PROB);
  1099.  
  1100.   // Method   : idmSetProximityPtr
  1101.   //
  1102.   // Purpose  : Inform the IDM to use the specified pointer as
  1103.   //            the proximity pointer.
  1104.   //
  1105.   // Synopsis : VOID idmSetProximityPtr (in HPOINTER hptrNewPointer);
  1106.   //
  1107.   // Notes    : The proximity pointer is displayed:
  1108.   //            when the pen is in proximity but before WM_TOUCHDOWN
  1109.   //            after Writing Timeout while pen is still in proximity.
  1110.   //            Note: When the IDM is collecting strokes and inking
  1111.   //            it sets mouse capture and maintains the mouse pointer
  1112.   //            based on the proximity and writing pointers specified
  1113.   //            for this IDM operation. The pointer design does not
  1114.   //            take into account include and exclude rectngles when
  1115.   //            moving within an IDM managed window. IDM won't switch
  1116.   //            mouse pointer to some application pointer nor will it
  1117.   //            send pen input messages to the application while pen
  1118.   //            movement occurs outside the include rectangle or within
  1119.   //            the exclude rectangles. Only on touchdown, in an
  1120.   //            exclude rectangleor outside an include rectangle,
  1121.   //            will messages be routed once again to the application
  1122.   //            and it can change it's mouse pointer.
  1123.   //
  1124.   // Returns  :
  1125.   //
  1126.   // Error Return:
  1127.   //   NO_EXCEPTION            Success
  1128.   //   IDMERR_INVALID_STATE    Cannot set pointer while IDM in current state
  1129.   //
  1130.  
  1131.   HPOINTER idmGetWritingPtr () raises (IDM_PROB);
  1132.  
  1133.   // Method   : idmGetWritingPtr
  1134.   //
  1135.   // Purpose  : Get the writing pointer.
  1136.   //
  1137.   // Synopsis : HPOINTER idmGetWritingPtr ();
  1138.   //
  1139.   // Notes    : This method returns a handle to the writing pointer.
  1140.   //            If no writing pointer was specified a handle to the
  1141.   //            default writing pointer is returned.
  1142.   //
  1143.   // Returns  : HPOINTER   Handle to the writing pointer
  1144.   //
  1145.   // Error Return:
  1146.   //   NO_EXCEPTION    Success
  1147.   //
  1148.  
  1149.   VOID idmSetWritingPtr (in HPOINTER hptrNewPointer) raises (IDM_PROB);
  1150.  
  1151.   // Method   : idmSetWritingPtr
  1152.   //
  1153.   // Purpose  : Inform the IDM to use the specified pointer as the writing
  1154.   //            pointer.
  1155.   //
  1156.   //
  1157.   // Synopsis : VOID idmSetWritingPtr (in HPOINTER hptrNewPointer);
  1158.   //
  1159.   // Notes    : The writing pointer is displayed:
  1160.   //            (on integrated sensor/display) between WM_LIFTOFF
  1161.   //            and WM_TOUCHDOWN while in Writing_Mode
  1162.   //            (on opaque tablets) from WM_TOUCHDOWN to Writing Timeout
  1163.   //            Note: When the IDM is collecting strokes and inking it
  1164.   //            sets mouse capture and maintains the mouse pointer based
  1165.   //            on the proximity and writing pointers specified for this
  1166.   //            IDM operation. The pointer design does not take into
  1167.   //            account include and exclude rectngles when moving within
  1168.   //            an IDM managed window. IDM won't switch mouse pointer to
  1169.   //            some application pointer nor will it send pen input
  1170.   //            messages to the application while pen movement occurs
  1171.   //            outside the include rectangle or within the exclude
  1172.   //            rectangles. Only on touchdown, in an exclude rectangle or
  1173.   //            outside an include rectangle, will messages be routed
  1174.   //            once again to the application and it can change it's
  1175.   //            mouse pointer.
  1176.   //
  1177.   // Returns  :
  1178.   //
  1179.   // Error Return:
  1180.   //   NO_EXCEPTION            Success
  1181.   //   IDMERR_INVALID_STATE    Cannot set pointer while IDM in current state
  1182.   //
  1183.  
  1184.   HPOINTER idmGetErasingPtr () raises (IDM_PROB);
  1185.  
  1186.   // Method   : idmGetErasingPtr
  1187.   //
  1188.   // Purpose  : Get the erasing pointer.
  1189.   //
  1190.   // Synopsis : HPOINTER idmGetErasingPtr ();
  1191.   //
  1192.   // Notes    : This method returns a handle to the erasing pointer.
  1193.   //            If no erasing pointer was specified a handle to the
  1194.   //            default erasing pointer is returned.
  1195.   //
  1196.   // Returns  : HPOINTER    Handle to the erasing pointer
  1197.   //
  1198.   // Error Return:
  1199.   //   NO_EXCEPTION    Success
  1200.   //
  1201.  
  1202.   VOID idmSetErasingPtr (in HPOINTER hptrNewPointer) raises (IDM_PROB);
  1203.  
  1204.   // Method   : idmSetErasingPtr
  1205.   //
  1206.   // Purpose  :
  1207.   //
  1208.   // Synopsis : VOID idmSetErasingPtr (in HPOINTER hptrNewPointer);
  1209.   //
  1210.   // Notes    :
  1211.   //
  1212.   // Returns  :
  1213.   //
  1214.   // Error Return:
  1215.   //
  1216.  
  1217.   HWND idmGetHwndClient () raises (IDM_PROB);
  1218.  
  1219.   // Method   :
  1220.   //
  1221.   // Purpose  :
  1222.   //
  1223.   // Synopsis :
  1224.   //
  1225.   // Notes    :
  1226.   //
  1227.   // Returns  :
  1228.   //
  1229.   // Error Return:
  1230.   //
  1231.  
  1232.   ULONG idmGetState () raises (IDM_PROB);
  1233.  
  1234.   //
  1235.   // Method   : idmGetState
  1236.   //
  1237.   // Purpose  : Return the state of the IDM
  1238.   //
  1239.   // Synopsis : ULONG  idmGetState () raises (IDM_PROB);
  1240.   //
  1241.   // Returns  :
  1242.   //
  1243.   //   ULONG currentState...........Current state of IDM.
  1244.   //
  1245.   // Errors   :
  1246.   //
  1247.   //   NO_EXCEPTIONS................Success.
  1248.   //
  1249.  
  1250.  
  1251.   #ifdef __SOMIDL__
  1252.   implementation
  1253.   {
  1254.  
  1255.     releaseorder: idmSetCtlData,
  1256.                   idmStart,
  1257.                   idmStop,
  1258.                   idmInputComplete,
  1259.                   idmGetRecoTrigger,
  1260.                   idmSetRecoTrigger,
  1261.                   idmGetOwner,
  1262.                   idmSetOwner,
  1263.                   idmGetHps,
  1264.                   idmSetHps,
  1265.                   idmGetInkColor,
  1266.                   idmSetInkColor,
  1267.                   idmGetInkWidth,
  1268.                   idmSetInkWidth,
  1269.                   idmGetLineType,
  1270.                   idmSetLineType,
  1271.                   idmGetInkMix,
  1272.                   idmSetInkMix,
  1273.                   idmGetInkingStyle,
  1274.                   idmSetInkingStyle,
  1275.                   idmGetBackColor,
  1276.                   idmSetBackColor,
  1277.                   idmPaintDoodle,
  1278.                   idmGetSymbolSubset,
  1279.                   idmSetSymbolSubset,
  1280.                   idmGetIDMOp,
  1281.                   idmSetIDMOp,
  1282.                   idmGetMetrics,
  1283.                   idmSetMetrics,
  1284.                   idmGetDictionaryLangModel,
  1285.                   idmSetDictionaryLangModel,
  1286.                   idmGetDictCoer,
  1287.                   idmSetDictCoer,
  1288.                   idmGetTextSpecLM,
  1289.                   idmSetTextSpecLM,
  1290.                   idmGetMaxResults,
  1291.                   idmSetMaxResults,
  1292.                   idmGetDoodle,
  1293.                   idmSetDoodle,
  1294.                   idmGetNotifyFlags,
  1295.                   idmSetNotifyFlags,
  1296.                   idmGetProximityPtr,
  1297.                   idmSetProximityPtr,
  1298.                   idmGetWritingPtr,
  1299.                   idmSetWritingPtr,
  1300.                   idmGetErasingPtr,
  1301.                   idmSetErasingPtr,
  1302.                   idmInitNow,
  1303.                   idmSetTrainString,
  1304.                   idmInitObjects,
  1305.                   idmInitInking,
  1306.                   idmGetHwndClient,
  1307.                   idmSetHwndClient,
  1308.                   idmClearHwndClient,
  1309.                   idmChangeState,
  1310.                   idmSendOwner,
  1311.                   idmPostOwner,
  1312.                   idmDoRecoTrigger,
  1313.                   idmGetInker,
  1314.                   idmGetState,
  1315.                   idmGetCollectorObjForBeta,
  1316.                   idmPutCollectorObjForBeta,
  1317.                   idmGetCollectorObject,
  1318.                   idmIDRResult,
  1319.                   idmWMTouchdown,
  1320.                   idmWMLiftoff,
  1321.                   idmWMMouseMove,
  1322.                   idmWMWritingMode,
  1323.                   idmWMDestroy,
  1324.                   idmWMStroke,
  1325.                   idmWMExitProximity,
  1326.                   idmWMExitWindow,
  1327.                   idmWMEnterWindow,
  1328.                   idmWMPauseTimeout,
  1329.                   idmWMWritingCancelled,
  1330.                   idmWMWritingTimeout,
  1331.                   idmWMFocusChange,
  1332.                   idmIGetDoodleObj,
  1333.                   idmIQueryDoodleObj,
  1334.                   idmGetGestureObject,
  1335.                   idmQueryGestureObject,
  1336.                   idmGetResultObject,
  1337.                   idmSendCollectResult,
  1338.                   idmSendMixedResult,
  1339.                   idmSendTextResult,
  1340.                   idmSendGestureResult,
  1341.                   idmSendMixedResultNoReco,
  1342.                   idmSendTextResultNoReco,
  1343.                   idmSendGestureResultNoReco,
  1344.                   idmSendCollectResultNoStrokes,
  1345.                   idmInitNowForCmpat,
  1346.                   idmGetGestureObjectForCmpat,
  1347.                   idmFreeAllResources,
  1348.                   idmGetFreePending,
  1349.                   idmPerformPendingFree,
  1350.                   idmGetTrainStrings,
  1351.                   idmGetTrainingLevel,
  1352.                   idmGetHwndTD,
  1353.                   idmSetHwndTD,
  1354.                   idmGetSaveIDMOp,
  1355.                   idmSetSaveIDMOp,
  1356.                   idmGetTapFlags,
  1357.                   idmSetTapFlags,
  1358.                   idmRemoveResultObjectFromPool,
  1359.                   idmPutResultObjectInPool,
  1360.                   idmExitCollectState,
  1361.                   idmExitRecoState;
  1362.  
  1363.     // Class Modifiers
  1364.     functionprefix = IDMObj_;
  1365.     filestem       = idmobj;
  1366.     majorversion   = 0;
  1367.     minorversion   = 0;
  1368.  
  1369.  
  1370.     // Method Modifiers
  1371.     somInit: override;
  1372.     somUninit: override;
  1373.     somFree: override;
  1374.  
  1375.     // Passthru sections
  1376.  
  1377.     passthru C_h_after =   ""
  1378.                      ""
  1379.                      "#include <idmdef.h>"
  1380.                      "#include <idmerror.h>"
  1381.                      "#include <idmres.h>"
  1382.                      "#include <idmcoll.h>"
  1383.                      "#include <idmreco.h>"
  1384.                      "#include <idmgest.h>"
  1385.                      "#include <idmtext.h>"
  1386.                      "#include <idmmixed.h>"
  1387.                      "#include <idrtext.h>"
  1388.                      ""
  1389.                      "/* Results structure in mp2 of WM_RESULT */"
  1390.                      "typedef struct                             "
  1391.                      "{                                          "
  1392.                      "   ULONG ulResultType;                     "
  1393.                      "   union                                   "
  1394.                      "   {                                       "
  1395.                      "      PSZ           pszText;               "
  1396.                      "      PRECODATA     pRecoData;             "
  1397.                      "      IDODoodle *   objDoodle;             "
  1398.                      "   } Data;                                 "
  1399.                      "   ULONG ulAltResultType;                  "
  1400.                      "   union                                   "
  1401.                      "   {                                       "
  1402.                      "      PSZ        pszText;                  "
  1403.                      "      PRECODATA  pRecoData;                "
  1404.                      "   } AltData;                              "
  1405.                      "} IDM_RESULTDATA;                          "
  1406.                      " typedef IDM_RESULTDATA *PIDM_RESULTDATA;  "
  1407.                      ""
  1408.                      "/* Result type defines. */                 "
  1409.                      "#define RES_NULL           0x00000000      "
  1410.                      "#define RES_TEXT           0x00000001      "
  1411.                      "#define RES_GESTURE        0x00000002      "
  1412.                      "#define RES_STROKE         0x00000004      "
  1413.                      ""
  1414.                      "/****************************************************************************/"
  1415.                      "/* IDM_RECTLIST is an array of exclude rectangles used by IDM and specified */"
  1416.                      "/* specified in the IDMCTLDATA structure using the idmSetCtlData method     */"
  1417.                      "/****************************************************************************/"
  1418.                      "                                                                                       "
  1419.                      " typedef struct                                                                        "
  1420.                      " {                                                                                     "
  1421.                      "   ULONG  ulRectlCnt;          /* Number of rectangles in list      */                 "
  1422.                      "   RECTL  RectList[1];         /* Array of exclude rectangles       */                 "
  1423.                      " } IDM_RECTLIST;                                                                       "
  1424.                      " typedef IDM_RECTLIST *PIDM_RECTLIST; "
  1425.                      "                                                                                       "
  1426.                      "                                                                                       "
  1427.                      "/****************************************************************************/"
  1428.                      "/* IDM_TDNDATA structure is returned in mp2 of the IDM_NOTIFY message when  */"
  1429.                      "/* the notification message is IDM_TOUCHDOWN                                */"
  1430.                      "/****************************************************************************/"
  1431.                      "                                                                                       "
  1432.                      " typedef struct                                                                        "
  1433.                      " {                                                                                     "
  1434.                      "   SOMObject       *idmObject;       /* IDM object pointer                */           "
  1435.                      "   POINTS          ptsPointerPos;    /* Pointer position.                 */           "
  1436.                      "   PWRTEVENTDATA   pedEventData;     /* Pointer to event data             */           "
  1437.                      " } IDM_TDNDATA;                                                                        "
  1438.                      " typedef IDM_TDNDATA *PIDM_TDNDATA;                                                    "
  1439.                      "                                                                                       "
  1440.                      "                                                                                       "
  1441.                      " /***************************************************************************/         "
  1442.                      " /* IDMCTLDATA structure used to set IDM parameters using the idmSetCtlData */         "
  1443.                      " /* method                                                                  */         "
  1444.                      " /***************************************************************************/         "
  1445.                      "                                                                                       "
  1446.                      " typedef struct                                                                        "
  1447.                      " {                                                                                     "
  1448.                      "   ULONG    cbSize;            /* size of IDMCTLDATA structure      */                 "
  1449.                      "   HWND     hwndOwner;         /* window to send results to         */                 "
  1450.                      "   ULONG    ulInkingStyle;     /* system inking or ink to window PS */                 "
  1451.                      "   HPS      hps;               /* presentation space to ink into    */                 "
  1452.                      "   ULONG    ulStrokeType;      /* ink stroke or eraser stroke       */                 "
  1453.                      "   LONG     lInkColor;         /* ink color index                   */                 "
  1454.                      "   LONG     lBackColor;        /* Background color index value      */                 "
  1455.                      "   FIXED    ulInkWidth;        /* ink width color index             */                 "
  1456.                      "   LONG     lLineType;         /* cosmetic line-type attribute      */                 "
  1457.                      "   LONG     lInkMix;           /* determines the ink color mix mode */                 "
  1458.                      "   HPOINTER hProximityPtr;     /* in proximity, not writing         */                 "
  1459.                      "   HPOINTER hWritingPtr;       /* in proximity, writing             */                 "
  1460.                      "   HBITMAP  hbmpBackBitmap;    /* Background Bitmap                 */                 "
  1461.                      "   ULONG    ulAuxData;         /* Auxiliary data to be retrieved    */                 "
  1462.                      "   ULONG    ulIDMOp;           /* indicates IDM operation desired   */                 "
  1463.                      "   IDODoodle doodleObject;    /* initialize IDM with doodle        */                  "
  1464.                      "   ULONG    ulDoodlePrePr;     /* pre-processing of input doodle    */                 "
  1465.                      "   PIDR_INKMETRICS pInkMetrics; /* segmentation mode and metrics   */                  "
  1466.                      "   ULONG    ulRecoTrigger;     /* events that start recognition     */                 "
  1467.                      "   RECTL    rclInclude;        /* valid touchdown region            */                 "
  1468.                      "   PIDM_RECTLIST pRectList;    /* invalid touchdown regions         */                 "
  1469.                      "   HWORD    hWordList;         /* wordlist handle                   */                 "
  1470.                      "   ULONG    ulWLCoercion;      /* degree of wordlist influence      */                 "
  1471.                      "   PIDR_SYMSET pSymSet;        /* list of valid symbols             */                 "
  1472.                      "   ULONG    ulSymSetPrio;      /* give specified subsets priority   */                 "
  1473.                      "   ULONG    ulDictCoer;        /* degree of dictionary influence    */                 "
  1474.                      "   ULONG    ulTextSpecLM;      /* text-specific language modeling   */                 "
  1475.                      "   ULONG    ulMaxResults;      /* max # of results engine returns   */                 "
  1476.                      "   ULONG    ulNotifyFlags;     /* request notification messages     */                 "
  1477.                      "   ULONG    ulTapFlags;        /* Process taps                      */                 "
  1478.                      "   ULONG    ulUser1;           /* User-defined field 1              */                 "
  1479.                      "   ULONG    ulUser2;           /* User defined field 2              */                 "
  1480.                      " } IDMCTLDATA;                                                                         "
  1481.                      " typedef IDMCTLDATA *PIDMCTLDATA,                                                      "
  1482.                      "                   **PPIDMCTLDATA;                                                     "
  1483.                      ""
  1484.                      "";
  1485.  
  1486.  
  1487.   };    /* implementation section  */
  1488.   #endif  /* ifdef __SOMIDL__ */
  1489.  
  1490. };      /* interface section       */
  1491. #endif  /* ifdef __IDMOBJECT_IDL__ */
  1492.