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

  1.  
  2. //# This file was generated by the SOM Compiler.
  3. //# FileName: idrgest.id2.
  4. //# Generated using:
  5. //#     SOM Precompiler somopc: 2.7
  6. //#     SOM Emitter emitidl: 2.22
  7.  
  8. //
  9. //   CLASS: IDRGesture
  10. //
  11. //   CLASS HIERARCHY:
  12. //
  13. //     SOMObject
  14. //      └── IDRReco
  15. //            └── IDRGesture
  16. //
  17. //   DESCRIPTION:
  18. //
  19. //     Transformation of input data to gestures.
  20.  
  21. #ifndef idrgest_idl
  22. #define idrgest_idl
  23.  
  24. #include "idrreco.idl"
  25. #include <somcls.idl>
  26.  
  27. interface M_IDRGesture;
  28.  
  29.  
  30. interface IDRGesture : IDRReco
  31. {
  32.  
  33.   VOID idrGetGesturesInfo(in PULONG pulGestCnt,
  34.                            in PIDR_GESTINFO pInfo) raises(IDR_PROB);
  35.  
  36.   // Method   : idrGetGesturesInfo
  37.   //
  38.   // Purpose  : Retrieve information on the gesture set this object supports.
  39.   //
  40.   // Synopsis : VOID  idrGetGesturesInfo( OUT   PULONG        pulGestCnt,
  41.   //                                       INOUT PIDR_GESTINFO pInfo );
  42.   //
  43.   //   pulGestCnt.... Pointer to count variable.
  44.   //   pInfo......... Pointer to an array of return structures.
  45.   //
  46.   // Returns  :
  47.   //   NO_ERROR................. Success.
  48.   //   IDRERR_ERROR............. Error.
  49.   //   IDRERR_BUF_TOO_SMALL..... A larger buffer is required.
  50.   //
  51.   // Notes    :
  52.   //   This call returns an array of IDR_GESTINFO structures for
  53.   //   gestures that are available to this object.  These gestures
  54.   //   may or may not be enabled for recognition.  To determine which
  55.   //   gestures are enabled for recognition, invoke idrGetSymbolSubset().
  56.   //
  57.   //   Two invocations may be required to get the information:
  58.   //
  59.   //     1) Invoke with the 'pInfo' set to an initial buffer size
  60.   //        of *pulGestCnt*sizeof(IDR_GESTINFO).
  61.   //     2) If successful and the initial buffer size was large enough,
  62.   //        pInfo will contain the information and *pulGestCnt will contain
  63.   //        the number of structures returned.  Otherwise, IDRERR_BUF_TOO_SMALL
  64.   //        will be reutnred and *pulGestCnt will contain the number of
  65.   //        structures to be returned.
  66.   //     3) Reallocate the block (*pulGestCnt * sizeof( IDR_GESTINFO )),
  67.   //        point to it with pInfo and invoke again.
  68.   //
  69.   // Usage    :
  70.   //   Callable - Always.
  71.   //   Override - None.
  72.  
  73.   VOID idrRecoStrokes( out PRECODATA pprdb ) raises(IDR_PROB);
  74.  
  75.   // Method   : idrRecoStrokes
  76.   //
  77.   // Purpose  : Indicate that all stroke input is complete;
  78.   //            request recognition and results.
  79.   //
  80.   // Synopsis : VOID idrRecoStrokes(  out PRECODATA pprdb  );
  81.   //
  82.   // pprdb......... Pointer to result structure.
  83.   //
  84.   // Returns  :
  85.   //   NO_ERROR................. Success.
  86.   //   IDRERR_ERROR............. Error.
  87.   //
  88.   // Notes    :
  89.   //   On return from this method, all strokes are cleared from the
  90.   //   engine.  The engine returns to the alive state.
  91.   //
  92.   //   This method does gesture reco processing.  It tries to reco
  93.   //   the current strokes as a gesture.  Then it checks to see if
  94.   //   the strokes can represent a letter gesture.  If the last stroke
  95.   //   is a tap, a letter gesture is possible.  It builds gesture
  96.   //   results based on the best score.  It clears the current strokes in
  97.   //   the engine and returns.
  98.   //
  99.  
  100.  
  101.  
  102.  
  103.  
  104. #ifdef __SOMIDL__
  105.   implementation {
  106.  
  107.     releaseorder: idrGetGesturesInfo, idrRecoStrokes,
  108.                   idrIRecoStrokes,
  109.                   idrXfrmRawStrokes,idrTestRawAsUserGest,
  110.                   idrSetDoodleObj,idrGetDoodleObj,
  111.                   idrSetTextObj,idrGetTextObj,idrSetGestMap,idrSetSubsysRegVal,
  112.                   idrGetGestMap,idrGetSubsysRegVal;
  113.  
  114.     //# Class Modifiers
  115.     functionprefix = IDRGest;
  116.     majorversion = 0;
  117.     minorversion = 1;
  118.     local;
  119.     filestem = idrgest;
  120.     metaclass = M_IDRGesture;
  121.     callstyle = idl;
  122.  
  123.  
  124.     passthru C_h_after =  ""
  125. ""
  126. "#pragma pack(2)"
  127. ""
  128. "/*"
  129. "**  Structure for gesture results.  If the symbol's type is"
  130. "**  \"IDR_TYPE_SYSGESTURE\" the symbol's value is the virtual id.  If the"
  131. "**  type is \"IDR_TYPE_LETTERGESTURE\" the value is the character."
  132. "*/"
  133. ""
  134. "typedef struct _IDR_GESTRSLT    /* Gesture result descriptor */"
  135. "{"
  136. "  ULONG         ulSSize;        /* IDR_GESTRSLT size */"
  137. "  IDR_SYM       Symbol;         /* Interpret symbol value based on type. */"
  138. "  RECOID        EventId;        /* Event id; 1->N, 0 == unrecognized */"
  139. "  HRECO         hRecoSubSystem; /* Reco subsystem handle */"
  140. "  ULONG         ulResolution;   /* Bounding-box & hot spot(s) resolution */"
  141. "  RECTL         rclBoundBox;    /* Correlated strokes surrounding box */"
  142. "  POINTL        ptlHotPt;       /* Gesture x-y \"hot spot\" */"
  143. "}   IDR_GESTRSLT,"
  144. "   *PIDR_GESTRSLT,"
  145. "  **PPIDR_GESTRSLT;"
  146. ""
  147. ""
  148. "/*"
  149. "**  Gesture information structure, i.e. information on the mapping of a"
  150. "**  gesture to other PenPM system constructs.  Like the gesture result,"
  151. "**  if the symbol's type is \"IDR_TYPE_SYSGESTURE\" the symbol's value is"
  152. "**  the virtual id.  If the type is \"IDR_TYPE_LETTERGESTURE\" the value is"
  153. "**  the character."
  154. "*/"
  155. ""
  156. "typedef struct _IDR_GESTINFO    /* Gesture Information structure */"
  157. "{"
  158. "  ULONG         ulSSize;        /* IDR_GESTINFO size */"
  159. "  CHAR          szGestName[MAX_RECO_NAME_LENGTH+1];  /* Name of the gesture. */"
  160. "  IDR_SYM       Symbol;         /* Interpret symbol value based on type. */"
  161. "  RECOID        EventId;        /* PenPM Event id */"
  162. "}   IDR_GESTINFO,"
  163. "   *PIDR_GESTINFO,"
  164. "  **PPIDR_GESTINFO;"
  165. ""
  166. "#pragma pack()"
  167. ""
  168. "";
  169.  
  170.  
  171.  
  172.     //# Method Modifiers
  173.     somInit: override;
  174.     somUninit: override;
  175.     idrGetSymbolSubsetInfo: override;
  176.     idrGetSymbolSubset: override;
  177.     idrSetSymbolSubset: override;
  178.     idrAddStroke: override;
  179.     idrAddStrokefromStrokeObject: override;
  180.  
  181.  
  182.     //# Data Modifiers
  183.  
  184.  
  185.   };
  186. #endif /* __SOMIDL__ */
  187. };
  188.  
  189. interface M_IDRGesture
  190. {
  191.  
  192.   IDRGesture  idrclsNewIDRGesture(in PVOID pCfg,
  193.                             in  PVOID pszRegName )   raises(IDR_PROB);
  194.  
  195.   // Method   : idrclsNewIDRGesture
  196.   //
  197.   // Purpose  : Construct an ink-data to gesture transformer object using a
  198.   //            specific recognition engine configuration.
  199.   //
  200.   // Synopsis : IDRGesture * idrclsNewIDRGesture( IN   PVOID        pCfg,
  201.   //                                              IN   PSZ          pszRegName )
  202.   //
  203.   //   pCfg.......... Recognition configuration to use; if NULL the
  204.   //                  system default configuration will be used.
  205.   //   pszRegName.... Subsystem name to register as (see RED component).
  206.   //
  207.   // Returns  :
  208.   //   NO_ERROR.............. Success.
  209.   //   IDRERR_ERROR.......... Error.
  210.   //
  211.   // Notes    :
  212.   //   A text object is created, set to single symbol metrics and a
  213.   //   restricted vocabulary set to support letter gestures.
  214.   //
  215.   // Usage    :
  216.   //   Callable - Always.
  217.   //   Override - Override by subclasses.
  218.  
  219.  
  220.  
  221.  
  222. #ifdef __SOMIDL__
  223.   implementation {
  224.  
  225.     releaseorder: idrclsNewIDRGesture,
  226.                   idrclsGetVocabulary,idrclsRegisterVocabulary;
  227.  
  228.     //# Class Modifiers
  229.     functionprefix = IDRGestM;
  230.     majorversion = 0;
  231.     minorversion = 1;
  232.     local;
  233.     filestem = idrgest;
  234.     callstyle = idl;
  235.  
  236.     //# Method Modifiers
  237.     idrclsFreeIDR: override;
  238.     somInit: override;
  239.  
  240.     //# Data Modifiers
  241.  
  242.  
  243.   };
  244. #endif /* __SOMIDL__ */
  245. };
  246.  
  247. #endif  /* idrgest_idl */
  248.