1 /****************************************************************************\
2 *                                                                                                                              *
3 * PENWIN.H -  Pen Windows functions, types, and definitions                              *
4 *                                                                                                                              *
5 *                     Version 2.0                                                                                      *
6 *                                                                                                                              *
7 *                     Copyright (c) 1992-1999 Microsoft Corp. All rights reserved.     *
8 *                                                                                                                              *
9 *******************************************************************************
10 *
11 * The following symbols control inclusion of various parts of this file;
12 * (indented identifiers are included by the previous main identifier):
13 *
14 * #define:               To prevent inclusion of:
15 *
16 * PENVER                  Pen Windows version number (0x0200).  To exclude
17 *                               definitions introduced in version 2.0 (or above)
18 *                               #define PENVER 0x0100 before #including <penwin.h>
19 *
20 * NOJAPAN                JAPAN-specific code
21 * NOPENALC               Alphabet Code definitions and macros
22 * NOPENAPPS             Pen Applications: Screen Keyboard
23 * NOPENCTL               H/BEDIT, IEDIT, and pen-enabled USER controls, including:
24 *     NOPENBEDIT          : Boxed Edit Control
25 *     NOPENIEDIT          : Ink Edit Control
26 *     NOPENHEDIT          : (H)Edit control
27 * NOPENDATA             PenData APIs and definitions
28 * NOPENDICT             Dictionary support
29 * NOPENDRIVER          Pen Driver definitions, incl OEM
30 * NOPENHRC               Handwriting Recognizer APIs and definitions
31 * NOPENINKPUT          Inking and Input APIs and definitions
32 * NOPENMISC             Miscellaneous Info and Utility APIs and definitions
33 * NOPENMSGS             Pen Messages and definitions
34 * NOPENNLS               National Language Support
35 * NOPENRC1               Recognition Context APIs and definitions (1.0)
36 * NOPENRES               Pen resources, including:
37 *     NOPENBMP             : Pen-related bitmaps
38 *     NOPENCURS           : Pen-related cursors
39 * NOPENTARGET          Targeting APIs and definitions
40 * NOPENVIRTEVENT     Virtual Event layer APIs
41 *
42 * _WIN32                  non-Win32 components, subincludes:
43 *                               : NOPENAPPS, NOPENDICT, NOPENRC1, NOPENVIRTEVENT
44 *
45 * "FBC" in the comments means that the feature exists only for
46 * backward compatibility. It should not be used by new applications.
47 \****************************************************************************/
48
49 #ifndef _INC_PENWIN
50 #define _INC_PENWIN
Lines 51 ... 1649 are skipped.
1650      || (syv)==SYV_CLEARWORD          \
1651      || (syv)==SYV_KKCONVERT          \
1652      || (syv)==SYV_USER                  \
1653      || (syv)==SYV_CORRECT             \
1654      )
1655
1656 #define FIsAnsiGesture(syv) \
1657      (                                              \
1658      (syv) == SYV_BACKSPACE           \
1659      || (syv) == SYV_TAB                \
1660      || (syv) == SYV_RETURN           \
1661      || (syv) == SYV_SPACE             \
1662      )
1663
1664 #endif /*!NOPENHRC */
1665
1666 //---------------------------------------------------------------------------
1667 #ifndef NOPENINKPUT
1668
1669 #define SubPenMsgFromWpLp(wp, lp)           (LOWORD(wp))
1670 #ifdef _WIN32
1671 #define EventRefFromWpLp(wp, lp)             (HIWORD(wp))
1672 #define TerminationFromWpLp(wp, lp)        ((int)HIWORD(wp))
1673 #define HpcmFromWpLp(wp, lp)                    ((HPCM)(lp))
1674 #else
1675 #define EventRefFromWpLp(wp, lp)             (LOWORD(lp))
1676 #define TerminationFromWpLp(wp, lp)        ((int)LOWORD(lp))
1677 #define HpcmFromWpLp(wp, lp)                    ((HPCM)HIWORD(lp))
1678 #endif //_WIN32
1679
1680 #endif     /*!NOPENINKPUT*/
1681
1682 //---------------------------------------------------------------------------
1683 #ifndef NOPENTARGET
1684 #define HwndFromHtrg(htrg)          ((HWND)(DWORD)(htrg))
1685 #define HtrgFromHwnd(hwnd)          ((HTRG)(UINT)(hwnd))
1686 #endif /*!NOPENTARGET*/
1687
1688 //////////////////////////////////////////////////////////////////////////////
1689 /****** Typedefs ************************************************************/
1690
1691 // Simple:
1692 typedef LONG                                 ALC;      // Enabled Alphabet
1693 typedef int                                   CL;        // Confidence Level
1694 typedef UINT                                 HKP;      // Hook Parameter
1695 typedef int                                   REC;      // recognition result
1696 typedef LONG                                 SYV;      // Symbol Value
1697
1698 #ifndef DECLARE_HANDLE32
1699 #define DECLARE_HANDLE32(name)\
1700       struct name##__ { int unused; };\
1701       typedef const struct name##__ FAR* name
1702 #endif //!DECLARE_HANDLE32
1703
1704 DECLARE_HANDLE32(HTRG);                            // Handle to target
1705 DECLARE_HANDLE(HPCM);                               // Handle to Pen Collection Info
1706 DECLARE_HANDLE(HPENDATA);                         // handle to ink
1707 DECLARE_HANDLE(HREC);                               // handle to recognizer
1708
1709 // Pointer Types:
1710 typedef ALC FAR*                          LPALC;             // ptr to ALC
1711 typedef LPVOID                              LPOEM;             // alias
1712 typedef SYV FAR*                          LPSYV;             // ptr to SYV
1713 typedef HPENDATA FAR*                  LPHPENDATA;     // ptr to HPENDATA
1714
1715 // Function Prototypes:
1716 typedef int               (CALLBACK *ENUMPROC)(LPSYV, int, VOID FAR*);
1717 typedef int               (CALLBACK *LPDF)(int, LPVOID, LPVOID, int, DWORD, DWORD);
1718 typedef BOOL             (CALLBACK *RCYIELDPROC)(VOID);
1719
1720 // Structures:
1721
1722 typedef struct tagABSTIME           // 2.0 absolute date/time
1723      {
1724      DWORD sec;          // number of seconds since 1/1/1970, ret by CRTlib time() fn
1725      UINT ms;             // additional offset in ms, 0..999
1726      }
1727      ABSTIME, FAR *LPABSTIME;
1728
1729 //---------------------------------------------------------------------------
1730 #ifndef NOPENHEDIT
1731
1732 typedef struct tagCTLINITHEDIT  // 2.0 init struct for (h)edit
1733      {
1734      DWORD cbSize;                          // sizeof(CTLINITHEDIT)
1735      HWND hwnd;                               // (h)edit window handle
1736      int id;                                    // its id
1737      DWORD dwFlags;                         // CIE_xx
1738      DWORD dwReserved;                    // for future use
1739      }
1740      CTLINITHEDIT, FAR *LPCTLINITHEDIT;
1741 #endif /* !NOPENHEDIT */
1742
1743 //---------------------------------------------------------------------------
1744 #ifndef NOPENBEDIT
1745
1746 typedef struct tagBOXLAYOUT        // 1.0 box edit layout
1747      {
1748      int cyCusp;                              // pixel height of box (BXS_RECT) or cusp
1749      int cyEndCusp;                         // pixel height of cusps at extreme ends
Lines 1750 ... 2422 are skipped.
2423 BOOL          WINAPI InitRecognizer(LPRC);
2424 REC           WINAPI RecognizeDataInternal(LPRC, HPENDATA, LPFUNCRESULTS);
2425 REC           WINAPI RecognizeInternal(LPRC, LPFUNCRESULTS);
2426 BOOL          WINAPI TrainContextInternal(LPRCRESULT, LPSYE, int, LPSYC, int);
2427 BOOL          WINAPI TrainInkInternal(LPRC, HPENDATA, LPSYV);
2428 #endif /*!NOPENRC1 */
2429
2430 //---------------------------------------------------------------------------
2431 #ifndef NOPENTARGET
2432
2433 // Ink Targeting:
2434 int           WINAPI TargetPoints(LPTARGINFO, LPPOINT, DWORD, UINT, LPSTROKEINFO);
2435
2436 #endif /*!NOPENTARGET */
2437
2438 //---------------------------------------------------------------------------
2439 #ifndef NOPENVIRTEVENT
2440
2441 // Virtual Event Layer:
2442 VOID          WINAPI AtomicVirtualEvent(BOOL);
2443 VOID          WINAPI PostVirtualKeyEvent(UINT, BOOL);
2444 VOID          WINAPI PostVirtualMouseEvent(UINT, int, int);
2445 #endif /*!NOPENVIRTEVENT */
2446
2447 //---------------------------------------------------------------------------
2448
2449 #ifdef  JAPAN
2450 // Kanji
2451 BOOL          WINAPI KKConvert(HWND hwndConvert, HWND hwndCaller,
2452                  LPSTR lpBuf, UINT cbBuf, LPPOINT lpPnt);
2453
2454 #endif //  JAPAN
2455
2456 #endif /* RC_INVOKED */ // ... all the way back from definitions:3
2457
2458 /****** End of Header Info *************************************************/
2459
2460 #ifdef __cplusplus
2461 }
2462 #endif /* __cplusplus */
2463
2464 #ifndef _WIN32
2465 #ifndef RC_INVOKED
2466 #pragma pack()
2467 #endif /* RC_INVOKED */
2468 #endif //!_WIN32
2469
2470 #endif /* #define _INC_PENWIN */
2471