home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
wpentk.zip
/
WBPENTK4.DSK
/
IDRGEST.IDL
< prev
next >
Wrap
Text File
|
1994-10-07
|
7KB
|
248 lines
//# This file was generated by the SOM Compiler.
//# FileName: idrgest.id2.
//# Generated using:
//# SOM Precompiler somopc: 2.7
//# SOM Emitter emitidl: 2.22
//
// CLASS: IDRGesture
//
// CLASS HIERARCHY:
//
// SOMObject
// └── IDRReco
// └── IDRGesture
//
// DESCRIPTION:
//
// Transformation of input data to gestures.
#ifndef idrgest_idl
#define idrgest_idl
#include "idrreco.idl"
#include <somcls.idl>
interface M_IDRGesture;
interface IDRGesture : IDRReco
{
VOID idrGetGesturesInfo(in PULONG pulGestCnt,
in PIDR_GESTINFO pInfo) raises(IDR_PROB);
// Method : idrGetGesturesInfo
//
// Purpose : Retrieve information on the gesture set this object supports.
//
// Synopsis : VOID idrGetGesturesInfo( OUT PULONG pulGestCnt,
// INOUT PIDR_GESTINFO pInfo );
//
// pulGestCnt.... Pointer to count variable.
// pInfo......... Pointer to an array of return structures.
//
// Returns :
// NO_ERROR................. Success.
// IDRERR_ERROR............. Error.
// IDRERR_BUF_TOO_SMALL..... A larger buffer is required.
//
// Notes :
// This call returns an array of IDR_GESTINFO structures for
// gestures that are available to this object. These gestures
// may or may not be enabled for recognition. To determine which
// gestures are enabled for recognition, invoke idrGetSymbolSubset().
//
// Two invocations may be required to get the information:
//
// 1) Invoke with the 'pInfo' set to an initial buffer size
// of *pulGestCnt*sizeof(IDR_GESTINFO).
// 2) If successful and the initial buffer size was large enough,
// pInfo will contain the information and *pulGestCnt will contain
// the number of structures returned. Otherwise, IDRERR_BUF_TOO_SMALL
// will be reutnred and *pulGestCnt will contain the number of
// structures to be returned.
// 3) Reallocate the block (*pulGestCnt * sizeof( IDR_GESTINFO )),
// point to it with pInfo and invoke again.
//
// Usage :
// Callable - Always.
// Override - None.
VOID idrRecoStrokes( out PRECODATA pprdb ) raises(IDR_PROB);
// Method : idrRecoStrokes
//
// Purpose : Indicate that all stroke input is complete;
// request recognition and results.
//
// Synopsis : VOID idrRecoStrokes( out PRECODATA pprdb );
//
// pprdb......... Pointer to result structure.
//
// Returns :
// NO_ERROR................. Success.
// IDRERR_ERROR............. Error.
//
// Notes :
// On return from this method, all strokes are cleared from the
// engine. The engine returns to the alive state.
//
// This method does gesture reco processing. It tries to reco
// the current strokes as a gesture. Then it checks to see if
// the strokes can represent a letter gesture. If the last stroke
// is a tap, a letter gesture is possible. It builds gesture
// results based on the best score. It clears the current strokes in
// the engine and returns.
//
#ifdef __SOMIDL__
implementation {
releaseorder: idrGetGesturesInfo, idrRecoStrokes,
idrIRecoStrokes,
idrXfrmRawStrokes,idrTestRawAsUserGest,
idrSetDoodleObj,idrGetDoodleObj,
idrSetTextObj,idrGetTextObj,idrSetGestMap,idrSetSubsysRegVal,
idrGetGestMap,idrGetSubsysRegVal;
//# Class Modifiers
functionprefix = IDRGest;
majorversion = 0;
minorversion = 1;
local;
filestem = idrgest;
metaclass = M_IDRGesture;
callstyle = idl;
passthru C_h_after = ""
""
"#pragma pack(2)"
""
"/*"
"** Structure for gesture results. If the symbol's type is"
"** \"IDR_TYPE_SYSGESTURE\" the symbol's value is the virtual id. If the"
"** type is \"IDR_TYPE_LETTERGESTURE\" the value is the character."
"*/"
""
"typedef struct _IDR_GESTRSLT /* Gesture result descriptor */"
"{"
" ULONG ulSSize; /* IDR_GESTRSLT size */"
" IDR_SYM Symbol; /* Interpret symbol value based on type. */"
" RECOID EventId; /* Event id; 1->N, 0 == unrecognized */"
" HRECO hRecoSubSystem; /* Reco subsystem handle */"
" ULONG ulResolution; /* Bounding-box & hot spot(s) resolution */"
" RECTL rclBoundBox; /* Correlated strokes surrounding box */"
" POINTL ptlHotPt; /* Gesture x-y \"hot spot\" */"
"} IDR_GESTRSLT,"
" *PIDR_GESTRSLT,"
" **PPIDR_GESTRSLT;"
""
""
"/*"
"** Gesture information structure, i.e. information on the mapping of a"
"** gesture to other PenPM system constructs. Like the gesture result,"
"** if the symbol's type is \"IDR_TYPE_SYSGESTURE\" the symbol's value is"
"** the virtual id. If the type is \"IDR_TYPE_LETTERGESTURE\" the value is"
"** the character."
"*/"
""
"typedef struct _IDR_GESTINFO /* Gesture Information structure */"
"{"
" ULONG ulSSize; /* IDR_GESTINFO size */"
" CHAR szGestName[MAX_RECO_NAME_LENGTH+1]; /* Name of the gesture. */"
" IDR_SYM Symbol; /* Interpret symbol value based on type. */"
" RECOID EventId; /* PenPM Event id */"
"} IDR_GESTINFO,"
" *PIDR_GESTINFO,"
" **PPIDR_GESTINFO;"
""
"#pragma pack()"
""
"";
//# Method Modifiers
somInit: override;
somUninit: override;
idrGetSymbolSubsetInfo: override;
idrGetSymbolSubset: override;
idrSetSymbolSubset: override;
idrAddStroke: override;
idrAddStrokefromStrokeObject: override;
//# Data Modifiers
};
#endif /* __SOMIDL__ */
};
interface M_IDRGesture
{
IDRGesture idrclsNewIDRGesture(in PVOID pCfg,
in PVOID pszRegName ) raises(IDR_PROB);
// Method : idrclsNewIDRGesture
//
// Purpose : Construct an ink-data to gesture transformer object using a
// specific recognition engine configuration.
//
// Synopsis : IDRGesture * idrclsNewIDRGesture( IN PVOID pCfg,
// IN PSZ pszRegName )
//
// pCfg.......... Recognition configuration to use; if NULL the
// system default configuration will be used.
// pszRegName.... Subsystem name to register as (see RED component).
//
// Returns :
// NO_ERROR.............. Success.
// IDRERR_ERROR.......... Error.
//
// Notes :
// A text object is created, set to single symbol metrics and a
// restricted vocabulary set to support letter gestures.
//
// Usage :
// Callable - Always.
// Override - Override by subclasses.
#ifdef __SOMIDL__
implementation {
releaseorder: idrclsNewIDRGesture,
idrclsGetVocabulary,idrclsRegisterVocabulary;
//# Class Modifiers
functionprefix = IDRGestM;
majorversion = 0;
minorversion = 1;
local;
filestem = idrgest;
callstyle = idl;
//# Method Modifiers
idrclsFreeIDR: override;
somInit: override;
//# Data Modifiers
};
#endif /* __SOMIDL__ */
};
#endif /* idrgest_idl */