1 // Copyright © 2017 winapi-rs developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5 // All files in the project carrying such notice may not be copied, modified, or distributed
6 // except according to those terms.
7 use ctypes
::{c_float, c_int, c_void}
;
8 use shared
::guiddef
::CLSID
;
9 use shared
::minwindef
::{BOOL, DWORD, ULONG}
;
11 use um
::unknwnbase
::{IUnknown, IUnknownVtbl}
;
12 use um
::winnt
::{HRESULT, LPCWSTR, ULONGLONG, WCHAR}
;
13 pub use um
::sapiddk51
::{
17 pub const SR_LOCALIZED_DESCRIPTION
: &'
static str = "Description";
18 pub use um
::sapiddk51
::{
19 ISpTokenUI
, ISpTokenUIVtbl
,
20 ISpObjectTokenEnumBuilder
, ISpObjectTokenEnumBuilderVtbl
,
26 SPPHRASEPROPERTYHANDLE
,
28 ISpErrorLog
, ISpErrorLogVtbl
,
29 ISpGrammarCompiler
, ISpGrammarCompilerVtbl
,
30 ISpGramCompBackend
, ISpGramCompBackendVtbl
,
31 ISpITNProcessor
, ISpITNProcessorVtbl
,
32 ISpPhraseBuilder
, ISpPhraseBuilderVtbl
,
35 ISpThreadControl
, ISpThreadControlVtbl
,
37 ISpTaskManager
, ISpTaskManagerVtbl
,
46 ISpTTSEngineSite
, ISpTTSEngineSiteVtbl
,
48 ISpTTSEngine
, ISpTTSEngineVtbl
,
62 ISpCFGInterpreterSite
, ISpCFGInterpreterSiteVtbl
,
63 ISpCFGInterpreter
, ISpCFGInterpreterVtbl
,
74 SPRT_FALSE_RECOGNITION
,
76 pub const SPRT_TYPE_MASK
: SPRESULTTYPE
= 3;
77 pub const SPRT_EMULATED
: SPRESULTTYPE
= 1 << 3;
78 pub const SPRT_EXTENDABLE_PARSE
: SPRESULTTYPE
= 1 << 4;
79 pub use um
::sapiddk51
::{
83 STRUCT
!{struct SPRECORESULTINFOEX
{
85 eResultType
: SPRESULTTYPE
,
87 fProprietaryAutoPause
: BOOL
,
88 ullStreamPosStart
: ULONGLONG
,
89 ullStreamPosEnd
: ULONGLONG
,
90 hGrammar
: SPGRAMMARHANDLE
,
91 ulSizeEngineData
: ULONG
,
92 pvEngineData
: *mut c_void
,
93 pPhrase
: *mut ISpPhraseBuilder
,
94 aPhraseAlts
: *mut SPPHRASEALT
,
96 ullStreamTimeStart
: ULONGLONG
,
97 ullStreamTimeEnd
: ULONGLONG
,
99 pub use um
::sapiddk51
::{
106 ISpSREngineSite
, ISpSREngineSiteVtbl
,
108 RIDL
!{#[uuid(0x7bc6e012, 0x684a, 0x493e, 0xbd, 0xd4, 0x2b, 0xf5, 0xfb, 0xf4, 0x8c, 0xfe)]
109 interface
ISpSREngineSite2(ISpSREngineSite2Vtbl
): ISpSREngineSite(ISpSREngineSiteVtbl
) {
111 pEvent
: *const SPEVENTEX
,
112 hSAPIRecoContext
: SPRECOCONTEXTHANDLE
,
115 ullCurrentRecoPos
: ULONGLONG
,
116 ullCurrentRecoTime
: ULONGLONG
,
118 fn GetRuleTransition(
121 pTrans
: *mut SPTRANSITIONENTRY
,
124 pResultInfo
: *const SPRECORESULTINFOEX
,
127 pub use um
::sapiddk51
::{
131 SPPROPSRC_RECO_GRAMMAR
,
132 ISpSREngine
, ISpSREngineVtbl
,
134 RIDL
!{#[uuid(0x7ba627d8, 0x33f9, 0x4375, 0x90, 0xc5, 0x99, 0x85, 0xae, 0xe5, 0xed, 0xe5)]
135 interface
ISpSREngine2(ISpSREngine2Vtbl
): ISpSREngine(ISpSREngineVtbl
) {
136 fn PrivateCallImmediate(
137 pvEngineContext
: *mut c_void
,
138 pInCallFrame
: *const c_void
,
139 ulInCallFrameSize
: ULONG
,
140 ppvCoMemResponse
: *mut *mut c_void
,
141 pulResponseSize
: *mut ULONG
,
143 fn SetAdaptationData2(
144 pvEngineContext
: *mut c_void
,
145 pAdaptationData
: *const WCHAR
,
148 eSettings
: SPADAPTATIONSETTINGS
,
149 eRelevance
: SPADAPTATIONRELEVANCE
,
152 pvEngineGrammar
: *mut c_void
,
154 fIsPrefixRequired
: BOOL
,
158 pvClientRuleContext
: *mut c_void
,
159 nRulePriority
: c_int
,
161 fn EmulateRecognition(
162 pPhrase
: *mut ISpPhrase
,
163 dwCompareFlags
: DWORD
,
166 pvEngineGrammar
: *mut c_void
,
171 pvClientRuleContext
: *mut c_void
,
175 fDoingTraining
: BOOL
,
176 fAdaptFromTrainingData
: BOOL
,
178 fn ResetAcousticModelAdaptation() -> HRESULT
,
180 pvEngineGrammar
: *mut c_void
,
181 pvGrammarData
: *const SPBINARYGRAMMAR
,
185 pvEngineGrammar
: *mut c_void
,
189 pub use um
::sapiddk51
::SPPHRASEALTREQUEST
;
190 RIDL
!{#[uuid(0xfece8294, 0x2be1, 0x408f, 0x8e, 0x68, 0x2d, 0xe3, 0x77, 0x09, 0x2f, 0x0e)]
191 interface
ISpSRAlternates(ISpSRAlternatesVtbl
): IUnknown(IUnknownVtbl
) {
193 pAltRequest
: *mut SPPHRASEALTREQUEST
,
194 ppAlts
: *mut *mut SPPHRASEALT
,
198 pAltRequest
: *mut SPPHRASEALTREQUEST
,
199 pAlt
: *mut SPPHRASEALT
,
200 ppvResultExtra
: *mut c_void
,
201 pcbResultExtra
: *mut ULONG
,
204 RIDL
!{#[uuid(0xf338f437, 0xcb33, 0x4020, 0x9c, 0xab, 0xc7, 0x1f, 0xf9, 0xce, 0x12, 0xd3)]
205 interface
ISpSRAlternates2(ISpSRAlternates2Vtbl
): ISpSRAlternates(ISpSRAlternatesVtbl
) {
207 pAltRequest
: *mut SPPHRASEALTREQUEST
,
208 pcszNewText
: LPCWSTR
,
209 commitFlags
: SPCOMMITFLAGS
,
212 pub use um
::sapiddk51
::{_ISpPrivateEngineCall, _ISpPrivateEngineCallVtbl}
;
213 RIDL
!{#[uuid(0xdefd682a, 0xfe0a, 0x42b9, 0xbf, 0xa1, 0x56, 0xd3, 0xd6, 0xce, 0xcf, 0xaf)]
214 interface
ISpPrivateEngineCallEx(ISpPrivateEngineCallExVtbl
): IUnknown(IUnknownVtbl
) {
215 fn CallEngineSynchronize(
216 pInFrame
: *const c_void
,
217 ulInFrameSize
: ULONG
,
218 ppCoMemOutFrame
: *mut *mut c_void
,
219 pulOutFrameSize
: *mut ULONG
,
221 fn CallEngineImmediate(
222 pInFrame
: *const c_void
,
223 ulInFrameSize
: ULONG
,
224 ppCoMemOutFrame
: *mut *mut c_void
,
225 pulOutFrameSize
: *mut ULONG
,
228 pub use um
::sapiddk51
::{
231 CLSID_SpObjectTokenEnum
,
232 CLSID_SpPhraseBuilder
,
233 CLSID_SpITNProcessor
,
234 CLSID_SpGrammarCompiler
,
237 pub static CLSID_SpW3CGrammarCompiler
: CLSID
;
239 pub use um
::sapiddk51
::CLSID_SpGramCompBackend
;