home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
wpentk.zip
/
WBPENTK4.DSK
/
IDMOBJ.IDL
< prev
next >
Wrap
Text File
|
1994-10-07
|
60KB
|
1,492 lines
//
// idmobj.idl
//
// CLASS: IDMObject
//
// CLASS HIERARCHY:
//
// SOMObject
// └── IDMObject
//
// DESCRIPTION:
//
// Input Data Management class.
//
#ifndef __IDMOBJECT_IDL__
#define __IDMOBJECT_IDL__
#include <somcls.idl>
//# #include <mlink.idl>
#include <pentypes.idl>
#include <idftypes.idl>
interface IDODoodle;
exception IDM_PROB { ULONG ulErrorCode; };
interface IDMObject : SOMObject
{
// #include <idmerror.idl>
exception IDM_PROB { ULONG ulErrorCode; };
//# Public Methods
VOID idmStart () raises (IDM_PROB);
// Method : idmStart
//
// Purpose : Allows the application to request that IDM start processing
// pen input based on the current IDM parameters.
//
// Synopsis : VOID idmStart ();
//
// Notes : This method is used to inform IDM to start processing pen
// input based on the current IDM parameters. IDM parameters
// are set to default values when IDM is instantiated, the
// parameters are changed via idmSet... methods, including
// idmSetCtlData.
//
// Note: idmStart must be called during the processing of
// the WM_TOUCHDOWN message of the first stroke that you want
// to have processed by IDM. When the IDM returns from the
// idmStart method, the application can return from the
// WM_TOUCHDOWN message. Once the IDM is started, the MRESULT
// from the WM_TOUCHDOWN message will be ignored.
//
// Note: If you accepted default IDM parameters, the first
// time you start IDM the IDM will create instances of IDO and
// IDR objects, on an "as needed" basis during the processing of
// pen input messages. The performance and memory overhead of IDO
// and IDR object creation and initialization is incurred at this
// time. Object creation and initialization during pen input
// message processing may affect Pen for OS/2s ability to ink at
// real-time while this creation is occurring. To eliminate the
// possibility of this occurring the application can do the
// following:
//
// During WM_CREATE message processing: instantiate IDM; if
// necessary, change any default parameters using idmSet...
// methods, including the idmSetCtlData method. Once IDM
// parameters are set, call the idmInitNow method to force IDM,
// IDO and IDR object creation and initialization.
//
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_PARM Invalid parameter
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
// IDMERR_ALREADY_STARTED This IDM is working on behalf of another hwnd
// IDMERR_RECOING_IN_ANOTHER_WINDOW
// IDMERR_CANNOT_START_NOW
// IDMERR_INVALID_OPERATION
// IDMERR_OUTSIDE_INCLUDE_RECT
// IDMERR_INSIDE_EXCLUDE_RECT
//
VOID idmStop (in ULONG ulStopIndicator) raises (IDM_PROB);
// Method : idmStop
//
// Purpose : This method is used to tell the IDM to stop processing pen
// input. idmStop can be done at anytime. The effect of
// idmStop is based on the stopIndicator input parameter.
//
// Synopsis : APIRET idmStop (in ULONG ulStopIndicator);
//
// Notes :
//
// Returns :
//
VOID idmInputComplete () raises (IDM_PROB);
// Method : idmInputComplete
//
// Purpose : Allows the application to request that IDM stop collecting
// and bgin the next phase of IDM processing.
//
// Synopsis : VOID idmInputComplete () raises (IDM_PROB);
//
// Notes : This method causes the IDM to stop collecting input and begin
// the next phase of IDM processing. If the IDM is recognizing
// strokes, the IDM will have the IDR objects complete the
// recognition process. When the IDR objects have completed
// recognition, the IDM will send a WM_RESULT message back to the
// application indicating the completion of this IDM operation. If
// the IDM is only collecting strokes, the IDM will immediately
// send a WM_RESULT message to the application indicating the
// completion of the IDM operation.
//
// Returns : none
//
VOID idmSetCtlData (in PVOID pIDMCtlData) raises (IDM_PROB);
// Method : idmSetCtlData
//
// Purpose : Allows the application to change the IDM parameters.
//
// Synopsis : VOID idmSetCtlData (in PVOID pIDMCtlData);
//
// Notes : This method sets the IDM parameters
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_PARM Invalid parameter
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
VOID idmInitNow () raises (IDM_PROB);
// Method : idmInitNow
//
// Purpose : Inform IDM to initialize now.
//
// Synopsis : VOID idmInitNow ();
//
// Notes : By default, the IDM will delay initialization until
// idmStart. This method allows the application to
// request that the IDM initialize immediately. IDM
// will instantiate IDO and/or IDR objects based on
// IDMCTLDATA parameters. The performance and memory
// overhead of IDO/IDR object creation and initialization
// is incurred with this method. If the application requires
// pen input it should use this method.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
HWND idmGetOwner () raises (IDM_PROB);
// Method : idmGetOwner
//
// Purpose : Allows the application to determine what window IDM
// is sending notification messages to.
//
// Synopsis : HWND idmGetOwner () raises (IDM_PROB);
//
// Notes : This method returns a handle to the window IDM is
// sending notification messages to. If no handle was
// specified via idmSetOwner or idmSetCtlData, IDM sends
// notification messages to hwndClient, the window specified
// in idmStart method (the window IDM is working on behalf of).
//
// Returns :
//
// somThis->hwndOwner, if one exists.
// somThis->hwndClient, if hwndOwner does not exist.
// (HWND) NULLHANDLE, if hwndOwner and hwndClient do not exist.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetOwner (in HWND hOwner) raises (IDM_PROB);
// Method : idmSetOwner
//
// Purpose : Allows application to specify the window
// for IDM to send notfication messages to.
//
// Synopsis : VOID idmSetOwner (in HWND hOwner) raises (IDM_PROB);
//
// Notes : Handle of the window to send notification messages
// to. If NULL, IDM sends notification messages to hwndClient,
// the window specified in idmStart method (the window IDM is
// working on behalf of).
//
// Returns : nothing
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Attempt to set owner during IDM_COLLECTING
// IDM_RECOING state.
//
ULONG idmGetInkingStyle () raises (IDM_PROB);
// Method : idmGetInkingStyle
//
// Purpose : Allow the application to determine what inking
// style is being used during this IDM operation,
// system inking or inking to a window PS.
//
// Synopsis : ULONG idmGetInkingStyle ();
//
// Notes : This method retrieves the current inking style,
// system inking or inking to a window PS.
//
// Returns : ULONG
// Possible return values: IDM_INK_SYSTEM - ink into system PS
// IDM_INK_WINDOW - ink into window PS
// The default is IDM_INK_SYSTEM.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetInkingStyle (in ULONG ulInkingStyle) raises (IDM_PROB);
// Method : idmSetInkingStyle
//
// Purpose : Allows the application to specify the style of inking
// to be done during this IDM operation.
//
// Synopsis : VOID idmSetInkingStyle (in ULONG ulInkingStyle);
//
// Notes : Indicates whether to ink into system PS or to ink into
// window PS. Also indicates whether to leave or remove the
// ink at the end of the IDM operation.
//
// Inking into the system PS allows inking to
// occur outside the window that the user started writing
// into. Inking to the system PS, uses an enhanced XOR'ing
// function that will not XOR bits at path crossings. This
// XOR'ing technique allows the system to quickly remove the
// ink from the screen (i.e., after recognition occurs)
// without the involvement of any window that has been
// inked on. When inking to a system PS: ulStrokeType,
// lInkColor, lBackColor, lLineType, and lInkMix are not
// available. When handwriting windows are small, such as
// the typical SLEs, or the ink is transient (removed after
// recognition occurs) the application should specify inking
// into the system PS.
//
// Inking into a window PS does not allow
// inking to occur outside the window that the user started
// writing into. The strokes that occur while the user is
// writing are captured even if the user writes outside the
// window but inking only occurs inside the window. Inking
// to a window PS is not restricted to only using the XOR'ing
// paint mix. Therefore all of the following values are
// available when inking to a window PS: ulStrokeType,
// lInkColor, lBackColor, lLineType, and lInkMix. When
// the handwriting window is large enough to confine the
// user to writing primarily within the window or when the
// application desires the ink to be displayed in different
// colors, different line types, different paint mixes, the
// application should specify inking into the window PS.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
HPS idmGetHps () raises (IDM_PROB);
// Method : idmGetHps
//
// Purpose : Allows the application to determine what presentation
// space is being used by the IDM.
//
// Synopsis : HPS idmGetHps ();
//
// Notes : This method will return the presentation space
// being used in the current IDM operation.
//
// Returns : HPS
// Possible return values: Handle of the window PS to ink into.
// NULL, if ulInkingStyle is IDM_INK_SYSTEM.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetHps (in HPS hps) raises (IDM_PROB);
// Method : idmSetHps
//
// Purpose : Allows the application to specify the window presentation
// space for IDM to ink into.
//
// Synopsis : VOID idmSetHps (in HPS hps);
//
// Notes : This method will set the window presentation space for
// IDM to ink into.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
LONG idmGetInkColor () raises (IDM_PROB);
// Method : idmGetInkColor
//
// Purpose : Allows the application to determine the color being
// used to ink incoming strokes in the current IDM operation.
//
// Synopsis : LONG idmGetInkColor ();
//
// Notes : This method will return the color index of the color
// being used to ink incoming strokes for the current
// IDM operation.
//
// Returns : LONG The color index of the ink.
// The ink color is only used when ulInking
// Style is IDM_INK_WINDOW and hps is a window PS.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetInkColor (in LONG lInkColor) raises (IDM_PROB);
// Method : idmSetInkColor
//
// Purpose : Allows the application to specify the color of the ink in the
// current IDM operation.
//
// Synopsis : VOID idmSetInkColor (in LONG lInkColor);
//
// Notes : This method will set the color of the ink for the
// incoming strokes in the current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
LONG idmGetBackColor () raises (IDM_PROB);
// Method : idmGetBackColor
//
// Purpose : Allows the application to determine what background
// color is being used for the current IDM operation.
//
// Synopsis : LONG idmGetBackColor ();
//
// Notes : This method will return the color index of the
// background color.
//
// Returns : LONG The background color index.
// The background color is only used when
// ulIDMOp is IDM_COLLECTSTROKE, ulStrokeType
// is ST_ERASER, hbmpBackBitmap is NULL,
// ulInking Style is IDM_INK_WINDOW and
// hps is a window PS.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetBackColor (in LONG lBackColor) raises (IDM_PROB);
// Method : idmSetBackColor
//
// Purpose : Allows the application to specify the color of the background
// for the current IDM operation. The background color is used
// when the incoming stroke is an eraser stroke.
//
// Synopsis : VOID idmSetBackColor (in LONG lBackColor);
//
// Notes : This method will set the color index of the background
// color to be used for this IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
FIXED idmGetInkWidth () raises (IDM_PROB);
// Method : idmGetInkWidth
//
// Purpose : Allows the application to determine the width of
// the ink or eraser stroke to use when inking or
// erasing incoming strokes during the current IDM operation.
//
// Synopsis : FIXED idmGetInkWidth ();
//
// Notes : This method retrieves the ink or eraser width to be
// used when inking incoming strokes during the current
// IDM operation.
//
// Returns : FIXED The width (1, 2, or 4) of the ink.
// The width of the eraser.
// The range of the eraser width is TBD.
// Only used when ulIDMOp is IDM_COLLECTSTROKE,
// ulStrokeType is ST_ERASER, ulInking Style is
// IDM_INK_WINDOW and hps is a window PS.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetInkWidth (in FIXED ulInkWidth) raises (IDM_PROB);
// Method : idmSetInkWidth
//
// Purpose : Allows the application to indicate the width of
// the ink or eraser stroke to use when inking or erasing
// incoming strokes during the current IDM operation.
//
// Synopsis : VOID idmSetInkWidth (in FIXED ulInkWidth);
//
// Notes : This method sets the ink or eraser width to be used
// when inking incoming strokes during the current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
LONG idmGetLineType () raises (IDM_PROB);
// Method : idmGetLineType
//
// Purpose : Allows the application to determine the line
// type being used when inking incoming strokes
// into a window PS during the current IDM operation.
//
// Synopsis : LONG idmGetLineType ();
//
// Notes : This method retrieves the line type being used
// when inking incoming strokes into a window PS
// during the current IDM operation.
//
// Returns : LONG See GpiSetLineType for all possible LINETYPE_ values.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetLineType (in LONG lLineType) raises (IDM_PROB);
// Method : idmSetLineType
//
// Purpose : Allows the application to indicate the line type to use
// when inking incoming strokes into a window PS during the
// current IDM operation.
//
// Synopsis : VOID idmSetLineType (in LONG lLineType);
//
// Notes : This method sets the line type to be used when inking
// incoming strokes into a window PS during the current IDM
// operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
LONG idmGetInkMix () raises (IDM_PROB);
// Method : idmGetInkMix
//
// Purpose : Allows the application to determine the ink
// color mixing mode being used when inking
// incoming strokes into a window PS during the
// current IDM operation.
//
// Synopsis : LONG idmGetInkMix ();
//
// Notes : This method retrieves the ink color mixing mode
// being used when inking incoming strokes into a
// window PS during the current IDM operation.
//
// Returns : LONG See GpiSetMix for all possible
// color-mixing mode (FM_) values.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmPaintDoodle (in PRECTL pInvalidRect) raises (IDM_PROB);
// Method : idmPaintDoodle
//
// Purpose : Inform the IDM to paint the contents of the doodle.
//
// Synopsis : VOID idmPaintDoodle (in PRECTL pInvalidRect) raises (IDM_PROB);
//
// Notes : It is possible for the IDM to be preempted by another process
// and for the IDM window to be overwritten. Whether this
// situation can or cannot occur is based on the recognition
// trigger values (RTE_) specified by the application. When this
// situation does occur, the IDM must handle the repainting of the
// ink. The IDM could be sharing the window PS it is inking into
// with other application objects. In order to ensure that the IDM
// repaints in the correct order, the IDM will not process the
// WM_PAINT message, it will wait until the application requests
// the IDM to paint its doodle.
//
// Returns : nothing
//
//
// Error Return:
// NO_EXCEPTION Success
// IDOERR_PS_BUSY Presentation space is busy
// IDOERR_INVALID_PARM Invalid parameter
//
VOID idmSetInkMix (in LONG lInkMix) raises (IDM_PROB);
// Method : idmSetInkMix
//
// Purpose : Allows the application to specify the ink color mixing
// mode to use when inking incoming strokes into a window
// PS during the current IDM operation..
//
// Synopsis : VOID idmSetInkMix (in LONG lInkMix);
//
// Notes : This method set the ink color mixing mode to use when
// inking incoming strokes into a window PS during the
// current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
ULONG idmGetIDMOp () raises (IDM_PROB);
// Method : idmGetIDMOp
//
// Purpose : Allows the application to determine what IDM
// operation was requested.
//
// Synopsis : ULONG idmGetIDMOp ();
//
// Notes : This method will retrieve the setting for the current
// IDM operation.
//
// Returns : ULONG Indicates the current IDM operations.
// Possible return values: IDM_TEXT - Recognizes strokes as text
// IDM_GESTURE - Recognizes strokes as gesture
// IDM_COLLECTSTROKE - The IDM will collect strokes
// into a Doodle. No recogntion
// is possible during this
// operation.
// IDM_TEXT and IDM_GESTURE can be or'ed together.
// IDM_COLLECTSTROKE is mutually exclusive
// with IDM_TEXT and IDM_GESTURE.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetIDMOp (in ULONG ulIDMOp) raises (IDM_PROB);
// Method : idmSetIDMOp
//
// Purpose : Allows the application to indicate the type of IDM operation
// desired.
//
// Synopsis : VOID idmSetIDMOp (in ULONG ulIDMOp);
//
// Notes : This method sets the type of IDM operation desired.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
// IDMERR_INVALID_OPERATION Requested operation is invalid
//
IDODoodle idmGetDoodle (in ULONG ulOptions) raises (IDM_PROB);
// Method : idmGetDoodle
//
// Purpose : Retrieve the doodle being used in the current IDM operation.
//
// Synopsis : IDODoodle idmGetDoodle (in ULONG ulOptions)
//
// Notes : The IDM captures all strokes drawn by the user from
// the first touchdown to the recognition trigger event
// into a single doodle object. This method is used to
// retrieve the doodle associated with the current IDM operation.
// The doodle may have been provided by the application
// via idmSetDoodle or idmSetCtlData. If no doodle was
// provided, the IDM will create a doodle as part of IDM
// initialization. If the application provided the
// doodle via idmSetDoodle or via idmSetCtlData, it is
// the applications responsibility to free the doodle. The
// IDM will use the doodle for one IDM operation, the application
// can free the doodle during or after WM_RESULT processing.
// If the application does not provide a doodle , the IDM will
// create a doodle as part of IDM initialization. If the
// application wants to retrieve the strokes associated with
// recognition, the application should get this doodle during
// WM_RESULT processing. I the application doesn't get the
// doodle before returning from WM_RESULT, the IDM will clear
// and re-use the doodle.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_NO_DOODLE No doodle has been set or allocated.
//
VOID idmSetDoodle (in IDODoodle doodleObject, in ULONG ulDoodlePrePr)
raises (IDM_PROB);
// Method : idmSetDoodle
//
// Purpose : Allows the application to provide a doodle
// object to be used during the current IDM operation.
//
// Synopsis : VOID idmSetDoodle (in IDODoodle doodleObject,
// in ULONG ulDoodlePrePr);
//
// Notes : Allows the application to provide a doodle object
// to be used during the current IDM operation. All
// incoming strokes will be added to this doodle. The
// application can also specify the type of pre-processing
// to be done with the doodle before kes to the doodle.
// The application should not change this doodle or any
// strokes associated with doodle while the IDM operation
// is in process. If the application does this, the IDM
// cannot guarantee correct results. The IDM will not
// free this object. It is the application's responsibility
// to free this doodle anytime after all IDM processing has
// completed. If the application does not specify a
// doodle object, the IDM will create it's own doodle
// to collect strokes for this IDM operation. If the
// IDM creates it's own doodle, the IDM will free the
// doodle on return from WM_RESULT, unless the application
// takes ownership via the idmGetDoodle method.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
// IDMERR_INVALID_PARM Invalid parameter
//
VOID idmGetMetrics (in PIDR_INKMETRICS pInkMetrics) raises (IDM_PROB);
// Method : idmGetMetrics
//
// Purpose : Allows the application to determine the segmentation
// mode and metrics in use during this IDM operation.
//
// Synopsis : VOID idmGetMetrics (in PIDR_INKMETRICS pInkMetrics);
//
// Notes : This method will retrieve the segmentation mode
// and metrics in use during the current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetMetrics (in PIDR_INKMETRICS pInkMetrics) raises (IDM_PROB);
// Method : idmSetMetrics
//
// Purpose : Allows the application to specify the segmentation mode
// and metrics in use during this IDM operation.
//
// Synopsis : VOID idmSetMetrics (in PIDR_INKMETRICS pInkMetrics);
//
// Notes : This method will set the segmentation mode and metrics
// in use during the current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
ULONG idmGetRecoTrigger () raises (IDM_PROB);
// Method : idmGetRecoTrigger
//
// Purpose : Allows the application to determine what events
// will cause the IDM to stop collecting and adding
// strokes (idrAddStroke) and start the recognition
// of strokes (idrStartReco).
//
// Synopsis : ULONG idmGetRecoTrigger ();
//
// Notes : This method will return the events that will trigger
// recognition. When a trigger event occurs, IDM stops
// collecting and adding strokes and starts the recognition
// of strokes.
//
// Returns : ULONG
// Possible return values: RTE_EXITPROX - start when user exits proximity
// RTE_APPSPEC - start when the application does
// idmInputComplete
// RTE_LIFTOFF - start at WM_LIFTOFF (one
// stroke recognition)
// RTE_WRTTIMEOUT - start when user stops writing
// for amount of time specified in
// PPMSV_GESTURE_TIMEOUT
// RTE_FOCUS OST - start when hwndClient receives
// loss of focus message.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetRecoTrigger (in ULONG ulRecoTrigger) raises (IDM_PROB);
// Method : idmSetRecoTrigger
//
// Purpose : Allows the application to specify what events
// will cause the IDM to stop collecting and
// adding strokes (idrAddStroke) and start the
// recognition of strokes (idrStartReco).
//
// Synopsis : VOID idmSetRecoTrigger (in ULONG ulRecoTrigger);
//
// Notes : This method will set the events that will trigger
// recognition. When a trigger event occurs, IDM stops collecting
// and adding strokes (idrAddStroke) and starts the recognition of
// strokes (idrStartReco).
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
VOID idmGetSymbolSubset (in PIDR_SYMSET pSymSet, in PULONG pulSize)
raises (IDM_PROB);
// Method : idmGetSymbolSubset
//
// Purpose : Allows the application to retrieve the symbol
// subset being used in this IDM operation.
//
// Synopsis : VOID idmGetSymbolSubset (in PIDR_SYMSET pSymSet,
// in PULONG pulSize);
//
// Notes : This method returns the symbol subset in use during
// this IDM operation.
//
// Two invocations may be required to get the data:
// Invoke with pulSize pointing to the initial size of
// the buffer at pSymSet. On return, pulSize will point
// to the size of the required buffer. If the buffer size
// passed in was large enough, pSymSet will contain the
// information. Otherwise, IDRERR_BUF_TOO_SMALL will be
// returned. Rellocate the memory needed and point to it
// with pSymSet. Invoke the method again.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDTERR_BUF_TOO_SMALL The buffer (pSymSet) was to small to
// contain the entire symbol subset.
// pulSize was updated to contain required size.
//
VOID idmSetSymbolSubset (in PIDR_SYMSET pSymSet) raises (IDM_PROB);
// Method : idmSetSymbolSubset
//
// Purpose : Allows the application to specify the symbol subset
// to be used during the current IDM operation.
//
// Synopsis : VOID idmSetSymbolSubset (in PIDR_SYMSET pSymSet);
//
// Notes : This method will set the symbol subset to be
// used during the current IDM operation. The symbol
// subset provides a way to constrain recognition by
// limiting the possible recognition results to a
// subset of the total symbol set.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
VOID idmGetDictionaryLangModel( in PULONG pulCoercion,
in PULONG pulDomSpecUse ) raises(IDM_PROB);
// Method : idmGetDictionaryLangModel
//
// Purpose : Get the usage level for language modeling.
//
// Synopsis : VOID idmGetDictionaryLangModel( OUT PULONG pulCoercion,
// OUT PULONG pulDomSpecUse);
//
// pulCoercion... Pointer to the dictionary coercion flags. See
// language modeling coercion flags.
// pulDomSpecUse..Pointer to variable for domain specific usage. See
// text-specific language modeling flags.
//
// Returns :
// NO_ERROR.................. Success.
// IDRERR_ERROR.............. Error.
// IDRERR_INVALID_PARM... Value not allowed.
//
// Notes :
VOID idmSetDictionaryLangModel( in ULONG ulCoercion,
in ULONG ulDomSpecUse ) raises(IDM_PROB);
// Method : idmSetDictionaryLangModel
//
// Purpose : Set the usage level for language modeling.
//
// Synopsis : VOID idmSetDictionaryLangModel( ULONG ulCoercion,
// ULONG ulDomSpecUse);
//
// ulCoercion.... Dictionary coercion flag. See language modeling
// coercion flags.
// ulDomSpecUse.. Domain specific usage. See text-specific language
// modeling flags.
//
// Returns :
// NO_ERROR.................. Success.
// IDRERR_ERROR.............. Error.
// IDRERR_INVALID_PARM... Value not allowed.
//
// Notes :
ULONG idmGetDictCoer () raises (IDM_PROB);
// Method : idmGetDictCoer
//
// Purpose : Allows the application to determine the degree of
// influence that the system dictionary has on the
// recognition process during the current IDM operation.
//
// Synopsis : ULONG idmGetDictCoer ();
//
// Notes : This method will retrieve the setting which indicates
// degree of influence that the system dictionary has on
// the recognition process during the current IDM operation.
//
// Returns : ULONG Indicates the degree of influence that the
// system dictionary has on the recognition process.
// See IDTReco definitions for possible values.
// The default value is IDR_LM_ADVISE.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetDictCoer (in ULONG ulDictCoer) raises (IDM_PROB);
// Method : idmSetDictCoer
//
// Purpose : Allows the application to indicate the degree of
// influence that the system dictionary has on the
// recognition process during the current IDM operation.
//
// Synopsis : VOID idmSetDictCoer (in ULONG ulDictCoer);
//
// Notes : This method will establish the degree of influence
// that the system dictionary has on the recognition
// process during the current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
ULONG idmGetTextSpecLM () raises (IDM_PROB);
// Method : idmGetTextSpecLM
//
// Purpose : Allows the application to retrieve the text specific
// language modeling constraints in effect for the current
// IDM operation.
//
// Synopsis : ULONG idmGetTextSpecLM ();
//
// Notes : This method will return the setting for text specific
// language modeling for the current IDM operation.
//
// Returns : ULONG Text specific language modeling options.
// See IDTReco definitions for possible
// IDR_TXTLM_ values.
// The default value is no IDR_TXTLM_ options.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetTextSpecLM (in ULONG ulTextSpecLM) raises (IDM_PROB);
// Method : idmSetTextSpecLM
//
// Purpose : Allows the application to specify text specific language
// modeling constraints to use during the current IDM operation.
//
// Synopsis : VOID idmSetTextSpecLM (in ULONG ulTextSpecLM);
//
// Notes : This method will set text specific language
// modeling constraints to use during the current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
ULONG idmGetMaxResults () raises (IDM_PROB);
// Method : idmGetMaxResults
//
// Purpose : Allows the application to determine the
// maximum number of results that the engine will return.
//
// Synopsis : ULONG idmGetMaxResults ();
//
// Notes : This method will return the setting for the maximum
// number of results the engine will return. If NULL,
// engine will return one result.
//
// Returns : ULONG The maximum number of results the engine
// will return. If NULL, engine will return one result.
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetMaxResults (in ULONG ulMaxResults) raises (IDM_PROB);
// Method : idmSetMaxResults
//
// Purpose : Allows the application to indicate the maximum
// number of results that the engine can return.
//
// Synopsis : VOID idmSetMaxResults (in ULONG ulMaxResults);
//
// Notes : This method will set the maximum number of
// results that the engine can return. If NULL,
// engine will return one result.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
ULONG idmGetNotifyFlags () raises (IDM_PROB);
// Method : idmGetNotifyFlags
//
// Purpose : Allows the application to determine what notification
// messages will be sent during the current IDM operation.
//
// Synopsis : ULONG idmGetNotifyFlags ();
//
// Notes : This methods returns the message filter flags that
// are in effect for the current IDM operation.
//
// Returns : ULONG The application can request that notification
// messages be sent to hwndOwner. The flag indicates
// that a notification message will be sent if the
// event occurs. Possible message filter flags are:
// MSG_ALL
// MSG_IDM_STROKE_ADDED
// MSG_IDM_WRITING_STARTED
// MSG_IDM_STATE_CHANGE
// MSG_WM_CONTROL_POINTER
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetNotifyFlags (in ULONG ulNotifyFlags) raises (IDM_PROB);
// Method : idmSetNotifyFlags
//
// Purpose : Allows the application to indicate which notification
// messages it wants to be sent during the current IDM operation.
//
// Synopsis : VOID idmSetNotifyFlags (in ULONG ulNotifyFlags);
//
// Notes : This methods sets the message filter flags that
// indicate which notification message are to be
// sent to hwndOwner during the current IDM operation.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
ULONG idmGetTapFlags () raises (IDM_PROB);
//
// Method : idmGetTapFlags
//
// Purpose : Allows the application to retrieve current tap flags.
//
// Synopsis : ULONG idmGetTapFlags ();
//
// Notes : This methods returns the tap flags that
// are in effect for the current IDM operation.
//
// Returns : ULONG ulTapFLags
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetTapFlags (in ULONG ulTapFlags) raises (IDM_PROB);
// Method : idmSetTapFlags
//
// Purpose : Allows the application to indicate how to handle taps.
//
// Synopsis : VOID idmSetTapFlags (in ULONG ulTapFlags);
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot do request while IDM in current state
//
HPOINTER idmGetProximityPtr () raises (IDM_PROB);
// Method : idmGetProximityPtr
//
// Purpose : Get the proximity pointer.
//
// Synopsis : HPOINTER idmGetProximityPtr ();
//
// Notes : This method returns a handle to the proximity pointer.
// If no proximity pointer was a handle to the default
// proximity pointer is returned.
//
// Returns : HPOINTER Handle to the proximity pointer
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetProximityPtr (in HPOINTER hptrNewPointer) raises (IDM_PROB);
// Method : idmSetProximityPtr
//
// Purpose : Inform the IDM to use the specified pointer as
// the proximity pointer.
//
// Synopsis : VOID idmSetProximityPtr (in HPOINTER hptrNewPointer);
//
// Notes : The proximity pointer is displayed:
// when the pen is in proximity but before WM_TOUCHDOWN
// after Writing Timeout while pen is still in proximity.
// Note: When the IDM is collecting strokes and inking
// it sets mouse capture and maintains the mouse pointer
// based on the proximity and writing pointers specified
// for this IDM operation. The pointer design does not
// take into account include and exclude rectngles when
// moving within an IDM managed window. IDM won't switch
// mouse pointer to some application pointer nor will it
// send pen input messages to the application while pen
// movement occurs outside the include rectangle or within
// the exclude rectangles. Only on touchdown, in an
// exclude rectangleor outside an include rectangle,
// will messages be routed once again to the application
// and it can change it's mouse pointer.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot set pointer while IDM in current state
//
HPOINTER idmGetWritingPtr () raises (IDM_PROB);
// Method : idmGetWritingPtr
//
// Purpose : Get the writing pointer.
//
// Synopsis : HPOINTER idmGetWritingPtr ();
//
// Notes : This method returns a handle to the writing pointer.
// If no writing pointer was specified a handle to the
// default writing pointer is returned.
//
// Returns : HPOINTER Handle to the writing pointer
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetWritingPtr (in HPOINTER hptrNewPointer) raises (IDM_PROB);
// Method : idmSetWritingPtr
//
// Purpose : Inform the IDM to use the specified pointer as the writing
// pointer.
//
//
// Synopsis : VOID idmSetWritingPtr (in HPOINTER hptrNewPointer);
//
// Notes : The writing pointer is displayed:
// (on integrated sensor/display) between WM_LIFTOFF
// and WM_TOUCHDOWN while in Writing_Mode
// (on opaque tablets) from WM_TOUCHDOWN to Writing Timeout
// Note: When the IDM is collecting strokes and inking it
// sets mouse capture and maintains the mouse pointer based
// on the proximity and writing pointers specified for this
// IDM operation. The pointer design does not take into
// account include and exclude rectngles when moving within
// an IDM managed window. IDM won't switch mouse pointer to
// some application pointer nor will it send pen input
// messages to the application while pen movement occurs
// outside the include rectangle or within the exclude
// rectangles. Only on touchdown, in an exclude rectangle or
// outside an include rectangle, will messages be routed
// once again to the application and it can change it's
// mouse pointer.
//
// Returns :
//
// Error Return:
// NO_EXCEPTION Success
// IDMERR_INVALID_STATE Cannot set pointer while IDM in current state
//
HPOINTER idmGetErasingPtr () raises (IDM_PROB);
// Method : idmGetErasingPtr
//
// Purpose : Get the erasing pointer.
//
// Synopsis : HPOINTER idmGetErasingPtr ();
//
// Notes : This method returns a handle to the erasing pointer.
// If no erasing pointer was specified a handle to the
// default erasing pointer is returned.
//
// Returns : HPOINTER Handle to the erasing pointer
//
// Error Return:
// NO_EXCEPTION Success
//
VOID idmSetErasingPtr (in HPOINTER hptrNewPointer) raises (IDM_PROB);
// Method : idmSetErasingPtr
//
// Purpose :
//
// Synopsis : VOID idmSetErasingPtr (in HPOINTER hptrNewPointer);
//
// Notes :
//
// Returns :
//
// Error Return:
//
HWND idmGetHwndClient () raises (IDM_PROB);
// Method :
//
// Purpose :
//
// Synopsis :
//
// Notes :
//
// Returns :
//
// Error Return:
//
ULONG idmGetState () raises (IDM_PROB);
//
// Method : idmGetState
//
// Purpose : Return the state of the IDM
//
// Synopsis : ULONG idmGetState () raises (IDM_PROB);
//
// Returns :
//
// ULONG currentState...........Current state of IDM.
//
// Errors :
//
// NO_EXCEPTIONS................Success.
//
#ifdef __SOMIDL__
implementation
{
releaseorder: idmSetCtlData,
idmStart,
idmStop,
idmInputComplete,
idmGetRecoTrigger,
idmSetRecoTrigger,
idmGetOwner,
idmSetOwner,
idmGetHps,
idmSetHps,
idmGetInkColor,
idmSetInkColor,
idmGetInkWidth,
idmSetInkWidth,
idmGetLineType,
idmSetLineType,
idmGetInkMix,
idmSetInkMix,
idmGetInkingStyle,
idmSetInkingStyle,
idmGetBackColor,
idmSetBackColor,
idmPaintDoodle,
idmGetSymbolSubset,
idmSetSymbolSubset,
idmGetIDMOp,
idmSetIDMOp,
idmGetMetrics,
idmSetMetrics,
idmGetDictionaryLangModel,
idmSetDictionaryLangModel,
idmGetDictCoer,
idmSetDictCoer,
idmGetTextSpecLM,
idmSetTextSpecLM,
idmGetMaxResults,
idmSetMaxResults,
idmGetDoodle,
idmSetDoodle,
idmGetNotifyFlags,
idmSetNotifyFlags,
idmGetProximityPtr,
idmSetProximityPtr,
idmGetWritingPtr,
idmSetWritingPtr,
idmGetErasingPtr,
idmSetErasingPtr,
idmInitNow,
idmSetTrainString,
idmInitObjects,
idmInitInking,
idmGetHwndClient,
idmSetHwndClient,
idmClearHwndClient,
idmChangeState,
idmSendOwner,
idmPostOwner,
idmDoRecoTrigger,
idmGetInker,
idmGetState,
idmGetCollectorObjForBeta,
idmPutCollectorObjForBeta,
idmGetCollectorObject,
idmIDRResult,
idmWMTouchdown,
idmWMLiftoff,
idmWMMouseMove,
idmWMWritingMode,
idmWMDestroy,
idmWMStroke,
idmWMExitProximity,
idmWMExitWindow,
idmWMEnterWindow,
idmWMPauseTimeout,
idmWMWritingCancelled,
idmWMWritingTimeout,
idmWMFocusChange,
idmIGetDoodleObj,
idmIQueryDoodleObj,
idmGetGestureObject,
idmQueryGestureObject,
idmGetResultObject,
idmSendCollectResult,
idmSendMixedResult,
idmSendTextResult,
idmSendGestureResult,
idmSendMixedResultNoReco,
idmSendTextResultNoReco,
idmSendGestureResultNoReco,
idmSendCollectResultNoStrokes,
idmInitNowForCmpat,
idmGetGestureObjectForCmpat,
idmFreeAllResources,
idmGetFreePending,
idmPerformPendingFree,
idmGetTrainStrings,
idmGetTrainingLevel,
idmGetHwndTD,
idmSetHwndTD,
idmGetSaveIDMOp,
idmSetSaveIDMOp,
idmGetTapFlags,
idmSetTapFlags,
idmRemoveResultObjectFromPool,
idmPutResultObjectInPool,
idmExitCollectState,
idmExitRecoState;
// Class Modifiers
functionprefix = IDMObj_;
filestem = idmobj;
majorversion = 0;
minorversion = 0;
// Method Modifiers
somInit: override;
somUninit: override;
somFree: override;
// Passthru sections
passthru C_h_after = ""
""
"#include <idmdef.h>"
"#include <idmerror.h>"
"#include <idmres.h>"
"#include <idmcoll.h>"
"#include <idmreco.h>"
"#include <idmgest.h>"
"#include <idmtext.h>"
"#include <idmmixed.h>"
"#include <idrtext.h>"
""
"/* Results structure in mp2 of WM_RESULT */"
"typedef struct "
"{ "
" ULONG ulResultType; "
" union "
" { "
" PSZ pszText; "
" PRECODATA pRecoData; "
" IDODoodle * objDoodle; "
" } Data; "
" ULONG ulAltResultType; "
" union "
" { "
" PSZ pszText; "
" PRECODATA pRecoData; "
" } AltData; "
"} IDM_RESULTDATA; "
" typedef IDM_RESULTDATA *PIDM_RESULTDATA; "
""
"/* Result type defines. */ "
"#define RES_NULL 0x00000000 "
"#define RES_TEXT 0x00000001 "
"#define RES_GESTURE 0x00000002 "
"#define RES_STROKE 0x00000004 "
""
"/****************************************************************************/"
"/* IDM_RECTLIST is an array of exclude rectangles used by IDM and specified */"
"/* specified in the IDMCTLDATA structure using the idmSetCtlData method */"
"/****************************************************************************/"
" "
" typedef struct "
" { "
" ULONG ulRectlCnt; /* Number of rectangles in list */ "
" RECTL RectList[1]; /* Array of exclude rectangles */ "
" } IDM_RECTLIST; "
" typedef IDM_RECTLIST *PIDM_RECTLIST; "
" "
" "
"/****************************************************************************/"
"/* IDM_TDNDATA structure is returned in mp2 of the IDM_NOTIFY message when */"
"/* the notification message is IDM_TOUCHDOWN */"
"/****************************************************************************/"
" "
" typedef struct "
" { "
" SOMObject *idmObject; /* IDM object pointer */ "
" POINTS ptsPointerPos; /* Pointer position. */ "
" PWRTEVENTDATA pedEventData; /* Pointer to event data */ "
" } IDM_TDNDATA; "
" typedef IDM_TDNDATA *PIDM_TDNDATA; "
" "
" "
" /***************************************************************************/ "
" /* IDMCTLDATA structure used to set IDM parameters using the idmSetCtlData */ "
" /* method */ "
" /***************************************************************************/ "
" "
" typedef struct "
" { "
" ULONG cbSize; /* size of IDMCTLDATA structure */ "
" HWND hwndOwner; /* window to send results to */ "
" ULONG ulInkingStyle; /* system inking or ink to window PS */ "
" HPS hps; /* presentation space to ink into */ "
" ULONG ulStrokeType; /* ink stroke or eraser stroke */ "
" LONG lInkColor; /* ink color index */ "
" LONG lBackColor; /* Background color index value */ "
" FIXED ulInkWidth; /* ink width color index */ "
" LONG lLineType; /* cosmetic line-type attribute */ "
" LONG lInkMix; /* determines the ink color mix mode */ "
" HPOINTER hProximityPtr; /* in proximity, not writing */ "
" HPOINTER hWritingPtr; /* in proximity, writing */ "
" HBITMAP hbmpBackBitmap; /* Background Bitmap */ "
" ULONG ulAuxData; /* Auxiliary data to be retrieved */ "
" ULONG ulIDMOp; /* indicates IDM operation desired */ "
" IDODoodle doodleObject; /* initialize IDM with doodle */ "
" ULONG ulDoodlePrePr; /* pre-processing of input doodle */ "
" PIDR_INKMETRICS pInkMetrics; /* segmentation mode and metrics */ "
" ULONG ulRecoTrigger; /* events that start recognition */ "
" RECTL rclInclude; /* valid touchdown region */ "
" PIDM_RECTLIST pRectList; /* invalid touchdown regions */ "
" HWORD hWordList; /* wordlist handle */ "
" ULONG ulWLCoercion; /* degree of wordlist influence */ "
" PIDR_SYMSET pSymSet; /* list of valid symbols */ "
" ULONG ulSymSetPrio; /* give specified subsets priority */ "
" ULONG ulDictCoer; /* degree of dictionary influence */ "
" ULONG ulTextSpecLM; /* text-specific language modeling */ "
" ULONG ulMaxResults; /* max # of results engine returns */ "
" ULONG ulNotifyFlags; /* request notification messages */ "
" ULONG ulTapFlags; /* Process taps */ "
" ULONG ulUser1; /* User-defined field 1 */ "
" ULONG ulUser2; /* User defined field 2 */ "
" } IDMCTLDATA; "
" typedef IDMCTLDATA *PIDMCTLDATA, "
" **PPIDMCTLDATA; "
""
"";
}; /* implementation section */
#endif /* ifdef __SOMIDL__ */
}; /* interface section */
#endif /* ifdef __IDMOBJECT_IDL__ */