home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / apcspch.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  4.7 KB  |  133 lines

  1. //* ****************************************************************************
  2. //* High level AutoPC Simple Speech Interface 
  3. //* ****************************************************************************
  4. #ifndef _IAPCSPCH_H_
  5. #define _IAPCSPCH_H_
  6.  
  7. #include <apcmsg.h>
  8. #include <speech.h>
  9.  
  10. #ifdef INITGUID
  11. #include <initguid.h>
  12. #endif
  13.  
  14. // APCSPCH related window messages in 0xBE80 - 0xBEBF range
  15. #define WM_SPCH_RECOG               (APC_SPCH_START+0x10)
  16. #define WM_SPCH_NOTIFY              (APC_SPCH_START+0x11)
  17. #define WM_SPCH_SNDDONE             (APC_SPCH_START+0x12)
  18. #define WM_SPCH_FEEDBACK            (APC_SPCH_START+0x13)
  19.  
  20. // STRUCTURES 
  21. typedef UINT    GRAMMARID;
  22.  
  23. //* ****************************************************************************
  24. // Defines
  25. //* ****************************************************************************
  26.  
  27. //    flags passed to SetSpeakContextRule
  28. #define APCSPCH_TN_ADDR_CTX            0x1000
  29.  
  30. #define APCSPCH_TN_SPELLING_CTX        0x2000
  31. #define APCSPCH_TN_PHONE_CTX        0x3000
  32.  
  33. #define APCSPCH_TN_WORD             0x0001
  34.  
  35.  
  36. //  flags passed to CreateSpkContext
  37. // 0 is reserved
  38. #define APCSPCH_TN_CONTEXT_NEW      0x0001
  39. #define APCSPCH_TN_CONTEXT_COPY     0x0002
  40. #define APCSPCH_TN_CONTEXT_EXTEND   0x0003
  41.  
  42. //    flags passed to CreateVMenu and AddVMenuCommand
  43. #define APCSPCH_VM_USEEXISTING      0x0100
  44. //    flags passed to AddVMenuCommand only
  45. #define APCSPCH_VM_NOFEEDBACK        0x00001000
  46.  
  47. //    flags passed to SpeakEx
  48. #define APCSPCH_SP_BACKGROUND       0x0008
  49.  
  50. //    speaking mode returned by QuerySpeakingMode
  51. //    0 means no TTS or wave file
  52. #define APCSPCH_SP_TTS                1
  53. #define APCSPCH_SP_WAVEFILE            2
  54.  
  55. //    feedback level returned by QueryFeedbackLevel function
  56. #define APCSPCH_FB_MORE                0x100
  57. #define APCSPCH_FB_LESS                0x200
  58. #define APCSPCH_FB_NONE                0x300
  59.  
  60. //    flags passed to VoiceHelpStart
  61. #define APCSPCH_VH_LONGHELP            1
  62. #define APCSPCH_VH_SHORTHELP        2
  63. #define APCSPCH_VH_LISTGLOBAL        4
  64.  
  65. // Infomation delivered with WM_SPCH_FEEDBACK message
  66. //
  67. // HIWORD(wParam) - Rsvd
  68. // LOWORD(wParam) - Current Feedback level
  69. // HIWORD(lParam) - Speech Feedback initiation reason
  70. // LOWORD(lParam) - Reason specific information
  71. //
  72. // Reason defines for HIWORD(lParam)
  73.  
  74. #define SFR_WAKEUPWORD      1
  75. #define SFR_PTT             2
  76. #define SFR_READ            3
  77.  
  78. //* ****************************************************************************
  79. //* New COM Simple Speech Interface
  80. //* ****************************************************************************
  81. DECLARE_INTERFACE(IAPCSpeech);
  82.  
  83. #undef    INTERFACE
  84. #define    INTERFACE   IAPCSpeech
  85.  
  86. // {ebc930f0-d912-11d0-90c2-00aa00c0837c}
  87. // Apollo simple speech interface
  88. DEFINE_GUID(IID_IAPCSPEECH, 
  89. 0xEBC930F0, 0xD912, 0x11D0, 0x90, 0xC2, 0x00, 0xaA, 0x00, 0xC0, 0x83, 0x7C);
  90.  
  91.  
  92. DECLARE_INTERFACE_(IAPCSpeech,IUnknown)
  93. {
  94.     // IUnknown members
  95.     STDMETHOD(QueryInterface)       (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  96.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  97.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  98.  
  99.     STDMETHOD(CreateVMenu)          (THIS_ PIVOICECMDW, PVCMDNAME, HINSTANCE, DWORD, LPVOID, DWORD, PIVCMDMENUW*) PURE;
  100.     STDMETHOD(AddVMenuCommand)      (THIS_ PIVCMDMENUW, LPTSTR, UINT, DWORD, DWORD) PURE;
  101.     STDMETHOD(AddVMenuCommandsFromResource)( THIS_ PIVCMDMENUW pVMenu, HINSTANCE hinst,PCWSTR pszMenuName, DWORD  dwMenuState, DWORD dwFlag) PURE;
  102.  
  103.     STDMETHOD(Train)                (THIS_ LPCWSTR, DWORD, LPCWSTR, DWORD, DWORD=0, DWORD=0) PURE;
  104.  
  105.     STDMETHOD(QuerySpeakingMode)    (THIS_ DWORD*) PURE;
  106.     STDMETHOD(PlaySound)            (THIS_ LPCWSTR, HMODULE, DWORD, DWORD) PURE;
  107.     STDMETHOD(Speak)                (THIS_ WCHAR*, DWORD) PURE;
  108.     STDMETHOD(SpeakEx)              (THIS_ DWORD, WCHAR*, DWORD, DWORD, PVOID) PURE;
  109.     STDMETHOD(SpeakTime)            (THIS_ WCHAR* pszSpeak, SYSTEMTIME *systime, DWORD dwID, DWORD dwFlags) PURE;
  110.     STDMETHOD(CreateSpkContext)     (THIS_ IAPCSpeech*, DWORD,DWORD,PDWORD) PURE;
  111.     STDMETHOD(DestroySpkContext)    (THIS_ DWORD,DWORD) PURE;
  112.     STDMETHOD(SetSpkContextRule)    (THIS_ DWORD,DWORD,LPCTSTR,LPCTSTR,LPVOID) PURE;
  113.  
  114.     STDMETHOD(VoiceHelpStart)       (THIS_ DWORD) PURE;
  115.     STDMETHOD(VoiceHelpStop)        (THIS_ DWORD) PURE;
  116.     
  117.     STDMETHOD(AttribSet)            (THIS_ DWORD,DWORD) PURE;
  118.     STDMETHOD(AttribGet)            (THIS_ DWORD,PDWORD) PURE;
  119.  
  120.     STDMETHOD(QuerySpeechInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  121.     STDMETHOD(SetMsgOptions)        (THIS_ DWORD,DWORD,DWORD) PURE;
  122.  
  123.     STDMETHOD(QueryFeedbackLevel)   (THIS_ PDWORD,PDWORD,PDWORD,DWORD) PURE;
  124. };
  125.  
  126. #define CAPCSpeech    IAPCSpeech
  127.  
  128. //    function
  129. IAPCSpeech* CreateAPCSpeech(DWORD dwThreadID,DWORD dwReserved);
  130.  
  131.  
  132. #endif // _IAPCSPCH_H
  133.