widl: Support referencing qualified interface names.

And split the dispinterface case, which is not supported in WinRT mode.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-02-08 09:30:48 +01:00 committed by Alexandre Julliard
parent 509daf4d23
commit 2bfcfcc0a9
2 changed files with 8 additions and 2 deletions

View File

@ -64,7 +64,7 @@ namespace Windows {
]
runtimeclass VoiceInformation
{
[default] interface IVoiceInformation;
[default] interface Windows.Media.SpeechSynthesis.IVoiceInformation;
}
}
}

View File

@ -282,6 +282,7 @@ static typelib_t *current_typelib;
%type <declspec> decl_spec unqualified_decl_spec decl_spec_no_type m_decl_spec_no_type
%type <type> inherit interface interfacedef
%type <type> interfaceref
%type <type> dispinterfaceref
%type <type> dispinterface dispinterfacedef
%type <type> module moduledef
%type <str> namespacedef
@ -926,6 +927,7 @@ class_interfaces: { $$ = NULL; }
class_interface:
m_attributes interfaceref ';' { $$ = make_ifref($2); $$->attrs = $1; }
| m_attributes dispinterfaceref ';' { $$ = make_ifref($2); $$->attrs = $1; }
;
dispinterface: tDISPINTERFACE typename { $$ = type_dispinterface_declare($2); }
@ -965,7 +967,11 @@ interfacedef: attributes interface inherit
interfaceref:
tINTERFACE typename { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
| tDISPINTERFACE typename { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
| tINTERFACE namespace_pfx typename { $$ = get_type(TYPE_INTERFACE, $3, $2, 0); }
;
dispinterfaceref:
tDISPINTERFACE typename { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
;
module: tMODULE typename { $$ = type_module_declare($2); }