mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Updated widl-winrt-support patchset
This commit is contained in:
parent
909415c8d0
commit
760b2fbc35
@ -1,4 +1,4 @@
|
||||
From 28aeb185f875c4668ff26c8896863742e49e8bcd Mon Sep 17 00:00:00 2001
|
||||
From 11edca0fcedec43e65b46fb83369ae5c132830d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Wed, 23 Sep 2020 19:23:45 +0200
|
||||
Subject: [PATCH] include: Add windows.media.speechsynthesis.idl draft.
|
||||
@ -10,10 +10,10 @@ Subject: [PATCH] include: Add windows.media.speechsynthesis.idl draft.
|
||||
create mode 100644 include/windows.media.speechsynthesis.idl
|
||||
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index a84e44998cc..1028ebcb3e4 100644
|
||||
index 74a1d8e0c89..096fb4554e5 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -743,6 +743,7 @@ SOURCES = \
|
||||
@@ -745,6 +745,7 @@ SOURCES = \
|
||||
windef.h \
|
||||
windns.h \
|
||||
windows.foundation.idl \
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5711afaf5c3b751c66f5f2b309b7dcc0f5dc7086 Mon Sep 17 00:00:00 2001
|
||||
From 2b18a86a118e0db756742e0030c08d093458c8fe Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 12 Oct 2020 20:34:28 +0200
|
||||
Subject: [PATCH] widl: Support WinRT marshaling_behavior attribute parsing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 017c4d1e286ea57eaa1cb89d401704ae3155545d Mon Sep 17 00:00:00 2001
|
||||
From 7c1a17a13dce8da80f97defd5f4caef61c2f9ce3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 11:35:49 +0200
|
||||
Subject: [PATCH] widl: Support WinRT mta threading attribute parsing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e9ad63c63f1d364ef4e049c3021e559e1c79383e Mon Sep 17 00:00:00 2001
|
||||
From 25fe11311b4f20a900d4b001a051c17a980d0b75 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 00:11:08 +0200
|
||||
Subject: [PATCH] widl: Support WinRT exclusiveto attribute parsing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 02e1c811eca9385791b013452394fadc6aa1f08a Mon Sep 17 00:00:00 2001
|
||||
From b44446b4cb028670ebc371a7c7f3bb5eef05c7c3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 20 Nov 2020 11:06:18 +0100
|
||||
Subject: [PATCH] widl: Support WinRT runtimeclass type.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 48d82198138c3523b551d00afae967062e04a1bd Mon Sep 17 00:00:00 2001
|
||||
From 0b5447c4b3f89a00c295acdd124f532550079b4c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 1 Oct 2020 20:10:02 +0200
|
||||
Subject: [PATCH] widl: Support WinRT eventadd/eventremove attributes.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4f57bc2b14ec1007b631a5ff4c13c2590c6dffaa Mon Sep 17 00:00:00 2001
|
||||
From 025a89076222bff7f5abb7c1c8992c93eaf92be6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 12 Oct 2020 18:02:59 +0200
|
||||
Subject: [PATCH] widl: Support WinRT flags attribute parsing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From eef393b9065d80ed648e651f37122ca6b85eaeb7 Mon Sep 17 00:00:00 2001
|
||||
From 82858b36352aac56942221757ed5ecf9bc40e42b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 25 Sep 2020 17:13:47 +0200
|
||||
Subject: [PATCH] widl: Support using qualified names for interfaces.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6b4c1d42dcf5cf3125f0cb9b5f413d41f4b42dcc Mon Sep 17 00:00:00 2001
|
||||
From d8ed7fe746a0ae8506683ea7aeadfb33ac6e0fa3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 14:30:32 +0200
|
||||
Subject: [PATCH] widl: Support WinRT static attribute parsing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5c6a83997b1125ab3800a6f38ff984e6bbd0e8b8 Mon Sep 17 00:00:00 2001
|
||||
From 191aa18a3ce42474ef07e81132247b9f388bbc82 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 00:31:57 +0200
|
||||
Subject: [PATCH] widl: Support WinRT requires keyword.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b61b29f1d1eb924346e8c05af9c6cce7eb961b69 Mon Sep 17 00:00:00 2001
|
||||
From 05b4b34e57597d00a0d80d2247356ee5ba05db95 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 11:35:29 +0200
|
||||
Subject: [PATCH] widl: Support WinRT activatable attribute.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cae5cc34cb1852e38d6f1e20663fbfc92e6d90d2 Mon Sep 17 00:00:00 2001
|
||||
From 9c28d7140282cb09d7cc37f6b16d88789b49285f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 13 Oct 2020 16:31:16 +0200
|
||||
Subject: [PATCH] widl: Support WinRT parameterized type parsing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 68867c961b01c85c26d37809e7791f4ecc2eed12 Mon Sep 17 00:00:00 2001
|
||||
From cbc4c4a9c0c7c1fc5c99fe665494e58008d67fc7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 1 Dec 2020 14:41:01 +0100
|
||||
Subject: [PATCH] widl: Introduce new strappend helper.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d05826e88b00d743e8692c9c6cf90fb54a5bd661 Mon Sep 17 00:00:00 2001
|
||||
From 5d655b453867b46faf2fda420d08cad412b50729 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 12 Oct 2020 23:23:18 +0200
|
||||
Subject: [PATCH] widl: Support partially specialized parameterized type.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ebb2a57af572a80547cd60580c37aa403189183b Mon Sep 17 00:00:00 2001
|
||||
From 798ecb14bb4856d1bee11f97ab98158d81b9b504 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 1 Dec 2020 17:34:23 +0100
|
||||
Subject: [PATCH] widl: Support WinRT parameterized interface type.
|
||||
|
@ -1,19 +1,19 @@
|
||||
From e5a6a7504ff3fd5cbc557b3bdcbc07d1932da570 Mon Sep 17 00:00:00 2001
|
||||
From 2226e8730b2a9a5170c34260448a16a2080ddf91 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 24 Sep 2020 00:00:54 +0200
|
||||
Subject: [PATCH] widl: Support WinRT delegate type.
|
||||
|
||||
---
|
||||
tools/widl/expr.c | 1 +
|
||||
tools/widl/header.c | 14 ++++++++++----
|
||||
tools/widl/header.c | 16 +++++++++++-----
|
||||
tools/widl/parser.l | 1 +
|
||||
tools/widl/parser.y | 25 +++++++++++++++++++++++++
|
||||
tools/widl/typegen.c | 4 ++++
|
||||
tools/widl/typelib.c | 1 +
|
||||
tools/widl/typetree.c | 29 +++++++++++++++++++++++++++++
|
||||
tools/widl/typetree.c | 30 ++++++++++++++++++++++++++++++
|
||||
tools/widl/typetree.h | 9 +++++++++
|
||||
tools/widl/widltypes.h | 7 +++++++
|
||||
9 files changed, 87 insertions(+), 4 deletions(-)
|
||||
9 files changed, 89 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tools/widl/expr.c b/tools/widl/expr.c
|
||||
index c83e9aa5ec0..88d59290d6b 100644
|
||||
@ -28,7 +28,7 @@ index c83e9aa5ec0..88d59290d6b 100644
|
||||
break;
|
||||
case TYPE_ALIAS:
|
||||
diff --git a/tools/widl/header.c b/tools/widl/header.c
|
||||
index d607df5d1c9..bde58b55472 100644
|
||||
index d607df5d1c9..37e96a8dcbe 100644
|
||||
--- a/tools/widl/header.c
|
||||
+++ b/tools/widl/header.c
|
||||
@@ -483,6 +483,9 @@ void write_type_left(FILE *h, const decl_spec_t *ds, enum name_type name_type, i
|
||||
@ -49,6 +49,15 @@ index d607df5d1c9..bde58b55472 100644
|
||||
break;
|
||||
case TYPE_APICONTRACT:
|
||||
case TYPE_PARAMETERIZED_TYPE:
|
||||
@@ -987,7 +991,7 @@ int has_out_arg_or_return(const var_t *func)
|
||||
int is_object(const type_t *iface)
|
||||
{
|
||||
const attr_t *attr;
|
||||
- if (type_is_defined(iface) && type_iface_get_inherit(iface))
|
||||
+ if (type_is_defined(iface) && (type_get_type(iface) == TYPE_DELEGATE || type_iface_get_inherit(iface)))
|
||||
return 1;
|
||||
if (iface->attrs) LIST_FOR_EACH_ENTRY( attr, iface->attrs, const attr_t, entry )
|
||||
if (attr->type == ATTR_OBJECT || attr->type == ATTR_ODL) return 1;
|
||||
@@ -1904,9 +1908,10 @@ static void write_forward_decls(FILE *header, const statement_list_t *stmts)
|
||||
switch (stmt->type)
|
||||
{
|
||||
@ -222,24 +231,25 @@ index 6f6c5f3ccc8..8b2a2401367 100644
|
||||
|
||||
case TYPE_VOID:
|
||||
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
|
||||
index a9a1ab390e8..dd870fb964b 100644
|
||||
index a9a1ab390e8..89ebc0b5999 100644
|
||||
--- a/tools/widl/typetree.c
|
||||
+++ b/tools/widl/typetree.c
|
||||
@@ -509,6 +509,13 @@ static unsigned int compute_method_indexes(type_t *iface)
|
||||
@@ -509,6 +509,14 @@ static unsigned int compute_method_indexes(type_t *iface)
|
||||
return idx;
|
||||
}
|
||||
|
||||
+static void compute_delegate_iface_name(type_t *delegate)
|
||||
+static void compute_delegate_iface_names(type_t *delegate)
|
||||
+{
|
||||
+ char *name = xmalloc(strlen(delegate->name) + 2);
|
||||
+ sprintf(name, "I%s", delegate->name);
|
||||
+ delegate->details.delegate.iface->name = name;
|
||||
+ type_t *iface = delegate->details.delegate.iface;
|
||||
+ iface->namespace = delegate->namespace;
|
||||
+ iface->name = strmake("I%s", delegate->name);
|
||||
+ iface->c_name = format_namespace(delegate->namespace, "__x_", "_C", iface->name, use_abi_namespace ? "ABI" : NULL);
|
||||
+}
|
||||
+
|
||||
static type_t *replace_type_parameters_in_type(type_t *type, type_list_t *orig, type_list_t *repl);
|
||||
|
||||
static type_list_t *replace_type_parameters_in_type_list(type_list_t *type_list, type_list_t *orig, type_list_t *repl)
|
||||
@@ -621,6 +628,7 @@ static type_t *replace_type_parameters_in_type(type_t *type, type_list_t *orig,
|
||||
@@ -621,6 +629,7 @@ static type_t *replace_type_parameters_in_type(type_t *type, type_list_t *orig,
|
||||
case TYPE_BITFIELD:
|
||||
case TYPE_INTERFACE:
|
||||
case TYPE_RUNTIMECLASS:
|
||||
@ -247,7 +257,7 @@ index a9a1ab390e8..dd870fb964b 100644
|
||||
return type;
|
||||
case TYPE_PARAMETER:
|
||||
for (o = orig, r = repl; o && r; o = o->next, r = r->next)
|
||||
@@ -764,6 +772,27 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm
|
||||
@@ -764,6 +773,27 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm
|
||||
compute_method_indexes(iface);
|
||||
}
|
||||
|
||||
@ -255,7 +265,6 @@ index a9a1ab390e8..dd870fb964b 100644
|
||||
+{
|
||||
+ type_t *iface = make_type(TYPE_INTERFACE);
|
||||
+
|
||||
+ iface->namespace = delegate->namespace;
|
||||
+ iface->details.iface = xmalloc(sizeof(*iface->details.iface));
|
||||
+ iface->details.iface->disp_props = NULL;
|
||||
+ iface->details.iface->disp_methods = NULL;
|
||||
@ -266,10 +275,11 @@ index a9a1ab390e8..dd870fb964b 100644
|
||||
+ iface->details.iface->async_iface = NULL;
|
||||
+ iface->details.iface->requires = NULL;
|
||||
+ iface->defined = TRUE;
|
||||
+ iface->attrs = delegate->attrs;
|
||||
+ compute_method_indexes(iface);
|
||||
+
|
||||
+ delegate->details.delegate.iface = iface;
|
||||
+ compute_delegate_iface_name(delegate);
|
||||
+ compute_delegate_iface_names(delegate);
|
||||
+}
|
||||
+
|
||||
void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods)
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 6ce4a0c81ded0e350b65e21b42650db157d16708 Mon Sep 17 00:00:00 2001
|
||||
From 9784639ef93dc7e775d4b42d851179eee728f5d9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 1 Dec 2020 17:43:01 +0100
|
||||
Subject: [PATCH] widl: Support WinRT parameterized delegate type.
|
||||
|
||||
---
|
||||
include/windows.foundation.idl | 6 ++++
|
||||
tools/widl/parser.y | 11 ++++++++
|
||||
tools/widl/typetree.c | 50 +++++++++++++++++++++++++++++++---
|
||||
tools/widl/parser.y | 11 +++++++
|
||||
tools/widl/typetree.c | 55 +++++++++++++++++++++++++++++-----
|
||||
tools/widl/typetree.h | 1 +
|
||||
4 files changed, 64 insertions(+), 4 deletions(-)
|
||||
4 files changed, 66 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
|
||||
index 5f7a49c38e4..9583fa5bcc8 100644
|
||||
@ -50,7 +50,7 @@ index 569669dcfac..6811f80a088 100644
|
||||
|
||||
required_types:
|
||||
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
|
||||
index dd870fb964b..d0bd5e4e5e6 100644
|
||||
index 89ebc0b5999..e9eb2a4e75e 100644
|
||||
--- a/tools/widl/typetree.c
|
||||
+++ b/tools/widl/typetree.c
|
||||
@@ -142,16 +142,16 @@ static char const *parameterized_type_shorthands[][2] = {
|
||||
@ -73,7 +73,23 @@ index dd870fb964b..d0bd5e4e5e6 100644
|
||||
for (entry = params; entry; entry = entry->next)
|
||||
{
|
||||
for (type = entry->type; type->type_type == TYPE_POINTER; type = type_pointer_get_ref_type(type)) {}
|
||||
@@ -688,6 +688,11 @@ static void type_parameterized_interface_specialize(type_t *tmpl, type_t *iface,
|
||||
@@ -509,12 +509,13 @@ static unsigned int compute_method_indexes(type_t *iface)
|
||||
return idx;
|
||||
}
|
||||
|
||||
-static void compute_delegate_iface_names(type_t *delegate)
|
||||
+static void compute_delegate_iface_names(type_t *delegate, type_t *type, type_list_t *params)
|
||||
{
|
||||
type_t *iface = delegate->details.delegate.iface;
|
||||
iface->namespace = delegate->namespace;
|
||||
iface->name = strmake("I%s", delegate->name);
|
||||
- iface->c_name = format_namespace(delegate->namespace, "__x_", "_C", iface->name, use_abi_namespace ? "ABI" : NULL);
|
||||
+ if (type) iface->c_name = format_parameterized_type_c_name(type, params, "I");
|
||||
+ else iface->c_name = format_namespace(delegate->namespace, "__x_", "_C", iface->name, use_abi_namespace ? "ABI" : NULL);
|
||||
}
|
||||
|
||||
static type_t *replace_type_parameters_in_type(type_t *type, type_list_t *orig, type_list_t *repl);
|
||||
@@ -689,6 +690,11 @@ static void type_parameterized_interface_specialize(type_t *tmpl, type_t *iface,
|
||||
iface->details.iface->requires = NULL;
|
||||
}
|
||||
|
||||
@ -85,7 +101,7 @@ index dd870fb964b..d0bd5e4e5e6 100644
|
||||
type_t *type_parameterized_type_specialize_partial(type_t *type, type_list_t *params)
|
||||
{
|
||||
type_t *new_type = duptype(type, 0);
|
||||
@@ -704,7 +709,15 @@ type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *pa
|
||||
@@ -705,7 +711,13 @@ type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *pa
|
||||
new_type->namespace = type->namespace;
|
||||
new_type->name = format_parameterized_type_name(type, params);
|
||||
reg_type(new_type, new_type->name, new_type->namespace, 0);
|
||||
@ -95,14 +111,12 @@ index dd870fb964b..d0bd5e4e5e6 100644
|
||||
+ if (new_type->type_type == TYPE_DELEGATE)
|
||||
+ {
|
||||
+ new_type->details.delegate.iface = duptype(tmpl->details.delegate.iface, 0);
|
||||
+ compute_delegate_iface_name(new_type);
|
||||
+ new_type->details.delegate.iface->namespace = new_type->namespace;
|
||||
+ new_type->details.delegate.iface->c_name = format_parameterized_type_c_name(type, params, "I");
|
||||
+ compute_delegate_iface_names(new_type, type, params);
|
||||
+ }
|
||||
|
||||
return new_type;
|
||||
}
|
||||
@@ -717,6 +730,8 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
|
||||
@@ -718,6 +730,8 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
|
||||
|
||||
if (tmpl->type_type == TYPE_INTERFACE)
|
||||
type_parameterized_interface_specialize(tmpl, iface, orig, params);
|
||||
@ -111,7 +125,7 @@ index dd870fb964b..d0bd5e4e5e6 100644
|
||||
else
|
||||
{
|
||||
error_loc("Unsupported parameterized type template %d\n", tmpl->type_type);
|
||||
@@ -724,6 +739,11 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
|
||||
@@ -725,6 +739,11 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
|
||||
}
|
||||
|
||||
iface->defined = TRUE;
|
||||
@ -123,10 +137,14 @@ index dd870fb964b..d0bd5e4e5e6 100644
|
||||
compute_method_indexes(iface);
|
||||
return iface;
|
||||
}
|
||||
@@ -793,6 +813,28 @@ void type_delegate_define(type_t *delegate, statement_list_t *stmts)
|
||||
compute_delegate_iface_name(delegate);
|
||||
}
|
||||
@@ -791,7 +810,29 @@ void type_delegate_define(type_t *delegate, statement_list_t *stmts)
|
||||
compute_method_indexes(iface);
|
||||
|
||||
delegate->details.delegate.iface = iface;
|
||||
- compute_delegate_iface_names(delegate);
|
||||
+ compute_delegate_iface_names(delegate, NULL, NULL);
|
||||
+}
|
||||
+
|
||||
+void type_parameterized_delegate_define(type_t *type, type_list_t *params, statement_list_t *stmts)
|
||||
+{
|
||||
+ type_t *delegate = make_type(TYPE_DELEGATE);
|
||||
@ -147,11 +165,9 @@ index dd870fb964b..d0bd5e4e5e6 100644
|
||||
+ iface->details.iface->disp_inherit = NULL;
|
||||
+ iface->details.iface->async_iface = NULL;
|
||||
+ iface->details.iface->requires = NULL;
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods)
|
||||
{
|
||||
iface->details.iface = xmalloc(sizeof(*iface->details.iface));
|
||||
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
|
||||
index de3db4e7c7e..939bc5b412e 100644
|
||||
--- a/tools/widl/typetree.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9e0f6fbe59ebb3a6a2baf76defd44f99a7956721 Mon Sep 17 00:00:00 2001
|
||||
From 76f48d39dd43be3a66117b7cd49e70dea962d52b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 1 Dec 2020 17:44:43 +0100
|
||||
Subject: [PATCH] widl: Compute signatures for parameterized types.
|
||||
@ -10,7 +10,7 @@ Subject: [PATCH] widl: Compute signatures for parameterized types.
|
||||
3 files changed, 163 insertions(+)
|
||||
|
||||
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
|
||||
index d0bd5e4e5e6..61defa177a7 100644
|
||||
index e9eb2a4e75e..c0a7b584b0c 100644
|
||||
--- a/tools/widl/typetree.c
|
||||
+++ b/tools/widl/typetree.c
|
||||
@@ -49,6 +49,7 @@ type_t *make_type(enum type_type type)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From df4252c0e8d2905a9ba0f5e068590e588c8ca290 Mon Sep 17 00:00:00 2001
|
||||
From df420c2d870d9ec0bccd91cedde12be6506620d7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 28 Sep 2020 17:00:41 +0200
|
||||
Subject: [PATCH] widl: Compute uuids for parameterized types.
|
||||
@ -222,7 +222,7 @@ index 3c2fd2914bf..208b193ac87 100644
|
||||
+
|
||||
#endif
|
||||
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
|
||||
index 61defa177a7..99599710a04 100644
|
||||
index c0a7b584b0c..176b34d1846 100644
|
||||
--- a/tools/widl/typetree.c
|
||||
+++ b/tools/widl/typetree.c
|
||||
@@ -29,6 +29,7 @@
|
||||
@ -233,8 +233,8 @@ index 61defa177a7..99599710a04 100644
|
||||
|
||||
type_t *duptype(type_t *t, int dupname)
|
||||
{
|
||||
@@ -665,6 +666,57 @@ static void compute_delegate_iface_name(type_t *delegate)
|
||||
delegate->details.delegate.iface->name = name;
|
||||
@@ -667,6 +668,57 @@ static void compute_delegate_iface_names(type_t *delegate, type_t *type, type_li
|
||||
else iface->c_name = format_namespace(delegate->namespace, "__x_", "_C", iface->name, use_abi_namespace ? "ABI" : NULL);
|
||||
}
|
||||
|
||||
+static void compute_interface_signature_uuid(type_t *iface)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 140a726843c3abbc4fb0fd3cf41f2e43d42733f4 Mon Sep 17 00:00:00 2001
|
||||
From 46d985e5575c2f1868d6c50d2e00400205f11b92 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Wed, 26 Aug 2020 22:46:02 +0200
|
||||
Subject: [PATCH] widl: Generate helper macros for WinRT implementation.
|
||||
@ -16,13 +16,13 @@ Implementation files can define the desired WIDL_USING preprocessor
|
||||
macros before including the header, and then implement or use the
|
||||
interface methods with the simple non-prefixed names instead.
|
||||
---
|
||||
tools/widl/header.c | 71 ++++++++++++++++++++++++++++++++++++++++--
|
||||
tools/widl/header.c | 72 ++++++++++++++++++++++++++++++++++++++++--
|
||||
tools/widl/typetree.c | 19 +++++++++++
|
||||
tools/widl/widltypes.h | 1 +
|
||||
3 files changed, 89 insertions(+), 2 deletions(-)
|
||||
3 files changed, 90 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/widl/header.c b/tools/widl/header.c
|
||||
index bde58b55472..24eb5260da0 100644
|
||||
index 37e96a8dcbe..3c4a9df9a83 100644
|
||||
--- a/tools/widl/header.c
|
||||
+++ b/tools/widl/header.c
|
||||
@@ -50,6 +50,8 @@ static void write_winrt_type_comments(FILE *header, const type_t *type);
|
||||
@ -48,7 +48,7 @@ index bde58b55472..24eb5260da0 100644
|
||||
}
|
||||
if (contract) write_apicontract_guard_end(f, contract);
|
||||
}
|
||||
@@ -1643,6 +1646,69 @@ static void write_com_interface_start(FILE *header, const type_t *iface)
|
||||
@@ -1643,6 +1646,70 @@ static void write_com_interface_start(FILE *header, const type_t *iface)
|
||||
fprintf(header,"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->c_name, dispinterface ? "DISP" : "");
|
||||
}
|
||||
|
||||
@ -85,12 +85,13 @@ index bde58b55472..24eb5260da0 100644
|
||||
+ STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface))
|
||||
+ {
|
||||
+ const var_t *func = stmt->u.var;
|
||||
+ const char *func_name = get_name(func);
|
||||
+ const char *func_name;
|
||||
+
|
||||
+ if (is_override_method(iface, top_iface, func)) continue;
|
||||
+ if (is_callas(func->attrs)) continue;
|
||||
+
|
||||
+ if (!is_callas(func->attrs))
|
||||
+ fprintf(header, "#define %s_%s %s_%s\n", name, func_name, top_iface->c_name, func_name);
|
||||
+ func_name = get_name(func);
|
||||
+ fprintf(header, "#define %s_%s %s_%s\n", name, func_name, top_iface->c_name, func_name);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
@ -118,7 +119,7 @@ index bde58b55472..24eb5260da0 100644
|
||||
static void write_com_interface_end(FILE *header, type_t *iface)
|
||||
{
|
||||
int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
|
||||
@@ -1715,6 +1781,7 @@ static void write_com_interface_end(FILE *header, type_t *iface)
|
||||
@@ -1715,6 +1782,7 @@ static void write_com_interface_end(FILE *header, type_t *iface)
|
||||
fprintf(header, "#else\n");
|
||||
write_inline_wrappers(header, type, type, iface->c_name);
|
||||
fprintf(header, "#endif\n");
|
||||
@ -127,7 +128,7 @@ index bde58b55472..24eb5260da0 100644
|
||||
fprintf(header, "\n");
|
||||
fprintf(header, "#endif\n");
|
||||
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
|
||||
index 99599710a04..faa6e29fb34 100644
|
||||
index 176b34d1846..439b1b54b8a 100644
|
||||
--- a/tools/widl/typetree.c
|
||||
+++ b/tools/widl/typetree.c
|
||||
@@ -51,6 +51,7 @@ type_t *make_type(enum type_type type)
|
||||
@ -161,7 +162,7 @@ index 99599710a04..faa6e29fb34 100644
|
||||
type_t *type_new_function(var_list_t *args)
|
||||
{
|
||||
var_t *arg;
|
||||
@@ -911,6 +928,7 @@ type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *pa
|
||||
@@ -913,11 +930,13 @@ type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *pa
|
||||
new_type->name = format_parameterized_type_name(type, params);
|
||||
reg_type(new_type, new_type->name, new_type->namespace, 0);
|
||||
new_type->c_name = format_parameterized_type_c_name(type, params, "");
|
||||
@ -169,10 +170,8 @@ index 99599710a04..faa6e29fb34 100644
|
||||
|
||||
if (new_type->type_type == TYPE_DELEGATE)
|
||||
{
|
||||
@@ -918,6 +936,7 @@ type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *pa
|
||||
compute_delegate_iface_name(new_type);
|
||||
new_type->details.delegate.iface->namespace = new_type->namespace;
|
||||
new_type->details.delegate.iface->c_name = format_parameterized_type_c_name(type, params, "I");
|
||||
new_type->details.delegate.iface = duptype(tmpl->details.delegate.iface, 0);
|
||||
compute_delegate_iface_names(new_type, type, params);
|
||||
+ new_type->details.delegate.iface->short_name = format_parameterized_type_short_name(type, params, "I");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 41a244a45cb5a924ef43af2623416a1c4d307028 Mon Sep 17 00:00:00 2001
|
||||
From 0f430cec7cce71db0ac00321de5e4f8f52e7adc5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 25 Sep 2020 17:05:17 +0200
|
||||
Subject: [PATCH] include: Add IVectorView<HSTRING> declaration to
|
||||
|
Loading…
Reference in New Issue
Block a user