Signed-off-by: Bernhard Kölbl besentv@gmail.com
-- v5: include: Add VoiceCommandSet runtimeclass with it's dependencies. include: Add Windows.Phone.PhoneContract api contract. widl: Add basic support for the [deprecated] attribute.
From: Bernhard Kölbl bkoelbl@codeweavers.com
Signed-off-by: Bernhard Kölbl bkoelbl@codeweavers.com --- tools/widl/attribute.c | 1 + tools/widl/parser.l | 1 + tools/widl/parser.y | 8 ++++++++ tools/widl/widltypes.h | 1 + 4 files changed, 11 insertions(+)
diff --git a/tools/widl/attribute.c b/tools/widl/attribute.c index b9aa99c9228..5ea13a01175 100644 --- a/tools/widl/attribute.c +++ b/tools/widl/attribute.c @@ -157,6 +157,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" }, /* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" }, /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "defaultvtable" }, + /* ATTR_DEPRECATED */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "deprecated" }, /* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" }, /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, NULL }, /* ATTR_DISPLAYBIND */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" }, diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 445efd2d458..afbdf7151f0 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -258,6 +258,7 @@ static void winrt_enable( int ns_prefix ) defaultcollelem { return tDEFAULTCOLLELEM; } defaultvalue { return tDEFAULTVALUE; } defaultvtable { return tDEFAULTVTABLE; } + deprecated { return token_winrt( tDEPRECATED, yytext, yylval ); } disable_consistency_check { return tDISABLECONSISTENCYCHECK; } displaybind { return tDISPLAYBIND; } dllname { return tDLLNAME; } diff --git a/tools/widl/parser.y b/tools/widl/parser.y index b802f75874d..d449a29c725 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -199,6 +199,7 @@ void pop_import( PARSER_LTYPE *yylloc ); %token tDEFAULTCOLLELEM %token tDEFAULTVALUE %token tDEFAULTVTABLE +%token tDEPRECATED %token tDISABLECONSISTENCYCHECK tDISPLAYBIND %token tDISPINTERFACE %token tDLLNAME tDONTFREE tDOUBLE tDUAL @@ -298,6 +299,7 @@ void pop_import( PARSER_LTYPE *yylloc ); %type <expr> static_attr %type <expr> activatable_attr %type <expr> composable_attr +%type <expr> deprecated_attr %type <type> delegatedef %type <stgclass> storage_cls_spec %type <type_qualifier> type_qualifier m_type_qual_list @@ -628,6 +630,11 @@ composable_attr } ;
+deprecated_attr + : aSTRING ',' aIDENTIFIER ',' contract_req + { $$ = make_expr3( EXPR_MEMBER, make_exprs( EXPR_STRLIT, $1 ), make_exprs( EXPR_IDENTIFIER, $1 ), $5 ); } + ; + attribute : %empty { $$ = NULL; } | tACTIVATABLE '(' activatable_attr ')' { $$ = attr_ptr( @$, ATTR_ACTIVATABLE, $3 ); } @@ -659,6 +666,7 @@ attribute | tDEFAULTCOLLELEM { $$ = attr_int( @$, ATTR_DEFAULTCOLLELEM, 0 ); } | tDEFAULTVALUE '(' expr_const ')' { $$ = attr_ptr( @$, ATTR_DEFAULTVALUE, $3 ); } | tDEFAULTVTABLE { $$ = attr_int( @$, ATTR_DEFAULTVTABLE, 0 ); } + | tDEPRECATED '(' deprecated_attr ')' { $$ = attr_ptr( @$, ATTR_DEPRECATED, $3 ); } | tDISABLECONSISTENCYCHECK { $$ = attr_int( @$, ATTR_DISABLECONSISTENCYCHECK, 0 ); } | tDISPLAYBIND { $$ = attr_int( @$, ATTR_DISPLAYBIND, 0 ); } | tDLLNAME '(' aSTRING ')' { $$ = attr_ptr( @$, ATTR_DLLNAME, $3 ); } diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index ad6a4e0b7ec..b92c8c15e68 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -96,6 +96,7 @@ enum attr_type ATTR_DEFAULTCOLLELEM, ATTR_DEFAULTVALUE, ATTR_DEFAULTVTABLE, + ATTR_DEPRECATED, ATTR_DISABLECONSISTENCYCHECK, ATTR_DISPINTERFACE, ATTR_DISPLAYBIND,
From: Bernhard Kölbl bkoelbl@codeweavers.com
--- include/windowscontracts.idl | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/windowscontracts.idl b/include/windowscontracts.idl index 5bcae48a5b5..46e1e3d0e1b 100644 --- a/include/windowscontracts.idl +++ b/include/windowscontracts.idl @@ -30,4 +30,9 @@ namespace Windows { apicontract UniversalApiContract {}; } + namespace Phone { + [contractversion(1)] + apicontract PhoneContract + {}; + } }
From: Bernhard Kölbl bkoelbl@codeweavers.com
--- include/windows.media.speechrecognition.idl | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl index 79107aab1bf..d098a83096d 100644 --- a/include/windows.media.speechrecognition.idl +++ b/include/windows.media.speechrecognition.idl @@ -60,6 +60,7 @@ namespace Windows { interface ISpeechRecognizerStatics2; interface ISpeechRecognizerTimeouts; interface ISpeechRecognizerUIOptions; + interface IVoiceCommandSet; runtimeclass SpeechContinuousRecognitionCompletedEventArgs; runtimeclass SpeechContinuousRecognitionResultGeneratedEventArgs; runtimeclass SpeechContinuousRecognitionSession; @@ -74,6 +75,7 @@ namespace Windows { runtimeclass SpeechRecognizerStateChangedEventArgs; runtimeclass SpeechRecognizerTimeouts; runtimeclass SpeechRecognizerUIOptions; + runtimeclass VoiceCommandSet; } } } @@ -471,6 +473,20 @@ namespace Windows { [propput] HRESULT ShowConfirmation([in] boolean value); }
+ [ + contract(Windows.Phone.PhoneContract, 1.0), + deprecated("Use Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinition instead of Windows.Media.SpeechRecognition.VoiceComandSet. For more info, see MSDN.", deprecate, Windows.Phone.PhoneContract, 1.0), + exclusiveto(Windows.Media.SpeechRecognition.VoiceCommandSet), + uuid(0bedda75-46e6-4b11-a088-5c68632899b5) + ] + interface IVoiceCommandSet : IInspectable + { + [deprecated("Use Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinition instead of Windows.Media.SpeechRecognition.VoiceComandSet. For more info, see MSDN.", deprecate, Windows.Phone.PhoneContract, 1.0), propget] HRESULT Language([out, retval] HSTRING* value); + [deprecated("Use Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinition instead of Windows.Media.SpeechRecognition.VoiceComandSet. For more info, see MSDN.", deprecate, Windows.Phone.PhoneContract, 1.0), propget] HRESULT Name([out, retval] HSTRING* value); + [deprecated("Use Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinition instead of Windows.Media.SpeechRecognition.VoiceComandSet. For more info, see MSDN.", deprecate, Windows.Phone.PhoneContract, 1.0)] + HRESULT SetPhraseListAsync([in] HSTRING phrase_list_name, [in] Windows.Foundation.Collections.IIterable<HSTRING>* phrase_list, [out, retval] Windows.Foundation.IAsyncAction** update_action); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -610,6 +626,16 @@ namespace Windows { { [default] interface Windows.Media.SpeechRecognition.ISpeechRecognizerUIOptions; } + + [ + contract(Windows.Phone.PhoneContract, 1.0), + deprecated("Use Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinition instead of Windows.Media.SpeechRecognition.VoiceComandSet. For more info, see MSDN.", deprecate, Windows.Phone.PhoneContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass VoiceCommandSet + { + [default] interface Windows.Media.SpeechRecognition.IVoiceCommandSet; + } } } }
On Wed Jul 5 14:44:42 2023 +0000, Bernhard Kölbl wrote:
changed this line in [version 5 of the diff](/wine/wine/-/merge_requests/383/diffs?diff_id=55710&start_sha=238487e56d58226def9789121ccc555ee9e1c277#eb0917fad53ec493b4bacfdbef6784eca9483b47_2137_2101)
Right, removed the header generation.