Using #ifdef to selectively register runtimeclasses from the public IDLs isn't going to work out, this implements explicit class registration instead.
For now we are missing a possible useful check in widl to make sure the referenced class is defined, this will be added later on after all modules are made explicit.
-- v2: include: Remove now unnecessary registration ifdefs. wintypes: Register runtimeclasses explicitly. windows.storage: Register runtimeclasses explicitly. windows.storage.applicationdata: Register runtimeclasses explicitly. widl: Allow explicit registration by referencing runtimeclasses. widl: Keep track of statements source locations.
From: Rémi Bernon rbernon@codeweavers.com
--- tools/widl/parser.y | 141 +++++++++++++++++++++-------------------- tools/widl/widltypes.h | 1 + 2 files changed, 72 insertions(+), 70 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 91ac325be82..3111b401ea1 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -79,19 +79,19 @@ static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func);
static void check_async_uuid(type_t *iface);
-static statement_t *make_statement(enum statement_type type); -static statement_t *make_statement_type_decl(type_t *type); -static statement_t *make_statement_reference(type_t *type); -static statement_t *make_statement_declaration(var_t *var); -static statement_t *make_statement_library(typelib_t *typelib); -static statement_t *make_statement_pragma(const char *str); -static statement_t *make_statement_cppquote(const char *str); -static statement_t *make_statement_importlib(const char *str); -static statement_t *make_statement_module(type_t *type); -static statement_t *make_statement_typedef(var_list_t *names, bool is_defined); -static statement_t *make_statement_import(const char *str); -static statement_t *make_statement_parameterized_type(type_t *type, typeref_list_t *params); -static statement_t *make_statement_delegate(type_t *ret, var_list_t *args); +static statement_t *make_statement( struct location where, enum statement_type type ); +static statement_t *make_statement_type_decl( struct location where, type_t *type ); +static statement_t *make_statement_reference( struct location where, type_t *type ); +static statement_t *make_statement_declaration( struct location where, var_t *var ); +static statement_t *make_statement_library( struct location where, typelib_t *typelib ); +static statement_t *make_statement_pragma( struct location where, const char *str ); +static statement_t *make_statement_cppquote( struct location where, const char *str ); +static statement_t *make_statement_importlib( struct location where, const char *str ); +static statement_t *make_statement_module( struct location where, type_t *type ); +static statement_t *make_statement_typedef( struct location where, var_list_t *names, bool is_defined ); +static statement_t *make_statement_import( struct location where, const char *str ); +static statement_t *make_statement_parameterized_type( struct location where, type_t *type, typeref_list_t *params ); +static statement_t *make_statement_delegate( struct location where, type_t *ret, var_list_t *args ); static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt); static statement_list_t *append_statements(statement_list_t *, statement_list_t *);
@@ -394,8 +394,8 @@ m_acf decl_statements : %empty { $$ = NULL; } | decl_statements tINTERFACE qualified_type '<' parameterized_type_args '>' ';' - { parameterized_type_stmts = append_statement(parameterized_type_stmts, make_statement_parameterized_type($3, $5)); - $$ = append_statement($1, make_statement_reference(type_parameterized_type_specialize_declare($3, $5))); + { parameterized_type_stmts = append_statement(parameterized_type_stmts, make_statement_parameterized_type( @$, $3, $5 )); + $$ = append_statement($1, make_statement_reference( @$, type_parameterized_type_specialize_declare($3, $5) )); } ;
@@ -405,7 +405,7 @@ decl_block: tDECLARE '{' decl_statements '}' { $$ = $3; } imp_decl_statements : %empty { $$ = NULL; } | imp_decl_statements tINTERFACE qualified_type '<' parameterized_type_args '>' ';' - { $$ = append_statement($1, make_statement_reference(type_parameterized_type_specialize_declare($3, $5))); } + { $$ = append_statement($1, make_statement_reference( @$, type_parameterized_type_specialize_declare($3, $5) )); } ;
imp_decl_block @@ -416,50 +416,50 @@ gbl_statements : %empty { $$ = NULL; } | gbl_statements namespacedef '{' { push_namespaces($2); } gbl_statements '}' { pop_namespaces($2); $$ = append_statements($1, $5); } - | gbl_statements interface ';' { $$ = append_statement($1, make_statement_reference($2)); } - | gbl_statements dispinterface ';' { $$ = append_statement($1, make_statement_reference($2)); } - | gbl_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } - | gbl_statements delegatedef { $$ = append_statement($1, make_statement_type_decl($2)); } + | gbl_statements interface ';' { $$ = append_statement($1, make_statement_reference( @$, $2 )); } + | gbl_statements dispinterface ';' { $$ = append_statement($1, make_statement_reference( @$, $2 )); } + | gbl_statements interfacedef { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); } + | gbl_statements delegatedef { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); } | gbl_statements coclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } - | gbl_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2)); + | gbl_statements coclassdef { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } | gbl_statements apicontract ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } - | gbl_statements apicontract_def { $$ = append_statement($1, make_statement_type_decl($2)); + | gbl_statements apicontract_def { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } | gbl_statements runtimeclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } - | gbl_statements runtimeclass_def { $$ = append_statement($1, make_statement_type_decl($2)); + | gbl_statements runtimeclass_def { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } - | gbl_statements moduledef { $$ = append_statement($1, make_statement_module($2)); } - | gbl_statements librarydef { $$ = append_statement($1, make_statement_library($2)); } + | gbl_statements moduledef { $$ = append_statement($1, make_statement_module( @$, $2 )); } + | gbl_statements librarydef { $$ = append_statement($1, make_statement_library( @$, $2 )); } | gbl_statements statement { $$ = append_statement($1, $2); } | gbl_statements decl_block { $$ = append_statements($1, $2); } ;
imp_statements : %empty { $$ = NULL; } - | imp_statements interface ';' { $$ = append_statement($1, make_statement_reference($2)); } - | imp_statements dispinterface ';' { $$ = append_statement($1, make_statement_reference($2)); } + | imp_statements interface ';' { $$ = append_statement($1, make_statement_reference( @$, $2 )); } + | imp_statements dispinterface ';' { $$ = append_statement($1, make_statement_reference( @$, $2 )); } | imp_statements namespacedef '{' { push_namespaces($2); } imp_statements '}' { pop_namespaces($2); $$ = append_statements($1, $5); } - | imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } - | imp_statements delegatedef { $$ = append_statement($1, make_statement_type_decl($2)); } + | imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); } + | imp_statements delegatedef { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); } | imp_statements coclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } - | imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2)); + | imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } | imp_statements apicontract ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } - | imp_statements apicontract_def { $$ = append_statement($1, make_statement_type_decl($2)); + | imp_statements apicontract_def { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } | imp_statements runtimeclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } - | imp_statements runtimeclass_def { $$ = append_statement($1, make_statement_type_decl($2)); + | imp_statements runtimeclass_def { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } - | imp_statements moduledef { $$ = append_statement($1, make_statement_module($2)); } + | imp_statements moduledef { $$ = append_statement($1, make_statement_module( @$, $2 )); } | imp_statements statement { $$ = append_statement($1, $2); } - | imp_statements importlib { $$ = append_statement($1, make_statement_importlib($2)); } - | imp_statements librarydef { $$ = append_statement($1, make_statement_library($2)); } + | imp_statements importlib { $$ = append_statement($1, make_statement_importlib( @$, $2 )); } + | imp_statements librarydef { $$ = append_statement($1, make_statement_library( @$, $2 )); } | imp_statements imp_decl_block { $$ = append_statements($1, $2); } ;
@@ -474,12 +474,12 @@ semicolon_opt ;
statement: - cppquote { $$ = make_statement_cppquote($1); } - | typedecl ';' { $$ = make_statement_type_decl($1); } - | declaration ';' { $$ = make_statement_declaration($1); } - | import { $$ = make_statement_import($1); } + cppquote { $$ = make_statement_cppquote( @$, $1 ); } + | typedecl ';' { $$ = make_statement_type_decl( @$, $1 ); } + | declaration ';' { $$ = make_statement_declaration( @$, $1 ); } + | import { $$ = make_statement_import( @$, $1 ); } | typedef ';' { $$ = $1; } - | aPRAGMA { $$ = make_statement_pragma($1); } + | aPRAGMA { $$ = make_statement_pragma( @$, $1 ); } | pragma_warning { $$ = NULL; } ;
@@ -1124,13 +1124,13 @@ interface:
delegatedef: m_attributes tDELEGATE type ident '(' m_args ')' semicolon_opt { $$ = type_delegate_declare($4->name, current_namespace); - $$ = type_delegate_define($$, $1, append_statement(NULL, make_statement_delegate($3, $6)), &@4); + $$ = type_delegate_define($$, $1, append_statement(NULL, make_statement_delegate( @$, $3, $6 )), &@4); } | m_attributes tDELEGATE type ident '<' { push_parameters_namespace($4->name); } type_parameters '>' '(' m_args ')' { pop_parameters_namespace($4->name); } semicolon_opt { $$ = type_parameterized_delegate_declare($4->name, current_namespace, $7); - $$ = type_parameterized_delegate_define($$, $1, append_statement(NULL, make_statement_delegate($3, $10)), &@4); + $$ = type_parameterized_delegate_define($$, $1, append_statement(NULL, make_statement_delegate( @$, $3, $10 )), &@4); } ;
@@ -1376,7 +1376,7 @@ type: typedef: m_attributes tTYPEDEF m_attributes decl_spec declarator_list { $1 = append_attribs($1, $3); reg_typedefs( @$, $4, $5, check_typedef_attrs( $1 ) ); - $$ = make_statement_typedef($5, $4->type->defined && !$4->type->defined_in_import); + $$ = make_statement_typedef( @$, $5, $4->type->defined && !$4->type->defined_in_import ); } ;
@@ -2880,13 +2880,13 @@ static void check_async_uuid(type_t *iface) begin_func->declspec.type = type_new_function(begin_args); begin_func->declspec.type->attrs = func->attrs; begin_func->declspec.type->details.function->retval = func->declspec.type->details.function->retval; - stmts = append_statement(stmts, make_statement_declaration(begin_func)); + stmts = append_statement(stmts, make_statement_declaration( stmt->where, begin_func ));
finish_func = copy_var(func, strmake("Finish_%s", func->name), NULL); finish_func->declspec.type = type_new_function(finish_args); finish_func->declspec.type->attrs = func->attrs; finish_func->declspec.type->details.function->retval = func->declspec.type->details.function->retval; - stmts = append_statement(stmts, make_statement_declaration(finish_func)); + stmts = append_statement(stmts, make_statement_declaration( stmt->where, finish_func )); }
type_interface_define(async_iface, map_attrs(iface->attrs, async_iface_attrs), inherit, stmts, NULL, &iface->where); @@ -3073,31 +3073,32 @@ static void check_all_user_types(const statement_list_t *stmts) } }
-static statement_t *make_statement(enum statement_type type) +static statement_t *make_statement( struct location where, enum statement_type type ) { statement_t *stmt = xmalloc(sizeof(*stmt)); stmt->type = type; + stmt->where = where; return stmt; }
-static statement_t *make_statement_type_decl(type_t *type) +static statement_t *make_statement_type_decl( struct location where, type_t *type ) { - statement_t *stmt = make_statement(STMT_TYPE); + statement_t *stmt = make_statement( where, STMT_TYPE ); stmt->u.type = type; stmt->is_defined = type->defined && !type->defined_in_import; return stmt; }
-static statement_t *make_statement_reference(type_t *type) +static statement_t *make_statement_reference( struct location where, type_t *type ) { - statement_t *stmt = make_statement(STMT_TYPEREF); + statement_t *stmt = make_statement( where, STMT_TYPEREF ); stmt->u.type = type; return stmt; }
-static statement_t *make_statement_declaration(var_t *var) +static statement_t *make_statement_declaration( struct location where, var_t *var ) { - statement_t *stmt = make_statement(STMT_DECLARATION); + statement_t *stmt = make_statement( where, STMT_DECLARATION ); stmt->u.var = var; if (var->declspec.stgclass == STG_EXTERN && var->eval) warning("'%s' initialised and declared extern\n", var->name); @@ -3113,56 +3114,56 @@ static statement_t *make_statement_declaration(var_t *var) return stmt; }
-static statement_t *make_statement_library(typelib_t *typelib) +static statement_t *make_statement_library( struct location where, typelib_t *typelib ) { - statement_t *stmt = make_statement(STMT_LIBRARY); + statement_t *stmt = make_statement( where, STMT_LIBRARY ); stmt->u.lib = typelib; return stmt; }
-static statement_t *make_statement_pragma(const char *str) +static statement_t *make_statement_pragma( struct location where, const char *str ) { - statement_t *stmt = make_statement(STMT_PRAGMA); + statement_t *stmt = make_statement( where, STMT_PRAGMA ); stmt->u.str = str; return stmt; }
-static statement_t *make_statement_cppquote(const char *str) +static statement_t *make_statement_cppquote( struct location where, const char *str ) { - statement_t *stmt = make_statement(STMT_CPPQUOTE); + statement_t *stmt = make_statement( where, STMT_CPPQUOTE ); stmt->u.str = str; return stmt; }
-static statement_t *make_statement_importlib(const char *str) +static statement_t *make_statement_importlib( struct location where, const char *str ) { - statement_t *stmt = make_statement(STMT_IMPORTLIB); + statement_t *stmt = make_statement( where, STMT_IMPORTLIB ); stmt->u.str = str; return stmt; }
-static statement_t *make_statement_import(const char *str) +static statement_t *make_statement_import( struct location where, const char *str ) { - statement_t *stmt = make_statement(STMT_IMPORT); + statement_t *stmt = make_statement( where, STMT_IMPORT ); stmt->u.str = str; return stmt; }
-static statement_t *make_statement_module(type_t *type) +static statement_t *make_statement_module( struct location where, type_t *type ) { - statement_t *stmt = make_statement(STMT_MODULE); + statement_t *stmt = make_statement( where, STMT_MODULE ); stmt->u.type = type; return stmt; }
-static statement_t *make_statement_typedef(declarator_list_t *decls, bool is_defined) +static statement_t *make_statement_typedef( struct location where, declarator_list_t *decls, bool is_defined ) { declarator_t *decl, *next; statement_t *stmt;
if (!decls) return NULL;
- stmt = make_statement(STMT_TYPEDEF); + stmt = make_statement( where, STMT_TYPEDEF ); stmt->u.type_list = NULL; stmt->is_defined = is_defined;
@@ -3178,19 +3179,19 @@ static statement_t *make_statement_typedef(declarator_list_t *decls, bool is_def return stmt; }
-static statement_t *make_statement_parameterized_type(type_t *type, typeref_list_t *params) +static statement_t *make_statement_parameterized_type( struct location where, type_t *type, typeref_list_t *params ) { - statement_t *stmt = make_statement(STMT_TYPE); + statement_t *stmt = make_statement( where, STMT_TYPE ); stmt->u.type = type_parameterized_type_specialize_partial(type, params); return stmt; }
-static statement_t *make_statement_delegate(type_t *ret, var_list_t *args) +static statement_t *make_statement_delegate( struct location where, type_t *ret, var_list_t *args ) { declarator_t *decl = make_declarator(make_var(xstrdup("Invoke"))); decl_spec_t *spec = make_decl_spec(ret, NULL, NULL, STG_NONE, 0, 0); append_chain_type(decl, type_new_function(args), 0); - return make_statement_declaration(declare_var(NULL, spec, decl, FALSE)); + return make_statement_declaration( where, declare_var( NULL, spec, decl, FALSE ) ); }
static statement_list_t *append_statements(statement_list_t *l1, statement_list_t *l2) diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 35a9bbafa95..aaa9cb67378 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -645,6 +645,7 @@ struct _user_type_t { struct _statement_t { struct list entry; enum statement_type type; + struct location where; union { type_t *type;
From: Rémi Bernon rbernon@codeweavers.com
--- tools/widl/parser.y | 3 ++- tools/widl/register.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 3111b401ea1..e57b1412a80 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -429,7 +429,8 @@ gbl_statements | gbl_statements apicontract ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } | gbl_statements apicontract_def { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } - | gbl_statements runtimeclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); } + | gbl_statements runtimeclass ';' { $$ = append_statement($1, make_statement_reference( @$, $2 )); + reg_type($2, $2->name, current_namespace, 0); } | gbl_statements runtimeclass_def { $$ = append_statement($1, make_statement_type_decl( @$, $2 )); reg_type($2, $2->name, current_namespace, 0); } | gbl_statements moduledef { $$ = append_statement($1, make_statement_module( @$, $2 )); } diff --git a/tools/widl/register.c b/tools/widl/register.c index 9ad0314d2da..7e142b5e4f1 100644 --- a/tools/widl/register.c +++ b/tools/widl/register.c @@ -194,7 +194,8 @@ static void write_runtimeclasses_registry( const statement_list_t *stmts )
if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) { - if (stmt->type != STMT_TYPE) continue; + if (stmt->type != STMT_TYPE && stmt->type != STMT_TYPEREF) continue; + if (stmt->type == STMT_TYPEREF && strcmp( stmt->where.input_name, input_name )) continue; /* ignore #included statements */ if (type_get_type((type = stmt->u.type)) != TYPE_RUNTIMECLASS) continue; if (!get_attrp(type->attrs, ATTR_ACTIVATABLE) && !get_attrp(type->attrs, ATTR_STATIC)) continue; put_str( indent, "ForceRemove %s\n", format_namespace( type->namespace, "", ".", type->name, NULL ) );
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/windows.storage.applicationdata/classes.idl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/windows.storage.applicationdata/classes.idl b/dlls/windows.storage.applicationdata/classes.idl index 8b926c63e10..6029ac1ff10 100644 --- a/dlls/windows.storage.applicationdata/classes.idl +++ b/dlls/windows.storage.applicationdata/classes.idl @@ -19,6 +19,10 @@ */
#pragma makedep register +#pragma winrt ns_prefix
-#define _WINDOWS_APPLICATIONDATA -#include "windows.storage.idl" +import "windows.storage.idl"; + +namespace Windows.Storage { + runtimeclass ApplicationData; +}
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/windows.storage/classes.idl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/windows.storage/classes.idl b/dlls/windows.storage/classes.idl index c77d7ec9ebb..d64d1c45ec8 100644 --- a/dlls/windows.storage/classes.idl +++ b/dlls/windows.storage/classes.idl @@ -19,10 +19,7 @@ */
#pragma makedep register - -#ifdef __WIDL__ #pragma winrt ns_prefix -#endif
import "inspectable.idl"; import "asyncinfo.idl"; @@ -30,10 +27,8 @@ import "eventtoken.idl"; import "windows.foundation.idl"; import "windowscontracts.idl"; import "windows.system.idl"; +import "windows.storage.idl";
-#define _WINDOWS_STORAGE -#define DO_NO_IMPORTS -#include "windows.storage.fileproperties.idl" -#include "windows.storage.search.idl" -#include "windows.storage.streams.idl" -#include "windows.storage.idl" +namespace Windows.Storage.Streams { + runtimeclass RandomAccessStreamReference; +}
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/wintypes/classes.idl | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/dlls/wintypes/classes.idl b/dlls/wintypes/classes.idl index 648eafddc16..139b25b2f85 100644 --- a/dlls/wintypes/classes.idl +++ b/dlls/wintypes/classes.idl @@ -19,13 +19,22 @@ */
#pragma makedep register - -#ifdef __WIDL__ #pragma winrt ns_prefix -#endif
-#define DO_NO_IMPORTS -#define _WINTYPES -#include "windows.foundation.idl" -#include "windows.foundation.metadata.idl" -#include "windows.storage.streams.idl" +import "windows.foundation.idl"; +import "windows.foundation.metadata.idl"; +import "windows.storage.streams.idl"; + +namespace Windows.Foundation { + runtimeclass PropertyValue; +} +namespace Windows.Foundation.Collections { + runtimeclass PropertySet; +} +namespace Windows.Foundation.Metadata { + runtimeclass ApiInformation; +} +namespace Windows.Storage.Streams { + runtimeclass Buffer; + runtimeclass DataWriter; +}
From: Rémi Bernon rbernon@codeweavers.com
--- include/windows.foundation.idl | 12 ------------ include/windows.storage.streams.idl | 10 ---------- 2 files changed, 22 deletions(-)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl index d6b96175b2d..f4c1ea2800e 100644 --- a/include/windows.foundation.idl +++ b/include/windows.foundation.idl @@ -125,22 +125,16 @@ namespace Windows.Foundation { interface Windows.Foundation.Collections.IIterable<HSTRING>; interface Windows.Foundation.Collections.IIterable<IInspectable *>; interface Windows.Foundation.Collections.IIterable<IWwwFormUrlDecoderEntry *>; -#ifndef _WINTYPES interface Windows.Foundation.Collections.IIterable<Uri *>; -#endif interface Windows.Foundation.Collections.IIterator<HSTRING>; interface Windows.Foundation.Collections.IIterator<IInspectable *>; interface Windows.Foundation.Collections.IIterator<IWwwFormUrlDecoderEntry *>; -#ifndef _WINTYPES interface Windows.Foundation.Collections.IIterator<Uri *>; -#endif interface Windows.Foundation.Collections.IVectorView<BYTE>; interface Windows.Foundation.Collections.IVectorView<HSTRING>; interface Windows.Foundation.Collections.IVectorView<IInspectable *>; interface Windows.Foundation.Collections.IVectorView<IWwwFormUrlDecoderEntry *>; -#ifndef _WINTYPES interface Windows.Foundation.Collections.IVectorView<Windows.Foundation.Uri *>; -#endif interface Windows.Foundation.Collections.IVector<HSTRING>; interface Windows.Foundation.Collections.IVector<IInspectable *>; interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING> *>; @@ -150,18 +144,14 @@ namespace Windows.Foundation { interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>; interface Windows.Foundation.AsyncOperationCompletedHandler<HSTRING>; interface Windows.Foundation.AsyncOperationCompletedHandler<UINT32>; -#ifndef _WINTYPES interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Uri *>; -#endif interface Windows.Foundation.AsyncOperationProgressHandler<UINT32, UINT32>; interface Windows.Foundation.AsyncOperationWithProgressCompletedHandler<UINT32, UINT32>; interface Windows.Foundation.IAsyncOperation<HSTRING>; interface Windows.Foundation.IAsyncOperation<IInspectable *>; interface Windows.Foundation.IAsyncOperation<boolean>; interface Windows.Foundation.IAsyncOperation<UINT32>; -#ifndef _WINTYPES interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Uri *>; -#endif interface Windows.Foundation.IAsyncOperationWithProgress<UINT32, UINT32>; interface Windows.Foundation.IReference<BYTE>; interface Windows.Foundation.IReference<DOUBLE>; @@ -588,7 +578,6 @@ namespace Windows.Foundation { { }
-#ifndef _WINTYPES [ activatable(Windows.Foundation.IUriRuntimeClassFactory, Windows.Foundation.UniversalApiContract, 1.0), contract(Windows.Foundation.UniversalApiContract, 1.0), @@ -615,7 +604,6 @@ namespace Windows.Foundation { interface Windows.Foundation.Collections.IVectorView<Windows.Foundation.IWwwFormUrlDecoderEntry *>; interface Windows.Foundation.Collections.IIterable<Windows.Foundation.IWwwFormUrlDecoderEntry *>; } -#endif
[ contract(Windows.Foundation.UniversalApiContract, 1.0), diff --git a/include/windows.storage.streams.idl b/include/windows.storage.streams.idl index 35340895215..3ef6254c0ec 100644 --- a/include/windows.storage.streams.idl +++ b/include/windows.storage.streams.idl @@ -50,18 +50,15 @@ namespace Windows.Storage.Streams { runtimeclass Buffer; runtimeclass DataWriter; runtimeclass DataWriterStoreOperation; -#ifndef _WINTYPES runtimeclass InMemoryRandomAccessStream; runtimeclass RandomAccessStream; runtimeclass RandomAccessStreamReference; -#endif
declare { interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.Streams.IBuffer *>; interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.Streams.IOutputStream *>; interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer *>; interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IOutputStream *>; -#ifndef _WINTYPES interface Windows.Foundation.Collections.IIterable<Windows.Storage.Streams.IRandomAccessStream *>; interface Windows.Foundation.Collections.IIterator<Windows.Storage.Streams.IRandomAccessStream *>; interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Storage.Streams.RandomAccessStreamReference *>; @@ -81,7 +78,6 @@ namespace Windows.Storage.Streams { interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStreamWithContentType *>; interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.RandomAccessStreamReference *>; interface Windows.Foundation.IAsyncOperationWithProgress<UINT64,UINT64>; -#endif }
[ @@ -198,7 +194,6 @@ namespace Windows.Storage.Streams { HRESULT FlushAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean> **operation); }
-#ifndef _WINTYPES [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Storage.Streams.RandomAccessStream), @@ -270,9 +265,7 @@ namespace Windows.Storage.Streams { Windows.Storage.Streams.IContentTypeProvider { } -#endif
-#ifndef _WINDOWS_STORAGE [ activatable(Windows.Storage.Streams.IBufferFactory, Windows.Foundation.UniversalApiContract, 1.0), contract(Windows.Foundation.UniversalApiContract, 1.0), @@ -306,9 +299,7 @@ namespace Windows.Storage.Streams { { [default] interface Windows.Foundation.IAsyncOperation<UINT32>; } -#endif
-#ifndef _WINTYPES [ activatable(Windows.Foundation.UniversalApiContract, 1.0), contract(Windows.Foundation.UniversalApiContract, 1.0), @@ -340,6 +331,5 @@ namespace Windows.Storage.Streams { { [default] interface Windows.Storage.Streams.IRandomAccessStreamReference; } -#endif
}
v2: Keep track of statements origin and register runtimeclasses which are directly referenced, not those coming from `#include` as we still have some in various modules.
This merge request was approved by Huw Davies.